Scalable Ranked Preference Optimization for Text-to-Image Generation

Shyamgopal Karthik, Huseyin Coskun, Zeynep Akata, Sergey Tulyakov, Jian Ren, Anil Kag

TL;DR

Researchers have developed RankDPO, a scalable framework that aligns text-to-image (T2I) models using fully synthetic, ranked preference data. By replacing expensive human labels with an ensemble of AI reward models and moving from simple pairwise comparisons to full rankings, they achieved state-of-the-art prompt following and visual quality at a fraction of the traditional cost.

What Problem Does This Paper Address?

Aligning T2I models like Stable Diffusion with human preferences usually relies on Direct Preference Optimization (DPO). However, DPO has a massive "data tax":

  1. Cost: Collecting millions of human-annotated image pairs is incredibly expensive (e.g., the Pick-a-Pic dataset cost ~$50,000).
  2. Staleness: T2I models evolve so fast that human preference datasets become obsolete quickly; a model trained on 512px images from last year isn't ideal for today's 1024px models.
  3. Limited Signal: Standard DPO uses pairwise comparisons (Image A > Image B), which ignores the richer information available when you have multiple versions of an image for the same prompt.

Methods

The authors introduce two core innovations to solve these issues:

1. Syn-Pic: A Fully Synthetic Ranked Dataset

Instead of asking humans which image they like, the authors generated images for 58,000 prompts using four different state-of-the-art models (SDXL, SD3-Medium, PixArt-Σ, and Stable Cascade). To label them, they used an ensemble of five reward models (like PickScore and ImageReward). By aggregating these scores, they created a ranking of images for every prompt. This process cost roughly $200, compared to the $50,000 required for human-labeled equivalents.

2. RankDPO: Ranking-based Preference Optimization

Standard DPO only cares if the "winner" beats the "loser." RankDPO draws inspiration from the "Learning to Rank" literature. It uses a loss function weighted by Discounted Cumulative Gain (DCG). This ensures the model pays more attention to getting the top-ranked images right, providing a much stronger training signal than simple pairs.

Figure 2: Overview of our two novel components: (A) Syn-Pic and (B) RankDPO. Left illustrates the pipeline to generate a synthetically ranked preference dataset. It starts by collecting prompts and generating images using the same prompt for different T2I models. Next, we calculate the overall preference score using Reward models (e.g., PickScore, ImageReward). Finally, we rank these images in the decreasing order of preference scores. Right: Given true preference rankings for generated images per prompt, we first obtain predicted ranking by current model checkpoint using scores si (see Eq. 5). In this instance, although the predicted ranking is inverse of the true rankings, the ranks (1, 4) obtains a larger penalty than the ranks (2, 3). This penalty is added to our ranking loss through DCG weights (see Eq. 6). Thus, by optimizing θ with Ranking Loss (see Eq. 7), the updated model addresses the incorrect rankings (1, 4). This procedure is repeated over the training process, where the rankings induced by the model aligns with the labelled preferences.

Datasets

  • Syn-Pic (Training): A new synthetic dataset containing 240,000 images across 58,000 prompts, each ranked by an ensemble of AI reward models.
  • Evaluation Benchmarks: The models were tested on GenEval (object counting/positioning), T2I-Compbench (complex attribute binding), and DPG-Bench (long, detailed prompts).

Key Insights and Ideas

  • AI Feedback is Enough: The paper demonstrates that we've reached a point where ensembles of reward models can effectively substitute for human annotators in the DPO loop.
  • Ranking > Pairwise: Moving from binary "this is better than that" to a list-wise ranking allows the model to learn finer distinctions in quality and prompt alignment.
  • Ensembles Mitigate "Reward Hacking": A single reward model can be "gamed" by a generator (improving the score without improving the image). By averaging five different reward models, the authors created a more robust signal that is harder to hack.
  • Scalability: Because the pipeline is automated, it can be re-run every time a new, better T2I model is released, keeping the preference data "fresh."

Key Results

RankDPO significantly improved the performance of both SDXL and SD3-Medium across all major benchmarks:

  • Prompt Alignment: On DPG-Bench, RankDPO improved SDXL's alignment score from 74.65 to 79.26, outperforming other popular methods like MaPO and SPO.
  • Attribute Binding: In T2I-Compbench, the "Color" attribute score for SDXL jumped from 58.79 to 72.33.
  • Human Preference: In a user study, humans preferred images generated by RankDPO over the base SDXL model nearly 60% of the time.
Figure 1: Our approach, trained on a synthetic preference dataset with a ranking objective in the preference optimization, improves prompt following and visual quality for SDXL (Podell et al., 2023) and SD3-Medium (Esser et al., 2024), without requiring any manual annotations.
Win rates of RankDPO compared to DPO-SDXL and base SDXL in human studies.

Limitations and Future Work

  • Prompt Diversity: The current version of Syn-Pic relies on prompts from the Pick-a-Picv2 dataset. The authors note that expanding the variety of prompts would likely further improve the model's utility.
  • Safety: The study focused on visual quality and prompt alignment. The authors suggest that preference optimization is also well-suited for improving the safety and filtering of T2I models, which remains a task for future research.
  • Computational Cost: While labeling is cheap, generating the initial images and running the optimization still requires significant GPU resources (though still less than training from scratch).

Summary updated

BibTeX
@misc{karthik2024scalable,
  author = {Shyamgopal Karthik and Huseyin Coskun and Zeynep Akata and Sergey Tulyakov and Jian Ren and Anil Kag},
  title = {{Scalable Ranked Preference Optimization for Text-to-Image Generation}},
  year = {2024},
  eprint = {2410.18013},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.18013},
}
Figure