Gradient Descent
August 29, 2026
Definition. An iterative optimization algorithm that moves parameters in the direction that most reduces a loss function, using the gradient of that function.
Key Points
- The gradient points in the direction of steepest increase, so we step in the opposite direction.
- The learning rate controls step size — too large and it diverges, too small and it converges slowly.
- Variants: batch, stochastic (SGD), and mini-batch gradient descent differ in how much data is used per update.
Formula
Example
For , the gradient is . Starting at with :
Each step shrinks toward the minimum at .
Notes / Gotchas
- A learning rate that's too high can cause the loss to oscillate or diverge instead of converge.
- Plain gradient descent can get stuck in local minima or saddle points — momentum and adaptive methods (Adam, RMSProp) help with this.