AI Research Scientist · Deep Network Training Basics
Backpropagation through deep networks
Backpropagation through deep networks
Backpropagation
Backpropagation is the chain-rule algorithm that computes the gradient of the loss with respect to every parameter in a multi-layer network by propagating that gradient backward through the computation graph.Tracing the backward pass
- 1Seed the loss gradientSet at the loss node—the starting upstream gradient for the whole backward sweep.
- 2Multiply by each local derivativeAt every node, multiply the upstream gradient by that operation’s local derivative, using the forward pass’s cached values.
- 3Propagate backward until parametersPass the product to each input node, moving edge by edge until every parameter holds its chain-rule gradient, summing shared paths.
- 1Compute and cache it.WhyBackprop will reuse this node’s cached inputs: and .
- 2Compute and cache it.Why is needed to compute later.
- 3Compute .WhyThis is where the backward sweep seeds its gradient at 1.
Recall check from the same lesson
During the backward pass, if you discard the cached intermediate values from the forward pass, you can still compute correct gradients as long as you know the final loss value.
Review the explanation
Answer: False. Local derivatives at each node (like $\partial L/\partial v = 2v$) are evaluated using the specific cached forward-pass values, not just the final loss. Without $v$ and the other cached values each node's derivative depends on, those local derivatives can't be recomputed correctly, so gradients would be wrong or undefined.
Sources
One sitting · 20–30 minutes
A focused session on your AI Research Scientist interview
LearnBench starts from what you already know — skip what you have, master what you’re missing.
Start now