Ensemble-Compression: A New Method for Parallel Training of Deep Neural Networks

06/02/2016 ∙ by Shizhao Sun, et al. ∙ Nankai University Microsoft 0

Parallelization framework has become a necessity to speed up the training of deep neural networks (DNN) recently. Such framework typically employs the Model Average approach, denoted as MA-DNN, in which parallel workers conduct respective training based on their own local data while the parameters of local models are periodically communicated and averaged to obtain a global model which serves as the new start of local models. However, since DNN is a highly non-convex model, averaging parameters cannot ensure that such global model can perform better than those local models. To tackle this problem, we introduce a new parallel training framework called Ensemble-Compression, denoted as EC-DNN. In this framework, we propose to aggregate the local models by ensemble, i.e., averaging the outputs of local models instead of the parameters. As most of prevalent loss functions are convex to the output of DNN, the performance of ensemble-based global model is guaranteed to be at least as good as the average performance of local models. However, a big challenge lies in the explosion of model size since each round of ensemble can give rise to multiple times size increment. Thus, we carry out model compression after each ensemble, specialized by a distillation based method in this paper, to reduce the size of the global model to be the same as the local ones. Our experimental results demonstrate the prominent advantage of EC-DNN over MA-DNN in terms of both accuracy and speedup.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Recent rapid development of deep neural networks (DNN) has demonstrated that its great success mainly comes from big data and big models [25, 13]. However, it is extremely time-consuming to train a large-scale DNN model over big data. To accelerate the training of DNN, parallelization frameworks like MapReduce [7] and Parameter Server[18, 6] have been widely used. A typical parallel training procedure for DNN consists of continuous iterations of the following three steps. First, each worker trains the local model based on its own local data by stochastic gradient decent (SGD) or any of its variants. Second, the parameters of the local DNN models are communicated and aggregated to obtain a global model, e.g., by averaging the identical parameter of each local models [27, 20]. Finally, the obtained global model is used as a new starting point of the next round of local training. We refer the method that performs the aggregation by averaging model parameters as MA, and the corresponding parallel implementation of DNN as MA-DNN.

However, since DNN is a highly non-convex model, the loss of the global model produced by MA cannot be guaranteed to be upper bounded by the average loss of the local models. In other words, the global model obtained by MA-DNN might even perform worse than any local model, especially when the local models fall into different local-convex domains. As the global model will be used as a new starting point of the successive iterations of local training, the poor performance of the global model will drastically slow down the convergence of the training process and further hurt the performance of the final model.

To tackle this problem, we propose a novel framework for parallel DNN training, called Ensemble-Compression (EC-DNN), the key idea of which is to produce the global model by ensemble instead of MA. Specifically, the ensemble method aggregates local models by averaging their outputs rather than their parameters. Equivalently, the global model produced by ensemble is a larger network with one additional layer which takes the outputs of local models as inputs with weights as , where

is the number of local models. Since most of widely-used loss functions for DNN (e.g., cross entropy loss, square loss, and hinge loss) are convex with respect to the output vector of the model, the loss of the global model produced by ensemble can be upper bounded by the average loss of the local models. Empirical evidence in 

[25, 5] even show that the ensemble model of DNN, i.e., the global model, is usually better than any base model, i.e., the local model. According to previous theoretical and empirical studies [17, 24], ensemble model tend to yield better results when there exists a significant diversity among local models. Therefore, we train the local models for a longer period for EC-DNN to increase the diversity among them. In other words, EC-DNN yields less communication frequency than MA-DNN, which further emphasizes the advantages of EC-DNN by reducing communication cost as well as increasing robustness to limited network bandwidth.

There is, however, no free lunch. In particular, the ensemble method will critically increase the model complexity: the resultant global model with one additional layer will be times wider than any of the local models. Several ensemble iterations may result in explosion of the size of the global model. To address this problem, we further propose an additional compression step after the ensemble. This approach cannot only restrict the size of the resultant global model to be the same size as local ones, but also preserves the advantage of ensemble over MA. Given that both ensemble and compression steps are dispensable in our new parallelization framework, we name this framework as EC-DNN. As a specialization of the EC-DNN framework, we adopt the distillation based compression [1, 22, 14]

