LLM Security Benchmarking: Balancing Recall, Consistency, and Cost

    A large-scale evaluation consuming over 10 billion tokens tested frontier LLMs on unified cybersecurity tasks, revealing three overlooked issues: how to measure recall fairly, the gap between single-run and pooled performance, and how to weigh cost against effectiveness. This article breaks down why pooled recall better reflects real-world capability, why output consistency matters for production pipelines, and how tiered model strategies can cut costs dramatically while preserving detection quality.

    LLM Security Benchmarking: Balancing Recall, Consistency, and Cost

    Why Test LLMs on Real Security Tasks

    As large language models rapidly evolve, more teams are bringing them into cybersecurity workflows—vulnerability discovery, alert triage, code auditing, and attack surface mapping. Yet there is often a significant gap between leaderboard scores and real task performance: general benchmarks measure reasoning, coding, and knowledge, while security detection is fundamentally about “finding genuine risks amid massive noise.”

    A recent wave of large-scale evaluations illustrates this well. In one study, a security research team consumed over 10 billion tokens, running multiple frontier models against a unified set of cybersecurity tasks and measuring recall, hit stability, and API cost under consistent conditions. The value of such experiments isn’t about crowning a winner—it’s that they expose three long-neglected questions: how to measure recall fairly, how large the gap is between single-run and stable performance, and how to trade off cost against effectiveness. Let’s examine each.

    Metric 1: Recall — Pooled Results Come Closer to the True Ceiling

    What pooled recall means

    In this evaluation, the top-performing model found 28 out of 32 target issues after aggregating three independent runs, beating several other leading models that found only 25–26. “Pooled” here means: run the same model multiple times independently, take the union of all findings, and then compute recall.

    This approach better reflects real engineering practice. Security detection is a “better to over-report than to miss” scenario, and teams typically use multiple scan passes and cross-validation strategies to maximize coverage. Single-run recall only reflects a model’s floor performance, while pooled recall reflects the capability ceiling achievable through repeated calls within a given compute budget.

    The huge gap between first-run and pooled results

    Even more telling: the model found only 17 issues on its first run, and just 10 issues were hit consistently across all three runs. This means:

    • Nearly 40% variance: the jump from 17 (single run) to 28 (pooled) is enormous. Teams that evaluate a model only once risk seriously under- or over-estimating it.
    • Reproducibility is the core weakness: only 10 issues were detected in every run, revealing substantial output randomness. In security contexts, this uncertainty translates directly into false negatives and higher manual review costs.

    Engineering mitigations

    Common practices for handling variance include:

    1. 1. Multi-path sampling: run the same task N times with different temperatures or prompt templates, then take the union
    2. 2. Deduplication and confidence ranking: semantically deduplicate multi-run results and rank by hit frequency for prioritized human review
    3. 3. Structured output constraints: use JSON Schema or similar to reduce format-related randomness and missed detections

    Metric 2: Consistency — The Dimension Leaderboards Hide

    Most public leaderboards report single-run or average scores and almost never disclose overlap across multiple runs. But this evaluation shows that two models with similar pooled recall can differ dramatically in internal stability:

    • High-consistency models hit the same set of issues every time. Their predictable output makes them suitable for automated pipelines.
    • High-variance models may achieve high pooled recall but need multiple runs to “stumble onto” results. They fit better as offline deep-scanning tools than as real-time detection components.

    Model selection should therefore track at least two numbers: stable hit rate (the proportion of issues found in every run) and pooled recall. The former determines whether a model can serve online pipelines; the latter defines the ceiling for offline batch workloads.

    Metric 3: Cost — Non-Frontier Models Are Catching Up Fast

    Another key finding: a non-top-tier model reached 25/32 recall—only one behind the best model—while costing roughly 70% less per call. Two takeaways:

    1. The frontier gap is narrowing: on vertical tasks, second-tier models may trail leaders by only a few percentage points in accuracy, while costing several times less. For large-scale, high-frequency security scanning, cost-effectiveness is often the deciding factor.
    2. Tiered invocation is more economical: a sensible architecture is “cheap model for initial screening + expensive model for verification.” For example, use a low-cost model to filter out 80% of obvious false positives in the first layer, then invoke a high-capability model only on suspicious results. Overall cost drops significantly with almost no recall loss.

    Selection Advice for Engineering Teams

    Drawing on this large-scale evaluation, teams can adopt a reusable assessment methodology:

    • Never trust a single evaluation: run at least 3–5 times, recording single-run recall, pooled recall, and stable hit count separately.
    • Use real task sets, not generic leaderboards: build 20–50 labeled security cases covering different vulnerability types and code styles—more convincing than any public benchmark.
    • Include cost in the recall curve: plot a cost-vs-recall curve and find the price-performance inflection point instead of blindly chasing first place.
    • Assign models by scenario: use high-consistency, low-latency models for real-time detection; use multi-run pooled strategies for offline deep audits.

    Conclusion

    The biggest lesson from a 10-billion-token-scale evaluation is that LLM capability assessment for security tasks must consider recall, consistency, and cost together. The halo of a single-run victory can conceal severe instability, while a model costing nearly 70% less may trail by just one detection. Building a multi-dimensional evaluation framework is the first step toward genuinely deploying LLMs in security engineering.