U NDERSTANDING
T
OP - K
S
PARSIFICATION IN D IS -
TRIBUTED D EEP L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
Distributed stochastic gradient descent (SGD) algorithms are widely deployed in training large-scale deep learning models, while the communication overhead among workers becomes the new system bottleneck.
Recently proposed gradient sparsiﬁcation techniques, especially Top- k sparsiﬁcation with error compensation (TopK-SGD), can signiﬁcantly reduce the communication trafﬁc without obvious impact on the model accuracy.
Some theoretical studies have been carried out to analyze the convergence property of TopK-SGD.
However, existing studies do not dive into the details of Top- k operator in gradient sparsiﬁcation and use relaxed bounds (e.g., exact bound of Random- k ) for analysis; hence the derived results cannot well describe the real convergence performance of TopK-SGD.
To this end, we ﬁrst study the gradient distributions of TopK-SGD during training process through extensive experiments.
We then theoretically derive a tighter bound for the Top- k operator.
Finally, we exploit the property of gradient distribution to propose an approximate top- k selection algorithm, which is computing-efﬁcient for GPUs, to improve the scaling efﬁciency of TopK-SGD by signiﬁcantly reducing the computing overhead.
I NTRODUCTION
Training large-scale deep neural networks (DNNs) generally exploits distributed synchronous stochastic gradient descent (SGD) optimization algorithms to reduce the overall training time.
Let
P be the number of workers in a distributed setting, and x ∈ R d denotes the model parameters with d dimensions.
At the t -th iteration, distributed synchronous SGD updates the model parameters by
[Equation]
(1) where g p t ∈ R
d is the stochastic gradient with its locally selected data for the loss function f p ( x ) : R d → R and η t is the learning rate.
The aggregation of d -dimension gradients from P workers requires a communication complexity of O ( d ) in terms of communication trafﬁcs 1 , which generally limits the system scalability.
Gradient sparsiﬁcation (Strom, 2015; Dryden et al., 2016; Aji & Heaﬁeld, 2017; Chen et al., 2018; Lin et al., 2018) is a promising technique for distributed SGD, which can signiﬁcantly reduce the communication trafﬁc while reserving the model convergence.
In gradient sparsiﬁcation, a compressor Comp k is applied on each worker to locally select k , k ≤ d , gradients for aggregation and Comp k ∈ { Top k , Rand k } (Stich et al., 2018).
Comp k ( g pt ) ∈ R
d zeros out ( d − k ) elements of g pt and keeps k elements unchanged.
The zeroed-out d − k elements are stored as residual (cid:15) pt for the next iteration.
Formally, the model parameters are updated by
[Equation]
where (cid:15) pt ∈ R d and (cid:15)
p
= 0 .
In theory, distributed SGD with gradient sparsiﬁcation (e.g., Top k ,
Rand k and any other k -contraction operators) with error compensation has been proved to have the same order of convergence rate as vanilla SGD for both convex and non-convex problems if the number of iterations is large (Wangni et al., 2018;
Stich et al., 2018;
Alistarh et al., 2018; Jiang &
Agrawal, 2018; Karimireddy et al., 2019; Tang et al., 2019; Zheng et al., 2019).
The convergence rates are derived with a key contraction property of the sparsiﬁcation operator Comp k (Top k or
Rand k ) (Stich et al., 2018;
Alistarh et al., 2018), that is
[Equation]
where E C is the expectation taking on the compressor and (cid:107) · (cid:107) is the (cid:96) 2 -norm.
For any x ∈ R d , Top k ( x ) ∈ R d selects the top k largest elements (in terms of the absolute value) of x with corresponding indices and sets other d − k elements to zeros; while Rand k ( x ) ∈ R
d randomly (in a uniform distribution) selects k elements from x with corresponding indices and other d − k elements are zeros.
It is obvious that
[Equation]
Existing studies use the same error estimate for both Top k and Rand k in distributed SGD by exploiting the properties of (4), which cannot differentiate the convergence behavior of two operators.
In practice, however, TopK-SGD has a much faster convergence speed (in term of iterations) than
SGD with Rand k
(RandK-SGD) as empirically shown in (Stich et al., 2018).
We also compare the convergence performance between TopK-SGD and RandK-SGD on a 16-worker distributed setting with three popular convolutional neural networks (VGG-16 (Simonyan & Zisserman, 2014),
ResNet-20 and ResNet-50 (He et al., 2016)).
Our results are shown in Fig.
We observe that
TopK-SGD achieves very similar performance to the original distributed SGD (Dense-SGD), while
RandK-SGD has much slower convergence than TopK-SGD.
RandK-SGD even cannot converge on
ImageNet.
Therefore, though existing studies show that TopK-SGD and RandK-SGD have the same convergence bound, their theoretical results cannot explain the performance gap between TopK-SGD and RandK-SGD.
Even some work (Karimireddy et al., 2019; Tang et al., 2019) exploits δ ≤ 1 to replace k/d in (3), they also fail to identify exact δ to distinguish Top k and Rand k .
[Figure]
-SGD. In this paper, we dive into the details of the Top k operator in distributed SGD when training DNNs and provide a tighter bound than inequality (3) to explain the good convergence performance of
TopK-SGD.
The observation of gradients with Top k sparsiﬁcation further enables us to propose a new computational-efﬁcient selection algorithm for gradient which preserves the convergence property.
Our contributions are summarized as follows.
Contributions.
(1) We empirically study the details of local stochastic gradients and observe that the coordinates of gradient follow bell shaped distributions through extensive experiments.
The bell shaped distribution enables us to intuitively explain that Top k should have a much tighter bound than Rand k , and we exploit the distribution property to formulate how Top k outperforms Rand k .
We design and implement an approximate top- k selection algorithm 2 , which is much more efﬁcient than existing top-
k selection algorithms on GPUs.
As compared with the existing sampling-based approximate top- k selection algorithm, we improve the scaling efﬁciency by 12-50% on our 16-GPU cluster.
R ELATED W ORK
Gradient Quantization.
In distributed training of neural networks, the communicated gradients can be quantized to low-bit precision (e.g., 16-bit (Micikevicius et al., 2018;
Jia et al., 2018), 3-bit (Wen et al., 2017), 2.8-bit (Alistarh et al., 2017; Karimireddy et al., 2019) and even 1-bit (Seide et al., 2014; Strom, 2015)) while preserving nearly consistent convergence performance with the full precision (32-bit) counterpart.
Recently general frameworks of gradient quantization with error compensation are proposed to generalize the theoretical results of low-bit communication (Wu et al., 2018; Jiang & Agrawal, 2018; Karimireddy et al., 2019; Tang et al., 2019; Haddadpour et al., 2019).
However, the quantization method can only reduce the communication trafﬁc in 32 × (i.e., 1-bit vs.
32-bit), and it could not be enough for large-scale models or low-bandwidth network connections.
Gradient Sparsiﬁcation.
Compared to gradient quantization, gradient sparsiﬁcation is a much more promising communication trafﬁc reduction technique as it can sparsify up to three orders of magnitude gradients be zero with little impact on the model convergence (Strom, 2015; Dryden et al., 2016; Aji & Heaﬁeld, 2017;
Chen et al., 2018; Lin et al., 2018; Shi et al., 2019a).
Due to the much success of gradient sparsiﬁcation (e.g., Top- k sparsiﬁcation) in signiﬁcantly reducing the communication trafﬁc (Lin et al., 2018; Sun et al., 2019), much recent work tries to build theoretical guarantees for SGD with gradient speciﬁcation (Wangni et al., 2018; Stich et al., 2018;
Alistarh et al., 2018; Jiang & Agrawal, 2018;
Shi et al., 2019b; Karimireddy et al., 2019; Tang et al., 2019).
These theoretical frameworks try to generalize the sparsiﬁcation operator with the bound of inequality (3) to derive the convergence results for SGD with gradient sparsiﬁcation.
However, the existing analysis fails to go insight into the details of gradient sparsiﬁcation of Top k which could have better convergence than other compression operators (e.g., Rand k ).
Gradient Distribution 3 .
Glorot & Bengio (2010) study the distribution of activation values of DNNs and also their corresponding gradients.
They empirically showed that back-propagated gradients have Gaussian-like distributions, which helps understand the difﬁculty of training deep neural networks.
A similar plot is shown in (Micikevicius et al., 2018), where the distribution of gradients helps analyze if the 16-bit representation of gradients would be overﬂow or underﬂow.
These work has demonstrated that the gradients during training are likely located near zeros.
We extend the similar studies on the gradient distribution for TopK-SGD.
S TUDY ON S TOCHASTIC G RADIENTS 3. G RADIENT D ISTRIBUTION
In previous gradient sparsiﬁcation studies (Strom, 2015; Dryden et al., 2016; Aji & Heaﬁeld, 2017;
Chen et al., 2018; Lin et al., 2018), the basic rule of sparsiﬁcation is to select “signiﬁcant” elements of the gradients because they contribute more to the updates.
The Top k operator selects the exact local top- k elements of gradients so that it achieves nearly consistent convergence performance with
Dense-SGD.
Therefore, we would like to understand what is the difference between “signiﬁcant” elements of the gradients and randomly selected ones.
We conduct extensive experiments to study the gradient distributions on three areas of deep learning applications, including image classiﬁcation, language modeling, and speech recognition.
The selected models are: 1) Feed-forward Neural Networks (FNNs) .
An FNN with three hidden fully connected layers (FNN-3) on the MNIST (LeCun, 1998) data set.
2) Convolutional Neural Networks (CNNs).
LeNet-5 (LeCun et al., 2015) on MNIST, ResNet-20 (He et al., 2016) and VGG-16 (Simonyan & Zisserman, 2014) on CIFAR (Krizhevsky et al., 2010).
And 3) Recurrent Neural Networks (RNNs).
Long Short Term Memory networks (LSTMs) on the Penn Treebank (PTB) (Marcus et al., 1993) and the AN4 (Acero, 1990) data sets.
For PTB, we adopt a 2-layer LSTM model (LSTM-PTB) with 1500 hidden units per layer, and for AN4, we use a 5-layer LSTM model (LSTM-AN4) with 800 hidden units per layer.
The details of the experimental settings are shown in Table 1.
As the compression operator is applied on the gradients, we ﬁrst measure the distributions of the gradient’s elements (histograms) on Dense-SGD.
The results demonstrate the similar shapes as (Glorot & Bengio, 2010), while ours covers various applications (refer to Appendix A.2).
Our interest is on TopK-SGD to check if [Table] gradients distributions perverse the same properties as Dense-SGD.
During the training process of
TopK-SGD ( k = 0 .
001 d for a d -dimension model), we measure the histograms of local gradients accumulated with the residuals (i
[Table]
e., u pt = g pt + (cid:15) pt ).
The histograms of u 1 t with different t on different models are shown in Fig.
[Table]
where we only show the gradients from the ﬁrst worker as different workers have very close gradient distributions.
The corresponding cumulative distributions are presented in Appendix A.1.
It is seen that different models have different shapes on the accumu-
[Figure]
model, the gradient histograms are plotted every 200 iterations from iteration 200 to 1600 (other iterations have similar shapes).
lated gradients, but one common feature is that most coordinates of u t are close to zero.
Compared to the full gradient SGD (Appendix A.2), TopK-SGD shows wider distributions, which could be mainly caused by residual accumulation.
When selecting top- k largest values (in terms of absolute values) from u t , the selected values should be located at the left and right sides on the histograms.
Therefore, performing Top k on u t should generate a vector whose (cid:96) 2 -norm is very close to that of u t , that is (cid:107)
Top k ( u t ) (cid:107)
(cid:47) (cid:107) u t (cid:107) 2 .
The intuitive result inspires us to formulate how much close of (cid:107) Top k ( u t ) (cid:107) 2 to (cid:107) u t (cid:107) 2 .
Speciﬁcally, we would like to derive a variable γ ≤ (1 − k/d ) such that (cid:107) u t − Top k ( u t ) (cid:107) 2 ≤ γ (cid:107) u t (cid:107)
holds.
3. T HEORETICAL A NALYSIS AND R ESULTS
We investigate the Top k operator on u p t =
g p t
+ (cid:15) p t (for ease of presentation, we use u to denote u p t ).
Error estimation of Top k .
Let π denote a sorted vector of | u | / (cid:107) u (cid:107) ∞ in a descending order.
That is π ( i ) ≥ π ( i +1) ≥ 0 for i = 1 , 2 , ..., d − 1 , where π ( i ) is the i th element of π ∈ R d .
Then we have (cid:107) u − Top k ( u ) (cid:107)(cid:107) u (cid:107)= (cid:107) u − Top k ( u ) (cid:107) 2 / (cid:107) u (cid:107) 2 ∞ (cid:107)
[Equation]
where ˜ u = u / (cid:107) u
(cid:107) ∞ .
Assume that u ( i ) follows a bell shaped distribution (e.g., Fig. 3(a)), and πis a decreasing function w.r.t.
i as shown in Fig. 3(b).
In order to evaluate Eq.
(5), it is essential to calculate the area under the curve of π 2 .
As illustrated in Fig. 2, one can empirically prove that π 2 is convex and it is always less than the reference line ( y = − i/d + 1 ) if u follows bell shaped distributions.
Considering the areas of A 1 , A 2 , A 3 , and A 4 shown in Fig. 3(c), we have
[Equation]
Due to the space limit, the proof of the inequality is put in Appendix A.4. Then we have
[Equation]
where the second equality can be obtained from the similarity of triangle (cid:52) MDB ∼ (cid:52) COB and (cid:52) EDB ∼ (cid:52) AOB , i.e.,
[Equation]
Putting altogether, we have
[Equation]
and eventually
[Equation]
10) where γ = (1 − k/d ) 2 .
The last inequality is always true as | 1 − k/d | ≤ 1 .
Our results can be
[Figure]
A 2 A 1 A
A
A
Ak d k d
A
B
C
O
D
M
E
A 4 A 1 A
Ak d
A
B
C
O
D M
E
A 4 A 1 A 2 A
[Figure]
summarized as the following theorem.
Theorem 1.
Assume that u ∈ R d follows a bell shaped distribution and π 2 is convex and less than the line y = − i/d + 1 , then we have
[Equation]
Furthermore [Figure] it can be rearranged into the form that
[Equation]
where δ = (2 kd [Equation]
[Equation]
Convergence Bound of TopK-SGD.
We use the same assumptions on the objective function f : R d → R as (Karimireddy et al., 2019).
The assumptions are: 1) f is L -smooth and 2)
f has a moment bound (i.e., E [ g ] =
∇
f
( x ) and E [ (cid:107) g (cid:107) 2 ] ≤ G 2 for some G > 0 , where g is a stochastic gradient and x is the model parameter).
Therefore, we can directly use the the bound formulation of convergence rate with δ from (Karimireddy et al., 2019) in Remark 4.
Theorem 2.
If we set η t = 1 √ T +1 for running TopK-SGD and under the assumptions of f , we have
[Equation]
where f ∗ is the optimal solution.
The theorem indicates that after T ≥ O (1 /δ 2 ) iterations, the ﬁrst term of the right-hand side of inequality (13) will dominate the bound so that the convergence rate becomes O (1 / √ T ) which matches the rate of vanilla SGD.
Note that our derived bound of δ =
(2 kd − k 2 ) /d 2 is much tighter than k/d in previous studies (Stich et al., 2018;
Alistarh et al., 2018; Jiang & Agrawal, 2018; Shi et al., 2019b; Karimireddy et al., 2019).
Let c
=
d/k denote the compression ratio of gradients.
Previous results ( δ = 1 /c ) indicate that RandK-SGD or TopK-SGD should run after T ≥
O ( c 2 ) iterations to make it catch up the convergence rate of Dense-SGD.
Using inequality (10) for TopKSGD, it just requires T ≥ O (
c 4 / (2 c − 1) 2 ) iterations to have the full gradient convergence rate.
The result gives the explanation to why TopK-SGD can easily achieve nearly consistent convergence performance to Dense-SGD, while RandK-SGD could not (as shown in Fig. 1).
3. G AUSSIAN k : A N A PPROXIMATE T OP k O PERATOR
Though TopK-SGD has a good convergence property with a signiﬁcantly reduced communication size in distributed SGD, the exact top- k selection is not friendly to many-core processors like GPUs (Shanbhag et al., 2018).
Inefﬁcient Top k could make the overall wall-clock time worse.
For example, training a ResNet-50 (He et al., 2016) model on ImageNet (Deng et al., 2009) on an Nvidia Tesla V100 GPU with a mini-batch size of 128 requires around 0.46 seconds per iteration 4 .
When we distribute the training to 16 Tesla V100 GPUs connected with 10 Gbps Ethernet (10GbE), the communication time of full gradients ( d = 25 , 557 , 032 ) is around 0.2 seconds.
However, the Top k operator with k = 0 .
001 d on ResNet-50 with the Tesla V100 GPU consumes 0.4 seconds.
The 0.2second communication overhead is saved, but it introduces another 0.4 seconds, which makes the training efﬁciency even worse.
In DGC-SGD (Lin et al., 2018), the authors proposed to sample only 0 .
1% to 1% of the gradients to estimate the threshold hierarchically, which requires to invoke top- k selection twice on the subsets of the original vector.
For ease of reference, we use DGC k to denote the hierarchical sampling method in selecting the largest top- k gradients.
In RedSync-SGD (Fang et al., 2019), the authors proposed a trimmed top-k selection algorithm
(Trimmed k ) to select top gradients for CNNs by heuristically searching the threshold with moving the ratio between the maximum value and the average value.
However, Trimmed k could use a threshold that is much smaller than the exact top-
k threshold so that the number of selected gradients is much higher than k .
4 # of parameters 1e
[Table]
[Figure]
We propose an approximate Top k operator named Gaussian k by exploiting the Gaussian-like distribution property of gradients.
The key ideas of Gaussian k are: 1)
We regard the d -dimensional gradients (i.e., u p t ) at each iteration as a normal distribution with the mean ( µ ) and standard variance ( σ ) which can be directly calculated in an O ( d ) complexity and the calculations are friendly to
GPUs.
We estimate the threshold by exploiting the percent point function (ppf) of u pt with three parameters: p = 1 − k/d , µ and σ . 3)
As the distribution is not exactly normal, the ppf estimation could result in a threshold that could be slightly smaller or larger than the true threshold.
We move to the estimated threshold to the left or right side several times such that we can have very close top- k largest absolute values.
The algorithm of Gaussian k is shown in Algorithm 1.
E XPERIMENTS
As we mainly focus on gradient sparsiﬁcation, we use the fp32 operations instead of exploiting lower precision for training models.
The related software libraries are CUDA-10.1, cuDNN-7.5.0,
NCCL-2.3.7, PyTorch-1.1.0, OpenMPI-4.0.1, and Horovod-0.16.4 (Sergeev & Balso, 2018), which are kept the same for all evaluated algorithms.
4. N UMERICAL R ESULTS OF THE T OP k O PERATOR
To validate the bound of inequality (10), we randomly (in Gaussian distribution) generate a 100 ,dimension vector and compare the exact value of (cid:107) u − Top k ( u ) (cid:107) 2 / (cid:107) u (cid:107) 2 and 1 − k/d with ours derived (1 − k/d ) 2 .
We also compare the three bounds in the real-world model training process.
The results are shown in Fig.
It is seen that both ours and the previous result are in the upper side of the exact value, which indicates the derived bounds hold.
With increased k , ours becomes better and better than the previous result.
However, the exact value is still much lower than ours.
The reason is that our bound is derived by the reference line (Fig. 3(b)) but not the original function.
Therefore, if the shape of π 2( i ) can be exactly formulated, one can derive a tighter bound for the Top k operator than (1 − k/d ) 2 and we will leave this as our future work.
[Figure]
|| u T o p k ( u ) || 2 /||
u
|| 2 b o un d
[Figure]
4. GPU C OMPUTATION E FFICIENCY OF S PARSIFICATION
To evaluate the computing efﬁciency of different top- k selection algorithms on GPUs, we conduct experiments on an Nvidia Tesla V100 GPU with d ranging from 20 million to 400 million and k = 0 .
001 d .
The GPU computation speed comparison between Top k , DGC k and Gaussian k operators is shown in Fig.
For DGC k , we use 1% as suggested in (Lin et al., 2018) to estimate the threshold.
Note that tensor operations (e.g., top- k selection, mean and std calculations etc.)
are from PyTorch’s tensor APIs 5 .
The experimental results show that the Top k operator becomes very slow with a large number of parameters, while Gaussian k only generates slight overheads.
DGC k also becomes inefﬁcient if d is large.
It is crucial for the end-to-end training to have a computing-efﬁcient operator on GPUs such that the extra computation overhead would not limit the system scalability.
4. C ONVERGENCE P ERFORMANCE OF G AUSSIAN K-SGD.
To demonstrate the convergence performance of GaussianK-SGD, we run 120 epochs on CIFAR and 70 epochs on ImageNet with 16 workers.
On CIFAR10, the hyper-parameters are listed in Table 1, and on ImageNet, we use a mini-batch size of 32 per GPU and a initial learning rate 0.01.
The top-1 validation accuracy of the evaluated models is shown in Fig.
Note that for each model, we use the same hyper-parameters for the three SGD algorithms.
We can see that our GaussianKSGD has nearly consistent validation accuracy with TopK-SGD, which indicates that our proposed Gaussian k operator can select close elements with Top k .
The gradient distributions in GaussianKSGD are similar to TopK-SGD (Appendix A.2).
In the evaluated three models, GaussianK-SGD and TopK-SGD have slight accuracy loss (around 0 .
compared to Dense-SGD.
As suggested in (Lin et al., 2018), the small residuals could have staleness compared to the current gradients so that it could cause the slight accuracy loss.
Some optimization tricks in (Lin et al., 2018) like momentum correction would address this problem.
[Figure]
4. E ND - TO - END T RAINING S CALING E FFICIENCY OF G AUSSIAN K-SGD.
We evaluate the average iteration time of GaussianK-SGD on the ImageNet (Deng et al., 2009) data set with four popular models (AlexNet (Krizhevsky et al., 2012), VGG-16 (Simonyan & Zisserman, 2014), ResNet-50 (He et al., 2016) and Inception-V4 (Szegedy et al., 2017)) on a 16-GPU cluster compared to Dense-SGD with full gradients, TopK-SGD with the original top- k selection, DGC-SGD (Lin et al., 2018) with hierarchical sampling and RedSync-SGD (Fang et al., 2019) with trimmed top- k selection.
The cluster has four nodes connected with 10GbE, and each node contains four Nvidia Tesla V100 GPUs (the PCIe version with 32GB memory).
k = 0 .
001 d for all the sparsiﬁed algorithms.
The results are shown in Table 2, which shows that TopK-SGD and RedSync-SGD are even slower than Dense-SGD on the 16-GPU cluster, while our GaussianK-SGD runs much faster than other algorithms.
Speciﬁcally, GaussianK-SGD is 1.19 × -2.33 × faster than Dense-SGD, 1.36 × -3.63 × faster than TopK-SGD, and 1.11 ×
-1.51 × faster than DGC-SGD, respectively.
Even on the VGG-16 model, which has several large-size fully connected layers, GaussianK-SGD can achieve 85.5% scaling efﬁciency on the 16-GPU cluster with low-bandwidth Ethernet.
[Table]
C ONCLUSION
In this paper, we ﬁrst identiﬁed that existing theoretical results fail to explain the convergence performance of distributed SGD algorithms with Top- k gradient sparsiﬁcation (TopK-SGD).
Then we empirically studied gradient distributions during training with TopK-SGD through extensive experiments, and observe that the elements of stochastic gradients are mostly located near zero (Gaussianlike distribution).
The observation enables us to build a tighter bound for the Top k operator based on the empirical assumption of bell shaped distributions of gradients, which makes the convergence property of TopK-SGD explainable.
According to the distribution of gradients, we propose an approximate top- k selection algorithm named Gaussian k which is much efﬁcient than the existing top- k selection algorithms on GPUs.
We ﬁnally conduct extensive experiments to verify our derived bound for the Top k operator and the convergence performance of distributed SGD with Gaussian k (GaussianK-SGD).
In terms of the scaling efﬁciency, GaussianK-SGD achieves up to 2.33 × , 3.63 × and 1.51 × faster training speed than full gradient SGD, TopK-SGD and DGC-SGD on a 16-GPU cluster connected with 10 Gbps Ethernet, respectively. A A PPENDIX A. C UMULATIVE D ISTRIBUTION OF G RADIENTS IN T OP K-SGD [Figure]
A. G RADIENT D ISTRIBUTION ON D ENSE -SGD
[Figure] f r e q u e n c
[Figure]
A. G RADIENT D ISTRIBUTION ON G AUSSIAN K-SGD
[Figure]
A. P ROOF OF I NEQUALITY (6)
[Equation]
⇔
[Equation]
+
[Equation]
+
[Equation]
≤
[Equation]
+
[Equation]
+ A
[Equation]
+ A 3 ) ⇔ A 21 + A 1 A
[Equation]
+ A 1 A 4 ≤ A 21 + A 1 A 2 + A 1 A 3 + A 4 A 1 + A 4 A 2 + A 4 A
[Equation]
⇔ 0 ≤ A 1 A 3 + A 4 A 2 + A 4 A 3 .
A. S ENSITIVITY S TUDY OF G AUSSIAN K-SGD
[Figure]
Our proposed Gaussian k operator could under- or over- sparsify the gradients
[Figure]
which makes the number of selected gradients is larger or smaller than k .
To demonstrate the sensitivity of GaussianKSGD to the conﬁgured k , we ﬁrst evaluate the accumulated number of communicated gradients over the training process, which is shown in Fig.
It is seen that at the ﬁrst several epochs, our GaussianK-SGD under-sparsiﬁes the gradients (requires higher communication overheads), and after that, GaussianK-SGD over-sparsiﬁes the gradients (requires lower communication overheads) with little loss of accuracy.
To study the impact of different k on the convergence
[Figure]
we further evaluate the accuracy of
GaussianK-SGD by setting k = 0 .
01 d and k = 0 .
005 d on VGG-16 and ResNet-20 models with the same hyper-parameters as Fig.
The validation accuracy with different k is shown in Fig.
It can be seen that even Gaussian k would under- or over- sparsify the gradients, GaussianK-SGD performs well on the convergence.
[Figure]