Abstract
Knowledge distillation (KD) typically requires access to original training data, which is often restricted due to privacy or proprietary concerns. This paper explores the use of state-of-the-art diffusion models to generate synthetic datasets for "data-free" knowledge distillation. The proposed method, DM-KD, achieves state-of-the-art results on large-scale benchmarks like ImageNet. Crucially, the study reveals that low-fidelity synthetic images and relatively "weaker" teacher models often provide superior signals for student learning, challenging conventional wisdom in the field.
Introduction
Knowledge distillation is a vital technique for compressing large-scale AI models into efficient versions suitable for edge deployment. However, the "data-free" setting—where the original training set is unavailable—remains a significant challenge. Previous approaches involving GANs or model inversion are often computationally expensive and difficult to scale. This paper investigates whether modern diffusion models, such as Stable Diffusion or DiT, can serve as effective data generators for distillation tasks.
Methodology: DM-KD
The researchers propose DM-KD (Diffusion Model Knowledge Distillation), a straightforward yet effective pipeline for data-free distillation. The process begins by using a pre-trained diffusion model to synthesize millions of images based on the target dataset's class labels. These synthetic images then serve as a proxy training set. The student model is trained to minimize the Kullback-Leibler (KL) divergence between its predictions and those of a "black-box" teacher model.
Key Insights
The study uncovers several counter-intuitive phenomena that define the success of diffusion-based distillation:
The "Ugly" Image Advantage
In most generative tasks, high fidelity is the goal. However, for distillation, the authors found that low-fidelity images are superior. High-fidelity images (generated with high guidance scales) cause the teacher to produce sharp, "overconfident" probability distributions. In contrast, lower-fidelity images result in "smoother" distributions that capture essential inter-class correlations—such as the visual similarity between a "taxi" and a "police car"—which are critical for student learning.
The Weak Teacher Paradox
While stronger teachers usually produce better students on real data, the opposite occurs with synthetic data. A very powerful teacher (e.g., ResNet50) tends to overfit the specific artifacts and quirks of the diffusion-generated images. A relatively "weaker" teacher (e.g., ResNet18) generalizes better across the synthetic distribution, providing a more robust learning signal for the student.
Cross-Domain Generalization
DM-KD demonstrates remarkable robustness even when the diffusion model's training domain does not perfectly match the target task. For example, using a general-purpose diffusion model to distill a fine-grained classifier for flowers still yields high performance, suggesting that diffusion models learn highly transferable visual representations.
Results
DM-KD sets a new state-of-the-art for synthesis-based distillation. On the ImageNet-1K benchmark, a ResNet18 student achieved 68.25% accuracy using 1.28 million synthetic images, a substantial improvement over prior inversion-based methods. The researchers also observed that performance continues to scale with data volume, with accuracy gains continuing up to approximately 2 million synthetic samples.
Conclusion
This work demonstrates that diffusion models are a highly effective source of synthetic data for knowledge distillation. By leveraging the "dark knowledge" found in low-fidelity samples and avoiding the pitfalls of over-optimized teachers, DM-KD provides a scalable solution for model compression in data-constrained environments. Future research will focus on optimizing sampling efficiency and extending the framework to larger transformer-based architectures.
Summary updated