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.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A Code Vulnerability Detection Method Integrating Pre-trained Model and Graph Neural Network

  • Hongyu Yang,
  • Jingchuan Luo,
  • Xiang Cheng

摘要

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.