Section SJ · SignSGD: drift and volatility
Proved in Lean
Lemma SJ.2 (Small shifts)
Let \(X\) have an even density \(f\), and put \(h(x)\defeq\EE\sign(X+x)\) for real \(x\).
- (i)For every real \(x\), with oriented integrals,\[ h(x)=2\int_0^xf(y)\,\dif y . \]
- (ii)If \(a>0\), \(\alpha>0\), \(L_f\ge0\) and \(\abs{f(y)-f(0)}\le L_f\abs y^\alpha\) for \(\abs y\le a\), then\[ \abs{h(x)-2xf(0)}\le\frac{2L_f}{\alpha+1}\abs x^{\alpha+1}\qquad(\abs x\le a). \]
- (iii)If \(f\) is continuously differentiable on \([-a,a]\) with a \(K_f\)-Lipschitz derivative, then \(\abs{h(x)-2xf(0)}\le\frac{K_f}3\abs x^3\) for \(\abs x\le a\).
- (iv)If \(X\sim\mathcal N(0,\sigma^2)\) with \(\sigma>0\), then for every real \(x\)\begin{equation}\tag{SJ.6} \Big|h(x)-\sqrt{\frac2\pi}\,\frac x\sigma\Big|\le\frac{\abs x^3}{3\sqrt{2\pi}\,\sigma^3}. \end{equation}
Proof.
The identity (i) splits the law at the shifted origin. Symmetry puts mass \(\frac12\) on each half-line, so
\[
h(x)=\PP(X>-x)-\PP(X<-x)=1-2\,\PP(X<-x)=2\int_{-x}^0f(y)\,\dif y=2\int_0^xf(y)\,\dif y .
\]
The bound (ii) integrates the modulus of \(f\) in (i):
\[
\abs{h(x)-2xf(0)}\le2\Big|\int_0^x\abs{f(y)-f(0)}\,\dif y\Big|\le2L_f\int_0^{\abs x}y^\alpha\,\dif y=\frac{2L_f}{\alpha+1}\abs x^{\alpha+1}.
\]
For (iii), evenness forces \(f'(0)=0\). The Lipschitz bound then gives \(\abs{f'(y)}\le K_f\abs y\), and integrating once,
\[
\abs{f(y)-f(0)}\le\frac{K_f}2\,y^2\qquad(\abs y\le a).
\]
This is (ii) with \(\alpha=2\) and \(L_f=K_f/2\).
For (iv), the Gaussian density \(f_\sigma(y)=f_\sigma(0)e^{-y^2/(2\sigma^2)}\) satisfies, by \(0\le1-e^{-u}\le u\) for \(u\ge0\),
\[
\abs{f_\sigma(y)-f_\sigma(0)}\le\frac{f_\sigma(0)}{2\sigma^2}\,y^2\qquad(y\in\R).
\]
This is (ii) with \(\alpha=2\), \(L_f=f_\sigma(0)/(2\sigma^2)\) and every \(a\), and \(2f_\sigma(0)=\sqrt{2/\pi}/\sigma\).
Used by
- Proposition SJ.3 Drift of one coordinate
Lean
Proved in Lean
Muon.SignSGD.lem_app_sgd_shift_i source
theorem lem_app_sgd_shift_i {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] (X : Ω → ℝ) (f : ℝ → ℝ) (hf : Measurable f)
(hf_nn : ∀ y, 0 ≤ f y) (hf_even : ∀ y, f (-y) = f y)
(hX : P.map X = volume.withDensity (fun y => ENNReal.ofReal (f y))) (x : ℝ) :
signShiftMean P X x = 2 * ∫ y in (0:ℝ)..x, f y := byMuon.SignSGD.lem_app_sgd_shift_ii source
theorem lem_app_sgd_shift_ii {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] (X : Ω → ℝ) (f : ℝ → ℝ) (hf : Measurable f)
(hf_nn : ∀ y, 0 ≤ f y) (hf_even : ∀ y, f (-y) = f y)
(hX : P.map X = volume.withDensity (fun y => ENNReal.ofReal (f y)))
(a α L : ℝ) (ha : 0 < a) (hα : 0 < α) (hL : 0 ≤ L)
(hlip : ∀ y : ℝ, |y| ≤ a → |f y - f 0| ≤ L * |y| ^ α) :
∀ x : ℝ, |x| ≤ a →
|signShiftMean P X x - 2 * x * f 0| ≤ 2 * L / (α + 1) * |x| ^ (α + 1) := byMuon.SignSGD.lem_app_sgd_shift_iii source
theorem lem_app_sgd_shift_iii {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] (X : Ω → ℝ) (f : ℝ → ℝ) (hf : Measurable f)
(hf_nn : ∀ y, 0 ≤ f y) (hf_even : ∀ y, f (-y) = f y)
(hX : P.map X = volume.withDensity (fun y => ENNReal.ofReal (f y)))
(a K : ℝ) (hC1 : ContDiffOn ℝ 1 f (Icc (-a) a))
(hLip : ∀ y ∈ Icc (-a) a, ∀ z ∈ Icc (-a) a,
|derivWithin f (Icc (-a) a) y - derivWithin f (Icc (-a) a) z| ≤ K * |y - z|) :
∀ x : ℝ, |x| ≤ a → |signShiftMean P X x - 2 * x * f 0| ≤ K / 3 * |x| ^ 3 := byMuon.SignSGD.lem_app_sgd_shift_iv source
theorem lem_app_sgd_shift_iv {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] (X : Ω → ℝ) (σ : ℝ) (hσ : 0 < σ)
(hX : P.map X = gaussianReal 0 (σ ^ 2).toNNReal) :
∀ x : ℝ, |signShiftMean P X x - Real.sqrt (2 / Real.pi) * x / σ|
≤ |x| ^ 3 / (3 * Real.sqrt (2 * Real.pi) * σ ^ 3) := by