How Many Training Labels Are Wrong? Auditing a Fitted Model through Gradient Allocation
Organizations: The University of Sydney
Abstract
How many labels in a training set are wrong, and which ones? The usual answers read a held-out set or the model's outputs. A held-out reading depends on how the held-out set was drawn, and an output-based reading fails once the model has fitted its wrong labels, because the loss of a fitted wrong label is small and the prediction agrees with it. We read the answer from the per-example gradients of a single trained model. Each example, together with its label, asks the network to change in a particular way. We normalise the magnitudes of its gradient into a gradient allocation and compare it with the mean allocation of every class. An example is flagged when relabelling it as its nearest other class makes its allocation fit better than under its own label, and the share of flagged examples is the reading of the noise rate. The rule has no threshold and needs no clean data, no held-out set and no further training. After the model has fitted 99-100% of its wrong labels, the allocation still separates wrong from right labels with an AUC of 0.94-0.96 on the noisiest human labels of CIFAR-10N, where a feature-space margin falls to 0.79-0.84 and the loss, the gradient norm and the self-influence of an example to 0.73-0.76. On such a fitted model, readings of the noise rate from predictions or feature margins fall to 0-6% at true rates of 8-58% on CIFAR-10 with ViT-S, while the audit reads 54-96% of the true rate, and at least 93% of the examples it counts carry wrong labels. On a briefly trained model, before the wrong labels are fitted, the reading lies within 1.7 percentage points of the true noise rate on CIFAR-10 from 0% to 58% noise. Confident learning, which trains four further models, separates wrong labels about as well (AUC 0.925-0.998 against 0.900-0.995) and mostly reads the noise rate more closely, at a lower precision. An audit of 5,000 examples takes 14 to 27 seconds on one GPU.
Figures & tables
| CIFAR-10N worst | CIFAR-100N | |||
|---|---|---|---|---|
| Flag | ViT-S | ConvNeXt-T | ViT-S | ConvNeXt-T |
| Prediction label | 0.01 | 0.00 | 0.00 | 0.00 |
| Feature margin | 0.07 | 0.00 | 0.03 | 0.04 |
| Allocation margin | 0.64 (0.98) | 0.49 (0.99) | 0.40 (0.97) | 0.21 (0.95) |
| Label-swap | 0.72 (0.97) | 0.61 (0.98) | 0.45 (0.96) | 0.31 (0.94) |
| ViT-S/16 | ConvNeXt-T | |||||||
| Score | aggr. | rand. 1 | worst | sym. 20 | sym. 60 | C100N | worst | C100N |
| Final model only | ||||||||
| Loss | 0.880 | 0.842 | 0.757 | 0.929 | 0.757 | 0.799 | 0.741 | 0.777 |
| Gradient norm | 0.882 | 0.837 | 0.748 | 0.913 | 0.737 | 0.799 | 0.735 | 0.781 |
| Self-influence | 0.881 | 0.837 | 0.747 | 0.912 | 0.734 | 0.797 | 0.733 | 0.777 |
| Label-swap (ours) | 0.958 | 0.972 | 0.965 | 0.995 | 0.995 | 0.912 | 0.954 | 0.874 |
| Reading after epoch | |||||
| Model | Labels | Truth | 2 | 10 | 40 |
| ViT-S | C10 clean | 0.0 | 1.3 | 0.6 | 0.2 |
| C10N aggregate | 8.3 | 9.2 | 5.7 | 4.5 | |
| C10N random-1 | 16.5 | 17.4 | 13.7 | 11.8 | |
| C10 sym. 20% | 20.3 | 21.8 | 20.0 | 19.4 | |
| C10N worst | 39.4 | 38.8 | 32.8 | 28.9 | |
| CIFAR-10 | CIFAR-100 | |||||||
| clean | aggr. | rand. 1 | sym. 20 | worst | sym. 60 | clean | C100N | |
| Truth | 0.0 | 8.3 | 16.5 | 20.3 | 39.4 | 58.4 | 0.0 | 41.3 |
| After epoch 2 | ||||||||
| Disagreement | 1.1 | 9.1 | 17.7 | 22.0 | 39.5 | 61.0 | 8.8 | 42.0 |
| Feature margin | 1.1 | 9.1 | 17.3 | 21.9 | 39.2 | 59.7 | 9.0 | 42.7 |
| Neighbour vote | 0.9 | 9.0 | 17.6 | 22.3 | 45.0 | 84.9 | 10.0 | 50.8 |
| Reading (%) | Precision | AUC | |||||
|---|---|---|---|---|---|---|---|
| Labels | Truth | CL | LS | CL | LS | CL | LS |
| C10 clean | 0.0 | 0.3 | 0.2 | – | – | – | – |
| C10N aggregate | 8.3 | 5.8 | 4.5 | 0.917 | 0.934 | 0.989 | 0.958 |
| C10N random-1 | 16.5 | 14.4 | 11.8 | 0.943 | 0.956 | 0.991 | 0.972 |
| C10 sym. 20% | 20.3 | 20.5 | 19.4 | 0.961 | 0.985 | 0.998 | 0.995 |
| C10N worst | 39.4 | 34.3 | 28.9 | 0.927 | 0.973 | 0.967 | 0.965 |
| ViT-S | ConvNeXt-T | |||
|---|---|---|---|---|
| Score | AUC | Flagged | AUC | Flagged |
| Loss | 0.830 | – | 0.799 | – |
| Prediction label | – | 0.00 | – | 0.00 |
| Feature margin | 0.863 | 0.03 (1.00) | 0.832 | 0.01 (0.80) |
| Neighbour vote | 0.562 | 0.07 (1.00) | 0.540 | 0.04 (1.00) |
| Label-swap (ours) | 0.900 | 0.24 (0.89) | 0.839 | 0.16 (0.89) |
| ViT-S/16 | ConvNeXt-T | |
|---|---|---|
| Margins, 500 ex. | 0.7 s | 1.3 s |
| Margins, 5,000 ex. | 6.8 s | 13.1 s |
| Margins, 50,000 ex. | 68 s | 131 s |
| Label-swap, 5,000 ex. | 14 s | 27 s |
| Label-swap, 50,000 ex. | 146 s | 272 s |
| Training, 40 epochs | 27–33 min | 51–68 min |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Final model only | History | |||||||
| Model | Labels | LS | Loss | FM | NV | GN | SI | TracIn |
| ViT-S | C10N aggregate | 0.958 | 0.880 | 0.912 | 0.623 | 0.882 | 0.881 | 0.987 |
| C10N random-1 | 0.972 | 0.842 | 0.895 | 0.719 | 0.837 | 0.837 | 0.985 | |
| C10N worst | 0.965 | 0.757 | 0.843 | 0.758 | 0.748 | 0.747 | 0.934 | |
| C10 sym. 20% | 0.995 | 0.929 | 0.966 | 0.898 | 0.913 | 0.912 | 0.985 | |
| C10 sym. 60% | 0.995 | 0.757 | 0.865 | 0.885 | 0.737 | 0.734 | 0.842 | |
Learning with Noisy Labels
Learning with noisy labels studies how to train reliable models when annotations are incorrect, incomplete, subjective, or weakly supervised.
See all 168 papers