Abstract
Class Incremental Semantic Segmentation (CISS) is often hindered by "catastrophic forgetting," where models lose knowledge of previously learned classes when training on new ones. While generative replay using Generative Adversarial Networks (GANs) has been proposed as a solution, these models often produce semantically inaccurate images and suffer from distribution mismatches. We introduce DiffusePast, a framework that leverages a pre-trained Stable Diffusion model to generate high-quality synthetic images for replay. By employing a dual-generator paradigm—Structure-preserved Diffusion Replay (SDR) and Distribution-aligned Diffusion Replay (DDR)—DiffusePast ensures both semantic accuracy and style alignment. Our method achieves state-of-the-art results on PASCAL-VOC 2012 and ADE20K benchmarks, significantly outperforming existing GAN-based and feature-replay approaches.
Introduction
Deep learning models typically struggle with sequential learning. In the context of semantic segmentation, this manifests as catastrophic forgetting: as a model learns new object categories (e.g., "sheep"), its performance on previously learned categories (e.g., "person") degrades rapidly.
To mitigate this, researchers use "generative replay," where a generator creates samples of old classes to be interleaved with new data. However, traditional GAN-based methods often fail to capture precise semantics or the specific visual distribution of the target dataset. For instance, a GAN might generate a "horsecart" when prompted for a "horse," leading to unreliable pseudo-labels. DiffusePast addresses these limitations by utilizing the robust generative capabilities of Stable Diffusion.
Methodology
DiffusePast replaces brittle GANs with a robust Stable Diffusion backbone and introduces a dual-generator paradigm to produce high-fidelity replay samples.
Dual-Generator Paradigm
- Structure-preserved Diffusion Replay (SDR): This module utilizes edge maps (e.g., Canny edges) and text prompts from old images. By conditioning the diffusion process on these edges (via ControlNet), the model generates new images that maintain the exact spatial layout of the original samples. This allows the system to reuse original, high-quality ground-truth masks as pseudo-labels for the synthetic images.
- Distribution-aligned Diffusion Replay (DDR): To ensure the synthetic data matches the visual style of the downstream dataset, DDR employs Textual Inversion. It learns class-wise token embeddings that represent the specific "concepts" of the dataset. These images are then labeled using the previous iteration of the segmentation model.
Knowledge Preservation
To prevent the generator itself from forgetting, DiffusePast only updates token embeddings for new classes, keeping the underlying diffusion weights frozen. Additionally, a specialized loss function incorporates background pseudo-labeling to help the model distinguish between true background and unlabeled old classes appearing in new images.
Experimental Results
DiffusePast was evaluated on two major benchmarks: PASCAL-VOC 2012 and ADE20K.
- PASCAL-VOC: In a challenging 6-step incremental scenario (15-1), DiffusePast achieved an mIoU of 68.60%, a significant improvement over the GAN-based RECALL (64.80%) and the feature-replay method ALIFE (59.59%).
- ADE20K: On the complex 100-10 (6-step) scenario, the method reached 35.83% mIoU, demonstrating its ability to handle dense labeling and complex scenes better than existing baselines.
- Efficiency: The system showed marked improvements even with a minimal replay buffer of only 20 samples, proving that the quality and distribution alignment of synthetic data are more critical than sheer volume.
Conclusion
DiffusePast demonstrates that high-quality generative replay is a viable and superior alternative to storing real images or using inaccurate GANs for CISS. By leveraging the structural and semantic priors of Stable Diffusion, the framework effectively bridges the gap between synthetic and real data. Future research will focus on reducing the computational overhead of diffusion sampling to improve training efficiency for large-scale applications.
Summary updated