LING YANG, Peking University, China
ZHILONG ZHANG∗ , Peking University, China
YANG SONG, OpenAI, USA
SHENDA HONG, Peking University, China
RUNSHENG XU, University of California, Los Angeles, USA
YUE ZHAO, Carnegie Mellon University, USA
WENTAO ZHANG, Peking University, China
BIN CUI, Peking University, China
MING-HSUAN YANG† , University of California at Merced, USA
Diffusion models have emerged as a powerful new family of deep generative models with record-breaking performance in many applications, including image synthesis, video generation, and molecule design. In this survey, we provide an overview of the rapidly expanding body of work on diffusion models, categorizing the research into three key areas: efficient sampling, improved likelihood estimation, and handling data with special structures. We also discuss the potential for combining diffusion models with other generative models for enhanced results. We further review the wide-ranging applications of diffusion models in fields spanning from computer vision, natural language processing, temporal data modeling, to interdisciplinary applications in other scientific disciplines. This survey aims to provide a contextualized, in-depth look at the state of diffusion models, identifying the key areas of focus and pointing to potential areas for further exploration. Github: https://github.com/YangLing0818/Diffusion-Models-Papers-Survey-Taxonomy.
CCS Concepts: • Computing methodologies → Computer vision tasks; Natural language generation; Machine learning approaches.
Additional Key Words and Phrases: Generative Models, Diffusion Models, Score-Based Generative Models, Stochastic Differential Equations
### ACM Reference Format:
Ling Yang, Zhilong Zhang, Yang Song, Shenda Hong, Runsheng Xu, Yue Zhao, Wentao Zhang, Bin Cui, and Ming-Hsuan Yang. 2023. Diffusion Models: A Comprehensive Survey of Methods and Applications. 1, 1 (December 2023), 58 pages. https://doi.org/10.1145/ 3626235
∗Contributed equally.
†Wentao Zhang, Bin Cui, and Ming-Hsuan Yang are corresponding authors.
Authors' addresses: Ling Yang, Peking University, China, yangling0818@163.com; Zhilong Zhang, Peking University, China, zhilong.zhang@bjmu.edu.cn; Yang Song, OpenAI, USA, songyang@openai.com; Shenda Hong, Peking University, China, hongshenda@pku.edu.cn; Runsheng Xu, University of California, Los Angeles, USA, rxx3386@ucla.edu; Yue Zhao, Carnegie Mellon University, USA, zhaoy@cmu.edu; Wentao Zhang, Peking University, China, wentao.zhang@pku.edu.cn; Bin Cui, Peking University, China, bin.cui@pku.edu.cn; Ming-Hsuan Yang, University of California at Merced, USA, mhyang@ucmerced.edu.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.
© 2023 Association for Computing Machinery.
Manuscript submitted to ACM
# Contents
| Abstract | | 1 |
| --- | --- | --- |
| Contents | | 2 |
| 1 | Introduction | 3 |
| 2 | Foundations of Diffusion Models | 5 |
| 2.1 | Denoising Diffusion Probabilistic Models (DDPMs) | 5 |
| 2.2 | Score-Based Generative Models (SGMs) | 8 |
| 2.3 | Stochastic Differential Equations (Score SDEs) | 9 |
| 3 | Diffusion Models with Efficient Sampling | 10 |
| 3.1 | Learning-Free Sampling | 10 |
| 3.1.1 | SDE Solvers | 10 |
| 3.1.2 | ODE solvers | 12 |
| 3.2 | Learning-Based Sampling | 13 |
| 3.2.1 | Optimized Discretization | 13 |
| 3.2.2 | Truncated Diffusion | 14 |
| 3.2.3 | Knowledge Distillation | 14 |
| 4 | Diffusion Models with Improved Likelihood | 14 |
| 4.1 | Noise Schedule Optimization | 14 |
| 4.2 | Reverse Variance Learning | 15 |
| 4.3 | Exact Likelihood Computation | 16 |
| 5 | Diffusion Models for Data with Special Structures | 17 |
| 5.1 | Discrete Data | 17 |
| 5.2 | Data with Invariant Structures | 17 |
| 5.3 | Data with Manifold Structures | 18 |
| 5.3.1 | Known Manifolds | 18 |
| 5.3.2 | Learned Manifolds | 18 |
| 6 | Connections with Other Generative Models | 19 |
| 6.1 | Large Language Models and Connections with Diffusion Models | 19 |
| 6.2 | Variational Autoencoders and Connections with Diffusion Models | 20 |
| 6.3 | Generative Adversarial Networks and Connections with Diffusion Models | 21 |
| 6.4 | Normalizing Flows and Connections with Diffusion Models | 22 |
| 6.5 | Autoregressive Models and Connections with Diffusion Models | 23 |
| 6.6 | Energy-based Models and Connections with Diffusion Models | 24 |
| 7 | Applications of Diffusion Models | 24 |
| 7.1 | Unconditional and Conditional Diffusion Models | 24 |
| 7.1.1 | Conditioning Mechanisms in Diffusion Models | 25 |
| 7.1.2 | Diffusion with DPO/RLHF | 25 |
| 7.1.3 | Condition Diffusion on Labels and Classifiers | 27 |
| 7.1.4 | Condition Diffusion on Texts, Images, and Semantic Maps | 27 |
| 7.1.5 | Condition Diffusion on Graphs | 27 |
| 7.2 | Computer Vision | 27 |
| --- | --- | --- |
| 7.2.1 | Image Super Resolution, Inpainting, Restoration, Translation, and Editing | 27 |
| 7.2.2 | Semantic Segmentation | 29 |
| 7.2.3 | Video Generation | 29 |
| 7.2.4 | Generating Data from Diffusion Models | 29 |
| 7.2.5 | Point Cloud Completion and Generation | 29 |
| 7.2.6 | Anomaly Detection | 31 |
| 7.3 | Natural Language Generation | 31 |
| 7.4 | Multi-Modal Generation | 32 |
| 7.4.1 | Text-to-Image Generation | 32 |
| 7.4.2 | Scene Graph-to-Image Generation | 34 |
| 7.4.3 | Text-to-3D Generation | 34 |
| 7.4.4 | Text-to-Motion Generation | 37 |
| 7.4.5 | Text-to-Video Generation | 38 |
| 7.4.6 | Text-to-Audio Generation | 38 |
| 7.5 | Temporal Data Modeling | 40 |
| 7.5.1 | Time Series Imputation | 40 |
| 7.5.2 | Time Series Forecasting | 40 |
| 7.5.3 | Waveform Signal Processing | 41 |
| 7.6 | Robust Learning | 41 |
| 7.7 | Interdisciplinary Applications | 41 |
| 7.7.1 | Drug Design and Life Science | 41 |
| 7.7.2 | Material Design | 42 |
| 7.7.3 | Medical Image Reconstruction | 43 |
| 8 | Future Directions | 43 |
| Revisiting Assumptions | | 43 |
| | Theoretical Understanding | 44 |
| Latent Representations | | 44 |
| | AIGC and Diffusion Foundation Models | 44 |
| 9 Conclusion | | 44 |
| References | | 44 |
# 1 INTRODUCTION
Diffusion models [111, 275, 280, 285] have emerged as the new state-of-the-art family of deep generative models. They have broken the long-time dominance of generative adversarial networks (GANs) [88] in the challenging task of image synthesis [60, 111, 280, 285] and have also shown potential in a variety of domains, ranging from computer vision [4, 15, 25, 29, 112, 114, 145, 149, 171, 194, 206, 225, 257, 259, 315, 354, 355, 379, 389], natural language processing [9, 117, 175, 264, 361], temporal data modeling [3, 39, 159, 249, 291, 335], multi-modal modeling [10, 243, 255, 258, 386],

