Phases of Muoncompanion
Section SJ · SignSGD: drift and volatility · top-level result
Proved in Lean
Proposition SJ.4 (Isotropic SignSGD recursion)
Let \(\Sigmain=\Idin\) and \(\Sigmaout=\Idout\), and let \(\Dt\) be the state at step \(t\). Suppose that, almost surely, \(\Dt\) with the batch size \(B\) is in the isotropic regime of Definition SJ.2 and \(k\ge k_0\). Then the SignSGD step satisfies
\begin{equation}\tag{SJ.18} \EE_t\big[\cR(t+1)\big]=\cR(t)-\lr\,\mathcal N_B\sqrt{\frac{4\cR(t)}\pi}+\frac{\lr^2}2\,\Nin\Nout+E_t,\qquad \abs{E_t}\le\lr\,K\sqrt{2\cR(t)}\,\Big(C_2+\frac{C_r}{\sqrt k}\Big), \end{equation}
with \(C_2\) universal and \(C_r\) from Theorem SJ.1. The error is at most \(\pi K(C_2+C_r)/(2\sqrt{2/\pi}\sqrt k)\) times the drift term.
Proof.
Conditionally on the past, \(\Dt\) is fixed and the batch has its unconditional law, because the batch is independent of the past. The identity (SJ.9) of Proposition SJ.2 at \(\Delta=\Dt\ne0\) gives
\[ \EE_t\big[\cR(t+1)\big]=\cR(t)-\lr\,\mathsf D+\frac{\lr^2}2\,\Nin\Nout . \]
Theorem SJ.1 replaces \(\mathsf D\) by \(\mathsf D_0=\mathcal N_B\sqrt{4\cR(t)/\pi}\) with the stated error, since \(F=\sqrt{2\cR(t)}\).

Uses

Lean

Proved in Lean
Muon.SignSGD.prop_app_sgd_iso_filtered source
theorem prop_app_sgd_iso_filtered :
    ∃ C₂ : ℝ, 0 ≤ C₂ ∧ ∀ K fMin Cdelta : ℝ, 1 ≤ K → 0 < fMin → 0 < Cdelta →
      ∃ Cr : ℝ, 0 ≤ Cr ∧ ∀ P : IsoParams, P.K = K → P.fMin = fMin → P.Cdelta = Cdelta →
        ∀ (Nout Nin B : ℕ) (η : ℝ), 0 ≤ η → isoK0 P ≤ (kOf Nout Nin B : ℝ) →
          ∀ (Ω : Type) [mΩ : MeasurableSpace Ω] (Pr : Measure Ω) [IsProbabilityMeasure Pr]
            (C : Covariances Nout Nin) (hSout : C.Sout = 1) (hSin : C.Sin = 1)
            (ν : Measure (Vec Nout × Vec Nin)) (hν : Muon.Setup.assum_data_target C ν)
            (x : Ω → Muon.Setup.Batch Nout Nin B) (hxm : Measurable x)
            (hid : Muon.Setup.IIDBatch Pr ν (fun a ω => x ω a))
            (G : MeasurableSpace Ω) (hG : G ≤ mΩ)
            (Dt : Ω → Matrix (Fin Nout) (Fin Nin) ℝ)
            (hDt : ∀ i j, Measurable[G] fun ω => Dt ω i j)
            (hind : ProbabilityTheory.Indep G (MeasurableSpace.comap x inferInstance) Pr)
            (hreg : ∀ᵐ ω ∂Pr, def_app_sgd_iso_regime P Nout Nin B (Dt ω)),
            (∀ᵐ ω ∂Pr,
              |condExp G Pr (fun w => Muon.Setup.riskSigma C
                  (def_app_sgd_update η (Dt w) (toSignBatch (x w)))) ω
                - (Muon.Setup.riskSigma C (Dt ω)
                    - η * batchConst B * Real.sqrt (4 * Muon.Setup.riskSigma C (Dt ω) / Real.pi)
                    + η ^ 2 / 2 * ((Nin : ℝ) * (Nout : ℝ)))|
              ≤ η * P.K * Real.sqrt (2 * Muon.Setup.riskSigma C (Dt ω))
                  * (C₂ + Cr / Real.sqrt (kOf Nout Nin B : ℝ)))
            ∧ (∀ᵐ ω ∂Pr,
              |condExp G Pr (fun w => Muon.Setup.riskSigma C
                  (def_app_sgd_update η (Dt w) (toSignBatch (x w)))) ω
                - (Muon.Setup.riskSigma C (Dt ω)
                    - η * batchConst B * Real.sqrt (4 * Muon.Setup.riskSigma C (Dt ω) / Real.pi)
                    + η ^ 2 / 2 * ((Nin : ℝ) * (Nout : ℝ)))|
              ≤ Real.pi * P.K * (C₂ + Cr)
                  / (2 * Real.sqrt (2 / Real.pi) * Real.sqrt (kOf Nout Nin B : ℝ))
                  * (η * batchConst B * Real.sqrt (4 * Muon.Setup.riskSigma C (Dt ω) / Real.pi))) := by
