alphaFeedback

WorksComputer Science

A Discrete-Time Variational Objective for Degenerate Diffusion and Equivalence to Flow Matching

AI contributions
  • Claude
View details

Abstract

Diffusion models and more recently Flow models have widespread application. In this work we consider degenerate Diffusion models in which the per-step generator is deterministic. We construct a modified variational framework and show a formal equivalence between Flow models and Degenerate Diffusion models. For our discrete-time variational objective we show that the optimal degenerate generator recovers the data distribution in the limit of an infinite number of generator steps. Our work therefore provides a unified perspective, showing that discrete-time implementations of flow matching and the discrete-time Degenerate Diffusion model can be considered within the same simple variational framework, removing the need for the continuous-time machinery normally used to justify flow matching models.

Introduction

Diffusion models are a widely used class of generative models [12] (Sohl-Dickstein et al. 2015; Song & Ermon 2020; Song et al. 2021b), with notable success in domains such as image and video generation [6, 13, 4] (Rombach et al. 2022). A fixed forward process corrupts the data with Gaussian noise of increasing scale, until it is indistinguishable from pure noise, and a stochastic generator is trained to undo it one step at a time. In their variational derivation [12, 16] (Sohl-Dickstein et al. 2015), the training objective is a bound that decomposes into a sum of per-step KL divergences between the forward process and the generator. Deterministic generators, however, have been found to give better samples in fewer steps [14] (Song et al. 2021a). A deterministic generator is obtained by making each of its steps a Dirac delta function, in which case the KL divergence at each step is ill-defined. DDIM (Song et al., 2021a) bypasses this issue by training a stochastic model and setting its variance to zero only during sampling. However, this introduces a mismatch between the training objective, which assumes a stochastic per-step generator, and the use of a deterministic per-step generator after training.

Flow models [18, 1] (Liu et al. 2023) are another important class of deterministic generators, now used at scale [8]. Their justification is based on continuous-time ODEs and the properties of flows, and, like the probability-flow ODE of score-based models (Song et al., 2021b), they are derived outside the variational framework altogether.

A variational perspective on deterministic generators offers three benefits. First, it provides a training objective for the generator that is actually used for sampling: the per-step generator is deterministic both during and after training, so there is no mismatch of the kind introduced by DDIM. Second, it works directly with the discrete-time chain that is implemented in practice, rather than with the continuous-time ODE on which the justification of flow models rests. Third, it explains the freedom in weighting the per-step loss terms. The heuristic weightings used in practice, such as that of EDM [14], arise as different choices of a single free parameter of the objective (§ 3.2).

Since the KL divergence is ill-defined for a deterministic generator, we use the spread divergence (Zhang et al., 2020), which smooths both distributions with the same Gaussian noise so that the divergence between them is well-defined. We then define a discrete-time spread variational objective and show that, for a finite training set, the optimal deterministic generator recovers the data distribution as the number of steps tends to infinity (Theorem 1). Furthermore, the objective is equivalent to a discrete-time implementation of flow matching for a specific choice of spread noise and the linear schedule (§ 4). This therefore also justifies why flow matching converges to the data distribution as the number of steps tends to infinity, without requiring the continuous-time machinery typically used to justify flow models.

Background

Diffusion

