Abstract
Modern object detection models often require significant computational resources, hindering deployment on edge devices. Knowledge Distillation (KD) offers a path toward model compression, yet standard techniques frequently underperform in detection tasks due to foreground-background imbalance and multi-task conflicts. This paper introduces a Task Adaptive Regularization framework that selectively transfers knowledge across the backbone and detection heads. By incorporating a Gaussian mask for backbone distillation and an adaptive mechanism for head distillation, the proposed method allows student models to close the performance gap with larger teachers, and in some instances, surpass them.
Introduction
The deployment of state-of-the-art object detectors on mobile and hardware is limited by their high parameter counts and latency. While Knowledge Distillation has proven effective for image classification, its application to object detection is non-trivial. Detectors must manage a massive imbalance between informative foreground objects and redundant background regions. Furthermore, the dual requirements of classification and localization introduce optimization dilemmas where distilling one task may inadvertently degrade the other.
Methodology: Task Adaptive Regularization
The authors propose a framework that treats the teacher model as a flexible guide rather than a rigid target. The architecture integrates several key components to ensure relevant knowledge transfer.
1. Region Proposal Sharing
To ensure the teacher and student are evaluating the same spatial regions, the student shares its region proposals with the teacher. This alignment ensures that the teacher's feedback is directly applicable to the student's current focus.
2. Adaptive Backbone Distillation
A primary challenge in detection KD is the "easy" background noise that can overwhelm the distillation signal. The authors address this by applying a 2D Gaussian mask centered on ground-truth objects during backbone distillation. This mask prioritizes the informative centers of objects, where features are most discriminative.
3. Adaptive Head Distillation
The framework employs selective distillation for the detection heads:
- Classification Head: The student mimics the teacher’s soft labels only for positive samples, preserving the structural class relationships (e.g., the visual similarity between a dog and a cat).
- Regression Head: Distillation is only applied if the teacher’s predicted bounding box is more accurate than the student’s proposal. This prevents the student from learning from the teacher's errors.
4. Distillation Decay
As training progresses, the importance of the distillation loss is gradually reduced via a time-decay variable. This "scaffolding" approach allows the student to eventually prioritize the primary detection loss, leading to better final generalization.
Experimental Results
The framework was evaluated on the MS COCO 2017 and PASCAL VOC 2007 benchmarks.
Performance Gains
On the MS COCO dataset, a ResNet-50 student model improved its baseline from 36.3% mAP to 39.0% mAP. Notably, this student model outperformed its ResNet-101 teacher, which achieved 38.5% mAP. Similar results were observed on PASCAL VOC, where the student (74.5% mAP) surpassed the teacher (74.3% mAP).
Efficiency and Comparison
For one-stage detectors like RetinaNet, the distilled model achieved higher accuracy than the teacher while being 68% smaller in parameter count. The method also significantly outperformed previous state-of-the-art distillation techniques, such as FGFI and Mimic, showing a +4.5% gain on VOC compared to the +2.9% gain of competitors.
Conclusion
The success of Task Adaptive Regularization highlights that selective mimicry is superior to blind imitation in object detection KD. By focusing on object centers and only distilling high-quality teacher predictions, student models can achieve remarkable efficiency and accuracy. Future work may extend these adaptive principles to more recent architectures like Vision Transformers and complex tasks such as instance segmentation.
Summary updated