Perspective-Aware Teaching: Adapting Knowledge for Heterogeneous Distillation

Jhe-Hao Lin, Yi Yao, Chan-Feng Hsu, Hong-Xia Xie, Hong-Han Shuai, Wen-Huang Cheng

TL;DR

This paper introduces Perspective-Aware Teaching (PAT), a novel knowledge distillation framework designed to transfer knowledge between models with different architectures (e.g., CNNs to Vision Transformers). PAT addresses the "view mismatch" and "teacher unawareness" problems with new modules, achieving state-of-the-art results on image classification and object detection tasks.

What Problem Does This Paper Address?

Knowledge distillation (KD) is a powerful technique for training smaller, more efficient student models by transferring knowledge from larger, pre-trained teacher models. Traditionally, KD methods assume that the teacher and student models share similar architectures. However, the field is rapidly evolving with diverse architectures like Convolutional Neural Networks (CNNs), Vision Transformers (ViTs), and Multi-Level Perceptrons (MLPs). This heterogeneity creates significant challenges for KD.

Specifically, two main problems arise:

  1. View Mismatch: Different architectures process information from different "perspectives." For instance, CNNs build understanding from local features to global, while ViTs might have a broader initial view. This architectural bias leads to mismatched feature representations, making direct feature matching difficult.
  2. Teacher Unawareness: Standard KD methods train the teacher model in isolation, meaning the teacher doesn't adapt its knowledge transfer strategy based on the student's learning progress. This static approach can lead to suboptimal distillation, especially when dealing with heterogeneous architectures where feature compatibility is already a challenge.

Existing methods like OFA-KD [8] attempt to bridge this gap by projecting features into a latent space, but this can lead to a loss of crucial spatial information. This paper aims to develop a generic, feature-based distillation framework that preserves rich spatial information while overcoming these heterogeneity-induced issues.

Methods

The proposed Perspective-Aware Teaching (PAT) framework consists of two core novel components:

  1. Region-Aware Attention (RAA) Module: To tackle the view mismatch problem, RAA helps the student model learn to re-blend features from different spatial regions and stages. It achieves this by:
  2. Patchifying student features from each stage.
  3. Concatenating these patched features.
  4. Feeding them into a self-attention mechanism. This allows the student to learn a perspective more aligned with the teacher's, enabling standard feature matching to be applied effectively.

  5. Adaptive Feedback Prompt (AFP) Module: To address teacher unawareness, AFP uses prompt tuning to adapt the teacher's knowledge transfer dynamically. Instead of a static teacher, AFP:

  6. Introduces prompt tuning blocks into the teacher model.
  7. Crucially, incorporates student feedback (the difference between teacher and student features from the previous iteration) as an input to these prompt blocks. This feedback mechanism allows the teacher to adjust its output features to better suit the student's current learning state, making the distillation process more responsive and effective. A regularization loss ($L_{Reg}$) is also introduced to prevent the teacher's features from becoming too similar to the student's, preserving the teacher's discriminative power.

The overall objective function combines standard cross-entropy loss, KL-divergence loss (for logits), feature distillation loss, and the regularization loss.

Datasets

The paper evaluates PAT on the following datasets:

  • CIFAR-100: A well-known dataset for image classification (50K training, 10K test images, 32x32 resolution, 100 classes).
  • ImageNet: A large-scale image classification dataset (1.2M training, 50K validation images, 1,000 classes).
  • COCO: An object detection dataset (118K training, 5K validation images, 80 categories).

No new benchmarks were introduced; standard datasets were used to demonstrate the method's generalizability.

Key Insights and Ideas

  • Heterogeneity is the new normal: The paper strongly argues that future KD research must move beyond homogeneous architectures to be relevant in the current AI landscape.
  • View mismatch is a fundamental barrier: The RAA module's success highlights that simply aligning features isn't enough; the perspective from which features are extracted needs to be reconciled.
  • Dynamic teachers are better teachers: The AFP module's ability to adapt based on student feedback is a key differentiator, showing that a teacher's "awareness" of the student's learning process significantly boosts distillation performance.
  • Feature-based distillation can be superior: Despite the complexity, PAT demonstrates that by carefully addressing the challenges of heterogeneous KD, feature-based methods can outperform even advanced logit-based approaches.
  • Trade-offs exist: While PAT achieves SOTA, it does introduce more parameters than simpler methods, though these are only present during training. The paper also explores trade-offs in module design (e.g., number of queries in RAA).

Key Results

PAT achieves state-of-the-art results across various tasks and architectures:

  • Image Classification (CIFAR-100): PAT achieves an average improvement of 8.17% over baselines and surpasses the prior SOTA OFA-KD by up to 2.28% and 3.83% on specific teacher-student pairs. For example, it reaches 83.50% on the ConvNeXt-T - ResMLP-S12 pair.
  • Image Classification (ImageNet): PAT demonstrates strong performance, achieving 77.59% on the Swin-T - ResMLP-S12 pair, outperforming baselines by 3.35% and 0.94% on larger datasets.
  • Object Detection (COCO): PAT shows significant gains, with an enhancement of 2.36% for ResNet18 and 3.50% for MobileNetV2 when distilling from a Swin-T teacher.
  • Module Effectiveness: Ablation studies show that RAA alone provides substantial gains, and combining it with AFP yields the best performance.

Limitations and Future Work

  • Computational Cost: While PAT's additional parameters are only for training, it still requires more parameters and computation than simpler logit-based methods. The paper notes that reducing the number of AFP modules or queries in RAA can offer a trade-off for lower complexity.
  • CNN Student Performance: The paper observes that PAT shows less improvement on CNN-based students compared to ViT or MLP-based students. The authors speculate this might be due to the additional patch-embedding layers in CNNs requiring longer training epochs.
  • Future Work: The paper implicitly suggests further exploration into optimizing the trade-offs between performance and computational cost, as well as investigating why certain student architectures benefit more than others. The generalizability of PAT to even more diverse architectures and tasks remains an open area.

Summary updated

BibTeX
@inproceedings{lin2025perspective,
  author = {Jhe-Hao Lin and Yi Yao and Chan-Feng Hsu and Hong-Xia Xie and Hong-Han Shuai and Wen-Huang Cheng},
  title = {{Perspective-Aware Teaching: Adapting Knowledge for Heterogeneous Distillation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure