Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 19 consequence — Nonconvex convergence with warm start

Proved
SCAFFOLD.NonconvexFiniteRoundConvergence

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

federated-learningprobabilitystochastic-optimization

For the full-client KKK-sample warm start, put F=f(x0)−flowF=f(x^0)-f_{\rm low}F=f(x0)−flow​ and suppose h≤(S/N)2/3/(24β)h\le(S/N)^{2/3}/(24\beta)h≤(S/N)2/3/(24β). Then

1T∑r=0T−1E∥∇f(xr)∥2≤14FhT+70βhσ2KS(1+Sηg2).\frac1T\sum_{r=0}^{T-1}\mathbb E\|\nabla f(x^r)\|^2 \le\frac{14F}{hT}+\frac{70\beta h\sigma^2}{KS}\left(1+\frac S{\eta_g^2}\right).T1​r=0∑T−1​E∥∇f(xr)∥2≤hT14F​+KS70βhσ2​(1+ηg2​S​).

This includes S=NS=NS=N, K=1K=1K=1, σ=0\sigma=0σ=0, and F=0F=0F=0 under the specified initialization.

Formalization note: a paper-derived finite-round formulation by summing Lemma 19, using the stated warm start to make the initial stored-point lag zero. The lower bound flowf_{\rm low}flow​ makes explicit that attainment is unnecessary. No intermediate descent or control-lag estimate is assumed in the model. The factor β\betaβ and the sampling factor 1+S/ηg21+S/\eta_g^21+S/ηg2​ are retained from Lemma 19.

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.2, PDF p. 34, Lemma 19; PDF p. 35, final paragraph; PDF p. 31, equations (26)–(27); 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 NonconvexFiniteRoundConvergence :
  ∀ (d N : ℕ) (P : Problem d N) (Ω : Type u) [MeasurableSpace Ω]
    [StandardBorelSpace Ω] (ν : Measure Ω) [IsProbabilityMeasure ν]
    (S K T : ℕ) (ηl ηg fLower : ℝ),
    (∀ x, fLower ≤ objective P.f x) → 0 < ηl → 1 ≤ ηg →
    effectiveStep K ηl ηg ≤
      Real.rpow ((S : ℝ) / (N : ℝ)) (2 / 3 : ℝ) / (24 * P.β) →
    ∀ A : Run P ν S K T ηl ηg none,
      averageGradientSq A ≤ nonconvexRHS P S K T ηl ηg fLower := 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.2, PDF p. 34, Lemma 19; PDF p. 35, final paragraph; PDF p. 31, equations (26)–(27); parent Section 5, PDF p. 5, Theorem III.
Read-back

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

NonconvexFiniteRoundConvergence

Read-back model: gpt-6.

For every pair of natural numbers d,Nd,Nd,N, let E=R{0,…,d−1}E=\mathbb R^{\{0,\ldots,d-1\}}E=R{0,…,d−1} with its Euclidean inner product and norm, and let I={0,…,N−1}I=\{0,\ldots,N-1\}I={0,…,N−1}. Let PPP consist of a positive client count N>0N>0N>0, functions fi:E→Rf_i:E\to\mathbb Rfi​:E→R for i∈Ii\in Ii∈I, real numbers β>0\beta>0β>0 and σ≥0\sigma\ge0σ≥0, and a point x0∈Ex_0\in Ex0​∈E, with the following properties: each fif_ifi​ has a gradient at every z∈Ez\in Ez∈E, equal to the gradient appearing below, and ∥∇fi(z)−∇fi(w)∥≤β∥z−w∥\|\nabla f_i(z)-\nabla f_i(w)\|\le\beta\|z-w\|∥∇fi​(z)−∇fi​(w)∥≤β∥z−w∥ for every i,z,wi,z,wi,z,w. Define F(z)=N−1∑i∈Ifi(z)F(z)=N^{-1}\sum_{i\in I}f_i(z)F(z)=N−1∑i∈I​fi​(z). For every type Ω\OmegaΩ in an arbitrary universe, equipped with a measurable space that is standard Borel, every probability measure ν\nuν on that space, every S,K,T∈NS,K,T\in\mathbb NS,K,T∈N, and every ηl,ηg,flow∈R\eta_l,\eta_g,f_{\mathrm{low}}\in\mathbb Rηl​,ηg​,flow​∈R, suppose flow≤F(z)f_{\mathrm{low}}\le F(z)flow​≤F(z) for every z∈Ez\in Ez∈E, ηl>0\eta_l>0ηl​>0, ηg≥1\eta_g\ge1ηg​≥1, and, writing h=Kηlηgh=K\eta_l\eta_gh=Kηl​ηg​, suppose

