Alphabeta Math
Pipeline-generated
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.

✓ 13 results · all verified · 1 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 12 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Automatic differentiation and computational graphs

1 · Prerequisites

2 · Summary

A computational graph here is a finite, topologically ordered real-arithmetic program with differentiable primitive maps and a scalar output. The primal tape records exact graph values and parent slots. Forward mode propagates a tangent in one pass; reverse mode accumulates cotangents from the scalar output. Their correctness follows from the chain rule along the graph, including repeated parent slots. The stated work bound assumes a fixed bounded-arity primitive set whose local pullbacks cost a bounded multiple of their primal work; opaque solver calls need their own rules and costs.

For C2 primitives, forward-over-reverse differentiates the reverse recurrence to produce a Hessian-vector product without forming a Hessian matrix. Branchwise derivatives apply only on a strict active branch; a branch boundary returns NONDIFFERENTIABLE. Checkpointing includes a uniform finite-memory fallback and a separate binomial schedule with explicit replay, storage, and work bounds. Both rely on deterministic replay of the same state and primitive inputs.

Implicit differentiation gives the derivative of a local solution branch only when the residual state Jacobian is nonsingular. A stopped iteration instead differentiates its finite composition; the page bounds that sensitivity under a contraction and gives a residual bound for the implicit sensitivity formula evaluated at an approximate state. The graph-gradient perturbation theorem propagates specified local Jacobian errors. The certified mathematical solve-Jacobian lemma supplies explicit inverse-defect, primal-residual, and rounded-pullback allowances using the finite-precision residual interface; factor-output derivatives retain their own primitive rules.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: AI-adaptedProof: Not applicableOpen item page →

Finite straight-line computational programs and real-arithmetic tapes

Definition

Fix an input dimension n≥0, finitely many operation nodes 1,…,T, and a designated output node o, either an input coordinate or an operation, whose value space is R. Give input coordinate i a label ini distinct from all operation indices, and set zini=xi and Eini=R with its standard Euclidean inner product. Operation node j has an ordered list of parent slots pj,1,…,pj,rj; each slot is either an input label ini or an operation index ℓ<j. Repeated parent slots are allowed and count separately. The graph is a finite straight-line program because every operation reads only earlier values and there are no data-dependent loops.

For each operation j, choose a dimension dj≥0, set Ej=Rdj with its standard Euclidean inner product, take an open set Uj⊆Epj,1×⋯×Epj,rj with the product inner product, and choose a primitive map ϕj:Uj→Ej. A smooth primitive is C1: it is totally differentiable and its derivative matrix is continuous. For Hessian-vector products require the primitive to be C2, meaning C1 with a continuously differentiable derivative map. Derivatives are represented in these coordinates, and every transpose is the Euclidean transpose for the stated inner products; the gradient of a scalar output is the Euclidean gradient. The real-arithmetic primal recursion is zj=ϕj(zpj,1,…,zpj,rj) whenever the parent tuple lies in Uj. Its admissible input domain is the set of x∈Rn for which every operation in this recursion is defined. The graph's scalar output function f is the value at o: it is xi when o is input coordinate i, and zj when o is operation node j.

The primal tape is the finite ordered record of input and node values, parent-slot indices, primitive identities, and (when applicable) selected branch labels. A deterministic replay starts from the identical checkpoint state and applies the identical primitive maps in the identical order, so it reproduces the same real-arithmetic values and local derivative inputs. Opaque solver calls are not primitive operations unless their complete deterministic map and derivative rule are explicitly supplied.

A piecewise-C1 primitive is specified by finitely many open branch regions and a C1 formula on each region; its primal boundary value, if any, is specified separately. If the current parent tuple lies strictly inside exactly one declared branch, the program uses that branch and its derivative. At a branch boundary or ambiguous branch selection, forward or reverse AD returns NONDIFFERENTIABLE; it does not silently choose a subgradient or generalized derivative. If no primal value is specified at a boundary, that input is outside the program's domain. All correctness theorems below apply on a fixed strict branch. The same convention applies to piecewise-C2 primitives for Hessian-vector products.

LemmaStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

An implicit sensitivity evaluated at an approximate state has a local residual bound

Statement

Let R(z,θ) be C2 near an exact solution R(z∗,θ0)=0, with A(z)=Rz(z,θ0) invertible and B(z)=Rθ(z,θ0). The implicit sensitivity at a state z is S(z)=−A(z)−1B(z). Suppose the local inverse Ψ of z↦R(z,θ0), supplied near z∗ by the implicit function theorem, is defined on a convex residual neighborhood containing 0 and r=R(z~,θ0), with ∥DΨ(y)∥≤κ along their segment. Suppose also that the segment from z∗ to z~=Ψ(r) lies in a convex neighborhood where ∥A(z)−1∥≤M, ∥B(z)∥≤B0, and A,B are Lipschitz with constants LA,LB. Then ∥S(z~)−S(z∗)∥≤κ(M2LAB0+MLB)∥r∥. This bounds the implicit sensitivity formula evaluated at an approximate state. It is not by itself a bound for the derivative of a stopped iteration.

Facts & Assumptions

Given: The exact root, local inverse chart, residual, inverse-norm and Lipschitz bounds in the statement.

[F1]

The Euclidean implicit function theorem with derivative formula: if the state Jacobian of a C1 residual is invertible at a zero, there is a local C1 solution branch and its derivative formula; applying the theorem to R(z,θ0)−r=0 gives the local inverse Ψ(r).

[F2]

On a convex open set, a uniform bound ∥Df(z)v∥2≤M∥v∥2 implies ∥f(y)−f(x)∥2≤M∥y−x∥2: on a convex open set, a uniform derivative bound ∥Df(z)v∥≤M∥v∥ implies ∥f(y)−f(x)∥≤M∥y−x∥.

[F3]

The chain rule for total derivatives: D(g∘f)(a)=Dg(f(a))∘Df(a): the derivative of a composition is the composition of the derivatives at the corresponding points.

[A1]

The residual segment lies inside the inverse chart and the state segment lies inside the neighborhood where all stated bounds hold.

Proof

technique · first control state error by residual, then perturb the inverse-Jacobian formula
1.1F1F2F3A1given

For 0<t<1, put γ(t)=Ψ(tr). By [F1] and [F3], γ is differentiable and ∥γ′(t)∥=∥DΨ(tr)r∥≤κ∥r∥. For 0<ε<1/2, apply [F2] to γ on the convex open interval (0,1) at ε and 1−ε to obtain ∥Ψ((1−ε)r)−Ψ(εr)∥≤κ(1−2ε)∥r∥. Letting ε↓0 and using continuity of Ψ at 0 and r gives ∥z~−z∗∥≤κ∥r∥.

1.2givenalgebra

Put A=A(z~), A∗=A(z∗), B=B(z~), and B∗=B(z∗). The identities S(z~)−S(z∗)=(A∗−1−A−1)B+A∗−1(B∗−B) and A∗−1−A−1=A−1(A−A∗)A∗−1 follow by expansion and multiplication.

2.1A1step 1.2givenalgebra

The inverse bounds, B bound, and Lipschitz bounds give ∥A∗−1−A−1∥≤M2LA∥z~−z∗∥ and ∥B∗−B∥≤LB∥z~−z∗∥. The triangle and product inequalities then yield ∥S(z~)−S(z∗)∥≤(M2LAB0+MLB)∥z~−z∗∥.

