arXiv:2605.10240cs.SEcs.CR2026-05

通过几何正则化提升不平衡漏洞检测的准确率与稳定性

MARGIN: Margin-Aware Regularized Geometry for Imbalanced Vulnerability Detection

论文配图:MARGIN: Margin-Aware Regularized Geometry for Imbalanced Vulnerability Detection
图 1 · 摘自论文原文
  • 基于嵌入空间几何结构,动态调整边距以缓解数据频率与难度不平衡
  • 在多个公开数据集上显著优于基线模型,尤其在极端不平衡场景下提升明显
  • 适合安全研究者与工业界开发高鲁棒性漏洞检测系统

软件漏洞检测对保障软件安全与可靠性至关重要。尽管深度学习取得进展,现实中的漏洞数据集仍面临频率不平衡与难度不平衡两大挑战。本文从嵌入几何视角重新审视这些问题,发现此类不平衡会引致超球面表示空间中的几何畸变。为此,提出MARGIN框架,通过自适应边距度量学习与超球原型建模,实现有区分性的漏洞表征。MARGIN根据冯·米塞斯-费舍尔集中度估计分布结构,动态调整几何正则化,使嵌入分布的概率质量与对应沃罗诺伊胞格对齐,从而减少几何畸变并生成更稳定的决策边界。大量实验表明,MARGIN在多个公开漏洞数据集上持续超越强基线,在分类与检测任务中表现优异,尤其在困难的不平衡数据集上提升显著。进一步分析显示,MARGIN生成更有序的嵌入几何结构,提升了模型的鲁棒性、可解释性与泛化能力。

原文摘要 · Abstract (English)

Software vulnerability detection is critical for ensuring software security and reliability. Despite recent advances in deep learning, real-world vulnerability datasets suffer from two severe challenges: frequency imbalance and difficulty imbalance. We reinterpret these challenges from an embedding geometry perspective, observing that such imbalances induce geometric distortions in hyperspherical representation space. To address this issue, we propose MARGIN, a metric-based framework that learns discriminative vulnerability representations through adaptive margin metric learning and hyperspherical prototype modeling. MARGIN dynamically adjusts geometric regularization according to the distribution structure estimated by the von Mises-Fisher concentration, aligning the probability mass of embedding distributions with their corresponding Voronoi cells, thereby reducing geometric distortion and yielding more stable decision boundaries. Extensive experiments on public vulnerability datasets show that MARGIN consistently outperforms strong baselines, achieving notable improvements in classification and detection, especially on challenging, imbalanced datasets. Further analysis demonstrates that MARGIN produces more structured embedding geometries, improving robustness, interpretability, and generalization.

漏洞检测不平衡学习几何正则化嵌入空间

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。