GraphCodeBERT-Augmented Graph Attention Networks for Code Vulnerability Detection

Detecting software vulnerabilities is critical for the security of modern complex software systems. However, it is challenging due to the complexity of codebases and limitations in existing methods. Traditional approaches often struggle to capture both semantic and structural dependencies effectively. To represent code semantics comprehensively, this paper presents a novel framework integrating Graph Attention Networks (GATs) with Code Property Graphs (CPGs), which unify Abstract Syntax Trees (ASTs), Control Flow Graphs (CFGs), and Program Dependency Graphs (PDGs). Node embeddings are initialized using pretrained GraphCodeBERT, enhanced with multi-head attention layers, residual connections, and global attention pooling. GANbased data augmentation is employed to address the class imbalance, improving model robustness. Our extensive experimental evaluations demonstrate a detection accuracy of 88.5 percent, surpassing state-of-the-art baselines such as CodeBERT and GraphCodeBERT across multiple evaluation metrics, including precision, recall, and F1-score. Furthermore, interpretable attention mechanisms enable the prioritization of critical code regions, ensuring practical applicability. This work establishes a scalable and explainable AI-driven approach for vulnerability detection.

Authors

Institutions

Publication Details

Published
2025-05-05
DOI
https://doi.org/10.1109/cai64502.2025.00161
Primary Topic
Software Reliability and Analysis Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

GraphCodeBERT-Augmented Graph Attention Networks for Code Vulnerability Detection

Nalini Ratha, Deekshith Sagar Rangapuram
Software Reliability and Analysis Research
article

GraphCodeBERT-Augmented Graph Attention Networks for Code Vulnerability Detection

Nalini Ratha, Deekshith Sagar Rangapuram
article en

Abstract

Detecting software vulnerabilities is critical for the security of modern complex software systems. However, it is challenging due to the complexity of codebases and limitations in existing methods. Traditional approaches often struggle to capture both semantic and structural dependencies effectively. To represent code semantics comprehensively, this paper presents a novel framework integrating Graph Attention Networks (GATs) with Code Property Graphs (CPGs), which unify Abstract Syntax Trees (ASTs), Control Flow Graphs (CFGs), and Program Dependency Graphs (PDGs). Node embeddings are initialized using pretrained GraphCodeBERT, enhanced with multi-head attention layers, residual connections, and global attention pooling. GANbased data augmentation is employed to address the class imbalance, improving model robustness. Our extensive experimental evaluations demonstrate a detection accuracy of 88.5 percent, surpassing state-of-the-art baselines such as CodeBERT and GraphCodeBERT across multiple evaluation metrics, including precision, recall, and F1-score. Furthermore, interpretable attention mechanisms enable the prioritization of critical code regions, ensuring practical applicability. This work establishes a scalable and explainable AI-driven approach for vulnerability detection.

University at Buffalo, State University of New York (US)
Openalex Percentile: Top 83%
Software Reliability and Analysis Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.