Difference between revisions of "Feedforward backpropagation"

From Eyewire
Jump to: navigation, search
Line 45: Line 45:
 
We first define an error term which is the cross-entropy of the output and target. We use cross-entropy because, in a sense, each output neuron represents a hypothesis about what the input represents, and the activation of the neuron represents a probability that the hypothesis is correct.
 
We first define an error term which is the cross-entropy of the output and target. We use cross-entropy because, in a sense, each output neuron represents a hypothesis about what the input represents, and the activation of the neuron represents a probability that the hypothesis is correct.
  
<center><math>E = -\sum_{j=1}^{N_O} t_j \ln y_{Oj} + \left ( 1-t_j \right ) \ln \left (1 - y_{Oj} \right )</math></center>
+
[[File:FfBp13.png|center]]
  
 
The lower the cross entropy, the more accurately the network represents what needs to be learned.
 
The lower the cross entropy, the more accurately the network represents what needs to be learned.
Line 51: Line 51:
 
Next, we determine how the error changes based on changes to an individual weight from hidden neuron to output neuron:
 
Next, we determine how the error changes based on changes to an individual weight from hidden neuron to output neuron:
  
<center><math>\begin{align}
+
[[File:FfBp14.png|center]]
\frac{\partial E }{\partial w_{Oij}} &= \frac{\partial E }{\partial y_{Oj}} \frac{\mathrm{d} y_{Oj} }{\mathrm{d} n_{Oj}} \frac{\partial n_{Oj}}{\partial w_{Oij}} \\
+
&= - \left [ \frac{t_j}{y_{Oj}} - \frac{1-t_j}{1-y_{Oj}} \right ] \frac{\mathrm{d} \varphi }{\mathrm{d} n_{Oj}} y_{Hi} \\
+
&= - \left [ \frac{t_j}{y_{Oj}} - \frac{1-t_j}{1-y_{Oj}} \right ] \varphi \left ( n_{Oj} \right ) \left ( 1 - \varphi \left ( n_{Oj} \right ) \right )  y_{Hi} \\
+
&= - \left [ \frac{t_j}{y_{Oj}} - \frac{1-t_j}{1-y_{Oj}} \right ] y_{Oj} \left ( 1-y_{Oj} \right ) y_{Hi} \\
+
&= \left ( y_{Oj} - t_j \right ) y_{Hi}
+
\end{align}</math></center>
+
  
We then want to change <math>w_{Oij}</math> slightly in the direction which reduces <math>E</math>, that is, <math>\Delta w_{Oij} \propto - \partial E / \partial w_{Oij}</math>. This is called ''gradient descent''.
+
We then want to change [[File:FfBp7.png]] slightly in the direction which reduces <em>E</em>, that is, [[File:FfBp15.png]]. This is called ''gradient descent''.
  
<center><math>\begin{align}
+
[[File:FfBp16.png|center]]
\Delta w_{Oij} &= - \eta \left ( y_{Oj} - t_j \right ) y_{Hi} \\
+
&= \eta \left ( t_j - y_{Oj} \right ) y_{Hi} \\
+
&= \eta \delta_{Oj} y_{Hi}
+
\end{align}</math></center>
+
  
 
We do the same thing to find the update rule for the weights between input and hidden neurons:
 
We do the same thing to find the update rule for the weights between input and hidden neurons:
  
<center><math>\begin{align}
+
[[File:FfBp17.png|center]]
\frac{\partial E }{\partial w_{Hij}} &= \frac{\partial E }{\partial y_{Hj}} \frac{\mathrm{d} y_{Hj} }{\mathrm{d} n_{Hj}} \frac{\partial n_{Hj}}{\partial w_{Hij}} \\
+
&= \left ( \sum_{k=1}^{N_O} \frac{\partial E }{\partial y_{Ok}} \frac{\mathrm{d} y_{Ok} }{\mathrm{d} n_{Ok}} \frac{\partial n_{Ok}}{\partial y_{Hj}} \right ) \frac{\mathrm{d} y_{Hj} }{\mathrm{d} n_{Hj}} \frac{\partial n_{Hj}}{\partial w_{Hij}} \\
+
&= \left ( \sum_{k=1}^{N_O} \left ( y_{Ok} - t_k \right ) w_{Ojk} \right ) \frac{\mathrm{d} \varphi }{\mathrm{d} n_{Hj}} x_i \\
+
&= \left ( \sum_{k=1}^{N_O} \left ( y_{Ok} - t_k \right ) w_{Ojk} \right ) y_{Hj} \left ( 1 - y_{Hj} \right ) x_i \\
+
&= \left ( \sum_{k=1}^{N_O} - \delta_{Ok} w_{Ojk} \right ) y_{Hj} \left ( 1 - y_{Hj} \right ) x_i
+
\end{align}</math></center>
+
  
We then want to change <math>w_{Hij}</math> slightly in the direction which reduces <math>E</math>, that is, <math>\Delta w_{Hij} \propto - \partial E / \partial w_{Hij}</math>:
+
We then want to change [[File:FfBp8.png]] slightly in the direction which reduces <em>E</em>, that is, [[File:FfBp18.png]]:
  
<center><math>\begin{align}
+
[[File:FfBp19.png|center]]
\Delta w_{Hij} &= - \eta \left ( \sum_{k=1}^{N_O} - \delta_{Ok} w_{Ojk} \right ) y_{Hj} \left ( 1 - y_{Hj} \right ) x_i \\
+
&= \eta \left ( \sum_{k=1}^{N_O} \delta_{Ok} w_{Ojk} \right ) y_{Hj} \left ( 1 - y_{Hj} \right ) x_i \\
+
&= \eta \delta_{Hj}  x_i
+
\end{align}</math></center>
+
  
 
== Objections ==
 
