TL;DR
Diffusion Tree Sampling (DTS) brings the power of Monte Carlo Tree Search (MCTS) to the world of generative models, allowing researchers to align pretrained diffusion models with new rewards at inference time. By building a tree of denoising trajectories and reusing past computations, DTS achieves state-of-the-art results with significantly less compute than traditional methods.
The Challenge of Inference-Time Alignment
Generative diffusion models are incredibly powerful, but "steering" them toward specific user-defined goals—like generating an image with a specific aesthetic or a sentence with perfect grammar—usually requires expensive fine-tuning. To avoid this overhead, researchers use "inference-time alignment," guiding the model's denoising process using a reward function.
However, current steering methods face two major hurdles:
- The Credit Assignment Problem: Rewards are typically only available at the very end of the denoising process (the "clean" image). Estimating how a highly noisy state will eventually perform is notoriously difficult. Common approximations, like Tweedie’s formula, become essentially random at high noise levels, leading to biased guidance.
- Inefficiency: Most methods (like Sequential Monte Carlo) treat every sample as an independent event. They don't "learn" from previous denoising runs, meaning they fail to scale efficiently with additional sequential compute.
Enter Diffusion Tree Sampling (DTS)
To overcome these limitations, the authors introduce Diffusion Tree Sampling (DTS), which casts the denoising process as a search problem on a finite-horizon tree. In this tree, nodes represent noisy states ($x_t$) and edges represent denoising steps.
The algorithm operates in four iterative phases inspired by Monte Carlo Tree Search:
- Selection: Starting from the root (pure noise), the algorithm traverses the tree by selecting children based on their estimated "soft value" (expected reward).
- Expansion: When it reaches a leaf, it generates a new denoising candidate.
- Rollout: It completes the denoising trajectory to the final state ($x_0$) to obtain a real reward.
- Backup: This is the core innovation. DTS uses a soft Bellman equation to propagate the terminal reward back up the tree, updating the value estimates of all intermediate noisy states.
The paper offers two variants: DTS for sampling from the target distribution, and DTS* (DTS-star), a greedy variant that uses Upper Confidence Bounds for Trees (UCT) to search for the single highest-reward samples.
Key Insights
- The "Anytime" Advantage: Unlike previous methods that scale "parallelly" by simply adding more particles, DTS scales "sequentially." Because it reuses information from previous trajectories to refine its tree, the more compute you give it, the better the samples become.
- Soft Backups vs. Reward Hacking: By using "soft" values (aggregating posterior mass) rather than just looking for the highest peak, DTS* is more robust to "reward hacking"—where a model finds a low-probability artifact that scores high on a reward function but looks terrible to a human.
- Correcting High-Noise Bias: While one-step reward predictions are useless at high noise levels, the iterative "backup" mechanism allows reliable signals from low-noise steps to eventually "fix" the bad decisions made at the start of the chain.
Performance and Results
The authors evaluated DTS across several modalities, including image generation (MNIST, CIFAR-10), text-to-image (Stable Diffusion v1.5), language modeling, and inverse problems.
- Efficiency: On MNIST and CIFAR-10, DTS matched the image quality (FID) of top-tier baselines while using up to 5x less compute (measured in Number of Function Evaluations, or NFEs).
- Text-to-Image: DTS* outperformed "best-of-N" sampling on the DrawBench prompt set, matching its performance with 2x to 5x less compute.
- Language: In text completion tasks, DTS* produced more grammatical and diverse outputs than baselines, showing a 13.7% improvement in LLM-based evaluation scores.
- Qualitative Superiority: DTS* adheres much more closely to complex prompts—such as specific object counts, spatial relationships, or spelling—compared to standard steering methods.
Limitations and Future Work
The primary limitation of DTS is that the tree-building process is inherently sequential, making it harder to parallelize than simple particle filters (though the authors mitigated this with batched rollouts).
Additionally, the method relies on the pretrained model acting as a good "prior." If the reward directs the model into a region where the prior has zero probability, the search will struggle. For "sharp" posteriors (like exact image inpainting), the method works best when combined with gradient-based guidance.
Looking ahead, integrating a learned value network (similar to AlphaZero) to replace the need for full rollouts could make the search even more efficient, paving the way for highly scalable inference-time alignment.
Summary updated