, which produces model compression by distilling the predictions of big models. Nevertheless, such distillation method requires extra time for training the compressed model. To tackle this problem, we seek to integrate the model compression into the process of local training by designing a new combination loss, a weighted interpolation between the loss based on the pseudo labels produced by global model and that based on the true labels. By optimizing such combination loss, we can achieve model compression in the meantime of local training.

We conducted comprehensive experiments on CIFAR-10, CIFAR-100, and ImageNet datasets, w.r.t. different numbers of local workers and communication frequencies. The experimental results illustrate a couple of important observations: 1) Ensemble is a better model aggregation method than MA consistently. MA suffers from that the performance of the global model could vary drastically and even be much worse than the local models; meanwhile, the global model obtained by the ensemble method can consistently outperform the local models. 2) In terms of the end-to-end results, EC-DNN stably achieved better test accuracy than MA-DNN in all the settings. 3) EC-DNN can achieve better performance than MA-DNN even when EC-DNN communicates less frequently than MA-DNN, which emphasizes the advantage of EC-DNN in training a large-scale DNN model as it can significantly reduce the communication cost.

2 Preliminary: Parallel Training of DNN

In the following of this paper, we denote a DNN model as where represents the parameters of this DNN model. In addition, we denote the outputs of the model on the input as , where is the number of classes and denotes the output (i.e., the score) for the -th class. DNN is a highly non-convex model due to the non-linear activations and poolings after many layer.

In the parallel training of DNN, suppose that there are workers and each of them holds a local dataset with size , . Denote the weights of the DNN model at the iteration on the worker as . The communication between the workers is invoked after every iterations of updates for the weights, and we call the communication frequency. A typical parallel training procedure for DNN implements the following three steps in an iterative manner until the training curve converges.

1. Local training: At iteration , worker updates its local model by using SGD. Such local model is updated for iterations before the cross-machine synchronization.

2. Model aggregation: The parameters of local models are communicated across machines. Then, a global model is produced by aggregating local models according to certain aggregation method.

3. Local model reset: The global model is sent back to the local workers, and set as the starting point for the next round of local training.

We denote the aggregation method in the second step as and the weights of the global model as . That is, , where . A widely-used aggregation method is model average (MA), which averages each parameter over all the local models, i.e.,

(1)

We denote the parallel training method of DNN that using MA as MA-DNN for ease of reference.

With the growing efforts in parallel training for DNN, many previous studies [27, 20, 6, 26, 2, 3] have paid attention to MA-DNN. NG-SGD [20] proposes an approximate and efficient implementation of Natural Gradient for SGD (NG-SGD) to improve the performance of MA-DNN. EASGD [26] improves MA-DNN by adding an elastic force which links the weights of the local models with the weights of the global model. BMUF [3] leverages data parallelism and blockwise model-update filtering to improve the speedup of MA-DNN. All these methods aim at solving different problems with us, and our method can be used with those methods simultaneously.

3 Model Aggregation: MA vs. Ensemble

In this section, we first reveal why the MA method cannot guarantee to produce a global model with better performance than local models. Then, we propose to use ensemble method to perform the model aggregation, which in contrast can ensure to perform better over local models.

MA was originally proposed for convex optimization. If the model is convex w.r.t. the parameters and the loss is convex w.r.t. the model outputs, the performance of the global model produced by MA can be guaranteed to be no worse than the average performance of local models. This is because, when is a convex model, we have,

(2)

Moreover, when the loss is also convex w.r.t. the model outputs , we have,

(3)

By combining inequalities (2) and (3), we can see that it is quite effective to apply MA in the context of convex optimization, since the loss of the global model by MA is no greater than the average loss of local models in such context.

However, DNN is indeed a highly non-convex model due to the existence of activation functions and pooling functions (for convolutional layers). Therefore, the above properties of MA for convex optimization does not hold for DNN such that the MA method cannot produce any global model with guaranteed better performance than local ones. Especially, when the local models are in the neighborhoods of different local optima, the global model based on MA could be even worse than any of the local models. Furthermore, given that the global model is usually used as the starting point of the next round of local training, the performance of the final model could hardly be good if a global model in any round fails to achieve good performance. Beyond the theoretical analysis above, the experimental results reported in Section 

