Self-Rewarding Language Models

Weizhe Yuan, Richard Yuanzhe Pang, Kyunghyun Cho, Xian Li, Sainbayar Sukhbaatar, Jing Xu, Jason E Weston

Abstract

Traditional alignment of Large Language Models (LLMs) via Reinforcement Learning from Human Feedback (RLHF) is constrained by the availability and quality of human preference data. This paper introduces Self-Rewarding Language Models, a framework where the model acts as its own judge, generating and scoring its own training data through an iterative loop. By employing Iterative Direct Preference Optimization (DPO), the model develops a "virtuous circle": it simultaneously improves its instruction-following capabilities and its ability to evaluate response quality. Experimental results show that a Self-Rewarding Llama 2 70B model can outperform established proprietary models, including GPT-4 0613 and Claude 2, on the AlpacaEval 2.0 benchmark.

Introduction

The alignment of Large Language Models (LLMs) with human intent has primarily relied on Reinforcement Learning from Human Feedback (RLHF). In this paradigm, a separate reward model is trained on human preferences and then used to fine-tune the LLM. While effective, this approach faces two significant bottlenecks: the "Human Ceiling," where model performance is capped by human evaluative limits, and the "Static Reward Problem," where a frozen reward model cannot adapt to the increasing complexity of the LLM's outputs during training.

To overcome these limitations, this research proposes a self-alignment framework that enables an LLM to provide its own rewards. By training the model to be both a responder and a judge, the researchers demonstrate that models can improve beyond the constraints of initial human-labeled datasets.

Methodology: Iterative Direct Preference Optimization

The core of the proposed approach is Iterative Direct Preference Optimization (DPO). This process transforms a base model into a self-rewarding agent through a series of iterations ($M_1, M_2, \dots, M_t$).

1. Initialization ($M_1$)

The process begins with a base Llama 2 70B model. It is fine-tuned on a small "Seed" dataset consisting of:

  • Instruction Fine-Tuning (IFT): Standard instruction-following examples derived from the Open Assistant dataset.
  • Evaluation Fine-Tuning (EFT): Data that teaches the model how to score responses on a 1-5 scale using a "Chain-of-Thought" (CoT) reasoning process.

2. Self-Instruction and Evaluation

Once initialized, the model generates new prompts and multiple candidate responses for those prompts. It then applies its "LLM-as-a-Judge" capability to evaluate these responses. The model uses an additive 5-point scoring system, which was found to be more effective than multiple-choice prompts by forcing the model to justify its scores through logical sub-components (e.g., relevance, helpfulness).

3. Iterative Training ($M_2, M_3$)

The highest and lowest-scoring responses generated by the model are paired to create a preference dataset. The model is then updated using DPO on this self-generated data. This cycle is repeated, with each iteration $M_t$ providing the training data for the next iteration $M_{t+1}$.

The Virtuous Circle of Self-Improvement

A key insight of this work is the emergence of a "virtuous circle." As the model is trained to follow instructions more effectively, it inherently becomes a more accurate judge of quality. This improvement occurs even without the addition of new human-labeled evaluation data. The researchers observed "task transfer," where the skills required for evaluation and generation reinforce one another, leading to a model that is both a better writer and a better critic.

Experimental Results

The Self-Rewarding Llama 2 70B model was evaluated against several benchmarks, most notably AlpacaEval 2.0, which measures win rates against GPT-4 Turbo.

  • Performance Gains: After three iterations ($M_3$), the model achieved a win rate of 20.44%. This result is significant as it surpasses several leading proprietary models, including Claude 2 (17.19%), Gemini Pro (16.85%), and GPT-4 0613 (15.76%).
  • Reward Accuracy: The model’s alignment with human preference rankings improved significantly. The pairwise agreement with human judges rose from 65.1% in the $M_1$ baseline to 81.7% in the $M_3$ iteration.
  • Response Characteristics: The model learned that detailed, longer responses are often preferred. The average response length increased from 1,092 tokens in $M_1$ to 2,552 tokens in $M_3$, reflecting a common trend in human preference data.

Discussion and Limitations

While the results are promising, the authors identify several challenges for future research:

  • Saturation and Decay: The self-improvement loop may eventually reach a point of diminishing returns or "model collapse" if the model begins to over-optimize for its own internal biases.
  • Reward Hacking: There is a risk that the model learns to generate responses that satisfy its internal scoring criteria (e.g., length or politeness) without actually improving in quality or accuracy.
  • Reasoning vs. Creativity: The framework showed substantial gains in general and creative tasks, but improvements in complex reasoning (math and logic) were less pronounced, suggesting a need for specialized seed data in those domains.
  • Safety: The impact of self-rewarding loops on safety guardrails requires further investigation to ensure models do not inadvertently reward harmful but helpful-sounding content.

Conclusion

Self-Rewarding Language Models represent a shift toward autonomous model alignment. By removing the dependency on a static, human-trained reward model, this approach opens a path toward models that can continuously improve their performance and evaluative capabilities, potentially surpassing the "human ceiling" that limits current AI development.

Summary updated

BibTeX
@inproceedings{yuan2024self,
  author = {Weizhe Yuan and Richard Yuanzhe Pang and Kyunghyun Cho and Xian Li and Sainbayar Sukhbaatar and Jing Xu and Jason E Weston},
  title = {{Self-Rewarding Language Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=0NphYCmgua},
}
Figure