F EDERATED L EARNING ON A DAPTIVELY W EIGHTED N ODES BY B ILEVEL O PTIMIZATION
Anonymous authors
Paper under double-blind review
A BSTRACT
We propose a federated learning method with weighted nodes in which the weights can be modified to optimize the model’s performance on a separate validation set.
The problem is formulated as a bilevel optimization problem where the inner problem is a federated learning problem with weighted nodes and the outer problem focuses on optimizing the weights based on the validation performance of the model returned from the inner problem.
A communication-efficient federated optimization algorithm is designed to solve this bilevel optimization problem.
We analyze the generalization performance of the output model and identify the scenarios when our method is in theory superior to training a model locally and superior to federated learning with static and evenly distributed weights.
I NTRODUCTION
Federated learning (FL) is an emerging technique for training a model using data distributed over a network of nodes without sharing data between nodes (Koneˇcn`y et al., 2016; McMahan et al., 2017).
In this paper, we focus on the case where data distributions across nodes are heterogeneous and each node aims at a model with an optimal local generalization performance.
In the classical setting of
FL, a globally shared model is learned by minimizing a weighted average loss across all nodes.
However, given the heterogeneity of data distributions, a global model is likely to be sub-optimal for some node (Fallah et al., 2020).
Alternatively, each node can train a model only using its local data, but such a local model may not generalize well neither when the volume of local data is small.
To achieve a good local generalization performance, each node can still exploit global training data through FL but, at the same time, identify and collaborate only with the nodes whose data distributions are similar or identical to its local distribution.
One way to implement this strategy is to allow each node to solve its own weighted average loss minimization problem with weights designed based on the performance on a separate set of local (validation) data.
Ideally, each node can learn a better model by allocating more weights on its peers whose data distribution is similar to its local distribution.
In this paper, we formulate the choice of the weights as a bilevel optimization (BO) problem (Colson et al., 2005; Vicente & Calamai, 1994), which can be solved by a federated bilevel optimization algorithm, and analyze the generalization performances of the resulting model.
We consider a standard learning problem where the goal is to learn a vector of model parameters θ from a set Θ that minimizes a generalization loss.
This problem can be formulated as
[Equation]
where l ( θ ; z ) is the loss of θ on a data point z from a space Z , and E z ∼ p 0 represents the expectation taken over z when z follows an unknown ground truth distribution p 0 .
Directly solving (P) is challenging as p 0 is unknown, and, typically, training data sampled from pis needed for learning an approximation of θ ∗ .
In this paper, we consider the scenario where the amount of data sampled directly from p 0 may not be sufficient to learn a good approximation of θ ∗ , but there exist external data distributed on K nodes that can potentially help the learning on θ ∗ .
In particular, we denote the set of nodes by K := { 1 , . . .
, K } and assume a training set D train k is stored in node k .
We also define D train :
= (cid:8) D train k (cid:9) K k =1 and assume | D train k | = n k and D train k =
{ z ( i ) k } n k
i
=1 , where z ( i )
k ∈
Z is an i.i.d.
sample from an unknown distribution p k for k ∈ K .
We assume node k is weighted by w k and the vector of weights w = ( w 1 , . . .
, w K ) ∈ [0 , 1] K is located on the capped simplex ∆ bK defined as
[Equation]
where b ∈ [ 1 K , 1] is a user-defined parameter.
The FL on weighted nodes can be formulated as
[Equation]
where (cid:98) L k ( θ ) is the empirical loss of θ on D train k , namely,
[Equation]
When some p k ’s are different from p 0 , w in (1) must be chosen adaptively to ensure (cid:98) θ ( w ) is a good approximation of θ ∗ in (P).
To do so, we assume that there is a validation dataset D valid with | D valid | = n 0 = n valid and D valid = (cid:8)
z ( i ) (cid:9) n
i =1 , where z ( i ) ∈
Z is an i.i.d.
sample from p 0 .
We assume D valid is stored in a node called node 0 or center , which may or may not be a node in K .
Set
D valid alone may not be sufficient for learning θ ∗ precisely but can be used to assist the selection of w .
We then propose to estimate the generalization loss of (cid:98) θ ( w ) using the loss on D valid , i.e.,
[Equation]
and use this validation loss to guide the procedure for updating w .
Presumably, when both the training and validation sets are large enough, the weights in w will be shifted towards the nodes where the data is helpful for learning θ ∗ .
Following this idea, we formulate the federated learning problem on adaptively weighted nodes as the following bilevel optimization (BO) problem:
[Equation]
In Section 4, we will present a federated optimization algorithm for solving ( (cid:98) P).
Suppose an algorithm can find the optimal solution (cid:98) w of ( (cid:98) P) and the corresponding model parameter (cid:98) θ ( w ) .
We are interested in the optimality gap of the generalization loss of (cid:98)
θ ( (cid:98) w ) , namely, L 0 ( (cid:98)
θ ( (cid:98) w ))
− L 0 ( θ ∗ ) , where L 0 is defined as in (P).
The main contribution of this paper is to establish a high-probability bound of this gap as a function of the sizes of D train and D valid as well as a statistical distance between p 0 and
p k ’s. Moreover, we compare our generalization bound with the bound achieved by learning only locally from D valid and the bound achieved by solving (1) with evenly distributed weights, and identify the parameter regimes where our method is preferred in theory.
R ELATED W ORK
The work most related to ours is Chen et al.
(2021a) in which the authors proposed a target-aware weighted training algorithm for cross-task learning.
Although their problem is completely different from FL, the bilevel optimization model they studied contains ( (cid:98) P) as a special case.
In fact, some steps in the proofs of the generalization bounds in the current work are borrowed from Chen et al.
(2021a) with some modifications.
However, our work extends their results in several valuable directions.
First, the generalization bound in Chen et al.
(2021a) is shown for any weight w without any small or zero components, which is not necessarily the case for the optimal solution (cid:98) w of ( (cid:98) P).
Second, their generalization bound contains a term of task distance whose convergence rate is not characterized.
On the contrary, we show the convergence of the entire generalization bound for (cid:98) w without any conditions on its components.
Third, the generalization bound in Chen et al.
(2021a) has a dominating term O (1 / √ n valid ) , which is the same as the generalization bound obtained by directly training with the local data D valid .
However, we show that, when there exist identical neighbors and an error bound condition holds (Assumptions 2 ′ and 3), the model learned by ( (cid:98) P) can be superior to a model trained locally when the p k ’s are similar enough to (but still different from) p 0 , providing an insight on when a node with insufficient data should actively seek collaboration with others.
FL has become a prominent machine learning paradigm for training models with distributed data
Koneˇcn`y et al.
; McMahan et al.
Many federated optimization algorithms have been developed for solving (1) or its expectation form (with (cid:98) L k replaced by L k ).
A well-known method is the federated averaging (FedAvg) method (McMahan et al., 2017), which applies a local optimization method (e.g., stochastic gradient descend (Robbins & Monro, 1951)) to (cid:98) L k or L k in each node and periodically aggregates the solutions from all nodes by averaging.
Many variants of FedAvg and other federated learning methods have been proposed to reduce the computation and communication complexity.
A partial list includes Gorbunov et al.
; Lee et al.
; Karimireddy et al.
; Liang et al.
; Li et al.
(2020); Yuan & Ma (2020); Wu & Wang (2021);
Zhao et al.
In our setting, (1) is a sub-problem we need to solve multiple times with different w ’s.
We then apply the Local-SVRG method by Gorbunov et al.
(2021) to (1) because it has the lowest communication complexity for finite-sum problems like (1).
Most FL methods produce a globally-shared model which may not perform well on each node when data is heterogeneous across nodes.
To address this challenge, many personalized FL methods, including but not limited to Smith et al.
Tan et al.
; Fallah et al.
; Li & Wang (2019);
Deng et al.
; Li et al.
(2021), have been developed, where a global model is tailored using local data for a good local performance.
However, many personalized FL methods use a fixed weight in (1) to obtain the global model.
Such a global model may be dominated by the majority of the data distributions in the network and is hard to personalize for a minority group with unique data patterns.
On the contrary, our method can produce a personalized weight so a node from the minority group can still find and collaborate with its peers.
BO recently has also been studied actively by the machine learning community.
Many efficient optimization algorithms have been developed recently for BO, including but not limited to Chen et al.
(2021c;b); Ghadimi & Wang (2018);
Hong et al.
Guo et al.
; Ji et al. Grazzi et al. However, these algorithms are designed for a single-machine setting and may not be communication efficient if implemented directly in a distributed environment.
There are much fewer studies on BO in a distributed setting.
The recent works (Li et al., 2022; Tarzanagh et al., 2022) consider a BO where both the outer and inner problems are defined with the expectation over data distributed across nodes.
They analyze the communication complexity of their methods in a non-convex setting.
We propose a different FL algorithm based on Local-SVRG because our problem ( (cid:98) P) has a finite-sum structure that allows periodically going through all the data points in each node to obtain exact gradient information and achieving lower communication complexity than Li et al.
; Tarzanagh et al.
(Chen et al., 2022) consider a decentralized BO problem and their algorithm for the deterministic case can be applied to our problem and achieve the same communication complexity in the non-convex case.
However, we include the results for the convex case and focus more on the generalization performance of the federated learning based on BO.
G ENERALIZATION P ERFORMANCE
The following assumption on ( (cid:98) P) is made for analyzing the generalization performance of (cid:98) θ ( (cid:98) w ) in ( (cid:98) P) and the convergence property of the optimization algorithm for solving ( (cid:98) P) in Section 4.
Assumption 1 (Well-behaved function) .
The following statements hold.
(1) l ( θ ; z ) ∈ [0 , 1] and ∇ l ( θ ; z ) is ℓ 1 -Lipschitz continuous in θ for any z ∈ Z .
(2) (cid:98) L k ( θ ) and ∇ 2 (cid:98) L k ( θ ) are ℓ 0 and ℓ 2Lipschitz continuous, respectively, for k ∈ K .
(3) (cid:98) L k ( θ ) is µ -strongly convex for k ∈ K .
These are standard regularity assumptions in recent literature on bilevel optimization (e.g. Ghadimi & Wang (2018)).
Assuming the strong convexity in the lower-level problem, (1) has a unique solution so that the inclusion there can be replaced by equality.
Similar to L 0 in (P), we define
[Equation]
for
[Equation]
K , and we consider the following auxiliary problem
[Equation]
Problem ( (cid:98) P) can be viewed as an empirical approximation of (P ∗ ) in both inner and outer problems.
Even if all p k ’s are different from p 0 , it is still possible to learn θ ∗ correctly by solving (P ∗ ).
A simple example on mean estimation is min
[Equation]
where z 0 , z 1 and z 2 follow normal distributions N (0 , 1) , N ( a, 1) and N ( − a, 1) , respectively, for any a ̸ = 0 .
Obviously, w ∗ = (0 . 5 , 0 . 5) is the optimal weight and θ ( w ∗ )
=
= θ ∗ .
Throughout the paper, we assume θ ∗ can be learned by solving (P ∗ ), which is stated formally below.
Assumption 2 (Learnability of θ ∗ by (P ∗ )) .
θ ( w ) =
θ ∗ for any w ∈ W ∗ , where θ ∗ satsifes (P).
Besides the situation like the aforementioned simple example, Assumption 2 holds obviously when p k = p 0 for at least one k ∈ K .
In fact, the latter case happens when node 0 is a node in K , so w equal to one on that node and zero on others is optimal.
Moreover, we will later on provide a refined generalization performance analysis for the latter case, so we state the latter case as a separate assumption below.
Assumption 2 ′ (Existence of identical neighbors) .
There exists a strict subset J ⊂ K with |J | =
J such that p k = p 0 for k ∈ J .
Moreover,
[Equation]
The first statement in Assumption 2 ′ implies that the right-hand side of (4) is contained by the left-hand side.
The second statement further assumes that they are equal.
Assumption 2 ′ implies
Assumption 2 because (cid:80) K k
=1 w k L
k
( θ ) =
L 0 ( θ ) for any θ ∈ Θ and any w ∈ W ∗ satisfying (4).
Assumption 3 (Error bound condition) .
There exist C r > 0 and r ≥ 1 such that
[Equation]
Inequality (5) means problem (P ∗ ) satisfies the error bound condition , which has impact on the convergence property of many optimization algorithms (Johnstone & Moulin, 2020;
Yang & Lin, 2018; Lewis & Pang, 1998; Pang, 1997; Lin et al., 2020).
Due to the limit of space, we refer readers to Appendix B for a practical example satisfying Assumption 3.
We are interested in the generalization performance of (cid:98)
θ ( (cid:98) w ) , represented by the gap L 0 ( (cid:98)
θ ( (cid:98) w )) −
L 0 ( θ ∗ ) , as both D valid and D train grow.
For simplicity of notation, we assume n k = n train for any k ∈ K for some integer n train ≫ n valid .
To facilitate the analysis, we need to introduce a few notations.
Given a probability measure Q on Z , let H =
{ l ( θ ; · ) : θ ∈ Θ } be a pseudometric metric space equipped with the pseudometric metric ρ Q , which is the L 2 distance metric with respect Q , i.e., ρ Q ( l, l ′ ) :
= (cid:113)(cid:82) Z ( l ( z ) − l ′
( z )) 2 d Q ( z ) for l, l ′ ∈ H .
The ball with radius ϵ > 0 centered at l ∈ H is defined as B ϵ ( l ) :
= { l ′ ∈
H| ρ Q ( l, l ′ ) ≤ ϵ } .
Let N ( H ; ρ Q , ϵ ) be the ϵ -covering number of
H with respect to ρ Q , i.e., N ( H ; ρ Q , ϵ ) :
= min { m |∃ l 1 , . . .
, l m ∈ H , H ⊂ ∪ mi =1 B ϵ ( l i ) } .
Following Chen et al.
(2021a), we make the following assumption on N ( H ; ρ Q , ϵ ) , which is important for analyzing the generalization performance (Koltchinskii, 2006; Kakade et al., 2008).
Assumption 4.
There exist C H > 0 and ν H > 0 such that, for any probability measure Q on Z ,
[Equation]
With the these assumptions, we obtain the following theorems whose proofs are in Appendix D.
Theorem 1 (Bound independent of statistical distance) .
Suppose Assumptions 1, 2 and 4 hold.
There exists a universal constant 1 C g > 0 such that, with a probability of at least 1 − δ ,
[Equation]
Under the same assumptions
[Equation]
2 the generalization bound by Chen et al.
(2021a) becomes
[Equation]
However, it is likely that the optimal solution w ∗ has zero components (e.g., when p k = p 0 for some k ).
If so, β on the right-hand side of (8) needs to be arbitrarily large for (cid:98) w ( ≈ w ∗ ) in ( (cid:98) P) to satisfy the aforementioned condition.
Moreover, when w = (cid:98) w , the convergence of the last term
L 0 ( θ ( w )) − L 0 ( θ ∗ ) in (8) is not characterized in Chen et al.
(2021a).
On the contrary, Theoremholds without any assumption on (cid:98) w (zero components are allowed), does not depend on β and provides a generalization bound converging in every term.
3 When b = c/K with a constant c ≥ 1 , the right-hand side of (7) improves the first two terms on the right-hand side of (8) by a log( K ) term.
The bounds (7) and (8) may both be dominated by the O (1 / √ n valid ) term, which is the same as the generalization bound achieved simply by learning locally with D valid (see Proposition 1 in Appendix E).
However, if Assumption 3 holds and Assumption 2 is strengthened to Assumption 2 ′ , we can establish a generalization bound different from Theorem 1 which suggests that ( (cid:98) P) can still outperform local training when the following statistical distance between p 0 and p k ’s is small:
[Equation]
Theorem 2 (Bound dependent on statistical distance) .
Suppose Assumptions 1, 2 ′ , 3 and 4 hold.
There exists universal constants C e > 0 and C w > 0 such that, with a probability of at least 1 − 3 δ ,
Dist ( (cid:98) w, W ∗ ) ≤ ε ( n valid ,
[Equation]
and
[Equation]
where N ε =
[Equation]
and G is defined in (9).
Note that N ε =
Θ( n train ) .
Based on the decreasing rate of ε ( n valid , n train ) in (10), we simplify (11) by only showing the bounds in terms of n valid , n train and G for a clear comparison with local training.
Corollary 1.
Suppose the assumptions of Theorem 2 hold and n valid and n train are large enough such that ε ( n valid , n train ) defined in (10) satisfies ε ( n valid , n train ) ≤ b √ J K − J .
With a probability of at least 1 − 3 δ , we have L 0 ( (cid:98)
[Equation]
When G = o (1 /n 12 − 12 r valid ) and G =
o ( n 14 r train /n 12 valid ) , the bound in Corollary 1 becomes o (1 /n 12 valid ) , meaning that method ( (cid:98) P) has a better generalization guarantee than training locally.
Since G is small in this case, a natural question is whether optimizing the weight in ( (cid:98) P) is still needed because the FL with equally weighted nodes may already have a good performance with respect to p 0 .
However, we show in Proposition 2 in Appendix E that ( (cid:98) P) is still preferred to FL with equally weighted nodes for any G .
We show the impacts of b , J and K through Corollary 2 in Appendix D.
F EDERATED B ILEVEL O PTIMIZATION A LGORITHM
Although our main focus is the generalization performance of ( (cid:98) P), we present a federated optimization algorithm for ( (cid:98) P) based on the existing techniques by Gorbunov et al.
(2021) and Ghadimi &
Wang (2018).
Different from a single-level optimization problem, the outer objective (cid:98) F ( w ) in ( (cid:98) P) depends implicitly on w through the inner optimal solution (cid:98) θ ( w ) , which makes the exact gradient ∇ (cid:98) F ( w ) difficult to compute.
A commonly used solution is to exploit implicit function as shown in the following lemma, which is from Lemma 2.1 and 2.2 in Ghadimi & Wang (2018).
Lemma 1.
Under Assumption 1, ∇ (cid:98) F ( w ) is ℓ F -Lipschitz continuous with
[Equation]
1 Input : functions { f k,i } , weight w , initial vector x (0) ∈ R d , learning rate γ , communication period τ ≥ 1 , probability q of updating reference point, and the total number of iterations T 2 x (0) k
= x (0) , y (0) k
= x (0) , k = 1 , . .
, K 3 for t = 0 , 1 , . .
, T − 1 do for k = 1 , . . .
, K in parallel do
Choose i k from { 1 , . . . , n k } uniformly at random g ( t ) k
= ∇ f k,i k ( x ( t ) k ) − ∇ f k,i k
( y ( t ) k )
+ ∇ f k ( y ( t ) k )
y ( t +1) k
= x ( t ) k with probability q and y ( t +1) k = y ( t ) k with probability 1 − q if then x ( t +1) k
= x ( t +1) :
= (cid:80)
Kk =1 w k (cid:16) x ( t ) k − γg ( t ) k
(cid:17) else x ( t +1) k
= x ( t ) {+k − γg ( t ) k end end 14 end 15 Return: ¯ x ( T ) = U − 1 T (cid:80) Tt =
+}
{+u t x ( t ) with u t = (1 − min { γµ, q/ 4 } ) − ( t +1) and U T = (cid:80) Tt =
 u t . and ∇ (cid:98) F (+} w ) =
( ∇ k (cid:98) F ( w )) k =1 ,...,K , where ∇ k (cid:98) F ( w ) is the partial derivative of (cid:98) F w.r.t.
w k and
[Equation]
By Lemma
[Equation]
computing ∇ k (cid:98) F ( w ) requires solving (1) exactly and taking the inverse of the Hessian matrix in (13), both of which are challenging.
Hence, for a given w , we will find an approximate solution of (1), denoted by ¯ θ ( w )( ≈ (cid:98) θ ( w )) , and approximate the matrix inversion in (13) by solving a strongly convex quadratic program.
In particular, we will approximate ∇ (cid:98) F ( w ) by
[Equation]
with ¯
[Equation]
14) where
[Equation]
Both (1) and (15) can be written as a distributed finite-sum minimization on K weighted nodes:
[Equation]
where f
[Equation]
When f k,i ( θ ) =
l ( θ ; z ( i ) k ) , (16) becomes (1).
When f k, [Equation] h ⊤ ∇ (cid:98) L 0 (¯ θ ( w )) , (16) becomes (15).
With this observation, we apply Local-SVRG by Gorbunov et al.
(2021) to the aforementioned two instances (16) to obtain ¯ θ ( w ) and ¯ h , which are used to construct the approximate gradient ¯ ∇ (cid:98) F ( w ) in (14).
Then we update w using ¯ ∇ (cid:98) F ( w ) based on the accelerated bilevel approximation method (ABA) by Ghadimi & Wang (2018).
We choose the combination of Local-SVRG and the ABA methods because it leads to the lowest communication complexity in literature for solving ( (cid:98) P).
We formally present this approach in Algorithms 1 and 2.
Recall that we have assumed D valid is stored in node 0 , which is called center in Algorithm 2.
In each iteration of Algorithm 2, in addition to the communication within Local-SVRG, constantly many rounds of communication are needed to exchange θ ( s )
, h ( s ) ∇ (cid:98) L 0 ( θ ( s ) ) and ∇ (cid:98)
L k ( θ ( s ) ) between the center and node k .
We present the communication complexity of Algorithm 2 which can be proved by adapting the analysis in Gorbunov et al.
and Ghadimi & Wang (2018) to our setting.
The proofs are deferred to Sections F.1 and F.2.
Theorem 3.
Suppose Assumption 1 holds and (cid:98) F ( w ) .
Let R := max w ∈ ∆ bK ∥ (cid:98) θ ( w ) ∥ and γ 0 :
[Equation]
q [Equation]
1 Input : initial weight w (0) , learning rate η , training data D train k for k ∈ K , validation data D valid , the number of outer iterations S , parameters ( γ, τ, q ) for Local-SVRG , and the number of inner iterations T s for s = 0 , . . .
, S −2 Set w (0) ag = w (0) 3 for s = 0 , 1 , . .
, S − 1 do w ( s ) md
= 2 s +2 w ( s ) + ss +2 w ( s ) ag
Compute ¯ ∇ (cid:98) F ( w ( s ) md ) as follows:
Set f k,i ( θ )
=
l ( θ ; z ( i ) k ) , i = 1 , . . . , n k , k = 1 , . . .
, K
Compute θ ( s ) =
Local-SVRG ( { f k,i } , w ( s ) md , θ ( s − 1) , γ, τ, q, T s ) and send it to each node.
Compute ∇ (cid:98) L 0 ( θ ( s ) ) at center and send it to each node.
Set f k,i ( h ) = 12 h ⊤ ∇ 2 l ( θ ( s ) ; z ( i ) k )
h − h ⊤ ∇ (cid:98) L 0 ( θ ( s ) ) , i = 1 , . . . , n k , k = 1 , . .
K
Compute h ( s ) =
Local-SVRG ( { f k,i } , w ( s ) md , ∇ (cid:98) L 0 ( θ ( s ) ) , γ, τ, q, T s ) and send it to each node.
Each node computes ∇ (cid:98)
L k ( θ ( s ) ) in parallel and send it to the center.
Set ¯ ∇ k (cid:98) F ( w ( s ) md ) =
−∇ (cid:98)
L k ( θ ( s ) )
⊤ h ( s ) for k = 1 , . .
, K w ( s +1) =
arg min w ∈ ∆ bK (cid:68) ¯ ∇ (cid:98) F ( w ( s ) md ) , w (cid:69) + 2 η ( s +1)
∥ w − w ( s ) ∥
w ( s +1) ag =
arg min w ∈ ∆ bK (cid:68) ¯ ∇ (cid:98) F ( w ( s ) md ) , w (cid:69) + 12 η ∥ w − w ( s ) md ∥15 end 16 Return: w ( S ) ag
Suppose η = 13 ℓ F in Algorithm 2 with ℓ F defined as in (12).
There exist constants A 1 , A 2 and Athat only depend on ℓ 0 , ℓ 1 , ℓ 2 , µ , R , q and K but not on τ such that the following statements hold.
• Suppose τ = 1 , γ = γ 0 and T s = 1 γ 0 µ ln (cid:16) A
[Equation]
Algorithm 2 finds an ϵ -optimal solution of ( (cid:98) P) with ˜ O (cid:0) ϵ − 0 .
5 (cid:1) rounds of communication.
• Suppose τ > 1 , γ = 1 M s and T s = µ − 1 M s ln (cid:0) M 3 s (cid:1) , where
[Equation]
Algorithm 2 finds an ϵ -optimal solution of ( (cid:98) P) with ˜ O (cid:0) ϵ − 1 .
5 (cid:1) rounds of communication.
When (cid:98) F in ( (cid:98) P) is non-convex, we aim at finding an ϵ -stationary point of ( (cid:98) P).
Following Ghadimi & Wang (2018), we apply a standard proximal gradient method to ( (cid:98) P) based on the approximate gradient ¯ ∇ (cid:98) F ( w ) in (14).
This method and its analysis are standard and we include them in Section F.3 due to the limit of space.
In Remark 1 in Section F.3, we also show that the complexity of our method is lower than those of Li et al.
and Tarzanagh et al.
N UMERICAL E XPERIMENT
In this section, we demonstrate the performance of our methods on image classification tasks.
We compare our method, denoted by Bi-level , against four baselines, including (1) Local-train , which solves min θ ∈ Θ (cid:98) L 0 ( θ ) locally;
(2) FedAvg (McMahan et al., 2017), which solves (1) with w k = 1 /K ; (3) Ditto (Li et al., 2021); and (4) pFedMe
(T Dinh et al., 2020).
Ditto and pFedMe are two personalized FL methods.
We apply all methods to train a convolutional neural network (CNN) on multiple image datasets: Fashion-MNIST (Xiao et al., 2017), MNIST (Deng, 2012), CIFAR10 (Krizhevsky et al., 2009) and downsampled 32 × 32 ImageNet (Chrabaszcz et al., 2017). We
[Figure] denote Fashion-MNIST and downsampled ImageNet by F-MNist and DS-ImageNet, respectively.
See Appendix G for more details on the CNN and the computing environment we use.
We use a mini batch of size 50 to construct the stochastic gradients in all methods.
In the Bi-level method, Algorithm 3 is applied to ( (cid:98) P) with b = 1 / 3 and five epochs are performed within each call of Local-SVRG (i.e., T s = 5 n train / 50 ).
We set q = 1 / 50 , choose γ from { 0 . 05 , 0 . 02 , 0 .
01 } when solving (1) and from { 0 . 0005 , 0 . 0002 , 0 . 0001 } when solving (15), choose τ from { 10 , 20 } , and η from { 0 . 025 , 0 .
We choose the combination that produces the highest validation accuracy after five outer iterations.
SVRG is applied to min θ ∈ Θ (cid:98) L 0 ( θ ) in Local-train and Local-SVRG is applied to (1) with w k = 1 /K in FedAvg.
Parameters τ , q , and η in FedAvg and Local-train are set the same as in our method.
Ditto is implemented by setting S t = K , r
= τ , s = 25 and η g =
η l = γ in Algorithm 2 in Li et al.
(2021), where τ and γ are set the same as in our method.
Similar to Li et al.
(2021), we choose λ in Ditto from { 0 . 05 , 0 . 1 , 0 . 2 } to maximize the validation accuracy after five outer iterations.
pFedMe is implemented by setting β = 1 , δ = 0 .
005 , R = τ and η = γ in
Algorithm 1 in T Dinh et al.
(2020) with τ and γ set the same as in our method.
Each subproblem in pFedMe is solved by gradient descend with a maximum iterations of 20.
Like Li et al.
(2021), we choose λ in pFedMe from { 5 , 10 , 15 } to maximize the validation accuracy after five outer iterations.
We set K = { 1 , . . .
, 15 } (i.e., K = 15 ) and partition it into two groups, a minority group J m = { 1 , . . .
, 5 } and a majority group J M = { 6 , . . .
We then generate D train k for k ∈ K by randomly sampling data from the training sets with some artificial distributions, such that the data distributions (i.e., p k ’s) are the same within each group but different between groups.
In particular, we create the data distributions of J m and J M under four different settings.
In Setting 1 , we create two different distributions over the classes and use them to sample D train k with k ∈ J m and k ∈ J M , respectively.
In Setting 2 , Setting 3 and Setting 4 , we first sample data in the same way as Setting 1 and, additionally, we permute the class labels among a few classes in D train k with k ∈ J M under Setting 2, rotate each image in D train k with k ∈ J M by 90 degrees in the same but random direction under
Setting 3, and do both under Setting 4.
This creates nodes with different levels of heterogeneity.
To compare the performances of the methods on both groups, we conduct two sets of experiments under each setting, one with p 0 being the distribution of J m (i.e., J = J m ) and the other with
F-MNIST
MNIST
CIFARDS-ImageNet p
i s
M i no r it y p
i s
M a j o r it y p 0 being the distribution of J M (i.e., J = J M ). D valid is then sampled from p 0 . For out-ofsample evaluation, we generate testing data by sampling from the testing set of each dataset using distribution p 0 described above under each setting.
We denote the testing set by D test and let n test =
| D test | .
We repeat all experiments five times using different random seeds.
The values of n valid , n train , n test and the details of data generation are presented in Sections G.1, G.2 and G.3.
We plot the test (top-1) accuracy each method obtains during iterations for the minority group in
Figure 1, where the horizontal axis represents the number of synchronizations, i.e., the rounds of communications the method performs.
Since Local-train does not require any communication, we just plot a horizontal line positioned at its final accuracy.
Due to space limit, we present the accuracy for the majority group in Figure 7 in Section G.4.
We also report the same results in Figure 8 and
Figure 9 but the horizontal axis there represents the cumulative number of data points each method processes in parallel.
In each figure, we show the confidence intervals of the curves as shaded areas.
According to Figure 1, our Bi-level method performs better than the four benchmarks on the minority group on all datasets under all settings.
Local-train does not perform well because it only gets access to a small amount of data.
The poor performance of FedAvg is because of the heterogeneity we created across nodes.
In fact, FedAvg is even worse than Local-train in many cases, especially in
Settings 2, 3 and 4 where the heterogeneity is high.
This is consistent with the findings in literature.
Although Ditto and pFedMe are designed for heterogeneous nodes, they still use a fixed weight on each node to train a global model, which may not provide a good starting point for personalization due to the high heterogeneity.
In fact, their performances drop more or less as the data heterogeneity increases from Setting 1 to Settings 2, 3 and 4.
On the contrary, by updating the weights, our method filters the information in the network and help the node in the minority group to find its similar peers and produce a good model through intra-group collaboration.
Comparing Figure 1 with Figure 7, we find that the performances of FedAvg, Ditto and pFedMe are improved on the majority group.
This is again because they utilize the information aggregated from all nodes, which is in favor of the majority.
However, our method perform similarly on both groups and is still overall the best for the majority group.
Similar phenomena are found in Figure 8 and Figure 9.
In addition, we also plot in Figure 2 how the weight w k for each node evolves during the Bi-level method under Setting 1.
We show the results when p 0 is the distribution of the majority and the minority groups separately.
In each case, we call the nodes in J similar nodes (to node 0) and call the others dissimilar nodes.
According to Figure 2, our method successfully detects similar nodes in both cases and increases their weights but decreases the weights of dissimilar nodes.
We present the weights under Settings 2, 3 and 4 in Section G.4.
Similar phenomenons are observed.
C ONCLUSION
We propose a FL approach on a network with weighted nodes and develop a federated bilevel optimization algorithm to optimize the weights based on the model’s performance on a validation set.
We analyze the generalization performance of the resulting model and identify the scenarios where our method theoretically outperforms training with local data and FL with even weights.
A S UMMARY OF N OTATIONS
Symbol Definition Z
Sample space p
An unknown ground truth distribution on Z
D valid
Validation set i.i.d.
sampled from p 0 and stored in node 0 (or called center )
n
Size of validation set also denoted by n valid
K
Set of nodes defined by { 1 , . .
, K }
J
A strict subset of K
J
Size of J p k
The distribution on Z in node k , k = 1 , . .
K
D train k
Training set i.i.d.
sampled from p k and stored in node k , k = 1 , . .
, K n k
Size of training set D train k w
Vector of weights defined by ( w 1 , . .
. , w K ) ∈ [0 , 1] K b
A user-defined parameter in [ 1 K , 1] ∆ bK
Capped simplex where w comes from θ
Vector of model parameters Θ
Set where θ comes from l ( θ ; z )
Loss of θ on a data point z from the space Z (cid:98) L 0 ( θ )
Empirical loss of θ on D valid (cid:98) L k ( θ )
Empirical loss of θ on D train k , k = 1 , . .
K
L 0 ( θ )
Generalization loss of θ on p
L k ( θ )
Generalization loss of θ on p k , k = 1 , . .
K
ℓ
Lipschitz constant of l ( θ ; z ) ∈ [0 , 1] and ∇ l ( θ ; z ) in θ for any z ∈ Z ℓLipschitz constant of all (cid:98)
L k
( θ ) for k ∈ K ℓLipschitz constant of all ∇ 2 (cid:98) L k ( θ ) for k ∈ K µ parameter of strong convexity of (cid:98) L k ( θ ) for k ∈ K
G
Statistical distance between p 0 and p k ’s defined in (9) (cid:98) F ( w )
The objective in the bilevel optimization problem ( (cid:98) P)
F ( w )
[Table]
B E XAMPLES S ATISFYING A SSUMPTION
We consider (P ∗ ) in the setting of linear regression.
Consider data z
= ( x, y ) , where x ∈ R
d is a feature vector and y ∈ R is a continuous target variable, and consider the quadratic loss l ( θ ; z )
= 12 ( x ⊤ θ − y ) 2 .
We assume x in all nodes, including node 0 (center) and the nodes in K , follows the same distribution, and matrix E (cid:2) xx ⊤ (cid:3) is non-singular.
Moreover, we assume that there is a vector θ ∗ k ∈ R d associated to node k , and y in node k is generated as y =
x ⊤ θ ∗ k + ϵ k for k = 0 , 1 , . . .
, K , where ϵ k is a zero-mean random noise indepedent of x .
In this problem, we have
L k ( θ ) = 12 E (cid:2) ( x ⊤ θ − y ) 2 (cid:3) = 12 E (cid:2) ( x ⊤ θ − x ⊤ θ ∗ k − ϵ k ) 2 (cid:3) = 12 ( θ − θ ∗ k )
⊤ E (cid:2) xx ⊤ (cid:3) ( θ − θ ∗ k ) + 12 E (cid:2)
ϵ 2 k (cid:3) .
We can easily show that θ ( w ) in (P ∗ ) has the closed form θ ( w )
= (cid:80)
Kk =
1 w k θ ∗ k , which means F ( w ) = L
[Equation]
This is a quadratic function of w over the polyhedral set ∆ bK and thus satisfies the error bound condition (5) with r = 2 according to Lemma 1 in Gong & Ye (2014).
C T ECHNICAL L EMMAS
In this section, we provide some technical lemmas with proofs which are necessary for establishing the main theorems.
The main steps in the proofs of Lemma 2 and 3 are borrowed from Chen et al.
(2021a).
However, the generalization bound in Theorem 3.1 in Chen et al.
(2021a) is for a w satisfying β − 1 ≤ w k /w j ≤ β with k ̸ =
j for some β > 0 , and their bound increases with β .
When applied to w = (cid:98) w with zero or nearly zero components (that happens when p k = p 0 for some k ), such a β is very large or equals infinity.
Therefore, we make necessary changes in the proofs to extend the results for a generic w and a w that is ε -away from W ∗ (see Lemma 3) where the components can be nearly zero.
These extensions are important for proofing our main theorems.
Lemma 2.
Suppose Assumptions 1 and 4 hold.
There exists a universal constant C 0 > 0 such that, with a probability of at least 1 − δ ,
[Equation]
Proof.
For simplicity of notation, we write n valid as n in this proof.
Let
[Equation]
Consider any i ∈ { 1 , 2 , . .
. , n } .
Let D valid i be the same as D valid except that z ( i ) is replaced by another data point
z ′
( i ) sampled from p 0 .
Recall (3).
We have
[Equation]
where the inequality is because the loss is in [0 , 1] (Assumption 1).
This inequality means we can apply the McDiarmid’s inequality to obtain that, for any ϵ > 0 ,
[Equation]
or equivalently, with a probability of at least 1 − δ ,
[Equation]
Next
[Equation]
we apply the standard symmetrization argument by introducing a ghost dataset
[Equation]
which is independent of D valid and sampled from p 0 .
Let { σ i } ni =1 be Rademacher random variables.
We have
[Equation]
∈ Θ (cid:104) E (cid:2)
L (cid:0) θ ; D validghost (cid:1)(cid:3) − L ( θ ; D valid ) (cid:105)(cid:35) ≤ E (cid:34) sup θ ∈ Θ (cid:104) L ( θ ; D validghost ) − L ( θ ; D valid ) (cid:105)(cid:35) = E (cid:34) sup θ ∈ Θ n n (cid:88) i
=
σ i (cid:16) l (cid:0) θ ; z ′ ( i ) (cid:1) − l (cid:0) θ ; z ( i ) (cid:1)(cid:17) (cid:35) ≤ 2 E (cid:34) sup θ ∈ Θ n n (cid:88)
i
= σ i l (cid:0) θ ; z ( i ) (cid:1)(cid:35)
= 2 E (cid:98) R n ( H ) , where (cid:98) R n ( H ) = E (cid:34) sup θ ∈ Θ 1 n (cid:80) ni =1 σ i l (cid:0) θ ; z ( i ) (cid:1)(cid:12)(cid:12)(cid:12)(cid:12)
D valid (cid:35) and H = { l ( θ ; · ) : θ ∈ Θ } . Let M θ :=
[Equation]
n (cid:80) ni
=1 σ i l (cid:0) θ ; z ( i ) (cid:1) for θ ∈ Θ .
By Hoeffding’s Lemma [Equation] we have for any θ, θ ′ ∈ Θ ,
E
[Equation]
where
[Equation]
is the L 2 -distance between mappings l ( θ ; · ) and l ( θ ′ ; · ) with respect to the empirical distribution over
D valid and is a pseudometric in H .
Hence, by Dudley’s entropy integral inequality (see Corollary 13.2 in Boucheron et al.
, there exists a universal constant C d such that
[Equation]
According to Assumption [Equation] we have
[Equation]
Hence, with a probability of at least 1 − δ ,
[Equation]
Applying the same argument to G ′ valid ( D valid )
[Equation]
we can show that, with a probability of at least 1 − δ
G ′ valid
[Equation]
By a union bound
[Equation]
we have, with a probability of at least 1 − δ
[Equation]
which completes the proof.
Given ε > 0 , we define
[Equation]
Lemma 3.
Suppose Assumptions 1,2 and 4 hold.
There exists a universal constant C a > 0 such that, with a probability of at least 1 − δ ,
[Equation]
Suppose Assumptions 1, 2 ′ , 3 and 4 hold.
There exists a universal constant C ′ a > 0 such that, with a probability of at least 1 − δ ,
[Equation]
Proof.
We prove (22) first.
Suppose Assumptions 1, 2 ′ , 3 and 4 hold.
By Assumptions 2 ′ , we have w ∗ j = 0 for w ∈ W ∗ and j ∈ K\J , which means w j ≤ (cid:113)(cid:80)
k
∈K\J w 2 k ≤ Dist ( w, W ∗ ) ≤ ε for any w ∈ W ∗ ε and j ∈ K\J .
Let
[Equation]
Consider an index j ∈ { 1 , 2 , . .
, K } and i ∈ { 1 , 2 , . . . , n j } .
Let D train j,i be the same as D train except that z ( i ) j is replaced by another data point z ′ ( i ) j sampled from p j .
Recall (2).
We have
[Equation]
With this inequality [Equation] we can apply the McDiarmid’s inequality to show that, for any ϵ > 0 ,
[Equation]
which implies that, with a probability of at least 1 − δ ,
[Equation] [Equation]
Next [Equation] we apply the standard symmetrization strategy by introducing a ghost dataset D trainghost :=
(cid:110) D train k, ghost (cid:111)
K k =1 where
[Equation]
for
[Equation]
is a dataset independent of D train k sampled from p k .
Let { σ k,i } n k
i
=1 for k = 1 , . .
, K be Rademacher random variables.
We have
[Equation]
where (cid:98) R n train ( H , W
[Equation]
= E (cid:104)
[Equation]
(cid:105) and H = (cid:110) l ( θ ; · ) : θ ∈ Θ (cid:111) .
Let M θ,w := √ N ε K
(cid:80) k = n k
[Equation]
i =
σ k,i w k n k l ( θ ; z ( i ) k ) for θ ∈ Θ and w ∈ W ∗ ε .
Hence, by Hoeffding’s Lemma, we have
[Equation]
where
[Equation]
is a pseudo distance metric between ( l ( θ ; · ) , w ) and ( l ( θ ′ ; · ) , w ′ ) in H × W ∗ ε .
Hence, by Dudley’s entropy integral inequality (see Corollary 13.2 in Boucheron et al.
[Equation]
there exists a universal constant C d such that
[Equation]
where N ( H × W ∗ ε ; d ; ϵ ) is the ϵ -covering number of H × W ∗ ε w.r.t.
d .
We next need to bound N ( H × W ∗ ε ; d ; ϵ ) .
Note that
[Equation]
We then define a probability measure
[Equation]
on Z , where δ z ( i ) k is a point mass at z ( i ) k .
Then, we can construct an ϵ -cover for H × W ∗ ε w.r.t.
d by taking the Cartesian product of an ϵ 2 -cover for H w.r.t.
distance metric
ρ Q ( l, l ′ ) =
(cid:113)(cid:82)
Z ( l ( z ) − l ′ ( z ))
2 d Q ( z ) for l, l ′ ∈ H and a (cid:113) n train N ε ϵ 2 -cover for W ∗ ε w.r.t.
the Euclidean distance.
According to Assumption 4, the former has a cardinality of (2 C H /ϵ )
ν H .
To construct the latter, we create a (cid:113) n train ( J +1)
N ε ϵ 2 -cover for [0 , b ] corresponding to a coordinate in J and create a (cid:113)
[Equation]
[Equation] N ε ϵ 2 -cover for [0 , ε ] corresponding to a coordinate in K\J .
(Recall that w j ≤ ε for j ∈ K\J .)
Then we take the Cartesian product of these K one-dimensional covers and project it to
W ∗ ε .
This provides a (cid:113) n train N ε ϵ 2 -cover for W ∗ ε with a cardinality of
[Equation]
where the inequality is because N ε ≤ n train b 2 J by the definition of N ε .
This implies
E [ G train ( D
[Equation]
)] ≤ 2 (cid:98)
[Equation]
where the first equality is because
[Equation]
according to Assumption 4 and (31) and the second equality is by changing variable ϵ to
[Equation]
in the integral and the fact that (cid:6) 1 ϵ (cid:7) =
when ϵ > 1 .
Combining (32) with (26), we have that, with a probability of at least 1 − δ ,
[Equation]
Applying the same argument to G ′ valid ( D valid ) , we can show that the same inequality as above holds for G ′ train ( D train ) with a probability of at least 1 − δ .
By a union bound, we have, with a probability of at least 1 − δ
[Equation]
which completes the proof (22).
Next we prove (21).
Since the proof is similar to (22), we will mainly elaborate the parts that are different.
Suppose Assumptions 1,2 and 4 hold.
We define G train ( D train ) and G ′ train ( D train ) the same as in (23) and (24) except that W ∗ ε is replaced by the entire domain ∆ bK .
Following the same proof of (25), we have
[Equation]
Then the McDiarmid’s inequality implies that, with a probability of at least 1 − δ ,
[Equation]
[Equation]
By replacing W ∗ ε with ∆ bK in the proof of (27), we can show that
[Equation]
where (cid:98) R n train ( H , ∆ bK ) :
= E
[Equation]
Let N b defined as (20) with ε replaced by b , i.e., N b = n train /
( Kb 2 ) .
Let M θ,w := √ N b K (cid:80) [Equation]
= [Equation] = [Equation]
σ k,i w k n k l ( θ ; z ( i ) k ) for θ ∈ Θ and w ∈ ∆ bK .
With J replaced by ∅ and N b replaced by N ε in the proof of (28), we have
[Equation]
where
[Equation]
n train =is a pseudo distance metric between ( l ( θ ; · ) , w ) and ( l ( θ ′ ; · ) , w ′ ) in H × ∆ bK .
Hence, by Dudley’s entropy integral inequality (see Corollary 13.2 in Boucheron et al.
, there exists a universal constant C d such that
[Equation]
dϵ [Equation] where N ( H × ∆ bK ; d ; ϵ ) is the ϵ -covering number of H × ∆ bK w.r.t.
d .
Next, we just need to bound N ( H × W ∗ ε ; d ; ϵ ) .
Similar to (29), we can show that
[Equation]
Similar to (30), we define a probability measure Q = N b n train (cid:80)
k ∈K n train (cid:80) i
=
b 2 n train δ z ( i ) k on Z , where δ z ( i ) k is a point mass at z ( i ) k .
Then, we only need to construct an ϵ -cover for H × ∆ bK by taking the
Cartesian product of an ϵ 2 -cover for H w.r.t.
distance metric ρ Q and a (cid:113) n train N b
ϵ 2 -cover for ∆ bK w.r.t.
the Euclidean distance.
According to Assumption 4, the former has a cardinality of (2 C H /ϵ )
ν H .
To construct a (cid:113) n train N b
ϵ 2 -cover for ∆ bK , we first construct a (cid:113) n train KN b
ϵ 2 -cover for [0 , b ] , take its K -fold
Cartesian product, and project it to ∆ bK .
This provides a (cid:113) n train N b
ϵ 2 -cover for ∆ bK with a cardinality of (cid:108) b √ KN b √ n train ϵ (cid:109) K
= (cid:6) 1 ϵ (cid:7) K .
This implies N ( H × ∆ bK ; d ; ϵ ) ≤ (cid:0) 2 C H ϵ (cid:1)
ν H × (cid:6) 1 ϵ (cid:7) K and thus
[Equation]
[Equation]
Combining (34) with (33), we have that, with a probability of at least 1 − δ ,
[Equation]
Applying the same argument to G ′ valid ( D valid ) , we can show that the same inequality as above holds for G ′ train ( D train ) with a probability of at least 1 − δ .
By taking a union bound, we have that, with a probability of at least 1 − δ ,
[Equation]
which completes the proof of (21) as N b
= n train /
( Kb 2 ) .
D P ROOFS OF M AIN T HEOREMS AND C OROLLARIES
In this section, we provide the proofs of Theorem 1, Theorem 2 and Corollary 1.
Proof of Theorem 1.
By the strong convexity of the loss function and the optimality of θ ( w ) and (cid:98) θ ( w ) in the inner problems in (P ∗ ) and ( (cid:98) P), we have, for any w ∈ ∆ bK ,
[Equation]
Adding (35) and (36) on both sides leads to, with a probability of at least 1 − δ ,
[Equation]
where the second inequality is because the first conclusion in Lemma
[Equation]
Let w ∗ =
Proj W ∗ ( (cid:98) w ) .
Then we have, with a probability of 1 − 2 δ
[Equation]
that
[Equation]
where the first inequality is because of Assumption 1, the second is due to Lemma 2, and the last is due to (37) and the optimality of (cid:98) w for problem ( (cid:98) P).
Therefore, we can show that, with a probability of 1 − 2 δ ,
[Equation]
where the equality is because of Assumption 2, the first inequality is by Assumption 1 and the second by (37) and (38).
This completes the proof.
Proof of Theorem 2.
Since Assumption 2 ′ implies Assumption 2, the proof and the conclusion of
Theorem 1 also hold under the assumptions of Theorem 2.
In particular, inequality (38) holds with a probability of 1 − 2 δ .
According to Assumption 3 and (38), we have with a probability of 1 − 2 δ that
[Equation]
Applying the fact that s + t ≤ ( s 1 r + t 1 r ) r for any s > 0 and t > 0 to the right-hand side of the inequality above, we obtain (10) with an appropriately defined C w .
Suppose Dist ( (cid:98) w, W ∗ ) ≤ ε ( n valid , n train ) , which happens with a probability of 1 − 2 δ according to the proof above.
We have (cid:98) w ∈ W ∗ ε with ε = ε ( n valid , n train )
according to the definition in (19).
We then decompose the optimality gap of the generalization loss as follows
[Equation]
It is clear that T 3 ≤ 0 and T 5 ≤ 0 by the optimality of (cid:98) θ ( (cid:98) w ) and θ ( (cid:98) w ) in ( (cid:98) P) and (P ∗ ), respectively.
Moreover, by Assumption 2 ′ , we have w ∗ j = 0 for w ∈ W ∗ and j ∈ K\J .
Using the fact that (cid:98) w ∈ W ∗ ε , we have (cid:80) k ∈K\J (cid:98) w 2 k ≤ Dist 2 ( (cid:98) w, W ∗ ) ≤ ε 2 , which implies
T
[Equation]
Using a similar argument, we can also show
[Equation]
According to Lemma 3 and the fact that (cid:98) w ∈ W ∗ ε , we have that, with a probability of at least 1 − δ , [Equation] 
[Equation]
Note that G = (cid:113) max θ ∈ Θ (cid:80) k
∈K\J (cid:0) L 0 ( θ ) − L k
( θ ) (cid:1) 2 under Assumption 2 ′ .
Applying the upper bounds of the six terms to (39) and taking a union bound, we can show that
L
[Equation]
with a probability of at least 1 − 3 δ , which completes the proof.
Before we prove Corollary 1, we first present another corollary of Theorem 2 where we can see the impact of b more clearly.
Corollary 2.
Suppose the assumptions of Theorem 2 hold and n valid and n train are large enough such that ε ( n valid , n train ) defined in (10) satisfies ε ( n valid , n train ) ≤ b √ J K − J .
With a probability of at least 1 − 3 δ , we have
[Equation]
Proof.
Theorem 2 guarantees that (11) holds with a high probability.
When ε ( n valid , n train ) ≤ b √ J K − J , the second term on the right-hand side of (11) can be merged with the first term.
Also, we have N
[Equation]
, where the last inequality is because
K − J ≥ 1 .
As a result, the first two terms in (11) together has the order of
[Equation]
Then (40) is proved by applying the definition of ε ( n valid , n train ) to the third term on the right-hand side of (11).
Suppose n train ≫ n valid .
The first term on the right-hand side of (40) is smaller than the entire righthand side of (7).
If, in addition, G = o
(1 /n 12 − 12 r valid ) and G =
o (1 /n 14 − 14 r train ) , the other two terms in (40) are also smaller than the two terms in (7), respectively, so the bound in (40) is tighter than (7).
Proof of Corollary 1.
Corollary 1 is directly from Corollary (2) by only keeping G , n train and n test in the order of magnitude given in (40).
E G ENERALIZATION P ERFORMANCE BY T RAINING L OCALLY AND T RAINING WITH E QUALLY W EIGHTED N ODES
In this section, we first consider a model locally trained only with data D valid in node 0 , namely,
[Equation]
[Equation]
where (cid:98) L 0 is given in (3).
The generalization bound of (cid:98) θ valid is well-known, so we omit the proof but directly give the result.
Proposition 1.
Suppose Assumptions 1 and 4 hold.
There exists a universal constant C 0 > 0 such that, with a probability of at least 1 − δ ,
[Equation]
For the purpose of theoretical comparison, we also consider a model trained only with data D train distributed over equally weighted nodes, namely,
[Equation]
where (cid:98) L k is defined as in (2).
It is easy to construct an example where each p k with k ∈ K\J is significantly different from p
so that L 0 ( (cid:98) θ equal ) does not convergence to L 0 ( θ ∗ ) as n train goes to infinity.
Motivated by Corollary 1 and the discussion afterwards, it will be interesting to show the generalization bound of (cid:98) θ equal when each p k with k ∈ K\J is similar to p 0 with a small G defined in (9).
Proposition 2.
Suppose Assumptions 1, 2 ′ and 4 hold.
There exists a universal constant C a >such that, with a probability of at least 1 − 3 δ ,
[Equation]
where G is defined in (9)
[Equation]
Proof.
We first define
[Equation]
We first decompose the optimality gap of the generalization loss as follows
[Equation]
It is clear that T 3 ≤ 0 and T 5 ≤ 0 by the optimality of (cid:98) θ equal and θ equal in (42) and (43), respectively.
Moreover, we have
[Equation]
Using a similar argument [Equation] we can also show
[Equation]
Since Assumption 2 ′ implies Assumption 2, by the first statement of Lemma 3 with b = 1 K , we have, with a probability of at least 1 − δ , that
[Equation]
Applying the upper bounds of the six terms to (44) and a taking union bound [Equation] we have
[Equation]
with a probability of at least 1 − 3 δ , which completes the proof.
Note that the bound in Proposition 2 is strictly worse than the one we showed in Corollary 1 for any value of G .
In fact, the former is O (1 / √ n train + G ) and the latter is O (1 / √ n train )
+ o ( G ) F C OMMUNICATION C OMPLEXITY OF A LGORITHM 2 AND E XTENSION TO N ON - CONVE C ASE
In this section, we present the communication complexity of Algorithm 2 for convex problems as well as the corresponding algorithm and complexity for non-convex problems.
To do so, we first present the convergence property of Algorithm 1, which is originally established by Gorbunov et al.
Then, we combine the analysis by Gorbunov et al.
and Ghadimi & Wang (2018) with some minor but necessary modifications, for example, to allow for a generic weight w instead of the uniform weight in Gorbunov et al.
(2021), and to handle the approximation error between ∇ (cid:98) F ( w ) and ¯ ∇ (cid:98) F ( w ) , which is a little different from the one considered in Ghadimi & Wang (2018).
F. C ONVERGENCE P ROPERTY OF A LGORITHM
As mentioned in Section 4, we need to solve subproblems (1) and (15) in Algorithm 2, both of which are instances of (16).
Because of Assumption 1, problem (16) in these two cases satisfies the following assumption with ℓ 1 and µ exactly the same as the ℓ 1 and µ in Assumption 1.
Assumption 5.
f k,i ( x ) is convex, ∇ f k,i ( x ) is ℓ 1 -Lipschitz continuous and f k ( x ) is µ -strongly convex for i = 1 , . . .
, n k and k
= 1 , 2 , . .
, K .
A unified analysis is provided in Gorbunov et al.
(2021) for a large class of FL methods including
Local-SVRG given in Algorithm 1.
The following proposition is obtained by applying Theorem 2.
in Gorbunov et al.
(2021) to Local-SVRG under our setting after minor modifications.
It characterizes the convergence property of Algorithm 1.
We omit its proof because it is the almost the same as the proof of Theorem G.7 in Gorbunov et al.
Proposition 3.
Suppose Assumption 5 holds for (16)
[Equation]
where x ∗ be the optimal solution of (16).
F. C OMMUNICATION C OMPLEXITY OF A LGORITHM
To analyze the complexity of Algorithm [Equation] we needs to bound the error of the approximate gradient of (cid:98) F , namely, the quantity
[Equation]
and then the convergence analysis in Ghadimi & Wang (2018) can be directly applied.
This error depends the suboptimality of θ ( s ) and h ( s ) in iteration s of Algorithm 2, which can be characterized using Proposition 3.
To do so, we first bound ∥∇ f k (cid:0) x ∗ (cid:1)(cid:13)(cid:13) and ∥ x (0) − x ∗ (cid:13)(cid:13) appearing in Propositionfor these two instances.
For simplicity, we assume Local-SVRG is initialized at x (0)
= 0 when it is applied to any instance of (16).
Suppose f k,i ( θ )
=
l ( θ ; z ( i ) k ) , i = 1 , . . . , n k , k = 1 , . . .
, K and x ∗ is the optimal solution of (16), namely, x ∗ = (cid:98) θ ( w ) .
Because of Assumption 1, we have that (cid:13)(cid:13) ∇ f k (cid:0) x ∗ (cid:1)(cid:13)(cid:13) ≤ ℓ 0 for any k in any iteration s of Algorithm 2 and x ∗ = (cid:98) θ ( w ) is a continuous of w on ∆ bK , which means ∥ x (0) − x ∗ (cid:13)(cid:13)
=
∥ x ∗ (cid:13) (cid:13) 2 ≤ max w ∈ ∆ b K ∥ (cid:98) θ ( w ) ∥ 2 in any iteration s of Algorithm 2.
Suppose f k,i ( h ) =
12 h ⊤ ∇ 2 l ( θ ( s ) ; z ( i ) k )
h − h ⊤ ∇ (cid:98) L 0 ( θ ( s ) ) , i = 1 , . . . , n k , k = 1 , . . .
, K .
The optimal solution of (16) in this case is
[Equation]
which means ∥ x (0) − x ∗ (cid:13)(cid:13) 2 = ∥ x ∗ [Equation] 2 ≤ 1 µ 2 ∥∇ (cid:98) L 0 ( θ ( s ) )
∥ 2 ≤ ℓ 20 µ 2 because of Assumption 1.
Moreover,
[Equation]
so ∥∇ f k ( x ∗ ) ∥ ≤ ℓ 1 ℓ 0 µ + ℓ 0 for any k and s by Assumption 1.
Since f is µ -strongly convex, we have µ 2 ∥ x ( T ) − x ∗ ∥ 2 ≤ f ( x ( T ) (cid:1) − f ( x ∗ ) .
With this inequality and the discussion observations, we can derive from (45)
that
[Equation]
46) with R := max w ∈ ∆ bK ∥ (cid:98) θ ( w ) ∥ when Local-SVRG is applied to either (1) or (15) in any iteration of
Algorithm 2.
The following lemma bounds the error of the approximate gradient for (cid:98) F .
Lemma 4.
Suppose Assumption 5 holds and γ ≤ γ 0 with γ 0 defined in (17).
We have
E
[Equation]
where C 1 , C 2 and C 3 are constants that depend on ℓ 0 , ℓ 1 , ℓ 2 , µ , R , q and K but not τ , T s and γ .
Consequently,
• when τ = 1 , γ = γ 0 and T s = 1 γ 0 µ ln (cid:16) C 1 C 2 ( s +1) 4 γ(cid:17) OR • when τ > 1 , γ = 1 M s and T s = µ − 1 M s ln (cid:0) M 3 s (cid:1) ,
where M
[Equation]
max
[Equation] [Equation] ] (cid:27) , we have E (cid:2)(cid:13)(cid:13) ∇ (cid:98) F ( w ( s ) md [Equation]
¯
[Equation]
w [Equation] ≤ 1 ( s +
[Equation]
Moreover, when
τ = 1 , γ = γ 0 and T s = 1 γ 0 µ ln (cid:16) C 1 C 2 ( s +1)
2 γ
(cid:17) OR
• when τ > 1 , γ = 1 M ′ s and T s = µ − 1 M ′ s ln (cid:0) M ′ 3 s (cid:1) ,
where
[Equation]
3 ( τ − 1))
+ C 4 ( τ − 1) 2 ] (cid:27) , we have E (cid:2)(cid:13)(cid:13) ∇ (cid:98) F ( w ( s ) md ) − ¯ ∇ (cid:98) F ( w ( s ) md ) (cid:13)(cid:13) 2 (cid:3) ≤ 1 ( s +1) 2 .
Proof.
Let (cid:101) ∇ (cid:98) F ( w ( s ) md ) =
( (cid:101) ∇ k (cid:98) F ( w ( s ) md ))
k
=1 ,...,K , where (cid:101) ∇ k (cid:98) F ( w ( s ) md ) = −∇ (cid:98)
L k ( θ ( s ) )
⊤ (cid:32) K (cid:88) k
= w ( s ) md ,k ∇ 2 (cid:98)
L k ( θ ( s ) ) (cid:33) −∇ (cid:98) L 0 ( θ ( s ) ) .
Recall that ¯ ∇
[Equation]
(cid:98) L k (
[Equation]
( s ) ) ⊤ h ( s ) .
[Equation]
According to Lemma 2.2 in Ghadimi & Wang (2018) and (46)
[Equation]
we have
[Equation]
Combining (49) and (50) by the triangle inequity leads to (47).
When τ = 1 , γ = γ 0 and T s = 1 γ
[Equation]
ln (cid:16)
[Equation]
C
[Equation]
+
[Equation]
µ (cid:17) , it is easy to show that E (cid:2)(cid:13)(cid:13) ∇ (cid:98) F ( w ( s ) md ) − ¯ ∇ (cid:98) F ( w ( s ) md ) (cid:13)(cid:13) 2 (cid:3) ≤ 1 ( s +1) 4 .
Suppose τ > 1 , γ = 1 M s and T s = µ − 1 M s ln (cid:0) M 3 s (cid:1) .
We have
E (cid:2)(cid:13)(cid:13) ∇ {+(cid:98) F ( w ( s ) md ) − ¯ ∇ (cid:98) F ( w ( s ) md ) (cid:13)(cid:13) 2 (cid:3) ≤ C 1 γ (cid:16) 1 − γµ (cid:17) T s +
+}
( C 2 + C 3 ( τ − 1))
+ C 4 γ 2 ( τ − 1)≤ exp (cid:18) − µT s M s (cid:19) M s C 1 ( C 2 + C 3 ( τ − 1)) + C 4 (
[Equation]
The conclusion with E (cid:2)(cid:13)(cid:13) ∇ (cid:98) F ( w ( s ) md ) − ¯ ∇ (cid:98) F ( w ( s ) md ) (cid:13)(cid:13) 2 (cid:3) ≤ 1 ( s +1) 2 can be proved in the same way except that ( s + 1) 4 must be changed to ( s + 1) 2 , and thus we omit the proof.
The complexity of Algorithm 2 when (cid:98) F ( w ) is convex can be showed using the proof in Ghadimi &
Wang (2018) with their gradient approximation error replaced by the one in Lemma 4.
Proof of Theorem 3.
According to Lemma 2.2 in Ghadimi & Wang (2018), (cid:98) F ( w ) is ℓ F -smooth with ℓ F defined in (12).
Let E s :=
(cid:13)(cid:13) ∇ (cid:98) F ( w ( s ) md ) − ¯ ∇ (cid:98) F ( w ( s ) md ) (cid:13)(cid:13)
According to (2.51) in Ghadimi & Wang (2018), we have
[Equation]
where the second inequality is because ∥ (cid:98) w − w ( s +1)
∥ ≤ 2 as both (cid:98) w and w ( s +1) are on a simplex.
Subtracting (cid:98) F ( (cid:98) w ) from both sides of the inequality above and dividing both sides by 2 ( s +1)( s +2) , we have
[Equation]
Summing up this inequality for s = 0 , 1 , . .
, S − 1 gives
S ( S + 1)
[Equation]
, which, when E (cid:2) E 2 s (cid:3) ≤ 1 ( s + [Equation] 4 , implies
[Equation]
This means,
as long as E (cid:2) E 2 s (cid:3) ≤ 1 ( s +2) 4 , Algorithm 2 finds an ϵ -optimal solution of ( (cid:98) P) in ˜ O
( ϵ − 0 . 5 ) iterations.
Let A 1 = C 1 C 2 , A 2 = C 1 C 3 and A 3 = C 1 C 4 with C 1 , C 2 , C 3 and C 4 defined in Lemma 4.
Suppose τ = 1 , γ = γ 0 and T s = 1 γ 0 µ ln (cid:16) A 1 ( s +1) 4 γ(cid:17) .
By Lemma 4, we have E (cid:2)
E 2 s (cid:3) ≤ 1 ( s +2) 4 .
In iteration s of Algorithm 2, the total number of rounds of communication needed in Local-SVRG is
O ( T s )
=
O (ln( s ))
so that means the total number of rounds is ˜ O
( ϵ − 0 . 5 ) .
Suppose τ > 1 , γ = 1 M s and T s = µ − 1 M s ln (cid:0) M 3 s (cid:1) .
By Lemma 4, we have E (cid:2)
E 2 s (cid:3) ≤ 1 ( s +2) 4 .
In iteration s of Algorithm 2, the total number of rounds of communication needed in Local-SVRG is
O ( T s /τ )
=
O ( s 2 ) so that means the total number of rounds is ˜ O
( ϵ − 1 . 5 ) .
F. A LGORITHM AND C OMMUNICATION C OMPLEXITY FOR N ON -C ONVEX (cid:98) F
When (cid:98) F in ( (cid:98) P) is non-convex, we no long expect any algorithm to find an ϵ -optimal solution and change our goal to finding an ϵ -stationary point of ( (cid:98) P), which is defined as a solution ¯ w ∈ ∆ bK satisfying
[Equation]
for some η > 0 .
There exist multiple numerical techniques for finding an ϵ -stationary, among which the proximal gradient method is the simplest one.
When the gradient can only be computed inexactly, there exist studies on the iteration complexity of the proximal gradient method for finding an ϵ -stationary point, including Ghadimi & Wang (2018) for bilevel optimization and Gu et al.
(2018) for a general problem.
We will simply apply the proximal gradient method to ( (cid:98) P) using the approximate gradient ¯ ∇ (cid:98) F ( w ) in (14).
We formally present this approach in Algorithm 3.
Again, the center is node 0, i.e., the node where D valid is stored.
n k
F ( w ( s ) ) , w (cid:69) + 1 2 η ∥ w − w ( s ) ∥12 end 13 Return : w (¯ s ) with ¯ s sampled randomly from { 0 , 1 , . . .
, S − 1 } .
The convergence result of Algorithm 3 can be proved in a standard way (e.g., see Theorem 2.1 in
Ghadimi & Wang (2018)).
We present it below only for the sake of completeness.
Theorem 4.
Suppose Assumption 1 holds.
Let R := max w ∈ ∆ bK ∥ (cid:98) θ ( w ) ∥ and ℓ F and γ 0 defined as in (12) and (17).
Suppose η = 13 ℓ F in Algorithm 3.
There exist constants A 1 , A 2 and A 3 that only depend on ℓ 0 , ℓ 1 , ℓ 2 , µ , R , q and K but not on τ such that the following statements hold.
• Suppose τ = 1 , γ = γ 0 and T s = [Equation] 0 µ ln (cid:16)
A
[Equation]
s
[Equation]
(cid:17) . Algorithm 3 finds an ϵ -stationary solution of ( (cid:98) P) with ˜ O (cid:0) ϵ − 2 (cid:1) rounds of communication. • Suppose τ > 1 , γ = 1 M ′ s and T s = µ − 1 M ′ s ln (cid:0) M ′ 3 s (cid:1) , where
[Equation]
Algorithm 3 finds an ϵ -stationary solution of ( (cid:98) P) with ˜ O (cid:0) ϵ − 4 (cid:1) rounds of communication.
Proof.
Let E s :=
(cid:13) (cid:13) ∇ (cid:98) F ( w ( s ) ) − ¯ ∇ (cid:98) F ( w ( s ) )
(cid:13) (cid:13) .
Since w ( s +1) =
Proj ∆ bK ( w ( s ) − η ¯ ∇ (cid:98) F
( w ( s ) )) , by the property of projection mapping, we have
[Equation]
[Equation]
By the definition of w ( s +1) and the 1 η -strong convexity of function (cid:68) ¯ ∇ (cid:98) F ( w ( s ) ) , w
[Equation]
+ 1 2 η ∥ w − w ( s ) ∥ 2 , we have, for any w ∈ ∆ bK
[Equation]
Taking w = w ( s ) in (53) gives
[Equation]
[Equation] Since (cid:98) F is ℓ F -Lipschitz continuous and η ≤ 1 ℓ F , we have
[Equation]
Adding (54) and(55) gives us
[Equation]
which, together with (52), implies
[Equation]
Summing this inequality and taking expectation give us
[Equation]
(cid:98) F ( w (0) ) − (cid:98) F ( (cid:98) w ) (cid:105) [Equation]
[Equation]
S − 1 (cid:88) s =
E (cid:2)
E s (cid:3) + 2 S S − 1 (cid:88) s = E (cid:2) E 2 s (cid:3) . When E (cid:2) E 2 s (cid:3) ≤ 1 ( s +1) 2 , the inequality above implies
[Equation]
This means,
as long as E (cid:2) E 2 s (cid:3) ≤ 1 ( s +1) 2 , Algorithm 3 finds an ϵ -stationary solution of ( (cid:98) P) in ˜ O
( ϵ − 2 ) iterations.
Note that Lemma 4 still holds with w ( s ) md replaced by w ( s ) in Algorithm 3.
Let A 1 = C 1 C 2 , A 2 =
C 1 C 3 and A 3 = C 1 C 4 with C 1 , C 2 , C 3 and C 4 defined in Lemma 4.
Suppose τ = 1 , γ = γ 0 and T s = 1 γ 0 µ ln (cid:16) A 1 ( s +1) 2 γ(cid:17) .
By Lemma 4, we have E (cid:2)
E 2 s (cid:3) ≤ 1 ( s +2) 2 .
In iteration s of Algorithm 3, the total number of rounds of communication needed in Local-SVRG is
O ( T s )
=
O (ln( s ))
so that means the total number of rounds is ˜ O
( ϵ − 2 ) .
Suppose τ > 1 , γ = 1 M ′ s and T s = µ − 1 M ′ s ln (cid:0) M ′ 3 s (cid:1) .
By Lemma 4, we have E (cid:2)
E 2 s (cid:3) ≤ 1 ( s +2) 4 .
In iteration s of Algorithm 3, the total number of rounds of communication needed in Local-SVRG is
O ( T s /τ )
=
O ( s ) so that means the total number of rounds is ˜ O
( ϵ − 4 ) .
Remark 1.
The federated bilevel optimization methods by Li et al.
and Tarzanagh et al.
(2022) can find an ϵ -stationary point within ˜ O
( ϵ − 3 ) and ˜ O
( ϵ − 4 ) rounds of communication, respectively.
In the first setting of Theorem 4 ( τ = 1 ), Algorithm 3 has complexity of ˜ O
( ϵ − 2 ) , which is better than Li et al.
and Tarzanagh et al.
We want to point out that the lower complexity of Algorithm 3 is because it utilizes the finite-sum structure in ( (cid:98) P), which allows computing a deterministic gradient infrequently to accelerate the convergence.
However, Li et al.
and Tarzanagh et al.
(2022) both consider objective functions given in expectation, which does not allow computing a deterministic gradient in general.
One can check the following Table 2 for a comparison.
G A DDITIONAL M ATERIALS FOR N UMERICAL E XPERIMENTS
In this section, we present additional details and results of our numerical experiments in Section 5.
The CNN we train in the experiments consists of two layers of 2D convolution, each equipped with 2D batch normalization and ReLU activation, and followed by a fully connected layer to generate [Table] predictions.
The first convolution layer is set to output the same number of channels as the input, and uses kernels with a size of 4 , a stride of 4 and one padding.
The second convolution layer returns two output channels for Fashion-MNIST and MNIST and five for CIFAR-10 and ImageNet, and uses kernels with a size of 2 , a stride of 2 and one padding.
All experiments are conducted with
PyTorch 1.9.0 and CUDA 11.1 computing platform on a computer with the CPU Intel Xeon Gold 6330@2.0GHz (Turbo up to 3.1GHz) and the GPU NVIDIA GeForce RTX 2080 Ti.
G. D ATA G ENERATION WITH D IFFERENT C LASS D ISTRIBUTIONS (S ETTING 1)
In this section, we describe in details how we generate D valid , D train and D test from each original dataset for our experiments under Setting 1.
G.1. F ASHION -MNIST
Fashion-MNIST (Xiao et al., 2017) contains a training set of 60,000 images and a testing set of 10,000 images.
Each image is in grayscale, has a size of 28 × 28 , and is associated with a label from ten classes: 0: T-shirt/top, 1: Trouser, 2: Pullover, 3: Dress, 4: Coat, 5: Sandal, 6: Shirt, 7: Sneaker, 8: Bag and 9: Ankle boot.
We merge the ten classes into four classes as follows:
C1: Classes 2 , 4 and 6 which include long-sleeve upper-body clothes; C2: Classes 0 and 3 which include short-sleeve upper-body clothes; C3: Classes 1 and 8 which include pants and bags; C4: Classes 5 , 7 and 9 which include only shoes.
Note that these four merged classes are only used for generating data.
In the classification task, we still have ten classes.
This is the same for the other three datasets.
We set n train = 4000 , n valid =and n test = 5000 .
Each image is sampled from one of the four merged classes with a probability distribution ( P 1 , P 2 , P 3 , P 4 ) .
Once a merged class is chosen, each image in that merged class has an equal chance to be sampled.
For D train k with k ∈ J , we sample data from the training set with
P 1 = 0 .
42 , P 2 = 0 .
08 , P 3 = 0 .
38 and P 4 = 0 .
For D train k for k ∈ J M , we sample data with
P 1 = 0 .
12 , P 2 = 0 .
38 , P 3 = 0 .
08 and P 4 = 0 .
Depending on p 0 is the distribution of J m or
J M , D valid and D test are sampled from p
the corresponding distribution.
Note that D valid and D test are sampled from the training set and testing set of the original data, respectively, although they have the same probability distribution over the four merged classes.
Since D valid and D test are generated in the similar way for the other three datasets, we will only discuss the generation of D train k ’s in the subsequent sections.
G.1. MNIST
MNIST (Deng, 2012) contains a training set of 60,000 images and a testing set of 10,000 images.
Each image is a handwritten digit in grayscale and has a size of 28 × 28 .
Since MNIST has the same number of classes, same class distribution, and same data size as Fashion-MNIST, we directly apply the same procedure in Section G.1.1 to sample data.
In particular, we merge the ten digits into four classes as follows:
C1: Digits 2 , 4 and 6 ; C2: Digits 0 and 3 ; C3: Digits 1 and 8 ; C4: Digits 5 , 7 and 9 .
We set n train = 4000 , n valid = 500 and n test = 5000 .
Following Section G.1.1, for D train k with k ∈ J m , we sample data from the four merged classes with P 1 = 0 .
42 , P 2 = 0 .
08 , P 3 = 0 .
38 and
P 4 = 0 .
For D train k with k ∈ J M , we sample data with P 1 = 0 .
12 , P 2 = 0 .
38 , P 3 = 0 .
08 and
P 4 = 0 .
G.1. CIFAR-
CIFAR-10 (Krizhevsky et al., 2009) contains a training set of 50,000 images and a testing set of 10,000 images.
Each image is in color, has a size of 32 × 32 , and is associated with a label from ten classes: 0: airplane, 1: automobile, 2: bird, 3: cat, 4: deer, 5: dog, 6: frog, 7: horse, 8: ship and 9: truck.
We merge the ten classes into four classes as follows:
C1: Classes 1 and 9 which are related to ground transportation; C2: Classes 0 and 8 which are related to non-ground transportation; C3: Classes 2 , 3 and 4 which form a set of animals; C4: Classes 5 , 6 and 7 which form another set of animals.
We set n train = 4000 , n valid = 500 and n test = 5000 .
Similar to the procedure with Fashion-MNIST, for D train k with k ∈ J m , we sample data from the four merged classes with P 1 = 0 .
36 , P 2 = 0 .
P 3 = 0 .
54 and P 4 = 0 .
For D train k with k ∈ J M , we sample data with P 1 = 0 .
04 , P 2 = 0 .
P 3 = 0 .
06 and P 4 = 0 .
G.1. D OWNSAMPLED I MAGE N ET
Downsampled ImageNet (Chrabaszcz et al., 2017) is created by downsampling each image in ImageNet (Deng et al. , 2009) to 32 × 32 pixels without changing the class labels.
Just as ImageNet, downsampled ImageNet has 1000 classes and we choose ten classes and merge them into four classes as follows.
(The class labels listed below are consistent with ImageNet.)
C1: Classes 7 , 9 , 10 , 29 , 54 , 75 , 84 and 189 , which are cats or animals similar to cat; C2: Classes 61 , 66 , 68 , 101 , 114 , 124 , 131 and 148 , which are dogs or animals similar to cat; C2: Classes 383 , 397 , 403 , 404 , 405 , 406 , 412 , 414 , 420 , 426 , 433 and 434 , which are all birds; C3: Classes 224 , 441 , 442 , 443 , 444 , 445 , 449 , 453 , 454 , 498 , 499 and 500 , which are either fishes or frogs.
We set n train = 4000 , n valid = 1500 , n test = 1000 .
For D train k for k ∈ J m , we sample data from the four merged classes with P 1 = 0 .
36 , P 2 = 0 .
04 , P 3 = 0 .
54 and P 4 = 0 .
For D train k with k ∈ J M , we sample data with P 1 = 0 .
04 , P 2 = 0 .
36 , P 3 = 0 .
06 and P 4 = 0 .
G.1. C OVTYPE
Covtype (Blackard & Dean, 1999) is an imbalanced dataset of 581,012 instances. Each instance records ten features in integer value and two categorical features one-hot encoded into 44 binary values, and is associated with a label from seven classes: 1: Spruce/Fir, 2: Lodgepole Pine, 3: Ponderosa Pine, 4: Cottonwood/Willow, 5: Aspen, 6: Douglas-fir, 7: Krummholz.
According to the imbalance on class labels, we merge the seven classes into four classes as follows:
C1: Classes 1 which consists of approximately 36 .
5% of the raw data; C2: Classes 2 which consists of approximately 48 .
8% of the raw data; C3: Classes 3 which consists of approximately 6 .
2% of the raw data; C4: Classes 4 , 5 , 6 and 7 which consist of the rest
We set n train = 40000 , n valid = 5000 and n test = 50000 .
Similar to the procedure with FashionMNIST, for D train k with k ∈ J m , we sample data from the four merged classes with P 1 = 0 .
P 2 = 0 .
14 , P 3 = 0 .
12 and P 4 = 0 .
For D train k with k ∈ J M , we sample data with P 1 = 0 .
P 2 = 0 .
82 , P 3 = 0 .
06 and P 4 = 0 .
We train a liner multi-class logistic regression model using the same computing platform in this experiment as before.
We use a mini batch of size 400 to construct the stochastic gradients in all methods.
In the Bi-level method, Algorithm 3 is applied to ( (cid:98) P) with b = 1 / 3 and five epochs are performed within each call of Local-SVRG (i.e., T s = 5 n train / 400 ).
We set q = 1 / 100 .
Other parameters are the same as our choice in Section 5.
We only run Setting 1 with one random seed on this dataset.
The results are shown in Figure 3.
G. D ATA G ENERATION WITH D IFFERENT C LASS D ISTRIBUTIONS AND L ABEL P ERMUTATION (S ETTING 2)
In this section, we discuss in details how D train , D valid and D test are generated from each original dataset for our experiments under Setting 2.
For each dataset, we first sample data D train , D valid and
D test in the same way as Setting 1 described in Section G.1.
Then we permute the class labels in
D train k with k ∈ J M .
For each dataset, the class labels in D train k with k ∈ J m are unchanged.
If pis the distribution of J M , the labels of D valid and D test are permuted in the same way as D train k with k ∈ J M .
If p 0 is the distribution of J m , the labels of D valid and D test are unchanged.
We then describe how the class labels in D train k for k ∈ J M are permuted for each dataset.
For
Fashion-MNIST and MNIST, we permute the class labels in D train k for k ∈ J M by changing labelto 0, 0 to 1, 1 to 5, and 5 to 2.
For CIFAR-10, we permute the class labels in D train k for k ∈ J M by changing label 1 to 0, 0 to 2, 2 to 5, and 5 to 1.
For downsampled ImageNet, we permute the class labels in D train k for k ∈ J M by changing label 7 to 61, 61 to 383, 383 to 224, 224 to 9, 9 to 66, 66 to 397, 397 to 441, 441 to 10, 10 to 68, 68 to 403, 403 to 442, and 442 to 7.
G. D ATA G ENERATION WITH D IFFERENT C LASS D ISTRIBUTIONS , L ABEL P ERMUTATION AND / OR R ANDOM R OTATION (S ETTINGS 3 AND 4)
In this section, we discuss in details how we generate D valid , D train and D test from each original dataset for our experiments under Settings 3 and 4.
Under Setting 3, we first generate data in the same way as in Setting 1 described in Section G.1.
Then, we randomly choose a rotation direction, clockwise or anti-clockwise, and rotate each image in D train k with k ∈ J M toward that direction for 90 degrees.
Under Setting 4, we first generate data in the same way as in Setting 2 described in Section G.2.
Then, we apply the same rotation procedure as we do in Setting 3.
G. A DDITIONAL N UMERICAL R ESULTS
In this section, we first plot how the weight w k for each node evolves during the Bi-level method under Setting 2, 3 and 4 respectively in Figure 4, Figure 5 and Figure 6.
We show the results when p 0 is the distribution of the majority and the minority groups separately.
Since the performance of an algorithm may fluctuate during training, we are interested in comparing the methods in the best performance they achieved during training.
To do so, we save the model generated by each method at the iteration where the highest accuracy is achieved on the validation data.
Then, we report the performance of the saved model’s by each method on the testing set in
Table 3.
Again, we show the results when p 0 is the distribution of the majority and the minority groups separately.
Our method outperforms the baselines in most of the cases.
Next, we plot the test (top-1) accuracy each method obtains during iterations for the minority group and the majority group in Figure 8 and Figure 9, respectively, where the horizontal axis represents the cumulative number of data points each method processes in parallel. At last, we give the results of the ablation study.
We choose the case of Setting 2 Seed 1, and consider four choices on the size of the validation dataset D valid , i.e. n 0 . The choices are 100, 200, 500 and 1000 for Fashion-MNIST, MNIST and CIFAR- 10, and 1000, 1200, 1500 and 2000 for the downsampled 32 × 32 ImageNet. Similarly, we save the model generated by our Bi-level method at the iteration where the highest accuracy is achieved on the respective validation data.
[-p 
 i s M i no r it y p 
-]Then, we report the test (top-1) accuracy each method obtains during iterations for the minority group in Table 4 and the majority group in Table
[Figure]
M
[Figure]
[-p 
-]M
[Figure]
[-M i no r it y p 
 i s M a j o r it y-][Figure]
[Figure]
{+F-MNIST MNIST CIFARDS-ImageNet p 
+} i s
M i no r it y p
i s
M a j o r it y
[Table]
[Table]
[Table]
[Figure]
[Figure] [Figure]