5.3 and previous studies [20, 3] also revealed such problem.

While the DNN model itself is non-convex, we notice that most of widely-used loss functions for DNN are convex w.r.t. the model outputs (e.g., cross entropy loss, square loss, and hinge loss). Therefore, Eq.(3) holds, which indicates that averaging the output of the local models instead of their parameters guarantees to yield better performance than local models. To this end, we propose to ensemble the local models by averaging their outputs as follows,

(4)

4 Ec-Dnn

In this section, we first introduce the EC-DNN framework, which employs ensemble for model aggregation. Then, we introduce a specific implementation of EC-DNN that adopts distillation for the compression. At last, we take some further discussions for the time complexity of EC-DNN and the comparison with traditional ensemble methods.

4.1 Framework

The details of EC-DNN framework is shown in Alg. 1. Note that, in this paper, we focus on the synchronous case111As shown in [2], MA-DNN in synchronous case converges faster and achieves better test accuracy than that in asynchronous case. within the MapReduce framework, but EC-DNN can be generalized into the asynchronous case and parameter server framework as well. Similar to other popular parallel training methods for DNN, EC-DNN iteratively conducts local training, model aggregation, and local model reset.

1. Local training: The local training process of EC-DNN is the same as that of MA-DNN, in which the local model is updated by SGD. Specifically, at iteration , worker updates its local model from to by minimizing the training loss using SGD, i.e., , where is the learning rate, and is the gradients of the empirical loss of the local model on one mini batch of the local dataset . One local model will be updated for iterations before the cross-machine synchronization.

2. Model aggregation: The goal of model aggregation is to communicate the parameters of local models, i.e., , across machines. To this end, a global model is produced by ensemble according to in Eq.(4), i.e., averaging the outputs of the local models. Equivalently, the global model produced by ensemble is a larger network with one additional layer, whose outputs consist of nodes representing classes, and whose inputs are those outputs from local models with weights as , where is the number of local models. Therefore, the weights of global model can be denoted as ,

Note that such ensemble-produced global model (i.e., ) is one layer deeper and times wider than the local model (i.e., ). Therefore, continuous rounds of ensemble process will easily give rise to a global model with exploding size. To avoid this problem, we propose introducing a compression process (i.e., Compression() in Alg. 1) after ensemble process, to compress the resultant global model to be the same size as those local models while preserving the advantage of the ensemble over MA. We denote the compressed model for the global model on the worker as .

Randomly initialize and set ;
while stop criteria are not satisfied do
        ;
        ;
        if  divides  then
               ;
               Compression();
               .
       
return
Algorithm 1 EC-DNN()

3. Local model reset: The compressed model will be set as the new starting point of the next round of local training, i.e., where .

At the end of the training process, EC-DNN will output local models and we choose the model with the smallest training loss as the final one. Note that, we can also take the global model (i.e., the ensemble of local models) as the final model if there are enough computation and storage resources for the test.

4.2 Implementations

Algorithm 1 contains two sub-problems that need to be addressed more concretely: 1) how to train local models that can benefit more to the ensemble model; 2) how to compress the global model without costing too much extra time.

4.2.1 Diversity Driven Local Training.

In order to improve the performance of ensemble, it is necessary to generate diverse local models other than merely accurate ones [17, 24]. Therefore, in the local training phase, i.e., the third line in Alg. 1, we minimize both the loss on training data and the similarity between the local models, which we call diversity regularized local training loss. For the -th worker, it is defined as follows,

(5)

where is the average of the outputs of the latest compressed models for input . In our experiments, the local training loss takes the form of cross entropy, and the similarity loss takes the form of distance. The smaller is, the farther the outputs of a local model is from the average of outputs of the latest compressed models, and hence the farther (or the more diverse) the local models are from (or with) each other.

4.2.2 Distillation Based Compression.

