Pick a concrete input and say what the equation should give before you read the math.
Foundation reference
Label Smoothing & Soft Targets
Label smoothing replaces a one-hot target with a mixture of that target and a uniform distribution over classes, with weight α on the uniform part. It was introduced as a regularizer for the Inception-v3 image classifier (Szegedy et al., 2016), and the original Transformer used it with α = 0.1 for translation, where it made perplexity worse but improved accuracy and BLEU score (Vaswani et al., 2017).
Study guide
Where to start
With one-hot targets, cross-entropy keeps decreasing as the correct logit grows; what stops the logits from growing without bound, and how does label smoothing give the loss a finite minimum (Goodfellow et al., 2016, §7.5.1)?
How to study this pagePredict · Check · Generalize · Continue
Work through the math, then read the cited papers for the original argument.
Identify the part of the idea that survives a change of notation or model, so you can recognize it in another paper or system.
Use the prerequisites and related concepts at the end of the page to fill the next gap.
Why It Matters for Modern Models
- Label smoothing replaces a one-hot target with a mixture of that target and a uniform distribution over classes, with weight α on the uniform part. It was introduced as a regularizer for the Inception-v3 image classifier (Szegedy et al., 2016), and the original Transformer used it with α = 0.1 for translation, where it made perplexity worse but improved accuracy and BLEU score (Vaswani et al., 2017).
- It usually improves calibration: a smoothed model's predicted confidence tracks its accuracy more closely (Müller et al., 2019).
- It interacts with knowledge distillation, which also trains on soft targets: Müller et al. (2019) found that a teacher trained with label smoothing makes a much less effective teacher for distillation.
Questions to Think About
- Why does label smoothing pull the penultimate-layer representations of each class into tight clusters, and why does that erase information about which examples of different classes resemble each other (Müller et al., 2019)?
- When does label smoothing improve calibration in a way that a single temperature fitted after training could not, and when are the two interchangeable?
Core Math
Instead of a one-hot target such as , train on a smoothed target that moves a fraction of the probability to the uniform distribution over the classes:
For and classes this gives .
Cross-entropy is linear in the target, so the smoothed loss splits into two terms:
With a one-hot target the loss keeps falling as the correct logit grows, so the logits can grow without bound. With a smoothed target the loss is smallest when , which for a softmax means a finite gap between the correct logit and each of the others:
For and the gap is .