Title: On the Edge of Memorization in Diffusion Models
Venue: NeurIPS 2025
Accepted: yes
Keywords: diffusion models

memorization

generalization

phase transition

denoising
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. In this paper, we propose a scientific and
mathematical “laboratory” for investigating memorization and generalization in diffusion models trained on fully synthetic or natural image-like structured data. Within this setting, 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, as 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.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper investigates memorization in (unconditional) diffusion models from a theoretical perspective. More specifically, the paper explores a so-called crossover point, where the training loss landscape of a diffusion model starts to prefer memorizing training data over generalizing across them. Based on this concept, the paper defines the difference between memorization and generalization. It offers a framework to identify the phase transition of a diffusion model's critical capacity when the model starts to favor memorization. This crossover point is theoretically motivated and empirically shown for experiments on Gaussian mixture models and (small) monochromatic images.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths:**\n- The paper lays down a well-motivated theoretical foundation for memorization in diffusion models. The core of the analysis -- the crossover point -- is derived in detail, and important, relevant research and foundations are extensively cited. The proposed framework offers fascinating insights into understanding memorization in diffusion models.\n- The paper is, in general, well-written and presents all findings appealingly.\n\n**Weaknesses:**\n- My primary concern is that the theoretical concept of the crossover point is only shown for particular synthetic cases. While the paper promises a generalization to more complex datasets, empirical proof is missing. While I understand that training diffusion models can be costly, I would have expected to see at least some experiments on small scales, such as CIFAR-10.\n- The paper writing is based heavily on mathematical symbols. While Tables 1 and 2 provide a good lookup, it is sometimes hard to follow without frequently looking up symbols from previous sections. Repeating symbol names or using names instead of symbols would improve the readability of the paper. This also includes figures, e.g., Figures 1 and 3, where stating the name of the symbols on the axis would improve their readability.\n- If I understood the method correctly, it seems like the method requires reference models / multiple training runs with different model capacities to identify the phase transition in practice. Assuming one wants to train a larger diffusion model without a valid reference, one cannot a priori define a sufficient number of parameters to avoid memorization.\n\nQUESTIONS:\nRegarding the 3rd point stated under weaknesses, is it correct that the model always requires multiple training runs with different capacities to identify and predict the crossover point? Or is it possible to predict the number of parameters for, e.g., a model trained on ImageNet?\n\nLIMITATIONS:\nThe paper mainly discusses future work and potential extensions in the conclusion section but lacks a clear statement of the method's limitations.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 3, "DATE": "2025-06-10"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a theoretical framework to investigate the conditions under which diffusion models either memorize their training data or generalize. The authors model both the data-generating distribution and the denoiser using Gaussian mixtures, which makes the problem analytically tractable. The primary contribution is the theoretical characterization of a crossover point in model underparameterization at which the loss of a simplified, partially memorizing model becomes lower than that of an ideal, generalizing model. The authors demonstrate empirically that this crossover point accurately predicts the onset of a phase transition from generalization to memorization in trained models. Experiments are performed both with a simple isotropic mixture and a low-rank setting designed to emulate the structure of images.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths**\n\n1. The paper studies the timely and practically relevant problem of memorization in diffusion models.\n2. It provides a sound and rigorous theoretical analysis that appears correct.\n3. It is well-written, with clear explanations and figures that support the central claims.\n4. Numerical experiments are provided to validate the theoretical predictions.\n\n**Weaknesses** \n\n5. The simplifications required for theoretical tractability (i.e., the GMM assumption) create a substantial gap between the analyzed model and those used in practice.\n6. The novelty of the core insight feels somewhat limited. The finding that increased model capacity leads to memorization is well-established. This work's contribution is to formalize this intuition and provide a predictive formula within a specific, very simplified setting, rather than offering a fundamentally new conceptual understanding of the phenomenon itself.\n\n*Minor*\n\nEquation (8) contains an extra $I$.\n\nQUESTIONS:\nTo strengthen the claim that your framework captures a more general principle, have you considered an experiment with a simple neural network (e.g., an MLP) as the denoiser? While your analytical predictions for the crossover point would not hold, demonstrating that a standard network trained with gradient descent exhibits the same qualitative phase transition as a function of the number of neurons would partially reinforce the paper's relevance.\n\nLIMITATIONS:\nYes.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies when diffusion models memorize their training data versus when they properly generalize. The authors study a setting in which the data distribution is a $K$-component Gaussian mixture in $\\mathbb{R}^d$. Diffusion models are trained to reverse a standard forward noising process, and the learned denoiser $\\tilde{x}_\\theta(t, x_t)$ is constrained to be the minimum mean squared error (MMSE) estimator implied by a Gaussian mixture model with $M$ components.\n\nThe parameter $M$ controls model capacity. For $M = K$, the model can represent the true data distribution and generalizes. For $M = N$ with zero-variance components at training points, the model memorizes — its denoiser effectively returns a nearest neighbor from the training set.\n\nTwo types of training losses are defined and analyzed:\n\n1. $L_N(\\mu^1, \\dots, \\mu^K, \\sigma)$: the expected training loss when the denoiser is derived from an assumed $K$-component Gaussian mixture model. The authors derive a closed-form expression for this loss using Tweedie’s identity.\n\n2. $L_N(x^1, \\dots, x^N, 0)$: the training loss of a fully memorizing denoiser that places a zero-variance Gaussian at each training sample.\n\nThey show that these two losses intersect at a critical model size $M^\\star$. This crossover point predicts a transition between generalization and memorization: for $M < M^\\star$, the generalizing model has lower loss; for $M > M^\\star$, the memorizing model does.\n\nTo relate this theoretical crossover to practical training outcomes, they introduce a time-dependent weighting function $\\lambda(t)$ over diffusion times. They fit a single weighting function $\\tilde{\\lambda}(t)$ across multiple training setups to align the theoretical crossover point with the empirically observed memorization threshold. This calibration is used once and held fixed in subsequent evaluations.\n\nThe experiments are conducted on two synthetic settings:\n\n1. Isotropic Gaussian Mixture: A dataset drawn from an isotropic $K$-component Gaussian mixture. The authors train denoisers of increasing size $M$ and observe a sharp phase transition in both test loss and a \"memorization ratio\" (the fraction of generated samples classified as memorized based on proximity to training data). They show that the predicted crossover point matches the empirical onset of memorization.\n\n2. Low-Rank Image-Like Data:  Each image is generated by applying a low-rank color embedding resulting in a mixture of low-rank Gaussians. They repeat the same experimental setup and observe a similar memorization transition.\n\nTogether, these experiments demonstrate that the theoretical loss crossover — once calibrated using $\\tilde{\\lambda}(t)$ — predicts the generalization–memorization phase transition observed in trained diffusion models.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths: this paper provides a simple model where memorization can be easily characterized. It also gives explicit derivations of the expected losses (rather than bounds) which allows the loss difference comparison (i.e. memorization loss vs loss from using the true data distribution) to be accurate computed. \n\nWeaknesses: this paper claims a \"phase transition\" without really giving a good definition of what that is. It is sort of obvious that if you increase the memorization capacity of your model that your model will memorize more and generalize less (this is observed ubiquitously in machine learning) so merely providing plots and claiming that it is happening doesn't seem very compelling. Furthermore, claiming that the theory above can \"predict\" this transition point is a bit less impressive than it sounds because 1. the predictions are in a very restricted theoretical setting and 2. the weights $\\tilde{\\lambda}_t$ appears to be optimized to make these predictions as accurate as possible. \n\nI also found this paper a bit difficult to read. The notation used throughout the first few sections feels rather messy (there is an excessive use of bolding, subscripts, \\tilde, \\overline, \\hat, etc.) and it took me a while to understand what the Loss $L_n(x^{(1)},\\dots x^{(n)}, 0)$ meant. I strongly recommend thoughtfully cleaning up this section and adding some definitions in (like a definition environment) that might help more cleanly explain what is going on here.\n\n\nEdit: see comment for update on review.\n\nQUESTIONS:\nCan you explain why optimizing the weights $\\lambda_t$ actually isn't \"cheating\"? I'm not claiming that it is, but it does feel fishy when one of the main claims of this paper is that the theory \"predicts\" a transition point and yet this prediction is made with some sort of explicit training.\n\nEdit: re-evaluated post rebuttal.\n\nLIMITATIONS:\nYes.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 2, "CLARITY": 2, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-07-03"}