Related Experiment Video
Updated: Sep 14, 2025

Augmenting Large Language Models via Vector Embeddings to Improve Domain-Specific Responsiveness
Published on: December 6, 2024
VDCRL: vulnerability detection with supervised contrastive code representation learning
Xinghang Lv1, Jianming Fu1, Yu Nie1
1The Key Laboratory of Aerospace Information Security and Trusted Computing, Ministry of Education, School of Cyber Science and Engineering, Wuhan University, Wuhan, 430000, Hubei, China.
Abstract:
Code vulnerability detection plays a pivotal role in ensuring software security, and recent deep learning-based approaches have demonstrated their effectiveness. However, these methods often exhibit strong detection capabilities only on the datasets used. When applied to unknown datasets, their performance deteriorates significantly, highlighting a limitation in generalization ability. To address the above issues, we propose VDCRL, a novel vulnerability detection framework based on supervised contrastive code representation learning. VDCRL employs both input-based and feature space-based code augmentation techniques to generate two augmented versions of each original sample. It then extracts source code features and assembly instruction features from these augmented samples. These features are integrated using a feature fusion encoder, SAFE, which captures and embeds both types of information. Finally, VDCRL leverages supervised contrastive learning and a Bidirectional Gated Recurrent Unit (BGRU) model to train and detect vulnerabilities effectively. We train VDCRL on a synthetic dataset and test its performance on two real-world datasets. Experimental results demonstrate that VDCRL significantly outperforms current state-of-the-art vulnerability detection methods, achieving superior generalization and detection performance.
Related Concept Videos
Difference from Background: Limit of Detection
The LOD indicates the presence or absence...
Introduction to Learning
In contrast to learned behaviors, unlearned behaviors such as crying, sexual...
Sign Test for Matched Pairs
To conduct the sign test, we first calculate the differences in...
Learning Disabilities
Dyslexia
Dyslexia is a...
Force Classification
Contact and non-contact forces are two of the most widely used categories of forces. As the name suggests, contact forces require physical contact between two objects to act upon each other. Examples of contact forces include frictional,...
Avoidance Learning and Learned Helplessness
Avoidance learning occurs when an organism learns that a specific behavior can prevent an unpleasant outcome. For example, a student who receives a bad grade may start studying harder to avoid future poor grades. This behavior persists even when the negative outcome is no longer present. Avoidance learning is powerful because it maintains behavior in the absence of the...

