Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 15 consequence — Convex and strongly convex convergence

Proved
SCAFFOLD.ConvexFiniteRoundConvergence

by Minghui · Sep 23, 2026 · Mathlib c5ea003 (Lean v4.30.0)

federated-learningprobabilitystochastic-optimization

Let h≤1/(81β)h\le1/(81\beta)h≤1/(81β) and μh≤S/(15N)\mu h\le S/(15N)μh≤S/(15N). Set q=1−μh/2q=1-\mu h/2q=1−μh/2, wr=q−(r+1)w_r=q^{-(r+1)}wr​=q−(r+1) for 0≤r<T0\le r<T0≤r<T, and WT=∑r=0T−1wrW_T=\sum_{r=0}^{T-1}w_rWT​=∑r=0T−1​wr​. Then q≥29/30>0q\ge29/30>0q≥29/30>0 and

1WT∑r=0T−1wr E[f(xr)−f(x⋆)]≤V0hWT+12hσ2KS(1+Sηg2).\frac1{W_T}\sum_{r=0}^{T-1}w_r\,\mathbb E[f(x^r)-f(x^\star)] \le\frac{V_0}{hW_T}+\frac{12h\sigma^2}{KS}\left(1+\frac S{\eta_g^2}\right).WT​1​r=0∑T−1​wr​E[f(xr)−f(x⋆)]≤hWT​V0​​+KS12hσ2​(1+ηg2​S​).

The case μ=0\mu=0μ=0 has uniform weights and WT=TW_T=TWT​=T; μ>0\mu>0μ>0 gives geometric weights. No division by μ\muμ is used, and zero noise or zero initial distance is allowed.

Formalization note: a paper-derived finite-round formulation, obtained by weighted telescoping of Lemma 15, specialized to deterministic initial controls. It keeps all constants and the initial-control term, rather than transcribing the ambiguous asymptotic summary in Theorem VII. The statement itself does not assume Lemma 15 or any control-lag recurrence.

Source: Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank J. Reddi, Sebastian U. Stich, and Ananda Theertha Suresh, SCAFFOLD: Stochastic Controlled Averaging for Federated Learning, ICML 2020; arXiv:1910.06378v4, https://arxiv.org/abs/1910.06378v4; Appendix E.1, PDF p. 30, Lemma 15; PDF p. 31, first unnumbered averaging display; source-backed parent Section 5, PDF p. 5, Theorem III.

Notation and probability model

There are N≥1N\ge1N≥1 clients, a model space Rd\mathbb R^dRd (including d=0d=0d=0), differentiable client losses fif_ifi​ with β\betaβ-Lipschitz gradients, β>0\beta>0β>0, and f=N−1∑ifif=N^{-1}\sum_i f_if=N−1∑i​fi​. The starting point x0x^0x0 is deterministic and σ≥0\sigma\ge0σ≥0 bounds within-client stochastic-gradient standard deviation. A run has T≥1T\ge1T≥1 rounds, K≥1K\ge1K≥1 local steps, 1≤S≤N1\le S\le N1≤S≤N clients per round, local step ηl>0\eta_l>0ηl​>0, global step ηg≥1\eta_g\ge1ηg​≥1, and h=Kηlηgh=K\eta_l\eta_gh=Kηl​ηg​. All random variables live on a standard Borel probability space (Ω,A,ν)(\Omega,\mathcal A,\nu)(Ω,A,ν) with a filtration containing the full history. States and gradient samples are square integrable; gradient samples are conditionally unbiased, have conditional squared error at most σ2\sigma^2σ2, and are independent across clients conditional on each step's history. These are explicit fresh-oracle and finite-moment conventions.

Every round first defines virtual paths for all clients, starting at yi,0r=xry_{i,0}^r=x^ryi,0r​=xr:

yi,k+1r=yi,kr−ηl(gi,kr−cir+cr),cr=N−1∑icir.y_{i,k+1}^r=y_{i,k}^r-\eta_l(g_{i,k}^r-c_i^r+c^r),\qquad c^r=N^{-1}\sum_i c_i^r.yi,k+1r​=yi,kr​−ηl​(gi,kr​−cir​+cr),cr=N−1i∑​cir​.

