Introduction
Knowledge Distillation (KD) has long been a cornerstone for model compression, enabling the transfer of expertise from large, computationally expensive "teacher" models to lightweight "student" models. Traditionally, KD research has focused on homogeneous distillation, where both models share the same architectural family (e.g., CNN-to-CNN). However, the rise of Vision Transformers (ViTs) alongside established Convolutional Neural Networks (CNNs) presents a new challenge: heterogeneous distillation.
This paper introduces HeteroAKD, a generic framework designed to bridge the gap between these fundamentally different architectures, allowing students to benefit from the diverse inductive biases of heterogeneous teachers.
The Challenges of Heterogeneity
Distilling across different architectural paradigms is not straightforward. The authors identify two primary roadblocks:
- Feature Disparity: CNNs and Transformers process information differently. CNNs focus on local textures and spatial hierarchies, while Transformers leverage global self-attention. As shown in Centered Kernel Alignment (CKA) analysis, their intermediate feature spaces are highly dissimilar, making traditional feature-matching KD methods ineffective.
- Imperfect Teachers: A complex teacher is not universally superior. In semantic segmentation, a student model may naturally outperform its teacher on specific classes or pixels. Blindly forcing a student to mimic every teacher prediction can lead to the transfer of errors.
The HeteroAKD Framework
To overcome these hurdles, HeteroAKD moves away from direct feature imitation toward a more flexible, reliability-aware approach. The framework consists of three core innovations:
1. Learning in the Logits Space
Rather than attempting to align disparate intermediate features, HeteroAKD projects both teacher and student features into a shared, categorical logits space using 1x1 convolutional projectors. This acts as a "universal translator," stripping away architecture-specific quirks and allowing the models to communicate through class-based probabilities.
2. Knowledge Mixing Mechanism (KMM)
HeteroAKD rejects the assumption that the teacher is always right. By using ground-truth labels to evaluate the pixel-wise reliability of both models, KMM constructs a hybrid teacher. This target is composed of the most accurate predictions from both the teacher and the student, ensuring the distillation process is guided by the best available knowledge.
3. Knowledge Evaluation Mechanism (KEM)
Not all pixels are equally informative for learning. KEM calculates the discrepancy between the hybrid teacher's reliability and the student's current performance. It assigns higher loss weights to "hard" pixels—those the student struggles with but the hybrid teacher understands well—creating a customized, pixel-wise curriculum.
Experimental Results
The researchers evaluated HeteroAKD on three major benchmarks: Cityscapes, Pascal VOC, and ADE20K. The results consistently demonstrated the framework's superiority over state-of-the-art (SOTA) distillation techniques:
- Performance Gains: On Cityscapes, HeteroAKD achieved an average mIoU improvement of +2.04% across various teacher-student pairs.
- Cross-Architecture Success: The method proved effective for both CNN-to-Transformer and Transformer-to-CNN distillation. Notably, in some configurations, the student model actually surpassed its teacher's performance (e.g., a ResNet-18 student beating a MiT-B4 teacher by 0.46% mIoU).
- Robustness: The framework maintained its lead on the complex ADE20K dataset, outperforming competing methods by up to 2.10% mIoU.
Conclusion
HeteroAKD represents a significant step forward in making knowledge distillation architecture-agnostic. By aligning models in the logits space and dynamically selecting the most reliable knowledge, it enables efficient transfer between CNNs and Transformers. While the computational efficiency of heterogeneous distillation remains an area for further optimization, HeteroAKD provides a robust foundation for future cross-architecture research in dense prediction tasks.
Summary updated