Section SE · From the algorithm to the deterministic dynamics
Proved in Lean
Definition SE.2 (Frozen chains)
Let \(t\ge0\), let \(D,m\in\R^{\Nout\times\Nin}\) with \(\cR(D)>0\), and let \(G^\ast_j[\cdot]\), \(j\ge0\), be the gradients (SE.1) of auxiliary batches. The stationary chain at \((t,D)\) is
\[
N_{-1}\defeq\sum_{j\ge0}\emaw j\,G^\ast_j[D],\qquad
N_r\defeq\bmom N_{r-1}+(1-\bmom)\,G^\circ_{t+r+1}[D],\qquad
V_r\defeq\Qridge{\ridgephys(D)}(N_r),
\]
for \(r\ge0\). The same-buffer chain at \((t,D,m)\) is
\[
\widehat N_{-1}\defeq m,\qquad
\widehat N_r\defeq\bmom\widehat N_{r-1}+(1-\bmom)\,G^\circ_{t+r+1}[D],\qquad
\widehat V_r\defeq\Qridge{\ridgephys(D)}(\widehat N_r)\qquad(r\ge0).
\]
At a step \(t<t_{\rm stop}\) of the algorithm, the chains at time \(t\) are those with \(D=\Dt\) and \(m=M^\circ_{t-1}\). The mean frozen update at \(D\) is \(\overline V(D)\defeq\EE V_0\).
Used by
- Lemma SE.7 Finite mean and susceptibility
- Lemma SE.16 Coupling
- Proposition SE.5 Tangent transport
- Lemma SE.26 Block residual
Lean
Proved in Lean
Muon.Dynamics.def_app_dyn_chains source
def def_app_dyn_chains {Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω}
(p : DynParams) (C : Covariances m n) (cs : ChainSamples P m n B) (t : ℕ)
(D M : Mat m n) (ω : Ω) : ChainPath m n :=Muon.Dynamics.ChainPath source
structure ChainPath (m n : ℕ) where
Muon.Dynamics.chainInit source
def chainInit {Ω : Type*} (β : ℝ) (C : Covariances m n) (D : Mat m n)
(aux : ℕ → Fin B → Ω → Vec m × Vec n) (ω : Ω) : Mat m n :=Muon.Dynamics.emaChain source
def emaChain (β : ℝ) (D : Mat m n) (G : ℤ → Batch m n B) (t : ℕ) (init : Mat m n) : ℕ → Mat m n
| 0 => init
| k + 1 => β • emaChain β D G t init k + (1 - β) • batchGrad D (G ((t : ℤ) + k + 1))
/-- The chains at time `t` with `D` and `M` (`def:app-dyn-chains`, ll. 472–491), arrays indexed by
`k = r + 1`: `stat k = N_{k-1}` (stationary chain), `same k = N̂_{k-1}` (same-buffer chain, with
`N̂_{-1} = M`), and `statV k = V_{k-1}`, `sameV k = V̂_{k-1}` with `V_r = Q_{ϱ°(D)}(N_r)`, the
physical ridge `ϱ°(D) = physRidge p C D`. -/
structure ChainPath (m n : ℕ) whereMuon.Dynamics.normChainPath source
def normChainPath {Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω}
(p : DynParams) (C : Covariances m n) (cs : ChainSamples P m n B) (t : ℕ)
(D M : Mat m n) (ω : Ω) : ℕ → Mat m n :=Muon.Dynamics.physBatch source
def physBatch {Ω : Type*} (C : Covariances m n) (z : Fin B → Ω → Vec m × Vec n) (ω : Ω) :
Batch m n B :=Muon.Dynamics.chainFuture source
abbrev chainFuture {Ω : Type*} [mΩ : MeasurableSpace Ω] {P : Measure Ω}
(cs : ChainSamples P m n B) (t : ℕ) : MeasurableSpace Ω :=Muon.Dynamics.ChainSamples source
structure ChainSamples {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) (m n B : ℕ) whereMuon.Dynamics.cMConst source
def cMConst (CSig γstar : ℝ) : ℝ := CSig ^ 2 * (γstar + 2) ^ 2