Applying dropout to a neural network amounts to sampling a “thinned” network from it. The thinned network consists of all the units that survived dropout. A neural net with n units can be seen as a collection of 2^n possible thinned neural networks.

Dropout: A Simple Way to Prevent Neural Networks fromOverfitting, pg. 1931.

How are we getting these 2^n models?


The statement is a bit oversimplifying but the idea is that assuming we have $n$ nodes and each of these nodes might be "dropped", we have $2^n$ possible thinned neural networks. Obviously dropping out an entire layer would alter the whole structure of the network but the idea is straightforward: we ignore the activation/information from certain randomly selected neurons and thus encourage redundancy learning and discourage over-fitting on very specific features.

The same idea has also been employed in Gradient Boosting Machines where instead of "ignoring neurons" we "ignore trees" at random (see Rashmi & Gilad-Bachrach (2015) DART: Dropouts meet Multiple Additive Regression Trees on that matter).

Minor edit: I just saw Djib2011's answer. (+1) He/she specifically shows why the statement is somewhat over-simplifying. If we assume that we can drop any (or all, or none) of the neurons we have $2^n$ possible networks.


I too haven't understood their reasoning, I always assumed it was a typo or something...

The way I see it we if we have $n$ hidden units in a Neural Network with a single hidden layer and we apply dropout keeping $r$ of those, we'll have:

$$ \frac{n!}{r! \cdot (n-r)!} $$

possible combinations (not $2^n$ as the authors state).


Assume a simple fully connected neural network with a single hidden layer with 4 neurons. This means the hidden layer will have 4 outputs $h_1, h_2, h_3, h_4$.

Now, you want to apply dropout to this layer with a 0.5 probability (i.e. half of the outputs will be dropped).

Since 2 out of the 4 outputs will be dropped, at each training iteration we'll have one of the following possibilities:

  1. $h_1, h_2$
  2. $h_1, h_3$
  3. $h_1, h_4$
  4. $h_2, h_3$
  5. $h_2, h_4$
  6. $h_3, h_4$

or by applying the formula:

$$ \frac{4!}{2! \cdot (4-2)!} = \frac{24}{2 \cdot 2} = 6 $$

  • 3
    $\begingroup$ I do not think that most implementations of dropout work by saying: If there are 100 neurons, and the probability is 0.05, I have to disable exactly 5 neurons chosen at random. Instead each neuron is disabled with a probability of 0.05, independently of what happens with the rest. Hence, the cases where all or no neurons are disabled, while unlikely, are possible. $\endgroup$ – Daniel López Mar 18 at 14:00
  • 1
    $\begingroup$ @DanielLópez: I think both you and Djib2011 (+1 both) are "factually correct" on this. The statement is clearly oversimplifying things. You also need to take into account that most the networks that this paper is concerned with, have thousands of neurons so certain it is kind of accepted that no layer will be totally switched off. $\endgroup$ – usεr11852 Mar 18 at 14:03
  • 2
    $\begingroup$ Agree, but I believe the above example is transmitting the idea that exactly $n \cdot \text{prob}$ units are disabled with dropout, where $\text{prob}$ is the dropout probability. And this is not how dropout works. $\endgroup$ – Daniel López Mar 18 at 14:09
  • $\begingroup$ Well... LLN is our friend. :) $\endgroup$ – usεr11852 Mar 18 at 14:14
  • $\begingroup$ The flaw with the reasoning presented here is that dropout sets weights to 0 with some fixed probability independently. This implies that the number of zero weights at each step has a binomial distribution, because dropout has the three defining characteristics of a binomial distribution 1 dichotomous outcomes (weights are on or off) 2 fixed number of trials (number of weights in the model doesn't change) 3 probability of success is fixed & independent for each trial. $\endgroup$ – Sycorax Mar 19 at 2:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.