Phases of Muoncompanion
Section SA · Setup: model, momentum, regularized SignSVD, normalization
Proved in Lean
Lemma SA.6 (History truncation and sample sensitivity)
In the frozen-state model let \(M^{(J)}\defeq\sum_{j=0}^J\emaw jG_{t+1-j}\) for \(J\ge0\), and let \(\ridge>0\).
  1. (i)
    \(\EE\big(\Mt-M^{(J)}\big)=\bmom^{J+1}\,\EE\Gt\) and \(\EE\norm{\Mt-M^{(J)}}_\F^2=\bmom^{2(J+1)}\big(\norm{\EE\Gt}_\F^2+\sw2\mathsf V_B\big)\).
  2. (ii)
    \(\EE\norm{\Qridge\ridge(\Mt)-\Qridge\ridge(M^{(J)})}_\F^2\le\ridge^{-1}\bmom^{2(J+1)}\big(\norm{\EE\Gt}_\F^2+\sw2\mathsf V_B\big)\).
  3. (iii)
    Let \(F:\R^{\Nout\times\Nin}\to\R\) be Lipschitz in Frobenius norm with constant \(L_F\), and let \(\Mt^{[ja]}\) denote the buffer with the sample \((z_{ja},w_{ja})\) replaced by an independent copy. Then
    \[ \EE\big|F(\Mt)-F(\Mt^{[ja]})\big|^2\le\frac{2L_F^2\,\emaw j^2\,\mathsf V_B}{B},\qquad \Var F(\Mt)\le L_F^2\,\sw2\,\mathsf V_B . \]
  4. (iv)
    If \(\norm{\Sigmaout},\norm{\Sigmain}\le C_\Sigma\) then \(\norm{\EE\Gt}_\F\le C_\Sigma\) and \(\mathsf V_B\le C_\Sigma^2\,(\Nout\Nin+2\Nout+2\Nin+3)/B\).
Proof.
Part (i) is the tail of the weight sums. The tail \(\Mt-M^{(J)}=\sum_{j>J}\emaw jG_{t+1-j}\) has mean \((\sum_{j>J}\emaw j)\EE\Gt=\bmom^{J+1}\EE\Gt\), and by (SA.32) its second moment is
\[ \Big(\sum_{j>J}\emaw j\Big)^2\norm{\EE\Gt}_\F^2+\mathsf V_B\sum_{j>J}\emaw j^2 =\bmom^{2(J+1)}\norm{\EE\Gt}_\F^2+\mathsf V_B\,\sw2\,\bmom^{2(J+1)} , \]
since \(\sum_{j>J}\emaw j^2=(1-\bmom)^2\bmom^{2(J+1)}/(1-\bmom^2)\).
Part (ii) is (i) combined with the Lipschitz bound (SA.13).
Part (iii) is the Efron–Stein inequality applied to a truncated history. With \(X_{ja}\defeq d_{ja}\,z_{ja}\tensor w_{ja}\) and \(X_{ja}'\) the same expression in the independent copy, replacing the sample \((j,a)\) changes \(\Mt\) by \(\frac{\emaw j}{B}\Sigmaout^{1/2}(X_{ja}-X_{ja}')\Sigmain^{1/2}\); by Lemma SA.4 the two transformed samples are independent and identically distributed with Frobenius variance \(B\mathsf V_B\) each, so
\[ \EE\norm{\Mt-\Mt^{[ja]}}_\F^2=\frac{\emaw j^2}{B^2}\cdot2B\mathsf V_B=\frac{2\emaw j^2\mathsf V_B}{B}, \]
and the Lipschitz property of \(F\) gives the first bound. For the variance, fix \(J\) and regard \(F(M^{(J)})\) as a function of the \(B(J+1)\) independent samples of ages \(0,\dots,J\). The Efron–Stein inequality [84, Theorem 3.1] and the first bound, which holds verbatim for \(M^{(J)}\), give
\[ \Var F(M^{(J)})\le\frac12\sum_{j=0}^J\sum_{a=1}^B\EE\big|F(M^{(J)})-F(M^{(J)[ja]})\big|^2 \le\frac12\sum_{j=0}^JB\,\frac{2L_F^2\emaw j^2\mathsf V_B}{B}\le L_F^2\,\sw2\,\mathsf V_B . \]
Letting \(J\to\infty\), with \(\norm{F(\Mt)-F(M^{(J)})}_2\le L_F\big(\EE\norm{\Mt-M^{(J)}}_\F^2\big)^{1/2}\to0\) by (i), gives the bound for \(\Mt\).
Part (iv) bounds the traces in (SA.29). We have \(\norm{\EE\Gt}_\F\le\norm{\Sigmaout^{1/2}}\norm{\Ahat}_\F\norm{\Sigmain^{1/2}}\le C_\Sigma\), \(\Tr\Sigmaout\le C_\Sigma\Nout\), \(\Tr\Sigmain\le C_\Sigma\Nin\), \(\Tr(\Sigmaout\Ahat\Ahat^\T)\le C_\Sigma\norm{\Ahat}_\F^2=C_\Sigma\) and \(\Tr(\Sigmain\Ahat^\T\Ahat)\le C_\Sigma\); inserting these in (SA.29) gives the bound.

