ReGVD: Revisiting Graph Neural Networks for Vulnerability Detection

Van-Anh Nguyen, Dai Quoc Nguyen, Van Nguyen, Trung Le, Quan Hung Tran +1 more
10/14/2021
cs.LGcs.CR
gnn

Official code: daiquocnguyen/GNN-ReGVD (87 stars, Python, last commit 2022-03-10).

Abstract

Identifying vulnerabilities in the source code is essential to protect the software systems from cyber security attacks. It, however, is also a challenging step that requires specialized expertise in security and code representation.

Show full abstract

To this end, we aim to develop a general, practical, and programming language-independent model capable of running on various source codes and libraries without difficulty. Therefore, we consider vulnerability detection as an inductive text classification problem and propose ReGVD, a simple yet effective graph neural network-based model for the problem. In particular, ReGVD views each raw source code as a flat sequence of tokens to build a graph, wherein node features are initialized by only the token embedding layer of a pre-trained programming language (PL) model. ReGVD then leverages residual connection among GNN layers and examines a mixture of graph-level sum and max poolings to return a graph embedding for the source code. ReGVD outperforms the existing state-of-the-art models and obtains the highest accuracy on the real-world benchmark dataset from CodeXGLUE for vulnerability detection. Our code is available at: \url{https://github.com/daiquocnguyen/GNN-ReGVD}.

View on arXivView PDF

Code Implementations(1)

Revisiting Graph Neural Networks for Vulnerability Detection (ICSE 2022) (Pytorch)

8724PythonSep 13, 20214 years ago
cyber-securitygraph-neural-networksgraph-representation-learningsoftware-vulnerabilityvulnerability-detection+1 more

Similar Papers

Cite this paper

@article{nguyen2021regvd,
  title  = {ReGVD: Revisiting Graph Neural Networks for Vulnerability Detection},
  author = {Van-Anh Nguyen and Dai Quoc Nguyen and Van Nguyen and Trung Le and Quan Hung Tran and Dinh Phung},
  year   = {2021},
  eprint = {2110.07317},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.07317}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.07317.svg)](https://codeofpaper.com/paper/2110.07317)

Discussion