解决大模型对齐中偏好响应学习不均衡问题,让模型真正学会生成好回答。
AdaDPO: Self-Adaptive Direct Preference Optimization with Balanced Gradient Updates

- 基于策略模型概率自适应调整梯度权重,平衡优劣响应的学习速度。
- 在81%参数组合下超越DPO,最优长度控制胜率48.3%,缓解长度偏差。
- 无需改架构或数据,仅加几行代码即可升级现有对齐流程,通用性强。
DPO已成为替代强化学习人类反馈(RLHF)对齐大模型与人类偏好的主流方法,无需独立奖励模型或强化学习循环。然而最新理论分析发现,DPO存在梯度不对称性:抑制差响应的速度远快于促进优响应,导致模型仅学会规避错误答案而非生成优质输出。本文提出AdaDPO,一种自适应的DPO变体,通过从策略模型生成概率中直接提取每对偏好项的停止梯度系数(可选参考模型概率),强制使优选与非优选概率的梯度幅度相等。实际实现中平衡逐标记梯度并引入数值截断以保证稳定,同时保留DPO原有超参数结构。在基于UltraFeedback训练的Llama-3-8B-Instruct上,AdaDPO在AlpacaEval 2测试中表现持续优于DPO:在81%的超参数组合中取得更高长度控制胜率(LC),达到全局最优LC(48.3%)和原始胜率(46.1%),并在88%组合中扩大了LC与原始胜率的差距,表明有效缓解长度偏差。额外分析显示,该方法修复了梯度不平衡,提升了优化效率。由于仅作用于损失层面,AdaDPO可无缝集成至现有基于偏好的对齐流程,无需修改数据收集或模型结构,仅需少量代码变更。其自适应机制还可推广至SimPO、R-DPO、IPO、CPO、ORPO等广义成对对比损失家族。
原文摘要 · Abstract (English)
DPO has become a widely adopted alternative to RLHF for aligning LLMs with human preferences, eliminating the need for a separate reward model or RL loop. Recent theoretical analysis uncovers an asymmetric gradient behavior in DPO: the loss suppresses dispreferred responses substantially faster than it promotes preferred ones, causing the model to learn to avoid bad answers rather than to generate good ones. We propose AdaDPO, a Self-Adaptive variant of the DPO algorithm that introduces per-preference-pair, stop-gradient-based coefficients derived directly from the policy model's generation probabilities, with the reference model's probabilities as an optional component. AdaDPO is constructed to enforce equality of gradient magnitudes between preferred and dispreferred probabilities; the practical implementation balances per-token gradients and applies a numerical clipping bound for stability, while retaining DPO's original hyperparameter structure. On Llama-3-8B-Instruct trained on UltraFeedback under a SimPO similar setup, AdaDPO consistently outperforms DPO on AlpacaEval 2: it achieves higher length-controlled win rates (LC) in 81% of hyperparameter combinations, attains the global best LC (48.3%) and raw win rate (46.1%), and enlarges the LC-over-WR margin in 88% of combinations, indicating effective mitigation of length bias. Additional analyses on KL divergence, reward margin, and reward accuracy confirm that AdaDPO rectifies the gradient imbalance and yields more efficient optimization. Because it operates purely at the loss level, AdaDPO can be dropped into existing preference-based alignment pipelines without changing data collection or model architectures. The method requires only a few lines of code, and the same self-adaptive principle generalizes to a broad family of pairwise contrastive preference losses including SimPO, R-DPO, IPO, CPO, and ORPO.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。