ULTRAFEEDBACK: Boosting Language Models with Scaled AI Feedback

Ganqu Cui, Lifan Yuan, Ning Ding, Guanming Yao, Bingxiang He, Qiang Yue, Yuan Ni, Guotong Xie, Ruobing Xie, Yankai Lin, Zhiyuan Liu, Maosong Sun

TL;DR

Learning from human feedback is the gold standard for aligning large language models, but it is prohibitively expensive and hard to scale. This paper introduces ULTRAFEEDBACK, a massive, diverse dataset of over 1 million AI-generated preferences and critiques. It proves that high-quality AI feedback can effectively replace human annotators to train state-of-the-art open-source reward and chat models.

What Problem Does This Paper Address?

To make Large Language Models (LLMs) helpful and harmless, developers typically use Reinforcement Learning from Human Feedback (RLHF). However, gathering human preference data—where humans rate and compare different AI responses—is a massive bottleneck. It requires significant time, money, and domain expertise. Consequently, existing open-source preference datasets are either too small, too narrow in scope, or rely on low-quality community upvotes.

The authors tackle this gap by exploring Scalable Oversight via AI Feedback (RLAIF). They ask: Can we use a highly capable model like GPT-4 to automatically generate a massive, diverse, and high-quality preference dataset that allows open-source models to compete with proprietary giants?

Methods

To create a dataset that is both scalable and diverse, the authors designed a meticulous data-generation pipeline:

Overview of the UltraFeedback data generation pipeline
  1. Diverse Instructions & Completions: They gathered ~64,000 prompts from various datasets. To ensure the generated responses had a wide variance in style and quality, they used a pool of 17 different LLMs (ranging from LLaMA and Falcon to GPT-4) to generate four distinct completions per prompt.
  2. Bias-Mitigated AI Annotation: Simply asking GPT-4 "which response is better?" leads to noisy, biased data. To fix this, the authors used several prompting techniques:
  3. Decomposition: GPT-4 scored responses across four specific axes: instruction-following, truthfulness, honesty, and helpfulness.
  4. Simultaneous Scoring: GPT-4 evaluated all four completions side-by-side to provide consistent cross-references.
  5. Chain-of-Thought Rationales: GPT-4 was forced to write a detailed textual critique explaining its reasoning before assigning a numerical score based on a strict rubric.
  6. Model Training: Using this data, they trained UltraRM (a LLaMA2-13B based reward model), UltraCM (a critique model), and finally aligned a chat model, UltraLM-13B-PPO, using reinforcement learning.

Datasets

  • Introduced - ULTRAFEEDBACK: A dataset of 250k user-assistant conversations with over 1 million GPT-4 annotations. It is uniquely valuable because it provides both fine-grained scalar scores and detailed textual critiques.
  • Instruction Sources: Sampled from TruthfulQA, FalseQA, Evol-Instruct, UltraChat, ShareGPT, and FLAN.
  • Evaluation Benchmarks:
  • For the Reward Model: OpenAI WebGPT, Anthropic Helpful, OpenAI Summarization, Stanford SHP.
  • For the Chat Model: AlpacaEval, Evol-Instruct, UltraChat.

Key Insights and Ideas

  • Fine-grained scoring beats holistic scoring: Asking an AI judge to evaluate specific aspects (like truthfulness and helpfulness) simultaneously across multiple models reduces randomness. Reward models trained on these averaged, fine-grained scores generalized much better than those trained on a single "overall quality" score.
  • Diversity prevents "style" shortcuts: By using 17 different models to generate the comparison data, the reward model is forced to learn actual quality differences rather than just memorizing and preferring a specific model's formatting or tone.
  • Best-of-$n$ sampling is a powerful, training-free hack: If you have a strong reward model, you don't necessarily need complex reinforcement learning. Simply generating multiple responses from a base model and using UltraRM to pick the best one yields massive improvements. As shown below, increasing the number of samples from 1 to 16 boosted a model's win rate from 76.5% to 91.5% on AlpacaEval.
Effect of Best-of-n sampling on reward and win rate
  • Critiquing is a learnable, specialized skill: The authors fine-tuned a model (UltraCM) solely on the textual critiques in the dataset. It dramatically outperformed general-purpose models of the same size at providing constructive feedback, proving that "giving feedback" can be isolated and taught.

Key Results

  • State-of-the-Art Reward Model: UltraRM achieved an average accuracy of 71.0% across four human preference benchmarks, outperforming all existing open-source reward models and generalizing exceptionally well to unseen datasets.
  • Exceptional Chat Performance: After applying PPO (Reinforcement Learning) using UltraRM, the resulting chat model (UltraLM-13B-PPO) achieved an average win rate of 69.7% across three benchmarks. It notably outperformed the much larger LLaMA2-70B-Chat (67.7%) and crushed its own non-aligned baseline (52.9%).
  • High Human Agreement: GPT-4's preference judgments aligned with the majority vote of human annotators 68.6% of the time, validating that AI feedback is a highly reliable proxy for human preference.

Limitations and Future Work

  • Single-Turn Only: The current ULTRAFEEDBACK dataset is limited to single-turn dialogues. Real-world interactions often require multi-turn conversational alignment.
  • AI Judge Blindspots: While GPT-4 aligns well with humans on writing and QA tasks, the authors noted it sometimes diverges from human consensus on complex reasoning and math tasks, occasionally underestimating correct logical answers.
  • Future Work: The authors plan to expand AI feedback to cover multi-turn dialogues, complex coding/math reasoning, and safety-specific scenarios, while continuing to refine techniques to eliminate LLM-as-a-judge biases (like preferring longer responses).

Summary updated

BibTeX
@inproceedings{cui2024ultrafeedback,
  author = {Ganqu Cui and Lifan Yuan and Ning Ding and Guanming Yao and Bingxiang He and Qiang Yue and Yuan Ni and Guotong Xie and Ruobing Xie and Yankai Lin and Zhiyuan Liu and Maosong Sun},
  title = {{ULTRAFEEDBACK: Boosting Language Models with Scaled AI Feedback}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=BOorDpKHiJ},
}
Figure