Abstract
Diffusion models are designed to learn the score of a data distribution, yet the exact solution for finite datasets—the empirical optimal score—leads to perfect memorization. This paper investigates why practitioners rarely encounter this failure mode in practice. We demonstrate that large learning rates in Stochastic Gradient Descent (SGD) act as an implicit regularizer. By analyzing the stability of minima, we show that the highly irregular functions required for memorization correspond to sharp regions in the loss landscape. A sufficiently large learning rate prevents the model from settling into these sharp minima, effectively filtering out memorization while preserving generalization.
Introduction
Diffusion models have revolutionized generative AI by learning to reverse a noise-injection process through Denoising Score Matching (DSM). However, DSM contains a mathematical pitfall: the "empirical optimal score" (the exact solution for a finite training set) leads to perfect memorization. If a model learns this score perfectly, the backward diffusion process simply reproduces exact replicas of training images, posing significant risks to privacy and copyright.
Curiously, diffusion models usually generalize well even without explicit regularization like weight decay. This paper explores the hypothesis that the optimization process itself—specifically the choice of learning rate—prevents the model from falling into the memorization trap.
The Geometry of Memorization
To understand why models avoid memorization, we must define what a memorizing solution looks like. The authors prove that in the small-noise regime, the empirical optimal score $s^*$ is extremely irregular. To map noise back to specific training points, the score function must exhibit high Total Variation (TV), creating sharp "basins of attraction" around each individual data point. In the loss landscape, these "wiggly" functions correspond to extremely narrow and steep minima.
Implicit Regularization via Stability
The core of the paper's argument rests on the theory of Linearly Stable Minima. In Stochastic Gradient Descent (SGD), a model can only converge to a local minimum if the largest eigenvalue of the Hessian ($\lambda_{max}$) is sufficiently small relative to the learning rate ($\eta$). Specifically, the stability criterion requires $\lambda_{max} \lesssim 2/m\eta$.
Because memorizing the training data requires the network to represent high-frequency, irregular functions, the resulting loss landscape becomes incredibly sharp. If the learning rate $\eta$ is large, the optimizer's steps are too large to remain within these narrow "memorization canyons." The model is effectively "kicked out" of these regions and forced to find flatter, smoother minima that correspond to the underlying data distribution rather than individual samples.
Theoretical and Empirical Results
The authors formalize this mechanism in Theorem 8, proving that for a sufficiently large learning rate ($\eta \gtrsim \sigma^2$), the model is mathematically barred from reaching the memorizing solution.
Experimental Validation
Using controlled synthetic environments (ranging from 1D to 1000D), the authors confirmed several key predictions:
- Visualizing the "Step": In 1D experiments, as the learning rate decreases, the learned score function transforms from a smooth line (generalization) into a jagged, staircase-like function (memorization).
- MMD Metrics: Using Maximum Mean Discrepancy (MMD), they showed that models trained with large learning rates produce samples closer to the true underlying Gaussian distribution, while small learning rates produce samples that cluster tightly around training points.
- Sharpness Correlation: Experiments confirmed that larger learning rates lead to lower Hessian eigenvalues at the end of training, supporting the stability-based theory.
The Blessing of Dimensionality
An intriguing finding is that high dimensionality actually aids generalization. As dimensionality increases, data points naturally become more spread out. This makes the "memorization canyons" even sharper and harder for SGD to capture, explaining why high-dimensional models (like Stable Diffusion) might be naturally more resistant to memorization than simpler toy models.
Conclusion and Future Work
This research suggests that the learning rate acts as a complexity filter: it serves as a high-pass filter for the loss landscape but a low-pass filter for the function space. While large learning rates prevent memorization, they must be balanced; an excessively high rate might prevent the model from learning any structure at all.
Future work is needed to extend these proofs from two-layer ReLU networks to the complex U-Net and Transformer architectures used in state-of-the-art systems, and to determine the "Goldilocks" learning rate that optimizes the balance between generation quality and data privacy.
Summary updated