3.1F1step 1.1step 2.1algebra∎

Substitute step 1.1 into step 2.1 to obtain the asserted residual bound. If r=0, local uniqueness gives z~=z∗ and the same inequality reads 0≤0.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Implicit differentiation and adjoint formulas under a nonsingular residual Jacobian

Statement

Let R:Θ×Z→Rm be C1, where Θ⊆Rp and Z⊆Rm are open. Suppose R(θ0,z0)=0 and the state Jacobian Rz(θ0,z0) is invertible. The Euclidean implicit function theorem gives a local C1 solution branch z=ϕ(θ), and Dϕ(θ0)=−Rz(θ0,z0)−1Rθ(θ0,z0). For a scalar C1 objective J(θ,z), its derivative along that branch is D(J(θ,ϕ(θ)))∣θ0=Jθ−JzRz−1Rθ. Equivalently, if λ solves RzTλ=JzT, this derivative is Jθ−λTRθ. These formulas concern the exact local solution branch; differentiating a stopped iteration is a separate finite-map derivative.

Facts & Assumptions

Given: The residual equation, a C1 residual, a square nonsingular state Jacobian, and a scalar C1 objective.

[F1]

The Euclidean implicit function theorem with derivative formula: when both block dimensions are positive, a C1 Euclidean residual with zero value and invertible state-block derivative has a unique local C1 solution branch and Dϕ=−Rz−1Rθ.

Proof

technique · differentiate the exact solution identity
1.1F1givenalgebra

If m=0, the state space is a singleton, its unique linear map is its own two-sided inverse, and the sole branch has zero derivative, as does the displayed formula. If m≥1 and p=0, the parameter space is a singleton. Write A=Rz(θ0,z0). Differentiability gives R(θ0,z0+v)=Av+o(∥v∥2); since ∥Av∥2≥∥v∥2/∥A−1∥2, this has no other zero for sufficiently small nonzero v. Thus the singleton branch is locally unique and has zero derivative, again the displayed formula. If p,m≥1, apply [F1] to obtain the local C1 branch and Dϕ=−Rz−1Rθ.

2.1F1F2step 1.1algebra

The map θ↦J(θ,ϕ(θ)) is C1. By [F2], its derivative at θ0 is Jθ+JzDϕ. Substituting step 1.1 yields Jθ−JzRz−1Rθ.

3.1givenstep 2.1algebra∎

Since Rz is invertible, RzT is invertible. The adjoint equation has the unique solution satisfying λT=JzRz−1, by transposing RzTλ=JzT. Therefore JzRz−1Rθ=λTRθ, giving the stated adjoint formula.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

Forward-mode automatic differentiation on a finite computational graph

Definition

Input a graph from Finite straight-line computational programs and real-arithmetic tapes, an admissible point x, and a direction v∈Rn. Require every primitive to be C1 on its declared open domain or supplied as a piecewise-C1 primitive with the branch rules of the graph definition. Evaluate all primal node values in topological order and store the tape. Set each input tangent to z˙ini=x˙i=vi, using the distinct input labels of the graph. For each operation j=1,…,T, compute z˙j=Dϕj(zpj,1,…,zpj,rj)(z˙pj,1,…,z˙pj,rj). Return the primal scalar output f(x) and its tangent: return (zo,z˙o) if o is an operation node, and (xi,vi) if o is input coordinate i. If the input is outside the admissible domain, return DOMAIN_ERROR; if a piecewise primitive is at a branch boundary or has no unique strict active branch, return NONDIFFERENTIABLE and no tangent. All derivative evaluations in this definition are exact real-arithmetic operations on the specified primitive maps.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

Reverse-mode automatic differentiation for a scalar graph output

Definition

Input a graph from Finite straight-line computational programs and real-arithmetic tapes and an admissible point x. Require every primitive to be C1 on its declared open domain or supplied as a piecewise-C1 primitive with the branch rules of the graph definition. Evaluate and store all primal values in topological order. Initialize every operation cotangent and every input cotangent to zero. Seed the scalar output by setting its cotangent to 1: if o is an operation, set zˉo=1; if o is input coordinate i, set xˉi=1. For j=T,T−1,…,1, and for every parent slot k=1,…,rj, compute the contribution cj,k=Dkϕj(zpj,1,…,zpj,rj)Tzˉj and add it to the cotangent accumulator of that parent: use xˉi if the parent is input coordinate i, and zˉℓ if it is operation node ℓ. If the same parent node occurs in multiple slots, add every slot contribution. Return the scalar output f(x) and the input cotangents (xˉ1,…,xˉn) as the Euclidean gradient. A point outside the admissible domain returns DOMAIN_ERROR; a branch boundary or ambiguous active branch returns NONDIFFERENTIABLE and no gradient. The procedure differentiates the real-arithmetic graph; it makes no floating-point error claim.

LemmaStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

A finite straight-line C1 program defines a C1 map on each fixed strict branch

Statement

For a finite straight-line program whose primitives are C1, the recursively defined admissible input domain is open on each fixed strict branch. The scalar output f is C1 there, and its total derivative is obtained by the ordinary chain rule through the primitive maps.

Facts & Assumptions

Given: The finite topologically ordered graph and its C1 primitive maps.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: each node reads only earlier parent slots, each primitive is C1 on an open domain, and the admissible input set requires every parent tuple to lie in that domain.

[F2]

Continuously differentiable maps, local inverses, and local diffeomorphisms: a map is C1 when it is totally differentiable at every point and its derivative matrix varies continuously.

[F4]

The chain rule for total derivatives: D(g∘f)(a)=Dg(f(a))∘Df(a): if g is totally differentiable at f(a) and f is totally differentiable at a, then g∘f is totally differentiable at a, with derivative Dg(f(a))Df(a).

Proof

technique · induction on the operation order
1.1F1F3givenconstruct

Begin with the open input domain Rn, whose coordinate maps are continuous and C1. Suppose the values through node j−1 are defined and continuous on an open set Ωj−1. The parent tuple gj(x)=(zpj,1(x),…,zpj,rj(x)) is continuous there. Thus Ωj:={x∈Ωj−1:gj(x)∈Uj} is open in Ωj−1, hence open in Rn, because Uj is open. This proves by finite induction that the full admissible domain is open.

2.1F1F2F4step 1.1algebra

For each operation j, assume its parent-node maps are C1 on Ωj. Their tuple gj is C1 componentwise. Since zj=ϕj∘gj, [F4] gives Dzj(x)=Dϕj(gj(x))Dgj(x). Both matrix factors vary continuously because ϕj and the parent maps are C1; hence Dzj is continuous and zj is C1 by [F2]. Thus every operation value is C1; the scalar output is C1 whether it is one of these operation values or an input coordinate projection.

3.1F1step 2.1∎

On a strict piecewise branch, the branch label is fixed on the open branch region and its primitive formula is C1; steps 1.1–2.1 therefore apply unchanged on that region. At a boundary the definition in [F1] returns NONDIFFERENTIABLE, so no derivative assertion is made there.

LemmaStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

A finite straight-line C2 program defines a C2 map on each fixed branch

Statement

If every primitive of a finite straight-line program is C2 on the selected open branch domains, then the real-arithmetic scalar output is C2 on each fixed strict branch.

