Deep learning with Elastic Averaging SGD

Sixin Zhang, Anna Choromanska, Yann LeCun

TL;DR

The paper introduces Elastic Averaging SGD (EASGD), a novel parallel optimization algorithm designed to accelerate deep learning training under communication constraints. By linking local worker variables to a central master variable via an "elastic force," EASGD allows workers to explore complex loss landscapes more freely while drastically reducing communication overhead, outperforming standard baselines like DOWNPOUR.

What Problem Does This Paper Address?

Parallelizing Stochastic Gradient Descent (SGD) is essential for training large-scale deep learning models within a reasonable timeframe. However, distributed training faces two major bottlenecks:

  1. Communication Overhead: Constantly synchronizing massive parameter vectors between local workers (GPUs/CPUs) and a central parameter server creates severe network bottlenecks.
  2. The Optimization Landscape: Deep neural networks possess highly non-convex loss surfaces filled with numerous poor local optima. Traditional parallel methods that force strict consensus early on can trap workers in suboptimal regions, harming the final model quality.

The authors aim to design a parallel SGD variant that minimizes communication frequency without sacrificing stability or solution quality.

Methods

EASGD is motivated by the quadratic penalty method but re-interpreted as a parallelized extension of averaging SGD.

  • The Elastic Force: Instead of forcing workers to immediately adopt the master's parameters, each local worker $i$ maintains its own local parameters $x^i$. The master maintains a center variable $\tilde{x}$. The update rule introduces an elastic penalty term $\alpha(x^i - \tilde{x})$ that acts like a spring—allowing local variables to fluctuate away from the center to explore the parameter space, but pulling them back over time.
  • Asynchronous EASGD: Workers perform $\tau$ local steps of gradient descent before communicating the elastic difference to the master. This communication period $\tau$ directly controls the trade-off between exploration (large $\tau$) and exploitation (small $\tau$).
  • Momentum EASGD (EAMSGD): The authors incorporate Nesterov’s momentum scheme into the local worker updates to further accelerate convergence.
  • Stability Analysis: The paper provides a theoretical stability analysis of EASGD in a round-robin asynchronous scheme, proving it is unconditionally stable under simple conditions, whereas the alternative parallel framework ADMM can exhibit chaotic, divergent behavior.

Datasets

The algorithm was evaluated on two standard image classification benchmarks:

  • CIFAR-10: Trained using a 7-layer convolutional neural network (CNN).
  • ImageNet (ILSVRC 2013): Trained using a large 11-layer CNN architecture.

Key Insights and Ideas

  • Exploration Wins in Deep Learning: In convex optimization, loose coupling between workers slows down convergence. In deep learning, however, the authors show that allowing workers to drift further apart (less frequent communication) actually improves test performance because it prevents premature consensus on poor local minima.
  • Symmetry Breeds Stability: The update equations reveal an elastic symmetry between the master and the workers. This symmetric force is the mathematical foundation for why EASGD remains stable at high communication delays, while non-symmetric methods like ADMM fail.

Key Results

  • Resilience to Communication Delays: As shown in the CIFAR-10 experiments, standard DOWNPOUR-based methods become highly unstable and diverge when the communication period $\tau$ is set to 16 or 64. In contrast, EASGD and EAMSGD maintain high stability and achieve lower test errors at these larger communication intervals.
Figure 2: Training and test loss and the test error for the center variable versus a wallclock time for different communication periods τ on CIFAR dataset with the 7-layer convolutional neural network.
  • Significant Speedups: On CIFAR-10 with 16 workers ($p=16$), EAMSGD achieved an 11.1x relative speedup compared to sequential Momentum SGD to reach a target test error of 21%.
Figure 3: Training and test loss and the test error for the center variable versus a wallclock time for different number of local workers p for parallel methods (MSGD uses p = 1) on CIFAR with the 7-layer convolutional neural network. EAMSGD achieves significant accelerations compared to other methods, e.g. the relative speed-up for p = 16 (the best comparator method is then MSGD) to achieve the test error 21% equals 11.1.
  • Scalability on ImageNet: For the ImageNet dataset, EAMSGD with 8 workers ($p=8$) achieved a 1.8x speedup over DOWNPOUR to reach a 49% test error, while simultaneously reducing communication overhead by using $\tau=10$ instead of $\tau=1$.
Figure 4: Training and test loss and the test error for the center variable versus a wallclock time for different number of local workers p (MSGD uses p = 1) on ImageNet with the 11-layer convolu- tional neural network. Initial learning rate is decreased twice, by a factor of 5 and then 2, when we observe that the online predictive loss [30] stagnates. EAMSGD achieves significant accelerations compared to other methods, e.g. the relative speed-up for p = 8 (the best comparator method is then DOWNPOUR) to achieve the test error 49% equals 1.8, and simultaneously it reduces the commu- nication overhead (DOWNPOUR uses communication period τ = 1 and EAMSGD uses τ = 10).

Limitations and Future Work

While EAMSGD empirically delivers the best performance, the authors note that the theoretical interplay between the elastic force and Nesterov's momentum is intriguing and not yet fully understood. Future work is required to theoretically analyze the momentum variant's stability properties. Additionally, the current framework assumes each worker can sample the entire dataset, leaving open the problem of strict data-parallel partitioning under heavy communication constraints.

Summary updated

BibTeX
@inproceedings{zhang2015deep,
  author = {Sixin Zhang and Anna Choromanska and Yann LeCun},
  title = {{Deep learning with Elastic Averaging SGD}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2015},
  url = {https://openreview.net/forum?id=B1WwMP-Obr},
}
Figure