A Source Code Vulnerability Detection Method Based on Positive-Unlabeled Learning

As the scale of modern software continues to expand, the risk of software being attacked also increases. Software vulnerabilities are the primary cause of these risks. Traditional detection methods rely on expert knowledge and are difficult to meet the complex needs of today. In recent years, with the development of pre-trained models, some researchers have applied these models to the field of code vulnerability detection. However, pre-trained models require large amounts of labeled data, which is often difficult to obtain and ensure its quality. Therefore, how to effectively detect code vulnerabilities in a weakly supervised setting remains an important challenge. This paper presents PU-CBVD, a source code vulnerability detection model built on the pre-trained CodeBERT model. PU-CBVD utilizes abundant unlabeled data alongside a limited set of labeled samples, generating pseudo-labels for the unlabeled data. The combined dataset is then input into a pre-trained model, enhanced with a Gated Graph Neural Network (GGNN) for feature extraction and training, resulting in an effective source code vulnerability detection model. To evaluate its performance, we compared our model with existing weakly supervised learning methods and popular supervised vulnerability detection approaches. Experimental results show that our model significantly outperforms existing models.

Authors

Institutions

Publication Details

Published
2024-12-06
DOI
https://doi.org/10.1109/ricai64321.2024.10911761
Primary Topic
Web Application Security Vulnerabilities
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Source Code Vulnerability Detection Method Based on Positive-Unlabeled Learning

Tianran Li, Yong Piao, Zihan Kong
Web Application Security Vulnerabilities
article

A Source Code Vulnerability Detection Method Based on Positive-Unlabeled Learning

Tianran Li, Yong Piao, Zihan Kong
article en

Abstract

As the scale of modern software continues to expand, the risk of software being attacked also increases. Software vulnerabilities are the primary cause of these risks. Traditional detection methods rely on expert knowledge and are difficult to meet the complex needs of today. In recent years, with the development of pre-trained models, some researchers have applied these models to the field of code vulnerability detection. However, pre-trained models require large amounts of labeled data, which is often difficult to obtain and ensure its quality. Therefore, how to effectively detect code vulnerabilities in a weakly supervised setting remains an important challenge. This paper presents PU-CBVD, a source code vulnerability detection model built on the pre-trained CodeBERT model. PU-CBVD utilizes abundant unlabeled data alongside a limited set of labeled samples, generating pseudo-labels for the unlabeled data. The combined dataset is then input into a pre-trained model, enhanced with a Gated Graph Neural Network (GGNN) for feature extraction and training, resulting in an effective source code vulnerability detection model. To evaluate its performance, we compared our model with existing weakly supervised learning methods and popular supervised vulnerability detection approaches. Experimental results show that our model significantly outperforms existing models.

Dalian University of Technology (CN)
Reduced inequalities
Openalex Percentile: Top 55%
Web Application Security Vulnerabilities
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.