Facts & Assumptions

Given: The finite graph has C2 primitive maps on its selected open branch domains.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: nodes are finite and topologically ordered; each primitive is a finite-dimensional map, and C2 means that its derivative map is C1.

[F2]

Chain sum product and composition rules for Banach derivatives: compositions of differentiable maps obey the chain rule, and products under bounded bilinear maps obey the product rule. In particular this applies to multiplication of finite-dimensional linear maps.

[F3]

A finite straight-line C1 program defines a C1 map on each fixed strict branch: the admissible input domain is open on each fixed strict branch.

Proof

technique · induction on the operation order
1.1F1F3givenalgebra

Each input coordinate map is linear and has constant derivative, so it is C2. Suppose all parent-node maps of operation j are C2. The tuple gj of parent values is C2, since it is a finite product of their coordinate maps; its domain is open by [F3].

2.1F1F2step 1.1

Write zj=ϕj∘gj. By [F2], Dzj=(Dϕj∘gj)Dgj. The map Dϕj is C1 by the C2 hypothesis, and gj is C1, so Dϕj∘gj is C1 by the chain rule. The derivative map Dgj is C1 because gj is C2. Matrix multiplication is a bounded bilinear map in finite dimensions, so the product rule in [F2] makes Dzj C1. Thus zj is C2 by the definition in [F1].

3.1F1step 1.1step 2.1∎

Induction through the finite operation list gives C2 for every operation value. The scalar output is therefore C2 whether it is one of these values or an input coordinate projection. On a strict branch the selected primitive maps stay fixed on an open neighborhood; no claim is made at branch switches.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

Uniform-block and binomial checkpoint schedules for reverse sweeps

Definition

The input is a finite sequence of deterministic C1 transitions Fj:Uj⊆Ej−1→Ej, j=1,…,T, between compatible finite-dimensional Euclidean spaces with open domains, a starting state x0∈E0, and a terminal cotangent xˉT∈ET. Every transition is evaluated on one fixed strict branch and has its exact local reverse rule. For T≥1, require the last transition's output space to be ET=R; when that scalar output is the objective, take xˉT=1. For T=0, the terminal value is x0 and its matching cotangent xˉ0 is supplied. A transition tape stores the local values needed by its exact reverse rule. A deterministic replay applies the same transition maps, in the same order, to the identical checkpoint state and therefore reproduces the same values and local derivative inputs. The procedure returns the terminal value and cotangent at x0; an invalid domain evaluation returns DOMAIN_ERROR, and a branch boundary returns NONDIFFERENTIABLE. A checkpoint schedule is permitted only when its saved states and all deterministic replays lie in these declared domains.

Uniform-block mode. For T=0, return x0 and the supplied cotangent without work. For T≥1, require an integer slot budget m≥1, set q=⌈T/m⌉, and during one forward pass save xjq for j=0,…,⌈T/q⌉−1 (all indices are below T). This uses at most m saved states. Partition the steps into blocks [a,b] with a=jq and b=min⁡(a+q,T). Process the blocks from last to first. Within one block, for ℓ=b,b−1,…,a+1, restore xa, replay Fa+1,…,Fℓ−1 without recording, evaluate Fℓ once while recording its local tape, apply its reverse rule to the current cotangent, and discard the one-step tape and replay workspace. Retain only the checkpoint states, the live state/cotangent, and the ordinary one-step reverse tape. Do not infer any optimality property of this schedule.

Binomial mode. Define C(d,0)=C(0,t)=1, and C(d,t)=C(d−1,t)+C(d,t−1) for integers d,t≥1. The top-level call takes nonnegative integer budgets d,t satisfying T≤C(d,t). For T=0, return (x0,xˉ0). For T≥1, allocate one scalar output register y. The recursive procedure REVERSE(a,N,d,t,xa,xˉa+N) consumes its starting state as the live primal state and its terminal cotangent as the mutable cotangent buffer; it returns only the cotangent at xa, retaining no terminal primal state. It requires integer indices 0≤a≤a+N≤T, nonnegative integer budgets d,t, and N≤C(d,t). If N=0, return the unchanged cotangent. If N=1, evaluate and record the unique transition, copy its scalar output to y if a+1=T, apply its local reverse rule, discard the tape and primal state, and return the input cotangent. If N≥2, then d,t≥1. Put L=min⁡(N−1,C(d,t−1)), R=N−L. Save xa in one checkpoint slot and replay the first L transitions into the live state xa+L without recording. Call REVERSE(a+L,R,d−1,t,xa+L,xˉa+N) on the right block, keeping the saved xa but no other primal state in the caller. Move the saved xa back into the live state, release its checkpoint slot, and tail-call REVERSE(a,L,d,t−1,xa,xˉa+L), using the cotangent returned by the right child. Return this left child's cotangent. No call frame retains a primal vector outside the explicit checkpoint slots. Invoke this procedure at a=0,N=T and return y with its returned initial cotangent. A recursive call with N>1 and d=0 or t=0 is a schedule failure; the capacity condition makes that branch unreachable.

The parameter d bounds the number of simultaneously saved state snapshots. The parameter t bounds, for each transition, the number of additional unrecorded forward evaluations beyond its one recorded evaluation. Both are finite integer inputs. This mode provides no numerical error estimate or optimality guarantee for arbitrary nonuniform primitive costs. For the storage count in the paired theorem, Rs bounds scalar storage for one full primal state. The binomial recursion may reuse one mutable cotangent workspace: each call consumes its terminal cotangent and returns the cotangent at its start, reusing the same buffer through both children. Let G bound the largest one-step tape and local reverse scratch, the constant number of live cotangent/work vectors, the scalar output register, and the scalar call-frame records; it excludes the d saved primal states and one live primal state.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableprecheck pendingOpen item page →

Differentiate a finite fixed-point iteration as a finite composed map

Definition

Input a finite-dimensional C1 map G(z,θ), a C1 initial-state map z0(θ), a parameter θ in an open subset of Rp, and an integer budget K≥0; the states lie in Rm, with p,m≥0. Use the specified maps z0 and G, with their exact derivative evaluations, as primitive maps on their declared open domains. Evaluate z0(θ) and then zk+1(θ)=G(zk(θ),θ) for k=0,…,K−1. A primitive-domain failure returns DOMAIN_ERROR; a branch boundary or ambiguous active branch returns NONDIFFERENTIABLE and no derivative. The admissible case requires every evaluation to remain in its declared domain and, for piecewise primitives, on a unique strict active branch.

Allocate an m×p Jacobian array J. For each state coordinate a=1,…,m, form the finite scalar-output graph for fa(θ)=(zK(θ))a by appending the coordinate projection to the finite recursion. For each parameter coordinate ℓ=1,…,p, call Forward-mode automatic differentiation on a finite computational graph on this graph at θ with direction eℓ, the ℓth standard basis vector of Rp, and put its returned tangent in Jaℓ. Propagate any DOMAIN_ERROR or NONDIFFERENTIABLE status from a call. Return (zK(θ),J) with status ITERATES_DIFFERENTIATED. For K=0 the recursion contains only the initial-state map. If m=0 or p=0, the corresponding loops are empty and J has the specified empty shape; the primal recursion is still evaluated. This procedure differentiates the K-step map actually specified by G,z0,K; it does not substitute the derivative of an exact fixed point.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableprecheck pendingOpen item page →

