Lune

ASE2023Top-tier venue

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

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Bridge and Hint: Extending Pre-trained Language Models for Long-Range Code cites 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 cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Bridge and Hint: Extending Pre-trained Language Models for Long-Range Code cites Vulnerability detection with fine-grained interpretations
  • SelfPiCo: Self-Guided Partial Code Execution with LLMs cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • SelfPiCo: Self-Guided Partial Code Execution with LLMs cites Vulnerability detection with fine-grained interpretations
  • Your Fix Is My Exploit: Enabling Comprehensive DL Library API Fuzzing with Large Language Models cites 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 cites Vulnerability detection with fine-grained interpretations
  • Repository-Level Graph Representation Learning for Enhanced Security Patch Detection cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Repository-Level Graph Representation Learning for Enhanced Security Patch Detection cites ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler Optimizations
  • Repository-Level Graph Representation Learning for Enhanced Security Patch Detection cites Vulnerability detection with fine-grained interpretations
  • Repository-Level Graph Representation Learning for Enhanced Security Patch Detection cites SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection
  • No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection cites VulCNN: An Image-inspired Scalable Vulnerability Detection System
  • SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection cites Vulnerability detection with fine-grained interpretations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability DetectionXin-Cheng Wen, Cuiyun Gao, Shuzheng Gao, Yang Xiao et al.ISSTA 2024 · 17 citations
  2. SelfPiCo: Self-Guided Partial Code Execution with LLMsZhipeng Xue, Zhipeng Gao, Shaohua Wang, Xing Hu et al.ISSTA 2024 · 8 citations
  3. Your Fix Is My Exploit: Enabling Comprehensive DL Library API Fuzzing with Large Language ModelsKunpeng Zhang, Shuai Wang, Jitao Han, Xiaogang Zhu et al.ICSE 2025 · 6 citations
  4. Bridge and Hint: Extending Pre-trained Language Models for Long-Range CodeYujia Chen, Cuiyun Gao, Zezhou Yang, Hongyu Zhang et al.ISSTA 2024 · 4 citations
  5. Repository-Level Graph Representation Learning for Enhanced Security Patch DetectionXin-Cheng Wen, Zirui Lin, Cuiyun Gao, Hongyu Zhang et al.ICSE 2025 · 1 citation

Builds on17

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  2. Vulnerability detection with fine-grained interpretationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2021 · 283 citations
  3. No more fine-tuning? an experimental evaluation of prompt tuning in code intelligenceChaozheng Wang, Yuanhang Yang, Cuiyun Gao, Yun Peng et al.FSE 2022 · 148 citations
  4. VulCNN: An Image-inspired Scalable Vulnerability Detection SystemYueming Wu, Deqing Zou, Shihan Dou, Wei Yang et al.ICSE 2022 · 141 citations
  5. ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler OptimizationsChris Cummins, Zacharias V. Fisches, Tal Ben-Nun, Torsten Hoefler et al.ICML 2021 · 140 citations

Related papers

  1. VulSim: Leveraging Similarity of Multi-Dimensional Neighbor Embeddings for Vulnerability DetectionSamiha Shimmi, Ashiqur Rahman, Mohan Gadde, Hamed Okhravi et al.USENIX Security 2024 · 13 citations
  2. CLeVeR: Multi-modal Contrastive Learning for Vulnerability Code RepresentationJiayuan Li, Lei Cui, Sen Zhao, Yun Yang et al.ACL Findings 2025 · 4 citations
  3. Code Vulnerability Detection via Nearest Neighbor MechanismQianjin Du, Xiaohui Kuang, Gang ZhaoEMNLP Findings 2022 · 6 citations
  4. An Empirical Study on Noisy Label Learning for Program UnderstandingWenhan Wang, Yanzhou Li, Anran Li, Jian Zhang et al.ICSE 2024 · 5 citations
  5. Learning in the Wild: Towards Leveraging Unlabeled Data for Effectively Tuning Pre-trained Code ModelsShuzheng Gao, Wenxin Mao, Cuiyun Gao, Li Li et al.ICSE 2024 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines