paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Does data sampling improve deep learning-based vulnerability detection? Yeas! and Nays!

数据采样能提升基于深度学习的漏洞检测吗?是!与否!
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 3/10 · 该论文研究深度学习漏洞检测中的数据采样问题,属于机器学习与程序语言/安全交叉,但与用户关注的LLM/Agent改进静态分析或形式化验证、浮点程序分析、贝叶斯程序分析等核心方向距离较远。它不涉及LLM、Agentic程序、静态分析工具或形式化方法,仅可作为ML用于代码安全的背景参考。引用 44 inbox
Xu Yang, Shaowei Wang, Yi Li, Shaohua Wang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:系统评估数据采样对深度学习漏洞检测的影响,发现原始数据随机过采样最佳,且模型常不能基于真实漏洞语句推理。

针对深度学习漏洞检测(DLVD)在真实不平衡数据上性能骤降(平均F1下降73%)的问题,本文系统研究数据采样对DLVD的影响,涵盖检测效果与模型能否依据真实漏洞语句进行正确推理两方面。实验比较过采样/欠采样、原始数据/隐空间采样及SMOTE、OSS等策略。结果表明:过采样通常优于欠采样,原始数据采样优于隐空间采样,原始数据随机过采样最佳;OSS无助于缓解不平衡;若追求召回率,随机欠采样最优。原始随机过采样也能改善模型学习真实漏洞模式,但至少33%的案例中模型无法基于真实漏洞语句进行推理。最后给出可操作建议与研究路线图。

问题
DLVD在真实世界不平衡数据上性能显著下降,数据采样能否缓解该问题并提升其基于真实漏洞语句推理的能力尚不明确。
方法
系统实验比较多种数据采样策略,包括过采样与欠采样、原始数据与隐空间采样,以及SMOTE、OSS等先进方法,对DLVD有效性和推理正确性进行评估。
评估
在漏洞检测数据集上比较各采样策略的检测性能与推理能力,并分析模型无法基于真实漏洞语句做出决策的案例比例(至少33%)。
原文摘要(Abstract)

Recent progress in Deep Learning (DL) has sparked interest in using DL to detect software vulnerabilities automatically and it has been demonstrated promising results at detecting vulnerabilities. However, one prominent and practical issue for vulnerability detection is data imbalance. Prior study observed that the performance of state-of-the-art (SOTA) DL-based vulnerability detection (DLVD) approaches drops precipitously in real world imbalanced data and a 73% drop of F1-score on average across studied approaches. Such a significant performance drop can disable the practical usage of any DLVD approaches. Data sampling is effective in alleviating data imbalance for machine learning models and has been demonstrated in various software engineering tasks. Therefore, in this study, we conducted a systematical and extensive study to assess the impact of data sampling for data imbalance problem in DLVD from two aspects: i) the effectiveness of DLVD, and ii) the ability of DLVD to reason correctly (making a decision based on real vulnerable statements). We found that in general, oversampling outperforms undersampling, and sampling on raw data outperforms sampling on latent space, typically random oversampling on raw data performs the best among all studied ones (including advanced one SMOTE and OSS). Surprisingly, OSS does not help alleviate the data imbalance issue in DLVD. If the recall is pursued, random undersampling is the best choice. Random oversampling on raw data also improves the ability of DLVD approaches for learning real vulnerable patterns. However, for a significant portion of cases (at least 33% in our datasets), DVLD approach cannot reason their prediction based on real vulnerable statements. We provide actionable suggestions and a roadmap to practitioners and researchers.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{YangWLW23,
  title = {Does data sampling improve deep learning-based vulnerability detection? Yeas! and Nays!},
  author = {Xu Yang and Shaowei Wang and Yi Li and Shaohua Wang},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00192}
}