Bayesian Deep Learning
Decompose predictive variance, follow variational inference for neural weights, and distinguish probability calibration from posterior uncertainty.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 2 min
In this article3 chapters
Average predictions over plausible parameters
For training data \(D\), weights \(\theta\) and a numerical target \(Y\), a Bayesian predictive distribution integrates \(p(y\mid x,\theta)\) against the posterior \(p(\theta\mid D)\). The law of total variance at fixed \(x\) gives
\[ \begin{aligned} \operatorname{Var}(Y\mid x,D) ={}&\mathbb E_{\theta\mid D}\operatorname{Var}(Y\mid x,\theta)\\ &+\operatorname{Var}_{\theta\mid D}\mathbb E[Y\mid x,\theta]. \end{aligned} \]
The first term reflects outcome variability according to the likelihood. The second records disagreement between posterior mean predictions. If all plausible fits expect a noisy sensor to vary around the same value, the first can be large and the second small. Far outside the training range, plausible fits may disagree substantially. That conclusion depends on the prior and likelihood admitting such alternatives.
The bias–variance decomposition tracks changes across fitted predictors and outcomes under squared loss. A calibration check instead compares reported probabilities with the outcome frequencies of a specified target population.
Approximate inference shapes the reported uncertainty
Variational inference chooses an approximating distribution \(q(\theta)\) by minimizing the KL divergence to the posterior, commonly expressed as maximizing an evidence lower bound. Factorized approximations can miss posterior dependence and multimodality. Sampling weight configurations from the fitted approximation and averaging predicted probabilities estimates its predictive distribution. The approximate posterior, finite samples and model misspecification are distinct sources of error. Increasing the number of draws addresses the sampling term.
Calibration is an empirical property of a forecast
For a binary forecast, predictions near 0.8 are calibrated on a target population when roughly 80 percent of their events occur. Temperature scaling divides classification logits by a positive fitted constant. It can change confidence without changing their ordering for each example. Validate calibration on data distinct from fitting and check it under relevant shifts. Robust computer vision discusses how shifts and formal robustness guarantees differ. Offline reinforcement learning gives a concrete setting in which an extrapolated estimate can dominate a downstream decision.[1][2][3]