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.

✓ 1 result · 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; all 1 also cleared it.

Automatic differentiation and backpropagation

1 · Prerequisites

2 · Logical flowchart

3 · Definitions, theorems and proofs

AlgorithmAlgorithm: Literature-sourcedProof: Not applicableOpen item page →

Backpropagation through a finite shared-parameter recurrence

Definition

Let p,q≥1, let Θ⊆Rp and H⊆Rq be open, let T≥0 be an integer, and fix θ∈Θ. A map is continuously differentiable here when it is totally differentiable at every point of its open domain and its derivative matrix varies continuously there. A finite shared-parameter recurrence consists of an initial-state map h0:Θ→H, transition maps Φt:Θ×H→H for t=1,…,T, and a scalar loss ℓ:Θ×H→R, all continuously differentiable on open domains containing the evaluated inputs. Put h0=h0(θ), ht=Φt(θ,ht−1), and J(θ)=ℓ(θ,hT). A fixed collection of external inputs, such as the observations at successive time steps, may be built into the maps Φt. The same parameter vector θ is supplied to every transition.

For each map, its registered local derivative is the total derivative with respect to the indicated variable while the other displayed variables are held fixed. Transposes are Euclidean adjoints for the stated coordinate inner products. Evaluate and store h0,h1,…,hT. If a map is undefined, return DOMAIN_ERROR. For piecewise-C1 maps, use only the derivative on a unique strict active branch; if any evaluated input lies on a branch boundary or has ambiguous branch selection, return NONDIFFERENTIABLE and no gradient.

Initialize λT=(Dhℓ(θ,hT))T and g=(Dθℓ(θ,hT))T. For t=T,T−1,…,1, set At=DθΦt(θ,ht−1), Bt=DhΦt(θ,ht−1), then update

g←g+AtTλt,λt−1=BtTλt.

After the reverse sweep, set g←g+(Dh0(θ))Tλ0 and return (J(θ),g). For T=0, the reverse loop is empty and the same initialization and final update apply. All derivative calculations in this procedure are real-arithmetic operations on the specified maps; no floating-point accuracy guarantee is asserted.

The diagram shows the finite unrolling: arrows point from an input value to the operation that uses it. The single θ node feeds each transition and the loss, so the reverse updates add all of those contributions into the same accumulator g; the ht cotangents flow from right to left. The diagram illustrates the algorithm, and no correctness proof relies on it.

diagram failed to render:
\begin{tikzpicture}[>=stealth, node distance=1.55cm]
  \node[draw,circle] (theta) {$\theta$};
  \node[draw,rectangle,right of=theta,xshift=0.4cm] (h0) {$h_0(\theta)$};
  \node[draw,rectangle,right of=h0,xshift=0.65cm] (phi1) {$\Phi_1$};
  \node[draw,rectangle,right of=phi1,xshift=0.65cm] (h1) {$h_1$};
  \node[draw,rectangle,right of=h1,xshift=0.65cm] (phi2) {$\Phi_2$};
  \node[right of=phi2,xshift=0.35cm] (dots) {$\cdots$};
  \node[draw,rectangle,right of=dots,xshift=0.35cm] (phit) {$\Phi_T$};
  \node[draw,rectangle,right of=phit,xshift=0.65cm] (ht) {$h_T$};
  \node[draw,rectangle,right of=ht,xshift=0.65cm] (loss) {$\ell(\theta,h_T)$};
  \draw[->] (theta) -- (h0);
  \draw[->] (h0) -- (phi1);
  \draw[->] (theta) to[bend left=30] (phi1);
  \draw[->] (phi1) -- (h1);
  \draw[->] (h1) -- (phi2);
  \draw[->] (theta) to[bend left=42] (phi2);
  \draw[->] (phi2) -- (dots);
  \draw[->] (dots) -- (phit);
  \draw[->] (theta) to[bend left=55] (phit);
  \draw[->] (phit) -- (ht);
  \draw[->] (ht) -- (loss);
  \draw[->] (theta) to[bend left=68] (loss);
