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.