TL;DR
When a model predicts something, its uncertainty comes from two places. Aleatoric uncertainty is randomness in the world, such as the noise in a measurement, which stays even if you had the true model. Epistemic uncertainty is doubt about the model itself, which shrinks as you collect more data. Together they make up the total spread of the prediction, and a good system reports both so it knows when to act and when to ask for help.
Builds on: Posterior Predictive Distribution, Mutual Information, Gaussian (Normal) Distribution, Entropy · Leads to: Uncertainty Quantification, Bayesian Neural Network
Where it's used
Active learning. A team labels images for a classifier but can afford only a few hundred labels out of a huge pool. Bayesian Active Learning by Disagreement, introduced by Houlsby and colleagues in 2011, picks the unlabelled images on which the model's members disagree most, because labelling those teaches the model the most. Labels spent on images that are genuinely ambiguous, which carry only aleatoric uncertainty, are wasted.
Self-driving perception. A perception model that has never seen an unusual object, such as an animal on a highway, should report high epistemic uncertainty about it. Kendall and Gal showed in 2017 how to train vision models that report both kinds of uncertainty, and why the two matter differently: aleatoric uncertainty is high where object boundaries are inherently ambiguous, and epistemic uncertainty flags unfamiliar scenes.
Screening candidate molecules. Chemists use models to predict properties of molecules they have not yet made. A prediction with high epistemic uncertainty tells them the model is extrapolating, so the next experiment should test that region. This is a common practice in computational chemistry, and it turns the model's doubt into a plan.
How it works
Take one input and three ensemble members, each a network trained slightly differently. Each member predicts a mean and a noise variance for an output . This walkthrough uses one input and round numbers.
-
Read off each member's prediction. The members give means , , and , and each says the noise variance is . Check: each member gives a mean and a noise level, so three pairs in total.
-
Average the means. The combined prediction is . Check: this is the centre of the prediction the ensemble makes.
-
Average the noise. Each member has noise variance , so the average is . This is the aleatoric part: every member agrees that the world is noisy by this much. Check: no amount of averaging over members removes it.
-
Measure how much the members disagree. The deviations of the means from are , , and . Their squares average to . This is the epistemic part: the members disagree about the model, not about the world. Check: if all three means were equal, this number would be zero.
-
Add the two parts. The total variance is . Check: this matches the spread of the mixture of the three predictive curves, as the plot shows.
-
Read the answer. About 30 percent of the spread () is model disagreement, which more data could shrink. The rest is noise that more data cannot remove.
The plot shows the three members as separate bell curves, and the mixture of all three as the ensemble's predictive distribution. The mixture is wider than any single member, and the extra width is the epistemic part.
- member 1, mean 2.0
- member 2, mean 2.4
- member 3, mean 1.6
- ensemble mixture
The math
For an input and parameters with posterior after training data , the prediction is the posterior predictive distribution . Its variance splits exactly into two terms:
Here and are the mean and variance over the parameter values, weighted by the posterior.
In words: the aleatoric term averages the noise each parameter setting predicts, and the epistemic term measures how much the settings disagree about the mean.
Step 1 in symbols: the aleatoric term
For a fixed parameter value , the noise is . The expectation over averages it. Even with the true known, this term remains, so it cannot be removed by more data.
Step 2 in symbols: the epistemic term
For each the model has a predicted mean . The variance of those predicted means across the posterior is the epistemic term. This is the law of total variance: the total variance of equals the average within- variance plus the variance of the within- means. As the data grows, the posterior concentrates on the parameters that explain the data, and this term shrinks toward zero.
Step 3 in symbols: estimating with samples
In practice the posterior is replaced by samples , from an ensemble, dropout masks, or a variational approximation. Write and . Then
These are the numbers used in the walkthrough.
Step 4 in symbols: classification with entropy
For a classifier whose members output class probabilities , the same split holds with Entropy in place of variance. The average prediction has total entropy , and
The first term is the average entropy of each member, the aleatoric part. The second term is the mutual information between the label and the parameters, which is large exactly when the members disagree with one another.
Worked examples
Two members predict means and , each with noise variance .
- Average the means: .
- Aleatoric part: average of the noise variances, .
- Epistemic part: the squared deviations are and , and their average is .
- Total: .
- Check by direct computation: the mixture has mean and, since each component adds its own variance and the means are away from , its variance is .
Interpretation: half the spread is noise and half is disagreement. Training on more data would pull the two members toward the same mean and cut the second half.
Three members give the probability that an input belongs to class "yes": , , . Measure entropy in bits.
- Average prediction: .
- Total entropy: bit, the most uncertain a yes or no answer can be.
- Entropy of each member: bits, and bit, and bits.
- Average member entropy: bits, which is the aleatoric part.
- Mutual information: bits, which is the epistemic part.
Interpretation: the members are confident one at a time but disagree strongly, so about 35 percent of the one-bit uncertainty is disagreement that more data can address.
A team has three unlabelled images in a pool and can afford one label. Their ensemble gives these epistemic scores, in bits: image A , image B , image C . The scores are a hypothetical pool with round numbers, but the procedure is the one used in practice.
- Compute each image's epistemic score from the members, as in Example 2.
- Rank the images: B first (), then C (), then A ().
- Label image B. Its high score means the members disagree most there, so the new label should move them together.
- Interpretation: image A is already well understood, and labelling it would teach the model little. Image C is somewhat uncertain, but not as much.
Try it: an image gets member probabilities , , and . Compute its epistemic score and say how much of its uncertainty is aleatoric. Answer: the members agree, so the mutual information is bits, and all of the one bit of uncertainty is aleatoric. No label will help, because the image itself is a coin flip.
Common mistakes and tradeoffs
It is tempting to think that high agreement among members means the prediction is right. In fact members can agree on a wrong answer, for example when an unusual input looks similar to the training data for every member. Low epistemic uncertainty is a signal that the members share a belief, not a guarantee that the belief is true.
It is tempting to think that more data removes all uncertainty. In fact the aleatoric part is the noise that stays even with the true model, such as the randomness of a coin flip or the measurement error in a sensor. Only the epistemic part shrinks as the data grows.
It is tempting to think a single network's softmax confidence is the uncertainty. In fact a single network gives one set of probabilities that mixes both kinds of doubt, and it is often overconfident on inputs far from its training data. Separating the two needs several parameter settings, through an ensemble, dropout samples, or a Bayesian method.
It is tempting to think the split is clean in practice. In fact the estimates depend on how many members or samples you use, on the model family, and on how well the approximation captures the posterior. With few members, the mutual information is noisy.
When to use it: when a decision depends on whether the model knows enough to answer, such as deferring a case to a person, choosing data to label, or monitoring for unfamiliar inputs. When not to use it: when you only need a point prediction and cannot afford several passes or members, since the cost grows with the number of samples.
| Method | How it gets samples | Strength | Weakness |
|---|---|---|---|
| Deep ensembles | Train several networks from different starts | Simple, strong in practice | Costs several times the training |
| MC dropout | Keep dropout on and sample many passes | No retraining | Approximate, sensitive to dropout rate |
| Bayesian neural network | Model a distribution over every weight | Principled | Harder to train and to scale |
| Single network with a variance output | Predict a noise level directly | One pass | Captures only aleatoric uncertainty |
History
Bayesian treatments of neural networks go back to the early 1990s, when David MacKay and Radford Neal showed how to put a probability distribution over the weights and integrate over it. The computations were heavy, so the idea stayed mostly in research. The distinction between the two kinds of uncertainty is older still. In engineering risk analysis, researchers used the terms aleatory and epistemic for decades, and Der Kiureghian and Ditlevsen asked in 2009 whether the distinction changes decisions.
Deep learning made the question urgent. Blundell and colleagues showed in 2015 that weights can be learned as distributions, and Gal and Ghahramani showed in 2015 that ordinary dropout approximates a Bayesian model. Lakshminarayanan and colleagues showed in 2016 that a plain ensemble gives strong uncertainty estimates. In 2017 Kendall and Gal trained vision models that report both kinds of uncertainty, which made the split a common tool.
Recap
- Total predictive uncertainty is the sum of aleatoric uncertainty (noise) and epistemic uncertainty (model doubt).
- The aleatoric part is the average noise each parameter setting predicts, and it stays with more data.
- The epistemic part is how much the parameter settings disagree, and it shrinks as data grows.
- For classifiers the split is entropy minus average member entropy, which equals the mutual information between the label and the parameters.
- Use the epistemic part to decide when the model should ask for help or for more data.
Read next: Uncertainty Quantification for the wider toolkit, and Bayesian Neural Network for the model that defines the split most cleanly.
Check yourself
QuestionIn one sentence, what is the difference between aleatoric and epistemic uncertainty, and which one shrinks with more training data?Show answer
Aleatoric uncertainty is randomness in the world, the noise that remains even with the true model. Epistemic uncertainty is doubt about the model's parameters, and it is the part that shrinks as the data grows, because the posterior concentrates on the parameters that explain the data.
QuestionTwo members predict means 4 and 6, each with noise variance 2. What are the aleatoric, epistemic and total variances?Show answer
The average mean is . The aleatoric part is the average noise variance, . The epistemic part is the average squared deviation, . The total is .
QuestionWhy can an ensemble that agrees on a wrong answer still be useful, and what does its agreement not tell you?Show answer
The agreement shows the members share a belief, so the model is not uncertain about its own parameters on that input. It does not show the belief is right: if all members are wrong in the same way, the epistemic term is small and the prediction is still wrong. Agreement is evidence about the model's confidence in itself, not a check against the truth.
QuestionA classifier's three members give probabilities 0.2, 0.2, and 0.2 for a yes answer on a new input. Is more data likely to change the prediction, and why?Show answer
Probably not much. The members agree, so the mutual information is zero and the uncertainty is aleatoric. The true probability of yes looks like about 0.2 for every member, so more data about the model will not change the picture; only data about the world, such as better measurements, could.