This is a summary of unified framework of diffusion models by Stochastic Differential Equations (SDE) and the related topics.
Authors
Affiliations
Yiming Che
Arizona State University
Published
Sept. 24, 2024
Background
In score-based diffusion models , the authors proposed a unified framework that connects the score-based model NCSN and DDPM through the perspective of Stochastic Differential Equations (SDE). They interpret the forward process (adding noise) and the backward process (denoising sampling) as SDE and reverse SDE, respectively.
Data Perturbation with Itô SDE
The diffusion process from the original input to Gaussian noise with continuous time variable can be modeled by the Itô SDE
is the standard Wiener process.
are the drift coefficients and is the dimension of . It is always affine, resulting in where .
are the diffusion coefficients at time .
We consider the case which is independent of . Then, Eq. (1) can be rewritten as
The perturbation kernel of this SDE have the form
where
Here, I’ll use and , and and interchangeably for simplicity. The corresponding marginal distribution is obtained by
The Fokker-Plank equation describes the evolution of the marginal distribution , interchangeable with , over time under the effect of drift forces and random (or noise) forces. It can be written as
where
If we consider the case which is independent of , then Eq. can be rewritten as
Probability Flow ODE
According to the Fokker-Plank equation, there exists an ODE which shares the same marginal distribution as the SDE. From Eq. , the corresponding SDE is reduced to ODE given by
The ODE is named as the probability flow ODE (PF ODE).
If we further build the ODE according to and , we have
The derivation can be found in EDM paper (Eq. 28 and 34). Then, Eq. can be rewritten as
where the marginal and
as shown in Eq. .
Connection Between PF ODE and SDE
According to the Eq. (102) in , the authors derived a family of SDE for any choice of . The SDE is given by
The PF ODE is a special case of the SDE when . The derivation is given in the EDM paper (Appendix B.5). It is a little bit long but not difficult to follow. Furthermore, the authors parameterized and Eq. becomes
where is a free function.
Reverse SDE
The reverse diffusion process from to can also be modeled by Itô SDE according to :
Unified Framework of Score Diffusion Models
NCSN (VE SDE)
DDPM (VP SDE)
DDIM
Preconditioning
Sampling
Related Topics
Flow Matching
Consistency Model
Footnotes
References
Score-Based Generative Modeling through Stochastic Differential Equations Song, Y., Sohl-Dickstein, J., Kingma, D.P., Kumar, A., Ermon, S. and Poole, B.. International Conference on Learning Representations.
Elucidating the design space of diffusion-based generative models Karras, T., Aittala, M., Aila, T. and Laine, S., 2022. Advances in neural information processing systems, Vol 35, pp. 26565--26577.
Reverse-time diffusion equation models Anderson, B.D., 1982. Stochastic Processes and their Applications, Vol 12(3), pp. 313--326. Elsevier.