Phases of Muoncompanion
Section SE · From the algorithm to the deterministic dynamics
Proved in Lean
Lemma SE.3 (Moments of one batch)
Let \(E\in\R^{\Nout\times\Nin}\) be deterministic, put \(A_E\defeq\Sigmaout^{1/2}E\Sigmain^{1/2}\) and \(d_a\defeq z_a^\T A_Ew_a\) for the samples of one batch, and let \(G^\circ[E]\) be the gradient (SE.1) of that batch.
  1. (i)
    \(\EE\norm{G^\circ[E]}_\F^2\le C_MB\norm{A_E}_\F^2\).
  2. (ii)
    \(\big(\EE\norm{G^\circ[E]}^2\big)^{1/2}\le C\log(2B)\norm{A_E}_\F\) and \(\big\|\max_{a\le B}\abs{d_a}\big\|_6\le C\log(2B)\norm{A_E}_\F\).
  3. (iii)
    The sample \(X_a\defeq B^{-1}d_a\Sigmaout^{1/2}(z_a\tensor w_a)\Sigmain^{1/2}\) has rank one and \((\EE\norm{X_a}_*^2)^{1/2}\le7C_\Sigma\gamma_\star\norm{A_E}_\F\).
The same bounds hold conditionally on \(\cF_t\) for the gradient \(G^\circ_{t+1}[E]\) of the batch of step \(t\) at a matrix \(E\) determined by the past \(\cF_t\).
Proof.
All three bounds are homogeneous of degree one in \(E\), so we may assume \(\norm{A_E}_\F=1\); then \(E\neq0\), \(\widehat A(E)=A_E\) and \(G^\circ[E]\) is the normalized batch of (SA.10) at the state \(E\), up to the factor \(\sqrt{2\cR(E)}=1\).
For (i), Lemma SA.4 and Lemma SA.6(iv) give
\[ \EE\norm{G^\circ[E]}_\F^2=\norm{\EE G^\circ[E]}_\F^2+\mathsf V_B\le C_\Sigma^2+\frac{C_\Sigma^2}{B}\big(\Nout\Nin+2\Nout+2\Nin+3\big)\le C_\Sigma^2(\gamma_\star+2)^2B . \]
For (ii), write \(Y\defeq\Sigmaout^{1/2}[z_1\cdots z_B]\) and \(X\defeq\Sigmain^{1/2}[w_1\cdots w_B]\), so that
\[ G^\circ[E]=\frac1B\,Y\diag(d_1,\dots,d_B)X^\T,\qquad \norm{G^\circ[E]}\le\frac1B\norm Y\norm X\max_a\abs{d_a}. \]
The matrix \([z_1\cdots z_B]\) has independent standard Gaussian entries, so by [100, Theorem 4.4.5] its operator norm exceeds \(C(\sqrt{\Nout}+\sqrt B+u)\) with probability at most \(2e^{-u^2}\); integrating this tail gives \(\norm{\norm Y}_6\le C\sqrt B\), and likewise \(\norm{\norm X}_6\le C\sqrt B\). For the residuals, Lemma SA.7(i) gives \(\norm{d_a}_{2p}\le((2p-1)!!)^{1/p}\le2p\) for every integer \(p\ge1\). Choosing \(2p\) to be the least even integer at least \(\max(6,\log B)\),
\[ \big\|\max_a\abs{d_a}\big\|_6\le\big\|\max_a\abs{d_a}\big\|_{2p}\le\Big(\sum_{a\le B}\EE\abs{d_a}^{2p}\Big)^{1/(2p)}\le B^{1/(2p)}\,2p\le C\log(2B). \]
Hölder’s inequality with the three exponents \(6\) gives
\[ \EE\norm{G^\circ[E]}^2\le\frac1{B^2}\norm{\norm Y}_6^2\norm{\norm X}_6^2\big\|\max_a\abs{d_a}\big\|_6^2\le C\log^2(2B). \]
For (iii), \(X_a=d_a\,\mathsf u_a\tensor\mathsf v_a\) with \(\mathsf u_a=\Sigmaout^{1/2}z_a/\sqrt B\) and \(\mathsf v_a=\Sigmain^{1/2}w_a/\sqrt B\) as in (SB.26), so \(\norm{X_a}_*=\abs{d_a}\norm{\mathsf u_a}\norm{\mathsf v_a}\), and Lemma SB.6 gives the bound. The conditional statement holds because the batch of step \(t\) is independent of the past.

