Abstract
Knowledge Distillation (KD) is a widely used technique for training compact student models by leveraging the expertise of larger teacher models. Despite its success, standard KD often fails to fully bridge the performance gap, particularly when the student's capacity is significantly limited. This paper identifies a "small norm trap" where student features collapse into a region near the origin, making them less separable. We introduce the ND Loss (Norm and Direction), a simple yet effective regularization term that encourages larger feature magnitudes and aligns student feature directions with stable teacher class-means. Extensive experiments on CIFAR-100, ImageNet, and COCO benchmarks demonstrate that our method consistently improves state-of-the-art KD techniques with negligible computational cost.
Introduction
The core objective of Knowledge Distillation is to minimize the discrepancy between a student and a teacher, typically through logit or intermediate feature alignment. However, the authors observe that direct alignment does not always translate to improved task performance. Small models naturally produce features with small norms, leading to feature "collision" and reduced discriminability. Furthermore, aligning to individual teacher samples can introduce noise. This work addresses these issues by regularizing the geometric properties of the student's penultimate layer features.
Methodology: The ND Loss
The proposed approach focuses on two geometric properties: Feature Norm (magnitude) and Feature Direction.
- Feature Norm Regularization: Drawing from model pruning insights where larger norms signify higher importance, the ND Loss encourages the student to produce features with larger magnitudes, effectively "spreading out" the feature space.
- Feature Direction Alignment: Instead of sample-to-sample distillation, the student's feature direction is aligned with the class-mean of the teacher's features. These class-means serve as robust "anchor" directions for each category.
The resulting ND Loss is a "plug-and-play" component added to the standard training objective (Cross-Entropy + KD loss). It simultaneously increases student feature norms (if smaller than the teacher's) and reduces the angular distance to the corresponding teacher class-mean.
Key Insights: The Small Norm Trap
A critical finding of this research is the "Small Norm Trap." As shown in Figure 5, small-capacity models (like ResNet-8) tend to produce features that cluster tightly around the origin compared to larger models (like ResNet-56). This collapse makes it difficult for the final classifier to distinguish between classes.
By forcing these features to have larger norms, the ND Loss helps separate them, directly correlating with improved accuracy. Notably, the method also helps mitigate the "capacity gap" problem, where students typically struggle to learn from excessively large teachers.
Experimental Evaluation
The method was evaluated on three major benchmarks:
- CIFAR-100: Testing both homogeneous and heterogeneous distillation across 100 classes.
- ImageNet: Large-scale classification with 1.28 million images.
- COCO 2017: Object detection to demonstrate versatility beyond classification.
Key Results
The addition of ND Loss (denoted as ++) consistently outperformed existing state-of-the-art methods:
- ImageNet: A ResNet-18 student trained with KD++ achieved 72.53% top-1 accuracy, surpassing ReviewKD (71.10%) and DKD (71.87%).
- CIFAR-100: In ResNet-56 to ResNet-20 distillation, ND Loss provided a +1.87% accuracy boost over standard KD.
- Object Detection: Integrating ND Loss with ReviewKD on COCO improved the mAP of a Faster R-CNN (ResNet-18) from 36.75% to 37.43%.
Conclusion and Future Work
The ND Loss provides a computationally efficient way to enhance knowledge distillation by addressing the geometric limitations of small-capacity models. While this study focuses on the penultimate layer in computer vision tasks, future work could explore applying similar regularizations to earlier layers or expanding the domain to Large Language Models (LLMs). Additionally, the ethical implications of students inheriting teacher biases remain an important area for ongoing research.
Summary updated