Then an SSS-element subset is sampled uniformly, conditionally independently of these paths given the past. Equivalently, its conditional distribution given the entire completed virtual-path history is uniform. Only selected clients update their controls to K−1∑k=0K−1gi,krK^{-1}\sum_{k=0}^{K-1}g_{i,k}^rK−1∑k=0K−1​gi,kr​; other controls persist. The server update is xr+1=xr+(ηg/S)∑i∈Sr(yi,Kr−xr)x^{r+1}=x^r+(\eta_g/S)\sum_{i\in\mathcal S_r}(y_{i,K}^r-x^r)xr+1=xr+(ηg​/S)∑i∈Sr​​(yi,Kr​−xr). This is option II of Algorithm 1, with the average-gradient form of Appendix E. The model contains the algorithm and oracle laws, not any convergence inequality.

For convex targets, x⋆x^\starx⋆ minimizes fff, and the client losses obey

fi(y)≥fi(x)+⟨∇fi(x),y−x⟩+μ2∥y−x∥2,μ≥0.f_i(y)\ge f_i(x)+\langle\nabla f_i(x),y-x\rangle +\frac\mu2\|y-x\|^2,\qquad \mu\ge0.fi​(y)≥fi​(x)+⟨∇fi​(x),y−x⟩+2μ​∥y−x∥2,μ≥0.

The initial client controls ci0c_i^0ci0​ are arbitrary deterministic vectors and the server control is their average. Define

C0=1N∑i∥ci0−∇fi(x⋆)∥2,V0=∥x0−x⋆∥2+9Nh2SC0.C_0=\frac1N\sum_i\|c_i^0-\nabla f_i(x^\star)\|^2,\qquad V_0=\|x^0-x^\star\|^2+\frac{9Nh^2}{S}C_0.C0​=N1​i∑​∥ci0​−∇fi​(x⋆)∥2,V0​=∥x0−x⋆∥2+S9Nh2​C0​.

For nonconvex targets, flow≤f(x)f_{\rm low}\le f(x)flow​≤f(x) for all xxx; a minimizer need not exist. Each ci0c_i^0ci0​ is instead initialized by averaging KKK fresh stochastic gradients at x0x^0x0, with the same conditional oracle assumptions. These full-client initialization queries are additional to the TTT optimization rounds.

The output is a sampled pre-round server iterate among x0,…,xT−1x^0,\ldots,x^{T-1}x0,…,xT−1, represented by its expected loss or squared-gradient statistic. No last-iterate or pathwise guarantee is asserted. Sources: Section 2, PDF p. 2; Algorithm 1, PDF p. 4; Appendix B.1, PDF p. 14, assumptions A3–A5; Appendix E, PDF pp. 25–26, equations (18)–(22), Remark 10; Appendix E.2, PDF pp. 31 and 35, equations (26)–(27) and final warm-start paragraph. Primary reference: Karimireddy et al., SCAFFOLD: Stochastic Controlled Averaging for Federated Learning, ICML 2020, https://arxiv.org/abs/1910.06378v4.

Preamble
import Definitions.Def_SCAFFOLD_Model
open MeasureTheory
universe u
Formal statement
namespace SCAFFOLD
theorem ConvexFiniteRoundConvergence :
  ∀ (d N : ℕ) (P : Problem d N) (Ω : Type u) [MeasurableSpace Ω]
    [StandardBorelSpace Ω] (ν : Measure Ω) [IsProbabilityMeasure ν]
    (S K T : ℕ) (ηl ηg μ : ℝ) (c0 : Fin N → Space d) (xstar : Space d),
    Convexity P μ → IsMinimizer P xstar → 0 < ηl → 1 ≤ ηg →
    effectiveStep K ηl ηg ≤ 1 / (81 * P.β) →
    μ * effectiveStep K ηl ηg ≤ (S : ℝ) / (15 * (N : ℝ)) →
    ∀ A : Run P ν S K T ηl ηg (some c0),
      weightedGap A xstar μ ≤ convexRHS P S K T ηl ηg μ c0 xstar := by sorry
end SCAFFOLD
Source
Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank J. Reddi, Sebastian U. Stich, and Ananda Theertha Suresh, SCAFFOLD: Stochastic Controlled Averaging for Federated Learning, ICML 2020; arXiv:1910.06378v4, https://arxiv.org/abs/1910.06378v4; Appendix E.1, PDF p. 30, Lemma 15; PDF p. 31, first unnumbered averaging display; source-backed parent Section 5, PDF p. 5, Theorem III.
Read-back

What the Lean code literally says, in plain math · gpt-6

