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

三个头比一个好:一种多视角推理框架以增强漏洞检测

Three Heads Are Better Than One: A Multi-perspective Reasoning Framework for Enhanced Vulnerability Detection

National University of Defense Technology(国防科技大学)

Xin Peng, Bo Lin, Jing Wang, Xiaoling Li, Jun Ma, Jie Yu, Xiaoguang Mao, Shangwen Wang

AI总结:

本文提出ReasonVul,一种多视角推理框架,通过三个专门的LLM代理的认知协同,提高漏洞检测的准确性和全面性,其在PrimeVul数据集上实现了40.00%的PairAcc和72.52%的F1分数,优于现有基线方法。

摘要:

自动化漏洞检测对于通过识别潜在漏洞来增强软件安全至关重要,从而减少对劳动密集型手动代码审计的依赖。最近的进展转向利用大型语言模型(LLMs)进行漏洞检测,技术如Vul-RAG和VulnSage通过结构化提示和外部知识整合取得了进展。然而,这些方法通常依赖于单一推理范式,限制了它们处理现实世界中复杂多样的漏洞能力。为克服这些限制,我们提出了ReasonVul,一种新的多视角推理框架,利用三个专门的LLM代理之间的认知协同,每个代理体现不同的推理模式。该框架首先对源代码进行独立分析,随后通过结构化辩论机制通过迭代反驳和修订解决冲突,最终达成协作判断。在PrimeVul数据集上评估,ReasonVul实现了40.00%的PairAcc和72.52%的F1分数,超过最佳基线方法81.24%。进一步在JITVUL数据集上的测试证实了其泛化能力,PairAcc为28.67%。此外,我们分析了542个冲突案例,发现389个被正确解决,突显了该框架通过辩论驱动的错误修正机制揭示隐藏漏洞的能力。本工作强调了多视角推理和协作验证在实现现实软件系统中稳健和全面漏洞检测中的重要性。

英文摘要:

Automated vulnerability detection is crucial for enhancing software security by identifying potential flaws that attackers could exploit, thereby reducing the reliance on labor-intensive manual code audits. Recent advancements have shifted towards leveraging large language models (LLMs) for vulnerability detection, with techniques like Vul-RAG and VulnSage demonstrating progress through structured prompting and external knowledge integration. However, these approaches typically rely on a single reasoning paradigm, limiting their ability to address the complex and diverse nature of real-world vulnerabilities. To overcome these limitations, we propose ReasonVul, a novel multi-perspective reasoning framework that harnesses cognitive synergy among three specialized LLM agents, each embodying a distinct reasoning mode. The framework begins with independent analyses of the source code, followed by a structured debate mechanism to resolve conflicts through iterative rebuttal and revision, ultimately converging on a collaborative judgment. Evaluated on the PrimeVul dataset, ReasonVul achieves a PairAcc of 40.00% and an F1-score of 72.52%, surpassing the best baseline by 81.24% in PairAcc. Further tests on the JITVUL dataset confirm its generalizability, with a PairAcc of 28.67%. Additionally, we analyzed 542 conflict cases and found that 389 were correctly resolved, highlighting the framework's ability to uncover hidden vulnerabilities through the error-correction mechanism driven by the debate. This work emphasizes the importance of multi-perspective reasoning and collaborative validation in achieving robust and comprehensive vulnerability detection in real-world software systems.

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

↑