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

通过强化学习训练语言模型进行自我纠正

Training Language Models to Self-Correct via Reinforcement Learning

Google DeepMind(谷歌DeepMind)
Aviral Kumar, Vincent Zhuang, Rishabh Agarwal, Yi Su, John D Co-Reyes, Avi Singh, Kate Baumli, Shariq Iqbal, Colton Bishop, Rebecca Roelofs, Lei M Zhang, Kay Mc… 展开作者

Aviral Kumar, Vincent Zhuang, Rishabh Agarwal, Yi Su, John D Co-Reyes, Avi Singh, Kate Baumli, Shariq Iqbal, Colton Bishop, Rebecca Roelofs, Lei M Zhang, Kay McKinney, Disha Shrivastava, Cosmin Paduraru, George Tucker, Doina Precup, Feryal Behbahani, Aleksandra Faust

AI总结:

本文提出多轮在线强化学习方法 SCoRe,通过自生成纠正轨迹和正则化策略解决监督微调中的分布不匹配与行为坍缩问题,显著提升大语言模型的自我纠正能力。

摘要:

自我纠正(self-correction)是大语言模型(LLMs)一项非常理想的能力,但在现代大语言模型中,这一能力一直被发现在很大程度上是无效的。当前训练自我纠正的方法通常依赖于多个模型、一个更先进的模型,或额外形式的监督。为了解决这些不足,我们开发了一种多轮在线强化学习(RL)方法,称为 SCoRe,它完全使用自生成数据显著提升了大语言模型的自我纠正能力。为了构建 SCoRe,我们首先表明,在离线模型生成的纠正轨迹上进行监督微调(SFT)的变体往往不足以培养自我纠正行为。特别是,我们观察到,通过 SFT 进行训练要么陷入数据收集策略所犯错误与模型自身响应之间的分布不匹配,要么陷入行为坍缩(behavior collapse),即学习过程隐式地只偏好某种特定的纠正行为模式,而这种模式在测试问题上通常无法有效实现自我纠正。SCoRe 通过在模型自身生成的自纠正轨迹分布下进行训练,并使用适当的正则化来引导学习过程,使其学习到在测试时有效的自我纠正行为,而不是针对给定提示拟合高奖励响应,从而应对这些挑战。这一正则化过程包括:首先在基础模型上进行多轮强化学习的初始阶段,以生成一个更不容易发生坍缩的策略初始化,然后使用奖励加成来放大自我纠正。在使用 Gemini 1.0 Pro 和 1.5 Flash 模型进行实验时,我们发现 SCoRe 取得了最先进的自我纠正性能,在 MATH 和 HumanEval 上分别将基础模型的自我纠正能力提升了 15.6% 和 9.1%。

英文摘要:

Self-correction is a highly desirable capability of large language models (LLMs), yet it has consistently been found to be largely ineffective in modern LLMs. Current methods for training self-correction typically depend on either multiple models, a more advanced model, or additional forms of supervision. To address these shortcomings, we develop a multi-turn online reinforcement learning (RL) approach, SCoRe, that significantly improves an LLM's self-correction ability using entirely self-generated data. To build SCoRe, we first show that variants of supervised fine-tuning (SFT) on offline model-generated correction traces are often insufficient for instilling self-correction behavior. In particular, we observe that training via SFT falls prey to either a distribution mismatch between mistakes made by the data-collection policy and the model's own responses, or to behavior collapse, where learning implicitly prefers only a certain mode of correction behavior that is often not effective at self-correction on test problems. SCoRe addresses these challenges by training under the model's own distribution of self-generated correction traces and using appropriate regularization to steer the learning process into learning a self-correction behavior that is effective at test time as opposed to fitting high-reward responses for a given prompt. This regularization process includes an initial phase of multi-turn RL on a base model to generate a policy initialization that is less susceptible to collapse, followed by using a reward bonus to amplify self-correction. With Gemini 1.0 Pro and 1.5 Flash models, we find that SCoRe achieves state-of-the-art self-correction performance, improving the base models' self-correction by 15.6% and 9.1% respectively on MATH and HumanEval.

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

↑