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.

Low-rank adaptation and the geometry of parameter updates

1 · Prerequisites

2 · Logical flowchart

3 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicableOpen item page →

Low-rank adaptation of a linear layer

Definition

Let d,k be positive integers, let 1≤r≤min⁡(d,k), let c∈R∖{0}, and fix a matrix W0∈Rd×k. A rank-r adapter for the linear layer x↦W0x consists of trainable factor matrices B∈Rd×r and A∈Rr×k and the updated weight matrix

W=W0+cBA.

Its output on x∈Rk is Wx=W0x+cB(Ax)∈Rd. The base matrix W0 is frozen, meaning that an adaptation procedure does not update its entries; only entries of A and B are trainable in this definition. The update matrix is W−W0=cBA, whose rank is the dimension of its image as a linear map from Rk to Rd. No bias, dropout, random initialization, optimization rule, or convergence guarantee is part of this definition.

Definition references

AlgorithmAlgorithm: AI-adaptedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Finite-budget low-rank adaptation by gradient descent

Definition

Fix positive integers d,k,n, an integer 1≤r≤min⁡(d,k), a frozen matrix W0∈Rd×k, a nonzero scale c∈R, a finite ordered data list (xi,yi)i=1n with xi∈Rk, and, for each data entry, a loss program ℓi that returns a real scalar wherever its primitive calls are defined. Let T≥0 be a finite integer, let I0,…,IT−1 be fixed finite nonempty ordered lists of indices in {1,…,n} (repeated indices are allowed), let η0,…,ηT−1≥0 be finite step sizes, and supply an initial matrix A0∈Rr×k. The procedure has no dropout or random initialization; any random initialization must be sampled externally and supplied as A0. Set B0=0∈Rd×r.

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 C1 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.

Lt(A,B)=1∣It∣∑i∈Itℓi ⁣((W0+cBA)xi)

Starting with t=0, perform the following finite loop while t<T:

  1. Evaluate the displayed program at (At,Bt), visiting its primitive calls in evaluation order. At the first call with no primal value, return DOMAIN_ERROR with the current factors and step index t. At the first defined piecewise primitive whose input lies on a branch boundary or has ambiguous branch selection, return NONDIFFERENTIABLE with the current factors and step index t. 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 (At,Bt), with the selected branch choices, with respect to the ordered list of all entries of At followed by all entries of Bt, each matrix flattened row by row. If reverse mode returns either failure status, return it with the current factors and step index t. No factor update is made on a failure status.
  2. If reverse mode returns gradients, reshape the first and second blocks into GtA∈Rr×k and GtB∈Rd×r, respectively, and set

At+1=At−ηtGtA,Bt+1=Bt−ηtGtB.

Increment t by one.

After T successful updates, return SUCCESS, the matrices AT,BT, and the merged weight W0+cBTAT. At T=0 return the supplied A0, zero B0, and W0 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

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

Rank capacity and factorization ambiguity of a low-rank adapter

Statement

Fix positive integers d,k, an integer 1≤r≤min⁡(d,k), a nonzero real number c, and a base matrix W0∈Rd×k. For every pair B∈Rd×r and A∈Rr×k, the adapter update Δ=cBA has matrix rank at most r, where rank is the dimension of the image of the associated linear map. Conversely, every target update Δ∈Rd×k of rank at most r has at least one representation Δ=cBA with these factor shapes. For any such factors and any invertible matrix M∈Rr×r, the transformed factors BM and M−1A represent the same update. Thus the factorization is not identifiable: every target update of rank at most r has more than one factor pair. A target update of rank greater than r cannot be represented.

Facts & Assumptions

Given: The factor dimensions and nonzero scale in the statement.

[F1]

Low-rank adaptation of a linear layer: the update matrix is cBA, with A∈Rr×k, B∈Rd×r, and c≠0.

[F2]

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

1.1givenF1algebra

The image of BA is contained in the image of B, whose dimension is at most the number r of columns of B. Multiplication by the nonzero scalar c preserves image dimension, so rank⁡(cBA)≤r.

1.2givenF2choosealgebra

Let Δ∈Rd×k have rank q≤r. If q=0, then Δ=0 and the zero factors give Δ=cBA. If q>0, apply [F2] to the real linear map Δ/c:Rk→Rd. Since c≠0, this map has rank q, so its SVD has exactly q positive terms: Δ/c=∑j=1qsjujvjT, with sj>0 and orthonormal vectors uj∈Rd, vj∈Rk.

1.3F1givenalgebra

If M∈Rr×r is invertible, associativity gives (BM)(M−1A)=B(MM−1)A=BA, so the transformation preserves cBA.

2.1F1step 1.2constructalgebra

For j≤q, set the jth column of B to sjuj and the jth row of A to sjvjT; fill the remaining columns of B and rows of A with zero. These matrices have the required shapes and BA=∑j=1qsjujvjT=Δ/c, hence cBA=Δ.

3.1givenstep 1.1step 2.1step 1.3algebra∎

If rank⁡(Δ)>r, step 1.1 rules out a factor representation. If Δ≠0 has rank at most r, step 2.1 gives a representation with B≠0; the matrix M=2Ir, where Ir is the identity on Rr, is invertible with inverse 12Ir, and BM=2B≠B, so step 1.3 gives a distinct factor pair with the same product. If Δ=0, let A′ have entry 1 in position (1,1) and all other entries 0; then (B,A)=(0,0) and (B,A)=(0,A′) are distinct factor pairs for the zero update. Thus every representable target update has multiple factor pairs.

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

