AI & Security

AI Detection Accuracy: Precision, Recall, and Reality

Measure precision, recall, coverage, consistency, uncertainty, and error cost on cases drawn from your own security workload.

Alex Gibson, Cofounder and Principal at Artemes AI
Alex Gibson
Cofounder, Principal
Aug 22, 2026 10 min read
Confusion matrix showing true positives, false positives, false negatives, and true negatives for AI security findings

AI detection accuracy is not one percentage. It is a record of what the system found, what it missed, what it invented, and how much work each error created. A blended score hides the part a security team actually has to operate.

The problem is not that teams lack an accuracy number. The problem is that vendors and internal pilots often count the easiest cases, mix unlike tasks, and call every plausible sentence a success. A model that spots a suspicious package, explains a confirmed CVE, and proves local exposure is doing three different jobs. Grade them separately.

Security leaders need a test that survives contact with their own fleet. That means frozen labels, visible denominators, error cost, missing data, repeat runs, and a clear promotion rule from candidate to finding. Anything less is demo math.

Infographic

One accuracy score hides four outcomes

A useful test counts what the system found, missed, invented, and correctly left alone.

Confusion matrix for AI security detection accuracyA two by two matrix compares real security conditions with AI findings. True positives and true negatives are correct outcomes. False positives create wasted work, while false negatives leave risk unseen.AI VERDICTOBSERVED TRUTHFINDINGNO FINDINGCONDITIONNO CONDITIONTRUE POSITIVEReal risk enters the queueReward: risk removedFALSE NEGATIVEReal risk stays invisibleCost: exposure remainsFALSE POSITIVENoise consumes skilled timeCost: review and distrustTRUE NEGATIVEClean state stays quietReward: no wasted actionREPORT PRECISION, RECALL, ERROR COST, AND COVERAGE BY TASKA blended percentage cannot tell an operator what will break

What does AI detection accuracy mean in security?

Start with one decision. For example: does this endpoint run a vulnerable service that is reachable on a network path? The answer key must come from independently observed state and a documented policy. It cannot be another model opinion.

A true positive is a real condition the system reports. A false positive is a reported condition the evidence disproves. A false negative is a real condition the system misses. A true negative is a clean case the system leaves alone. These four counts support the metrics that matter.

  • Precision is true positives divided by all reported positives. It answers, “When the system speaks, how often is it right?”
  • Recall is true positives divided by all real positives. It answers, “Of the conditions that matter, how many did it find?”
  • False positive rate is false positives divided by all real negatives. It shows how often clean cases become work.
  • False negative rate is false negatives divided by all real positives. It shows how much risk stays unseen.
  • Abstention counts cases the system refuses to decide because evidence is missing or conflicting.

F1 combines precision and recall through a harmonic mean. It is useful for comparison, but it assumes those two errors deserve balanced weight. Security work rarely behaves that neatly. Missing an exposed critical service and reviewing one extra benign package do not have the same cost.

Why can a high accuracy score be wrong?

Base rates can make a weak detector look excellent. Imagine 100,000 endpoint checks where only 500 contain the condition. A system that says “clean” every time is 99.5 percent accurate. It also finds nothing. Overall accuracy rewards the dominant class and hides total failure on the rare class the team cares about.

Dataset design creates another trap. If every positive case contains the CVE name in the input and every clean case does not, the model can learn the label rather than the security condition. Duplicates, training data overlap, old vulnerabilities, toy code, and answers embedded in file names all raise the number without raising production value.

Coverage is separate from judgment. A model can be precise on the files, hosts, or alerts it examines while skipping most of the available surface. Report the eligible population, the portion examined, the portion with enough evidence, and the portion decided. “Eighty percent precision” means little if the system inspected one endpoint out of ten.

What do current AI vulnerability tests show?

Published results vary because the tasks vary. That is the point. A September 2025 study of three open models reported blind vulnerability detection from 83.2 to 97.4 percent, yet those same models flagged 58 to 75 percent of secure snippets as vulnerable. Exact CWE classification fell to about 16 percent. The authors also warned that the underlying examples covered vulnerabilities disclosed from 2010 through 2019. Read the full methodology in the peer reviewed ICPEC 2025 vulnerability study.

A different benchmark published in July 2026 used 141 human verified vulnerabilities across 41 containerized applications and compared 21 models. The best recall was 62.4 percent. One high recall model generated as many as 474 false positives beyond the ground truth. The Appen security benchmark methodology and results show why ranking by recall produces a different winner than ranking by a balanced score.

These studies do not prove one universal rate for AI detection accuracy. They prove that task definition, ground truth, class mix, coverage, and harness design change the result. A buyer should distrust a number that arrives without those five fields.

How do precision and recall change the daily queue?

Use a round number. Suppose a weekly test covers 10,000 cases and 5 percent, or 500 cases, are truly positive. At 90 percent recall, the system finds 450 and misses 50. At 75 percent precision, those 450 true findings sit beside 150 false findings because 450 divided by 600 is 75 percent.

If each reported case takes eight minutes to verify, 600 cases consume 80 analyst hours. The 150 false cases alone consume 20 hours. Raise precision to 90 percent at the same recall and the queue falls to 500 cases: 450 true, 50 false. Review falls by more than 13 hours without finding one additional vulnerability.

Now price the miss. If the 50 false negatives include internet services with active exploitation, a good queue can still be a bad control. Weight error by asset role, exposure, exploit evidence, and recovery cost. Keep the raw counts beside the weighted cost so leaders can see whether one dramatic case dominates the model.

How should you build an AI detection accuracy benchmark?

