Training Language Models to Self-Correct via Reinforcement Learning

Aviral Kumar, Vincent Zhuang, Rishabh Agarwal, Yi Su, John D Co-Reyes +13 more
9/19/2024
cs.LG

No official code found. Best implementation: daje0601/Google_SCoRe (141 stars, Apache-2.0, last commit 2024-09-21). 2 more below.

Abstract

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.

View on arXivView PDF

Code Implementations(3)

Apache-2.0

Paper Reproduction Google SCoRE(Training Language Models to Self-Correct via Reinforcement Learning)

14121Python, Jupyter NotebookSep 21, 20242 years agoApache-2.0
BY571/SCoReCommunity68%

SCoRe: Training Language Models to Self-Correct via Reinforcement Learning

160PythonOct 5, 20241 years ago
fine-tuninglanguage-modelreinforcement-learningself-correction

This my attempt to create Self-Correcting-LLM based on the paper Training Language Models to Self-Correct via Reinforcement Learning by google

378Python, MakefileSep 21, 20241 years ago

Similar Papers

Cite this paper

@article{kumar2024training,
  title  = {Training Language Models to Self-Correct via Reinforcement Learning},
  author = {Aviral Kumar and Vincent Zhuang and Rishabh Agarwal and Yi Su and John D Co-Reyes and Avi Singh and Kate Baumli and Shariq Iqbal and Colton Bishop and Rebecca Roelofs and Lei M Zhang and Kay McKinney and Disha Shrivastava and Cosmin Paduraru and George Tucker and Doina Precup and Feryal Behbahani and Aleksandra Faust},
  year   = {2024},
  eprint = {2409.12917},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.12917v2},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.12917.svg)](https://codeofpaper.com/paper/2409.12917)

Discussion