RLTF: Reinforcement Learning from Unit Test Feedback

Jiate Liu, Yiqin Zhu, Kaiwen Xiao, Qiang Fu, Xiao Han +2 more
7/10/2023
cs.AIcs.CLcs.LG

Official code: Zyq-scut/RLTF (134 stars, BSD-3-Clause, last commit 2024-10-05).

Abstract

The goal of program synthesis, or code generation, is to generate executable code based on given descriptions. Recently, there has been an increasing number of studies employing reinforcement learning (RL) to improve the performance of large language models (LLMs) for code. However, current representative works either rely solely on offline frameworks, limiting the exploration of new sample spaces, or fall short in the utilization of unit test signals, not accounting for specific error locations within the code. To address these issues, we propose RLTF, i.e., Reinforcement Learning from Unit Test Feedback, a novel online RL framework with unit test feedback of multi-granularity for refining code LLMs. Our approach generates data in real-time during training and simultaneously utilizes fine-grained feedback signals to guide the model towards producing higher-quality code. Extensive experiments show that RLTF achieves state-of-the-art performance on the APPS and the MBPP benchmarks. Our code is available at: https://github.com/Zyq-scut/RLTF.

View on arXivView PDF

Code Implementations(1)

Zyq-scut/RLTFOfficial100%
BSD-3-Clause

Accepted by Transactions on Machine Learning Research (TMLR)

1347Shell, PythonJun 30, 20232 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{liu2023rltf,
  title  = {RLTF: Reinforcement Learning from Unit Test Feedback},
  author = {Jiate Liu and Yiqin Zhu and Kaiwen Xiao and Qiang Fu and Xiao Han and Wei Yang and Deheng Ye},
  year   = {2023},
  eprint = {2307.04349},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.04349v2}
}

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/2307.04349.svg)](https://codeofpaper.com/paper/2307.04349)

Discussion