arrow
Return

CSGVD: A deep learning approach combining sequence and graph embedding for source code vulnerability detection

delete2023-05-01
delete30
PRE
AI
W
Wei Tang
M
Mingwei Tang *
M
Minchao Ban
Z
Ziguo Zhao
M
Mingjun Feng
DOI:10.1016/j.jss.2023.111623delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
In order to secure software, it is critical to detect potential vulnerabilities. The performance of traditional static vulnerability detection methods is limited by predefined rules, which rely heavily on the expertise of developers. Existing deep learning-based vulnerability detection models usu-ally use only a single sequence or graph embedding approach to extract vulnerability features. Sequence embedding-based models ignore the structured information inherent in the code, and graph embedding-based models lack effective node and graph embedding methods. As a result, we propose a novel deep learning-based approach, CSGVD (Combining Sequence and Graph embedding for Vulnerability Detection), which considers function-level vulnerability detection as a graph binary classification task. Firstly, we propose a PE-BL module, which inherits and enhances the knowledge from the pre-trained language model. It extracts the code's local semantic features as node embedding in the control flow graph by using sequence embedding. Secondly, CSGVD uses graph neural networks to extract the structured information of the graph. Finally, we propose a mean biaffine attention pool-ing, M-BFA, to better aggregate node information as a graph's feature representation. The experimental results show that CSGVD outperforms the existing state-of-the-art models and obtains 64.46% accuracy on the real-world benchmark dataset from CodeXGLUE for vulnerability detection.(c) 2023 Elsevier Inc. All rights reserved.
Keywords:
Graph neural networks
Vulnerability detection
Sequence embedding
Graph embedding
Pre -trained language model
Attention pooling

Journal

Journal of Systems and Software cover
Journal of Systems and Software
IF:
4.1
Papers:
5.4K
Citations:
8.4K

Organization

X
Xihua University
Scholars:
6.2K
Papers: 3.6K
Citations: 4.1K