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

LineVD:使用图神经网络的语句级漏洞检测

LineVD: Statement-level Vulnerability Detection using Graph Neural Networks

David Hin, Andrey Kan, Huaming Chen, M. Ali Babar

摘要:

当前基于机器学习的软件漏洞检测方法主要是在功能级进行的。但是,这些方法的一个关键限制是,它们没有指出导致漏洞的特定代码行。这限制了开发人员有效检查和解释学习模型预测的能力,这对于将基于机器学习的工具集成到软件开发工作流程中至关重要。基于图的模型在函数级漏洞检测方面表现出了良好的性能,但它们在语句级漏洞检测方面的能力还没有得到广泛的研究。虽然通过可解释的人工智能解释功能级预测是一个有前途的方向,但我们在本文中从完全监督学习的角度考虑语句级软件漏洞检测任务。我们提出了一个新的深度学习框架LineVD,它将语句级漏洞检测制定为节点分类任务。LineVD利用使用图神经网络的语句之间的控制和数据依赖性,以及基于转换器的模型来编码原始源代码令牌。特别是,通过解决函数级和语句级信息之间的冲突输出,LineVD显着提高了预测性能,而没有函数代码的漏洞状态。我们已经对从多个真实世界项目中获得的真实世界C/C++漏洞的大规模集合进行了广泛的实验,并证明F1分数比当前最先进的水平增加了105%。

英文摘要:

Current machine-learning based software vulnerability detection methods are primarily conducted at the function-level. However, a key limitation of these methods is that they do not indicate the specific lines of code contributing to vulnerabilities. This limits the ability of developers to efficiently inspect and interpret the predictions from a learnt model, which is crucial for integrating machine-learning based tools into the software development workflow. Graph-based models have shown promising performance in function-level vulnerability detection, but their capability for statement-level vulnerability detection has not been extensively explored. While interpreting function-level predictions through explainable AI is one promising direction, we herein consider the statement-level software vulnerability detection task from a fully supervised learning perspective. We propose a novel deep learning framework, LineVD, which formulates statement-level vulnerability detection as a node classification task. LineVD leverages control and data dependencies between statements using graph neural networks, and a transformer-based model to encode the raw source code tokens. In particular, by addressing the conflicting outputs between function-level and statement-level information, LineVD significantly improve the prediction performance without vulnerability status for function code. We have conducted extensive experiments against a large-scale collection of real-world C/C++ vulnerabilities obtained from multiple real-world projects, and demonstrate an increase of 105\% in F1-score over the current state-of-the-art.

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

↑