arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2406.16526cs.SEcs.AI
收藏

NARRepair:面向自动程序修复的非自回归代码生成模型

NARRepair: Non-Autoregressive Code Generation Model for Automatic Program Repair

Shandong University(山东大学)

Zhenyu Yang, Zhen Yang, Zhongxing Yu

AI总结:

针对自回归式自动程序修复技术推理延迟高的问题,本文提出首个定制化非自回归代码生成模型NARRepair,通过三项创新设计实现高修复准确率下的推理速度显著提升。

摘要:

随着深度学习技术的发展,自动程序修复(Automatic Program Repair, APR)技术的性能达到了新的水平。以往基于深度学习的APR技术本质上以自回归(Autoregressive, AR)方式修改程序语句,即基于过去的值预测未来的值。由于采用逐词生成的方式,基于AR的APR技术存在极大的时间延迟,这一负面问题阻碍了APR技术在实际软件开发中的广泛应用。\n为解决该问题,我们旨在将非自回归(Non-Autoregressive, NAR)方法应用于APR任务,该方法可并行输出目标代码,从而避免巨大的推理延迟。为使NAR方式有效适配APR任务,本文提出了NARRepair——首个为APR任务定制的NAR代码生成模型。NARRepair具备三大核心创新点:1)利用修复动作缓解过校正问题;2)从抽象语法树(AST)中提取依赖信息,缓解词间依赖信息不足的问题;3)采用两阶段解码缓解上下文信息缺失的问题。我们在APR领域三个广泛使用的数据集上对NARRepair进行了评估,结果表明,该技术在保持高修复准确率的同时,能够显著提升推理速度。

英文摘要:

With the advancement of deep learning techniques, the performance of Automatic Program Repair(APR) techniques has reached a new level. Previous deep learning-based APR techniques essentially modified program sentences in the Autoregressive(AR) manner, which predicts future values based on past values. Due to the manner of word-by-word generation, the AR-based APR technique has a huge time delay. This negative consequence overshadows the widespread adoption of APR techniques in real-life software development. To address the issue, we aim to apply the Non-Autoregressive(NAR) method to the APR task, which can output target code in a parallel manner to avoid huge inference delays. To effectively adapt the NAR manner for the APR task, we in this paper propose NARRepair, the first customized NAR code generation model for the APR task. The NARRepair features three major novelties, including 1) using repair actions to alleviate the over-correction issue, 2) extracting dependency information from AST to alleviate the issue of lacking inter-word dependency information, 3) employing two-stage decoding to alleviate the issue of lacking contextual information. We evaluated NARRepair on three widely used datasets in the APR community, and the results show that our technique can significantly improve the inference speed while maintaining high repair accuracy.

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

↑