Uses

Used by

Lean

Proved in Lean
Muon.Dynamics.lem_app_dyn_batch_i source
theorem lem_app_dyn_batch_i {Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω} [IsProbabilityMeasure P]
    (C : Covariances m n) (γstar CSig : ℝ) (hB : 0 < B) (hS : SizeFin C B γstar CSig)
    (z : Fin B → Ω → Vec m × Vec n)
    (hz : IIDBatch P ((Muon.Foundations.stdGaussianPi m).prod (Muon.Foundations.stdGaussianPi n)) z)
    (E : Mat m n) :
    Integrable (fun ω => fro (batchGrad E (physBatch C z ω)) ^ 2) P ∧
    ∫ ω, fro (batchGrad E (physBatch C z ω)) ^ 2 ∂P ≤
      cMConst CSig γstar * (B : ℝ) * fro (rOut C * E * rIn C) ^ 2 := by
Muon.Dynamics.lem_app_dyn_batch_ii source
theorem lem_app_dyn_batch_ii (certOp : Muon.External.GaussianOpNormL6) (γstar CSig : ℝ) :
    ∃ K : ℝ, ∀ (m n B : ℕ) (C : Covariances m n) (hB : 0 < B),
      SizeFin C B γstar CSig → ∀ (Ω : Type) [MeasurableSpace Ω] (P : Measure Ω)
        [IsProbabilityMeasure P] (z : Fin B → Ω → Vec m × Vec n),
        IIDBatch P ((Muon.Foundations.stdGaussianPi m).prod (Muon.Foundations.stdGaussianPi n)) z →
        ∀ E : Mat m n,
          eLpNorm (fun ω => opNorm (batchGrad E (physBatch C z ω))) 2 P ≤
              ENNReal.ofReal (K * Real.log (2 * (B : ℝ)) * fro (rOut C * E * rIn C)) ∧
          eLpNorm (fun ω => Finset.univ.sup'
              (Finset.univ_nonempty_iff.mpr ⟨⟨0, hB⟩⟩)
              (fun a => |resid E (phys C (z a ω))|)) 6 P ≤
              ENNReal.ofReal (K * Real.log (2 * (B : ℝ)) * fro (rOut C * E * rIn C)) := by
Muon.Dynamics.lem_app_dyn_batch_iii source
theorem lem_app_dyn_batch_iii {Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω}
    [IsProbabilityMeasure P] (C : Covariances m n) (γstar CSig : ℝ) (hB : 0 < B)
    (hS : SizeFin C B γstar CSig) (z : Fin B → Ω → Vec m × Vec n)
    (hz : IIDBatch P ((Muon.Foundations.stdGaussianPi m).prod (Muon.Foundations.stdGaussianPi n)) z)
    (E : Mat m n) (a : Fin B) :
    (∀ ω, (batchSummand C E z a ω).rank ≤ 1) ∧
    (rOut C * E * rIn C ≠ 0 → ∀ᵐ ω ∂P, (batchSummand C E z a ω).rank = 1) ∧
    eLpNorm (fun ω => nuc (batchSummand C E z a ω)) 2 P ≤
      ENNReal.ofReal (7 * CSig * γstar * fro (rOut C * E * rIn C)) := by
