Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed
Deep Reinforcement Learning · Lecture 47 of 99 · 17:08
Lecture 11, Part 3: Estimating Epistemic Uncertainty with Neural Networks
Study guide
What this lecture covers
Following Part 2's argument that uncertainty-aware planning helps model-based RL, this part addresses how to actually get calibrated model uncertainty out of a neural network dynamics model. It distinguishes two kinds of uncertainty and works through two practical techniques: Bayesian neural networks and bootstrap ensembles.
After watching, you'll be able to explain why the entropy of a model's output distribution is the wrong signal for model uncertainty, define the difference between aleatoric and epistemic uncertainty, and describe how bootstrap ensembles approximate a posterior over model parameters in practice.
Key ideas
- Naive idea (and why it fails): using the entropy of a network's own output distribution (Gaussian variance or softmax logits) as "uncertainty" doesn't work, because an overfit model can be highly confident and completely wrong on out-of-distribution inputs.
- Aleatoric (statistical) uncertainty: irreducible randomness in the true function itself, such as the outcome of a dice roll; it doesn't shrink with more data.
- Epistemic (model) uncertainty: uncertainty about which model is correct, arising from limited data; it shrinks as more data is collected, and it's the kind relevant to safe planning.
- Parameter posterior: instead of a single best-fit parameter
theta, estimate a distributionp(theta | D)and integrate (average) predictions over it to capture epistemic uncertainty. - Bayesian neural networks: place a distribution over every weight (commonly approximated as independent Gaussians per weight) instead of a single value, then sample networks from this distribution to get a posterior over predictions.
- Bootstrap ensembles: train multiple independent networks and treat their disagreement as an uncertainty estimate; mathematically this approximates the parameter posterior as a mixture of Dirac deltas centered at each network's parameters.
- Practical simplification: resampling training data with replacement for each ensemble member is theoretically motivated but often unnecessary in practice — different random initialization and SGD noise alone tend to produce sufficiently diverse models.
Walkthrough
Why output entropy is the wrong signal (0:00)
The lecture first shows why a plausible-seeming shortcut — using the variance or entropy that a neural net already outputs as its predictive distribution — fails as an uncertainty measure. An overfit model can predict a near-zero variance (high confidence) at training points while being completely wrong at nearby test points, because this entropy reflects how noisy the model thinks the dynamics are, not how uncertain we should be about the model itself.
Two types of uncertainty (3:22)
The lecture draws the key distinction between aleatoric uncertainty (irreducible randomness in the true dynamics, like a dice roll) and epistemic uncertainty (uncertainty about which model is correct, which shrinks with more data). Epistemic uncertainty is what matters for cautious planning in the cliff-edge and mountain-climbing examples from earlier, and it requires estimating a distribution over model parameters theta rather than a single point estimate.
Bayesian neural networks (7:32)
The lecture sketches the high-level idea of Bayesian neural networks: place a distribution (often independent Gaussians as a tractable approximation) over each weight, then sample whole networks from this distribution to get a posterior over predictions. It notes this requires variational inference machinery covered later in the course, and points to papers on weight uncertainty and concrete dropout for further reading.
Bootstrap ensembles (10:55)
As a simpler and often better-performing alternative, the lecture presents bootstrap ensembles: train several independent models and use their disagreement as an uncertainty signal. This formally approximates the parameter posterior as a mixture of Dirac deltas, one per ensemble member — meaning predictions should be combined as a mixture of distributions, not by averaging predicted means. The bootstrap idea of resampling the training set with replacement per model is explained, along with the practical note that this resampling often isn't necessary for deep networks.
Before you watch
- Watch Lecture 11, Parts 1 and 2 first, since this part builds directly on the cliff-edge uncertainty motivation and the HalfCheetah performance gap discussed there.
- Basic familiarity with Gaussian and softmax output distributions, as used elsewhere in the course, is assumed.
Check your understanding
- Why does a network's own predicted variance fail as a measure of epistemic uncertainty?
- Give an example each of aleatoric and epistemic uncertainty, and explain why only one of them shrinks with more data.
- What does it mean to "integrate out theta" when making a prediction, and why is this normally intractable for neural networks?
- How does a bootstrap ensemble approximate the parameter posterior, and why should predictions be mixed rather than averaged as means?
- Why does the lecture say resampling with replacement is often unnecessary when training a bootstrap ensemble of deep networks?
Vocabulary
- epistemic uncertainty (phrase)
- Uncertainty about which model is correct, caused by limited data.
Epistemic uncertainty shrinks as we collect more data. - aleatoric uncertainty (phrase)
- Randomness that is naturally part of the true process, not caused by lack of data.
A dice roll has irreducible aleatoric uncertainty. - calibrated (adjective)
- Matching real-world frequencies accurately, not too confident or too unsure.
We want calibrated uncertainty estimates from the model. - entropy (noun)
- A measure of how spread out or uncertain a probability distribution is.
The output entropy doesn't measure model uncertainty correctly. - out-of-distribution (adjective)
- Different from the kind of data a model was trained on.
The model can be wrong on out-of-distribution inputs. - irreducible (adjective)
- Impossible to remove or reduce further.
Aleatoric uncertainty is irreducible randomness. - posterior (noun)
- The updated belief about a value after seeing data.
We estimate a posterior distribution over model parameters. - integrate out (phrase)
- To average a quantity over all its possible values, weighted by probability.
We integrate out theta to make a prediction. - intractable (adjective)
- Too difficult or costly to compute exactly.
Computing the true posterior is usually intractable. - Bayesian neural network (noun)
- A neural network where each weight has a distribution instead of one fixed value.
Bayesian neural networks place a distribution over every weight. - variational inference (phrase)
- A technique that approximates a hard-to-compute distribution with a simpler one.
Bayesian neural nets typically use variational inference. - bootstrap ensemble (phrase)
- A group of independently trained models whose disagreement signals uncertainty.
A bootstrap ensemble approximates the parameter posterior. - disagreement (noun)
- How much different models give different predictions on the same input.
We use the ensemble's disagreement as an uncertainty signal. - Dirac delta (phrase)
- A distribution concentrated entirely at a single point.
The ensemble approximates the posterior as a mixture of Dirac deltas. - resampling (noun)
- Drawing a new dataset from an existing one, allowing repeats.
Resampling with replacement is used for classic bootstrapping. - initialization (noun)
- The starting values given to a model's parameters before training.
Different random initialization alone can produce diverse models. - diverse (adjective)
- Varied, showing meaningful differences from each other.
SGD noise helps produce sufficiently diverse models. - sketch (an idea) (verb)
- To describe something briefly, without full detail.
The lecture sketches the high-level idea of Bayesian nets. - concrete dropout (phrase)
- A technique that randomly removes network units to estimate uncertainty.
Concrete dropout is a further-reading topic on uncertainty. - plausible-seeming (adjective)
- Looking reasonable or believable at first glance.
This plausible-seeming shortcut turns out to fail.
Chapters
- 0:00 Introduction
- 0:11 UncertaintyAware Neural Network Models
- 5:22 Uncertainty Estimation
- 7:32 Bayesian Neural Networks
- 10:55 bootstrap ensembles
- 15:52 training bootstrap ensembles
← Lecture 11, Part 2: Why Model-Based RL Underperforms, and Uncertainty · Lecture 11, Part 4: Planning with Uncertainty-Aware Models →
