Backpropagation

Backpropagation is a supervised learning technique used for training artificial neural networks. It was first described by Paul Werbos in 1974, and further developed by David E. Rumelhart, Geoffrey E. Hinton and Ronald J. Williams in 1986.

It is most useful for feed-forward networks (networks that have no feedback, or simply, that have no connections that loop). The term is an abbreviation for "backwards propagation of errors". Backpropagation requires that the transfer function used by the artificial neurons (or "nodes") be differentiable.

Summary of the technique:
 * 1) Present a training sample to the neural network.
 * 2) Compare the network's output to the desired output from that sample. Calculate the error in each output neuron.
 * 3) For each neuron, calculate what the output should have been, and a scaling factor, how much lower or higher the output must be adjusted to match the desired output. This is the local error.
 * 4) Adjust the weights of each neuron to lower the local error.
 * 5) Assign "blame" for the local error to neurons at the previous level, giving greater responsibility to neurons connected by stronger weights.
 * 6) Repeat the steps above on the neurons at the previous level, using each one's "blame" as its error.

Actual Algorithm:

1. Initialize the weights in the network (often randomly) 2. repeat * foreach example e in the training set do              1. O = neural-net-output(network, e) ; forward pass 2. T = teacher output for e              3. Calculate error (T - O) at the output units 4. Compute delta_wi for all weights from hidden layer to output layer ; backward pass 5. Compute delta_wi for all weights from input layer to hidden layer ; backward pass continued 6. Update the weights in the network * end 3. until all examples classified correctly or stopping criterion satisfied 4. return(network)

As the algorithm's name implies, the errors (and therefore the learning) propagate backwards from the output nodes to the inner nodes. So technically speaking, backpropagation is used to calculate the gradient of the error of the network with respect to the network's modifiable weights. This gradient is almost always then used in a simple stochastic gradient descent algorithm to find weights that minimize the error. Often the term "backpropagation" is used in a more general sense, to refer to the entire procedure encompassing both the calculation of the gradient and its use in stochastic gradient descent. Backpropagation usually allows quick convergence on satisfactory local minima for error in the kind of networks to which it is suited.

It is important to note that backpropagation networks are necessarily multilayer (usually with one input, one hidden, and one output layer). In order for the hidden layer to serve any useful function, multilayer networks must have non-linear activation functions for the multiple layers: a multilayer network using only linear activiation functions is equivalent to some single layer, linear network. Non-linear activation functions that are commonly used include the logistic function, the softmax function, and the gaussian function.

The backpropagation algorithm for calculating a gradient has been rediscovered a number of times, and is a special case of a more general technique called automatic differentiation in the reverse accumulation mode.

It is also closely related to the Gauss-Newton algorithm.