What is gradient descent?

Gradient descent is an optimisation method that reduces a model's loss function by repeatedly updating its parameters in small steps opposite to the gradient of the loss.

It differs from backpropagation in which half of the job it does: backpropagation computes each parameter's gradient, while gradient descent uses those gradients to update the parameters. Its classic full-batch form uses all training data per step; stochastic gradient descent is the variant using small batches.

Topic
Machine learning, models and training
Also known as
Steepest descent, batch gradient descent
Origin
1847, Cauchy, the method of steepest descent

How gradient descent works

  1. The model predicts with current parameters and the loss function measures how far the prediction is from the target.
  2. The partial derivative of the loss with respect to each parameter, its gradient, is computed; it points where loss rises fastest.
  3. Each parameter is reduced by the gradient times the learning rate; with a learning rate of 0.01 and a gradient of 2 the parameter falls by 0.01 × 2 = 0.02.
  4. The loop repeats until loss is small enough or a set number of steps is reached.

In more detail

Momentum, AdamW and learning rate schedules

Modern gradient-based optimisation rarely uses a constant learning rate. Training typically pairs an optimiser like AdamW (which combines momentum, adaptive per-parameter scaling and decoupled weight decay) with a learning rate schedule, such as linear warmup followed by cosine decay, to stabilise early updates and settle cleanly near a minimum.

Differentiability and feature scaling

Gradient descent requires the loss function to be differentiable (or sub-differentiable) with respect to parameters and is sensitive to feature scaling: unnormalised inputs create elongated, ill-conditioned loss valleys that cause zig-zagging and slow convergence unless input normalisation or adaptive optimisers are applied.

Commonly confused terms

TermHow it differs
Gradient ascentGradient descent minimises a loss or cost function by moving opposite to the gradient, whereas gradient ascent maximises an objective (such as log-likelihood or policy reward in reinforcement learning) by moving along the gradient.

Why gradient descent matters for on-premises AI

Any in-house fine-tuning or training from scratch runs on some form of gradient descent; learning rate and step count shape both training time and quality. Too large a learning rate makes loss oscillate or explode, while too small a rate drags training out and wastes GPU time. In practice small-batch variants and adaptive optimisers such as Adam replace the plain form.

ON-PREMISES EXAMPLE

A manufacturer trains a fault prediction model on line sensor data on in-house servers, watching the loss curve and lowering the learning rate when it starts to oscillate.

Common questions

How does gradient descent differ from stochastic gradient descent?

Gradient descent computes the gradient from all training data at each step. Stochastic gradient descent uses one example or a small batch, which is noisier but much faster.

Does gradient descent always find the best solution?

No. Neural network loss surfaces are non-convex, so it can stall at saddle points, flat regions or local minima. In practice a good solution is usually enough.

Sources

In the glossary: Glossary, E to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.