Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2505.02931

帮助 | 高级搜索

计算机科学 > 软件工程

arXiv:2505.02931 (cs)
[提交于 2025年5月5日 ]

标题: 修复的艺术:用指令微调模型优化迭代程序修复

标题: The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models

Authors:Fernando Vallecillos Ruiz, Max Hort, Leon Moonen
摘要: 自动程序修复(APR)旨在减少识别和修复源代码中错误所需的手动工作量。在基于大型语言模型(LLM)的代理兴起之前,一种常见策略是增加生成补丁的数量,有时达到数千个,以在基准测试中获得更好的修复效果。最近,LLMs通过反馈引导实现了自我迭代的能力,在多轮迭代中改进补丁。然而,文献往往关注多次迭代而忽视了不同数量的输出。我们研究了一种平衡这两种方法的APR流水线,即生成多个输出和多轮迭代,同时对每个错误限制总补丁数不超过10个。我们将三种最先进的指令微调LLM——DeepSeekCoder-Instruct、Codellama-Instruct和Llama3.1-Instruct应用于APR任务。我们进一步使用三种大小(1K、30K、65K)和两种技术(全微调和LoRA)对每个模型进行微调,使我们能够在两个APR基准:HumanEval-Java和Defects4J上评估它们的修复能力。我们的结果显示,仅使用微调数据集的一小部分(<1%),我们可以将可能补丁的数量提高多达78%,这挑战了先前研究表明使用全微调时收益有限的研究。然而,我们发现超过某些阈值会导致收益递减,这可能是由于过拟合造成的。此外,我们表明基础模型从迭代式地创建补丁中受益匪浅,而不是一次性生成所有补丁。此外,在复杂的基准测试中,迭代策略的优势更加明显。即使是经过微调的模型,虽然从迭代中获益较少,但在复杂基准测试中仍能获得优势。这项研究强调了需要结合多输出生成和迭代精炼的平衡APR策略的重要性。
摘要: Automatic program repair (APR) aims to reduce the manual efforts required to identify and fix errors in source code. Before the rise of LLM-based agents, a common strategy was to increase the number of generated patches, sometimes to the thousands, to achieve better repair results on benchmarks. More recently, self-iterative capabilities enabled LLMs to refine patches over multiple rounds guided by feedback. However, literature often focuses on many iterations and disregards different numbers of outputs. We investigate an APR pipeline that balances these two approaches, the generation of multiple outputs and multiple rounds of iteration, while imposing a limit of 10 total patches per bug. We apply three SOTA instruction-tuned LLMs - DeepSeekCoder-Instruct, Codellama-Instruct, Llama3.1-Instruct - to the APR task. We further fine-tune each model on an APR dataset with three sizes (1K, 30K, 65K) and two techniques (Full Fine-Tuning and LoRA), allowing us to assess their repair capabilities on two APR benchmarks: HumanEval-Java and Defects4J. Our results show that by using only a fraction (<1%) of the fine-tuning dataset, we can achieve improvements of up to 78% in the number of plausible patches generated, challenging prior studies that reported limited gains using Full Fine-Tuning. However, we find that exceeding certain thresholds leads to diminishing outcomes, likely due to overfitting. Moreover, we show that base models greatly benefit from creating patches in an iterative fashion rather than generating them all at once. In addition, the benefit of iterative strategies becomes more pronounced in complex benchmarks. Even fine-tuned models, while benefiting less from iterations, still gain advantages, particularly on complex benchmarks. The research underscores the need for balanced APR strategies that combine multi-output generation and iterative refinement.
评论: 已接受在第29届软件工程评估与评估国际会议(EASE)研究-track发表,2025年6月17-20日,土耳其,伊斯坦布尔。
主题: 软件工程 (cs.SE) ; 人工智能 (cs.AI); 计算与语言 (cs.CL); 机器学习 (cs.LG)
引用方式: arXiv:2505.02931 [cs.SE]
  (或者 arXiv:2505.02931v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2505.02931
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Leon Moonen [查看电子邮件]
[v1] 星期一, 2025 年 5 月 5 日 18:06:51 UTC (272 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
许可图标 查看许可
当前浏览上下文:
cs.SE
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-05
切换浏览方式为:
cs
cs.AI
cs.CL
cs.LG

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号