Tech Blog · Prescriptive AI
When data is lacking, AI should first say "I don't know"
What is more dangerous than AI being wrong is AI being confident without knowing it is wrong. We explain why a model's confidence stays high even outside its training data, and how to expose uncertainty and hold back an answer.
Sep 1, 2026 · OPTI-X
The most difficult moment when using AI on the floor is not when the AI is wrong. It is when the AI is wrong and still answers just as confidently as usual.
AI does not know when a situation is new
Machine learning models are accurate in situations similar to their training data. But when a situation outside the training data arrives, such as a raw material never seen before or an equipment state never encountered, accuracy drops. The problem is that most models still produce an answer in exactly the same form. Looking at the answer alone, you cannot tell whether to trust it.
Situations inside and outside the data
The answer may look the same, but how far you can trust it differs
Confidence is not a reason to trust
Classification models usually output a "confidence" with each answer. Hendrycks et al. (2017) fed inputs that were not digits into a model trained on handwritten digits. Even for random noise images, the model answered that they were some digit with an average confidence of 91%. The authors explain that the softmax function that produces confidence uses an exponential that widens small differences, so it rarely outputs uniformly low values even for unfamiliar inputs.
Average confidence on unfamiliar inputs
Results of feeding untrained inputs into a handwritten digit (MNIST) classifier
Fortunately, confidence on unfamiliar inputs is generally lower than on familiar ones, so it can be used to filter them out. But the confidence number should not be read as a probability you can trust as is. In the large-scale comparison by Ovadia et al. (2019), the quality of uncertainty estimates dropped along with accuracy as the data drifted from the training data. Models that were well calibrated on test data from the same distribution as the training data often were not once the distribution shifted.
Two kinds of uncertainty and how to expose them
Kendall et al. (2017) divide uncertainty into two kinds. Aleatoric uncertainty is the variation inherent in observations, such as sensor noise, and does not shrink even if more data are collected. Epistemic uncertainty comes from what the model does not know; it shrinks as data accumulate and grows for inputs far from the training data.
In a neutralization tank, the measurement noise of the pH sensor is aleatoric uncertainty, and the prediction error on a day a new raw material comes in is epistemic uncertainty. What is needed to notice an unfamiliar situation is epistemic uncertainty.
Approaches that expose uncertainty
Methods widely used in research and practice
The best-known multiple-model approach is deep ensembles. Lakshminarayanan et al. (2017) recommended training 5 networks of the same architecture separately as the default, and as the ensemble grew, uncertainty on unfamiliar inputs rose faster than with another approximation method (MC dropout). In the comparison by Ovadia et al., ensembles also performed best on most metrics. In a process, this means training several predictive models on the same operating data and checking how much their predictions diverge for each dosing candidate.
The distance approach, as in Lee et al. (2018), measures how far the current input is from the closest cluster of training data in the model's internal feature space. In a process, this means checking how different a combination of dosing, temperature and flow rate is from past operating records.
Withholding is also a prescription
"This one is hard to judge. The raw material composition is outside the range of past data." This single sentence is worth far more than one wrong prescription. The floor trusts AI only once it knows when the AI can be trusted and when it cannot.
Withholding comes at a price. Geifman et al. (2017) proposed a method that, given a target error rate, withholds answers so that the error rate is not exceeded. In ImageNet image classification, it guaranteed a top-5 error rate of 2% with 99.9% probability while answering about 60% of all inputs. The stricter the withholding threshold, the smaller the share of answers, so the threshold should be set to match the risk the process can tolerate.
The same idea exists in process control. One commercial nonlinear model predictive control product described by Qin et al. (2003) calculated a confidence index for its neural network model in real time. When the input moved beyond the training range and confidence dropped, it gradually turned off the neural network part and relied on the linear model alone. Below is an example of an order for placing such checks before a prescription.
Checks before a prescription
Before answering, first ask "Should I answer?"
- 1Is the current situation familiar?Check whether the input is within the range of past dataFamiliar → nextUnfamiliar → withhold and notify
- 2Is the model confident?Check whether the prediction's uncertainty is below the thresholdConfident → nextUncertain → conservative suggestion or withhold
- 3Offer the prescriptionShown together with the reasoning and confidence levelPrescription
AI does not need to answer every situation. Knowing precisely which situations it can answer is what it takes for AI to be used on the floor.
References
- NeurIPS 2017 (Lakshminarayanan et al.), "Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles" (2016-12-05) ↗
- NeurIPS 2018 (Lee et al.), "A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks" (2018-07-10) ↗
- NeurIPS 2017 (Geifman et al.), "Selective Classification for Deep Neural Networks" (2017-05-23) ↗
- ICLR 2017 (Hendrycks et al.), "A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks" (2016-10-07) ↗
- NeurIPS 2019 (Ovadia et al.), "Can You Trust Your Model's Uncertainty? Evaluating Predictive Uncertainty Under Dataset Shift" (2019-06-06) ↗
- NeurIPS 2017 (Kendall et al.), "What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?" (2017-03-15) ↗
- Control Engineering Practice 2003 (Qin et al.), "A survey of industrial model predictive control technology" ↗
Could this work for your process?
Talk to us