<p>Dropout is a recently introduced algorithm to prevent co-adaptation during training (overfitting). The key idea is to randomly drop units, along with their connections from a neural network during training. Routhly each element of a layer's output is kept with probability p, otherwise it's being set to 0.</p>

<p>For more information see:</p>

<ul class="task-list">
<li>Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, Ruslan R. Salakhutdinov, "Improving neural networks by preventing co-adaptation of feature detectors", 2012</li>
<li>Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, Ruslan Salakhutdinov, "Dropout: A Simple Way to Prevent Neural Networks from Overfitting", 2014</li>
</ul>

<p>A simple way to implement the technique is to introduce a new function which creates a dropOutMask. Afterwards, we can multiply the dropOutMask with the inputActivation in all layers which should support dropout. Something like:</p>

<pre><code>// dropout
if dropoutFraction &gt; 0
{
    ActivationFunction::fn(inputActivation * dropOutMask, outputActivation);
}
else
{
    ActivationFunction::fn(inputActivation, outputActivation);
}
</code></pre>

<p>DropConnect is a generalization of Dropout that takes the idea a step further. Rather than zeroing each unit activations with probability p, it zeroes the weights/connections with probability p.</p>

<p>For more information see:</p>

<ul class="task-list">
<li>Li Wan, Matthew Zeiler, Sixin Zhang, Yann Le Cun, Rob Fergus, "Regularization of Neural Networks using DropConnect", 2013</li>
</ul>

<p>The idea to implement the technique is similar, except that we need to introduce the feature to all connections which should support dropConnect. The modified code should look something like:</p>

<pre><code>// dropConnect
if dropConnectFraction &gt; 0
{
    outputLayer.InputActivation() += (weights * dropOutMask * input);
}
else
{
    outputLayer.InputActivation() += (weights * input);
}
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/413">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMWj_9Ni2BTnS_42BzOTL2zjfzJbks5nwy97gaJpZM4DnsRC.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/413"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>