Auditor model: gpt-6.

For every pair of natural numbers d,Nd,Nd,N, let V=RdV=\mathbb R^dV=Rd with its Euclidean inner product and norm, and let the client indices be i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}. Consider any collection of functions fi:V→Rf_i:V\to\mathbb Rfi​:V→R, constants β,σ∈R\beta,\sigma\in\mathbb Rβ,σ∈R, and point x0∈Vx_0\in Vx0​∈V satisfying N>0N>0N>0, β>0\beta>0β>0, σ≥0\sigma\ge0σ≥0, existence of the gradient ∇fi(x)\nabla f_i(x)∇fi​(x) at every x∈Vx\in Vx∈V for every client, and ∥∇fi(x)−∇fi(y)∥≤β∥x−y∥\|\nabla f_i(x)-\nabla f_i(y)\|\le\beta\|x-y\|∥∇fi​(x)−∇fi​(y)∥≤β∥x−y∥ for every client and every x,y∈Vx,y\in Vx,y∈V. Set F(x)=N−1∑i=0N−1fi(x)F(x)=N^{-1}\sum_{i=0}^{N-1}f_i(x)F(x)=N−1∑i=0N−1​fi​(x). For every standard Borel measurable space Ω\OmegaΩ (of any universe size), every probability measure ν\nuν on it, every S,K,T∈NS,K,T\in\mathbb NS,K,T∈N, every ηl,ηg,μ∈R\eta_l,\eta_g,\mu\in\mathbb Rηl​,ηg​,μ∈R, every deterministic collection ci0∈Vc_i^0\in Vci0​∈V, and every x⋆∈Vx_\star\in Vx⋆​∈V, suppose μ≥0\mu\ge0μ≥0 and, for every client and all x,y∈Vx,y\in Vx,y∈V,

fi(x)+⟨∇fi(x),y−x⟩+μ2∥y−x∥2≤fi(y),f_i(x)+\langle\nabla f_i(x),y-x\rangle+\frac{\mu}{2}\|y-x\|^2\le f_i(y),fi​(x)+⟨∇fi​(x),y−x⟩+2μ​∥y−x∥2≤fi​(y),

suppose F(x⋆)≤F(x)F(x_\star)\le F(x)F(x⋆​)≤F(x) for every x∈Vx\in Vx∈V, and suppose, writing h=Kηlηgh=K\eta_l\eta_gh=Kηl​ηg​,

ηl>0,ηg≥1,h≤181β,μh≤S15N.\eta_l>0,\qquad \eta_g\ge1,\qquad h\le\frac1{81\beta},\qquad \mu h\le\frac{S}{15N}.ηl​>0,ηg​≥1,h≤81β1​,μh≤15NS​.

The assertion applies to every run with the following data and properties. It requires 0<S≤N0<S\le N0<S≤N, K>0K>0K>0, and T>0T>0T>0. Its data consist of an increasing filtration (Ft)t∈N(\mathcal F_t)_{t\in\mathbb N}(Ft​)t∈N​ of sub-σ\sigmaσ-algebras of the measurable structure on Ω\OmegaΩ; vector-valued maps Wk,i,Xr,Cr,i,Yr,k,i,Gr,k,i:Ω→VW_{k,i},X_r,C_{r,i},Y_{r,k,i},G_{r,k,i}:\Omega\to VWk,i​,Xr​,Cr,i​,Yr,k,i​,Gr,k,i​:Ω→V for all natural time indices and all clients; and maps Ir:Ω→P({0,…,N−1})I_r:\Omega\to\mathcal P(\{0,\ldots,N-1\})Ir​:Ω→P({0,…,N−1}) for all r∈Nr\in\mathbb Nr∈N. Write τr=K+r(K+1)\tau_r=K+r(K+1)τr​=K+r(K+1), write Eν[⋅∣Ft]\mathbb E_\nu[\cdot\mid\mathcal F_t]Eν​[⋅∣Ft​] for conditional expectation with respect to ν\nuν, and interpret each equality or inequality of random variables below as holding ν\nuν-almost surely. For every k<Kk<Kk<K and every client, Wk,iW_{k,i}Wk,i​ is strongly Fk+1\mathcal F_{k+1}Fk+1​-measurable and belongs to L2(ν;V)L^2(\nu;V)L2(ν;V), and

