TL;DR
Feynman-Kac (FK) steering is a novel inference-time framework that guides diffusion models using arbitrary reward functions without requiring expensive fine-tuning or gradient computations. By simulating multiple parallel paths ("particles") and dynamically resampling the most promising ones at intermediate steps, it allows smaller base models to outperform much larger, fine-tuned counterparts in both text and image generation.
What Problem Does This Paper Address?
While diffusion models excel at generating high-quality images, video, and text, controlling them to satisfy specific user preferences or constraints (such as strict prompt alignment or safety filters) remains a significant challenge.
The standard approach to solving this is fine-tuning via reinforcement learning or direct preference optimization (DPO). However, fine-tuning is computationally expensive, locks the model into a single reward function, and risks mode collapse.
Existing inference-time alternatives also have major drawbacks:
- Gradient-based guidance requires differentiable reward functions and continuous state spaces, making it unusable for discrete modalities like text or non-differentiable off-the-shelf reward models.
- Best-of-N sampling (importance sampling) is highly inefficient because it wastes massive amounts of compute running low-quality samples all the way to completion before filtering them.
FK steering bridges this gap by providing a flexible, gradient-free, inference-time framework suitable for both discrete and continuous diffusion models.
Methods
The authors introduce Feynman-Kac (FK) steering, which treats the generation process as a Feynman-Kac interacting particle system (FK-IPS).
Instead of generating a single sample, the method tracks $k$ parallel diffusion paths called particles. At scheduled intermediate denoising steps, these particles are evaluated using a potential function derived from an off-the-shelf reward model. Promising particles with high potential are duplicated (resampled), while low-performing ones are terminated.
To make this computationally practical and effective, the authors introduce three key innovations:
- Interval Resampling: Instead of evaluating particles at every single denoising step, resampling happens only at a few scheduled intervals, drastically reducing computational overhead.
- New Potential Formulations: Traditional sequential Monte Carlo methods use "difference" potentials (reward changes between steps). The authors introduce
MAXandSUMpotentials. They show that theMAXpotential avoids penalizing particles that hit a reward ceiling early in the generation process. - Denoised Estimate Evaluation: Because standard reward models expect fully formed, clean data ($x_0$), FK steering evaluates them on the model's intermediate denoised estimate ($\hat{x}_t$) at time $t$, allowing the use of off-the-shelf classifiers without retraining them on noisy data.
Datasets
The framework was evaluated across multiple tasks using several established benchmarks:
- GenEval: A benchmark for evaluating text-to-image prompt fidelity (focusing on object counts, attributes, and spatial relations).
- ImageReward & HPSv2: Human preference models used to score image aesthetics and alignment.
- Corpus of Linguistic Acceptability (CoLA): Used to evaluate and reward grammatical correctness in text generation.
- OpenWebText: Used to train intermediate toxicity classifiers for safety red-teaming evaluations.
Key Insights and Ideas
- Test-Time Compute Scaling Beats Model Scale: One of the most striking findings is that scaling compute at inference time can substitute for model parameters. A smaller, steered 0.8B parameter model can achieve better prompt alignment than a 2.6B parameter fine-tuned model.
- Off-the-Shelf Rewards Work on Intermediate States: You don't need to train specialized reward models on noisy, intermediate diffusion states. Evaluating standard reward models on the single-step denoising approximation ($\hat{x}_t$) provides a reliable enough signal to steer the generation path effectively.
- The Pitfall of Difference Potentials: For bounded reward functions, traditional difference potentials assign low scores to paths that reach maximum reward early because their reward stops increasing. Tracking the peak reward via a
MAXpotential preserves these high-quality paths.
Key Results
- Image Generation: FK Steering with just $k=4$ particles consistently outperformed both the base models and their fine-tuned versions (DPO, DDPO) on GenEval prompt fidelity and ImageReward human preference scores.
- Compute Efficiency: Stable Diffusion v2.1 with FK Steering ($k=3$) achieved a higher GenEval score than a fine-tuned SDXL model while requiring fewer total FLOPs and less sampling time (9.1s vs 11.5s).
- Text Generation: When applied to text diffusion models (SSD-LM and MDLM), FK steering dramatically improved fluency and perplexity. For instance, it lowered MDLM's perplexity from 85.3 to 40.3 using a simple trigram reward.
- Controllability & Red-Teaming: In a toxicity generation task (used for safety red-teaming), FK steering successfully increased the toxicity rate of a text diffusion model from 0.3% to 64.7% ($k=8$), vastly outperforming standard Best-of-N sampling, which only reached 3.7%.
Limitations and Future Work
- Dependency on Reward Quality: The performance of FK steering is strictly bounded by the accuracy and robustness of the reward function used. Weak or exploitable reward models could lead to adversarial or degenerate generations.
- Static Particle Budgets: The current framework uses a fixed number of particles ($k$) throughout the entire generation process. The authors note that dynamically allocating particles—expanding the pool only when entering highly promising or ambiguous regions—is a valuable direction for future work.
Summary updated