Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 1 — Convex FedAvg Convergence (constant step)

Proved
FedAvg.ConvexFedAvgConvergence

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

convex-optimizationfederated-learningprobability

Mathematical statement

For τ,T≥1\tau,T\ge1τ,T≥1 and 0<η≤1/(4L)0<\eta\le1/(4L)0<η≤1/(4L),

E[A]≤D22ητT+ησ2M+4τη2Lσ2+18τ2η2Lζ2.\mathbb E[A]\le\frac{D^2}{2\eta\tau T}+\frac{\eta\sigma^2}{M} +4\tau\eta^2L\sigma^2+18\tau^2\eta^2L\zeta^2.E[A]≤2ητTD2​+Mησ2​+4τη2Lσ2+18τ2η2Lζ2.

Formalization note: direct source theorem, precisely equation (15). Zero noise, zero heterogeneity, and zero initial distance are included. The quantity is average post-update shadow loss, not a last-iterate guarantee.

Source: Jianyu Wang et al., A Field Guide to Federated Optimization, arXiv:2107.06917v1, https://arxiv.org/abs/2107.06917v1; Section 6.1.2, PDF p. 41, Theorem 1, equation (15).

Notation and probability model

There are M≥1M\ge1M≥1 clients with convex differentiable LLL-smooth functions Fi:Rd→RF_i:\mathbb R^d\to\mathbb RFi​:Rd→R, L>0L>0L>0, and F=M−1∑iFiF=M^{-1}\sum_iF_iF=M−1∑i​Fi​. Let x⋆x^\starx⋆ minimize FFF, let x0x_0x0​ be deterministic, and let D=∥x0−x⋆∥D=\|x_0-x^\star\|D=∥x0​−x⋆∥. The finite-dimensional space permits d=0d=0d=0. On a standard Borel probability space (Ω,A,P)(\Omega,\mathcal A,\mathbb P)(Ω,A,P), Ftτ+k\mathcal F_{t\tau+k}Ftτ+k​ contains the full history before step (t,k)(t,k)(t,k). All MMM clients participate and use uniform weights. Starting from x0x_0x0​, xit,k+1=xit,k−ηgit,kx_i^{t,k+1}=x_i^{t,k}-\eta g_i^{t,k}xit,k+1​=xit,k​−ηgit,k​; each subsequent round starts all clients at the preceding round's terminal average. The states are history-measurable and square integrable; gradients are measurable at the next step and square integrable. Conditional on the current history, client gradients are independent, have means ∇Fi(xit,k)\nabla F_i(x_i^{t,k})∇Fi​(xit,k​), and their squared errors have expectations at most σ2\sigma^2σ2, with σ≥0\sigma\ge0σ≥0. The uniform heterogeneity condition is ∥∇Fi(x)−∇F(x)∥≤ζ\|\nabla F_i(x)-\nabla F(x)\|\le\zeta∥∇Fi​(x)−∇F(x)∥≤ζ for every i,xi,xi,x, with ζ≥0\zeta\ge0ζ≥0. Write xˉt,k=M−1∑ixit,k\bar x^{t,k}=M^{-1}\sum_i x_i^{t,k}xˉt,k=M−1∑i​xit,k​, At=τ−1∑k=1τ(F(xˉt,k)−F(x⋆))A_t=\tau^{-1}\sum_{k=1}^{\tau}(F(\bar x^{t,k})-F(x^\star))At​=τ−1∑k=1τ​(F(xˉt,k)−F(x⋆)), and A=T−1∑t=0T−1AtA=T^{-1}\sum_{t=0}^{T-1}A_tA=T−1∑t=0T−1​At​. Conditional statements hold almost surely.

Formalization note: the model makes the source's full-history stochastic-oracle convention explicit. Independence is used in Appendix D.1 immediately after equation (27), PDF p. 87. The moment/measurability and standard Borel conditions are explicit analytic conventions. No convergence or intermediate bound is assumed in the model. The source is Wang et al., A Field Guide to Federated Optimization, Section 6.1.1, PDF p. 40, equations (11)–(14), and Section 6.1.2, PDF p. 41, Theorem 1: https://arxiv.org/abs/2107.06917v1.

