A gradient is a set of measurements showing the direction and amount to change a neural network’s parameters to reduce error. It connects a loss function, which scores how poorly the model performs, with gradient descent, the repeated process that adjusts the model. section 4.1 section 4.1.2
A training step follows this pattern:
- Compare the model’s actual outputs with the expected outputs. section 4.1.2
- Use the loss function to turn the error into a single numeric score. section 4.1
- Use the gradient to make many parameters slightly better, then repeat the process. section 4.1.2
Rolling a ball downhill
Imagine a ball on a hilly landscape. The ball’s position represents a parameter value, while the hill’s height represents loss. The gradient indicates which direction and how far to move; repeated small moves aim for a valley with lower loss. The method can still settle in a local valley rather than the best one, and it offers no guarantee of a good solution. section 4.1.2
Figure 4.3 Inputs and labels (the known correct answers for each input) are used to tweak the neural network during gradient descent. A network is made of parameters that are altered a small amount each time gradient descent is applied. We eventually transform the network into something useful by applying gradient descent millions or billions of times.
Follow the figure to see how inputs and known labels produce small parameter updates that gradually transform a neural network. section 4.1.2



















