DDGR: Continual Learning with Deep Diffusion-based Generative Replay

Rui Gao, Weiwei LiuICML 2023

Introduction

In the evolving field of Continual Learning (CL), AI models face a persistent enemy: catastrophic forgetting. When a neural network learns a new task, it often overwrites the weights necessary for previous tasks, effectively "erasing" its memory.

One popular solution is Generative Replay (GR). Instead of storing massive amounts of sensitive or bulky original data, GR uses a generator (like a GAN or VAE) to synthesize samples of old tasks to "remind" the model of what it previously learned. However, conventional GR has two major flaws:

  1. One-Way Communication: The generator tells the classifier what the past looked like, but the classifier never helps the generator improve.
  2. Recursive Degradation: Most GR methods update the generator using its own previously generated samples. Over time, this creates a "copy-of-a-copy" effect, where replayed images become increasingly blurry and "fuzzy," eventually becoming useless for training.
Recursive degradation in standard generative replay

To address these issues, researchers have proposed Deep Diffusion-based Generative Replay (DDGR). DDGR reimagines how AI models remember the past by using diffusion models to "replay" high-quality synthetic data of old tasks, introducing a bi-directional relationship where a classifier actively guides the generator.

The DDGR Approach

DDGR replaces traditional GANs with Denoising Diffusion Probabilistic Models (DDPM) as the core generator. The technical heart of the paper is the bi-directional instruction relationship.

The DDGR architecture and sampling process
  • The Instruction-Operator: Unlike standard replay, DDGR uses a pretrained classifier to guide the diffusion sampling process. By calculating the gradient of the classifier's loss with respect to the noisy image at each diffusion timestep, the model "nudges" the generation process toward a specific class. This ensures the synthetic samples are not just high-quality images, but are highly representative of the specific categories the model needs to remember.
  • Sampling Process: During the reverse diffusion process (turning noise into an image), the instruction-operator is plugged into the transition equation. This allows the classifier to "instruct" the generator on how to refine the sample to better match the target distribution.
  • Updating the Loop: When a new task arrives, the model uses the current generator (guided by the current classifier) to produce synthetic data for all previous tasks. It then trains a new classifier and updates the generator on a mix of this high-quality synthetic data and the new, real data.

Key Insights and Results

The authors evaluated DDGR on three major benchmarks: CIFAR-100, ImageNet, and CORe50 (a complex setting involving 79 tasks with varying backgrounds and lighting conditions).

Diffusion is the "Better Memory": Diffusion models are inherently more stable and produce higher-fidelity images than GANs. This makes them far more resilient to the "feedback loop" of learning from generated data. By using classifier guidance, DDGR prevents the "fuzziness" that plagues models like standard DGR. Even after 78 batches on CORe50, DDGR continues to generate sharp, recognizable images.

DDGR consistently outperformed state-of-the-art baselines across all metrics:

  • Accuracy: On CIFAR-100 (AlexNet, 5 classes per increment), DDGR achieved 59.20% accuracy, outperforming the best baseline (PASS) by nearly 6%.
  • Forgetting Rate: On ImageNet (AlexNet, 50 classes per increment), DDGR reduced the forgetting rate to 6.98%, compared to 17.31% for standard Generative Replay (DGR)—a massive improvement in memory retention.

Limitations and Future Work

The primary drawback of DDGR is its computational cost. Diffusion models are notoriously slow to train and sample from compared to GANs. The authors' analysis shows that DDGR takes significantly longer than other baselines (e.g., ~75,000 seconds for DDGR vs ~8,000 seconds for regularization-based methods on CIFAR-100).

Future work will likely focus on integrating "fast sampling" techniques (like DDIM) to make the approach more viable for real-time or resource-constrained applications. Additionally, exploring more complex ways for the classifier to "teach" the generator could yield even better results.

Summary updated

BibTeX
@inproceedings{gao2023ddgr,
  author = {Rui Gao and Weiwei Liu},
  title = {{DDGR: Continual Learning with Deep Diffusion-based Generative Replay}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=RlqgQXZx6r},
}
Figure