Theorem 8: necessary and sufficient condition for a representation to solve a task linearly
ProvedSSLSpectralEmbedding.linear_probe_minimum_lossLet be a task and a representation, and let be the left singular vectors of with nonzero singular values, i.e. an orthonormal basis of the column space of . With , the minimum is attained and
where . This minimum is if and only if the columns of span the columns of , the left singular vectors of with nonzero singular values.
Formalization Note is taken to be any matrix with orthonormal columns and the same column space as . The right-hand side does not depend on the choice. Because with orthogonal, , and the latter is used. The span of is the column space of , so the span condition is stated as inclusion of column spaces.
import Mathlib import Definitions.Def_SSLSpectralEmbedding_Basic open Matrix
namespace SSLSpectralEmbedding
theorem linear_probe_minimum_loss {N K C r : ℕ} (Y : Matrix (Fin N) (Fin C) ℝ)
(Z : Matrix (Fin N) (Fin K) ℝ) (U : Matrix (Fin N) (Fin r) ℝ) (hU : Uᵀ * U = 1)
(hUZ : LinearMap.range (Matrix.toLin' U) = LinearMap.range (Matrix.toLin' Z)) :
IsLeast (Set.range fun W : Matrix (Fin K) (Fin C) ℝ => lsLoss Y Z W)
((1 / 2) * frobSq Y - (1 / 2) * frobSq (Uᵀ * Y)) ∧
((1 / 2) * frobSq Y - (1 / 2) * frobSq (Uᵀ * Y) = 0 ↔
LinearMap.range (Matrix.toLin' Y) ≤ LinearMap.range (Matrix.toLin' U)) := by sorry
end SSLSpectralEmbeddingRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be natural numbers, any of which may be . The theorem takes three real matrices:
- a target matrix ;
- an embedding matrix , whose -th row is the embedding of sample ;
- a matrix .
For a real matrix , write for the squared Frobenius norm. For , the linear-probe loss is
For a matrix with rows, denotes its column space, i.e. the image of .
Hypotheses. There are exactly two:
- . The columns of are orthonormal in , which forces .
- as subspaces of .
No relation between and is assumed, and no rank or non-degeneracy condition is placed on or . The hypotheses can always be satisfied: take the columns of to be an orthonormal basis of . In particular, if has no columns () or is zero, then and necessarily .
Conclusion. The conclusion is the conjunction of two statements about the number
where .
- (a) is the least element of the set . This means two things:
- some attains ;
- for every .
- (b) The following equivalence holds:
Edge cases. In the degenerate cases or , all the matrices involved are empty, so every norm is . Then , the loss is identically , and both sides of (b) hold trivially. When , is empty, so .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.