Enhancing Pre-Trained Language Models for Vulnerability Detection via Semantic-Preserving Data Augmentation

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Qi, Weiliang, Cao, Jiahao, Poddar, Darsh, Li, Sophia, Wang, Xinda
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914963296092160
author Qi, Weiliang
Cao, Jiahao
Poddar, Darsh
Li, Sophia
Wang, Xinda
author_facet Qi, Weiliang
Cao, Jiahao
Poddar, Darsh
Li, Sophia
Wang, Xinda
contents With the rapid development and widespread use of advanced network systems, software vulnerabilities pose a significant threat to secure communications and networking. Learning-based vulnerability detection systems, particularly those leveraging pre-trained language models, have demonstrated significant potential in promptly identifying vulnerabilities in communication networks and reducing the risk of exploitation. However, the shortage of accurately labeled vulnerability datasets hinders further progress in this field. Failing to represent real-world vulnerability data variety and preserve vulnerability semantics, existing augmentation approaches provide limited or even counterproductive contributions to model training. In this paper, we propose a data augmentation technique aimed at enhancing the performance of pre-trained language models for vulnerability detection. Given the vulnerability dataset, our method performs natural semantic-preserving program transformation to generate a large volume of new samples with enriched data diversity and variety. By incorporating our augmented dataset in fine-tuning a series of representative code pre-trained models (i.e., CodeBERT, GraphCodeBERT, UnixCoder, and PDBERT), up to 10.1% increase in accuracy and 23.6% increase in F1 can be achieved in the vulnerability detection task. Comparison results also show that our proposed method can substantially outperform other prominent vulnerability augmentation approaches.
format Preprint
id arxiv_https___arxiv_org_abs_2410_00249
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Enhancing Pre-Trained Language Models for Vulnerability Detection via Semantic-Preserving Data Augmentation
Qi, Weiliang
Cao, Jiahao
Poddar, Darsh
Li, Sophia
Wang, Xinda
Cryptography and Security
Software Engineering
With the rapid development and widespread use of advanced network systems, software vulnerabilities pose a significant threat to secure communications and networking. Learning-based vulnerability detection systems, particularly those leveraging pre-trained language models, have demonstrated significant potential in promptly identifying vulnerabilities in communication networks and reducing the risk of exploitation. However, the shortage of accurately labeled vulnerability datasets hinders further progress in this field. Failing to represent real-world vulnerability data variety and preserve vulnerability semantics, existing augmentation approaches provide limited or even counterproductive contributions to model training. In this paper, we propose a data augmentation technique aimed at enhancing the performance of pre-trained language models for vulnerability detection. Given the vulnerability dataset, our method performs natural semantic-preserving program transformation to generate a large volume of new samples with enriched data diversity and variety. By incorporating our augmented dataset in fine-tuning a series of representative code pre-trained models (i.e., CodeBERT, GraphCodeBERT, UnixCoder, and PDBERT), up to 10.1% increase in accuracy and 23.6% increase in F1 can be achieved in the vulnerability detection task. Comparison results also show that our proposed method can substantially outperform other prominent vulnerability augmentation approaches.
title Enhancing Pre-Trained Language Models for Vulnerability Detection via Semantic-Preserving Data Augmentation
topic Cryptography and Security
Software Engineering
url https://arxiv.org/abs/2410.00249