The Autograd Engine: Rules Belong to the Nodes, Order to the Topological Sort
Automatic differentiation in a hundred lines of Python: a Value class builds the graph, _backward closures hold the local rules, a topological sort does the global scheduling. And why += is the Σ from multi-path summation.