arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.10719cs.CL
收藏

用于大语言模型对齐的DPO是否优于PPO?一项综合研究

Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study

Tsinghua University(清华大学);OpenPsi Inc.(OpenPsi公司);Shanghai Qi Zhi Institute(上海期智研究院)

Shusheng Xu, Wei Fu, Jiaxuan Gao, Wenjie Ye, Weilin Liu, Zhiyu Mei, Guangju Wang, Chao Yu, Yi Wu

AI总结:

该研究针对大语言模型对齐中DPO是否优于PPO的问题,通过理论实证分析DPO的局限、明确PPO性能关键因素,经多场景基准测试证明PPO在所有对齐任务中更优,且在代码竞赛中达SOTA。

摘要:

基于人类反馈的强化学习(RLHF)是目前应用最广泛的大语言模型(LLM)人类偏好对齐方法。现有RLHF方法大致可分为基于奖励和无奖励两类。ChatGPT、Claude等新型应用采用基于奖励的方法,即先学习奖励模型,再应用近端策略优化(PPO)等演员-评论家算法。但在学术基准测试中,最优结果往往由直接偏好优化(DPO)这类无奖励方法取得。DPO真的优于PPO吗?PPO在这些基准上表现不佳的原因是什么?本文首先对DPO的算法特性展开理论与实证研究,发现DPO可能存在根本性局限。此外,我们还对PPO进行了全面分析,揭示了PPO在LLM微调中取得最优性能的关键因素。最后,我们在对话、代码生成等多个RLHF测试平台上对DPO和PPO进行基准测试。实验结果表明,PPO在所有场景下均能超越其他对齐方法,且在高难度代码竞赛中取得了当前最优结果。我们的代码已公开于https://github.com/openpsi-project/ReaLHF。

英文摘要:

Reinforcement Learning from Human Feedback (RLHF) is currently the most widely used method to align large language models (LLMs) with human preferences. Existing RLHF methods can be roughly categorized as either reward-based or reward-free. Novel applications such as ChatGPT and Claude leverage reward-based methods that first learn a reward model and apply actor-critic algorithms, such as Proximal Policy Optimization (PPO). However, in academic benchmarks, state-of-the-art results are often achieved via reward-free methods, such as Direct Preference Optimization (DPO). Is DPO truly superior to PPO? Why does PPO perform poorly on these benchmarks? In this paper, we first conduct both theoretical and empirical studies on the algorithmic properties of DPO and show that DPO may have fundamental limitations. Moreover, we also comprehensively examine PPO and reveal the key factors for the best performances of PPO in fine-tuning LLMs. Finally, we benchmark DPO and PPO across a collection of RLHF testbeds, ranging from dialogue to code generation. Experiment results demonstrate that PPO is able to surpass other alignment methods in all cases and achieve state-of-the-art results in challenging code competitions. Our code is publicly available at https://github.com/openpsi-project/ReaLHF.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