TL;DR
Large Language Models (LLMs) often "cheat" during alignment by simply making responses longer to get higher rewards—a phenomenon known as length bias. This paper introduces Response-Conditioned Modeling (Rc-BT), a framework that forces models to distinguish between semantic quality and length constraints by training on preference pairs where the prompt changes but the response stays the same. The result is a model that mitigates length bias while significantly improving its ability to follow explicit length instructions (e.g., "write exactly 50 words").
The Problem: Length Bias and Instruction Failures
Reinforcement Learning from Human Feedback (RLHF) is the standard for aligning LLMs with human values. However, Reward Models (RMs) are notorious for "reward hacking," where they exploit superficial features like response length instead of true semantic quality. Essentially, RMs often learn that "longer is always better," even if the extra text is redundant or irrelevant.
Paradoxically, while models are highly sensitive to length (causing this bias), they are surprisingly bad at following explicit length instructions. If you ask a standard fine-tuned model for a "100-word summary," it often fails to hit the mark. The authors argue that these two issues—implicit length bias and poor instruction following—are two sides of the same coin: the model lacks a clear, disentangled understanding of length as an independent attribute.
Methods: Response-Conditioned Modeling
The core innovation is the Response-Conditioned Bradley-Terry (Rc-BT) model.
In standard preference learning (Bradley-Terry), a model compares two different responses ($y_c$ and $y_r$) for the same prompt ($x$). The authors flip this logic. They keep the response constant and vary the prompt's length constraints.
- Data Augmentation: For a "chosen" response $y_c$ that originally answered prompt $x$, they generate a new prompt $x_l$ with a length constraint that $y_c$ violates. The model is then trained to prefer the pair $(x, y_c)$ over $(x_l, y_c)$.
- Rc-RM & Rc-DPO: They integrate this logic into both the Reward Modeling (RM) stage and the Direct Policy Optimization (DPO) stage. By conditioning the reward on the relationship between the prompt's constraints and the response's actual length, the model learns to treat length as a requirement to be satisfied rather than a proxy for quality.
- Disentanglement: Unlike previous methods that simply penalize length (which can hurt performance on complex tasks), this approach allows the model to maintain high semantic quality while respecting specific constraints.
Datasets and Evaluation
The researchers used several key datasets and introduced new evaluation benchmarks:
- OpenAssistant: Used as the primary source for training preference data.
- $D^q_{eval}$ (Quality Evaluation): A newly constructed "length-neutral" dataset. They used GPT-4o to rewrite responses so that the "better" response is sometimes shorter and sometimes longer, ensuring the evaluation measures semantic quality, not just length.
- $D^l_{eval}$ (Length Evaluation): A dataset designed to test adherence to explicit numerical length constraints.
- AlpacaEval-LI-plus: An extension of the popular AlpacaEval benchmark specifically modified to include "or less" and "or more" length instructions.
Key Insights
- Length Bias is Unconscious: The authors hypothesize that models acquire length bias because they aren't explicitly taught to perceive length as a measurable attribute. By making length an explicit part of the "choice" during training, the bias is mitigated.
- The Failure of LIFT: Previous attempts to fix this (like the LIFT method) often resulted in a "short bias," where models would generate extremely brief, low-quality responses just to satisfy a "less than X words" constraint. Rc-BT avoids this by balancing semantic intent with length requirements.
- Symmetry Matters: The paper finds that you must train on both "chosen" responses that violate new constraints and "rejected" responses that happen to satisfy them. Using only one side of the data leads to new, different biases.
Key Results
The proposed Rc-RM and Rc-DPO consistently outperformed baselines across multiple model families (Qwen, Llama, and Gemma) and sizes (1.5B to 14B).
- Mitigating Bias: On the length-neutral $D^q_{eval}$ benchmark, Rc-RM improved accuracy by over 10-16% compared to standard reward models, proving it was actually looking at content rather than just counting tokens.
- Instruction Following: Rc-DPO achieved a 100% Length Accuracy on certain "less than" benchmarks where standard DPO scored below 10%.
- Win Rates: On AlpacaEval, Rc-DPO achieved significantly higher "Quality Win Ratios" (e.g., 45.39% for Qwen2.5-7B-Base vs. 33.54% for the baseline), showing that fixing length bias actually makes the model's answers better overall.
Limitations and Future Work
The authors acknowledge a few areas for further exploration:
- Scope of Bias: While this paper focuses on length, the authors believe the "Response-Conditioned" framework could be extended to other common biases, such as "politeness bias" or "formatting bias" (e.g., the tendency to favor bullet points).
- Synthetic Data Reliance: The method relies on LLMs (like GPT-4o) to generate the augmented training pairs. Any inherent biases in the teacher model could potentially leak into the training process.
- Granularity: The current constraints are relatively simple (word counts). Future work could look at more nuanced constraints, like reading level or specific stylistic tones.
Summary updated