\end{tikzpicture}

Remarks

This is a mathematical real-arithmetic procedure. A floating-point implementation may round its primal values and local derivatives; the definition supplies no numerical error estimate.

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

Reverse accumulation sums gradients over shared parameter uses

Statement

Let p,q≥1, let Θ⊆Rp and H⊆Rq be open, and let T be a nonnegative integer. Suppose h0:Θ→H, Φt:Θ×H→H for 1≤t≤T, and ℓ:Θ×H→R are continuously differentiable on open domains containing the trajectory at θ∈Θ. A continuously differentiable map is totally differentiable at each point and has a derivative matrix continuous on its domain. Define h0=h0(θ), ht=Φt(θ,ht−1), and J(θ)=ℓ(θ,hT). Write At=DθΦt(θ,ht−1) and Bt=DhΦt(θ,ht−1), with each partial derivative holding the other argument fixed. Set λT=(Dhℓ(θ,hT))T and, in descending order, λt−1=BtTλt. Then the backpropagation algorithm returns J(θ) and

∇θJ(θ)=(Dθℓ(θ,hT))T+∑t=1TAtTλt+(Dh0(θ))Tλ0,

where the sum is empty when T=0. The statement also applies when every primitive is evaluated on one fixed strict C1 branch; it makes no assertion at a branch boundary.

Facts & Assumptions

Given: The finite recurrence, its open domains, the parameter θ, the fixed strict branch when maps are piecewise-C1, and the scalar objective J.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: a finite topologically ordered program has a scalar output, and repeated parent slots are separate uses in its dependency graph.

[F2]

Backpropagation through a finite shared-parameter recurrence: the forward pass computes h0,…,hT; the reverse pass initializes the loss cotangent, adds each transition's parameter pullback to the same parameter accumulator, propagates the state cotangent backward, and finally pulls back through h0.

[F3]

Reverse mode computes the exact gradient of the real-arithmetic graph: on a finite C1 program and fixed strict branch, reverse mode returns the exact derivative transpose of its scalar output.

[F4]

The chain rule for total derivatives: D(g∘f)(a)=Dg(f(a))∘Df(a): for totally differentiable finite-dimensional maps, the total derivative of a composition is the ordered composition of their total derivatives.

Proof

technique · identify the recurrence with its finite unrolling, then apply the chain rule backward
1.1F1F4givenconstruct

Since T is finite, the initial map, T transition evaluations, and scalar loss form a finite program whose one parameter input θ is used at each transition and at the loss. Each map is C1 on an open domain containing the trajectory, so repeated application of [F4] makes J differentiable there; on a fixed strict branch the same conclusion holds branchwise.

2.1F1F2F3step 1.1algebra

The algorithm's primal pass evaluates this unrolled program. Its reverse pass seeds the loss, visits transitions in descending order, and sends each transition's parameter pullback to the same θ input while sending its state pullback to ht−1; the initial-state pullback is then added at θ. This is the reverse sweep on the finite graph in [F1], so [F3] gives the exact gradient of J.

2.2F2F4step 1.1algebra

The terminal state's cotangent is λT=(Dhℓ)T. At transition t, the chain rule gives the cotangent at ht−1 as BtTλt and adds AtTλt to the derivative with respect to the shared parameter while ht−1 is held fixed. Descending induction therefore gives the stated λt−1 recurrence and sums one parameter contribution for each of the T transition uses.

3.1F2F4step 2.2algebra∎

The loss's direct dependence on θ contributes (Dθℓ)T, and the dependence of h0(θ) contributes (Dh0)Tλ0. Adding these to the T transition contributions from step 2.2 gives the displayed formula. If T=0, there are no transition terms and the same chain rule reduces J(θ)=ℓ(θ,h0(θ)) to the two remaining terms. This is exactly the algorithm's return value and gradient.

4 · Examples, counterexamples and false statements

None yet.

Sources