Approach summary:Train K diverse classifiers on the same labeled dataset (diversity via architectures, random seeds, training folds, augmentations). For each training example, compute each model’s predicted class and confidence (softmax probability). Score examples by combining inter-model disagreement and average max-confidence to prioritize likely label flips: high disagreement + high confidence.Pseudo-code (Python-like):python
def detect_label_flips(models, dataset, beta=1.0, gamma=0.5):
# models: list of K trained models
# dataset: list of (x, y)
# beta: weight for confidence in score
# gamma: exponent to amplify disagreement
scores = []
for i, (x, y_true) in enumerate(dataset):
preds = [] # predicted class
confs = [] # predicted max-prob
for m in models:
p = m.predict_proba(x) # vector over classes
c = argmax(p)
preds.append(c)
confs.append(max(p))
# disagreement: normalized entropy over model votes
vote_counts = Counter(preds)
vote_probs = [v/len(models) for v in vote_counts.values()]
disagreement = -sum(p*log(p) for p in vote_probs) / log(len(vote_probs))
avg_conf = mean(confs)
# Score: prefer high disagreement and high average confidence
score = (disagreement ** gamma) * (avg_conf ** beta)
scores.append((i, y_true, score, preds, confs))
return sorted(scores, key=lambda t: t[2], reverse=True)
Scoring metric rationale:- Disagreement: normalized vote-entropy captures how split models are about label.- avg_conf: high confidence means models are confident in (possibly incorrect) prediction; combining favors cases where models confidently agree on a label different from the annotated one or where models strongly disagree while confident.- Exponents/weights (gamma, beta) let you emphasize disagreement vs confidence.Hyperparameters to tune:- K (number of models): trade-off between robustness and compute (typical 5–20).- Diversity mechanisms: architecture pool, data folds, augmentation strength.- beta, gamma: relative importance of confidence vs disagreement (grid search on validation noise-injection).- Thresholds: top-N or score cutoff for human review.- Per-model temperature scaling or calibration to make confidences comparable.Compute cost:- Training: K × cost of single model training. Can reduce via lightweight or snapshot ensembles, distillation, or training smaller diverse models.- Inference: K forward passes per example; can batch and parallelize. For dataset of N examples, cost ~ O(KN) inference.- Memory: store K models; inference memory scales with largest model.Presentation to human labelers:- Show original example, current label, top voted label(s) by models, per-model confidences, vote distribution, score, and brief explanation (e.g., "4/5 models predict 'cat' avg_conf=0.92; original='dog'"). Prioritize by score and group by predicted-label vs original-label (confident consensus flips vs high-entropy disagreements). Provide UI actions: accept model-consensus flip, mark ambiguous (needs more context), add comment, or escalate. Include small batch context: similar examples and model explanations (saliency or nearest neighbors) to speed decisions and ensure consistency.