Stochastic Interpolants & Generalized Paths
Unifying diffusion and flow matching through stochastic interpolants: general interpolation frameworks, time-dependent noise injection, bridge processes, and the connection between SDE and ODE generation.
Prerequisites
Table of Contents
- Learning Objectives
- Notation
- Core Intuition
- The Interpolant Framework
- Deriving the Velocity Field
- Adding Noise: Stochastic Interpolants
- Score Function from Interpolants
- SDE vs ODE Sampling
- Bridge Processes
- Unifying Diffusion and Flow Matching
- Common Pitfalls
- Summary
- Exercises
Learning Objectives
- Define a stochastic interpolant and derive its velocity field.
- Show how noise injection creates an SDE formulation alongside the ODE.
- Connect bridge processes to conditional generation.
- Prove that diffusion models are a special case of the interpolant framework.
- Choose between SDE and ODE sampling based on quality-speed tradeoffs.
Notation
- — stochastic interpolant
- — interpolation coefficients
- — drift field
- — diffusion coefficient (noise level at time )
Core Intuition
Stochastic interpolants generalize both flow matching and diffusion: define any smooth path between and — deterministic (ODE/flow) or stochastic (SDE/diffusion) — and derive the corresponding training objective. This unification reveals that diffusion and flow matching are the SAME framework with different choices of interpolation coefficients and noise schedules.
Stochastic Interpolants
The Interpolant Framework
General interpolant (Albergo & Vanden-Eijnden, 2023):
with boundary conditions:
- → (noise).
- → (data).
Linear: (standard flow matching).
Trigonometric: (VP-SDE equivalent).
Polynomial: with appropriate normalization.
Deriving the Velocity Field
The conditional velocity field for the interpolant:
For linear interpolation: (constant velocity — straight line).
For trigonometric: (curved path with varying speed).
Training:
Adding Noise: Stochastic Interpolants
Add noise to the interpolant:
Boundary conditions: (exact at endpoints).
Why add noise?
- Smooths the conditional distribution .
- Helps with mode coverage.
- Enables SDE formulation for improved sample quality.
Conditional velocity (with noise):
Score Function from Interpolants
The score at time :
This connects to the denoising score matching objective: predict the noise that was added.
SDE vs ODE Sampling
ODE (deterministic): Solve . Same sample for same initial noise.
SDE (stochastic): Add noise during sampling:
Quality tradeoff:
- ODE: Faster (fewer steps), deterministic, slightly lower quality.
- SDE: Slower, stochastic, better mode coverage (noise corrects errors).
- In practice: ODE with 20-50 steps ≈ SDE with 100-200 steps in quality.
Bridge Processes
Diffusion bridge: A process conditioned to start at and end at :
Uses:
- Image-to-image translation (start at source, end at target).
- Inpainting (bridge from masked to unmasked).
- Style transfer.
Connection to interpolants: A Brownian bridge is a stochastic interpolant with specific .
Unifying Diffusion and Flow Matching
VP-SDE (DDPM) as a stochastic interpolant:
- , , .
- Special case: is not the noise endpoint but .
Flow matching (linear) as interpolant:
- , , .
- Deterministic (no noise injection during interpolation).
Unified training: Same network architecture, same training procedure. Only the coefficients differ.
Implication: There's no fundamental distinction between "diffusion models" and "flow models" — they're different scheduling choices in the same framework.
Common Pitfalls
Pitfall 1. Using the linear interpolant for tasks that need the VP-SDE schedule. For high-resolution image generation, the VP schedule's aggressive noise injection at early times helps with mode coverage.
Pitfall 2. Confusing the noise in the interpolant () with the sampling noise (SDE). The interpolant noise is for training; the SDE noise is for inference.
Pitfall 3. Not matching the sampling schedule to the training schedule. If trained with linear interpolation, sample with the corresponding ODE — not with the VP-SDE sampler.
Summary
- Stochastic interpolants unify diffusion and flow matching.
- General form: .
- Velocity field derived analytically from the interpolant coefficients.
- SDE vs ODE: Trade speed for quality via noise during sampling.
- Bridge processes extend to conditional generation (image translation).
- Diffusion and flow matching are the SAME framework, different .
Exercises
Exercise 1. Derive the conditional velocity for the trigonometric interpolant , .
Exercise 2. Show that the VP-SDE objective is equivalent to a stochastic interpolant velocity matching loss (derive the reparameterization).
Exercise 3. For a Brownian bridge with : derive the drift and compare to the deterministic interpolant.
Exercise 4. Prove that ODE and SDE sampling converge to the same marginal in the limit of infinite steps.
Exercise 5. Design a custom interpolant schedule optimized for text-to-image generation. Justify your choices.