Monday, July 13, 2026
HomeHealthcareConstant safety mannequin deployment with FPR calibration

Constant safety mannequin deployment with FPR calibration

In our earlier Dynamic AI Safety weblog and the underlying CAMLIS 2025 paper, we described a launch platform constructed to maneuver new protections into manufacturing with out disrupting buyer workflows. Such a platform is a requirement for safety programs as a result of the fixed evolution and adaptation of adversaries require the same response loop from distributors like Cisco.

Fast detection-model churn creates potential downstream disruptions for patrons, who immediately, and with out understanding it, begin utilizing a more recent model of the mannequin that behaves in a different way from the earlier iteration. One main variable between deployments is mannequin aggression: the newer mannequin is best however can be deployed extra aggressively, breaking workflows that appeared advantageous only some hours in the past.

Preserving the aggression stage between releases is one thing we deal with throughout each mannequin replace. If a buyer chooses a blocking tier that flags about 1 in 1,000 requests, a mannequin retrain shouldn’t silently flip that into 1 in 200 or 1 in 20,000. The detector might enhance beneath, however the buyer’s false-positive finances ought to stay the identical.

Completely different downstream customers additionally function at totally different factors on that tradeoff. A SOC operating aggressive blocking sits removed from a instrument that solely enriches logs, so it’s not sufficient to protect one threshold throughout releases. The entire vary of working factors, from very aggressive to very conservative, has to hold the identical which means from one mannequin model to the subsequent.

This can be a frequent downside for anybody deploying detection fashions, so we’re open-sourcing our answer for FPR calibration that may be utilized earlier than a mannequin is launched to reduce the possibility of buyer disruption. The strategy works offline on benign scores and ships a bounded sklearn artifact together with the mannequin. The code is at github.com/cisco-ai-defense/fpr-model-calibration, and the paper describing the technical particulars will be downloaded right here.

Why false-positive fee is the appropriate contract

False-positive fee (FPR) is the fraction of benign visitors that may be flagged at a threshold. For a mannequin rating threshold, FPR estimates how a lot professional exercise the brink will interrupt in manufacturing.

FPR calibration differs from likelihood calibration, which estimates Pr(assault | rating). For a lot of safety fashions, that likelihood depends upon an assault distribution that’s uncommon, adversarial, and quickly shifting. Attackers change ways when detectors enhance. The constructive class a mannequin sees throughout coaching is subsequently a file of previous assaults, not a steady pattern of future assaults.

FPR calibration relies upon solely on benign visitors. In lots of manufacturing safety settings, benign visitors is extra plentiful, simpler to measure, and tied on to false-positive hurt. If the calibrated rating says a request is a 1-in-1,000 benign occasion, the product crew can cause about alert quantity while not having to know tomorrow’s assault prevalence.

What a calibrated rating means

The calibrator maps uncooked mannequin scores onto a set rating contract. The calibrated rating contract maps frequent working tiers to focus on FPRs:

The dimensions is logarithmic as a result of manufacturing FPR choices are logarithmic. Shifting from 1% to 0.1% and from 0.1% to 0.01% are each tenfold reductions in benign alerts. A linear rating axis would compress the low-FPR area lined by the 0.50, 0.70, and 0.85 working tiers.

With the rating contract in place, coverage thresholds keep steady throughout mannequin releases. A coverage can block at 0.50, alert at 0.30, and enrich logs at 0.10. When the mannequin crew ships a brand new detector model, it ships a brand new calibrator with it. The coverage thresholds hold their FPR which means regardless that the uncooked mannequin scores beneath modified.

How a lot knowledge is sufficient?

One frequent gotcha when estimating the efficiency of detection fashions is simply how a lot knowledge you truly must correctly calibrate, and even measure, a mannequin. Whereas assaults can appear to be all over the place in public take a look at units, in observe they’re very uncommon, normally under 0.1% of visitors. At these charges, the mannequin must be extraordinarily correct to maintain the false-positive fee sensible, and calibrating it requires much more benign knowledge than one would count on.

A traditional-approximation rule of thumb offers about 16 / p benign samples for plus-or-minus 50% relative precision at 95% confidence, the place p is the goal FPR. For frequent working factors, the tough pattern counts are:

Pattern measurement dominates low-FPR error in observe, and extra benign knowledge is the one path to tighter estimates.

Validation on a public benchmark

We validated the tactic on the general public Credit score Card Fraud Detection benchmark (284,807 transactions, 492 fraud circumstances), becoming the calibrator on a held-out benign subset:

The takeaway is easy: so long as the benign distribution stays pretty fixed between calibration and manufacturing, a mannequin will be calibrated very precisely.

What adjustments for product groups

An FPR-calibrated launch consists of the detector, the calibrator, and both calibrated-score serving or uncooked thresholds derived from the calibrator. Coverage thresholds hold their FPR which means, clients hold their false-positive finances, and the mannequin can enhance beneath.

The identical contract additionally makes detector scores simpler to match throughout classes. If a prompt-injection detector and a data-leakage detector each emit calibrated rating 0.50, every rating means the identical factor about benign rarity. Compound insurance policies nonetheless want their very own FPR measurement, however their inputs not combine unrelated uncooked rating scales.

Getting began

Match the calibrator with fit_calibration_pipeline:

from fpr_model_calibration import fit_calibration_pipeline
import joblib

pipeline = fit_calibration_pipeline(benign_scores, n_knots=10000)
joblib.dump(pipeline, “calibration.pkl”)

Manufacturing inference calls the serialized sklearn pipeline:

pipeline = joblib.load(“calibration.pkl”)
calibrated = pipeline.predict(raw_scores.reshape(-1, 1))

FPR calibration offers mannequin releases a steady rating contract with out changing recent benign knowledge, drift monitoring, or detection-quality analysis. For safety programs that retrain beneath adversarial stress, that contract lets detectors enhance whereas coverage thresholds hold their FPR which means.

Hyperlink to the open supply GitHub repo will be discovered right here:
https://github.com/cisco-ai-defense/fpr-model-calibration

and the preprint:
https://arxiv.org/abs/2607.05481

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments