arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.03093cs.SEcs.AIcs.CRcs.LG
收藏

重新审视基于深度学习的漏洞检测在真实数据集上的表现

Revisiting the Performance of Deep Learning-Based Vulnerability Detection on Realistic Datasets

University of Waterloo(滑铁卢大学)

Partha Chakraborty, Krishna Kanth Arumugam, Mahmoud Alfadel, Meiyappan Nagappan, Shane McIntosh

AI总结:

本文构建真实场景漏洞数据集Real-Vul,评估四种深度学习漏洞检测模型,揭示其在实际代码库中精确率和F1分数大幅下降,并针对过拟合问题提出数据增强方法,最多可提升30%性能。

摘要:

软件漏洞对日常软件系统的影响十分显著。尽管已有深度学习模型被提出用于漏洞检测,但其可靠性仍存疑。先前评估显示召回率/F1分数高达99%,但这些模型在实际场景中表现不佳,尤其是在对整个代码库而非仅对修复提交进行评估时。本文引入了Real-Vul,这是一个代表真实世界场景的综合性数据集,用于评估漏洞检测模型。对DeepWukong、LineVul、ReVeal和IVDetect的评估显示性能显著下降,精确率最多下降95个百分点,F1分数最多下降91个百分点。此外,模型性能会随漏洞特征而波动,对信息泄露或代码注入的F1分数优于对路径解析或可预测返回值的F1分数。结果凸显了在将基于深度学习的漏洞检测部署到实际环境之前需要解决的显著性能差距。过拟合被确定为一个关键问题,并提出了一种数据增强技术,可能将性能提升最多30%。贡献包括一种用于更好模型评估的数据集构建方法、Real-Vul数据集,以及深度学习模型在真实世界环境中表现挣扎的经验证据。

英文摘要:

The impact of software vulnerabilities on everyday software systems is significant. Despite deep learning models being proposed for vulnerability detection, their reliability is questionable. Prior evaluations show high recall/F1 scores of up to 99%, but these models underperform in practical scenarios, particularly when assessed on entire codebases rather than just the fixing commit. This paper introduces Real-Vul, a comprehensive dataset representing real-world scenarios for evaluating vulnerability detection models. Evaluating DeepWukong, LineVul, ReVeal, and IVDetect shows a significant drop in performance, with precision decreasing by up to 95 percentage points and F1 scores by up to 91 points. Furthermore, Model performance fluctuates based on vulnerability characteristics, with better F1 scores for information leaks or code injection than for path resolution or predictable return values. The results highlight a significant performance gap that needs addressing before deploying deep learning-based vulnerability detection in practical settings. Overfitting is identified as a key issue, and an augmentation technique is proposed, potentially improving performance by up to 30%. Contributions include a dataset creation approach for better model evaluation, Real-Vul dataset, and empirical evidence of deep learning models struggling in real-world settings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