Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2 — SDCA with (1/γ)(1/\gamma)(1/γ)-smooth losses reaches expected duality gap ϵP\epsilon_PϵP​ after (n+1λγ)log⁡((n+1λγ)/ϵP)(n+\frac1{\lambda\gamma})\log((n+\frac1{\lambda\gamma})/\epsilon_P)(n+λγ1​)log((n+λγ1​)/ϵP​) iterations

Proved
SDCA.Smooth.theorem_2

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

coordinate-ascentdualitylinear-convergencep2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1stochastic-optimization

Let x1,…,xn∈Rdx_1,\dots,x_n\in\mathbb R^dx1​,…,xn​∈Rd with n≥1n\ge1n≥1, let λ>0\lambda>0λ>0 and γ>0\gamma>0γ>0, and let φ1,…,φn:R→R\varphi_1,\dots,\varphi_n:\mathbb R\to\mathbb Rφ1​,…,φn​:R→R be convex and (1/γ)(1/\gamma)(1/γ)-smooth (differentiable with (1/γ)(1/\gamma)(1/γ)-Lipschitz derivative). Assume the standing assumptions

  1. ∥xi∥≤1\|x_i\|\le1∥xi​∥≤1 for all iii,
  2. φi(a)≥0\varphi_i(a)\ge0φi​(a)≥0 for all iii and aaa,
  3. φi(0)≤1\varphi_i(0)\le1φi​(0)≤1 for all iii.

Run Procedure SDCA from α(0)=0\alpha^{(0)}=0α(0)=0: at each iteration a coordinate iii is drawn uniformly at random, independently of the past, and αi\alpha_iαi​ is changed by an increment maximizing the coordinate dual objective; w(t)=w(α(t))w^{(t)}=w(\alpha^{(t)})w(t)=w(α(t)). Let ϵP>0\epsilon_P>0ϵP​>0. Then all dual values along the run and at the averaged output are finite, and:

  1. (Last iterate.) If
T ≥ (n+1λγ)log⁡((n+1λγ)⋅1ϵP),T\ \ge\ \Big(n+\frac1{\lambda\gamma}\Big)\log\Big(\Big(n+\frac1{\lambda\gamma}\Big)\cdot\frac1{\epsilon_P}\Big),T ≥ (n+λγ1​)log((n+λγ1​)⋅ϵP​1​),

then E[P(w(T))−D(α(T))]≤ϵP\mathbb E\big[P(w^{(T)})-D(\alpha^{(T)})\big]\le\epsilon_PE[P(w(T))−D(α(T))]≤ϵP​. 2. (Averaging option.) If T>T0T>T_0T>T0​ and

T0 ≥ (n+1λγ)log⁡((n+1λγ)⋅1(T−T0)ϵP),T_0\ \ge\ \Big(n+\frac1{\lambda\gamma}\Big)\log\Big(\Big(n+\frac1{\lambda\gamma}\Big)\cdot\frac1{(T-T_0)\epsilon_P}\Big),T0​ ≥ (n+λγ1​)log((n+λγ1​)⋅(T−T0​)ϵP​1​),

then the output αˉ=1T−T0∑t=T0+1Tα(t−1)\bar\alpha=\frac1{T-T_0}\sum_{t=T_0+1}^{T}\alpha^{(t-1)}αˉ=T−T0​1​∑t=T0​+1T​α(t−1), wˉ=w(αˉ)\bar w=w(\bar\alpha)wˉ=w(αˉ), satisfies E[P(wˉ)−D(αˉ)]≤ϵP\mathbb E[P(\bar w)-D(\bar\alpha)]\le\epsilon_PE[P(wˉ)−D(αˉ)]≤ϵP​. 3. (Random option.) Under the same condition, if (wˉ,αˉ)=(w(t−1),α(t−1))(\bar w,\bar\alpha)=(w^{(t-1)},\alpha^{(t-1)})(wˉ,αˉ)=(w(t−1),α(t−1)) for ttt drawn uniformly from {T0+1,…,T}\{T_0+1,\dots,T\}{T0​+1,…,T} independently of the run, then E[P(wˉ)−D(αˉ)]≤ϵP\mathbb E[P(\bar w)-D(\bar\alpha)]\le\epsilon_PE[P(wˉ)−D(αˉ)]≤ϵP​.

This is the paper's main result: for smooth losses SDCA converges linearly in the duality gap, with O~((n+1λγ)log⁡1ϵP)\tilde O\big((n+\frac1{\lambda\gamma})\log\frac1{\epsilon_P}\big)O~((n+λγ1​)logϵP​1​) iterations, and the duality gap certifies primal sub-optimality.

