Bring the mental model from Reverse-Mode Automatic Differentiation; this page will reuse it instead of restarting from zero.
Calculus
Backpropagation
Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.

Concept Structure
Backpropagation
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learning map
BackpropagationConceptual Bridge
What should feel connected as you move through this page.
Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.
The next edge should feel earned: use the demo prediction here before following Gradient Descent.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
Backpropagation is reverse-mode autodiff specialized to neural networks.
A neural network is a layered computation graph. The forward pass turns inputs into predictions and a loss. The backward pass asks each layer a local question: "if the loss is sensitive to my output, how sensitive is it to my inputs and parameters?"
The answer is passed backward layer by layer. Each parameter receives a gradient, and an optimizer uses those gradients to update the model. Backpropagation is not magic pattern recognition; it is the chain rule organized so every local derivative is reused efficiently.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
For a simple feed-forward network, write activations as
for layers . For one training example, use column-vector shapes:
Let the scalar loss be
Backpropagation tracks sensitivities flowing backward from the loss. Define
For the final layer,
If the output layer is the identity, then and . For squared error , this gives .
For earlier layers, the chain rule gives
Once is known, the parameter gradients are local:
This is the core efficiency: the same downstream sensitivity is reused to compute gradients for both parameters and earlier activations. For a scalar loss with many parameters, one backward pass computes the full gradient needed by gradient descent.
For a batch, the same local rules apply per example, then weight and bias gradients are summed or averaged across the batch dimension.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
# Separate numbers from the interactive demo.
# Shapes:
# x: (2, 1), W1: (3, 2), b1: (3, 1)
# W2: (1, 3), b2: (1, 1), y: (1, 1)
x = np.array([[0.5], [-1.0]])
y = np.array([[0.25]])
W1 = np.array([[0.6, -0.2],
[-0.3, 0.4],
[0.1, 0.5]])
b1 = np.array([[0.05], [0.0], [-0.05]])
W2 = np.array([[0.25, -0.15, 0.2]])
b2 = np.array([[0.02]])
# Forward pass
z1 = W1 @ x + b1
h1 = np.tanh(z1)
z2 = W2 @ h1 + b2
pred = z2
loss = 0.5 * float(np.sum((pred - y) ** 2))
# Backward pass
delta2 = pred - y
dW2 = delta2 @ h1.T
db2 = delta2
dh1 = W2.T @ delta2
delta1 = dh1 * (1 - h1 ** 2)
dW1 = delta1 @ x.T
db1 = delta1
dx = W1.T @ delta1
print("loss:", round(loss, 4))
print("hidden signal shape:", delta1.shape)
print("first-layer gradient shape:", dW1.shape)
print("input cotangent shape:", dx.shape)
This tiny network has one hidden layer, but it shows the recurrence: delta2 moves through W2.T, becomes delta1 after the tanh derivative, and then produces both dW1 and dx. The interactive demo below uses a different concrete network and hides its backward values until you predict the hidden learning-signal path.
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
Use the demo to step through one tiny two-layer network. First inspect the stored forward values, the target, and the readout weights. Before seeing the backward pass, predict which hidden unit will carry the strongest usable learning signal after the output error passes through the readout weights and local tanh gates.
Use Case A, Case B, and Case C as neutral graph states. Commit first, then reveal the hidden deltas, tanh gates, row-gradient norms, and update outcome.
Live Concept Demo
Explore Backpropagation
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Backpropagation should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.

Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Backpropagation should make visible.
Visual Inquiry
Make the image answer a mathematical question
Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.
Which visible object should carry the first intuition?
Pick the cue that should make Backpropagation easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Grounds backpropagation as error signals propagated through hidden units to adjust network weights.
Open sourceGrounds the relationship between backpropagation, reverse-mode autodiff, and computation graphs.
Open sourceClaim Review
Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.
Claims without a substantive review badge still need exact source-support review.
rumelhart-1986-backprop, baydin-2018-ad-survey
Use equation, code, and demo objects to check whether the source support is operational.
Rumelhart, Hinton, and Williams introduce back-propagating error signals for adjusting weights; Baydin et al. frame backpropagation as reverse-mode automatic differentiation on computation graphs for efficient derivative evaluation.
Sources: Learning representations by back-propagating errors, Automatic differentiation in machine learning: a surveyChecks the differentiable feed-forward scalar-loss mechanism, not optimizer choice, biological plausibility, recurrent/dynamic variants, full batching, nonsmooth primitives, or stability. Reverse-mode systems may save values directly or recover some through checkpointing.A bounded review summary is present; still check caveats and exact source scope.Checked Rumelhart/Hinton/Williams for neural-network error back-propagation and weight adjustment, and Baydin et al. for mechanism: backprop is reverse-mode AD on a network objective, with forward intermediate/dependency recording, backward adjoint propagation, local chain-rule accumulation, VJP framing, output-adjoint seed 1, and one reverse pass computing the full scalar-objective gradient. Local math/code/demo instantiate the same feed-forward scalar-loss case with deltas, tanh gates, W^T delta, and dW/db.
Reviewer: codex+oracle; reviewed 2026-05-07Source support candidates
paper 1986Learning representations by back-propagating errorsGrounds backpropagation as error signals propagated through hidden units to adjust network weights.
paper 2018Automatic differentiation in machine learning: a surveyGrounds the relationship between backpropagation, reverse-mode autodiff, and computation graphs.
Practice Loop
Try the idea before it explains itself
Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.
Before touching the demo, predict one visible change that should happen in Backpropagation.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Backpropagation
What is the smallest example that makes Backpropagation click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:calculus/backpropagation.
- Source ids to inspect: rumelhart-1986-backprop, baydin-2018-ad-survey
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Backpropagation Object key: concept:calculus/backpropagation Context: Calculus Anchor id: concept/concept-notebook/calculus/backpropagation Open question: What is the smallest example that makes Backpropagation click without losing the math? Evidence to inspect: - Source ids to inspect: rumelhart-1986-backprop, baydin-2018-ad-survey - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/calculus/backpropagation
concept:calculus/backpropagation