An Empirical Study of the Imbalance Issue in Software Vulnerability Detection

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Guo, Yuejun, Hu, Qiang, Tang, Qiang, Traon, Yves Le
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915794882920448
author Guo, Yuejun
Hu, Qiang
Tang, Qiang
Traon, Yves Le
author_facet Guo, Yuejun
Hu, Qiang
Tang, Qiang
Traon, Yves Le
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2602_12038
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle An Empirical Study of the Imbalance Issue in Software Vulnerability Detection
Guo, Yuejun
Hu, Qiang
Tang, Qiang
Traon, Yves Le
Software Engineering
Artificial Intelligence
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.
title An Empirical Study of the Imbalance Issue in Software Vulnerability Detection
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2602.12038