Chain rule: composing two functions' derivatives by hand (Math & Statistics) established that every "backward" this curriculum has written, 03-tanh's, 04-softmax's, is the chain rule applied to one specific operation's own local derivative. Building a GENERAL autograd engine (this track's final goal) means giving every basic arithmetic operation its own tiny, self-contained backward rule, one per operation, that the engine can call automatically once it knows which operations were used to build an expression.
This question is the very first, simplest one: addition. z = a + b's local derivative with respect to each input is about as simple as a derivative gets, and getting this one exactly right, and understanding WHY it's this simple, is the foundation every later, more complex backward rule in this track builds on.
Theory applies the chain rule to z = a + b: since each input's LOCAL derivative is exactly 1, the chain rule says the gradient flowing back to each input is just the upstream gradient, unchanged.
Implement add_backward(grad_output) against that reasoning. The signature and docstring are already in the editor.
grad_output is dL/dz, the gradient flowing IN from whatever used z = a + b's result.(dL/da, dL/db), in that order.Open one at a time. Each gives away a little more than the last.
d(a+b)/da = 1 and d(a+b)/db = 1, always, regardless of what a and b actually are.
The chain rule multiplies the local derivative by the upstream gradient: 1 * grad_output = grad_output, for both a and b.
Click "Run Tests" to test your implementation