Eν[Wk,i∣Fk]=∇fi(x0),Eν[∥Wk,i−∇fi(x0)∥2∣Fk]≤σ2.\mathbb E_\nu[W_{k,i}\mid\mathcal F_k]=\nabla f_i(x_0),\qquad \mathbb E_\nu[\|W_{k,i}-\nabla f_i(x_0)\|^2\mid\mathcal F_k]\le\sigma^2.Eν​[Wk,i​∣Fk​]=∇fi​(x0​),Eν​[∥Wk,i​−∇fi​(x0​)∥2∣Fk​]≤σ2.

For every k<Kk<Kk<K, the family (Wk,i)i=0N−1(W_{k,i})_{i=0}^{N-1}(Wk,i​)i=0N−1​ is conditionally independent given Fk\mathcal F_kFk​. For every r≤Tr\le Tr≤T, XrX_rXr​ and each Cr,iC_{r,i}Cr,i​ are strongly Fτr\mathcal F_{\tau_r}Fτr​​-measurable and belong to L2(ν;V)L^2(\nu;V)L2(ν;V). For every r<Tr<Tr<T, every k≤Kk\le Kk≤K, and every client, Yr,k,iY_{r,k,i}Yr,k,i​ is strongly Fτr+k\mathcal F_{\tau_r+k}Fτr​+k​-measurable and belongs to L2(ν;V)L^2(\nu;V)L2(ν;V). For every r<Tr<Tr<T, every k<Kk<Kk<K, and every client, Gr,k,iG_{r,k,i}Gr,k,i​ is strongly Fτr+k+1\mathcal F_{\tau_r+k+1}Fτr​+k+1​-measurable and belongs to L2(ν;V)L^2(\nu;V)L2(ν;V), and

Eν[Gr,k,i∣Fτr+k]=∇fi(Yr,k,i),Eν[∥Gr,k,i−∇fi(Yr,k,i)∥2∣Fτr+k]≤σ2.\mathbb E_\nu[G_{r,k,i}\mid\mathcal F_{\tau_r+k}]=\nabla f_i(Y_{r,k,i}),\qquad \mathbb E_\nu[\|G_{r,k,i}-\nabla f_i(Y_{r,k,i})\|^2\mid\mathcal F_{\tau_r+k}]\le\sigma^2.Eν​[Gr,k,i​∣Fτr​+k​]=∇fi​(Yr,k,i​),Eν​[∥Gr,k,i​−∇fi​(Yr,k,i​)∥2∣Fτr​+k​]≤σ2.

For every r<Tr<Tr<T and every k<Kk<Kk<K, the family (Gr,k,i)i=0N−1(G_{r,k,i})_{i=0}^{N-1}(Gr,k,i​)i=0N−1​ is conditionally independent given Fτr+k\mathcal F_{\tau_r+k}Fτr​+k​. Here membership in L2(ν;V)L^2(\nu;V)L2(ν;V) means almost-everywhere strong measurability and finite integral of the squared norm; the stated conditional independence is across clients at each fixed indicated time. For every r<Tr<Tr<T, ∣Ir∣=S|I_r|=S∣Ir​∣=S almost surely. For every r<Tr<Tr<T and every subset B⊆{0,…,N−1}B\subseteq\{0,\ldots,N-1\}B⊆{0,…,N−1}, the indicator 1{Ir=B}\mathbf1_{\{I_r=B\}}1{Ir​=B}​ is strongly Fτr+1\mathcal F_{\tau_{r+1}}Fτr+1​​-measurable and satisfies

