解决大模型对文本长度敏感问题,让回复更简洁
Length Desensitization in Direct Preference Optimization
- 通过解耦长度偏好与内在偏好,改进DPO优化目标
- 实验显示响应长度减少10%-40%,且性能不降
- 适合追求简洁高效输出的LLM应用开发者
直接偏好优化(DPO)广泛用于基于人类反馈的强化学习(RLHF)阶段,以对齐大型语言模型(LLMs)与人类偏好,提升其安全性和有效性。然而,研究表明DPO倾向于过度优化冗长性,损害性能与用户体验。本文深入分析DPO的目标函数,揭示其隐式奖励与数据长度存在强相关性,误导优化方向,导致训练中出现长度敏感性。为此,提出长度去敏感化方法LD-DPO,通过解耦相对无关的显式长度偏好与其它隐含偏好,实现对内在偏好的更有效学习。在Llama2-13B、Llama3-8B和Qwen2-7B的Base与Instruct两种设置下,于MT-Bench和AlpacaEval 2等基准上进行实验验证。结果表明,LD-DPO始终优于DPO及其他基线方法,响应长度减少10%-40%。深入分析证实,该方法能有效实现长度去敏感化,使模型更贴近人类偏好。
原文摘要 · Abstract (English)
Direct Preference Optimization (DPO) is widely utilized in the Reinforcement Learning from Human Feedback (RLHF) phase to align Large Language Models (LLMs) with human preferences, thereby enhancing both their harmlessness and efficacy. However, it has been observed that DPO tends to over-optimize for verbosity, which can detrimentally affect both performance and user experience. In this paper, we conduct an in-depth theoretical analysis of DPO's optimization objective and reveal a strong correlation between its implicit reward and data length. This correlation misguides the optimization direction, resulting in length sensitivity during the DPO training and leading to verbosity. To address this issue, we propose a length-desensitization improvement method for DPO, termed LD-DPO. The proposed method aims to desensitize DPO to data length by decoupling explicit length preference, which is relatively insignificant, from the other implicit preferences, thereby enabling more effective learning of the intrinsic preferences. We utilized two settings (Base and Instruct) of Llama2-13B, Llama3-8B, and Qwen2-7B for experimental validation on various benchmarks including MT-Bench and AlpacaEval 2. The experimental results indicate that LD-DPO consistently outperforms DPO and other baseline methods, achieving more concise responses with a 10-40% reduction in length compared to DPO. We conducted in-depth experimental analyses to demonstrate that LD-DPO can indeed achieve length desensitization and align the model more closely with human-like preferences.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。