Introduction
Diffusion models, while highly effective at generating high-fidelity images, face a critical challenge: "memorization." These models often store specific training samples in their weights and can reproduce them nearly verbatim during inference, posing significant privacy and copyright risks. This issue persists even in unconditional settings, where no text prompts are used. Existing mitigation strategies often rely on text-side augmentations or blacklisting, which do not address the fundamental visual-modality-focused training problem. This paper introduces IET-AGC, a dual-strategy framework designed to reduce memorization without sacrificing image quality.
Methods
The proposed IET-AGC framework consists of two primary components: Iterative Ensemble Training (IET) and Anti-Gradient Control (AGC).
- Iterative Ensemble Training (IET): Drawing inspiration from Federated Learning, the training dataset $D$ is partitioned into $K$ shards ($D_1, \dots, D_K$). Separate models with parameters $\theta_1, \dots, \theta_K$ are trained on these shards. Periodically, these parameters are aggregated (averaged) to form a global model $\hat{\theta}_i$. This process re-organizes the model's knowledge, preventing any single model from over-fitting to the specific details of its local shard.
- Anti-Gradient Control (AGC): AGC leverages the observation that images prone to memorization exhibit lower training losses. The system maintains a Memory Bank that stores an exponential moving average (EMA) of losses ($l_t$) for every timestep $t$ in the diffusion process. During training, if a sample’s loss is significantly lower than the average (specifically, if $Loss / l_t < \lambda$), the AGC module masks the sample, skipping the gradient update. This prevents the model from over-optimizing on samples it has already "memorized."
Key Insights and Ideas
The core innovation of IET-AGC lies in identifying and exploiting the "low loss" signal associated with memorization.
- The Low Loss Signal: As illustrated in the figure above, memorized images consistently exhibit lower training losses across diffusion time-steps compared to non-memorized images. This gap allows for an effective filtering mechanism.
- Aggregation for Forgetting: Intermittent parameter merging forces the model to prioritize features common across the entire dataset, effectively "blurring out" unique, memorized details specific to individual shards.
- Vulnerability of Simplicity: Fourier analysis reveals that "simple" images (low high-frequency energy) and "clustered" images (with many near-duplicates) are most susceptible to memorization and are thus more frequently targeted by AGC.
- Performance Synergy: Contrary to expectations, reducing memorization often improves generalization. By preventing over-fitting on specific samples, the model achieves better Frechet Inception Distance (FID) scores.
Evaluation and Results
The researchers evaluated IET-AGC across several datasets: CIFAR-10, CIFAR-100, AFHQ-DOG (high-resolution dog faces), and a LAION-10k subset for fine-tuning Stable Diffusion.
- Significant Memorization Reduction: The "memorized quantity" (MQ) score dropped by 87.3% on CIFAR-10 and 85.3% on AFHQ-DOG compared to standard training.
- Quality Retention and Improvement: Unlike privacy-preserving methods like DP-SGD, IET-AGC improved the FID score on CIFAR-10 from 8.81 to 8.34.
- Fine-tuning Efficacy: When applied to a pre-trained Stable Diffusion model on LAION-10k, the similarity score (a proxy for memorization) was reduced from 0.64 to 0.37, while maintaining high text-image alignment (CLIP scores).
- Efficiency: Training time remains comparable to standard methods because individual shards are smaller, allowing for efficient parallel processing.
Conclusion
IET-AGC provides a robust framework for mitigating memorization in diffusion models. While the current implementation requires empirical selection of the threshold $\lambda$, it demonstrates that privacy-preserving training can coexist with—and even enhance—generative performance. Future work will focus on automating threshold selection to make the framework more accessible for diverse datasets.
Summary updated