Topic · AI safety engineering

Safety-critical machine learning: engineering AI that cannot fail

By Dr Akanda Ashraf — Lead Perception Engineer · granted UK patent GB2622032, matching technology serving police forces across England and Wales

I have built deep learning systems used in forensic investigation and 3D perception systems running on vehicles and infrastructure. In both settings the interesting work is not raising a benchmark number — it is being able to say, credibly, what the system does when the world stops looking like the training set.

Safety-critical is a different engineering problem, not a stricter one

In an ordinary machine learning product, an error costs a little relevance. In a safety- or mission-critical system, an error costs a wrong medical decision, a missed obstacle, or a person wrongly implicated in an investigation. The difference is not that you need a higher score. It is that aggregate accuracy stops being the thing you are optimising at all.

What replaces it is a claim about behaviour under conditions you have enumerated: which inputs the system is competent on, what it does when it is outside that envelope, how confident its confidence is, and who is accountable for the decision it contributes to. A model with 99% accuracy and no answer to those questions is not deployable; a model with 94% accuracy and clear answers frequently is.

Evaluation that reflects consequence, not convenience

Aggregate metrics average away exactly the cases that matter, because those cases are rare. Slice the evaluation by every factor that changes the input distribution — sensor, site, demographic group, lighting, weather, time of day — and report the worst slice, not the mean. A system is only as safe as its worst operating condition that you have not excluded by design.

Weight errors by their cost. False negatives and false positives are almost never equally bad in a critical setting, and the decision threshold is a safety parameter, not a hyperparameter to be tuned for F1. Then hold back a genuinely untouched evaluation set: every time a test set informs a design decision, it becomes training data, and its reassurance becomes fiction.

Uncertainty and knowing when to abstain

The single most valuable capability in a critical system is the ability to say I do not know. That requires calibrated confidence — where a stated 0.9 means right about nine times in ten — which raw softmax outputs notoriously fail to provide. Temperature scaling, deep ensembles, and conformal prediction with distribution-free coverage guarantees are the practical tools; reliability diagrams and expected calibration error are how you check.

Pair calibration with out-of-distribution detection, so that novel inputs are flagged rather than confidently misclassified, and give the system an explicit abstain path that routes to a human, a fallback rule or a safe default. An architecture with a reject option and a well-defined degraded mode is worth more than several points of headline accuracy.

Human oversight has to be real, not nominal

Automation bias is a documented failure mode: reviewers under time pressure approve confident-looking machine output. Writing a human in the loop into a process document does not create oversight. Oversight exists when the reviewer sees the evidence rather than only the verdict, has a genuine ability to disagree, and when disagreement is recorded and fed back.

This is why explainability is a safety property rather than a nice-to-have. In forensic and investigative applications in particular, a ranked candidate list with visible supporting features lets an expert exercise judgment, whereas an unexplained top-1 answer invites deference. Decision support and decision replacement are different products with different risk profiles, and the distinction should be explicit in the design.

Post-deployment: drift, monitoring and the audit trail

A validated model is a claim about a data distribution, and distributions move — sensors are replaced, populations change, upstream software is updated. Without monitoring, degradation is silent until it becomes an incident. Log input statistics, prediction and confidence distributions, abstention rates and, where available, delayed ground truth, and alert on the trend rather than the incident.

Version and record everything needed to reconstruct a past decision: model weights, code, preprocessing, thresholds and the input itself. In regulated or evidential contexts this is not administrative overhead — the ability to explain what the system did on a specific date is what makes the output defensible at all. Change control matters too: a retrained model is a new system and needs the same evaluation gate as the first one.

Frequently asked questions

What makes a machine learning system safety-critical?

A system is safety- or mission-critical when a failure causes serious, hard-to-reverse harm — physical injury, a wrong clinical or legal outcome, or major operational loss. The distinguishing engineering requirement is a defensible claim about behaviour across the whole operating envelope, including outside it, rather than a good aggregate accuracy score.

How should safety-critical AI models be evaluated?

By worst-case slice rather than average: stratify by sensor, site, demographic group and environmental condition, weight false positives and false negatives by their real costs, treat the decision threshold as a safety parameter, and keep a truly untouched holdout set so the evaluation is not contaminated by design iterations.

Why does uncertainty quantification matter so much?

Because a critical system needs the ability to abstain. Calibrated confidence, out-of-distribution detection and conformal prediction let the model route uncertain cases to a human or a safe fallback, which prevents far more harm than a small gain in headline accuracy.

Is human-in-the-loop review enough to make AI safe?

Only when the oversight is real. Automation bias means reviewers tend to approve confident-looking output, so effective oversight requires that the reviewer sees supporting evidence rather than only a verdict, can genuinely disagree, and that disagreements are logged and fed back into evaluation.

What needs monitoring after deployment?

Input distribution statistics, prediction and confidence distributions, abstention rates, and delayed ground truth where it becomes available — with alerting on trends. Alongside that, version model weights, code, preprocessing and thresholds so any past decision can be reconstructed and explained.

Related work

I have written more on this in Ensuring Safety in Mission-Critical AI Systems. The underlying research includes Deep Multilabel CNN for Forensic Footwear Impression Descriptor Identification (Applied Soft Computing) and Deep-Learning-enabled Fall Detection exploiting Gait Analysis (IEEE EMBC 2022). See also 3D LiDAR perception and link prediction in complex networks.

Get in touch

Email akanda@akandaashraf.com, or find me on LinkedIn, Google Scholar and GitHub.