LineVD: Statement-level Vulnerability Detection using Graph Neural Networks

David Hin, Andrey Kan, Huaming Chen, M. Ali Babar
3/10/2022
cs.CRcs.SE
gnn

Official code: davidhin/linevd (77 stars, Python, MIT, last commit 2022-06-24).

Abstract

Current machine-learning based software vulnerability detection methods are primarily conducted at the function-level. However, a key limitation of these methods is that they do not indicate the specific lines of code contributing to vulnerabilities.

Show full abstract

This limits the ability of developers to efficiently inspect and interpret the predictions from a learnt model, which is crucial for integrating machine-learning based tools into the software development workflow. Graph-based models have shown promising performance in function-level vulnerability detection, but their capability for statement-level vulnerability detection has not been extensively explored. While interpreting function-level predictions through explainable AI is one promising direction, we herein consider the statement-level software vulnerability detection task from a fully supervised learning perspective. We propose a novel deep learning framework, LineVD, which formulates statement-level vulnerability detection as a node classification task. LineVD leverages control and data dependencies between statements using graph neural networks, and a transformer-based model to encode the raw source code tokens. In particular, by addressing the conflicting outputs between function-level and statement-level information, LineVD significantly improve the prediction performance without vulnerability status for function code. We have conducted extensive experiments against a large-scale collection of real-world C/C++ vulnerabilities obtained from multiple real-world projects, and demonstrate an increase of 105\% in F1-score over the current state-of-the-art.

View on arXivView PDF

Code Implementations(1)

davidhin/linevdOfficial100%
MIT

Statement-level deep learning model for automated software vulnerability detection in C/C++ (Accepted in MSR 2022)

7725Python, ShellJul 20, 20214 years agoMIT

Similar Papers

Cite this paper

@article{hin2022linevd,
  title  = {LineVD: Statement-level Vulnerability Detection using Graph Neural Networks},
  author = {David Hin and Andrey Kan and Huaming Chen and M. Ali Babar},
  year   = {2022},
  eprint = {2203.05181},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.05181}
}

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/2203.05181.svg)](https://codeofpaper.com/paper/2203.05181)

Discussion