Back to search

Universidade de Coimbro

On the use of Deep Graph Convolutional Neural Networks with source code structures to detect vulnerable software code units

Abstract

dc:description.abstract

Software vulnerabilities remain a major concern for system security, leading to breaches, data loss, and financial damage. Traditional detection methods, such as static and dynamic analysis, face persistent limitations: static analysis tools depend on expert-crafted rules and suffer from high false positives (incorrectly flagging safe code as vulnerable), while dynamic approaches struggle with incomplete coverage, false negatives (undetected vulnerable functions), and high computational cost. Machine Learning (ML) and Deep Learning (DL) have emerged as alternatives by learning patterns directly from data, reducing the reliance on hand-crafted rules. Graph-based Deep Learning is particularly promising, as source code can be represented as graphs, allowing models such as Deep Graph Convolutional Neural Networks (DGCNNs) to capture structural and semantic properties directly. This work evaluates DGCNNs on different graph representations of C functions to assess their effectiveness in vulnerability detection. A graph extraction pipeline was extended to build adjacency and feature matrices for Control Flow Graphs (CFGs), Abstract Syntax Trees (ASTs), and Program Dependence Graphs (PDGs) from a curated Linux kernel dataset. On top of this, a modular neural framework was implemented with two Convolutional Neural Network (CNN)-based classifier branches, embedding extraction and analysis, and an autoencoder module for pretraining. Experiments showed that CFGs, supported by well-defined features, yielded the most consistent results, particularly with a lightweight 1D CNN classifier and autoencoder pretraining. ASTs and PDGs, though richer in structure, produced unstable embeddings due to simpler features and the absence of graph slicing. A Very Deep Convolutional Network (VGG)-based classifier proved highly sensitive to different dataset training splits and dataset imbalance, collapsing in several runs. Although the overall F1-score metric remains modest compared to state-of-the-art, the results confirm the feasibility of applying DGCNNs to large, imbalanced datasets where vulnerable functions are rare. The findings support a configuration based on CFGs and a 1D CNN classifier with an autoencoder as the most balanced configuration, underscoring that representation quality and feature engineering matter more than classifier depth. This framework establishes a reproducible and extensible basis for future research in graph-based vulnerability detection.

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Vieira, Luís Pedro Almendra
Advisors dc:contributor.advisor
  • Pereira, José Alexandre D'Abruzzo
  • Lourenço, Nuno António Marques

Subjects

dc:subject × 10

Rights

dc:rights
Statement dc:rights
  • openAccess
Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Tid
204037751

Chain of custody

source
Harvested from
Universidade de Coimbro
Base URL
estudogeral.sib.uc.pt/oai/request
Last updated
2026-11-26
Source record
OAI-PMH GetRecord
citation

Vieira, Luís Pedro Almendra. On the use of Deep Graph Convolutional Neural Networks with source code structures to detect vulnerable software code units. 2025. https://hdl.handle.net/10316/120613