A Code Vulnerability Detection Method Integrating Pre-trained Model and Graph Neural Network
摘要
To address the limitations of existing code vulnerability detection methods, which fail to adequately extract and effectively fuse code features, resulting in incomplete model learning and suboptimal detection performance, this paper proposes a code vulnerability detection method that integrates pre-trained model with graph neural network. The approach extracts both code sequence and code property graph features, where the pre-trained model captures semantic information and the graph neural network learns structural characteristics. Then, an attention-based fusion network is introduced to model interactions between these features. Finally, an interpolative fusion mechanism is proposed to refine the model’s focus. The experimental results on three benchmark datasets demonstrate that the proposed method achieves promising detection performance.