arrow
Return

CodeGraphNet: embedding-driven enhanced vulnerability detection with line-level error identification

delete2026-03-31
delete0
PRE
AI
S
Sultan, Md. Fahim
M
Mohammad Wardat
C
Cuzzocrea, Alfredo
A
Akter, Mst Shapna
DOI:10.1007/s11219-026-09752-9delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Software vulnerabilities are defects in programs that adversaries can exploit to gain unauthorized access, alter execution, or leak sensitive information. Although many automated vulnerability detection approaches have been proposed, a persistent limitation is the quality of feature embeddings: token-only representations often miss deeper program semantics, while single-modality graph features may fail to capture complementary structural signals needed for reliable multi-class prediction. To address these gaps, we propose CodeGraphNet, a hierarchical graph-fusion embedding framework for function-level vulnerability detection in C/C++ code. CodeGraphNet jointly models inter-procedural control flow and function-call connectivity, data dependencies, and execution context through complementary graph views, and integrates them with transformer-based sequential representations via an adaptive fusion mechanism. We evaluate the framework using 10-fold cross-validation and an independent held-out test set, training multiple classifiers and an ensemble model (DeepTree). Compared with traditional embedding baselines, CodeGraphNet improves function-level vulnerability identification and achieves 0.767 accuracy and 0.769 F1-score on the test set. Relative to CodeBERT and GraphCodeBERT baselines with a 1-layer neural classifier, our approach yields improvements of up to 31.0% in accuracy and 49.4% in F1-score under the same evaluation setting. Finally, we integrate LIME to highlight influential tokens that drive predictions, providing actionable evidence for developer triage. Overall, the results suggest that fusing complementary program-structure graphs with sequential modeling improves both detection performance and interpretability, supporting more reliable vulnerability analysis in secure software development.
Keywords:
CWE
Software development
Hierarchical graph
Software vulnerabilities
Security protective
Defect localization

Journal

S
Software Quality Journal
IF:
2.3
Papers:
30
Citations:
918

Organization

O
Oakland University
Scholars:
3.6K
Papers: 3.0K
Citations: 2.7K
U
university of calabria
Scholars:
1.3K
Papers: 569
Citations: 0