IPO(Google DeepMind):用 ΨPO 统一框架给 DPO 的「无界放大」装上刹车
📄 A General Theoretical Paradigm to Understand Learning from Human Preferences
2023-10 · Google DeepMind(AISTATS 2024)
一句话:先把 RLHF 与 DPO 统一成同一个「对偏好概率做非线性变换
📖 论文原文 Abstract(英文)
The prevalent deployment of learning from human preferences through reinforcement learning (RLHF) relies on two important approximations: the first assumes that pairwise preferences can be substituted with pointwise rewards. The second assumes that a reward model trained on these pointwise rewards can generalize from collected data to out-of-distribution data sampled by the policy. Recently, Direct Preference Optimisation (DPO) has been proposed as an approach that bypasses the second approximation and learn directly a policy from collected data without the reward modelling stage. However, this method still heavily relies on the first approximation. In this paper we try to gain a deeper theoretical understanding of these practical algorithms. In particular we derive a new general objective called ΨPO for learning from human preferences that is expressed in terms of pairwise preferences and therefore bypasses both approximations. This new general objective allows us to perform an in-depth analysis of the behavior of RLHF and DPO (as special cases of ΨPO) and to identify their potential pitfalls. We then consider another special case for ΨPO by setting Ψ simply to Identity, for which we can derive an efficient optimisation procedure, prove performance guarantees and demonstrate its empirical superiority to DPO on some illustrative examples.
相关:偏好优化总览 · DPO · SimPO · CPO · ORPO · KTO · 符号约定

图源:Azar et al., A General Theoretical Paradigm to Understand Learning from Human Preferences(arXiv:2310.12036)Figure 1——数据集
(全序)上 IPO vs DPO 的动作概率学习曲线(用于学习注解,版权归原作者)。
动机与创新点:BT 假设遇上确定性偏好,KL 正则会悄悄失效
把「从人类偏好中学习」建模成一个带 KL 约束的离线 contextual bandit:给定上下文
主流做法 RLHF 与 DPO 都依赖一个强假设:成对偏好可以被替换成逐点 reward(pointwise reward / Elo 分),并服从 Bradley-Terry(BT)模型
核心论点:把 RLHF 和 DPO 都看成同一个目标的特例。 论文提出 ΨPO——最大化「偏好概率经一个非递减映射
它"is expressed in terms of pairwise preferences and therefore bypasses both approximations"——直接写在成对偏好上,不必先过 reward 模型。取不同的
问题出在
the strength of the KL-regularisation becomes weaker and weaker the more deterministic the preferences.
更糟的是有限数据下:即便真实偏好只是
关键创新:
- ΨPO 统一框架:把 RLHF、DPO 收编为「对偏好概率做非线性变换
+ KL 正则」的特例,得以正面分析它们的失效模式(Proposition 1 给出三者最优解一致的条件)。 - 诊断出 DPO 的结构性弱点:弱正则 + 过拟合源自
的无界性叠加「不训练显式 reward」,在确定性/小样本偏好下 KL 约束被架空。 - IPO = ΨPO 取
:用有界映射保证 KL 正则始终生效,且"by construction bypasses the BT modelisation assumption"——绕开了 BT 假设本身。 - 可落地的采样损失:把 IPO 化成一个 root-finding 问题,推出一个只需偏好数据集、无需 reward 模型、无需 RL 的平方损失(Algorithm 1),并证明全局/局部最优唯一(Theorem 2)。
- toy bandit 反例:在最小可控的 bandit 上直观展示 DPO 何时塌缩、IPO 如何受
调控。
方法:从 ΨPO 统一目标推到 IPO 的平方损失
ΨPO 的闭式最优解:为什么 logit 会爆
在 BT 假设下,ΨPO(含 RLHF/DPO)的最优策略有解析形式:
这是标准的 KL 正则 softmax 解(附录 A.1 有完整推导)。关键观察:"small increases in preference probabilities already close to 1 are just as incentivized as larger increases in preference probabilities around 50%"——logit 变换让「把 0.99 推到 0.999」和「把 0.5 推到 0.6」获得同等激励,于是模型有动力把已经压倒性的偏好继续往极端拉。
举例:只有两个动作、
、 与 都是均匀分布。DPO( )会收敛到确定性策略 ——哪怕 开到极大,结果都与均匀的 南辕北辙。这就是「KL 正则被架空」的最小演示。
IPO:取 ,直接正则化「总偏好」
既然病根是
其中
回到上面那个两动作的例子:IPO 下
采样损失:把 root-finding 化成一个平方回归
直接优化总偏好需要估计 reward
它正是 DPO 那个「policy 对 reference 的对数似然比之差」。最优策略要满足
这就是 IPO 与 DPO 的核心分水岭:DPO 是
IPO learns from preferences dataset simply by regressing the gap between log-likelihood ratios
and to .
作者证明(Theorem 2):当
整套流程就是 Algorithm 1:
TRL 中的实现要点
IPO 在 TRL 里通过 DPOTrainer(loss_type="ipo") 选择,复用 DPO 的双前向与 reference 处理:
# pi_logratios = (logp_w - logp_l) on policy
# ref_logratios = (logp_w - logp_l) on reference
h = (pi_w - pi_l) - (ref_w - ref_l) # = h_theta,隐式 reward 差(TRL 中 logp 已按 completion 长度归一化)
loss = ((h - 1.0 / (2 * tau)) ** 2).mean()关键细节:
- 目标 margin 是
,但 TRL 的超参名叫 beta,语义对应这里的——即 TRL 的 beta越大、目标 margin 越小、约束越强,与 DPO 的beta(越大约束越强是通过 logistic 的温度实现)方向看似一致、但作用点完全不同,迁移时务必核对。 - 仍需 reference model:IPO 没有去掉
,双前向开销与 DPO 相同;它解决的是损失形状问题,不是显存问题。 - TRL 实现对 logprob 做长度归一化:在
loss_type="ipo"下,TRL 会把 completion 的 logprob 除以其 token 数(per-token 平均)再算。TRL 维护者说明此选择是与 IPO 作者确认过的。需要与 SimPO 对照时:二者都做了长度归一化,区别在于 IPO 的归一化是实现层引入(原论文未显式讨论)且仍保留 reference,SimPO 的长度归一化是方法定义本身、并彻底去掉 reference。
实验结果:两个 toy bandit 反例,直观看 DPO 塌缩 / IPO 受控
论文不在 LLM 上跑评测,而是用最小可控的 bandit 实验直接验证理论:动作空间
设定一· (全序):IPO 不变贪心
采样三个偏好得
- DPO:"always converges to the deterministic policy for all values of
"—— 、其余 ,无论正则多强都无视 (上方 Figure 1 左列)。 - IPO:正则一强就把策略拉回均匀附近,"prevent the policy from becoming greedy when the regularisation is strong"(Figure 1 右列,
明显不塌)。
设定二· (含未观测动作对):IPO 不排除动作

