Structure-Aware Code Vulnerability Analysis With Graph Neural Networks

This study explores the effectiveness of graph neural networks (GNNs) for vulnerability detection in software code, utilizing a real-world dataset of Java vulnerability-fixing commits. The dataset's structure, based on the number of modified methods in each commit, offers a natural partition that facilitates diverse investigative scenarios. The primary focus is to evaluate the general applicability of GNNs in identifying vulnerable code segments and distinguishing these from their fixed versions, as well as from random non-vulnerable code. Through a series of experiments, the research addresses key questions about the suitability of different configurations and subsets of data in enhancing the prediction accuracy of GNN models. Experiments indicate that certain model configurations, such as the pruning of specific graph elements and the exclusion of certain types of code representation, significantly improve performance. Additionally, the study highlights the importance of including random data in training to optimize the detection capabilities of GNNs.

Paper

References (5)

022022. Deep Learning Based Vulnerability Detection: Are We There Yet?IEEE Transactions on Software Engineering
03Include information about AST edges into the input graphs or only use DDG and CFG edges
04Task 𝑇 2 : dividing in the set of all methods, i.e., potentially vulnerable methods against random safe code
05Include the full graph, which can be too large and detailed, or use its pruned version at operator nodes instead

Similar papers

© 2026 NYSGPT2525 LLC