A standard diffusion model is defined by a forward noising process q(x1:T∣x0)=∏t=1Tq(xt∣xt−1,x0)q(x_{1:T} \mid x_0) = \prod_{t=1}^{T} q(x_t \mid x_{t-1}, x_0), where x1:T=(x1,…,xT)x_{1:T} = (x_1, \ldots, x_T), each forward probability q(xt∣xt−1,x0)q(x_t \mid x_{t-1}, x_0) is linear-Gaussian, and q(x0)q(x_0) is the data distribution on Rd\mathbb{R}^d. In practice, q(x0)q(x_0) is the empirical distribution of a finite training set, q(x0)=1N∑n=1Nδ(x0∣x0n)q(x_0) = \frac{1}{N} \sum_{n=1}^{N} \delta(x_0 \mid x_0^n) where δ(x∣y)\delta(x \mid y) is a Dirac delta for xx with all mass placed at yy. This is paired with a generative model pθ(x0:T)=p(xT)∏t=1Tpθ(xt−1∣xt)p_\theta(x_{0:T}) = p(x_T) \prod_{t=1}^{T} p_\theta(x_{t-1} \mid x_t) where pθ(xt−1∣xt)=N(xt−1∣μθ(xt),βtI)p_\theta(x_{t-1} \mid x_t) = \mathcal{N}(x_{t-1} \mid\mu_\theta(x_t), \beta_t I) with learnable mean μθ\mu_\theta and fixed variance βt>0\beta_t > 0. As is standard, the network μθ\mu_\theta also receives the timestep tt, which we suppress in the notation throughout. The forward process is defined such that q(xT∣x0)≈p(xT)=N(xT∣0,I)q(x_T \mid x_0) \approx p(x_T) = \mathcal{N}(x_T \mid0, I). Training minimises an upper bound on the negative log-likelihood, which follows from KL⁡[q(x0)∥pθ(x0)]≤KL⁡[q(x0:T)∥pθ(x0:T)]\operatorname{KL}[q(x_0) \mathbin{\|} p_\theta(x_0)] \le\operatorname{KL}[q(x_{0:T}) \mathbin{\|} p_\theta(x_{0:T})]:

−⟨log⁡pθ(x0)⟩q(x0)≤∑t=2T⟨KL⁡[q(xt−1∣xt,x0)∥pθ(xt−1∣xt)]⟩q(xt∣x0)q(x0)−⟨log⁡pθ(x0∣x1)⟩q(x1∣x0)q(x0)+C(1)-\left\langle\log p_\theta(x_0) \right\rangle_{q(x_0)} \le\sum_{t=2}^{T} \left\langle\operatorname{KL}[q(x_{t-1} \mid x_t, x_0) \mathbin{\|} p_\theta(x_{t-1} \mid x_t)] \right\rangle_{q(x_t \mid x_0)q(x_0)} - \left\langle\log p_\theta(x_0 \mid x_1) \right\rangle_{q(x_1 \mid x_0)q(x_0)} + C \tag*{(1)}

where ⟨⋅⟩p\langle\cdot\rangle_p represents expectation with respect to the distribution pp and the constant C=⟨KL⁡[q(xT∣x0)∥p(xT)]⟩q(x0)C = \left\langle\operatorname{KL}[q(x_T \mid x_0) \mathbin{\|} p(x_T)] \right\rangle_{q(x_0)} is independent of the model parameters (Appendix § 9). Setting q(xt−1∣xt,x0)=δ(⋅∣x0)q(x_{t-1} \mid x_t, x_0) = \delta(\cdot\mid x_0) at t=1t = 1, the right-hand side of equation (1) is, up to additive constants1 that do not depend on θ\theta, equivalent to

L(θ)=∑t=1T⟨KL⁡[q(xt−1∣xt,x0)∥pθ(xt−1∣xt)]⟩q(xt∣x0)q(x0).(2)L(\theta) = \sum_{t=1}^{T} \left\langle\operatorname{KL}[q(x_{t-1} \mid x_t, x_0) \mathbin{\|} p_\theta(x_{t-1} \mid x_t)] \right\rangle_{q(x_t \mid x_0)q(x_0)}. \tag*{(2)}

Spread Divergence

A divergence Div⁡(p∥q)\operatorname{Div}(p \mathbin{\|} q) between two distributions with different supports, or without densities, may be ill-defined. The spread divergence (Zhang et al., 2020) resolves this by convolving both distributions with the same noise kernel k(y∣x)k(y \mid x). We use the Gaussian kernel k(y∣x)=N(y∣x,σ2I)k(y \mid x) = \mathcal{N}(y \mid x, \sigma^2 I) with σ>0\sigma> 0.

p~(y)=∫dx k(y∣x)p(x),q~(y)=∫dx k(y∣x)q(x).(3)\tilde{p}(y) = \int dx\, k(y \mid x)p(x), \qquad\tilde{q}(y) = \int dx\, k(y \mid x)q(x). \tag*{(3)}

