Home/Deep Learning/Backpropagation
Deep Learning

Backpropagation

The algorithm that works out which weights caused a mistake and by how much — the reason neural networks can learn at all.

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

When not to use it

  • Writing it yourself, outside of learning. Every framework does this correctly and faster than you will. Hand-rolled gradients are a source of subtle bugs, not insight.
  • On non-differentiable objectives. If your loss has hard jumps or discrete decisions, there's no gradient to propagate. That's a different family of methods.
  • As an explanation of how brains learn. It's an engineering algorithm, not a model of biology, and the resemblance is mostly metaphorical.

Reach for something else instead

  • Evolutionary methods for non-differentiable or black-box objectives — far less efficient, but they don't need gradients.
  • Gradient-free optimisation when the parameter count is small and the function is expensive or opaque.
  • Forward-mode differentiation in the rare case where you have few inputs and many outputs. For neural nets it's the wrong direction and that's why nobody uses it.

Backpropagation: the error flows backward, adjusting every weight.

layer 1layer 2layer 3 forward: predict backward: adjust error

A forward pass produces a prediction; comparing it to the truth gives an error. Backpropagation sends that error backward through the network, using the chain rule to compute how much each weight contributed — then each weight is nudged to reduce the error. Repeat over many examples and the network learns. The green arrow is the forward pass; the amber is the error propagating back.

Further reading

  • Rumelhart, Hinton & Williams (1986), Learning representations by back-propagating errors — the paper that made neural networks trainable.
  • He et al. (2016), Deep Residual Learning for Image Recognition — residual connections, and the clearest practical answer to vanishing gradients.
  • Baydin et al. (2015), Automatic Differentiation in Machine Learning: a Survey — what your framework is actually doing.

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

Where people go wrong

  • Forgetting to zero gradients between steps, so they accumulate. Training still runs. It just isn't doing what you think.
  • Blaming the model for a vanishing gradient. Deep stacks without residuals or normalisation will starve their early layers no matter how good the architecture is elsewhere.
  • Assuming a NaN loss means bad data. It's often exploding gradients, and gradient clipping fixes it in one line.

At a glance

FieldDeep Learning
Core ideaassign blame backwards
Mechanismchain rule on a graph
Cost~2× the forward pass, plus stored activations
DifficultyIntermediate
Flashcards for this concept · study, save or share them →
Question
Answer
1 / 4

Often compared with

Backpropagation vs. gradient descent — working out which direction to move vs. actually taking the step.

Where this sits

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

6Levelsteps in
7Needs firstconcepts
6Opens up2% of 310
1Areastays here
LEARN FIRST Gradient Descent Neural Network Backpropagation Vanishing Gradient Grokking Residual Connection UNLOCKS
Backpropagation sits after Gradient Descent and Neural Network, and leads to 3 concepts.

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