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

漏洞检测的深度学习模型实证研究

An Empirical Study of Deep Learning Models for Vulnerability Detection

Iowa State University(爱荷华州立大学)

Benjamin Steenhoek, Md Mahbubur Rahman, Richard Jiles, Wei Le

摘要:

代码的深度学习(DL)模型最近在漏洞检测方面取得了巨大进展。在某些情况下,基于DL的模型优于静态分析工具。虽然已经提出了许多伟大的模型,但我们还没有很好地理解这些模型。这限制了模型鲁棒性的进一步提高,调试和部署的漏洞检测。在本文中,我们在两个广泛使用的漏洞检测数据集Devign和MSR上调查和复制了9个最先进的(SOTA)深度学习模型。我们研究了三个方面的6个研究问题,即模型能力,训练数据和模型解释。我们通过实验证明了模型不同运行之间的变异性以及不同模型输出之间的低一致性。我们研究了针对特定类型的漏洞训练的模型,并与同时针对所有漏洞训练的模型进行了比较。我们探讨了DL可能认为“难以”处理的程序类型。我们研究了训练数据大小和训练数据组成与模型性能的关系。最后,我们研究了模型解释,并分析了模型用于预测的重要特征。我们相信,我们的研究结果可以帮助更好地理解模型的结果,提供指导准备训练数据,并提高模型的鲁棒性。我们所有的数据集、代码和结果都可以在https://doi.org/10.6084/m9.figshare.20791240上找到。

英文摘要:

Deep learning (DL) models of code have recently reported great progress for vulnerability detection. In some cases, DL-based models have outperformed static analysis tools. Although many great models have been proposed, we do not yet have a good understanding of these models. This limits the further advancement of model robustness, debugging, and deployment for the vulnerability detection. In this paper, we surveyed and reproduced 9 state-of-the-art (SOTA) deep learning models on 2 widely used vulnerability detection datasets: Devign and MSR. We investigated 6 research questions in three areas, namely model capabilities, training data, and model interpretation. We experimentally demonstrated the variability between different runs of a model and the low agreement among different models' outputs. We investigated models trained for specific types of vulnerabilities compared to a model that is trained on all the vulnerabilities at once. We explored the types of programs DL may consider "hard" to handle. We investigated the relations of training data sizes and training data composition with model performance. Finally, we studied model interpretations and analyzed important features that the models used to make predictions. We believe that our findings can help better understand model results, provide guidance on preparing training data, and improve the robustness of the models. All of our datasets, code, and results are available at https://doi.org/10.6084/m9.figshare.20791240.

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

↑