The spread distributions p~\tilde{p} and q~\tilde{q} have the same support for any pp and qq, so Div⁡(p~∥q~)\operatorname{Div}(\tilde{p} \mathbin{\|} \tilde{q}) is well-defined. Since the Gaussian kernel depends only on y−xy-x, the spread operation is a convolution, p~=k∗p\tilde{p} = k * p. Under the

@bibliography The main reference list (18 unnumbered entries) is already transcribed. Skip its entries if they are printed on this page; transcribe everything else and mark citations as above. Fourier transform F\mathcal{F}, this becomes a product, F{p~}=F{k}F{p}\mathcal{F}\{\tilde{p}\}=\mathcal{F}\{k\}\mathcal{F}\{p\}. Moreover, since F{k}\mathcal{F}\{k\} is itself a Gaussian and nowhere zero, it can be divided out, and each of the following implications holds in both directions:

Div⁡(p~∥q~)=0⇔p~=q~⇔F{k}F{p}=F{k}F{q}⇔F{p}=F{q}⇔p=q.(4)\operatorname{Div}(\tilde{p}\mathbin{\|}\tilde{q})=0 \Leftrightarrow\tilde{p}=\tilde{q} \Leftrightarrow\mathcal{F}\{k\}\mathcal{F}\{p\}=\mathcal{F}\{k\}\mathcal{F}\{q\} \Leftrightarrow\mathcal{F}\{p\}=\mathcal{F}\{q\} \Leftrightarrow p=q. \tag*{(4)}

Hence the spread divergence is zero if and only if p=qp=q.

Degenerate Diffusion Model

We define the Degenerate Diffusion Model, in which each step of both the forward noising process and the generator is deterministic. In the forward process, the only randomness comes from the data point x0x_0 and a single Gaussian noise sample ϵ\epsilon shared by all timesteps; in the generator, it comes only from the initial state xTx_T. We define a strictly increasing schedule λt\lambda_t, t∈{0,1,…,T}t \in\{0,1,\ldots,T\}, with λ0=0\lambda_0=0 and λT=1\lambda_T=1, and the degenerate forward distributions q(xt∣x0,ϵ)=δ(xt∣(1−λt)x0+λtϵ)q(x_t\mid x_0,\epsilon)=\delta(x_t\mid(1-\lambda_t)x_0+\lambda_t\epsilon) with ϵ∈Rd\epsilon\in\mathbb{R}^d and q(ϵ)=N(ϵ∣0,I)q(\epsilon)=\mathcal{N}(\epsilon\mid0,I), so that q(xT)=N(xT∣0,I)q(x_T)=\mathcal{N}(x_T\mid0,I). Hence, the forward noising process

q(x1:T∣x0)=∫dϵ q(ϵ)∏t=1Tq(xt∣x0,ϵ)=q(x1∣x0)∏t=2Tq(xt∣xt−1,x0)(5)q(x_{1:T}\mid x_0)=\int d\epsilon\,q(\epsilon)\prod_{t=1}^{T}q(x_t\mid x_0,\epsilon)=q(x_1\mid x_0)\prod_{t=2}^{T}q(x_t\mid x_{t-1},x_0) \tag*{(5)}