Eν[1{Ir=B}∣Fτr+K]={(NS)−1,∣B∣=S,0,∣B∣≠S.\mathbb E_\nu[\mathbf1_{\{I_r=B\}}\mid\mathcal F_{\tau_r+K}] =\begin{cases}\binom{N}{S}^{-1},&|B|=S,\\0,&|B|\ne S.\end{cases}Eν​[1{Ir​=B}​∣Fτr​+K​]={(SN​)−1,0,​∣B∣=S,∣B∣=S.​

The initialization is X0=x0X_0=x_0X0​=x0​ and C0,i=ci0C_{0,i}=c_i^0C0,i​=ci0​ for every client. For every r<Tr<Tr<T and every client, Yr,0,i=XrY_{r,0,i}=X_rYr,0,i​=Xr​; for every such r,ir,ir,i and every k<Kk<Kk<K,

Yr,k+1,i=Yr,k,i−ηl(Gr,k,i−Cr,i+1N∑j=0N−1Cr,j).Y_{r,k+1,i}=Y_{r,k,i}-\eta_l\left(G_{r,k,i}-C_{r,i}+\frac1N\sum_{j=0}^{N-1}C_{r,j}\right).Yr,k+1,i​=Yr,k,i​−ηl​(Gr,k,i​−Cr,i​+N1​j=0∑N−1​Cr,j​).

For every r<Tr<Tr<T and every client,

Cr+1,i={1K∑k=0K−1Gr,k,i,i∈Ir,Cr,i,i∉Ir,Xr+1=Xr+ηgS∑i∈Ir(Yr,K,i−Xr).C_{r+1,i}=\begin{cases}\displaystyle\frac1K\sum_{k=0}^{K-1}G_{r,k,i},&i\in I_r,\\C_{r,i},&i\notin I_r,\end{cases} \qquad X_{r+1}=X_r+\frac{\eta_g}{S}\sum_{i\in I_r}(Y_{r,K,i}-X_r).Cr+1,i​=⎩⎨⎧​K1​k=0∑K−1​Gr,k,i​,Cr,i​,​i∈Ir​,i∈/Ir​,​Xr+1​=Xr​+Sηg​​i∈Ir​∑​(Yr,K,i​−Xr​).

All these initialization and update identities are almost-sure identities; their displayed random variables are evaluated at the same sample point. Define the real weights and their sum by

wr=(11−μh/2)r+1,W=∑r=0T−1wr.w_r=\left(\frac1{1-\mu h/2}\right)^{r+1},\qquad W=\sum_{r=0}^{T-1}w_r.wr​=(1−μh/21​)r+1,W=r=0∑T−1​wr​.

Then every such run satisfies

1W∑r=0T−1wr∫Ω(F(Xr(ω))−F(x⋆)) dν(ω)≤∥x0−x⋆∥2+9Nh2S(1N∑i=0N−1∥ci0−∇fi(x⋆)∥2)hW+12hσ2KS(1+Sηg2).\frac1W\sum_{r=0}^{T-1}w_r\int_\Omega\bigl(F(X_r(\omega))-F(x_\star)\bigr)\,d\nu(\omega) \le \frac{\displaystyle\|x_0-x_\star\|^2+\frac{9Nh^2}{S}\left(\frac1N\sum_{i=0}^{N-1}\|c_i^0-\nabla f_i(x_\star)\|^2\right)}{hW} +\frac{12h\sigma^2}{KS}\left(1+\frac S{\eta_g^2}\right).W1​r=0∑T−1​wr​∫Ω​(F(Xr​(ω))−F(x⋆​))dν(ω)≤hW∥x0​−x⋆​∥2+S9Nh2​(N1​i=0∑N−1​∥ci0​−∇fi​(x⋆​)∥2)​+KS12hσ2​(1+ηg2​S​).

All natural numbers appearing in real-valued formulas are interpreted as real numbers. The averaged objective gaps concern rounds 0,…,T−10,\ldots,T-10,…,T−1, including the initial point and excluding XTX_TXT​. There is no requirement that x⋆x_\starx⋆​ be the unique minimizer and no restriction on the deterministic initial controls beyond being vectors in VVV. The warm variables still have to satisfy all the stated conditions although the supplied controls, rather than their averages, initialize this run. The maps are defined for all natural indices, but the displayed regularity, sampling, and update requirements apply only in their specified ranges. Dimension d=0d=0d=0 is included, giving the one-element zero-dimensional vector space. No problem data exist with N=0N=0N=0; for S=0S=0S=0, S>NS>NS>N, K=0K=0K=0, or T=0T=0T=0, no run of the required kind exists, so the universal assertion over runs is vacuous. In any existing run, h>0h>0h>0, μh≤1/15\mu h\le1/15μh≤1/15, 1−μh/2≥29/301-\mu h/2\ge29/301−μh/2≥29/30, and W>0W>0W>0, so all displayed denominators are nonzero. The case μ=0\mu=0μ=0 is included and gives wr=1w_r=1wr​=1 and W=TW=TW=T; zero noise σ=0\sigma=0σ=0 and full participation S=NS=NS=N are also included. The theorem asserts this bound for every run satisfying its requirements and does not assert that such a run exists.

Human review
  • Endorsed by Shuze Chen · Sep 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Minghui · Sep 24, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me