Knowledge Distillation (KD)—the process of training a compact "student" model to mimic a large "teacher" model—is well-established for image classification. However, applying it to object detection is notoriously difficult due to the structural complexity of the task. This paper introduces two novel techniques to bridge the teacher-student gap: Rank Mimicking (RM) and Prediction-guided Feature Imitation (PFI). By focusing on how a teacher model ranks candidate boxes and selectively imitating features only where the student's predictions fall short, the authors achieve a significant +3.5% mAP boost on RetinaNet, outperforming previous state-of-the-art distillation methods.
The Challenges of Detection KD
The authors identify two major hurdles that prevent standard KD from working effectively in object detection:
- Ranking Discrepancy: In detection, models must rank thousands of candidate boxes to decide which ones survive Non-Maximum Suppression (NMS). Students often rank these boxes differently than teachers, leading to poor precision even if their absolute scores are similar.
- Feature Inconsistency: Standard KD often forces the student to imitate the teacher's entire feature map. However, a student might already make a perfect prediction in a region despite having different internal features. Forcing the student to change its features in these "already-correct" areas can introduce noise and hinder training.
Proposed Methods
1. Rank Mimicking (RM)
Instead of just mimicking the "soft labels" (raw probability scores) for each anchor box individually, RM looks at the global relationship between all positive anchors for an object. It forces the student to produce a probability distribution across anchors that matches the teacher's ranking. This ensures the student learns which anchors are "high quality" versus "low quality," leading to better box selection during NMS.
2. Prediction-guided Feature Imitation (PFI)
Rather than a "blind" imitation of the teacher's Feature Pyramid Network (FPN) maps, PFI uses the prediction difference as a guide. The algorithm calculates the squared difference between the teacher's and student's classification maps. This difference acts as a spatial weight: regions where the student's predictions are very different from the teacher's get a high weight (more imitation), while regions where the student is already performing well get a low weight (less imitation).
This ensures the distillation process focuses on the student's "weak spots" and avoids "wasted" gradient energy in areas where the student has already reached the correct conclusion via its own internal feature path.
Key Results
The proposed method shows consistent improvements across various "one-stage" detectors, including RetinaNet, FCOS, ATSS, and GFL:
- RetinaNet (ResNet50): Achieved 40.4% mAP on MS COCO, a 3.5% increase over the baseline and significantly higher than previous SOTA methods like GID (39.1%) and DeFeat (39.7%).
- Cross-Architecture Success: The method proved robust even when the student and teacher had very different backbones (e.g., a ResNet50 teacher distilling to a MobileNet-V2 student).
- Efficiency: Because it doesn't rely on complex region-proposal cropping, it is simpler to implement and more computationally efficient than many instance-wise methods.
Conclusion and Future Work
By addressing the fundamental differences between classification and detection—specifically the importance of ranking and the potential for feature inconsistency—this work provides a more nuanced approach to KD. While the method excels overall, the authors note it slightly lags behind some instance-wise methods on small object detection ($AP_S$). Future work may involve addressing this scale variance to ensure that tiny objects receive as much "distillation attention" as large ones.
Summary updated