On the Edge of Memorization in Diffusion Models

Sam Buchanan, Druv Pai, Yi-Ting Ma, Valentin De Bortoli
8/1/2025
diffusion-flow

No confident code implementation found for this paper.

Abstract

When do diffusion models reproduce their training data, and when are they able to generate samples beyond it? A practically relevant theoretical understanding of this interplay between memorization and generalization may significantly impact real-world deployments of diffusion models with respect to issues such as copyright infringement and data privacy.

Show full abstract

In this work, to disentangle the different factors that influence memorization and generalization in practical diffusion models, we introduce a scientific and mathematical"laboratory"for investigating these phenomena in diffusion models trained on fully synthetic or natural image-like structured data. Within this setting, we hypothesize that the memorization or generalization behavior of an underparameterized trained model is determined by the difference in training loss between an associated memorizing model and a generalizing model. To probe this hypothesis, we theoretically characterize a crossover point wherein the weighted training loss of a fully generalizing model becomes greater than that of an underparameterized memorizing model at a critical value of model (under)parameterization. We then demonstrate via carefully-designed experiments that the location of this crossover predicts a phase transition in diffusion models trained via gradient descent, validating our hypothesis. Ultimately, our theory enables us to analytically predict the model size at which memorization becomes predominant. Our work provides an analytically tractable and practically meaningful setting for future theoretical and empirical investigations. Code for our experiments is available at https://github.com/DruvPai/diffusion_mem_gen.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{buchanan2025edge,
  title  = {On the Edge of Memorization in Diffusion Models},
  author = {Sam Buchanan and Druv Pai and Yi-Ting Ma and Valentin De Bortoli},
  year   = {2025},
  eprint = {2508.17689},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2508.17689},
  url    = {https://doi.org/10.48550/arXiv.2508.17689},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.17689.svg)](https://codeofpaper.com/paper/2508.17689)

Discussion