ReGVD:再访用于漏洞检测的图神经网络
ReGVD: Revisiting Graph Neural Networks for Vulnerability Detection
摘要:
识别源代码中的漏洞对于保护软件系统免受网络安全攻击至关重要。然而,这也是一个具有挑战性的步骤,需要安全和代码表示方面的专业知识。为此,我们的目标是开发一个通用的,实用的,和程序设计语言无关的模型,能够运行在各种源代码和库没有困难。因此,我们认为漏洞检测作为一个归纳文本分类问题,并提出了ReGVD,一个简单而有效的图神经网络为基础的模型的问题。特别地,ReGVD将每个原始源代码视为令牌的平坦序列以构建图,其中节点特征仅由预训练的程序设计语言(PL)模型的令牌嵌入层初始化。然后,ReGVD利用GNN层之间的剩余连接,并检查图级求和和最大池的混合,以返回源代码的图嵌入。ReGVD的性能优于现有的最先进的模型,并在CodeXGLUE的真实基准数据集上获得了最高的准确性,用于漏洞检测。我们的代码可从以下网址获得:\url{https://github.com/daiquocnguyen/GNN-ReGVD}。
英文摘要:
Identifying vulnerabilities in the source code is essential to protect the software systems from cyber security attacks. It, however, is also a challenging step that requires specialized expertise in security and code representation. To this end, we aim to develop a general, practical, and programming language-independent model capable of running on various source codes and libraries without difficulty. Therefore, we consider vulnerability detection as an inductive text classification problem and propose ReGVD, a simple yet effective graph neural network-based model for the problem. In particular, ReGVD views each raw source code as a flat sequence of tokens to build a graph, wherein node features are initialized by only the token embedding layer of a pre-trained programming language (PL) model. ReGVD then leverages residual connection among GNN layers and examines a mixture of graph-level sum and max poolings to return a graph embedding for the source code. ReGVD outperforms the existing state-of-the-art models and obtains the highest accuracy on the real-world benchmark dataset from CodeXGLUE for vulnerability detection. Our code is available at: \url{https://github.com/daiquocnguyen/GNN-ReGVD}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。