Forward-over-reverse Hessian-vector products

Definition

Input a C2 graph, a point x, and direction v. Run Forward-mode automatic differentiation on a finite computational graph and retain its primal tape and all input and operation tangents. If that call returns DOMAIN_ERROR or NONDIFFERENTIABLE, return the same status and stop without a Hessian-vector product. Otherwise initialize every operation and input cotangent and tangent-cotangent accumulator to zero. Seed the output by setting its cotangent/tangent-cotangent pair to (1,0): if o is an operation, set (zˉo,zˉ˙o)=(1,0); if o is input coordinate i, set (xˉi,xˉ˙i)=(1,0). In reverse topological order, for each node j and parent slot k, let Aj,k=Dkϕj(zpj,1,…,zpj,rj), compute cj,k=Aj,kTzˉj,c˙j,k=Aj,kTzˉ˙j+(DAj,k(zpj,1,…,zpj,rj)[z˙pj,1,…,z˙pj,rj])Tzˉj, and add cj,k and c˙j,k to the parent's cotangent and tangent-cotangent accumulators. Use (xˉi,xˉ˙i) for input coordinate i and (zˉℓ,zˉ˙ℓ) for operation node ℓ. If the same parent occurs in multiple slots, add every slot contribution. Return (xˉ˙1,…,xˉ˙n). Repeated parent slots receive separate additions. The admissible case requires every primitive evaluation to be in its declared domain and, for a piecewise primitive, on a unique strict active branch; a branch boundary or ambiguous selection returns NONDIFFERENTIABLE through the initial call. The transpose is the real Euclidean transpose, not a complex adjoint.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Forward mode computes the exact directional derivative of the real-arithmetic graph

Statement

Let f:Ω→R be the output of a finite C1 program on a fixed strict branch. For every admissible x∈Ω and direction v∈Rn, the forward-mode algorithm returns Df(x)v.

Facts & Assumptions

Given: The graph, admissible input, fixed strict branch, and direction v.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: each operation node is a primitive applied to its earlier parent values; the scalar output is either an input coordinate or an operation value.

[F2]

A finite straight-line C1 program defines a C1 map on each fixed strict branch: every node is C1 on the fixed branch, with derivative given by the chain rule through its parents.

[F3]

Forward-mode automatic differentiation on a finite computational graph: input tangents are vi, and each node tangent is the local derivative applied to its parent tangents.

[F4]

The chain rule for total derivatives: D(g∘f)(a)=Dg(f(a))∘Df(a): D(g∘h)(x)=Dg(h(x))Dh(x) under the stated finite-dimensional differentiability hypotheses.

Proof

technique · induction on the topological order
1.1F1F3givenalgebra

For each input coordinate map x↦xi, its directional derivative in direction v is vi, exactly the initialized tangent in [F3].

2.1F1F2F3F4step 1.1algebra

Suppose the tangent at every parent of node j equals the derivative of that parent value in direction v. The node map is the composition of its primitive with the tuple of parent maps. By [F2] and [F4], its directional derivative is Dϕj applied to that parent-direction tuple, which is exactly the tangent assigned by [F3]. Finite induction proves this identity for every node.

3.1F1step 1.1step 2.1∎

If o is an operation node, step 2.1 gives z˙o=Df(x)v. If o is input coordinate i, then f(x)=xi and step 1.1 gives the returned tangent x˙i=vi=Df(x)v. Thus in either case the algorithm returns the asserted directional derivative.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Reverse mode computes the exact gradient of the real-arithmetic graph

Statement

For a finite C1 program with one scalar output f, on a fixed strict branch and at every admissible x, the reverse-mode algorithm returns Df(x)T1, the gradient of f. More precisely, at any operation node i, if its value is temporarily treated as an independent variable and all later operations are recomputed from it, then the accumulated cotangent at i is the derivative of the scalar output with respect to that independent node value.

Facts & Assumptions

Given: The graph, its admissible input x, and a fixed strict branch.

[F1]

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.

[F3]

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 1, and adds DkϕjTzˉj to each parent slot in reverse topological order.

[F4]

The chain rule for total derivatives: D(g∘f)(a)=Dg(f(a))∘Df(a): the derivative of a composition is the ordered composition of its total derivatives.

Proof

technique · reverse induction on graph nodes
1.1F1F2construct

For each input or operation node i, define a directed path from i to the output by choosing one parent slot at each successive operation; when i=o, include the length-zero path. Associate to an edge from parent slot k of node j the linear map Dkϕj at the stored primal arguments. Repeated slots give separate edges.

2.1F1F2F4step 1.1constructalgebra

Fix a node i and form the downstream map Fi(u) by replacing its value with an independent u 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 i to o 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 i=o, the output is u and the length-zero path contributes the identity; if there is no path from i to o, Fi is locally constant and the sum is zero. Thus DFi(zi) is the sum of the path products over all paths from i to o, and its cotangent is the transpose of that sum applied to 1.

3.1F1F3step 2.1algebra

The output-node path sum is the identity scalar 1, matching the unit seed in [F3], whether the output is an input or an operation. For every other node, each path to o begins with exactly one outgoing parent-slot edge i→j, followed by a path from j to o. Hence its path-sum recurrence is zˉi=∑j,k:pj,k=iDkϕjTzˉj, with an additional identity seed only when i=o; this is exactly the initialization and accumulation in [F3]. Reverse induction gives zˉi=DFi(zi)T at operation nodes and, at inputs, xˉ=Df(x)T1.

4.1F3step 3.1∎

The algorithm returns precisely those input cotangents, proving the statement.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Reverse-mode work is a fixed multiple of primal work under explicit primitive-cost bounds

Statement

For a finite C1 graph on a fixed strict branch, fix a finite set of scalar/vector primitive types with at most r parent slots per operation and bounded dimensions. Suppose each operation j has primal work wj≥1, its local vector-Jacobian product costs at most cwj operations, and accumulating each parent-slot contribution costs at most a operations. Assume each invocation's retained local tape and peak pullback scratch use at most a fixed number of scalar entries. Let S be the scalar storage in the primal tape and input-gradient buffer, counting all input and node-value coordinates, per-node and per-parent metadata, branch labels, and retained local-tape entries. Then the exact reverse-mode algorithm for a scalar output uses at most (1+c+ar)∑j=1Twj operations for the primal evaluation, reverse sweep, and parent accumulations, and stores O(S) scalar entries. Opaque solver calls are excluded unless their primal and derivative costs satisfy the same hypotheses.

Facts & Assumptions

Given: A finite graph and the stated primitive-cost model, with W:=∑j=1Twj.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: there are finitely many topologically ordered nodes and the primal tape stores their values and parent slots.

[F2]

Reverse-mode automatic differentiation for a scalar graph output: reverse mode evaluates each primitive once in the primal pass, then visits each node once and applies one local vector-Jacobian product per node while accumulating a contribution for each parent slot.

[A1]

The primitive set has fixed finite type and bounded dimensions. Local primal, pullback, and parent-accumulation costs obey the constants wj,c,a,r in the statement; an opaque solver call has no uncharged derivative cost.

[A2]

The operation count is arithmetic work; allocating or zero-initializing the cotangent buffers is counted in storage rather than arithmetic operations.

[A3]

