高级检索

    基于多通道图神经网络和CNN-BiLSTM的漏洞检测方法

    Vulnerability detection method based on multi channel graph neural network and CNN-BiLSTM

    • 摘要: 针对当前基于深度学习的漏洞检测方法大多仅考虑代码序列语义或代码结构语义的问题,本文提出了基于多通道图神经网络(Multi Channel Graph Neural Network)和CNN-BiLSTM的漏洞检测方法MCGCBVul。该方法通过中心性分析将代码属性图的节点特征矩阵扩展为多通道的类图像矩阵,并使用图注意力网络(GATv2)和二维卷积神经网络(2D-CNN)提取图结构特征。同时采用双尺度一维卷积神经网络(1D-CNN)以及双向长短期记忆网络(BiLSTM)提取序列特征。最终将图特征和序列特征进行特征融合,以达到更好的漏洞检测性能。在FFMPeg+Qemu和Reveal两个数据集上进行实验后,实验结果表明,MCGCBVul在F1得分、准确率等多项指标上优于文中6种对比模型,准确率分别达到了63.952%和92.007%。此外,本文通过消融实验进一步证明了模型各模块改进的有效性。

       

      Abstract: In view of the problem that most of the current vulnerability detection methods based on deep learning only consider the semantics of code sequence or code structure, this paper proposes a vulnerability detection method MCGCBVul based on Multi Channel Graph Neural Network and CNN-BiLSTM. This method expands the node feature matrix of the code property graph into a multi-channel image-like matrix through the centrality analysis, and uses the graph attention network (GATv2) and the two-dimensional convolutional neural network (2D-CNN) to extract graph features. At the same time, the dual-scale one-dimensional convolutional neural network (1D-CNN) and the bidirectional long short-term memory network (BiLSTM) are used to extract sequence features. Finally, the graph features and sequence features are fused to achieve better vulnerability detection performance. After experiments on the FFMPeg+Qemu and Reveal datasets, the experimental results show that MCGCBVul outperforms the six comparison models in this paper in multiple indicators such as F1 score and accuracy, with accuracy rates of 63.952% and 92.007% respectively. In addition, this paper further proves the effectiveness of the improvement of each module of the model through ablation experiments.

       

    /

    返回文章
    返回