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
- Guilong Wang (ORCID: https://orcid.org/0000-0002-9195-9350)
- Jiaqi Huang (ORCID: https://orcid.org/0000-0002-9794-2103)
- Bin Yang (ORCID: https://orcid.org/0000-0002-9207-4511)
- Xiaofeng Li (ORCID: https://orcid.org/0000-0002-4115-3287)
- Yang You (ORCID: https://orcid.org/0000-0003-0125-0792)
- Ying Xing (ORCID: https://orcid.org/0000-0003-1965-0786)
- Yixing Luo
Institutions
- Beijing University of Posts and Telecommunications (CN)
- Yunnan University (CN)
- Institute of Software (CN)
- China United Network Communications Group (China) (CN)
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
- National Natural Science Foundation of China
- Nanjing University