paperbot · PL 论文追踪

全部论文 待读 收藏

P2 How to Train Your Neural Bug Detector: Artificial vs Real Bugs

如何训练你的神经缺陷检测器:人工缺陷 vs 真实缺陷
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 4/10 · 论文研究神经缺陷检测器的训练数据(真实缺陷 vs 人工变异缺陷),属于机器学习用于程序分析/缺陷检测的相邻方向;但未涉及用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析。引用 5 inbox
Cedric Richter, Heike Wehrheim
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:用 3.3 万条真实缺陷修复训练神经缺陷检测器,在 Python 简单缺陷上性能最高提升 170%。

开源仓库中的真实缺陷修复本应是学习缺陷定位与修复的理想数据,但现有修复数据集规模通常不足以支撑数据密集型神经方法,因此神经缺陷检测器几乎只能用变异生成的人工缺陷训练,而这类检测器面对真实缺陷时往往表现不佳。本文系统比较了在真实缺陷修复、人工缺陷以及两者混合数据上训练的神经缺陷检测器,覆盖不同数据集规模与多种训练技巧,并构建了包含 3.3 万条真实缺陷修复的新数据集。基于该数据集的训练设置使现有神经缺陷检测器在 Python 简单缺陷上的性能最高提升 170%;评估还表明,扩大真实修复数据集或用于生成人工缺陷的代码数据集可带来进一步提升。为促进后续研究,作者公开了数据集、训练好的模型与代码。

问题
真实缺陷修复数据集规模太小,神经缺陷检测器几乎只能用变异生成的人工缺陷训练,导致其在真实缺陷上性能明显下降。
方法
系统对比在真实缺陷修复、人工缺陷及两者混合数据上训练的神经缺陷检测器,覆盖不同数据规模与训练技巧,并构建含 3.3 万条真实修复的新数据集。
评估
在该新数据集上训练可将现有检测器在 Python 简单缺陷上的性能提升最多 170%,并显示扩大真实修复集或代码集仍有增益;同时公开发布数据集、模型与代码。
原文摘要(Abstract)

Real bug fixes found in open source repositories seem to be the perfect source for learning to localize and repair real bugs. Yet, the scale of existing bug fix collections is typically too small for training data-intensive neural approaches. Neural bug detectors are hence almost exclusively trained on artificial bugs, produced by mutating existing source code and thus easily obtainable at large scales. However, neural bug detectors trained on artificial bugs usually underperform when faced with real bugs. To address this shortcoming, we set out to explore the impact of training on real bug fixes at scale. Our systematic study compares neural bug detectors trained on real bug fixes, artificial bugs and mixtures of real and artificial bugs at various dataset scales and with varying training techniques. Based on our insights gained from training on a novel dataset of 33k real bug fixes, we were able to identify a training setting capable of significantly improving the performance of existing neural bug detectors by up to 170% on simple bugs in Python. In addition, our evaluation shows that further gains can be expected by increasing the size of the real bug fix dataset or the code dataset used for generating artificial bugs. To facilitate future research on neural bug detection, we release our real bug fix dataset, trained models and code.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{RichterW23,
  title = {How to Train Your Neural Bug Detector: Artificial vs Real Bugs},
  author = {Cedric Richter and Heike Wehrheim},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00104}
}