Memory and Communication Efficient Distributed Stochastic Optimization with Minibatch Prox

Jialei Wang, Weiran Wang, Nathan Srebro

Abstract

We present and analyze statistically optimal, communication and memory efficient distributed stochastic optimization algorithms with near-linear speedups (up to $\log$-factors). This improves over prior work which includes methods with near-linear speedups but polynomial communication requirements (accelerated minibatch SGD) and communication efficient methods which do not exhibit any runtime speedups over a naive single-machine approach. We first analyze a distributed SVRG variant as a distributed stochastic optimization method and show that it can achieve near-linear speedups with logarithmic rounds of communication, at the cost of high memory requirements. We then present a novel method, MP-DSVRG, which trades off memory for communication and still allows for optimization with communication which scales only logarithmically with the desired accuracy while also being memory efficient. MP-DSVRG is based on a minibatch prox procedure, solving a non-linearized subproblem on a minibatch at each iteration. We provide a novel analysis for this procedure which achieves the statistical optimal rate regardless of minibatch size and smoothness, and thus significantly improving on prior work.

Introduction: The Distributed Optimization Trilemma

In large-scale machine learning, practitioners face a fundamental "trilemma" between three critical resources: Computation, Communication, and Memory.

Standard Stochastic Gradient Descent (SGD) is the gold standard for single-machine learning due to its memory efficiency and statistical optimality. However, scaling SGD across distributed systems presents a significant challenge. To reduce communication overhead (the frequency of updates between machines), practitioners typically increase the "minibatch" size. In traditional distributed SGD, if the minibatch becomes too large, optimization quality degrades, and the system loses its "linear speedup"—the ideal scenario where doubling the number of machines halves the training time.

Conversely, "batch" methods like DANE or DiSCO are highly communication-efficient but require every machine to store its entire portion of the dataset in memory. For massive datasets or streaming applications, this is often impossible. This paper introduces a middle ground: a method that is as memory-efficient as SGD but as communication-efficient as batch methods.

The Minibatch-Prox Framework

The core innovation presented is the Minibatch-Prox algorithm. Instead of taking a simple gradient step based on a minibatch (as in standard SGD), the algorithm solves a small proximal optimization subproblem for each minibatch.

Key technical components include:

  • Proximal Updates: The update rule is "implicit," meaning the gradient is effectively evaluated at the next iterate. This provides much greater stability than standard SGD.
  • MP-DSVRG: The authors combine Minibatch-Prox with a distributed version of SVRG (Stochastic Variance Reduced Gradient). This allows subproblems to be solved efficiently without requiring the storage of the entire dataset.
  • Inexact Solving: Crucially, the authors prove that subproblems do not need to be solved perfectly. As long as they reach a certain level of accuracy, global convergence remains optimal.
  • Stability Analysis: A novel stability argument shows that the solution to a minibatch subproblem generalizes well to the entire data distribution, justifying the use of large minibatches.

Key Insights: The Communication-Memory Slider

A surprising finding of this research is that Minibatch-Prox achieves the optimal statistical rate regardless of the minibatch size. While traditional distributed SGD has a "critical" minibatch size beyond which performance drops, Minibatch-Prox removes this constraint.

This framework allows for a "Communication-Memory Slider." Practitioners can choose their minibatch size based on available RAM: if memory is plentiful, larger minibatches can be used to drastically reduce communication rounds; if memory is tight, smaller minibatches can be used with more frequent communication.

Figure 1: The trade-off between communication and memory. MP-DSVRG (dotted green line) provides a flexible trade-off curve, whereas Acc. Mini. SGD and DSVRG represent fixed points in the design space.

Theoretical and Empirical Results

The authors provide rigorous bounds showing that MP-DSVRG achieves near-linear speedups and high communication efficiency compared to existing state-of-the-art methods.

Figure 2: Theoretical comparison of distributed optimization methods across key performance metrics. MP-DSVRG achieves optimal sample complexity while offering a tunable memory-communication trade-off.
  • Near-Linear Speedup: The algorithm achieves a runtime of $O(n(\epsilon)/m)$ (where $n$ is the number of samples and $m$ is the number of machines), scaling efficiently as hardware is added.
  • Communication Efficiency: For least-squares problems, MP-DSVRG can reach the optimal solution with only logarithmic communication rounds relative to the number of samples.
  • Empirical Robustness: Evaluated on benchmarks such as codrna, covtype, kddcup99, and YearPredictionMSD, the Minibatch-Prox methods (like MP-DANE) remained stable and accurate even as minibatch sizes increased, whereas standard Minibatch SGD error spiked quickly.

Limitations and Future Work

While the Minibatch-Prox framework is general, the most rigorous communication-efficiency guarantees are currently specific to least-squares problems. Extending these tight bounds to general smooth convex functions remains an open challenge. Additionally, while the method saves on communication, solving a proximal subproblem at every step is computationally more demanding than a simple gradient update, requiring sophisticated local solvers on each node.

Summary updated

BibTeX
@inproceedings{wang2017memory,
  author = {Jialei Wang and Weiran Wang and Nathan Srebro},
  title = {{Memory and Communication Efficient Distributed Stochastic Optimization with Minibatch Prox}},
  booktitle = {Conference on Learning Theory},
  year = {2017},
  url = {https://openreview.net/forum?id=Hl4PvW9VpcN},
}
Figure