Abstract
Knowledge Distillation (KD) has proven effective for image classification but often yields suboptimal results in object detection due to foreground-background pixel imbalance and the neglect of inter-pixel relationships. This paper introduces a novel structured knowledge distillation scheme that employs attention-guided and non-local distillation modules. By focusing on informative foreground regions and capturing global spatial relationships during training, the proposed method achieves significant performance gains—up to 4.1 mAP on MS COCO—without adding any inference overhead. The approach demonstrates broad applicability across various detector architectures and enhances model robustness.
Introduction
Knowledge Distillation (KD) is a widely adopted paradigm where a compact "student" model is trained to replicate the behavior of a high-capacity "teacher" model. While successful in classification tasks, applying KD to object detection presents unique challenges. The authors identify two primary bottlenecks:
- Foreground-Background Imbalance: Standard KD treats all pixels equally, but in detection, background pixels dominate the image. This leads the student to waste capacity on uninformative regions.
- Lack of Relational Knowledge: Detection requires understanding spatial dependencies. Most existing KD methods focus on point-to-point feature mimicking, failing to capture how different image regions relate to one another.
Methodology
To address these challenges, the authors propose a structured distillation framework consisting of two main components:
Attention-Guided Distillation
To mitigate the foreground-background imbalance, a parameter-free attention mechanism is introduced. By applying average pooling across channel and spatial dimensions, the framework generates attention maps that highlight foreground objects. This forces the student model to prioritize learning from these high-value regions, ensuring its limited capacity is spent on features critical for detection.
Non-Local Distillation
To capture complex spatial relationships, the authors integrate non-local modules during the training phase. These modules, inspired by self-attention, calculate the affinity between every pair of pixels in an image. The student is then trained to match the teacher’s relational map using an L2 loss.
Importantly, both the attention-guided and non-local components are used exclusively during training. They are discarded before deployment, ensuring the student model remains lightweight with zero additional inference cost.
Experimental Results
The researchers evaluated their method on major benchmarks including MS COCO2017, Cityscapes, and COCO-C (a corrupted version of COCO for robustness testing). The method was tested across 13 different detector architectures, including Faster R-CNN, YOLOv3, and RetinaNet.
Key Performance Gains
- Faster R-CNN: Achieved 43.9 mAP on MS COCO, a +4.1 increase over the baseline.
- Generalization: Consistent improvements were observed across two-stage (+3.1 AP), one-stage (+2.6 AP), and anchor-free (+2.1 AP) detectors.
- Instance Segmentation: On Mask R-CNN, the method improved both bounding box AP (+2.5) and mask AP (+2.0).
Insights on Teacher Selection and Robustness
Contrary to some findings in image classification, the authors found that in object detection, a higher-performing teacher almost always results in a better student. Furthermore, distillation was found to significantly improve model robustness; distilled models performed better on the corrupted COCO-C dataset, suggesting they learn more generalized and stable features.
Conclusion
Structured Knowledge Distillation effectively bridges the performance gap between lightweight and heavyweight object detectors. By focusing on foreground importance and relational features, the proposed method allows smaller models to achieve state-of-the-art results without increasing computational costs at inference. While highly effective for intra-paradigm distillation (e.g., Faster R-CNN to Faster R-CNN), future work is needed to optimize performance when teacher and student architectures differ significantly.
Summary updated