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.

✓ 2 results · all verified · 2 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 2 also cleared it.

Bilevel learning, hypergradients, and implicit layers

1 · Prerequisites

2 · Logical flowchart

3 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Smooth bilevel stationary problems and their hypergradients

Definition

Let p,d≥1, let Θ⊆Rp and W⊆Rd be open, and let f:Θ×W→R be C2 and g:W×Θ→R be C1. Here C1 means continuously differentiable on the open domain, and C2 means that the derivative map is itself continuously differentiable. Gradients are column vectors, vector norms are Euclidean, and the norm of a matrix or linear map is the induced Euclidean operator norm.

For (θ,w)∈Θ×W, define the inner stationarity residual F(θ,w):=∇wf(θ,w)∈Rd, its state Jacobian H(θ,w):=DwF(θ,w)∈Rd×d, and its parameter Jacobian B(θ,w):=DθF(θ,w)∈Rd×p. Thus H is the inner Hessian and B is the mixed derivative of the inner gradient. A point (θ0,w0) is stationary when F(θ0,w0)=0. If a C1 map w∗:P→Q, for open neighborhoods P⊆Θ of θ0 and Q⊆W of w0, satisfies w∗(θ0)=w0 and F(θ,w∗(θ))=0 for all θ∈P, it is a local stationary branch. The associated outer objective is J(θ):=g(w∗(θ),θ), and its column gradient ∇θJ is called the hypergradient of that branch. The definition of a local stationary branch imposes no global-minimality requirement.

For μ>0, the phrase globally μ-strongly convex in w means that f(θ,⋅) is defined on all of Rd and, for every u,v∈Rd, satisfies

f(θ,v)≥f(θ,u)+∇wf(θ,u)T(v−u)+μ2∥v−u∥22.

AlgorithmAlgorithm: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

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.

d=rwgsolveHTev=dBTevbh=c¡BTevc=@µg½=d¡HTevev¡+
TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

Hypergradient of a smooth local stationary branch

Statement

Let p,d≥1, let Θ⊆Rp and W⊆Rd be open, and let f:Θ×W→R be C2 and g:W×Θ→R be C1. Here C1 means total differentiability with continuous derivative, and C2 means the derivative map is C1. Define F(θ,w)=∇wf(θ,w), H(θ,w)=DwF(θ,w), and B(θ,w)=DθF(θ,w). Suppose F(θ0,w0)=0 and H(θ0,w0) is invertible. Then there are open neighborhoods P⊆Θ and Q⊆W of θ0 and w0 and a unique C1 local stationary branch w∗:P→Q through (θ0,w0), meaning w∗(θ0)=w0 and F(θ,w∗(θ))=0 for every θ∈P. After shrinking P if necessary, H(θ,w∗(θ)) is invertible and

Dw∗(θ)=−H(θ,w∗(θ))−1B(θ,w∗(θ)).

Write H−T:=(H−1)T. For J(θ)=g(w∗(θ),θ), where ∂θg holds w fixed and gradients are column vectors, the hypergradient is

∇θJ(θ)=∂θg(w∗(θ),θ)−B(θ,w∗(θ))TH(θ,w∗(θ))−T∇wg(w∗(θ),θ).

The local branch need not be a global inner optimizer. In the separate global regime where, for every θ∈P, f(θ,⋅) is defined on all of Rd and, for some μ>0, satisfies f(θ,v)≥f(θ,u)+∇wf(θ,u)T(v−u)+μ2∥v−u∥22 for every u,v∈Rd, each stationary point is the unique global minimizer.

Facts & Assumptions

Given: Open parameter and state domains, the C2 inner objective, the C1 outer objective, a stationary point (θ0,w0), and an invertible inner Hessian at that point.

[F1]

Smooth bilevel stationary problems and their hypergradients: F=∇wf is the inner stationarity residual, H=DwF, B=DθF, and the local outer objective is J(θ)=g(w∗(θ),θ).

[F2]

The Euclidean implicit function theorem with derivative formula: for a C1 residual with zero value and invertible state-block derivative, there are neighborhoods with a unique C1 solution branch.

[L1]

