Abstract
Supervised fine-tuning (SFT) has emerged as a crucial method for aligning large language models (LLMs) with human-annotated demonstrations. However, SFT, being an off-policy approach similar to behavior cloning, often struggles with overfitting and poor out-of-domain generalization, especially in limited-data scenarios. To address these limitations, we propose Self-Rewarding PPO, a novel fine-tuning method that leverages on-policy techniques to enhance generalization performance. Our approach combines the strengths of SFT and proximal policy optimization (PPO) to achieve more effective alignment from demonstration data. At its core is a reward function designed as the log policy ratio between the SFT model and the pretrained base model. This function serves as an implicit reward signal, using the pretrained policy as a baseline and the SFT policy as a target. By doing so, it enables on-policy fine-tuning without relying on human preference annotations. The integration of this self-rewarding mechanism with PPO addresses key limitations of SFT, improving generalization, data efficiency, and robustness. Our empirical evaluation across a range of natural language processing tasks demonstrates that Self-Rewarding PPO consistently outperforms traditional SFT methods.
Introduction
The standard pipeline for training Large Language Models (LLMs) typically involves two distinct phases: Supervised Fine-Tuning (SFT), where the model mimics expert demonstrations, and Reinforcement Learning from Human Feedback (RLHF), where the model is refined based on human rankings of its outputs.
While effective, this pipeline faces significant bottlenecks. SFT is an "off-policy" method—essentially behavior cloning—that often overfits to training examples and fails to generalize to unseen prompts. Conversely, RLHF is prohibitively expensive and slow due to its reliance on manual human ranking. Self-Rewarding PPO (SRPPO) addresses these challenges by enabling reinforcement learning using only the demonstration data already available for SFT, bypassing the need for human preference labels entirely.
Methodology
SRPPO introduces a two-stage alignment process that utilizes an implicit "coherent reward" to drive on-policy learning.
- Stage 1: Initial SFT: A pretrained base model ($P_{PT}$) is fine-tuned on high-quality demonstrations to create an initial SFT policy ($P_{SFT}$).
- Stage 2: On-Policy Alignment: The model undergoes Proximal Policy Optimization (PPO). Instead of using an external reward model, SRPPO calculates a Coherent Reward based on the log-probability ratio between the SFT model and the pretrained base model:
$$\text{Reward} = \log \frac{p_{\theta^{(SFT)}}(y|x)}{p_{\theta^{(PT)}}(y|x)}$$
This reward signal encourages the model to generate responses that the aligned SFT model finds highly probable relative to the raw base model. By sampling its own diverse responses (on-policy) and rewarding itself for maintaining the alignment trajectory, the model becomes more robust to out-of-distribution prompts.
Experimental Setup
The researchers evaluated SRPPO using Mistral-7B and Llama-3-8B as base models. Training utilized the TULU-v2-mix dataset (326k instruction-following examples) for SFT and UltraFeedback prompts for the PPO phase. Performance was measured across several rigorous benchmarks:
- IFEval: Instruction following accuracy.
- GSM8k: Mathematical reasoning.
- GPQA: Graduate-level science questions.
- AlpacaEval: Conversational quality and win rates.
Key Results
SRPPO consistently outperformed standard SFT and competitive self-play baselines like SPIN across all benchmarks. On the Mistral-7B model, SRPPO achieved an average score of 32.43, a significant improvement over the 29.96 achieved by standard SFT.
Beyond general performance, SRPPO demonstrated superior reasoning and generalization. On Llama-3-8B, math scores (GSM8k) rose to 51.10 from an SFT baseline of 47.69. Furthermore, in "Minimum Overlap" tests—where the model is evaluated on prompts entirely distinct from its training data—SRPPO showed a substantial jump in IFEval scores, confirming its ability to generalize far better than simple imitation.
Discussion and Insights
Several key factors contribute to the success of SRPPO:
- On-Policy Exploration: Unlike SFT, which only learns from static expert data, SRPPO allows the model to explore its own output space and learn from its own mistakes, making it more robust.
- The Pretrained Anchor: Using the pretrained model as a baseline in the reward function prevents the model from drifting into "gibberish" while pushing it toward the behaviors learned during SFT.
- Mitigating Verbosity Bias: The authors noted that token-wise rewards can lead to "length bias," where models become overly wordy to maximize points. SRPPO mitigates this by assigning the reward only at the end of the sequence (the [EOS] token).
- Data Efficiency: SRPPO can utilize "unlabeled" prompts (questions without expert answers) to continue alignment, making it highly efficient in data-scarce scenarios.
Limitations and Future Work
While SRPPO is a powerful tool for demonstration-only alignment, its efficacy depends on the quality of the base model and the initial SFT stage. If the base model is too weak or the SFT stage is overfitted, the resulting reward signal may be noisy. Future research will explore token-wise reward mechanisms that can improve reasoning without inducing verbosity, and the potential for SRPPO to serve as an automated filter for high-quality synthetic data generation.
Summary updated