arrow
Return

Detecting code vulnerabilities with heterogeneous GNN training

delete2025-09-20
delete0
PRE
AI
Y
Yu Luo *
W
Weifeng Xu
D
Dianxiang Xu
DOI:10.1007/s10207-025-01132-xdelete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Detecting vulnerabilities in source code is a critical task for software security assurance. Graph Neural Network (GNN) machine learning can be a promising approach by modeling source code as graphs. Early approaches treated code elements uniformly, limiting their capacity to model diverse relationships that contribute to various vulnerabilities. Recent research addresses this limitation by considering the heterogeneity of node types and using Gated Graph Neural Networks (GGNN) to aggregate node information through different edge types. However, these edges primarily function as conduits for passing node information and may not capture detailed characteristics of distinct edge types. This paper presents Inter-Procedural Abstract Graphs (IPAGs) as an efficient, language-agnostic representation of source code, complemented by heterogeneous GNN training for vulnerability prediction. IPAGs capture the structural and contextual properties of code elements and their relationships. We also propose a Heterogeneous Attention GNN (HAGNN) model that incorporates multiple subgraphs capturing different features of source code. These subgraphs are learned separately and combined using a global attention mechanism, followed by a fully connected neural network for final classification. The proposed approach has achieved up to 96.6% accuracy on a large C dataset of 108 vulnerability types and 97.8% on a large Java dataset of 114 vulnerability types, outperforming state-of-the-art methods. Its applications to various real-world software projects have also demonstrated low false positive rates.
Keywords:
Code vulnerability
Machine learning
Graph neural networks
Static code analysis

Journal

I
International Journal of Information Security
IF:
3.2
Papers:
141
Citations:
1.8K

Organization

No organization information available
Cited Papers

Cited Papers

SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilities
err2022-07-01
err261
errOAAI
errLi, Zhen; Zou, Deqing; Xu, Shouhuai; Jin, Hai; Zhu, Yawei; Chen, Zhaoxuan
errShare
errSave
LineVD
err2022-10-17
err0
errOAAI
errDavid Hin; Andrey Kan; Huaming Chen; M. Ali Babar
errShare
errSave
POSTER
err2017-10-30
err0
PREAI
errGuanjun Lin; Jun Zhang; Wei Luo; Lei Pan; Yang Xiang
errShare
errSave
Building Program Vector Representations for Deep Learning
err2015-11-03
err0
errOAAI
errHao Peng; Lili Mou; Ge Li; Yuxuan Liu; Lu Zhang; Zhi Jin
errShare
errSave
Cross-Project Transfer Representation Learning for Vulnerable Function Discovery
err2018-07-01
err157
PREAI
errLin, Guanjun; Zhang, Jun; Luo, Wei; Pan, Lei; Xiang, Yang; De Vel, Olivier; Montague, Paul
errShare
errSave
researcher View more