Gradient descent
Gradient descent adjusts parameters in the direction that locally reduces a chosen error. The step size matters as much as the direction.
Intuition: slope is local
On a smooth curve, the derivative tells you which direction rises at your current position. Moving the other way by a sufficiently small amount reduces the function. The same idea extends to many parameters, where the gradient collects all partial derivatives. It describes the local landscape, not a guaranteed route to the best possible solution.
The update rule
The learning rate scales the update. A first-order expansion helps explain why a small step works:
The omitted curvature terms matter for larger steps. This is why simply multiplying a successful learning rate by a large factor can fail.
Work through the figure
The illustrative curve is , whose derivative is . With learning rate , each update multiplies by . Starting from gives , then , and progressively smaller losses.
For this particular quadratic, convergence occurs when , or . At , the sign alternates without reducing magnitude. Above one, magnitudes grow. These bounds belong to this example; different curvature produces different limits.
What changes with data
Full-batch descent differentiates the loss over all chosen training examples. A minibatch estimates that direction from a subset, so successive steps are noisy. A falling training loss does not by itself establish held-out accuracy. Feature scale also changes the geometry of the optimization problem.
The update needs gradients, but does not specify how to obtain them. Backpropagation is an efficient method for differentiable computational graphs. Nondifferentiable points require conventions or suitable generalized derivatives.
Where you will see this
The final step of the backpropagation explorable computes one update and compares losses. The sleep-staging study tracks training and held-out evaluation separately.