Foundation Lab

Label Smoothing & Soft Targets

Used in most vision models and LLMs—simple trick with consistent improvements

Concept 60 of 100OptimizationPhase 3
#60Label SmoothOptimization
key equation
ysmooth=(1−α)y+αKy_{smooth} = (1 - \alpha) y + \frac{\alpha}{K}
Reading map and next steps

Selected Foundation Object

Keep the equation fixed; move through the evidence.

Concept 60 of 100Label SmoothOptimization / Phase 3: Optimization & generalization
Current question

Hard targets say "100% sure it's class 3"—but that's almost never true in real data

ysmooth=(1−α)y+αKy_{smooth} = (1 - \alpha) y + \frac{\alpha}{K}
PredictionCommit before tracing the equation.

Ask what should change under a concrete input, then trace that expectation through the equation.

EvidenceCompare the equation and source.

Use the key equation and canonical papers as the available witnesses, without implying that a runnable panel exists.

InvariantName what survives notation changes.

The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.

Next moveContinue through the atlas.

Use prerequisites, dependents, and semantic links to repair the next gap without leaving the object behind.

Why It Matters for Modern Models

  • Used in most vision models and LLMs—simple trick with consistent improvements
  • Prevents overconfidence, which improves calibration and sometimes generalization
  • Knowledge distillation uses the same idea: train on soft targets from a teacher model

What Tutorials Skip

What is still poorly explained in textbooks and papers:

  • Hard targets say "100% sure it's class 3"—but that's almost never true in real data
  • Label smoothing implicitly regularizes: model can't drive logits to ±∞
  • Connects to calibration: smoothed models give more honest uncertainty estimates

Visualization Status

Core Math (Optional Deep Dive)

If you want intuition first, start with the key equation and cited sources. Come back here for the full walkthrough.

Key Equation
ysmooth=(1−α)y+αKy_{smooth} = (1 - \alpha) y + \frac{\alpha}{K}

Instead of hard targets y=[0,0,1,0]y = [0, 0, 1, 0], use soft targets:

ysmooth=(1−α)y+αKy_{smooth} = (1 - \alpha) y + \frac{\alpha}{K}

For α=0.1\alpha = 0.1 and K=4K = 4 classes: [0.025,0.025,0.925,0.025][0.025, 0.025, 0.925, 0.025]

Effect on cross-entropy:

Lsmooth=(1−α)LCE(p,y)+αLCE(p,u)\mathcal{L}_{smooth} = (1-\alpha) \mathcal{L}_{CE}(p, y) + \alpha \mathcal{L}_{CE}(p, u)

where uu is uniform. This penalizes overconfidence: logits can't go to infinity.

Canonical Papers

Rethinking the Inception Architecture for Computer Vision

Szegedy et al.2016CVPR
Read paper →

When Does Label Smoothing Help?

Müller, Kornblith, Hinton2019NeurIPS
Read paper →

Connections

Prerequisites

Next Moves

Choose the next question to carry this object forward.