Uncertainty quantification

Also known as: UQ

On this page 7

Uncertainty quantification (UQ) is the systematic estimation of how much a model’s predictions can be trusted, expressed as probability distributions, intervals or calibrated confidence scores rather than single point values. Within probabilistic models and artificial intelligence more broadly, UQ turns a bare prediction into a statement such as “the value lies between 12 and 18 with 90 percent probability”.

UQ matters wherever decisions carry asymmetric costs: medical diagnosis, autonomous driving, credit scoring, engineering simulation and scientific discovery. A model that is accurate on average but overconfident on unfamiliar inputs can cause more harm than a weaker model that knows when to abstain.

Sources of uncertainty in machine learning

Uncertainty quantification starts by separating where uncertainty comes from, because each source calls for a different remedy. The two classic categories are aleatoric uncertainty, which comes from inherent noise in the data, and epistemic uncertainty, which comes from limited knowledge about the model itself.

The table below summarizes the main sources and whether additional data can reduce them.

SourceOriginReducible with more data
Aleatoric uncertaintyMeasurement noise, class overlap, randomnessNo
Epistemic uncertaintyLimited training data, unknown parametersYes
Model misspecificationWrong functional form or likelihoodOnly by changing the model
Distribution shiftTest data differ from training dataPartly, with representative data
Main sources of predictive uncertainty

In practice the categories overlap. Total predictive variance can often be decomposed with the law of total variance into an expected data noise term and a term that reflects disagreement between plausible models, which is how many Bayesian and ensemble methods report the two components separately.

Methods for uncertainty quantification

UQ methods differ in how they represent uncertainty and in how much computation they require. Bayesian approaches place a posterior distribution over parameters, ensemble approaches approximate that distribution with several independently trained models, and frequentist approaches such as conformal prediction give coverage guarantees without a prior.

MethodUncertainty capturedRelative costMain limitation
Gaussian processEpistemic and aleatoricHigh for large datasetsCubic scaling in data size
Bayesian neural networkMainly epistemicHighApproximate inference can underfit
Deep ensemblesEpistemic and aleatoricSeveral training runsMemory and compute multiply
Monte Carlo dropoutApproximate epistemicLowOften underestimates uncertainty
Laplace approximationLocal epistemicLow to moderateAssumes a Gaussian posterior
Conformal predictionMarginal coverageLowNo conditional guarantee per input
Common UQ methods compared

Sampling-based inference such as Markov chain Monte Carlo gives the most faithful posterior for small and medium models, while variational inference trades some accuracy for speed. For large neural networks, deep ensembles remain a strong practical baseline because they are simple to implement and robust under distribution shift.

Aleatoric uncertainty is usually modeled through the output layer rather than the parameters. A regression network can predict both a mean and a variance and be trained with a Gaussian negative log-likelihood, which lets the noise level vary across inputs. This heteroscedastic setup is cheap and combines naturally with ensembles, which then supply the epistemic component.

Calibration and evaluation of uncertainty

An uncertainty estimate is useful only if it is well calibrated, meaning that events predicted with 80 percent confidence occur about 80 percent of the time. Evaluation therefore checks both the sharpness of predictive distributions and their agreement with observed outcomes.

The following metrics are the standard tools for this assessment, and each answers a slightly different question.

MetricWhat it measuresBetter value
Expected calibration errorGap between confidence and accuracyLower
Negative log-likelihoodQuality of the full predictive distributionLower
Brier scoreSquared error of predicted probabilitiesLower
Interval coverageShare of outcomes inside prediction intervalsClose to nominal level
AUROC for out-of-distribution detectionAbility to flag unfamiliar inputsHigher
Metrics for evaluating uncertainty estimates

Modern deep networks are frequently overconfident after standard training. Post-hoc techniques such as temperature scaling adjust confidence scores on a held-out validation set and often reduce calibration error substantially without changing accuracy.

Calibration measured on in-distribution validation data says little about behavior on new populations. A rigorous evaluation therefore repeats the metrics on deliberately shifted test sets, such as data from another site, season or sensor, and reports how quickly calibration degrades as the shift grows. Reliability diagrams make this degradation visible at a glance.

Using uncertainty in decisions

The value of UQ appears when predictions feed into decision rules. A system can route uncertain cases to human experts, request more data, widen safety margins or refuse to act. This pattern is called selective prediction or prediction with a reject option.

SituationRecommended approachReason
Small tabular datasetGaussian process or full Bayesian modelExact or near-exact posterior is affordable
Large deep networkDeep ensemblesStrong accuracy and calibration
Fixed pretrained modelConformal prediction or temperature scalingNo retraining needed
Active learning loopEpistemic uncertainty estimateTargets data that reduce ignorance
Safety-critical deploymentEnsembles plus conformal intervalsCombines robustness with coverage
Choosing a UQ approach by situation

In active learning and Bayesian optimization, epistemic uncertainty directly guides which experiment or label to acquire next. In forecasting, prediction intervals communicate risk to planners who need ranges rather than single numbers.

Limitations and common misconceptions

Uncertainty quantification is itself an approximation and can fail silently. Every method rests on assumptions about the prior, the likelihood or the exchangeability of data, and when those assumptions break, reported uncertainty may look reasonable while being systematically wrong.

  • A softmax probability is not a calibrated confidence unless calibration has been verified.
  • Low uncertainty does not guarantee correctness under strong distribution shift.
  • Conformal coverage is marginal, so some subgroups may receive much worse coverage.
  • Uncertainty about uncertainty is rarely reported, although estimates from small validation sets are noisy.

Practitioners should therefore validate UQ on realistic shifted data, report the assumptions behind each estimate and treat calibration as an ongoing monitoring task rather than a one-time property of a model.

A non-technical view

Uncertainty quantification means a model says how sure it is, not only what it thinks. A weather forecast that says 70 percent chance of rain does exactly this.

Some doubt comes from the world being random. Some comes from the model not having seen enough examples. The second kind shrinks with more data. The first kind does not. A good system admits when it does not know and asks a person for help.

A concrete example

A hospital radiology department uses a deep learning model to flag possible lung nodules on chest CT scans. The team trains an ensemble of five networks and measures disagreement between them on each scan. After temperature scaling, the expected calibration error on a held-out set falls from 0.09 to 0.03.

The department sets a rule: when the ensemble’s predictive entropy exceeds a chosen threshold, the scan goes straight to a senior radiologist. About 12 percent of scans are routed this way. During a six-month review, most missed findings in an earlier pilot came from scanners the model had never seen, and the new setup flagged these unfamiliar scans as uncertain, so specialists reviewed them before any report was issued.