Section SJ · SignSGD: drift and volatility
Proved in Lean
Proposition SJ.3 (Drift of one coordinate)
Let \(B\ge4\) and suppose \(\norm{\bar\Delta}_\F\ge F/2\) for the entry \((i,j)\). With \(s,m_3\) from Lemma SJ.3 and \(C_1,C_2\) from Lemma SJ.5,
\begin{equation}\tag{SJ.14}
\begin{aligned}
\Big|\EE\sign(G^\circ_{ij})-\sqrt{\frac2\pi}\,\mathcal N_B\frac{\Delta_{ij}}F\Big|\le{}&\frac{C_1\abs{m_3}}{s^3\sqrt B}+\frac{C_2}B+\frac{B^{3/2}\abs{\Delta_{ij}}^3}{3\sqrt{2\pi}\,s^3}\\
&+\sqrt{\frac2\pi}\,\frac{\sqrt B\,\abs{\Delta_{ij}}\,(s^2-F^2)}{sF(s+F)}+\sqrt{\frac2\pi}\,\frac{4\abs{\Delta_{ij}}}{F\sqrt B}.
\end{aligned}
\end{equation}
Proof.
The sign of \(G^\circ_{ij}\) is the sign of a shifted normalized sum. With \(Y_a\) the standardized copies of \(X\),
\[
\sign\big(G^\circ_{ij}\big)=\sign\Big(\frac1{\sqrt B}\sum_aY_a+\frac{\sqrt B\,\Delta_{ij}}s\Big).
\]
Lemma SJ.3 and Lemma SJ.4 verify the hypotheses of Lemma SJ.5, with \(\EE Y^3=m_3/s^3\). The comparison at \(x=\sqrt B\Delta_{ij}/s\) produces the first two terms. The Gaussian shift (SJ.6) with \(\sigma=1\) replaces \(\EE\sign(g+x)\) by \(\sqrt{2/\pi}\,x\) at the cost of the third term.
The last two terms replace \(\sqrt B/s\) by \(\mathcal N_B/F\). By the triangle inequality and Proposition SJ.1,
\[
\Big|\frac{\sqrt B}s-\frac{\mathcal N_B}F\Big|\le\sqrt B\Big(\frac1F-\frac1s\Big)+\frac{\sqrt B-\mathcal N_B}F\le\frac{\sqrt B\,(s^2-F^2)}{sF(s+F)}+\frac4{F\sqrt B}.
\]
Multiplying by \(\sqrt{2/\pi}\,\abs{\Delta_{ij}}\) gives the last two terms.
Uses
- Lemma SJ.3 Moments of one coordinate
- Lemma SJ.4 Decay of the characteristic function
- Lemma SJ.5 Sign comparison
- Lemma SJ.2 Small shifts
- Proposition SJ.1 The batch constant
Used by
- Theorem SJ.1 Isotropic drift
- Lemma SJ.8 Whitening a coordinate
- Proposition SJ.6 Coordinate errors in Frobenius norm
Lean
Proved in Lean
Muon.SignSGD.prop_app_sgd_coordinate source
theorem prop_app_sgd_coordinate :
∃ C₂ : ℝ, ∀ (Nout Nin B : ℕ) (Δ : Matrix (Fin Nout) (Fin Nin) ℝ) (i : Fin Nout) (j : Fin Nin),
4 ≤ B → Δ ≠ 0 → frobNorm Δ / 2 ≤ frobNorm (sgdDeletedBlock Δ i j) →
|expSignEntry Nout Nin B Δ i j
- Real.sqrt (2 / Real.pi) * batchConst B * Δ i j / frobNorm Δ|
≤ sgdC1 * |∫ p, (sgdCoord Δ i j p - Δ i j) ^ 3 ∂(gaussBatch Nout Nin)|
/ (sgdSd Δ i j ^ 3 * Real.sqrt (B : ℝ))
+ C₂ / (B : ℝ)
+ (B : ℝ) ^ (3 / 2 : ℝ) * |Δ i j| ^ 3 / (3 * Real.sqrt (2 * Real.pi) * sgdSd Δ i j ^ 3)
+ Real.sqrt (2 / Real.pi) * (Real.sqrt (B : ℝ) * |Δ i j|
* (sgdSd Δ i j ^ 2 - frobNorm Δ ^ 2))
/ (sgdSd Δ i j * frobNorm Δ * (sgdSd Δ i j + frobNorm Δ))
+ Real.sqrt (2 / Real.pi) * (4 * |Δ i j|) / (frobNorm Δ * Real.sqrt (B : ℝ)) := by