h≤(S/N)2/324β,h\le\frac{(S/N)^{2/3}}{24\beta},h≤24β(S/N)2/3​,

where the exponent denotes the real power. The assertion holds for every collection AAA of the following data and properties (all equalities and inequalities between random quantities below are ν\nuν-almost sure unless otherwise specified). The collection requires 0<S≤N0<S\le N0<S≤N, 0<K0<K0<K, and 0<T0<T0<T; an increasing sequence (Ft)t∈N(\mathcal F_t)_{t\in\mathbb N}(Ft​)t∈N​ of sub-σ\sigmaσ-algebras of the given measurable space; random vectors Wk,iW_{k,i}Wk,i​ for every k∈N,i∈Ik\in\mathbb N,i\in Ik∈N,i∈I, XrX_rXr​ and Cr,iC_{r,i}Cr,i​ for every r∈N,i∈Ir\in\mathbb N,i\in Ir∈N,i∈I, Yr,k,iY_{r,k,i}Yr,k,i​ and Gr,k,iG_{r,k,i}Gr,k,i​ for every r,k∈N,i∈Ir,k\in\mathbb N,i\in Ir,k∈N,i∈I; and a finite-subset-valued function Br:Ω→P(I)B_r:\Omega\to\mathcal P(I)Br​:Ω→P(I) for every r∈Nr\in\mathbb Nr∈N. Set τr=K+r(K+1)\tau_r=K+r(K+1)τr​=K+r(K+1). For every k<Kk<Kk<K and every i∈Ii\in Ii∈I, Wk,iW_{k,i}Wk,i​ is strongly Fk+1\mathcal F_{k+1}Fk+1​-measurable and belongs to L2(ν;E)L^2(\nu;E)L2(ν;E) (that is, it is almost everywhere strongly measurable with finite second moment),

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,

and, for each such kkk, the full family (Wk,i)i∈I(W_{k,i})_{i\in I}(Wk,i​)i∈I​ is conditionally mutually 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(ν;E)L^2(\nu;E)L2(ν;E). For every r<Tr<Tr<T, k≤Kk\le Kk≤K, and i∈Ii\in Ii∈I, 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(ν;E)L^2(\nu;E)L2(ν;E). For every r<Tr<Tr<T, k<Kk<Kk<K, and i∈Ii\in Ii∈I, 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(ν;E)L^2(\nu;E)L2(ν;E),

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,

and, for every such r,kr,kr,k, the full family (Gr,k,i)i∈I(G_{r,k,i})_{i\in I}(Gr,k,i​)i∈I​ is conditionally mutually independent given Fτr+k\mathcal F_{\tau_r+k}Fτr​+k​. For every r<Tr<Tr<T, ∣Br∣=S|B_r|=S∣Br​∣=S almost surely; for every finite subset D⊆ID\subseteq ID⊆I, the real indicator 1{Br=D}\mathbf1_{\{B_r=D\}}1{Br​=D}​ is strongly Fτr+1\mathcal F_{\tau_{r+1}}Fτr+1​​-measurable and satisfies

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

