Continual Learning of Diffusion Models with Generative Distillation

Sergi Masip, Pau Rodríguez, Tinne Tuytelaars, Gido M. van de Ven · DOI

Introduction

Diffusion models have revolutionized generative modeling but face a significant hurdle in practical applications: catastrophic forgetting. When these models are trained sequentially on new tasks, they rapidly lose the ability to generate high-quality data from previous tasks. While standard solutions like Generative Replay (GR)—using a "teacher" model to generate synthetic samples for the "student" to learn alongside new data—work for simpler models, they fail for diffusion processes. This paper introduces Generative Distillation, a novel approach that preserves denoising capabilities across sequential tasks.

The Failure of Standard Generative Replay

In standard GR, the student model attempts to predict the noise added to synthetic images produced by the teacher. However, because teacher-generated samples are imperfect, the student inherits and amplifies these errors. Over multiple tasks, this feedback loop leads to a "catastrophic loss in denoising capabilities," where the model eventually produces blurry, unrecognizable blobs rather than the intended objects.

Proposed Method: Generative Distillation

The core innovation of this work is shifting the learning objective from matching replayed images to matching the teacher's internal logic.

Comparison of (a) Generative Replay and (b) Generative Distillation architectures.

As shown in the architecture comparison, while standard GR uses the teacher only to provide input images, Generative Distillation forces the student's noise prediction to stay close to the teacher's noise prediction for the same noisy input. This prevents the student from inheriting and amplifying the teacher's sampling errors.

Key components include:

  • Trajectory Distillation: Knowledge transfer occurs across various points in the diffusion reverse process, not just at the final output.
  • Efficient Sampling: The authors utilize the Denoising Implicit Probabilistic Models (DDIM) sampler to make generating replay samples computationally feasible, requiring significantly fewer steps.
  • Hybrid Loss: The training objective balances a standard diffusion loss for new data with a distillation loss for replayed data.

Experimental Results

The authors evaluated the method on Fashion-MNIST and CIFAR-10, split into five sequential tasks.

Quantitative Performance

Generative Distillation demonstrated a massive lead over standard GR across all metrics:

  • Image Quality: On Fashion-MNIST, the method achieved an FID of 23.5, a stark contrast to the 211.8 seen with standard GR.
  • Class Diversity: Using Kullback-Leibler Divergence (KLD) to measure class balance, the distillation approach maintained high diversity, avoiding the "collapse" into only recent classes common in other methods.
  • Downstream Utility: Classifiers trained on images from the distilled model reached 72% accuracy on Fashion-MNIST, compared to only 50% for standard GR.

Qualitative Success

Samples generated by the model after sequential training using Generative Distillation on Fashion-MNIST. Source, p. 6

Samples generated by the model after sequential training using Generative Distillation on Fashion-MNIST.

As illustrated in the generated samples, the model retains the ability to produce crisp, diverse clothing items even after multiple training stages. This confirms that the distillation process successfully preserves the fine-grained denoising logic required for high-quality image synthesis, avoiding the blurriness associated with standard replay.

Conclusion

Generative Distillation provides a robust framework for the continual learning of diffusion models. By focusing on matching the teacher's noise predictions rather than its raw output, the method avoids the compounding error problem inherent in standard replay. With only a modest 6-13% increase in computational wall-time, this approach paves the way for incrementally updating large-scale generative models as new data becomes available.

Summary updated

BibTeX
@inproceedings{masip2024continual,
  author = {Sergi Masip and Pau Rodríguez and Tinne Tuytelaars and Gido M. van de Ven},
  title = {{Continual Learning of Diffusion Models with Generative Distillation}},
  booktitle = {CoLLAs},
  year = {2024},
  url = {https://openreview.net/forum?id=fLGSJ21o3A},
}
Figure