Self-Distillation as Instance-Specific Label Smoothing

Zhilu Zhang, Mert R. Sabuncu

Introduction

Knowledge Distillation (KD) is a cornerstone technique in deep learning, typically used for model compression by training a "student" model to mimic a larger "teacher." However, the phenomenon of self-distillation—where the teacher and student share the same architecture—presents a theoretical puzzle: why does a student often outperform its own teacher, and why does repeating this process over multiple generations lead to continued gains? This paper demystifies this "dark knowledge" by framing self-distillation as a form of instance-specific label smoothing.

Methods and Metrics

The authors propose three primary contributions to explain and exploit the mechanisms of self-distillation:

  1. Amortized MAP Interpretation: The teacher-student training loop is recast as a Maximum A Posteriori (MAP) estimation problem, where the teacher’s predictions serve as an instance-specific prior for the student.
  2. Confidence Diversity: A novel metric is introduced to quantify the variation in a model's predictions across a dataset. Unlike standard entropy, which measures average uncertainty, Confidence Diversity captures how uncertainty varies between specific samples.
  3. Beta Smoothing: To replicate the benefits of distillation without the cost of training a teacher, the authors propose Beta Smoothing. This technique applies varying levels of label smoothing to different samples based on a ranking of the model's own confidence (tracked via an Exponential Moving Average), effectively creating a "teacher-free" instance-specific regularizer.
Sensitivity of accuracy and diversity metrics to the temperature hyperparameter.

The relationship between temperature and these metrics is crucial. As shown in the figure above, adjusting the temperature affects not only the predictive uncertainty but also the Confidence Diversity, which correlates strongly with final test accuracy.

Key Insights and Ideas

The central argument of the paper is that self-distillation acts as a "smart" version of label smoothing. While classical label smoothing treats all examples uniformly, self-distillation adjusts the label based on the difficulty of the specific instance.

Evolution of performance and uncertainty metrics across multiple generations of self-distillation.

A key finding is the role of diversity. As self-distillation progresses through generations, the Confidence Diversity of the teacher increases. This diversity—the ability to treat different samples differently—is a more significant predictor of student performance than simple average uncertainty. Furthermore, the authors demonstrate that these gains can be achieved without a pre-trained teacher by using Beta Smoothing to rank samples by confidence on-the-fly.

Experimental Results

The proposed theories and the Beta Smoothing algorithm were evaluated on standard benchmarks including CIFAR-10/100, CUB-200, and Tiny-ImageNet, using architectures such as ResNet-34 and DenseNet-121.

  • Performance and Calibration: Both self-distillation and Beta Smoothing consistently outperformed standard cross-entropy and classical label smoothing. Notably, these methods significantly reduced Expected Calibration Error (ECE), resulting in models that are less overconfident and more reliable.
  • Efficiency: Beta Smoothing achieved performance parity with self-distillation on the CUB-200 dataset while requiring only a single training run, bypassing the need for a separate teacher training phase.

Conclusion and Future Work

This work clarifies the success of self-distillation by linking it to instance-specific regularization. While Beta Smoothing offers a computationally efficient alternative, self-distillation still holds a slight edge in some scenarios, likely due to the more reliable sample ranking provided by a fully trained teacher. Future research may explore more principled ways to directly regularize Confidence Diversity and extend these instance-specific priors to non-categorical tasks like regression and structured prediction.

Summary updated

BibTeX
@inproceedings{zhang2020self,
  author = {Zhilu Zhang and Mert R. Sabuncu},
  title = {{Self-Distillation as Instance-Specific Label Smoothing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure