Abstract
As diffusion probabilistic models (DPMs) are being employed as mainstream models for Generative Artificial Intelligence (GenAI), the study of their memorization has attracted growing attention. Existing works in this field aim to establish an understanding of whether or to what extent DPMs learn via memorization. Such an understanding is crucial for identifying potential risks of data leakage and copyright infringement in diffusion models and, more importantly, for trustworthy application of GenAI. Existing works revealed that conditional DPMs are more prone to memorize training data than unconditional DPMs. And most data extraction methods developed so far target conditional DPMs. Although unconditional DPMs are less prone to data extraction, further investigation into these attacks remains essential since they serve as the foundation for conditional models like Stable Diffusion, and exploring these attacks will enhance our understanding of memorization in DPMs. In this work, we propose a novel data extraction method named Surrogate condItional Data Extraction (SIDE) that leverages a time-dependent classifier trained on generated data as surrogate conditions to extract training data from unconditional DPMs. Empirical results demonstrate that it can extract training data in challenging scenarios where previous methods fail, and it is, on average, over 50% more effective across different scales of the CelebA dataset. Furthermore, we provide a theoretical understanding of memorization in both conditional and unconditional DPMs and why SIDE is effective.
Introduction
Diffusion models are notorious for "memorizing" training data, but unconditional models—those without text prompts—were previously thought to be relatively safe from data extraction. Without a prompt to guide the generation process, it was thought that finding a specific memorized needle in the generative haystack was nearly impossible. This paper introduces SIDE (Surrogate condItional Data Extraction), a framework that proves even unconditional models are fundamentally vulnerable by using self-generated "surrogate conditions" to steer the model toward its own hidden memories.
Methods: The SIDE Framework
The authors propose a general framework that essentially "invents" its own prompts to unlock a model's memory. The process happens in three main phases:
- Constructing Implicit Labels: The attacker generates a large set of images from the target model and clusters them using a pre-trained feature extractor. The centroids of these clusters act as "surrogate conditions"—essentially a map of where the model "thinks" different types of data live.
- Training a Surrogate Model:
- For small models, they train an external, time-dependent classifier to recognize these clusters.
- For large-scale models (like Stable Diffusion), they use LoRA (Low-Rank Adaptation) to fine-tune a small set of weights that force the model to respond to these surrogate cluster IDs.
- Targeted Extraction: During the generation (reverse diffusion) process, the attacker uses these surrogate labels to provide "guidance," pushing the model toward high-density regions where memorized training samples are likely to be clustered.
Theoretical Insights: Why SIDE Works
The paper introduces a new theoretical metric called Memorization Divergence, which uses KL-divergence to quantify how much a model’s output distribution overlaps with its training set. Two key insights emerge:
- The "Informative Label" Theory: The authors prove that any form of conditioning—whether it's a human-written text prompt or a mathematically derived cluster ID—amplifies memorization. If a label helps the model isolate a specific subset of data, it inherently makes that data easier to extract.
- Harnessing Internal Structure: SIDE is effective because it aligns the attack with the model’s native data representation. It finds the clusters the model already formed during training and targets them specifically.
Experimental Results
The authors evaluated SIDE across a diverse range of benchmarks, including CIFAR-10, CelebA (at various scales), ImageNet, and subsets of LAION-5B. SIDE consistently outperformed existing state-of-the-art extraction attacks across all datasets:
- Superiority on "Safe" Models: On the CelebA-25000 dataset, SIDE achieved an Average Memorization Score (AMS) of 20.5%, more than double the 8.7% achieved by previous conditional attacks.
- Breaking Unconditional ImageNet: While previous methods struggled to extract anything from unconditional ImageNet models (0% success), SIDE successfully recovered training samples with high fidelity.
- Diversity of Leaks: Using a new metric called Unique Memorization Score (UMS), the authors showed that SIDE uncovers a much wider variety of unique training samples than baseline methods.
Limitations and Future Work
While powerful, SIDE currently requires white-box access to the model's internal parameters for its most efficient implementation. A black-box version using Genetic Algorithms exists but is computationally expensive. Furthermore, the authors note that current defenses are insufficient and suggest that future work should focus on preventing the formation of "overly specific data clusters" during the initial training process to mitigate these vulnerabilities.
Summary updated