arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.11296cs.SEcs.CL
收藏

RePair:基于过程反馈的自动程序修复

RePair: Automated Program Repair with Process-based Feedback

University of Science and Technology of China(中国科学技术大学);Institute of Artificial Intelligence Comprehensive National Science Center(国家人工智能综合研究中心);School of Computer Science and Artificial Intelligence, Hefei Normal University(合肥师范学院计算机与人工智能学院)

Yuze Zhao, Zhenya Huang, Yixiao Ma, Rui Li, Kai Zhang, Hao Jiang, Qi Liu, Linbo Zhu, Yu Su

AI总结:

本文提出RePair方法,通过构建CodeNet4Repair数据集并利用过程监督与奖励模型反馈,使小于20B参数的小型语言模型在自动程序修复中达到接近商用大模型的性能。

摘要:

程序可靠性的忧虑与修复成本之间的鸿沟,凸显了自动程序修复(APR)的必要性。APR在将脆弱程序转化为更健壮程序方面发挥着关键作用,既增强了程序可靠性,又同时减轻了人工修复的经济负担。商用规模的语言模型(LM)已将APR提升至前所未有的水平。然而,新出现的现象表明,对于参数少于100B的模型,进行单步修改可能难以达到预期效果。此外,人类通过显式提示与LM交互,这阻碍了LM从编译器和测试用例中接收反馈以自动优化其修复策略。在本文中,我们探讨了小型语言模型(少于20B参数)如何通过过程监督和反馈实现卓越性能。我们首先构建了一个名为CodeNet4Repair的数据集,其中包含多个修复记录,用于监督基础模型的微调。基于强化学习的令人鼓舞的结果,我们开发了一个作为评判者的奖励模型,为微调后的LM的动作提供反馈,逐步优化其策略。在推理过程中,我们要求LM迭代生成解决方案,直到修复效果不再提升或达到最大步数限制。结果表明,基于过程的方法不仅优于基于结果的更大规模生成方法,而且几乎达到了闭源商用大规模语言模型的性能。

英文摘要:

The gap between the trepidation of program reliability and the expense of repairs underscores the indispensability of Automated Program Repair (APR). APR is instrumental in transforming vulnerable programs into more robust ones, bolstering program reliability while simultaneously diminishing the financial burden of manual repairs. Commercial-scale language models (LM) have taken APR to unprecedented levels. However, the emergence reveals that for models fewer than 100B parameters, making single-step modifications may be difficult to achieve the desired effect. Moreover, humans interact with the LM through explicit prompts, which hinders the LM from receiving feedback from compiler and test cases to automatically optimize its repair policies. In this literature, we explore how small-scale LM (less than 20B) achieve excellent performance through process supervision and feedback. We start by constructing a dataset named CodeNet4Repair, replete with multiple repair records, which supervises the fine-tuning of a foundational model. Building upon the encouraging outcomes of reinforcement learning, we develop a reward model that serves as a critic, providing feedback for the fine-tuned LM's action, progressively optimizing its policy. During inference, we require the LM to generate solutions iteratively until the repair effect no longer improves or hits the maximum step limit. The results show that process-based not only outperforms larger outcome-based generation methods, but also nearly matches the performance of closed-source commercial large-scale LMs.

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

↑