NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Memorization and Regularization in Generative Diffusion Models

Ricardo Baptista, Agnimitra Dasgupta, Nikola B. Kovachki, Assad A. Oberai, Andrew M. StuartarXiv 2025 · DOI

TL;DR

This paper investigates the phenomenon of "memorization" in diffusion models, where models trained on empirical data can end up simply reproducing the training samples. The authors provide a theoretical framework to understand this behavior and explore various regularization techniques (Tikhonov, empirical Bayes, neural network properties) to mitigate it, enabling diffusion models to generate novel, diverse samples.

What Problem Does This Paper Address?

Generative diffusion models have achieved remarkable success in creating realistic data, from images to audio. A core component of these models is "score matching," which involves learning the gradient of the log-density of noisy data. However, when this learning process uses empirical data (i.e., the actual training samples) instead of the true underlying data distribution, a problem arises: the model can learn to perfectly memorize the training data. This "memorization" is undesirable because it limits the model's ability to generate truly novel content and can raise privacy concerns. The paper aims to understand the underlying mechanism of this memorization and propose principled ways to regularize diffusion models to prevent it.

Methods

The authors frame generative diffusion modeling as an inverse problem. They analyze the "score matching" loss function, particularly when minimized using empirical data. This leads to an analytically tractable solution that, unfortunately, corresponds to a time-dependent Gaussian mixture, which is the root cause of memorization.

To combat this, they explore several regularization strategies:

  • Tikhonov Regularization: Adding a penalty term to the score matching loss that discourages large score functions, especially at early time steps where the noise is high.
  • Empirical Bayes Regularization: A method that aims for asymptotic consistency in the large data limit, also regularizing the score function.
  • Neural Network Regularization: Investigating how properties of neural networks themselves, such as early stopping during training or limiting network capacity (under-parameterization), can act as implicit regularizers.

The analysis primarily uses a dynamical systems perspective, particularly focusing on the reverse ODE of the diffusion process.

Datasets

The paper uses synthetic datasets for experiments, including:

  • Low-dimensional distributions (e.g., 2D Gaussian).
  • Image datasets, specifically a synthetic dataset of binary images representing rectangles.

Key Insights and Ideas

  • Memorization is an inherent consequence of empirical score matching: The paper mathematically demonstrates that minimizing the score matching loss on empirical data leads to a specific form of the score function (a Gaussian mixture) that inherently causes memorization.
  • The "singular drift" drives memorization: The analysis highlights that as the noise level in diffusion models approaches zero (early in the reverse process), the learned score function can become singular, leading trajectories to collapse onto data points.
  • Regularization is crucial for generalization: Various regularization techniques, when applied correctly, can prevent this collapse and allow the model to generate novel samples.
  • Tikhonov regularization's effectiveness depends on careful parameter scaling: The paper shows that Tikhonov regularization works well if the regularization parameter is chosen to inversely scale with the variance of the forward process, effectively counteracting the singularity.
  • Neural network properties can implicitly regularize: Early stopping and under-parameterization in neural network architectures used for score estimation can also lead to regularization, preventing memorization.

Key Results

  • The paper provides a theoretical analysis showing that the optimal empirical score function leads to memorization, with trajectories converging to data points or their Voronoi cell boundaries.
  • Numerical experiments demonstrate that Tikhonov regularization, empirical Bayes regularization, and neural network properties like early stopping and under-parameterization can effectively prevent memorization.
  • For Tikhonov regularization, experiments show that increasing the regularization parameter c prevents generated samples from collapsing onto the training data.
  • For neural network regularization, increasing training time or network width generally leads to more memorization, while early stopping or using a denoising score matching loss can mitigate it.
  • The study extends the analysis to conditional diffusion models, showing that memorization is also a concern in this setting and can be addressed with similar regularization principles.

Limitations and Future Work

  • Memorization in SDEs: While the primary theoretical analysis focuses on the reverse ODE, the authors suggest that a similar analysis for the reverse SDE would be valuable.
  • Novelty vs. Generalization: The paper shows that regularization can prevent collapse onto training data, but it doesn't guarantee the generation of truly "novel" content. Further work could explore methods that encourage the generation of new, characteristic data points.
  • Conditional Models: The behavior of conditional models when observations are outside the training data distribution is noted as a limitation, suggesting future work on explicit regularizers for score function smoothness with respect to observations.
  • Exploring other generative models: The authors suggest extending this line of research to other dynamical systems-based generative models, including flow-matching and Schrodinger bridges.
  • Practical implementation of early stopping/under-parameterization: While shown to be effective, the paper notes that knowing how to precisely implement these techniques can be challenging.

Summary updated

BibTeX
@misc{baptista2025memorization,
  author = {Ricardo Baptista and Agnimitra Dasgupta and Nikola B. Kovachki and Assad A. Oberai and Andrew M. Stuart},
  title = {{Memorization and Regularization in Generative Diffusion Models}},
  year = {2025},
  eprint = {2501.15785},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.15785},
}
Figure