arXiv:2409.12917cs.LG2024-09ICLR被引 455

用强化学习让大模型自己修正错误,效果比现有方法更好。

Training Language Models to Self-Correct via Reinforcement Learning

  • 通过自生成数据进行多轮在线强化学习,让模型学会自我修正。
  • 在MATH和HumanEval上分别提升15.6%和9.1%的纠错准确率。
  • 适合希望提升模型可靠性的研究人员和开发者使用。

自我修正对大型语言模型(LLMs)至关重要,但当前模型表现不佳。现有方法通常依赖多个模型、更高级模型或额外监督。为此,我们提出一种基于多轮在线强化学习(RL)的方法SCoRe,仅使用模型自身生成的数据显著提升自我修正能力。我们发现,基于离线生成修正轨迹的监督微调(SFT)常因错误分布不匹配或行为坍塌而失效,导致模型仅学习特定无效的修正模式。SCoRe通过在模型自身生成的修正轨迹分布上训练,并引入正则化机制引导学习有效修正行为,避免过度拟合特定高奖励响应。该方法包含初始多轮RL阶段用于生成鲁棒策略初始化,并采用奖励奖励机制放大自我修正。在Gemini 1.0 Pro和1.5 Flash模型上,SCoRe在MATH和HumanEval数据集上分别将自我修正性能提升15.6%和9.1%,达到当前最佳水平。

原文摘要 · Abstract (English)

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.

自修正强化学习大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。