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.
Low-rank adaptation and the geometry of parameter updates
1 · Prerequisites
- Algebraic Closure, Embeddings, and Separability
- Algebraic Extensions, Extension Degree, and Finite Fields
- Automatic differentiation and backpropagation
- Automatic differentiation and computational graphs
- Binary Operations, Monoids, Groups and Subgroups
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- 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
- Feedforward networks and single-hidden-layer universality
- 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
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- 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
- 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
- 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
Low-rank adaptation of a linear layer
Definition
Let be positive integers, let , let , and fix a matrix . A rank- adapter for the linear layer consists of trainable factor matrices and and the updated weight matrix
Its output on is . The base matrix is frozen, meaning that an adaptation procedure does not update its entries; only entries of and are trainable in this definition. The update matrix is , whose rank is the dimension of its image as a linear map from to . No bias, dropout, random initialization, optimization rule, or convergence guarantee is part of this definition.
Definition references
Finite feedforward computation graphs and layered MLPs: its finite layered perceptron specializes to a linear matrix map when the layer has identity output activation and zero bias.
Hu et al., §4.1: frozen base matrix and trainable low-rank factors
MIT OCW, §§8.3–8.4: finite differentiable computation graphs and reverse-mode gradients
Finite-budget low-rank adaptation by gradient descent
Definition
Fix positive integers , an integer , a frozen matrix , a nonzero scale , a finite ordered data list with , and, for each data entry, a loss program that returns a real scalar wherever its primitive calls are defined. Let be a finite integer, let be fixed finite nonempty ordered lists of indices in (repeated indices are allowed), let be finite step sizes, and supply an initial matrix . The procedure has no dropout or random initialization; any random initialization must be sampled externally and supplied as . Set .
Represent each loss evaluation by a specified finite real-arithmetic program with a scalar output. Each primitive is continuously differentiable on a declared open domain or is piecewise continuously differentiable, with finitely many open branch regions, a continuously differentiable formula on each region, and a separately specified primal boundary value when one is defined. Here means totally differentiable with continuous derivative. Check admissibility at the current factors on each step; a strict branch used at one step need not be the branch used at another.
Starting with , perform the following finite loop while :
- Evaluate the displayed program at , visiting its primitive calls in evaluation order. At the first call with no primal value, return
DOMAIN_ERRORwith the current factors and step index . At the first defined piecewise primitive whose input lies on a branch boundary or has ambiguous branch selection, returnNONDIFFERENTIABLEwith the current factors and step index . If every primitive call has a value and every piecewise primitive is on a unique strict branch, run reverse-mode automatic differentiation on this same scalar-output program at , with the selected branch choices, with respect to the ordered list of all entries of followed by all entries of , each matrix flattened row by row. If reverse mode returns either failure status, return it with the current factors and step index . No factor update is made on a failure status. - If reverse mode returns gradients, reshape the first and second blocks into and , respectively, and set
Increment by one.
After successful updates, return SUCCESS, the matrices , and the merged weight . At return the supplied , zero , and without evaluating a loss. This is a finite real-arithmetic procedure; it asserts no convergence, minimization, generalization, floating-point accuracy, speed, or memory guarantee.
Definition references
Low-rank adaptation of a linear layer: the factor shapes, frozen base matrix, and updated matrix used here.
Finite straight-line computational programs and real-arithmetic tapes: finite ordered real-arithmetic graph, C1 primitive, admissible domain, and strict-branch conventions.
Reverse-mode automatic differentiation for a scalar graph output: scalar-output reverse sweep and its domain-error and branch-boundary statuses.
Hu et al., §4.1: frozen base weights, trainable factors, and merged weights
MIT OCW, §§8.3–8.4: reverse-mode accumulation for finite scalar objectives
Rank capacity and factorization ambiguity of a low-rank adapter
Statement
Fix positive integers , an integer , a nonzero real number , and a base matrix . For every pair and , the adapter update has matrix rank at most , where rank is the dimension of the image of the associated linear map. Conversely, every target update of rank at most has at least one representation with these factor shapes. For any such factors and any invertible matrix , the transformed factors and represent the same update. Thus the factorization is not identifiable: every target update of rank at most has more than one factor pair. A target update of rank greater than cannot be represented.
Statement references
Facts & Assumptions
Given: The factor dimensions and nonzero scale in the statement.
Low-rank adaptation of a linear layer: the update matrix is , with , , and .
Every linear map between finite-dimensional real or complex inner product spaces admits a singular value decomposition: every linear map between finite-dimensional real or complex inner-product spaces has an SVD with positive singular values and orthonormal domain and range vectors; its proof shows the range vectors span the image, so their number equals the rank.
Proof
The image of is contained in the image of , whose dimension is at most the number of columns of . Multiplication by the nonzero scalar preserves image dimension, so .
Let have rank . If , then and the zero factors give . If , apply [F2] to the real linear map . Since , this map has rank , so its SVD has exactly positive terms: , with and orthonormal vectors , .
If is invertible, associativity gives , so the transformation preserves .
For , set the th column of to and the th row of to ; fill the remaining columns of and rows of with zero. These matrices have the required shapes and , hence .
If , step 1.1 rules out a factor representation. If has rank at most , step 2.1 gives a representation with ; the matrix , where is the identity on , is invertible with inverse , and , so step 1.3 gives a distinct factor pair with the same product. If , let have entry in position and all other entries ; then and are distinct factor pairs for the zero update. Thus every representable target update has multiple factor pairs.
Exact merging and gradients for a low-rank adapter
Statement
Fix dimensions and matrices as in the definition of a low-rank adapter. Let , let , and let each be a finite real-arithmetic loss program with scalar real output wherever its primitive calls are defined. Each primitive map is on a declared open domain or is piecewise with finitely many open branch regions and a formula on each region; when defined, a boundary primal value is specified separately. Here means totally differentiable with continuous derivative. Define the finite empirical loss on a weight matrix by the following formula wherever all the programs return scalar values:
At any where all primitive calls have values and every piecewise primitive call is on a unique strict branch, write for the Frobenius gradient, defined by for every , where . Then the factor gradients are
At every successful step of the finite-budget adaptation algorithm, write its ordered minibatch as , retaining repeated indices, and define
With and , all primitive calls in this batch objective have values and each piecewise primitive call is on a unique strict branch; branch choices may differ between successful steps. Reverse-mode automatic differentiation returns the exact real-arithmetic gradients and . If , then for every such empirical loss; if also , then . For every input , the unmerged and merged layer outputs agree:
The factor matrices contain trainable scalar coordinates, excluding the frozen entries of ; this coordinate count is not an assertion about identifiable degrees of freedom. All equalities are in real arithmetic and imply no floating-point, convergence, task-transfer, or hardware-performance guarantee.
Let be the finite horizon of the procedure. The finite-budget procedure also has the following termination and status property. Suppose each primal value/status check terminates, and each defined primitive evaluation and each local derivative evaluation on a strict branch returns its specified real-arithmetic value or derivative in finite time. Then at the first step whose ordered primal evaluation encounters a primitive with no value or a defined piecewise primitive on a boundary or ambiguous branch, the procedure returns DOMAIN_ERROR or NONDIFFERENTIABLE, respectively, before updating the factors at that step. If no such evaluation occurs, it returns SUCCESS after exactly updates. For , it returns immediately without evaluating a loss.
Statement references
Facts & Assumptions
Given: The fixed dimensions and matrices; a strict-branch evaluation point for the gradient formulas; and, for the procedure claims, the finite-budget algorithm input, its runtime value/branch checks, and its horizon.
Low-rank adaptation of a linear layer: the updated matrix is , with , , and fixed .
Finite-budget low-rank adaptation by gradient descent: each minibatch program is checked at the current factors; reverse mode runs only when all calls are defined and piecewise calls lie on strict branches; failure statuses return before updating; otherwise the returned gradients update every entry of and .
Reverse accumulation sums gradients over shared parameter uses: for a finite recurrence with one shared parameter input, reverse accumulation includes every transition's parameter pullback.
The chain rule for total derivatives: : the total derivative of a composition is the ordered composition of the total derivatives of its maps.
Reverse mode computes the exact gradient of the real-arithmetic graph: on a finite scalar-output program at a fixed strict-branch evaluation point, reverse mode returns the exact derivative with respect to its inputs.
Proof
Fix perturbations and of and . Expanding the product gives , so the derivative of in direction is .
At a successful step , write , retaining repeated indices. Set to the ordered vector of all entries of and , put , and define for . On the strict branches selected at this step, this is a finite recurrence on open domains with one shared parameter input and terminal scalar . Thus the recurrence gradient formula in [F3] applies, including repeated parameter uses.
Associativity of matrix multiplication gives . Counting entries of the two trainable factors gives ; the base matrix is frozen.
By the chain rule, the derivative of in direction is ; the same calculation applies to each batch objective with its gradient .
The trace identity gives . The trace identity gives ; these identities also hold with for each .
The Frobenius inner product determines a matrix uniquely from its pairing with every perturbation. Since and are arbitrary, step 3.1 therefore identifies the gradients as and , and the same formulas hold for each batch objective with .
At a successful step , the algorithm evaluates the finite scalar program for . By [F5], its reverse-mode call returns the exact input derivative on the strict branches selected at that step. Therefore its returned factor gradients equal the derivatives identified in step 4.1 for .
If , the formula for in step 4.1 is zero; if also , the formula for is zero.
Under the termination hypothesis, each loop iteration makes finitely many primitive calls in its stated evaluation order. It either encounters the first undefined or boundary/ambiguous primitive, in which case the algorithm returns the corresponding status before updating, or completes the primal evaluation on strict branches. In the latter case the reverse sweep traverses finitely many nodes and parent slots, and every local derivative evaluation returns its specified derivative by assumption; the algorithm then performs one finite update and increments . Induction on shows there can be at most successful updates. If no failure occurs, the loop reaches and returns SUCCESS; if , its explicit zero-step case returns immediately.
Rank restrictions and empirical transfer claims
Remark
Low-rank adaptation constrains the update of one linear layer to rank at most and uses trainable scalar coordinates for the two factors, excluding the frozen base matrix and any optional biases. These algebraic facts do not imply that a downstream task has an optimal or effective update of rank at most , that a finite-budget training procedure reaches an optimum, that transfer performance improves, or that low rank prevents catastrophic forgetting. Empirical rank, quality, throughput, memory, and latency findings for a particular model, data set, and hardware configuration remain empirical observations under that setup; they are not consequences of the factorization or gradient formulas. Merging the factors has an exact real-arithmetic output identity, but this does not assert bitwise equality, floating-point accuracy, adapter-switching latency, storage savings, or hardware speed.
Remark references
Rank capacity and factorization ambiguity of a low-rank adapter: rank capacity and factorization symmetry proved for finite real matrices.
Exact merging and gradients for a low-rank adapter: exact real-arithmetic merge and factor-gradient formulas.
Hu et al., §§4–5: LoRA parameterization and source-specific empirical context
4 · Examples, counterexamples and false statements
None yet.
Sources
- Edward Hu et al., LoRA: Low-Rank Adaptation of Large Language Models, arXiv:2106.09685v2, §4.1
- MIT OpenCourseWare 18.S096, Matrix Calculus for Machine Learning and Beyond, Lecture 5 Part 3, §§8.3–8.4
- Sheldon Axler, Linear Algebra Done Right, fourth edition, §7E, Theorems 7.70 and 7.80
- Edward Hu et al., LoRA: Low-Rank Adaptation of Large Language Models, arXiv:2106.09685v2, §§4–5