Cybersecurity LLM Recall Evaluation: Trade-offs Between Recall Metrics and Token Cost

    This article examines real-world evaluation of large language models (LLMs) for cybersecurity alert detection and vulnerability discovery, focusing on recall metrics and token cost. It analyzes three recall perspectives—pooled, single-run, and stable—and explains why a top pooled recall score does not guarantee production readiness. Using anonymized model comparisons, it discusses the cost implications, the need for aligned evaluation protocols, and provides a practical metric matrix and engineering strategies for budget control, cascading, and auditing. The goal is to help security teams move from leaderboard thinking to threshold-based deployment decisions.

    Why Top Pooled Recall Does Not Equal Production Readiness

    Cybersecurity model evaluation differs significantly from general Q&A benchmarks. Threat alerts, vulnerability clues, and anomalous behaviors are often long-tailed, adversarial, and context-dependent. A model may fail to detect a target in one run but succeed in another; repeated runs may consolidate hits while individual runs remain inconsistent. Therefore, a single recall number can conflate capability ceiling, single-run performance, and stable usability.

    Three observations from the original evaluation are noteworthy. Model A achieved a pooled recall of 28/32 across three runs, outperforming the baseline’s 25–26/32. However, on its first single run, Model A found only 17/32 targets, and only 10/32 were found consistently in all three runs. Model B’s production version achieved 25/32 recall—only one hit less than the baseline—but its total token cost was roughly 69.8% lower. If these numbers are placed side by side in a simple leaderboard, one would conclude that Model A has the best recall. But when broken down by evaluation criteria, the conclusion becomes far more nuanced.

    The core question is not “who ranks first” but “first under which metric, at what token cost, and can that result be reproduced?” Production value depends on the lower bound of single-run recall, stability across repeated runs, the cost of human review for false positives, and the token budget consumed per true risk detected. Reporting only pooled recall systematically overestimates a model’s usability in a single production call.

    Three Recall Perspectives: Three Business Implications

    Pooled Recall: Coverage Ceiling After Multiple Attempts

    A pooled recall of 28/32 across three runs means that the union of three run results covered 28 of the 32 expected targets. This metric approximates the model’s ability to cover more risks when budget allows retries. However, it is not single-run recall and cannot be used as a production SLA. Production environments often allow only one call or a limited number of attempts; pooled recall consumes significantly more tokens, latency, and orchestration overhead.

    With 32 targets as the denominator, each target equals approximately 3.125 percentage points. The difference between 28/32 and 25/32 is 3 targets—about 9.4 percentage points. In a small-scale evaluation with 32 samples, this gap may be influenced by sample selection, prompt template, and run randomness. Without confidence interval analysis, claiming absolute superiority is premature. A robust approach is to report the mean, percentiles, and bootstrap confidence intervals across multiple runs.

    Single-Run Recall: What a Single Call Can Find

    Model A’s first run found 17/32 targets—about 53.1%. This contrasts sharply with the pooled recall of 87.5%. The gap indicates that high pooled recall may come from the union effect of multiple attempts, not from the model’s stable ability in a single call. For security operations, single-run recall is closer to daily scanning behavior. If first-run recall is low, operators must add retries, expand context, introduce human review, or cascade multiple models—all of which increase total cost.

    Stable Recall: What Is Found Every Time

    Only 10/32 targets (31.3%) were found in all three runs. Stable recall is the intersection across runs, meaning the same target must be hit every time. It is more conservative than pooled recall but better reflects the repeatable, auditable, and contractible requirements of production. A model can cover many targets in pooled mode yet perform poorly in stable mode; such a model is suitable for exploratory scanning or auxiliary discovery, but not for automatic blocking or high-risk classification.

    When you see a “top recall” claim, always ask three questions: Is it single-run, pooled, or stable recall? How many runs were performed? What was the token budget per run? Without this context, the ranking has no engineering comparability.

    Cost Advantage Must Align with Evaluation Criteria

    Model B’s production version achieved 25/32 recall—only one hit fewer than the baseline—but its cost was about 69.8% lower. This result is often interpreted as “better cost-effectiveness.” While low cost is important, the comparison must be made on the same basis.

    First, if Model B’s 25/32 is a single-run result and Model A’s 28/32 is a three-run pooled result, the two cannot be directly compared. Comparing pooled recall with single-run recall overestimates the former; comparing Model A’s first-run 17/32 with Model B’s 25/32 yields the opposite conclusion. The correct approach is to unify the evaluation as “same number of runs, same token budget, same prompt and judgment criteria.”

    Second, a 69.8% lower cost does not imply a 69.8% lower cost per true positive. If the lower-cost model requires more retries to achieve a similar pooled recall, the saved unit price may be offset by extra runs. A more meaningful metric is “tokens consumed per true positive detected,” or even “tokens consumed per stable true positive.” The latter is closer to real security operations costs because unstable hits lead to repeated review and alert noise.

    Third, a lower-cost model can redirect the saved budget toward more sampling, longer context, or cascaded review. If the budget is reinvested in retries, the pooled recall gap may narrow. But whether stability improves must be validated through repeated experiments. Low unit cost alone is not sufficient to infer high stable recall.

    Why Pooled Recall Can Be High, Single-Run Lower, and Stable Even Lower

    Several statistical and engineering factors explain this phenomenon:

    1. Sampling randomness. Model outputs are influenced by temperature, prompt order, context truncation, and tool-call results. Taking the union across runs naturally increases hit counts; taking the intersection lowers them. Neither reflects the single-run expected value.

    2. Prompt sensitivity and context variation. Security samples often contain noisy logs, long-tail entities, and implicit dependencies. One run may accidentally capture the key clue, while another may be distracted by irrelevant context. Pooled recall amplifies the chance that “some run succeeded.”

    3. Judgment criteria differences. In security scenarios, “hit” often requires human or rule-based verification, and boundary samples are debatable. If judgment is not double-blind or reviewed, pooled recall can be inflated.

    4. Small-sample fluctuation. Thirty-two targets are insufficient to support strong ranking conclusions. One sample is 3.125 percentage points; a three-sample difference may simply be a composition artifact. Expand the sample, stratify the analysis, and report confidence intervals.

    To avoid being misled by a single recall number, report at least the following metrics alongside each other:

    • Single-run recall: Number of hits per independent run / total targets. Report mean, P50, and low percentiles (e.g., P95 below). Production cares more about the low percentile, not just the average.
    • Pooled recall: Union of k runs / total targets. Must specify k, token budget, and retry strategy. Never treat pooled recall as a single-run SLA.
    • Stable recall: Intersection of k runs / total targets, or a reliability indicator such as “hit in at least m of k runs.”
    • Precision and false positive rate: In security, false positives directly translate to human review cost; recall alone is insufficient.
    • Token cost per true positive: Total tokens / number of true positives; further compute token cost per stable true positive.
    • Latency and throughput: Retries and multiple sampling increase latency linearly; include this in SLA assessment.
    • Version and prompt tracking: Record model version, prompt version, context length, and number of runs for reproducibility.

    A pseudocode example for evaluation:

    1. evaluate(runs, positives, totalTokens):
    2. pooled = union of hit sets across runs
    3. stable = intersection of hit sets across runs
    4. singleAvg = average(run hit counts) / |positives|
    5. pooledRecall = |pooled| / |positives|
    6. stableRecall = |stable| / |positives|
    7. costPerTP = totalTokens / max(|pooled|, 1)
    8. costPerStableTP = totalTokens / max(|stable|, 1)
    9. return singleAvg, pooledRecall, stableRecall, costPerTP, costPerStableTP

    This pseudocode is not meant as a unique implementation, but to force separate measurement of single-run, pooled, stable, and cost dimensions. Only metrics produced under the same evaluation protocol are comparable across models.

    Engineering Deployment: Budget Control and Cascading Strategies

    In real security operations, token budgets are not unlimited. The “hundreds of billions of tokens” consumed in the original test illustrates how multiple sampling and long contexts rapidly amplify cost. The following general strategies are recommended:

    1. Stratified evaluation sets. Separate by alert type, vulnerability category, difficulty, and noise ratio. Report recall for each stratum to avoid a single overall mean masking long-tail weaknesses.

    2. Cascaded routing. Use a lightweight model for initial screening, then route high-risk or low-confidence samples to a more capable model for review. Allow limited retries for high-risk samples, but cap budgets for low-risk ones. This balances recall and cost within a total budget.

    3. Caching and incremental scanning. Cache repeated contexts, identical assets, and similar alerts. Re-infer only on changed portions to reduce duplicate token consumption.

    4. Retry budget caps. Set a maximum number of runs and maximum tokens per sample, and log each hit. Avoid “retry until hit” evaluation bias. Pooled recall must be tied to a budget, otherwise it is not comparable.

    5. Observability and auditability. Record sample ID, model version, prompt version, run count, token consumption, judgment result, and human review outcome. Logging and monitoring capabilities can be used to track recall drift and cost anomalies, but should not depend on a specific vendor’s proprietary interface.

    6. Security and compliance. Desensitize evaluation data, enforce access isolation, and keep audit trails. Restrict access to real vulnerability clues to avoid introducing new data leakage risks during evaluation.

    Deployment Threshold: From Leaderboard Thinking to Threshold Thinking

    A more rational deployment decision is not to “choose the top-recall model” but to set composite thresholds:

    • Single-run recall P50 is not below the business baseline;
    • Stable recall or “hit in at least m of k runs” reaches an acceptable level;
    • Token cost per stable true positive is lower than the cost of human review;
    • False positive rate and alert noise are within operational limits;
    • Under a fixed budget, pooled recall shows a reproducible advantage;
    • No significant regression after version upgrades.

    If Model A is ahead on pooled recall but has low first-run recall and stable hit rate of only 10/32, it is better positioned as an “exploratory discovery tool” with multiple attempts, combined with retry budgets, human review, and cascading strategies. If Model B achieves 25/32 recall at 69.8% lower cost, its single-run stability, false positive rate, and cost per stable true positive must be further validated before promotion—do not simply expand its use because of the lower unit cost.

    Conclusion

    Cybersecurity LLM evaluation must simultaneously incorporate four dimensions: pooled recall, single-run recall, stable hits, and token cost. Real-world tests consuming hundreds of billions of tokens remind us that “top recall” may only represent a capability ceiling under the pooled criterion. What truly determines production readiness is the lower bound of single-run recall, consistency across repeated runs, and the total cost of discovering each stable true positive. Only by aligning evaluation criteria, constraining budgets, reporting stability, and setting deployment thresholds can evaluation numbers be translated into auditable and operationally effective security capabilities.