Back to list

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

Inside training data
Outside training data
Examples
Usual raw materials, usual load
New raw material, right after equipment replacement, sensor fault
Accuracy
High
Unknown
Model's attitude
Confident
Often still confident
Desired behavior
Offer a prescription
Withhold the prescription + explain why

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

Typeface characters
92%
Random noise (Gaussian)
91%
Black-and-white object photos
87%
Handwritten characters from other alphabets
86%
Random noise (uniform)
83%
Source: Hendrycks et al. (2017), reconstructed from Table 2

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

Multiple modelsDisagreement among several models
When the models' answers diverge widely, that signals uncertainty
DistanceHow different the current situation is from the data
Detects inputs far from past data
AbstainDo not answer beyond a threshold
A rule to withhold the answer and hand it to a person

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?"

  1. 1
    Is the current situation familiar?Check whether the input is within the range of past data
    Familiar → nextUnfamiliar → withhold and notify
  2. 2
    Is the model confident?Check whether the prediction's uncertainty is below the threshold
    Confident → nextUncertain → conservative suggestion or withhold
  3. 3
    Offer the prescriptionShown together with the reasoning and confidence level
    Prescription

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

Could this work for your process?

Talk to us