Dropout › The Dropout Mask
Language AI HandbookAll chapters Dropout › The Dropout MaskOne section · Sections in this chapter4 / 19 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
During a training forward pass, dropout applies a binary mask to the neurons in a layer. Each element of the mask is sampled independently:
where:
- : the mask value for neuron (either 0 or 1)
- : the dropout probability (probability of dropping, i.e., setting to zero)
- : the probability that neuron is kept active (the "keep probability" or "retention rate")
The masked output of the layer is then:
where:
- : the output of neuron after applying dropout
- : the pre-dropout activation of neuron
The mask is resampled independently for every training example in every mini-batch. This means two examples in the same batch see different network architectures. Over the course of training, this continuous resampling trains all subnetworks simultaneously.
An important subtlety is the timing of mask application relative to the activation function. Dropout is typically applied to the output of the activation function, not to the pre-activation values. If applied before the activation, the scaled values would pass through a nonlinearity and produce a different distribution than the intended behavior. Applying dropout to post-activation values zeroes the contribution of a neuron entirely, which cleanly corresponds to removing that neuron from the computation.
The independence of masks across neurons within a layer is also important. If you dropped neurons in correlated groups, some co-adapted patterns might survive even under heavy dropout (because the neurons they depend on tend to be dropped or kept together). Independent sampling ensures that any co-adapted pair is disrupted with probability , where the first term is the probability both are dropped and the second is that both survive. For , both survive with probability 0.25, meaning 75% of forward passes disrupt any given pair. This is the key pressure against co-adaptation.