paperbot · PL 论文追踪

全部论文 待读 收藏

P1 The Power of Types: Exploring the Impact of Type Checking on Neural Bug Detection in Dynamically Typed Languages

类型的力量:探索类型检查对动态类型语言中神经缺陷检测的影响
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 5/10 · 论文研究类型检查对神经缺陷检测的影响,属于机器学习与静态分析(类型检查)的交叉,与 AI→PL 中利用 ML 改进静态分析的方向部分相关;但未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,也未针对 ML 系统/Agentic 程序做静态分析,因此匹配度中等。引用 0 inbox
Boqi Chen, José Antonio Hernández López, Gunter Mussbacher, Dániel Varró
crossref: 2026-09-12

AI 速览

一句话:揭示动态类型语言缺陷数据集中类型相关缺陷占比,并证明神经缺陷检测器与类型检查结合可提升检测效果。

动态类型语言(如 Python)缺少强制类型标注,传统静态分析难以早期发现缺陷,因此神经缺陷检测器受到关注;然而已有工作在训练与测试时忽略了可选类型检查器的作用,可能造成性能评估偏差并使检测焦点偏移。本文对现有合成与真实数据集进行类型检查,量化类型相关缺陷的占比,并系统研究其对多种面向变量误用缺陷的神经缺陷检测器训练与测试的影响。结果发现:现有数据集含有大量类型相关缺陷;将类型检查器与神经检测器结合尤其在有类型标注时有益;神经检测器在类型相关缺陷上表现更好;从训练数据中移除类型相关缺陷,反而能提升其发现类型检查器范围之外缺陷的能力。

问题
面向动态类型语言的神经缺陷检测器在训练与测试时未考虑可选类型检查器,导致对其性能的估计失真,并可能使检测焦点偏向类型检查器即可发现的缺陷。
方法
使用类型检查器对现有合成与真实缺陷数据集进行类型检查,统计类型相关缺陷的普遍程度,并通过实验对比类型相关缺陷对多种神经缺陷检测器训练与测试的影响。
评估
在多个现有神经缺陷检测器与合成/真实数据集上,针对变量误用缺陷开展类型检查与对照实验分析。
原文摘要(Abstract)

[Motivation] Automated bug detection in dynamically typed languages such as Python is essential for maintaining code quality. The lack of mandatory type annotations in such languages can lead to errors that are challenging to identify early with traditional static analysis tools. Recent progress in deep neural networks has led to increased use of neural bug detectors. In statically typed languages, a type checker is integrated into the compiler and thus taken into consideration when the neural bug detector is designed for these languages. [Problem] However, prior studies overlook this aspect during the training and testing of neural bug detectors for dynamically typed languages. When an optional type checker is used, assessing existing neural bug detectors on bugs easily detectable by type checkers may impact their performance estimation. Moreover, including these bugs in the training set of neural bug detectors can shift their detection focus toward the wrong type of bugs. [Contribution] We explore the impact of type checking on various neural bug detectors for variable misuse bugs, a common type targeted by neural bug detectors. Existing synthetic and real-world datasets are type-checked to evaluate the prevalence of type-related bugs. Then, we investigate how type-related bugs influence the training and testing of the neural bug detectors. [Findings] Our findings indicate that existing bug detection datasets contain a significant proportion of type-related bugs. Building on this insight, we discover integrating the neural bug detector with a type checker can be beneficial, especially when the code is annotated with types. Further investigation reveals neural bug detectors perform better on type-related bugs than other bugs. Moreover, removing type-related bugs from the training data helps improve neural bug detectors' ability to identify bugs beyond the scope of type checkers.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8699,
  title = {The Power of Types: Exploring the Impact of Type Checking on Neural Bug Detection in Dynamically Typed Languages},
  author = {Boqi Chen and José Antonio Hernández López and Gunter Mussbacher and Dániel Varró},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00088}
}