When Less is Enough: Positive and Unlabeled Learning Model for Vulnerability Detection
Xin-Cheng Wen, Xinchen Wang, Cuiyun Gao, Shaohua Wang, Yang Liu, Zhaoquan Gu
摘要
Automated code vulnerability detection has gained increasing attention in recent years. The deep learning (DL)-based methods, which implicitly learn vulnerable code patterns, have proven effective in vulnerability detection. The performance of DL-based methods usually relies on the quantity and quality of labeled data. However, the current labeled data are generally automatically collected, such as crawled from human-generated commits, making it hard to ensure the quality of the labels. Prior studies have demonstrated that the non-vulnerable code (i.e., negative labels) tends to be unreliable in commonly-used datasets, while vulnerable code (i.e., positive labels) is more determined. Considering the large numbers of unlabeled data in practice, it is necessary and worth exploring to leverage the positive data and large numbers of unlabeled data for more accurate vulnerability detection. In this paper, we focus on the Positive and Unlabeled (PU) learning problem for vulnerability detection and propose a novel model named PILOT, i.e., Positive and unlabeled Learning mOdel for vulnerability deTection. PILOT only learns from positive and unlabeled data for vulnerability detection. It mainly contains two modules: (1) A distance-aware label selection module, aiming at generating pseudo-labels for selected unlabeled data, which involves the inter-class distance prototype and progressive fine-tuning; (2) A mixed-supervision representation learning module to further alleviate the influence of noise and enhance the discrimination of representations. Extensive experiments in vulnerability detection are conducted to evaluate the effectiveness of PILOT based on real-world vulnerability datasets. The experimental results show that PILOT outperforms the popular weakly supervised methods by 2.78%-18.93% in the PU learning setting. Compared with the state-of-the-art methods, PILOT also improves the performance of 1.34%-12.46 % in F1 score metrics in the supervised setting. In addition, PILOT can identify 23 mislabeled from the FFMPeg+Qemu dataset in the PU learning setting based on manual checking.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Bridge and Hint: Extending Pre-trained Language Models for Long-Range Code 引用了 No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence
- Bridge and Hint: Extending Pre-trained Language Models for Long-Range Code 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Bridge and Hint: Extending Pre-trained Language Models for Long-Range Code 引用了 Vulnerability detection with fine-grained interpretations
- SelfPiCo: Self-Guided Partial Code Execution with LLMs 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- SelfPiCo: Self-Guided Partial Code Execution with LLMs 引用了 Vulnerability detection with fine-grained interpretations
- Your Fix Is My Exploit: Enabling Comprehensive DL Library API Fuzzing with Large Language Models 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Your Fix Is My Exploit: Enabling Comprehensive DL Library API Fuzzing with Large Language Models 引用了 Vulnerability detection with fine-grained interpretations
- Repository-Level Graph Representation Learning for Enhanced Security Patch Detection 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Repository-Level Graph Representation Learning for Enhanced Security Patch Detection 引用了 ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler Optimizations
- Repository-Level Graph Representation Learning for Enhanced Security Patch Detection 引用了 Vulnerability detection with fine-grained interpretations
- Repository-Level Graph Representation Learning for Enhanced Security Patch Detection 引用了 SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection
- No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection 引用了 VulCNN: An Image-inspired Scalable Vulnerability Detection System
- SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection 引用了 Vulnerability detection with fine-grained interpretations
引用它的顶会 Paper10
- SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability DetectionXin-Cheng Wen, Cuiyun Gao, Shuzheng Gao, Yang Xiao 等ISSTA 2024 · 17 次引用
- SelfPiCo: Self-Guided Partial Code Execution with LLMsZhipeng Xue, Zhipeng Gao, Shaohua Wang, Xing Hu 等ISSTA 2024 · 8 次引用
- Your Fix Is My Exploit: Enabling Comprehensive DL Library API Fuzzing with Large Language ModelsKunpeng Zhang, Shuai Wang, Jitao Han, Xiaogang Zhu 等ICSE 2025 · 6 次引用
- Bridge and Hint: Extending Pre-trained Language Models for Long-Range CodeYujia Chen, Cuiyun Gao, Zezhou Yang, Hongyu Zhang 等ISSTA 2024 · 4 次引用
- Repository-Level Graph Representation Learning for Enhanced Security Patch DetectionXin-Cheng Wen, Zirui Lin, Cuiyun Gao, Hongyu Zhang 等ICSE 2025 · 1 次引用
它引用的 Paper17
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- Vulnerability detection with fine-grained interpretationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2021 · 283 次引用
- No more fine-tuning? an experimental evaluation of prompt tuning in code intelligenceChaozheng Wang, Yuanhang Yang, Cuiyun Gao, Yun Peng 等FSE 2022 · 148 次引用
- VulCNN: An Image-inspired Scalable Vulnerability Detection SystemYueming Wu, Deqing Zou, Shihan Dou, Wei Yang 等ICSE 2022 · 141 次引用
- ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler OptimizationsChris Cummins, Zacharias V. Fisches, Tal Ben-Nun, Torsten Hoefler 等ICML 2021 · 140 次引用
相关 Paper
- VulSim: Leveraging Similarity of Multi-Dimensional Neighbor Embeddings for Vulnerability DetectionSamiha Shimmi, Ashiqur Rahman, Mohan Gadde, Hamed Okhravi 等USENIX Security 2024 · 13 次引用
- CLeVeR: Multi-modal Contrastive Learning for Vulnerability Code RepresentationJiayuan Li, Lei Cui, Sen Zhao, Yun Yang 等ACL Findings 2025 · 4 次引用
- Code Vulnerability Detection via Nearest Neighbor MechanismQianjin Du, Xiaohui Kuang, Gang ZhaoEMNLP Findings 2022 · 6 次引用
- An Empirical Study on Noisy Label Learning for Program UnderstandingWenhan Wang, Yanzhou Li, Anran Li, Jian Zhang 等ICSE 2024 · 5 次引用
- Learning in the Wild: Towards Leveraging Unlabeled Data for Effectively Tuning Pre-trained Code ModelsShuzheng Gao, Wenxin Mao, Cuiyun Gao, Li Li 等ICSE 2024 · 15 次引用
