Phases of Muoncompanion
Section SA · Setup: model, momentum, regularized SignSVD, normalization
Proved in Lean
Proposition SA.2 (Normalization)
  1. (i)
    If \(\Dt=\Delta\) is deterministic with \(\cR(t)>0\), then \(\norm{\Ahat}_\F=1\), the normalized residuals are centered with unit variance, and
    \begin{equation}\tag{SA.11} \EE\,d_a=0,\qquad \EE\,d_a^2=1,\qquad \EE\,\Gt=\Sigmaout^{1/2}\Ahat\Sigmain^{1/2}=\frac{\Sigmaout\Delta\Sigmain}{\sqrt{2\cR(t)}} . \end{equation}
    For every \(c>0\), replacing \(\Delta\) by \(c\Delta\) with the same batch multiplies \(\cR(t)\) by \(c^2\) and leaves \(\Ahat\), \(d_a\) and \(\Gt\) unchanged.
  2. (ii)
    For the state \(\Dt\) at step \(t\) and the fresh batch of step \(t\), on the event \(\{\cR(t)>0\}\) the identities (SA.11) hold with \(\EE_t\) in place of \(\EE\) and \(\Dt\) in place of \(\Delta\).
Proof.
Part (i) is Proposition SA.1(i),(ii) applied to \(\Delta/\norm{\Delta}_\Sigma\). Indeed \(\norm{\Delta}_\Sigma=\sqrt{2\cR(t)}\) by (SA.4), so \(d_a\) is the residual and \(\Gt\) the gradient of the state \(\Delta/\norm\Delta_\Sigma\), whose \(\Sigma\)-norm is \(1\); the first identity of (SA.11) is the centering, the second is (SA.4), and the third is (SA.5) together with \(\Sigmaout\Delta\Sigmain=\Sigmaout^{1/2}\At\Sigmain^{1/2}\). The identity \(\norm{\Ahat}_\F=1\) is (SA.9). Scaling \(\Delta\) by \(c\) scales \(\At\) and every \(d_a^\circ\) by \(c\) and \(\cR(t)\) by \(c^2\), so the three quotients are unchanged.
Part (ii) follows from (i) because the batch of step \(t\) is independent of the past.

Uses

Used by

Lean

Proved in Lean
Muon.Setup.prop_app_setup_normalization_i source
theorem prop_app_setup_normalization_i {m n : ℕ} {Ω : Type*} [MeasurableSpace Ω]
    (P : Measure Ω)
    [IsProbabilityMeasure P] {C : Covariances m n} {ν : Measure (Vec m × Vec n)}
    (hν : IsFeatureLaw C ν) {B : ℕ} (hB : 0 < B) (Δ : Mat m n) (hR : 0 < riskSigma C Δ)
    (x : Fin B → Ω → Vec m × Vec n) (hx : IIDBatch P ν x) :
    fro (Ahat C Δ) = 1 ∧
    (∀ a, ∫ ω, dNorm C Δ (x a ω) ∂P = 0) ∧
    (∀ a, ∫ ω, (dNorm C Δ (x a ω)) ^ 2 ∂P = 1) ∧
    mean P (fun ω => Gnorm C Δ (fun a => x a ω)) = rOut C * Ahat C Δ * rIn C ∧
    mean P (fun ω => Gnorm C Δ (fun a => x a ω)) =
      (Real.sqrt (2 * riskSigma C Δ))⁻¹ • (C.Sout * Δ * C.Sin) ∧
    (∀ c : ℝ, 0 < c →
      riskSigma C (c • Δ) = c ^ 2 * riskSigma C Δ ∧
      Ahat C (c • Δ) = Ahat C Δ ∧
      (∀ z : Vec m × Vec n, dNorm C (c • Δ) z = dNorm C Δ z) ∧
      (∀ b : Batch m n B, Gnorm C (c • Δ) b = Gnorm C Δ b)) := by
Muon.Setup.prop_app_setup_normalization_ii source
theorem prop_app_setup_normalization_ii {m n : ℕ} {Ω : Type*} [MeasurableSpace Ω]
    {P : Measure Ω}
    [IsProbabilityMeasure P] {C : Covariances m n} {ν : Measure (Vec m × Vec n)}
    [IsProbabilityMeasure ν] (hν : IsFeatureLaw C ν) {B : ℕ} (hB : 0 < B) (M : ModelLaw P ν B)
    (Wstar : Mat m n) (W : ℕ → Ω → Mat m n)
    (hW : ∀ t, Measurable[M.ℱ t] (W t))
    (t : ℕ) (a : Fin B) :
    (∀ᵐ ω ∂P, 0 < riskSigma C (W t ω - Wstar) →
      condExp (M.ℱ t) P (fun ω => dNorm C (W t ω - Wstar) (M.x t ω a)) ω = 0) ∧
    (∀ᵐ ω ∂P, 0 < riskSigma C (W t ω - Wstar) →
      condExp (M.ℱ t) P (fun ω => (dNorm C (W t ω - Wstar) (M.x t ω a)) ^ 2) ω = 1) ∧
    (∀ (i : Fin m) (k : Fin n), ∀ᵐ ω ∂P, 0 < riskSigma C (W t ω - Wstar) →
      condExp (M.ℱ t) P (fun ω => Gnorm C (W t ω - Wstar) (M.x t ω) i k) ω =
        (Real.sqrt (2 * riskSigma C (W t ω - Wstar)))⁻¹ *
          (C.Sout * (W t ω - Wstar) * C.Sin) i k) ∧
    (∀ (i : Fin m) (k : Fin n), ∀ᵐ ω ∂P, 0 < riskSigma C (W t ω - Wstar) →
      condExp (M.ℱ t) P (fun ω => Gnorm C (W t ω - Wstar) (M.x t ω) i k) ω =
        (rOut C * Ahat C (W t ω - Wstar) * rIn C) i k) := by