Stochasticity and Uncertainty › Aleatoric and Epistemic Uncertainty

Michael BrenndoerferJune 23, 20268 min read
World Models HandbookAll chapters
Part 4 of 12Space, Physics, and Causality
Chapter 23Stochasticity and Uncertainty › Aleatoric and Epistemic Uncertainty
Reading section 3 of 11 · Aleatoric and Epistemic Uncertainty · 8 minSection 3 of 11 · 8 min

Book contents

Section 3 of 11 · 8 min read

Stochasticity and Uncertainty › Aleatoric and Epistemic UncertaintyOne section · Sections in this chapter3 / 11 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The literature splits uncertainty into two categories, and the distinction does real work once you start designing and debugging world models. It is not taxonomic decoration. It determines what you do next when a model misbehaves, what kind of data you collect, and what guarantees you can claim.

Aleatoric uncertainty

Aleatoric uncertainty is the conditional spread that remains for a specified state, action, and information set, even if the conditional transition law is known. Collecting more repetitions in the same representation can estimate that spread more precisely but does not remove it.

Epistemic uncertainty

Epistemic uncertainty comes from limited knowledge: finite or uninformative data, uncertain parameters, model-class restrictions, or inputs for which the model has not been validated. It can shrink when informative data and suitable assumptions identify the relevant aspects of the model; more data or capacity alone does not guarantee that result.

The terms trace to Latin alea, a game of dice or chance, and Greek episteme, knowledge. The practical distinction is conditional: for a known fair coin, another flip remains fifty-fifty however many earlier flips we observe, while uncertainty about an unknown bias can shrink as informative flips accumulate.

We can make this concrete with the coin itself. The figure below shows the posterior density over an unknown bias after observing ten flips and after one hundred more, computed with a uniform prior. In this construction, the posterior becomes more concentrated around the observed frequency. What shrinks is uncertainty about the bias; conditional on a fixed bias pp, a new flip remains Bernoulli(p)(p).

In[5]:
Code
import matplotlib.pyplot as plt
import numpy as np

## Deterministic Beta posteriors over the coin bias with a uniform (Beta(1,1)) prior.
## No random sampling: the densities are exact. Selection rule is fixed:
## the first dataset has 5 heads in 10 flips, the second adds 52 heads in 100 flips.
coin_grid = np.linspace(0.001, 0.999, 500)


def beta_pdf(x, a, b):
    from math import lgamma

    lognorm = lgamma(a + b) - lgamma(a) - lgamma(b)
    return np.exp(lognorm + (a - 1) * np.log(x) + (b - 1) * np.log(1 - x))


pdf_10 = beta_pdf(coin_grid, 1 + 5, 1 + 5)  # 10 flips, 5 heads
pdf_110 = beta_pdf(coin_grid, 1 + 57, 1 + 53)  # 110 flips, 57 heads
Out[6]:
Visualization
Two Beta posterior densities over coin bias, broad after 10 flips and narrow after 110
Posterior density over a coin's bias after 10 flips (broad) and 110 flips (concentrated). Epistemic uncertainty about the bias shrinks with data, while conditional on any fixed bias p, a new flip remains Bernoulli(p).

In a Bayesian treatment, the conditional transition and parameter posterior are factors in the posterior-predictive integrand; marginalizing their product yields the predictive distribution. Let θ\theta denote the parameters of a transition model pθ(st+1∣st,at)p_\theta(s_{t+1} \mid s_t, a_t), and let D\mathcal{D} be the collected transition data. Rather than one model, Bayes maintains a posterior over models, weighting each parameter setting by how well it explains the observed data:

p(θ∣D)  ∝  p(D∣θ) p(θ)p(\theta \mid \mathcal{D}) \;\propto\; p(\mathcal{D} \mid \theta)\, p(\theta)

where:

  • θ\theta: the parameters of the transition model
  • D\mathcal{D}: the collected transition data
  • p(D∣θ)p(\mathcal{D} \mid \theta): the likelihood, how well parameters θ\theta explain the observed transitions
  • p(θ)p(\theta): the prior belief over parameters before seeing data
  • ∝\propto: proportionality, the normalizing constant p(D)p(\mathcal{D}) is omitted because it does not depend on θ\theta

The posterior combines the likelihood, which scores how well each parameter setting predicts the observations, with the prior. Under identifiability, suitable regularity, an adequate model, and informative data, the posterior can concentrate as data accumulate. Misspecification, weak identification, or redundant observations can preserve prior sensitivity and multiple plausible parameter settings.

The posterior predictive distribution over next states marginalizes over that posterior:

p(st+1∣st,at,D)=∫p(st+1∣st,at,θ) p(θ∣D) dθp(s_{t+1} \mid s_t, a_t, \mathcal{D}) = \int p(s_{t+1} \mid s_t, a_t, \theta)\, p(\theta \mid \mathcal{D})\, d\theta

