Aligning Text-to-Image Models using Human Feedback

Kimin Lee, Hao Liu, Moonkyung Ryu, Olivia Watkins, Yuqing Du, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, Shixiang Shane GuarXiv 2023

While deep generative models like Stable Diffusion have revolutionized image synthesis, they often suffer from "alignment" issues—you ask for "two green dogs," and you might get one brown dog or three green ones. This paper, a collaboration between Google Research and UC Berkeley, adapts the successful "Reinforcement Learning from Human Feedback" (RLHF) framework from the world of Large Language Models (LLMs) to make text-to-image models follow instructions more faithfully.

TL;DR

The authors propose a three-stage fine-tuning pipeline that uses human feedback to align text-to-image models with user intent. By training a reward model on human-labeled data and using it to guide fine-tuning via reward-weighted likelihood maximization, they significantly improve the model's ability to handle specific counts, colors, and backgrounds.

What Problem Does This Paper Address?

Current text-to-image (T2I) models are typically trained on massive, noisy datasets scraped from the web (like LAION). While these models generate high-fidelity images, they often struggle with compositional alignment. Specifically, they fail at:

  1. Attribute binding: Assigning the correct color to the correct object.
  2. Counting: Generating the exact number of objects requested.
  3. Spatial/Background consistency: Placing objects in the correct environment.

The core issue is that the training objective (predicting noise or pixels) doesn't perfectly capture what humans care about in a prompt. This paper explores whether direct human feedback can bridge that gap.

Methods

The authors introduce a three-stage approach to bridge the gap between model output and human intent.

Overview of the three-stage pipeline for aligning text-to-image models using human feedback.
  1. Human Data Collection: They generated images from Stable Diffusion using prompts designed to trigger errors (e.g., specific counts and colors). Human raters then provided binary feedback ("good" vs. "bad") based on how well the image matched the prompt.
  2. Reward Learning: They trained a Reward Model (based on CLIP embeddings) to predict these human ratings. To help the reward model generalize better to unseen prompts, they introduced a clever auxiliary task: prompt classification. The model had to identify the original prompt from a set of "perturbed" versions (e.g., distinguishing "red dog" from "blue dog").
The reward model is trained to predict human feedback and perform an auxiliary prompt classification task to improve generalization.
  1. Fine-tuning (Policy Optimization): Instead of using complex RL algorithms like PPO (standard in LLMs), they used reward-weighted likelihood maximization. They updated the T2I model (Stable Diffusion v1.5) to make "good" images more likely. To prevent the model from losing image quality (the "alignment tax"), they included a regularization term using the original pre-training dataset.

Datasets

  • Human Feedback Dataset: A newly collected dataset of 27,528 image-text pairs with binary human labels. The prompts were categorized into Count, Color, Background, and Combinations.
  • LAION-5B (Subset): Used for the pre-training regularization loss to maintain image fidelity.
  • MS-COCO: Used for evaluating image fidelity via the FID (Fréchet Inception Distance) score.

Key Insights and Ideas

  • The Reward Model beats CLIP: Interestingly, the learned reward model predicted human preferences much more accurately than the standard CLIP score. This suggests that while CLIP is great for general semantics, it isn't fine-grained enough to judge specific alignment successes.
  • The "Alignment Tax": There is a clear trade-off between alignment and fidelity. Naive fine-tuning on human feedback significantly improved prompt following but made images look "fried" or oversaturated. Including a small amount of original pre-training data was essential to keep the images looking natural.
  • Generalization to Unseen Objects: Even though the human feedback was collected on a limited set of objects (like dogs and cats), the fine-tuned model showed improved alignment on "unseen" objects (like tigers or wolves), proving the reward model learned general concepts of color and count.
  • Rejection Sampling is a "Free" Win: The authors show that simply generating 16 images and picking the one the Reward Model likes best (rejection sampling) yields huge alignment gains without any fine-tuning at all.

Key Results

  • Alignment Boost: In human evaluations, the fine-tuned model achieved up to a 47% improvement in image-text alignment over the base Stable Diffusion model.
  • Quantitative Success: The reward model achieved ~80% accuracy in predicting human preference on unseen prompts.
  • Fidelity Balance: By using the mixed objective (human feedback + pre-training data), they improved the FID score from 26.59 (pure fine-tuning) to 16.76, bringing it much closer to the original model's 13.97 while keeping the alignment gains.

Limitations and Future Work

  • Oversaturation: The fine-tuned models occasionally produce images with unnaturally high saturation, likely because those images received higher scores from raters during data collection.
  • Limited Diversity: The current study focused on objective categories (color, count, background). It does not yet address more subjective or complex alignment tasks like "artistic style" or "complex human actions."
  • RL vs. Supervised: The authors opted for a simpler supervised-style update. They suggest that moving to full Reinforcement Learning (like PPO) with online sample generation could further improve results but would require more engineering effort.

Summary updated

BibTeX
@misc{lee2023aligning,
  author = {Kimin Lee and Hao Liu and Moonkyung Ryu and Olivia Watkins and Yuqing Du and Craig Boutilier and Pieter Abbeel and Mohammad Ghavamzadeh and Shixiang Shane Gu},
  title = {{Aligning Text-to-Image Models using Human Feedback}},
  year = {2023},
  eprint = {2302.12192},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.12192},
}
Figure