Three Heads Are Better Than One: A Multi-perspective Reasoning Framework for Enhanced Vulnerability Detection
Xin Peng, Bo Lin, Jing Wang, Xiaoling Li, Jun Ma, Jie Yu, Xiaoguang Mao, Shangwen Wang
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c8196b49-c46b-4839-ae24-c21553a6d77aBuilds on25
- VulCNN: An Image-inspired Scalable Vulnerability Detection SystemYueming Wu, Deqing Zou, Shihan Dou, Wei Yang et al.ICSE 2022 · 141 citations
- Multi-LLM Debate: Framework, Principals, and InterventionsAndrew Estornell, Yang LiuNeurIPS 2024 · 131 citations
- An Empirical Study of Deep Learning Models for Vulnerability DetectionBenjamin Steenhoek, Md Mahbubur Rahman, Richard Jiles, Wei LeICSE 2023 · 107 citations
- MVD: Memory-Related Vulnerability Detection Based on Flow-Sensitive Graph Neural NetworksSicong Cao, Xiaobing Sun, Lili Bo, Rongxin Wu et al.ICSE 2022 · 100 citations
- An empirical study on the effectiveness of static C code analyzers for vulnerability detectionStephan Lipp, Sebastian Banescu, Alexander PretschnerISSTA 2022 · 99 citations
Related papers
- MulVul: Retrieval-augmented Multi-Agent Code Vulnerability Detection via Cross-Model Prompt EvolutionZihan Wu, Jie Xu, Yun Peng, Chun Yong Chong et al.ACL 2026 · 4 citations
- Mitigating Cognitive Vulnerabilities in Code Generation via Multi-Agent Adversarial DebateShuofu Liu, Quanjiang Guo, Xiao Liu, Ying LiuWWW 2026 · 1 citation
- Benchmarking LLMs and LLM-based Agents in Practical Vulnerability Detection for Code RepositoriesAlperen Yildiz, Sin G. Teo, Yiling Lou, Yebo Feng et al.ACL 2025 · 32 citations
- RealVul: Can We Detect Vulnerabilities in Web Applications with LLM?Di Cao, Yong Liao, Xiuwei ShangEMNLP 2024 · 11 citations
- Vul-R2: A Reasoning LLM for Automated Vulnerability RepairXin-Cheng Wen, Zirui Lin, Yijun Yang, Cuiyun Gao et al.ASE 2025 · 1 citation
