Regularization closes the gap between training and test error: dropout (Srivastava 2014, random unit masking), weight decay (an L2 penalty on the parameters), data augmentation (expand the training distribution), and early stopping (regularize via training time itself).
A network with enough parameters can memorize its training set perfectly and still fail on new data. That gap between training loss and test loss is overfitting. The four techniques here fight it by four different mechanisms: inject noise into training (dropout), penalize large weights directly (weight decay), enlarge the effective training set (augmentation), or simply stop before the model has memorized too much (early stopping).
35.2 The mechanism
35.2.1 Dropout: train with random units missing
Dropout(Srivastava et al., 2014) randomly zeroes each hidden unit with probability \(p\) during training, then rescales the survivors so the expected activation magnitude stays unchanged:
The \(\frac{1}{1-p}\) rescaling is why dropout needs no adjustment at inference: it is simply turned off, and the full network is used as-is. The effect on training is that no single unit can rely on any other specific unit being present, so every unit learns features useful in combination with many different random subsets of the rest of the network. This is what gives dropout its informal description as training an implicit ensemble of subnetworks that share weights.
35.2.2 Weight decay: penalize large weights directly
Weight decay adds a penalty on the squared magnitude of the weights to the loss:
\[
\mathcal{L}_{\text{total}} = \mathcal{L}_{\text{data}} + \lambda \lVert \boldsymbol{\theta} \rVert_2^2, \qquad
\lambda \text{ controls how strongly large weights are punished.}
\]
Smaller weights correspond to a simpler function, one less sensitive to any single input feature, so penalizing weight magnitude biases the optimizer toward simpler solutions. This is the same \(\lambda\theta\) term AdamW decouples from the adaptive gradient scaling; the idea of weight decay predates that correction and is simpler than it.
35.2.3 Data augmentation and early stopping
Two lighter-weight regularizers round out the toolbox.
Data augmentation applies label-preserving transformations to training examples (crop, flip, or rotate an image; back-translate or synonym-swap a sentence) to synthesize more variety without collecting more data. It regularizes by forcing invariance: a network shown the same image cropped ten different ways learns features that don’t depend on the exact crop.
Early stopping monitors validation loss during training and halts once it stops improving, even as training loss keeps falling. It is the cheapest regularizer available, no extra computation, no architecture change, because it is really just running gradient descent for exactly as long as it helps and no longer.
Dropout and augmentation regularize by adding randomness to training; weight decay and early stopping regularize by constraining the optimization itself (the loss landscape or the training duration).
Dropout is turned off at inference, with the \(\frac{1}{1-p}\) rescale already baked into training, the same train/inference asymmetry BatchNorm has in Normalization, for a different reason.
None of these techniques change what the network is capable of representing; they change what it is encouraged to converge to during training.
WarningPitfall: dropout and normalization can conflict
Dropout’s random masking and BatchNorm’s batch statistics can interact badly: dropping units changes the effective batch statistics BatchNorm relies on. Modern architectures normalize with LayerNorm/RMSNorm precisely in the layers that avoid heavy dropout use, side-stepping the interaction rather than resolving it.
35.3 Application & impact
Concept here
What it became
Where you see it today
Dropout
Standard regularizer for dense/RNN layers
Less common in modern Transformers at scale (data volume regularizes instead)
Weight decay
The \(\lambda\theta\) term in every modern optimizer
Standard in vision pipelines; back-translation in NLP
Early stopping
Universal, free regularizer
Every training loop with a validation split
NoteKey takeaway
Regularization is a toolbox, not one technique: each member fights overfitting by a different mechanism (noise, penalty, or restraint). Weight decay is the one that survived essentially unchanged into the LLM era, now living inside the optimizer itself as AdamW’s decoupled term.
Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., & Salakhutdinov, R. (2014). Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1), 1929–1958.