Abstract
Class-incremental learning (CIL) aims to learn new classes in an incremental fashion without forgetting previously learned ones. While additional data can mitigate catastrophic forgetting, existing methods often rely on external, unlabeled real-world datasets that may not align with the target classes. In this work, we propose SDDR (Stable Diffusion for Distillation and Replay), which leverages a pretrained Stable Diffusion model as a source of high-quality synthetic data. Unlike previous approaches, SDDR generates samples belonging specifically to previously encountered classes, allowing these synthetic images to be used for both distillation and classification replay. Experiments on CIFAR100 and ImageNet benchmarks demonstrate that SDDR significantly improves the performance of state-of-the-art CIL methods, particularly in memory-constrained scenarios.
Introduction
In the field of computer vision, Class-Incremental Learning (CIL) remains a significant challenge. As models are tasked with learning new categories over time, they frequently suffer from catastrophic forgetting—a phenomenon where the weights associated with earlier tasks are overwritten, leading to a sharp decline in performance on old classes.
The standard mitigation strategy involves "rehearsal" or "replay," where a small buffer of real images from previous tasks is maintained. However, storage limitations and privacy concerns often restrict the size of this buffer. While some methods attempt to supplement this buffer with external datasets, these "placebo" images often lack the semantic specificity required for effective retraining. SDDR addresses this by using generative AI to "hallucinate" precise training data for the classes the model is at risk of forgetting.
Methodology: The SDDR Framework
SDDR integrates a pretrained Stable Diffusion model into the incremental learning pipeline to provide a virtually infinite source of memory. The framework consists of several key components:
1. Automated Semantic Prompting
To ensure the generative model produces accurate representations, SDDR utilizes WordNet to automate prompt engineering. By fetching both the class name and its dictionary definition (e.g., "Apple: the round fruit of a tree..."), the system avoids ambiguities caused by homographs. This ensures that the synthetic data remains semantically grounded in the specific class the model previously learned.
2. Synthetic Data Generation and Diversity
The authors found that the quality of synthetic data for training is not solely dependent on visual fidelity. By tuning the guidance scale to a lower value (2.0 instead of the standard 7.5), SDDR increases the diversity of the generated images. While these images might appear less "perfect" to a human observer, the increased variance is more beneficial for the model's generalization during retraining.
3. Dual-Purpose Data: Distillation and Replay
Most existing methods that use external data only apply it to knowledge distillation—ensuring the model's output logic remains consistent. SDDR expands this by using synthetic data for two distinct purposes:
- Classification Loss (Replay): The model is retrained on synthetic images as if they were real examples, reinforcing the decision boundaries for old classes.
- Distillation Loss: The model uses the synthetic samples to ensure its internal representations do not drift significantly as it adapts to new data.
Experimental Results
The method was evaluated on competitive benchmarks including CIFAR100, ImageNet-Subset, and the full ImageNet-1K dataset. SDDR was paired with several baseline incremental learning methods, including iCaRL, LUCIR, and FOSTER.
Performance Gains
The addition of SDDR consistently improved every baseline method. The most dramatic improvements were observed in scenarios with extremely limited memory buffers:
- CIFAR100: Using a buffer of only 5 images per class, adding SDDR to the iCaRL method boosted accuracy from 29.59% to 48.15%, a nearly 20-point improvement.
- State-of-the-Art: When combined with the FOSTER method, SDDR achieved new best-in-class results on both CIFAR100 and ImageNet-Subset.
The Sim-to-Real Gap
While Stable Diffusion produces high-quality images, a statistical "sim-to-real" gap remains. The authors noted that synthetic images are most effective as a supplement to a real memory buffer rather than a total replacement. However, the efficiency of storing model weights (a few gigabytes) versus millions of raw images (terabytes) makes SDDR a highly scalable solution for long-term incremental learning.
Conclusion and Future Directions
SDDR demonstrates that pretrained generative models can serve as powerful, compact repositories of knowledge for incremental learning. By transforming the weights of a diffusion model into a stream of synthetic training data, SDDR effectively combats catastrophic forgetting without the storage overhead of massive external datasets.
Future work may involve fine-tuning the generative model on the specific target dataset during the initial learning phase to further close the sim-to-real gap. Additionally, exploring the use of diffusion models to "imagine" or pre-train on future classes before they are formally introduced could represent the next frontier in proactive incremental learning.
Summary updated