Phases of Muoncompanion
Section SJ · SignSGD: drift and volatility
Proved in Lean
Lemma SJ.3 (Moments of one coordinate)
The coordinate (SJ.10) has mean \(\EE X=\Delta_{ij}\), variance
\[ s^2\defeq\Var X=F^2+2\norm{\Delta_{i\cdot}}^2+2\norm{\Delta_{\cdot j}}^2+3\Delta_{ij}^2,\qquad F^2\le s^2\le8F^2, \]
and third centered moment
\[ m_3\defeq\EE(X-\Delta_{ij})^3=24\Delta_{ij}\norm{\bar\Delta}_\F^2+126\Delta_{ij}\big(\norm r^2+\norm q^2\big)+200\Delta_{ij}^3+54\,q^\T\bar\Delta r, \]
so that \(\abs{m_3}\le200\abs{\Delta_{ij}}F^2+54F\norm r\norm q\). For every integer \(p\ge1\), \(\EE\abs X^p\le((2p-1)!!)^2F^p\), and the standardized coordinate \(Y\defeq(X-\Delta_{ij})/s\) satisfies \(\EE Y^4\le88208\).
Proof.
Call the four terms of (SJ.10) \(T_1,\dots,T_4\). The moments are Gaussian pairings [89]; a product with an odd total degree in one of the independent blocks has mean zero. Only \(T_1\) has even degree in every block, so \(\EE X=\Delta_{ij}\EE\xi^2\EE\zeta^2=\Delta_{ij}\).
The second moment is the sum of the four squares, because every cross product has odd degree in \(z'\) or in \(w'\):
\[ \EE X^2=9\Delta_{ij}^2+3\norm r^2+3\norm q^2+\norm{\bar\Delta}_\F^2 . \]
With \(F^2=\norm{\bar\Delta}_\F^2+\norm r^2+\norm q^2+\Delta_{ij}^2\), \(\norm{\Delta_{i\cdot}}^2=\norm r^2+\Delta_{ij}^2\) and \(\norm{\Delta_{\cdot j}}^2=\norm q^2+\Delta_{ij}^2\), subtracting \(\Delta_{ij}^2\) gives the formula for \(s^2\). Each added term is at most \(F^2\) times its coefficient, so \(F^2\le s^2\le8F^2\).
The third moment keeps \(T_1^3\), the terms \(3T_1T_k^2\) for \(k=2,3,4\), and \(6T_2T_3T_4\). With \(\EE\xi^4=3\) and \(\EE\xi^6=15\),
\[ \EE X^3=225\Delta_{ij}^3+135\Delta_{ij}\big(\norm r^2+\norm q^2\big)+27\Delta_{ij}\norm{\bar\Delta}_\F^2+54\,q^\T\bar\Delta r . \]
Here \(54=6\,\EE\xi^4\EE\zeta^4\) and \(\EE[(r^\T w')(q^\T z')(z'^\T\bar\Delta w')]=q^\T\bar\Delta r\). The centered moment is \(m_3=\EE X^3-3\Delta_{ij}\EE X^2+2\Delta_{ij}^3\), which gives the stated formula. Its coefficients \(24,126,200\) are at most \(200\), and \(\abs{q^\T\bar\Delta r}\le F\norm q\norm r\), which gives the bound.
For the absolute moments, put \(d=z^\T\Delta w\). Conditionally on \(w\), \(d\) is centered Gaussian with variance \(\norm{\Delta w}^2\), so
\[ \EE d^{2p}=(2p-1)!!\,\EE\norm{\Delta w}^{2p}\le\big((2p-1)!!\big)^2F^{2p}. \]
The inequality holds because \(\norm{\Delta w}^2=F^2\sum_l\pi_lg_l^2\) for weights \(\pi_l\ge0\) summing to \(1\) (the normalized eigenvalues of \(\Delta^\T\Delta\)) and independent standard Gaussian \(g_l\), and Jensen’s inequality gives \((\sum_l\pi_lg_l^2)^p\le\sum_l\pi_lg_l^{2p}\). The Cauchy–Schwarz inequality, which needs no independence of \(d\) and \(\xi\zeta\), gives
\[ \EE\abs X^p\le\big(\EE d^{2p}\,\EE\abs{\xi\zeta}^{2p}\big)^{1/2}\le\big((2p-1)!!\big)^2F^p . \]
Finally \((a+b)^4\le8(a^4+b^4)\), \(\EE X^4\le105^2F^4=11025F^4\) and \(s\ge F\) give
\[ \EE Y^4\le\frac{8\,(\EE X^4+\Delta_{ij}^4)}{s^4}\le8\,(11025+1)=88208 .\qedhere \]