Each primitive invocation's retained local tape and peak pullback scratch use a uniformly bounded number of scalar entries; parent-slot temporary vectors have bounded dimensions because the primitive types and arities are fixed.

Proof

technique · direct operation and storage count
1.1F1F2A1A2givenalgebra

The primal pass evaluates each node once, so its cost is ∑jwj=W. The reverse pass makes one local pullback call at node j, costing at most cwj, and handles at most r parent slots, costing at most ar arithmetic operations. Since wj≥1, this node's reverse arithmetic work is at most (c+ar)wj. Summing over all nodes gives total arithmetic work at most (1+c+ar)W; cotangent-buffer initialization is storage under [A2].

2.1F1F2A1A3algebra∎

The primal tape, per-node local tapes, metadata, and input-gradient entries are counted in S. Reverse cotangents require one vector of the corresponding dimension per node; all these dimensions are among the node/input-value coordinates counted in S. At each node, [A3] bounds local scratch and parent-slot temporaries by a constant, so their peak storage is O(1)⊆O(S). Hence total storage is O(S); the bound says nothing about an opaque solver whose local tape or pullback cost was excluded in [A1].

Remarks

Baur–Strassen proves a separate nonscalar arithmetic-circuit complexity theorem over an infinite field. The local bound above is proved directly for a fixed smooth primitive set with explicit primal/pullback cost ratios; it does not extend the arithmetic-circuit theorem to arbitrary opaque procedures or claim that every differentiable primitive has a cheap derivative.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Uniform-block and binomial checkpoint schedules preserve reverse adjoints with stated costs

Statement

For the finite-dimensional C1 transition sequences on a fixed strict branch defined in Uniform-block and binomial checkpoint schedules for reverse sweeps, provided every schedule replay remains in the declared domains, both schedules return the same terminal value and initial-state cotangent as an uncheckpointed reverse sweep. In uniform-block mode, if T,m≥1, q=⌈T/m⌉, and the block lengths are r1,…,rs, excluding the initial forward pass used to save checkpoints, the number of additional unrecorded forward evaluations is exactly ∑ℓ=1srℓ(rℓ−1)/2, at most mq(q−1)/2. At most m checkpoint states are saved, with one live replay state and one local step tape. In binomial mode, C(d,t)=(d+td); any T≤C(d,t) steps can be reversed with at most d saved snapshots, one recorded forward evaluation and one reverse evaluation per step, at most t additional unrecorded forward evaluations per step, total work at most W^+W‾+tW, and storage G+(d+1)Rs. Here W is the total cost of one unrecorded full forward pass, W^ the sum of recorded one-step forward costs, W‾ the sum of local reverse costs, Rs bounds scalar storage for one primal state, and G bounds the largest one-step tape and local reverse scratch, the constant number of live cotangent/work vectors, the scalar output register, and scalar recursion-frame records, excluding saved states and one live primal state.

Facts & Assumptions

Given: The deterministic transitions, exact local reverse rules, and either schedule mode with its stated finite integer parameters.

[F1]

Uniform-block and binomial checkpoint schedules for reverse sweeps: uniform mode restores a saved block start and replays to each step; binomial mode splits a block into a left and right interval and reverses the right interval before the left.

[F2]

Reverse mode computes the exact gradient of the real-arithmetic graph: applying each exact local reverse rule once in reverse transition order gives the derivative of the composed real-arithmetic map.

[F3]

Finite straight-line computational programs and real-arithmetic tapes: replay is deterministic and a graph node's local reverse rule uses the primitive inputs on its tape.

Proof

technique · induction on replayed transitions and schedule capacity
1.1F1F2F3givenconstruct

If T=0, both schedules return the supplied pair (x0,xˉ0) unchanged. For T≥1 in uniform mode, deterministic replay from any block start xa reproduces the original xa+1,…,xb: the first replayed transition starts from the identical xa, and induction applies each same map Fj to the same preceding state. Thus the recorded local tape at step ℓ has the same primitive inputs as the original forward trajectory, so its reverse rule is the same one used by the full tape. Processing blocks and then their steps in decreasing order is exactly reverse transition order; [F2] gives the same terminal and initial cotangents.

1.2F1givenalgebra

A block of length r has replay prefix lengths r−1,r−2,…,0 before its r recorded local evaluations. Therefore its additional unrecorded evaluations total ∑j=0r−1j=r(r−1)/2. The number of blocks is s=⌈T/q⌉≤m, each rℓ≤q, so the sum is at most mq(q−1)/2. The checkpoint indices are 0,q,…,(s−1)q<T; T/q≤m, so s=⌈T/q⌉≤m. The initial forward pass uses T unrecorded evaluations; the displayed additional count concerns the subsequent block replays. Only those states, one live state, and one local tape are retained.

1.3F1givenalgebra

In binomial mode the recurrence and boundary values give C(d,t)=(d+td): the binomial coefficients have the same boundary values and Pascal recurrence, so induction on d+t identifies them. For d,t≥1, write A=C(d,t−1), B=C(d−1,t), so C(d,t)=A+B. If N≥2, L=min⁡(N−1,A) satisfies 1≤L<N; if L=N−1, then R=1≤B, and otherwise L=A and R=N−A≤B. Thus both recursive capacities hold and both child lengths are strictly less than N; the recursion terminates at N=1 or N=0.

2.1F1F2F3step 1.3construct

Induct on N. For N=0, the recursive procedure returns the unchanged cotangent. For N=1, deterministic evaluation records the exact transition inputs and its reverse rule returns the exact input cotangent. For N≥2, midpoint replay produces the exact xa+L by [F3]. By induction the right child returns the exact cotangent at that midpoint, and the left child returns the exact cotangent at xa. Every split partitions its steps into disjoint left and right intervals, processed in reverse order, so every step is recorded and reversed once. In particular the unique recorded evaluation of FT writes its exact scalar output into y; no other leaf changes y. Thus the top-level return has the same terminal value and initial cotangent as the ordinary reverse sweep.

3.1F1step 1.3step 2.1algebra∎

At a split, the saved starting state occupies one slot while the right child uses at most d−1 further slots and one live primal state. Once that child returns only its cotangent, the saved start is restored into the live state and its slot released; the left tail call has all d slots available. The leaves use no snapshots, so induction bounds the peak snapshot count by d. No recursive terminal vectors are retained; only the scalar output register survives the leaf for FT. A step in a right child has at most t replays by induction. A step in the left child is replayed once at the current split and then at most t−1 times in that child, hence at most t times total. Each step also has one recorded forward and one reverse call, giving work at most W^+W‾+tW. Each child decreases d+t by one, so even without eliminating tail frames there are at most d+t+1 active frames, each holding only a fixed number of scalar indices and flags. The cotangent buffer is reused, and the one-step tape, local scratch, scalar output and frame records are included in G. The saved states and one live primal state use at most (d+1)Rs entries, giving storage at most G+(d+1)Rs.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Finite fixed-point iteration sensitivity error bounds and the limits of residual control

Statement

