Label smoothing
When the model learns that “dog” is “Hund”, the plain target says: probability 1 for Hund, 0 for every other word. Label smoothing asks for a little less certainty: it keeps most of the target on the right word and spreads a small share ε over the whole vocabulary.
The training target
The loss of three predictions
| Prediction | p(Hund) | Loss, smoothed target | Loss, plain target |
|---|---|---|---|
| Sure and right | 97.4 % | 0.477 | 0.027 |
| Unsure | 30.9 % | 1.248 | 1.175 |
| Sure and wrong | 0.2 % | 5.877 | 6.027 |
| Exactly the smoothed target | 91.7 % | 0.421 | 0.087 |
The three predictions are made up to show the idea; the losses are computed from them. The last row is the prediction that matches the smoothed target exactly: the lowest loss training can reach.
Our model, trained with and without it
| Our model | Held-out loss | Perplexity | First step at 95 % |
|---|---|---|---|
| With label smoothing (ε_ls = 0.1) | 0.0632 | 1.0652 | 187 (180–200) |
| Without label smoothing | 0.0005 | 1.0005 | 200 (180–220) |
Without smoothing, the held-out loss falls almost to 0: the model is nearly certain of every right word. With smoothing it stays near 0.06, because the model was trained never to be quite sure. Yet both first translate 95 % of held-out sentences at about the same step, and both translate them right. A worse loss, the same translations: that is the paper's point.
Why make a model less sure?
With a plain target, the model can always lower its loss by being even more certain, pushing its scores further apart. That habit makes it overconfident about wrong words too, and it learns little about which other words were nearly right. With a smoothed target, being too certain costs loss, so the model keeps some probability for close alternatives, which tends to help the beam search and the final translation.
Perplexity is e to the power of the loss: roughly how many words the model is hesitating between. Smoothing raises it on purpose, so it is a poor guide to a smoothed model's quality; BLEU, which scores the translations themselves, is the better one.
In the paper (5.4)
“During training, we employed label smoothing of value ε_ls = 0.1. This hurts perplexity, as the model learns to be more unsure, but improves accuracy and BLEU score.”