DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detection
Summary
DREA (Decoupled Reasoning and Exploration Agents) is a novel framework designed for repository-level vulnerability detection, addressing limitations of existing LLM approaches that struggle with cross-file dependencies. It employs a planning agent, powered by an advanced LLM, to form vulnerability hypotheses and direct investigations, while a lightweight, local explorer agent retrieves repository-level context on demand. This decoupling makes token-heavy exploration economically practical. Evaluated on RepoPairBench, a new benchmark of 100 Python vulnerability-fix pairs, DREA boosts Pair-Correctness from 19%–26% to 30%–42% across GPT-5.2, DeepSeek-V3.2, and GLM-4.7. It also offloads over 93% of tokens, cutting estimated API costs by 16–48 times. Analysis revealed 26%–55% of true positives are "Lucky Hits," indicating flawed reasoning despite correct labels.
Key takeaway
For AI Security Engineers tasked with repository-level vulnerability detection, DREA's decoupled agent architecture offers a significant advancement. You should consider implementing a hypothesis-driven exploration framework. This approach improves Pair-Correctness and drastically cuts API costs by overcoming limitations of function-only analysis. Be aware that even correct predictions may stem from flawed reasoning ("Lucky Hits"). This necessitates focusing on enhancing your LLMs' intrinsic security reasoning quality, not just their binary detection rates.
Key insights
Decoupled agents enable hypothesis-driven repository exploration for vulnerability detection, improving reliability and cost-efficiency.
Principles
- Hypothesis-driven exploration boosts detection.
- Decoupling agents reduces analysis cost.
- LLM security reasoning is a key bottleneck.
Method
A Planner LLM forms hypotheses and directs a local Explorer agent (using ls, glob, grep, read_file) to gather repository context, iteratively refining its decision.
In practice
- Employ a strong LLM for security reasoning.
- Use local models for repository navigation.
- Assess reasoning quality, not just labels.
Topics
- Vulnerability Detection
- LLM Agents
- Repository Analysis
- Software Security
- Reasoning Evaluation
- Cost Efficiency
Code references
Best for: AI Architect, Machine Learning Engineer, Research Scientist, AI Scientist, AI Engineer, AI Security Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.