← Back to Deep Learning Mind Map
🧠 Deep LearningID: label-smoothing

Label Smoothing

🎯Core Definition
label smoothing mixes the one-hot label with a uniform distribution: y′=y(1−ϵ)+ϵKy' = y(1-\epsilon) + \frac{\epsilon}{K}, where KK is the number of classes and ϵ\epsilon is typically 0.1; the true class gets 1−ϵ+ϵK1-\epsilon+\frac{\epsilon}{K} and every other class gets ϵK\frac{\epsilon}{K}. It is equivalent to adding a KL penalty toward the uniform distribution to the cross-entropy loss.
💡Use Cases
standard for ImageNet-style classification (Inception / ResNet v2 families), Transformer machine translation, and LLM pretraining/finetuning to suppress overconfidence and improve calibration. Interviews ask for the formula, why it prevents overfitting, and its side effect on distillation.
⚡Key Problems Solved
it prevents extreme logits (confidence saturating to 1) on one-hot labels, improving generalization and calibration. Classic side effect (Müller et al. 2019, 'When Does Label Smoothing Help?'): smoothing flattens the relative logit information ('dark knowledge') of the teacher, so student distillation gains drop noticeably — when distillation is planned, the teacher is usually trained without label smoothing.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Label Smoothing.
Use Cases
In production engineering, what are the primary use cases for Label Smoothing and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Write the label-smoothing formula y′=y(1−ϵ)+ϵKy' = y(1-\epsilon) + \frac{\epsilon}{K}, explain the roles of ϵ\epsilon and KK, and state the usual value of ϵ\epsilon.
2
Why does label smoothing prevent overconfidence? How does it affect logit magnitudes and model calibration?
3
Why does label smoothing hurt knowledge distillation? What information in the teacher's output does it destroy?
4
What regularization term is label smoothing equivalent to adding to cross-entropy? Write the corresponding loss form.
5
In which scenarios should label smoothing be avoided? How does it interact with temperature scaling?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Label Smoothing"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardDropoutNext Card →Weight Decay & AdamW

🔗 More Deep Learning Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/DL/card/label-smoothing
中文速览与面试要点

Label Smoothing (Label Smoothing)

定义: Label Smoothing 把 one-hot 标签与均匀分布混合: y' = y(1- ) + K, 其中 K 为类别数、 通常取 0.1; 真实类别概率变为 1- + K, 其余类别各得 K。等价于在交叉熵损失上添加对均匀分布的 KL 惩罚。 使用场景: 图像分类 (ImageNet 训练标配, Inception/ResNet v2 系列)、Transformer 机器翻译、LLM 预训练/微调中用于抑制过自信 (overconfidence) 并改善校准 (calibration)。面试常问: 公式、为什么防过拟合、对蒸馏的副作用。 解决的问题: 阻止模型对 one-hot 标签产生极端 logits (置信度饱和到 1), 提高泛化与校准度。经典副作用 (Müller et al. 2019, When Does Label Smoothing Help?): 平滑后的 teacher 输出中类别间的相对 logit 信息 (“dark knowledge”) 被抹平, 学生蒸馏收益明显下降——后续要做蒸馏时, teacher 训练通常不开 label smoothing。

核心要点

  • 写出 Label Smoothing 公式 y' = y(1- ) + K 并解释 与 K 的作用? 通常取多少?
  • Label Smoothing 为什么能防止过自信 (overconfidence)? 对 logits 大小与模型校准 (calibration) 的影响?
  • 为什么 Label Smoothing 会损害知识蒸馏? teacher 输出中的什么信息被平滑抹掉了?
  • Label Smoothing 等价于在交叉熵上添加什么样的正则项? 写出对应的损失函数形式?
  • 什么场景不应该用 Label Smoothing? 它与温度缩放 (temperature) 的配合使用?