In order to compress the global model to the one with the same size as the local model, we use distillation base compression method222Other algorithms for the compression [4, 10, 8, 9, 21, 11] can also be used for the same purpose, but different techniques may be required in order to plug these compression algorithms into the EC-DNN framework. [1, 22, 14], which obtains a compressed model by letting it mimic the predictions of the global model. In order to save the time for compression, in compression process, we minimize the weighted combination of the local training loss and the pure compression loss, which we call accelerated compression loss. For the -th worker, it is defined as follows,

(6)

where is the output of the latest ensemble model for the input . In our experiments, the local training loss and the pure compression loss both take the form of cross entropy loss. By reducing the loss between and the pseudo labels , the compressed model can play the similar function as the ensemble model.

We denote the distillation based compression process as Compression (, , ), and show its details in Alg. 2. First, on the -th local worker, we construct a new training data by relabeling the original dataset with the pseudo labels produced by the global model, i.e., . Specifically, when producing pseudo labels, we first produce the predictions of each local models respectively, and then average the predictions of all the local models. By this way, we keep using the same amount of GPU memory as MA-DNN throughout the training, because the big global model, which is times larger than the local model, has never been established in GPU memory. Then, we optimize the accelerated compression loss in Eq.(6) by SGD for iterations. We initialize the parameters of the compressed model by the parameters of the latest local model instead of random numbers. Finally, the obtained compressed model is returned, which will be set as the new starting point of next round of the local training.

for  do
        for  do
               ;
              
       ;
       
;
Set and ;
while  do
        ;
        ;
       
return .
Algorithm 2 Compression()

We can find that minimizing the diversity regularized loss for local training (Eq.(5)) and minimizing the accelerated compression loss for compression (Eq.(6)) are two opposite but complementary tasks. They need to leverage information generated by each other into their own optimization. Specifically, the local training phase leverages based on compressed model while the compression process uses provided by local models. Due to such structural duality, we take advantage of a new optimization framework, i.e. dual learning [12], to improve the performance of both tasks simultaneously.

4.3 Time Complexity

We compare the time complexity of MA-DNN and EC-DNN from two aspects:

1. Communication time: Parallel DNN training process is usually sensitive to the communication frequency . Different parallelization frameworks yield various optimal . In particular, EC-DNN prefers larger

compared to MA-DNN. Essentially, less frequent communication across workers can give rise to more diverse local models, which will lead to better ensemble performance for EC-DNN. On the other hand, much diverse local models may indicate greater probability that local models are in the neighboring of different local optima such that the global model in MA-DNN is more likely to perform worse than local ones. The poor performance of the global model will significantly slow down the convergence and harm the performance of the final model. Therefore, EC-DNN yields less communication time than MA-DNN.

2. Computational time: According to the analysis in Sec 4.2, EC-DNN does not consume extra computation time for model compression since the compression process has been integrated into the local training phase, as shown in Eq.(6). Therefore, compared with MA-DNN, EC-DNN only requires additional time to relabel the local data using the global model, which approximately equals to the maximal time of the feed-forward propagation over the local dataset. We call such extra time “relabeling time” for ease of reference. To limit the relabeling time on large datasets, we choose to relabel a portion of the local data, denoted as . Our experimental results in Section 5.3 will demonstrate that the relabeling time can be controlled within a very small amount compared to the training time of DNN. Therefore, EC-DNN can cost only a slightly more or roughly equal computational time over MA-DNN.

Overall, compared to MA-DNN, EC-DNN is essentially more time-efficient as it can reduce the communication cost without significantly increasing computational time.

4.4 Comparison with Traditional Ensemble Methods

Traditional ensemble methods for DNN [25, 5]

usually first train several DNN models independently without communication and make ensemble of them in the end. We denote such method as E-DNN. E-DNN was proposed to improve the accuracy of DNN models by reducing variance and it has no necessity to train base models with parallelization framework. In contrast, EC-DNN is a parallel algorithm aiming at training DNN models faster without the loss of the accuracy by leveraging a cluster of machines.

