The three pillars lab, session II:
uncertainty you can defend

Session 25 · Mon Nov 30 · Book section 4.5 (§4–5)

🎲

Today’s question

Two ways to get an uncertainty estimate: five training runs, or one.

When your model says 80%, should anyone believe it — and did you check?

Resume at Wednesday’s checkpoint: 4.5 §4–5 · Ch 5 flipped reading assigned today (quiz closes Thu Dec 3)

This lecture in the literature

Deep ensembles: train the same network from several seeds; the disagreement is the uncertainty signal. Today’s expensive contestant.

Lakshminarayanan, B., Pritzel, A., & Blundell, C. (2017). Simple and scalable predictive uncertainty estimation using deep ensembles. NeurIPS 30.

MC dropout: leave dropout on at prediction time and one trained model yields an uncertainty estimate. Today’s cheap contestant.

Gal, Y., & Ghahramani, Z. (2016). Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. ICML.

The audit nobody had run: modern networks state confidences far above their accuracy — miscalibration went unmeasured for years.

Guo, C., Pleiss, G., Sun, Y., & Weinberger, K. Q. (2017). On calibration of modern neural networks. ICML.

📖 The head-to-head under distribution shift: where the ensemble’s documented advantage actually lives — and why our small-MLP verdict differs.

Ovadia, Y., et al. (2019). Can you trust your model’s uncertainty? Evaluating predictive uncertainty under dataset shift. NeurIPS 32.

Both methods are canon. Which one your project needs is a measurement, not a doctrine — today you make it.

Five training runs vs one

test accuracy ECE models trained
Deep ensemble (5 members) 0.949 0.017 5
MC dropout (T = 50 passes) 0.952 0.011 1

ECE, expected calibration error: the average gap between stated confidence and observed accuracy. The 50 dropout passes are the cheap side; training runs are the expensive one.

On this task, the single dropout model matched the 5-member ensemble at a fifth of the training cost. The numbers refuse to crown the expensive method.

Calibration is a measurement, not a method property

An earlier draft of the book claimed the ensemble improves calibration. The measurement said no — on this task there was nothing to fix. “Well calibrated” is a number you attach after running the cell. Synthetic lithology table (mlgeo_synth).

Out of range: does disagreement warn you?

Disagreement flagged 76 of the 77 extrapolation errors. The one silent failure is today’s discussion: its features drifted into a neighboring class’s familiar territory, so all five members confidently agreed — on the wrong label.

Your training distribution is a contract

  • Every number this lab produced is valid inside the ranges the training data covered
  • No diagnostic computed in range certifies behavior out of range
  • State the ranges when you release the model; predictions beyond them are unwarranted until labels say otherwise

The range statement belongs next to the model, in writing — it cannot be inferred from the model’s behavior.

Now run it yourself — resume 4.5 at Section 4

  1. Restart the kernel; rerun the Section 1 setup and helper cells; continue from Section 4
  2. Train the 5-member ensemble, then the MC dropout model; reproduce the head-to-head table
  3. Run the reliability and quintile diagnostics — which question does each answer?
  4. Run the out-of-range experiment; find the silent failure and explain its mechanism
  5. Section 5 sweeps (learning rate, batch size, early stopping) + the six broken runs — diagnose before opening the solution

Wed: forecasting shootout (4.10), leaderboard opens · Ch 5 quiz closes Thu Dec 3 · HW-DL due Fri Dec 4