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.
Bilevel learning, hypergradients, and implicit layers
1 · Prerequisites
- Algebraic Closure, Embeddings, and Separability
- Algebraic Extensions, Extension Degree, and Finite Fields
- Automatic differentiation and backpropagation
- Automatic differentiation and computational graphs
- Banach-Space Differential Calculus and Banach Manifolds
- Binary Operations, Monoids, Groups and Subgroups
- Bounded Linear Operators and Quotient Spaces
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Complex Norms and Realification
- Complexification, Realification and Real Structures
- Composition Series, the Jordan–Hölder Theorem and Solvable Groups
- Congruences, the Integers Modulo n and the Chinese Remainder Theorem
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Cyclic Groups and Direct Products
- Determinants of Matrices over a Commutative Ring
- Diagonalisation and the Minimal Polynomial
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Dual Spaces, Bilinear and Quadratic Forms, and Sylvester's Law of Inertia
- Eigenvalues, Eigenvectors and the Characteristic Polynomial
- Filters and Ultrafilters
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Group Actions, Orbits, Stabilisers and Cayley's Theorem
- Group Homomorphisms and the Isomorphism Theorems
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Inner Product Spaces, Gram-Schmidt, Projections and Adjoints
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Independence, Bases and Dimension
- Linear Transformations, Rank-Nullity and Quotient Spaces
- Matrices, the Matrix of a Linear Map, and Change of Basis
- Metric Spaces
- Mixed Partials, Taylor Formulae, and Extrema
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Normed and Banach Spaces
- Order, Zorn's Lemma, and the Axiom of Choice
- Polynomial Rings, the Division Algorithm and Roots
- Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
- Properties of the Integral and the Working FTC
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Rⁿ as a Normed Space; Vector-Valued Functions
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Simple Field Extensions and the Construction of the Complex Numbers
- Splitting Fields
- Subspaces, Products, and Quotients
- Suprema and Infima
- Sylow's Theorems, p-Groups and Nilpotent Groups
- Symmetric Groups, Cycle Decomposition and the Sign Homomorphism
- The Derivative and the Mean Value Theorems
- The Determinant of a Linear Operator, Cofactors and Cramer's Rule
- The Fundamental Theorem of Algebra
- The Fundamental Theorem of Finite Abelian Groups
- The Galois Correspondence
- The Inverse and Implicit Function Theorems
- The Riemann Integral: Definition and Integrability
- The Spectral Theorem, Positive Operators and Singular Value Decomposition
- The Total Derivative in ℝᵐ → ℝⁿ
- The ZFC Axioms and the Basic Set Constructions
- Topological Spaces and Continuity
- Topology of ℝ
- Triangularisation, Generalised Eigenspaces and Jordan Canonical Form
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Logical flowchart
3 · Definitions, theorems and proofs
Smooth bilevel stationary problems and their hypergradients
Definition
Let , let and be open, and let be and be . Here means continuously differentiable on the open domain, and 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 , define the inner stationarity residual , its state Jacobian , and its parameter Jacobian . Thus is the inner Hessian and is the mixed derivative of the inner gradient. A point is stationary when . If a map , for open neighborhoods of and of , satisfies and for all , it is a local stationary branch. The associated outer objective is , and its column gradient is called the hypergradient of that branch. The definition of a local stationary branch imposes no global-minimality requirement.
For , the phrase globally -strongly convex in means that is defined on all of and, for every , satisfies
Adjoint hypergradient with a measured linear-solve residual
Definition
Input positive dimensions , open sets and , and scalar functions and , a point , and finite real-arithmetic computational graphs whose outputs equal and on open neighborhoods of the evaluated inputs. The graph primitives for are and those for are . Here means total differentiability with continuous derivative, means the derivative map is , and all graph evaluations must remain on one unique strict branch. Define , , , with held fixed, and ; all gradients are column vectors. Also input a tolerance , a positive integer solve budget , a number , and a valid certificate that the evaluated inner Hessian is symmetric and satisfies for every . Finally input a deterministic solver with the following contract: on a real symmetric positive-definite linear operator and a right-hand side, terminates within iterations and returns either a failure status or a vector 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 and take the state block of its returned gradient as the inner residual . Use reverse mode on and take its parameter and state blocks as and . In these expressions is the derivative with held fixed, and and are column vectors.
For any , apply forward-over-reverse Hessian-vector differentiation to at in direction . Let and denote projection onto the parameter and state coordinates of the returned vector. Define and . Hessian symmetry makes and .
Call on and right-hand side with tolerance and budget . If returns failure, return with no hypergradient. If it returns a vector , compute the actual linear residual and the reported hypergradient estimate . Return exactly when the solver reports its stopping test passed and ; otherwise return the same numerical values with status TOLERANCE_OR_BUDGET_NOT_MET. The procedure makes no floating-point accuracy claim.
Definition references
Stationarity residual, Hessian and mixed derivative, outer objective, and column-gradient convention
Finite C1 and C2 real-arithmetic graphs and strict-branch convention
Reverse-mode gradient procedure
Exact reverse-mode gradient on a fixed strict branch
Forward-over-reverse Hessian-vector procedure
Exact Hessian-vector products on a fixed strict branch
Coordinate definition by continuous iterated partial derivatives through order two
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, is a map. Apply the total-derivative theorem to the coordinate representation of : each coordinate partial of is the corresponding entry of and varies continuously. The coordinates of are the first partials of , so this supplies the continuous second coordinate partials required by the coordinate- definition and the Hessian-symmetry corollary. That symmetry applies to the full Hessian of , hence its state block is and its parameter block in the state direction is , 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 and the parameter-space vectors have dimension . This diagram summarizes the data flow; the derivative and error proofs do not rely on it.
Hypergradient of a smooth local stationary branch
Statement
Let , let and be open, and let be and be . Here means total differentiability with continuous derivative, and means the derivative map is . Define , , and . Suppose and is invertible. Then there are open neighborhoods and of and and a unique local stationary branch through , meaning and for every . After shrinking if necessary, is invertible and
Write . For , where holds fixed and gradients are column vectors, the hypergradient is
The local branch need not be a global inner optimizer. In the separate global regime where, for every , is defined on all of and, for some , satisfies for every , each stationary point is the unique global minimizer.
Statement references
Facts & Assumptions
Given: Open parameter and state domains, the inner objective, the outer objective, a stationary point , and an invertible inner Hessian at that point.
Smooth bilevel stationary problems and their hypergradients: is the inner stationarity residual, , , and the local outer objective is .
The Euclidean implicit function theorem with derivative formula: for a residual with zero value and invertible state-block derivative, there are neighborhoods with a unique solution branch.
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.
The chain rule for total derivatives: : the derivative of a composition of finite-dimensional totally differentiable maps is the composition of their derivatives.
Proof
Put . Since is , this residual is on the open product domain; it vanishes at and its state derivative is the invertible matrix . Applying [F2] gives open neighborhoods and a unique local branch through that point.
The derivative clause of [L1], evaluated along this branch after shrinking its parameter neighborhood, gives .
The map is , so [F3] applied to and this map yields .
Substitute step 2.1 into step 2.2 and use . This is the asserted column-gradient hypergradient formula.
In the stated global regime, fix any and any stationary point , so . For every , the strong-convexity inequality gives . Thus this arbitrary stationary point is the unique global minimizer, proving the claim for every stationary point wherever the global regime holds.
Residual bounds for exact and approximate-state adjoint hypergradients
Statement
Let , let and be open, and let be and be , where means total differentiability with continuous derivative and means the derivative map is . Let be a map on an open neighborhood of , with and for , and define , , and . Assume is invertible. Write and , and use the induced Euclidean operator norm for matrices. If the adjoint algorithm at returns a vector , define and . Suppose the evaluated Hessian is symmetric and has a valid lower-bound certificate for every , for some . Then
There is also a separate approximate-state bound under stronger hypotheses. Put and . Suppose is on an open neighborhood of . Let lie in a local inverse chart: for , there is a local inverse of with , defined on a convex open residual neighborhood containing and , with and along the segment from to . Suppose the segment from to lies in a convex state neighborhood where , , and are Lipschitz with constants . Suppose also that are Lipschitz there with constants and . If the adjoint algorithm at returns , set and . Assume the certificate and for all , with the same . Then
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.
Statement references
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.
Hypergradient of a smooth local stationary branch: at an exact branch state, .
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, , where .
The chain rule for total derivatives: : the derivative of a composition of finite-dimensional totally differentiable maps is the composition of their derivatives.
On a convex open set, a uniform bound implies : on a convex open set, a uniform bound implies .
Adjoint hypergradient with a measured linear-solve residual: for any returned vector , the algorithm computes the actual residual and estimate .
Cauchy-Schwarz with its equality case, the triangle inequality for , the parallelogram law and polarisation: for Euclidean vectors of equal dimension.
Proof
Put on the stated state neighborhood. The chart and Lipschitz hypotheses with [F3] give .
For the state bound, set for . By [F4], , so . For , apply [F5] to on the convex open interval at and ; it gives . Letting and using continuity of , and give .
The inverse and operator-norm hypotheses give .
Define the implicit formula evaluated at a state by . By [F1] and [F2], . Expansion gives .
At the evaluated state, write and . Let . The residual identity gives . For any vector , the certificate and [F7] imply , hence ; symmetry gives the same bound for . The Euclidean dual formula and [F7] give , so .
For the exact-state claim, put , , , and , and let . Since , [F2] gives . The residual identity gives . For every , the stated symmetry and lower-bound certificate together with [F7] imply , so ; symmetry gives . The Euclidean dual formula and [F7] give . Therefore This proves the exact-state claim using only its stated hypotheses.
For any matrix and vector , the Euclidean dual formula and [F7] give . Put . Apply this norm bound to the three terms in step 1.4. The first and third terms have norms at most and , respectively, by the stated Lipschitz bounds and step 1.3. The middle term is at most by step 1.1 and . Therefore .
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.
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.
Exact stationary sensitivities and finite training derivatives are different
Boundary
Let , let be open with , let be an open convex neighborhood of , and let be on an open neighborhood of . Here means total differentiability with continuous derivative, means the derivative map is , and vector and operator norms are Euclidean and induced Euclidean norms. Write and for the state and parameter derivatives. Suppose , , , on , and are Lipschitz in with constants . Let be , with all finite iterates at lying in , and define . Let be the exact local fixed-point branch, , , , , and . For every integer ,
where when and . For the fixed-point residual , the primal-state estimate is . This primal residual estimate alone does not imply that the derivative of the finite -step graph equals the exact fixed-point sensitivity.
For a separate finite shared-parameter recurrence, let , let and be open, let , let and for and be on open domains containing the trajectory at , and suppose every piecewise primitive is evaluated in one unique strict open branch. Set and ; derivative matrices use Euclidean coordinates and transposes are Euclidean. Backpropagation differentiates this finite scalar graph: with , , , and , its derivative is
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
- Stephen Gould et al., On Differentiating Parameterized Argmin and Argmax Problems with Application to Bi-level Optimization, §3
- MIT OpenCourseWare 18.S096, Matrix Calculus for Machine Learning and Beyond, Lecture 4 Part 2, §6.3.1
- J. Lebl, Basic Analysis II, §8.5.1
- MIT OpenCourseWare 18.S096, Matrix Calculus for Machine Learning and Beyond, Lecture 4 Part 2, §§6.3.1–6.3.2
- J. Lebl, Basic Analysis II, §8.5.1, Theorem 8.5.6 and proof