Alphabeta Math
AlgorithmAlgorithm: Literature-sourcedProof: Not applicablePipeline-generatedjudge pass (gpt-6-luna)
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.

Adjoint hypergradient with a measured linear-solve residual

Definition

Input positive dimensions p,d, open sets Θ⊆Rp and W⊆Rd, C2 and C1 scalar functions f:Θ×W→R and g:W×Θ→R, a point (θ,w)∈Θ×W, and finite real-arithmetic computational graphs whose outputs equal f and g on open neighborhoods of the evaluated inputs. The graph primitives for f are C2 and those for g are C1. Here C1 means total differentiability with continuous derivative, C2 means the derivative map is C1, and all graph evaluations must remain on one unique strict branch. Define F=∇wf, H=DwF, B=DθF, c=∂θg with w held fixed, and d=∇wg; all gradients are column vectors. Also input a tolerance τ≥0, a positive integer solve budget N, a number μ>0, and a valid certificate that the evaluated inner Hessian is symmetric and satisfies xTHx≥μ∥x∥22 for every x∈Rd. Finally input a deterministic solver S with the following contract: on a real symmetric positive-definite linear operator and a right-hand side, S terminates within N iterations and returns either a failure status or a vector v~ and a report saying whether its own stopping test passed. The algorithm does not trust that report as an accuracy certificate; it recomputes the residual. All derivative and solver operations in this definition use exact real arithmetic.

If any graph evaluation is outside its declared domain, return DOMAIN_ERROR. If any piecewise primitive is at a branch boundary or has no unique strict active branch, return NONDIFFERENTIABLE and no gradient. Otherwise, use reverse mode on f and take the state block of its returned gradient as the inner residual rin:=∇wf(θ,w). Use reverse mode on g and take its parameter and state blocks as c:=∂θg(w,θ) and d:=∇wg(w,θ). In these expressions c is the derivative with w held fixed, and d and c are column vectors.

For any u∈Rd, apply forward-over-reverse Hessian-vector differentiation to f at (θ,w) in direction (0,u)∈Rp×Rd. Let πθ and πw denote projection onto the parameter and state coordinates of the returned vector. Define MHu:=πw(D(∇f)(θ,w)(0,u)) and MBu:=πθ(D(∇f)(θ,w)(0,u)). Hessian symmetry makes MHu=Hu=HTu and MBu=BTu.

Call S on MH and right-hand side d with tolerance τ and budget N. If S returns failure, return (rin,SOLVER_FAILURE) with no hypergradient. If it returns a vector v~, compute the actual linear residual ρ:=d−MHv~ and the reported hypergradient estimate h^:=c−MBv~. Return (h^,rin,ρ,CONVERGED) exactly when the solver reports its stopping test passed and ∥ρ∥2≤τ; otherwise return the same numerical values with status TOLERANCE_OR_BUDGET_NOT_MET. The procedure makes no floating-point accuracy claim.

Remarks

The solver is a supplied finite procedure, so its termination contract is an input requirement. The algorithm verifies the residual even when the solver reports success. Its estimate is still returned with a non-success status when the solver produces a vector whose residual misses the requested tolerance.

Under this algorithm's derivative-map convention, Df is a C1 map. Apply the total-derivative theorem to the coordinate representation of Df: each coordinate partial of Df is the corresponding entry of D(Df) and varies continuously. The coordinates of Df are the first partials of f, so this supplies the continuous second coordinate partials required by the coordinate-C2 definition and the Hessian-symmetry corollary. That symmetry applies to the full Hessian of f, hence its state block is H=HT and its parameter block in the state direction is BT, as used above.

Computation graph

The solid arrows show the vector data used for the adjoint estimate: the state derivative of the outer loss is solved against the transposed inner Hessian, then the mixed derivative maps the adjoint vector back to parameter space, where it is subtracted from the direct parameter derivative. The dashed arrows show the independently recomputed linear residual. The state-space vectors have dimension d and the parameter-space vectors have dimension p. This diagram summarizes the data flow; the derivative and error proofs do not rely on it.

diagram failed to render:
\begin{tikzpicture}[>=stealth]
  \node[draw,align=center] (d) at (0,0) {$d=\nabla_w g$};
  \node[draw,align=center] (solve) at (3.4,0) {solve $H^T\widetilde v=d$};
  \node[draw,align=center] (cross) at (6.8,0) {$B^T\widetilde v$};
  \node[draw,align=center] (out) at (10.4,0) {$\widehat h=c-B^T\widetilde v$};
  \node[draw,align=center] (c) at (8.7,1.6) {$c=\partial_\theta g$};
  \node[draw,align=center] (resid) at (3.4,-1.7) {$\rho=d-H^T\widetilde v$};
  \draw[->] (d.east) -- (solve.west);
  \draw[->] (solve.east) -- node[above] {$\widetilde v$} (cross.west);
  \draw[->] (cross.east) -- node[above] {$-$} (out.west);
  \draw[->] (c.east) -- node[right] {$+$} (out.north);
  \draw[dashed,->] (d.south) to[bend right=18] (resid.west);
  \draw[dashed,->] (solve.south) -- (resid.north);
\end{tikzpicture}

Depends on

Used by

Dependency tree · two levels

26 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