Phases of Muoncompanion
Section SJ · SignSGD: drift and volatility
Proved in Lean
Proposition SJ.7 (Quadratic forms of a column)
There are admissible constants \(V_*\) and \(D_*\) such that, for every symmetric \(\Pi\in\R^{\Nout\times\Nout}\) and every column \(j\),
\begin{equation}\tag{SJ.38} \EE\Big|h_j^\T\Pi h_j-\frac{2\cR}B\Tr(\Pi\Lambda)\Big|\le\norm\Pi\Big(\sqrt{\frac{V_*}k}+\frac{D_*}k\Big). \end{equation}
Proof.
Put \(W\defeq\frac1B\sum_bZ_b\), \(V\defeq V_j\) and \(a\defeq\norm\Pi\), so that \(h_j^\T\Pi h_j=m_j^\T\Pi m_j+2m_j^\T\Pi W+W^\T\Pi W\).
The fluctuation. The variance of the Gram term is
\[ \Var\big(W^\T\Pi W\big)=\frac{\Var(Z_1^\T\Pi Z_1)}{B^3}+\frac{2(B-1)}{B^3}\Tr(\Pi V\Pi V). \]
To see this, expand \(B^2W^\T\Pi W=\sum_bZ_b^\T\Pi Z_b+2\sum_{b<b'}Z_b^\T\Pi Z_{b'}\). A covariance between two terms vanishes unless every sample index occurs in both, because an index that occurs once has a centered factor. The diagonal terms are independent, and each of the \(B(B-1)/2\) cross pairs has second moment \(\Tr(\Pi V\Pi V)\). The two pieces are bounded by
\[ \Var(Z_1^\T\Pi Z_1)\le a^2\EE\norm{Z}^4\le a^2A_4\Nout^2,\qquad \Tr(\Pi V\Pi V)=\norm{V^{1/2}\Pi V^{1/2}}_\F^2\le\Nout a^2V_0^2 . \]
The linear term has \(\Var(2m_j^\T\Pi W)=4m_j^\T\Pi V\Pi m_j/B\le4a^2V_0\norm{m_j}^2/B\). With \(\Var(X_1+X_2)\le2\Var X_1+2\Var X_2\) and \(\Nout\le Kk\le KB\),
\[ \Var\big(h_j^\T\Pi h_j\big)\le a^2\Big[\frac{2A_4\Nout^2}{B^3}+\frac{4\Nout V_0^2}{B^2}+\frac{8V_0L^2C_{\rm col}}{kB}\Big]\le\frac{a^2V_*}k, \]
with \(V_*\defeq2A_4K^2+4KV_0^2+8V_0L^2C_{\rm col}\).
The bias. The mean is \(\Tr(\Pi V)/B+m_j^\T\Pi m_j\). By (SJ.32), its difference from \((2\cR/B)\Tr(\Pi\Lambda)\) is at most
\[ a\Big[\frac{2C_j\Tr\Lambda+2\Tr T_D+3\norm{m_j}^2}B+\norm{m_j}^2\Big]\le\frac ak\big(2L^2C_{\rm col}K+2H_0+4L^2C_{\rm col}\big)\defeq\frac{aD_*}k . \]
Cauchy–Schwarz bounds the mean absolute fluctuation by the square root of the variance, and adding the bias gives (SJ.38).

Uses

Used by

Lean

Proved in Lean
Muon.SignSGD.prop_app_sgd_quadratic source
theorem prop_app_sgd_quadratic (P : HaarParams) :
    ∃ Vs Ds : ℝ, 0 ≤ Vs ∧ 0 ≤ Ds ∧
      ∀ (n m B : ℕ) (μ : Fin n → ℝ) (D : Matrix (Fin n) (Fin m) ℝ),
        def_app_sgd_state_law P n m B μ D →
        ∀ Pm : Matrix (Fin n) (Fin n) ℝ, Pmᵀ = Pm → ∀ j : Fin m,
          ∫⁻ β, ENNReal.ofReal
              |hCol μ D β j ⬝ᵥ (Pm *ᵥ hCol μ D β j)
                - twoR μ D / (B : ℝ) * (Pm * Matrix.diagonal μ).trace|
            ∂(batchLaw n m B)
            ≤ ENNReal.ofReal (Muon.External.matOpNorm Pm *
                (Real.sqrt (Vs / (kOf n m B : ℝ)) + Ds / (kOf n m B : ℝ))) := by