Fig. 1. Taxonomy of diffusion models variants (in Sections 3 to 5), connections with other generative models (in Section 6), applications of diffusion models (in Section 7), and future directions (in Section 8).
robust machine learning [23, 33, 144, 308, 357], to interdisciplinary applications in fields such as computational chemistry [5, 115, 133, 166, 169, 196, 327] and medical image reconstruction [31, 47–49, 53, 202, 230, 284, 328].
Numerous methods have been developed to improve diffusion models, either by enhancing empirical performance [214, 277, 281] or by extending the model's capacity from a theoretical perspective [187, 188, 279, 285, 371]. Over the past two years, the body of research on diffusion models has grown significantly, making it increasingly challenging for new researchers to stay abreast of the recent developments in the field. Additionally, the sheer volume of work can obscure major trends and hinder further research progress. This survey aims to address these problems by providing a comprehensive overview of the state of diffusion model research, categorizing various approaches, and highlighting key advances. We hope this survey to serve as a helpful entry point for researchers new to the field while providing a broader perspective for experienced researchers.
In this paper, we first explain the foundations of diffusion models (Section 2), providing a brief but self-contained introduction to three predominant formulations: denoising diffusion probabilistic models (DDPMs) [111, 275], scorebased generative models (SGMs) [280, 281], and stochastic differential equations (Score SDEs) [141, 279, 285]. Key to all these approaches is to progressively perturb data with intensifying random noise (called the "diffusion" process), then successively remove noise to generate new data samples. We clarify how they work under the same principle of diffusion and explain how these three models are connected and can be reduced to one another.
Next, we present a taxonomy of recent research that maps out the field of diffusion models, categorizing it into three key areas: efficient sampling (Section 3), improved likelihood estimation (Section 4), and methods for handling data with special structures (Section 5), such as relational data, data with permutation/rotational invariance, and data residing on manifolds. We further examine the models by breaking each category into more detailed sub-categories, as illustrated in Fig. 1. In addition, we discuss the connections of diffusion models to other deep generative models (Section 6), including variational autoencoders (VAEs) [156, 252], generative adversarial networks (GANs) [88], normalizing flows [62, 64, 226, 254], autoregressive models [302], and energy-based models (EBMs) [165, 283]. By combining these models with diffusion models, researchers have the potential to achieve even stronger performance.
Following that, our survey reviews six major categories of application that diffusion models have been applied to in the existing research (Section 7): computer vision, natural language process, temporal data modeling, multi-modal learning, robust learning, and interdisciplinary applications. For each task, we provide a definition, describe how diffusion models can be employed to address it and summarize relevant previous work. We conclude our paper (Sections 8 and 9) by providing an outlook on possible future directions for this exciting new area of research.
### 2 FOUNDATIONS OF DIFFUSION MODELS
Diffusion models are a family of probabilistic generative models that progressively destruct data by injecting noise, then learn to reverse this process for sample generation. We present the intuition of diffusion models in Fig. 2. Current research on diffusion models is mostly based on three predominant formulations: denoising diffusion probabilistic models (DDPMs) [111, 214, 275], score-based generative models (SGMs) [280, 281], and stochastic differential equations (Score SDEs) [279, 285]. We give a self-contained introduction to these three formulations in this section, while discussing their connections with each other along the way.
### 2.1 Denoising Diffusion Probabilistic Models (DDPMs)
A denoising diffusion probabilistic model (DDPM) [111, 275] makes use of two Markov chains: a forward chain that perturbs data to noise, and a reverse chain that converts noise back to data. The former is typically hand-designed with

