The Backward Pass
Backward from the Loss
The first backward signal comes from the squared-error loss. Once dL/dyhat is known, the output weights, output bias, and hidden activations receive their gradients by multiplying that signal by local inputs or local edge weights. This is the chain rule in its smallest useful form: upstream gradient times local derivative.
Backward from the loss
Squared error gives dL/dyhat=-2 because yhat=2 and y=3. This is the upstream signal for the output node: if yhat moves upward, the loss moves by this exact signed amount. Descent later steps against this gradient.
Output-layer parameter gradients
The output weights multiply the hidden activations. Since h1=2 and h2=0, the exact gradients are dL/dv1=-4, dL/dv2=0, and dL/dc=-2. Each value says how the loss changes when that output parameter moves, with the hidden activations held as the local inputs.
Back into the hidden activations
The same output gradient flows through v1 and v2. Here dL/dh1=-2 and dL/dh2=-2. This mirrors the edge from h to yhat: the incoming gradient is multiplied by the local edge weight before it reaches the hidden activation.