arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.12038cs.SEcs.AI
收藏

软件漏洞检测中不平衡问题的实证研究

An Empirical Study of the Imbalance Issue in Software Vulnerability Detection

ITIS, Luxembourg Institute of Science and Technology(卢森堡科学与技术研究所);SnT, University of Luxembourg(卢森堡大学)

Yuejun Guo, Qiang Hu, Qiang Tang, Yves Le Traon

AI总结:

本文通过实证研究发现,软件漏洞检测中不平衡问题影响模型性能,聚焦损失、类平衡损失和随机过采样在不同指标上各有优势,但无一能全面优化。

摘要:

软件漏洞检测对于保护软件安全至关重要。如今,深度学习(DL)是自动化此检测任务最具前景的技术,利用其在大量代码体积中提取模式和表示的优越能力。尽管具有前景,基于DL的漏洞检测仍处于早期阶段,模型性能在不同数据集上表现出差异性。借鉴其他已深入研究的应用领域如计算机视觉,我们推测不平衡问题(漏洞代码数量极小)是这一现象的核心。为此,我们进行了涵盖九个开源数据集和两个最先进的DL模型的全面实证研究。结果证实了我们的推测。我们还获得了现有不平衡解决方案在漏洞检测中的表现洞察。结果表明,这些解决方案在不同数据集和评估指标上表现各异。具体而言:1)聚焦损失更适合提高精度,2)平均误判误差和类平衡损失促进召回率,3)随机过采样促进F1度量。然而,这些方法在所有指标上均不占优。为进一步深入研究,我们探索了这些解决方案的外部影响,并为开发新解决方案提供了见解。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