Black October, explainedAppsGuidesAI DictionarySmall FixesOn RecordAboutFollow the lab

Backpropagation

Also called backprop, backward pass

Backpropagation is how a neural network learns from a mistake: it traces the error backwards and works out how much each connection was to blame.

In plain words

A neural network is layers of small units joined by millions of connections, each with a strength. When the network makes a guess and gets it wrong, a question arises: which of those connections caused the mistake, and by how much?

Backpropagation answers it. First the network makes its guess, working forwards from input to output. Then it measures the error and sends it backwards, layer by layer, sharing out the blame. Connections that pushed hard toward the wrong answer get more blame than ones that barely mattered.

Each connection is then nudged a little in the direction that would have reduced the error. That nudging is gradient descent; backpropagation is the bookkeeping that tells it which way to nudge. Every modern deep learning model, including today's chatbots, is trained this way.

Everyday example

A dish sent back in a restaurant kitchen

A customer says the biryani is too salty. The head chef works backwards: the final seasoning added a little, the masala base added more, the marinade added the most. Each cook learns roughly how much of the saltiness was theirs and adjusts next time, the biggest culprit the most. Nobody rebuilds the recipe from scratch.

Where the example breaks: Cooks can talk and reason about what went wrong. Backpropagation is pure arithmetic: it computes each connection's share of the error with calculus and knows nothing about why.

Go deeper

How it actually works

Training a neural network repeats a two-pass cycle millions of times: a forward pass to make predictions and a backward pass to compute how to improve them.

  1. Forward pass

    A batch of examples flows through the network. Each neuron takes a weighted sum of its inputs and applies an activation function. The output is compared with the labels, and a loss function gives the error.

  2. Backward pass

    Starting at the output, the chain rule of calculus works out how much the loss would change if each weight changed slightly. Because each layer's share of the blame depends only on the layer after it, those numbers can be computed layer by layer from the end, reusing the work already done. That reuse is what makes it fast.

  3. Update the weights

    The result is a gradient for every weight. Gradient descent moves each weight a small step against its gradient, scaled by the learning rate.

  4. When signals fade

    In very deep or recurrent networks, the backward signal can shrink to almost nothing before reaching early layers (vanishing gradients) or grow out of control (exploding gradients). ReLU activations, careful initialisation and designs like LSTM were developed partly to fix this.

  5. Done by software

    Today no one writes backpropagation by hand. Frameworks such as PyTorch and JAX compute it automatically, a technique called automatic differentiation.

Popularised by
David Rumelhart, Geoffrey Hinton and Ronald Williams, Nature, October 1986
Earlier roots
Seppo Linnainmaa's reverse-mode automatic differentiation (1970); Paul Werbos applied it to neural networks (1982)
Also called
Backprop, the backward pass
Works with
Gradient descent, which uses its output to update the weights

Questions people ask

What is backpropagation in simple terms?

A method for working out, after a neural network makes a wrong guess, how much each of its connections contributed to the mistake. It sends the error backwards from the output to the input, so every connection can be adjusted by the right amount.

What is the difference between backpropagation and gradient descent?

Backpropagation calculates the gradient: which direction and how strongly each weight should change. Gradient descent uses that gradient to actually change the weights. Google's glossary calls backpropagation the algorithm that implements gradient descent in neural networks.

Who invented backpropagation?

Several people found it independently. Seppo Linnainmaa described the underlying maths in 1970 and Paul Werbos applied it to neural networks. The 1986 Nature paper by Rumelhart, Hinton and Williams showed what it could do and made it widely used.

Does the brain use backpropagation?

Probably not in this exact form. Real neurons do not appear to send precise error signals backwards along the same connections. Researchers study brain-like alternatives, but how the brain assigns credit is still an open question.

Further reading