NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Eliminating Biased Length Reliance of Direct Preference Optimization via Down-Sampled KL Divergence

Junru Lu, Jiazheng Li, Siyu An, Meng Zhao, Yulan He, Di Yin, Xing Sun · OpenReview

Abstract

Direct Preference Optimization (DPO) has emerged as a prominent algorithm for the direct and robust alignment of Large Language Models (LLMs) with human preferences, offering a more straightforward alternative to the complex Reinforcement Learning from Human Feedback (RLHF). Despite its promising efficacy, DPO faces a notable drawback: "verbosity", a common over-optimization phenomenon also observed in RLHF. While previous studies mainly attributed verbosity to biased labels within the data, we propose that the issue also stems from an inherent algorithmic length reliance in DPO. Specifically, we suggest that the discrepancy between sequence-level Kullback-Leibler (KL) divergences between chosen and rejected sequences, used in DPO, results in overestimated or underestimated rewards due to varying token lengths. Empirically, we utilize datasets with different label lengths to demonstrate the presence of biased rewards. We then introduce an effective downsampling approach, named SamPO, to eliminate potential length reliance. Our experimental evaluations, conducted across three LLMs of varying scales and a diverse array of conditional and open-ended benchmarks, highlight the efficacy of SamPO in mitigating verbosity, achieving improvements of 5% to 12% over DPO through debaised rewards.

Introduction

Aligning Large Language Models (LLMs) with human preferences is a critical step in model development. While Reinforcement Learning from Human Feedback (RLHF) has been the standard, Direct Preference Optimization (DPO) has simplified the process by optimizing the policy directly from preference data. However, DPO-tuned models often exhibit "verbosity," generating unnecessarily long responses. While previous work attributed this to biased training data, this paper identifies an inherent algorithmic bias in DPO's loss function that encourages length over quality.

The Problem: Algorithmic Length Bias

DPO calculates rewards by aggregating token-level Kullback–Leibler (KL) divergence at the sequence level. Because these rewards are cumulative, longer sequences naturally have a higher potential for larger total values. This creates a mathematical "shortcut" where the model can achieve higher rewards simply by increasing response length, regardless of content quality.

Comparison of reward accumulation in DPO (a), DPO-SANorm averaging (b), and SamPO down-sampling (c).

As shown in Figure 6(a), DPO tends to overestimate rewards for longer chosen sequences and underestimate them for shorter ones. While simple length normalization (averaging) might seem like a solution, Figure 6(b) illustrates that it "washes out" the variance and importance of specific tokens, leading to a marginal average reward that loses critical signal.

The SamPO Method

To address this, we propose SamPO (Down-Sampled Direct Preference Optimization). The core mechanism is to equalize the number of tokens considered for both "chosen" and "rejected" responses during training. Specifically, SamPO identifies the length of the shorter response ($T_m$) and randomly down-samples tokens from both sequences until they both contain exactly $T_m$ tokens.

This random down-sampling approach, illustrated in Figure 6(c), preserves the token-level probability features and variance while mathematically eliminating the advantage of sequence length. Unlike averaging, sampling maintains the "signal" of what makes a good response while ignoring the "noise" of length.

Key Results

We evaluated SamPO across multiple LLM scales (Pythia-2.8B, Llama3-8B, Tulu2-13B, and Qwen1.5-72B) and a diverse array of benchmarks, including GSM8K (Math), IFEval (Instruction Following), and AlpacaEval2 (Open-ended).

Performance comparison between DPO and SamPO across multiple benchmarks.

As summarized in Figure 1, SamPO consistently outperforms standard DPO, achieving improvements of 5% to 12% across benchmarks. Crucially, SamPO significantly reduces verbosity. For instance, on the HH-RLHF dataset, SamPO achieved a higher win rate than DPO while producing responses that were, on average, less than half the length (112 tokens vs. 250 tokens). Furthermore, iterative versions of SamPO, where the reference model is updated periodically, showed even greater gains in reasoning tasks.

Conclusion

SamPO offers a lightweight yet effective modification to the DPO algorithm that eliminates its inherent reliance on response length. By regularizing rewards through down-sampling, SamPO produces models that are more concise, accurate, and better aligned with human preferences without the need for complex reward modeling or biased data filtering.

Summary updated

BibTeX
@inproceedings{lu2024eliminating,
  author = {Junru Lu and Jiazheng Li and Siyu An and Meng Zhao and Yulan He and Di Yin and Xing Sun},
  title = {{Eliminating Biased Length Reliance of Direct Preference Optimization via Down-Sampled KL Divergence}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=2CUeAwXRuZ},
}
Figure