The goal when training neural networks, is to find the optimal values of the weights and biases that minimize the cost function. When using gradient descent to achieve this goal, one has to find the derivative of the cost with respect to every parameter in the network which is extremely compute expensive
Back-propagation is a technique that is central to neural network training and optimization. In combination with gradient descent, it provides a way for the error to propagate backward through the network and to compute the rate at which each neuron contributes to the overall loss.
How to compute back-propagation:
An easy way to understand back propagation is to represent your neural network using a computational graph.
Picture the neural network below. It has two inputs; x1 x2 , a single hidden layer with two neurons and finally an output layer with two outputs
Simple Neural Network
Two inputs, a single hidden layer with two neurons, and two outputs
Focusing our attention on one neuron in the output layer
In calculus, the rate of change of a function of a function is the multiple of the derivative of those functions, no matter how composite the functions are, we just keep multiplying.
Even though the weight is not directly connected to the cost function, it is connected through intermediate nodes and changes in its value affect the cost function through the chain rule of calculus. Because we cant compute directly how much the cost is affected by the weight, we then use the chain rule of calculus.
The derivative of the cost w.r.t to the weight at input :
The derivative of the cost w.r.t to the bias at input :
The derivative of the cost w.r.t to the bias at input :
As we have seen, back-propagation is the repeated application of the chain rule of differentiation. We do this for every weight and bias in the network.
This whole process of backtracking through the network is called back-propagation
To update the different parameters of the network, we subtract the learning rate from the different rate of changes. This process is repeated until an optimal value of the cost functions is found. The learning rate introduces stability and determines the adjustments magnitude
In summary, we use back-propagation to compute the change and use gradient descent to update the values of the weight and bias.

Leave a Reply