Corollary 3.4.1: the criteria are close under one-sided normalization
ProvedContrastiveDuality.criteria_bounds_of_normalizedLet and .
- If the embeddings are L2-normalized, for every , then
- If the dimensions are L2-normalized, for every , then
So, even when only one direction of the embedding matrix is normalized, the sample-contrastive and dimension-contrastive criteria cannot be arbitrarily far apart.
Formalization Note The batch size and embedding dimension are assumed positive, as in the paper's setting; all quantities are real numbers.
import Mathlib import Definitions.Def_ContrastiveDuality_Basic open MeasureTheory ProbabilityTheory Matrix
namespace ContrastiveDuality
theorem criteria_bounds_of_normalized {M N : ℕ} (hM : 0 < M) (hN : 0 < N)
(K : Matrix (Fin M) (Fin N) ℝ) :
((∀ i, colNorm K i = 1) →
nonContrastiveCriterion K - N + (N : ℝ) ^ 2 / M ≤ contrastiveCriterion K ∧
contrastiveCriterion K ≤ nonContrastiveCriterion K - N + (N : ℝ) ^ 2) ∧
((∀ j, rowNorm K j = 1) →
contrastiveCriterion K - M + (M : ℝ) ^ 2 / N ≤ nonContrastiveCriterion K ∧
nonContrastiveCriterion K ≤ contrastiveCriterion K - M + (M : ℝ) ^ 2) := by sorry
end ContrastiveDualityRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let and be natural numbers with and , and let be an arbitrary real matrix with rows (indexed by ) and columns (indexed by ). Write for the -th column and for the -th row.
Definitions used. The column norm and row norm are the Euclidean norms
For a square matrix , denotes the matrix with the same diagonal entries as and zeros elsewhere. The squared Frobenius norm of a matrix is .
The contrastive criterion uses the Gram matrix of the columns, . It squares and sums its off-diagonal entries, which are the pairwise inner products of distinct columns:
The non-contrastive criterion does the same for the Gram matrix of the rows, :
Assertion. For every such , both of the following implications hold.
- Column normalisation. If every column of has Euclidean norm exactly , i.e. for all , then
- Row normalisation. If every row of has Euclidean norm exactly , i.e. for all , then
Remarks on the statement.
- All quantities are real numbers. and are treated as reals, and and are ordinary real divisions. Because , no division by zero occurs.
- Both inequalities in each chain are non-strict ().
- The two parts are independent implications joined by "and". Neither part requires the other's normalisation hypothesis.
- Each hypothesis is satisfiable for every admissible . For example, all columns equal to the first standard basis vector have unit norm. When , the identity matrix satisfies both hypotheses.
- The uniform sphere measure defined in the accompanying definitions file does not appear in this statement.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.