arrow
Return

A zero-shot framework for cross-project vulnerability detection in source code

delete2025-10-29
delete0
delete
OA
AI
R
Radowanul Haque *
A
Aftab Ali
S
Sally McClean
N
Naveed Khan
DOI:10.1007/s10664-025-10749-4delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
The growing prevalence of software vulnerabilities has increased the need for effective detection methods, particularly in cross-project settings where domain differences create significant challenges. Existing vulnerability detection models often struggle to generalise across projects due to variations in coding styles, feature distributions, and the absence of labelled target data. This paper presents ZSVulD, a zero-shot, cross-project vulnerability detection framework designed to operate without target-domain labels. ZSVulD uses domain-agnostic CodeBERT embeddings to capture both syntactic and semantic features of source code, enabling knowledge transfer between projects. The framework applies an iterative pseudo-labelling process in which a neural network and XGBoost classifier collaboratively refine predictions for the target domain. Feature alignment is incorporated as a diagnostic technique to assess and visualise distributional differences between source and target datasets. Experiments on the Devign and REVEAL datasets show that ZSVulD achieves higher recall, F1, and F2 scores compared to existing methods, with an emphasis on reducing false negatives. These findings indicate that ZSVulD can support automated vulnerability detection pipelines, contributing to more reliable security assessments across different software projects.
Keywords:
LLMs
Vulnerability detection
Code classification
Zero-Shot learning

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

S
School of Computing
Scholars:
478
Papers: 300
Citations: 2
Cited Papers

Cited Papers

Heterogeneous Cross-Project Defect Prediction Using Encoder Networks and Transfer Learning
err2024-01-01
err0
errOAAI
errHaque, Radowanul; Ali, Aftab; McClean, Sally; Cleland, Ian; Noppen, Joost
errShare
errSave
CD-VulD: Cross-Domain Vulnerability Discovery Based on Deep Domain Adaptation
err2022-01-01
err46
PREAI
errLiu, Shigang; Lin, Guanjun; Qu, Lizhen; Zhang, Jun; De Vel, Olivier; Montague, Paul; Xiang, Yang
errShare
errSave
SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilities
err2022-07-01
err261
errOAAI
errLi, Zhen; Zou, Deqing; Xu, Shouhuai; Jin, Hai; Zhu, Yawei; Chen, Zhaoxuan
errShare
errSave
The Security of Using Large Language Models: A Survey with Emphasis on ChatGPT
err2025-01-01
err0
PREAI
errWei Zhou; Xiaogang Zhu; Qing-Long Han; Lin Li; Xiao Chen; Sheng Wen; Yang Xiang
errShare
errSave
Fuzzing: A Survey for Roadmap
err2022-09-09
err105
PREAI
errZhu, Xiaogang; Wen, Sheng; Camtepe, Seyit; Xiang, Yang
errShare
errSave
Cross-Project Transfer Representation Learning for Vulnerable Function Discovery
err2018-07-01
err157
PREAI
errLin, Guanjun; Zhang, Jun; Luo, Wei; Pan, Lei; Xiang, Yang; De Vel, Olivier; Montague, Paul
errShare
errSave
CSVD-TF: Cross-project software vulnerability detection with TrAdaBoost by fusing expert metrics and semantic metrics
err2024-07-01
err2
PREAI
errCai, Zhilong; Cai, Yongwei; Chen, Xiang; Lu, Guilong; Pei, Wenlong; Zhao, Junjie
errShare
errSave
Software Vulnerability Analysis and Discovery Using Deep Learning Techniques: A Survey
err2020-01-01
err43
errOAAI
errZeng, Peng; Lin, Guanjun; Pan, Lei; Tai, Yonghang; Zhang, Jun
errShare
errSave
researcher View more