Fig. 2. Diffusion models smoothly perturb data by adding noise, then reverse this process to generate new data from noise. Each denoising step in the reverse process typically requires estimating the score function (see the illustrative figure on the right), which is a gradient pointing to the directions of data with higher likelihood and less noise.
the goal to transform any data distribution into a simple prior distribution (e.g., standard Gaussian), while the latter Markov chain reverses the former by learning transition kernels parameterized by deep neural networks. New data points are subsequently generated by first sampling a random vector from the prior distribution, followed by ancestral sampling through the reverse Markov chain [158].
Formally, given a data distribution x0 ∼ (x0), the forward Markov process generates a sequence of random variables x1, x2 . . . x with transition kernel (x | x−1). Using the chain rule of probability and the Markov property, we can factorize the joint distribution of x1, x2 . . . x conditioned on x0, denoted as (x1, . . . , x | x0), into
$$q(\mathbf{x}_{1},\ldots,\mathbf{x}_{T}\mid\mathbf{x}_{0})=\prod_{t=1}^{T}q(\mathbf{x}_{t}\mid\mathbf{x}_{t-1}).\tag{1}$$
In DDPMs, we handcraft the transition kernel (x | x−1) to incrementally transform the data distribution (x0) into a tractable prior distribution. One typical design for the transition kernel is Gaussian perturbation, and the most common choice for the transition kernel is
$$q({\bf x}_{t}\mid{\bf x}_{t-1})={\cal N}({\bf x}_{t};\sqrt{1-\beta_{t}}{\bf x}_{t-1},\beta_{t}{\bf I}),\tag{2}$$
where ∈ (0, 1) is a hyperparameter chosen ahead of model training. We use this kernel to simply our discussion here, although other types of kernels are also applicable in the same vein. As observed by Sohl-Dickstein et al. (2015) [275], this Gaussian transition kernel allows us to marginalize the joint distribution in Eq. (1) to obtain the analytical form of (x | x0) for all ∈ {0, 1, · · · , }. Specifically, with B 1 − and ¯ B Î =0 , we have
$$q({\bf x}_{t}\mid{\bf x}_{0})={\cal N}({\bf x}_{t};\sqrt{\tilde{\alpha}_{t}}{\bf x}_{0},(1-\tilde{\alpha}_{t}){\bf I}).\tag{3}$$
Given x0, we can easily obtain a sample of x by sampling a Gaussian vector ∼ N (0, I) and applying the transformation
$${\bf x}_{t}=\sqrt{\tilde{\alpha}_{t}}{\bf x}_{0}+\sqrt{1-\tilde{\alpha}_{t}}\epsilon.\tag{4}$$
When ¯ ≈ 0, x is almost Gaussian in distribution, so we have (x ) B ∫ (x | x0)(x0)dx0 ≈ N (x ; 0, I).
Intuitively speaking, this forward process slowly injects noise to data until all structures are lost. For generating new data samples, DDPMs start by first generating an unstructured noise vector from the prior distribution (which is typically trivial to obtain), then gradually remove noise therein by running a learnable Markov chain in the reverse time direction. Specifically, the reverse Markov chain is parameterized by a prior distribution (x ) = N (x ; 0, I) and a Manuscript submitted to ACM
learnable transition kernel (x−1 | x). We choose the prior distribution (x ) = N (x ; 0, I) because the forward process is constructed such that (x ) ≈ N (x ; 0, I). The learnable transition kernel (x−1 | x) takes the form of
$$p_{\theta}({\bf x}_{t-1}\mid{\bf x}_{t})={\cal N}({\bf x}_{t-1};\mu_{\theta}({\bf x}_{t},t),\Sigma_{\theta}({\bf x}_{t},t))\tag{5}$$
where denotes model parameters, and the mean (x , ) and variance Σ (x , ) are parameterized by deep neural networks. With this reverse Markov chain in hand, we can generate a data sample x0 by first sampling a noise vector x ∼ (x ), then iteratively sampling from the learnable transition kernel x−1 ∼ (x−1 | x) until = 1.
Key to the success of this sampling process is training the reverse Markov chain to match the actual time reversal of the forward Markov chain. That is, we have to adjust the parameter so that the joint distribution of the reverse Markov chain (x0, x1, · · · , x ) B (x ) Î =1 (x−1 | x) closely approximates that of the forward process (x0, x1, · · · , x ) B (x0) Î =1 (x | x−1) (Eq. (1)). This is achieved by minimizing the Kullback-Leibler (KL) divergence between these two:
$${\rm KL}(q({\bf x}_{0},{\bf x}_{1},\cdots,{\bf x}_{T})\ ||\ p_{\theta}({\bf x}_{0},{\bf x}_{1},\cdots,{\bf x}_{T}))\tag{6}$$
$$\frac{(t)}{t}=-\mathbb{E}_{q(\mathbf{x}_{0},\mathbf{x}_{1},\cdots,\mathbf{x}_{T})}\left[\log p_{\theta}(\mathbf{x}_{0},\mathbf{x}_{1},\cdots,\mathbf{x}_{T})\right]+\text{const}\tag{7}$$
$$\frac{(\hat{u})}{\hat{t}}\underbrace{\mathbb{E}_{q(\mathbf{x}_{0},\mathbf{x}_{1},\cdots,\mathbf{x}_{T})}\left[\ -\log p(\mathbf{x}_{T})-\sum_{t=1}^{T}\log\frac{p_{\theta}(\mathbf{x}_{t-1}\mid\mathbf{x}_{t})}{q(\mathbf{x}_{t}\mid\mathbf{x}_{t-1})}\ \right]}_{\text{const}}+\text{const}\tag{8}$$
| {z } B−VLB (x0 ) () ≥ E [− log (x0)] + const, (9)
where (i) is from the definition of KL divergence, (ii) is from the fact that (x0, x1, · · · , x ) and (x0, x1, · · · , x ) are both products of distributions, and (iii) is from Jensen's inequality. The first term in Eq. (8) is the variational lower bound (VLB) of the log-likelihood of the data x0, a common objective for training probabilistic generative models. We use "const" to symbolize a constant that does not depend on the model parameter and hence does not affect optimization. The objective of DDPM training is to maximize the VLB (or equivalently, minimizing the negative VLB), which is particularly easy to optimize because it is a sum of independent terms, and can thus be estimated efficiently by Monte Carlo sampling [212] and optimized effectively by stochastic optimization [286].
Ho et al. (2020) [111] propose to reweight various terms in VLB for better sample quality and noticed an important equivalence between the resulting loss function and the training objective for noise-conditional score networks (NCSNs), one type of score-based generative models, in Song and Ermon [280]. The loss in [111] takes the form of
$$\mathbb{E}_{t-\mathcal{U}}[1,T],x_{0}-q(x_{0}),e-\mathcal{N}(0,t)\left[\lambda(t)\parallel\epsilon-\epsilon_{\theta}(x_{t},t)\parallel^{2}\right]\tag{10}$$
where () is a positive weighting function, x is computed from x0 and by Eq. (4), U⟦1, ⟧ is a uniform distribution over the set {1, 2, · · · , }, and is a deep neural network with parameter that predicts the noise vector given x and . This objective reduces to Eq. (8) for a particular choice of the weighting function (), and has the same form as the loss of denoising score matching over multiple noise scales for training score-based generative models [280], another formulation of diffusion models to be discussed in the next section.
### 2.2 Score-Based Generative Models (SGMs)
At the core of score-based generative models [280, 281] is the concept of (Stein) score (a.k.a., score or score function) [126]. Given a probability density function (x), its score function is defined as the gradient of the log probability density ∇x log (x). Unlike the commonly used Fisher score ∇ log (x) in statistics, the Stein score considered here is a function of the data x rather than the model parameter . It is a vector field that points to directions along which the probability density function has the largest growth rate.
The key idea of score-based generative models (SGMs) [280] is to perturb data with a sequence of intensifying Gaussian noise and jointly estimate the score functions for all noisy data distributions by training a deep neural network model conditioned on noise levels (called a noise-conditional score network, NCSN, in [280]). Samples are generated by chaining the score functions at decreasing noise levels with score-based sampling approaches, including Langevin Monte Carlo [96, 137, 227, 280, 285], stochastic differential equations [136, 285], ordinary differential equations [141, 188, 279, 285, 371], and their various combinations [285]. Training and sampling are completely decoupled in the formulation of score-based generative models, so one can use a multitude of sampling techniques after the estimation of score functions.
With similar notations in Section 2.1, we let (x0) be the data distribution, and 0 < 1 < 2 < · · · < < · · · < be a sequence of noise levels. A typical example of SGMs involves perturbing a data point x0 to x by the Gaussian noise distribution (x | x0) = N (x ; x0, 2 ). This yields a sequence of noisy data densities (x1), (x2), · · · , (x ), where (x) B ∫ (x)(x0)dx0. A noise-conditional score network is a deep neural network s (x, ) trained to estimate the score function ∇x log(x). Learning score functions from data (a.k.a., score estimate) has established techniques such as score matching [126], denoising score matching [245, 246, 304], and sliced score matching [282], so we can directly employ one of them to train our noise-conditional score networks from perturbed data points. For example, with denoising score matching and similar notations in Eq. (10), the training objective is given by
$$\mathbb{E}_{t-\tau t[1,T],\mathbf{x}_{0}\sim q(\mathbf{x}_{0}),\mathbf{x}_{t}\sim q(\mathbf{x}_{t}|\mathbf{x}_{0})}\left[\lambda(t)\sigma_{t}^{2}\left\|\nabla\mathbf{x}_{t}\log q(\mathbf{x}_{t})-\mathbf{s}_{\theta}(\mathbf{x}_{t},t)\right\|^{2}\right]\tag{11}$$
$$\frac{(t)}{\Xi_{t-\gamma}q[1,T]\,s_{0-\gamma}q(s_{0})\,s_{t-\gamma}q(x_{t}\,|\,s_{0})}\left[\lambda(t)\sigma_{t}^{2}\left\|\nabla s_{t}\,\log q(x_{t}\,\mid\,x_{0})-s_{\theta}(x_{t},t)\right\|^{2}\right]+\text{const}\tag{12}$$
$$\frac{(\mu)}{\mu}\mathbb{E}_{t\sim t}\mathcal{U}[1,T]\mathbf{x}_{0}\sim q(\mathbf{x}_{0})\mathbf{x}_{t}\sim q(\mathbf{x}_{t}|\mathbf{x}_{0})\left[\lambda(t)\left\|-\frac{\mathbf{x}_{t}-\mathbf{x}_{0}}{\sigma_{t}}-\sigma_{t}\mathbf{s}_{0}(\mathbf{x}_{t},t)\right\|^{2}\right]+\text{const}\tag{13}$$
$$\stackrel{{(III)}}{{=}}\mathbb{E}_{t\sim t}d[1,T]\mathbf{x}_{0}\sim q(\mathbf{x}_{t}),e\sim N(0,1)\left[\lambda(t)\left\|e+\sigma_{t}\mathbf{s}_{\theta}(\mathbf{x}_{t},t)\right\|^{2}\right]+\text{const},\tag{14}$$
where (i) is derived by [304], (ii) is from the assumption that (x | x0) = N(x ; x0, 2 I), and (iii) is from the fact that x = x0 + . Again, we denote by () a positive weighting function, and "const" a constant that does not depend on the trainable parameter . Comparing Eq. (14) with Eq. (10), it is clear that the training objectives of DDPMs and SGMs are equivalent, once we set (x, ) = − s (x, ). Moreover, one can generalize the score matching with higher order. High-order derivatives of data density provide additional local information about the data distribution. Meng et al. [209] proposes a generalized denoising score matching method to efficiently estimate the high-order score function. The proposed model can improve the mixing speed of Langevin dynamics and thus the sampling efficiency of diffusion models.
For sample generation, SGMs leverage iterative approaches to produce samples from s (x, ), s (x, −1), · · · , s (x, 0) in succession. Many sampling approaches exist due to the decoupling of training and inference in SGMs, some of which are discussed in the next section. Here we introduce the first sampling method for SGMs, called annealed Langevin dynamics (ALD) [280]. Let be the number of iterations per time step and > 0 be the step size. We first initialize ALD with x ( ) ∼ N (0, I), then apply Langevin Monte Carlo for = , − 1, · · · , 1 one after the other. At each time step 0 ≤ < , we start with x (0) = x ( ) +1 , before iterating according to the following update rule for = 0, 1, · · · , − 1:
$$\begin{array}{c}{{\epsilon^{(i)}\leftarrow\mathcal{N}(\mathbf{0},\mathbf{I})}}\\ {{{\mathbf{x}}_{t}^{(i+1)}\leftarrow{\mathbf{x}}_{t}^{(i)}+\frac{1}{2}s_{t}{\mathbf{s}}_{\theta}({\mathbf{x}}_{t}^{(i)},t)+\sqrt{s_{t}}\epsilon^{(i)}.}}\end{array}$$
The theory of Langevin Monte Carlo [227] guarantees that as → 0 and → ∞, x ( ) 0 becomes a valid sample from the data distribution (x0).
#### 2.3 Stochastic Differential Equations (Score SDEs)
DDPMs and SGMs can be further generalized to the case of infinite time steps or noise levels, where the perturbation and denoising processes are solutions to stochastic differential equations (SDEs). We call this formulation Score SDE [285], as it leverages SDEs for noise perturbation and sample generation, and the denoising process requires estimating score functions of noisy data distributions.
Score SDEs perturb data to noise with a diffusion process governed by the following stochastic differential equation (SDE) [285]:
$${\rm d}{\bf x}={\bf f}({\bf x},t){\rm d}t+g(t){\rm d}{\bf w}\tag{15}$$
where f(x, ) and () are diffusion and drift functions of the SDE, and w is a standard Wiener process (a.k.a., Brownian motion). The forward processes in DDPMs and SGMs are both discretizations of this SDE. As demonstrated in Song et al. (2020) [285], for DDPMs, the corresponding SDE is:
$${\rm d}{\bf x}=-\frac{1}{2}\beta(t){\bf x}dt+\sqrt{\beta(t)}{\rm d}{\bf w}\tag{16}$$
where ( ) = as goes to infinity; and for SGMs, the corresponding SDE is given by
$${\rm d}{\bf x}=\sqrt{\frac{{\rm d}[\sigma(t)^{2}]}{{\rm d}t}}\,{\rm d}{\bf w},\tag{17}$$
where ( ) = as goes to infinity. Here we use (x) to denote the distribution of x in the forward process.
Crucially, for any diffusion process in the form of Eq. (15), Anderson [6] shows that it can be reversed by solving the following reverse-time SDE:
$$\mathrm{d}\mathbf{x}=\left[\mathbf{f}(\mathbf{x},t)-g(t)^{2}\nabla_{\mathbf{x}}\log q_{t}(\mathbf{x})\right]\mathrm{d}t+g(t)\mathrm{d}\tilde{\mathbf{w}}\tag{18}$$
where w¯ is a standard Wiener process when time flows backwards, and d denotes an infinitesimal negative time step. The solution trajectories of this reverse SDE share the same marginal densities as those of the forward SDE, except that they evolve in the opposite time direction [285]. Intuitively, solutions to the reverse-time SDE are diffusion processes that gradually convert noise to data. Moreover, Song et al. (2020) [285] prove the existence of an ordinary differential equation (ODE), namely the probability flow ODE, whose trajectories have the same marginals as the reverse-time SDE. The probability flow ODE is given by:
$$\mathrm{d}\mathbf{x}=\left[\mathbf{f}(\mathbf{x},t)-\frac{1}{2}g(t)^{2}\nabla_{\mathbf{x}}\log q_{t}(\mathbf{x})\right]\mathrm{d}t.\tag{19}$$
Both the reverse-time SDE and the probability flow ODE allow sampling from the same data distribution as their trajectories have the same marginals.
Once the score function at each time step t, ∇x log (x), is known, we unlock both the reverse-time SDE (Eq. (18)) and the probability flow ODE (Eq. (19)) and can subsequently generate samples by solving them with various numerical techniques, such as annealed Langevin dynamics [280] (cf ., Section 2.2), numerical SDE solvers [136, 285], numerical ODE solvers [141, 188, 277, 285, 371], and predictor-corrector methods (combination of MCMC and numerical ODE/SDE solvers) [285]. Like in SGMs, we parameterize a time-dependent score model s (x , ) to estimate the score function by generalizing the score matching objective in Eq. (14) to continuous time, leading to the following objective:
$$\mathbb{E}_{t\sim\mathcal{U}[0,T],\mathbf{x}_{0}\sim q(\mathbf{x}_{0}),\mathbf{x}_{t}\sim q(\mathbf{x}_{t}\mid\mathbf{x}_{0})}\left[\lambda(t)\left\|\mathbf{s}_{\theta}(\mathbf{x}_{t},t)-\nabla_{\mathbf{x}_{t}}\log q_{\theta t}(\mathbf{x}_{t}\mid\mathbf{x}_{0})\right\|^{2}\right],\tag{20}$$
where U [0, ] denotes the uniform distribution over [0, ], and the remaining notations follow Eq. (14).
Subsequent research on diffusion models focuses on improving these classical approaches (DDPMs, SGMs, and Score SDEs) from three major directions: faster and more efficient sampling, more accurate likelihood and density estimation, and handling data with special structures (such as permutation invariance, manifold structures, and discrete data). We survey each direction extensively in the next three sections (Sections 3 to 5). In Table 1, we list the three types of diffusion models with more detailed categorization, corresponding articles and years, under continuous and discrete time settings.
# 3 DIFFUSION MODELS WITH EFFICIENT SAMPLING
Generating samples from diffusion models typically demands iterative approaches that involve a large number of evaluation steps. A great deal of recent work has focused on speeding up the sampling process while also improving quality of the resulting samples. We classify these efficient sampling methods into two main categories: those that do not involve learning (learning-free sampling) and those that require an additional learning process after the diffusion model has been trained (learning-based sampling).
### 3.1 Learning-Free Sampling
Many samplers for diffusion models rely on discretizing either the reverse-time SDE present in Eq. (18) or the probability flow ODE from Eq. (19). Since the cost of sampling increases proportionally with the number of discretized time steps, many researchers have focused on developing discretization schemes that reduce the number of time steps while also minimizing discretization errors.
3.1.1 SDE Solvers. The generation process of DDPM [111, 275] can be viewed as a particular discretization of the reverse-time SDE. As discussed in Section 2.3, the forward process of DDPM discretizes the SDE in Eq. (16), whose corresponding reverse SDE takes the form of
$${\rm d}{\bf x}=-\frac{1}{2}\beta(t)({\bf x}_{t}-\nabla_{{\bf x}_{t}}\log q_{t}({\bf x}_{t})){\rm d}t+\sqrt{\beta(t)}{\rm d}{\bf w}\tag{21}$$
Song et al. (2020) [285] show that the reverse Markov chain defined by Eq. (5) amounts to a numerical SDE solver for Eq. (21).
Noise-Conditional Score Networks (NCSNs) [280] and Critically-Damped Langevin Diffusion (CLD) [66] both solve the reverse-time SDE with inspirations from Langevin dynamics. In particular, NCSNs leverage annealed Langevin dynamics (ALD, cf ., Section 2.2) to iteratively generate data while smoothly reducing noise level until the generated Manuscript submitted to ACM
| Primary | Secondary | Tertiary | Article | Year | Setting |
| --- | --- | --- | --- | --- | --- |
| | | | Song et al. [285] | 2020 | Continuous |
| | | | Dockhorn et al. [66] | 2021 | Continuous Continuous |
| | | | Jolicoeur et al. [137] | 2021 | |
| | | SDE Solvers | Jolicoeur et al. [136] | 2021 | Continuous |
| | | | Chuang et al. [48] | 2022 | Continuous |
| | Learning-Free Sampling | | Song et al. [280] Karras et al. [141] | 2019 2022 | Continuous Continuous |
| | | | Liu et al. [181] | 2021 | Continuous |
| Efficient Sampling | | | Song et al. [277] Zhang et al. [372] | 2020 | Continuous |
| | | ODE Solvers | | 2022 | Continuous |
| | | | Karras et al. [141] | 2022 | Continuous |
| | | | Lu et al. [188] | 2022 | Continuous |
| | | | Zhang et al. [371] | 2022 | Continuous |
| | | Optimized Discretization | Watson et al. [313] Watson et al. [312] | 2021 2021 | Discrete Discrete |
| | | | Dockhorn et al. [67] | 2021 | Continuous |
| | Learning-Based Sampling | Knowledge Distillation | Salimans et al. [260] | 2021 | Discrete |
| | | | Luhman et al. [190] | 2021 | Discrete |
| | | | Meng et al. [205] | 2022 | Discrete |
| | | Truncated Diffusion | Lyu et al. [199] | 2022 | Discrete |
| | | | Zheng et al. [381] | 2022 | Discrete |
| | | | Nichol et al. [214] | 2021 | Discrete |
| | Noise Schedule Optimization | Noise Schedule Optimization | Kingma et al. [154] | 2021 | Discrete |
| | | | Huang et al. [124] | 2024 | Discrete |
| | | | Yang et al. [351] | 2024 | Discrete |
| Improved Likelihood | Reverse Variance Learning | Reverse Variance Learning | Bao et al.[13] | 2021 | Discrete |
| | | | Nichol et al. [214] | 2021 | Discrete |
| | | | Song et al. [279] | 2021 | Continuous |
| | Exact Likelihood Computation | Exact Likelihood Computation | Huang et al. [119] | 2021 | Continuous |
| | | | Song et al. [285] | 2020 | Continuous |
| | | | Lu et al. [187] | 2022 | Continuous |
| | Manifold Structures | Learned Manifolds | Vahdat et al. [299] | 2021 | Continuous Discrete |
| | | | Yang et al. [346] | 2024 | |
| | | | Ramesh et al. [243] | 2022 | Discrete |
| | | | Rombach et al. [255] | 2022 | Discrete |
| | | Known Manifolds | Bortoli et al. [56] | 2022 | Continuous |
| | | | Huang et al. [118] | 2022 | Continuous |
| | | | Niu et al. [219] | 2020 | Discrete |
| Data with Special Structures | | | Jo et al. [134] | 2022 | Continuous |
| | Data with Invariant Structures | Data with Invariant Structures | Shi et al. [267] | 2022 | Continuous |
| | | | Xu et al. [333] | 2021 | Discrete |
| | | | Meng et al. [204] liu et al. [184] | 2022 2023 | Discrete Continuous |
| | Discrete Data | Discrete Data | Sohl et al. [275] | 2015 | Discrete |
| | | | Austin et al. [9] | 2021 | Discrete |
| | | | Xie et al. [326] Gu et al. [98] | 2022 2022 | Discrete Discrete |
| | | | Campbell et al. [30] | 2022 | Continuous |
Table 1. Three types of diffusion models are listed with corresponding articles and years, under continuous and discrete settings.
data distribution converges to the original data distribution. Although the sampling trajectories of ALD are not exact solutions to the reverse-time SDE, they have the correct marginals and hence produce correct samples under the assumption that Langevin dynamics converges to its equilibrium at every noise level. The method of ALD is further improved by Consistent Annealed Sampling (CAS) [137], a score-based MCMC approach with better scaling of time steps and added noise. Inspired by statistical mechanics, CLD proposes an augmented SDE with an auxiliary velocity term resembling underdamped Langevin diffusion. To obtain the time reversal of the extended SDE, CLD only needs to
learn the score function of the conditional distribution of velocity given data, arguably easier than learning scores of data directly. The added velocity term is reported to improve sampling speed as well as quality.
The reverse diffusion method proposed in [285] discretizes the reverse-time SDE in the same way as the forward one. For any one-step discretization of the forward SDE, one may write the general form below:
$${\bf x}_{i+1}={\bf x}_{i}+{\bf f}_{i}({\bf x}_{i})+{\bf g}_{i}{\bf z}_{i},\quad i=0,1,\cdots,N-1\tag{22}$$
where z ∼ N (0, I), f and g are determined by drift/diffusion coefficients of the SDE and the discretization scheme. Reverse diffusion proposes to discretize the reverse-time SDE similarly to the forward SDE, i.e.,
$${\bf x}_{i}={\bf x}_{i+1}-{\bf f}_{i+1}({\bf x}_{i+1})+{\bf g}_{i+1}{\bf g}_{i+1}^{I}{\bf s}_{0^{-}}({\bf x}_{i+1},t_{i+1})+{\bf g}_{i+1}{\bf z}_{i}\quad i=0,1,\cdots,N-1\tag{23}$$
where s ∗ (x , ) is the trained noise-conditional score model. Song et al. (2020) [285] prove that the reverse diffusion method is a numerical SDE solver for the reverse-time SDE in Eq. (18). This process can be applied to any types of forward SDEs, and empirical results indicate this sampler performs slightly better than DDPM [285] for a particular type of SDEs called the VP-SDE.
Jolicoeur-Martineau et al. (2021) [136] develop an SDE solver with adaptive step sizes for faster generation. The step size is controlled by comparing the output of a high-order SDE solver versus the output of an low-order SDE solver. At each time step, the high- and low-order solvers generate new sample x ′ high and x ′ low from the previous sample x ′ respectively. The step size is then adjusted by comparing the difference between the two samples. If x ′ high and x ′ low are similar, the algorithm will return x ′ high and then increase the step size. The similarity between x ′ high and x ′ low is measured by:
$$E_{q}=\left\|\frac{\mathbf{x}_{\text{low}}^{\prime}-\mathbf{x}_{\text{high}}^{\prime}}{\delta(\mathbf{x}^{\prime},\,\mathbf{x}_{\text{prev}}^{\prime})}\right\|^{2}\tag{24}$$
where (x ′ low, x ′ prev) B max( , max(| x ′ low, | x ′ prev|)), and and are absolute and relative tolerances.
The predictor-corrector method proposed in [285] solves the reverse SDE by combining numerical SDE solvers ("predictor") and iterative Markov chain Monte Carlo (MCMC) approaches ("corrector"). At each time step, the predictorcorrector method first employs a numerical SDE solver to produce a coarse sample, followed by a "corrector" that corrects the sample' marginal distribution with score-based MCMC. The resulting samples have the same time-marginals as solution trajectories of the reverse-time SDE, i.e., they are equivalent in distribution at all time steps. Empirical results demonstrate that adding a corrector based on Langevin Monte Carlo is more efficient than using an additional predictor without correctors [285]. Karras et al. (2022) [141] further improve the Langevin dynamics corrector in [285] by proposing a Langevin-like "churn" step of adding and removing noise, achieving new state-of-the-art sample quality on datasets like CIFAR-10 [161] and ImageNet-64 [58].
3.1.2 ODE solvers. A large body of works on faster diffusion samplers are based on solving the probability flow ODE (Eq. (19)) introduced in Section 2.3. In contrast to SDE solvers, the trajectories of ODE solvers are deterministic and thus not affected by stochastic fluctuations. These deterministic ODE solvers typically converge much faster than their stochastic counterparts at the cost of slightly inferior sample quality.
Denoising Diffusion Implicit Models (DDIM) [277] is one of the earliest work on accelerating diffusion model sampling. The original motivation was to extend the original DDPM to non-Markovian case with the following Markov
$$q({\bf x}_{1},\ldots,{\bf x}_{T}\mid{\bf x}_{0})=\prod_{t=1}^{T}q({\bf x}_{t}\mid{\bf x}_{t-1},{\bf x}_{0})\tag{25}$$
$$q_{\sigma}({\bf x}_{t-1}\mid{\bf x}_{t},{\bf x}_{0})={\cal N}({\bf x}_{t-1}|\hat{\mu}_{t}({\bf x}_{t},{\bf x}_{0}),\sigma_{t}^{2}{\bf I})\tag{26}$$
$$\tilde{\mu}_{t}({\bf x}_{t},{\bf x}_{0})\coloneqq\sqrt{\overline{\alpha}_{t-1}}{\bf x}_{0}+\sqrt{1-\overline{\alpha}_{t-1}-\sigma_{t}^{2}}\cdot\frac{{\bf x}_{t}-\sqrt{\overline{\alpha}_{t}}{\bf x}_{0}}{\sqrt{1-\overline{\alpha}_{t}}}\tag{27}$$
This formulation encapsulates DDPM and DDIM as special cases, where DDPM corresponds to setting 2 = ˆ−1 ˆ and DDIM corresponds to setting 2 = 0. DDIM learns a Markov chain to reverse this non-Markov perturbation process, which is fully deterministic when 2 = 0. It is observed in [141, 188, 260, 277] that the DDIM sampling process amounts to a special discretization scheme of the probability flow ODE. Inspired by an analysis of DDIM on a singleton dataset, generalized Denoising Diffusion Implicit Models (gDDIM) [372] proposes a modified parameterization of the score network that enables deterministic sampling for more general diffusion processes, such as the one in Critically-Damped Langevin Diffusion (CLD) [66]. PNDM [181] proposes a pseudo numerical method to generate sample along a specific manifold in R . It uses numerical solver with nonlinear transfer part to solve differential equation on manifolds and then generates sample, which encapsulates DDIM as a special case.
Through extensive experimental investigations, Karras et al. (2022) [141] show that Heun's 2 order method [8] provides an excellent trade off between sample quality and sampling speed. The higher-order solver leads to smaller discretization error at the cost of one additional evaluation of the learned score function per time step. Heun's method generates samples of comparable, if not better quality than Euler's method with fewer sampling steps.
Diffusion Exponential Integrator Sampler [371] and DPM-solver [188] leverage the semi-linear structure of probability flow ODE to develop customized ODE solvers that are more efficient than general-purpose Runge-Kutta methods. Specifically, the linear part of probability flow ODE can be analytically computed, while the non-linear part can be solved with techniques similar to exponential integrators in the field of ODE solvers. These methods contain DDIM as a first-order approximation. However, they also allow for higher order integrators, which can produce high-quality samples in just 10 to 20 iterations—far fewer than the hundreds of iterations typically required by diffusion models without accelerated sampling.
# 3.2 Learning-Based Sampling
Learning-based sampling is another efficient approach for diffusion models. By using partial steps or training a sampler for the reverse process, this method achieves faster sampling speeds at the expense of slight degradation in sample quality. Unlike learning-free approaches that use handcrafted steps, learning-based sampling typically involves selecting steps by optimizing certain learning objectives.
3.2.1 Optimized Discretization. Given a pre-trained diffusion model, Watson et al. (2021) [313] put forth a strategy for finding the optimal discretization scheme by selecting the best time steps to maximize the training objective for DDPMs. Key to this approach is the observation that the DDPM objective can be broken down into a sum of individual terms, making it well suited for dynamic programming. However, it is well known that the variational lower bound used for DDPM training does not correlate directly with sample quality [294]. A subsequent work, called Differentiable Diffusion Sampler Search [312], addresses this issue by directly optimizing a common metric for sample quality called the Kernel Inception Distance (KID) [22]. This optimization is feasible with the help of reparameterization [156, 252] Manuscript submitted to ACM
and gradient rematerialization. Based on truncated Taylor methods, Dockhorn et al. (2022) [67] derive a second-order solver for accelerating synthesis by training a additional head on top of the first-order score network.
3.2.2 Truncated Diffusion. One can improve sampling speed by truncating the forward and reverse diffusion processes [199, 381]. The key idea is to halt the forward diffusion process early on, after just a few steps, and to begin the reverse denoising process with a non-Gaussian distribution. Samples from this distribution can be obtained efficiently by diffusing samples from pre-trained generative models, such as variational autoencoders [156, 252] or generative adversarial networks [88].
3.2.3 Knowledge Distillation. Approaches that use knowledge distillation [190, 205, 260] can significantly improve the sampling speed of diffusion models. Specifically, in Progressive Distillation [260], the authors propose distilling the full sampling process into a faster sampler that requires only half as many steps. By parameterizing the new sampler as a deep neural network, authors are able to train the sampler to match the input and output of the DDIM sampling process. Repeating this procedure can further reduce sampling steps, although fewer steps can result in reduced sample quality. To address this issue, the authors suggest new parameterizations for diffusion models and new weighting schemes for the objective function.
# 4 DIFFUSION MODELS WITH IMPROVED LIKELIHOOD
As discussed in Section 2.1, the training objective for diffusion models is a (negative) variational lower bound (VLB) on the log-likelihood. This bound, however, may not be tight in many cases [154], leading to potentially suboptimal log-likelihoods from diffusion models. In this section, we survey recent works on likelihood maximization for diffusion models. We focus on three types of methods: noise schedule optimization, reverse variance learning, and exact loglikelihood evaluation.
### 4.1 Noise Schedule Optimization
In the classical formulation of diffusion models, noise schedules in the forward process are handcrafted without trainable parameters. By optimizing the forward noise schedule jointly with other parameters of diffusion models, one can further maximize the VLB in order to achieve higher log-likelihood values [154, 214].
The work of iDDPM [214] demonstrates that a certain cosine noise schedule can improve log-likelihoods. Specifically, the cosine noise schedule in their work takes the form of
$$\tilde{\alpha}_{t}=\frac{h(t)}{h(0)},\quad h(t)=\cos\left(\frac{t/T+m}{1+m}\cdot\frac{\pi}{2}\right)^{2}\tag{28}$$
where ¯ and are defined in Eqs. (2) and (3), and is a hyperparameter to control the noise scale at = 0. They also propose a parameterization of the reverse variance with an interpolation between and 1 − ¯ in the log domain.
In Variational Diffusion Models (VDMs) [154], authors propose to improve the likelihood of continuous-time diffusion models by jointly training the noise schedule and other diffusion model parameters to maximize the VLB. They parameterize the noise schedule using a monotonic neural network (), and build the forward perturbation process according to 2 = sigmoid( ()), (x | x0) = N (¯ x0, 2 I), and ¯ = √︃ (1 − 2 ). Moreover, authors prove that the VLB for data point x can be simplified to a form that only depends on the signal-to-noise ratio R() B ¯ 2 2 . In particular, the can be decomposed to
$$L_{VLB}=-\mathbb{E}_{\mathbf{x}_{0}}\;\mathrm{KL}(q(\mathbf{x}_{T}|\mathbf{x}_{0})\;||\;p(\mathbf{x}_{T}))+\mathbb{E}_{\mathbf{x}_{0},\mathbf{x}_{1}}\log p(\mathbf{x}_{0}|\mathbf{x}_{1})-L_{D},\tag{29}$$
where the first and second terms can be optimized directly in analogy to training variational autoencoders. The third term can be further simplified to the following:
$$L_{D}=\frac{1}{2}\mathbb{E}_{\mathbf{x}_{0},\epsilon\sim\mathcal{N}(0,\mathbf{I})}\int_{\mathbb{R}_{\min}}^{\mathbb{R}_{\max}}\|\mathbf{x}_{0}-\tilde{\mathbf{x}}_{\theta}(\mathbf{x}_{0},v)\|_{2}^{2}\,d\omega,\tag{30}$$
where Rmax = (1), Rmin = ( ), x = ¯x0 + denotes a noisy data point obtained by diffusing x0 with the forward perturbation process until = −1 (), and x˜ denotes the predicted noise-free data point by the diffusion model. As a result, noise schedules do not affect the VLB as long as they share the same values at Rmin and Rmax, and will only affect the variance of Monte Carlo estimators for VLB.
Another line of works [123, 351] propose to the modify diffusion trajectory through the integration of cross-modality information. Specifically, the cross-modal information, denoted as (, 0), is extracted from any conditional input and original sample 0 with relational network (·). And then it can be injected to the forward process as an additional bias to adapt diffusion trajectory:
$$q_{t}(x_{t}|x_{0},y)={\cal N}(x_{t},\sqrt{\tilde{\alpha}_{t}}x_{0}+k_{t}r_{\phi}(x_{0},y),(1-\tilde{\alpha}_{t})I)\tag{31}$$
where is a non-negative scalar that control the magnitude of the bias term. It is important to note that with this modification, the forward process ceases to be a Markovian chain. ContextDiff [351] introduces a general framework to jointly learn the cross-modal relational network and the diffusion model, and derives the VLB and sampling procedure for this modified diffusion process.
### 4.2 Reverse Variance Learning
The classical formulation of diffusion models assumes that Gaussian transition kernels in the reverse Markov chain have fixed variance parameters. Recall that we formulated the reverse kernel as (x−1 | x) = N ( (x , ), Σ (x , )) in Eq. (5) but often fixed the reverse variance Σ (x , ) to I. Many methods propose to train the reverse variances as well to further maximize VLB and log-likelihood values.
In iDDPM [214], Nichol and Dhariwal propose to learn the reverse variances by parameterizing them with a form of linear interpolation and training them using a hybrid objective. This results in higher log-likelihoods and faster sampling without losing sample quality. In particular, they parameterize the reverse variance in Eq. (5) as:
$$\Sigma_{\theta}({\bf x}_{t},t)=\exp(\theta\cdot\log\beta_{t}+(1-\theta)\cdot\log\tilde{\beta}_{t}),\tag{32}$$
where ˜ B 1−¯−1 1−¯ · and is jointly trained to maximize VLB. This simple parameterization avoids the instability of estimating more complicated forms of Σ (x , ) and is reported to improve likelihood values.
Analytic-DPM [13] shows a remarkable result that the optimal reverse variance can be obtained from a pre-trained score function, with the analytic form below:
$$\Sigma_{\theta}({\bf x}_{t},t)=\sigma_{t}^{2}+\left(\sqrt{\frac{\overline{\beta}_{t}}{\alpha_{t}}}-\sqrt{\overline{\beta}_{t-1}-\sigma_{t}^{2}}\right)^{2}\cdot\left(1-\overline{\beta}_{t}\overline{\Sigma}_{\theta|t}({\bf x}_{t})\,\frac{||\nabla_{{\bf x}_{t}}\log q_{t}({\bf x}_{t})||^{2}}{d}\right)\tag{33}$$
_is in the second phase transition limit._ **State above and above, respectively, is the critical
As a result, given a pre-traied score model, we can estimate its first- and second-order moments to obtain the optimal reverse variances. Plugging them into the VLB can lead to tighter VLBs and higher likelihood values.
### 4.3 Exact Likelihood Computation
In the Score SDE [285] formulation, samples are generated by solving the following reverse SDE, where ∇x log (x , ) in Eq. (18) is replaced by the learned noise-conditional score model s (x , ):
$${\rm d}{\bf x}=f({\bf x}_{t},t)-g(t)^{2}{\bf s}_{\theta}({\bf x}_{t},t){\rm d}t+g(t){\rm d}{\bf w}.\tag{34}$$
Here we use sde to denote the distribution of samples generated by solving the above SDE. One can also generate data by plugging the score model into the probability flow ODE in Eq. (19), which gives:
$$\frac{\mathrm{d}\mathbf{x}_{t}}{\mathrm{d}t}=\underbrace{f(\mathbf{x}_{t},t)-\frac{1}{2}g^{2}(t)\mathbf{s}_{\theta}(\mathbf{x}_{t},t)}_{:=\hat{f}_{\theta}(\mathbf{x}_{t},t)}\tag{35}$$
Similarly, we use ode to denote the distribution of samples generated via solving this ODE. The theory of neural ODEs [40] and continuous normalizing flows [92] indicates that ode can be computed accurately albeit with high computational cost. For sde , several concurrent works [119, 187, 279] demonstrate that there exists an efficiently computable variational lower bound, and we can directly train our diffusion models to maximize sde using modified diffusion losses.
Specifically, Song et al. (2021) [279] prove that with a special weighting function (likelihood weighting), the objective used for training score SDEs implicitly maximizes the expected value of sde on data. It is shown that
$${\rm D}_{KL}(q_{0}\parallel p_{\theta}^{\rm side})\leq{\cal L}(\theta;g(\cdot)^{2})+{\rm D}_{KL}(q_{T}\parallel\pi),\tag{36}$$
where L (;(·)2 ) is the Score SDE objective in Eq. (20) with () = () 2 . Since D (0 ∥ sde ) = −E0 log( sde )+const, and D ( ∥ ) is a constant, training with L (;(·)2 ) amounts to minimizing −E0 log( sde ), the expected negative log-likelihood on data. Moreover, Song et al. (2021) and Huang et al. (2021) [119, 279] provide the following bound for sde (x):
$$-\log p_{\theta}^{\rm side}({\bf x})\leq{\cal L}^{{}^{\prime}}({\bf x}),\tag{37}$$
where L ′ (x) is defined by
$$\mathcal{L}^{\prime}(\mathbf{x})=\int_{0}^{T}\mathbb{E}\left[\frac{1}{2}\|g(t)\mathbf{s}_{\theta}(\mathbf{x}_{t},t)\|^{2}+\nabla\cdot(g(t)^{2}\mathbf{s}_{\theta}(\mathbf{x}_{t},t)-f(\mathbf{x}_{t}),t)\right]\mathbf{x}_{\theta}=\mathbf{x}\right]dt-\mathbb{E}_{\mathbf{x}_{T}}\left[\log p_{\theta}^{\mathrm{de}}(\mathbf{x}_{T})\,|\,\mathbf{x}_{\theta}=\mathbf{x}\right]\tag{38}$$
The first part of Eq. (38) is reminiscent of implicit score matching [126] and the whole bound can be efficiently estimated with Monte Carlo methods.
Since the probability flow ODE is a special case of neural ODEs or continuous normalizing flows, we can use well-established approaches in those fields to compute log ode accurately. Specifically, we have
$$\log\rho_{\theta}^{\rm ode}({\bf x_{0}})=\log p_{T}({\bf x_{T}})+\int_{t=0}^{T}\nabla\cdot\tilde{f}_{\theta}({\bf x_{t}},t){\rm d}t.\tag{39}$$
One can compute the one-dimensional integral above with numerical ODE solvers and the Skilling-Hutchinson trace estimator [125, 274]. Unfortunately, this formula cannot be directly optimized to maximize ode on data, as it requires calling expensive ODE solvers for each data point x0. To reduce the cost of directly maximizing ode with the above formula, Song et al. (2021) [279] propose to maximize the variational lower bound of sde as a proxy for maximizing ode , giving rise to a family of diffusion models called ScoreFlows.
# 5 DIFFUSION MODELS FOR DATA WITH SPECIAL STRUCTURES
While diffusion models have achieved great success for data domains like images and audio, they do not necessarily translate seamlessly to other modalities. Many important data domains have special structures that must be taken into account for diffusion models to function effectively. Difficulties may arise, for example, when models rely on score functions that are only defined on continuous data domains, or when data reside on low dimensional manifolds. To cope with these challenges, diffusion models have to be adapted in various ways.
# 5.1 Discrete Data
Most diffusion models are geared towards continuous data domains, because Gaussian noise perturbation as used in DDPMs is not a natural fit for discrete data, and the score functions required by SGMs and Score SDEs are only defined on continuous data domains. To overcome this difficulty, several works [9, 98, 117, 326] build on Sohl-Dickstein et al. (2015) [275] to generate discrete data of high dimensions. Specifically, VQ-Diffusion [98] replaces Gaussian noise with a random walk on the discrete data space, or a random masking operation. The resulting transition kernel for the forward process takes the form of
$$q({\bf x}_{t}\mid{\bf x}_{t-1})={\bf v}^{\top}({\bf x}_{t}){\bf Q}_{t}{\bf v}({\bf x}_{t-1})\tag{40}$$
where v(x) is a one-hot column vector, and Q is the transition kernel of a lazy random walk. D3PM [9] accommodates discrete data in diffusion models by constructing the forward noising process with absorbing state kernels or discretized Gaussian kernels. Campbell et al. (2022) [30] present the first continuous-time framework for discrete diffusion models. Leveraging Continuous Time Markov Chains, they are able to derive efficient samplers that outperform discrete counterparts, while providing a theoretical analysis on the error between the sample distribution and the true data distribution.
Concrete Score Matching (CSM) [204] proposes a generalization of the score function for discrete random variables. Concrete score is defined by the rate of change of the probabilities with respect to directional changes of the input, which can be seen as a finite-difference approximation to the continuous (Stein) score. The concrete score can be efficiently trained and applied to MCMC.
Based on the theory of stochastic calculus, Liu et al. (2023) [184] proposes a framework for diffusion models to generate data on constrained and structured domains, including discrete data as a special case. Using a fundamental theorem in stochastic calculus, the Doob's h-transform, one can constrain the data distribution on a specific area by including a special force term in the reverse diffusion process. They use a parameterization of the force term with an EM-based optimization algorithm. Furthermore, the loss function can be transformed to 2 loss using Girsanov theorem.
### 5.2 Data with Invariant Structures
Data in many important domains have invariant structures. For example, graphs are permutation invariant, and point clouds are both translation and rotation invariant. In diffusion models, these invariances are often ignored, which can lead to suboptimal performance. To address this issue, several works [56, 219] propose to endow diffusion models with the ability to account for invariance in data.
Niu et al. (2020) [219] first tackle the problem of permutation invariant graph generation with diffusion models. They achieve this by using a permutation equivariant graph neural network [89, 265, 322], called EDP-GNN, to parameterize the noise-conditional score model. GDSS [134] further develops this idea by proposing a continuous-time graph diffusion process. This process models both the joint distribution of nodes and edges through a system of stochastic differential equations (SDEs), where message-passing operations are used to guarantee permutation invariance.
Similarly, Shi et al. (2021) [267] and Xu et al. (2022) [333] enable diffusion models to generate molecular conformations that are invariant to both translation and rotation. For example, Xu et al. (2022) [333] shows that Markov chains starting with an invariant prior and evolving with equivariant Markov kernels can induce an invariant marginal distribution, which can be used to enforce appropriate data invariance in molecular conformation generation. Formally, let T be a rotation or translation operation. Given that (x ) = (T (x )), (x−1 | x) = (T (x−1) | T (x)), Xu et al. (2022) [333] prove that the distribution of samples is guaranteed to be invariant to T, that is, 0 (x) = 0 (T (x)). As a result, one can build a diffusion model that generates rotation and translation invariant molecular conformations as long as the prior and transition kernels enjoy the same invariance.
#### 5.3 Data with Manifold Structures
Data with manifold structures are ubiquitous in machine learning. As the manifold hypothesis [76] posits, natural data often reside on manifolds with lower intrinsic dimensionality. In addition, many data domains have well-known manifold structures. For instance, climate and earth data naturally lie on the sphere because that is the shape of our planet. Many works have focused on developing diffusion models for data on manifolds. We categorize them based on whether the manifolds are known or learned, and introduce some representative works below.
5.3.1 Known Manifolds. Recent studies have extended the Score SDE formulation to various known manifolds. This adaptation parallels the generalization of neural ODEs [40] and continuous normalizing flows [92] to Riemannian manifolds [186, 201]. To train these models, researchers have also adapted score matching and score functions to Riemannian manifolds.
The Riemannian Score-Based Generative Model (RSGM) [56] accommodates a wide range of manifolds, including spheres and toruses, provided they satisfy mild conditions. The RSGM demonstrates that it is possible to extend diffusion models to compact Riemannian manifolds. The model also provides a formula for reversing diffusion on a manifold. Taking an intrinsic view, the RSGM approximates the sampling process on Riemannian manifolds using a Geodesic Random Walk. It is trained with a generalized denoising score matching objective.
In contrast, the Riemannian Diffusion Model (RDM) [118] employs a variational framework to generalize the continuous-time diffusion model to Riemannian manifolds. The RDM uses a variational lower bound (VLB) of the log-likelihood as its loss function. The authors of the RDM model have shown that maximizing this VLB is equivalent to minimizing a Riemannian score-matching loss. Unlike the RSGM, the RDM takes an extrinsic view, assuming that the relevant Riemannian manifold is embedded in a higher dimensional Euclidean space.
5.3.2 Learned Manifolds. According to the manifold hypothesis [76], most natural data lies on manifolds with significantly reduced intrinsic dimensionality. Consequently, identifying these manifolds and training diffusion models directly on them can be advantageous due to the lower data dimensionality. Many recent works have built on this idea, starting by using an autoencoder to condense the data into a lower dimensional manifold, followed by training Manuscript submitted to ACM
diffusion models in this latent space. In these cases, the manifold is implicitly defined by the autoencoder and learned through the reconstruction loss. In order to be successful, it is crucial to design a loss function that allows for the joint training of the autoencoder and the diffusion models.
The Latent Score-Based Generative Model (LSGM) [299] seeks to address the problem of joint training by pairing a Score SDE diffusion model with a variational autoencoder (VAE) [156, 252]. In this configuration, the diffusion model is responsible for learning the prior distribution. The authors of the LSGM propose a joint training objective that merges the VAE's evidence lower bound with the diffusion model's score matching objective. This results in a new lower bound for the data log-likelihood. By situating the diffusion model within the latent space, the LSGM achieves faster sample generation than conventional diffusion models. Additionally, the LSGM can manage discrete data by converting it into continuous latent codes.
Rather than jointly training the autoencoder and diffusion model, the Latent Diffusion Model (LDM) [255] addresses each component separately. First, an autoencoder is trained to produce a low-dimensional latent space. Then, the diffusion model is trained to generate latent codes. DALLE-2 [243] employs a similar strategy by training a diffusion model on the CLIP image embedding space, followed by training a separate decoder to create images based on the CLIP image embeddings.
Structure-guided Adversarial training of Diffusion Models (SADMs) [346], for the first time, propose to utilize the structural information within the sample batch. Specifically, SADMs incorporate an adversarially-trained structural discriminator to enforce the preservation of manifold structure among samples within each training batch. This approach leverages the intrinsic data manifold to facilitate the generation of realistic samples, thereby significantly advancing the capabilities of previous diffusion models in tasks such as image synthesis and cross-domain fine-tuning.
### 6 CONNECTIONS WITH OTHER GENERATIVE MODELS
In this section, we first introduce five other important classes of generative models and analyze their advantages and limitations. Then we introduce how diffusion models are connected with them, and illustrate how these generative models are promoted by incorporating diffusion models. The algorithms that integrate diffusion models with other generative models are summarized in Table 2, and we also provide a schematic illustration in Fig. 3.
### 6.1 Large Language Models and Connections with Diffusion Models
Large Language Models (LLMs) [1, 7, 27, 129, 348] have profoundly impacted the AI community, and showcased the advanced language comprehension and reasoning abilities. Recent works begin to extend their impressive reasoning abilities to visual generative tasks for overall generation planning. The collaboration between LLMs [35, 221, 348] and diffusion models [20, 243, 345, 351] can significantly improve the text-image alignment as well as the quality of generated images [177, 295, 375]. For instance, RealCompo [375] utilizes LLMs to enhance the compositional generation of diffusion models by generating images grounded on bounding box layouts from the LLM. EditWorld [349] composes a set of LLMs and pretrained diffusion models to generate an image editing dataset that contains numerous instructions with world knowledge [101]. VideoTetris [295] uses the LLM to decompose text prompts along temporal axis for guiding video generation with smoother and more reasonable transitions. SemanticSDS [350] and Trans4D [366] extend the planning ability of LLMs to facilitate more complex 3D and 4D diffusion generation. Notably, RPG [347] leverages the vision-language prior of multimodal LLMs to reason out complementary spatial layouts from text prompt, and manipulates the object compositions for diffusion models in both text-guided image generation and editing process, achieving SOTA performance in compositional synthesis scenarios and providing guidance for subsequent research.
| Table 2. Diffusion models are incorporated into different generative models. |
| --- |
| Model | Article | Year |
| --- | --- | --- |
| Large Language Model | Zhang et al. [375] | 2024 |
| | Yang et al. [349] | 2024 |
| | Yang et al. [347] | 2024 |
| | Tian et al. [295] | 2024 |
| | Yang et al. [350] | 2024 |
| | Zeng et al. [366] | 2024 |
| Variational Auto-Encoder | Luo et al. [191] | 2022 |
| | Hunag et al. [119] | 2021 |
| | Vadhat et al. [299] | 2021 |
| Generative Adversarial Network | Wang et al. [311] | 2022 |
| | Yang et al. [346] | 2021 |
| Normalizing Flow | Zhang et al.[370] | 2021 |
| | Gong et al. [87] | 2021 |
| | kim et al. [150] | 2022 |
| | Wang et al. [307] | 2024 |
| | Yang et al. [353] | 2024 |
| Autoregressive Model | Meng et al.[210] | 2020 |
| | Meng et al.[208] | 2021 |
| | Hoogeboom et al.[116] | 2021 |
| | Rasul et al. [247] | 2021 |
| Energy-based Model | Gao et al. [83] | 2021 |
| | Yu et al. [361] | 2022 |
#### 6.2 Variational Autoencoders and Connections with Diffusion Models
Variational Autoencoders [68, 157, 252] aim to learn both an encoder and a decoder to map input data to values in a continuous latent space. In these models, the embedding can be interpreted as a latent variable in a probabilistic generative model, and a probabilistic decoder can be formulated by a parameterized likelihood function. In addition, the data x is assumed to be generated by some unobserved latent variable z using conditional distribution (x | z), and (z | x) is used to approximately inference z. To guarantee an effective inference, a variational Bayes approach is used to maximize the evidence lower bound:
$${\cal L}(\phi,\theta;{\bf x})=\mathbb{E}_{q({\bf z}|{\bf x})}\left[\log p_{\theta}({\bf x},{\bf z})-\log q_{\phi}({\bf z}\mid{\bf x})\right]\tag{41}$$
with L (, ; x) ≤ log (x). Provided that the parameterized likelihood function (x | z) and the parameterized posterior approximation (z | x) can be computed in a point-wise way and are differentiable with their parameters, the ELBO can be maximized with gradient descent. This formulation allows flexible choices of encoder and decoder models. Typically, these models are represented by exponential family distributions whose parameters are generated by multi-layer neural networks.
The DDPM can be conceptualized as a hierarchical Markovian VAE with a fixed encoder. Specifically, DDPM's forward process functions as the encoder, and this process is structured as a linear Gaussian model (as described by Eq. (2)). The DDPM's reverse process, on the other hand, corresponds to the decoder, which is shared across multiple decoding steps. The latent variables within the decoder are all the same size as the sample data. Manuscript submitted to ACM

