VuL-MCBERT: A Vulnerability Detection Method Based on Self-Supervised Contrastive Learning

Software code defects are extremely harmful to society. Therefore, automated code vulnerability detection has become an increasingly critical technology in the field of software engineering. In recent studies, pre-trained models are widely used in software engineering tasks. We aim to enhance the understanding of vulnerable code through pre-training techniques. Most of the existing pre-trained models focus on the analysis of code text and perform vulnerability detection by fine-tuning. However, they do not highlight the specialized learning of the vulnerability code, and are not able to detect some vulnerabilities caused by subtle differences. To address these challenges, we propose VuL-MCBERT, a new pre-trained model. We augment the original code sample data with a designed heuristic method, and train the model in a dynamically updated way, so that it can learn vulnerable code patterns in the pre-training phase. Experimental results show that VuL-MCBERT achieves the best performance on the CodeXGLUE benchmark dataset and outperforms the best baseline by 2.78% on Acc, demonstrating the effectiveness of our approach.

Authors

Institutions

Publication Details

Published
2025-06-20
DOI
https://doi.org/10.1109/caibda65784.2025.11183103
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

VuL-MCBERT: A Vulnerability Detection Method Based on Self-Supervised Contrastive Learning

Penghao Liu, Yang Zhang, Yifan Wang
Network Security and Intrusion Detection
article

VuL-MCBERT: A Vulnerability Detection Method Based on Self-Supervised Contrastive Learning

Penghao Liu, Yang Zhang, Yifan Wang
article en

Abstract

Software code defects are extremely harmful to society. Therefore, automated code vulnerability detection has become an increasingly critical technology in the field of software engineering. In recent studies, pre-trained models are widely used in software engineering tasks. We aim to enhance the understanding of vulnerable code through pre-training techniques. Most of the existing pre-trained models focus on the analysis of code text and perform vulnerability detection by fine-tuning. However, they do not highlight the specialized learning of the vulnerability code, and are not able to detect some vulnerabilities caused by subtle differences. To address these challenges, we propose VuL-MCBERT, a new pre-trained model. We augment the original code sample data with a designed heuristic method, and train the model in a dynamically updated way, so that it can learn vulnerable code patterns in the pre-training phase. Experimental results show that VuL-MCBERT achieves the best performance on the CodeXGLUE benchmark dataset and outperforms the best baseline by 2.78% on Acc, demonstrating the effectiveness of our approach.

Hebei University of Science and Technology (CN)
Openalex Percentile: Top 67%
Network Security and Intrusion Detection
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.

VuL-MCBERT: A Vulnerability Detection Method Based on Self-Supervised Contrastive Learning — Penghao Liu, Yang Zhang, et al. · (2025) | TGRS Research Map | TGRS