Backpropagation Intuition
P6.dl-architectures.01 · Audience: guest, language-pro, it-ml · Prerequisites: Loss Functions and the Learning Objective
How does a network know which weights to adjust, and by how much — without any calculus notation? Backpropagation traces the prediction error backward through a computation graph, assigning each weight a "blame score". This module builds that intuition step by step on a tiny concrete expression, f = (a + b) × c.
The fundamental problem. A neural network makes a prediction. The prediction is wrong. We know how wrong (by computing a loss: the difference between prediction and truth). But which of the millions of weights caused the error? And by how much should each weight change?
Backpropagation (short: backprop) is the algorithm that answers both questions. It traces the error backward through the network, assigning a "blame score" to each weight — telling us exactly how much each weight contributed to the mistake.
🗣️ From a linguist's perspective: Backpropagation as tracing the source of errors backward through a pipeline
ⓘ Concept: Backpropagation — the Big Picture
Training a neural network has two passes plus an update:
- Forward pass — compute the prediction step by step: input → hidden → output.
- Backward pass — starting from the error (loss), trace backward and compute how much each operation contributed to it. These contributions are called gradients (or informally, "blame scores").
- Update — adjust each weight in the direction that reduces the loss (gradient descent: new_weight = old_weight − learning_rate × gradient).
Why it matters — Backprop is what makes it possible to train neural networks with millions of parameters. Without it, we would have to try random weight changes — far too slow for any real model. Every modern AI, including the Transformer, is trained using some form of backpropagation.
Reference: Rumelhart, Hinton & Williams 1986 — Learning representations by back-propagating errors
💡 We use the word gradient to mean "how much does the output change when I slightly increase this weight?" A large gradient means a small nudge to this weight has a big effect on the loss. A gradient of zero means the weight is not contributing at all.
Q1 — Direction of error signals: backpropagation sends error signals in which direction through the network — forward or backward?
📚 Go Further
Curated resources to explore backpropagation further.
| Type | Resource |
|---|---|
| Video | Andrej Karpathy — The spelled-out intro to neural networks and backpropagation: building micrograd (YouTube, ~2.5 h) |
| Video | 3Blue1Brown — Backpropagation calculus (Deep Learning, Chapter 4, YouTube) |
| Course | Coursera — Deep Learning Specialization, Course 1 Week 4: Backpropagation, Andrew Ng (free audit) |
| Reference | CS231n Stanford — Backpropagation, Intuitions (cs231n.github.io/optimization-2) |
| Exercise | Karpathy — micrograd GitHub repo: implement scalar autograd from scratch, then inspect the computation graph |
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
🎓 Practice ladder
3 graded rungs · ~20 minThree graded rungs: verify the chain rule numerically on f(g(x)) = sigmoid(x²), backpropagate through f = (a + b) × c by hand, then finish a minimal tape-based autograd.
Rung 1 — Chain rule, checked numerically
Loading exercise…
Rung 2 — Backprop through f = (a + b) x c
Loading exercise…
Rung 3 — Finish the autograd tape
Loading exercise…
Try it yourself
A scratch console for this page's ideas — ungraded, nothing you run here is recorded.
Scratch console
A scratch console with the scientific stack (pandas, numpy, scikit-learn). Runs on the server — no network, resource-limited and measured.
Output appears here.
Where next?
Later in Deep-Learning Architectures
This module unlocks