AI Glossary / Deep learning / Intermediate
Dropout
Definition
Dropout is a neural-network regularization technique that randomly suppresses selected activations during training. By training with changing subsets of active units or features, it can reduce reliance on particular combinations and help limit overfitting. Ordinary dropout is usually disabled for standard inference. Its usefulness depends on the model, data, placement, and dropout rate; it is not a universal guarantee of better generalization.
What it means
During a training step, a dropout mask determines which selected values contribute to the next computation. The mask changes across applications according to the implementation. Suppressed activations are temporarily set to zero; their underlying parameters are not permanently deleted. The network is trained to perform despite this stochastic disruption. This differs from pruning, which deliberately removes or zeros components to produce a changed model structure or sparse representation.
How it works
In common inverted dropout, each affected activation is dropped with probability p and retained with probability 1 minus p. Retained values are divided by 1 minus p during training so their expected value, conditional on the original activation, is preserved. During ordinary evaluation, the layer passes values through without this random mask. Other dropout variants use different mask structures, such as dropping whole channels. Training and evaluation modes must therefore be set correctly, and the meaning of the rate must be checked because some descriptions use retention probability instead.
Three practical examples
- Dense classifiers: dropout can regularize hidden representations when a model tends to fit training examples more closely than unseen data.
- Sequence models: architecture-specific dropout arrangements may be used around recurrent or attention components, with care about how masks affect temporal information.
- Model comparisons: researchers vary dropout rates within a controlled validation process to assess whether the technique improves the intended evaluation metric.
Think of it this way
Think of rehearsing a presentation with different team members temporarily unavailable, encouraging the remaining team to cover essential work. The analogy captures reduced reliance on one contributor. It does not mean a network learns human teamwork, and removing too many contributors can make the task harder rather than improve it.
Worked example
Suppose an activation vector is [2, 4, 6, 8] and the dropout probability is 0.25. The retention probability is 0.75, so retained values are multiplied by 1/0.75, approximately 1.3333. For one illustrative mask [1, 0, 1, 1], inverted dropout produces approximately [2.667, 0, 8, 10.667]. This particular mask drops one of four values, but independent random masks do not guarantee exactly 25% are dropped in every small vector.
For the original activation 4, the dropped output is zero with probability 0.25 and 4/0.75 with probability 0.75. Its expected output is therefore 0.25 times zero plus 0.75 times 4/0.75 = 4. This preserves the activation's expectation, not necessarily the expectation of every later nonlinear network output. In ordinary evaluation mode, this dropout layer returns [2, 4, 6, 8]. These calculations illustrate the layer's operation; they do not establish a model-accuracy improvement.
Illustrative case study
In a fictional image-classification project, a team sees unstable evaluation scores even when it uses the same saved weights and test images. It discovers that dropout remains in training mode during evaluation. After correcting the mode, the team separately compares models trained with different dropout rates using the same validation protocol. The case distinguishes an implementation mistake from the question of whether dropout is a useful regularizer for that task.
Common misconceptions and mistakes
Dropout does not permanently remove neurons, and it does not automatically make inference faster. A rate of 0.5 means dropping half the affected values on average when p denotes dropout probability, not retaining half with certainty in every batch. Excessive dropout can impair fitting. Preserving expected activations does not make stochastic training exactly equivalent to evaluating every possible subnetwork. Deliberately retaining dropout for uncertainty-related methods is a separate procedure and does not automatically yield calibrated uncertainty.
Business use
Consider dropout as one option for improving generalization, alongside suitable data, model capacity, regularization, and validation. Compare its effect on held-out data rather than assuming lower training accuracy is beneficial. Record its rate, placement, and mask variant. Ensure deployment uses the intended evaluation behavior. If stochastic inference is deliberately used, specify how repeated outputs are combined and validate the resulting uncertainty measures. A model's operational reliability depends on the whole training and evaluation process, not on the presence of a dropout layer.
People also ask
Is dropout active during ordinary inference?
Usually no; standard evaluation disables its random suppression.
Does dropout change the learned weights to zero permanently?
No. Ordinary dropout temporarily suppresses activations during training.
Is a larger dropout rate always better?
No. Too much suppression can reduce useful learning, and the appropriate setting depends on the task and architecture.
Check your understanding
Why are retained values divided by 0.75 when the dropout probability is 0.25?
Answer: Each value survives with probability 0.75. Dividing retained values by that probability preserves the expected activation under the random mask.
Related terms
- Regularization
- Overfitting
- Activation
- Pruning
- Monte Carlo dropout
- Bernoulli mask
- inverted dropout
- training mode
- evaluation mode
Learn next
Trace inverted dropout on a short vector and calculate the expectation of one component. Then compare training and evaluation behavior in a small model, and evaluate dropout rates using a consistent held-out validation protocol.
More in Deep learning
- Depthwise separable convolutional neural network - A depthwise separable convolutional neural network is a convolutional network that uses depthwise separable convolutions as important building blocks.
- Differentiable neural computer - A differentiable neural computer, or DNC, is a memory-augmented neural architecture that combines a neural controller with an external, addressable memory.
- Digital cloning
- Echo State Network - An echo state network, or ESN, is a recurrent neural-network approach in which a dynamic reservoir transforms input sequences into internal states and a...
- Efficiently updatable neural network - An efficiently updatable neural network, commonly called NNUE, is an architecture designed to reuse computations when successive inputs change only slightly.
- ELU Function - The ELU function, short for exponential linear unit, is a neural-network activation function that is linear for positive inputs and follows a saturating...
Sources
Srivastava and colleagues, original dropout journal paper: https://jmlr.org/papers/v15/srivastava14a.html PyTorch, dropout behavior and scaling: https://docs.pytorch.org/docs/stable/generated/torch.nn.modules.dropout.Dropout.html PyTorch, training and evaluation modes in optimization: https://docs.pytorch.org/tutorials/beginner/basics/optimization_tutorial.html
Previous: Drift (tracking) Next: Dropping conditions