Iterative Length-Regularized Direct Preference Optimization: A Case Study on Improving 7B Language Models to GPT-4 Level

Jie Liu, Zhanhui Zhou, Jiaheng Liu, Xingyuan Bu, Chao Yang, Hansen Zhong, Wanli OuyangarXiv 2024 · DOI

Introduction: The Verbosity Trap in LLM Alignment

Aligning Large Language Models (LLMs) with human preferences is a cornerstone of modern AI development, typically achieved through Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO). Recent advancements have shown that DPO is most effective when applied iteratively, where the model generates new responses that are then scored by a reward model for further training.

However, this iterative process often falls victim to "length exploitation." Because human evaluators and reward models frequently correlate longer responses with higher quality, models learn to generate overly verbose, repetitive content to "game" the reward system. This results in a significant increase in compute costs and a decrease in actual information density.

Methodology: Iterative Length-Regularized DPO (iLR-DPO)

To address the verbosity issue, this study introduces iterative Length-Regularized DPO (iLR-DPO). The core innovation is the addition of a length margin penalty to the standard DPO loss function.

The training loop consists of three main stages:

  1. Generation: The base model (OpenChat-3.5-0106, 7B) generates pairs of responses to diverse prompts sourced from the Nectar dataset.
  2. Scoring: A frozen reward model (Starling-RM-34B) evaluates these pairs.
  3. Optimization: The model is updated using a multi-objective loss that penalizes the reward if the preferred response is significantly longer than the rejected one.
Comparison of LC Win Rate and response length across iterations for different DPO variants.

Key Insights: Efficiency over Volume

The research highlights that iterative training is superior to simply increasing epochs on a static dataset. While standard iterative DPO (iDPO) leads to a "verbosity explosion"—with average response lengths jumping from 1,300 to over 5,600 tokens—iLR-DPO maintains a stable length. By penalizing raw token counts, the model is forced to improve its reasoning and helpfulness rather than relying on "fluff."

Experimental Results

The effectiveness of iLR-DPO was evaluated using the AlpacaEval 2.0 benchmark, focusing on the Length-Controlled (LC) win rate to ensure fair comparison against industry leaders.

Performance of iLR-DPO iterations and sampling methods compared to state-of-the-art models.

As shown in the results, the iLR-DPO 7B model achieved a 50.5% LC win rate against GPT-4 Preview by the third iteration. This marks a significant milestone: a 7B parameter model matching the performance of a much larger, closed-source model. Furthermore, when combined with Best-of-64 sampling, the model's win rate rose to 61.6%, surpassing GPT-4 Omni.

Importantly, the "alignment tax"—the degradation of foundational knowledge during preference tuning—was minimal. Evaluations on the Open LLM Leaderboard showed that the model retained its performance across various NLP tasks, including math (GSM8K) and reasoning (ARC, HellaSwag).

Conclusion and Future Directions

iLR-DPO demonstrates that smaller language models can achieve state-of-the-art performance through smarter alignment strategies. By curbing length exploitation, the model produces concise, high-quality responses that rival GPT-4. Future work may involve developing more sophisticated reward models that can distinguish between necessary detail and unnecessary verbosity, moving beyond simple token-length penalties.

Summary updated

BibTeX
@misc{liu2024iterative,
  author = {Jie Liu and Zhanhui Zhou and Jiaheng Liu and Xingyuan Bu and Chao Yang and Hansen Zhong and Wanli Ouyang},
  title = {{Iterative Length-Regularized Direct Preference Optimization: A Case Study on Improving 7B Language Models to GPT-4 Level}},
  year = {2024},
  eprint = {2406.11817},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.11817},
}
Figure