Muon.Dynamics.lem_app_dyn_batch_iv source
theorem lem_app_dyn_batch_iv {Ω : Type*} (𝓕 : MeasurableSpace Ω) [mΩ : MeasurableSpace Ω]
    {P : Measure Ω} [IsProbabilityMeasure P] (C : Covariances m n) (γstar CSig : ℝ) (hB : 0 < B)
    (hS : SizeFin C B γstar CSig) (z : Fin B → Ω → Vec m × Vec n)
    (hz : IIDBatch P ((Muon.Foundations.stdGaussianPi m).prod (Muon.Foundations.stdGaussianPi n)) z)
    (h𝓕 : 𝓕 ≤ mΩ)
    (hind : Indep 𝓕 (⨆ a, MeasurableSpace.comap (z a) inferInstance) P)
    (E : Ω → Mat m n) (hE : Measurable[𝓕] E)
    (hEint : Integrable (fun ω => fro (rOut C * E ω * rIn C) ^ 2) P) :
    (Integrable (fun ω' => fro (batchGrad (E ω') (physBatch C z ω')) ^ 2) P ∧
      ∀ᵐ ω ∂P, condExp 𝓕 P (fun ω' => fro (batchGrad (E ω') (physBatch C z ω')) ^ 2) ω ≤
        cMConst CSig γstar * (B : ℝ) * fro (rOut C * E ω * rIn C) ^ 2) ∧
    (∀ a, Integrable (fun ω' => nuc (batchSummand C (E ω') z a ω') ^ 2) P ∧
      ∀ᵐ ω ∂P, Real.sqrt (condExp 𝓕 P (fun ω' => nuc (batchSummand C (E ω') z a ω') ^ 2) ω) ≤
        7 * CSig * γstar * fro (rOut C * E ω * rIn C)) := by
Muon.Dynamics.lem_app_dyn_batch_iv_ii source
theorem lem_app_dyn_batch_iv_ii (certOp : Muon.External.GaussianOpNormL6) (γstar CSig : ℝ) :
    ∃ K : ℝ, ∀ (m n B : ℕ) (C : Covariances m n) (hB : 0 < B), SizeFin C B γstar CSig →
      ∀ (Ω : Type) (𝓕 : MeasurableSpace Ω) [mΩ : MeasurableSpace Ω] (P : Measure Ω)
        [IsProbabilityMeasure P] (z : Fin B → Ω → Vec m × Vec n),
        IIDBatch P ((Muon.Foundations.stdGaussianPi m).prod (Muon.Foundations.stdGaussianPi n)) z →
        𝓕 ≤ mΩ → Indep 𝓕 (⨆ a, MeasurableSpace.comap (z a) inferInstance) P →
          ∀ E : Ω → Mat m n, Measurable[𝓕] E →
            Integrable (fun ω => fro (rOut C * E ω * rIn C) ^ 2) P →
            Integrable (fun ω => fro (rOut C * E ω * rIn C) ^ 6) P →
            (Integrable (fun ω' => opNorm (batchGrad (E ω') (physBatch C z ω')) ^ 2) P ∧
              ∀ᵐ ω ∂P, Real.sqrt (condExp 𝓕 P
                (fun ω' => opNorm (batchGrad (E ω') (physBatch C z ω')) ^ 2) ω) ≤
                K * Real.log (2 * (B : ℝ)) * fro (rOut C * E ω * rIn C)) ∧
            (Integrable (fun ω' => (Finset.univ.sup'
                (Finset.univ_nonempty_iff.mpr ⟨⟨0, hB⟩⟩)
                (fun a => |resid (E ω') (phys C (z a ω'))|)) ^ 6) P ∧
              ∀ᵐ ω ∂P, condExp 𝓕 P (fun ω' => (Finset.univ.sup'
                (Finset.univ_nonempty_iff.mpr ⟨⟨0, hB⟩⟩)
                (fun a => |resid (E ω') (phys C (z a ω'))|)) ^ 6) ω ^ (1 / 6 : ℝ) ≤
                K * Real.log (2 * (B : ℝ)) * fro (rOut C * E ω * rIn C)) := by
Muon.Dynamics.batchSummand source
def batchSummand {Ω : Type*} (C : Covariances m n) (E : Mat m n) (z : Fin B → Ω → Vec m × Vec n)
    (a : Fin B) (ω : Ω) : Mat m n :=