• Home
  • Search
  • Vulnerability Detection via Multiple-Graph-Based Code Representation
  • Cite Icon40
  • https://doi.org/10.1109/tse.2024.3427815Copy DOI Icon

Vulnerability Detection via Multiple-Graph-Based Code Representation

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

During software development and maintenance, vulnerability detection is an essential part of software quality assurance. Even though many program-analysis-based and machine-learning-based approaches have been proposed to automatically detect vulnerabilities, they rely on explicit rules or patterns defined by security experts and suffer from either high false positives or high false negatives. Recently, an increasing number of studies leverage deep learning techniques, especially Graph Neural Network (GNN), to detect vulnerabilities. These approaches leverage program analysis to represent the program semantics as graphs and perform graph analysis to detect vulnerabilities. However, they suffer from two main problems: (i) Existing GNN-based techniques do not effectively learn the structural and semantic features from source code for vulnerability detection. (ii) These approaches tend to ignore fine-grained information in source code. To tackle these problems, in this paper, we propose a novel vulnerability detection approach, named <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">MGVD</small> (<bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">M</b> <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">ultiple</small>-<bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">G</b> <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">raph-Based</small> <bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">V</b> <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">ulnerability</small> <bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">D</b> <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">etection)</small>, to detect vulnerable functions. To effectively learn the structural and semantic features from source code, <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">MGVD</small> uses three different ways to represent each function into multiple forms, i.e., two statement graphs and a sequence of tokens. Then we encode such representations to a three-channel feature matrix. The feature matrix contains the structural feature and the semantic feature of the function. And we add a weight allocation layer to distribute the weights between structural and semantic features. To overcome the second problem, <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">MGVD</small> constructs each graph representation of the input function using multiple different graphs instead of a single graph. Each graph focuses on one statement in the function and its nodes denote the related statements and their fine-grained code elements. Finally, <sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">MGVD</small> leverages CNN to identify whether this function is vulnerable based on such feature matrix. We conduct experiments on 3 vulnerability datasets with a total of 30,341 vulnerable functions and 127,931 non-vulnerable functions. The experimental results show that our method outperforms the state-of-the-art by 9.68% – 10.28% in terms of F1-score.

Similar Papers
  • Conference Article
  • Citations11

A smart contract vulnerability detection model based on graph neural networks

  • Dec 02, 2022
  • Daojun Han +3
  • Research Article
  • Citations6

A Smart Contract Vulnerability Detection Model Based on Syntactic and Semantic Fusion Learning

  • Feb 03, 2023
  • Wireless Communications and Mobile Computing
  • Daojun Han +3
  • Research Article
  • Citations219

BGNN4VD: Constructing Bidirectional Graph Neural-Network for Vulnerability Detection

  • Mar 20, 2021
  • Information and Software Technology
  • Sicong Cao +4
  • PDF
  • Research Article
  • Citations5

Learning and Fusing Multi-View Code Representations for Function Vulnerability Detection

  • Jun 01, 2023
  • Electronics
  • Zhenzhou Tian +3
  • PDF
  • Research Article
  • Citations22

VulEye: A Novel Graph Neural Network Vulnerability Detection Approach for PHP Application

  • Jan 06, 2023
  • Applied Sciences
  • Chun Lin +3
  • Conference Article
  • Citations34

ReGVD: Revisiting Graph Neural Networks for Vulnerability Detection

  • May 01, 2022
  • Van-Anh Nguyen +5
  • Research Article
  • Citations3

VISION: Robust and Interpretable Code Vulnerability Detection Leveraging Counterfactual Augmentation

  • Oct 15, 2025
  • Proceedings of the AAAI/ACM Conference on AI, Ethics, and Society
  • David Egea +2
  • Research Article
  • Citations1

Go Source Code Vulnerability Detection Method Based on Graph Neural Network

  • Jun 10, 2025
  • Applied Sciences
  • Lisha Yuan +4
  • Research Article
  • Citations15

Vulnerability detection through cross-modal feature enhancement and fusion

  • Jun 18, 2023
  • Computers &amp; Security
  • Wenxin Tao +4
  • Research Article

A Systematic Literature Review on Vulnerability Detection Approaches for IoT Mobile Applications

  • Dec 08, 2025
  • IEEE Internet of Things Journal
  • Meyo Zongo +3
  • Research Article
  • Citations80

CD-VulD: Cross-Domain Vulnerability Discovery Based on Deep Domain Adaptation

  • Apr 03, 2020
  • IEEE Transactions on Dependable and Secure Computing
  • Shigang Liu +6
  • Conference Article

RAG-Enhanced Multi-Model Ensemble for Automated Vulnerability Detection Using SLMs

  • Jan 29, 2026
  • Fateha Jannat Ayrin +8
  • Research Article
  • Citations18

Survey of source code vulnerability analysis based on deep learning

  • Sep 03, 2024
  • Computers & Security
  • Chen Liang +4
  • Book Chapter
  • Citations1

Comparing ML-Based Predictions and Static Analyzer Tools for Vulnerability Detection

  • Jan 01, 2022
  • Norbert Vándor +2
  • Conference Article
  • Citations627

Automated Vulnerability Detection in Source Code Using Deep Representation Learning

  • Dec 01, 2018
  • Rebecca Russell +7
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.