Backpropagation is an algorithm used in machine learning to train a neural network. The method revolves around calculating the gradient one layer at a time, starting with the last layerâ€™s activation, comparing it to the expected values and from there working backwards through the layer structure to find the total gradient.