A NCHOR S AMPLING FOR F EDERATED L EARNING WITH P ARTIAL C LIENT P ARTICIPATION
Anonymous authors
Paper under double-blind review
A BSTRACT
In federated learning, the support of partial client participation offers a flexible training strategy, but it deteriorates the model training efficiency.
In this paper, we propose a framework FedAMD to improve the convergence property and maintain flexibility.
The core idea is anchor sampling, which disjoints the partial participants into anchor and miner groups.
Each client in the anchor group aims at the local bullseye with the gradient computation using a large batch.
Guided by the bullseyes, clients in the miner group steer multiple near-optimal local updates using small batches and update the global model.
With the joint efforts from both groups,
FedAMD is able to accelerate the training process as well as improve the model performance.
Measured by ϵ -approximation and compared to the state-of-the-art first-order methods, FedAMD achieves the convergence by up to O (1 /ϵ ) fewer communication rounds under non-convex objectives.
In specific, we achieve a linear convergence rate under PL conditions.
Empirical studies on real-world datasets validate the effectiveness of FedAMD and demonstrate the superiority of our proposed algorithm:
Not only does it considerably save computation and communication costs, but also the test accuracy significantly improves.
I NTRODUCTION
Federated learning (FL) (Koneˇcn ` y et al., 2015; 2016; McMahan et al., 2017) has attained an increasing interest over the past few years.
As a distributed training paradigm, it enables a group of clients to collaboratively train a global model from decentralized data under the orchestration of a central server.
By this means, sensitive privacy is basically protected because the raw data are not shared across the clients.
Due to the unreliable network connection and the rapid proliferation of FL clients, it is infeasible to require all clients to be simultaneously involved in the training.
To address the issue, recent works (Li et al., 2019b; Philippenko & Dieuleveut, 2020; Gorbunov et al., 2021a; Karimireddy et al., 2020b; Yang et al., 2020; Li et al., 2020; Eichner et al., 2019; Yan et al., 2020; Ruan et al., 2021; Gu et al., 2021; Lai et al., 2021) introduce a practical setting where merely a portion of clients participates in the training.
The partial-client scenario effectively avoids the network congestion at the FL server and significantly shortens the idle time as compared to traditional large-scale machine learning (Zinkevich et al., 2010; Bottou, 2010; Dean et al., 2012; Bottou et al., 2018).
However, a model trained with partial client participation is much worse than the one trained with full client participation (Yang et al., 2020).
This phenomenon is account for two reasons, namely, data heterogeneity (a.k.a.
non-i.i.d. data) and the lack of inactive clients’ updates.
With data heterogeneity, the optimal model is subject to the local data distribution, and therefore, the local updates on the clients’ models greatly deviate from the update towards optimal global parameters (Karimireddy et al., 2020b; Malinovskiy et al., 2020; Pathak & Wainwright, 2020; Wang et al., 2020; 2021; Mitra et al., 2021; Rothchild et al., 2020;
Zhao et al., 2018; Wu et al., 2021).
FedAvg (McMahan et al., 2017; Li et al., 2019b; Yu et al., 2019a;b; Stich, 2018), for example, is less likely to follow a correct update towards the global minimizer because the model aggregation on the active clients critically deviates from the aggregation on the full clients, an expected direction towards global minimizer (Yang et al., 2020).
As a family of practical solutions to data heterogeneity, variance reduced techniques (Karimireddy et al., 2020b; Gorbunov et al., 2021a;
Wu et al., 2021; Gorbunov et al., 2021b; Liang et al., 2019;
Shamir et al., 2014; Li et al., 2019a; 2021b;
Karimireddy et al., 2020a; Murata & Suzuki, 2021) achieve an improved convergence rate when compared to FedAvg.
With multiple local updates, each client corrects the SGD steps with reference to an estimated global target, which is synchronized at
[Table]
the beginning of every round.
Although, in each transmission round, variance-reduced algorithms require the communication overhead twice as more as FedAvg, their improved performances are likely to eliminate the cost increments.
Recent studies (Gorbunov et al., 2021a; Murata & Suzuki, 2021; Tyurin & Richtárik, 2022;
Zhao et al., 2021) have demonstrated great potential using large batches under full client participation 1 .
Measured by ϵ -approximation, MARINA (Gorbunov et al., 2021a), for instance, realizes O (1 /Mϵ 1 / 2 ) faster while using large batches, where M indicates the number of clients.
However, none of the prior studies address the drawbacks of using large batches.
Typically, a large batch update involves several gradient computations compared to a small batch update.
This increases the burden of FL clients, especially on IoT devices like smartphones, because their hardware hardly accommodates all samples in a large batch simultaneously.
Instead, they must partition the large batch into several small batches to obtain the final gradient.
Furthermore, regarding the critical convergent differences between various participation modes, the effect of using large batches under partial client participation cannot be affirmative.
BVR-L-SGD (Murata & Suzuki, 2021) and FedPAGE (Zhao et al., 2021) claim that they can work under partial client participation, but they require all clients’ participation when the algorithms come to the synchronization using a large batch.
Motivated by the observation above, we propose a framework named FedAMD under federated learning with anchor sampling that disjoints the partial participants into two groups, i.e., anchor and miner group.
In the anchor group, clients (a.k.a. anchors) compute the gradient using a large batch cached in the server to estimate the global orientation.
In the miner group, clients (a.k.a.
miners) perform multiple updates corrected according to the previous and the current local parameters and the last local update volume.
The objective for the latter group is twofold.
First, multiple local updates without serious deviation can effectively accelerate the training process.
Second, we update the global model using the local models from the latter group only.
Since anchor sampling disjoints the clients with time-varying probability, we separately consider constant and sequential probability settings.
Contributions.
We summarize our contributions as follows:
• Algorithmically , we propose a unified federated learning framework FedAMD that identifies a participant as an anchor or a miner.
Clients in the anchor group aim to obtain the bullseyes of their local data with a large batch, while the miners target to accelerate the training with multiple local updates using small batches.
• Theoretically , we establish the convergence rate for FedAMD under non-convex objectives under both constant and sequential probability settings.
To the best of our knowledge, this is the first work to analyze the effectiveness of large batches under partial client participation.
Our theoretical
results indicate that, with the proper setting for the probability, FedAMD can achieve a convergence rate of O ( MAT ) under non-convex objective, and linear convergence under Polyak-Łojasiewicz (PL) condition (Polyak, 1963; Lojasiewicz, 1963).
Comprehensive comparisons with previous works are presented in Table 1.
Empirically , we conduct extensive experiments to compare FedAMD with the most representative approaches.
The numerical results provide evidence of the superiority of our proposed algorithm.
Achieving the same test accuracy, FedAMD utilizes less computational power metered by the cumulative gradient complexity.
R ELATED W ORK
In this section, we discuss the state-of-the-art works that are strongly relevant to our research.
A more comprehensive review is provided in Appendix A.
Mini-batch SGD vs. Local SGD.
Distributed optimization is required to train large-scale deep learning systems.
Local SGD (also known as FedAvg) (Stich, 2018; Dieuleveut & Patel, 2019;
Haddadpour et al., 2019; Haddadpour & Mahdavi, 2019) performs multiple (i.e., K ≥ 1 ) local updates with K small batches, while mini-batch SGD computes the gradients averaged by K small batches (Woodworth et al., 2020b;a) (or a large batches (Shallue et al., 2019;
You et al., 2018; Goyal et al., 2017)) on a given model.
There has been a long discussion on which one is better (Lin et al., 2019; Woodworth et al., 2020a;b; Yun et al., 2021), but no existing work considers how to disjoint the nodes such that both can be trained at the same time.
Variance Reduction in FL.
The variance-reduced techniques have critically driven the advent of FL algorithms (Karimireddy et al., 2020b; Wu et al., 2021;
Liang et al., 2019; Karimireddy et al., 2020a;
Murata & Suzuki, 2021; Mitra et al., 2021) by correcting each local computed gradient with respect to the estimated global orientation.
However, a concern is addressed on how to attain an accurate global orientation to mitigate the update drift from the global model.
Roughly, the estimation lies in two types, namely, precalculated and cached.
The former methods (Murata & Suzuki, 2021; Mitra et al., 2021) required precalculation typically require full worker participation, which is infeasible for federated learning settings.
As for the global orientation estimated by cached information, existing approaches (Karimireddy et al., 2020b; Wu et al., 2021; Liang et al., 2019; Karimireddy et al., 2020a) utilize small batches, which derives a biased estimation and misleads the training.
This work explores the effectiveness of large-batch estimation for the global orientation under partial client participation.
F ED AMD
In this section, we comprehensively describe the technical details of FedAMD, a federated learning framework with anchor sampling.
In specific, it disjoints the active participants into the anchor group and the miner group with time-varying probabilities.
The pseudo-code is illustrated in Algorithm 1.
Problem Formulation.
In an FL system with a total of M clients, the objective function is formalized as
[Equation]
where we define [ M ] for a set of M clients.
F m ( · ) indicates the local expected loss function for client m , which is unbiased estimated by empirical loss f m ( · ) using a random realization B m from the local training data D m , i.e., E B m ∼D m f m ( x , B m )
=
F m ( x ) .
We denote n by the size of a client’s local dataset, i.e., |D m | = n for all m ∈
[ M ] , and n can be infinite large in the streaming/online cases.
F ∗ represents the minimum loss for Equation (1).
Algorithm Description.
In FedAMD, a global model is initialized with arbitrary parameters ˜ x 0 ∈ R d .
By distributing the model to all clients (Line 1), clients m ∈ [ M ] are required to generate a b -sample batch B m, 0 and compute the gradient v ( m )(Line 3).
Then, clients send v ( m )to the server (Line 4), and server caches these gradients and span them as a matrix v
= (cid:110) v ( m )(cid:111) m ∈
[ M ] (Line 6).
After the initialization steps above, the algorithm comes to the model training (Line 7–27).
At the beginning of each round t , the server randomly picks an A -client subset A from M clients (Line 8).
Since each client is independently selected without replacement, under the setting of Equation (1), clients have an equal chance to be selected with the probability of A M .
Subsequently, the server
Input
2: for m do 3: v
= ∇
B m B m
∼ D m b 4:
Communicate v m )
5: end for 6: Initialize caching gradient v 0 = (cid:110) v ( m )(cid:111) m ∈
[ M ] 7: for t = 0 , 1 , 2 , . . .
do 8:
Sample clients
A
M ] 9:
Communicate the model ˜ x t and the caching gradient ˜ g t = avg ( v t ) with clients i ∈
A 10:
Initialize subsequent caching gradient v t +1 = v t 11: for
i ∈ A in parallel do 12: if Bernoulli ( p t ) =
= 1 then 13: v ( i ) t +1 = ∇
f
i (˜ x t , B i,t ) using B i,t ∼ D i with the size of b 14:
Communicate v ( i ) t +1 with the server and indicate the update of caching gradient 15: else 16:
Initialize x ( i ) t, − 1 =
x ( i ) t, 0 =
˜ x t , g ( i ) t, 0 = ˜
g t 17: for k = 0 , . . .
, K − 1 do 18:
Generate random realization B
′ i,k ∼ D i with the size of b ′ 19:
[Equation]
20: x ( i ) t,k +
= x ( i ) t,k − η l · g ( i ) t,k + 21: end for 22: ∆ x ( i ) t =
˜ x t − x ( i ) t,K 23:
Communicate ∆ x ( i ) t with the server and indicate the update of the model 24: end if 25: end for 26: ˜ x t +1 =
˜ x
t − η s · avg (∆ x t ) where ∆ x t aggregates ∆ x ( i ) t where client i updates model 27: end for distributes the global model ˜ x t to the clients in the set A , accompanying the global bullseye (i.e., the averaged caching gradient) ˜
g t = 1 M (cid:80) m ∈
[ M ] v ( m )(Line 9).
With the probability of p t , client i ∈ A is classified for the anchor group (Line 13–14) or the miner group (Line 16–23), and different groups have different objectives and focus on different tasks.
Anchor group (Line 13–14).
Clients in this group target to discover the bullseyes based on their local data distribution.
According to Line 12, client i ∈ A has the probability of p t to become a member of this group.
Then, the client utilizes a large batch
B i,t with b samples to obtain the gradient v ( i ) t +1 (Line 13).
Therefore, following the gradient v ( i ) t +1 can find an optimal or near-optimal solution for client i .
Next, the client pushes the gradient to the server and updates the caching gradient (Line 14).
In view that some clients do not participate in the anchor group for obtaining the bullseyes at round t , the server spontaneously inherits their previous calculation from v t (Line 10).
As a result, ˜ g t in Line 9 indicates an approximate orientation towards global optimal parameters, which directs the local update in the miner group and affects the final global update.
Besides, v ( i ) t +1 influences the training from round t + 1 up to the next time when client i is a member of anchor group.
Miner group (Line 16–23).
Guided by the global bullseye, clients in the miner group perform multiple local updates and finally drive the update of the global model.
First, client i initializes the model with ˜ x t and the target direction with
˜ g t
(Line 16).
Ideally, in the subsequent K updates (Line 17), client i update the model with the gradient ∇ F ( x ( i ) t,k ) for k ∈ { 0 , . . .
, K − 1 } .
This is impractical because clients cannot access all others’ training sets to compute the noise-free gradients.
Instead, the client at k -th iteration generates a b ′ -sample realization B
′ i,k
(Line 18) and calculates the update g ( i ) t,k +1 via a variance-reduced technique, i.e., g ( i ) t,k
+
=
g ( i ) t,k −∇ f i (cid:16) x
( i ) t,k − 1 , B
′ i,k (cid:17) + ∇ f i (cid:16) x ( i ) t,k , B ′ i,k (cid:17)
(Line 19).
The update g ( i ) t,k +1 is approximate to ∇ F ( x ( i ) t,k ) for two reasons: (i) the first term is used to estimate the global update because g ( i ) t, 0 stores the global bullseye; and (ii) the rest terms remove the perturbation of data heterogeneity and reflect the true update at x ( i ) t,k .
Therefore, the local model update follows x ( i ) t,k +
= x ( i ) t,k − η l · g ( i ) t,k +
(Line 20).
After K local updates, the model changes on client i is ∆ x ( i ) t =
˜ x t − x ( i ) t,K .
Then, the client transmits ∆ x ( i ) t to the server for the purpose of global model update.
The proposed approach possesses threefold advantages when compared to SCAFFOLD (Karimireddy et al., 2020b) and FedLin (Mitra et al., 2021) using a consistent correction term,
i.e., ˜ g
t − v ( i ) t .
Firstly, it is a memory-efficient approach that is unnecessary to maintain the obsolete gradient.
Secondly, it dynamically calibrates the local updates subject to the local model.
Although BVR-L-SGD (Murata & Suzuki, 2021) also achieves such a functionality, it requires all clients to jointly obtain the global direction at the beginning of each round, leading to considerable training time.
As for FedAMD, here comes the third advantage that avoids the precalculation on a global bullseye under partial-client scenarios.
To the best of our knowledge, this is the first work to achieve dynamic calibration under partial-client scenarios.
Server (Line 14 and Line 26).
Therefore, after the separate local training on the participants, the server merges the model changes from the miner group into ∆ x t (Line 26) and updates the caching gradients from the anchor group (Line 14).
It is noted that the size of ∆ x t (a.k.a.
| ∆ x t | ) can be within the range between 0 and A .
When the size is 0, ˜ x t +1 =
˜ x t , or otherwise, ˜ x t +1 =
˜ x
t − η s (cid:80) ∆ x t / | ∆ x t | (Line 26).
The reason why we solely use the changes from the miner group is that clients perform multiple local updates regulated by the global target such that the model changes walk towards the global optimal solution.
While directly incorporating the new gradients from the anchor group, the global model has a degraded performance because they perform a single update that aims to find out the local bullseye deviated from the global target.
Implicitly, clients in the miner group take in the update of caching gradients at iteration k = 0 to update the local model, which will affect the next global parameters.
Previous Algorithms as Special Cases.
The probabilities can vary among the rounds that disjoint the participants into the anchor group and the miner group.
By setting A = M , and the probability { p t } following the sequence of { 1 , 0 , 1 , 0 , . . . } , FedAMD reduces to distributed minibatch SGD ( K = 1) or BVR-L-SGD ( K > 1) .
Therefore, FedAMD subsumes the existing algorithms and takes partial client participation into consideration.
To obtain the best performance, we should tune the settings of { p t } and K .
However, accounting for the generality of FedAMD, it faces substantial additional hurdles in its convergence analysis, which is one of our main contributions, as detailed in the following section.
Discussion on Communication Overhead.
As the anchors are not necessary to obtain the averaged caching gradient (i.e., ˜ g t ) at t -th round, the centralized server solely distributes ˜ g t to the miners.
Compared to FedAvg, the proposed algorithm requires (1 − p t ) / 2 more communication costs, but it achieves convergence with at least O ( 1 ϵ ) less communication rounds (see Table 1).
Therefore, from the perspective of model training progress, FedAMD is more communication efficient than FedAvg.
Discussion on Massive-Client Settings.
A typical example of this scenario is cross-device FL (Kairouz et al., 2019).
In this setting, it is not a wise option for the server to preserve all the caching gradients for clients.
Therefore, the clients retain their caching gradients while the server keeps their average.
Firstly, at t -th round, client i ∈
[ M ] copies their caching gradient to ( t + 1) -th round, i.e., v ( i ) t +
= v ( i ) t .
For the client i in the anchor group, they will follow Line 13 in Algorithm 1 to update v ( i ) t +1 and push ∧ ( i ) t = v ( i ) t +1 − v ( i ) t to the server.
After the server receives the updates of all local caching gradients, it performs v t +
= v t + 1 M (cid:80)
∧ t , where ∧ t aggregates ∧ ( i ) t where client i is in anchor group.
T HEORETICAL A NALYSIS
In this section, we analyze the convergence rate of FedAMD under non-convex objectives with respect to ϵ -approximation, i.e., min t ∈ [ T ] ∥∇ F (˜ x t ) ∥ 22 ≤ ϵ .
Specifically, when it comes to PL condition, ϵ -approximation refers to F ( ˜ x T ) − F ( x ∗ ) ≤ ϵ .
In the following discussion, we particularly highlight the setting of { p t } to obtain the best performance.
Before showing the convergence result, we make the following assumptions, where the first two assumptions have been widely used in machine learning studies (Karimireddy et al., 2020b; Li et al., 2020), while the last one has been adopted in some recent works (Gorbunov et al., 2021a; Tyurin & Richtárik, 2022; Murata & Suzuki, 2021).
Assumption 1 (L-smooth) .
The local objective functions are Lipschitz smooth: For all v, ¯ v ∈ R d ,
[Equation]
Assumption 2 (Bounded Noise) .
For all v ∈ R d , there exists a scalar σ ≥ 0 such that
[Equation]
Assumption 3 (Average L-smooth) .
For all v, ¯ v ∈ R d , there exists a scalar L σ ≥ 0 such that
[Equation]
Remark.
Assumption 3 definitely provides a tighter bound for the patterns of variance reduction.
In fact, solely with Assumption 2, the term E B∼D i ∥ ( ∇ f i ( v, B ) − ∇ f i
[Equation]
¯ v
[Equation]
)) − ( ∇ F i ( v ) − ∇ F i (¯ v ))
∥can be bounded by a constant.
Therefore, we can easily obtain the coefficient for ∥ v − ¯ v ∥ 22 , which could be with the same structure as the constant in RHS of Assumption 2.
Furthermore, if the loss function is Lipschitz smooth, e.g., cross-entropy loss (Tewari & Chaudhuri, 2015), we can derive a similar structure as presented in Assumption 3.
4. S EQUENTIAL P ROBABILITY S ETTINGS
As mentioned in Section 3, a recursive pattern appeared in the probability sequence { p t ∈ { 0 , 1 }} t ≥can reduce FedAMD to the existing works.
We assume that the caching gradient updates every τ ( ≥ 2) rounds, such that
[Equation]
We derive the following results under sequential probability settings.
The corresponding proof is provided in Appendix D.
Theorem 1.
Suppose that Assumption 1, 2 and 3 hold.
Let the local updates K ≥ 1 , the minibatch size
b = min (cid:16) σ 2 Mϵ , n (cid:17) and b ′ < b .
Additionally, the settings for the local learning rate η l and the global learning rate
η s satisfy the following two constraints: (1) η s η l = 1 KL (cid:0) 1 + 2 MτA (cid:1) − 1 ; and (2)
η l ≤ min
[Equation]
Then, to find an ϵ -approximation of non-convex objectives, i.e., min t ∈ [ T ] ∥∇ F (˜ x t ) ∥ 2 2 ≤ ϵ , the number of communication rounds T performed by FedAMD is
[Equation]
where we treat ∇ F (˜ x 0 ) − F ∗ and L as constants.
Discussion on the selection of τ .
According to Theorem 1, we notice that τ = 2 achieves min t ∈
[ T ] ∥∇ F (˜ x t ) ∥
22 ≤ ϵ with the fewest communication rounds.
The following corollary discloses the relation between computation overhead and the value of τ .
Corollary 1.
Under the setting of Theorem 1, FedAMD computes O (cid:16) Mbϵ + τMKb ′ ϵ (cid:17) gradients and consumes a communication overhead of O (cid:0)
Mτ Aϵ (cid:1) during the model training.
Remark.
FedAMD requires an increasing computation and communication cost as τ gets larger.
Therefore, τ = 2 possesses the most outstanding performance in the sequential probability settings.
In this case, FedAMD requires the communication rounds of O (cid:0) MAϵ (cid:1) , the communication overhead of O (cid:0) MAϵ (cid:1) , and the computation cost of O (cid:16) σ 2 ϵ 2 + MKϵ (cid:17) while optimizing an online scenario where the size of local dataset is infinity large.
Comparison with BVR-L-SGD.
As discussed in Section 3, FedAMD reduces to BVR-L-SGD (Murata & Suzuki, 2021) when τ = 2 and all clients participate in the training.
In this case, Theorem 1 shows a total of T
= O (1 /ϵ ) communication rounds is needed.
This result coincides with the complexity of BVR-L-SGD in Table 1 by the setting that (1) nM ≤ 1 ϵ , and (2) K ≥ (cid:112) n/M .
In other words, we theoretically prove that BVR-L-SGD still achieves min t ∈
[ T ] ∥∇ F (˜ x t ) ∥
22 ≤ ϵ with
T =
O (1 /ϵ ) in a looser constraint.
As for computation overhead, our proposed method requires
O (cid:16) σ 2 ϵ 2 + MKϵ (cid:17) , which is less than BVR-L-SGD (i.e., O (cid:16) σ 2 ϵ 2 + σ 2 + MKϵ + MK (cid:17) ).
4. C ONSTANT P ROBABILITY S ETTINGS
Apparently, when we set the constant probability as 1, all participants are in the anchor group such that the model cannot be updated.
Likewise, when the constant probability is 0, all participants are in the miner group such that the global target cannot be updated, leading to degraded performance.
Therefore, we manually define a constant p ∈ (0 , 1) such that { p t = p } t ≥ 0 .
In this section, we derive the following results with partial client participation.
Detailed proof is provided in Appendix
E. Specifically, Appendix E.2 and Appendix E.3 proves the convergence rate for Theorem 2 and
Theorem 3, respectively.
Theorem 2.
Suppose that Assumption 1, 2 and 3 hold.
Let the local updates K ≥ max (cid:16) 1 , 2 L 2 σ b ′
L 2 (cid:17) , the minibatch size b = min (cid:16) σ 2 Mϵ , n (cid:17) and b ′ < b , the local learning rate η l = 1 2 √ 6 KL , and the global learning rate η s = 2 √1+ 2 MAp √ 1 − p A .
Then, to find an ϵ -approximation of non-convex objectives, i.e., min t ∈ [ T ] ∥∇ F (˜ x t ) ∥ 22 ≤ ϵ , the number of communication rounds T performed by FedAMD is
[Equation]
where we treat ∇ F (˜ x 0 ) − F ∗ and L as constants.
With the constant probability p approaching 0 or 1 , Theorem 2 shows that FedAMD requires a significant number of communication rounds.
Hence, there is an optimal p such that FedAMD achieves convergence with the fewest communication rounds.
In view that M ≥ A , the number of communication rounds is dominated by O
[Equation]
Based on this observation, the following corollary provides the settings for the constant probability p that leads to the optimal convergence result.
Based on the value of p , we further refine the settings for other parameters.
The following corollary takes b ′
= 1 into consideration, i.e., the small batch size is 1.
Corollary 2.
Suppose that Assumption 1, 2 and 3 hold.
Let the constant probability p = 1 c (cid:16) 2 A +2 (cid:17) 1 /A , where c is a constant greater than or equal to 1, the local updates K ≥ max (cid:16) 1 , 2 L 2 σ L 2 (cid:17) , the minibatch size b = min (cid:16) σ 2 Mϵ , n (cid:17) and b ′ = 1 , the local learning rate η l = 1 2 √ 6 KL , and the global learning rate η s = 2 √
A A +3 Mc .
Then, after the communication rounds of T = O (cid:0) MAϵ (cid:1) , we have min t ∈
[ T ] ∥∇ F (˜ x t ) ∥
22 ≤ ϵ .
Therefore, the number of total samples called by all clients (i.e., cumulative gradient complexity) is O (cid:16) σ 2 ϵ 2 + MKϵ (cid:17) when it optimizes an online scenario.
Discussion on the effectiveness of c .
When c = 1 , we can obtain the minimum value for the term (cid:16) p (cid:112)
1 − p A (cid:17) − 1 with the constant p devised in Corollary 2.
As the number of participants (i.e., A ) gets larger, the optimal p increases as well and tends to be 1, indicating that most participants are in the anchor group.
When we optimize an online scenario, the anchors compute a gradient with massive samples.
As a result, the computation overhead of a single round is not acceptable.
By deducting the anchor sampling probability to its 1 /c , FedAMD consumes up to ( c − 1) /c
less computation overhead, while its convergence performance remains.
Comparison with FedAvg.
As a classical algorithm, FedAvg (Yang et al., 2020) requires
O (cid:0) K
Aϵ 2 + 1 ϵ (cid:1) communication rounds to achieve min t ∈
[ T ] ∥∇ F ( ˜ x t ) ∥
22 ≤ ϵ with the total computation consumption of O (cid:16) K 2 ϵ 2 + AKϵ (cid:17) .
Apparently, FedAMD needs O ( 1 ϵ ) fewer communication rounds.
As mentioned in Section 3, FedAMD consumes (1 − p ) / 2 more communication overhead than
FedAvg.
As ϵ is close to 0, the total communication overhead for FedAMD is far less than the cost of
FedAvg.
As for computation overhead, (Yang et al., 2020) implicitly assumes that K ≥ σ 2 , FedAMD is more communication friendly than FedAvg.
In addition to the generalized non-convex objectives, we investigate the convergence rate of the PL condition, a special case under non-convex objectives.
The following assumption describes this case:
Assumption 4 (PL Condition (Karimi et al., 2016)) .
The objective function F satisfies the PL condition when there exists a scalar µ > 0 such that
[Equation]
Under PL condition, the rest of the section draws the convergence performance of FedAMD with partial client participation.
Theorem 3.
Suppose that Assumption 1, 2, 3 and 4 hold.
Let the local updates K ≥ max (cid:16) 1 , 2 L 2 σ b ′
L 2 (cid:17) , the minibatch size b = min (cid:16) σ 2 Mµϵ , n (cid:17) and b ′ < b , the local learning rate η l = 1 2 √ 6 KL , and the global learning rate η s = min (cid:18) 2 √ 6 LAp
Mµ (1 − p A ) , 2 √1+ 16 MLµAp (cid:19) .
Then, to find an ϵ -approximation of PL condition, i.e., F (˜ x T ) − F ( x ∗ ) ≤ ϵ , the number of communication rounds T performed by FedAMD is
T
[Equation]
O (cid:18)
[Equation]
where we treat ∇ F (˜ x 0 ) − F ∗ and L as constants.
Similar to Theorem 2, the number of communication rounds of FedAMD is mainly occupied by
O (cid:16)
M µ 2 Ap (1 − p A ) + MAp (cid:17) .
According to such an approximation, we provide a mathematical expression for the setting of p in Corollary 3.
Subsequently, we adjust the value of the hyper-parameters such that we can obtain the best result for Theorem 3.
Corollary 3.
Suppose that Assumption 1, 2, 3 and 4 hold.
Let the constant probability p = 1 c (cid:32)(cid:16)
[Equation]
, where c is a constant greater than or equal to 1, the local updates K ≥ max (cid:16) 1 , 2 L 2 σ L 2 (cid:17) , the minibatch size b = min (cid:16) σ 2 Mµϵ , n (cid:17) and b ′ = 1 , the local learning rate η l = 1 2 √ 6 KL , and the global learning rate η s = min (cid:18) √ 6 ALMµc , 2 √ 6 (cid:16) 1 +
[Equation]
(cid:17) − 1 (cid:19) .
Then, after the communication rounds of T = O (cid:16)(cid:16) 1 µ + Mµ 2 A + MA (cid:17) log 1 ϵ (cid:17) , we have F (˜ x T ) − F ( x ∗ ) ≤ ϵ .
Therefore, the number of total samples called by all clients (i.e., cumulative gradient complexity) is
O (cid:16)(cid:16)
Aµ + Mµ 2 + M (cid:17) (cid:16) σ 2 Mµϵ + K (cid:17) log 1 ϵ (cid:17) when it optimizes an online scenario.
Remark.
When c = 1 , the probability p for anchor sampling approaches 100% as the number of participants is increasing.
Likewise, it is necessary to use c ≥ 1 to reduce the computation consumption of each round.
Besides, FedAMD achieves a linear convergence under PL conditions.
In view that strongly-convex objectives possess a looser setting than PL conditions, FedAMD can also achieve linear convergence under strongly-convex objectives.
E XPERIMENTS
This section presents the experiments of our proposed approach and other existing baselines that are most relative to this work.
We also investigate the effectiveness of probability { p t } t ≥ 0 .
Account for the limited space, numerical analysis on other factors like the number of local updates are presented in the supplementary materials.
[Figure]
[Figure] [Figure] [Figure] [Figure]
[Figure] [Figure] [Figure] [Figure]
[Figure]
[Figure]
[Figure] [Figure] [Figure] 77.0 FedPAGE 148.6 1670.
77.1 SCAFFOLD 47.
[Figure]
[Figure] [Figure] [Figure] [Figure]
[Figure] [Figure] [Figure]
[Table]
Experimental setup.
We train a convolutional neural network LeNet-5 (LeCun et al.,
) (non-convex) using Fashion MNIST (Xiao et al., 2017) which consists of 10 classes that equally disjoint the training set of 60K samples and the test set of 10K samples.
We conduct the experiments with a total of 100 clients.
To simulate the non-i.i.d.
features, each client holds the data fromclasses with a total of 600 samples, and each label is held by 20 clients.
Let the number of local updates K be 10, the mini-batch size b ′ be 64 and b be 600.
For different experiments, unless some hyper-parameters have been defined, we leverage the best setting (e.g., learning rate) to obtain the best results.
All the numerical results in this section represent the average performance of three experiments using different random seeds.
More empirical results are put in Appendix F.
Effectiveness of probability { p t } t ≥ 0 .
Figure 1 demonstrates the performance of various probability settings under the scenarios of different participants.
In Figure 1a with 20 clients, both sequential probability setting and constant probability setting achieve the best performance.
In Figure 1b and 1c, where 40 and 100 clients are selected in each round, constant probability setting outperforms sequential probability setting.
In all three scenarios, with sequential probability settings, the pattern of { 0 , 0 , 1 } has a much worse performance than the pattern of { 0 , 1 } .
This empirically validates
Theorem 1 for the best setting τ = 2 in terms of communication complexity.
Similarly, with constant probability settings, the best performance is achieved when p approximates or equals optimal, which validates the statement in Corollary 2.
Comparison with the state-of-the-art works.
Table 2 compares FedAMD with the existing works under partial/full client participation.
At first glance, FedAMD outperforms other baselines because the texts in bold are all appeared in FedAMD.
With 20-client participation, our proposed method surpasses four baselines all aroundness.
As for 40-client participation, FedAMD with constant probability saves at least 30% computation and communication cost, and the final accuracy realizes up to 6% improvement.
In terms of the training with full client participation, FedAMD requires 10%–20% fewer communication rounds, and its final accuracy has significant improvement, i.e., within the range of 0.7%–8.3%.
Also, it is well noted that BVR-L-SGD has a similar performance as FedAMD using sequential probability in terms of communication rounds and test accuracy, but the former needs more computation and communication overhead.
This is because BVR-L-SGD computes the bullseye using multiple b ′ -size batches rather than a large batch.
C ONCLUSION
In this work, we investigate a federated learning framework FedAMD that disjoints the partial participants into anchor and miner groups.
We provide the convergence analysis of our proposed algorithm for constant and sequential probability settings.
Under the partial-client scenario, FedAMD achieves sublinear speedup under non-convex objectives and linear speedup under the PL condition.
To the best of our knowledge, this is the first work to analyze the effectiveness of large batches under partial client participation.
Experimental results demonstrate that FedAMD is superior to state-of-the-art works.
It is interesting to explore anchor sampling in the other scenarios of FL, e.g., arbitrary device unavailability.
A R ELATED W ORK
Mini-batch SGD vs. Local SGD
Distributed optimization is required to train large-scale deep learning systems.
Local SGD (also known as FedAvg) (Stich, 2018; Dieuleveut & Patel, 2019;
Haddadpour et al., 2019; Haddadpour & Mahdavi, 2019) performs multiple (i.e., K ≥ 1 ) local updates with K small batches, while mini-batch SGD computes the gradients averaged by K small batches (Woodworth et al., 2020b;a) (or a large batches (Shallue et al., 2019;
You et al., 2018; Goyal et al., 2017)) on a given model.
There has been a long discussion on which one is better (Lin et al., 2019; Woodworth et al., 2020a;b; Yun et al., 2021), but no existing work considers how to disjoint the nodes such that both can be trained at the same time.
Federated Learning.
FL was proposed to ensure data privacy and security (Kairouz et al., 2019), and now it has become a hot field in the distributed system (Yuan & Ma, 2020; Shamsian et al., 2021;
Zhang et al., 2021; Avdiukhin & Kasiviswanathan, 2021; Yuan et al., 2021;
Diao et al., 2020; Blum et al., 2021).
The FL training methods in the past few years usually require all trainers to participate in each training session (Kairouz et al., 2019), but this is obviously impractical when facing the increase in FL clients.
To enhance the systems’ feasibility, this work assumes that a fixed number of clients are sampled at each round, which is widely adopted in (Li et al., 2019b; Philippenko & Dieuleveut, 2020; Gorbunov et al., 2021a; Karimireddy et al., 2020b; Yang et al., 2020; Li et al., 2020; Eichner et al., 2019; Ruan et al., 2021).
Therefore, the server collects the data from this participation every synchronization to update the model parameters (Li et al., 2019b; Philippenko & Dieuleveut, 2020;
Gorbunov et al., 2021a; Karimireddy et al., 2020b;
Yang et al., 2020; Li et al., 2020; Eichner et al., 2019; Yan et al., 2020; Ruan et al., 2021; Lai et al., 2021; Gu et al., 2021).
Variance Reduction in Finite-sum Problems.
Variance reduction techniques (Johnson & Zhang, 2013; Defazio et al., 2014; Nguyen et al., 2017; Li et al., 2021a; Lan & Zhou, 2018a;b; Allen-Zhu & Hazan, 2016; Reddi et al., 2016;
Lei et al., 2017; Zhou et al., 2018; Horváth & Richtárik, 2019;
Horváth et al., 2020; Fang et al., 2018; Wang et al., 2018; Li, 2019; Roux et al., 2012; Lian et al., 2017; Zhang et al., 2016) was once proposed for traditional centralized machine learning to optimize finite-sum problems (Bietti & Mairal, 2017; Bottou & Cun, 2003; Robbins & Monro, 1951) by mitigating the estimation gap between small-batch (Bottou, 2012;
Ghadimi et al., 2016; Khaled &
Richtárik, 2020) and large-batch (Nesterov, 2003; Ruder, 2016; Mason et al., 1999).
SGD randomly samples a small-batch and computes the gradient in order to approach the optimal solution.
Since the data are generally noisy, an insufficiently large batch results in convergence rate degradation.
By utilizing all data in every update, GD can remove the noise affecting the training process.
However, it is time-consuming because the period for a single GD step can implement multiple SGD updates.
Based on the trade-off, variance-reduced methods periodically perform GD steps while correcting
SGD updates with reference to the most recent GD steps.
Variance Reduction in FL.
The variance-reduced techniques have critically driven the advent of FL algorithms (Karimireddy et al., 2020b; Wu et al., 2021;
Liang et al., 2019; Karimireddy et al., 2020a;
Murata & Suzuki, 2021; Mitra et al., 2021) by correcting each local computed gradient with respect to the estimated global orientation.
However, a concern is addressed on how to attain an accurate global orientation to mitigate the update drift from the global model.
Roughly, the estimation lies in two types, namely, precalculated and cached.
The former methods (Murata & Suzuki, 2021; Mitra et al., 2021) required precalculation typically require full worker participation, which is infeasible for federated learning settings.
As for the global orientation estimated by cached information, existing approaches (Karimireddy et al., 2020b; Wu et al., 2021; Liang et al., 2019; Karimireddy et al., 2020a) utilize small batches, which derives a biased estimation and misleads the training.
This work explores the effectiveness of large-batch estimation for the global orientation under partial client participation.
B U SEFUL L EMMAS
Prior to giving detailed proofs of the theorems, we cover some technical lemmas in this section, and all of them are valid in general cases.
Lemma 1.
Let ε = { ε 1 , . .
. , ε a } be the set of random variables in R a × d .
Every element in ε is independent with others.
For i ∈ { 1 , . . .
, a } , the value for ε i follows the setting below:
[Equation]
where q is a constant real number between 0 and 1, i.e., q ∈ [0 , 1] .
Let | · | indicate the length of a set, ε \ { 0 } represent a set in which an element is in ε but not 0 .
Then, there is a probability of (1 − q ) a for |
ε \ { 0 }| = 0 , let avg ( ε ) be the averaged result with the exception of zero vectors, i.e.,
[Equation]
Then, the following formulas hold for E ( avg ( ε )) and its second norm E ∥ avg ( ε ) ∥ 22 :
[Equation]
Proof.
When q = 0 , the formulas in Equation 4 obviously hold because E ( avg ( ε ))
=
and
E ∥ avg ( ε ) ∥
22 = 0 .
As for q = 1 , since avg ( ε ) = 1 a (cid:80) ai =1 e i , we leverage Cauchy–Schwarz inequality and get E ∥ avg ( ε ) ∥
= (cid:13)(cid:13)
[Equation]
=
[Equation]
∥ e i ∥ 22 , which is consistent with the formulas in
Equation 4.
In addition to the preceding cases, we consider some general cases for the probability q within 0 and 1, i.e., q ∈ (0 , 1) .
Firstly, we show the proof details for E ( avg ( ε )) .
For all i in { 1 , . . .
, a } , given that ε i is not a zero vector, the coefficient of e i is based on the binomial distribution on how many non-zero elements in the set { ε 1 , . .
, ε i − 1 } ∪ { ε i +1 , . . .
, ε a } .
Therefore, with the probability q that ε i is equal to e i , the coefficient of e i in the expected form is
[Equation]

Then, the coefficient of 1 a e i can be expressed and simplified for
[Equation]
where Equation (7) follows
[Equation]
and Equation (8) follows
[Equation]
Thus, the equation E ( avg ( ε ))
= (1 − (1 − q ) a ) · 1 a (cid:80) ai =1 e i holds.
Secondly, we provide the analysis for E ∥ avg ( ε ) ∥ 22 .
Based on the definition for avg ( ε ) in Equation (3), we discuss the case | ε \ { 0 }| ̸ = 0 .
By means of Cauchy-Schwarz inequality, we can obtain the following inequality:
[Equation] [Equation]
ε
[Equation]
(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)  ≤
[Equation]
[Equation] [Equation]
| (cid:88) i,ε i ̸ =
∥
ε i
[Equation]
[Equation] [Equation]
|
[Equation]
i
[Equation] [Equation]
[Equation]
Therefore,
[Equation]
Apparently, Equation (10) is very similar to Equation (3) in terms of the expression.
As a result, we can adopt the same proof framework in the analysis of E ( avg ( ε )) .
Then, we can directly draw a conclusion E
[Equation]
Lemma 2.
Let ε = { ε 1 , . .
. , ε a } be the set of random variables in R d with the number of a .
These random variables are not necessarily independent.
We can suppose that E [ ε i ] =
e i , and the variance is bounded as E (cid:104)
∥
ε i − e i ∥ 22 (cid:105) ≤ σ 2 .
After that we can get
E
[Equation]
If we make another suppose that the conditional mean of these random variables is E [ ε i | ε i − 1 , . .
ε 1 ]
=
e i , and the variables { ε i − e i } form a martingale difference sequence, and the bound of the variance is E (cid:104) ∥
ε i − e i ∥ 22 (cid:105) ≤ σ 2 .
So we can make a much tighter bound
[Equation]
Proof.
For any random variable X , E (cid:2) X 2 (cid:3) =
( E [ X − E
[ X ]])
+ ( E [ X ]) 2 implying
E
[Equation]
(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
=
[Equation]
Expanding above expression using relaxed triangle inequality:
[Equation]
For the second statement, e i depends on [ ε i − 1 , . .
ε 1 ] .
Thus we choose to use a relaxed triangle inequality
E  
[Equation]
a (cid:88)
[Equation]
a (cid:88)
[Equation]
then we use a much tighter expansion and we can get:
[Equation]
When { ε i − e i } form a martingale difference sequence, the cross terms will have zero means
[Equation]
Lemma 3.
Suppose there is a sequence { y t ∈ R d } t ≥ 0 satisfying a recursive function y t
+1 =
y t − η ∆ y t , where η > 0 is a constant and ∆ y t ∈ R d is a vector.
Given a L -smooth function G , the following inequality holds for any η and ∆ y t :
[Equation]
where η ′ > 0 can be any constant.
Proof.
Since G is a L-smooth function, for any v, ¯ v ∈ R d
[Equation]
the following inequality holds:
[Equation]
Based on the conclusion on L-smooth drawn from Equation (22)
[Equation]
we derive Equation (17) step by step:
[Equation]
where Equation (26) is in accordance with ⟨ α, β ⟩ = 12 (cid:16) α 2 + β 2 − ( α − β ) 2 (cid:17) , and Equation (27) follows ∥ ∆ y t ∥ 22 = 1 η 2 ∥
y t
+1 − y t ∥ 22 .
C P RELIMINARY FOR F ED AMD
Algorithm 1 describes FedAMD in details.
The objective in this part is to find the recursive function for the sequence of models,
i
[Equation]
e., { ˜ x t } t ≥ 0 .
As mentioned in Line 26 in Algorithm 1, let ∆ x t aggregate ∆ x ( i ) t where client i updates model, then the difference between ˜ x t +1 and ˜ x t follows the recursive function written as
[Equation]
where avg () is same as defined in Lemma 1.
As we know, the length of ∆ x t changes over rounds but does not exceed the number of participants,
i
[Equation]
e., | ∆ x t | ≤ A .
Then, suppose that ∆ x ( m ) t is in ∆ x t , ∆ x ( m ) t can be expressed as
[Equation]
where the last equal sign is according to Line 20 in Algorithm 1.
Next, with the recursive formula in
Line 19, we have
[Equation] [Equation]
Then, Equation (29) can be rewritten as ∆
[Equation]
m
[Equation]
D P ROOFS UNDER S EQUENTIAL P ROBABILISTIC S ETTINGS D. P RELIMINARY
Lemma 4.
Suppose that Assumption 1, 2 and 3 hold.
Let the local learning rate satisfy η l ≤ min
[Equation]
With FedAMD, (cid:80) K − 1 k =
[Equation]
(cid:13)(cid:13)(cid:13) x
[Equation]
m ) t
[Equation]
k − x
[Equation]
m ) t
[Equation]
k
[Equation]
1 (cid:13)(cid:13)(cid:13) 2 2 represents the sum of the second norm of every iteration’s difference.
Therefore, the bound for such a summation in the expected form should be
[Equation]
Proof.
According to Equation (31), the update at ( k − 1) -th iteration is x ( m ) t,k − x ( m ) t,k − 1 = − η l g ( m ) t,k = − η l
[Equation]
˜
[Equation] [Equation]
To find the bound for the expected value of its second norm, the analysis is presented as follows:
[Equation]
[Table]
[Equation]
where Equation (37) is based on Cauchy-Schwarz inequality; Equation (38) is based on the variance expansion on the third term of Equation (37); Equation (39) is based on Cauchy-Schwarz inequality and Assumption 1 on the third term of Equation (38); Equation (40) is based on Lemma 2 and
Assumption 3 on the fourth term of Equation (39).
Therefore
[Equation]
by summing Equation (40) for k = 1 , . . .
, K
[Equation]
we have
[Equation]
Obviously, according to the setting of the local learning rate in the description above, the inequality 3 η
[Equation] [Equation]
≤ 12 holds.
Therefore, we can easily obtain the bound for the sum of the second norm of every iteration’s difference, which is consistent with Equation (33).
D. F ULL C LIENT P ARTICIPATION
Theorem 4.
Suppose that Assumption 1, 2 and 3 hold, and all clients participate in the training, i.e., A = M .
Let the local updates K ≥ 1 , and the local learning rate η l and the global learning rate
η s be η s η l = 1 KL (1+2 τ ) , where η l ≤ min (cid:18) 1 2 √ 6 KL , √ b ′ /K
4 √ 3 L σ (cid:19) .
Therefore, the convergence rate of FedAMD for non-convex objectives should be
[Equation]
where we treat F (˜ x 0 ) − F ∗ and L as constants.
Proof.
When p t = 1 , according to Algorithm 1, there is no model update between two consecutive rounds, i.e., ˜ x t +1 =
˜ x t .
Next, we consider the case when p t = 0 .
Based on Lemma 3, we have
[Equation] [Equation]
Knowing that when p t = 0 and all clients involve in the training
[Equation]
we have the bound for E ∥ avg (∆ x t ) − η l K ∇ F (˜ x t ) ∥
according to the following derivation:
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
where Equation (48) follows ( α + β ) 2 ≤ 2 α 2 + 2 β 2 ; Equation (49) is based on variance expansion;
Equation (50) is based on Cauchy-Schwarz inequality and Assumption 1; Equation (51) is based on
Lemma 2 and Assumption 3; Equation (53) is based on Lemma 4.
According to the constraints on the local learning rate, we can further simplify Equation (53) as
[Equation]
Plugging Equation (54) into Equation (44), we have
[Equation]
Let Λ( t ) indicate the most recent round where p Λ( t )
= 1 and Λ( t ) ̸
= t .
It is noted that recursively using Λ( · ) can achieve the value of 0,
i
[Equation]
e., Λ(Λ( ... Λ
[Equation]
( t )))
=
By summing Equation (55) from Λ( t ) to t − 1 , we have
[Equation]
The bound for the last term of Equation (57) is
[Equation]
where Equation (59) is based on the variance expansion; Equation (60) is based on Assumption 1;
Equation (61) is according to Cauchy-Schwarz inequality and θ − Λ( θ ) ≤ τ ; Equation (62) follows
Assumption 2.
Based on the definition of Λ( · ) , for all θ ∈ { Λ( t ) + 1 , . .
, t − 1 } , Λ( θ ) =
Λ( t ) .
Therefore, with Equation (62), Equation (57) can be further simplified as:
[Equation]
[Equation]
Since η s η l = 1 KL (1+2 τ ) , Equation (65) can be further simplified as
[Equation]
Therefore, based on the equation above, by summing up all t ∈ { T + 1 , Λ( T + 1) , . . .
, τ } , we can obtain the following inequality:
[Equation]
Thus, we have
[Equation]
By using the settings of the local learning rate and the global learning rate in the description, we can obtain the desired result.
D. P ARTIAL C LIENT P ARTICIPATION
Theorem 5.
Suppose that Assumption 1, 2 and 3 hold.
Let the local updates K ≥ 1 , and the local learning rate η l and the global learning rate η s be η s η l = 1 KL (cid:0) 1 + 2 MτA (cid:1) − 1 , where η l ≤ min (cid:18)
[Equation]
√
[Equation]
(cid:19) .
Therefore, the convergence rate of FedAMD for non-convex objectives should be
[Equation]
where we treat F (˜ x 0 ) − F ∗ and L as constants.
Proof.
When p t = 1 , according to Algorithm 1, there is no model update between two consecutive rounds, i.e., ˜ x t +1 =
˜ x t .
Next, we consider the case when p t = 0 .
Based on Lemma 3, we have
[Equation]
Knowing that when p t = 0 and a set of clients A involve in the training,
[Equation] [Equation]
we have the bound for E ∥ avg (∆ x t ) − η l K ∇ F (˜ x t ) ∥
according to the following derivation:
[Equation] [Equation]
[Table]
[Equation] [Equation]
where Equation (75) follows ( α + β ) 2 ≤ 2 α 2 + 2 β 2 ; Equation (76) is based on variance expansion;
Equation (77) is based on Cauchy-Schwarz inequality and Assumption 1; Equation (78) is based on
Lemma 2 and Assumption 3; Equation (79) is based on the setting of client selection
[Equation]
where each client is selected with a probability of A/M ; Equation (81) is based on Lemma 4.
According to the constraints on the local learning rate
[Equation]
we can further simplify Equation (81) as
[Equation]
Plugging Equation (82) into Equation (71), we have
[Equation]
[Equation]
where Equation (85) is based on variance expansion
[Equation]
and Equation (86) is based on Assumption
[Equation]
By summing Equation (86) for all t ∈ { 0 , . . .
, T }
[Equation]
we have
[Equation]
Let Λ( t ) indicate the most recent round where p Λ( t )
= 1 and Λ( t ) ̸
= t .
It is noted that recursively using Λ( · ) can achieve the value of 0, i.e., Λ(Λ( ... Λ (cid:124) (cid:123)(cid:122) (cid:125) multiple Λ ( t )))
= 0 .
To find the bound for (cid:80) Tt =0; t mod τ =0 E ∥
E ˜ g t − ∇ F (˜ x t ) ∥ 22 , the first step is to provide the bound for E
∥ E ˜ g
t − ∇ F (˜ x t ) ∥ 22 .
When p t = 1 , a client updates the caching gradient with a probability of A/M , and therefore, E ˜ g t = (cid:0) 1 − AM (cid:1) E ˜ g Λ( t ) + AM ∇ F (˜ x t ) .
Based on this fact, the bound for
E ∥ E ˜ g
t − ∇ F (˜ x t ) ∥ 22 can be derived as follows:
[Equation]
where Equation (91) follows ( α + β ) 2 ≤ (cid:16) 1 + 1 γ (cid:17)
α 2 + (1 + γ ) β 2 − (cid:16) 1 √ γ α + √ γβ (cid:17)
[Equation]
(cid:16) 1 + 1 γ (cid:17)
α 2 + (1 + γ ) β 2 and γ =
M − AA .
With Equation (92)
[Equation]
we sum up all t ∈ { 1 , . . .
, T } and obtain the following result:
[Equation] [Equation]
where Equation (95) follows that, for all θ ∈ { 0 , . .
⌊ T/τ ⌋ − 1 } , the coefficient for MA L 2 includes (cid:0) 1 − AM (cid:1) , . . .
, (cid:0) 1 − AM (cid:1)
⌊ T/τ ⌋− θ , and each of them has a maximum of τ t s, meaning that the upper bound of the coefficient should be
[Equation]
Equation (96) follows Cauchy-Schwarz inequality.
Plugging Equation (97) back to Equation (88), we have:
[Equation]
Since η s η l = 1 KL (cid:0) 1 +
[Equation]
(cid:1) − 1 ,
[Equation]
−
[Equation]
η
[Equation]
η
[Equation]
τ
[Equation]
≥ 0 such that the term
[Equation]
Tt =0; t mod τ =0 E ∥
˜ x t +1 − ˜ x t ∥ 22 can be omitted in Equation (99).
Hence, we can easily obtain the following inequality:
[Equation]
By using the settings of the local learning rate and the global learning rate in the description, we can obtain the desired result.
E P ROOFS UNDER C ONSTANT P ROBABILISTIC S ETTINGS E. P RELIMINARY
Lemma 5.
Suppose that Assumption 1 holds, and p t ∈ (0 , 1) .
Let ˜ g t be the definition of Lineof Algorithm 1, i.e., the average of the caching gradients.
Therefore, the recursive expression for { ˜ g t } t ≥ 0 in the expected form is
[Equation]
Furthermore, when t > 0 we can obtain the following inequality:
[Equation]
As for t = 0 , we have E ∥ E ˜ g t − ∇ F (˜ x t ) ∥ 22 = 0 .
Proof.
According to the definition of Line 9 of Algorithm 1, ˜ g t +1 =
avg ( v t +1 ) =
1 M (cid:80) m ∈
[ M ] v ( m ) t +1 .
Hence, for each element in v t +1 , i.e., v ( m ) t +1 , where m ∈
[ M ] , they have a probability of (cid:0) 1 − AM p t (cid:1) to retain the previous value, or otherwise update as anchor clients using large batches.
Thus, the expected value for E v ( m ) t +1 is:
[Equation]
Therefore
[Equation]
we have
[Equation]
It is worth noting that E ˜ g
= ∇ F (˜ x 0 ) as it is initialized at the beginning of the training, i
[Equation]
e., Line 2 – 4 in Algorithm 1.
Therefore, E ∥ E ˜ g t − ∇ F (˜ x t ) ∥ 22 = 0 .
Next
[Equation]
we find the recursive bound for E ∥
E ˜ g t +1 − ∇ F (˜ x t +1 ) ∥ 22 :
[Equation]
(109) where Equation (108) follows ( α + β ) 2 ≤ (cid:16) 1 + 1 γ (cid:17)
α
+ (1 + γ ) β 2 − (cid:16) 1 √ γ α + √ γβ (cid:17) 2 ≤ (cid:16) 1 + 1 γ (cid:17)
α 2 + (1 + γ ) β 2 , and Equation (109) follows Assumption 1.
Lemma 6.
Suppose that Assumption 1, 2 and 3 hold.
Let the local learning rate satisfy η l ≤ min
[Equation]
With FedAMD, (cid:80) K − 1 k =0 (cid:13)(cid:13)(cid:13) x ( m ) t,k − x ( m ) t,k − 1 (cid:13)(cid:13)(cid:13) 2 2 represents the sum of the second norm of every iteration’s difference.
Therefore, the bound for such a summation in the expected form should be
[Equation]
Proof.
According to Equation (31)
[Equation]
the update at ( k − 1) -th iteration is
[Equation]
To find the bound for the expected value of its second norm
[Equation]
the analysis is presented as follows:
[Equation]
where Equation (114) is based on the variance expansion on the first term of Equation (113); Equation (117) is based on Cauchy-Schwarz inequality.
Therefore, by summing Equation (118) for k = 1 , . . .
, K , we have
[Equation] [Equation]
Obviously, according to the setting of the local learning rate in the description above, the inequality 3 η 2 l K (cid:16) KL 2 +
[Equation]
′ (cid:17) ≤ 12 holds.
Therefore, we can easily obtain the bound for the sum of the second norm of every iteration’s difference, which is consistent with Equation (110).
E. P ROOFS FOR N ON - CONVEX O BJECTIVES
The following lemma provides a recursive expression on E F (˜ x t +1 ) − F (˜ x t ) for time-varying probability settings.
Lemma 7.
Suppose that Assumption 1, 2 and 3 hold, and the time-varying probability sequence { p t ∈ (0 , 1) } t ≥ 0 .
Let the local updates K ≥ 1 , and the local learning rate η l ≤ min
[Equation]
With the model training using FedAMD, the recursive function between F ( ˜ x t +1 ) and F ( ˜ x t ) in expected form is
[Equation]
Proof.
According to Lemma 4, we have:
[Equation]
When | ∆ x t | = 0 , the probability will be (1 − q ) a , and when | ∆ x t | ̸ = 0 , the probability will be 1 − (1 − q ) a .
Next, we find the bound for the third term of Equation (123),
i
[Equation]
e., E ∥ ∆ x t − η l K ∇ F (˜ x t ) ∥ 22 .
By Lemma 1, we have the following derivation:
[Equation]
) where Equation (126) follows variance equation.
To find the bound for Equation (126), we first analyze its first term,
i
[Equation]
e., E (cid:13)(cid:13)(cid:13) ∆ x ( m ) t − E
[Equation]
x ( m )
[Equation]
(cid:13)(cid:13)(cid:13)2 .
According to Section C
[Equation]
we have:
[Equation]
where Equation (129) follows Lemma 6.
According to the local learning rate setting in the description, we have
[Equation]
After finding the bound for the first term of Equation (126)
[Equation]
we now give the bound for its second term,
i
[Equation]
e., E
[Equation] [Equation]
) ≤
[Equation]
) where Equation (134) follows ( α + β ) 2 ≤ 2 α 2 + 2 β 2 ; Equation (135) follows Cauchy–Schwarz inequality and Assumption 1; Equation (137) is based on Lemma 6.
Then, according to the setting for the local learning rate in the description above, we can further simplify Equation (137):
[Equation]
Plugging Equation (131) and Equation (138) back to Equation (126), we can primarily obtain the inequality below:
[Equation]
With the setting described in the Lemma
[Equation]
we have:
[Equation] [Equation]
Therefore, according to the upper bound analyzed in the previous inequalities, Equation (123) can be reformulated as
[Equation]
By means of the setting in the description above
[Equation]
we can obtain the desired conclusion
[Equation]
Theorem 6.
Suppose that Assumption 1, 2 and 3 hold.
Let the local updates K ≥ 1 , and the local learning rate η l and the global learning rate η s be η s η l = 1 KL (cid:16) 1 + 2 MAp (cid:112) 1 − p A (cid:17) − 1 , where η l ≤ min (cid:18)
[Equation]
√
[Equation]
KL
[Equation]
√
[Equation] [Equation]
L σ (cid:19) .
Therefore, the convergence rate of FedAMD for non-convex objectives should be
[Equation]
where we treat F (˜ x 0 ) − F ∗ and L as constants
[Equation]
Proof.
With Lemma 5 and Lemma
[Equation]
we can find the following recursive function under the constant probability settings:
[Equation]
Since η s η l = 1 KL (cid:16) 1 + 2 MAp (cid:112) 1 − p A (cid:17) −
[Equation]
we have:
[Equation]
According to Lemma
[Equation]
∥ E ˜ g 0 − ∇ F (˜ x 0 ) ∥ 22 = 0 .
Therefore, based on the derivation above
[Equation]
we can attain the following inequality:
[Equation]
By using the settings of the local learning rate and the global learning rate in the description, we can obtain the desired result.
E. P ROOFS FOR PL C ONDITION
Theorem 7.
Suppose that Assumption 1, 2, 3 and 4 hold.
Let the local updates K ≥
[Equation]
and the local learning rate η l and the global learning rate η s be η s η l
[Equation]
min
[Equation]
where η l ≤ min
[Equation]
(cid:19) .
Therefore, the convergence rate of FedAMD for PL condition should be
[Equation]
Proof.
With Lemma
[Equation]
we have the recursive function on the time-varying probability settings under
PL condition:
[Equation]
According to the description
[Equation]
we consider the probability p t = p and have:
[Equation]
Since η s η l ≤
Ap MKµ (1 − p A )
[Equation]
we have:
[Equation] [Equation]
According to the description η s η l ≤ 1 KL ( 1+ 16 M µAp L )
[Equation]
we have:
[Equation] [Equation]
By using the settings of the local learning rate and the global learning rate in the description, we can obtain the desired result.
F A DDITIONAL E XPERIMENTS
In the main text, we have analyzed some experimental results in Section 5.
In this part, we conduct more thorough experiments by setting different numbers of local updates and different secondary mini-batch sizes.
F. D ETAILED E XPERIMENTAL S ETUP
Training on Fashion MNIST. In Section 5, the experiment conducts on Fashion MNIST (Xiao et al., 2017), an image classification task to categorize a 28 × 28 greyscale image into 10 labels (including T-shirt/top, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, Ankle boot).
In the training dataset, each class owns 6K samples.
Then, we follow the setting of (Koneˇcn`y et al., 2016; Li et al., 2019b) and partition the dataset into 100 clients ( M = 100 ) such that each client holds two classes with a total of 600 samples.
By this means, we simulate the heterogeneous data setting.
To obtain a recognizable model on the images in the test dataset
[Table]
we utilize a convolutional neural network structure LeNet-5 (LeCun et al., 1989; 2015).
Below comprehensively presents the structure of LeNet-5 on Fashion MNIST:
[Table]
Training on EMNIST digits.
In addition to Fashion MNIST
[Table] we utilize one more dataset EMNIST (Cohen et al., 2017) digits to further assess our approach efficiency. This task is to recognizehandwritten digits with a total of 240K training samples and 40K test samples. Similar to Fashion
MNIST, we equally disjoint the dataset into 100 clients ( M = 100 ), and each client possesses two classes.
The model is trained with a 2-layer MLP (Yue et al., 2022), i.e., [Table] Validation metrics. The training loss is calculated by the clients who perform local SGD on the average loss of all iterations.
As for the test accuracy, the server utilizes the entire test dataset after the global model updates. The gradient complexity is the sum of all samples used for gradient calculation by all clients throughout the training. The communication overhead is measured by the transmission between the server and the clients. Miscellaneous.
Our simulation experiment runs on Ubuntu 18.04 with Intel(R)
Xeon(R) Gold
CPU, NVIDIA RTX A6000 GPU, and CUDA 11.2.
Our code is implemented using Python and PyTorch v.1.12.1.
Clients are picked randomly and uniformly, without replacement in one round but with replacement in subsequent rounds.
For each baseline, the local learning ( η l ) rate picks the best one from the set { 0 . 1 , 0 .
005 } , while the global learning rate ( η s ) is selected from the set { 1 . 0 , 0 . 8 , 0 . 1 } .
Without the annotation, we implicitly assume Fashion MNIST follows these settings: small minibatch size b ′ = 64 , large minibatch size b = full , and the number of local updates K = 10 .
As for EMNIST, we suppose the anchor nodes utilize the entire dataset for the caching gradient, i.e., b = full , and the number of participants in each round is 20, i.e., A = 20 .
Besides, to make BVR-L-SGD (Murata & Suzuki, 2021) compatible with partial participation in FL training, we only use sampled clients to compute the full gradients of local objectives instead of using all clients.
F. M ORE N UMERICAL R ESULTS ON F ASHION MNIST
In addition to the empirical results in Section 5, we evaluate the performance of FedAMD by using different large minibatch b settings. Then, considering the number of local updates K , we assess the performance of the algorithm under various probability settings and compare it with other baselines.
F.2. C OMPARISON AMONG V ARIOUS H YPER - PARAMETER S ETTINGS
The setting of large mini-batch b . Figure 2 – 4 depict the performance of FedAMD under constant probability p = 0 .
9 , optimal constant probability, and optimal sequential probability, respectively, when the algorithm uses different b s. Overall, b
= full always outperform b = 256 and b = 64 . Although there is no distinct difference between b = 256 and b = 64 in terms of final test accuracy and training loss, b = 256 is easier to attain a lower training loss during the training.
[Figure]
[Figure] [Figure]
Number of local updates K . Figure 5 – 7 present the performance of FedAMD under the setting of K = 10 , K = 20 , and K = 5 , respectively. In Section 5, we present the results under K =(Figure 5)
[Figure]
which manifests that: (I) The setting { 0 , 1 } is the most efficient performance under the sequential probability setting; (II) The setting near the optimal probability can attain the best result under the constant probability settings. In this part, we verify whether these two statements still hold in two more examples.
As for K = 20 and K = 5 , it can provide the best performance when the constant probability is set to be near the theoretical optimal one. However, statement (I) does not always hold in both settings. Specifically, when all clients participate in the training, { 0 , 0 , 1 } even outperforms { 0 , 1 } . A possible reason is that { 0 , 0 , 1 } has more rounds to update the global model while the caching gradient does not significantly change compared to the situation running for one more round.
[Figure]
[Figure] [Figure]
F.2. C OMPARISON AMONG V ARIOUS B ASELINES
In Section
[Figure]
we present the comparison in a tabular format. Then, in this part, we visualize the training progress as well as introduce more results under different K s with the help of Figure 8. In specific
[Figure]
Figure 8a – 8f are summarized into Table 2, while the rest explore the efficiency of FedAMD under more scenarios. As described in Table 2 and the first six figures
[Figure]
when K = 10 , the conclusions we can draw include: (I) the final test accuracy of FedAMD exceeds that of the baselines; (II) FedAMD is able to attain an accurate model with less communication and computation consumption. Next, we evaluate the performance of FedAMD when K = 20 and K = 5 .
• K = 20 (Figure 8g – 8l):
In this case, the gradient computation of a miner is around twice as that of an anchor. Therefore, FedAMD may consume less computation overhead than FedAvg and SCAFFOLD. In terms of final test accuracy, these baselines achieve similar results in all cases, while FedAMD achieves the performance with less computation overhead.
• K = 5 (Figure 8m – 8r): FedAMD eventually achieves the best accuracy compared to the existing works. Additionally, we can obtain a well-performed model with less computational consumption. These two phenomena are in support of the statements mentioned above.
[Figure]
In this section
[Figure]
Figure 9 analyzes our algorithm with one more dataset, i
[Figure]
e., EMNIST.
In the first three figures, we evaluate different probability settings.
As for the rest of the figures, we compare
FedAMD with other baselines. With regards to different probability settings (Figure 9a – 9c)
[Figure]
we are still able to draw two conclusions as stated in Appendix F.2.1. As for the comparison among different algorithms
[Figure]
our proposed algorithm is able to outperform the state-of-the-art works when we take the test accuracy and the computation overhead into joint consideration
[Figure]