Skip to content
LiveNext 10:12:39

Definition

What is Backpropagation?

Backpropagation is Backpropagation is the method neural networks use to learn: it works backward from the error in a prediction to calculate how much each weight contributed, so every weight can be nudged to reduce that error.

Backpropagation is how a neural network figures out which of its many internal settings to change after it gets something wrong. It is the bookkeeping step that makes learning possible at scale.

The problem it solves

A modern model has billions of parameters, the numbers that decide how it turns an input into an output. When the model makes a prediction and gets it wrong, you need to know which of those numbers to adjust, and by how much. Trying each one by hand would take forever.

Backpropagation answers that question efficiently. Think of a relay race where the team loses by a second. You do not blame everyone equally. You walk back along the track, runner by runner, and work out how much time each one cost. Backpropagation does the same thing, walking backward through the network's layers.

How it works

Training repeats a short loop:

  1. Forward pass. The model takes an input, such as a sentence with the next word hidden, and produces a prediction.
  2. Measure the error. A loss function turns the gap between the prediction and the right answer into a single number.
  3. Backward pass. Starting from that number, backpropagation uses the chain rule from calculus to calculate how much each parameter contributed to the error. That per-parameter measure is called a gradient.
  4. Update. An optimizer using gradient descent moves each parameter a small step in the direction that lowers the error.

Then the loop runs again with the next batch of examples, millions or billions of times.

Why it matters

Almost every system you use today was trained this way, including the large language models behind chat assistants and most image and speech models. Without an efficient way to assign blame across billions of parameters, deep learning would be too slow to be practical. The idea dates back decades, and it became the standard recipe for training deep networks in the 1980s.

It also explains a cost you hear about. The backward pass needs the numbers from the forward pass kept in memory, which is part of why training takes far more memory and compute than simply running a finished model, known as inference.

What it is not

Backpropagation does not decide how the model learns. It only calculates the gradients. The optimizer decides how to use them. It also does not run when you chat with a model. Once training ends, the parameters are frozen and only the forward pass runs.

Where you will see it

You will rarely call it directly. Frameworks such as PyTorch compute gradients automatically. But the term appears whenever someone explains why training is expensive, why a model needs so much memory to fine-tune, or why some designs, like ones with parts that cannot be differentiated, are hard to train. If a method can only be trained by trial and error rather than gradients, it will usually be slower and harder to scale.

Questions people ask

What is backpropagation in simple terms?

It is the step where a network works backward from its mistake to find which weights caused it, so each weight can be adjusted a little to make the mistake smaller next time.

Is backpropagation the same as gradient descent?

No. Backpropagation calculates the gradients, and gradient descent uses them to update the weights. They work as a pair.