LLM Security Evaluation: The Truth Behind the Top Recall Score

    This article examines why a top pooled recall score can be misleading in LLM security evaluation. Using a public benchmark snapshot, it explains how pooled recall measures peak coverage while stable hits measure production reliability, analyzes the main causes of run-to-run variance, and shows how a roughly 69.8% cost difference shifts model selection toward cost per hit. It also outlines a reproducible evaluation framework and practical guidance for enterprise deployment.

    1. Why a “Top Recall” Result Sparked Debate

    In high-adversarial, high-noise domains such as cybersecurity, a single metric can easily be misread when evaluating LLM capabilities. A recent set of public benchmark results showed that one general-purpose LLM achieved the highest recall in a three-run pooled setting, hitting 28 of 32 samples and outperforming several frontier models (generally between 25 and 26). Yet a closer look at individual runs tells a different story: its first run found only 17, and just 10 were “stable hits” across all three runs. Meanwhile, an open-weight model’s official release reached 25 hits, only one behind the leader, at roughly 69.8% lower invocation cost.

    These numbers are worth revisiting because they expose three things at once: the evaluation methodology determines the conclusion, peak capability and stability can diverge, and cost efficiency is rapidly catching up with absolute capability. Note that this round of evaluation did not cover every top model, so the findings should be read as a snapshot for a specific sample set and prompting strategy, not a universal verdict.

    2. What Pooled Recall Actually Measures

    “Three-run pooled recall” typically means running the model three times independently on the same samples and counting a hit if any run succeeds. Its mathematical property is monotonic: more runs can only raise or maintain the pooled recall. Pseudocode makes this clearer:

    1. def pooled_recall(runs, ground_truth):
    2. hit = set()
    3. for run in runs: # each independent run
    4. hit |= set(run) # union of hit sets
    5. return len(hit & ground_truth) / len(ground_truth)
    6. def stable_hits(runs, ground_truth):
    7. sets = [set(r) for r in runs]
    8. return set.intersection(*sets) & ground_truth

    Pooled recall therefore measures the “capability ceiling”: the breadth a model can potentially cover under ideal conditions. Stable hits measure “engineering usability”: the dependable lower bound in an automated pipeline. Security operations usually care more about the latter. A single miss can be buried in a sea of alerts, and an intermittent detection makes rules hard to solidify.

    The right approach is to report both metrics side by side: pooled recall for the ceiling, stable hits and variance for the floor. Citing only the former systematically overestimates a model’s real contribution in production.

    3. Why Stability Differs Across Runs

    Run-to-run drift in the same model usually falls into four categories.

    First, sampling randomness. Non-zero default temperature and nucleus sampling branch the inference path, and boundary samples are especially sensitive. Lowering temperature, fixing the random seed, or using greedy decoding can significantly compress variance, though it may sacrifice a few “lucky hits” that diversity provides.

    Second, differences in prompt and context construction. Security samples often hinge on subtle clues in long contexts (configuration snippets, log timing, dependency versions). A different truncation point yields a different conclusion.

    Third, samples that sit on the decision boundary. If a sample requires multi-step reasoning or cross-source correlation, the model may catch it one time and miss it the next, a sign the capability has not been internalized.

    Fourth, parsing tolerance in the evaluation script. Output format drift can turn a real hit into a recorded miss, artificially amplifying instability.

    To quantify stability and use it as a selection gate:

    1. import statistics as st
    2. def stability_report(per_run_counts):
    3. return {
    4. "mean": st.mean(per_run_counts),
    5. "stdev": st.pstdev(per_run_counts),
    6. "min": min(per_run_counts),
    7. "max": max(per_run_counts),
    8. "cv": st.pstdev(per_run_counts) / st.mean(per_run_counts), # coefficient of variation
    9. }

    As a rule of thumb, a lower coefficient of variation is better suited to automated blocking or automatic ticket dispatch, while a high one fits an “assisted triage” role with human review as a fallback.

    4. Cost Efficiency: What 69.8% Cheaper Means

    When the second-place model trails the leader by a single hit but costs about 70% less, the selection logic shifts from “who is strongest” to “hits per unit cost.” A practical comparison metric is a cost-efficiency factor:

    1. cost_efficiency = stable_hits / (avg_cost_per_call × runs × samples)

    If three runs are the norm (many teams do sample multiple times or use self-consistency voting for stability), cost is tripled, further amplifying the low-cost model’s relative advantage. For enterprises processing massive alert volumes daily, the cost gap directly determines whether full scanning is possible or only sampling.

    A practical recommendation is a three-tier deployment: the first tier uses a low-cost model for full-volume initial screening to maximize coverage; the second uses a high-capability model to review suspicious segments for the ceiling; the third uses a rules engine and human confirmation to close the loop for certainty. This funnel controls the bill while applying peak capability where it matters most.

    5. Designing a Reproducible Evaluation Framework

    For conclusions to be credible, the evaluation itself must be engineered. Six elements are recommended:

    1. Sample stratification: bucket by difficulty, type, and context length so aggregate metrics do not hide weaknesses.
    2. Fixed decoding parameters: specify temperature, max output length, and random seed, and record a version snapshot.
    3. Multiple runs with dual metrics: report pooled recall, stable hits, precision, and false-positive rate together.
    4. Parsing tolerance: enforce structured output (e.g., strict JSON) and count parse failures separately.
    5. Cost accounting: log input and output tokens and convert to unit cost rather than looking at price alone.
    6. Regression baseline: rerun the same baseline on every model or prompt change to prevent capability regression.

    An illustrative structured-output constraint:

    1. {
    2. "findings": [
    3. {"id": "S-001", "verdict": "vulnerable", "confidence": 0.82, "evidence": "line 42-47"}
    4. ]
    5. }

    Paired with validation logic, this reduces “false instability from format drift” to a minimum:

    1. def parse_strict(text):
    2. try:
    3. data = json.loads(text)
    4. assert isinstance(data["findings"], list)
    5. return data["findings"]
    6. except Exception:
    7. return [] # counted as a parse failure, not a miss

    6. Enterprise Adoption and Risk Boundaries

    First, do not put evaluation rankings directly into procurement decisions. Rankings are snapshots; the business distribution is the long-term variable, so validate with a small-scale test on your own samples.

    Second, prioritize “explainable evidence” in security scenarios. Require the model to provide line numbers, snippets, or chains for auditing and review; hits without evidence should be discounted.

    Third, ensure data compliance. Sensitive logs and code should be desensitized, minimized, and access-audited before being sent to any model service; observability and traceability can be built on general cloud capabilities such as object storage, log services, and monitoring and alerting. General-purpose capabilities from cloud providers such as Baidu AI Cloud are often used to carry this observability and compliance foundation.

    Fourth, set human-machine collaboration thresholds. High-variance ranges require mandatory human review; only low-variance, high-precision ranges allow automated handling.

    7. Conclusion

    “Top recall” and “mediocre stability” are not contradictory; they answer two different questions: how high the model’s potential capability is, and how far it can be trusted in an automated workflow. The rational approach is to do three things in parallel: replace single-metric rankings with dual-metric evaluation, control cost with a tiered funnel, and ensure reproducibility with strict parsing and regression baselines. When a low-cost option approaches the frontier within an acceptable gap, the engineering focus should shift from chasing the peak to raising the floor, which is the real moat for security-oriented AI applications.