arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.10787cs.SEcs.AIcs.CRcs.IR
收藏

VulReaD: 基于知识图谱的软件漏洞推理与检测

VulReaD: Knowledge-Graph-guided Software Vulnerability Reasoning and Detection

The University of Manchester(曼彻斯特大学);Agency for Science, Technology and Research(科技研究局);Singapore University of Technology and Design(新加坡科技设计大学);Mohamed Bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)

Samal Mukhtar, Yinghua Yao, Zhu Sun, Mustafa Mustafa, Yew Soon Ong, Youcheng Sun

AI总结:

VulReaD通过知识图谱引导的推理方法,在软件漏洞检测中实现CWE级别的分类,提升二元和多类检测性能,增强可解释性。

摘要:

软件漏洞检测(SVD)是现代系统中的关键挑战。大型语言模型(LLMs)能够提供自然语言解释的同时进行预测,但大多数工作集中在二元评估上,且解释往往缺乏与常见弱点分类(CWE)类别的一致性。我们提出了VulReaD,一种基于知识图谱的漏洞推理与检测方法,突破二元分类,实现CWE级别的推理。VulReaD利用安全知识图谱(KG)作为语义基础,并使用强教师LLM生成CWE一致的对比推理监督,使学生模型训练无需手动标注。学生通过奇数比偏好优化(ORPO)进行微调,以促进分类学对齐的推理,同时抑制不支持的解释。在三个真实世界数据集上,VulReaD相比最先进的基线模型,二元F1提升8-10%,多类分类的宏F1提升30%,微F1提升18%。结果表明,LLMs在二元检测中优于深度学习基线,且知识图谱引导的推理增强了CWE覆盖和可解释性。

英文摘要:

Software vulnerability detection (SVD) is a critical challenge in modern systems. Large language models (LLMs) offer natural-language explanations alongside predictions, but most work focuses on binary evaluation, and explanations often lack semantic consistency with Common Weakness Enumeration (CWE) categories. We propose VulReaD, a knowledge-graph-guided approach for vulnerability reasoning and detection that moves beyond binary classification toward CWE-level reasoning. VulReaD leverages a security knowledge graph (KG) as a semantic backbone and uses a strong teacher LLM to generate CWE-consistent contrastive reasoning supervision, enabling student model training without manual annotations. Students are fine-tuned with Odds Ratio Preference Optimization (ORPO) to encourage taxonomy-aligned reasoning while suppressing unsupported explanations. Across three real-world datasets, VulReaD improves binary F1 by 8-10% and multi-class classification by 30% Macro-F1 and 18% Micro-F1 compared to state-of-the-art baselines. Results show that LLMs outperform deep learning baselines in binary detection and that KG-guided reasoning enhances CWE coverage and interpretability.

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

↑