mlsanityData to 7 Oct 2026

An Empirical Study of the Imbalance Issue in Software Vulnerability Detection

arXiv 2602.12038 ↗First posted 12 Feb 2026cs.SE cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Vulnerability detection is crucial to protect software security. Nowadays, deep learning (DL) is the most promising technique to automate this detection task, leveraging its superior ability to extract patterns and representations within extensive code volumes. Despite its promise, DL-based vulnerability detection remains in its early stages, with model performance exhibiting variability across datasets. Drawing insights from other well-explored application areas like computer vision, we conjecture that the imbalance issue (the number of vulnerable code is extremely small) is at the core of the phenomenon. To validate this, we conduct a comprehensive empirical study involving nine open-source datasets and two state-of-the-art DL models. The results confirm our conjecture. We also obtain insightful findings on how existing imbalance solutions perform in vulnerability detection. It turns out that these solutions perform differently as well across datasets and evaluation metrics. Specifically: 1) Focal loss is more suitable to improve the precision, 2) mean false error and class-balanced loss encourages the recall, and 3) random over-sampling facilitates the F1-measure. However, none of them excels across all metrics. To delve deeper, we explore external influences on these solutions and offer insights for developing new solutions.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 27 of its 51 references that are in the map. First posted on arXiv 12 Feb 2026.

Builds on

27 of 51 references.

References · 27

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  5. 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
  6. 2019ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Taskscited by 2,219
  7. 2020WILDS: A Benchmark of in-the-Wild Distribution Shiftscited by 1,366
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  9. 2019Class-Balanced Loss Based on Effective Number of Samplescited by 1,239
  10. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  11. 2019VideoBERT: A Joint Model for Video and Language Representation Learningcited by 702
  12. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
15 more
  1. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  2. 2017A systematic study of the class imbalance problem in convolutional neural networkscited by 510
  3. 2021Pre-Trained Models: Past, Present and Futurecited by 319
  4. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  5. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
  6. 2018Guiding Deep Learning System Testing using Surprise Adequacycited by 123
  7. 2018SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilitiescited by 91
  8. 2022Natural Attack for Pre-trained Models of Codecited by 72
  9. 2022Improving Test-Time Adaptation via Shift-agnostic Weight Regularization and Nearest Source Prototypescited by 67
  10. 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 23
  11. 2021Shallow or Deep? An Empirical Study on Detecting Vulnerabilities using Deep Learningcited by 7
  12. 2020Learning from What We Know: How to Perform Vulnerability Prediction using Noisy Historical Datacited by 5
  13. 2021Data Preparation for Software Vulnerability Prediction: A Systematic Literature Reviewcited by 5
  14. 2017ImageNet Training in Minutescited by 4
  15. 2022Dazzle: Using Optimized Generative Adversarial Networks to Address Security Data Class Imbalance Issuecited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.