Section SJ · SignSGD: drift and volatility
Proved in Lean
Lemma SJ.5 (Sign comparison)
There is a universal constant \(C_2\) such that the following holds with \(C_1\defeq4\sqrt{2\pi}/(3\pi)\). Let \(Y\) be centered with variance \(1\), \(\EE Y^4\le88208\), and characteristic function satisfying (SJ.12). Let \(Y_1,\dots,Y_B\) be independent copies of \(Y\), \(B\ge4\), and \(g\) standard Gaussian. Then for every real \(x\)
\begin{equation}\tag{SJ.13}
\Big|\EE\sign\Big(\frac1{\sqrt B}\sum_{a=1}^BY_a+x\Big)-\EE\sign(g+x)\Big|\le\frac{C_1\abs{\EE Y^3}}{\sqrt B}+\frac{C_2}B .
\end{equation}
Proof.
Write \(M_4\defeq88208\), \(\varkappa_3\defeq\EE Y^3\), \(\phi\defeq\phi_Y\), \(V\defeq B^{-1/2}\sum_aY_a\), and put
\[
\delta\defeq\min\big\{1,\sqrt{3/(2M_4)}\big\},\qquad \rho_0\defeq\psi(\delta/8)\in(0,1),\qquad C_4\defeq\frac{M_4}{24}+\frac18 .
\]
Expected signs through the characteristic function. For \(\varepsilon>0\) and real \(v\),
\[
\frac2\pi\int_0^\infty e^{-\varepsilon u}\,\frac{\sin(uv)}u\,\dif u=\frac2\pi\arctan\frac v\varepsilon ,
\]
since both sides vanish at \(v=0\) and have the same derivative \(\frac2\pi\varepsilon/(\varepsilon^2+v^2)\) in \(v\). Apply this at \(v=V+x\) and at \(v=g+x\), take expectations and subtract. The shift contributes the phase \(e^{\mathrm iux}\), so
\[
\Big|\EE\frac2\pi\arctan\frac{V+x}\varepsilon-\EE\frac2\pi\arctan\frac{g+x}\varepsilon\Big|\le\frac2\pi\int_0^\infty\big|\phi(u/\sqrt B)^B-e^{-u^2/2}\big|\,\frac{\dif u}u .
\]
As \(\varepsilon\downarrow0\) the arctangents tend to the signs, including the value \(0\) at \(0\), and dominated convergence turns the left side into the left side of (SJ.13). It remains to bound the integral.
Small frequencies. Symmetrization bounds \(\abs\phi\) near the origin. For an independent copy \(Y'\), \(\abs{\phi(t)}^2=\EE\cos(t(Y-Y'))\), \(\EE(Y-Y')^2=2\) and \(\EE(Y-Y')^4=2\EE Y^4+6\le8M_4\). The inequality \(\cos y\le1-y^2/2+y^4/24\) gives, for \(\abs t\le\delta\),
\[
\abs{\phi(t)}^2\le1-t^2+\frac{M_4}3t^4\le1-\frac{t^2}2,\qquad\text{hence}\qquad\abs{\phi(t)}\le e^{-t^2/4}.
\]
Taylor’s formula with remainder for \(e^{\mathrm itY}\) to third order and for \(e^{-t^2/2}\) to second order gives
\[
\abs{\phi(t)-e^{-t^2/2}}\le\frac{\abs{\varkappa_3}}6\abs t^3+C_4t^4 .
\]
Telescoping the \(B\)th powers, with both factors bounded by \(e^{-t^2/4}\) and \((B-1)/(4B)\ge1/8\), gives for \(0\le u\le\delta\sqrt B\)
\[
\big|\phi(u/\sqrt B)^B-e^{-u^2/2}\big|\le e^{-u^2/8}\Big(\frac{\abs{\varkappa_3}u^3}{6\sqrt B}+\frac{C_4u^4}B\Big).
\]
With \(\int_0^\infty u^2e^{-u^2/8}\dif u=4\sqrt{2\pi}\) and \(\int_0^\infty u^3e^{-u^2/8}\dif u=32\), the integral over \([0,\delta\sqrt B]\) against \(\dif u/u\) is at most
\[
\frac{4\sqrt{2\pi}\,\abs{\varkappa_3}}{6\sqrt B}+\frac{32C_4}B .
\]
Large frequencies. For \(\abs t\ge\delta\), (SJ.12) and the monotonicity of \(\psi\) give \(\abs{\phi(t)}\le\rho_0\) and \(\abs{\phi(t)}^4\le\min\{1,C_{\rm ch}^4t^{-2}\}\). Hence
\[
\int_{\delta\sqrt B}^\infty\abs{\phi(u/\sqrt B)}^B\frac{\dif u}u=\int_\delta^\infty\abs{\phi(t)}^B\frac{\dif t}t\le\rho_0^{B-4}\int_\delta^\infty\min\{1,C_{\rm ch}^4t^{-2}\}\frac{\dif t}t\le J\rho_0^{B-4},
\]
where, with \(S_0\defeq\max\{\delta,C_{\rm ch}^2\}\), \(J\defeq\log(S_0/\delta)+C_{\rm ch}^4/(2S_0^2)\). Maximizing \(y\mapsto y\rho_0^{y}\) gives \(B\rho_0^{B-4}\le\rho_0^{-4}/(e\abs{\log\rho_0})\). The Gaussian tail satisfies
\[
\int_{\delta\sqrt B}^\infty e^{-u^2/2}\frac{\dif u}u\le\frac{e^{-\delta^2B/2}}{\delta^2B}\le\frac1{\delta^2B}.
\]
Conclusion. Multiplying the three bounds by \(2/\pi\) gives (SJ.13) with \(C_1=\frac2\pi\cdot\frac{4\sqrt{2\pi}}6\) and
\[
C_2\defeq\frac2\pi\Big(32C_4+\frac{J\rho_0^{-4}}{e\abs{\log\rho_0}}+\delta^{-2}\Big).\qedhere
\]
Uses
- Lemma SJ.4 Decay of the characteristic function
Used by
- Proposition SJ.3 Drift of one coordinate
Lean
Proved in Lean
Muon.SignSGD.lem_app_sgd_comparison source
theorem lem_app_sgd_comparison :
∃ C₂ : ℝ, ∀ B : ℕ, 4 ≤ B →
∀ μ : Measure ℝ, IsProbabilityMeasure μ →
∫ y, y ∂μ = 0 →
variance (fun y : ℝ => y) μ = 1 →
∫⁻ y, ENNReal.ofReal (y ^ 4) ∂μ ≤ ENNReal.ofReal 88208 →
(∀ t : ℝ, t ≠ 0 →
‖∫ y, Complex.exp ((t : ℂ) * Complex.I * (y : ℂ)) ∂μ‖ ≤ sgdPsi (|t| / 8) ∧
sgdPsi (|t| / 8) ≤ min 1 (sgdCch * |t| ^ (-(1 / 2 : ℝ)))) →
∀ x : ℝ,
|∫ p : Fin B → ℝ,
Real.sign ((∑ a, p a) / Real.sqrt (B : ℝ) + x) ∂(Measure.pi fun _ : Fin B => μ)
- ∫ g, Real.sign (g + x) ∂(gaussianReal 0 1)|
≤ sgdC1 * |∫ y, y ^ 3 ∂μ| / Real.sqrt (B : ℝ) + C₂ / (B : ℝ) := byMuon.SignSGD.sgdC1 source
noncomputable def sgdC1 : ℝ := 4 * Real.sqrt (2 * Real.pi) / (3 * Real.pi)