TL;DR
This paper investigates how diffusion models, powerful generative models for image synthesis, perform in a continual learning (CL) setting. The authors benchmark standard CL methods and find that experience replay with a reduced rehearsal loss significantly mitigates forgetting. They also uncover interesting timestep-dependent behaviors and highlight the limitations of the BPD metric for evaluating CL in this context.
What Problem Does This Paper Address?
Diffusion models, like DALL-E 2 and Imagen, have revolutionized image generation, producing incredibly high-quality and diverse outputs. However, training these models from scratch is computationally prohibitive, requiring massive datasets and extensive compute resources. This high cost limits their accessibility. Continual learning (CL) offers a potential solution by enabling models to learn new tasks sequentially, reusing previously acquired knowledge and computation. While CL has been explored for discriminative tasks and other generative models, its application to diffusion models, particularly understanding how they forget and how to mitigate it, remains largely unexplored. This paper addresses this gap by being the first to systematically evaluate the CL capabilities of diffusion models.
Methods
The authors benchmark several common CL methods applied to Denoising Diffusion Probabilistic Models (DDPMs). These include:
- Finetuning: The baseline approach where the model is simply retrained on new data without any specific CL mechanisms.
- L2 Regularization: An approach that adds an L2 penalty between the current and historical network parameters to constrain model updates.
- Experience Replay: This method stores a small buffer of examples from previous tasks and uses them for additional training alongside new data, employing an auxiliary loss on the buffer. The paper specifically investigates the effect of the replay loss coefficient.
- Generative Replay: This method uses a frozen version of a previous model to generate synthetic data from past tasks for rehearsal.
The paper also delves into analyzing the behavior of diffusion models during CL, particularly focusing on the dynamics of forgetting across different diffusion timesteps and the suitability of evaluation metrics.
Datasets
The experiments were conducted on two standard image datasets:
- MNIST: A dataset of handwritten digits.
- Fashion-MNIST: A dataset of clothing articles.
For both datasets, the authors divided the classes into five tasks, with each task containing two classes. This setup allows for a sequential learning scenario where the model must learn to generate samples from new classes while retaining the ability to generate samples from previously learned classes.
Key Insights and Ideas
- Diffusion Models Forget: Like many other models, diffusion models suffer from catastrophic forgetting when trained sequentially without CL mechanisms. This is evident in the degraded quality of generated images from previous tasks.
- Experience Replay Shines (with a caveat): Experience replay, particularly with a reduced rehearsal loss coefficient (e.g., 0.01), emerges as a strong performer. This suggests that carefully balancing the contribution of past and new data is crucial.
- Timestep-Dependent Forgetting: Forgetting in diffusion models is not uniform across all diffusion timesteps. Early timesteps (closer to the denoising process) are more resilient to forgetting, while later timesteps (crucial for generating high-quality, novel samples) are more susceptible.
- BPD Metric Pitfalls: The standard Bits-Per-Dimension (BPD) metric, which measures negative log-likelihood, can be misleading in CL for diffusion models. A model might show only minor BPD deterioration even when it has completely forgotten how to generate samples from previous tasks, making it an unreliable sole indicator of CL performance.
- Overfitting to Replay Buffers: When using experience replay with a high rehearsal coefficient (e.g., 1), models can overfit to the buffer data. This overfitting is also timestep-dependent, being more pronounced at early diffusion timesteps.
Key Results
- Finetuning: Shows high flexibility but suffers from severe forgetting, as indicated by poor FID scores.
- Experience Replay (coef. = 0.01): Achieved the best performance in terms of average FID and BPD on both MNIST and Fashion-MNIST, demonstrating its effectiveness in mitigating forgetting.
- Experience Replay (coef. = 1): While outperforming Finetuning in some aspects, it shows signs of overfitting to the replay buffer, especially at early diffusion timesteps.
- BPD vs. FID: The paper demonstrates cases where FID scores significantly degrade (indicating poor generation quality) while BPD scores remain relatively stable, highlighting the limitations of BPD.
Limitations and Future Work
- Limitations:
- The study focuses on a specific setup of diffusion models (DDPMs) and a limited set of CL methods.
- The BPD metric is shown to be problematic for evaluating CL in this context.
- Future Work:
- Developing novel CL strategies specifically tailored to the structural properties of diffusion models, such as their timesteps.
- Extending the study to text-to-image diffusion models and pre-trained diffusion models.
- Conducting more comprehensive benchmarking with additional methods and datasets.
Summary updated