MulVul: Retrieval-augmented Multi-Agent Code Vulnerability Detection via Cross-Model Prompt Evolution
On the map: Retrieval-augmented generation → Privacy and security of RAG
also in 1 more
Abstract (arXiv)
Large Language Models (LLMs) struggle to automate real-world vulnerability detection due to two key limitations: the heterogeneity of vulnerability patterns undermines the effectiveness of a single unified model, and manual prompt engineering for massive weakness categories is unscalable. To address these challenges, we propose MulVul, a retrieval-augmented multi-agent framework designed for precise and broad-coverage vulnerability detection. MulVul adopts a coarse-to-fine strategy: a Router agent first predicts the top-k coarse categories and then forwards the input to specialized Detector agents, which identify the exact vulnerability types. Both agents are equipped with retrieval tools to actively source evidence from vulnerability knowledge bases to mitigate hallucinations. Crucially, to automate the generation of specialized prompts, we design Cross-Model Prompt Evolution, a prompt optimization mechanism where a generator LLM iteratively refines candidate prompts while a distinct executor LLM validates their effectiveness. This decoupling mitigates the self-correction bias inherent in single-model optimization. Evaluated on 130 CWE types, MulVul achieves 34.79% Macro-F1, outperforming the best baseline by 41.5%. Ablation studies validate cross-model prompt evolution, which boosts performance by 51.6% over manual prompts by effectively handling diverse vulnerability patterns.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 16 of its 27 references that are in the map. First posted on arXiv 26 Jan 2026.
Builds on
16 of 27 references.
References · 16
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
- 2023Encouraging Divergent Thinking in Large Language Models through Multi-Agent Debatecited by 1,011
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
- 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 144
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 119
- 2018SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilitiescited by 92
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 47
- 2023Domain Knowledge Matters: Improving Prompts with Fix Templates for Repairing Python Type Errorscited by 22
4 more
- 2024SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detectioncited by 17
- 2025iCodeReviewer: Improving Secure Code Review with Mixture of Promptscited by 5
- 2025VISION: Robust and Interpretable Code Vulnerability Detection Leveraging Counterfactual Augmentationcited by 3
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMscited by 2
Built on by
Citing papers per year: 2026: 6.
6 papers.
- 2026Evolving Agents in the Dark: Retrospective Harness Optimization via Self-Preferencecited by 19
- 2026DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detectioncited by 3
- 2026Revisiting Vul-RAG: Reproducibility and Replicability of RAG-based Vulnerability Detection with Open-Weight Modelscited by 2
- 2026P2RAG: Efficient Privacy-Preserving RAG Service Supporting Arbitrary Top-k Retrievalcited by 1
- 2026Strategic Heterogeneous Multi-Agent Architecture for Cost-Effective Code Vulnerability Detectioncited by 0
- 2026Understanding Implicit Trust Errors in Core Carrier Networks through Multi-Agent Flaw Discovery and Analysiscited by 0
- 2026DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detection15 Jul 2026
- 2026Understanding Implicit Trust Errors in Core Carrier Networks through Multi-Agent Flaw Discovery and Analysis11 Jul 2026
- 2026Evolving Agents in the Dark: Retrospective Harness Optimization via Self-Preference4 Jun 2026
- 2026Revisiting Vul-RAG: Reproducibility and Replicability of RAG-based Vulnerability Detection with Open-Weight Models3 Jun 2026
- 2026Strategic Heterogeneous Multi-Agent Architecture for Cost-Effective Code Vulnerability Detection23 Apr 2026
- 2026P2RAG: Efficient Privacy-Preserving RAG Service Supporting Arbitrary Top-k Retrieval16 Mar 2026
Similar, not cited
Close in wording, no citation either way
- 2025Think Broad, Act Narrow: CWE Identification with Multi-Agent Large Language Models
- 2025Benchmarking LLMs and LLM-based Agents in Practical Vulnerability Detection for Code Repositories
- 2026FuzzingBrain V2: A Multi-Agent LLM System for Automated Vulnerability Discovery and Reproduction
- 2026Multi-Agent End-to-End Vulnerability Management for Mitigating Recurring Vulnerabilities
- 2026Just Ask: Curious Code Agents Reveal System Prompts in Frontier LLMs
- 2026An Empirical Evaluation of LLM-Based Approaches for Code Vulnerability Detection: RAG, SFT, and Dual-Agent Systems
- 2025Automated Vulnerability Validation and Verification: A Large Language Model Approach
- 2026ALIBI: Adaptive Agentic Attacks on LLM-Based Vulnerability Detectors via Adversarial Code Comments