Deep learning with Elastic Averaging SGD

Sixin Zhang, Anna Choromanska, Yann LeCun · OpenReview

Overview

Elastic Averaging SGD (EASGD) is a parallel optimization algorithm designed to train deep learning models efficiently across multiple processors. By linking local workers to a central master via an "elastic force," EASGD allows individual workers to explore the loss landscape independently. By reducing communication frequency and allowing parameters to fluctuate, it achieves faster convergence and better test accuracy than traditional parallel methods like Downpour SGD.

The Challenge of Parallelizing SGD

Training massive deep learning models requires parallelization across multiple GPUs or CPUs. The standard approach, Stochastic Gradient Descent (SGD), is notoriously difficult to parallelize efficiently without incurring massive overhead. Existing methods, such as Google’s Downpour SGD, often suffer from high communication bottlenecks—constantly sending parameters and gradients back and forth—or "staleness" issues where workers end up using outdated information.

Furthermore, deep learning loss landscapes are highly non-convex and filled with many local optima. Most parallel algorithms try to force all workers to stay as close to the average as possible. The authors argue that this strict "consensus" approach might actually be counterproductive, trapping the model in mediocre local minima too early instead of allowing it to find better solutions.

The EASGD Approach

The authors introduce Elastic Averaging SGD (EASGD), drawing inspiration from a physical system of springs to balance local exploration with global coordination:

  • Local Workers: Each worker maintains its own set of parameters ($x^i$) and performs local SGD updates on its subset of the data.
  • The Center Variable: A master node maintains a "center" variable ($\tilde{x}$), representing the global state.
  • The Elastic Force: Instead of workers simply averaging their results at every step, they are "pulled" toward the center variable by an elastic force. This force is proportional to the distance between their local parameters and the center.
  • Asynchrony: Workers only communicate with the master every $\tau$ steps (the communication period). This significantly reduces the bandwidth required.
  • EAMSGD: A variant that incorporates Nesterov’s momentum into the local updates, further accelerating convergence.

Unlike the popular Alternating Direction Method of Multipliers (ADMM), which can become unstable or even chaotic in asynchronous settings, the authors prove that EASGD remains stable under a very simple, easy-to-satisfy condition.

Key Insights and Ideas

Exploration is a Feature, Not a Bug

By allowing local workers to "drift" further from the center—achieved by using a small elastic coefficient $\alpha$ or a large communication period $\tau$—the algorithm performs more exploration. In the non-convex world of deep learning, this helps the ensemble find better-quality local minima that a more rigid averaging scheme might miss.

Communication Efficiency

EASGD performs remarkably well even when communication is infrequent. This makes it highly suitable for environments where the interconnect between GPUs is a bottleneck.

Training and test performance across different communication periods (tau).

Symmetry in Updates

The update rule is designed such that the master variable acts as a moving average of the workers in both space (across different GPUs) and time. This "elastic symmetry" is the secret sauce behind the algorithm's stability.

Key Results

The algorithm was evaluated on standard computer vision benchmarks, including CIFAR-10 (training a 7-layer CNN) and ImageNet (training an 11-layer CNN to demonstrate scalability).

  • Speedup: On the CIFAR dataset with 16 workers, EAMSGD achieved a relative speedup of 11.1x compared to sequential momentum SGD to reach a 21% test error.
  • Accuracy vs. Downpour: On ImageNet, EAMSGD reached a 49% test error 1.8x faster than Downpour SGD.
  • Stability: While Downpour became highly unstable as the communication period $\tau$ increased, EASGD remained stable and actually improved its final test performance with larger $\tau$, confirming the benefits of exploration.
Performance comparison scaling from 4 to 16 workers (p).

Limitations and Future Work

While EASGD presents a significant step forward for distributed deep learning, a few open questions remain:

  • Hyperparameter Sensitivity: The "elastic" coefficient $\alpha$ and the communication period $\tau$ need to be carefully tuned to balance exploration and exploitation.
  • Theoretical Gap: The authors note that the performance difference between the basic EASGD and the momentum-based EAMSGD is "intriguing" but leave a deeper theoretical investigation of this gap for future work.
  • Massive Scale: The experiments focused on 4 to 16 GPUs. While promising, the behavior of the elastic force in massive clusters with hundreds or thousands of nodes remains an open question.

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