Why LLM Security Evaluation Recall Keeps Fluctuating

    This article explains why recall scores in large language model security evaluations vary so much, using a recent benchmark that consumed roughly 11.7 billion inference tokens as a case study. It clarifies three concepts—single-run recall, pooled recall across repeated runs, and consistency—and shows why pooled recall rises monotonically with the number of samples while stable hits reveal true reliability. It then examines why security tasks have naturally high variance, how to compare cost per effective hit rather than nominal cost, a reproducibility checklist for evaluation design, the coverage limits of any leaderboard, and a layered approach for building security detection in your own environment.

    1. The Trigger: A Security Benchmark That Burned Billions of Tokens

    A recent LLM security evaluation in the cybersecurity space drew wide attention: the evaluators spent roughly 11.7 billion inference tokens, covered dozens of models with multiple repeated sampling runs, and produced a pooled (three-run aggregated) recall leaderboard that contradicted many people’s intuition—a model known for strong reasoning ranked first under the aggregated metric, even though its single-run performance was mediocre.

    Results like these spread because they challenge two common assumptions at once: first, that larger parameter counts or heavier reasoning automatically mean stronger detection ability; second, that leaderboard rank maps directly to production performance. Reading them correctly requires separating evaluation methodology, statistical properties, and engineering constraints.

    2. Three Concepts First: Recall, Pooled Recall, and Consistency

    Security detection tasks are usually modeled as binary classification or “multi-label hit” problems. Suppose a test set contains N known vulnerable samples (for example, 32) and a model hits H of them in one run; single-run recall is H/N.

    Pooled recall means running the same model independently k times against the same test set and counting a sample as hit if it was detected in any single run. Formally:

    1. def pooled_recall(runs, total):
    2. # runs: a list of length k, each element is the set of sample ids hit in that run
    3. hit = set().union(*runs)
    4. return len(hit) / total
    5. def stable_hits(runs):
    6. # samples hit in all three runs, a measure of consistency
    7. return set.intersection(*runs)

    The gap between the two exposes a key fact: pooled recall increases monotonically with the number of samples k, so larger k always looks better. “First place in the three-run aggregate” therefore does not mean “reliable in a single run.” The observation in the original report—only 17 hits on the first run and only 10 samples hit in all three runs—is exactly what high-variance sampling looks like when amplified by the aggregated metric.

    Consistency can be described with more engineering-friendly measures:

    • Stable hit rate = intersection size / total;
    • Mean single-run recall = arithmetic mean of recall across runs;
    • Recall standard deviation σ, which measures volatility;
    • Coverage curve: the slope of recall growth as k increases; a steeper slope means heavier reliance on “drawing lots repeatedly.”

    3. Why Variance Is Naturally Larger in Security Scenarios

    Security analysis differs sharply from general question answering in its distribution, which amplifies sampling variance:

    1. Long tails and sparse clues. Root causes of vulnerabilities are often buried in call chains spanning files and functions; a single context window is not enough to support a conclusion, so the model has to “guess the right retrieval path.”
    2. Fuzzy decision boundaries. The same issue has multiple phrasings and multiple valid fixes; if the model words its output differently and the evaluation uses strict string matching, a real hit is scored as a miss.
    3. Path divergence from temperature sampling. Reasoning-oriented models switch tracks more easily along long chains of thought; getting it right once does not mean getting it right every time.
    4. Prompt and context window limits. Once context is trimmed, key evidence may fall outside the window.

    Poor consistency is therefore not necessarily a model capability problem—it may be an evaluation design problem.

    4. Cost Efficiency: What Being 69.8% Cheaper Really Means

    The original report notes that a production-grade model’s recall trailed the leader by only one sample while costing about 69.8% less. Translated into engineering terms:

    Let the cost of a single evaluation run be C and the average number of samples k needed to reach the target recall; the effective cost is roughly C×k. If the higher-recall model needs k=3 to match an opponent at k=1, the nominal “cheaper” advantage is cancelled out by the extra sampling. What should actually be compared is cost per effective recall:

    1. CostPerHit = (C × k) / (stable hit count)

    In security operations, the cost of handling false positives also has to be added: if a recall gain comes with a surge in false positives, on-call engineers’ fatigue will quickly eat up the benefit. The evaluation function should therefore be multi-objective: recall, precision, consistency, cost per run, and manual review hours.

    5. A Reproducibility Checklist for Evaluation Design

    For conclusions to hold up, an evaluation should at minimum fix the following variables:

    • Sampling configuration: temperature, top-p, maximum output length, and a fixed random seed where available;
    • Number of repetitions k and confidence intervals, reporting mean ± standard deviation rather than a single point;
    • Scoring method: semantic equivalence judging plus manual spot checks, avoiding pure string matching;
    • Data isolation: deduplicating test samples against training corpora to prevent memory-based hits;
    • Stratified statistics: recall reported separately by issue type (injection, privilege escalation, misconfiguration, dependency risk, and so on);
    • Cost accounting: recording both actually billed tokens and wall-clock time.

    A minimal runnable evaluation skeleton:

    1. def evaluate(model_client, samples, k=3):
    2. per_run = [model_client.detect(s) for s in samples for _ in range(1)]
    3. runs = [[i for i, r in enumerate(run) if r.hit] for run in per_run]
    4. return {
    5. "pooled": pooled_recall(runs, len(samples)),
    6. "mean_single": sum(len(r) for r in runs) / (k * len(samples)),
    7. "stable": len(stable_hits(runs)) / len(samples),
    8. }

    6. Beyond the Leaderboard: Capability Ranges Not Covered

    Every evaluation has coverage boundaries. The original report states explicitly that models from higher capability tiers or newer versions were not included in that round, which means the leaderboard can only answer “who is stronger among this batch of candidates, this set of samples, and this group of parameters”—it cannot be extrapolated into an industry-wide conclusion. When reading a leaderboard, ask three things first: is the candidate set complete, do the samples represent real business distribution, and does the scoring standard match production judging.

    7. Recommendations for Building This in Production

    To build security detection capability in your own environment, a layered approach works well:

    1. Data layer: store code snapshots and sample sets in object storage, use a message queue to smooth out peaks, and keep evaluation tasks replayable.
    2. Detection layer: static rules handle high-certainty blocking, the model handles long-tail and semantic issues, and the two sets of results are combined with weighting.
    3. Orchestration layer: a container platform runs batch inference jobs, executing the k sampling runs in parallel to shorten evaluation cycles.
    4. Observability layer: a logging service records each input, output, and hit decision, while monitoring and alerting track drift in recall and false positives.
    5. Feedback layer: route manual review conclusions back as labeled data, and keep deduplicating and re-evaluating by stratum.

    For cloud platform selection, generic capability categories are enough: elastic compute, batch inference, object storage, logging and monitoring, and key and permission management—avoid being locked to the parameters of a single model or instance type.

    8. Conclusion

    “First in pooled recall” and “reliable in a single run” are two different things; consistency, cost per effective recall, and the price of false positives are the three variables that decide production performance. Writing the evaluation methodology down clearly, including repeated sampling and confidence intervals in the report, and aligning the scoring standard with the business are what keep you from being misled by a leaderboard. For most teams, choosing a cheaper option with acceptable stability and a continuous labeling feedback loop is more pragmatic than chasing the top of the table.