paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Fact Selection Problem in LLM-Based Program Repair

基于 LLM 的程序修复中的事实选择问题
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 3/10 · 该论文研究 LLM 程序修复中的提示事实选择,核心目标是提升 LLM 修 bug 能力,属于提示工程/LLM 能力优化;它与用户关注的静态分析、形式化验证、Agentic 程序分析、浮点或贝叶斯程序分析交叉较弱。虽然涉及程序事实和 BugsInPy,但并非用 LLM/Agent 改进静态分析或形式化验证,研究目标本身仍是 LLM。引用 13 inbox
Nikhil Parasaram, Huijie Yan, Boyu Yang, Zineb Flahy, Abriele Qudsi, Damian Ziaber, Earl T. Barr, Sergey Mechtaev
crossref: 2026-09-12

AI 速览

一句话:定义并系统研究 LLM 程序修复中的事实选择问题,提出按缺陷选择提示事实的统计模型 Maniple。

LLM 程序修复常通过在提示中加入栈轨迹、GitHub issue 等 bug 相关事实来提升效果,但哪些事实、多少事实应被包含仍不清楚。本文在 BugsInPy 的 314 个 Python bug 上,用超过 19K 个提示系统评测七类事实的组合,发现每类事实都有帮助,但提示修复效果随事实数量呈非单调变化,且不存在通用最优事实集。作者据此定义事实选择问题,即针对具体任务实例挑选最优事实集合,并提出统计模型 Maniple。在 157 个测试 bug 上,Maniple 修复 88 个,较最佳通用事实配置提升 17%。

问题
LLM 程序修复提示中应加入哪些、多少 bug 相关事实才能最大化修复成功率?该问题此前缺乏系统研究,且事实数量与效果可能非单调、不存在通用最优集合。
方法
在 BugsInPy 上对 314 个 Python bug 构造 19K+ 提示,组合七类事实进行大规模实证;定义事实选择问题,并实现按具体 bug 选择事实的统计模型 Maniple。
评估
在 157 个测试 bug 上评测 Maniple 并与当前最优零样本、非对话式 LLM 修复方法比较;Maniple 修复 88 个 bug,比最佳通用配置高 17%。
原文摘要(Abstract)

Recent research has shown that incorporating bug-related facts, such as stack traces and GitHub issues, into prompts enhances the bug-fixing capabilities of large language models (LLMs). Considering the ever-increasing context window of these models, a critical question arises: what and how many facts should be included in prompts to maximise the chance of correctly fixing bugs? To answer this question, we conducted a large-scale study, employing over 19K prompts featuring various combinations of seven diverse facts to rectify 314 bugs from open -source Python projects within the BugsInPy benchmark. Our findings revealed that each fact, ranging from simple syntactic details like code context to semantic information previously unexplored in the context of LLMs such as angelic values, is beneficial. Specifically, each fact aids in fixing some bugs that would remain unresolved or only be fixed with a low success rate without it. Importantly, we discovered that the effectiveness of program repair prompts is non-monotonic over the number of used facts; using too many facts leads to subpar outcomes. These insights led us to define the fact selection problem: determining the optimal set of facts for inclusion in a prompt to maximise LLM's performance on a given task instance. We found that there is no one-size-fits-all set of facts for bug repair. Therefore, we developed a basic statistical model, named Maniple, which selects facts specific to a given bug to include in the prompt. This model significantly surpasses the performance of the best generic fact set. To underscore the significance of the fact selection problem, we benchmarked Maniple against the state-of-the-art zero-shot, non-conversational LLM-based bug repair methods. On our testing dataset of 157 bugs, Maniple repairs 88 bugs, 17% above the best configuration.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8704,
  title = {The Fact Selection Problem in LLM-Based Program Repair},
  author = {Nikhil Parasaram and Huijie Yan and Boyu Yang and Zineb Flahy and Abriele Qudsi and Damian Ziaber and Earl T. Barr and Sergey Mechtaev},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00162}
}