Section SJ · SignSGD: drift and volatility
Proved in Lean
Lemma SJ.7 (Haar sign matrix)
Let \(U\) be Haar on \(O(n)\), \(n\ge2\), let \(a\in\R^n\) be nonzero, and put \(Y\defeq U^\T\sign(Ua)\). Then
\begin{equation}\tag{SJ.24}
\EE_U\big[Y\tensor Y\big]=\Big(1-\frac2\pi\Big)\Id+\frac{2n}\pi\,\frac{a\tensor a}{\norm a^2}.
\end{equation}
The same holds conditionally on a random nonzero \(a\) independent of \(U\).
Proof.
Put \(v=a/\norm a\), so that \(Y=U^\T\sign(Uv)\). The vector \(Uv\) is uniform on the sphere, so it has no zero coordinate almost surely, and \(\norm Y^2=n\).
Invariance reduces the second moment to two numbers. If \(Q\) is orthogonal with \(Qv=v\), then \(UQ\) is Haar and replacing \(U\) by \(UQ\) replaces \(Y\) by \(Q^\T Y\). Hence \(\EE[Y\tensor Y]\) commutes with every such \(Q\). In an orthonormal basis starting with \(v\), reflections of single other basis vectors make the off-diagonal entries vanish, and permutations of the other basis vectors make their diagonal entries equal. Therefore
\[
\EE[Y\tensor Y]=c_n\,v\tensor v+d_n(\Id-v\tensor v).
\]
The two numbers follow from two scalar identities. First, \(v^\T Y=(Uv)^\T\sign(Uv)=\norm{Uv}_1\), so \(c_n=1+2(n-1)/\pi\) by (SJ.21). Second, the trace is \(\EE\norm Y^2=n\), so \(c_n+(n-1)d_n=n\). Solving gives \(d_n=1-2/\pi\) and \(c_n-d_n=2n/\pi\). Conditioning on an independent \(a\) gives the last claim.
Uses
- Lemma SJ.6 Spherical moments
Used by
- Proposition SJ.5 One sample
- Lemma SJ.11 Haar reduction
Lean
Proved in Lean
Muon.SignSGD.lem_app_sgd_haar_sign_i source
theorem lem_app_sgd_haar_sign_i (n : ℕ) (hn : 2 ≤ n)
(ν : Measure (Matrix.orthogonalGroup (Fin n) ℝ)) (hν : IsOrthHaar ν)
(a : Fin n → ℝ) (ha : a ≠ 0) (i j : Fin n) :
∫ U, haarSignY a U i * haarSignY a U j ∂ν
= (if i = j then 1 - 2 / Real.pi else 0)
+ 2 * (n : ℝ) / Real.pi * (a i * a j / euclidNorm n a ^ 2) := byMuon.SignSGD.lem_app_sgd_haar_sign_ii source
theorem lem_app_sgd_haar_sign_ii {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] (n : ℕ) (hn : 2 ≤ n)
(ν : Measure (Matrix.orthogonalGroup (Fin n) ℝ)) (hν : IsOrthHaar ν)
(U : Ω → Matrix.orthogonalGroup (Fin n) ℝ) (hU : Measurable U) (hUlaw : P.map U = ν)
(A : Ω → Fin n → ℝ) (hA : Measurable A) (hind : IndepFun U A P)
(hA0 : ∀ᵐ ω ∂P, A ω ≠ 0) (i j : Fin n) :
condExp (MeasurableSpace.comap A inferInstance) P
(fun ω => haarSignY (A ω) (U ω) i * haarSignY (A ω) (U ω) j)
=ᵐ[P] fun ω => (if i = j then 1 - 2 / Real.pi else 0)
+ 2 * (n : ℝ) / Real.pi * (A ω i * A ω j / euclidNorm n (A ω) ^ 2) := by