Improving Knowledge Distillation via Regularizing Feature Direction and Norm

Yuzhu Wang, Lechao Cheng, Manni Duan, Yongheng Wang, Zunlei Feng, Shu Kong

Introduction

Knowledge Distillation (KD) is a widely used technique for transferring knowledge from a large, high-performance "teacher" network to a smaller, more efficient "student" network. Traditionally, this is achieved by minimizing the L2 distance between intermediate features or the KL-divergence between output logits. However, this paper argues that simple mimicry has fundamental flaws. Specifically, the authors identify two major issues: Directional Mismatch, where standard losses fail to prioritize the directional alignment necessary for classification, and the Small-Norm Problem, where student models produce shrunken features that cluster too closely to be discriminative.

The dino-loss Framework

To address these limitations, the authors introduce dino-loss, a regularization term designed for the student's penultimate layer. The loss focuses on two primary objectives:

  • Direction Alignment: It uses the teacher's class-mean features—the average feature vector for all samples in a class—as a directional anchor. The student is encouraged to align its feature vectors with these stable representations.
  • Norm Regularization: The loss penalizes the student if its feature norm is smaller than the teacher's. This pushes the student to produce "louder," larger-magnitude features, preventing feature collapse near the origin.
Integration of dino-loss into standard logit and feature distillation pipelines.

As a "plug-and-play" module, dino-loss is added to standard cross-entropy and existing KD losses. Since it only affects the training phase, it introduces zero overhead during inference.

Key Insights and Visual Evidence

A critical finding of the paper is that aligning with class-means is more effective than aligning with classifier weights, as class-means provide a more consistent target. Furthermore, the authors provide visual evidence that forcing larger norms helps features spread out, making the classification task significantly easier for the final layer.

2D visualization of feature clusters demonstrating how dino-loss improves class separability through directional and norm-based regularization.

Experimental Results

The effectiveness of dino-loss was validated across multiple computer vision benchmarks:

  • ImageNet: A ResNet-18 student (distilled from a ResNet-50) achieved 72.49% accuracy, outperforming specialized state-of-the-art methods like ReviewKD (71.09%) and DKD (71.85%).
  • CIFAR-100: The method showed consistent gains of 1-2% across both homogeneous (ResNet to ResNet) and heterogeneous (ResNet to ShuffleNet) architecture pairs.
  • Object Detection (COCO 2017): Integrating dino-loss into the ReviewKD framework improved the mean Average Precision (mAP) of a Faster R-CNN detector by up to 0.80%, proving its versatility beyond classification.

Conclusion

dino-loss offers a simple yet powerful way to improve knowledge distillation by focusing on the geometric properties of feature representations. By regularizing both direction and norm, it effectively bridges the capacity gap between teachers and students without increasing deployment costs. Future work may explore applying these principles to other domains like Natural Language Processing or self-supervised learning.

Summary updated

BibTeX
@inproceedings{wang2024improving,
  author = {Yuzhu Wang and Lechao Cheng and Manni Duan and Yongheng Wang and Zunlei Feng and Shu Kong},
  title = {{Improving Knowledge Distillation via Regularizing Feature Direction and Norm}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72691-0\_2},
}
Figure