Label Smoothing Calculator
Calculate smoothed label values used to regularize classification training targets.
Inputs
Typical range: 0.05–0.2 (5–20%).
Correct-Class Target Value
0.900100
Other-Class Target Value
0.00010000
Effective Max Confidence
90.01%
Uniform Floor per Other Class
0.0100%
Step by step
Correct-class target: (1 − α) + α/K
(1 − 0.10) + 0.10/1000
= 0.900100
Other-class target: α/K
0.10 ÷ 1000
= 0.00010000
Effective max confidence
0.900100 × 100
= 90.01%
How it works
Label smoothing replaces hard one-hot classification targets with a softened distribution: smoothed = (1 − α) × one_hot + α / K, where K is the number of classes and α is the smoothing factor. This means the correct class gets a target of (1 − α) + α/K instead of 1.0, and every incorrect class gets α/K instead of 0.0. This prevents the model from becoming overconfident, improves calibration, and can reduce overfitting, at the cost of the model never being 'encouraged' to output a perfect 100% probability for the correct class.
Formulas
Correct-class target
target_correct = (1 - alpha) + alpha / K
- alpha
- Smoothing factor (e.g. 0.1)
- K
- Number of classes
Other-class target
target_other = alpha / K
- alpha
- Smoothing factor
- K
- Number of classes
Frequently Asked Questions
What's a typical smoothing factor?
α = 0.1 (10%) is the most common default, originating from the Inception-v3 paper and widely reused since; values between 0.05 and 0.2 are typical, with higher values applying stronger regularization at some cost to peak accuracy.
Why doesn't the model reach 100% confidence with label smoothing?
Because the training target itself caps out below 1.0 (specifically at (1−α)+α/K), the cross-entropy loss is minimized when the model's predicted probability matches that capped target, not 1.0 — this discourages overconfident predictions by design.
How does label smoothing affect calibration?
It generally improves calibration (how well predicted probabilities match actual accuracy) because it discourages the extreme, overconfident logits that come from training directly against hard 0/1 targets.
Does label smoothing help with noisy labels?
Yes — since it softens how much the model is penalized for not perfectly matching the given label, it can reduce the negative impact of occasional mislabeled training examples compared to hard-target training.