Score-Based Generative Modeling
Derive the Gaussian denoising score, explain how regression estimates the marginal score, and place it inside the reverse-time SDE.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 2 min
In this article3 chapters
The conditional score is computable from a clean sample
Let \(x_t=\alpha_t x_0+\sigma_t\epsilon\) with \(\epsilon\sim\mathcal N(0,I)\) and \(\sigma_t>0\). Write \(q_t(x\mid x_0)\) for the Gaussian corruption density and \(p_t(x)\) for its marginal over clean samples. Differentiating the logarithm of the conditional density gives
\[ \nabla_x\log q_t(x\mid x_0)= -\frac{x-\alpha_t x_0}{\sigma_t^2}. \]
At a fixed time, least-squares regression to this target learns its conditional expectation given the noisy point in the population limit. Under differentiation under the integral, integrating the conditional score against the posterior of \(x_0\) yields \(\nabla_x\log p_t(x)\). The network therefore learns a direction field over the noisy distribution. Predicting the sampled noise gives an equivalent target up to a time-dependent factor.
Gaussian noising separates a chosen corruption distribution from its average over clean data. A least-squares objective illustrates how the choice of loss determines which statistic an optimal prediction recovers.
Time reversal uses the score to alter the drift
For a forward diffusion with drift \(f(x,t)\) and scalar, state-independent noise coefficient \(g(t)\), the reverse-time equation is
\[ dX_t=[f(X_t,t)-g(t)^2\nabla_x\log p_t(X_t)]\,dt +g(t)\,d\overline W_t. \]
It is integrated from the terminal time back toward zero, so \(dt<0\) in this convention and \(\overline W_t\) is reverse-time Brownian motion. A sampler starts from a tractable approximation of the terminal distribution and substitutes the estimated score. Score error, terminal approximation and numerical discretization can each affect the sample distribution.
Conditioning specifies which distribution to learn
For example, a grayscale training image can condition colorization, with uncertain regions admitting several plausible colors. The conditional score describes the distribution compatible with that observation. Diffusion-based robot policies use the analogous idea over action sequences. Stochastic partial differential equations in Advanced Mathematics develop an infinite-dimensional framework for different classes of stochastic evolution. Here the displayed SDE is on a finite-dimensional state.[1][2]