NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Knowledge Diffusion for Distillation

Tao Huang, Yuan Zhang, Mingkai Zheng, Shan You, Fei Wang, Chen Qian, Chang Xu

Knowledge Distillation (KD) has long been the go-to strategy for squeezing the performance of a massive "teacher" model into a lightweight "student" model. However, a persistent hurdle remains: the representation gap. Because student models have significantly less capacity, their internal features are often "noisier" and less salient than those of the teacher.

In a recent paper, researchers propose DiffKD. Their core insight? Treat the student's features as a noisy version of the teacher's and use the power of diffusion models to "denoise" them before performing distillation.

The Representation Gap

The fundamental challenge in KD is the discrepancy between the teacher and the student. A massive model like ResNet-101 (the teacher) perceives an image with much higher fidelity than a compact model like MobileNet (the student). When we try to force the student to match the teacher's features directly, we often end up "disturbing" the student's optimization because it simply cannot represent the information as cleanly.

Previous state-of-the-art methods tried to solve this with complex, task-specific loss functions or "teacher assistants." The authors of DiffKD argue that the real culprit is the noise within the student's features. If we can filter out that noise and extract only the valuable semantic information, the distillation process becomes much more effective.

Methodology: DiffKD

The authors leverage Diffusion Models—the same generative technology behind models like DALL-E and Stable Diffusion—but repurpose them for feature refinement rather than image generation.

DiffKD Pipeline
  1. Teacher-Guided Training: They first train a diffusion model to reconstruct the teacher's features. The model learns the "clean" distribution of the teacher's internal representations.
  2. Student Denoising: During distillation, the student's feature is fed into the reverse denoising process of the trained diffusion model. This "refines" the student feature, stripping away noise and enhancing salient information.
  3. Distillation on Refined Features: The final KD loss is calculated between the teacher's feature and this denoised student feature.
  4. Efficiency Tweaks: To avoid the massive computational overhead usually associated with diffusion, the authors introduce several optimizations:
  5. Lightweight Architecture: They replace the standard heavy UNet with a simple stack of ResNet bottleneck blocks.
  6. Linear Autoencoder: They use a linear autoencoder to compress the teacher's features before diffusion, drastically reducing the number of channels the model has to process.
  7. Adaptive Noise Matching (ANM): Since we don't know exactly how "noisy" a student's feature is, the ANM module learns to estimate the noise level and match it to the correct starting point in the diffusion timeline.

Key Insights

  • Student Features as a "Noisy" Signal: The most elegant idea here is the conceptual shift. Instead of seeing the student as "wrong," they see it as "noisy." This allows them to use generative modeling tools to bridge the gap.
  • Feature-Agnosticism: Because the diffusion model treats features as generic tensors, DiffKD works equally well on intermediate backbone features, classification logits, or segmentation maps.
  • The Power of Iteration: The paper shows that even a few steps of denoising (as few as 5) significantly outperform standard one-step MSE (Mean Squared Error) alignment.
  • Autoencoders as Information Filters: Interestingly, the linear autoencoder didn't just save computation; it seemed to help encode common, valuable information, sometimes leading to better results than using raw, uncompressed features.

Experimental Results

The researchers validated DiffKD across a wide range of standard benchmarks, consistently outperforming existing SOTA methods like DKD and DIST:

  • Image Classification (ImageNet-1K & CIFAR-100): A MobileNetV1 student trained with a ResNet-50 teacher reached 73.62% top-1 accuracy on ImageNet, a +1.57% improvement over the previous best method.
  • Object Detection (MS COCO): Using architectures like Faster R-CNN, RetinaNet, and FCOS, DiffKD improved an FCOS-ResNet50 student by 4.0 AP, surpassing the specialized FGD method.
  • Semantic Segmentation (Cityscapes): Using DeepLabV3 and PSPNet, it outperformed MasKD by 1% mIoU on the test set.
Feature Visualizations

Qualitative Success: As seen in the feature visualizations above, the "denoised" student features look remarkably similar to the teacher's saliency maps. The diffusion process successfully strips away background clutter, allowing the student to focus on the actual objects.

Limitations and Future Work

While highly effective, DiffKD does introduce some training overhead. Although the authors made the diffusion model "lightweight," it still adds extra parameters and training time compared to vanilla KD. However, this cost is only incurred during training; the inference speed of the deployed student model remains completely unchanged.

Future work may explore plugging more advanced, modern distillation losses into the DiffKD framework (beyond standard MSE and KL-divergence) to yield even higher gains. Additionally, exploring more advanced ODE solvers for the diffusion process could potentially reduce the number of required denoising steps even further.

Summary updated

BibTeX
@inproceedings{huang2023knowledge,
  author = {Tao Huang and Yuan Zhang and Mingkai Zheng and Shan You and Fei Wang and Chen Qian and Chang Xu},
  title = {{Knowledge Diffusion for Distillation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=08hStXdT1s},
}
Figure