The Euclidean implicit function theorem with derivative formula: after shrinking the neighborhoods, the state-block derivative stays invertible along the branch and its derivative is minus the inverse state Jacobian times the parameter Jacobian.

[F3]

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

Proof

1.1givenF1F2construct

Put F(θ,w)=∇wf(θ,w). Since f is C2, this residual is C1 on the open product domain; it vanishes at (θ0,w0) and its state derivative is the invertible matrix H(θ0,w0). Applying [F2] gives open neighborhoods and a unique C1 local branch w∗ through that point.

2.1step 1.1F1L1algebra

The derivative clause of [L1], evaluated along this branch after shrinking its parameter neighborhood, gives Dw∗(θ)=−H(θ,w∗(θ))−1B(θ,w∗(θ)).

2.2step 1.1F1F3algebra

The map θ↦(w∗(θ),θ) is C1, so [F3] applied to g and this map yields ∇θJ=∂θg+(Dw∗)T∇wg.

3.1step 2.1step 2.2algebra

Substitute step 2.1 into step 2.2 and use (H−1B)T=BTH−T. This is the asserted column-gradient hypergradient formula.

4.1givenstep 1.1algebra∎

In the stated global regime, fix any θ∈P and any stationary point u∈Rd, so ∇wf(θ,u)=0. For every v≠u, the strong-convexity inequality gives f(θ,v)≥f(θ,u)+μ2∥v−u∥22>f(θ,u). Thus this arbitrary stationary point is the unique global minimizer, proving the claim for every stationary point wherever the global regime holds.

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

Residual bounds for exact and approximate-state adjoint hypergradients

Statement

Let p,d≥1, let Θ⊆Rp and W⊆Rd be open, and let f:Θ×W→R be C2 and g:W×Θ→R be C1, where C1 means total differentiability with continuous derivative and C2 means the derivative map is C1. Let w∗:P→W be a C1 map on an open neighborhood P of θ0, with w∗(θ0)=w0 and F(θ,w∗(θ))=0 for F(θ,w):=∇wf(θ,w), and define J(θ):=g(w∗(θ),θ), H(θ,w):=DwF(θ,w), and B(θ,w):=DθF(θ,w). Assume H(θ0,w0) is invertible. Write c(w):=∂θg(w,θ0) and d(w):=∇wg(w,θ0), and use the induced Euclidean operator norm for matrices. If the adjoint algorithm at w0 returns a vector v~, define ρ:=d(w0)−H(θ0,w0)Tv~ and h^:=c(w0)−B(θ0,w0)Tv~. Suppose the evaluated Hessian is symmetric and has a valid lower-bound certificate xTH(θ0,w0)x≥μ∥x∥22 for every x, for some μ>0. Then

∥h^−∇θJ(θ0)∥2≤∥B(θ0,w∗(θ0))∥ ∥ρ∥2μ.

There is also a separate approximate-state bound under stronger hypotheses. Put R(w,θ):=∇wf(θ,w) and A(w):=DwR(w,θ0)=H(θ0,w). Suppose R is C2 on an open neighborhood of (w0,θ0). Let w~ lie in a C1 local inverse chart: for r:=R(w~,θ0), there is a local inverse Ψ of w↦R(w,θ0) with Ψ(0)=w0, defined on a convex open residual neighborhood containing 0 and r, with w~=Ψ(r) and ∥DΨ(y)∥≤κ along the segment from 0 to r. Suppose the segment from w0 to w~ lies in a convex state neighborhood where ∥A(w)−1∥≤M, ∥B(θ0,w)∥≤B0, and A(w),B(θ0,w) are Lipschitz with constants LA,LB. Suppose also that c,d are Lipschitz there with constants Lc,Ld and ∥d(w0)∥2≤D∗. If the adjoint algorithm at w~ returns v~, set ρ:=d(w~)−A(w~)Tv~ and h^:=c(w~)−B(θ0,w~)Tv~. Assume the certificate A(w~)=A(w~)T and xTA(w~)x≥μ∥x∥22 for all x, with the same μ>0. Then

∥h^−∇θJ(θ0)∥2≤κ(Lc+D∗(M2LAB0+MLB)+MB0Ld)∥r∥2+B0μ∥ρ∥2.

