paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Detecting Overfitting of Machine Learning Techniques for Automatic Vulnerability Detection

面向自动漏洞检测的机器学习技术过拟合检测
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 5/10 · 论文研究机器学习漏洞检测模型的过拟合与鲁棒性,属于PL与ML交叉中的代码分析评测,但其核心不是静态分析、Agentic程序、LLM辅助验证、浮点程序分析或贝叶斯程序分析。其跨验证基准与失效原因分析思路与用户对问题驱动评测的兴趣部分契合,因此为中等匹配。引用 11 inbox
Niklas Risse
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出交叉验证基准方法,揭示基于语义保持变换增强训练的漏洞检测模型仍依赖无关特征,鲁棒性不泛化。

机器学习自动漏洞检测在测试集上可达到较高准确率,但这些结果是否泛化于数据集之外仍存疑。已有工作通过注入语义保持变换放大测试集,发现模型准确率显著下降,说明模型使用了无关特征;用放大训练数据可恢复准确率。本文复现并推进该研究,提出一种可操作的模型基准评测方法。具体地,作者提出交叉验证算法,在训练集或测试集放大阶段应用语义保持变换,并系统评估模型对未见变换的鲁棒性。使用11种变换和3种机器学习技术,实验发现:训练数据增强带来的鲁棒性提升只适用于训练时所用的特定变换;换言之,经过鲁棒化处理的模型在测试数据上预测漏洞时仍然依赖无关特征。该工作为更可靠地评估漏洞检测中的机器学习进展提供了基准方法。

问题
机器学习漏洞检测模型可能过拟合数据集并利用无关特征,已有测试集放大实验显示性能下降,而训练增强带来的鲁棒性是否泛化尚不清楚。
方法
复现并扩展已有研究,提出交叉验证算法,在训练集或测试集放大时应用语义保持变换,使用11种变换和3种机器学习技术评估鲁棒性。
评估
实验表明训练数据增强带来的鲁棒性仅针对训练时使用的特定变换,鲁棒化模型在测试时仍依赖无关特征,说明其过拟合问题并未真正解决。
原文摘要(Abstract)

Recent results of machine learning for automatic vulnerability detection have been very promising indeed: Given only the source code of a function f, models trained by machine learning techniques can decide if f contains a security flaw with up to 70% accuracy. But how do we know that these results are general and not specific to the datasets? To study this question, researchers proposed to amplify the testing set by injecting semantic preserving changes and found that the model’s accuracy significantly drops. In other words, the model uses some unrelated features during classification. In order to increase the robustness of the model, researchers proposed to train on amplified training data, and indeed model accuracy increased to previous levels. In this paper, we replicate and continue this investigation, and provide an actionable model benchmarking methodology to help researchers better evaluate advances in machine learning for vulnerability detection. Specifically, we propose a cross validation algorithm, where a semantic preserving transformation is applied during the amplification of either the training set or the testing set. Using 11 transformations and 3 ML techniques, we find that the improved robustness only applies to the specific transformations used during training data amplification. In other words, the robustified models still rely on unrelated features for predicting the vulnerabilities in the testing data.

链接与引用

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

BibTeX
@inproceedings{Risse23,
  title = {Detecting Overfitting of Machine Learning Techniques for Automatic Vulnerability Detection},
  author = {Niklas Risse},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3617845}
}