Heterogeneous Complementary Distillation

Liuchi Xu, Hao Zheng, Lu Wang, Lisheng Xu, Cheng Jun · DOI

Abstract

Knowledge distillation (KD) transfers the dark knowledge from a complex teacher to a compact student. However, heterogeneous architecture distillation, such as Vision Transformer (ViT) to ResNet18, faces challenges due to differences in spatial feature representations. Traditional KD methods are mostly designed for homogeneous architectures and hence struggle to effectively address the disparity. Although heterogeneous KD approaches have been developed recently to solve these issues, they often incur high computational costs and complex designs, or overly rely on logit alignment, which limits their ability to leverage the complementary features. To overcome these limitations, we propose Heterogeneous Complementary Distillation (HCD), a simple yet effective framework that integrates complementary teacher and student features to align representations in shared logits. These logits are decomposed and constrained to facilitate diverse knowledge transfer to the student. Specifically, HCD processes the student's intermediate features through a convolutional projector and adaptive pooling, concatenates them with the teacher's feature from the penultimate layer, and then maps them via the Complementary Feature Mapper (CFM) module to produce shared logits. We further introduce Sub-logit Decoupled Distillation (SDD) that partitions the shared logits into $n$ sub-logits, which are fused with the teacher's logits to rectify classification. To ensure sub-logit diversity and reduce redundant knowledge transfer, we propose an Orthogonality Loss (OL). Extensive experiments on the CIFAR-100, Fine-grained, and ImageNet-1K datasets demonstrate that HCD outperforms state-of-the-art KD methods.

Introduction

Knowledge Distillation (KD) is a cornerstone technique for model compression, enabling the transfer of "dark knowledge" from a high-performing "teacher" model to a lightweight "student." While effective for homogeneous architectures, KD faces significant hurdles in heterogeneous scenarios, such as distilling from a Vision Transformer (ViT) to a ResNet. These architectures possess fundamentally different inductive biases—ViTs capture global dependencies, whereas CNNs focus on local spatial patterns. Standard KD methods often struggle here: direct feature alignment fails due to dissimilar internal representations, and simple logit alignment ignores rich intermediate knowledge. Existing heterogeneous KD solutions are often computationally heavy or overly complex.

Methods

The proposed Heterogeneous Complementary Distillation (HCD) framework addresses these disparities by integrating teacher and student features into a shared representation space, treating them as complementary rather than identical.

The HCD framework architecture, illustrating the flow from input image through teacher and student stages to the Complementary Feature Mapper (CFM) and Sub-logit Decoupled Distillation (SDD) modules.

Complementary Feature Mapper (CFM)

Instead of forcing the student's internal features to mimic the teacher's, HCD takes the student’s intermediate features, processes them via a convolutional projector and adaptive pooling, and concatenates them with the teacher’s deep features from the penultimate layer. This hybrid representation is then mapped into a shared logit space, allowing the student to absorb the teacher's global context while retaining its own architectural strengths.

Sub-logit Decoupled Distillation (SDD) and Orthogonality Loss

To make the teacher's complex knowledge easier to digest, HCD breaks the shared logits into $n$ smaller "sub-logits." Each sub-logit is fused with the teacher’s final predictions to ensure task relevance. To prevent these sub-logits from becoming redundant, an Orthogonality Loss (OL) is applied. This constraint forces the sub-logits to capture distinct characteristics of the data, maximizing the diversity of information transferred to the student.

Results

HCD was rigorously evaluated across CIFAR-100, ImageNet-1K, and fine-grained benchmarks like CUB-200-2011.

Comparative performance on CIFAR-100 for various heterogeneous teacher-student pairs, highlighting HCD's superior accuracy compared to state-of-the-art feature-based and logit-based methods.

Performance Analysis

HCD consistently outperformed state-of-the-art KD methods across all tested scenarios:

  • CIFAR-100: HCD achieved a significant accuracy boost of 4–8% over traditional vanilla KD. For example, a ResNet18 student taught by a Swin-T teacher reached 82.78% accuracy, outperforming the next best method (LDRLD) by 0.61%.
  • ImageNet-1K: In large-scale tests, HCD showed a Top-1 accuracy improvement of up to 0.77% over standard KD, which is substantial for this competitive benchmark.
  • Versatility: HCD also improved performance in homogeneous settings (e.g., ResNet34 teaching ResNet18), suggesting that the complementary feature approach is a robust general strategy for distillation.

Conclusion

HCD offers a simple yet powerful approach to heterogeneous knowledge distillation by embracing architectural differences as complementary. While the framework introduces a minor increase in computational overhead—approximately 2 seconds more per epoch and 1.2 GB additional GPU memory—the performance gains across diverse benchmarks justify the cost. Future work may focus on optimizing these modules for real-time applications and extending the framework to dense prediction tasks like object detection.

Summary updated

BibTeX
@inproceedings{xu2026heterogeneous,
  author = {Liuchi Xu and Hao Zheng and Lu Wang and Lisheng Xu and Cheng Jun},
  title = {{Heterogeneous Complementary Distillation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i13.38112},
}
Figure