TL;DR
The Deep Structured Instance Graph (DSIG) framework improves object detector distillation by representing object instances and their relationships as a graph. By aligning the "topological structure" of the teacher's feature space to the student's, DSIG allows compact models to achieve state-of-the-art performance, sometimes even outperforming their much larger teachers.
What Problem Does This Paper Address?
Knowledge Distillation (KD) is a popular technique for compressing large, "teacher" neural networks into smaller, "student" networks. While well-established for image classification, KD for object detection faces two major hurdles:
- Feature Imbalance: In detection, the vast majority of an image is background. Standard distillation methods that try to match entire feature maps often get overwhelmed by "trivial" background pixels, drowning out the important signal from actual objects.
- Missing Instance-level Relations: Previous methods often treat object instances or pixels independently. However, the way different objects relate to one another in a scene (e.g., a cat sitting near a vase) provides rich semantic information that helps the teacher model generalize. Existing KD methods fail to capture this latent structure.
Methods
The authors propose representing the knowledge within a detector as a Structured Instance Graph.
- Graph Construction: Nodes in the graph correspond to features extracted from Regions of Interest (RoIs). Edges represent the similarity between these instances, calculated using cosine similarity.
- Adaptive Background Loss Weight: To solve the feature imbalance problem, the authors introduce a dynamic weighting scheme. It adjusts the importance of background nodes based on the ratio of foreground to background samples, preventing noisy background signals from dominating the training.
- Background Samples Mining (BSM): Instead of using all background samples (which leads to a dense, noisy graph) or none at all, BSM identifies "hard negatives"—background regions that the teacher model finds difficult to classify. These informative samples are kept to refine the graph's edges, while trivial background edges are pruned.
The overall training objective combines standard detection losses with a Graph Distillation Loss, which forces the student to mimic both the individual node features and the overall edge relationships (the "topology") of the teacher.
Datasets
The method was evaluated on the MS COCO 2017 dataset, the gold standard for object detection and instance segmentation. The authors tested various architectures, including:
- Two-stage detectors: Faster R-CNN and Mask R-CNN.
- One-stage detectors: RetinaNet.
- Backbones: ResNet family (R18, R50, R101, R152), MobileNetV2, and EfficientNet-B0.
Key Insights and Ideas
- Topological Alignment is Key: The most striking insight is that matching the structure of the feature space is more effective than just matching raw feature values. As shown in Figure 1, DSIG helps the student's feature distribution (c) look much more like the teacher's (d) compared to standard pixel-matching methods (e).
- Relational Knowledge: By distilling edges, the student learns how the teacher groups similar objects and separates different ones in its internal embedding space. This acts as a powerful form of regularization.
- The Student Can Surpass the Teacher: With enough training (e.g., a 3x schedule), a distilled student can actually achieve higher accuracy than its teacher. This suggests the distillation process helps the smaller model find a more efficient and effective representation than the teacher's original weights.
Key Results
- Faster R-CNN: A ResNet18 student distilled from a ResNet50 teacher improved its baseline from 33.06 AP to 37.25 AP (+4.19 gain).
- Beating the Teacher: A ResNet101 student distilled from a ResNet152 teacher achieved 43.38 AP, outperforming the teacher model (42.66 AP) by 0.72 points.
- Heterogeneous Transfer: The method works even when the student and teacher have completely different architectures (e.g., distilling a MobileNetV2 student from a ResNet50 teacher yielded a +4.97 AP gain).
- Instance Segmentation: On Mask R-CNN, the method provided consistent gains in both box AP and mask AP, showing it is a general-purpose framework.
Limitations and Future Work
- Mask Head Distillation: The authors noted that the performance gains in instance segmentation were slightly less pronounced than in detection. They attribute this to the fact that they did not specifically apply the graph distillation to the mask prediction head.
- Computational Complexity: While RoI-based graphs are more efficient than pixel-level graphs, constructing and distilling a complete graph still adds some computational overhead during the training phase (though not during inference).
- Future Directions: The authors suggest that exploring how to better leverage the mask head or applying this structured approach to other tasks like 3D object detection could be promising next steps.
Summary updated