LLM Vulnerability Discovery Benchmark: Insights from a 11.7 Billion Token Test
This article breaks down a large-scale benchmark that spent roughly 11.7 billion tokens evaluating how well large language models find vulnerabilities in real codebases. It explains the benchmark design—32 real disclosed vulnerabilities, real repository context, no internet access, a 30-round exploration limit, and three independent runs per case—and interprets the key findings: high aggregate recall can hide high variance, later-generation models are closing the gap at much lower cost, and evaluation boundaries must be stated explicitly. It also shows how to apply the results in development workflows through tiered model usage, run aggregation, and cost/quota governance, while highlighting common pitfalls to avoid.
1. Why Run an Expensive Vulnerability Discovery Benchmark?
In traditional software security testing, vulnerability discovery relies on a combination of manual audits, static scanning, and fuzzing. In recent years, intelligent models with long-context and tool-calling capabilities have started to enter the code audit process, but the question of “can models actually find vulnerabilities” has long lacked a reproducible, quantitative answer. A large-scale test consuming roughly 11.7 billion tokens is essentially an attempt to answer three engineering questions: whether the benchmark set is close to real code, whether the metrics reflect production usability, and how much real value can be obtained per unit of cost.
The value of this kind of benchmark is not in producing a leaderboard of the “strongest model,” but in establishing a methodology: using recently disclosed real vulnerabilities to build samples so that models cannot rely on training memory to “recite answers”; using repeated runs to distinguish accidental hits from stable hits; and using a unified budget constraint to make different models compete under the same conditions.
2. The Key to Benchmark Design: Making Samples Close to Real Engineering
2.1 Sample Selection: Real Vulnerabilities + Real Codebases
The benchmark selected 32 cases from recently disclosed public vulnerabilities and placed them in the context of real codebases, rather than artificial minimal snippets. Real codebases contain a lot of noise: irrelevant dependencies, legacy coding patterns, and cross-file call chains. All of these significantly raise the difficulty of localization and are closer to the enterprise R&D environment.
2.2 Preventing Memory Contamination: Offline Access and Round Limits
To prevent models from directly recalling answers from memory, the benchmark prohibited internet access and limited each case to a maximum of 30 exploration rounds. Models had to complete the loop of “read code — form a hypothesis — validate the hypothesis — draw a conclusion” within a limited number of rounds, which is closer to how information is obtained in real audits.
2.3 Multiple Sampling: Removing “Luck” from the Conclusions
Each case was run independently 3 times, for a total of 96 runs. A single result can only show “whether it can hit,” while three results can show “whether it is stable.” This step is the most engineering-meaningful design in the entire benchmark.
3. A Three-Layer Interpretation of the Core Conclusions
3.1 High Aggregate Recall ≠ Strong Single-Run Capability
One class of models hit 28/32 under the three-run aggregate measure, leading the other participating models (mostly 25–26/32), but hit only 17 on the first run, and hit all three runs in only 10 cases. This shows that its capability ceiling is very high, but its variance is equally large. For production systems, variance means unpredictability: the same code may reveal problems today and miss them tomorrow.
A simple metric can characterize stability:
Stability coefficient = all-three-run hits / aggregate hitsIn this example, approximately 10 / 28 ≈ 0.36
The closer this coefficient is to 1, the more reproducible the results; the closer it is to 0, the more the results depend on sampling luck.
3.2 Later-Generation Models Are Rapidly Catching Up to the Frontier
Another production-version model achieved a recall of 25/32, only 1 fewer than the leader, while costing significantly less (the original text gives a magnitude of about 69.8% lower). This suggests an important engineering judgment: on tasks like vulnerability discovery that are “highly repetitive and parallelizable,” cost-effectiveness often determines real-world adoption more than absolute capability.
3.3 Evaluation Boundaries Must Be Stated Clearly
This test did not cover the higher-tier flagship models, so the conclusions should be stated as “relative performance under the given samples and budget” and cannot be extrapolated into universal conclusions. Any evaluation report should explicitly state the sample size, budget, rounds, and uncovered items.
4. Applying Benchmark Conclusions to the R&D Process
4.1 Use Models in a Tiered Way
- High-capability, high-variance models: used for deep review of difficult samples, combined with multiple sampling and taking the union;
- High-cost-effectiveness models: used for initial screening of the entire codebase to control total cost;
- Traditional static scanning and fuzzing: used as a deterministic baseline, with model results used for supplementation and noise reduction.
4.2 Trading “Multiple Runs + Aggregation” for Recall
In engineering, an aggregation strategy of two-out-of-three or one-out-of-three can be used:
def aggregate(runs, threshold=2):hits = [r for r in runs if r.found]return len(hits) >= threshold, len(hits)
Raising the threshold improves precision, while lowering it improves recall; it needs to be set according to the team’s tolerance for false negatives and noise.
4.3 Cost and Quota Governance
Make the token budget, concurrency, and per-case round limit configurable, and allocate quotas according to repository risk level; add sampling for high-risk modules and reduce sampling for low-risk modules, thereby maximizing real value under a fixed budget.
5. Common Pitfalls and Improvement Suggestions
- Looking only at aggregate recall: this overestimates production usability, so first-run hits and all-run hits should be reported as well;
- Ignoring prompt and tool design: model performance is greatly affected by context splitting, retrieval strategy, and hypothesis validation methods;
- Ignoring reproducibility: fixing random seeds and recording complete run traces are necessary to make the benchmark a sustainable baseline;
- Treating the benchmark as a procurement basis: the benchmark only provides capability boundaries, and in the end it still needs to be combined with existing scanning, testing, and manual review.
6. Conclusion
The most valuable output of this large-scale test is not the rankings, but the evaluation paradigm: real samples, offline constraints, multiple sampling, and cost alignment. For developers, the rational approach is to treat intelligent models as “a high-recall initial screener + an unstable review assistant,” use aggregation strategies and quota governance to keep variance under control, and then work with the traditional security toolchain to continuously improve vulnerability discovery efficiency at a controllable cost.
