The Implicit and Explicit Regularization Effects of Dropout

Colin Wei, Sham M. Kakade, Tengyu Ma

Abstract

Dropout is a widely-used regularization technique, often required to obtain state-of-the-art for a number of architectures. This work demonstrates that dropout introduces two distinct but entangled regularization effects: an explicit effect (also studied in prior work) which occurs since dropout modifies the expected training objective, and, perhaps surprisingly, an additional implicit effect from the stochasticity in the dropout training update. This implicit regularization effect is analogous to the effect of stochasticity in small mini-batch stochastic gradient descent. We disentangle these two effects through controlled experiments. We then derive analytic simplifications which characterize each effect in terms of the derivatives of the model and the loss, for deep neural networks. We demonstrate these simplified, analytic regularizers accurately capture the important aspects of dropout, showing they faithfully replace dropout in practice.

Introduction

Dropout is one of the most ubiquitous regularization techniques in deep learning, essential for training robust models that generalize well to unseen data. Traditionally, theorists have focused on dropout's explicit regularization effect: how randomly zeroing out neurons changes the expected training objective, effectively smoothing the loss landscape.

However, in practice, we do not optimize this expected loss. Instead, we sample a random dropout mask at every training step, which injects stochasticity (noise) into the optimizer's gradient updates. This paper argues that this noise is not a bug but a feature, providing an implicit regularization effect similar to the noise in small mini-batch SGD. By disentangling these two effects, the authors provide a more complete mathematical picture of why dropout works.

Disentangling the Effects

To separate the explicit and implicit effects, the authors introduced a technique called Dropout_k. Instead of using a single random mask per step, they sample $k$ independent masks, average their gradients, and then update the model. As $k$ increases, the stochastic noise (the implicit effect) is averaged out toward zero, while the expected training objective (the explicit effect) remains the same.

Training and validation perplexity on PTB and WikiText-2 for varying k. Increasing k reduces training noise (lowering training perplexity) but degrades validation performance, highlighting the crucial role of the implicit regularization effect.

Experiments on the Penn Treebank (PTB) and WikiText-2 datasets revealed a clear trend: as $k$ increases and noise is removed, training perplexity drops significantly, but validation perplexity rises. This confirms that the implicit noise in standard dropout ($k=1$) is vital for preventing overfitting and ensuring generalization.

Mathematical Characterization

Using Taylor expansions, the authors derived analytical approximations for both effects:

  • Explicit Regularizer: A deterministic penalty added to the loss function that forces the network's hidden layers to be stable against small perturbations. This penalty is weighted by the Hessian of the loss, meaning it applies the strongest regularization where the model is most uncertain.
  • Implicit Regularizer: A specific distribution of mean-zero gradient noise that can be artificially injected into the optimizer to mimic the randomness of dropout.

Key Results

The authors validated their theory by attempting to "fix" low-noise models. By taking Dropout_32 (which performs poorly due to lack of noise) and injecting their mathematically derived gradient noise back into the optimizer, they were able to recover the performance of standard dropout.

Validation perplexity on PTB and WikiText-2. Adding the derived noise back to a low-noise Dropout_4 model (magenta) recovers the performance of standard Dropout_1 (blue), whereas Dropout_4 without noise (green) performs significantly worse.

Furthermore, by combining their analytical explicit regularizer with their derived implicit noise model, the authors were able to completely replace standard dropout with a deterministic mathematical equivalent. On the PTB dataset, this math-only approach achieved a validation perplexity of 72.99, slightly outperforming standard dropout's 73.76.

Conclusion

This research demonstrates that dropout's success relies on a dual mechanism: a stability-inducing change to the loss landscape and a specific form of gradient noise. While the analytical versions currently have higher computational overhead due to Jacobian calculations, they provide a principled blueprint for designing next-generation regularizers that are more interpretable and potentially more efficient than random sampling.

Summary updated

BibTeX
@inproceedings{wei2020implicit,
  author = {Colin Wei and Sham M. Kakade and Tengyu Ma},
  title = {{The Implicit and Explicit Regularization Effects of Dropout}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
}
Figure