Early Signatures of Memorization in Diffusion Models via Basin Geometry and Cyclic Denoising
Organizations: Yardi School of Artificial Intelligence, Indian Institute of Technology Delhi · Department of Computer Science and Engineering, Indian Institute of Technology Delhi · Jawaharlal Nehru Centre for Advanced Scientific Research · TCS Research Labs · Department of Civil and Environmental Engineering, Indian Institute of Technology Delhi
Abstract
Diffusion models generalize early in training and later reproduce individual training samples. Standard tests detect memorization only once one-shot generation produces near-copies, leaving a released model unaudited until its outputs fail. We show that memorization is encoded in the geometry of the learned energy landscape before it appears in generated samples, a state we call latent memorization. Using score divergence and basin volume, we find that localized basins form around training samples and separate them from held-out samples before the first memorized sample appears, with an onset that follows the same scaling as the memorization time. We probe these basins with cyclic denoising, which repeatedly applies partial noising and denoising. Under the exact empirical score, we prove that cycling started near an isolated training sample recovers it and returns to it over any finite number of cycles with high probability. In trained models, cycling recovers training images from CelebA and CIFAR-10 checkpoints whose one-shot samples contain no copies, and at a CelebA checkpoint with 0.1% one-shot copies, 500 cycles raise the memorized fraction above 30%. Cycling also reveals degenerate attractors that match no single training image and fade as training proceeds, so residence in a basin does not by itself imply memorization. These findings hold on a Gaussian mixture, CelebA, and CIFAR-10 across optimizers, architectures, noise schedules, and training-set sizes, and extend to off-the-shelf Stable Diffusion v1.4, where the cycled conditional-unconditional divergence gap separates memorized from non-memorized prompts with an AUC of 0.944 and a TPR of 0.866 at 1% FPR. More broadly, what a diffusion model has memorized is a property of the geometry and stability of its learned distribution, and assessing it requires examining this structure rather than generated outputs alone.
Figures & tables
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| Notation | Meaning | Notation | Meaning |
| Diffusion model | |||
| Clean data sample. | Noisy sample at diffusion timestep . | ||
| Diffusion timestep. | Total number of diffusion timesteps. | ||
| Forward-process variance schedule. | Signal-retention coefficient. | ||
| Cumulative signal-retention coefficient. | Gaussian noise in the forward process. | ||
| Network prediction of injected noise. | Forward diffusion distribution. | ||
| AUC | TPR | FPR | TPR@1%FPR | |
| 60,000 | 0.522 | 0.875 | 0.835 | 0.035 |
| 115,000 | 0.887 | 0.910 | 0.325 | 0.315 |
| 200,000 | 1.000 | 0.925 | 0.000 | 0.995 |
| 430,000 | 1.000 | 0.980 | 0.000 | 1.000 |
| AUC | TPR | FPR | TPR@1%FPR | |
| 4,750 | 0.531 | 0.066 | 0.047 | 0.012 |
| 42,107 | 0.510 | 0.047 | 0.045 | 0.012 |
| 97,466 | 0.909 | 0.607 | 0.049 | 0.490 |
| 315,604 | 1.000 | 1.000 | 0.000 | 1.000 |
| row | prompt | idx | seed | |
| hippo | Mothers influence on her young hippo | 1262 | 0.9 | 2 |
| laura | insights with laura unknown | 67 | 0.1 | 2 |
| laura | insights with laura unknown | 67 | 0.9 | 2 |
| air-con | air conditioners set for | 215 | 0.9 | 1 |
| air-con | air conditioners set for | 215 | 0.9 | 0 |
| label tape | set of nine brother tze 231 offlight white p-touch label | 662 | 0.9 | 2 |
| cycle | AUC (95% CI) | TPR@1%FPR (95% CI) |
| 0 | 0.811 [0.787, 0.836] | 0.526 [0.482, 0.572] |
| 10 | 0.890 [0.864, 0.914] | 0.804 [0.766, 0.838] |
| 20 | 0.935 [0.916, 0.953] | 0.834 [0.804, 0.872] |
| 40 | 0.931 [0.910, 0.950] | 0.858 [0.824, 0.892] |
| 60 | 0.944 [0.926, 0.961] | 0.866 [0.830, 0.900] |
| 80 | 0.934 [0.914, 0.953] | 0.856 [0.820, 0.888] |
| statistic | AUC (95% CI) | TPR@1%FPR (95% CI) | AP |
| (ours) | 0.944 [0.926, 0.961] | 0.866 [0.830, 0.900] | 0.933 |
| alone | 0.948 [0.939, 0.957] | 0.194 [0.142, 0.246] | 0.782 |
| alone | 0.899 [0.884, 0.914] | 0.066 [0.030, 0.094] | 0.623 |
| Wen SDN (single shot) | 0.990 [0.986, 0.993] | 0.838 [0.786, 0.882] | 0.970 |
| , | Wen SDN, single shot | ||||
| negatives | AUC | TPR@1%FPR | AUC | TPR@1%FPR | |
| laion | 500 | 0.942 | 0.820 | 0.967 | 0.740 |
| coco | 500 | 0.945 | 0.884 | 0.996 | 0.950 |
| lexica | 500 | 0.945 | 0.892 | 0.997 | 0.976 |
| random | 500 | 0.944 | 0.876 | 1.000 | 0.998 |