ElemedexA pocket encyclopedia of AI architectures

Glossary (TM) › Training and tuning

TM120

Dropout

Also: dropout regularization

In Spanish: Dropout

A regularization technique that randomly switches off a fraction of a network's units during training so that it cannot rely on coincidences among them.

Dropout, proposed by Hinton and his students in Toronto (Srivastava et al., 2014), is one of the most widely used techniques against overfitting. At every training step, each unit in a layer is set to zero with some probability, the dropout rate, usually between 0.2 and 0.5 (Chollet, 2021, sec. 5.4.4):

layer output: [0.2 · 0.5 · 1.3 · 0.8 · 1.1] → with dropout: [0 · 0.5 · 1.3 · 0 · 1.1]

At inference time nothing is switched off; instead, activations are rescaled to compensate for the fact that they now all work together (in practice, the rescaling is usually done during training). This is why libraries explicitly distinguish "training" mode from "use" mode (Chollet, 2021, sec. 7.4.1).

Why does breaking the network on purpose help? Hinton said he was inspired by his bank: the tellers kept changing, and he concluded it was so that no group of employees could cooperate to defraud it. Switching off a different random subset of neurons on each example prevents such "conspiracies," that is, happenstance patterns the network would memorize if nothing disturbed them (Chollet, 2021, sec. 5.4.4). Another reading: a network with n units and dropout behaves like an ensemble of 2ⁿ smaller networks that share parameters, averaged at the end (Witten et al., 2017, p. 436).

The base model of the original Transformer applied dropout at a rate of 0.1 to the output of every sub-layer (Vaswani et al., 2017, sec. 5.4), and InstructGPT's supervised fine-tuning used 0.2 (Ouyang et al., 2022, sec. 3.5). The idea connects with an old connectionist thesis: in a distributed representation no node is indispensable, and the system degrades gracefully instead of breaking. Dropout turns that robustness into a discipline imposed during learning: it forces every useful feature to be represented in more than one way.

Sources

  • Chollet, F. (2021). Deep learning with Python (2nd ed.). Manning Publications. §
  • Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P. F., Leike, J., & Lowe, R. (2022). Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems (Vol. 35, pp. 27730–27744). Curran Associates. https://doi.org/10.52202/068431-2011 §
  • 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(56), 1929–1958. https://jmlr.org/papers/v15/srivastava14a.html §
  • Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems (Vol. 30). Curran Associates. https://proceedings.neurips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html §
  • Witten, I. H., Frank, E., Hall, M. A., & Pal, C. J. (2017). Data mining: Practical machine learning tools and techniques (4th ed.). Morgan Kaufmann. https://doi.org/10.1016/C2015-0-02071-8 §