References

  1. [1]Michael Samuel Albergo and Eric Vanden-Eijnden. Building Normalizing Flows with Stochastic Interpolants. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=li7qeBbCR1t.arxiv.org/abs/2209.15571
  2. [2]Joe Benton, George Deligiannidis, and Arnaud Doucet. Error Bounds for Flow Matching Methods. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=uqQPyWFDhY.arxiv.org/abs/2305.16860
  3. [3]Giulio Biroli, Tony Bonnaire, Valentin de Bortoli, and Marc Mézard. Dynamical Regimes of Diffusion Models. Nature Communications, 15(1), November 2024. ISSN 2041-1723. doi: 10.1038/s41467-024-54281-3. URL http://dx.doi.org/10.1038/s41467-024-54281-3.
  4. [4]Andreas Blattmann, Tim Dockhorn, Sumith Kulal, Daniel Mendelevitch, Maciej Kilian, Dominik Lorenz, Yam Levi, Zion English, Vikram Voleti, Adam Letts, Varun Jampani, and Robin Rombach. Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasets. CoRR, abs/2311.15127, 2023. URL https://doi.org/10.48550/arXiv.2311.15127.
  5. [5]Sitan Chen, Sinho Chewi, Holden Lee, Yuanzhi Li, Jianfeng Lu, and Adil Salim. The Probability Flow ODE is Probably Fast. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=KD6MFeWSAd.
  6. [6]Prafulla Dhariwal and Alexander Quinn Nichol. Diffusion Models Beat GANs on Image Synthesis. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=AAWuCvzaVt.
  7. [7]Floor Eijkelboom, Grigory Bartosh, Christian A. Naesseth, Max Welling, and Jan-Willem van de Meent. Variational Flow Matching for Graph Generation. In Advances in Neural Information Processing Systems, volume 37, 2024.arxiv.org/abs/2406.04843
  8. [8]Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, Dustin Podell, Tim Dockhorn, Zion English, and Robin Rombach. Scaling Rectified Flow Transformers for High-Resolution Image Synthesis. In Forty-first International Conference on Machine Learning, 2024. URL https://openreview.net/forum?id=FPnlhsQJ5B.arxiv.org/abs/2403.03206
  9. [9]Ruiqi Gao, Emiel Hoogeboom, Jonathan Heek, Valentin De Bortoli, Kevin Patrick Murphy, and Tim Salimans. Diffusion Models and Gaussian Flow Matching: Two Sides of the Same Coin. In The Fourth Blogpost Track at ICLR 2025, 2025. URL https://openreview.net/forum?id=C8Ygg9wy0s.
  10. [10]Xuefeng Gao and Lingjiong Zhu. Convergence Analysis for General Probability Flow ODEs of Diffusion Models in Wasserstein Distances. In The 28th International Conference on Artificial Intelligence and Statistics, 2025. URL https://openreview.net/forum?id=Ek08rb3lX.arxiv.org/abs/2401.17958
  11. [11]Xiangming Gu, Chao Du, Tianyu Pang, Chongxuan Li, Min Lin, and Ye Wang. On Memorization in Diffusion Models. Transactions on Machine Learning Research, 2025. ISSN 2835-8856. URL https://openreview.net/forum?id=3DBqvSDbj.
  12. [12]Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising Diffusion Probabilistic Models. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 6840–6851. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/4c5bcfec8584af0d967f1ab10179ca4b-Paper.pdf.arxiv.org/abs/2006.11239
  13. [13]Jonathan Ho, Tim Salimans, Alexey A. Gritsenko, William Chan, Mohammad Norouzi, and David J. Fleet. Video Diffusion Models. In ICLR Workshop on Deep Generative Models for Highly Structured Data, 2022. URL https://openreview.net/forum?id=BBeIR2NdDZ5.
  14. [14]Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine. Elucidating the Design Space of Diffusion-Based Generative Models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=k7FuT0wMuc7.arxiv.org/abs/2206.00364
  15. [15]Diederik P Kingma and Ruiqi Gao. Understanding Diffusion Objectives as the ELBO with Simple Data Augmentation. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=NnMEacdcyD.arxiv.org/abs/2303.00848
  16. [16]Diederik P Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational Diffusion Models. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=2LdbQxC1Yv.arxiv.org/abs/2107.00630
  17. [17]Gen Li, Yuting Wei, Yuxin Chen, and Yuejie Chi. Towards Non-Asymptotic Convergence for Diffusion-Based Generative Models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=4VGEEr6W9.arxiv.org/abs/2306.09251
  18. [18]Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow Matching for Generative Modeling. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=PvqMRDCJT9.arxiv.org/abs/2210.02747

Paper details

vlnc:W_uxp6f8ys
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

Claude · View statement →

Looking for related papers…
Contents