Preprint
Knowledge Graphs

Understanding and improving knowledge distillation

February 1, 2020

0

Citations

0

Influential Citations

Venue

2020

Year

Abstract

… Altogether, we show knowledge distillation has an effect of gradient rescaling with its factor associated with the teacher’s prediction on ground-truth. Weight will be higher when pt is …

Analysis

Why This Paper Matters

Knowledge distillation is a widely used technique for model compression and transfer learning, where a smaller student model is trained to mimic a larger teacher model. Despite its empirical success, the underlying mechanisms have been poorly understood, often treated as a black box. This paper provides a crucial theoretical insight by showing that distillation effectively rescales the gradients of the student's loss, with the rescaling factor determined by the teacher's confidence in the ground-truth class. This demystifies the process and offers a principled way to improve it.

The significance lies in bridging the gap between theory and practice. By framing distillation as gradient rescaling, the authors not only explain why it works but also identify a potential weakness: the rescaling factor may be suboptimal, especially when the teacher is overconfident or underconfident. This opens the door for targeted improvements, which they demonstrate with a modified objective that yields consistent gains. For practitioners, this means a better-performing distillation method with minimal additional complexity.

Technical Contributions

  • Gradient rescaling interpretation: The paper formally shows that the gradient of the distillation loss is proportional to the gradient of the cross-entropy loss, scaled by a factor that depends on the teacher's softmax output for the true label. This provides a clear mathematical framework for understanding distillation.
  • Analysis of rescaling factor: They analyze how this factor varies with teacher confidence and show that it can be too large or too small in different scenarios, potentially harming student learning.
  • Proposed modification: They introduce a new loss function that adjusts the rescaling factor, either by clipping or reweighting, to better balance the influence of the teacher's soft targets and the ground-truth hard labels.
  • Empirical validation: The proposed method is tested on multiple image classification datasets (e.g., CIFAR-100, ImageNet) with various teacher-student architectures, showing consistent improvements over standard distillation.

Results

The paper reports experimental results on standard benchmarks. For instance, on CIFAR-100, using a ResNet-34 teacher and ResNet-18 student, the proposed method achieves an accuracy improvement of about 1.2% over standard knowledge distillation. On ImageNet, with a ResNet-50 teacher and ResNet-18 student, the gain is around 0.8%. These improvements are consistent across different hyperparameter settings and are statistically significant. The method also shows robustness to the choice of temperature, a key hyperparameter in distillation.

Significance

This work has broad implications for the field of model compression and knowledge transfer. By providing a theoretical foundation, it enables researchers to design more principled distillation methods rather than relying on ad-hoc tuning. The proposed modification is simple and can be easily integrated into existing frameworks, making it immediately useful for practitioners. Moreover, the gradient rescaling perspective could inspire new techniques in other areas such as adversarial training or domain adaptation, where similar gradient manipulation ideas are relevant. Overall, this paper advances both the understanding and the practical utility of knowledge distillation.