Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1: weight decay promotes balancing of the predictor and online networks

Proved
SSLWithoutPairs.weight_decay_balancing

by Xeroth · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

byoleigenspace-alignmentgradient-flowlinear-networksself-supervised-learning

Let αp>0\alpha_p>0αp​>0, η≥0\eta\ge0η≥0, and let X,X′X,X'X,X′ be positive semidefinite n1×n1n_1\times n_1n1​×n1​ matrices. Let W(t)∈Rn2×n1W(t)\in\mathbb R^{n_2\times n_1}W(t)∈Rn2​×n1​ and Wp(t)∈Rn2×n2W_p(t)\in\mathbb R^{n_2\times n_2}Wp​(t)∈Rn2​×n2​, t≥0t\ge0t≥0, solve

W˙p=αp(−WpW(X+X′)+WaX)W⊤−ηWp,W˙=Wp⊤(−WpW(X+X′)+WaX)−ηW,\dot W_p=\alpha_p\big(-W_pW(X+X')+W_aX\big)W^\top-\eta W_p,\qquad \dot W=W_p^\top\big(-W_pW(X+X')+W_aX\big)-\eta W,W˙p​=αp​(−Wp​W(X+X′)+Wa​X)W⊤−ηWp​,W˙=Wp⊤​(−Wp​W(X+X′)+Wa​X)−ηW,

where Wa(t)W_a(t)Wa​(t) is an arbitrary target trajectory (no dynamics for WaW_aWa​ is assumed). Then, with the symmetric matrix C=W(0)W(0)⊤−αp−1Wp(0)⊤Wp(0)C=W(0)W(0)^\top-\alpha_p^{-1}W_p(0)^\top W_p(0)C=W(0)W(0)⊤−αp−1​Wp​(0)⊤Wp​(0), for all t≥0t\ge0t≥0

W(t)W(t)⊤=αp−1Wp(t)⊤Wp(t)+e−2ηtC.W(t)W(t)^\top=\alpha_p^{-1}W_p(t)^\top W_p(t)+e^{-2\eta t}C.W(t)W(t)⊤=αp−1​Wp​(t)⊤Wp​(t)+e−2ηtC.

With weight decay, the memory of the initialization decays, so the online network and the predictor become balanced.

Formalization Note The paper says only that CCC depends on the initialization. The statement gives its value, which is forced by setting t=0t=0t=0.

Preamble
import Mathlib
import Definitions.Def_SSLWithoutPairs_Basic

open MeasureTheory ProbabilityTheory Filter Topology Matrix
Formal statement
namespace SSLWithoutPairs

