Skip to main content
QUICK REVIEW

[Paper Review] Knowledge Diffusion for Distillation

Tao Huang, Yuan Zhang|arXiv (Cornell University)|May 25, 2023
Advanced Neural Network ApplicationsComputer Science20 citations
TL;DR

DiffKD denoises student features via a diffusion model trained with teacher features to bridge the teacher–student gap, enabling more effective knowledge distillation across vision tasks.

ABSTRACT

The representation gap between teacher and student is an emerging topic in knowledge distillation (KD). To reduce the gap and improve the performance, current methods often resort to complicated training schemes, loss functions, and feature alignments, which are task-specific and feature-specific. In this paper, we state that the essence of these methods is to discard the noisy information and distill the valuable information in the feature, and propose a novel KD method dubbed DiffKD, to explicitly denoise and match features using diffusion models. Our approach is based on the observation that student features typically contain more noises than teacher features due to the smaller capacity of student model. To address this, we propose to denoise student features using a diffusion model trained by teacher features. This allows us to perform better distillation between the refined clean feature and teacher feature. Additionally, we introduce a light-weight diffusion model with a linear autoencoder to reduce the computation cost and an adaptive noise matching module to improve the denoising performance. Extensive experiments demonstrate that DiffKD is effective across various types of features and achieves state-of-the-art performance consistently on image classification, object detection, and semantic segmentation tasks. Code is available at https://github.com/hunto/DiffKD.

Motivation & Objective

  • Motivate and address the representation gap between teacher and student in KD due to capacity differences.
  • Propose a diffusion-based denoising module to extract valuable information from student features.
  • Introduce a lightweight diffusion model with a linear autoencoder to reduce computation.
  • Add an adaptive noise matching mechanism to align initial diffusion noisy levels.
  • Demonstrate the method's effectiveness across classification, detection, and segmentation tasks.

Proposed method

  • Treat the student feature as a noisy version of the teacher feature and train a diffusion model on teacher features to denoise the student feature.
  • Use the denoised student feature to perform distillation against the teacher feature with standard KD losses.
  • Incorporate a light-weight diffusion architecture with two bottleneck blocks and a linear autoencoder to compress feature representations.
  • Introduce an adaptive noise matching module to estimate and inject appropriate Gaussian noise for initialization.
  • Employ standard distances (MSE, KL) for diffusion and distillation losses, with options to use advanced KD losses (e.g., DIST, DKD).
  • Optimize the whole pipeline with a composite loss: Ltrain = Ltask + lambda1 Ldiff + lambda2 Lae + lambda3 Ldiffkd.
Figure 1: Diffusion model in DiffKD. The diffusion model is trained with teacher feature in diffusion process $q$ ( red-dashed arrow ), while we feed the student feature to the reverse denoising process $p_{\theta}$ ( blue arrows ) to obtain a denoised feature for distillation. We find that due to c
Figure 1: Diffusion model in DiffKD. The diffusion model is trained with teacher feature in diffusion process $q$ ( red-dashed arrow ), while we feed the student feature to the reverse denoising process $p_{\theta}$ ( blue arrows ) to obtain a denoised feature for distillation. We find that due to c

Experimental results

Research questions

  • RQ1How can diffusion models be leveraged to denoise and align teacher and student features for KD?
  • RQ2Does denoising student features lead to better knowledge transfer than direct feature matching across tasks?
  • RQ3Can a lightweight diffusion model and adaptive noise matching achieve practical gains without prohibitive costs?
  • RQ4Is the DiffKD approach generic across feature types (intermediate, logits) and tasks (classification, detection, segmentation)?

Key findings

  • DiffKD yields consistent state-of-the-art gains across tasks, e.g., 73.62% top-1 accuracy with MobileNetV1 student and ResNet-50 teacher on ImageNet.
  • On stronger teacher setups, DiffKD outperforms prior KD methods across model pairs such as Swin-T/Swin-L and ResNet variants.
  • DiffKD improves detection and segmentation benchmarks over multiple baselines and remains effective with simple KD losses (MSE, KL).
  • A light diffusion model with a linear autoencoder substantially reduces FLOPs while preserving or improving distillation performance.
  • Adaptive noise matching (ANM) improves denoising by aligning the initial diffusion noise to the student feature.
  • Ablations show that combining feature and logits DiffKD yields the best performance (e.g., 73.62% in one setting).
Figure 2: Visualization of student features, denoised student features and teacher features on COCO dataset. Details and more visualizations can be found in Appendix F .
Figure 2: Visualization of student features, denoised student features and teacher features on COCO dataset. Details and more visualizations can be found in Appendix F .

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.