TL;DR
Diffusion models produce state-of-the-art samples but typically require hundreds to thousands of iterative denoising steps during inference. Instead of hand-crafting or guessing heuristic step-skipping schedules, this paper formulates inference time-step selection as a shortest-path optimization problem on a graph. Using a simple dynamic programming algorithm, it discovers likelihood-optimal sampling schedules for any computation budget in just $\mathcal{O}(T)$ neural network forward passes without retraining the model.
What Problem Does This Paper Address?
Denoising Diffusion Probabilistic Models (DDPMs) can generate remarkable audio and visual samples, but their inference process is notoriously slow. Because diffusion models decouple their training schedule from their inference schedule, researchers often accelerate generation by evaluating only a small subset ($K$ steps) of the original training timesteps ($T$ steps).
Historically, choosing which $K$ timesteps to sample was treated as manual trial-and-error—using uniform spacing (even strides) or quadratic spacing. This paper asks: given a pre-trained DDPM and a strict compute budget of $K$ steps, what is the mathematically optimal sequence of timesteps to sample?
Methods
The authors exploit the mathematical structure of the Evidence Lower Bound (ELBO) used to train DDPMs:
- Decomposability of the ELBO: The variational lower bound breaks down into independent Kullback-Leibler (KL) divergence transition terms $L(t, s)$ between consecutive inference steps $t$ and $s$ (with $s < t$).
- Shortest-Path Formulation: Choosing an optimal sequence of $K$ steps out of $T$ total discrete candidate points is equivalent to finding the constrained shortest path (of exactly $K$ hops) on a directed acyclic graph (DAG), where nodes are timesteps and edge weights correspond to transition costs $L(t, s)$.
- Dynamic Programming (DP): The authors apply a DP algorithm (similar to Dijkstra’s algorithm constrained to $K$ edges) that discovers the globally optimal schedules for all budgets $k \in \{1, \dots, T\}$ in a single run.
- Efficient Memoization: Although there are $\mathcal{O}(T^2)$ possible transitions $(t, s)$, the model prediction $\hat{x}_0(x_t, t)$ depends only on $t$, not on the target step $s$. Thus, computing all edge costs requires only $\mathcal{O}(T)$ model forward passes. The table can be estimated accurately with as few as 128 Monte Carlo data samples.
Datasets
The authors evaluated their technique using existing pre-trained checkpoints and datasets:
- CIFAR-10 (evaluated on models trained with $L_\text{simple}$, $L_\text{vlb}$, and $L_\text{hybrid}$ objectives).
- ImageNet $64\times 64$ (evaluated on an $L_\text{hybrid}$ objective model).
No new benchmarks or datasets were introduced.
Key Insights and Ideas
- Exact Global Optimality Without Retraining: The framework requires zero fine-tuning, hyperparameter tuning, or retraining; it searches over the pre-trained model directly.
- Where Steps Matter Most: The DP-discovered paths allocate more steps near $t=0$ (clean data), confirming intuition that finer details require more denoising precision. Curiously, it also allocates dense steps near $t=1$ (pure noise), suggesting that breaking modes early in the diffusion trajectory is also critical for likelihood.
- Likelihood vs. Perceptual Quality (FID): Optimizing the exact unweighted ELBO leads to superior bits-per-dimension (log-likelihood), but does not always improve FID. However, because the algorithm supports any decomposable objective, replacing unweighted ELBO terms with an MSE-reweighted loss produces FID scores competitive with deterministic non-Markovian baselines like DDIM.
Key Results
- Drastic Step Reduction with Minimal Loss: On ImageNet $64\times 64$ ($L_\text{hybrid}$), the DP stride with just 32 refinement steps achieves a negative log-likelihood of 3.65 bits/dim, sacrificing less than 0.1 bits/dim compared to the full 4,000-step baseline (3.56 bits/dim) and vastly outperforming even strides (4.82 bits/dim) and quadratic strides (3.82 bits/dim).
- Few-Step CIFAR-10 Likelihood: On CIFAR-10 ($L_\text{vlb}$), with 16 refinement steps, DP reaches 3.41 bits/dim, compared to 4.09 for quadratic and 5.48 for even strides.
- Extreme Efficiency: Computing the cost matrix using only 128 datapoints yields nearly identical performance to using 50,000 datapoints, meaning finding the optimal schedule takes only seconds to minutes on a single GPU.
Limitations and Future Work
- Likelihood/FID Trade-off: The unweighted ELBO maximizes likelihood rather than perceptual sample fidelity (FID). Although the authors demonstrate that an MSE-reweighted surrogate improves FID, discovering principled, decomposable objectives that directly correlate with visual quality remains open.
- Grid Restriction for Discrete Models: When models are trained on discrete timesteps, the DP search is constrained to the original training grid to avoid evaluating timesteps the network has never observed.
Summary updated