Neural Networks & Deep Learning
How a Network Learns: Backpropagation and Gradient Descent · 1/2

Gradient descent: rolling downhill toward less error

Picture the network's total error as a landscape with hills and valleys, where the height at any point represents how wrong the model's predictions are for a given set of weights. Training a network means searching for a low point in that landscape, a set of weights that produces small error. Gradient descent does this by repeatedly checking which direction is 'downhill' from the current position, meaning which small change to each weight would reduce error, and taking a small step in that direction.

The size of each step is controlled by the learning rate. Too large, and the network can overshoot the valley and bounce around without ever settling, like taking huge leaps down a hill and repeatedly overshooting the bottom. Too small, and training crawls along so slowly it might take forever, or get stuck in a shallow dip that isn't the best solution available. Picking a good learning rate is one of the most practical, hands-on decisions in training any network.