The first term bounds the implicit formula evaluated at an approximate state; it does not identify that formula with the derivative of a stopped iteration. The second term bounds the separate linear-solve error.

Facts & Assumptions

Given: The exact stationary branch, its exact and approximate states, the local inverse chart and Lipschitz bounds, and a solver output vector with the stated actual residual.

[F1]

Smooth bilevel stationary problems and their hypergradients: R=∇wf, A=H=DwR, B=DθR, and J(θ)=g(w∗(θ),θ).

[F2]

Hypergradient of a smooth local stationary branch: at an exact branch state, ∇θJ=c−BTH−Td.

[F3]

An implicit sensitivity evaluated at an approximate state has a local residual bound: under a common invertible residual chart and the stated inverse and Lipschitz bounds, ∥S(w~)−S(w∗)∥≤κ(M2LAB0+MLB)∥r∥2, where S(w)=−A(w)−1B(w).

[F4]

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

[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 bound ∥Df(z)v∥2≤M∥v∥2 implies ∥f(y)−f(x)∥2≤M∥y−x∥2.

[F6]

Adjoint hypergradient with a measured linear-solve residual: for any returned vector v~, the algorithm computes the actual residual ρ=d−HTv~ and estimate h^=c−BTv~.

Proof

1.1F1F3given

Put S(w):=−A(w)−1B(w) on the stated state neighborhood. The chart and Lipschitz hypotheses with [F3] give ∥S(w~)−S(w∗)∥≤κ(M2LAB0+MLB)∥r∥2.

1.2F4F5given

For the state bound, set γ(t):=Ψ(tr) for 0<t<1. By [F4], γ′(t)=DΨ(tr)r, so ∥γ′(t)∥2≤κ∥r∥2. For 0<ε<1/2, apply [F5] to γ on the convex open interval (ε/2,1−ε/2) at ε and 1−ε; it gives ∥Ψ((1−ε)r)−Ψ(εr)∥2≤κ(1−2ε)∥r∥2. Letting ε↓0 and using continuity of Ψ, Ψ(0)=w∗ and Ψ(r)=w~ give ∥w~−w∗∥2≤κ∥r∥2.

1.3givenalgebra

The inverse and operator-norm hypotheses give ∥S(w~)∥≤∥A(w~)−1∥ ∥B(w~)∥≤MB0.

1.4F1F2givenalgebra

Define the implicit formula evaluated at a state by hˉ(w):=c(w)+S(w)Td(w). By [F1] and [F2], hˉ(w∗)=∇θJ(θ0). Expansion gives hˉ(w~)−hˉ(w∗)=(c(w~)−c(w∗))+(S(w~)−S(w∗))Td(w∗)+S(w~)T(d(w~)−d(w∗)).

1.5F6F7givenalgebra

At the evaluated state, write H=A(w~) and B=B(θ0,w~). Let v∗=H−Td(w~). The residual identity gives v∗−v~=H−Tρ. For any vector x, the certificate and [F7] imply μ∥x∥22≤xTHx≤∥x∥2∥Hx∥2, hence ∥H−1∥≤1/μ; symmetry gives the same bound for H−T. The Euclidean dual formula and [F7] give ∥BTy∥2≤∥B∥∥y∥2, so ∥h^−hˉ(w~)∥2=∥BTH−Tρ∥2≤(B0/μ)∥ρ∥2.

1.6F2F6F7givenalgebra

For the exact-state claim, put H:=H(θ0,w0), B:=B(θ0,w0), c:=c(w0), and d:=d(w0), and let v∗:=H−Td. Since w0=w∗(θ0), [F2] gives ∇θJ(θ0)=c−BTv∗. The residual identity gives v∗−v~=H−Tρ. For every x, the stated symmetry and lower-bound certificate together with [F7] imply μ∥x∥22≤xTHx≤∥x∥2∥Hx∥2, so ∥H−1∥≤1/μ; symmetry gives ∥H−T∥≤1/μ. The Euclidean dual formula and [F7] give ∥BTy∥2≤∥B∥∥y∥2. Therefore ∥h^−∇θJ(θ0)∥2=∥BTH−Tρ∥2≤∥B∥ ∥ρ∥2μ=∥B(θ0,w∗(θ0))∥ ∥ρ∥2μ. This proves the exact-state claim using only its stated hypotheses.

2.1F1F2F7step 1.1step 1.3step 1.4givenalgebra

For any matrix M and vector x, the Euclidean dual formula ∥MTx∥2=sup⁡∥y∥2=1∣yTMTx∣ and [F7] give ∥MTx∥2≤∥M∥∥x∥2. Put δ:=∥w~−w∗∥2. Apply this norm bound to the three terms in step 1.4. The first and third terms have norms at most Lcδ and MB0Ldδ, respectively, by the stated Lipschitz bounds and step 1.3. The middle term is at most κD∗(M2LAB0+MLB)∥r∥2 by step 1.1 and ∥d(w∗)∥2≤D∗. Therefore ∥hˉ(w~)−∇θJ(θ0)∥2≤(Lc+MB0Ld)δ+κD∗(M2LAB0+MLB)∥r∥2.

3.1step 1.2step 2.1algebra

Substitute the state-residual estimate from step 1.2 into step 2.1. This gives the first term in the asserted approximate-state bound for the implicit formula evaluation.

4.1step 3.1step 1.5givenalgebra∎

Combine the approximate-state formula bound from step 3.1 and the solve-error bound from step 1.5 by the triangle inequality. This gives the approximate-state bound under its separate chart and Lipschitz hypotheses.

RemarkRemark: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Exact stationary sensitivities and finite training derivatives are different

Boundary

Let p,m≥0, let Θ⊆Rp be open with θ0∈Θ, let D⊆Rm be an open convex neighborhood of z∗, and let G:U→Rm be C2 on an open neighborhood U of D×{θ0}. Here C1 means total differentiability with continuous derivative, C2 means the derivative map is C1, and vector and operator norms are Euclidean and induced Euclidean norms. Write Gz:=DzG and Gθ:=DθG for the state and parameter derivatives. Suppose z∗=G(z∗,θ0), G(D,θ0)⊆D, 0≤q<1, ∥Gz(z,θ0)∥≤q on D, and Gz,Gθ are Lipschitz in z with constants Lz,Lθ. Let z0:Θ→Rm be C1, with all finite iterates at θ0 lying in D, and define zk+1(θ)=G(zk(θ),θ). Let ϕ be the exact local fixed-point branch, s∗:=Dϕ(θ0), eK:=DzK(θ0), δ0:=∥z0(θ0)−z∗∥2, d0:=∥Dz0(θ0)−s∗∥, and C:=Lz∥s∗∥+Lθ. For every integer K≥1,

∥eK−s∗∥≤qKd0+CKqK−1δ0,

where q0=1 when q=0 and K=1. For the fixed-point residual rK:=zK(θ0)−G(zK(θ0),θ0), the primal-state estimate is (1−q)∥zK(θ0)−z∗∥2≤∥rK∥2. This primal residual estimate alone does not imply that the derivative of the finite K-step graph equals the exact fixed-point sensitivity.

For a separate finite shared-parameter recurrence, let p0,q0≥1, let Θ0⊆Rp0 and H⊆Rq0 be open, let T≥0, let h0:Θ0→H and Φt:Θ0×H→H for 1≤t≤T and ℓ:Θ0×H→R be C1 on open domains containing the trajectory at θ∈Θ0, and suppose every piecewise primitive is evaluated in one unique strict open C1 branch. Set ht=Φt(θ,ht−1) and JT(θ)=ℓ(θ,hT); derivative matrices use Euclidean coordinates and transposes are Euclidean. Backpropagation differentiates this finite scalar graph: with At=DθΦt(θ,ht−1), Bt=DhΦt(θ,ht−1), λT=(Dhℓ(θ,hT))T, and λt−1=BtTλt, its derivative is

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

This is the derivative of the finite training computation. The exact implicit hypergradient is the derivative of a local stationary or fixed-point branch. In particular, a small training residual is not by itself an error bound for the derivative of a stopped iteration; contraction and sensitivity hypotheses such as those stated above are needed.

4 · Examples, counterexamples and false statements

None yet.

Sources