ScoreSDE
14 memberslucid.models.generative.score_sdeScore-SDE family — Song et al., ICLR 2021.
Song, Yang, et al. "Score-Based Generative Modeling through Stochastic Differential Equations." International Conference on Learning Representations, 2021.
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:
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
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 , 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:
That turns a generative model into a continuous normalising flow — adaptive step sizes, an invertible encoding, and exact likelihoods — without retraining anything.
Classes
ScoreSDEConfig1 methodsFrozen configuration for the Score-SDE family.
ScoreSDEForImageGeneration5 methodsScore-SDE with its objective and the three samplers.
ScoreSDEModel4 methodsA time-dependent score network over one of the three SDEs.
ScoreSDEOutput1 methodsWhat the model returns for a batch.
SDE6 methodsWhat the samplers and the loss need an SDE to provide.
SubVPSDE2 methodsSub-VP — the SDE this paper introduces, and its best likelihoods.
VESDE8 methodsVariance Exploding — the continuous limit of NCSN.
VPSDE8 methodsVariance Preserving — the continuous limit of DDPM.
Functions
score_sde_subvp→ ScoreSDEModelConstruct the sub-VP model — the SDE this paper introduces.
score_sde_subvp_gen→ ScoreSDEForImageGenerationThe sub-VP model with its objective and the three samplers.
score_sde_ve→ ScoreSDEModelConstruct the Variance Exploding model — NCSN's continuous limit.
score_sde_ve_gen→ ScoreSDEForImageGenerationThe VE model with its objective and the three samplers.
score_sde_vp→ ScoreSDEModelConstruct the Variance Preserving model — DDPM's continuous limit.
score_sde_vp_gen→ ScoreSDEForImageGenerationThe VP model with its objective and the three samplers.