Introduction: The "Shackle" of Shared Temperature
Knowledge Distillation (KD) is a widely used technique for transferring knowledge from a high-capacity "teacher" model to a smaller "student" model. Traditionally, this process involves minimizing the Kullback-Leibler (KL) divergence between the soft probability distributions of both models. These distributions are generated by applying a softmax function to the models' raw output scores, known as logits.
However, a fundamental limitation exists in standard KD: the assumption that the teacher and student must share the same "temperature" ($T$) parameter. This constraint, which researchers have termed a "shackle," implicitly forces the student to match not just the teacher's relative class rankings, but also the exact magnitude and variance of the teacher's logits. Because student models have significantly lower capacity, they often struggle to achieve the same confidence levels as the teacher, leading to a "magnitude match" side-effect that hinders the learning of meaningful inter-class relationships.
Methodology: Breaking the Shackle with Logit Standardization
To address this, the authors propose a "plug-and-play" pre-processing step called Logit Standardization. Instead of feeding raw logits directly into the softmax function, they apply a weighted Z-score transformation to both the teacher's logits ($\mathbf{v}$) and the student's logits ($\mathbf{z}$).
The standardization process involves three primary steps:
- Zero Mean: Subtracting the mean of the logits to center the distribution.
- Unit Variance: Dividing by the standard deviation to normalize the scale.
- Scaling: Applying a base temperature ($\tau$) to control the final range of the distribution.
By mapping both sets of logits to a standardized Gaussian-like space, the method effectively "levels the playing field." This allows the student to focus on the "dark knowledge"—the relative distances and rankings between classes—without being penalized for failing to match the teacher's absolute output scale.
Key Insights: Relations Over Magnitudes
The core philosophy of this approach is that the rank and relative distance between class scores are the true carriers of knowledge, rather than absolute values. In vanilla KD, a student can be penalized even if it makes a correct prediction, simply because its output variance differs from the teacher's.
This is best illustrated by the "Toy Case" shown above. In a vanilla KD setup, Student $\mathcal{S}_1$ makes an incorrect prediction ('Bird' instead of 'Dog') but achieves a lower KL loss (0.1749) because its logit magnitudes happen to align better with the teacher. Conversely, Student $\mathcal{S}_2$ makes the correct prediction ('Dog') but is penalized with a higher loss (0.3457) due to its smaller logit scale. Applying logit standardization resolves this paradox, correctly assigning a zero loss to the student that matches the teacher's relative rankings ($\mathcal{S}_2$).
Experimental Results
The proposed method was evaluated across standard computer vision benchmarks, including CIFAR-100 and ImageNet, using a variety of architecture pairs such as ResNet, Wide ResNet (WRN), VGG, and MobileNet.
- CIFAR-100: Logit standardization yielded consistent improvements. For instance, in a WRN-40-2 to ResNet8x4 distillation, accuracy improved by 3.14%. The method also enhanced existing state-of-the-art techniques like MLKD.
- ImageNet: On large-scale data, the benefits remained significant. Distilling a ResNet50 into a MobileNet-V1 resulted in a 1.68% Top-1 accuracy boost.
- Feature Visualization: t-SNE analysis confirmed that standardized KD produces cleaner and more separable feature clusters in the student model, indicating better generalization.
Conclusion and Future Work
Logit standardization offers a simple yet powerful way to improve Knowledge Distillation by decoupling class relationships from output magnitudes. While highly effective for CNNs, future research may further explore its application to Vision Transformers (ViTs) and investigate automated methods for tuning the KD loss weight ($\lambda_{KD}$), which currently requires adjustment due to the changes in gradient scales introduced by standardization.
Summary updated