Formalization Note Expectations are uniform averages over the nTn^TnT coordinate sequences (SAGA.Convex.expectIdx). The step is any map satisfying the argmax predicate IsSDCAStep. DDD is EReal-valued; its values are converted to reals only under the first conjunct, which asserts their finiteness. The Random option is stated over the iterates α(T0),…,α(T−1)\alpha^{(T_0)},\dots,\alpha^{(T-1)}α(T0​),…,α(T−1), which is what the proof bounds (the procedure's line "αˉ=α(t)\bar\alpha=\alpha^{(t)}αˉ=α(t) for random t∈T0+1,…,Tt\in T_0+1,\dots,Tt∈T0​+1,…,T" is off by one against it). log⁡\loglog is the natural logarithm; no sign condition on it is assumed. No dual optimum α∗\alpha^*α∗ is assumed.

Preamble
import Mathlib
import Definitions.Def_SDCA_Smooth_Model
Formal statement
namespace SDCA.Smooth

/-- Theorem 2, p. 6 (Shalev-Shwartz–Zhang, arXiv:1209.1873v2). Run Procedure SDCA from `α⁽⁰⁾ = 0`
with convex `(1/γ)`-smooth losses `φᵢ` and the standing assumptions `‖xᵢ‖ ≤ 1`, `φᵢ ≥ 0`,
`φᵢ(0) ≤ 1` (p. 5), coordinates drawn i.i.d. uniformly. Let `εP > 0`. Then every dual value along
the run and at the outputs is finite, and:
1. if `T ≥ (n + 1/(λγ)) log((n + 1/(λγ)) · 1/εP)`, then `E[P(w⁽ᵀ⁾) − D(α⁽ᵀ⁾)] ≤ εP`;
2. if `T > T₀` and `T₀ ≥ (n + 1/(λγ)) log((n + 1/(λγ)) · 1/((T − T₀) εP))`, then the Averaging
   option output `ᾱ = (1/(T − T₀)) ∑_{t=T₀+1}^{T} α⁽ᵗ⁻¹⁾`, `w̄ = w(ᾱ)`, has `E[P(w̄) − D(ᾱ)] ≤ εP`;
3. under the same condition, the Random option output (the iterate `α⁽ᵗ⁻¹⁾` for `t` uniform on
   `{T₀+1, …, T}`, independent of the run) has `E[P(w̄) − D(ᾱ)] ≤ εP`. -/
theorem theorem_2 {d n : ℕ} (hn : 0 < n) (x : Fin n → EuclideanSpace ℝ (Fin d))
    (φ φ' : Fin n → ℝ → ℝ) (hconv : ∀ i, ConvexOn ℝ Set.univ (φ i))
    (lam γ : ℝ) (hlam : 0 < lam) (hγ : 0 < γ)
    (hderiv : ∀ i a, HasDerivAt (φ i) (φ' i a) a)
    (hsmooth : ∀ i a b, |φ' i a - φ' i b| ≤ (1 / γ) * |a - b|)
    (hx : ∀ i, ‖x i‖ ≤ 1) (hφnn : ∀ i a, 0 ≤ φ i a) (hφ0 : ∀ i, φ i 0 ≤ 1)
    (Δ : (Fin n → ℝ) → Fin n → ℝ) (hΔ : IsSDCAStep lam x φ Δ)
    (εP : ℝ) (hεP : 0 < εP) :
    ((∀ (T : ℕ) (js : Fin T → Fin n) (t : ℕ), dual lam x φ (alphaIter Δ js t) ≠ ⊥) ∧
      ∀ (T : ℕ) (js : Fin T → Fin n) (T₀ : ℕ), T₀ < T → dual lam x φ (alphaAvg Δ js T₀) ≠ ⊥) ∧
    (∀ T : ℕ,
      (n + 1 / (lam * γ)) * Real.log ((n + 1 / (lam * γ)) * (1 / εP)) ≤ T →
      SAGA.Convex.expectIdx n T (fun js =>
          primal lam x φ (wOf lam x (alphaIter Δ js T)) -
            (dual lam x φ (alphaIter Δ js T)).toReal) ≤ εP) ∧
    (∀ T₀ T : ℕ, T₀ < T →
      (n + 1 / (lam * γ)) * Real.log ((n + 1 / (lam * γ)) * (1 / (((T : ℝ) - T₀) * εP))) ≤ T₀ →
      SAGA.Convex.expectIdx n T (fun js =>
          primal lam x φ (wOf lam x (alphaAvg Δ js T₀)) -
            (dual lam x φ (alphaAvg Δ js T₀)).toReal) ≤ εP) ∧
    (∀ T₀ T : ℕ, T₀ < T →
      (n + 1 / (lam * γ)) * Real.log ((n + 1 / (lam * γ)) * (1 / (((T : ℝ) - T₀) * εP))) ≤ T₀ →
      (1 / ((T : ℝ) - T₀)) * ∑ t ∈ Finset.Ico T₀ T,
          SAGA.Convex.expectIdx n T (fun js =>
            primal lam x φ (wOf lam x (alphaIter Δ js t)) -
              (dual lam x φ (alphaIter Δ js t)).toReal) ≤ εP) := by sorry

end SDCA.Smooth
Source
Shalev-Shwartz and Zhang, Stochastic Dual Coordinate Ascent Methods for Regularized Loss Minimization, arXiv:1209.1873v2, §3, p. 6, Theorem 2 (Procedure SDCA and standing assumptions, p. 5)
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me