Part IX — Deep Learning Regularization, Normalization & Training Dynamics · Chapter 6

Dropout & stochastic depth

Hook

Part II showed that averaging many independent overfit trees beats any single one. What if a single network could get a taste of that same trick, using only itself?

Intuition
0.6-0.41.52.4-0.61.3-0.20.6
this draw's output = 1.50 (true output = 2.92)

Click resample. Each time, a different random half of these neurons goes dark — and the ones that survive get scaled up to compensate. The output jumps around from draw to draw, but it's never systematically off from the true, undropped value.

Formalize

Dropout randomly zeroes each neuron independently with probability pp, then rescales the survivors by 11p\frac{1}{1-p} ("inverted dropout"):

y^=11pikeptvihi\hat y = \frac{1}{1-p}\sum_{i \,\in\, \text{kept}} v_i h_i
  • y^\hat y — this layer's output after dropout is applied.
  • pp — the dropout rate: the probability any given neuron is zeroed out.
  • viv_i — the weight connecting surviving neuron ii to the output.
  • hih_i — surviving neuron ii's activation.
  1. The rescaling keeps the output unbiased

    This isn't arbitrary — it's exactly what keeps the expected value of y^\hat y, averaged over every possible random mask, equal to the true undropped output ivihi\sum_i v_i h_i, for any dropout rate pp at all.

Play
0.6-0.41.52.4-0.61.3-0.20.6
5/8 active — output = 4.71, expected active = 4.8

Drag the rate up and resample. At higher rates, fewer neurons survive each draw and the output swings harder — but the expected active count 8(1p)8(1-p) tells you exactly how many you should expect on average, even though any one draw might have more or fewer.

Worked example
  1. Average many random draws

    Over 200,000 independent draws at p=0.5p=0.5, the mean output lands within about 1% of the true undropped value — confirming the unbiasedness the rescaling is designed to guarantee.

  2. Look at a single draw instead

    Any single draw can differ from the true value by more than the true value's own size: dropout genuinely injects substantial per-step noise.

  3. See why that noise is the point

    A network trained this way can't rely on any specific neuron or fixed combination of neurons always being present, so it's forced to spread what it learns across many redundant paths instead of memorizing through one fragile one.

Checkpoint

Set the dropout rate so the expected number of surviving neurons is 3 out of 8.

0.6-0.41.52.4-0.61.3-0.20.6
expected active = 8.00 — this draw: 8/8 active
Move the rate slider to try it
Summary
y^=11pikeptvihi\hat y = \frac{1}{1-p}\sum_{i \,\in\, \text{kept}} v_i h_i

Dropout doesn't change what a network is capable of representing — it changes what it can afford to rely on during training. Forcing every subset of neurons to be independently useful is, in effect, training a huge implicit ensemble of thinned sub-networks that all share the same weights. Part III's final chapter puts everything from this part together: a full network, trained live, in the browser.