Lemma 1: the weights of the linear model evolve by
ProvedDimensionalCollapse.linear_weight_flowLet be inputs in , and let be the weight of the linear model trained on the InfoNCE loss by gradient flow. If at time
then
where are the gradients of the loss with respect to the embeddings , .
This is the chain rule for the linear model, and it reduces the training dynamics to the gradients on the embeddings.
Formalization Note Derivatives in time are taken entrywise, and the hypothesis is required only at the time where the conclusion is drawn.
import Mathlib import Definitions.Def_DimensionalCollapse_Basic open Matrix Filter Topology
namespace DimensionalCollapse
theorem linear_weight_flow {N n d : ℕ} (x x' : Fin N → Fin n → ℝ)
(W : ℝ → Matrix (Fin d) (Fin n) ℝ) (t : ℝ)
(hW : ∀ a b, HasDerivAt (fun s => W s a b) (-(matGrad (linLoss x x') (W t)) a b) t) :
∀ a b, HasDerivAt (fun s => W s a b) (-(Gmat x x' (W t)) a b) t := by sorry
end DimensionalCollapseRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
For any natural numbers , take the following data:
- two families of input vectors and ;
- a time-dependent weight matrix , defined for all real ;
- a time .
The loss. For embeddings , with , define
The loss is
Some features of this definition:
- The "negatives" in are only the with , never the .
- always, so the logarithm is of a positive number.
- The linear-model loss is for , where and .
Derivatives. All partial derivatives below are one-variable derivatives at . By convention, such a derivative is taken to be if the one-variable function is not differentiable there.
- The matrix gradient has entry , where is the matrix unit.
- For embeddings , has -th entry . Here is the -th standard basis vector, and all other and all are held fixed.
- is defined the same way, perturbing only . So and are treated as independent variables.
The matrix . For , define
with the gradients evaluated at and .
Hypothesis. For every entry , the scalar function is differentiable at the single time , with
Nothing is assumed about at any other time.
Conclusion. For every entry , is differentiable at , with
Derivatives are unique. So, given the hypothesis, the conclusion is equivalent to the matrix identity holding at the single matrix .
Edge cases.
- If or , the matrices have no entries, and both hypothesis and conclusion are empty.
- If , the loss is identically , and and are both the zero matrix.
- The hypothesis is satisfiable for any data, for example by .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.