arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.37797cs.CRcs.SE
收藏

面向基于学习的漏洞检测的结构化安全解释

Structured Security Explanations for Learning-Based Vulnerability Detection

York University(约克大学);Peking University(北京大学);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所)

Fares Trad, Yizhou Chen, Hung Viet Pham, Zeyu Sun, Gias Uddin

AI总结:

本文提出VulnLens框架,通过分离程序行为分析与决策,结合LLM生成的结构化解释和监督式检测器,在PrimeVul和SecVulEval数据集上实现了优于DeepSeek V4 Pro、Gemini 2.5 Pro等模型的漏洞检测性能。

摘要:

软件漏洞检测仍存在困难,因为现有方法依赖预定义的分析规则、从代码和标签中隐式学习漏洞模式,或使用大语言模型(LLM)做出最终安全判断。目前尚不清楚与安全相关的程序行为的结构化描述能否提升监督式检测性能。本文提出VulnLens,这是一种用于二进制C/C++漏洞检测的解释增强框架,它将程序行为分析与最终决策分离。一个不依赖标签的基于LLM的解释器从七个固定视角检查每个函数:数据流、内存访问、对象生命周期、算术与类型行为、控制流、共享状态以及外部资源访问,无需接收漏洞标签或CWE信息即可生成结构化解释。一个监督式检测器通过顺序交叉注意力结合源代码与解释。我们在源自PrimeVul的涵盖10个CWE类别的数据集上评估VulnLens,并在不重新训练的情况下测试其对SecVulEval的迁移性能。在包含526个函数的PrimeVul测试集上,VulnLens达到75.5%的准确率和77.2%的F1值,准确率较DeepSeek V4 Pro高出4.2个百分点,F1值较Gemini 2.5 Pro高出2.2个百分点;匹配的解释使F1值较单独训练的仅使用代码的检测器提升7.3个百分点。在SecVulEval上,VulnLens达到66.4%的准确率和65.8%的F1值,准确率较DeepSeek V4 Pro高出7.6个百分点、F1值高出20.0个百分点,准确率较Gemini 2.5 Pro高出16.6个百分点、F1值高出7.8个百分点。

英文摘要:

Software vulnerability detection remains difficult because existing approaches rely on predefined analysis rules, learn vulnerability patterns implicitly from code and labels, or use large language models (LLMs) to make the final security judgment. It remains unclear whether structured descriptions of security-relevant program behavior can improve supervised detection. We present VulnLens, an explanation-augmented framework for binary C/C++ vulnerability detection that separates program-behavior analysis from the final decision. A label-blind LLM-based Explainer examines each function from seven fixed perspectives: data flow, memory access, object lifetime, arithmetic and type behavior, control flow, shared state, and external-resource access. Without receiving vulnerability labels or CWE information, it generates structured explanations. A supervised Detector combines source code and explanations through sequential cross-attention. We evaluate VulnLens on a PrimeVul-derived dataset covering ten CWE categories and test transfer to SecVulEval without retraining. On the 526-function PrimeVul test set, VulnLens achieves 75.5% accuracy and 77.2% F1, exceeding DeepSeek V4 Pro by 4.2 percentage points in accuracy and Gemini 2.5 Pro by 2.2 points in F1. Matched explanations improve F1 by 7.3 points over a separately trained code-only detector. On SecVulEval, VulnLens achieves 66.4% accuracy and 65.8% F1, outperforming DeepSeek V4 Pro by 7.6 points in accuracy and 20.0 points in F1, and Gemini 2.5 Pro by 16.6 points in accuracy and 7.8 points in F1.

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

↑