Teacher-Guided Student Self-Knowledge Distillation Using Diffusion Model

Yu Fei Wang, Chuanguang Yang, Zhulin An, Weilun Feng, Jiarui Zhao, Libo Huang, Boyu Diao, Yongjun Xu

Abstract

Existing Knowledge Distillation (KD) methods often align feature information between teacher and student by exploring meaningful feature processing and loss functions. However, due to the difference in feature distributions between the teacher and student, the student model may learn incompatible information from the teacher. To address this problem, we propose teacher-guided student Diffusion Self-KD, dubbed as DSKD. Instead of the direct teacher-student alignment, we leverage the teacher classifier to guide the sampling process of denoising student features through a light-weight diffusion model. We then propose a novel locality-sensitive hashing (LSH)-guided feature distillation method between the original and denoised student features. The denoised student features encapsulate teacher knowledge and could be regarded as a teacher role. In this way, our DSKD method could eliminate discrepancies in mapping manners and feature distributions between the teacher and student, while learning meaningful knowledge from the teacher. Experiments on visual recognition tasks demonstrate that DSKD significantly outperforms existing KD methods across various models and datasets.

Introduction: The Challenge of Feature Discrepancy

In model compression, Knowledge Distillation (KD) typically involves a lightweight "student" model mimicking a larger "teacher" model. While matching intermediate feature maps is effective, it faces a significant hurdle: teacher-student discrepancy. Because teachers and students often have vastly different architectures and capacities, their feature spaces are inherently incompatible. Forcing a student to align directly with a teacher's features can lead to "negative optimization," where the student is confused by information it cannot properly represent. DSKD addresses this by asking how to transfer teacher knowledge without forcing the student to adopt an alien feature language.

Methodology: Diffusion-Mediated Self-Distillation

DSKD shifts the paradigm from direct alignment to a form of self-distillation mediated by a generative process. The framework consists of three primary components:

  1. Noise Adapter: Student intermediate features are treated as "noisy" versions of ideal features. An adapter calibrates this noise for the diffusion process.
  2. Teacher-Guided Denoising: A lightweight diffusion model (incorporating U-Net and Transformer elements) denoises these features. Crucially, the reverse diffusion is guided by the gradients of the pre-trained teacher's classifier. This pulls student features toward a semantically rich, teacher-approved distribution within the student's own feature space.
  3. LSH-Guided Distillation: The student is trained to match its original features to these denoised features using a Locality-Sensitive Hashing (LSH) loss. LSH focuses on aligning the direction of feature vectors rather than just magnitude, which is more semantically meaningful.
The DSKD framework architecture featuring teacher-guided diffusion for feature denoising.

Key Results and Evaluation

The authors evaluated DSKD on standard benchmarks including CIFAR-100, ImageNet, and ADE20K. DSKD consistently achieves state-of-the-art results across both homogeneous (same family) and heterogeneous (different family) architectures.

On CIFAR-100, DSKD outperforms previous methods like IKD by an average of 0.40% for homogeneous architectures and 0.94% for heterogeneous ones. On ImageNet, a ResNet-18 student supervised by a ResNet-34 teacher reached 72.57% Top-1 accuracy. The method also shows significant gains in semantic segmentation on ADE20K, achieving 36.58% mIoU, beating the previous diffusion-based SOTA (DiffKD) by 1.73%.

Comparison of DSKD against state-of-the-art KD methods on CIFAR-100 across various architecture styles.

Discussion and Conclusion

DSKD demonstrates that self-distillation from diffusion-enhanced features effectively bridges the architectural gap between models. By using the student's native feature space, it avoids the pitfalls of direct teacher-student alignment. Furthermore, the use of LSH suggests that semantic direction is a more robust target for distillation than raw feature magnitudes.

While the diffusion process adds some computational overhead, the authors found that only 2-3 timesteps are necessary for high performance, making it a viable approach for practical model compression. Future work may further explore generative models as sophisticated feature augmentors for representation learning.

Summary updated

BibTeX
@misc{wang2026teacher,
  author = {Yu Fei Wang and Chuanguang Yang and Zhulin An and Weilun Feng and Jiarui Zhao and Zhulin An and Libo Huang and Boyu Diao and Yongjun Xu},
  title = {{Teacher-Guided Student Self-Knowledge Distillation Using Diffusion Model}},
  year = {2026},
  eprint = {2602.02107},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.02107},
}
Figure