One neuron, one knob — the derivative is a prediction
Before chains and layers: one knob. The neuron computes y = w·x, the loss is how far y is from the target. The gradient claims: "nudge w by a tiny ε and the loss will change by gradient×ε." That's a testable prediction — press the wiggle button and we compare the claim against an actual measured nudge.
x = 1.5, target = 3.0, loss = (y − target)². The "predicted" number uses the analytic gradient 2x(wx−t); the "measured" number actually recomputes the loss at w+ε.
The chain rule — blame is a product, and one zero kills it
Now put three blocks in a row: y = w₂ · ReLU(w₁·x). How much is w₁ to blame for the final loss? Multiply the local slopes along the path — that's the whole chain rule. Each box below shows its live local slope; the product is compared against a real measured wiggle of w₁. Then drag w₁ negative and watch the ReLU box flatline the entire chain.
x = 1.0, target = 2.0. Chain shown: dLoss/dw₁ = dLoss/dy · dy/dh · dh/da · da/dw₁ — four local slopes, one multiplication.
Forward glow, backward blame — train a real net, live
This is an actual 2-2-1 neural network learning XOR in your browser — the classic problem a single neuron can't solve. Gold glow flowing right is the forward pass (activations); the numbers on each edge are that weight's current blame from the last backward pass. Press auto and watch the loss die. Then press the sabotage button.
Real gradients, real training — sigmoid activations, learning rate 2.5, the four XOR examples each step. Nothing is scripted; the zero-init freeze is the genuine mathematics of symmetry.
The whisper chain — make the gradient vanish
Blame travels backwards as a product — and a sigmoid's local slope is at most 0.25. Stack layers and the product shrinks like 0.25 × 0.25 × … Drag the depth slider and read the bars: each bar is the actual measured gradient reaching that layer. At depth 15, layer 1 hears a whisper of 10⁻⁹ — it will effectively never learn. Then flip the activation to ReLU and watch the chain survive.
Bars are on a log scale and computed by running real backprop through the chain (weights 1.0, input 0.5) — not a formula overlay.
The avalanche — explode it, then clip it
Same chain, opposite disease. Make each layer's weight 1.8 and the backward product now grows exponentially: at depth 20 the front-layer gradient is in the tens of thousands. Take one training step with that and the weights leave orbit — the loss readout goes to infinity. Now switch on clipping, which caps the gradient's overall size before the step, and the same net trains calmly.
The gradient norm and post-step loss are computed from the actual chain each click. Linear layers used here to isolate the product effect.