Let p,m≥0, let Θ⊆Rp be open with θ0∈Θ, and let G:U→Rm be C2 on an open neighborhood U⊆Rm×Θ of D×{θ0}. Suppose D⊆Rm is an open convex neighborhood of z∗ and z∗=G(z∗,θ0). Assume G(D,θ0)⊆D, ∥Gz(z,θ0)∥≤q<1 on D, and Gz,Gθ are Lipschitz in z with constants Lz,Lθ. Let z0:Θ→Rm be C1, with the iterates at θ0 lying in D. Write s∗=Dϕ(θ0) for the local exact fixed-point branch (supplied by the implicit function theorem when p,m≥1), ek=Dθzk(θ0), δ0=∥z0(θ0)−z∗∥, d0=∥e0−s∗∥, and C=Lz∥s∗∥+Lθ. For every integer K≥1, ∥zK(θ0)−z∗∥≤qKδ0,∥eK−s∗∥≤qKd0+CKqK−1δ0, with q0=1 when q=0,K=1. If R(z,θ)=z−G(z,θ) and rK=R(zK(θ0),θ0), then (1−q)∥zK−z∗∥≤∥rK∥. The derivative error is not bounded by the residual alone: for G(z,θ)=qz+(1−q)θ, θ0=0, and z0(θ)=0, every finite K has residual zero at θ0 but eK=1−qK≠1=s∗ when 0<q<1.

Facts & Assumptions

Given: The C2 iteration map, invariant convex state neighborhood, contraction and derivative-Lipschitz bounds, fixed point, differentiable initial map, and finite iteration count.

[F1]

Differentiate a finite fixed-point iteration as a finite composed map: zk+1=G(zk,θ), and the procedure applies forward mode to the finite composition.

[F2]

The Euclidean implicit function theorem with derivative formula: for R(z,θ)=z−G(z,θ), an invertible Rz at a fixed point gives a local C1 solution branch and its derivative formula.

[F3]

Forward mode computes the exact directional derivative of the real-arithmetic graph: exact forward mode returns the derivative of the finite graph in every input direction.

[F4]
[A1]

The stated invariant-neighborhood, uniform derivative, Lipschitz, and initial-map hypotheses hold on the neighborhoods used below.

[F5]

On a convex open set, a uniform bound ∥Df(z)v∥2≤M∥v∥2 implies ∥f(y)−f(x)∥2≤M∥y−x∥2: on a convex open set, a uniform derivative bound ∥Df(z)v∥2≤M∥v∥2 implies ∥f(y)−f(x)∥2≤M∥y−x∥2.

[F6]

Every linear map between finite-dimensional real or complex inner product spaces admits a singular value decomposition: a finite-dimensional linear map has orthonormal singular-vector bases; a square map with no zero singular value is invertible.

Proof

technique · differentiate the finite recurrence and compare it with the fixed-point equation
1.1F6givenalgebra

Put A∗=Gz(z∗,θ0). For m=0, the unique endomorphism of R0 is invertible. For m≥1, the derivative bound gives ∥(I−A∗)v∥≥(1−q)∥v∥ for every v. By [F6], if I−A∗ had a zero singular value then it would annihilate a nonzero basis vector; hence all its m singular values are positive, and the SVD bases show I−A∗ is invertible. Thus Rz=I−A∗ is invertible in every state dimension.

2.1F2F5A1step 1.1algebra

Since ∥Gz(z∗,θ0)∥≤q, we have q≥0. Applying [F5] to z↦G(z,θ0) on the convex open set D gives ∥G(zk,θ0)−G(z∗,θ0)∥≤q∥zk−z∗∥; induction on the primal recurrence yields ∥zk−z∗∥≤qkδ0. If p,m≥1, apply [F2] to R(z,θ)=z−G(z,θ); the exact branch derivative satisfies s∗=A∗s∗+B∗, where B∗=Gθ(z∗,θ0). If p=0 and m≥1, then Θ={θ0}; contraction on D makes z∗ the unique fixed point there, so the constant branch has s∗=0=B∗ and the same identity. If m=0, the state space and all state-valued derivatives are zero-dimensional, and that identity is again immediate. Thus the fixed-point branch and identity used below hold in all allowed dimensions.

3.1F1F2F3F4step 2.1algebra

Because U is open, z0 is continuous, and the finite trajectory at θ0 lies in D, induction gives a neighborhood of θ0 on which each of the first K evaluations stays in U; hence every ek below exists. By [F4], the derivative of zk+1=G(zk,θ) is ek+1=Akek+Bk, where Ak=Gz(zk,θ0) and Bk=Gθ(zk,θ0); [F3] computes that exact finite-graph derivative. Subtract s∗=A∗s∗+B∗ to obtain ek+1−s∗=Ak(ek−s∗)+(Ak−A∗)s∗+(Bk−B∗).

4.1A1step 2.1step 3.1algebra

Set Dk=∥ek−s∗∥. Taking norms and applying the hypotheses gives Dk+1≤qDk+C∥zk−z∗∥≤qDk+Cδ0qk by step 2.1. For K=1 this gives D1≤qd0+Cδ0. If DK≤qKd0+Cδ0∑j=0K−1qK−1−jqj, then DK+1≤qK+1d0+Cδ0∑j=0K−1qK−jqj+Cδ0qK=qK+1d0+Cδ0∑j=0KqK−jqj. Induction proves the sum bound for every K≥1. Each summand equals qK−1, including the stated convention at q=0,K=1, so the sum is KqK−1.

5.1A1step 2.1step 3.1step 4.1algebra∎

The residual identity rK=(zK−z∗)−(G(zK,θ0)−G(z∗,θ0)) and the triangle inequality imply (1−q)∥zK−z∗∥≤∥rK∥. For the stated scalar example, z∗=θ, zk(0)=0 and rK=0; differentiating the recurrence gives ek+1=qek+(1−q), e0=0, hence eK=1−qK, whereas s∗=1. Thus a finite-iteration derivative is a different target even at zero primal residual, with its discrepancy still bounded by step 4.1.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Forward-over-reverse mode computes the Hessian-vector product

Statement

Let f be the scalar output of a finite C2 graph on a fixed strict branch. At every admissible x and direction v, the forward-over-reverse algorithm returns D(grad⁡f)(x)v, the Hessian-vector product Hf(x)v. No Hessian symmetry assumption is needed for this identity.

Facts & Assumptions

Given: The C2 graph, input x, and direction v.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: the program uses finite C2 real primitive maps on a fixed strict branch.

[F2]

A finite straight-line C2 program defines a C2 map on each fixed branch: the scalar output f is C2, so its gradient map is differentiable.

[F3]

Forward mode computes the exact directional derivative of the real-arithmetic graph: the forward tangent at each node equals the directional derivative of that node value.

[F4]

Reverse mode computes the exact gradient of the real-arithmetic graph: at each internal node, the reverse accumulator is the derivative of the downstream output with respect to an independent node value; at inputs it is the gradient of f.

[F5]

Forward-over-reverse Hessian-vector products: the reverse update is ATzˉj and its directional derivative update is ATzˉ˙j+(DA[z˙pa])Tzˉj.

[F6]

Chain sum product and composition rules for Banach derivatives: composition and bounded-bilinear product obey the chain and product rules; finite-dimensional matrix multiplication is such a product.

Proof

technique · differentiate the exact reverse recurrence in direction $v$
1.1F2F3F4given

By [F4], the input reverse accumulator is the function x↦grad⁡f(x). Since f is C2 by [F2] under the primitive hypotheses in [F1], its directional derivative at x exists. By [F3], the forward recurrence supplies every primitive-input direction z˙pa=Dzpa(x)v.

