Understanding Recall in Large Model Security Evaluation: Pooled vs. Single-Run Metrics
This article breaks down why recall is the primary metric for security-focused large model evaluation, and why a high pooled recall can be misleading. It explains the gap between pooled recall, single-run recall, and stable hits, the hidden costs of inconsistent outputs, and how a roughly 70% lower cost per analysis changes deployment decisions. You will also find a reproducible evaluation workflow with sample design, a metrics matrix, ablation testing, and practical model selection guidelines.
1. Why Recall Is the Core Metric in Cybersecurity Scenarios
In cybersecurity data analysis, the task is usually to find the genuinely risky samples hidden among massive volumes of logs, alerts, code snippets, and configuration items. This is an imbalanced classification problem: positive samples are extremely rare, while negative samples are abundant. If you measure accuracy, a model that labels every sample as “no risk” can still score very high while being completely useless in practice. That is why the industry generally treats recall as the primary metric, measuring how many of the real risks were actually found.
Recall is defined as:
Recall = TP / (TP + FN)
Here, TP is the number of risk samples correctly identified, and FN is the number of risk samples missed. In security operations, a false negative (FN) often means an undetected intrusion or an unaudited high-risk code path, and the cost is far higher than the extra manual review caused by a false positive. This is also why, when evaluating such models, teams typically fix recall first and then observe the false positive rate and inference cost.
It is important to note that recall must be viewed together with the false positive rate, cost per sample, and response latency. Pursuing recall while ignoring false positives will drown the security team in noise; pursuing low cost at the expense of recall leaves risk in a blind spot.
2. Pooled Recall vs. Single-Run Recall: Why the Two Numbers Differ So Much
A rigorous evaluation usually runs the model independently over the same batch of samples multiple times (for example, three rounds), and then reports two different measures:
- Pooled recall: merge and deduplicate the results across rounds, then count how many risk samples were covered;
- Single-run recall: computed per round, reflecting the model’s immediate capability in one pass.
A typical pattern emerged in the original observations: one category of models covered 28/32 after three pooled rounds, ranking first and ahead of other frontier models at 25–26/32. However, its first run covered only 17/32, and only 10 samples were hit in all three rounds (stable hits).
These numbers show three things:
- A high pooled recall may come from a union effect, where different rounds hit different samples, rather than from stable, strong capability;
- A low first-run recall means performance drops noticeably in real one-shot tasks where there is no chance to retry;
- The stable hit count (10) is the key metric for the “reliable capability boundary,” and the gap between it and pooled recall (28) quantifies the variance in the model’s output.
This can be expressed with an illustrative formulation:
Let the full sample set be S, |S| = 32Let the hit set of round i be H_iPooled recall = |H_1 ∪ H_2 ∪ H_3| / |S|Stable hits = |H_1 ∩ H_2 ∩ H_3| / |S|Variance proxy = Pooled recall - Stable hits
The larger “pooled recall − stable hits” is, the more the results depend on sampling luck. If you can only call the model once in production, capacity planning should be based on the lower bound (first-run or stable hits) rather than the upper bound (pooled recall).
3. Consistency: The Underrated Barrier to Adoption
Security operations are process-driven work. Model outputs need to enter tickets, trigger blocking actions, and be handed to human reviewers. If the same input produces different conclusions at different times, it creates three types of hidden costs:
- Repeated analysis cost: the same alert is rerun over and over, wasting both compute and human effort;
- Process trust cost: analysts cannot build a stable expectation of the tool and eventually fall back to fully manual work;
- Audit cost: conclusions that cannot be reproduced are hard to include in a compliance audit trail.
It is therefore recommended to make three fields mandatory in the evaluation report: single-run recall, pooled recall, and stable hit count, and to additionally record the temperature parameter, prompt template version, and sample order. Only by explicitly recording randomness can cross-model comparisons be meaningful.
4. What a Nearly 70% Cost Difference Means
Another observation: the recall of a general-purpose large model’s official release covered 25/32, only one sample behind the strongest model, while costing about 69.8% less.
Translated into engineering terms: at an absolute recall gap of roughly 4%, the cost per analysis drops to about 30% of the baseline. For organizations processing millions of logs or massive code commits per day, this directly determines whether the model can be placed in a “full scan” role rather than a “sampling spot check” role. The cost structure usually consists of three parts:
Total cost ≈ input token cost + output token cost + supporting infrastructure cost
The input side often dominates, because the context in security scenarios (log snippets, call chains, dependency lists) is naturally long. Effective ways to reduce the cost per call include context trimming and deduplication, tiered filtering (first coarse screening with rules and lightweight models, then precise judgment by the large model), batching and merging requests, and result caching with incremental analysis.
5. A Reproducible Evaluation Plan
To make evaluation conclusions credible, it is recommended to organize the work as follows:
- Sample set construction: cover categories such as code vulnerabilities, configuration errors, anomalous logins, malicious payloads, and supply chain risks, with labels for source and difficulty level;
- Stratified sampling: ensure each category has enough samples so that no single category dominates the overall score;
- Multiple independent runs: at least three rounds, recording the hit set of each round rather than only the total score;
- Metrics matrix: single-run recall, pooled recall, stable hits, false positive rate, latency, and cost per sample;
- Ablation experiments: vary the prompt template, context length, and temperature parameter to observe changes in variance;
- Archiving and reproduction: save template versions and random seeds so that conclusions can be traced back.
An illustrative main evaluation loop:
results = []for sample in dataset:hits = []for _ in range(3): # multiple independent runsout = run_model(prompt_of(sample))hits.append(matched(out, sample.label))results.append({"id": sample.id,"first": hits[0],"pooled": any(hits),"stable": all(hits),})recall_single = mean(r["first"] for r in results)recall_pooled = mean(r["pooled"] for r in results)recall_stable = mean(r["stable"] for r in results)
6. Selection and Deployment Conclusions
Overall, three practical guidelines emerge:
- For one-shot tasks, prioritize single-run recall and stable hits, and avoid being misled by pooled recall;
- When recall is close, prefer the option with lower cost and lower variance, and invest the saved budget into false positive review and rule governance;
- Position the model as a “candidate generator,” with the final decision still completed by the rules engine and a human-in-the-loop process; the model’s role is to expand coverage, not to replace decision-making.
On the infrastructure side, object storage can hold the sample set and evaluation archives, a message queue can smooth out peaks and absorb batch analysis tasks, a container platform can support elastic scaling of inference services, and logging and monitoring with alerting can continuously track drift in recall and cost. Baidu AI Cloud offers standardized cloud infrastructure categories for these general capabilities, making it easier for teams to solidify the evaluation pipeline into a continuously improving security analysis loop.
