arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.04675cs.SE
收藏

基于图简化和增强图表示学习的漏洞检测

Vulnerability Detection with Graph Simplification and Enhanced Graph Representation Learning

Xin-Cheng Wen, Yupan Chen, Cuiyun Gao, Hongyu Zhang, Jie M. Zhang, Qing Liao

摘要:

先前的研究已经证明了深度学习(DL)在自动化软件漏洞检测中的有效性。图神经网络(GNN)已被证明在学习源代码的图表示方面是有效的,并且通常被现有的基于DL的漏洞检测方法所采用。然而,现有的方法仍然受到GNN本质上难以处理代码结构图中长距离节点之间的连接的事实的限制。此外,它们没有很好地利用代码结构图中的多种类型的边(例如表示数据流和控制流的边)。因此,尽管实现了最先进的性能,但现有的基于GNN的方法往往无法捕获全局信息(即,节点之间的长距离依赖性)。为了缓解这些问题,在本文中,我们提出了一种新的漏洞检测框架与grAph简化和增强的图表示学习,命名为AMPLE。AMPLE主要包括两个部分:1)图简化,旨在通过缩小代码结构图的节点大小来减少节点之间的距离; 2)增强图表示学习,包括一个边缘感知的图卷积网络模块,用于将异构边缘信息融合到节点表示中,以及一个内核缩放的表示模块,用于很好地捕获遥远的图节点之间的关系。在三个公共基准数据集上的实验表明,在准确率和F1得分指标方面,AMPLE分别优于最先进的方法0.39%-35.32%和7.64%-199.81%。实验结果表明,AMPLE在学习代码图的全局信息进行漏洞检测方面是有效的。

英文摘要:

Prior studies have demonstrated the effectiveness of Deep Learning (DL) in automated software vulnerability detection. Graph Neural Networks (GNNs) have proven effective in learning the graph representations of source code and are commonly adopted by existing DL-based vulnerability detection methods. However, the existing methods are still limited by the fact that GNNs are essentially difficult to handle the connections between long-distance nodes in a code structure graph. Besides, they do not well exploit the multiple types of edges in a code structure graph (such as edges representing data flow and control flow). Consequently, despite achieving state-of-the-art performance, the existing GNN-based methods tend to fail to capture global information (i.e., long-range dependencies among nodes) of code graphs. To mitigate these issues, in this paper, we propose a novel vulnerability detection framework with grAph siMplification and enhanced graph rePresentation LEarning, named AMPLE. AMPLE mainly contains two parts: 1) graph simplification, which aims at reducing the distances between nodes by shrinking the node sizes of code structure graphs; 2) enhanced graph representation learning, which involves one edge-aware graph convolutional network module for fusing heterogeneous edge information into node representations and one kernel-scaled representation module for well capturing the relations between distant graph nodes. Experiments on three public benchmark datasets show that AMPLE outperforms the state-of-the-art methods by 0.39%-35.32% and 7.64%-199.81% with respect to the accuracy and F1 score metrics, respectively. The results demonstrate the effectiveness of AMPLE in learning global information of code graphs for vulnerability detection.

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

↑