Concept notebookChecking saved investigationReading browser-local route memory before showing a continuation.

Backpropagation

Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.

published · difficulty 3/5 · 15 min read

01

01

Intuition

Build the mental picture first so the rest of the page has something to attach to.

PredictName the object in plain language, then predict what should change.Leave with one reusable mental picture before notation appears.

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.

Section prompt

Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.

02

02

Math

Translate the story into symbols, assumptions, and a derivation you can inspect.

InspectTrack the same object through the notation and check each symbol.Leave with the invariant the equations preserve.

For a simple feed-forward network, write activations as

h0=x,z=Wh1+b,h=ϕ(z),h_0=x,\qquad z_\ell=W_\ell h_{\ell-1}+b_\ell,\qquad h_\ell=\phi(z_\ell),h0=x,z=Wh1+b,h=ϕ(z),

for layers =1,,K\ell=1,\dots,K=1,,K. For one training example, use column-vector shapes:

h1Rn1,WRn×n1,b,z,hRn.h_{\ell-1}\in\mathbb{R}^{n_{\ell-1}},\quad W_\ell\in\mathbb{R}^{n_\ell\times n_{\ell-1}},\quad b_\ell,z_\ell,h_\ell\in\mathbb{R}^{n_\ell}.h1Rn1,WRn×n1,b,z,hRn.

Let the scalar loss be

J=(hK,y).J=\ell(h_K, y).J=(hK,y).

Backpropagation tracks sensitivities flowing backward from the loss. Define

δ=JzRn.\delta_\ell = \frac{\partial J}{\partial z_\ell}\in\mathbb{R}^{n_\ell}.δ=zJRn.

For the final layer,

δK=hKJϕ(zK).\delta_K = \nabla_{h_K}J \odot \phi'(z_K).δK=hKJϕ(zK).

If the output layer is the identity, then hK=zKh_K=z_KhK=zK and δK=hKJ\delta_K=\nabla_{h_K}JδK=hKJ. For squared error J=12y^y2J=\frac12\|\hat y-y\|^2J=21y^y2, this gives δK=y^y\delta_K=\hat y-yδK=y^y.

For earlier layers, the chain rule gives

δ=(W+1Tδ+1)ϕ(z).\delta_\ell = (W_{\ell+1}^{\mathsf T}\delta_{\ell+1}) \odot \phi'(z_\ell).δ=(W+1Tδ+1)ϕ(z).

Once δ\delta_\ellδ is known, the parameter gradients are local:

JW=δh1T,Jb=δ.\frac{\partial J}{\partial W_\ell} = \delta_\ell h_{\ell-1}^{\mathsf T},\qquad \frac{\partial J}{\partial b_\ell}=\delta_\ell.WJ=δh1T,bJ=δ.

This is the core efficiency: the same downstream sensitivity δ\delta_\ellδ 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.

Section prompt

Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.

03

03

Code

Keep the implementation aligned with the notation so the algorithm is legible.

TraceMatch variables to symbols before reading the implementation.Leave with a runnable witness for the math.
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.

Section prompt

Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.

04

04

Interactive Demo

Use direct manipulation to connect the explanation to a moving system.

ManipulateChange one control and predict the visible response before reveal.Leave with the observed invariant or a repaired model.

Live Concept Demo

Explore Backpropagation

The stage is code-native and interactive. Use it to test the explanation against the mechanism.

difficulty 3/5undergraduatecode-aligned
Demo inquiry checkpoint

Manipulate one control and predict the visible change.

01Choose lensTrace a quantity
02ObserveDemo state pending
03GroundName the equation, invariant, or control that explains it.
04CarryNext: Gradient Descent

Choose what to inspect in Backpropagation. This shared fallback is an observation guide, not evidence of learning.

Loading interactive demo...

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.

Section prompt

Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.

4/4 sections ready

Concept: Backpropagation

What is the smallest example that makes Backpropagation click without losing the math?

BeforeReverse-Mode Automatic DifferentiationNow4/4 sections readyTryManipulate one control and predict the visible change.NextGradient Descent
Object contextCalculus
ConceptLearner lens

Backpropagation

What is the smallest example that makes Backpropagation click without losing the math?

Mode questionCan I say the mechanism back in one sentence before I reveal anything?

Start with the prediction checkpoint, then compare the reveal to the mental model.

Take this move

Study modes

Keep the object fixed; change the lens.

Route back through the notebook

Carry the same object through intuition, math, code, and demo.

