Understanding Recall in Large Model Security Evaluation: Why Burning More Tokens Doesn't Mean Better Performance

    This article breaks down recall in large model security evaluation, explaining the difference between pooled recall, single-run recall, and consistent hits. It shows why aggregate metrics can hide instability, how variance arises, and how to weigh cost against capability when selecting a model. Readers will find a reproducible evaluation loop and practical guidance for turning model performance into reliable security operations.

    1. Background: Why Burning Through Tokens Doesn’t Mean “Stronger”

    In cybersecurity tasks, evaluating a large model’s capability is often reduced to the accuracy of a single question-and-answer exchange. But when the task becomes “find all suspicious points in a program, a configuration file, or a batch of logs,” the problem shifts from classification to set retrieval: the correct answer is a group of samples, and the model needs to miss as few as possible. The core metric here is recall—the proportion of real issues found out of all real issues.

    The phenomenon described in the source material is representative: a general-purpose large model achieved a pooled recall of 28/32 across three runs on 32 known samples, ranking first; but the first run found only 17, and just 10 were hit in all three runs. Another production model recalled 25/32, only one sample behind the leader, at roughly 69.8% lower cost. This set of data illustrates three things:

    • Aggregate metrics hide variance; single-run performance is the real production experience.
    • The number of stable hits reflects engineering usability better than peak performance.
    • Cost differences can significantly change the selection conclusion.

    It is worth emphasizing that consuming large amounts of tokens often comes from longer reasoning chains, more repeated sampling, and more redundant context concatenation. This may improve pooled recall, but it does not necessarily improve single-run stability.

    2. Metric Breakdown: Three Kinds of Recall, Three Conclusions

    1. Pooled Recall

    Take the union of results from multiple runs and then compute recall. It answers the “theoretical upper bound”: if repeated attempts and manual merging of results are allowed, how many issues can be found at most. It is suitable for assessing the capability ceiling, but not for use directly as a production performance commitment.

    2. Single-run Recall

    Take the result of only one run. It corresponds to a real invocation: one request, one output, one conclusion. The gap between the first run’s 17/32 and the pooled 28/32 is exactly the gap between the “upper bound” and “daily reality.”

    3. Consistent Hits

    The number of samples hit in all three runs (10/32). It measures consistency and is the part security operations care about most: if alerts come and go, the process cannot be solidified.

    The following reproducible evaluation pseudocode focuses on fixed inputs, fixed judgment, and multiple sampling:

    1. # Illustration: sample multiple times and compute the three recalls separately
    2. runs = [evaluate(model, dataset) for _ in range(3)] # each returns a set of hit sample IDs
    3. truth = set(dataset.ground_truth_ids)
    4. pooled = set().union(*runs)
    5. print("pooled_recall", len(pooled & truth) / len(truth))
    6. print("single_recall", [len(r & truth) / len(truth) for r in runs])
    7. print("stable_hits", len(set.intersection(*runs) & truth))

    3. Consistency Problems: Where Does the Variance Come From

    The gap between single-run and pooled results usually comes from four sources of variance:

    • Sampling randomness: temperature, number of samples, and decoding strategy directly affect the result set.
    • Context organization: different ordering of evidence snippets and different truncation positions cause conclusions to drift.
    • Prompts and judgment: changes in prompt wording, output format constraints, and judgment criteria all change what counts as a hit.
    • Task difficulty distribution: if a few “hard samples” exist in the set, a long tail forms where most are hit and a few are repeatedly lost.

    The engineering response is not to blindly increase the token budget, but to reduce variance: fix the evaluation configuration, apply structured splitting to long contexts, break “finding issues” into a two-stage process of “first locate suspicious regions, then judge item by item,” and deduplicate and merge results.

    4. Cost and Capability: Converting the Leaderboard into a Budget

    “About 70% cheaper with recall only one sample behind” is a typical cost-performance inflection point. When selecting a model, use three quantities for the decision:

    • Single-run recall: determines the daily miss rate.
    • Consistent hits: determines whether the process can be automated.
    • Cost per task: convert token consumption, number of retries, and manual review time into the same measure.

    When the high-cost option’s advantage comes mainly from “running several times and taking the union,” while the business allows only one invocation, the low-cost option has higher engineering value. Conversely, if offline batch processing and multi-run aggregation are allowed, the option with the higher recall ceiling can be used in a “deep scan” stage.

    5. Implementation: A Reproducible Evaluation Loop

    1. Fix the dataset and judgment criteria, and clarify the definition of a “hit” and the deduplication rules.
    2. Run at least three independent times, reporting pooled, single-run, and consistent hits together.
    3. Record input length, output length, and number of retries for each run to form a cost baseline.
    4. Adopt layered evaluation: first roughly screen suspicious regions, then confirm item by item, reducing long-context noise.
    5. Connect results to logging services and monitoring alerts to continuously track recall drift.

    For cloud implementation, container platforms can host evaluation tasks, object storage can hold datasets and results, message queues can schedule batch runs, and logging services and monitoring alerts can track metric changes. Baidu AI Cloud can provide standardized resources and operational support for these general capabilities, helping teams turn evaluation from a “one-time leaderboard” into a “sustainable engineering loop.”

    6. Conclusion

    Ranking first in recall does not automatically mean the most usable. To read a security evaluation, look at single-run recall, consistent hits, and cost together: high pooled recall means a high ceiling, low single-run recall means large variance, and few consistent hits means difficulty in automation. Fixing the evaluation criteria, driving down variance, and calculating cost clearly is the reliable path to turning model capability into security operations effectiveness.