Manuscript Offprint

arXiv:2611.00800

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

Rares Dolga, Harshad Dahake, David Barber

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 Introduction

Diffusion models are a widely used class of generative models (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song & Ermon, 2020; Song et al., 2021b), with notable success in domains such as image and video generation (Dhariwal & Nichol, 2021; Rombach et al., 2022; Ho et al., 2022; Blattmann et al., 2023). 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 (Sohl-Dickstein et al., 2015; Ho et al., 2020; Kingma et al., 2021), 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 (Song et al., 2021a; Karras et al., 2022). 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 (Lipman et al., 2023; Liu et al., 2023; Albergo & Vanden-Eijnden, 2023) are another important class of deterministic generators, now used at scale (Esser et al., 2024). 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 (Karras et al., 2022), arise as different choices of a single free parameter of the objective (Section 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 (Section 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.

References (39)

  • Building Normalizing Flows with Stochastic Interpolants
  • Error Bounds for Flow Matching Methods
  • Dynamical Regimes of Diffusion Models (opens the publisher in a new tab)
  • Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasets
  • The Probability Flow ODE is Provably Fast
  • Diffusion Models Beat GANs on Image Synthesis
  • Variational Flow Matching for Graph Generation
  • Scaling Rectified Flow Transformers for High-Resolution Image Synthesis
  • Diffusion Models and Gaussian Flow Matching: Two Sides of the Same Coin
  • Convergence Analysis for General Probability Flow ODEs of Diffusion Models in Wasserstein Distances
  • On Memorization in Diffusion Models
  • Denoising Diffusion Probabilistic Models
  • Video Diffusion Models
  • Elucidating the Design Space of Diffusion-Based Generative Models
  • Understanding Diffusion Objectives as the ELBO with Simple Data Augmentation
  • Variational Diffusion Models
  • Towards Non-Asymptotic Convergence for Diffusion-Based Generative Models
  • Flow Matching for Generative Modeling
  • Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow
  • High-Resolution Image Synthesis with Latent Diffusion Models
  • Progressive Distillation for Fast Sampling of Diffusion Models
  • Deep Unsupervised Learning using Nonequilibrium Thermodynamics
  • Denoising Diffusion Implicit Models
  • Generative Modeling by Estimating Gradients of the Data Distribution, 2020 (opens arXiv in a new tab)
  • Score-Based Generative Modeling through Stochastic Differential Equations
  • Spread Divergence
  • Substituting it and $p_\theta(x_{0:T}) = p(x_T) p_\theta(x_0 \mid x_1) \prod_{t=2}^T p_\theta(x_{t-1} \mid x_t)$ into equation(30), and grouping the terms that share the same variables, gives
  • The term $C$ does not depend on $\theta$ because neither $q$ nor $p(x_T)$ does
  • From them we define a radius $\rho$ and the function $\eta$ on $\lambda > 0$, which is increasing in $\lambda$ and vanishes as $\lambda \to 0$
  • Since $\overleftarrow{\mu}_{t-1}(x, x_0) = x - \frac{\Delta \lambda_t}{\lambda_t}(x - x_0)$, this optimum can be written as $\mu_t^*(x) = x - \Delta \lambda_t v_t^*(x)$ with $v_t^*(x) = (x - m_t(x))/\lambda_t$, and we work with this velocity form throughout
  • It also determines the state $\hat{x}_t$ of the sampled chain, which is a deterministic function of $\hat{x}_T$
  • By the fundamental theorem of calculus and the chain rule
  • With $\sum_t \Delta \lambda_t = \lambda_T - \lambda_0 = 1$ and $\Delta \lambda_t \leq h$
  • Since $0 < w_m^t(x) \leq 1$, dividing by it can only increase each term, $w_n^t(x) \leq w_n^t(x)/w_m^t(x)$, and each of the $N - 1$ ratios is bounded as above
  • This proves equation(64)
  • The final step jumps onto the posterior mean, which lies within $R\eta(\lambda_1)$ of $x_0^m$, a distance exponentially small in $1/\lambda_1^2$
  • Taking limits in equation(80) and equation(82)
  • Letting $\zeta \to 0$ gives $\beta_\zeta \to 0$, and therefore
  • Hence $\langle f(\hat{x}_0) \rangle = \langle f(x_0) \rangle_{p_\theta(x_0)} \to \frac{1}{N} \sum_{n=1}^N f(x_0^n) = \langle f(x_0) \rangle_{q(x_0)}$, which is weak convergence of the distribution of $\hat{x}_0$ to $q(x_0)$