paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Neural program repair with execution-based backpropagation

基于执行反馈反向传播的神经程序修复
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 2/10 · 该论文属于神经程序修复(ML4Code),用编译与测试执行结果优化NMT模型,并非静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,也未涉及LLM/Agent与PL的交叉。与画像核心方向仅属于程序语言与机器学习交叉的较远邻域。引用 237 inbox
He Ye, Matias Martinez, Martin Monperrus
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:将编译与测试执行结果引入损失函数进行反向传播,改进基于NMT的自动程序修复,提高补丁可编译性与修复成功率。

神经机器翻译(NMT)架构在自动程序修复上已有进展,但现有方法仅以字符和词元上的纯语法损失函数优化网络权重,未利用程序特有信息,因而常生成不可编译的低质量补丁。本文提出 RewardRepair,其核心创新在于把程序编译结果与测试执行信息构造成损失函数,对神经网络进行反向传播优化,从而奖励那些能够编译且不过拟合的补丁。作者在四个基准上开展实验,结果显示使用编译与测试执行结果来优化神经修复模型是可行且有效的:RewardRepair 正确修复了 207 个缺陷,其中 121 个为此前文献中从未修复过的缺陷;同时其生成可编译补丁的比例最高达 45.3%,优于当前最优方法的 39%。

问题
现有基于NMT的自动程序修复只优化字符/词元层面的语法损失,忽略程序语义信息,导致生成的补丁质量低、往往无法编译。
方法
提出 RewardRepair,将补丁的编译结果与测试执行结果编码为奖励信号并构成损失函数,据此对神经修复模型进行反向传播训练。
评估
在四个基准数据集上评估,统计正确修复的缺陷数、首次修复缺陷数以及可编译补丁比例,并与当前最优方法对比。
原文摘要(Abstract)

Neural machine translation (NMT) architectures have achieved promising results for automatic program repair. Yet, they have the limitation of generating low-quality patches (e.g., not compilable patches). This is because the existing works only optimize a purely syntactic loss function based on characters and tokens without incorporating program-specific information during neural network weight optimization. In this paper, we propose a novel program repair model called RewardRepair. The core novelty of RewardRepair is to improve NMT-based program repair with a loss function based on program compilation and test execution information, rewarding the network to produce patches that compile and that do not overfit. We conduct several experiments to evaluate RewardRepair showing that it is feasible and effective to use compilation and test execution results to optimize the underlying neural repair model. RewardRepair correctly repairs 207 bugs over four benchmarks. we report on repair success for 121 bugs that are fixed for the first time in the literature. Also, RewardRepair produces up to 45.3% of compilable patches, an improvement over the 39% by the state-of-the-art.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2105-04123,
  title = {Neural program repair with execution-based backpropagation},
  author = {He Ye and Matias Martinez and Martin Monperrus},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510222}
}