The paper's central argument is about the backward pass. With an identity shortcut, the gradient reaching earlier layers always includes a copy of the upstream gradient, so it cannot vanish through the shortcut alone.
Implement identity_path_gradient(grad_out, jac_f), returning grad_out (I + J_F) for a row-vector gradient.
jac_f is the (D, D) Jacobian of the residual branch.Write grad_out @ (I + jac_f), which equals grad_out + grad_out @ jac_f.
No results yet
Run your code to check it against the examples, or submit to run every test.