NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diffusion Model Alignment Using Direct Preference Optimization

Bram Wallace, Meihua Dang, Rafael Rafailov, Linqi Zhou, Aaron Lou, Senthil Purushwalkam, Stefano Ermon, Caiming Xiong, Shafiq Joty, Nikhil NaikCVPR 2023

Abstract

Large language models (LLMs) are fine-tuned using human comparison data with Reinforcement Learning from Human Feedback (RLHF) methods to make them better aligned with users' preferences. In contrast to LLMs, human preference learning has not been widely explored in text-to-image diffusion models; the best existing approach is to fine-tune a pretrained model using carefully curated high quality images and captions to improve visual appeal and text alignment. We propose Diffusion-DPO, a method to align diffusion models to human preferences by directly optimizing on human comparison data. Diffusion-DPO is adapted from the recently developed Direct Preference Optimization (DPO), a simpler alternative to RLHF which directly optimizes a policy that best satisfies human preferences under a classification objective. We re-formulate DPO to account for a diffusion model notion of likelihood, utilizing the evidence lower bound to derive a differentiable objective. Using the Pick-a-Pic dataset of 851K crowdsourced pairwise preferences, we fine-tune the base model of the state-of-the-art Stable Diffusion XL (SDXL)-1.0 model with Diffusion-DPO. Our fine-tuned base model significantly outperforms both base SDXL-1.0 and the larger SDXL-1.0 model consisting of an additional refinement model in human evaluation, improving visual appeal and prompt alignment. We also develop a variant that uses AI feedback and has comparable performance to training on human preferences, opening the door for scaling of diffusion model alignment methods.

Introduction

While Large Language Models (LLMs) like GPT-4 undergo a rigorous "alignment" phase to match human expectations, text-to-image diffusion models have largely lagged behind. Most diffusion models are trained in a single stage on massive web-scale datasets. While effective, this often results in models that struggle with specific human nuances, such as aesthetic "vibes" or complex prompt following.

Existing alignment attempts usually rely on Supervised Fine-Tuning (SFT) on curated datasets or Reinforcement Learning from Human Feedback (RLHF). However, SFT is often too rigid to capture subtle preferences, and RLHF is notoriously difficult to implement for diffusion—it requires training a separate reward model and using unstable reinforcement learning loops. The challenge was to find a way to bake human preferences directly into the diffusion training process in a stable, scalable way.

Methodology: Diffusion-DPO

Researchers from Salesforce AI and Stanford have adapted Direct Preference Optimization (DPO)—a breakthrough technique for aligning LLMs—to text-to-image diffusion models. The authors introduce Diffusion-DPO, a direct adaptation of the DPO framework originally designed for LLMs.

The core innovation lies in how they handle the "likelihood" of an image. In LLMs, calculating the probability of a word is straightforward. In diffusion models, the exact likelihood of an image is mathematically intractable because it involves marginalizing over all possible denoising paths. To solve this, the researchers:

  1. Re-formulated the DPO objective using the Evidence Lower Bound (ELBO), a standard tool in variational inference.
  2. Derived a differentiable loss function that essentially compares the denoising error of a "preferred" image versus a "non-preferred" image, relative to a reference model.
  3. Ensured the model learns to decrease the error on the preferred image while (relatively) increasing it on the non-preferred one.

This approach eliminates the need for a separate reward model or complex policy-gradient RL, making the training process as stable as standard fine-tuning.

Key Insights and Ideas

One of the most striking findings is that a "base" SDXL model tuned with Diffusion-DPO (3.5B parameters) outperformed the full SDXL pipeline (6.6B parameters), which includes an additional heavy "refiner" model. This suggests that alignment is a more efficient way to gain quality than simply adding more parameters.

Diverse high-quality images generated using the Diffusion-DPO fine-tuned SDXL model.

Furthermore, human preference data naturally contains a bias against "body horror" (extra fingers, mangled limbs). By training on these preferences, the model "distilled" the ability to generate better anatomical features like teeth and hands without being explicitly told how. The authors also showed that Diffusion-DPO works even when the "preferences" are generated by an AI scoring model (like PickScore or HPSv2) rather than humans. This "RLAIF" (Reinforcement Learning from AI Feedback) approach opens the door to scaling alignment without needing millions of human man-hours.

Key Results

The primary training set used was Pick-a-Pic (v2), containing 851,293 pairwise preferences across 58,960 unique prompts. Evaluation was conducted on benchmarks like PartiPrompts and HPSv2.

  • Human Evaluation: On the PartiPrompts benchmark, humans preferred DPO-tuned SDXL images 70% of the time over the standard SDXL base model.
  • Visual Appeal vs. Alignment: The model didn't just make "prettier" images; it also improved Prompt Alignment (how well the image matches the text). In head-to-head tests, it beat the base model in both categories.
  • State-of-the-Art: DPO-SDXL achieved an average reward of 28.16 on the HPSv2 benchmark, topping the public leaderboard at the time of the paper's release.
  • Image Editing: When used for image-to-image tasks (via SDEdit), the DPO-tuned model was preferred 65% of the time compared to the baseline.
Human preference results on PartiPrompts and HPS benchmarks, showing DPO-SDXL significantly outperforming the base SDXL model.

Limitations and Future Work

Like all models trained on web data and human labels, Diffusion-DPO can inherit and amplify the biases of its labelers. The authors note that the model can propagate specific aesthetic "vibes" (like high contrast or dramatic lighting) that might not be universally preferred. While the method improves quality, it doesn't inherently solve the problem of generating harmful or sexually explicit content. The authors emphasize the need for additional safety filtering.

Currently, Diffusion-DPO is an "offline" algorithm, meaning it learns from a static dataset of preferences. The authors suggest that "online" versions—where the model generates images and receives feedback in real-time—could be a promising future direction for even better performance.

Summary updated

BibTeX
@inproceedings{wallace2023diffusion,
  author = {Bram Wallace and Meihua Dang and Rafael Rafailov and Linqi Zhou and Aaron Lou and Senthil Purushwalkam and Stefano Ermon and Caiming Xiong and Shafiq Joty and Nikhil Naik},
  title = {{Diffusion Model Alignment Using Direct Preference Optimization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=ChJmBulfTo},
}
Figure