Test-time Alignment of Diffusion Models without Reward Over-optimization

Sunwoo Kim, Minkyu Kim, Dongmin Park

Introduction

Researchers have introduced Diffusion Alignment as Sampling (DAS), a training-free method that aligns diffusion models with specific rewards (like aesthetics or human preference) during inference. By using a "tempered" Sequential Monte Carlo approach, DAS achieves the high reward scores typical of fine-tuning methods while avoiding their biggest pitfall: "reward over-optimization," which usually destroys image diversity and model versatility.

The Alignment Challenge

Aligning a pre-trained diffusion model (like Stable Diffusion) with specific goals—such as making images more "aesthetic" or following prompts more accurately—is surprisingly difficult. Currently, researchers use two main strategies, both of which have notable flaws:

  1. Fine-tuning (RL or Direct Backprop): This often leads to reward over-optimization. The model becomes "mode-seeking," meaning it finds one specific type of output that gets a high score and generates it over and over, losing the diversity and general knowledge it had during pre-training.
RL methods often exhibit mode-seeking behavior, collapsing the distribution to maximize reward.
  1. Guidance (Test-time gradients): This is training-free but often leads to under-optimization. Because these methods rely on noisy, estimated gradients early in the generation process, they struggle to actually maximize complex rewards effectively.
Approximate guidance methods often struggle to optimize the target reward effectively, leading to under-optimization.

The authors identify that fine-tuning is mathematically prone to mode collapse because it minimizes the "reverse KL divergence." They sought a way to achieve high-reward alignment at test-time that is "mode-covering" rather than "mode-seeking."

Methods: Diffusion Alignment as Sampling (DAS)

The core of the paper is DAS. Instead of changing the model's weights, DAS treats alignment as a sophisticated sampling problem using Sequential Monte Carlo (SMC).

  • Parallel Particles: DAS maintains multiple candidate images (particles) in parallel during the denoising process.
  • Resampling: At each step, it evaluates these candidates against the reward function. High-scoring candidates are "cloned," while low-scoring ones are discarded.
  • Tempering (The Secret Sauce): Standard SMC is computationally expensive. DAS uses tempering, where the influence of the reward starts very small and gradually increases as the image becomes less noisy. This "smooths" the target distribution, making it much easier for the particles to find high-reward regions without getting stuck.
  • Locally Optimal Proposal: The authors derived a mathematical way to nudge the particles toward high-reward areas at each step (using a first-order Taylor approximation), which significantly improves efficiency.

Datasets and Evaluation

The authors evaluated DAS using industry-standard backbones (Stable Diffusion v1.5 and SDXL) and several reward models:

  • LAION Aesthetic Score: To measure visual beauty.
  • PickScore: To measure alignment with human preferences.
  • CLIPScore: To measure how well an image matches a text prompt.
  • JPEG Compressibility: Used as a test for non-differentiable, "black-box" rewards.

Prompts were sourced from ImageNet (animals) and the Human Preference Dataset v2 (HPDv2).

Key Insights and Results

  • Alignment is Sampling: The most profound insight is that "aligning" a model is mathematically equivalent to sampling from a specific "reward-aligned" distribution. If you can sample correctly, you don't need to re-train the model.
  • Mode-Covering vs. Mode-Seeking: Fine-tuning naturally collapses onto a single high-reward peak. DAS, by using SMC, is designed to cover the entire distribution, preserving the variety of the original model.
  • Superior Diversity: DAS maintained significantly higher diversity (measured by LPIPS and CLIP Entropy) compared to fine-tuning methods like DDPO or AlignProp, even when achieving the same reward scores.
  • Pareto Front Improvement: In multi-objective scenarios (e.g., high aesthetics AND high prompt alignment), DAS established a new "Pareto front," achieving combinations of rewards that previous methods simply couldn't reach. For example, fine-tuning often "forgot" parts of a prompt to maximize beauty, whereas DAS consistently kept all elements of the prompt.
  • Online Efficiency: In "black-box" settings where the reward function is unknown and must be learned from feedback, DAS improved the pre-trained model by up to 20% in both target and unseen rewards.

Limitations and Future Work

  • Computational Overhead: Because DAS runs multiple particles in parallel, it is inherently slower than a single-pass generation. While 4 particles are efficient, they still require 4x the memory/compute of a standard generation.
  • Differentiability: The "locally optimal proposal" requires a differentiable reward function. While the authors showed a workaround for black-box rewards using surrogate models, the method is most powerful when gradients are available.
  • Future Directions: The authors suggest extending DAS to other modalities like video generation (where temporal consistency is a major alignment challenge) and protein structure design. They also aim to explore more complex, non-uniform tempering schemes.

Summary updated

BibTeX
@inproceedings{kim2025test,
  author = {Sunwoo Kim and Minkyu Kim and Dongmin Park},
  title = {{Test-time Alignment of Diffusion Models without Reward Over-optimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=vi3DjUhFVm},
}
Figure