Why LLM Safety Evaluation Recall Varies So Much
This article explains why recall in large language model safety evaluations fluctuates across runs, and why a single pooled number can be misleading. It clarifies the difference between single-run recall, pooled recall, and stable hit rate, outlines four common sources of variance, and proposes a reproducible four-layer evaluation design covering dataset, runs, metrics, and cost. It also shows how to calculate cost per stable hit and lists practical actions for reporting and gating.
1. The Trigger: What a Token-Heavy Safety Evaluation Revealed
A recent public evaluation of LLM cybersecurity capabilities sparked discussion. The evaluators spent a substantial token budget running multiple general-purpose LLMs against vulnerability and risk identification tasks over several rounds. The most eye-catching conclusion was that one class of models ranked near the top on “three-run pooled recall,” while its single-run performance was mediocre and the number of samples hit in all three runs was noticeably small.
For engineering readers, the value of such a result is not “who came first.” It is that the result exposes a long-overlooked problem: recall is not a scalar, but a distribution with variance. If an evaluation reports only one aggregated number, readers can easily mistake one lucky run for stable capability.
A note on scope: this article does not evaluate any specific vendor or product. It discusses evaluation methodology, metric definitions, and engineering practice only. Model forms are referred to neutrally as “general-purpose LLMs,” “AI coding tools,” and “a cloud vendor’s model service.”
2. Clarifying the Concepts: Recall, Pooled Recall, and Consistency
In a security detection context, recall usually means:
Recall = correctly identified risk samples / all true risk samples
“Pooled recall” takes the union of results across multiple runs and then computes:
pooled_recall = |R1 ∪ R2 ∪ ... ∪ Rn| / N
The two have fundamentally different properties:
- Single-run recall measures “how much this one request catches,” reflecting the expected payoff in production.
- Pooled recall measures “how much can be caught across several runs,” an optimistic estimate of the capability ceiling.
- Stable hits (hit in all three runs) measure consistency, which is the key to engineering usability.
An intuitive conclusion: high pooled recall, low single-run recall, and few stable hits mean the capability is “there, but not obedient.” In production you usually get one attempt, so single-run recall and stable hit rate are the basis for capacity planning and staffing budgets.
3. Why “High Pooled, Low Single, Low Stable” Happens
Four layers explain this variance, and all four are common in general-purpose LLMs:
- Sampling randomness: stochastic decoding makes the same input produce different output paths, and boundary samples are especially sensitive.
- Prompt and context sensitivity: small changes in how context is organized, how evidence snippets are ordered, or how instructions are worded can change the conclusion.
- Long-tail sample difficulty: among real risk samples, obvious cases are a minority; many samples sit in a gray zone of “could go either way,” where the model’s decision threshold naturally jitters.
- Benchmark construction bias: if samples contain guessable surface features, the model may hit by guessing, which inflates pooled results.
The engineering implication is direct: variance itself is a quality metric that must be measured, not noise.
4. A Reproducible Evaluation Design: Turning Variance into a Manageable Object
Split the evaluation into four layers, each with a clear deliverable:
- Sample layer: a fixed, versioned dataset with labeled source and difficulty tiers (obvious / gray zone / subtle), keeping negative samples so false positives can be computed.
- Run layer: same prompt, same parameters, repeated N times (N≥3, 5 recommended), recording the hit set for each run.
- Metric layer: report single-run mean, single-run variance, pooled recall, stable hit rate, and false positive rate together.
- Cost layer: record input/output token consumption and end-to-end latency, converted into cost per effective hit.
Illustrative pseudocode:
def evaluate(model, dataset, n_runs=5):hits = []for _ in range(n_runs):run = set()for sample in dataset:out = model.infer(build_prompt(sample))if hit(out, sample.label):run.add(sample.id)hits.append(run)union = set().union(*hits)stable = set.intersection(*hits)return {"single_mean": mean(len(r) for r in hits) / len(dataset),"single_std": std(len(r) for r in hits) / len(dataset),"pooled": len(union) / len(dataset),"stable": len(stable) / len(dataset),}
Key engineering practice: use stable hit rate as the admission gate, pooled recall as a reference for the capability ceiling, and single-run mean for staffing estimates. Missing any one of the three easily distorts the conclusion.
5. The Cost Dimension: Why “Cheap and Near the Frontier” Matters
Security detection is often a large-scale, repetitive task, so cost structure matters more than peak capability. A simplified metric captures cost-effectiveness:
cost per stable hit = (input tokens × price_in + output tokens × price_out) / stable hits
There is a commonly overlooked trap here: if the denominator is computed from pooled recall only, low-cost options are overestimated, because the capability of “catching it only after several runs” is counted as a free gain. Replacing the denominator with stable hits makes the cost comparison meaningful for decisions.
On the engineering side, costs can be reduced with general means rather than any proprietary interface: tiered routing (a lightweight model does coarse screening first, and gray-zone cases go to a stronger model for review), result caching and deduplication, batch requests, context trimming and evidence snippet reordering, and running repeated evaluation jobs asynchronously on container platforms and message queues, with logging and monitoring services providing a quality dashboard.
6. Conclusion and Action Checklist
Back to the original question: the right way to read such evaluation results is not a ranking but a capability distribution. Five actionable recommendations:
- Reports must give single-run mean, variance, pooled recall, and stable hits together.
- Use stable hit rate as the go-live admission metric.
- Evaluate negative samples and false positive rate with the same weight as recall.
- Account for cost per stable hit to avoid the optimistic bias of the pooled metric.
- Maintain versioned datasets and fixed prompt templates to keep cross-round comparisons valid.
Upgrading evaluation from “one-time scoring” to “continuous measurement” is what enables explainable, auditable trade-offs among effectiveness, stability, and cost. To host such an evaluation pipeline, using general-purpose object storage for datasets, container platforms for load testing, and logging and monitoring services for a quality dashboard is a common and sound industry practice.
