Abstract
Traditional Reinforcement Learning from Human Feedback (RLHF) typically relies on sequence-to-scalar (seq2scalar) reward models, which compress complex human preferences into a single numerical value. This "scalar bottleneck" often leads to issues like reward hacking, coarse credit assignment, and the "refusal trap" in safety training. We present a sequence-to-sequence (seq2seq) reward modeling approach that utilizes rich language feedback. By training reward models to correct suboptimal responses into preferred ones, we provide fine-grained, token-level feedback for policy optimization. Our method achieves a 76.9% average win rate across multiple tasks and significantly improves the safety-utility trade-off without requiring additional human annotations.
Introduction
RLHF has become the industry standard for aligning Large Language Models (LLMs) with human values. However, the current paradigm relies heavily on scalar rewards. Imagine a teacher grading an essay by providing only a final score (e.g., 6/10) without any specific comments or corrections; the student knows they failed but lacks the information to understand why or which specific sentences were problematic.
This scalar bottleneck leads to two major issues. First, it causes coarse credit assignment, where the reward model cannot distinguish which specific tokens contributed to a high or low score, making the optimization process noisy. Second, it often results in reward hacking, such as the "refusal trap" in safety training. In this scenario, models learn that simply refusing to answer any sensitive question—even harmless ones—is a safe way to maximize reward, leading to responses that are safe but entirely unhelpful.
The Seq2Seq Reward Modeling Framework
To address these limitations, we propose a two-stage pipeline that treats reward modeling as a translation and correction task rather than a simple classification task. This approach provides dense, token-level feedback by leveraging the rich information present in language.
1. Reward Modeling (The "Corrector")
Instead of training the Reward Model (RM) to output a scalar, we train it using Sequence Maximum Likelihood Estimation (MLE) to act as a corrector. The training involves two primary mappings:
- Correction Mapping: When presented with a "rejected" (suboptimal) response, the RM is trained to generate the corresponding "chosen" (preferred) response.
- Identity Mapping: When presented with a "chosen" response, the RM is trained to output that same response.
By learning these mappings, the RM becomes an "aligner" that understands how to transform a bad answer into a good one, effectively capturing the nuances of human preference in the language space.
2. Reward Extracting (The "Grader")
To integrate this generative RM into standard Reinforcement Learning (PPO), the textual feedback must be converted back into numerical signals. During policy optimization, the RM generates a target sequence for the LLM's response.
- Positive Rewards: As long as the LLM's generated tokens match the RM's suggested "corrected" tokens, the model receives a positive reward (e.g., +1.0).
- Negative Rewards: The moment the LLM's response diverges from the RM's suggestion, it receives a negative reward (e.g., -1.0) for those specific tokens.
Experimental Evaluation
We evaluated our method using 2B and 7B parameter versions of Gemma and Llama-2 across several benchmarks, including PKU-SafeRLHF (safety), Dialogsum (summarization), and TL;DR (general summarization). To test robustness, we also conducted Out-of-Distribution (OOD) testing on the Xsum dataset.
Key Results
- Superior Performance: The seq2seq approach (PPO-T) achieved an average win rate of 76.9% against standard RLHF baselines across the three primary NLP tasks.
- Breaking the Refusal Trap: On the PKU-SafeRLHF benchmark, our method significantly outperformed vanilla PPO. While standard RLHF often produced "safe but unhelpful" responses (like "I don't know"), the seq2seq RM encouraged the model to provide safe and helpful explanations.
- Mitigating Length Bias: In summarization tasks, where models often learn that "longer is better," the seq2seq RM focused on token consistency rather than length, leading to more concise and accurate summaries.
- OOD Robustness: The seq2seq RM maintained high performance on the unseen Xsum dataset, demonstrating greater robustness to out-of-distribution prompts than traditional scalar models.
Discussion and Conclusion
The primary advantage of seq2seq reward modeling is that it provides fine-grained, token-level feedback at "zero cost"—it utilizes the exact same preference datasets already used in standard RLHF, simply reformatted for sequence generation. By moving from a scalar (-1.0) to a sequence ("This is unsafe because..."), the model receives a much denser gradient signal.
However, this approach does introduce computational overhead, as the Reward Model is now a full generative LLM rather than a simple linear head. Future work will explore extending this framework to multi-turn dialogues and more complex reasoning tasks where the benefits of dense language feedback are likely to be even more pronounced.
Summary updated