DPO Meets PPO: Reinforced Token Optimization for RLHF

📄 arXiv: 2404.18922v4 📥 PDF

作者: Han Zhong, Zikang Shan, Guhao Feng, Wei Xiong, Xinle Cheng, Li Zhao, Di He, Jiang Bian, Liwei Wang

分类: cs.LG, cs.AI, cs.CL, stat.ML

发布日期: 2024-04-29 (更新: 2025-05-21)

备注: ICML 2025

🔗 代码/项目: GITHUB


💡 一句话要点

提出RTO框架以优化RLHF中的策略学习问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 强化学习 人类反馈 策略优化 标记级奖励 自然语言处理 深度学习 算法创新

📋 核心要点

  1. 现有的PPO方法在处理稀疏奖励时效率低下,难以捕捉细粒度的标记级信息。
  2. 本文提出的RTO框架通过将RLHF建模为MDP,学习标记级奖励并进行策略优化,提升了学习效率。
  3. 实验结果显示,RTO在AlpacaEval 2基准上比PPO提高了7.5分,在Arena-Hard上提高了4.1分,表现优异。

📝 摘要(中文)

在传统的基于人类反馈的强化学习(RLHF)框架中,使用近端策略优化(PPO)来处理稀疏的句子级奖励,这在深度强化学习中是一个挑战。尽管PPO在大型语言模型的对齐中取得了显著成功,但其开源实现仍然存在许多不足。为了解决这些问题,本文提出了一种将RLHF问题建模为马尔可夫决策过程(MDP)的框架,从而捕捉细粒度的标记级信息。在此框架下,我们引入了一种算法——强化标记优化(RTO),该算法从偏好数据中学习标记级奖励函数,并基于此进行策略优化。理论上,RTO被证明能够高效地找到近似最优策略。实验结果表明,RTO在多个基准测试中优于PPO及其他直接偏好学习算法。

🔬 方法详解

问题定义:本文旨在解决传统RLHF框架中PPO在处理稀疏句子级奖励时的低效问题,特别是无法有效捕捉细粒度的标记级信息。

核心思路:通过将RLHF问题建模为马尔可夫决策过程(MDP),引入强化标记优化(RTO)算法,从偏好数据中学习标记级奖励函数,以实现更高效的策略优化。

技术框架:RTO框架包括两个主要阶段:首先,通过直接偏好优化(DPO)获取标记级的奖励信号;然后,利用PPO进行基于该奖励信号的策略优化。

关键创新:RTO的核心创新在于将DPO与PPO结合,利用DPO提供的标记级响应质量特征,显著提升了策略学习的效率和效果。

关键设计:在RTO中,关键设计包括奖励函数的构建、损失函数的选择以及网络结构的优化,确保能够有效地从偏好数据中提取信息并进行策略更新。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,RTO在AlpacaEval 2基准测试中比PPO提高了7.5分,在Arena-Hard基准上提高了4.1分,表明RTO在策略优化方面的显著优势,超越了其他直接偏好学习算法。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、对话系统和推荐系统等,能够有效提升模型在复杂任务中的学习能力和响应质量。未来,RTO框架有望在更多的强化学习场景中推广应用,推动智能系统的进一步发展。

📄 摘要(原文)

In the classical Reinforcement Learning from Human Feedback (RLHF) framework, Proximal Policy Optimization (PPO) is employed to learn from sparse, sentence-level rewards -- a challenging scenario in traditional deep reinforcement learning. Despite the great successes of PPO in the alignment of large language models, its open-source implementation is still largely sub-optimal. To address these issues, we introduce a framework that models RLHF problems as a Markov decision process (MDP), enabling the capture of fine-grained token-wise information. Under this framework, we introduce an algorithm Reinforced Token Optimization (\texttt{RTO}), which learns the token-wise reward function from preference data and performs policy optimization based on this learned token-wise reward signal. Theoretically, \texttt{RTO} is proven to have the capability of finding the near-optimal policy sample-efficiently. For its practical implementation, \texttt{RTO} innovatively integrates Direct Preference Optimization (DPO) and PPO. DPO, originally derived from sparse sentence rewards, surprisingly provides us with a token-wise characterization of response quality, which is seamlessly incorporated into our subsequent PPO training stage. Extensive experiments demonstrate that \texttt{RTO} performs better than PPO and other direct preference learning algorithms. In particular, RTO outperforms PPO by 7.5 points on the AlpacaEval 2 benchmark and by 4.1 points on Arena-Hard. Our code and models are available at \href{https://github.com/zkshan2002/RTO}{https://github.com/zkshan2002/RTO}.