Why Do Recall Rates Fluctuate in LLM Security Evaluations?

    This article examines why recall rates vary across LLM security evaluations and what that means for teams building security analysis pipelines. It clarifies key metrics such as recall, precision, pooled recall, and stable hit rate, explains why multi-run aggregation inflates scores, and shows how to compare cost-effectiveness instead of chasing leaderboard rankings. You will also find a reproducible five-step evaluation workflow, common pitfalls to avoid, and guidance on designing a cost-controlled, funnel-based evaluation architecture.

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

    A recent evaluation of how large language models perform on cybersecurity tasks has been cited repeatedly. To reach a reasonably trustworthy conclusion, the evaluators ran repeated inference over the same set of security samples, consuming tokens in the tens of billions. In the end, one high-reasoning model ranked first on “multi-run pooled recall,” while a low-cost model followed with a tiny gap, at roughly one-tenth the cost.

    Discussions like this attract attention because they hit two pain points for developers at once: whether the results can be trusted, and whether the budget is enough. But if we strip away brand and model names and keep only the methodology, the real questions are not “who came first.” They are three more fundamental ones: how recall is defined, why single-run and multi-run results disagree, and how enterprises should design a cost-controlled security evaluation pipeline.

    2. First, Define the Terms: What Recall Means in Security

    In security analysis, the task is usually framed as “determine whether a piece of text or a sample contains risk, and locate the risky span.” This is a classic imbalanced classification and extraction problem: positive samples are rare, negatives are abundant, and attack techniques keep evolving.

    • Recall: the proportion of real risks that are successfully identified. Security work generally prioritizes recall, because a miss means a real threat gets through.
    • Precision: the proportion of reported risks that are genuine. Low precision leads to alert fatigue.
    • Pooled recall: the hit rate computed after merging results from multiple independent runs. It measures how much risk a given approach can cover across several attempts.
    • Stable hit rate: the number of samples hit in every run. It measures consistency and repeatability.

    The phenomenon in the original discussion can be reduced to one sentence: a model has high pooled recall, but mediocre first-run hits and few stable hits. In engineering terms, this is a very typical signal: the model’s capability ceiling is not low, but its output variance is high, so extra scheduling is needed to turn “potential capability” into “stable throughput.”

    3. Breaking Down the Method: Why Multi-Run Aggregation Raises Scores

    Multi-run aggregation improves recall essentially by trading sampling diversity for coverage. A minimal pseudocode sketch of the logic:

    1. pooled_hits = set()
    2. for run in range(k):
    3. result = model.infer(sample, temperature=t)
    4. pooled_hits |= set(result.findings) # Union: a hit in any run counts
    5. recall_pooled = len(pooled_hits & ground_truth) / len(ground_truth)

    Two points must be stated explicitly:

    1. Union-based counting is structurally advantaged. More runs mean a larger union, so recall rises monotonically while cost rises linearly. If the number of runs and the temperature setting are not disclosed, recall numbers across reports are not comparable.
    2. Stable hits are the production metric. An online system usually gets one shot, so the proportion of “hit in all three runs” is closer to the real experience. A report that emphasizes only the pooled value tends to overstate usability.

    So when reading any security evaluation, confirm four pieces of metadata first: sample size and source, number of repeated runs, sampling parameters, and whether judgments were human-reviewed. Rankings without this information have limited value.

    4. The Cost Dimension: Cost-Effectiveness Matters More Than Absolute Scores

    The other key point is that the low-cost model trailed by a single sample while costing about 70% less. As an engineering decision, this is recall gain per unit cost:

    1. cost-effectiveness = (stable hits / total samples) / (cost per 1,000 inferences)

    In real enterprise environments, security analysis is usually a funnel: “full-volume first-pass screening plus a small amount of review.” That means:

    • The screening layer is extremely cost-sensitive and needs high-throughput, low-unit-price models to carry most of the traffic;
    • The review layer is sensitive to recall and explanation quality and can tolerate a higher unit price;
    • The switching threshold between the two layers should be derived from the miss rate the business can accept, not from leaderboard rankings.

    Put differently, an approach that is 70% cheaper and only one sample behind can often carry a larger share of traffic in a funnel architecture, yielding higher overall returns.

    5. A Reproducible Evaluation Plan: Five Steps

    To make conclusions credible and regression-testable, build the evaluation as a pipeline rather than a one-off script.

    1. Build a stratified sample set: stratify by risk type, confusion difficulty, and text length so that long-text samples do not dominate the metrics.
    2. Fix the judgment criteria: define whether “partial hits” score, and require structured output for automatic comparison.
    3. Run multiple rounds and record variance: at least three runs, reporting pooled recall, first-run recall, and stable hits.
    4. Normalize cost: convert token consumption into a consistent cost basis, then compute cost-effectiveness.
    5. Add a regression gate: wire the evaluation into continuous integration so a baseline runs automatically when the model or prompt changes, preventing capability regressions.

    Structured output makes comparison more stable, for example:

    1. {
    2. "sample_id": "S-0421",
    3. "risk_present": true,
    4. "findings": [{"type": "credential_leak", "span": [120, 168]}],
    5. "confidence": 0.82
    6. }

    6. Common Pitfalls

    • Only looking at the top of the leaderboard: a top result that ignores variance may underperform a stable second place after launch.
    • Ignoring prompts and post-processing: the same model can differ greatly under different prompts and parsing logic, so evaluations should hold these variables fixed.
    • Using pooled values for capacity planning: capacity and budget must be based on the distribution of a single call, not on union results.
    • Overlooking data compliance: security samples often contain sensitive information, so redaction, access control, and auditing should be completed before evaluation.

    7. Conclusion

    The valuable part of this widely discussed evaluation is not the ranking but three rules it exposes about deploying security LLMs: recall needs multi-run sampling as a safety net, stable hits determine the production experience, and cost-effectiveness determines how much ground you can cover. For developers, rather than chasing a single leaderboard, the better move is to build an evaluation pipeline with stratified samples, fixed judgment criteria, and reported variance and cost; architecturally, adopt a “low-cost screening plus high-quality review” funnel, and rely on general cloud capabilities such as object storage, message queues, container platforms, and log monitoring to handle data, scheduling, and observability. That is how you obtain sustainable security analysis capability under a budget constraint.