Abstract
With the wide deployment of Large Language Models (LLMs), aligning LLMs with human values becomes increasingly important. Although Reinforcement Learning with Human Feedback (RLHF) proves effective, it is complicated and highly resource-intensive. As such, offline RLHF has been introduced as an alternative solution, which directly optimizes LLMs with ranking losses on a fixed preference dataset. Current offline RLHF only captures the ordering relationship between responses, overlooking the crucial aspect of “how much” one is preferred over the others. To address this issue, we propose a simple yet effective solution based on reward difference prediction. Specifically, we introduce reward difference coefficients to reweigh sample pairs in offline RLHF. We then propose a difference model that considers rich interactions between a pair of responses for predicting these difference coefficients. Experiments with 7B LLMs on the HH and TL;DR dataset verify the effectiveness of our method in both automatic metrics and human evaluation, highlighting its potential for aligning LLMs with human values.
Introduction: The Nuance Gap in Offline RLHF
Reinforcement Learning from Human Feedback (RLHF) is the standard for making LLMs helpful and harmless. However, traditional approaches like PPO are notoriously complex and resource-heavy. This has led to the rise of offline RLHF methods such as Direct Preference Optimization (DPO) and Rank Responses to Align (RRHF), which treat alignment as a supervised ranking task on a fixed dataset.
Despite their efficiency, most offline methods suffer from a "nuance gap." They typically only consider the ordinal relationship (Response A > Response B), treating a narrow victory the same as a landslide win. In reality, some response pairs are nearly identical, while others have a clear "correct" answer. Treating these pairs identically during training can lead to suboptimal alignment and sensitivity to noisy data.
Methodology: Reward Difference Optimization (RDO)
To address this, we propose Reward Difference Optimization (RDO), which adds a "magnitude" component to the training process through two main innovations:
- Reward Difference Coefficients ($R^\alpha$): We introduce a weighting factor into the loss functions of existing methods (like DPO and RRHF). Pairs with a large predicted quality gap receive higher weights, forcing the model to prioritize learning from high-confidence comparisons.
- The Difference Model: Instead of using a standard "pointwise" reward model that scores responses individually, we developed a model that takes the query and both responses as a single input string:
Query: {x}; Response 1: {y1}; Response 2: {y2}. This allows the model to use self-attention to directly compare features between the two responses.
To ensure logical consistency, the difference model includes two regularization terms: Duplication (comparing a response to itself must result in zero) and Reverse (swapping response order must result in the exact opposite score).
Experimental Setup
We evaluated RDO using Alpaca-7B as the base model on two industry-standard benchmarks:
- Anthropic HH (Helpful and Harmless): 76.3k dialogues focused on safety and utility.
- OpenAI TL;DR: 11.7k training pairs focused on text summarization.
Evaluation was conducted using a mix of automated reward model scores, "LLM-as-a-judge" (GPT-4, GPT-3.5, and Moonshot-v1), and human evaluation by graduate students.
Key Results and Insights
- Superior Interaction: The Difference Model achieved 71.5% accuracy on the HH test set, outperforming standard reward models (68-69%). This suggests that "cross-attention" between two responses is a more powerful way to model human preference than scoring them in isolation.
- Alignment Performance: In head-to-head comparisons on the HH dataset, the RDO-enhanced RRHF model won 79% of the time against the vanilla RRHF baseline. Human evaluators confirmed this trend, preferring RDO-trained models in 45% of cases compared to 39% for the baseline.
- Noise Filtering: RDO naturally handles noisy data. Ambiguous samples typically receive low difference scores and are subsequently downweighted, preventing the model from overfitting to contradictory human labels.
- Efficiency: While processing longer sequences, the difference model handles half as many samples as a pointwise model. In practice, inference time for RDO was often faster than traditional reward modeling.
Conclusion and Future Work
While RDO shows significant promise for 7B-parameter models, several areas remain for future exploration. These include investigating how the method scales to 70B+ models, mitigating the "alignment tax" where models lose performance on secondary tasks (like summarization), and automating the tuning of hyperparameters like the difference weight coefficient ($\alpha$).
Summary updated