Preamble
import Definitions.Def_FedAvg_Model
open MeasureTheory
universe u
Formal statement
namespace FedAvg
theorem ConvexFedAvgConvergence :
  ∀ (d M : ℕ) (P : Problem d M) (Ω : Type u) [MeasurableSpace Ω]
    [StandardBorelSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]
    (τ T : ℕ) (η : ℝ),
    0 < τ → 0 < T → 0 < η → η ≤ 1 / (4 * P.L) →
    ∀ R : Run P μ τ T η, (∫ ω, avgLoss R ω ∂μ) ≤ convergenceRHS P τ T η := by sorry
end FedAvg
Source
Jianyu Wang et al., A Field Guide to Federated Optimization, arXiv:2107.06917v1, https://arxiv.org/abs/2107.06917v1; Section 6.1.2, PDF p. 41, Theorem 1, equation (15).
Read-back

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

ConvexFedAvgConvergence specifies a proposition; this declaration supplies no proof of it. For every pair of natural numbers d,Md,Md,M, consider the Euclidean space E=RdE=\mathbb R^dE=Rd with its Euclidean norm and a problem consisting of M>0M>0M>0 functions fi:E→Rf_i:E\to\mathbb Rfi​:E→R, indexed by i∈{0,…,M−1}i\in\{0,\ldots,M-1\}i∈{0,…,M−1}, real parameters L>0L>0L>0, σ≥0\sigma\ge0σ≥0, ζ≥0\zeta\ge0ζ≥0, and points x0,x⋆∈Ex_0,x_\star\in Ex0​,x⋆​∈E. Put F(x)=M−1∑i=0M−1fi(x)F(x)=M^{-1}\sum_{i=0}^{M-1}f_i(x)F(x)=M−1∑i=0M−1​fi​(x). At every x∈Ex\in Ex∈E each fif_ifi​ has its declared gradient ∇fi(x)\nabla f_i(x)∇fi​(x), each fif_ifi​ is convex on all of EEE, and for all clients iii and all x,y∈Ex,y\in Ex,y∈E one has ∥∇fi(x)−∇fi(y)∥≤L∥x−y∥\|\nabla f_i(x)-\nabla f_i(y)\|\le L\|x-y\|∥∇fi​(x)−∇fi​(y)∥≤L∥x−y∥ and ∥∇fi(x)−∇F(x)∥≤ζ\|\nabla f_i(x)-\nabla F(x)\|\le\zeta∥∇fi​(x)−∇F(x)∥≤ζ. The point x⋆x_\starx⋆​ satisfies F(x⋆)≤F(x)F(x_\star)\le F(x)F(x⋆​)≤F(x) for every x∈Ex\in Ex∈E. Universally quantify also over a type Ω\OmegaΩ in the declaration's arbitrary universe uuu, a measurable-space structure on Ω\OmegaΩ that makes it a standard Borel space, and a probability measure μ\muμ on that space. Write Eμ\mathbb E_\muEμ​ for integration against μ\muμ and Eμ[ ⋅∣Hs]\mathbb E_\mu[\,\cdot\mid\mathcal H_s]Eμ​[⋅∣Hs​] for the library's conditional expectation given Hs\mathcal H_sHs​. Universally quantify over natural numbers τ,T\tau,Tτ,T and a real number η\etaη satisfying τ>0\tau>0τ>0, T>0T>0T>0, and 0<η≤1/(4L)0<\eta\le1/(4L)0<η≤1/(4L). For the specified τ,T,η\tau,T,\etaτ,T,η, a run consists of an increasing filtration (Hs)s∈N(\mathcal H_s)_{s\in\mathbb N}(Hs​)s∈N​ of sub-σ\sigmaσ-algebras of the ambient measurable space and functions xt,k,i,gt,k,i:Ω→Ex_{t,k,i},g_{t,k,i}:\Omega\to Ext,k,i​,gt,k,i​:Ω→E defined for every t,k∈Nt,k\in\mathbb Nt,k∈N and client iii. For every t<Tt<Tt<T, k≤τk\le\tauk≤τ, and iii, xt,k,ix_{t,k,i}xt,k,i​ is strongly Htτ+k\mathcal H_{t\tau+k}Htτ+k​-measurable and square-integrable against μ\muμ. For every t<Tt<Tt<T, k<τk<\tauk<τ, and iii, gt,k,ig_{t,k,i}gt,k,i​ is strongly Htτ+k+1\mathcal H_{t\tau+k+1}Htτ+k+1​-measurable and square-integrable, and the following hold μ\muμ-almost everywhere: Eμ[gt,k,i∣Htτ+k]=∇fi(xt,k,i)\mathbb E_\mu[g_{t,k,i}\mid\mathcal H_{t\tau+k}]=\nabla f_i(x_{t,k,i})Eμ​[gt,k,i​∣Htτ+k​]=∇fi​(xt,k,i​), Eμ[∥gt,k,i−∇fi(xt,k,i)∥2∣Htτ+k]≤σ2\mathbb E_\mu[\|g_{t,k,i}-\nabla f_i(x_{t,k,i})\|^2\mid\mathcal H_{t\tau+k}]\le\sigma^2Eμ​[∥gt,k,i​−∇fi​(xt,k,i​)∥2∣Htτ+k​]≤σ2, and xt,k+1,i=xt,k,i−ηgt,k,ix_{t,k+1,i}=x_{t,k,i}-\eta g_{t,k,i}xt,k+1,i​=xt,k,i​−ηgt,k,i​. For each such t,kt,kt,k, the whole family (gt,k,i)i=0M−1(g_{t,k,i})_{i=0}^{M-1}(gt,k,i​)i=0M−1​ is mutually conditionally independent given Htτ+k\mathcal H_{t\tau+k}Htτ+k​; explicitly, conditional probabilities of intersections of finitely many events {gt,k,i∈Ai}\{g_{t,k,i}\in A_i\}{gt,k,i​∈Ai​} with distinct clients and Borel sets Ai⊆EA_i\subseteq EAi​⊆E equal the products of their conditional probabilities almost everywhere. The initialization x0,0,i(ω)=x0x_{0,0,i}(\omega)=x_0x0,0,i​(ω)=x0​ holds for every client and every ω\omegaω, with no exceptional null set. For each ttt with t+1<Tt+1<Tt+1<T and each iii, synchronization satisfies xt+1,0,i=M−1∑jxt,τ,jx_{t+1,0,i}=M^{-1}\sum_jx_{t,\tau,j}xt+1,0,i​=M−1∑j​xt,τ,j​ almost everywhere. Define xˉt,k=M−1∑ixt,k,i\bar x_{t,k}=M^{-1}\sum_i x_{t,k,i}xˉt,k​=M−1∑i​xt,k,i​. Write D=∥x0−x⋆∥D=\|x_0-x_\star\|D=∥x0​−x⋆​∥. The proposition states that every such run satisfies

