Data Augmentation for Vulnerability Detection Based on Code Refactoring and Mixup

In recent years, the number of software vulnerabilities has gradually increased, posing a threat to the security of software, and identifying whether there are vulnerabilities in software is crucial for assuring its quality. With the development of deep learning, vulnerability detection based on deep learning has achieved good results. However, real-world software vulnerability datasets often suffer from class imbalance and a lack of labeled data, limiting the performance of deep learning models. Therefore, this paper proposes a data augmentation method to alleviate these two problems. Firstly, we treats samples with vulnerabilities in the dataset as code, and generates more samples with vulnerabilities through code refactoring to alleviate class imbalance issues. Secondly, we use the mixup method to perform linear interpolation on the embedding vectors which represent codes, and add the interpolated vectors into the training set, thereby increasing the amount of labeled training data. To evaluate our method, we conducted experiments on three projects of the Promise dataset. The experimental results show that our data augmentation method can effectively improve the effect of vulnerability detection.

Authors

Institutions

Publication Details

Published
2024-10-28
DOI
https://doi.org/10.1109/issrew63542.2024.00070
Citations
1
Primary Topic
Web Application Security Vulnerabilities
Type
article
Field-Weighted Citation Impact
0.78

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Data Augmentation for Vulnerability Detection Based on Code Refactoring and Mixup

Guilong Wang, Jiaqi Huang, Bin Yang, Xiaofeng Li et al.
1 citations
Web Application Security Vulnerabilities
0.78
article

Data Augmentation for Vulnerability Detection Based on Code Refactoring and Mixup

Guilong Wang, Jiaqi Huang, Bin Yang, Xiaofeng Li, Yang You, Ying Xing, Yixing Luo
article en
1 citations

Abstract

In recent years, the number of software vulnerabilities has gradually increased, posing a threat to the security of software, and identifying whether there are vulnerabilities in software is crucial for assuring its quality. With the development of deep learning, vulnerability detection based on deep learning has achieved good results. However, real-world software vulnerability datasets often suffer from class imbalance and a lack of labeled data, limiting the performance of deep learning models. Therefore, this paper proposes a data augmentation method to alleviate these two problems. Firstly, we treats samples with vulnerabilities in the dataset as code, and generates more samples with vulnerabilities through code refactoring to alleviate class imbalance issues. Secondly, we use the mixup method to perform linear interpolation on the embedding vectors which represent codes, and add the interpolated vectors into the training set, thereby increasing the amount of labeled training data. To evaluate our method, we conducted experiments on three projects of the Promise dataset. The experimental results show that our data augmentation method can effectively improve the effect of vulnerability detection.

Beijing University of Posts and Telecommunications (CN), Yunnan University (CN), Institute of Software (CN), China United Network Communications Group (China) (CN)
National Natural Science Foundation of China, Nanjing University
Openalex Percentile: Top 19%
Web Application Security Vulnerabilities
0.78
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.