Abstract
We investigate the design aspects of feature distillation methods achieving network compression and propose a novel feature distillation method in which the distillation loss is designed to make a synergy among various aspects: teacher transform, student transform, distillation feature position and distance function. Our proposed distillation loss includes a feature transform with a newly designed margin ReLU, a new distillation feature position, and a partial L2 distance function to skip redundant information giving adverse effects to the compression of student. In ImageNet, our proposed method achieves 21.65% of top-1 error with ResNet50, which outperforms the performance of the teacher network, ResNet152. Our proposed method is evaluated on various tasks such as image classification, object detection and semantic segmentation and achieves a significant performance improvement in all tasks.
Introduction
Knowledge Distillation (KD) is a cornerstone technique for network compression, enabling a compact "student" model to inherit the performance of a large, complex "teacher" model. While early KD focused on matching final softmax outputs, recent research has shifted toward "feature distillation," which leverages the rich internal representations of the teacher. However, existing feature distillation methods often suffer from information loss, either by over-compressing features or by distilling them after non-linear activations like ReLU, which discard critical "activation boundary" information.
A Comprehensive Overhaul of Design Choices
The authors identify four critical design components in feature distillation: the distillation position, the teacher transform, the student transform, and the distance function. By optimizing these in unison, they propose a method that preserves essential knowledge while allowing the student to ignore redundant signals.
1. Distillation Position: Pre-ReLU
Most methods distill features at the end of a residual block. This paper argues for distilling before the ReLU activation. Pre-ReLU features contain both positive and negative values, providing a more granular signal about the teacher's internal state and decision boundaries.
2. Teacher Transform: Margin ReLU
To handle the noise in negative pre-ReLU values, the authors introduce Margin ReLU. This transform keeps positive values intact but replaces negative values with a channel-wise margin ($m_C$). This provides a "soft" target for the student, focusing on the most relevant negative responses.
3. Student Transform and Distance Function
The student uses a $1 \times 1$ convolution and Batch Normalization (BN) to match the teacher's dimensions. The distillation loss employs a Partial $L_2$ distance, which only penalizes the student if its activations deviate significantly from the teacher's positive values or if it fails to be "negative enough" when the teacher is negative. This allows the student to focus its limited capacity on the most beneficial features.
Experimental Results
The proposed method was evaluated on ImageNet, CIFAR-100, and various downstream tasks like object detection and semantic segmentation.
On ImageNet, a ResNet50 student trained with this overhaul achieved a 21.65% top-1 error (78.35% accuracy), remarkably outperforming its ResNet152 teacher which has a 21.69% error (78.31% accuracy). This demonstrates that with optimal guidance, a student can find a superior local minimum than its teacher. The method also showed significant gains in object detection (PASCAL VOC) and semantic segmentation, where a MobileNetV2 student saw a nearly 3% jump in mIoU.
Conclusion
This "comprehensive overhaul" demonstrates that the effectiveness of feature distillation depends on the synergy between where and how knowledge is transferred. By preserving activation boundary information through pre-ReLU distillation and Margin ReLU, the proposed method sets a new state-of-the-art for network compression, proving that a well-distilled student can indeed surpass its master.
Summary updated