4/4 sections ready
Carry inReverse-Mode Automatic Differentiation

Bring the mental model from Reverse-Mode Automatic Differentiation; this page will reuse it instead of restarting from zero.

Work hereBackpropagation

Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.

Carry outGradient Descent

The next edge should feel earned: use the demo prediction here before following Gradient Descent.

After The First Pass

Turn the concept into an inspected object.

The lower panels are one second act: keep the object fixed, inspect it visually, check source boundaries, practice transfer, then attach the research question.
ConceptBackpropagationCalculus

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.

Demo notes open01 / Intuition
Editorial neural-network illustration of activations flowing forward and error signals propagating backward through layers.
Prediction lens

Start with the picture, metaphor, or geometric mechanism.

Commit first

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.

4/4 stages readyDemo notes connected
Prediction

Which visible object should carry the first intuition?

Commit first

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.

Object - ConceptBackpropagationQuestion

What is the smallest example that makes Backpropagation click without losing the math?

concept:calculus/backpropagation
Boundary

sources: rumelhart-1986-backprop, baydin-2018-ad-survey

Check

Open the closest source note before trusting the local explanation.

Evidence

2 selected-object sources shown first; 2 references total.

Next move

Audit the claim boundary, then ask from the same selected object.

selected object source · paper · 1986Learning representations by back-propagating errorsRumelhart, Hinton, and Williams
Located CF editorial boundary

Grounds backpropagation as error signals propagated through hidden units to adjust network weights.

Used here as

Rumelhart, Hinton, and Williams introduce back-propagating error signals for adjusting weights; Baydin et al. frame backpropagation as reverse-mode automatic differentiation on computatio...

Caveat

Checks the differentiable feed-forward scalar-loss mechanism, not optimizer choice, biological plausibility, recurrent/dynamic variants, full batching, nonsmooth primitives, or stability....

Open source
selected object source · paper · 2018Automatic differentiation in machine learning: a surveyBaydin et al.
Located CF editorial boundary

Grounds the relationship between backpropagation, reverse-mode autodiff, and computation graphs.

Used here as

Rumelhart, Hinton, and Williams introduce back-propagating error signals for adjusting weights; Baydin et al. frame backpropagation as reverse-mode automatic differentiation on computatio...

Caveat

Checks the differentiable feed-forward scalar-loss mechanism, not optimizer choice, biological plausibility, recurrent/dynamic variants, full batching, nonsmooth primitives, or stability....

Open source

Claim Review

Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.

Object - ConceptBackpropagationQuestion

What is the smallest example that makes Backpropagation click without losing the math?

concept:calculus/backpropagation
Boundary

sources: rumelhart-1986-backprop, baydin-2018-ad-survey

Check

Treat every claim as provisional until source support and a local witness agree.

Evidence

1 structured claim check on this concept.

Next move

Run the prediction or practice transfer before asking for a grounded review.

1 CF editorial source-scope review recorded

Publisher-side editorial review is not independent replication. Claims without it still need exact source-support review. 2 references and 3 local witnesses are available for inspection.

Backpropagation computes neural-network gradients by storing needed forward-pass values, then applying the chain rule backward from a scalar loss: each layer receives a downstream sensitivity, combines it with local derivatives/VJPs, and reuses that signal to form parameter gradients in one reverse pass.
Used here as

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 efficie...

Local witness
Equation 1
h0=x,z=Wh1+b,h=ϕ(z),h_0=x,\qquad z_\ell=W_\ell h_{\ell-1}+b_\ell,\qquad h_\ell=\phi(z_\ell),
Caveat

Checks the differentiable feed-forward scalar-loss mechanism, not optimizer choice, biological plausibility, recurrent/dynamic variants, full batching, nonsmooth primitives, or stability. Reverse-mode system...

Review stateCF editorial source-scope reviewClaim metadata: source checkedPublisher-side editorial review only; not independent replication. 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-07

Practice notebook

Use the idea, then test it somewhere new

Backpropagation applies reverse-mode autodiff to neural networks so one scalar loss can train many parameters.

AttemptNo learning claim inferred
Object - ConceptBackpropagationQuestion

What is the smallest example that makes Backpropagation click without losing the math?

concept:calculus/backpropagation
Boundary

sources: rumelhart-1986-backprop, baydin-2018-ad-survey

Check

Use one state from Backpropagation to explain what changes, why it changes, and which assumption the explanation needs.

Evidence

No learner move yet; no learning state is inferred.

Next move

