Distributed Stochastic Optimization for Deep Learning

Sixin Zhang

Abstract

As deep learning models and datasets scale, the primary bottleneck in training shifts from raw computational power to the communication overhead between parallel processors. This paper examines Elastic Averaging SGD (EASGD), a distributed optimization framework that introduces a "weak consensus" mechanism. By linking local workers to a central master via an elastic force, EASGD allows for greater local exploration and significantly reduced communication frequency. Empirical results on CIFAR-10 and ImageNet demonstrate that EASGD achieves superior convergence speeds and lower test errors compared to traditional synchronous and asynchronous SGD methods.

1. Introduction

The training of massive deep learning models is increasingly a distributed endeavor. However, the "communication tax"—the time spent synchronizing parameters across a network—often limits the efficiency of parallelization. Standard Stochastic Gradient Descent (SGD) is inherently sequential. While parallel variants like Synchronous SGD ensure model consistency, they suffer from high latency. Conversely, asynchronous methods like DOWNPOUR reduce waiting time but introduce "staleness," where workers update the master server using outdated gradients, leading to instability and sub-optimal convergence.

This research introduces Elastic Averaging SGD (EASGD), a method designed to balance the trade-off between local exploration and global consensus. By allowing local workers to maintain their own parameter sets while being gently pulled toward a central average, the framework provides a robust solution for large-scale distributed learning.

2. The EASGD Framework

The core innovation of EASGD is the introduction of an elastic force between local worker variables ($x^i$) and a central variable ($ ilde{x}$) maintained by a master server. Unlike traditional methods that force workers to overwrite the central parameters or vice versa, EASGD applies a quadratic penalty to the distance between them.

2.1 The Elastic Force

In this system, the update rule is governed by an elastic coefficient ($ ho$). As a worker moves away from the center variable, the "tension" increases, pulling the worker back toward the average and simultaneously pushing the center variable toward the worker. This allows local workers to explore different regions of the loss landscape, potentially escaping local minima that might trap a more rigid synchronous system.

2.2 Variants and Extensions

To further enhance performance, the research introduces two key variants:

  • EAMSGD: This version integrates Nesterov’s momentum into the elastic framework, accelerating convergence by accounting for the velocity of parameter updates.
  • EASGD Tree: To address the communication bottleneck at the master server when scaling to hundreds of nodes, a hierarchical tree structure is employed. This distributes the communication load across multiple levels of the network.

3. Theoretical Insights

A significant theoretical contribution of this work is the mathematical link established between EASGD and momentum-based optimizers. Analysis reveals that EASGD can behave like a momentum optimizer where the moving average rate is effectively negative. This "pushing" effect encourages the variables to move faster through the parameter space.

Furthermore, the paper addresses the challenges of non-convex landscapes. It demonstrates that the coupling strength ($ ho$) is critical; if the elastic band is too loose, workers may diverge or become trapped on opposite sides of a saddle point. This provides a theoretical foundation for selecting hyperparameters that ensure stability without sacrificing the benefits of distributed exploration.

4. Empirical Evaluation

The effectiveness of EASGD was validated using the CIFAR-10 and ImageNet (ILSVRC 2013) benchmarks.

4.1 Speedup and Accuracy

On the CIFAR-10 dataset, EAMSGD demonstrated remarkable efficiency. Utilizing 16 workers, the method achieved an 11.1x speedup over a single-worker momentum SGD baseline to reach the same target error. Beyond speed, EASGD often reached a lower final test error than its counterparts, suggesting that the elastic exploration helps in finding better-performing minima.

4.2 Communication Efficiency

In large-scale ImageNet trials, EASGD proved to be significantly more communication-efficient than the DOWNPOUR method. The parameter communication cost for EASGD was at least 66 times lower than that of DOWNPOUR. This efficiency stems from the ability to increase the communication period ($ au$) without triggering the instability typically seen in asynchronous systems.

5. Scalability and the Tree Architecture

To test the limits of the framework, the EASGD Tree variant was deployed across 256 CPU cores. While flat master-worker architectures often suffer from network congestion at this scale, the hierarchical tree maintained stability and performance. This demonstrates the framework's viability for high-performance computing environments and production-scale deep learning tasks.

6. Conclusion and Future Work

Elastic Averaging SGD represents a paradigm shift in distributed optimization by replacing rigid synchronization with a flexible, elastic consensus. By reducing communication overhead by over 60-fold and providing a robust mechanism for local exploration, it enables the training of larger models on larger datasets more efficiently than previous state-of-the-art methods.

Future research directions include developing a full theoretical convergence analysis for the hierarchical tree structures and exploring adaptive communication periods. Such systems could dynamically adjust the "elasticity" of the network based on real-time congestion and the progress of the optimization landscape.

Summary updated

BibTeX
@misc{zhang2016distributed,
  author = {Sixin Zhang},
  title = {{Distributed Stochastic Optimization for Deep Learning}},
  year = {2016},
  eprint = {1605.02216},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1605.02216},
}
Figure