Source-linked AI summary
Score-Based Generative Models Detect Manifolds
Jakiw Pidstrigach
TL;DR
The paper studies how the prior and score approximations used by score-based generative models affect the support of generated samples, a question relevant to sample quality and memorization. It derives conditions for matching the data support and finds that generalization requires unbounded training-drift approximation error.
Problem
The effects of approximating both the terminal distribution and intermediate scores on the generated sample distribution's support are not yet well understood.
Source: §1 · pp. 2–3Method
The paper derives conditions on score-based models under which their sample distribution has the same support as the data distribution, including for an empirical data measure.
Source: §1 · pp. 3–4Results
The analysis identifies conditions for supp(µsample) = supp(µdata) and finds that generalization requires unbounded drift-approximation error.
Source: §1 · pp. 3–4, §8 · p. 10Takeaways & Limitations
Support matching can mean generating the right kind of samples despite incorrect frequencies, while matching the empirical support corresponds to memorizing training data.
Source: §1 · pp. 1, 3The analysis assumes the data manifold lies in a ball of finite diameter, though the authors note this assumption could be weakened with additional technical effort.
Source: §4.1 · p. 6
Abstract
from arXiv · showhide
Score-based generative models (SGMs) need to approximate the scores $\nabla \log p_t$ of the intermediate distributions as well as the final distribution $p_T$ of the forward process. The theoretical underpinnings of the effects of these approximations are still lacking. We find precise conditions under which SGMs are able to produce samples from an underlying (low-dimensional) data manifold $\mathcal{M}$. This assures us that SGMs are able to generate the "right kind of samples". For example, taking $\mathcal{M}$ to be the subset of images of faces, we find conditions under which the SGM robustly produces an image of a face, even though the relative frequencies of these images might not accurately represent the true data generating distribution. Moreover, this analysis is a first step towards understanding the generalization properties of SGMs: Taking $\mathcal{M}$ to be the set of all training samples, our results provide a precise description of when the SGM memorizes its training data.
1 Introduction
The introduction asks how prior and score approximations affect the samples an SGM produces, especially whether its sample distribution has the right support. It motivates support as a way to distinguish generating the right kind of samples from matching their frequencies or generalizing beyond training data.
1 Introduction
- SGMs approximate both the forward process's terminal distribution with a prior and its intermediate scores with a neural network, motivating analysis of how both errors affect samples.The prior is used because the terminal distribution is not known, and score matching trains the neural network in place of unavailable true scores.Source: §1 · p. 2
- Under the manifold hypothesis, the data distribution is supported on a lower-dimensional structure, so many possible inputs have zero probability and scores can explode as t approaches zero.The introduction names this support as the data manifold M.Source: §1 · p. 3
- Support matters because a model supported on face images can produce faces even with incorrect frequencies, while support matching the empirical data can indicate memorization.The introduction also notes that KL and total-variation distances reach their maximum when measure supports do not overlap.Source: §1 · pp. 1, 3
- The main result gives conditions under which the sample distribution and data distribution have the same support, with applications to manifold learning and training-data memorization.The introduction further states that generalization requires an unbounded approximation error in the training drift.Source: §1 · pp. 3–4
- For the empirical data measure, the corollary gives conditions for memorization: minimize mean squared error while keeping mean exponential error infinite.The introduction states that bounded drift approximation error makes the exponential error finite, so generalization depends on unbounded training error.Source: §1 · p. 4
2 Popular SDEs used in SGMs
The section presents Brownian motion, Ornstein–Uhlenbeck, and critically damped Langevin dynamics as SDEs used to describe SGM implementations. It simplifies time-change parameters when they do not affect the behavior studied.
2 Popular SDEs used in SGMs
- Brownian-motion and Ornstein–Uhlenbeck SGM processes are treated as discretizations of continuous SDEs, with their time-change parameters set to 1 for analysis.The Brownian-motion analysis still applies for any positive σ(t).Source: §2 · pp. 4–5
- Critically damped Langevin dynamics introduces artificial velocity coordinates, which are discarded after running the reverse process.The numerical setup sets M and γ to 1.Source: §2 · p. 5
3 Score approximation with a finite number of samples
Because the true data distribution is unknown, SGMs train score networks using a tractable approximation based on the empirical distribution. Perfectly matching that approximate score can lead to memorizing training examples.
3 Score approximation with a finite number of samples
- Score matching replaces the intractable true-score objective with one based on the evaluable forward marginals from the empirical data distribution.The text states that perfect minimization makes sθ equal to ∇log ˆpt.Source: §3 · p. 5
- A reverse SDE using the exact empirical score ∇log ˆpt produces samples from ˆµdata, so perfect score fitting can memorize training examples.This motivates asking how closely the score-matching loss should be minimized.Source: §3 · p. 5
4 Effects of the approximations
The section analyzes how initial-distribution and drift errors affect reverse-SDE samples. Its results connect approximation conditions to data-manifold support and training-data memorization.
4.1 Error in the initial condition
- When µprior and πT are equivalent, µsample and π0 are equivalent, and both directional f-divergences are bounded by the corresponding initial-distribution divergences.The theorem’s applications distinguish true marginals, which address closeness to µdata, from empirical marginals, which address generalization.Source: §4.1 · p. 7
- The initial-condition theorem’s requirements are described as generally met in practice, so initial-condition error is not responsible for SGMs’ generalization capacity.The discussion notes that the data manifold is assumed to lie in a bounded ball for the technical argument; this may be weakened with additional effort.Source: §4.1 · pp. 6–7
4.2 Error in the drift
- If Assumption 2 holds for the true marginals πt = pt, µsample has the same support as µdata and therefore learns the data manifold.This conclusion combines the results for initial-condition and drift approximations, assuming both required assumptions hold.Source: §4.2 · p. 7
- If Assumption 2 holds for empirical marginals ˆpt, the reverse process memorizes training data; observed novel samples imply this assumption is violated in practice.Figure 3 illustrates the contrast: the empirical drift reaches zero distance from training examples, while the pretrained drift retains distance and produces novel images.Source: Figure 3 · p. 6, §4.2 · p. 8
- The CIFAR-10 experiment reports that a constant perturbation of the empirical drift yields samples equivalent to ˆµdata and satisfies Assumption 2.The authors report that the corresponding Zt is a uniformly integrable martingale.Source: §4.2 · p. 8
- Zt is very heavy-tailed, so understanding its characteristics requires many samples; robust estimators remain a proposed direction for future work.The passage describes mostly small values with a few extremely large ones.Source: §4.2 · p. 8
5 Drift Explosion under manifold hypothesis
The section relates reverse-drift explosion near the end of sampling to the manifold hypothesis. Under its stated geometric expectations, the true score points toward the data manifold and grows as paths approach it.
5 Drift Explosion under manifold hypothesis
- The derivation uses the Gaussian transition kernels of the linear SDEs and averages over the data distribution to obtain time marginals.The kernel covariance Σt does not depend on the starting point.Source: §5 · p. 8
- In the CIFAR-10 comparison, the integral for the constant-perturbation drift does not appear to explode near T, while the DDPM++ drift’s integral does.The right-hand plot measures mean distance from the reverse-path drift to the empirical drift; that distance for the true drift explodes near T.Source: §5 · p. 9
- The explanation assumes a relatively well-behaved, low-dimensional manifold in a high-dimensional space, where small-time noise points away from the manifold with high probability.Under these assumptions, distance to the manifold can be approximated by the magnitude of the Gaussian noise term.Source: §5 · p. 9
- Near t = 0, the true score is expected to point toward the data manifold and grow without bound, acting as a support-matching force that draws SDE paths onto it.For Brownian motion, the cited scale is proportional to 1/√t.Source: §5 · p. 9
6 Distance from pT to µprior
The distance between the generated sample measure and the data measure depends on how closely the prior approximates the forward process’s terminal distribution. For Brownian motion, the paper gives a moment-matched Gaussian prior and states that its distance from the terminal marginal decreases over time at a stated rate.
6 Distance from pT to µprior
- The distance between µsample and µdata is directly related to the distance between pT and µprior when drift-approximation errors are neglected.The paper notes that for the OU process and CLD, the distance from pt to N(0, Id) may generally grow exponentially in time.Source: §6 · p. 9
- Because Brownian motion does not converge to a stationary distribution, its prior must be chosen separately for each terminal time T.Source: §6 · p. 10
- For Brownian motion, the KL-optimal Gaussian prior has mean E[µdata] and covariance Cov[µdata] + TId.If covariance is restricted to a scalar multiple of the identity, the optimal mean is unchanged and c = E[∥Xt − m∥2] = trace(CT).Source: §6 · p. 10
- With that moment-matched prior, the distance between the Brownian terminal marginal and µT prior decreases over time, with a rate stated in Lemma 3.The supplied passage does not include the rate’s expression.Source: §6 · p. 10
7 Broader impact
The paper identifies potential societal impacts of generative models, including synthetic media, reproduced training-data biases, and effects on creative work.
7 Broader impact
- Generative models can create synthetic data, such as images or videos, that is hard to distinguish from real data [Mirsky and Lee, 2021].Source: §7 · p. 10
- Generative models can learn and reproduce biases present in their training data [Esser et al., 2020].Source: §7 · p. 10
- Depending on the application, generative models might be used for creative work previously done by humans.Source: §7 · p. 10
8 Conclusion
The paper establishes conditions under which the sample measure and true data-generating distribution have equivalent support. It applies this result to finite training data to characterize when an SGM memorizes its training examples.
8 Conclusion
- Under the stated conditions, µsample and µdata have equivalent support, so generated samples lie within the data distribution’s support and every data-supported sample has positive probability under µsample.Source: §8 · p. 10
- Because only finitely many training examples are accessible rather than the full support of µdata, the results can be applied to determine conditions for memorization.Source: §8 · p. 10
- The authors describe this application as a first step toward understanding the generalization capabilities of SGMs.Source: §8 · p. 10
9 Funding
The work was partially supported by Deutsche Forschungsgemeinschaft (DFG), Project-ID 318763901, SFB1294.
9 Funding
- The work received partial support from Deutsche Forschungsgemeinschaft (DFG), Project-ID 318763901, SFB1294.Source: §9 · p. 10
Checklist
The checklist reports that the paper states its theoretical assumptions, provides proofs, and describes limitations. It also records selected reproducibility and ethics items as not applicable or not reported.
Checklist
- The checklist marks the theoretical assumptions and proofs as stated and complete, and says the paper describes its limitations.It also reports that contributions and scope were described.Source: Checklist · p. 13
- The authors report providing code, data, reproduction instructions, and training details, but no error bars because the experiments are small and illustrative.The checklist also points to Appendix B for training details.Source: Checklist · p. 14
- Existing assets and human-subject procedures are marked not applicable, including asset licensing and participant-risk or compensation disclosures.The checklist says no existing assets or crowdsourcing or human-subject research were used.Source: Checklist · p. 14
A Stochastic prerequisites
- The stochastic-prerequisites section points readers to and for more rigorous treatment.Source: A Stochastic prerequisites · p. 15
A.1 Equivalence of measures / Girsanov Theorem
This material reviews measure equivalence and uniform integrability, numerical illustrations, and technical facts used in the paper’s reverse-SDE analysis. It states support and equivalence results for reverse-process marginals, including under more general forward SDEs.
A.1 Equivalence of measures / Girsanov Theorem
- Equivalent measures share support, while the Radon–Nikodym theorem represents an absolutely continuous measure by reweighting another.Girsanov gives conditions for equivalence of the path measures induced by two SDEs and a formula for their relative density.Source: §A.1 · p. 15
A.2 Uniform integrability
- Uniform integrability of the martingale Z_t gives an L1 limit Z that is a density on the limiting sigma-algebra.The text identifies uniform integrability as the condition needed to extend local densities when the drift explodes as t approaches T.Source: §A.2 · p. 15
B Numerics
- The numerical illustrations use Gaussian-mixture data for forward and reverse SDE plots, and estimate time-position densities with heat maps.The heat-map axes encode time and position, and square-root intensity is used to improve contrast near low-density regions.Source: B Numerics · p. 16
B.2 Figure 2b and 2a
- Figure 2 uses uniform data distributions on equally spaced samples of the unit sphere S1: 9 samples for Figure 2b and 256 for Figure 2a.Source: §B.2 · pp. 16–17
C.1 Transition kernels; C.2 Form of the drift
- The treated SDEs have smooth marginal densities, and the drift representation follows by rewriting a term as a conditional expectation.The smoothness result is attributed to the Hörmander theorem for Brownian motion and the OU process, and to hypocoercivity for CLD.Source: §C.1 · p. 17, §C.2 · p. 18
D Reverse SDEs: The general case; E.1 Proofs of the theorems
- The theorems also apply to general forward SDEs, and the proof strategy constructs path laws, reverses them, and uses reweighting and uniqueness to establish endpoint properties.For Theorem 1, the sample law is absolutely continuous with respect to the data law, and equivalent when the prior and forward terminal law are equivalent.Source: D Reverse SDEs: The general case · p. 18, §E.1 · pp. 18–19, §E.1.1 · p. 19
E.1.1 Theorem 1
- If the initial prior is equivalent to the forward terminal law, the reverse-process sample law is equivalent to the data law; absolute continuity alone gives sample-law absolute continuity.The proof uses time reversal of path measures and uniqueness in law.Source: §E.1.1 · p. 19
E.1.2 Theorem 2
- Uniform integrability lets the proof extend local Girsanov densities to the terminal time, yielding equivalent time-T marginals for the two reverse processes.The stated argument applies Girsanov on [0, T) and uses the uniformly integrable weights to extend to [0, T].Source: §E.1.2 · p. 20
E.2 Proof of the Lemmas
The lemma proofs establish large-time Gaussian approximation for forward Brownian marginals and derive properties of the Gaussian used for comparison. They also use entropy bounds and regularity of the marginals’ scores.
E.2 Proof of the Lemmas
- For t > 0, log p_t is smooth, and its score is Lipschitz on compact time-space sets bounded away from zero time.Source: §E.2 · p. 20
- The KL-optimal Gaussian covariance is V_t = C + tId; under an isotropic restriction, v_t = tr(C)/d + t.Here C is the data covariance, and the restricted form is V_t = v_tId.Source: §E.2 · p. 21
- For data supported in a bounded ball, the forward Brownian marginal p_t approaches its mean- and covariance-matched Gaussian n_t in KL divergence as t grows.The comparison Gaussian has covariance V_t = Cov[µdata] + tId.Source: §E.2 · p. 21
- The proof compares entropy h(t) with KL divergence through g(t) = h(t) − KL(p_t|n_t), using a nonincreasing g(t) that tends to zero.The argument invokes a KL limit for bounded-support data and concludes the stated lemma from this monotonicity.Source: §E.2 · p. 23
- The bounded-support argument is extended to measures with finite first and second moments by truncation and convergence of covariance matrices.The text uses weak convergence and lower semicontinuity of KL divergence in this extension.Source: §E.2 · p. 23
Related papers
This paper cites
- Score-Based Generative Modeling through Stochastic Differential Equations2020
- Diffusion Models Beat GANs on Image Synthesis2021
- Deep Unsupervised Learning using Nonequilibrium Thermodynamics2015
- Generative Modeling by Estimating Gradients of the Data Distribution2019
- DiffWave: A Versatile Diffusion Model for Audio Synthesis2020
- Variational Diffusion Models2021
Cited by
- How Do DiTs Denoise? An Aggregator-Predictor View of Attention and MLPs2026
- Memorization and Malign Generalization in Conditional Diffusion Models with Random Features2026
- Generalization, memorization, and overfitting for diffusion models trained in the lazy high-dimensional regime2026
- Convergence of denoising diffusion models under the manifold hypothesis2022