Write first, use only the help you need, then try a new case without it.

Explain

Use one state from Backpropagation to explain what changes, why it changes, and which assumption the explanation needs.

Hint 1

Reveal when your model needs a nudge.

Hint 2

Reveal when your model needs a nudge.

Hint 3

Reveal when your model needs a nudge.

Grounded object roomClose
Selected object routeAsk from this object; carry one invariant back.sources: rumelhart-1986-backprop, baydin-2018-ad-survey
  1. ObjectConceptBackpropagation
  2. PredictBefore revealBackpropagation prediction
  3. WitnessCompare codeBackpropagation code witness 1
  4. RoomAsk groundedChecking local snapshot
ConceptBackpropagationCalculus
Code witness comparisonBackpropagation code witness 1x = np.array([[0.5], [-1.0]])Prediction before revealBackpropagation predictionManipulate one control and predict the visible change.
Grounded room questionWhat is the smallest example that makes Backpropagation click without losing the math?Checking local snapshot

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.
Next local actionNo local draft saved yet

Open the draft below to save one note and next action in this browser.

conceptCalculus

Backpropagation

Anchored question

What is the smallest example that makes Backpropagation click without losing the math?

Source boundaryInspect source ids: rumelhart-1986-backprop, baydin-2018-ad-surveyStable content-object key attached
Role lenses for this object

These are fixed, deterministic perspectives derived from the selected object. They do not represent people, community contributions, or independent review.

Learner evidence requestAsk what would make "Backpropagation" feel predictable rather than familiar.
Assumption

Source ids rumelhart-1986-backprop, baydin-2018-ad-survey must support the exact object, not just the surrounding topic.

Source-checking summary

Treat this as a mechanism object: connect the definition to one equation, code witness, or demo before broadening the discussion.

Proposed experiment

Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo.

Next action

The learner can state the mechanism in their own words

Evidence4 checks
PredictionChecking carried observation
ActionReady for one action
AILearner handoff ready
Open source object
01PredictionChecking browser-local route memory
02EvidenceChecking for a carried observation
03BoundaryInspect source ids: rumelhart-1986-backprop, baydin-2018-ad-survey
04Next moveSave one next action
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
Local action draft

This draft stays locally in this browser for concept:calculus/backpropagation.

No local draft saved.
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
Object-attached AI handoff

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 Deterministic role lenses for this object: - Boundary: fixed perspectives, not people, community contributions, or independent review - Source-checking summary: Treat this as a mechanism object: connect the definition to one equation, code witness, or demo before broadening the discussion. - Proposed experiment: Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo. - Teach/transfer move: Turn the mechanism into one sentence that predicts a neighboring concept. - Assumptions: - Source ids rumelhart-1986-backprop, baydin-2018-ad-survey must support the exact object, not just the surrounding topic. - The stable content-object key lets local drafts, prompts, and route memory attach without changing the source page. - The concept explanation is local atlas prose until checked against its math, code, and source support. - Prerequisite gaps should become a repair route, not a reason to leave the object vague. - Role-lens requests: - Learner: ask for "Ask what would make "Backpropagation" feel predictable rather than familiar." | assumption: Source ids rumelhart-1986-backprop, baydin-2018-ad-survey must support the exact object, not just the surrounding topic. | next action: The learner can state the mechanism in their own words - Researcher: ask for "Source ids to inspect: rumelhart-1986-backprop, baydin-2018-ad-survey" | assumption: The stable content-object key lets local drafts, prompts, and route memory attach without changing the source page. | next action: The learner can name the prerequisite that would repair confusion - Experimenter: ask for "Choose one variable or condition to perturb before asking for an explanation." | assumption: The concept explanation is local atlas prose until checked against its math, code, and source support. | next action: The learner can predict how the mechanism changes under one perturbation - Professor: ask for "Find the smallest transferable rule a learner could reuse without the AI." | assumption: Prerequisite gaps should become a repair route, not a reason to leave the object vague. | next action: Teach or transfer: Turn the mechanism into one sentence that predicts a neighboring concept. 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. Current deterministic role lens for this object: - Role lens: Learner - Evidence request: Ask what would make "Backpropagation" feel predictable rather than familiar. - Assumption to keep visible: Source ids rumelhart-1986-backprop, baydin-2018-ad-survey must support the exact object, not just the surrounding topic. - Proposed experiment: Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo. - Next action: The learner can state the mechanism in their own words

concept/concept-notebook/calculus/backpropagation concept:calculus/backpropagation