Although E-DNN can be viewed as a special case of EC-DNN with only one final communication and no compression process, the intermediate communications in EC-DNN will make it outperform E-DNN. The reasons are as follows: 1) local workers has different local data, the communications during the training will help local models to be consensus towards the whole training data; 2) the local models of EC-DNN can be continuously optimized by compressing the ensemble model after each ensemble process. Then, another round of ensemble will result in more advantage for EC-DNN over E-DNN since the local models of EC-DNN has been much improved.

5 Experiments

5.1 Experimental Setup

Platform.

Our experiments are conducted on a GPU cluster interconnected with an InfiniBand network, each machine of which is equipped with two Nvdia’s K20 GPU processors. One GPU processor corresponds to one local worker.

Data.

We conducted experiments on public datasets CIFAR-10, CIFAR-100 [16]

and ImageNet (ILSVRC 2015 Classification Challenge)

[23]. For all the datasets, each image is normalized by subtracting the per-pixel mean computed over the whole training set. The training images are horizontally flipped but not cropped, and the test data are neither flipped nor cropped.

Model.

On CIFAR-10 and CIFAR-100, we employ NiN [19], a 9-layer convolutional network. On ImageNet, we use GoogLeNet [25], a 22-layer convolutional network. We used the same tricks, including random initialization,

-regularization, Dropout, and momentum, as the original paper. All the experiments are implemented using Caffe

[15].

Parallel Setting.

On experiments on CIFAR-10 and CIFAR-100, we explore the number of workers and the communication frequency for both MA-DNN and EC-DNN. On experiments on ImageNet, we explore and . The communication across local workers is implemented using MPI.

Hyperparameters Setting of EC-DNN.

There are four hyperparameters in EC-DNN, including 1) the coefficient of the regularization in terms of similarity between local models, i.e.,

in Eq.(5), 2) the coefficient of the model compression loss, i.e., in Eq.(6), 3) the length of the compression process, i.e., in Alg. 2, and 4) the portion of the data needed to be relabeled in the compression process as mentioned in Sec 4.3. We tune these hyperparameters by exploring a certain range of values and then choose the one resulting in best performance. In particular, we explored among , and finally choose on all the datasets. To decide the value of , we explored two strategies, one of which uses consistent at each compression process while the other employs increasing after a certain percentage of compression process. In the first strategy, we explored among , and in the second one, we explored among , the incremental step of among , and the percentage of compression process from which begins to increase among . On CIFAR datasets, we choose to use for the first 20% of compression processes and for all the other compression processes. And, on ImageNet, we choose to use consistent throughout the compression. Moreover, we explored ’s value among of the number of the mini-batches that the whole training lasts, and finally pick on all the datasets. Furthermore, we explored ’s value among . And, we finally select on CIFAR datasets, and on ImageNet.

5.2 Compared Methods

We conduct performance comparisons on four methods:

  • S-DNN denotes the sequential training on one GPU until convergence [19, 25].

  • E-DNN denotes the method that trains local models independently and makes ensemble of the local models merely at the end of the training [25, 5].

  • MA-DNN refers the parallel DNN training framework with the aggregation by averaging model parameters [27, 20, 6, 26, 2, 3].

  • EC-DNN refers the parallel DNN training framework with the aggregation by averaging model outputs. EC-DNN applies Compression for the compression for all the experiments in this paper.

Furthermore, we use EC-DNN, MA-DNN and E-DNN to denote the corresponding methods that take the local model with the smallest training loss as the final model, and use EC-DNN, MA-DNN and E-DNN to represent the respective methods that take the global model (i.e., the ensemble of local models for EC-DNN and E-DNN, and the average parameters of local models for MA-DNN) as the final model.

5.3 Experimental Results

5.3.1 Model Aggregation.

We first compare the performance of aggregation methods, i.e. MA and Ensemble. We employ Diff

as the evaluation metric, which measures the improvement of the test error of the global model compared to that of the local models, i.e.,

(7)

where denotes the test error of the local model on worker , and denotes the test error of the corresponding global model produced by MA (or ensemble) in MA-DNN (or EC-DNN). The positive (or negative) Diff means performance improvement (or drop) of global models over local models. On each dataset, we produce a distribution for Diff over all the communications and all the parallel settings (including numbers of workers and communication frequencies). We show the distribution for Diff of MA and ensemble on CIFAR datasets in Fig. 3 and 3 respectively, in which red bars (or blue bars) stand for that the performance of the global model is worse (or better) than the average performance of local models.

