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

评估大语言模型在自动程序修复中的泛化能力

Evaluating the Generalizability of LLMs in Automated Program Repair

School of Big Data and Software Engineering, Chongqing University(重庆大学大数据与软件学院)

Fengjie Li, Jiajun Jiang, Jiajun Sun, Hongyu Zhang

AI总结:

本研究通过新数据集 DEFECTS4J-TRANS 评估 11 个顶尖大语言模型在自动程序修复中的泛化能力,发现其性能显著下降,且提示工程不足以弥补差距,并为未来研究提出建议。

摘要:

基于大语言模型(LLM)的自动程序修复方法因其最先进的性能而受到广泛关注。然而,这些方法主要在少数几个知名数据集(如 Defects4J)上进行评估,这引发了对其在新数据集上有效性的质疑。在本研究中,我们在 DEFECTS4J-TRANS 上评估了 11 个表现最优的大语言模型,该数据集是通过在保持原始语义的前提下对 Defects4J 进行变换而得到的新数据集。在 Defects4J 和 DEFECTS4J-TRANS 上的实验结果表明,所有被研究的大语言模型在自动程序修复(APR)任务中的泛化能力都有限,在 DEFECTS4J-TRANS 上,正确补丁和合理补丁的平均数量分别下降了 49.48% 和 42.90%。进一步研究在修复提示中融入额外的修复相关信息后发现,尽管这些信息显著增强了大语言模型的能力(正确补丁和合理补丁的数量分别最多提高 136.67% 和 121.82%),但其性能仍不及原始结果。这表明仅靠提示工程不足以实质性提升大语言模型的修复能力。基于我们的研究,我们还为未来研究提出了若干建议。

英文摘要:

LLM-based automated program repair methods have attracted significant attention for their state-of-the-art performance. However, they were primarily evaluated on a few well known datasets like Defects4J, raising questions about their effectiveness on new datasets. In this study, we evaluate 11 top-performing LLMs on DEFECTS4J-TRANS, a new dataset derived from transforming Defects4J while maintaining the original semantics. Results from experiments on both Defects4J and DEFECTS4J-TRANS show that all studied LLMs have limited generalizability in APR tasks, with the average number of correct and plausible patches decreasing by 49.48% and 42.90%, respectively, on DEFECTS4J-TRANS. Further investigation into incorporating additional repair-relevant information in repair prompts reveals that, although this information significantly enhances the LLMs' capabilities (increasing the number of correct and plausible patches by up to 136.67% and 121.82%, respectively), performance still falls short of their original results. This indicates that prompt engineering alone is insufficient to substantially enhance LLMs' repair capabilities. Based on our study, we also offer several recommendations for future research.

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

↑