Gradient Descent
Gradient descent is an optimization algorithm that iteratively adjusts a model's parameters in the direction that most reduces its error, or loss, in order to train it.
Definition
Gradient descent is an optimization algorithm that iteratively adjusts a model's parameters in the direction that most reduces its error, or loss, in order to train it.
Overview
At each training step, gradient descent computes the gradient — the direction and rate of steepest increase — of a loss function with respect to the model's parameters, then updates the parameters a small step in the opposite direction to reduce the loss. Repeated over many iterations across a training dataset, this process gradually moves the model toward parameter values that minimize prediction error. In deep learning, the gradients needed for this process are computed efficiently across all layers of a neural network using backpropagation, which applies the chain rule to propagate the error signal from the output layer back to the earliest layers. The size of each parameter update step is controlled by the learning rate, a critical hyperparameter: too large and training can become unstable or diverge, too small and training can be prohibitively slow. In practice, most modern training uses variants like stochastic gradient descent (SGD), which updates parameters using small random batches of data rather than the full dataset, and adaptive optimizers such as Adam, which adjust the effective learning rate per parameter. Gradient descent is the foundational optimization method behind training virtually all modern neural networks, from small classifiers to large-scale foundation models.
Key Concepts
- Iteratively updates model parameters to minimize a loss function
- Relies on backpropagation to compute gradients across neural network layers
- Learning rate controls the size of each parameter update step
- Stochastic gradient descent uses random data batches for efficiency
- Adaptive optimizers like Adam adjust learning rates per parameter
- Core optimization method behind training nearly all neural networks