Abstract
Knowledge distillation (KD) is a standard technique for compressing large models into efficient ones. However, in object detection, the significant imbalance between foreground objects and background context often leads to suboptimal distillation. This paper presents DeFeat (Decoupled Features), a novel KD framework that treats object and background regions as separate sources of information. By decoupling these features, DeFeat allows student models to learn high-intensity object details and subtle contextual cues independently, resulting in significant performance gains across standard benchmarks.
Introduction
The goal of knowledge distillation is to train a compact "student" network to replicate the performance of a larger "teacher" network. While highly successful in image classification, applying KD to object detection is challenging. The primary difficulty lies in the foreground-background imbalance: objects typically occupy only a small portion of an image, while the background dominates.
Existing methods often struggle because the strong gradients generated by object regions tend to overwhelm the more subtle information present in the background. The authors of DeFeat argue that the background is not merely noise but provides vital context that helps reduce false positives.
The DeFeat Framework
DeFeat introduces a decoupled distillation strategy that operates at two critical stages of the detection pipeline: the intermediate feature maps (neck) and the classification head.
Decoupled Intermediate Features
At the Feature Pyramid Network (FPN) level, DeFeat utilizes ground-truth masks to split feature maps into "object" and "background" regions. By applying separate Mean Square Error (MSE) losses to these regions, the model can assign independent importance weights ($\alpha_{obj}$ and $\alpha_{bg}$). This prevents the dominant object signals from silencing the background context.
Decoupled Region Proposals
In the detection head, region proposals are categorized into positive (object) and negative (background) samples. DeFeat uses Kullback-Leibler (KL) divergence to distill "soft labels" from the teacher to the student. Using separate temperatures and weights for these categories allows the student to better learn the nuances of both object classification and background suppression.
Key Insights: Why Decoupling Works
Addressing Gradient Discordance
A key finding of this research is the existence of "gradient discordance." Visualization of backpropagation gradients reveals that object regions consistently produce much larger gradient norms than background regions. In a standard "coupled" distillation setup, this disparity causes the optimization process to ignore the background signal.
The Informational Value of Background
Experiments showed that distilling only the background regions can lead to performance improvements nearly as high as distilling only the object regions. Background distillation is particularly effective at reducing "false positive" errors, where the model incorrectly identifies background patches as objects.
Experimental Results
DeFeat was rigorously tested on the MS COCO and Pascal VOC datasets. It consistently outperformed previous state-of-the-art methods like FGFI and TADF.
- Faster R-CNN (ResNet50): Performance on COCO improved from 37.4% to 40.9% mAP.
- RetinaNet (ResNet50): Performance on COCO improved from 36.5% to 39.7% mAP.
- Pascal VOC: A ResNet50-based student achieved 82.28% mAP, nearly matching the 82.69% mAP of its ResNet152 teacher.
Crucially, because DeFeat only alters the training loss, the resulting student models maintain their original inference speed, making it a "free" performance boost for real-time applications.
Conclusion
DeFeat provides a simple yet effective solution to the foreground-background imbalance in object detection distillation. By decoupling features, it ensures that student models benefit from the full spectrum of knowledge provided by the teacher. While currently focused on anchor-based detectors, the principles of DeFeat offer a promising path for enhancing a wide range of efficient computer vision models.
Summary updated