Abstract
Knowledge Distillation (KD) typically focuses on point-to-point matching between teacher and student representations. We present Complementary Relation Contrastive Distillation (CRCD), a framework that shifts the focus toward preserving high-dimensional inter-sample relationships. By leveraging both features and gradients as complementary signals and utilizing an anchor-based cross-space relation modeling, CRCD captures the structural geometry of the teacher’s representation space. Experimental results on CIFAR-100 and ImageNet demonstrate that CRCD consistently achieves state-of-the-art performance, effectively bridging the gap between compact student models and their larger teacher counterparts.
Introduction and Problem Statement
Traditional Knowledge Distillation (KD) aims to transfer knowledge from a complex "teacher" network to a simpler "student" network by matching output probabilities or internal features on a sample-by-sample basis. However, this "point-to-point" approach often overlooks the structural "map" of how different data points relate to one another in the feature space.
Existing methods that attempt to preserve these inter-sample relations often rely on simple scalar metrics like cosine similarity, which fail to capture complex, high-order dependencies. Furthermore, standard contrastive methods can inadvertently push a student's representation in directions that disrupt the latent geometry of the neighborhood. The core challenge addressed by CRCD is how to effectively transfer this complex structural knowledge while maintaining stability during training.
Methods
CRCD introduces three primary innovations to address the limitations of traditional KD:
- Anchor-Based Cross-Space Relations: Instead of comparing student-to-student or teacher-to-teacher pairs, CRCD defines relations between a fixed teacher "anchor" and a student sample. This provides a stable "north star" for the student's optimization.
- Complementary Elements (Features + Gradients): The framework models relations using two distinct signals: static features ($f$), which capture structural positioning, and gradients ($g$), which capture "optimization kinetics"—the underlying logic of how the model minimizes loss.
- Relation Contrastive Loss ($L_{RC}$): Rather than using fixed distance metrics, CRCD employs auxiliary sub-networks to learn high-dimensional relation vectors. A contrastive objective is then used to maximize the Mutual Information (MI) between the teacher’s internal relations and the student’s relations.
To maintain efficiency, the authors implement a queuing sampling policy to manage a large set of negative samples without requiring prohibitive mini-batch sizes.
Key Insights and Results
CRCD was evaluated on CIFAR-100 and ImageNet, consistently outperforming previous state-of-the-art methods like CRD and SSKD.
- Performance Gains: On CIFAR-100, CRCD improved accuracy by an average of 0.9% across various model pairs. Notably, in the ResNet56 to ResNet20 distillation task, CRCD achieved 73.21% accuracy, nearly matching the teacher's 73.25%.
- Scalability: On ImageNet, CRCD reduced the Top-1 error for a ResNet18 student (distilled from ResNet34) to 28.04%, a significant improvement over the 30.25% baseline.
- Structural Preservation: Ablation studies highlight that the "Relation Preserving" approach allows the student to find a more optimal path in the feature space compared to simple sample contrastive methods, which may push samples in sub-optimal directions.
Conclusion
Complementary Relation Contrastive Distillation represents a significant step forward in structural knowledge transfer. By treating relationships as high-dimensional vectors and combining feature-based and gradient-based signals, the framework captures the nuanced geometry of learned representations. While the method introduces some architectural overhead via auxiliary networks, the substantial performance gains across diverse benchmarks justify the added complexity for high-performance model compression.
Summary updated