Fig. 3. Illustrations of works incorporating diffusion models with other generative models, such as : LLM [347] where a diffusion model is guided by the LLM planning, VAE [255] where a diffusion model is applied on a latent space, GAN [311] where noise is injected to the discriminator input, normalizing flow [370] where noise is injected in both forward and backward processes in the flow, autoregressive model [116] where the training objective is similar to diffusion models, and EBM [83] where a sequence of EBMs is learned by diffusion recovery likelihood.
In a continuous-time setting, Song et al. (2021) [285], Huang et al. (2021) [119], and Kingma et al. (2021) [154] demonstrate that the score matching objective may be approximated by the Evidence Lower Bound (ELBO) of a deep hierarchical VAE. Consequently, optimizing a diffusion model can be seen as training an infinitely deep hierarchical VAE—a finding that supports the common belief that Score SDE diffusion models can be interpreted as the continuous limit of hierarchical VAEs.
The Latent Score-Based Generative Model (LSGM) [299] furthers this line of research by illustrating that the ELBO can be considered a specialized score matching objective in the context of latent space diffusion. Though the crossentropy term in the ELBO is intractable, it can be transformed into a tractable score matching objective by viewing the score-based generative model as an infinitely deep VAE.
#### 6.3 Generative Adversarial Networks and Connections with Diffusion Models
Generative Adversarial Networks (GANs) [51, 88, 100] mainly consist of two models: a generator and a discriminator . These two models are typically constructed by neural networks but could be implemented in any form of a differentiable system that maps input data from one space to another. The optimization of GANs can be viewed as a mini-max optimization problem with value function (, ):
$$\min\max_{G}\mathbb{E}_{\mathbf{x}\sim p_{data}(\mathbf{x})}\left[\log D(\mathbf{x})\right]+\mathbb{E}_{\mathbf{z}\sim p_{\mathbf{z}}(\mathbf{z})}\left[\log(1-D(G(\mathbf{z})))\right].\tag{42}$$
The generator aims to generate new examples and implicitly model the data distribution. The discriminator is usually a binary classifier that is used to identify generated examples from true examples with maximally possible accuracy. The optimization process ends at a saddle point that produces a minimum about the generator and a maximum about the discriminator. Namely, the goal of GAN optimization is to achieve Nash equilibrium [250]. At that point, the generator can be considered that it has captured the accurate distribution of real examples.
One of the issues of GAN is the instability in the training process, which is mainly caused by the non-overlapping between the distribution of input data and that of the generated data. One solution is to inject noise into the discriminator input for widening the support of both the generator and discriminator distributions. Taking advantage of the flexible diffusion model, Wang et al. (2022) [311] inject noise to the discriminator with an adaptive noise schedule determined by a diffusion model. On the other hand, GAN can facilitate sampling speed of diffusion models. Xiao et al. (2021) [324] show that slow sampling is caused by the Gaussian assumption in the denoising step, which is justified only for small step sizes. As such, each denoising step is modeled by a conditional GAN, allowing larger step size. To ensure the diffusion model captures authentic manifold structures in the data distribution, SADM [346] advocates adversarial training of the diffusion generator against a novel structure discriminator in a minimax game, distinguishing real manifold structures from the generated ones.
### 6.4 Normalizing Flows and Connections with Diffusion Models
Normalizing flows [63, 251] are generative models that generate tractable distributions to model high-dimensional data [65, 155]. Normalizing flows can transform simple probability distribution into an extremely complex probability distribution, which can be used in generative models, reinforcement learning, variational inference, and other fields. Existing normalizing flows are constructed based on the change of variable formula [63, 251]. The trajectory in normalizing flows is formulated by a differential equation. In the discrete-time setting, the mapping from data x to latent z in normalizing flows is a composition of a sequence of bijections, taking the form of = ◦ −1 ◦ . . . ◦ 1. The trajectory {x1, x2, . . . x } in normalizing flows satisfies :
$${\bf x}_{i}=F_{i}({\bf x}_{i-1},\theta),\ {\bf x}_{i-1}=F_{i}^{-1}({\bf x}_{i},\theta)\tag{43}$$
for all ≤ .
Similar to the continuous setting, normalizing flows allow for the retrieval of the exact log-likelihood through a change of variable formula. However, the bijection requirement limits the modeling of complex data in both practical and theoretical contexts [50, 317]. Several works attempt to relax this bijection requirement [65, 317]. For example, DiffFlow [370] introduces a generative modeling algorithm that combines the benefits of both flow-based and diffusion models. As a result, DiffFlow produces sharper boundaries than normalizing flow and learns more general distributions with fewer discretization steps compared to diffusion probabilistic models. Implicit Nonlinear Diffusion Model (INDM) [150] optimizes the pre-encoding process of latent diffusion, which first encodes the original data into the latent space using normalizing flow, and then performs diffusion in the latent space. Using a non-linear diffusion process, INDM can effectively improve the likelihood and the sampling speed.
To scale up the training of CNFs, recent works propose efficient simulation-free approaches [2, 179, 183] by parameterizing a vector field which flows from noise samples to data samples. Lipman et al. (2022) [179] propose Flow Matching (FM) to train CNFs based on constructing explicit conditional probability paths between the noise distribution and each data sample. Wang et al. (2024) [307] conduct an in-depth analysis of the essence of rectification in rectified flow [183] and extend it to rectified diffusion. Besides, they identify that it is not straightness but first-order property is the essential training target of rectified diffusion with theoretical derivations. Yang et al. (2024) further propose Consistency Flow Matching [353], a novel FM method that explicitly enforces self-consistency in the velocity field. Consistency Flow Matching [353] directly defines straight flows starting from different times to the same endpoint,
imposing constraints on their velocity values:
$$\begin{split}&\mathcal{L}_{\theta}=E_{t-d}E_{x_{t},x_{t+\Delta t}}||f_{\theta}(t,x_{t})-f_{\theta^{-}}(t+\Delta t,x_{t+\Delta t})||_{2}^{2}+a||v_{\theta}(t,x_{t})-v_{\theta^{-}}(t+\Delta t,x_{t+\Delta t})||_{2^{-}}^{2}\\ &f_{\theta}(t,x_{t})=x_{t}+(1-t)*v_{\theta}(t,x_{t}),\end{split}\tag{44}$$
where U is the uniform distribution on [0, 1 − Δ], is a positive scalar, Δ denotes a time interval which is a small and positive scalar. − denotes the running average of past values of using exponential moving average (EMA), and +Δ follows a pre-defined distribution which can be efficiently sampled, for example, VP-SDE [111] or OT path [179]. In this way, Consistency Flow Matching [353] innovatively bridges consistency models and flow matching models through the novel concept of straight flows characterized by velocity consistency.
### 6.5 Autoregressive Models and Connections with Diffusion Models
Autoregressive Models (ARMs) work by decomposing the joint distribution of data into a product of conditional distributions using the probability chain rule:
$$\log p({\bf x}_{1:T})=\sum_{t=1}^{T}\log p(x_{t}\mid{\bf x}_{