arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.19909cs.SEcs.AIcs.CLcs.LG
收藏

微调大型语言模型对自动化程序修复的影响

The Impact of Fine-tuning Large Language Models on Automated Program Repair

Simula Research Laboratory(Simula研究实验室);University of Bern(伯尔尼大学)

Roman Macháček, Anastasiia Grishina, Max Hort, Leon Moonen

AI总结:

本文实证比较六种代码 LLM 在三个 APR 基准上的不微调、全量微调和 LoRA/IA3 参数高效微调,发现全量微调易因分布差异和过拟合降低性能,PEFT 效果更好。

摘要:

自动化程序修复(APR)利用各种工具和技术,帮助开发者更快地获得功能正确且无错误的代码。近年来,大型语言模型(LLM)凭借其性能和灵活性,作为 APR 工具链中的组成部分而受到欢迎。然而,训练此类模型需要大量资源。微调技术已被开发用于使预训练 LLM 适应 APR 等特定任务,并以远低于从头训练的计算成本提升其性能。在本研究中,我们通过实证考察各种微调技术对用于 APR 的 LLM 性能的影响。我们的实验深入分析了若干在代码上预训练的最先进 LLM 的性能。评估在三个流行的 APR 基准(即 QuixBugs、Defects4J 和 HumanEval-Java)上进行,并考虑了六个参数规模不同的 LLM(分别为 CodeGen、CodeT5、StarCoder、DeepSeekCoder、Bloom 和 CodeLlama-2)。我们考察三种训练方案:不进行微调、全量微调,以及使用 LoRA 和 IA3 的参数高效微调(PEFT)。我们观察到,由于不同的数据分布和过拟合,全量微调技术会降低多种模型在基准测试中的性能。通过使用参数高效微调方法,我们限制模型的可训练参数数量,并取得了更好的结果。关键词:大型语言模型、自动化程序修复、参数高效微调、AI4Code、AI4SE、ML4SE。

英文摘要:

Automated Program Repair (APR) uses various tools and techniques to help developers achieve functional and error-free code faster. In recent years, Large Language Models (LLMs) have gained popularity as components in APR tool chains because of their performance and flexibility. However, training such models requires a significant amount of resources. Fine-tuning techniques have been developed to adapt pre-trained LLMs to specific tasks, such as APR, and enhance their performance at far lower computational costs than training from scratch. In this study, we empirically investigate the impact of various fine-tuning techniques on the performance of LLMs used for APR. Our experiments provide insights into the performance of a selection of state-of-the-art LLMs pre-trained on code. The evaluation is done on three popular APR benchmarks (i.e., QuixBugs, Defects4J and HumanEval-Java) and considers six different LLMs with varying parameter sizes (resp. CodeGen, CodeT5, StarCoder, DeepSeekCoder, Bloom, and CodeLlama-2). We consider three training regimens: no fine-tuning, full fine-tuning, and parameter-efficient fine-tuning (PEFT) using LoRA and IA3. We observe that full fine-tuning techniques decrease the benchmarking performance of various models due to different data distributions and overfitting. By using parameter-efficient fine-tuning methods, we restrict models in the amount of trainable parameters and achieve better results. Keywords: large language models, automated program repair, parameter-efficient fine-tuning, AI4Code, AI4SE, ML4SE.

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

↑