arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.18290cs.LGcs.AIcs.CL
收藏

直接偏好优化:你的语言模型暗地里是一个奖励模型

Direct Preference Optimization: Your Language Model is Secretly a Reward Model

Stanford University(斯坦福大学);CZ Biohub

Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, Chelsea Finn

AI总结:

针对RLHF复杂且不稳定的问题,提出直接偏好优化(DPO)算法,通过奖励模型的新参数化方法以封闭形式提取最优策略,仅用简单分类损失即可解决对齐问题,实验证明其性能优于或匹配现有方法且更易实现。

摘要:

尽管大规模无监督语言模型(LMs)学习了广泛的世界知识和部分推理技能,但由于其训练的完全无监督性质,实现对它们行为的精确控制十分困难。为了获得这种可控性,现有方法收集关于模型生成内容相对质量的人类标签,并对无监督LM进行微调以符合这些偏好,通常采用基于人类反馈的强化学习(RLHF)。然而,RLHF是一个复杂且常常不稳定的过程,首先需要拟合一个反映人类偏好的奖励模型,然后使用强化学习微调大型无监督LM以最大化这一估计奖励,同时不偏离原始模型太远。在本文中,我们引入了RLHF中奖励模型的一种新参数化方法,该方法能够以封闭形式提取相应的最优策略,使我们能够仅用简单的分类损失解决标准的RLHF问题。我们将由此产生的算法称为直接偏好优化(DPO),它稳定、高效且计算量轻,消除了在微调期间从LM中采样或进行大量超参数调整的需要。我们的实验表明,DPO可以微调LM以与现有方法相当或更好地对齐人类偏好。值得注意的是,使用DPO微调在控制生成情感的能力上超越了基于PPO的RLHF,并且在摘要和单轮对话中匹配或提升了响应质量,同时实现和训练起来要简单得多。

英文摘要:

While large-scale unsupervised language models (LMs) learn broad world knowledge and some reasoning skills, achieving precise control of their behavior is difficult due to the completely unsupervised nature of their training. Existing methods for gaining such steerability collect human labels of the relative quality of model generations and fine-tune the unsupervised LM to align with these preferences, often with reinforcement learning from human feedback (RLHF). However, RLHF is a complex and often unstable procedure, first fitting a reward model that reflects the human preferences, and then fine-tuning the large unsupervised LM using reinforcement learning to maximize this estimated reward without drifting too far from the original model. In this paper we introduce a new parameterization of the reward model in RLHF that enables extraction of the corresponding optimal policy in closed form, allowing us to solve the standard RLHF problem with only a simple classification loss. The resulting algorithm, which we call Direct Preference Optimization (DPO), is stable, performant, and computationally lightweight, eliminating the need for sampling from the LM during fine-tuning or performing significant hyperparameter tuning. Our experiments show that DPO can fine-tune LMs to align with human preferences as well as or better than existing methods. Notably, fine-tuning with DPO exceeds PPO-based RLHF in ability to control sentiment of generations, and matches or improves response quality in summarization and single-turn dialogue while being substantially simpler to implement and train.

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

↑