Exact merging and gradients for a low-rank adapter

Statement

Fix dimensions and matrices as in the definition of a low-rank adapter. Let m≥1, let x1,…,xm∈Rk, and let each ℓj be a finite real-arithmetic loss program with scalar real output wherever its primitive calls are defined. Each primitive map is C1 on a declared open domain or is piecewise C1 with finitely many open branch regions and a C1 formula on each region; when defined, a boundary primal value is specified separately. Here C1 means totally differentiable with continuous derivative. Define the finite empirical loss on a weight matrix U∈Rd×k by the following formula wherever all the programs return scalar values:

L(U)=1m∑j=1mℓj(Uxj).

At any W=W0+cBA where all primitive calls have values and every piecewise primitive call is on a unique strict branch, write G=∇WL(W) for the Frobenius gradient, defined by DL(W)[H]=⟨G,H⟩F for every H∈Rd×k, where ⟨X,Y⟩F=tr⁡(XTY). Then the factor gradients are

∇BL(W0+cBA)=cGAT,∇AL(W0+cBA)=cBTG.

At every successful step t of the finite-budget adaptation algorithm, write its ordered minibatch as It=(it,1,…,it,mt), retaining repeated indices, and define

Lt(U)=1mt∑s=1mtℓit,s(Uxit,s).

With Wt=W0+cBtAt and Gt=∇WLt(Wt), 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 ∇BtLt(Wt)=cGtAtT and ∇AtLt(Wt)=cBtTGt. If B=0, then ∇AL=0 for every such empirical loss; if also A=0, then ∇BL=0. For every input x∈Rk, the unmerged and merged layer outputs agree:

W0x+cB(Ax)=(W0+cBA)x.

The factor matrices contain rk+dr=r(d+k) trainable scalar coordinates, excluding the frozen entries of W0; 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 T≥0 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 T updates. For T=0, it returns immediately without evaluating a loss.

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.

[F1]

Low-rank adaptation of a linear layer: the updated matrix is W0+cBA, with A∈Rr×k, B∈Rd×r, and fixed c≠0.

[F2]

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 A and B.

[F3]

Reverse accumulation sums gradients over shared parameter uses: for a finite C1 recurrence with one shared parameter input, reverse accumulation includes every transition's parameter pullback.

[F4]

The chain rule for total derivatives: D(g∘f)(a)=Dg(f(a))∘Df(a): the total derivative of a composition is the ordered composition of the total derivatives of its maps.

[F5]

Reverse mode computes the exact gradient of the real-arithmetic graph: on a finite C1 scalar-output program at a fixed strict-branch evaluation point, reverse mode returns the exact derivative with respect to its inputs.

Proof

1.1F1givenalgebra

Fix perturbations H∈Rd×r and K∈Rr×k of B and A. Expanding the product gives W0+c(B+εH)(A+εK)=W+εc(HA+BK)+ε2cHK, so the derivative of (A,B)↦W0+cBA in direction (K,H) is c(HA+BK).

1.2F1F3givenconstruct

At a successful step t, write It=(it,1,…,it,mt), retaining repeated indices. Set θ to the ordered vector of all entries of A and B, put h0=0, and define hs=hs−1+mt−1ℓit,s((W0+cBA)xit,s) for 1≤s≤mt. On the strict branches selected at this step, this is a finite C1 recurrence on open domains with one shared parameter input and terminal scalar hmt=Lt(W0+cBA). Thus the recurrence gradient formula in [F3] applies, including repeated parameter uses.

1.3F1givenalgebra

Associativity of matrix multiplication gives W0x+cB(Ax)=(W0+cBA)x. Counting entries of the two trainable factors gives rk+dr=r(d+k); the base matrix is frozen.

2.1F4step 1.1givenalgebra

By the chain rule, the derivative of (A,B)↦L(W0+cBA) in direction (K,H) is ⟨G,c(HA+BK)⟩F; the same calculation applies to each batch objective Lt with its gradient Gt.

3.1step 2.1algebra

The trace identity tr⁡(GTHA)=tr⁡((GAT)TH) gives ⟨G,HA⟩F=⟨GAT,H⟩F. The trace identity tr⁡(GTBK)=tr⁡((BTG)TK) gives ⟨G,BK⟩F=⟨BTG,K⟩F; these identities also hold with Gt for each Lt.

4.1step 3.1algebra

The Frobenius inner product determines a matrix uniquely from its pairing with every perturbation. Since H and K are arbitrary, step 3.1 therefore identifies the gradients as ∇BL=cGAT and ∇AL=cBTG, and the same formulas hold for each batch objective with Gt.

5.1F2F5step 4.1step 1.2algebra

At a successful step t, the algorithm evaluates the finite scalar program for Lt(W0+cBA). 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 Gt.

5.2step 4.1algebra

If B=0, the formula for ∇AL in step 4.1 is zero; if also A=0, the formula for ∇BL is zero.

6.1F2givenalgebra∎

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 t. Induction on t shows there can be at most T successful updates. If no failure occurs, the loop reaches t=T and returns SUCCESS; if T=0, its explicit zero-step case returns immediately.

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

Rank restrictions and empirical transfer claims

Remark

Low-rank adaptation constrains the update of one linear layer to rank at most r and uses r(d+k) 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 r, 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