Universidade de Coimbro
Enhancing Software Vulnerability Detection using Graph Neural Networks and Large Language Models
Abstract
dc:description.abstractSoftware vulnerabilities remain a critical threat to system security, potentiallyleading to severe data breaches and significant financial damage. Traditional detection techniques face persistent limitations: static analysis tools rely heavily onmanualrules and suffer from high false positive rates, while dynamic approachesstruggle with incomplete code coverage and substantial computational costs.To address these challenges, Machine Learning (ML) and Deep Learning (DL)have emerged as powerful alternatives by learning patterns directly from data.Graph-based DL is particularly promising, allowing models like the Deep GraphConvolutional Neural Network (DGCNN) to capture the structural propertiesof source code. However, previous architectures have demonstrated instabilitywhen faced with highly imbalanced real-world datasets, often presenting a semantic gap by relying on manual statistical features to represent graph nodes.This work proposes and validates a novel hybrid architecture that enhances vulnerability detection by bridging the gap between structural topology and deepsemantic understanding. Instead of relying solely on manual feature engineering, this approach leverages Large Language Models (LLMs), specifically GraphCodeBERT, to generate dense, context-aware embeddings for each node. Theseembeddings feed into a DGCNN and are classified using lightweight algorithms(SVM and XGBoost). To address extreme class imbalance, the architecture incorporates a robust synthetic resampling pipeline (SMOTETomek) and automatedhyperparameter optimization (Optuna).Evaluated on a comprehensive dataset of C functions extracted from the LinuxKernel, the proposedarchitecturesignificantlyoutperformsestablishedbaselines.Empirical results reveal a critical operational trade-off dictated by the poolingmechanism: structural sorting (SortPooling) acts as a conservative filter that minimizes False Positives, whereas semantic filtering (Adaptive Max Pooling (AMP))functions as a highly sensitive detector, achieving an unprecedented optimizedRecall of 76% on Abstract Syntax Tree (AST) representations. Ultimately, thisresearch demonstrates that enriching structural graph learning with LLM semantics provides a flexible, robust, and accurate solution for automated vulnerability detection.
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Correia, Constança Meneses Lima e Brito
- Advisor dc:contributor.advisor
-
- Pereira, José Alexandre D'Abruzzo
Subjects
dc:subject × 9Rights
dc:rights- Statement dc:rights
-
- openAccess
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Tid
- 204413702