Table of Contents
Fetching ...

Efficient Software Vulnerability Detection Using Transformer-based Models

Sameer Shaik, Zhen Huang, Daniela Stan Raicu, Jacob Furst

Abstract

Detecting software vulnerabilities is critical to ensuring the security and reliability of modern computer systems. Deep neural networks have shown promising results on vulnerability detection, but they lack the capability to capture global contextual information on vulnerable code. To address this limitation, we explore the application of transformers for C/C++ vulnerability detection. We use program slices that encapsulate key syntactic and semantic features of program code, such as API function calls, array usage, pointer manipulations, and arithmetic expressions. By leveraging transformers' capability to capture both local and global contextual information on vulnerable code, our work can identify vulnerabilities accurately. Combined with data balancing and hyperparameter fine-tuning, our work offers a robust and efficient approach to identifying vulnerable code with moderate resource usage and training time.

Efficient Software Vulnerability Detection Using Transformer-based Models

Abstract

Detecting software vulnerabilities is critical to ensuring the security and reliability of modern computer systems. Deep neural networks have shown promising results on vulnerability detection, but they lack the capability to capture global contextual information on vulnerable code. To address this limitation, we explore the application of transformers for C/C++ vulnerability detection. We use program slices that encapsulate key syntactic and semantic features of program code, such as API function calls, array usage, pointer manipulations, and arithmetic expressions. By leveraging transformers' capability to capture both local and global contextual information on vulnerable code, our work can identify vulnerabilities accurately. Combined with data balancing and hyperparameter fine-tuning, our work offers a robust and efficient approach to identifying vulnerable code with moderate resource usage and training time.

Paper Structure

This paper contains 41 sections, 5 figures, 5 tables.

Figures (5)

  • Figure 1: Down-sampling under Hypothesis 1: the numbers in orange refer to vulnerable samples, while the numbers in green refer to non-vulnerable samples.
  • Figure 2: Down-sampling under Hypothesis 2: the numbers in orange refer to vulnerable samples, while the numbers in green refer to non-vulnerable samples.
  • Figure 3: Trained on 28k and tested on remaining data
  • Figure 4: Trained on 28k and tested on remaining data
  • Figure 5: Trained on 44k and tested on 10k