Diffusion Latent Beam Search (DLBS)
- DLBS is an inference-time algorithm that enhances text-to-video generation by framing conditional generation as a discrete search over the latent denoising trajectory.
- It employs a light-weight beam search in latent space with short short-horizon deterministic lookahead, achieving improved alignment to prompt semantics without re-training.
- DLBS outperforms traditional methods by balancing beam width, candidate count, and lookahead depth, leading to significant gains on video generation benchmarks.
Diffusion Latent Beam Search (DLBS) is an inference-time algorithm for optimizing the perceptual and semantic quality of outputs from diffusion models, with a primary application in text-to-video generation. The approach frames conditional generation as a discrete search problem over the latent denoising trajectory, combining light-weight beam search in the latent space with lookahead reward estimation. Unlike traditional sampling or greedy inference, DLBS enables effective alignment to prompt semantics and perceptual criteria without model retraining, utilizing a calibrated, potentially non-differentiable reward function for scoring and selection (Oshima et al., 31 Jan 2025).
1. Mathematical Framework for Diffusion Latent Beam Search
DLBS operates over the reverse-time Markov chain defined by a diffusion model with denoising steps . At each , the algorithm maintains beams, each representing a latent . The primary objective is to maximize a given reward function (possibly non-differentiable), evaluated on the fully denoised latent and text prompt : At each denoising step, every beam expands to candidates, producing 0 new partial trajectories. Candidates are ranked by a "lookahead-augmented" score: 1 where 2 is computed via Tweedie’s formula (posterior mean after one denoising step), 3 is a short deterministic DDIM chain lookahead estimator (of length 4), and 5 controls the influence of lookahead (default 6).
The reward function 7 is calibrated as a non-negative weighted sum of 8 base metrics, reflecting alignment to text, subject consistency, motion, aesthetics, and image fidelity: 9 The optimal weights 0 are chosen to maximize Pearson correlation with feedback from large vision-LLMs (VLMs) such as GPT-4o or Gemini.
2. Algorithmic Structure and Pseudocode
The DLBS procedure is as follows:
- Initialization: Sample 1 for 2.
- Denoising Loop (for 3 down to 4):
- For each beam, compute DDIM posterior mean for the next latent.
- For 5, for each beam, sample 6 candidate children via Gaussian perturbation.
- For each candidate, compute:
- One-step posterior-mean estimate 7
- Optionally, run 8-step deterministic DDIM to obtain lookahead endpoint 9
- Score using the sum (or only) of rewards at these endpoints.
- Retain the top 0 candidates by score for the next step.
- Output: For the final 1 denoised latents 2, select the one maximizing 3 after VAE decoding.
The overall computational budget per step is 4 denoising samples; deeper lookahead (5) increases reward-fidelity at the cost of more compute. Empirically, 6 to 7 provides significant benefit.
3. Lookahead Estimation and Search-Efficiency Tradeoffs
DLBS’s core innovation is its efficient, short-horizon lookahead estimator. For each candidate latent at step 8, a deterministic DDIM chain of length 9 projects the latent to a near-terminal state, producing a sharper estimate of eventual reward. This contrasts with purely greedy approaches, which are prone to suboptimal local decisions especially for video or sequential domains.
Resource allocation is governed by trades between beam width 0, candidates per beam 1, and lookahead depth 2. Larger 3 increases exploration but at fixed computational budget requires smaller 4. Increasing 5 typically offers better reward-fidelity per beam than increasing 6, with diminishing returns beyond 7.
4. Reward Calibration and Metric Weighting
DLBS employs a calibrated reward 8, constructed from six base VBench metrics: Subject Consistency (9), Motion Smoothness (0), Dynamic Degree (1), Aesthetic Quality (2), Imaging Quality (3), and Text–Video Consistency (4).
Weights 5 are selected via grid search from 6 to maximize the correlation between 7 and model or human-proxy (VLM) preferences. This calibration substantially increases alignment between perceived quality and computed reward over any single metric, with statistical significance (8) (Oshima et al., 31 Jan 2025).
5. Empirical Results and Comparative Performance
DLBS achieves state-of-the-art inference-time perceptual alignment on multiple video generation benchmarks (MSRVTT-test, DEVIL-high/medium/static), consistently outperforming both Best-of-N (BoN) sampling and Greedy Search (GS). Quantitative improvements (normalized 0–1 scale with Gemini-calibrated reward on MSRVTT-test):
| Method | KB=8 | KB=16 | KB=32 |
|---|---|---|---|
| BoN | 0.42 | 0.45 | 0.47 |
| GS | 0.40 | 0.44 | 0.46 |
| DLBS | 0.48 | 0.52 | 0.55 |
Ablation studies demonstrate that even minimal lookahead (9) yields ~5% improvement over no lookahead, and optimal performance is achieved when 0. Calibration weights yield significant Pearson 1 increases relative to individual base metrics. Additionally, VLM-evaluated quality scales nearly linearly with 2.
6. Deployment Guidelines and Recommendations
Effective use of DLBS follows this priority for compute allocation:
- Allocate initial resources to short-horizon lookahead (3–4) to stabilize reward estimates.
- Increase total search budget (5) to 6–7 for coverage.
- Scale total DDIM steps 8 only when additional compute is available beyond the above.
Robust hyperparameters are 9–0, 1–2 (for 3), 4, and DDIM stochasticity 5. Default guidance scale (6) and reward lookahead weight (7) are stable across tasks.
7. Relationship to Related Beam Search Variants
DLBS represents a static-beam-width, static-tree-width beam search with deterministic lookahead reward evaluation. In contrast, algorithms such as Dynamic Search for Diffusion (DSearch) introduce dynamic beam-width scheduling, adaptive search-timestep selection, and multi-particle lookahead to further improve search efficiency and reward maximization (Li et al., 3 Mar 2025). Other work, such as BeamDiffusion for image sequences, employs cross-attention–based scoring and beam search at the sequence level, optimizing for joint consistency across image sets (Fernandes et al., 26 Mar 2025). DLBS’s efficiency and calibration approach make it a general-purpose inference-time optimizer for conditional generation in diffusion models.
References:
- "Inference-Time Text-to-Video Alignment with Diffusion Latent Beam Search" (Oshima et al., 31 Jan 2025)
- "Dynamic Search for Inference-Time Alignment in Diffusion Models" (Li et al., 3 Mar 2025)
- "Latent Beam Diffusion Models for Decoding Image Sequences" (Fernandes et al., 26 Mar 2025)