arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.13291cs.SE
收藏

我们是否在学习正确的特征?一种评估基于深度学习的软件漏洞检测解决方案的框架

Are We Learning the Right Features? A Framework for Evaluating DL-Based Software Vulnerability Detection Solutions

University of Southern California(南加州大学)

Satyaki Das, Syeda Tasnim Fabiha, Saad Shafiq, Nenad Medvidovic

AI总结:

本文提出了一种评估基于深度学习的软件漏洞检测解决方案的框架,通过设计特征保持和消除扰动来衡量虚假和漏洞特征对预测的影响。

摘要:

最近的研究表明,一组新兴的基于深度学习(DL)的技术在检测软件漏洞方面的报告结果不可复现,无论是跨不同数据集还是在未见过的样本上。本文旨在为该领域的研究提供评估的基础。我们通过分析先前的工作和现有的漏洞数据集,来分析代码的语法和语义特征,这些特征对漏洞有贡献,以及那些错误相关联的特征。我们提供了一种新的、统一的表示方法,以捕捉这两种特征集,并利用这种表示方法来检测代码中漏洞和虚假特征的存在。为此,我们设计了两种类型的代码扰动:特征保持扰动(FPP)确保给定代码样本中的漏洞特征保持不变,而特征消除扰动(FEP)则从代码样本中消除特征。这些扰动旨在测量虚假和漏洞特征对给定漏洞检测解决方案预测的影响。为了评估这两类扰动对预测的影响,我们对五种最先进的基于深度学习的漏洞检测器进行了大规模的实证研究。我们的研究显示,对于漏洞特征,只有约2%的FPPs在五种检测器上平均导致预测发生变化的不良影响。然而,平均而言,约84%的FEPs导致保留漏洞预测的不良影响。对于虚假特征,我们观察到FPPs导致基于图的检测器的召回率下降高达29%。我们提出了这些结果背后的原因,并建议改进基于深度神经网络(DNN)的漏洞检测器的策略。我们提供基于扰动的评估框架作为公共资源,以使未来对漏洞检测器的独立评估成为可能。

英文摘要:

Recent research has revealed that the reported results of an emerging body of DL-based techniques for detecting software vulnerabilities are not reproducible, either across different datasets or on unseen samples. This paper aims to provide the foundation for properly evaluating the research in this domain. We do so by analyzing prior work and existing vulnerability datasets for the syntactic and semantic features of code that contribute to vulnerability, as well as features that falsely correlate with vulnerability. We provide a novel, uniform representation to capture both sets of features, and use this representation to detect the presence of both vulnerability and spurious features in code. To this end, we design two types of code perturbations: feature preserving perturbations (FPP) ensure that the vulnerability feature remains in a given code sample, while feature eliminating perturbations (FEP) eliminate the feature from the code sample. These perturbations aim to measure the influence of spurious and vulnerability features on the predictions of a given vulnerability detection solution. To evaluate how the two classes of perturbations influence predictions, we conducted a large-scale empirical study on five state-of-the-art DL-based vulnerability detectors. Our study shows that, for vulnerability features, only ~2% of FPPs yield the undesirable effect of a prediction changing among the five detectors on average. However, on average, ~84% of FEPs yield the undesirable effect of retaining the vulnerability predictions. For spurious features, we observed that FPPs yielded a drop in recall up to 29% for graph-based detectors. We present the reasons underlying these results and suggest strategies for improving DNN-based vulnerability detectors. We provide our perturbation-based evaluation framework as a public resource to enable independent future evaluation of vulnerability detectors.

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

↑