对比策略梯度:以监督友好的方式在序列级分数上对齐大语言模型
Contrastive Policy Gradient: Aligning LLMs on sequence-level scores in a supervised-friendly fashion
AI总结:
针对现有直接对齐方法无法优化任意奖励、传统RL微调采样成本高的问题,提出无需重要性采样的离策略算法CoPG,可推广IPO与经典策略梯度,在老虎机问题和摘要任务微调中验证了特性。
摘要:
强化学习(RL)已被用于基于从偏好数据训练的奖励模型微调大语言模型(LLM),以更好地对齐人类判断。近期推出的直接对齐方法通常更简单、更稳定且计算成本更低,能更直接地实现这一目标。然而,这些方法无法优化任意奖励,且基于偏好的奖励并非LLM唯一关注的奖励类型(例如代码生成的单元测试或摘要任务的文本蕴含等)。RL微调通常采用策略梯度的变体,需要同策略或近同策略样本,因此需要成本高昂的生成过程。我们提出了对比策略梯度(Contrastive Policy Gradient,简称CoPG),这是一种简单且具备数学原理的新型RL算法,即使基于离策略数据也能估计最优策略。它可被视为一种不依赖重要性采样技术的离策略策略梯度方法,凸显了使用(正确的)状态基线的重要性。我们证明该方法推广了直接对齐方法IPO(恒等偏好优化)和经典策略梯度。我们在一个简化的多臂老虎机问题上对所提出的CoPG进行实验以说明其特性,同时在摘要任务上微调LLM,实验中使用一个习得的奖励函数作为真值。
英文摘要:
Reinforcement Learning (RL) has been used to finetune Large Language Models (LLMs) using a reward model trained from preference data, to better align with human judgment. The recently introduced direct alignment methods, which are often simpler, more stable, and computationally lighter, can more directly achieve this. However, these approaches cannot optimize arbitrary rewards, and the preference-based ones are not the only rewards of interest for LLMs (eg., unit tests for code generation or textual entailment for summarization, among others). RL-finetuning is usually done with a variation of policy gradient, which calls for on-policy or near-on-policy samples, requiring costly generations. We introduce Contrastive Policy Gradient, or CoPG, a simple and mathematically principled new RL algorithm that can estimate the optimal policy even from off-policy data. It can be seen as an off-policy policy gradient approach that does not rely on important sampling techniques and highlights the importance of using (the right) state baseline. We show this approach to generalize the direct alignment method IPO (identity preference optimization) and classic policy gradient. We experiment with the proposed CoPG on a toy bandit problem to illustrate its properties, as well as for finetuning LLMs on a summarization task, using a learned reward function considered as ground truth for the purpose of the experiments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。