How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Reverse mode computes the exact gradient of the real-arithmetic graph
Statement
For a finite program with one scalar output , on a fixed strict branch and at every admissible , the reverse-mode algorithm returns , the gradient of . More precisely, at any operation node , if its value is temporarily treated as an independent variable and all later operations are recomputed from it, then the accumulated cotangent at is the derivative of the scalar output with respect to that independent node value.
Facts & Assumptions
Given: The graph, its admissible input , and a fixed strict branch.
Finite straight-line computational programs and real-arithmetic tapes: the output is obtained from finitely many primitive nodes in topological order, and repeated parent slots are distinct edges.
A finite straight-line C1 program defines a C1 map on each fixed strict branch: every node map is on the fixed branch.
Reverse-mode automatic differentiation for a scalar graph output: reverse mode initializes operation and input cotangents to zero, seeds the scalar output node with cotangent , and adds to each parent slot in reverse topological order.
The chain rule for total derivatives: : the derivative of a composition is the ordered composition of its total derivatives.
Proof
For each input or operation node , define a directed path from to the output by choosing one parent slot at each successive operation; when , include the length-zero path. Associate to an edge from parent slot of node the linear map at the stored primal arguments. Repeated slots give separate edges.
Fix a node and form the downstream map by replacing its value with an independent while holding earlier node values fixed and then evaluating later operations in topological order. Repeated use of [F4] shows that the derivative contribution along a fixed path from to is the ordered product of its edge maps. At each operation, its derivative is linear in the concatenated parent direction, so contributions from distinct parent slots add. If , the output is and the length-zero path contributes the identity; if there is no path from to , is locally constant and the sum is zero. Thus is the sum of the path products over all paths from to , and its cotangent is the transpose of that sum applied to .
The output-node path sum is the identity scalar , matching the unit seed in [F3], whether the output is an input or an operation. For every other node, each path to begins with exactly one outgoing parent-slot edge , followed by a path from to . Hence its path-sum recurrence is , with an additional identity seed only when ; this is exactly the initialization and accumulation in [F3]. Reverse induction gives at operation nodes and, at inputs, .
The algorithm returns precisely those input cotangents, proving the statement.
Depends on
Used by
- Forward and reverse derivatives on a shared-expression graph Example
- Reverse-mode differentiation of an Euler trajectory tape Example
- Forward-over-reverse mode computes the Hessian-vector product Theorem
- Local Jacobian perturbations give a pathwise bound for graph-gradient error Theorem
- The reverse recursion is the exact gradient of a finite state-step objective Theorem
- Uniform-block and binomial checkpoint schedules preserve reverse adjoints with stated costs Theorem
Dependency tree · two levels
9 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- MIT OpenCourseWare 18.S096, Matrix Calculus for Machine Learning and Beyond, complete lecture notes, Chapter 8 §§8.3–8.4.1 (standard reference, not scraped)
- Atilım Güneş Baydin and Barak A. Pearlmutter, Automatic Differentiation of Algorithms for Machine Learning, complete arXiv text, §§2–3 (standard reference, not scraped)