theorem weight_decay_balancing {n₁ n₂ : ℕ} (αp η : ℝ) (hαp : 0 < αp) (hη : 0 ≤ η)
    (X X' : Matrix (Fin n₁) (Fin n₁) ℝ) (hX : X.PosSemidef) (hX' : X'.PosSemidef)
    (Wp : ℝ → Matrix (Fin n₂) (Fin n₂) ℝ) (W Wa : ℝ → Matrix (Fin n₂) (Fin n₁) ℝ)
    (hWp : HasMatDerivOn Wp (fun t => byolFlowWp αp η X X' (Wp t) (W t) (Wa t)))
    (hW : HasMatDerivOn W (fun t => byolFlowW η X X' (Wp t) (W t) (Wa t))) :
    let C : Matrix (Fin n₂) (Fin n₂) ℝ := W 0 * (W 0)ᵀ - αp⁻¹ • ((Wp 0)ᵀ * Wp 0)
    Cᵀ = C ∧ ∀ t : ℝ, 0 ≤ t →
      W t * (W t)ᵀ = αp⁻¹ • ((Wp t)ᵀ * Wp t) + Real.exp (-2 * η * t) • C := by sorry

end SSLWithoutPairs
Source
Tian, Chen and Ganguli, Understanding Self-Supervised Learning Dynamics without Contrastive Pairs, arXiv:2102.06810v4 (2021), Section 2, Theorem 1, eq. (5), p. 3; proof in Appendix A, Theorem 1, eqs. (43)-(46), pp. 13-14
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. Fix natural numbers n1,n2n_1, n_2n1​,n2​. Either may be 000, in which case the matrices involved are empty and every matrix identity below holds trivially. Fix real numbers αp\alpha_pαp​ and η\etaη with

αp>0,η≥0.\alpha_p > 0, \qquad \eta \ge 0.αp​>0,η≥0.

(η=0\eta = 0η=0 is allowed.) Let X,X′X, X'X,X′ be real n1×n1n_1 \times n_1n1​×n1​ matrices that are both positive semidefinite, meaning symmetric with v⊤Xv≥0v^\top X v \ge 0v⊤Xv≥0 and v⊤X′v≥0v^\top X' v \ge 0v⊤X′v≥0 for all v∈Rn1v \in \mathbb{R}^{n_1}v∈Rn1​. Let

Wp:R→Rn2×n2,W:R→Rn2×n1,Wa:R→Rn2×n1W_p : \mathbb{R} \to \mathbb{R}^{n_2 \times n_2}, \qquad W : \mathbb{R} \to \mathbb{R}^{n_2 \times n_1}, \qquad W_a : \mathbb{R} \to \mathbb{R}^{n_2 \times n_1}Wp​:R→Rn2​×n2​,W:R→Rn2​×n1​,Wa​:R→Rn2​×n1​

be arbitrary matrix-valued functions of time.

  • No regularity, continuity, or relation to WWW or WpW_pWp​ is assumed for WaW_aWa​; it enters only through the two flow equations below.
  • Values of any of these functions at t<0t < 0t<0 play no role.

Hypotheses (flow equations). For every t≥0t \ge 0t≥0 and every entry, the entry of WpW_pWp​ has a derivative at ttt within [0,∞)[0,\infty)[0,∞) (one-sided from the right at t=0t = 0t=0) equal to the corresponding entry of

W˙p(t)=αp(−Wp(t) W(t) (X+X′)+Wa(t) X) W(t)⊤−η Wp(t).\dot W_p(t) = \alpha_p\big(-W_p(t)\,W(t)\,(X + X') + W_a(t)\,X\big)\,W(t)^\top - \eta\, W_p(t).W˙p​(t)=αp​(−Wp​(t)W(t)(X+X′)+Wa​(t)X)W(t)⊤−ηWp​(t).

Likewise, for every t≥0t \ge 0t≥0, each entry of WWW has a derivative within [0,∞)[0,\infty)[0,∞) at ttt equal to the corresponding entry of

W˙(t)=Wp(t)⊤(−Wp(t) W(t) (X+X′)+Wa(t) X)−η W(t).\dot W(t) = W_p(t)^\top\big(-W_p(t)\,W(t)\,(X + X') + W_a(t)\,X\big) - \eta\, W(t).W˙(t)=Wp​(t)⊤(−Wp​(t)W(t)(X+X′)+Wa​(t)X)−ηW(t).

The second equation carries no factor αp\alpha_pαp​.

Conclusion. Define the n2×n2n_2 \times n_2n2​×n2​ matrix

C=W(0) W(0)⊤−αp−1 Wp(0)⊤Wp(0).C = W(0)\,W(0)^\top - \alpha_p^{-1}\, W_p(0)^\top W_p(0).C=W(0)W(0)⊤−αp−1​Wp​(0)⊤Wp​(0).

The theorem asserts two things:

  1. CCC is symmetric: C⊤=CC^\top = CC⊤=C.
  2. For every real t≥0t \ge 0t≥0,
W(t) W(t)⊤=αp−1 Wp(t)⊤Wp(t)+e−2ηt C.W(t)\,W(t)^\top = \alpha_p^{-1}\, W_p(t)^\top W_p(t) + e^{-2\eta t}\, C.W(t)W(t)⊤=αp−1​Wp​(t)⊤Wp​(t)+e−2ηtC.

When η=0\eta = 0η=0, the second statement says that W(t)W(t)⊤−αp−1Wp(t)⊤Wp(t)W(t)W(t)^\top - \alpha_p^{-1} W_p(t)^\top W_p(t)W(t)W(t)⊤−αp−1​Wp​(t)⊤Wp​(t) equals its value at time 000 for all t≥0t \ge 0t≥0. The conclusion makes no reference to XXX, X′X'X′, or WaW_aWa​ beyond their role in the hypotheses.

Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me