The required initialization is X0=x0X_0=x_0X0​=x0​ and, for each i∈Ii\in Ii∈I, C0,i=K−1∑k=0K−1Wk,iC_{0,i}=K^{-1}\sum_{k=0}^{K-1}W_{k,i}C0,i​=K−1∑k=0K−1​Wk,i​. For every r<Tr<Tr<T and i∈Ii\in Ii∈I, Yr,0,i=XrY_{r,0,i}=X_rYr,0,i​=Xr​; for every additional k<Kk<Kk<K, the local update is

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

For every r<Tr<Tr<T and i∈Ii\in Ii∈I, the control update, evaluated at each outcome, is

Cr+1,i={1K∑k=0K−1Gr,k,i,i∈Br,Cr,i,i∉Br,C_{r+1,i} =\begin{cases} \displaystyle\frac1K\sum_{k=0}^{K-1}G_{r,k,i},& i\in B_r,\\ C_{r,i},&i\notin B_r, \end{cases}Cr+1,i​=⎩⎨⎧​K1​k=0∑K−1​Gr,k,i​,Cr,i​,​i∈Br​,i∈/Br​,​

and the server update for each r<Tr<Tr<T is

Xr+1=Xr+ηgS∑i∈Br(Yr,K,i−Xr).X_{r+1}=X_r+\frac{\eta_g}{S}\sum_{i\in B_r}(Y_{r,K,i}-X_r).Xr+1​=Xr​+Sηg​​i∈Br​∑​(Yr,K,i​−Xr​).

Under precisely these hypotheses, the conclusion is

1T∑r=0T−1∫Ω∥∇F(Xr(ω))∥2 dν(ω)≤14(F(x0)−flow)hT+70βhσ2KS(1+Sηg2).\frac1T\sum_{r=0}^{T-1}\int_\Omega\|\nabla F(X_r(\omega))\|^2\,d\nu(\omega) \le \frac{14\bigl(F(x_0)-f_{\mathrm{low}}\bigr)}{hT} +\frac{70\beta h\sigma^2}{KS}\left(1+\frac{S}{\eta_g^2}\right).T1​r=0∑T−1​∫Ω​∥∇F(Xr​(ω))∥2dν(ω)≤hT14(F(x0​)−flow​)​+KS70βhσ2​(1+ηg2​S​).

Here every natural number used in real arithmetic is understood as its real-valued image; the expectations are conditional expectations under ν\nuν, and the integrals are measure-theoretic integrals under ν\nuν. No convexity, minimizer, attainment of flowf_{\mathrm{low}}flow​, or existence of such a collection AAA is asserted or assumed separately. The arrays are defined at all natural indices, but only the index ranges explicitly stated above are constrained. The measurability, moment, gradient, and update conditions cover all clients, including clients outside BrB_rBr​. The conclusion averages the iterates with indices 0,…,T−10,\ldots,T-10,…,T−1, excluding XTX_TXT​. The universal quantifiers include d=0d=0d=0, where EEE is the zero-dimensional Euclidean space, every vector and gradient is zero, and the left side is zero; they permit N=S=K=T=1N=S=K=T=1N=S=K=T=1 and σ=0\sigma=0σ=0. An instance of PPP excludes N=0N=0N=0, and an instance of AAA excludes S=0S=0S=0, K=0K=0K=0, T=0T=0T=0, and S>NS>NS>N; if these parameters preclude such an instance, the corresponding assertion over all AAA has no instances. An empty Ω\OmegaΩ cannot carry the assumed probability measure. The subset condition also quantifies over D=∅D=\varnothingD=∅, giving conditional probability zero since S>0S>0S>0. For an actual instance all of N,S,K,T,β,ηg,hN,S,K,T,\beta,\eta_g,hN,S,K,T,β,ηg​,h are strictly positive, as is (NS)\binom{N}{S}(SN​), so none of the displayed denominators vanishes and the sums over clients, local steps, rounds, and sampled clients are nonempty. The lower-bound assumption also gives F(x0)−flow≥0F(x_0)-f_{\mathrm{low}}\ge0F(x0​)−flow​≥0.

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