Fig. 1 in words
Label errors in ten test sets · same data as code 05
1 The build chain
- 1 write the labelling rules
- 2 label each item twice+ · 46
- 3 measure agreement (α) · 46
- 4 settle splits, record how · 46
- 5 flag suspects with a model · 48
- 6 confirm with people · 48
- 7 version, digest, datasheet · 48
- right: the sprint that covers it
2 Label errors per test set
- mnist 0.15% · cifar10 0.54% · cifar100 5.85% · caltech256 1.54% · imagenet 5.83% · quickdraw 10.12% (pale) · 20news 1.09% · imdb 2.90% · amazon 3.90% (pale) · audioset 1.35% (grey)
- - - mean 3.33%
- pale: from samples · grey: as published
3 ImageNet: 5 440 flags
- 2 524 · kept: label fine
- 1 428 · relabel (3+ agree)
- 597 · both labels
- 293 · neither label
- 598 · split, no majority
- confirmed errors: 2 916
4 One set, 4 versions
- v1.0 original · — · 50 000 items · 0 edits
- v1.1 relabel 3 of 5 · 214229ed · 50 000 items · 1 428 edits
- v1.2 relabel 5 of 5 · 3b07dbe4 · 50 000 items · 468 edits
- v2.0 drop errors · 0b2fa020 · 47 084 items · 0 edits
- right: first 8 hex of SHA-256
01 A Reference Set Definition
- Items, labels, the rules behind them, and a version
- A certified material states values with “uncertainties and traceabilities” (VIM 5.14)
- For labels: agreement, known errors, each item’s source
Aroyo & Welty’s seventh myth: “Once Done, Forever Valid”.
02 Clean Test Sets Claim fails
- Claim: “a published test set’s labels are correct”
- Ten sets (two from samples): mean 3.33% errors; ImageNet 2 916 of 50 000 (5.83%)
- An error: fewer than 3 of 5 people agree with the given label
The paper’s abstract rounds ImageNet up to “at least 6%”; its table says 5.83.
03 Flag, Then Confirm Method
- A model flags suspects: confident learning (Northcutt, Jiang & Chuang 2021)
- People check them: 2 524 of 5 440 ImageNet flags (46.4%) kept their label
- So never relabel on a model’s word alone
AudioSet is multi-label; one rule we inferred gives its 275 exactly, but the paper does not state it.
04 Fix, Drop or Mark Evidence
- ImageNet errors: 1 428 relabelled · 597 both labels · 293 neither · 598 split
- IMDB: 552 of 725 errors get no sentiment majority (200 voted neutral)
- A split is disagreement, not a known right answer (Sprint 46)
Northcutt et al. left multi-label items out of their own analysis.
05 Try It Yourself PY 3.13.18 · STANDARD LIBRARY
sprint48_building_a_verified_reference_set.py
import hashlib, json
SIZE = {"mnist": 10000, "cifar10": 10000, "cifar100": 10000,
"caltech256": 29780, "imagenet": 50000, "quickdraw": 50426266,
"20news": 7532, "imdb": 25000, "amazon": 9996437} # test sets
FLAGGED = {"quickdraw": 6825383, "amazon": 533249} # only a sample
def load(name): # was checked
with open(f"{name}_mturk.json", encoding="utf-8") as f:
return json.load(f)
def given(e): # votes for the given label (Amazon: by name)
m, g = e["mturk"], e["given_original_label"]
return m[g.lower()] if str(g).lower() in m else m["given"]
print(f"{'test set':<10} {'size':>8} checked errors share")
shares = []
for name, size in SIZE.items():
d = load(name)
err = sum(given(e) < 3 for e in d) # under 3 of 5 people agree
shares.append(100 * err / len(d) * FLAGGED.get(name, len(d)) / size)
print(f"{name:<10} {size:>8} {len(d):>7} {err:>6} {shares[-1]:5.2f}%")
shares.append(1.35) # AudioSet: the paper's own figure
print(f"mean of 10 test sets: {sum(shares) / 10:.2f}%")
kind = {k: [] for k in ("fine", "fix", "both", "neither", "split")}
for e in load("imagenet"):
m = e["mturk"]
kind["fine" if m["given"] >= 3 else "fix" if m["guessed"] >= 3
else "both" if m["both"] >= 3 else "neither"
if m["neither"] >= 3 else "split"].append(e)
print("imagenet:", " | ".join(f"{k} {len(v)}"
for k, v in kind.items()))
def digest(edits, drop=()): # a release is named by its content
blob = json.dumps({"edits": sorted(edits), "drop": sorted(drop)})
return hashlib.sha256(blob.encode()).hexdigest()[:8]
fix3 = [(e["id"], e["our_guessed_label"]) for e in kind["fix"]]
fix5 = [(e["id"], e["our_guessed_label"]) for e in kind["fix"]
if e["mturk"]["guessed"] == 5]
bad = [e["id"] for k, v in kind.items() if k != "fine" for e in v]
for tag, ed, dr in [("v1.1 relabel 3 of 5", fix3, ()),
("v1.2 relabel 5 of 5", fix5, ()),
("v2.0 drop the errors", (), bad)]:
print(f"{tag:<21} {50000 - len(dr)} items {len(ed):>4} edits"
f" sha256 {digest(ed, dr)}")
Output, as printed on the image
test set size checked errors share
mnist 10000 100 15 0.15%
cifar10 10000 275 54 0.54%
cifar100 10000 2235 585 5.85%
caltech256 29780 2360 458 1.54%
imagenet 50000 5440 2916 5.83%
quickdraw 50426266 2500 1870 10.12%
20news 7532 93 82 1.09%
imdb 25000 1310 725 2.90%
amazon 9996437 1000 732 3.90%
mean of 10 test sets: 3.33%
imagenet: fine 2524 | fix 1428 | both 597 | neither 293 | split 598
v1.1 relabel 3 of 5 50000 items 1428 edits sha256 214229ed
v1.2 relabel 5 of 5 50000 items 468 edits sha256 3b07dbe4
v2.0 drop the errors 47084 items 0 edits sha256 0b2fa020
Run it. sprint48_building_a_verified_reference_set.py · versions, data and steps
Check: 2 916 ÷ 50 000 = 5.83% · 2 524 + 1 428 + 597 + 293 + 598 = 5 440 · 50 000 − 2 916 = 47 084
06 General Notes Practice
- Name each release by a digest of its content (Sprint 2) and keep the old ones
- Ship a datasheet (Gebru et al. 2021) or a data statement (Bender & Friedman 2018) with known errors
Bridge: on ImageNet, ResNet-18 overtakes ResNet-50 if mislabelled test items rise by 6% (Northcutt et al. 2021). A ranking depends on the version.
07 Mini Project Hands-on
- Keep the 842 CLIMATE-FEVER claims whose label survives any tie rule (Sprint 46)
- Compare its label shares with the full set
- Write a one-page datasheet and a SHA-256 manifest for it
Then rerun Sprint 47’s verifier on both versions.
R Trusted Sources
- Northcutt, Athalye & Mueller (2021) Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks, NeurIPS
- Northcutt, Jiang & Chuang (2021) Confident Learning, JAIR 70, 1373–1411
- cleanlab/label-errors, GitHub (commit 6d5d6b3)
- JCGM 200:2012 (VIM 3), 5.14
- Gebru et al. (2021) Datasheets for Datasets, CACM 64(12), 86–92
- Bender & Friedman (2018) TACL 6, 587–604
- Aroyo & Welty (2015) AI Magazine 36(1), 15–24