For MA, from Fig. 3, we can observe that, on both datasets, over global models achieve worse performance than the average performance of local models, and the average performance of locals model can be worse than the global model by a large margin, e.g., . On the other hand, for ensemble, we can observe from Fig. 3 that the performance of the global model is consistently better than the average performance of the local models on both datasets. Specifically, the performances of over global models are +% better than the average performance of local models on both datasets.

(a) CIFAR-10 (b) CIFAR-100
Figure 1: MA.
(a) CIFAR-10 (b) CIFAR-100
Figure 2: Ensemble.
(a) CIFAR-10 (b) CIFAR-100
Figure 3: Compression.

5.3.2 Model Compression.

In order to avoid model size explosion, the ensemble model is compressed before the next round of local training. However, such compression may result in a risk of performance loss. To examine if the performance improvement of the compressed global models over those local ones in EC-DNN can still outperform such kind of improvement in MA-DNN, we compare Diff in MA-DNN (see Eq.(7)) with Diff in EC-DNN,

(8)

where denotes the test error of the local model on worker , and denotes the test error of the corresponding compressed model after compressing the ensemble model of those local models on worker . The positive (or negative) Diff means performance improvement (or drop) of the compressed model over local ones. Figure 3 illustrates the distribution of Diff over all the communications and various settings of communication frequency and the number of workers on two CIFAR datasets.

From Fig. 3, we can observe that the average performance of the compressed models is consistently better than that of the local models on both datasets in EC-DNN, while Figure 3 indicates that there are over 10% global models do not reaching better performance than the local ones in MA-DNN. In addition, the average improvement of compressed models over local ones in EC-DNN is greater than that in MA-DNN. Specifically, the average of such improvements in EC-DNN are 1.03% and 1.95% on CIFAR-10 and CIFAR-100, respectively, while the average performance difference in MA-DNN are -3.53% and 1.72% on CIFAR-10 and CIFAR-100 respectively. All these results can indicate that EC-DNN is a superior method than MA-DNN.

5.3.3 Accuracy.

In the following, we examine the accuracy of compared methods. Figure 4 shows the test error of the global model during the training process w.r.t. the overall time, and Table 1 reports the final performance after the training process converges. For EC-DNN, the relabeling time has been counted in the overall time when plotting the figure and the table. We report EC-DNN and MA-DNN that achieve best test performance among all the communication frequencies.

From Fig. 4, we can observe that EC-DNN outperforms MA-DNN and S-DNN on both datasets for all the number of workers, which demonstrates that EC-DNN is superior to MA-DNN. Specifically, at the early stage of training, EC-DNN may not outperform MA-DNN. We hypothesize the reason as the very limited number of communications among local works at the early stage of EC-DNN training. Along with increasing rounds of communications, EC-DNN will catch up with and then keep outperforming MA-DNN after the certain time slot. Besides, EC-DNN outperforms E-DNN consistently for different datasets and number of workers, indicating that technologies in EC-DNN are not trivial improvements of E-DNN but is the key factor of the success of EC-DNN.

In Table 1, each EC-DNN outperforms MA-DNN and MA-DNN. The average improvements of EC-DNN over MA-DNN and MA-DNN are around 1% and 5% for CIFAR-10 and CIFAR-100 respectively. Besides, we also report the final performance of EC-DNN considering that it can save test time and still outperform both MA-DNN and MA-DNN when we do not have enough computational and storage resource. Specifically, the best EC-DNN achieved test errors of 10.04% and 9.88% for and respectively on CIFAR-10, while it achieved test errors of 34.8% and 35.1% for and respectively on CIFAR-100. In addition, E-DNN never outperforms MA-DNN and MA-DNN.

(a) , CIFAR-10
(b) , CIFAR-10
(c) , CIFAR-100
(d) , CIFAR-100
Figure 4: Test error curves on CIFAR datasets.

5.3.4 Speed.

