paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Detecting false alarms from automatic static analysis tools

检测自动静态分析工具产生的误报
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 5/10 · 论文探讨机器学习在静态分析误报检测中的评估问题,属于机器学习与程序语言的交叉,且对基准评测和数据泄漏的批判符合问题驱动偏好;但未涉及LLM/Agent,也不在用户关注的agentic程序、浮点或贝叶斯分析等核心方向。引用 92 inbox
Hong Jin Kang, Khai Loong Aw, David Lo
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:揭示自动静态分析误报检测中因数据泄漏与标签启发式导致性能被高估,并给出评估准则。

自动静态分析工具(如 Findbugs)误报率高,阻碍其采用。已有研究提出用机器学习剪枝误报,只向开发者呈现可操作警告,并基于文件、代码与警告特征构造“黄金特征”,报告了近乎完美的性能。本文对此进行详细分析,发现多个研究使用的实验流程存在数据泄漏与数据重复:真实标签泄漏到度量给定上下文中可操作警告比例的特征中,且测试集中的许多警告也出现在训练集中。作者还指出确定真实标签的警告预言机存在局限,其启发式将给定修订版本中的警告与未来参考修订版本比较,参考修订版本的选择会影响警告分布,且产生的标签与人工预言机不一致。因此,先前观察到的强性能过于乐观,实际采用时未必成立。

问题
自动静态分析工具误报率高,已有机器学习方法基于“黄金特征”剪枝误报并报告近乎完美性能,但这一性能是否可信尚不清楚。
方法
对相关研究的实验流程进行详细分析,检查特征构造中的标签泄漏、训练集与测试集之间的数据重复,并考察确定真实标签的 warning oracle 启发式及其参考修订版本选择的影响。
评估
分析表明,实验流程中的数据泄漏、数据重复以及 warning oracle 与人工判断不一致会使性能被高估;据此总结评估误报检测器时的经验与准则。
原文摘要(Abstract)

Automatic static analysis tools (ASATs), such as Findbugs, have a high false alarm rate. The large number of false alarms produced poses a barrier to adoption. Researchers have proposed the use of machine learning to prune false alarms and present only actionable warnings to developers. The state-of-the-art study has identified a set of “Golden Features” based on metrics computed over the characteristics and history of the file, code, and warning. Recent studies show that machine learning using these features is extremely effective and that they achieve almost perfect performance. We perform a detailed analysis to better understand the strong performance of the “Golden Features”. We found that several studies used an experimental procedure that results in data leakage and data duplication, which are subtle issues with significant implications. Firstly, the ground-truth labels have leaked into features that measure the proportion of actionable warnings in a given context. Secondly, many warnings in the testing dataset appear in the training dataset. Next, we demonstrate limitations in the warning oracle that determines the ground-truth labels, a heuristic comparing warnings in a given revision to a reference revision in the future. We show the choice of reference revision influences the warning distribution. Moreover, the heuristic produces labels that do not agree with human oracles. Hence, the strong performance of these techniques previously seen is overoptimistic of their true performance if adopted in practice. Our results convey several lessons and provide guidelines for evaluating false alarm detectors.

链接与引用

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

BibTeX
@inproceedings{abs-2202-05982,
  title = {Detecting false alarms from automatic static analysis tools},
  author = {Hong Jin Kang and Khai Loong Aw and David Lo},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510214}
}