Bias Fitting to Mitigate Length Bias of Reward Model in RLHF

Kangwen Zhao, Jianfeng Cai, Jinhua Zhu, Ruopei Sun, Dongyun Xue, Wengang Zhou, Li Li 0040, Houqiang LiarXiv 2025 · DOI

Abstract

FiMi-RM (Bias Fitting to Mitigate Length Bias) is a novel framework designed to address the "verbosity trap" in Reinforcement Learning from Human Feedback (RLHF). By explicitly modeling the complex, non-linear relationship between response length and reward scores using a lightweight ResNet, FiMi-RM successfully decouples length from quality. This approach results in Large Language Models (LLMs) that are more concise and higher-performing on length-controlled benchmarks, effectively mitigating the common issue of reward hacking via excessive verbosity.

Introduction

In RLHF, Reward Models (RMs) serve as proxies for human preference. However, these models frequently fall victim to length bias, a form of reward hacking where the model learns that longer responses are inherently better. This occurs because human annotators often favor detailed responses, creating a shortcut for the RM. Consequently, policy models become excessively verbose to maximize rewards, often at the expense of actual utility. Previous mitigation strategies, such as linear length penalties, fail to capture the intricate, non-linear nature of this bias. FiMi-RM addresses this by fitting a dedicated model to the length-reward relationship.

The FiMi-RM Framework

The authors propose a three-stage framework to systematically debias the reward signal:

  1. Warm-Up: A standard reward model ($Model_r$) is trained using the Bradley-Terry objective on pairwise preference data, inheriting the natural length bias of the dataset.
  2. Length Bias Fitting: The reward model is frozen, and a separate, lightweight fitting model ($Model_f$) is trained. This model takes only the response length as input. It utilizes Sinusoidal Length Encoding and a two-layer ResNet to predict reward scores based solely on length, optimized via Mean Squared Error (MSE) and Pearson correlation losses.
  3. Length Debiasing: The reward model is fine-tuned while the fitting model remains active. A composite loss function encourages the RM to maintain ranking ability while minimizing the Pearson correlation between its outputs and the fitting model's length-based predictions.
The three-stage FiMi-RM framework and the architecture of the length-fitting model.

Analysis of Length Bias

A key insight of this work is that length bias is non-linear and consists of three distinct phases:

  • Short (<100 tokens): Strong linear correlation where "longer is better" holds strictly.
  • Medium (100–200 tokens): Sublinear growth where the marginal return of extra tokens diminishes.
  • Long (>200 tokens): Stochastic variability where the correlation becomes noisy, and length is no longer a reliable predictor of reward.

Experimental Results

The framework was evaluated using Qwen2.5-7B and Qwen2.5-1.5B models on the Anthropic HH-RLHF dataset.

Performance and Fairness

FiMi-RM significantly improved balanced accuracy. While a Vanilla RM showed an 80% accuracy when the chosen response was longer but only 58% when the rejected one was longer, FiMi-RM narrowed this gap to 71% vs. 67%. In Best-of-N (BoN) experiments, FiMi-RM achieved a Length-Controlled Win Rate (LC-WR) of 72.83%, outperforming both the Vanilla RM (70.32%) and the state-of-the-art ODIN method (71.57%).

Verbosity Reduction

Models trained with FiMi-RM became notably more concise. For the 7B model, average token length dropped from 170 to 146 without sacrificing performance, demonstrating that the model learned to prioritize quality over sheer volume.

Comparison of reward distribution across lengths for Vanilla RM, ODIN, and FiMi-RM (Ours).

Conclusion

FiMi-RM demonstrates that decoupling length from quality through non-linear bias fitting is more effective than simple penalization. By forcing the reward model to find quality indicators independent of text length, the framework produces more efficient and fair alignment. Future work may extend this approach to other surface-level biases, such as formatting preferences, or explore dynamic weighting based on prompt intent.

Summary updated

BibTeX
@misc{zhao2025bias,
  author = {Kangwen Zhao and Jianfeng Cai and Jinhua Zhu and Ruopei Sun and Dongyun Xue and Wengang Zhou and Li Li and Houqiang Li},
  title = {{Bias Fitting to Mitigate Length Bias of Reward Model in RLHF}},
  year = {2025},
  eprint = {2505.12843},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.12843},
}
Figure