Skip to main navigation Skip to search Skip to main content

GraphCodeBERT-Augmented Graph Attention Networks for Code Vulnerability Detection

  • SUNY Buffalo

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

3 Scopus citations

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.

Original languageEnglish
Title of host publicationProceedings - 2025 IEEE Conference on Artificial Intelligence, CAI 2025
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages912-917
Number of pages6
ISBN (Electronic)9798331524005
DOIs
StatePublished - 2025
Event3rd IEEE Conference on Artificial Intelligence, CAI 2025 - Santa Clara, United States
Duration: May 5 2025May 7 2025

Publication series

NameProceedings - 2025 IEEE Conference on Artificial Intelligence, CAI 2025

Conference

Conference3rd IEEE Conference on Artificial Intelligence, CAI 2025
Country/TerritoryUnited States
CitySanta Clara
Period05/5/2505/7/25

Keywords

  • code property graph
  • deep learning
  • explainable AI
  • graph attention network
  • graph neural network
  • GraphCodeBERT
  • software vulnerability detection

Fingerprint

Dive into the research topics of 'GraphCodeBERT-Augmented Graph Attention Networks for Code Vulnerability Detection'. Together they form a unique fingerprint.

Cite this