arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.02629cs.SE
收藏

基于属性补丁语义图的参数高效微调用于自动补丁正确性评估

Parameter-Efficient Fine-Tuning with Attributed Patch Semantic Graph for Automated Patch Correctness Assessment

Zhenyu Yang, Jingwen Wu, Zhen Yang, Zhongxing Yu

AI总结:

本文提出基于属性补丁语义图的参数高效微调方法,用于提升自动补丁正确性评估的准确性和F1分数。

摘要:

自动程序修复(APR)旨在无需人工干预自动修复程序错误,近年来这一研究领域引起了越来越多的关注。尽管已有许多进展,且来自不同学科的技术已被提出,但APR技术通常面临补丁过拟合问题,即生成的补丁尽管通过了所用的测试,但并不真正正确。为缓解这一问题,许多研究努力致力于自动补丁正确性评估(APCA)。特别是,随着大语言模型(LLM)技术的出现,研究人员已利用LLM来评估补丁正确性,并取得了最先进的性能。APCA文献表明,捕捉补丁语义并明确考虑某些代码属性在预测补丁正确性中非常重要。然而,现有的基于LLM的方法通常将代码视为token序列,并忽略代码的内在形式结构,这使得难以捕捉深层的补丁语义。此外,这些基于LLM的方法也没有明确考虑足够的代码属性。为克服这些缺点,本文设计了一种新的补丁图表示,称为属性补丁语义图(APSG),它充分捕捉了补丁语义并明确反映了重要的补丁属性。为了有效地利用APSG中的图信息,我们相应地提出了一种新的参数高效微调(PEFT)方法,称为Graph-LoRA。进行了广泛的评估以评估我们的方法,结果表明,与最先进的方法相比,我们的方法在准确率和F1分数上分别提高了3.1%至7.5%和3.0%至7.1%。

英文摘要:

Automated program repair (APR) aims to automatically repair program errors without human intervention, and recent years have witnessed a growing interest on this research topic. While much progress has been made and techniques originating from different disciplines have been proposed, APR techniques generally suffer from the patch overfitting issue, i.e., the generated patches are not genuinely correct despite they pass the employed tests. To alleviate this issue, many research efforts have been devoted for automated patch correctness assessment (APCA). In particular, with the emergence of large language model (LLM) technology, researchers have employed LLM to assess the patch correctness and have obtained the state-of-the-art performance. The literature on APCA has demonstrated the importance of capturing patch semantic and explicitly considering certain code attributes in predicting patch correctness. However, existing LLM-based methods typically treat code as token sequences and ignore the inherent formal structure for code, making it difficult to capture the deep patch semantics. Moreover, these LLM-based methods also do not explicitly account for enough code attributes. To overcome these drawbacks, we in this paper design a novel patch graph representation named attributed patch semantic graph (APSG), which adequately captures the patch semantic and explicitly reflects important patch attributes. To effectively use graph information in APSG, we accordingly propose a new parameter-efficient fine-tuning (PEFT) method of LLMs named Graph-LoRA. Extensive evaluations have been conducted to evaluate our method, and the results show that compared to the state-of-the-art methods, our method improves the accuracy and F1 score by 3.1\% to 7.5\% and 3.0\% to 7.1\% respectively.

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

↑