2.1F3F5F6step 1.1algebra

At a node j, the exact reverse contribution to parent slot i is ATzˉj. Since each primitive is C2, A is C1; the finite reverse recurrence is therefore differentiable, as it consists of sums and bounded bilinear matrix-vector products of C1 maps. Differentiate this matrix-vector product along x+tv. The product rule [F6] gives ATzˉ˙j+(DA[z˙pa])Tzˉj, exactly the second recurrence in [F5]. Reverse topological induction therefore shows that every zˉ˙i equals the directional derivative of the corresponding exact reverse accumulator. If the scalar output is an input coordinate, its seeded gradient is the constant coordinate vector and the initialized tangent-cotangent remains zero, as this recurrence also gives.

3.1F2step 2.1∎

At the inputs, step 2.1 identifies the returned vector with D(grad⁡f)(x)v, which by definition is Hf(x)v.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Local Jacobian perturbations give a pathwise bound for graph-gradient error

Statement

For a finite scalar-output graph on one fixed strict branch, associate to each parent-slot edge e the exact local derivative map Ae at the exact real-arithmetic primal values. Use induced Euclidean operator norms on all edge spaces. Suppose a reverse recurrence instead uses local maps A~e from the same branch satisfying ∥A~e−Ae∥≤ηe, with exact accumulation arithmetic. For an input block i, let P(i,o) be the finite directed paths from that block to output o, and order the edges of a path π=(e1,…,es) from input to output. The exact gradient contribution is the transpose of Aes⋯Ae1, and the perturbed recurrence returns the corresponding sum using A~e. It obeys ∥g~i−gi∥≤∑π∈P(i,o)∑ℓ=1sηeℓ(∏r<ℓ∥Aer∥)(∏r>ℓ(∥Aer∥+ηer)). The bound covers local Jacobian and derivative-evaluation errors represented by ηe. It does not include roundoff in the reverse accumulation additions.

Facts & Assumptions

Given: A finite C1 graph on a fixed strict branch, exact edge Jacobians Ae, perturbed edge Jacobians A~e, and exact real accumulation of the perturbed reverse recurrence.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: a graph is finite and acyclic, and each parent slot defines a separate edge with a local derivative map.

[F2]

Reverse mode computes the exact gradient of the real-arithmetic graph: exact reverse accumulation returns the gradient of the graph's scalar output.

[F3]

Composition satisfies |ST|\le|S|,|T|: induced operator norms satisfy ∥ST∥≤∥S∥ ∥T∥ for composable bounded linear maps.

[F4]

Cauchy–Schwarz: ∣⟨x,y⟩∣≤∥x∥ ∥y∥, with equality exactly for dependent pairs: Euclidean inner products satisfy ∣⟨x,y⟩∣≤∥x∥2∥y∥2.

[A1]

Each edge perturbation satisfies the stated operator-norm bound; all sums and products in this theorem are exact real arithmetic.

Proof

technique · expand reverse accumulation into paths and telescope each matrix product
1.1F1F2givenconstruct

Starting with output cotangent 1, the exact reverse recurrence at a node sums one local derivative-transpose contribution from each outgoing parent-slot edge. By induction in reverse topological order, its expansion at input block i has one ordered derivative product for every path from i to the output: the length-zero path at the output node has product 1 (including when the output itself is an input), and extending a path by one edge multiplies its product by that edge's local derivative. The same finite recurrence with A~e yields the sum of perturbed path products; the output seed is unchanged. By [F2], the exact path sum is gi.

1.2A1algebra

Fix a path π=(e1,…,es). Insert one factor at a time to write A~es⋯A~e1−Aes⋯Ae1=∑ℓ=1sA~es⋯A~eℓ+1(A~eℓ−Aeℓ)Aeℓ−1⋯Ae1. This identity follows by cancellation of consecutive products in the telescoping sum.

2.1A1F3F4step 1.2algebra

Submultiplicativity [F3] and [A1] bound the ℓth summand by ηeℓ∏r<ℓ∥Aer∥∏r>ℓ(∥Aer∥+ηer). A path product L maps an input block to R; writing w=LT1, Cauchy--Schwarz [F4] gives ∣Lx∣≤∥w∥2∥x∥2, with equality at x=w/∥w∥2 when w≠0, and both norms are zero when w=0. Hence ∥L∥=∥LT1∥2, so the operator-norm estimate also bounds the path's gradient-contribution error. Summing these bounds over ℓ controls the error on this path.

3.1step 1.1step 2.1algebra∎

The perturbed and exact gradients are finite sums over the same paths by step 1.1. The triangle inequality therefore bounds their difference by the sum of the pathwise errors from step 2.1, which is exactly the displayed bound.

RemarkRemark: AI-adaptedProof: Not applicableOpen item page →

Real-arithmetic graph derivatives and rounded execution are different objects

Remarks

The exact AD identities refer to the real-arithmetic graph and its exact primitive derivatives. A floating execution uses rounded primal values and derivative arithmetic; its returned AD quantity is not asserted to be the ordinary derivative of the end-to-end rounded machine map. The theorem Local Jacobian perturbations give a pathwise bound for graph-gradient error propagates specified local Jacobian discrepancies with exact accumulation and excludes rounding in reverse accumulation additions.

For a concrete mathematical solve primitive, Certified inverse defects and primal residuals bound linear-solve Jacobian and pullback errors supplies those discrepancies. With stored primal x^, fixed approximate inverse B assembled from basis solves, certified ∥I−AB∥2≤d<1, ∥b−Ax^∥2≤ρ, ∥B∥2≤M, and K=M/(1−d), the vector and matrix edges have ηb=Kd and ηA=Kd∥x^∥+K2ρ. Its additional explicit dot/outer-product allowances cover rounded pullback evaluation. Triangular, successful Cholesky, and QR backends are admissible once those residuals are certified; a small factorization residual alone is insufficient. The lemma includes the derivative-evaluation-point error, conditioning, arithmetic success and replay hypotheses.

For the implicit example, specify A(θ)=[1θ01], b=(2,1)T, x(θ)=A(θ)−1b, and objective J(θ)=(1,1)x(θ). Then x(θ)=(2−θ,1)T and J′(0)=−1. At θ=0, ordinary triangular substitution for the primal and basis solves gives x^=(2,1)T, B=I, and d=ρ=0. In Operationwise real and complex floating point arithmetic with rounded square roots and fused multiply-add, assume 1,2,3 are normal representable numbers. The solves, sequential dot products for BTc with c=(1,1)T, and outer product −(BTc)x^T have only representable results 0,±1,±2. Round-to-nearest therefore leaves every result exact. Contracting the matrix cotangent −[2121] with A′(0)=[0100] returns −1. This exactness follows from the specified operations and rounding rule; zero solve defects alone only remove the fixed-map discrepancy.

A Cholesky or QR factor-output primitive is a different smooth map from the mathematical solve. Its derivative must be evaluated on one fixed strict branch, with its own local derivative errors, or its finite loop must be expanded into the scalar primitives of the graph. The solve bound does not identify a factorization residual with a factor-output derivative bound.

LemmaStatement: AI-adaptedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

Certified inverse defects and primal residuals bound linear-solve Jacobian and pullback errors

Statement

