paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Memory-Efficient Large Language Models for Program Repair with Semantic-Guided Patch Generation

面向程序修复的内存高效大语言模型:语义引导的补丁生成
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 3/10 · 该论文属于 LLM 用于程序修复(APR)的软件工程/PL 交叉方向,关注束搜索内存开销与语义引导补丁生成,但不涉及用户核心关注的静态分析、形式化验证、浮点程序分析或贝叶斯程序分析。虽与 PL+AI/LLM 工具化应用有邻接关系,但并非研究方向核心。引用 3 inbox
Thanh Le Cong, Bach Le, Toby Murray
crossref: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 FLAMES,用语义引导最佳优先搜索替代束搜索,降低 LLM 程序修复内存消耗并提升修复效果。

基于大语言模型(LLM)的自动程序修复面临内存效率问题:补丁生成阶段常依赖束搜索,增大束宽会显著占用 GPU,甚至导致高达 80% 的内存过载崩溃;量化和串行化束搜索因 APR 需要大束宽而效果有限。本文提出 FLAMES,以贪心解码提升内存效率,并用语义引导的最佳优先搜索替代束搜索:在每个解码步,根据测试验证的语义反馈(通过/失败测试数量)选择最有潜力的 token 继续探索。在 Defects4J 上,FLAMES 相比现有 LLM-based APR 减少最多 83% 内存,同时修复 133 个 bug,比最佳基线多 10 个;在 HumanEval-Java 和 TransformedD4J 上也分别多生成 12% 和 36.5% 的正确补丁。

问题
LLM-based APR 中束搜索需要大束宽,导致严重 GPU 内存消耗和崩溃,限制其可扩展性与修复效果。
方法
提出 FLAMES,用贪心解码和基于测试验证语义反馈的最佳优先搜索生成补丁,以替代传统束搜索。
评估
在 Defects4J、HumanEval-Java 和 TransformedD4J 上评估内存消耗、时间效率与正确修复补丁数量,并与 LLM-based APR 基线比较。
原文摘要(Abstract)

Fixing software bugs is crucial yet demands significant resources from developers. Automated Program Repair (APR) is a promising solution to address this challenging task. The emergence of Large Language Models (LLMs) has opened a new era of LLM-based APR, substantially advancing the APR field further. LLM-based APR methods face significant challenges regarding memory inefficiency, hindering their scalability and effectiveness. This is largely due to the beam search utilized in the patch generation phase of LLM-based APR, which requires large beam sizes to search for more potentially good repair candidates. In this paper, we first show that increases in beam size, even for small-sized LLMs (1B-7B params), require extensive GPU usage, leading to up to 80% of recurring crashes due to memory overloads in LLM-based APR. Seemingly simple solutions to reduce memory consumption are (1) to quantize LLM models, i.e., converting the weights of an LLM from high-precision values to lower-precision ones, and (2) to make beam search sequential, i.e., forwarding each beam through the model sequentially and then concatenating them back into a single output. However, we show that these approaches still do not work in APR due to the demand of large beam sizes. To address this, we introduce FLAMES, a novel LLM-based APR technique that employs semantic-guided patch generation to enhance repair effectiveness and memory efficiency. Unlike conventional methods that rely on beam search, FLAMES utilizes greedy decoding to enhance memory efficiency while steering the search towards more potentially good repair candidates via a semantic-guided best-first search algorithm. At each decoding step, FLAMES uses semantic feedback from test validation, such as the number of passing and failing test cases, to select the most promising token to explore further. Our empirical evaluation on Defects4J shows that FLAMES substantially reduces memory consumption by up to 83% compared to LLM-based APR without compromising time efficiency. Moreover, FLAMES correctly fixes 133 bugs on Defects4J, fixing 10 bugs more than the best baseline. Additionally, these improvements also generalize to the HumanEval-Java and TransformedD4J datasets, where FLAMES generates 12% and 36.5% more correct patches, respectively, than the best baseline.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@inproceedings{paperbot11572,
  title = {Memory-Efficient Large Language Models for Program Repair with Semantic-Guided Patch Generation},
  author = {Thanh Le Cong and Bach Le and Toby Murray},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3773240}
}