Skip to content
module

ScoreSDE

14 members
lucid.models.generative.score_sde

Score-SDE family — Song et al., ICLR 2021.

Image Generation
Paper

Song, Yang, et al. "Score-Based Generative Modeling through Stochastic Differential Equations." International Conference on Learning Representations, 2021.

Overview

Score-SDE's contribution is that two families which looked separate are the same object viewed at different resolutions.

Noise-conditional score networks perturb data with a geometric ladder of Gaussian noise; denoising diffusion perturbs it with a Markov chain of small Gaussian steps. Take the number of levels to infinity and both become stochastic differential equations:

dx=f(x,t) dt+g(t) dw.dx = f(x, t)\,dt + g(t)\,dw.

NCSN's limit has zero drift and an exploding variance (VE); DDPM's has a contracting drift and a variance held at one (VP). The paper adds a third, sub-VP, whose variance is bounded by the VP process at every instant and which gives its best likelihoods.

What the continuous view buys is not a better model but better machinery, and three pieces of it.

Any solver. Sampling is integrating the reverse-time SDE

dx=[f(x,t)−g(t)2∇xlog⁡pt(x)]dt+g(t) dwˉ,dx = \big[f(x, t) - g(t)^2 \nabla_x \log p_t(x)\big] dt + g(t)\, d\bar{w},

so any SDE solver works, and the number of steps stops being a property of the trained model.

Predictor-Corrector. A solver step can be followed by Langevin steps at fixed tt, which correct the discretisation error the solver leaves behind rather than letting it accumulate.

The probability flow ODE. Every diffusion has a deterministic process sharing its marginals exactly:

dx=[f(x,t)−12g(t)2∇xlog⁡pt(x)]dt.dx = \Big[f(x, t) - \tfrac{1}{2} g(t)^2 \nabla_x \log p_t(x)\Big] dt.

That turns a generative model into a continuous normalising flow — adaptive step sizes, an invertible encoding, and exact likelihoods — without retraining anything.

Classes

Functions