Home/Deep Learning/Gradient Descent
Deep Learning

Gradient Descent

Walking downhill on the error surface, one small step at a time — how a model's weights actually get updated.

Reviewed July 10, 2026Stable
Reading level: Curious
Pick your depth ↓

When not to use it

  • On non-differentiable objectives. No slope, no descent. You need a different family of methods entirely.
  • On small convex problems with closed-form solutions. If linear regression has an exact answer, take the exact answer.
  • When the function is expensive and the parameters are few. Bayesian optimisation is better suited to that shape of problem.

Reach for something else instead

  • Second-order methods — use curvature, converge in fewer steps, historically too expensive at scale but currently being revisited.
  • Evolutionary strategies for black-box objectives where you can't compute a gradient at all.
  • Closed-form solutions when they exist. They're exact and instant, and it's worth checking before reaching for an optimiser.

Gradient descent: roll downhill to the lowest error.

minimum high error steps down →

Picture the model's error as a landscape — high where the model is wrong, low where it's right. Gradient descent computes the slope at the current point and takes a step downhill. The step size is the learning rate: too big and it overshoots, too small and it crawls. Repeat until it settles in a valley — a set of weights with low error.

Worked example

One concrete step. Suppose we're minimising a simple error curve f(w) = w², currently sitting at w = 4, with learning rate 0.1.

gradient (slope) = f'(w) = 2w
at w=4: gradient = 2×4 = 8

new w = w − (learning rate × gradient)
new w = 4 − (0.1 × 8) = 4 − 0.8 = 3.2

The error at w=4 was 16; at w=3.2 it's 10.24 — we moved downhill. Take another step:

gradient at 3.2 = 2×3.2 = 6.4
new w = 3.2 − (0.1 × 6.4) = 2.56

Each step is smaller than the last, because the slope flattens as we near the bottom (w=0, the minimum). That's gradient descent in miniature: read the slope, step against it, repeat. Too large a learning rate — say 1.0 — and the step would overshoot (4 − 8 = −4) and diverge instead of settling.

Further reading

  • Kingma & Ba (2014), Adam: A Method for Stochastic Optimization — the default optimiser, and why adaptive rates work.
  • Smith (2015), Cyclical Learning Rates for Training Neural Networks — where the learning rate finder comes from.
  • Wilson et al. (2017), The Marginal Value of Adaptive Gradient Methods in Machine Learning — the counter-argument: SGD can generalise better. Worth reading alongside Adam.

Primary sources, listed so you can check the claims on this page rather than take them on trust.

Where people go wrong

  • Tuning everything except the learning rate. It matters more than architecture choices people agonise over.
  • Reading a plateau as convergence. It may be a saddle point, or a decayed rate, or a dead layer.
  • Copying a learning rate from a paper with a different batch size. They scale together, and the number alone means nothing.

At a glance

FieldDeep Learning
Core ideastep downhill on the error surface
Key diallearning rate
Default optimiserAdam
Real obstaclesaddle points, not local minima
DifficultyIntermediate
Flashcards for this concept · study, save or share them →
Question
Answer
1 / 4

Often compared with

Gradient descent vs. backpropagation — taking the step vs. computing which way is downhill.

Where this sits

6 concepts come first. Understanding it opens up 10 more.

5Levelsteps in
6Needs firstconcepts
10Opens up3% of 310
1Areastays here
Learn these firstLoss Function
LEARN FIRST Loss Function Gradient Descent Backpropagation Learning Rate Optimizer Batch Size UNLOCKS
Gradient Descent sits after Loss Function, and leads to 4 concepts.

Computed from the prerequisite graph, not assigned. How this works