Dropout is a regularization technique that, during training, randomly sets a fraction of a network's activations to zero at each step, forcing the network to distribute its computation so that no single unit can be relied upon. Introduced by Srivastava, Hinton, and colleagues in 2012 and published in JMLR in 2014, it was one of the default tools of the deep learning era and part of the original Transformer recipe.12 Its later retreat from frontier pretraining, where single-epoch training on trillion-token corpora removed the overfitting it targets, is one of the clearest markers of how the scale era changed training practice.3

Role in the network

Dropout is not a layer with parameters but a training-time modifier applied to activations, conventionally after a nonlinearity or on the output of a whole sublayer. In the original Transformer it appeared at three kinds of site: on the output of each sublayer (attention and feed-forward) before the residual addition and normalization, on the attention weights after the softmax, and on the sums of token and position embeddings, all at a rate of 0.1.2 The pattern carried into BERT and GPT-2-era training.2 The problem it solves is overfitting by co-adaptation: left alone, units in adjacent layers can arrange themselves into fragile partnerships that fit the training set, and randomly deleting units at every step makes such arrangements impossible to sustain.1

The mathematics

In the inverted form that modern frameworks implement, training multiplies the activations elementwise by a fresh binary mask and rescales by the keep probability:

$$y = \frac{x \odot m}{p}, \qquad m_i \sim \mathrm{Bernoulli}(p)$$
Symbol Shape Meaning
\(x\) \(d\) activations of one layer at one position
\(m\) \(d\) binary mask, each entry 1 with probability \(p\), redrawn every step
\(p\) scalar keep probability; the dropout "rate" is \(1 - p\)
\(y\) \(d\) masked, rescaled activations passed onward

At test time the mask is removed and the full network runs unmodified: \(y = x\). The rescaling makes the two regimes agree in expectation. Each mask entry is 1 with probability \(p\), so \(\mathbb{E}[m_i] = p\), and

$$\mathbb{E}[y_i] = \frac{x_i \, \mathbb{E}[m_i]}{p} = \frac{x_i \, p}{p} = x_i$$

that is, expected activation preservation: whatever a unit's value, the training-time average of its masked value equals the clean value the test-time network will see.1 The original formulation instead trained with the unscaled mask and shrank the weights by \(p\) at test time; inverting the scaling so it happens during training leaves inference untouched, which is why the inverted form became the standard implementation.1

Worked example: one masked step

Take \(x = (1, 2, 3, 4)\) with keep probability \(p = 0.5\), and suppose one training step draws the mask \(m = (1, 0, 1, 0)\). The scaled output is

$$y = \frac{x \odot m}{0.5} = (1 \times 2,\ 2 \times 0,\ 3 \times 2,\ 4 \times 0) = (2,\ 0,\ 6,\ 0)$$

so surviving units are doubled and dropped units are gone. The expectation claim is visible on unit three, whose clean value is 3: across many steps it survives half the time, at the doubled level 6, and is zeroed half the time, so its average output is \(0.5 \times 6 + 0.5 \times 0 = 3\), exactly the clean activation. The same holds for every unit, which is what lets the full network run at test time without any correction.

Intuition

The original paper's explanation is co-adaptation: a hidden unit that always sees the same neighbors can specialize into a detector that works only in their company, and such partnerships generalize poorly. Zeroing units at random means every feature must be useful in many different contexts, which pushes the network toward individually robust features.1 The second reading is ensemble averaging. A layer of \(d\) units has \(2^{d}\) possible masks, so every training step optimizes a different thinned subnetwork drawn from an exponential family of weight-sharing networks, and the unmodified test-time network approximates averaging the whole family's predictions.1 Dropout is thus cheap ensembling: no extra parameters, no separately trained models, and the committee collapses into one weight set at test time by construction.

Variants and extensions

DropConnect drops individual weights rather than activations, masking entries of the weight matrices instead of the units; it reported gains on vision benchmarks but never displaced activation dropout in practice.4 Variational dropout adapts the idea to recurrent networks by drawing one mask per sequence and reusing it at every time step, which keeps the recurrent dynamics consistent while still regularizing.5 MC dropout leaves dropout active at test time and reads the spread of predictions across sampled masks as an approximate Bayesian uncertainty estimate, a trick used well beyond language modeling.6 Within Transformers, the applied variants are named by site: residual dropout on sublayer outputs, attention dropout on the softmax weights, and embedding dropout on the input sums.2

Adoption

Dropout was one of the default tools of the deep learning era: it underpinned the 2012 convolutional breakthroughs on ImageNet, spread through every framework, and entered the Transformer recipe in 2017 at rate 0.1 across sublayer outputs, attention weights, and embedding sums.12 BERT and GPT-2-era models trained with it as a matter of course.2 Its retreat tracks the data regime. Dropout fights overfitting, and overfitting receded as a concern when pretraining moved to corpora so large that models see most tokens only once. In the single-epoch, trillion-token regime documented by the scaling-law literature and the compute-optimal analyses that followed,3 many frontier training runs omit dropout entirely. The technique persists where data remains limited: in fine-tuning smaller models, and in domains outside web-scale text. Repeated-epoch training on smaller curated corpora, common in academic replication studies, likewise retains it as a guard against memorization.

Limitations and critiques

Dropout charges for its insurance in optimization. Each update sees a different thinned network, so convergence takes more steps than the equivalent deterministic network, and the original paper's practical guidance is to compensate with larger networks, higher learning rates, and strong momentum.1 The deeper critique is that the disease it treats is optional at scale: when the corpus is large enough that the model never revisits tokens, there is little memorization to prevent, and dropout's gradient noise mainly taxes fitting, which is the position most frontier pretraining runs have arrived at.3 Its protection is also statistical rather than structural: dropout discourages co-adaptation on average, but any single training step can still settle into the fragile configurations the mask is meant to prevent, which is part of why rate tuning mattered in the multi-epoch era.

History

Dropout appeared in 2012 work by Srivastava, Hinton, Krizhevsky, Sutskever, and Salakhutdinov on preventing the co-adaptation of feature detectors, and was consolidated in the Journal of Machine Learning Research in 2014, which added the ensemble interpretation and results across vision, speech, and text benchmarks.1 DropConnect followed in 2013,4 and the recurrent and Bayesian readings arrived in 2015 and 2016.56 Vaswani et al. built dropout into the Transformer at rate 0.1 in June 2017,2 and it remained standard through BERT and the GPT-2 era.2 The compute-optimal analyses of 2022 documented the single-epoch, trillion-token regime in which its purpose evaporates, and dropout quietly left the frontier pretraining recipe.3

See also

References


  1. Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R., "Dropout: A Simple Way to Prevent Neural Networks from Overfitting," Journal of Machine Learning Research 15, 2014 (arXiv:1207.0580). ↩↩↩↩↩↩↩↩↩

  2. Vaswani, A., et al., "Attention Is All You Need," arXiv:1706.03762, June 2017. ↩↩↩↩↩↩↩↩

  3. Hoffmann, J., et al., "Training Compute-Optimal Large Language Models," arXiv:2203.15556, March 2022. ↩↩↩↩

  4. Wan, L., Zeiler, M., Zhang, S., LeCun, Y., and Fergus, R., "Regularization of Neural Networks using DropConnect," Proceedings of the 30th International Conference on Machine Learning, 2013. ↩↩

  5. Gal, Y., and Ghahramani, Z., "A Theoretically Grounded Application of Dropout in Recurrent Neural Networks," arXiv:1512.05287, December 2015. ↩↩

  6. Gal, Y., and Ghahramani, Z., "Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning," arXiv:1506.02142, June 2015. ↩↩