∫Ω[1T∑t=0T−11τ∑k=0τ−1(F(xˉt,k+1(ω))−F(x⋆))] dμ(ω)≤D22ητT+ησ2M+4τη2Lσ2+18τ2η2Lζ2.\int_\Omega \left[\frac1T\sum_{t=0}^{T-1}\frac1\tau\sum_{k=0}^{\tau-1} \bigl(F(\bar x_{t,k+1}(\omega))-F(x_\star)\bigr)\right]\,d\mu(\omega) \le \frac{D^2}{2\eta\tau T} +\frac{\eta\sigma^2}{M} +4\tau\eta^2L\sigma^2 +18\tau^2\eta^2L\zeta^2.∫Ω​[T1​t=0∑T−1​τ1​k=0∑τ−1​(F(xˉt,k+1​(ω))−F(x⋆​))]dμ(ω)≤2ητTD2​+Mησ2​+4τη2Lσ2+18τ2η2Lζ2.

The left side integrates an average of objective excesses at the averaged iterates with inner indices 1,…,τ1,\ldots,\tau1,…,τ in each round. Values D=0D=0D=0, σ=0\sigma=0σ=0, and ζ=0\zeta=0ζ=0 are allowed. The positivity hypotheses make the displayed explicit rational denominators nonzero. This proposition has no other proposition from the bundle as a premise. The dimension d=0d=0d=0 is permitted, as is M=1M=1M=1; M=0M=0M=0 is excluded by the problem data. No existence or uniqueness of a run is asserted. The run requirements impose no additional restrictions outside the specified index ranges, apart from the universally imposed initialization. Equalities and inequalities involving conditional expectations or updates are only almost-everywhere statements unless explicitly stated otherwise. Conditional expectation here is a selected function version, totalized to zero for nonintegrable inputs; the unconditional integral is likewise the library's totalized integral.

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

  • Endorsed by Minghui · Sep 23, 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