Abstract
Standard Knowledge Distillation (KD) often loses valuable "dark knowledge" by squashing raw model outputs (logits) into probabilities. While adding a logit-level loss seems like an obvious fix, it surprisingly degrades performance due to a phenomenon called "neural collapse." This paper introduces Dual-Head Knowledge Distillation (DHKD), which uses an auxiliary classification head to harvest logit information without sabotaging the main classifier's geometry.
The Problem: Softmax as a Lossy Transformation
In traditional Knowledge Distillation, a small "student" model is trained to mimic the predicted probabilities of a large "teacher" model. However, the softmax function used to generate these probabilities is inherently lossy.
As illustrated above, very different logit distributions can map to the same probability output. This means the student misses out on the "dark knowledge"—the subtle relationships between classes—that the teacher has mastered.
The Paradox of Logit-Level Loss
The intuitive solution is to match raw logits directly using a loss like BinaryKL. However, the authors discovered a paradox: combining standard cross-entropy (CE) loss with a logit-level loss often performs worse than using either one alone.
The paper explains this through the lens of "neural collapse." Well-trained classifiers naturally converge to a state where class vectors are spread out as much as possible (a Simplex Equiangular Tight Frame). Logit-level losses introduce conflicting signals that prevent the classifier from reaching this ideal geometric state, effectively "poisoning" the head.
Methods: Dual-Head Knowledge Distillation (DHKD)
To resolve this conflict, the authors propose Dual-Head Knowledge Distillation (DHKD). The core idea is to decouple the learning objectives by splitting the model's output stage.
DHKD is built on three pillars:
- The Auxiliary Head: A separate "Adaptive Auxiliary Head" ($g'$) handles the logit-level loss (BinaryKL-Norm), while the "Main Head" ($g^S$) handles the standard CE loss.
- Backbone Sharing: Both heads share the same feature extractor ($f^S$). This allows the backbone to learn from the rich logit information while the main classifier remains focused on its primary task.
- Gradient Alignment: To prevent the two losses from fighting over the backbone, the authors use a gradient projection technique. If gradients conflict (angle > 90°), the logit-level gradient is projected to be orthogonal to the CE gradient.
Key Results and Insights
DHKD consistently outperformed state-of-the-art logit-based distillation methods across benchmarks like CIFAR-100 and ImageNet.
- Feature Discriminability: t-SNE visualizations confirm that DHKD produces much tighter and more separable clusters in the feature space.
- Efficiency: The auxiliary head is only used during training. Inference remains as fast as the original student model, with negligible training overhead (~10ms per batch).
- Compatibility: DHKD is highly compatible with feature-based methods; combining it with ReviewKD yielded top-tier results (e.g., 78.29% on CIFAR-100).
Conclusion
By decoupling the "poisonous" logit loss from the main classifier head and using it as "fuel" for the backbone via an auxiliary head, DHKD successfully harvests teacher dark knowledge without compromising model geometry. This simple yet effective architectural change sets a new standard for logit-based knowledge distillation.
Summary updated