For the real mathematical solve primitive ϕ(A,b)=A−1b, let A,B∈Rn×n, b,x^∈Rn, n≥1, and suppose certified exact-residual bounds satisfy ∥I−AB∥2≤d<1,∥b−Ax^∥2≤ρ,∥B∥2≤M,K=M1−d. Then A is invertible; writing x=A−1b, the fixed linear derivative approximations J~bh=Bh and J~AH=−BHx^ obey ∥J~b−Jb∥≤ηb=Kd,∥J~A−JA∥≤ηA=Kd∥x^∥2+K2ρ. Use Euclidean vector norms and Frobenius matrix-input norm. For any stored matrix B and stored cotangent c∈Rn, the exact adjoints are BTc and −(BTc)x^T. Let u be the unit roundoff in The standard relative floating-point model and unit roundoff, and assume nu<1. For each j=1,…,n, compute λ^j by the sequential real dot rule: pi=fl⁡(Bijci) for i=1,…,n, s1=p1, and si=fl⁡(si−1+pi) for i=2,…,n, with each product and addition rounded separately; set λ^j=sn. Form the matrix cotangent as the componentwise rounded outer product −fl⁡(λ^x^T). Assume every operation succeeds in the operationwise model Operationwise real and complex floating point arithmetic with rounded square roots and fused multiply-add: each exact intermediate is zero or normal and every rounded output is finite. Put γn=nu/(1−nu) and t=γn∥B∥F. The resulting cotangent errors are bounded by (ηb+t)∥c∥2 and [ηA+(t+u(M+t))∥x^∥2]∥c∥2, respectively. These are derivative approximations to the mathematical solve map, not derivatives of the rounded program.

The fixed B may be assembled from stored basis-vector solves using a triangular, Cholesky or QR backend; its defect must be certified rather than inferred from a factor residual. Replay must preserve the same x^,B and strict graph branch. Reverse accumulation additions are excluded.

Facts & Assumptions

Given: The stated exact-residual and norm certificates, with arithmetic success for any evaluated pullbacks.

[F1]

Implicit differentiation and adjoint formulas under a nonsingular residual Jacobian gives Jbh=A−1h, JAH=−A−1Hx by differentiating Ax−b=0.

[F2]

Rounded matrix products give certified linear and normal-equation residual allowances supplies explicit linear residual allowances for the primal and stored basis-column solves.

[F4]

Operationwise real and complex floating point arithmetic with rounded square roots and fused multiply-add: real products and additions are separately rounded operations, and the operationwise success condition excludes nonzero out-of-range exact intermediates.

[F5]

The standard relative floating-point model and unit roundoff: a successful nonzero real rounded operation has relative error at most u, and exact zero operations are exact.

[F6]

If |delta_i| <= u and n u < 1, then prod (1+delta_i) = 1 + theta_n with |theta_n| <= gamma_n: if ∣δi∣≤u for k factors and ku<1, then ∣∏i=1k(1+δi)−1∣≤γk=ku/(1−ku).

[F7]

Cauchy–Schwarz: ∣⟨x,y⟩∣≤∥x∥ ∥y∥, with equality exactly for dependent pairs: ∣⟨x,y⟩∣≤∥x∥2∥y∥2 for Euclidean vectors; applying it rowwise gives ∥Mz∥2≤∥M∥F∥z∥2.

[F8]

Composition satisfies |ST|\le|S|,|T|: induced operator norms satisfy ∥ST∥≤∥S∥ ∥T∥ for composable maps.

[F9]

The operator norm as the least bound and as the unit-sphere or unit-ball supremum: the operator norm is the unit-ball supremum and satisfies ∥Tz∥2≤∥T∥ ∥z∥2.

Proof

1.1givenF2F3F8F9algebra

For every z, ∥ABz∥≥(1−d)∥z∥ by [F9]. Applying [F3] to the square map AB, a zero singular value would give a nonzero right singular vector in its kernel, contradicting this lower bound; thus AB is invertible. Then B is injective and A is surjective. The square SVDs of B and A therefore also have no zero singular values, so [F3] makes both invertible. Applying the lower bound to z=(AB)−1y gives ∥(AB)−1∥≤1/(1−d). Since A−1=B(AB)−1, [F8] gives ∥A−1∥≤K. The identity B−A−1=A−1(AB−I) gives ∥B−A−1∥≤Kd, while x^−x=A−1(Ax^−b) gives ∥x^−x∥≤Kρ. The residuals in these identities are exact; [F2] explains how to certify them from rounded evaluations.

2.1F1F7F8F9step 1.1algebra

Apply [F1] at the exact point (A,b). For the matrix edge, BHx^−A−1Hx=(B−A−1)Hx^+A−1H(x^−x). Since ∥H∥2≤∥H∥F by [F7], submultiplicativity [F8], the operator action bound [F9], and step 1.1 give ηA; the vector edge gives ηb. For any linear map J between Euclidean spaces, ∥JTy∥=sup⁡∥x∥=1∣⟨JTy,x⟩∣=sup⁡∥x∥=1∣⟨y,Jx⟩∣≤∥y∥ ∥J∥ by [F7], so ∥JT∥≤∥J∥; applying this to JT gives equality. Thus the adjoint discrepancies have the same norm bounds. This explicitly accounts for the perturbed primal evaluation point through ρ.

3.1givenF4F5F6F7F9step 2.1algebra

Fix an output coordinate j of λ^ and put qi=Bijci. By success in [F4] and the relative bound in [F5], pi=qi(1+αi) with ∣αi∣≤u; exact-zero products have αi=0. For each addition i=2,…,n, write si=(si−1+pi)(1+βi) with ∣βi∣≤u, taking βi=0 when the exact sum is zero. Expanding gives λ^j=sn=∑i=1nqi(1+αi)∏k=max⁡(2,i)n(1+βk), with an empty product interpreted as 1. Each coefficient has at most n factors: for i=1 it has one product factor and n−1 addition factors, while for i≥2 it has one product factor and n−i+1 addition factors. Thus [F6], nu<1, and monotonicity of ku/(1−ku) imply that each coefficient differs from 1 by at most γn. Hence ∣λ^j−(BTc)j∣≤γn∑i∣Bij∣∣ci∣. Stacking these bounds and applying [F7] to ∣B∣T∣c∣ gives ∥λ^−BTc∥2≤t∥c∥2. By the adjoint norm equality in step 2.1 and the action bound [F9], ∥BTc∥2≤M∥c∥2, so ∥λ^∥2≤(M+t)∥c∥2. Each rounded outer-product entry has error at most u∣λ^ix^j∣, so its Frobenius error is at most u(M+t)∥x^∥2∥c∥2. Combining these bounds with step 2.1 gives the stated vector and matrix cotangent estimates.

4.1F7F9step 3.1algebraconstruct∎

For each realized nonzero c, any cotangent error vector z is the action on c of the linear map zcT/∥c∥2, whose induced norm is ∥z∥/∥c∥ by Cauchy--Schwarz [F7] and equality on c/∥c∥ [F9]; vectorize the matrix cotangent for the matrix edge. When c=0, successful operations return exact zero. Thus the realized rounded pullbacks admit local linear-map perturbations with the displayed bounds, without asserting global linearity of rounding. The graph perturbation theorem may propagate these realized maps with exact accumulation.

5 · Examples, counterexamples and false statements

None yet.

Sources