Why LLM Security Evaluation Recall Rates Fluctuate So Much

    This article explains why recall rates for large language models in security evaluation often vary widely, focusing on the gap between pooled recall and single-run recall. It breaks down four common causes of inconsistency, shows why a model that is about 69.8% cheaper but only one sample behind can be the better production choice, and introduces a stability metric plus a cost-efficiency ratio. It also outlines a layered evaluation workflow and engineering practices such as dual-model collaboration, confidence gating, observability, versioned prompts, and a data feedback loop to make model selection more reliable.

    1. It Started With a Leaderboard Run

    A common pattern in cybersecurity capability evaluation is this: a model ranks first in recall across aggregated runs, yet its single-run performance is fairly ordinary, and the number of samples it hits consistently across all three runs is noticeably small. The underlying data can be summarized as follows. One model reached a pooled recall of 28/32 across three runs, ahead of other frontier models at 25–26/32. However, its first run hit only 17 samples, and it stably hit just 10 across all three runs. Another production-grade model reached 25/32, only one sample behind the leader, while costing about 69.8% less.

    What deserves attention here is not the ranking but the evaluation methodology. Recall is a metric that depends heavily on how runs are aggregated. With the same samples and the same models, a different aggregation method can reverse the conclusion. For developers, selecting a model based only on an aggregate score makes it easy to run into “instability” problems in production.

    2. Two Recall Definitions: Pooled Recall and Single-Run Recall

    Pooled recall counts a sample as recalled if it is hit in any one of multiple runs. It measures the “performance ceiling,” meaning the coverage a model can reach under the most favorable sampling conditions.

    Single-run recall counts only the hits from one complete run. It measures “everyday usability” and is closer to the expected performance of a single real online request.

    The difference between the two is essentially the fluctuation room created by sampling randomness. A larger gap means the model is more sensitive to prompts, decoding parameters, and context organization. In engineering, a simple volatility metric can capture this:

    1. def stability(records, total):
    2. # records: list of hit sample ids for each run
    3. from collections import Counter
    4. c = Counter(x for r in records for x in r)
    5. stable = sum(1 for k, v in c.items() if v == len(records))
    6. pooled = len(c)
    7. return {
    8. "pooled_recall": pooled / total,
    9. "mean_single": sum(len(r) for r in records) / len(records) / total,
    10. "stable_recall": stable / total,
    11. "volatility": (pooled - stable) / total,
    12. }

    The value of this sample code is that it turns “consistency” into a quantifiable first-class metric, rather than relying on subjective judgment.

    3. Four Root Causes of Poor Consistency

    1. Decoding randomness: Parameters such as temperature and nucleus sampling cause the same prompt to produce different reasoning paths. Long-chain tasks like security judgment are highly path-dependent.
    2. Context organization differences: Vulnerability clues are often scattered across multiple fragments. The ordering and truncation strategy of retrieved fragments can significantly change hit results.
    3. Task phrasing sensitivity: Security scenarios are terminology-dense. Adding or removing a single qualifier in a prompt can shift the model’s decision boundary.
    4. Uneven sample difficulty distribution: If a few extremely hard samples exist among the 32, the pooled metric can be inflated by “hitting once by chance,” masking overall fragility.

    4. Why “69.8% Cheaper” Matters More Than “3 More Samples”

    In security operations, an evaluation score is only an entry ticket; stable output per unit cost is the real basis for decisions. Suppose two models differ significantly in unit price while their recall differs by only one sample. In a high-concurrency alert-triage scenario, the annual cost advantage of the cheaper model is quickly amplified. More importantly, the gap between stably hitting 10 samples and stably hitting more directly determines the trustworthiness of automated remediation.

    A cost-efficiency ratio is worth introducing:

    1. cost-efficiency = stable recall count / (cost per call × average daily calls)

    The meaning of this formula is that only the ability to “work every time” is worth counting toward automation gains.

    5. A Practical Layered Evaluation Plan

    1. Layered metrics: Report pooled recall, mean single-run recall, and stable recall together; reporting only one is not allowed.
    2. Fixed repetition count: Standardize on three or five runs so results are comparable across reports.
    3. Difficulty layering: Bucket samples into easy/medium/hard and compute metrics separately, avoiding conclusions diluted by hard samples.
    4. Fixed parameters plus parallel scanning: First fix decoding parameters to get a baseline, then run a small-scale parameter sweep to observe the volatility range.
    5. Regression baseline: After each model or prompt change, run the same sample set to form a trend curve rather than a single-point conclusion.

    Sample workflow:

    1. sample set -> run N times with fixed parameters -> compute three metrics -> bucket analysis -> cost weighting -> selection decision

    6. Engineering Implementation Suggestions

    • Dual-model collaboration: A high-recall model handles the “better to over-report” initial screening, while a low-cost stable model handles review, balancing coverage and cost.
    • Confidence gating: Route samples with inconsistent results across runs to a manual or secondary-verification queue, making uncertainty explicit.
    • Observability support: Use logging services, monitoring alerts, and message queues to record hit details for each run, forming a traceable evaluation archive.
    • Versioned prompts and retrieval assets: Put prompt templates and retrieval-fragment organization under version control to avoid “unreproducible evaluation results.”
    • Data feedback loop: Feed false-positive and false-negative reviews back into the sample set to continuously expand hard samples.

    7. Conclusion

    Recall ranking is only surface appearance. What truly determines the ceiling of security capability is consistency, reproducibility, and unit cost. Faced with a result of “first in pooled but average in single-run,” the rational approach is to break the evaluation metrics apart, quantify stability, bring cost into the formula, and then use layering and gating mechanisms to lock uncertainty inside an engineering cage. Only then will selection not be led by leaderboards, and security operations move from “occasional hits” to “stable and dependable.”