Uses

Used by

Lean

Proved in Lean
Muon.Setup.lem_app_setup_truncation_i source
theorem lem_app_setup_truncation_i [IsProbabilityMeasure P] (ϱ : ℝ) (hϱ : 0 < ϱ)
    (F : FrozenParams m n B) (S : FrozenSamples P m n B) (t : ℤ) (J : ℕ) :
    Integrable (fun ω => fro (frozenBuf F S t ω - truncBuf F S t J ω) ^ 2) P ∧
      mean P (fun ω => frozenBuf F S t ω - truncBuf F S t J ω)
        = (F.β ^ (J + 1)) • mean P (frozenBatchG F S (t + 1)) ∧
      ∫ ω, (fro (frozenBuf F S t ω - truncBuf F S t J ω)) ^ 2 ∂P
        = F.β ^ (2 * (J + 1)) *
            (fro (mean P (frozenBatchG F S (t + 1))) ^ 2 + sPow F.β 2 * frozenVB S F) := by
Muon.Setup.lem_app_setup_truncation_ii source
theorem lem_app_setup_truncation_ii [IsProbabilityMeasure P] (ϱ : ℝ) (hϱ : 0 < ϱ)
    (F : FrozenParams m n B) (S : FrozenSamples P m n B) (t : ℤ) (J : ℕ) :
    Integrable (fun ω => fro (Q ϱ (frozenBuf F S t ω) - Q ϱ (truncBuf F S t J ω)) ^ 2) P ∧
      ∫ ω, (fro (Q ϱ (frozenBuf F S t ω) - Q ϱ (truncBuf F S t J ω))) ^ 2 ∂P
        ≤ ϱ⁻¹ * (F.β ^ (2 * (J + 1)) *
            (fro (mean P (frozenBatchG F S (t + 1))) ^ 2 + sPow F.β 2 * frozenVB S F)) := by
Muon.Setup.lem_app_setup_truncation_iii source
theorem lem_app_setup_truncation_iii [IsProbabilityMeasure P] (ϱ : ℝ) (hϱ : 0 < ϱ)
    (F : FrozenParams m n B) (S : FrozenSamples P m n B) (t : ℤ)
    (LF : ℝ) (hLF : 0 ≤ LF) (Φ : Mat m n → ℝ)
    (hΦ : ∀ K L : Mat m n, |Φ K - Φ L| ≤ LF * fro (K - L))
    (C : IndepCopy S) (j : ℕ) (a : Fin B) :
    MemLp (fun ω => Φ (bufOf F (copySamples S C (t + 1 - (j : ℤ)) a) t ω)) 2 P ∧
      ∫ ω, (Φ (frozenBuf F S t ω) - Φ (bufOf F (copySamples S C (t + 1 - (j : ℤ)) a) t ω)) ^ 2 ∂P
        ≤ 2 * LF ^ 2 * (emaW F.β j) ^ 2 * frozenVB S F / (B : ℝ) := by
Muon.Setup.lem_app_setup_truncation_iii_b source
theorem lem_app_setup_truncation_iii_b [IsProbabilityMeasure P] (ϱ : ℝ) (hϱ : 0 < ϱ)
    (F : FrozenParams m n B) (S : FrozenSamples P m n B) (t : ℤ)
    (LF : ℝ) (hLF : 0 ≤ LF) (Φ : Mat m n → ℝ)
    (hΦ : ∀ K L : Mat m n, |Φ K - Φ L| ≤ LF * fro (K - L)) :
    MemLp (fun ω => Φ (frozenBuf F S t ω)) 2 P ∧
      variance (fun ω => Φ (frozenBuf F S t ω)) P ≤ LF ^ 2 * sPow F.β 2 * frozenVB S F := by
Muon.Setup.lem_app_setup_truncation_iv source
theorem lem_app_setup_truncation_iv [IsProbabilityMeasure P] (ϱ : ℝ) (hϱ : 0 < ϱ)
    (F : FrozenParams m n B) (S : FrozenSamples P m n B) (t : ℤ) (CSig : ℝ)
    (hCout : opNorm F.C.Sout ≤ CSig) (hCin : opNorm F.C.Sin ≤ CSig) :
    fro (mean P (frozenBatchG F S (t + 1))) ≤ CSig ∧
      frozenVB S F ≤ CSig ^ 2 * ((m : ℝ) * n + 2 * m + 2 * n + 3) / (B : ℝ) := by