Solving the VP-SDE: Closed-Form Marginals¶
This document provides the exact solution to the variance-preserving SDE (VP-SDE), showing how the continuous-time formulation connects to DDPM's discrete notation.
Overview¶
This is the final "dictionary page" that makes DDPM notation (\(\alpha_t\), \(\bar{\alpha}_t\)) line up exactly with the VP-SDE notation (\(\beta(t)\), integrals).
What We'll Show¶
We'll derive the closed-form marginal:
and show how \(\bar{\alpha}_t\) in DDPM corresponds to \(\exp\left(-\int_0^t \beta(s)\,ds\right)\) in continuous time.
This is the key connection that makes discrete and continuous notations line up perfectly.
Roadmap¶
- Solve the VP-SDE: Get the closed-form marginal \(q(x_t \mid x_0)\)
- Identify \(\bar{\alpha}(t)\): Continuous-time analogue of DDPM's \(\bar{\alpha}_t\)
- Connect discrete and continuous: Show how products become integrals
Notation¶
Continuous Time¶
- Time: \(t \in [0, T]\)
- VP-SDE:
$$ dx(t) = -\frac{1}{2}\beta(t) x(t)\,dt + \sqrt{\beta(t)}\,dw(t) $$
where \(w(t)\) is Brownian motion and \(\beta(t) \geq 0\)
DDPM Discrete Time¶
- Time steps: \(k = 0, 1, \ldots, N\) with step size \(\Delta t\)
- Notation:
- \(\beta_k\): discrete noise amount
- \(\alpha_k := 1 - \beta_k\): signal retention
- \(\bar{\alpha}_k := \prod_{i=1}^k \alpha_i\): cumulative signal retention
Step 1: Solve the VP-SDE¶
The VP-SDE is a linear SDE (similar to an Ornstein–Uhlenbeck process with time-varying rate). The standard technique is an integrating factor.
Define the Integrating Factor¶
Let:
Define the transformed variable:
Strategy: We'll compute \(dy(t)\) and show that the drift term cancels, leaving only a pure diffusion.
Differentiate \(y(t)\)¶
Using the product rule (since \(e^{\gamma(t)}\) is deterministic):
The differential of the exponential is:
Substitute \(dx(t)\) from the VP-SDE:
Therefore:
Key observation: The drift terms cancel perfectly! This is why we chose this particular integrating factor.
Integrate from 0 to \(t\)¶
Integrating both sides:
Since \(y(0) = e^{\gamma(0)} x(0) = x(0)\) (because \(\gamma(0) = 0\)):
Substitute back \(x(t) = e^{-\gamma(t)} y(t)\):
This is the exact solution to the VP-SDE.
Step 2: The Marginal Distribution is Gaussian¶
The second term in our solution is an Itô integral of deterministic coefficients against Brownian motion, so it's Gaussian with mean zero.
Mean¶
Variance¶
Define the noise term:
The covariance of \(\eta(t)\) is:
Beautiful Simplification¶
Notice that:
Therefore:
Substituting:
Result¶
Step 3: Identify the Continuous-Time \(\bar{\alpha}(t)\)¶
Compare with DDPM¶
Recall the DDPM marginal:
From the SDE solution, we have:
- Mean coefficient: \(e^{-\gamma(t)}\)
- Variance: \(1 - e^{-2\gamma(t)}\)
Define \(\bar{\alpha}(t)\)¶
To match the DDPM form, define:
Then:
Unified Form¶
The SDE marginal becomes:
where:
This is the exact continuous-time version of DDPM's closed-form marginal.
Step 4: Discrete Products Become Integrals¶
Now we connect the discrete \(\bar{\alpha}_k = \prod_{i=1}^k \alpha_i\) to the continuous form.
Setup¶
Recall:
- \(\alpha_i = 1 - \beta_i\)
- In the SDE scaling: \(\beta_i = \beta(t_i) \Delta t\) (small)
Take Logarithms¶
Taylor Expansion¶
For small \(\beta_i\):
Therefore:
Riemann Sum → Integral¶
As \(\Delta t \to 0\), the Riemann sum becomes an integral:
Exponentiate¶
This is the precise "product → integral" dictionary.
The Complete DDPM ↔ VP-SDE Dictionary¶
Discrete (DDPM)¶
Continuous (VP-SDE)¶
Marginal (Both Cases)¶
Interpretation¶
\(\bar{\alpha}\) represents the "survival of signal" coefficient:
- Discrete time: Multiplicative (product of retention factors)
- Continuous time: Exponential of integral (accumulated decay)
As \(\Delta t \to 0\), products converge to exponentials of integrals—this is a fundamental connection in stochastic calculus.
Summary¶
We derived the exact solution to the VP-SDE:
- Integrating factor method: Transforms the SDE into pure diffusion
- Closed-form marginal: Gaussian with explicit mean and variance
- Connection to DDPM: \(\bar{\alpha}(t) = \exp\left(-\int_0^t \beta(s)\,ds\right)\)
- Discrete-continuous bridge: Products become integrals in the limit
Key insight: The continuous VP-SDE and discrete DDPM describe the same underlying process, just in different time parameterizations.
Related Documents¶
- Reverse-Time SDE and Probability Flow ODE — How to sample (next)
- DDPM to VP-SDE — Deriving the SDE from DDPM
- VP-SDE to DDPM — Deriving DDPM from the SDE
- SDE View Overview — Conceptual introduction