Learning with noisy labels: co-teaching and the small-loss trick
Networks learn clean patterns first and memorize wrong labels later. Co-teaching trains two networks that each pick the other's likely-clean rows. Why it works, and how it can drop the hard cases you need.
What runs in CodeSplash
- ROB006Co-teaching Explained here
You will be able to
- Explain early learning versus memorization and the small-loss heuristic
- Describe co-teaching's cross-update and the keep-rate schedule
- Name the failure modes (correlated networks, structured noise, discarded minorities)
- Evaluate against ordinary training with an untouched, well-labeled test set
Wrong labels get memorized
ReadEvery labeled dataset has some wrong labels. A large network trained long enough will fit them all, the right ones and the wrong ones, and its validation accuracy rises, then falls as it memorizes the noise.
The order matters: networks tend to learn the common, consistent patterns first and the odd, contradictory labels later. Early in training, rows with wrong labels tend to have high loss. That's the small-loss heuristic: rows the model finds easy are more likely to be correctly labeled.
Score rows with a model that saw their labels and it agrees with the wrong ones too; score them out of fold and the flips stand out.
HExplorable · Finding mislabeled rows: confident learning
Some labels are wrong. Can a model's own out-of-fold probabilities point to which ones?
Of the rows confident learning flags, what share are really mislabeled?
Each flipped label moves to the next class (A → B → C → A).
The model is k-nearest neighbors; its class probabilities are neighbor shares, lightly smoothed.
Probabilities from
Out of fold: each row scored by a model that never saw it (5 folds). In sample: the model saw the row's own label.
SD of each class around its center; larger means more overlap.
Shapes and colors show the label each row was given. Red outlines mark the rows whose label was really flipped; rings mark what confident learning flags. Rings without red are correct labels it suspects; red without a ring are flips it missed.
Commit your prediction above to see the result
Make your prediction to see the result.
Co-teaching: two networks, swapped choices
ReadCo-teachingCo-teachingTraining two networks on noisy labels where each updates on the rows the other finds easiest (smallest loss) in every batch. trains two networks, and , from different random starts. In each mini-batch of rows:
- picks the rows with its smallest losses; does the same.
- updates on 's picks, and on 's.
Swapping matters: a network that chose its own rows would keep confirming its own mistakes. In the reference's four-row example, each network keeps two rows, and trains on 's picks with a mean loss of 1.20.
The keep rate
ReadThe keep rate starts at 1, everything, during a warm-up while the networks learn the easy patterns, then falls toward , where is the estimated share of wrong labels.
Get wrong and the method fails in one of two ways: too high, and it throws away good data; too low, and noisy rows stay in. The schedule is a hyperparameter to set on development data, with its own validation set, not on the test set.
Who gets dropped?
PredictPredict first
A rare class is hard to learn and its rows have high loss early in training, even with correct labels. Which rows does co-teaching drop?
Reveal
Also the rare class. High loss means "hard" as well as "wrong". Small-loss selection can starve a minority class or difficult cases. Track the selection rate by class, and review excluded rows before calling them errors.
When it breaks, and how to check
Read- Correlated networks pick the same rows and reinforce the same bias; independent starts help but don't guarantee complementarity.
- Structured noise, where one class is systematically confused with another, can look consistent and easy, so it survives selection.
- Synthetic noise (labels flipped at random) is the easy case. Good results there don't show robustness to real annotator disagreement.
Compare with ordinary training, and with training on a clean subset if you have one, on a test set with careful, untouched labels. Rows the networks reject are candidates for review, not proven errors.
Where it stands in CodeSplash
Read| Entry | In CodeSplash |
|---|---|
| Co-teaching (ROB006) | Explained here |
| Related, in the app | Label issues on a finished classification run finds likely wrong labels for you to review (next lesson) |
Check your understanding
CheckpointCheck yourself
Why does co-teaching prefer small-loss rows early in training?
Show the answer
Answer: a
The small-loss heuristic relies on that ordering. Train too long and the network memorizes the wrong labels, and the losses stop telling them apart.
Check yourself
Why does each network train on the other's selected rows rather than its own?
Show the answer
Answer: b
Self-selection is self-confirmation. Two networks with different starts make different mistakes, and swapping lets each filter the other.
Check yourself
The estimated noise rate behind the keep schedule is far too high. What happens?
Show the answer
Answer: a
Too high an estimate discards good data; too low keeps corruption. Set it on development data and check selection rates by class.
What comes next
RecapCo-teaching works around wrong labels during training. The next lesson finds them, so a person can review and fix them: confident learning.
Concepts in this lesson