Why is standard test-time weight scaling in dropout only an exact ensemble average for a single linear layer, and how does Monte Carlo (MC) dropout use dropout at inference time to estimate predictive uncertainty?

Deep learning, Regularisation
Level L4 Advanced. Length Medium. Nature Th Theoretical.

What's being asked

Whether you understand the non-linearity gap of standard dropout inference and how stochastic forward passes turn dropout into approximate Bayesian inference.

Key idea

Inverted dropout uses a random Bernoulli mask m (each unit kept with probability p) to form h~=(m⊙h)/p so that Em[h~]=h, making the expected linear pre-activation WEm[h~] equal Em[Wh~]; however, for a non-linear activation ϕ or multi-layer composition, ϕ(E[z])≠E[ϕ(z)]. MC dropout keeps dropout active at test time for T forward passes, averaging outputs and using their spread to measure epistemic uncertainty.

Steps

  1. Where weight scaling is exact: for a single linear layer, linearity of expectation gives Em[W(m⊙h)/p]=Wh, so one deterministic pass equals the average of the sub-networks' pre-activations. For softmax regression it is also exact for the normalised geometric mean of the sub-network predictions.
  2. Where it becomes an approximation: across hidden non-linearities ϕ such as ReLU or tanh⁡, Em[ϕ(W2 ϕ(W1(m⊙x)/p))]≠ϕ(W2 ϕ(W1x)) (Jensen’s inequality / covariance between units), so a single deterministic pass only approximates the 2n sub-network average.
  3. MC dropout procedure: leave dropout masks turned on at test time, run the same input x through the network T times (say T=20–50) with independent masks m(1),…,m(T), and collect predictions y^(1),…,y^(T).
  4. Uncertainty estimation: use the sample mean 1T∑t=1Ty^(t) as the prediction and the sample variance (for regression) or predictive entropy minus expected entropy (mutual information, for classification) as epistemic uncertainty.

Common mistakes

How long your answer should be

Half a page; 4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Deep learning: Excluding the weights and gradients themselves, how much optimiser-state memory per parameter (in fp32) do plain SGD, SGD with momentum and Adam require, and why can SGD with momentum still beat Adam on test accuracy in image classification benchmarks?
Next in Deep learning: For a quadratic loss J(w)=12(w−w∗)⊤H(w−w∗) with symmetric positive definite Hessian H (whose largest eigenvalue is λmax⁡(H)), started at w0=0 with gradient descent step size 0<η<1/λmax⁡(H), how do you show that stopping after t iterations acts approximately like L2 regularisation with penalty λ≈1ηt?