LLM agents waste tokens on code localization; AVRI cuts cost up to 23.7% while keeping success
AVRI reduces total token usage of LLM vulnerability agents without decreasing success rates
Software arXiv 8 Oct 2026 Method Prototype evidence
Published as “Where Do the Tokens Go? Understanding and Reducing Costs in LLM Agents for Vulnerability Discovery”
Why it matters
AVRI makes LLM-based vulnerability discovery cheaper, enabling more practical deployment of such agents at scale.
Summary
AVRI reduces total cost by 18.0% for Codex and 23.7% for OpenCode while preserving success rates and improving or maintaining recall. The study of 200 CyberGym traces shows that code localization and understanding together with vulnerability reasoning and trigger design consume 60.4% of tokens, and higher spending does not consistently yield better outcomes. Only 24.4% of matched comparisons preserve success at lower cost, indicating limited benefit from existing efficiency methods.
What they found 4
- AVRI cuts cost while preserving effectiveness
“On 20 evaluation tasks, AVRI reduces total cost by 18.0% for Codex and 23.7% for OpenCode while preserving success rates and improving or maintaining recall.”
- Token consumption is dominated by code localization and vulnerability reasoning
“Code localization and understanding, together with vulnerability reasoning and trigger design, account for 60.4% of tokens and represent the two leading bottlenecks in failed runs.”
- Higher token spending does not guarantee better outcomes
“higher spending does not consistently yield better outcomes.”
- Few existing methods keep success while lowering cost
“Only 24.4% of matched comparisons preserve success at lower total cost; unsuitable signals and auxiliary overhead limit the benefits of existing methods.”
Caveats 4
- Attributing an outcome change to a method is the weakest link in any such comparison, and RQ3 rests on one run per agent, method, and task, which cannot separate a method effect from run variance by replication.
- The evaluation protocol in § 5 likewise uses one run per agent, configuration, and task and holds the model fixed within each agent; it therefore shares this limitation regarding run-to-run variation.
- Our findings come from four agents on one benchmark family, in C and C++ projects, with the harness and target already fixed, and generalization beyond that setting is not established.
- However, one run per configuration and task does not establish the robustness of these gains to run-to-run variation, and the absence of component ablations prevents us from isolating the contribution of each mechanism.
What’s new here 4
- Provides the first large-scale empirical breakdown of token usage across multiple LLM agents for vulnerability discovery.
- Identifies code localization and vulnerability reasoning as the dominant token consumers and failure bottlenecks.
- Introduces the AVRI interface with a persistent Bidirectional Evidence Trace to let agents reuse evidence instead of re-reading source.
- Demonstrates that AVRI cuts total cost for two agents without sacrificing success or recall on a held-out set of tasks.