Write the task contract before collecting results. Name the input sources, allowed transformations, exact output schema, decision time, evidence freshness, positive definition, negative definition, abstention rule, and owner of the answer key. A vulnerability candidate and an actionable local finding need different tests.

Build cases from the environment where the system will run. Include common software, rare platforms, missing agents, stale inventory, package backports, dormant libraries, compensating controls, duplicated assets, and hostile text inside logs or tickets. Sample boring negatives heavily. Production is mostly negative, and that is where false positive cost appears.

Split the set into development, validation, and hidden test cases. Tune prompts and policy on development. Choose thresholds on validation. Open the hidden set once for the final pilot decision. If a vendor sees and repairs every hidden failure, the set is no longer hidden.

Label with independent evidence. Two reviewers should resolve material disagreements, and the record should preserve why the final label won. Measure reviewer agreement. If experts cannot agree on the truth, the case should not become a clean model failure without explanation.

Run each case more than once. A security system that changes its verdict with the same evidence creates a new operating cost. Report consistency, unsupported claim rate, evidence citation errors, and action differences alongside precision and recall. Our guide to evaluating AI security vendors explains how to turn these measures into hard pilot gates.

Which accuracy slices expose hidden failures?

Break results out by operating system, asset class, vulnerability family, evidence source, finding severity, exposure state, data age, and model or policy version. Add separate views for sparse evidence and conflicting evidence. An average can pass while one regulated workload fails every time.

Watch for label shortcuts. If results are strong when a CVE identifier is present but weak when only version and configuration are present, the model may be matching known text rather than reasoning about state. Remove a decisive field and expect abstention. Add a contradictory record and expect the conflict to be named.

Measure the full workflow, not just the model response. Collection gaps, bad asset joins, retrieval misses, stale policy, and unsafe command generation are system errors even when the language model did its narrow job. The operating result belongs to the whole chain.

Set pass limits for each slice before the pilot. A team might require at least 90 percent precision for automatic ticket creation, at least 95 percent recall for known internet exposure, and zero unsupported actions across the hidden set. Those numbers are examples, not defaults. The important move is writing the consequence beside each limit. If precision fails, findings stay in analyst review. If recall fails, the new system cannot replace the existing control. If one unauthorized action appears, action rights remain disabled. A score matters when it changes a deployment decision.

What changed in AI evaluation during 2026?

NIST published AI 800-3 on February 17, 2026 after evaluating 22 API models on three popular benchmarks. The report separates accuracy on a fixed benchmark from generalized accuracy on the wider population of similar tasks. It also shows why uncertainty estimates and item difficulty matter. The NIST statistical guidance for AI evaluation is a useful correction to leaderboards that publish a point estimate without saying what it can generalize to.

The operational change is simple. Put a confidence interval around every important rate. Keep test items grouped by the source they came from. Do not treat 200 nearly identical package records as 200 independent demonstrations of judgment. Repeat after changes to the model, prompt, retrieval path, policy, or collector.

How do you monitor accuracy after launch?

Production monitoring needs a rolling answer set. Review a random sample of accepted findings, rejected findings, abstentions, and silent cases. Oversample high consequence workloads without letting them replace the random sample. Feed confirmed outcomes back into a versioned replay set.

Set change limits before deployment. A fall in precision may pause automatic ticket creation. A fall in recall on internet assets may return the task to manual review. A spike in unsupported claims may disable narrative output while deterministic evidence collection continues. Every limit needs an owner and recovery route.

Track capacity too. A better detector can produce more real findings than engineering can fix. Connect accuracy to the AI vulnerability prioritization queue, then measure verified risk removed per analyst hour and per engineering hour. Finding more is useful only when the system helps the organization finish the right work. Keep the handoff inside a documented vulnerability triage workflow so measured findings reach a named decision and owner.

Frequently asked questions

What is a good AI detection accuracy rate?

There is no useful universal rate. Define the task, base rate, evidence, error cost, coverage, and authority. Then set separate precision and recall limits for that workload.

Is F1 better than accuracy for vulnerability detection?

Usually, because F1 exposes the trade between precision and recall. It still hides coverage, abstention, consistency, and unequal error cost, so do not use it alone.

How many test cases are enough?

Enough to estimate each required slice with useful uncertainty. Rare conditions need deliberate sampling. Publish the count and interval instead of claiming certainty from a small set.

Should human review count as part of accuracy?

Report model output and final workflow output separately. Human correction may make the delivered result accurate, but the review time is part of the system cost.

Executive takeaway

Stop asking for an AI accuracy percentage. Ask for the confusion matrix, coverage, abstention, consistency, uncertainty, and cost by task. Test on your own base rates. Freeze the answer key. Rerun every material change.

Artemes AI combines deep endpoint context with AI driven analysis, but context does not excuse weak measurement. Give any system hidden cases, remove decisive evidence, and count both the wrong answers and the work they create. The broader AI vulnerability management guide shows where that measured decision belongs in the operating program.

Artemes AI

Put more evidence behind vulnerability decisions

Artemes AI combines endpoint telemetry, sourced vulnerability intelligence, and analysis with practitioner review so teams can examine the evidence, missing context, and recommended next step together. We are accepting early access requests now.

Alex Gibson, Cofounder and Principal at Artemes AI

Alex Gibson

Cofounder, Principal

Alex writes about configuration drift, operational security evidence, endpoint telemetry, triage supported by AI, and the practical work of turning signals into better remediation decisions.

AI Security
Machine Learning
AI with Human Review
Found this useful? Share it.

Get articles like this in your inbox.

Security research and occasional Artemes AI product updates.