Muon.SignSGD.prop_app_sgd_iso_frozen source
theorem prop_app_sgd_iso_frozen :
    ∃ C₂ : ℝ, 0 ≤ C₂ ∧ ∀ K fMin Cdelta : ℝ, 1 ≤ K → 0 < fMin → 0 < Cdelta →
      ∃ Cr : ℝ, 0 ≤ Cr ∧ ∀ P : IsoParams, P.K = K → P.fMin = fMin → P.Cdelta = Cdelta →
        ∀ (Nout Nin B : ℕ) (η : ℝ), 0 ≤ η → ∀ (Δ : Matrix (Fin Nout) (Fin Nin) ℝ),
          def_app_sgd_iso_regime P Nout Nin B Δ →
          isoK0 P ≤ (kOf Nout Nin B : ℝ) →
          ∀ (Ω : Type) [MeasurableSpace Ω] (Pr : Measure Ω) [IsProbabilityMeasure Pr]
            (C : Covariances Nout Nin) (hSout : C.Sout = 1) (hSin : C.Sin = 1)
            (ν : Measure (Vec Nout × Vec Nin)) (hν : Muon.Setup.assum_data_target C ν)
            (β : Ω → Batch Nout Nin B)
            (hβ : Muon.Setup.IIDBatch Pr ν (fun a ω => ((β ω).xout a, (β ω).xin a))),
            |∫ ω, Muon.Setup.riskSigma C (def_app_sgd_update η Δ (β ω)) ∂Pr
                - (Muon.Setup.riskSigma C Δ
                    - η * batchConst B * Real.sqrt (4 * Muon.Setup.riskSigma C Δ / Real.pi)
                    + η ^ 2 / 2 * ((Nin : ℝ) * (Nout : ℝ)))|
              ≤ η * P.K * Real.sqrt (2 * Muon.Setup.riskSigma C Δ)
                  * (C₂ + Cr / Real.sqrt (kOf Nout Nin B : ℝ))
            ∧ |∫ ω, Muon.Setup.riskSigma C (def_app_sgd_update η Δ (β ω)) ∂Pr
                - (Muon.Setup.riskSigma C Δ
                    - η * batchConst B * Real.sqrt (4 * Muon.Setup.riskSigma C Δ / Real.pi)
                    + η ^ 2 / 2 * ((Nin : ℝ) * (Nout : ℝ)))|
              ≤ Real.pi * P.K * (C₂ + Cr)
                  / (2 * Real.sqrt (2 / Real.pi) * Real.sqrt (kOf Nout Nin B : ℝ))
                  * (η * batchConst B * Real.sqrt (4 * Muon.Setup.riskSigma C Δ / Real.pi)) := by