Steering Generative Models

Guidance vector fields that actively redirect generative trajectories toward target distributions.

Intuition

Goal: given a pretrained generative model and a reward function on its outputs, draw samples concentrated on high-reward outputs — without retraining or fine-tuning the generator.

Standard generative models produce samples by transporting noise through a fixed drift to data. But what if we want to steer generation toward a specific target — high-reward outputs, a constrained region, a desired class — without retraining the model?

We do source steering: instead of modifying the generator, we re-weight the noise inputs. We define a reward consistent with the steering target on the output space, then sample source latents in proportion to that reward. The key step is that evaluating the reward at any candidate source requires running the generator forward and scoring the resulting output distribution.

This reward landscape over the source is rugged and high-dimensional, so we use Parallel Tempering MCMC: a ladder of replicas at increasing temperatures explores the source space in parallel and swaps states across temperatures, letting cold chains escape local modes through their hotter neighbors.

Parallel Tempering: replicas at increasing temperatures explore the rugged reward landscape over the source; cold chains lock into modes while hot chains tunnel between them, with periodic swaps mixing the ladder.

source space ε output space x p(ε) = 𝒩(0, I) β₁ β₂ β₃ β₄ G_θ forward pass target manifold & reward r(x) high r low r R(ε) = 𝔼[r(x)] → MH PT MCMC explores ε scored on outputs

Mathematics

Let $G_\theta : \epsilon \mapsto x$ be the pretrained generator with source prior $\epsilon \sim \mathcal{N}(0, I)$, and let $r(x)$ be a reward consistent with the steering target. The induced reward on the source is

$$R(\epsilon) \;=\; \mathbb{E}_{x \sim G_\theta(\epsilon)}\!\bigl[\, r(x) \,\bigr],$$

which requires running the generator forward at every candidate $\epsilon$. We sample the steered source distribution

$$\pi(\epsilon) \;\propto\; p(\epsilon)\, \exp\!\bigl(R(\epsilon)\bigr)$$

using Parallel Tempering MCMC. A ladder of replicas $\epsilon^{(1)}, \dots, \epsilon^{(K)}$ targets tempered densities $\pi_k(\epsilon) \propto p(\epsilon)\, \exp(\beta_k R(\epsilon))$ with inverse temperatures $\beta_1 > \cdots > \beta_K$. Adjacent replicas propose swaps accepted with

$$\alpha = \min\!\left\{ 1,\; \exp\!\bigl[(\beta_k - \beta_{k+1})\bigl(R(\epsilon^{(k+1)}) - R(\epsilon^{(k)})\bigr)\bigr] \right\}.$$

Hot chains tunnel through low-reward barriers; cold chains exploit high-reward modes. Pushing the cold chain through $G_\theta$ yields steered samples without ever retraining the generator.

Results

Steering Stable Diffusion v1.4 with a human-preference reward. For each prompt, we compare unsteered base samples (left) against samples drawn from the steered source distribution via SPT (right). SPT concentrates mass on high-reward outputs without retraining the generator.

Base Stable Diffusion
SPT (ours)
Base Stable Diffusion, prompt 1 SPT, prompt 1 Base Stable Diffusion, prompt 2 SPT, prompt 2
Prompt 1: portrait of an old sea captain, detailed face, fantasy, cinematic, art painting by greg rutkowski. Prompt 2: extremely detailed stunning beautiful futuristic smooth curvilinear museum interior, colorful, hyper, real.
Wasserstein distance vs reward-peak width
Quantitative comparison on a 1D analytic benchmark: 2-Wasserstein distance between the sampled and exact reward-tilted distribution, as the reward peak sharpens ($\omega^2$ decreases). The baseline shown is FK Steering — the prior state-of-the-art gradient-free method — whose error grows sharply as the target concentrates in low-probability regions. SPT remains stable across the full range.

Why It Matters

Conditional generation
Image editing
Constrained optimization
Safe generation
Reward-guided sampling
Multi-objective control