Backpropagation asks for the loss derivative with respect to each parameter: the exact number that says how the loss moves when that parameter moves. This lesson reuses the exact forward values from the tiny network and sets up the reverse chain rule on the same computation graph. The goal is to make the backward pass feel like graph arithmetic, not a separate trick.

highlighted = computed this step

The gradient question

Backprop asks for dL/d(each weight): the exact rational gradient of the loss with respect to that parameter. It says which way the loss moves if that one weight moves. The chain rule computes those quantities by walking the already-shown graph in reverse.

dLd(parameter)by the chain rule\frac{dL}{d(\text{parameter})}\quad\text{by the chain rule}
Forward recapThe loss node supplies the first exact gradient.Forward recapThe loss node supplies the first exact gradient.forward pass (all exact)quantityrulevaluez11*1 + 1*2 - 12h1ReLU(z1)2z21*1 - 1*2 + 0-1h2ReLU(z2)0yhat1*2 + 1*0 + 02L(yhat - 3)^21

Forward values we reuse

The forward pass ended with yhat=2 and L=1. Those exact node values are the inputs to the backward pass. Backprop attaches a second register to the same nodes, recording how the final loss depends on each one.

y^=2,L=1\hat y=2,\quad L=1
Forward recapThe loss node supplies the first exact gradient.Forward recapThe loss node supplies the first exact gradient.forward pass (all exact)quantityrulevaluez11*1 + 1*2 - 12h1ReLU(z1)2z21*1 - 1*2 + 0-1h2ReLU(z2)0yhat1*2 + 1*0 + 02L(yhat - 3)^21

Summary

The backward pass starts at the loss and moves in reverse. Each node receives an incoming gradient, multiplies by its local derivative, and passes the result to the nodes that fed it. The next step computes dL/dyhat.

Ly^hzw,bL\rightarrow\hat y\rightarrow h\rightarrow z\rightarrow w,b
Forward recapThe loss node supplies the first exact gradient.Forward recapThe loss node supplies the first exact gradient.forward pass (all exact)quantityrulevaluez11*1 + 1*2 - 12h1ReLU(z1)2z21*1 - 1*2 + 0-1h2ReLU(z2)0yhat1*2 + 1*0 + 02L(yhat - 3)^21