Deep learning with Elastic Averaging SGD

Sixin Zhang, Anna Choromanska, Yann LeCun

Introduction

Training massive deep learning models requires parallelization across multiple GPUs or CPUs. The standard approach, Stochastic Gradient Descent (SGD), is notoriously difficult to scale because workers must constantly communicate their updates to a central "master" (parameter server).

This creates two major hurdles:

  1. Communication Bottlenecks: Constant data transfer slows down training, negating the benefits of parallelization.
  2. The Exploration-Exploitation Trade-off: In the complex, non-convex landscape of deep learning, workers that are forced to stay too close to the "average" (exploitation) might get stuck in poor local optima. Conversely, workers that wander too far (exploration) might never reach a consensus.

To address these challenges, researchers introduce Elastic Averaging SGD (EASGD), a parallelized optimization algorithm that uses an "elastic force" to link local workers to a central parameter server. By allowing local workers to fluctuate further from the center variable, it encourages more exploration of the loss landscape, leading to better performance and significantly lower communication overhead than traditional methods like Google’s Downpour.

Elastic Averaging SGD (EASGD)

The authors introduce EASGD and its momentum-based variant, EAMSGD, which fundamentally change how workers interact with the parameter server.

  • The Elastic Force: Unlike standard parallel SGD where workers simply send gradients to the master, EASGD allows each worker to maintain its own local version of the parameters. These local parameters are linked to a "center variable" on the master by a quadratic penalty—essentially acting as an elastic band.
  • Update Rule: Workers perform several local steps of SGD. Periodically (every $\tau$ steps), they communicate with the master. The worker moves slightly toward the center, and the center moves slightly toward the worker.
  • Asynchronous Execution: The algorithm is designed for asynchronous execution where workers don't have to wait for each other, maximizing GPU utilization.
  • Stability Analysis: The authors provide a theoretical comparison with ADMM (a popular optimization framework), proving that while ADMM can become "chaotic" and unstable in certain parallel settings, EASGD remains stable under simple conditions.

Key Insights and Ideas

  • Exploration is a Feature, Not a Bug: In deep learning, allowing local workers to "drift" away from the center variable (by using a smaller elastic constant $\alpha$ or a larger communication period $\tau$) actually helps the model find better local optima.
  • Communication Efficiency: EASGD remains stable even when communication is infrequent. While methods like Downpour become unstable when the communication period $\tau$ is large, EASGD thrives, allowing for a massive reduction in bandwidth usage.
Training and test performance on CIFAR-10 across different communication periods (τ). EAMSGD (orange) maintains stability and low error even at high τ.
  • Symmetry Matters: The "elastic" nature of the update creates a symmetric force between the master and the workers, which the authors show is crucial for the algorithm's mathematical stability in asynchronous environments.

Experimental Results

The researchers evaluated their algorithms on two standard computer vision benchmarks: CIFAR-10 (trained on a 7-layer CNN) and ImageNet (trained on an 11-layer CNN).

  • Superior Accuracy: On CIFAR-10, EAMSGD consistently achieved lower test errors than Downpour and sequential SGD.
  • Faster Convergence: On the massive ImageNet dataset, EAMSGD reached target error rates significantly faster than competitors. For example, with 8 GPUs, EAMSGD achieved a 1.8x speedup over Downpour to reach a 49% test error.
ImageNet training results showing test error over wallclock time for 4 and 8 workers. EAMSGD achieves lower error faster than baselines.
  • Bandwidth Savings: In the ImageNet experiments, EASGD used a communication period of $\tau=10$, while Downpour required $\tau=1$. This means EASGD achieved better results while using 10 times less communication bandwidth.

Limitations and Future Work

While highly effective, the approach has a few areas ripe for future exploration:

  • Data Distribution: The paper assumes each worker can sample from the entire dataset (global consensus). It does not deeply explore the "data-parallel" setting where data is partitioned across workers, which is common in distributed systems.
  • Momentum Theory: While EAMSGD performed the best empirically, the authors noted that its specific behavior is "intriguing" and requires further theoretical study to fully understand why the combination of elastic forces and Nesterov momentum is so effective.
  • Hyperparameter Sensitivity: The performance relies on choosing the right elasticity constant ($\alpha$), which adds another parameter to tune alongside the learning rate.

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