图源:Azar et al., A General Theoretical Paradigm to Understand Learning from Human Preferences(arXiv:2310.12036)Figure 2——数据集
(含未观测动作对)上 IPO vs DPO 的动作概率学习曲线(用于学习注解,版权归原作者)。
DPO 把从没赢过的
看榜须知
这些是人工构造的 toy bandit 例子,目的是隔离并放大理论性质,不是 LLM 规模的 benchmark。论文自己也把「scale those experiments to more complex settings such as training language models」列为 future work。后续社区在真实 LLM 偏好对齐上的复现普遍显示:理论上更稳 ≠ 实测一定更好(见下节)。换言之,这两张图证明的是"IPO 在确定性/稀疏偏好下行为更可控",而非"IPO 在通用对齐任务上一定胜过调好的 DPO"。
在 DPO 偏好优化谱系里的位置
与 DPO 的核心对照:
| 维度 | DPO | IPO |
|---|---|---|
| ΨPO 中的变换 | ||
| 是否依赖 BT 假设 | 是 | 否(by construction 绕开) |
| 损失形式 | ||
| 对 reward 差 | 越大越好(单调递减损失) | 钉在固定目标 |
| 确定性/稀疏偏好下 | reward 差 | 有界,KL 约束始终生效,最优唯一 |
| 是否需要 reference | 需要 | 需要(未省显存,仅改损失形状) |
| 关键超参 | beta 字段,语义相反,须核对) |
- vs DPO:IPO 是 DPO 的「同框架兄弟」——共用
这个隐式 reward 差,只把外层的 logistic 换成平方回归。理解 IPO 的最佳入口就是先吃透 DPO 的损失,再问「如果不让这个差越大越好、而是回归到一个目标会怎样」。 - vs SimPO / CPO / ORPO / KTO:它们都在回应「DPO 无界放大」这一共性病。IPO 用固定目标 margin收口;SimPO 用
目标 margin 并去掉 reference;CPO/ORPO 加 SFT/odds 项当锚;KTO 改用前景理论的逐样本效用、连成对偏好都不要。把 IPO 放进这条谱系,它的独特性在于有完整的统一理论(ΨPO)与唯一性证明做背书。 - 调参与实践经验:
:常见取值使目标 margin 落在 量级(以 TRL 的 beta表示约)。从较强约束(小 margin)起调更安全。 - 诊断信号:若 DPO 训练出现 chosen 与 rejected logprob 一起急剧下降、留出集质量回退,正是论文所诊断的「确定性偏好下 KL 失效」征兆,可把 IPO 当作「带刹车」的替代实验,看目标 margin 能否换来更稳的曲线。
- 务实边界:多个公开评测显示,在常规标注质量与中等数据量下,IPO 相比调好的 DPO 并无稳定优势、有时略逊——它的价值集中在偏好高度确定、且已观察到 DPO 明显过拟合/塌缩的场景。理论漂亮是真,万灵药则未必。