where:

  • p(st+1∣st,at,θ)p(s_{t+1} \mid s_t, a_t, \theta): the within-model predictive distribution at fixed θ\theta; calling its residual spread aleatoric assumes θ\theta and the conditioning variables contain the learnable structure relevant to that distinction
  • p(θ∣D)p(\theta \mid \mathcal{D}): the posterior weight given to that model given the data
  • dθd\theta: the integration runs over all plausible parameter settings

The intuition is a weighted average: each candidate model contributes its own prediction, weighted by its posterior plausibility. The inner term carries within-model predictive spread, while the outer integral carries uncertainty across parameter settings. With enough informative data and an identifiable, adequate model, the posterior may concentrate. Where information is weak, a sound uncertainty method may widen if its plausible models predict differently; strong shared priors or a collapsed approximation can instead remain narrow.

For a scalar next state, or componentwise for a vector state, the predictive variance decomposes exactly by the law of total variance:

Var[st+1∣st,at,D]=Eθ ⁣[σθ2(st,at)]⏟expected within-model variance+Varθ ⁣[μθ(st,at)]⏟between-model mean variance.\begin{aligned} \mathrm{Var}[s_{t+1} \mid s_t, a_t, \mathcal{D}] &= \underbrace{\mathbb{E}_{\theta}\!\left[\sigma^2_\theta(s_t, a_t)\right]}_{\text{expected within-model variance}} + \underbrace{\mathrm{Var}_{\theta}\!\left[\mu_\theta(s_t, a_t)\right]}_{\text{between-model mean variance}}. \end{aligned}

where:

  • Var[st+1∣st,at,D]\mathrm{Var}[s_{t+1} \mid s_t, a_t, \mathcal{D}]: the total predictive variance under the posterior predictive distribution
  • Eθ[⋅]\mathbb{E}_{\theta}[\cdot]: expectation taken over the posterior p(θ∣D)p(\theta \mid \mathcal{D})
  • σθ2(st,at)\sigma^2_\theta(s_t, a_t): the within-model conditional variance predicted by model θ\theta at this state and action
  • Varθ[⋅]\mathrm{Var}_{\theta}[\cdot]: variance across models, again under the posterior
  • μθ(st,at)\mu_\theta(s_t, a_t): the mean prediction of model θ\theta

For a full vector-state covariance, use Cov(Y)=Eθ[Cov(Y∣θ)]+Covθ(E[Y∣θ])\mathrm{Cov}(Y)=\mathbb{E}_\theta[\mathrm{Cov}(Y\mid\theta)]+\mathrm{Cov}_\theta(\mathbb{E}[Y\mid\theta]).

The first term averages each model's own conditional variance, and the second measures disagreement among conditional means. The law of total variance guarantees that this split of predictive variance is exact. The second term captures parameter uncertainty in the conditional mean, not every parameter-driven difference: θ\theta can also affect conditional variance or distributional shape, and variance alone cannot encode all shape uncertainty. If every plausible model made the same mean prediction, the variance of the means would be zero even when the models differed in other aspects of their predictive distributions.

This decomposition is more than bookkeeping. It tells you what different diagnostics measure. A single heteroscedastic model at fixed parameters estimates within-model conditional variance. Spread among ensemble means approximates the between-model mean-variance term. Together those terms characterize total predictive variance under the stated hierarchy, not the full predictive uncertainty distribution. Conflating the diagnostics still causes predictable mistakes: a model trained with a homoscedastic Gaussian head reports the same confidence everywhere, including in regions it has never seen, and an ensemble with deterministic members reports zero uncertainty about the amount of noise in a contact event even when its members disagree wildly about where the object will land. Each diagnostic is blind to the uncertainty the other one sees.

A useful diagnostic habit: when a world model behaves badly, ask which kind of uncertainty it may be missing. If it averages over distinct outcomes, a richer output family such as mixtures, latent variables, or diffusion sampling may address a representational failure. If it is confidently wrong in a new regime, ensembling, Bayesian inference, or active data collection may expose or reduce model uncertainty. These are candidate remedies to validate, not categorical diagnoses. The remedies differ, and we will cover both. Misdiagnosis wastes effort in a characteristic way: adding mixture components to a model whose problem is epistemic produces a model that is confidently wrong in a richer format, and adding ensemble members to a model whose problem is aleatoric averaging produces several models that all average over the same impossible middle.

One honest caveat: the boundary between the two categories is drawn relative to your state representation and model class. Friction that you have not modeled shows up as aleatoric noise at your level of description, but a richer model with a friction parameter would move it into the epistemic column, where more data helps. The coin with the unknown bias is aleatoric at the level of "flip outcomes given a fixed bias model" and epistemic at the level of "outcomes given that the bias itself is a parameter to be inferred." As we discussed in the chapter on causal models and interventions, deciding what counts as exogenous randomness is itself a modeling choice. Apparent aleatoric uncertainty can be latent structure waiting to be found, and discovering that structure is one way world models improve over an agent's lifetime. The practical discipline this suggests is to treat fundamental irreducibility as a hypothesis to be tested rather than a fact to be assumed. If a source can be predicted from an observable you are not yet using, it remains aleatoric relative to the current information set but is not fundamentally irreducible; adding the observable changes the information set and can reduce the residual spread.