Used by

Lean

Proved in Lean
Muon.SignSGD.lem_app_sgd_moments_i source
theorem lem_app_sgd_moments_i {Nout Nin : ℕ} (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (hΔ : Δ ≠ 0)
    (i : Fin Nout) (j : Fin Nin) :
    ∫ p, sgdCoord Δ i j p ∂(gaussBatch Nout Nin) = Δ i j := by
Muon.SignSGD.lem_app_sgd_moments_ii source
theorem lem_app_sgd_moments_ii {Nout Nin : ℕ} (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (hΔ : Δ ≠ 0)
    (i : Fin Nout) (j : Fin Nin) :
    variance (sgdCoord Δ i j) (gaussBatch Nout Nin)
      = frobNorm Δ ^ 2 + 2 * (∑ l, Δ i l ^ 2) + 2 * (∑ k, Δ k j ^ 2) + 3 * Δ i j ^ 2 := by
Muon.SignSGD.lem_app_sgd_moments_iii source
theorem lem_app_sgd_moments_iii {Nout Nin : ℕ} (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (hΔ : Δ ≠ 0)
    (i : Fin Nout) (j : Fin Nin) :
    frobNorm Δ ^ 2 ≤ variance (sgdCoord Δ i j) (gaussBatch Nout Nin) ∧
      variance (sgdCoord Δ i j) (gaussBatch Nout Nin) ≤ 8 * frobNorm Δ ^ 2 := by
Muon.SignSGD.lem_app_sgd_moments_iv source
theorem lem_app_sgd_moments_iv {Nout Nin : ℕ} (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (hΔ : Δ ≠ 0)
    (i : Fin Nout) (j : Fin Nin) :
    ∫ p, (sgdCoord Δ i j p - Δ i j) ^ 3 ∂(gaussBatch Nout Nin)
      = 24 * Δ i j * frobNorm (sgdDeletedBlock Δ i j) ^ 2
        + 126 * Δ i j * (∑ l, sgdRow Δ i j l ^ 2 + ∑ k, sgdCol Δ i j k ^ 2)
        + 200 * Δ i j ^ 3
        + 54 * dotProduct (sgdCol Δ i j) (Matrix.mulVec (sgdDeletedBlock Δ i j) (sgdRow Δ i j)) := by
Muon.SignSGD.lem_app_sgd_moments_v source
theorem lem_app_sgd_moments_v {Nout Nin : ℕ} (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (hΔ : Δ ≠ 0)
    (i : Fin Nout) (j : Fin Nin) :
    |∫ p, (sgdCoord Δ i j p - Δ i j) ^ 3 ∂(gaussBatch Nout Nin)|
      ≤ 200 * |Δ i j| * frobNorm Δ ^ 2
        + 54 * frobNorm Δ * Real.sqrt (∑ l, sgdRow Δ i j l ^ 2)
          * Real.sqrt (∑ k, sgdCol Δ i j k ^ 2) := by
Muon.SignSGD.lem_app_sgd_moments_vi source
theorem lem_app_sgd_moments_vi {Nout Nin : ℕ} (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (hΔ : Δ ≠ 0)
    (i : Fin Nout) (j : Fin Nin) :
    ∀ p : ℕ, 1 ≤ p →
      ∫ x, |sgdCoord Δ i j x| ^ p ∂(gaussBatch Nout Nin)
        ≤ (((2 * p - 1).doubleFactorial : ℕ) : ℝ) ^ 2 * frobNorm Δ ^ p := by
Muon.SignSGD.lem_app_sgd_moments_vii source
theorem lem_app_sgd_moments_vii {Nout Nin : ℕ} (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (hΔ : Δ ≠ 0)
    (i : Fin Nout) (j : Fin Nin) :
    ∫ x, sgdStdCoord Δ i j x ^ 4 ∂(gaussBatch Nout Nin) ≤ 88208 := by