Diffusion models have revolutionized generative AI, but "steering" them toward specific goals—such as maximizing image aesthetics or ensuring a protein design is physically viable—remains a significant hurdle. Traditionally, this steering requires "guidance," a process that often involves calculating complex gradients or scores of a reward function at every single step of the generation process.
The paper "Simple Approximation and Derivative Free Inference-Time Scaling for Diffusion Models via Sequential Monte Carlo on Path Measures" introduces a refreshing alternative called URGE (Unbiased Resampling via Girsanov Estimation). URGE offers a way to guide these models that is completely derivative-free, simpler to implement, and theoretically robust.
The Challenge of Inference-Time Scaling
When utilizing a pre-trained diffusion model, practitioners often want to "nudge" the output toward a specific objective, such as aligning an image more closely with a text prompt or solving an inverse problem like deblurring. This process is known as inference-time scaling or guidance.
The standard approach involves adding a "drift" term to the model's underlying stochastic differential equation, usually derived from the gradient of a reward function. However, this introduces three major bottlenecks:
- Computational Cost: Calculating gradients of large neural reward models at every denoising step is prohibitively slow.
- Inaccessibility: Many modern reward models are "black boxes" accessed via APIs. While they provide a scalar score, they do not expose the gradients required for traditional guidance.
- Bias: Most practical guidance methods rely on approximations that fail to sample from the true "reward-tilted" distribution, ultimately degrading generation quality.
The URGE Solution: Path-Space Resampling
URGE bypasses these bottlenecks by shifting the perspective from individual particles (points in time) to entire paths (trajectories).
Instead of calculating a local gradient to "push" a generation at every step, URGE treats generation as a survival-of-the-fittest competition among multiple trajectories. It simulates multiple potential paths simultaneously and uses Girsanov’s Theorem—a fundamental concept in stochastic calculus—to assign a simple multiplicative weight to each path. This weight reflects how much more likely a given path is to yield a high-reward outcome compared to the unguided base model.
The URGE Workflow
- Simulate: Run $N$ parallel diffusion trajectories.
- Weight: At each step, update a weight for each path based on the reward function and the "path information" (the deviation of the guided path from the base model).
- Resample: Periodically perform Sequential Monte Carlo (SMC) resampling. High-weight paths are cloned, while low-weight paths are discarded.
Crucially, this entire process requires zero derivatives. The algorithm only requires forward passes to evaluate the reward function.
Key Insights and Theoretical Guarantees
- Path-Particle Equivalence: The paper's core theoretical contribution is a mathematical proof demonstrating that resampling in path space (as done in URGE) is equivalent to resampling in particle space (as seen in previous methods like AFDPS). This guarantees that URGE produces the same unbiased terminal law without the technical nightmare of computing score functions, Hessians, or complex PDEs.
- Derivative-Free Practicality: Because URGE does not require gradients, it is compatible with any reward model, including non-differentiable functions, human-in-the-loop feedback, or restricted API-based models.
- Stochastic Information Matters: Unlike previous deterministic methods, URGE incorporates stochastic path information (the Ito integral of the path). This inclusion makes the resampling process more accurate and significantly reduces variance.
Experimental Validation and Results
The researchers validated URGE across three distinct domains, demonstrating its versatility and state-of-the-art performance:
- Synthetic Benchmarks: On a 30-dimensional Gaussian Mixture Model (GMM) with 40 components, URGE achieved the lowest Maximum Mean Discrepancy (MMD) and Wasserstein distance, matching the target distribution more closely than any baseline.
- Inverse Problems: URGE successfully tackled tasks like Gaussian deblurring, motion deblurring, super-resolution, and box inpainting using the ImageNet-256 and FFHQ-256 datasets.
- Text-to-Image Generation: Using Stable Diffusion (v1.5 and XL) guided by reward models like ImageReward, HPS, and CLIP-Score, URGE consistently outperformed base models and competing steering methods. Notably, using a smaller model (SD v1.5) equipped with URGE often produced better prompt alignment than the much larger SDXL model without it.
Furthermore, URGE scales monotonically: as the number of particles ($N$) increases, its performance improves more rapidly than competitors like FK-Steering. It is also significantly faster than gradient-based methods by avoiding expensive backward passes.
Limitations and Future Directions
While URGE represents a significant leap forward, the authors note a few practical considerations:
- Time Step Sensitivity: To maintain stable importance weights, the algorithm requires relatively small discretization time steps. Excessively large steps can cause the weights to become noisy.
- Particle Overhead: As an ensemble method, URGE requires running multiple trajectories in parallel. While highly parallelizable on modern GPUs, it consumes more memory than single-image generation.
Future work will likely explore more sophisticated numerical schemes beyond the simple Euler-Maruyama discretization, aiming to improve accuracy and enable larger time steps without sacrificing stability.
Based on: Wang, C., et al. "Simple Approximation and Derivative Free Inference-Time Scaling for Diffusion Models via Sequential Monte Carlo on Path Measures."
Summary updated