M ULTI -L EVEL L OCAL SGD: D ISTRIBUTED SGD FOR H ETEROGENEOUS H IERARCHICAL N ETWORKS
Timothy , Anirban Das, and Stacy Patterson
A BSTRACT
We propose Multi-Level Local SGD, a distributed stochastic gradient method for learning a smooth, non-convex objective in a multi-level communication network with heterogeneous workers.
Our network model consists of a set of disjoint subnetworks, with a single hub and multiple workers; further, workers may have different operating rates.
The hubs exchange information with one another via a connected, but not necessarily complete, communication network.
In our algorithm, sub-networks execute a distributed SGD algorithm, using a hub-and-spoke paradigm, and the hubs periodically average their models with neighboring hubs.
We ﬁrst provide a uniﬁed mathematical framework that describes the Multi-Level
Local SGD algorithm.
We then present a theoretical analysis of the algorithm; our analysis shows the dependence of the convergence error on the worker node heterogeneity, hub network topology, and the number of local, sub-network, and global iterations.
We illustrate the effectiveness of our algorithm in a multi-level network with slow workers via simulation-based experiments.
I NTRODUCTION
Stochastic Gradient Descent (SGD) is a key algorithm in modern Machine Learning and optimization (Amari, 1993).
To support distributed data as well as reduce training time, Zinkevich et al.
(2010) introduced a distributed form of SGD.
Traditionally, distributed SGD is run within a huband-spoke network model: a central parameter server (hub) coordinates with worker nodes.
At each iteration, the hub sends a model to the workers.
The workers each train on their local data, taking a gradient step, then return their locally trained model to the hub to be averaged.
Distributed SGD can be an efﬁcient training mechanism when message latency is low between the hub and workers, allowing gradient updates to be transmitted quickly at each iteration.
However, as noted in Moritz et al.
(2016), message transmission latency is often high in distributed settings, which causes a large increase in overall training time.
A practical way to reduce this communication overhead is to allow the workers to take multiple local gradient steps before communicating their local models to the hub.
This form of distributed SGD is referred to as Local SGD (Lin et al., 2018; Stich, 2019).
There is a large body of work that analyzes the convergence of Local SGD and the beneﬁts of multiple local training rounds (McMahan et al., 2017; Wang & Joshi, 2018; Li et al., 2019).
Local SGD is not applicable to all scenarios.
Workers may be heterogeneous in terms of their computing capabilities, and thus the time required for local training is not uniform.
For this reason, it can be either costly or impossible for workers to train in a fully synchronous manner, as stragglers may hold up global computation.
However, the vast majority of previous work uses a synchronous model, where all clients train for the same number of rounds before sending updates to the hub (Dean et al., 2012;
Ho et al., 2013; Cipar et al., 2013).
Further, most works assume a hub-and-spoke model, but this does not capture many real world settings.
For example, devices in an ad-hoc network may not all be able to communicate to a central hub in a single hop due to network or communication range limitations.
In such settings, a multi-level communication network model may be beneﬁcial.
In ﬂying ad-hoc networks (FANETs), a network architecture has been proposed to improve scalability by partitioning the UAVs into mission areas (Bekmezci et al., 2013).
Here, clusters of UAVs have their own clusterheads, or hubs, and these hubs communicate through an upper level network, e.g., via satellite.
Multi-level networks have also been utilized in Fog and Edge computing, a paradigm de- signed to improve data aggregation and analysis in wireless sensor networks, autonomous vehicles, power systems, and more (Bonomi et al., 2012; Laboratory, 2017; Satyanarayanan, 2017).
Motivated by these observations, we propose Multi-Level Local SGD (MLL-SGD), a distributed learning algorithm for heterogeneous multi-level networks.
Speciﬁcally, we consider a two-level network structure.
The lower level consists of a disjoint set of hub-and-spoke sub-networks , each with a single hub server and a set of workers.
The upper level network consists of a connected, but not necessarily complete, hub network by which the hubs communicate.
For example, in a Fog
Computing application, the sub-network workers may be edge devices connected to their local data center, and the data centers act as hubs communicating over a decentralized network.
Each subnetwork runs one or more Local SGD rounds, in which its workers train for a local training period, followed by model averaging at the sub-network’s hub.
Periodically, the hubs average their models with neighbors in the hub network.
We model heterogeneous workers using a stochastic approach; each worker executes a local training iteration in each time step with a probability proportional to its computational resources.
Thus, different workers may take different numbers of gradient steps within each local training period.
Note since MLL-SGD averages every local training period, regardless of how many gradient steps each worker takes, slow workers do not slow algorithm execution.
We prove the convergence of MLL-SGD for smooth and potentially non-convex loss functions.
We assume data is distributed in an IID manner to all workers.
Further, we analyze the relationship between the convergence error and algorithm parameters and ﬁnd that, for a ﬁxed step size, the error is quadratic in the number of local training iterations and the number of sub-network training iterations, and linear in the average worker operating rate.
Our algorithm and analysis are general enough to encompass several variations of SGD as special cases, including classical SGD (Amari, 1993), SGD with weighted workers (McMahan et al., 2017), and Decentralized Local SGD with an arbitrary hub communication network (Wang & Joshi, 2018).
Our work provides novel analysis of a distributed learning algorithm in a multi-level network model with heterogeneous workers.
The speciﬁc contributions of this paper are as follows. 1) We formalize the multi-level network model with heterogeneous workers, and we deﬁne the MLL-SGD algorithm for training models in such a network.
We provide theoretical analysis of the convergence guarantees of MLLSGD with heterogeneous workers.
We present an experimental evaluation that highlights our theoretical convergence guarantees.
The experiments show that in multi-level networks, MLL-SGD achieves a marked improvement in convergence rate over algorithms that do not exploit the network hierarchy.
Further, when workers have heterogeneous operating rates, MLL-SGD converges more quickly than algorithms that require all workers to execute the same number of training steps in each local training period.
The rest of the paper is structured as follows.
In Section 2, we discuss related work.
Sectionintroduces the system model and problem formulation.
We describe MLL-SGD in Section 4, and we present our main theoretical results in Section 5.
Proofs of these results are deferred to the appendix.
We provide experimental results in Section 6.
Finally, we conclude in Section 7.
R ELATED W ORK
Distributed SGD is a well studied subject in Machine Learning.
Zinkevich et al.
(2010) introduced parallel SGD in a hub-and-spoke model.
Variations on Local SGD in the hub-and-spoke model have been studied in several works (Moritz et al., 2016;
Zhang et al., 2016; McMahan et al., 2017).
Many works have provided convergence bounds of SGD within this model (Wang et al., 2019b; Li et al., 2019).
There is also a large body of work on decentralized approaches for optimization using gradient based methods, dual averaging, and deep learning (Tsitsiklis et al., 1986; Jin et al., 2016;
Wang et al., 2019a).
These previous works, however, do not address a multi-level network structure.
In practice, workers may be heterogeneous in nature, which means that they may execute training iterations at different rates.
Lian et al.
(2017) addressed this heterogeneity by deﬁning a gossipbased asynchronous SGD algorithm.
In Stich (2019), workers are modeled to take gradient steps at an arbitrary subset of all iterations.
However, neither of these works address a multi-level network model.
Grouping-SGD (Jiang et al., 2019) considers a scenario where workers can be clustered into groups, for example, based on their operating rates.
Workers within a group train in a synchronous manner, while the training across different groups may be asynchronous.
The system model differs signiﬁcantly from that in MLL-SGD in that as the model parameters are partitioned vertically across multiple hubs, and workers communicate with every hub.
Several recent works analyze Hierarchical Local SGD (HL-SGD), an algorithm for training a model in a hierarchical network.
Different from MLL-SGD, HL-SGD assumes the hub network topology is a hub-and-spoke and also that workers are homogeneous.
Zhou & Cong (2019) and Liu et al.
(2020) analyze the convergence error of HL-SGD, while Abad et al.
(2020) analyzes convergence time.
Unlike HL-SGD, MLL-SGD accounts for an arbitrary hub communication graph, and MLL-SGD algorithm execution does not slow down in the presence of heterogeneous worker operating rates.
Several other works seek to encapsulate many variations of SGD under a single framework.
Koloskova et al.
(2020) created a generalized model that considers a gossip-based decentralized
SGD algorithm where the communication network is time-varying.
However, this work does not account for a multi-level network model nor worker heterogeneity.
Wang et al. introduced the Cooperative SGD framework (Wang & Joshi, 2018), a model that includes communication reduction through local SGD steps and decentralized mixing between homogeneous workers.
Cooperative
SGD also allows for auxiliary variables.
These auxiliary variables can be used to model SGD in a multi-level network, but only when sub-network averaging is immediately followed by hubs averaging with their neighbors in the hub network.
Our model is more general; it considers heterogeneous workers and it allows for an arbitrary number of averaging rounds within each sub-network between averaging rounds across sub-networks, which is more practical in multi-level networks where inter-hub communication is slow or costly.
S YSTEM M ODEL AND P ROBLEM F ORMULATION
In this section, we introduce our system model, the objective function that we seek to minimize, and the assumptions we make about the function.
We consider a set of D sub-networks D = { 1 , . . .
, D } .
Each sub-network d ∈ D has a single hub and a set of workers M ( d ) , with | M ( d ) | =
N ( d ) .
Workers in M ( d ) only communicate with their own hub and not with any other workers or hubs.
We deﬁne the set of all workers in the system as M = (cid:83) Dd =1 M ( d ) .
Let | M | = N .
Each worker i holds a set S ( i ) of local training data.
Let
S =
(cid:83) Ni =1 S ( i ) .
The set of all D hubs is denoted C .
The hubs communicate with one another via an undirected, connected communication graph G =
( C , E ) .
Let N d
= { j | e d,j ∈ E } denote the set of neighbors of the hub in sub-network d in the hub graph G .
Let the model parameters be denoted by x ∈ R n .
Our goal is to ﬁnd an x that minimizes the following objective function over the training set:
[Equation]
where f ( · ) is the loss function.
The workers collaboratively minimize this loss function, in part by executing local iterations of SGD over their training sets.
For each executed local iteration, a worker samples a mini-batch of data uniformly at random from its local data.
Let ξ be a randomly sampled mini-batch of data and let g ( x ; ξ ) = 1 | ξ | (cid:80) s ∈ ξ ∇ f
( x ; s ) be the mini-batch gradient.
For simplicity, we use g ( x ) instead of g ( x ; ξ ) from here on.
Assumption 1.
The objective function and the mini-batch gradients satisfy the following:
1a The objective function F : R n → R is continuously differentiable, and the gradient is Lipschitz with constant L > 0 , i.e., (cid:107)∇ F ( x ) − ∇ F ( y ) (cid:107) 2 ≤ L (cid:107) x − y (cid:107) 2 for all x , y ∈ R n .
1b
The function F is lower bounded, i.e., F ( x ) ≥ F inf > −∞ for all x ∈ R n .
1c The mini-batch gradients are unbiased, i e., E ξ | x [ g ( x )]
= ∇ F ( x ) for all x ∈ R n . 1d There exist scalars β ≥ 0 and σ ≥ 0 such that E ξ | x (cid:107) g
( x ) −∇ F ( x ) (cid:107) 22 ≤ β ||∇ F ( x ) ||
+ σfor all x ∈ R n .
Assumption 1a requires that the gradients do not change too rapidly, and Assumption 1b requires that our objective function is lower bounded by some F inf .
Assumptions 1c and 1d assume that
1: Initialize: y ( d ) 1 for hubs d = 1 , . . .
, D 2: for k = 1 , . .
, K do 3: parallel for d ∈ D do 4: parallel for i ∈ M
( d ) do 5: x ( i )
k ← y ( d ) k (cid:46) Workers receive updated model from hub 6: for j = k, . .
, k + τ − 1 do 7: x ( i )
k
+1 ← x ( i ) k − η g
( i ) k
(cid:46)
Local iteration (probabilistic) 8: end for 9: end parallel for 10: z ( d ) ← (cid:80) i ∈M ( d ) v ( i ) x ( i ) k
+ (cid:46)
Hub d computes average of its workers’ models 11: if k mod q · τ = 0 then 12: y ( d ) k +1 ← (cid:80) j ∈N ( d ) H j,d z ( j ) (cid:46)
Hub d averages its model with neighboring hubs 13: else 14: y ( d )
k +1 ← z ( d ) 15: end if 16: end parallel for 17: end for the local data at each worker can be used as an unbiased estimate for the full dataset with the same bounded variance.
These assumptions are common in convergence analysis of SGD algorithms (e.g.,
Bottou et al.
A LGORITHM
We now present our Multi-Level Local SGD (MLL-SGD) algorithm.
The pseudocode is shown in
Algorithm 1.
Each sub-network trains in parallel and, periodically, the hubs average their models with neighboring hubs.
The steps corresponding to Local SGD are shown in lines 5-10.
Each hub and worker stores a copy of the model.
For worker i ∈ M ( d ) , we denote its copy of the local model by x ( i ) .
We denote the model at hub d by y ( d ) .
The hub ﬁrst sends its model to its workers, and the workers update their local models to match their hub’s model.
Workers then execute multiple local training iterations, shown in line 7, to reﬁne their local models independently.
To represent the different rates of computation at each worker, we use a probabilistic approach.
We assume that, in expectation, a worker i execute τ ( i ) local iterations for every τ time steps ( τ ( i ) ≤ τ ).
We thus deﬁne the N-vector p where each entry p i
= τ ( i ) τ is the probability with which worker i executes a local gradient step in each iteration k .
Worker i updates its local model at iteration k as follows:
[Equation]
where η is the step size and g ( i ) k is a random variable such that
[Equation]
After τ time steps, the hub updates its model based on the models of its workers (line 10).
For each worker i , we assign a positive weight w ( i ) .
Let v ( i ) be the weight for worker i normalized within its sub-network: v ( i ) = [Equation] w
[Equation]
j ) , where d ( i ) denotes the sub-network of worker i .
Each hub’s updates its model to be a weighted average over the workers’ models in its sub-network: y ( d )
= (cid:80) i ∈M ( d ) v ( i ) x
( i ) .
Weights may be assigned for different reasons.
If all worker gradients are treated equally, then w ( i ) =
and v ( i )
= 1 N ( d ( i )) .
We may also weight a worker’s gradient proportional to its local dataset size, in which case w ( i ) = | S ( i ) | and v ( i ) = |S ( [Equation]
) | [Equation] r
[Equation]
d
[Equation]
i ))
|S [Equation] r ) | .
The latter approach is used in Federated Averaging (McMahan et al., 2017).
After q iterations of Local SGD in each sub-network ( q · τ time steps), the hubs average their models with their neighbors in the hub communication network (line 12).
The weight assigned to each hub’s model is deﬁned by a D × D matrix H
so that:
[Equation]
Deﬁne the total weight in the network to be w tot = (cid:80) i ∈M w ( i ) .
Let b be a D -vector with each component d given by b d = ( (cid:80) i ∈M ( d ) w ( i ) )
/w tot .
We assume H meets the following requirements.
Assumption 2.
The matrix H satisﬁes the following:
2a If ( i, j ) ∈ E , then H i,j > 0 .
Otherwise, H i,j = 0 .
2b H is column stochastic, i.e., (cid:80) Di
=1 H i,j = 1 .
2c For all i, j ∈ D , we have b i H
i,j = b j H j,i .
Assumption 2 implies that H has one as a simple eigenvalue, with corresponding right eigenvector b and left eigenvector 1 D .
Further, all of its other eigenvalues have magnitude strictly less than(since G is connected) (Rotaru & N¨ageli, 2004).
By deﬁning H in this way, we ensure that the contributions from the workers’ gradients in each hub are incorporated in proportion to the workers’ weights.
This weighted averaging approach allows us to naturally extend Federated Averaging to the multi-level network model.
A NALYSIS
We note that hubs are essentially stateless in MLL-SGD, as the hub models are copied to all workers after each sub-network or hub averaging.
Thus, our analysis focuses on how worker models evolve.
We ﬁrst present an equivalent formulation of the MLL-SGD algorithm in terms of the evolution of the worker models.
We then present our main result on the convergence of MLL-SGD.
The system behavior can be summarized by the following update rule for worker models:
[Equation]
where n × N matrix X k =
[ x (1) k , . .
, x ( N ) k ] , n × N matrix G k =
[ g (1) k , . .
, g ( N ) k ] , and N × N matrix T k is a time-varying operator that captures the three stages in MLL-SGD: local iterations, hub-andspoke averaging within each sub-network, and averaging across the hub network.
We deﬁne T k as follows:
[Equation]
For local iterations, T k =
I , as there are no interactions between workers or hubs.
For sub-network averaging, V is an N × N block diagonal matrix, with each block V ( d ) corresponding to a single sub-network d .
The matrix V ( d ) is an N ( d ) × N ( d ) matrix where each entry is V ( d ) i,j = v ( i ) .
Finally, we deﬁne an N × N matrix Z that captures the sub-network averaging and hub network averaging in one operation that involves all workers.
The components of Z are given by
[Equation]
Let a be an N -vector with each component a i = w ( i ) w tot representing the weight of worker i , normalized over all worker weights.
We observe that Z and V satisfy the following: each have a right eigenvector of a and left eigenvector of 1 TN with eigenvalue 1 and all other eigenvalues have magnitude strictly less than 1 .
The proof of these properties can be found in the appendix.
These properties are necessary (but not sufﬁcient) to ensure that the worker models converge to a consensus model, where each worker’s updates have been incorporated according to the worker’s weight.
As is common, we study an averaged model over all workers in the system (Yuan et al., 2016; Wang & Joshi, 2018).
Speciﬁcally, we deﬁne a weighted average model:
[Equation]
We identify the recurrence relation of u k .
If we multiply a on both sides of (5):
[Equation]
where (10) follows from a being a right eigenvector of V and Z with eigenvalue 1 .
We note that u k is updated via a stochastic gradient descent step using a weighted average of several mini-batch gradients.
Since F ( · ) may be non-convex, SGD may converge to a local minimum or saddle point.
Thus, we study the gradients of u k as k increases.
We next provide the main theoretical result of the paper.
Theorem 1.
Under Assumptions 1 and
[Equation]
if η satisﬁes the following for all i ∈ M :
[Equation]
where Γ =
[Equation]
2 and ζ = max {| λ 2 ( H ) | , | λ N ( H ) |} , then the expected square norm of the average model gradient, averaged over K iterations
[Equation]
is bounded as follows:
[Equation]
where P = (cid:80) Ni =1 a i p i .
The proof of Theorem 1 is provided in the appendix.
The ﬁrst term in (13) is the same as in centralized SGD (Bottou et al., 2018).
As K → ∞ , this term goes to zero.
The second term is similar to centralized SGD as well.
If the stochastic gradients have high variance, then the convergence error will be larger.
This term is also related to the convergence error in distributed SGD (Bottou et al., 2018), which is equivalent to MLL-SGD when there is one sub-network, q = τ
= 1 , a i = 1 /N , and p i = 1 for all i .
MLL-SGD has a dependence on the probabilities of gradient steps and worker weights, replacing the 1 N in the equivalent term in distributed SGD.
The third and fourth terms in (13) are additive errors that depend on the topology of the hub network.
The value of ζ is given by the second largest eigenvalue of H , by magnitude, which is an indication of the sparsity of the hub network.
When worker weights are uniform, a fully connected hub graph
G will have ζ = 0 , while a sparse G will typically have ζ close to 1 .
It is interesting to note that ζ only depends on H , and not Z or V , meaning the convergence error does not depend on how worker weights are distributed within sub-networks.
We also note the third and fourth terms depend on P , the weighted average probability of the workers.
The convergence error increases as the average worker operating rate increases.
This relation is expected as more local iterations will increase convergence error (Wang & Joshi, 2018).
It is interesting to note that the convergence error does not depend on the distribution of p , meaning that a skewed and uniform distribution with the same average probability would have the same convergence error.
We observe that the condition on η in (12) cannot always be satisﬁed given certain probabilities.
Speciﬁcally, when there exists a p i ≤ 2 − √ 2 ≈ 0 . 59 , then the left-hand side will be non-positive, and the inequality can no longer be satisﬁed.
Although this may be a conservative bound, intuitively, when p i ’s are below this threshold, the algorithm may not make sufﬁcient progress in each time step to guarantee convergence. [Figure]
The third and fourth terms also grow with q and τ , the number of local iterations per hub network averaging and sub-network averaging steps, respectively.
The longer workers train locally without reconciling their models, the more their models will diverge, leading to larger convergence error.
We can see that τ plays a slightly larger role in convergence error than q .
For a given q · τ , meaning a given number of time steps between hub averaging steps, a larger τ leads to higher convergence error than a larger q would.
Thus, there is a slight penalty to performing more local iterations between sub-network averaging steps.
We explore this more in Section 6.
We note that when setting a i = 1 /N and p i = 1 for all workers i , and setting q = 1 , MLL-SGD reduces to Cooperative SGD.
However, the bound in Theorem 1 differs from that of Cooperative
SGD.
Speciﬁcally, Theorem 1 has error terms dependent on τ 2 as opposed to τ in Cooperative
SGD.
This discrepancy is due to accommodating all possible values of p i .
More details can be found in Appendix C.4.
In the following corollary, we analyze the convergence rate of Algorithm 1 when η = 1 L √ K .
Corollary 1.
Let η = 1 L √ K and let q 2 τ 2 ≤ √ K .
If qτ < K , then
[Equation]
Under the conditions given in Corollary 1, MLL-SGD achieves the same asymptotic convergence rate as Local SGD and HL-SGD.
E XPERIMENTS
In this section, we show the performance of MLL-SGD compared to algorithms that do not account for hierarchy and heterogeneous worker rates.
We also explore the impact of the different algorithm parameters that show up in Theorem 1.
We use the EMNIST (Cohen et al., 2017) and CIFAR-10 (Krizhevsky et al., 2009) datasets.
For all experiments, we provide results for training a simple Convolutional Neural Network (CNN) on
EMNIST and training ResNet-18 on CIFAR-10.
The CNN has two convolutional layers and two fully connected layers.
We train the CNN with a step size of 0 . 01 .
For ResNet, we use a standard approach of changing the step size from 0 .
1 to 0 .
01 to 0 .
001 over the course of training (He et al., 2016).
We conduct experiments using Pytorch 1.4.0 and Python 3.
We compare MLL-SGD with Distributed SGD, Local SGD, and HL-SGD.
Distributed SGD is equivalent to MLL-SGD when there is one hub, q = τ = 1 , and a i = 1 /N and p i = 1 for all i , which means Distributed SGD averages all worker models at every iteration.
Thus, we use Distributed SGD as a baseline for convergence error and accuracy in some experiments.
Local SGD is equivalent to MLL-SGD when a i = 1 /N and p i = 1 for all i , when the hub network is fully connected, and q = 1 .
HL-SGD extends Local SGD to allow q > 1 .
For all experiments, we let τ = 32 for Local SGD.
We let qτ = 32 for all HL-SGD and MLL-SGD variations to be comparable with Local SGD.
In all experiments, we measure training loss and test accuracy of the averaged model u k every 32 iterations.
We ﬁrst explore the effect of different values of τ and q in MLL-SGD.
We conﬁgure a multi-level network with a fully connected hub network and with 10 hubs, each with 10 workers.
We use two conﬁgurations for MLL-SGD, one with τ = 8 and q = 4 , and one with τ = 4 and q = 8 .
Distributed
SGD and Local SGD treat the hubs as pass-throughs, and average all workers every iteration and every τ iterations respectively.
Workers are split into ﬁve groups of 20 workers each.
Each group is assigned a percentage of the full dataset: 5% , 10% , 20% , 25% , and 40% .
Workers within a group partition the data evenly.
The workers weights are assigned based on dataset sizes.
In Figures 1a and 1c we plot the training loss, and in Figures 1b and 1d we plot the test accuracy for the CNN and
ResNet, respectively.
We observe that as q increases, while keeping qτ = 32 , MLL-SGD improves and approaches the Distributed SGD baseline.
Thus, increasing the number of sub-network training rounds improves the convergence behavior of MLL-SGD.
The beneﬁt is more pronounced in training
ResNet on CIFAR.
We next investigate how the number and sizes of the sub-networks impacts the convergence of MLLSGD.
From a pool of 100 workers, we distribute them across 5 , 10 , and 20 sub-networks.
The hub network is a path graph, which yields the largest ζ while keeping the network connected.
This hub network topology the worst-case scenario in terms of the convergence bound.
Note that as the number of hubs increases, the larger ζ becomes.
We let a i = 1 /N and p i
=
1 for all workers i .
We set q = 4 and τ = 8 .
We also include results using Local SGD with 1 hub and 100 workers.
The results of this experiment are shown in Figures 2 and 3.
In the case of the CNN, the difference in training loss is minimal among the MLL-SGD variations.
In the case of ResNet we can see that as the number of hubs increase, the convergence rate decreases.
This is in line with Theorem 1 since an increased number hubs corresponds with an increased ζ .
Interestingly, despite the low hub network connectivity, MLL-SGD outperforms Local SGD.
This shows that MLL-SGD still beneﬁts from a hierarchy even when hub connectivity is sparse.
Next, we explore the impact of different distributions of worker operating rates.
According to Theorem 1, the average probability across workers plays a role in the error bound.
To see if this holds in practice, we compare four different MLL-SGD setups, all of which includes a complete hub network, 10 hubs, each with 10 workers, a i = 1 /N , and an average probability amongst workers of 0 .
55 : (i) all workers with a p i = 0 .
55 (Fixed); (ii) workers in each sub-network with probability ranging from 0 .
1 to 1 at steps of 0 .
1 (Uniform Distribution); (iii) 90 workers with p i = 0 .
5 andworkers with p i =
(Skewed 1); (iv) 90 workers with p i = 0 .
6 and 10 workers with p i = 0 .(Skewed 2).
We include a case where all workers have p i = 1 as a baseline (Prob=1).
In Figures [Figure] and 5 we can see that in all cases except the baseline, the convergence rate is similar in both models.
This is in line with our theoretical results, since all cases have the same average worker probability.
Finally, we compare the convergence time of MLL-SGD against algorithms that wait for slower workers: Local SGD and HL-SGD.
We simulate real-time with time slots.
In every time slot, each worker will take a gradient step with a probability p i .
Note when p i = 1 for a worker i , the number of gradient steps taken will match the number of time slots T .
Otherwise, the number of gradient steps taken will be T · p i in expectation.
MLL-SGD will wait τ time slots before averaging worker models in a sub-network, regardless of the number of gradient steps taken, while Local SGD and
HL-SGD will wait for all workers to take τ gradient steps.
This approach allows us to compare the progress of each algorithm over time.
In this experiment, we set p i = 0 .
9 for 90% of workers and p i = 0 .
6 for 10% of the workers.
As in the previous experiments, we use a multi-level network with a fully connected hub network and with 10 hubs, each with 10 workers.
We study MLL-SGD with two parameter settings, τ = 32 , q = 1 and τ = 8 , q = 4 .
We also include results for Local-SGD and HL-SGD.
By comparing MLL-SGD with τ = 32 , q = 1 with Local-SGD, we can evaluate the impact of using a local training period based on time rather than a number of worker iterations.
By comparing MLL-SGD with τ = 8 , q = 4 with HL-SGD, we can evaluate this impact in a multi-level network.
In Figures 6a and 6c, we plot the training loss, and in Figures 6b and 6d, we plot the test accuracy for the CNN and ResNet, respectively.
We can see that MLL-SGD with q = 1 converges more quickly, in both loss and accuracy, than Local SGD, and that MLL-SGD with q = 4 converges more quickly than HL-SGD.
These trends hold in both the CNN and ResNet models.
The results show that in this experimental setup, waiting for slow workers is detrimental to the overall convergence time.
C ONCLUSION
We have introduced MLL-SGD, a variation of Distributed SGD in a multi-level network model.
Our algorithm incorporates the heterogeneity of worker devices using a stochastic approach.
We provide theoretical analysis of the algorithm’s convergence, and we show how the convergence error depends on the average worker rate, the hub network topology, and the number of local, subnetwork averaging, and hub averaging steps.
Finally, we provide experimental results that illustrate the effectiveness of MLL-SGD over Local SGD and HL-SGD.
In future work, we plan to analyze the effects of non-IID data on convergence error.
A CKNOWLEDGMENTS
This work is supported by the Rensselaer-IBM AI Research Collaboration (http://airc.rpi.edu), part of the IBM AI Horizons Network (http://ibm.biz/AIHorizons), and by the National Science Foundation under grants CNS 1553340 and CNS 1816307.
A C ODE R EPOSITORY
The code used in our experiments can be found at: https://github.com/rpi-nsl/MLL-SGD.
This code simulates a multi-level network with heterogeneous workers, and trains a model using MLL-SGD.
B A DDITIONAL E XPERIMENTS
Our experiments in Section 6 explore how changing MLL-SGD parameters affect training on a nonconvex function.
In this section, show the results of the same experiments on a convex loss function.
We train a logistic regression model on the MNIST dataset (Bottou et al., 1994).
We train a binary classiﬁcation model with half the classes being 0 and the other half being 1 and use a step size of 0 . 2 .
We run all experiments for 32 , 000 iterations.
We rerun our ﬁrst experiment from Figure 1 with logistic regression trained on MNIST.
Figures 7a and 7b show the training loss and test accuracy, respectively.
As with the non-convex functions, we can see that MLL-SGD with larger q approaches the Distributed SGD baseline.
We rerun our second experiment comparing different hub and worker distributions with logistic regression trained on MNIST.
Figure 8 shows the training loss.
The three variations of MLL-SGD do not show much difference in terms of convergence rate, indicating that ζ has little effect in this case.
However, they still outperform Local SGD due to q being larger.
[Figure] We rerun our third experiment comparing different worker operating rates distributions with logistic regression trained on MNIST.
Figure 9 shows the training loss.
As with the non-convex functions, all MLL-SGD variations with the same average probability have similar convergence rate.
We rerun our ﬁrst experiment from Figure 6 with logistic regression trained on MNIST.
Figures 10a and 10b show the training loss and test accuracy, respectively.
We can see an improvement in convergence rate of MLL-SGD over both Local SGD and HL-SGD.
C P ROOF OF T HEOREM
For our proof we adopt a similar approach to that in Wang & Joshi (2018).
This section is structured as follows.
We ﬁrst deﬁne some notation and make some observations in Section C.1.
Our supporting lemmas are stated in Section C.2.
We close with the full proof of Theorem 1 in Section C.3.
C. P RELIMINARIES
For simplicity of notation, we let (cid:107) · (cid:107) denote the l 2 vector norm.
Let the weighted Frobenius norm of an N × M matrix X with an N -vector a be deﬁned as follows: [Equation]
[Equation]
The matrix operator norm for a square matrix Q is deﬁned as:
[Equation]
[Equation]
[Figure]
We deﬁne the set of Bernoulli random variables Θ = { θ 1 k , . .
, θ Nk } , where [Equation] 0 with probability (1 − p [Equation]
Let Ξ k
= { ξ (1) k , ..., ξ ( N ) k } be the set of mini-batches used by the N workers at time step k .
Without loss of generality, we assign a mini-batch to each worker, even if it does not execute a gradient step in that iteration.
An equivalent deﬁnition of g ( i ) k is then
[Equation]
[Equation]
For simplicity of notation, let E k be equivalent to E Θ k , Ξ k | X k .
We note that Assumption 1c implies:
[Equation]
[Equation]
Further, when i (cid:54) =
j :
[Equation]
E
[Equation] [Equation]
We also note that Assumption 1d implies:
[Equation]
F ( x ( i ) k ) (cid:13)(cid:13)(cid:13)
[Equation]
[Equation]
( i ) k )
[Equation]
i )
[Equation]
[Equation]
[Equation]
k
[Equation]
g ( i ) k
(cid:13)(cid:13)(cid:13)
[Equation]
(cid:13)(cid:13)(cid:13)
[Equation]
( x ( i ) k )
[Equation]
k
[Equation]
( i ) k )
[Equation]
i
[Equation]
[Equation]
24) =
[Equation]
[Equation]
( i )
[Equation]
) (cid:13)(cid:13)(cid:13)
[Equation]
(cid:13)(cid:13)(cid:13)
[Equation]
i )
[Equation]
) (cid:13)(cid:13)(cid:13)
[Equation]
i )
[Equation]
[Equation]
i
[Equation]
[Equation]
=
p
i
[Equation] k (cid:13)(cid:13)(cid:13) [Equation] ( x ( i ) k ) (cid:13)(cid:13)(cid:13)
[Equation]
p i (cid:13)(cid:13)(cid:13) [Equation] ( x ( i ) k ) (cid:13)(cid:13)(cid:13)− [Equation]
p i
[Equation]
k [Equation] [Equation] ( i )
[Equation]
[Equation]
i )
[Equation]
[Equation]
) (cid:13)(cid:13)(cid:13)
[Equation]
( x ( i )
[Equation]
) (cid:13)(cid:13)(cid:13)
[Equation]
=
p i
[Equation]
k (cid:13)(cid:13)(cid:13) g ( x ( i ) k ) −
[Equation]
F ( x ( i ) k ) (cid:13)(cid:13)(cid:13) 2 + (1 − p i )
[Equation]
[Equation]
[Equation]
Finally, we deﬁne the weighted average stochastic gradient and the weighted average batch gradient as:
[Equation]
C. L EMMAS AND P ROPOSITIONS
Next, we state our supporting lemmas and propositions.
Proposition 1.
The matrices Z and V satisfy the following properties:
Z and V each have a right eigenvector of a with eigenvalue 1. 2.
Z and V each have a left eigenvector of 1 TN with eigenvalue 1. 3.
All other eigenvalues of Z and V have magnitude strictly less than 1.
Proof.
Assumption 2 indicates that H is a Generalized Diffusion Matrix as deﬁned in Rotaru &
N ¨ ageli (2004).
Recall Assumption 2:
Assumption 2.
The matrix H satisﬁes the following:
2a If ( i, j ) ∈ E , then H i,j > 0 .
Otherwise, H i,j = 0 .
2b H is column stochastic, i.e., (cid:80) Di
=1 H i,j = 1 .
2c For all i, j ∈ D , we have b i H
i,j = b j H j,i .
If we show this implies that Z and V are Generalized Diffusion Matrices with the same properties to those in Assumption 2 with vector a , then the properties in the proposition are satisﬁed.
Since H and b are non-negative, then Z is also non-negative.
It is also clear that Z is column stochastic by construction.
It is left to prove that:
[Equation]
Applying the deﬁnition of Z to the left side, we have:
[Equation]
Since we know that H is a Generalized Diffusion Matrix with vector b , we know that:
[Equation]
[Equation]
Plugging this in for H d ( i ) ,d ( j ) , we have:
[Equation]
Therefore, Z is a Generalized Diffusion Matrix
[Equation]
We can show that V is also a Generalized Diffusion Matrix with the vector a .
V is constructed to be non-negative and column stochastic.
It is left to prove that
[Equation]
When i, j are outside a block V ( d ) , then V i,j = V j,i = 0 , so the equation is trivially satisﬁed.
When within a block, in terms of w , we have:
[Equation]
Noting that we are within a block, therefore d ( i ) =
d ( j ) , we can see that both sides are equal:
[Equation]
Therefore, V is a Generalized Diffusion Matrix.
Proposition 2.
Given a diffusion matrix H with the properties in Assumption 2, if Z constructed as follows,
[Equation]
then the largest eigenvalues of Z are the eigenvalues of H , and zero otherwise.
Proof.
In order to prove the relationship of the eigenvalues of Z and H , we prove the following two points separately:
The rank of Z is the same as H .
All non-zero eigenvalues of H are eigenvalues of Z with the same multiplicity.
For the rank of Z , we take a look at how each column is constructed.
Consider column j of Z :
[Equation]
For two columns i and j where d ( i ) =
d ( j ) , these columns are identical.
Therefore, the rank of Z will be, at most, the number of hubs, D .
Further, we can see that the elements of a column j in Z are simply scaled elements of column d ( j ) in H .
So any linearly dependent columns in H will also be linearly dependent in Z .
Therefore, the rank of the two matrices are the same.
For the second point, we show there is a bijective mapping from eigenpairs of H to eigenpairs of Z .
Let ( λ, y ) be an eigenpair of H (with λ (cid:54) = 0 ), i.e.
[Equation]
=
[Equation]
Deﬁne the N -vector x with components x i = v ( i )
y d ( i ) .
We will show that Z x = λ x .
Looking at the i -th entry of the vector Z x , we have
[Equation]
[Equation]
Applying the deﬁnition of Z and x , we obtain
[Equation]
[Equation]
Note that the m -th entry of the vector H y equals (cid:80) Dl =1 H m,l y l = λ y m .
Applying this equality, we obtain
[Equation]
Therefore, for any eigenpair ( λ, y ) of H , we can ﬁnd an eigenpair ( λ, x ) of Z .
It is left to prove that this mapping is a bijection.
Suppose eigenvalue λ of H has multiplicity k > 1 .
We consider any two of the k eigenpairs ( λ, c ) and ( λ, d ) .
Let the corresponding eigenpairs of Z be ( λ, e ) and ( λ, f ) .
We know that e (cid:54) =
f
because c and d are unique, and there must exist an index i such that v ( i )
c
d ( i ) (cid:54) = v ( i ) d
d ( i ) .
Therefore, the mapping of eigenpairs of H to eigenpairs of Z is a bijection.
Proposition 3.
Given deﬁnition of Z and V in Proposition 1, it is the case that
[Equation]
Proof.
First, we prove that V Z
= Z .
Note that the i -th row of V contains either v i or zero.
Looking at an arbitrary entry i, j of V Z we have:
[Equation]
Next we prove that Z V
= Z .
Note that for any row i in Z , Z i,j = Z i,k when d ( j ) =
d ( k ) .
[Equation]
Since V is column stochastic
[Equation]
Proposition 4.
Let A = a 1 T .
Given our deﬁnition of T k in (6),
[Equation]
for all k .
Proof.
We prove each of the three cases of T k : I , V , and Z .
Clearly, I A
=
A I
=
A .
It is left to prove V A
=
A V =
A and Z A
=
A Z = A .
We can see that Z A
=
A since a is a right eigenvector of Z with eigenvalue 1 : Z A
=
Z a 1 T = a 1 T =
A .
Similarly, we can see that A Z = a 1 T Z = a 1 T =
A as 1 T is a left eigenvector of Z .
The same holds for V .
Lemma 1.
Under Assumptions 1c and 1d, the variance of the weighted average stochastic gradient is bounded as follows:
[Equation]
Proof.
[Equation]
Looking at the cross-terms in (62):
[Equation]
Plugging (65) into (62) we have:
[Equation]
where (67) follows from Assumption 1d and (29)
[Equation]
Lemma 2.
Under Assumptions 1c and 1d [Equation] the squared norm of the stochastic gradients is bounded by:
[Equation]
Proof.
[Equation]
Applying the deﬁnition of G k to (71) we get:
[Equation]
Let the cross-terms in (73) be
[Equation]
We can simplify CR as follows:
[Equation]
Applying Assumption 1c to (76)
[Equation]
we get:
[Equation]
Applying (78) to (73) we have:
[Equation]
Expanding the ﬁrst term in (79) we have:
[Equation]
We simplify CR 1 :
[Equation]
Similarly, for CR 2 :
[Equation]
[Table] [Table]
[Equation]
We can simplify by observing that:
[Equation]
which gives us:
[Equation]
Applying Lemma 1 to (87):
[Equation]
i
[Equation]
i
[Equation]
88) ≤
[Equation]
−
[Equation]
[Equation]
90) where equation (89) follows from Jensen’s inequality.
Lemma 3.
Under Assumption 1c, the expected inner product of the batch gradient and the weighted average stochastic gradient is equal to:
[Equation]
Proof.
[Equation]
where (93) follows from (20), and (95) follows from the fact that, for arbitrary vectors y and z
, 2 y T z = ||
y
||
+ ||
z
|| 2 − ||
y − z
|| 2 .
Lemma 4.
Under Assumption 1, following the update rule given in (5), if all model parameters are initialized at the same x 1 , the expected weighted average gradient is bounded as follows:
[Equation]
where A = a 1 T .
Proof.
According to Assumption 1a
[Equation]
Plugging in Lemmas 2 and 3, we get:
[Equation]
2 +
N (cid:88) i = a i 2 p 2 i (cid:13)(cid:13)(cid:13) ∇ F ( x ( i ) k ) (cid:13)(cid:13)(cid:13) 2 −
N (cid:88) i = a i 2 (cid:107)∇ F ( u k ) − p i ∇ F ( x ( i ) k ) (cid:107)(cid:35) + η 2 L
N (cid:88) i = (cid:0) a 2 i p i (
[Equation]
+ 1)
[Equation]
a 2 i p 2 i + a i p 2 i (cid:1) (cid:13)(cid:13)(cid:13)
[Equation]
F ( x ( i ) k ) (cid:13)(cid:13)(cid:13) 2 + σ 2 η 2 L
N (cid:88) i = a 2 i p i (100) = − η 2 (cid:107)∇ F (
[Equation]
k ) (cid:107)
[Equation]
η
N (cid:88) i = a i (cid:107)∇ F (
[Equation]
[Equation]
p i
[Equation]
( x ( i )
[Equation]
) (cid:107)
[Equation]
+ σ
[Equation]
η 2 L
N (cid:88) i = a 2 i p i
[Equation]
η
N (cid:88) i = a i (cid:0) p 2 i − ηL (cid:0) a i p i ( β + 1) − a i p 2 i + p 2 i (cid:1)(cid:1) (cid:13)(cid:13)(cid:13)
[Equation]
F ( x ( i ) k ) (cid:13)(cid:13)(cid:13) 2 .
After some rearranging
[Equation]
we obtain:
[Equation]
Taking the total expectation over all iterations:
[Equation]
The third term in (103) can be bounded as:
N
[Equation]
106) where (105) follows from the fact that (cid:107) y
+ z (cid:107) 2 ≤ 2 (cid:107) y
[Equation]
2 + 2 (cid:107) z (cid:107) 2 , and (106) follows from (105) by Assumption 1a.
Recalling the deﬁnition of the weighted Frobenius norm and the deﬁnition of u , we can simplify the ﬁrst term in (106):
N (cid:88)
[Equation]
Plugging (106) and (109) back into (103), we obtain:
[Equation]
Lemma 5.
Given the properties of Z and V given in Propositions 1 and 2, it is the case that:
[Equation] [Equation]
where A = a 1 T and ζ = max {| λ 2 ( H ) | , | λ ( H ) |} .
Proof.
According to the deﬁnition of the matrix operator norm,
[Equation]
where (114) follows from A j = A , and (115) follows from A Z = Z A
= A .
We can simplify (115) further:
[Equation]
where (117) follows from the commutability of Z and A .
Based on Proposition 2, the non-zero eigenvalues of Z are the same as H .
As shown in Lemmaof Rotaru & N¨ageli (2004), for a matrix Z with the properties in Proposition 1, the spectral norm of
Z − A is equal to ζ .
Therefore:
[Equation] [Equation]
Similarly for V :
[Equation]
where (121) follows from A j = A and V j = V , and (122) follows from A V
= V A =
A .
Note that the eigenvalues of each block V ( d ) are N ( d ) − 1 zeros and a one.
The set of eigenvalues of V will include D ones.
If D > 1 , then based on Lemma 6 of Rotaru & N¨ageli (2004) and
Proposition 1, the spectral norm of V − A is 1 , so
[Equation]
Since the eigenvalues of I are all 1 , and I is commutable with A , we can similarly say:
[Equation]
Lemma 6.
Given two matrices C ∈ R N × M and D ∈ R M × N , and an N -vector a ,
[Equation]
Proof.
We deﬁne the i -th row of C as c T i and the i -th column of D as d i .
We can rewrite the trace as:
[Equation]
Placing a squared norm around (129), we can apply the Cauchy-Schwartz inequality:
[Equation]
N (cid:88) i =
[Equation]
Lemma 7.
Given two matrices C ∈ R M
×
N
and D ∈ R N × N , and an N -vector a , then
[Equation]
Proof.
We deﬁne the i -th row of C as c Ti and the set I
= { i ∈ [1 , M ] : (cid:107)
c
Ti (cid:107) (cid:54) = 0 } .
We can rewrite the squared Frobenius norm as:
[Equation]
[Equation]
C. P ROOF OF T HEOREM
We recall Theorem
[Equation]
Theorem 1.
Under Assumptions 1 and 2, if η satisﬁes the following for all i ∈ M :
[Equation]
where Γ =
[Equation] [Equation]
ζ
[Equation]
2 and ζ = max {| λ 2 ( H ) | , | λ N ( H ) |}
[Equation]
then the expected square norm of the average model gradient, averaged over K iterations
[Equation]
is bounded as follows:
[Equation]
where P = (cid:80) Ni =1 a i p i .
We now give the proof of Theorem 1 using Lemmas 2-7.
Proof.
Using our intermediate result from Lemma 4, we decompose X k
( I − A ) using our recursive deﬁnition of X k :
[Equation]
where (140) follows from the commutability of T k and A by Proposition 4.
Continuing this, we end up with:
[Equation]
Since all workers initialize their models to the same vector, X 1 ( I − A ) (cid:81) k − 1 l =1 T k = 0 , and thus we have:
[Equation]
Let k = jqτ
+ lτ + f , where j is the number of hub network averaging rounds, l is the number of sub-network averaging rounds since the last hub network averaging round, and f is the number of local iterations since the last sub-network averaging round.
Deﬁne:
[Equation]
Noting that V j = V , and V Z
=
Z V =
Z by Proposition 3, Φ s,k − 1 can be expressed as:
[Equation]
For r < j , let
Y
[Equation]
We also let Y j
= (cid:80)
[Equation]
, Y
[Equation]
+
[Equation]
+
[Equation]
+
[Equation]
+
[Equation]
G s , Q
[Equation]
1 = (cid:80) jqτ + lτ s = jqτ +1 ∇ F
( X s ) , and Q j 2 = (cid:80) jqτ
+ lτ + f s = jqτ
+ lτ +1 ∇ F ( X s ) .
With this in mind, we can split the sum in (145) into batches for each hub network averaging period:
[Equation] [Equation]
[Equation]
Summing this all together, we get:
[Equation]
Plugging (151) into (145):
[Equation]
where (154) follows from the fact that (cid:107)
[Equation]
+
[Equation]
+
[Equation]
(cid:107) z (cid:107)
[Equation]
We ﬁrst put a bound on T 1 :
[Equation] [Equation]
TR can be bounded as:
[Equation]
where (157) follows from Lemma 6, (158) follows from Lemma 7, and (159) follows from Lemma 5.
We can similarly bound TR 1 and TR 3 :
[Equation]
Summing TR 0 through TR 3 , we get:
[Equation]
where (165) follows from the symmetry of the n and l indices.
Plugging (166) back into (156):
[Equation]
Q j 2 ) (cid:13)(cid:13) 2 F a (cid:107) I − A (cid:107) 2 op + 2 ηj − 1 (cid:88) n = ζ j − n E (cid:107) Y n − Q n (cid:107) 2 F a j − 1 (cid:88) l =0 ,l (cid:54) =
n ζ j − l + 2 η 2 E (cid:13) (cid:13)
Y j 1 − Q j 1 (cid:13) (cid:13) 2 F a j (cid:88) l = ζ j − l + 2 η 2 E (cid:13) (cid:13)
Y j 2 − Q
j 2 (cid:13) (cid:13) 2 F a j (cid:88) l = ζ j − l + 4 ηj − 1 (cid:88) l = ζ j − l E (cid:107)
Y l − Q l (cid:107) 2 F a (167) ≤ 2 ηj − 1 (cid:88) r =
E (cid:107) ( Y r − Q r ) (cid:107) 2 F a ζ 2( j − r ) + 2 η 2 E (cid:13)(cid:13) ( Y j 1 − Q j 1 ) (cid:13)(cid:13) 2 F a + 2 η 2 E (cid:13)(cid:13) ( Y j 2 − Q j 2 ) (cid:13)(cid:13) 2 F a + 2 ηj − 1 (cid:88) n = ζ j − n E (cid:107) Y n − Q n (cid:107) 2 F a j − 1 (cid:88) l =0 ,l (cid:54) =
n ζ j − l + 2 η 2 E (cid:13)(cid:13)
Y j 1 − Q j 1 (cid:13)(cid:13) 2 F a j (cid:88) l = ζ j − l + 2 η 2 E (cid:13)(cid:13)
Y j 2 −
[Equation]
where (167) follows from Lemma 7, and (168) follows from Lemma 5.
We further bound T 1 :
[Equation]
170) where (169) follows from the summation formulae of a power series:
[Equation]
Taking a closer look at E (cid:107) ( Y r − Q r ) (cid:107) 2 F a for 0 ≤ r < j :
E (cid:107) ( Y r − Q r ) (cid:107) 2 F a = E (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) ( r +1) qτ (cid:88) s
=
rqτ
+ ( G s −∇ F ( X s )) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
F a (172) =
N (cid:88) i = a i E (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) ( r +1) qτ (cid:88) s
=
rqτ
+ ( g is − ∇ F ( x ( i ) s )) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) (173) ≤
N (cid:88) i = a i qτ ( r +1) qτ (cid:88) s
=
rqτ +
E (cid:13)(cid:13)(cid:13) ( g is − ∇ F ( x ( i ) s ))
(cid:13)(cid:13)(cid:13)(174) ≤ qτ  
N (cid:88) i = a
[Equation]
176) where (175) follows from Assumption 1d and (29).
Similarly, for r = j 1 and r = j 2 :
[Equation]
Plugging (176), (177), and (178) into (170), we can bound T 1 as follows:
[Equation]
Referring back to Lemma 4, our goal is to sum T 1 over k = 1 , . .
. , K iterations.
First, we sum over the j -th sub-network update period up to the j -th hub network averaging, for l = 0 , . . .
, q − 1 and f = 1 , . . .
, τ : q − 1 (cid:88) l = [Equation] (cid:88) f =
[Equation]
= (cid:18)
[Equation]
[Equation]
P
[Equation]
[Equation]
[Equation]
ζ
[Equation]
r
[Equation]
s =
[Equation]
N
[Equation]
i = a
[Equation]
( p
[Equation]
( β
[Equation]
[Equation]
[Equation]
F
[Equation]
x ( i ) s ) (cid:13)(cid:13)(cid:13)+ [Equation] ζ
[Equation] (cid:19) q ( q [Equation] 1) τ
N (cid:88) i = a i j ( qτ +1) (cid:88) s
= jqτ
+ ( p i ( β − 1) + 1) E (cid:13)(cid:13)(cid:13) ∇ F ( x ( i ) s ) (cid:13)(cid:13)(cid:13)+ η 2 (cid:18) 2 − ζ 1 − ζ (cid:19) q 2 τ (
[Equation]
− 1) N (cid:88) i = a i j ( qτ +1)+ τ − 1 (cid:88) s =
j ( qτ +1)+ ( p i ( β − 1) + 1) E (cid:13)(cid:13)(cid:13) ∇ F ( x ( i ) s ) (cid:13)(cid:13)(cid:13) 2 .
Let:
[Equation]
Note that Γ j = 3 − 2 ζ 1 − ζ > 2 − ζ 1 − ζ .
Using this inequality, we can bound the sum of the last three terms of (180) to get 2 q 2 τ 2 (cid:80) jr =
Γ r : q − 1 (cid:88) l = τ (cid:88) f
=
T 1 ≤
[Equation]
η
[Equation]
σ
[Equation]
q
[Equation]
τj − 1 (cid:88) r
= (cid:18)
ζ 2( j − r ) + 2 ζ j − r + ζ j − r + 1 − ζ
(cid:19)
P + 2 η 2 σ 2 (cid:18) 2 − ζ 1 − ζ (cid:19) (cid:18) τ 3 q ( q − 1)(2 q + 1) + q τ ( τ − 1)(2 τ + 1) (cid:19)
P + 2 η 2 q 2 τj (cid:88) r
= Γ r ( r +1) qτ (cid:88) s =
rqτ +
N (cid:88) i = a i ( p i ( β −
[Equation]
Summing (182) over the hub network averaging periods j = 0 , . .
K/ ( qτ ) − 1 , we obtain:
[Equation]
Applying the following summation formula to sum over Γ j
[Equation]
we obtain
[Equation]
We let Γ = 1 1 − ζ 2 + 21 − ζ + ζ (1 − ζ ) 2 .
We can also apply this following summation formula to the ﬁrst term in (184):
[Equation]
Applying the summation formula in (188), plugging Γ in
[Equation]
and indexing the iterations in terms of k
[Equation]
we bound (184) as:
[Equation]
Now we bound T
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
TR (cid:48) can be bounded as:
[Equation]
[Equation]
where (192) follows from Lemma 6.
We can similarly bound TR (cid:48) 1 through TR (cid:48) 3 :
[Equation]
Summing TR (cid:48) 0 through TR (cid:48) 3 , we get:
[Equation]
where (199) follows from the symmetry of the indices n and l
[Equation]
Plugging (199) back into (191):
[Equation]
I − A (cid:107) 2 op + 2 ηj − 1 (cid:88) n = ζ j − n E (cid:107) Q n (cid:107) 2 F a j − 1 (cid:88) l =0 ,l (cid:54) =
n ζ j − l + 4 ηj − 1 (cid:88) l = ζ j − l E (cid:107) Q l (cid:107) 2 F a + 2 η 2 E (cid:13)(cid:13) Q j 1 (cid:13)(cid:13) 2 F a j (cid:88)
l = ζ j − l + 2 η 2 E (cid:13)(cid:13) Q j 2 (cid:13)(cid:13)
2 F a j (cid:88) l = ζ j − l (201) ≤ 2 ηj − 1 (cid:88) r
= ζ j − r E (cid:107) Q r (cid:107) 2 F a + 2 η 2 E (cid:13)(cid:13) Q j 1 (cid:13)(cid:13) 2 F a + 2 η 2 E (cid:13)(cid:13) Q j 2 (cid:13)(cid:13) 2 F a + 2 ηj − 1 (cid:88) n = ζ j − n E (cid:107) Q n (cid:107) 2 F a j − 1 (cid:88) l =0 ,l (cid:54) =
n ζ j − l + 4 ηj − 1 (cid:88) l = ζ j − l E (cid:107) Q l (cid:107) 2 F a + 2 η 2 E (cid:13)(cid:13) Q j 1 (cid:13)(cid:13) 2 F a j (cid:88)
l = ζ j − l + 2 η 2 E (cid:13)(cid:13) Q j 2 (cid:13)(cid:13)
2 F a j (cid:88) l =
[Equation]
where (201) follows from Lemma 7, and (202) follows from Lemma 5.
We further bound T 2 :
[Equation]
where (203) follows from the summation formulae of a power series in (171)
[Equation]
After applying the deﬁnition of Q to (203), we obtain:
[Equation]
= (cid:18) ζ 2( j − r ) + 2 ζ j − r + ζ j − r + 1 − ζ (cid:19) E (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) qτ (cid:88) s = ∇ F ( X rqτ + s ) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
F a + 2 η 2 (cid:18) 2 − ζ 1 − ζ (cid:19) E (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) lτ (cid:88) s = ∇ F
( X jqτ + s ) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) F a + 2 η 2 (cid:18) 2 − ζ 1 − ζ (cid:19) E (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) f − 1 (cid:88) s = ∇ F
( X jqτ +
[Table]
+ s ) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) F a (205)
[Table]
η
[Table]
qτ j
[Table]
1 (cid:88) r = (cid:18)
ζ 2( j − r ) + 2 ζ j − r + ζ j − r + 1 − ζ (cid:19) qτ (cid:88) s =
E (cid:107)∇ F ( X rqτ + s ) (cid:107) 2 F a + 2 η 2 lτ (cid:18) 2 − ζ 1 − ζ (cid:19) lτ (cid:88) s = E (cid:107)∇ F ( X jqτ + s ) (cid:107) 2 F a + 2 η 2 ( f − 1) (cid:18) 2 − ζ 1 − ζ (cid:19) f − 1 (cid:88)
[Equation]
where (206) follows from (205) by Jensen’s inequality.
Summing over all iterates in the j -th sub-network update period
[Equation]
we obtain:
[Equation]
Summing over all iterations and applying the summation bound in (186) to (208):
[Equation]
Summing T 1 and T 2 , we obtain
[Equation]
Plugging T 1 and T 2 back into Lemma 4, we arrive at
E
[Equation]
K
[Equation]
If η satisﬁes the following for i =
[Equation] [Equation]
N ,
[Equation]
then we can simplify (213):
[Equation]
C. C OMPARISON TO C OOPERATIVE SGD
We note that when setting a i = 1 /N and p i = 1 for all workers i , and setting q = 1 , MLL-SGD reduces to Cooperative SGD (Wang & Joshi, 2018).
However, the bound in Theorem 1 differs when compared to the bound of Cooperative SGD.
Speciﬁcally, Theorem 1 has error terms dependent on τ 2 as opposed to τ .
This is due to the formulation of g ( i ) k .
Namely:
[Equation]
Because we cannot assume p i = 1 , there are cross terms in the expressions in equations (156) and (173) that do not cancel out.
Thus, we needed to use a more conservative analysis at these steps on the proof.
This is the reason that plugging in a value of p i = 1 is not enough to recover the same bound as in Cooperative SGD.
A similar discrepancy can be observed when comparing with Koloskova et al.