== Objections ==
Line 89: Line 69:
 
While mathematically sound, the feedforward backpropagation algorithm has been called biologically implausible due to its requirements for neural connections to communicate backwards.<ref><em>Backpropagation: Theory, Architectures, and Applications</em>. Chauvin, Yves; Rumelhart, David E. (1995). Lawrence Erlbaum Associates, Inc. ISBN 0805812598</ref>
 
While mathematically sound, the feedforward backpropagation algorithm has been called biologically implausible due to its requirements for neural connections to communicate backwards.<ref><em>Backpropagation: Theory, Architectures, and Applications</em>. Chauvin, Yves; Rumelhart, David E. (1995). Lawrence Erlbaum Associates, Inc. ISBN 0805812598</ref>
  
== References =
+
== References ==
 
<references/>
 
<references/>
  
 
[[Category: Neural computational models]]
 
[[Category: Neural computational models]]

Revision as of 15:58, 24 June 2014

Feedforward backpropagation is an error-driven learning technique popularized in 1986 by David Rumelhart (1942-2011), an American psychologist, Geoffrey Hinton (1947-), a British informatician, and Ronald Williams, an American professor of computer science.[1] It is a supervised learning technique, meaning that the desired outputs are known beforehand, and the task of the network is to learn to generate the desired outputs from the inputs.

Model

Model of a neuron. j is the index of the neuron when there is more than one neuron. The activation function for feedforward backpropagation is sigmoidal.


Given a set of k-dimensional inputs with values between 0 and 1 represented as a column vector:

Error creating thumbnail: Unable to save thumbnail to destination

and a nonlinear neuron with (initially random, uniformly distributed between -1 and 1) synaptic weights from the inputs:

Error creating thumbnail: Unable to save thumbnail to destination

then the output of the neuron is defined as follows:

Error creating thumbnail: Unable to save thumbnail to destination
where
Error creating thumbnail: Unable to save thumbnail to destination
is a sigmoidal function. We will assume that the sigmoidal function is the simple logistic function:
Error creating thumbnail: Unable to save thumbnail to destination

This function has the useful property that

Error creating thumbnail: Unable to save thumbnail to destination


Feedforward backpropagation is typically applied to multiple layers of neurons, where the inputs are called the input layer, the layer of neurons taking the inputs is called the hidden layer, and the next layer of neurons taking their inputs from the outputs of the hidden layer is called the output layer. There is no direct connectivity between the output layer and the input layer.

If there are
Error creating thumbnail: Unable to save thumbnail to destination
inputs,
Error creating thumbnail: Unable to save thumbnail to destination
hidden neurons, and
Error creating thumbnail: Unable to save thumbnail to destination
output neurons, and the weights from inputs to hidden neurons are
Error creating thumbnail: Unable to save thumbnail to destination
(i being the input index and j being the hidden neuron index), and the weights from hidden neurons to output neurons are
Error creating thumbnail: Unable to save thumbnail to destination
(i being the hidden neuron index and j being the output neuron index), then the equations for the network are as follows:
Error creating thumbnail: Unable to save thumbnail to destination


If the desired outputs for a given input vector are
Error creating thumbnail: Unable to save thumbnail to destination
, then the update rules for the weights are as follows:
Error creating thumbnail: Unable to save thumbnail to destination
where η is some small learning rate,
Error creating thumbnail: Unable to save thumbnail to destination
is an error term for output neuron j and
Error creating thumbnail: Unable to save thumbnail to destination
is a backpropagated error term for hidden neuron j.

Derivation

We first define an error term which is the cross-entropy of the output and target. We use cross-entropy because, in a sense, each output neuron represents a hypothesis about what the input represents, and the activation of the neuron represents a probability that the hypothesis is correct.

Error creating thumbnail: Unable to save thumbnail to destination

The lower the cross entropy, the more accurately the network represents what needs to be learned.

Next, we determine how the error changes based on changes to an individual weight from hidden neuron to output neuron:

Error creating thumbnail: Unable to save thumbnail to destination
We then want to change
Error creating thumbnail: Unable to save thumbnail to destination
slightly in the direction which reduces E, that is,
Error creating thumbnail: Unable to save thumbnail to destination
. This is called gradient descent.
Error creating thumbnail: Unable to save thumbnail to destination

We do the same thing to find the update rule for the weights between input and hidden neurons:

Error creating thumbnail: Unable to save thumbnail to destination
We then want to change
Error creating thumbnail: Unable to save thumbnail to destination
slightly in the direction which reduces E, that is,
Error creating thumbnail: Unable to save thumbnail to destination
:
Error creating thumbnail: Unable to save thumbnail to destination

Objections

While mathematically sound, the feedforward backpropagation algorithm has been called biologically implausible due to its requirements for neural connections to communicate backwards.[2]

References

  1. Rumelhart, David E.; Hinton, Geoffrey E.; Williams, Ronald J. (October 8, 1986). "Learning representations by back-propagating errors" Nature 323 (6088): 533–536
  2. Backpropagation: Theory, Architectures, and Applications. Chauvin, Yves; Rumelhart, David E. (1995). Lawrence Erlbaum Associates, Inc. ISBN 0805812598