Memorization and Regularization in Generative Diffusion Models
Ricardo Baptista, Agnimitra Dasgupta, Nikola B. Kovachki, Assad Oberai, Andrew M. Stuart
TL;DR
This work analyzes memorization in score-based diffusion models that learn the score from empirical data, showing that the empirical score minimizer corresponds to the score of a time-dependent Gaussian mixture and can cause the model to reproduce training samples. It introduces an inverse-problem perspective on score learning, proving that under both variance-exploding and variance-preserving forward processes, reverse trajectories with the empirical score converge to training points or to Voronoi boundaries, a phenomenon termed memorization. The authors then develop principled regularization approaches—Tikhonov regularization with a time-scale dependent penalty, empirical Bayes regularization, and neural-network-based strategies including early stopping and under-parameterization—demonstrating that these regularizers mitigate memorization in low-dimensional and image data, and extending the framework to conditional sampling. The results provide a mathematical lens on why practical diffusion models often generalize despite empirical optimization and outline concrete pathways to enforce sampling diversity and privacy through regularization. Overall, the paper lays a theory-grounded foundation for principled regularization of score-based generative models and offers practical guidance for managing memorization in both unconditional and conditional settings.
Abstract
Diffusion models have emerged as a powerful framework for generative modeling. At the heart of the methodology is score matching: learning gradients of families of log-densities for noisy versions of the data distribution at different scales. When the loss function adopted in score matching is evaluated using empirical data, rather than the population loss, the minimizer corresponds to the score of a time-dependent Gaussian mixture. However, use of this analytically tractable minimizer leads to data memorization: in both unconditioned and conditioned settings, the generative model returns the training samples. This paper contains an analysis of the dynamical mechanism underlying memorization. The analysis highlights the need for regularization to avoid reproducing the analytically tractable minimizer; and, in so doing, lays the foundations for a principled understanding of how to regularize. Numerical experiments investigate the properties of: (i) Tikhonov regularization; (ii) regularization designed to promote asymptotic consistency; and (iii) regularizations induced by under-parameterization of a neural network or by early stopping when training a neural network. These experiments are evaluated in the context of memorization, and directions for future development of regularization are highlighted.
