Paper commentary
Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning
Dropout can be read as Bayesian inference, giving neural networks cheap uncertainty estimates
- Problem Standard networks give one prediction per input, so their softmax outputs look confident even far from the training data. Bayesian models show uncertainty but cost too much to compute.
- Method The authors reinterpret dropout training as approximate Bayesian inference in deep Gaussian processes. At test time, dropout stays on and the network runs several stochastic passes, whose spread gives the uncertainty.
- Results On Boston Housing, MC dropout scored 2.97 test RMSE, compared to 3.01 for PBP.
Why point estimates hide uncertainty
Standard regression and classification networks return one prediction per input, and nothing in that output shows how unsure the model is. In classification the softmax probability is often read as confidence, yet a model can be uncertain even when its softmax output is high.
Take a point estimate of a function and pass it through a softmax: far from the training data, the output looks certain. The example point x* lies far from the data, and if the function's own uncertainty is ignored, x* is assigned to class 1 with probability 1. If the spread of the function is kept and passed through the softmax, the output shows much wider uncertainty for such points.
Bayesian modelling gives this kind of uncertainty, but its computational cost is heavy. Bayesian neural networks place distributions over the weights, which guards against over-fitting but needs costly inference. Variational methods have been tried on these networks with limited success, and newer approximations double the parameter count for a given network size.
So the gap lies between uncertainty that is principled and uncertainty that a standard dropout network could supply cheaply.
Dropout as an approximate posterior
The key idea is that dropout's random masks can be read as samples from an approximate distribution over the weights. Read this way, dropout training fits that distribution to the posterior of a deep Gaussian process, without changing the model or the optimisation. The authors expect this to hold because each layer of a deep Gaussian process can be mapped onto a layer of explicitly represented hidden units.
Each weight matrix is treated as random, and the approximating distribution q(ω) sets whole columns of each matrix to zero at random. \[ W_i = M_i \cdot \operatorname{diag}\big([z_{i,j}]_{j=1}^{K_{i-1}}\big), \quad z_{i,j} \sim \mathrm{Bernoulli}(p_i) \] Here M_i is a variational parameter, and a zero in z_{i,j} removes unit j of layer i-1 as an input to layer i.
The correlations this induces across the rows of each matrix make q(ω) highly multi-modal.
Training minimises the KL divergence between q(ω) and the posterior of the full deep Gaussian process. After Monte Carlo estimation and rescaling, this objective matches the usual dropout cost with L2 weight decay, for suitable choices of precision and length-scale. The same argument covers the authors' statement that no simplifying assumptions are made about how dropout is used in practice.
The authors note that the results carry over to other variants such as drop-connect and multiplicative Gaussian noise.
Reading uncertainty from stochastic passes
The trained network is left unchanged, and at test time dropout stays on while T stochastic forward passes are run, each with freshly sampled Bernoulli masks. The average of these passes estimates the predictive mean. \[ \mathbb{E}_{q(y^*|x^*)}(y^*) \approx \frac{1}{T}\sum_{t=1}^{T} \hat{y}^*(x^*, W^t_1,\dots,W^t_L) \]
The precision is tied to the weight decay: with prior length-scale l, dropout probability p and N data points, τ equals p l^2 divided by 2Nλ. \[ \tau = \frac{p\,l^2}{2N\lambda} \]
The predictive log-likelihood is a log-sum-exp over the T passes, where each term scores the observed output against one pass. Because the passes are independent, they can run concurrently, so the cost matches standard dropout inference.
Extrapolation on the CO2 series
The networks were trained on the left part of a Mauna Loa CO2 series of about 200 points and tested on the full series, which probes extrapolation. Standard dropout, which averages weights and gives no uncertainty, serves as the first comparison, and a Gaussian process is the second.
At the marked point far from the data, standard dropout predicts 0 with high confidence, even though that is clearly not a sensible value. The Gaussian process widens its predictive uncertainty there instead, and MC dropout reproduces that widening. So even when the mean is wrong, the wider spread tells a reader that the model doesn't know.
For the ReLU network the uncertainty keeps growing far from the data, whereas for the TanH network it stays bounded. The authors link this to covariance functions, since TanH saturates and ReLU does not. The plots use 1000 passes, but the authors say far fewer, such as 10, already give a reasonable mean and uncertainty.
Softmax confidence on rotated digits
The authors trained LeNet on the full MNIST dataset, with dropout probability 0.5 applied before its last fully connected inner-product layer. They then ran 100 stochastic forward passes over a continuously rotated image of the digit 1, and scattered both the softmax input and the softmax output.
Taking the class with the largest softmax input, the predictions are class 1 for the first five images, class 5 for the next two and class 7 for the rest. For the leftmost image the uncertainty envelope of its class sits far from the others, so the prediction is made with high confidence.
For the middle image the envelopes overlap, and the softmax output uncertainty can span the entire output space even when the mean output is high. The authors conclude that the model should ask an external annotator for such an input, and that entropy or variation ratios could quantify this.
Regression against PBP and VI
The setup follows Hernández-Lobato and Adams, comparing dropout with Probabilistic Back-propagation (PBP) and a variational inference method (VI) on UCI regression datasets. Dropout probabilities of 0.05 and 0.005 were used, because the networks have 50 units and the datasets are small. Each number averages 20 random splits, except Protein Structure with 5 splits and Year Prediction MSD with 1 split, and the RMSE comes from averaging MC passes.
On Boston Housing, MC dropout scored 2.97 test RMSE, compared to 3.01 for PBP, and a log-likelihood of -2.46, compared to -2.57. On Concrete Strength the RMSE falls from 5.67 for PBP to 5.23 for dropout. Across the listed datasets, dropout's log-likelihood is higher than PBP's on every one, and its RMSE is equal or lower except on Yacht Hydrodynamics.
So a plain dropout network, with uncertainty read from its passes, matched or beat the specialised baselines in this table.
VI trails both, with a Boston Housing RMSE of 4.32.
With dropout probability 0, the Boston RMSE rose to 3.07 and the log-likelihood fell to -2.59, so the test-time averaging and the dropout rate both matter. The authors also report that training for 10 times more epochs than in Table 1 gave a clear gain in both RMSE and log-likelihood.
Thompson sampling in a reinforcement learning task
The agent has 9 eyes and chooses one of 5 actions to drive two motors, rewarded for reaching red circles and penalised for green ones. The original Q-network is compared with a copy that uses dropout at probability 0.1 before every weight layer, and both share one network structure.
The dropout version doesn't need epsilon greedy; it makes one stochastic forward pass per action, which is a Thompson sampling step. In replay, the sampled Bernoulli variables are reused in the backward pass.
Thompson sampling reached reward above 1 within 25 batches after burn-in, while epsilon greedy took 175 batches to reach the same level. The reward comparison is a plotted curve of average reward against batch count, read at these two points.
The dropout approach seems to stop improving after about 1K batches, which the authors attribute to still sampling random moves while epsilon greedy exploits. So the evidence concerns how quickly learning starts, not a final score.
Limitations
The 40-iteration Bayesian optimisation runs stopped before the dropout model converged, so they only indicate whether a parameter setting is good. The final models were then trained for 10 times as many iterations as the search used.
Only Bernoulli dropout is analysed in depth, and variants such as drop-connect are left to follow-up work. The regression comparisons use networks of 50 units, and the architecture was not adapted to uncertainty.
The reinforcement learning network was deliberately kept small, and the authors say a real use would need a larger model. The classification study reports scatter plots and no summary number, while entropy and variation ratios are suggested but not reported. An earlier version scaled one standard error up by a factor of 4.5, and the error was corrected in this version.
Paper info
- Authors
- Yarin Gal, Zoubin Ghahramani
- Venue
- arXiv · Preprint
- First published
- 2015-6-6
- Added
- 2026-11-11
- Updated
- 2016-10-4
- Version
- v6
- arXiv
- 1506.02142
- Category
- stat.ML · cs.LG
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Yarin Gal, Zoubin Ghahramani (2015). Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. arXiv:1506.02142v6. https://arxiv.org/abs/1506.02142v6
BibTeX
@misc{gal2015dropout,
title = {{Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning}},
author = {Yarin Gal and Zoubin Ghahramani},
year = {2015},
eprint = {1506.02142},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1506.02142v6}
}