According to our analysis in Sec 4.3, EC-DNN is more time-efficient than MA-DNN because it communicates less frequently than MA-DNN and thus costs less time on communication. To verify this, we measure the overall time cost by each method to achieve the same accuracy. Table 1 shows the speed of compared methods. In this table, we denote the speed of MA-DNN as 1, and normalize the speed of other methods by dividing that of MA-DNN. If one method never achieves the same performance with MA-DNN, we denote its speed as 0. Therefore, larger value of speed indicates better speedup.

From Table 1, we can observe that EC-DNN can achieve better speedup than MA-DNN on all the datasets. On average, EC-DNN and EC-DNN runs about 2.24 and 1.33 times faster than MA-DNN, respectively. Furthermore, EC-DNN consistently results in better speedup than E-DNN on all the datasets. On average, E-DNN only runs about 1.85 times faster than MA-DNN while EC-DNN can reach about 2.24 times faster speed. From this table, we can also find that E-DNN never achieves the same performance with MA-DNN while EC-DNN can contrarily run much faster than MA-DNN.

Furthermore, Table 1 demonstrates the communication frequency that makes compared methods achieve the corresponding speed. We can observe that EC-DNN tend to communicate less frequently than MA-DNN. Specifically, MA-DNN usually achieves the best performance with a small (i.e., 16), while EC-DNN cannot reach its best performance before is not as large as 2000.

CIFAR-10 CIFAR-100
K=4 K=8 K=4 K=8
Error Speed Error Speed Error Speed Error Speed
MA-DNN 10.3 1 16 9.99 1 2k 36.18 1 16 35.55 1 16
E-DNN 9.44 1.58 - 9.05 1.92 - 32.49 1.95 - 30.9 1.97 -
EC-DNN 8.43 1.92 4k 8.19 2.05 4k 30.26 2.52 4k 29.31 2.48 2k
MA-DNN 10.55 0 16 10.54 0 2k 36.39 0 16 35.56 0 16
E-DNN 11.04 0 - 10.95 0 - 39.57 0 - 39.55 0 -
EC-DNN 10.04 1.36 4k 9.88 1.26 4k 34.8 1.42 4k 35.1 1.27 2k
S-DNN 10.41 35.68
Table 1: Test error (%), speed and on CIFAR datasets.

5.3.5 Large-Scale Experiments.

In the following, we will conduct experiments to compare the performance of MA-DNN with that of EC-DNN with the setting of much bigger model and more data, i.e., GoogleNet on ImageNet. Figure 5 shows the test error of the global model w.r.t the overall time. The communication frequencies that makes MA-DNN and EC-DNN achieve best performance are 1 and 1000 respectively. We can observe that EC-DNN consistently achieves better test performance than S-DNN, MA-DNN and E-DNN throughout the training. Besiedes, we can observe that EC-DNN outperforms MA-DNN even at the early stage of the training, while EC-DNN cannot achieve this on CIFAR datasets because it communicates less frequently than MA-DNN. The reason is that frequent communication will make the training much slower for very big model, i.e., use less mini-batches of data within the same time. When the improvements introduced by MA cannot compensate the decrease of the number of used data, MA-DNN no longer outperforms EC-DNN at the early stage of the training. In this case, the advantage of EC-DNN becomes even more outstanding.

(a)
(b)
Figure 5: Test error curves on ImageNet.

6 Conclusion and Future Work

In this paper, we propose EC-DNN, a new Ensemble-Compression based parallel training framework for DNN. As compared to the traditional approach, MA-DNN, that averages the parameters of different local models, our proposed method uses the ensemble method to aggregate local models. In this way, we can guarantee that the error of the global model in EC-DNN is upper bounded by the average error of the local models and can consistently achieve better performance than MA-DNN. In the future, we plan to consider other compression methods for EC-DNN. Besides, we will investigate the theoretical properties of the ensemble method, compression method, and the whole EC-DNN framework.

7 Acknowledgments

This work is partially supported by NSF of China (grant numbers: 61373018, 61602266, 11550110491) and NSF of Tianjin (grant number: 4117JCYBJC15300).

References