arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2307.04349cs.AIcs.CLcs.LG
收藏

RLTF:基于单元测试反馈的强化学习

RLTF: Reinforcement Learning from Unit Test Feedback

Tencent(腾讯)

Jiate Liu, Yiqin Zhu, Kaiwen Xiao, Qiang Fu, Xiao Han, Wei Yang, Deheng Ye

AI总结:

针对代码生成中强化学习探索不足及单元测试信号利用不充分的问题,提出在线RL框架RLTF,利用多粒度单元测试反馈实时优化代码LLM,在APPS和MBPP基准上达到最先进性能。

摘要:

程序合成(即代码生成)的目标是根据给定的描述生成可执行的代码。最近,越来越多的研究采用强化学习(RL)来提高大型语言模型(LLM)在代码生成方面的性能。然而,当前的代表性工作要么仅依赖离线框架,限制了新样本空间的探索,要么在利用单元测试信号方面存在不足,未考虑代码中的具体错误位置。为了解决这些问题,我们提出了RLTF,即基于单元测试反馈的强化学习,一种新颖的在线RL框架,利用多粒度的单元测试反馈来优化代码LLM。我们的方法在训练过程中实时生成数据,并同时利用细粒度的反馈信号引导模型生成更高质量的代码。大量实验表明,RLTF在APPS和MBPP基准测试上达到了最先进的性能。我们的代码可在 https://github.com/Zyq-scut/RLTF 获取。

英文摘要:

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.

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

↑