Tuning the Scheduling of Distributed Stochastic Gradient Descent with Bayesian Optimization

Valentin Dalibard, Michael Schaarschmidt, Eiko YonekiarXiv 2016

Introduction

Distributed Stochastic Gradient Descent (SGD) is the foundational algorithm for training large-scale neural networks. In a typical parameter server architecture, the workload is distributed across multiple worker nodes that compute gradients, while parameter servers aggregate these updates. However, configuring such a system—specifically determining the optimal assignment of roles and workload distribution across heterogeneous hardware—presents a significant challenge. With even a small cluster of 10 machines, the parameter space can exceed 30 variables, making manual tuning or generic "black-box" optimization inefficient.

Methodology: A Structured Probabilistic Approach

To address the limitations of traditional Bayesian Optimization (BO), which often fails in high-dimensional spaces due to a lack of domain knowledge, this paper proposes a bespoke optimizer. Instead of treating the distributed system as a black box, the authors implement a structured probabilistic model that incorporates the physical characteristics of the hardware and network:

  • Hierarchical Modeling: Individual Gaussian Processes (GPs) are used to model the performance of specific device types (e.g., AWS CPU vs. GPU instances).
  • Communication Overhead: A semi-parametric model predicts network latency based on machine roles, using a GP to account for the variance between theoretical transfer times and empirical observations.
  • Internal Metric Exploitation: Unlike generic optimizers that only observe total iteration time, this model utilizes per-device runtime measurements collected during training to update its internal state rapidly.

Experimental Setup

The optimizer was evaluated on Amazon EC2 clusters using three distinct neural network architectures: GoogleNet (Convolutional, Image), AlexNet (Convolutional, Image), and SpeechNet (Perceptron, Audio). Experiments were conducted across three cluster configurations (Settings A, B, and C) featuring a mix of GPU-enabled (g2.2xlarge) and CPU-only (c4.xlarge variants) instances to simulate a realistic, heterogeneous environment.

Results and Discussion

The bespoke optimizer demonstrates a significant improvement in both convergence speed and final system performance.

Convergence speed of the bespoke optimizer compared to generic Bayesian optimization tools (OpenTuner and Spearmint).

As shown in the figure above, the bespoke optimizer consistently identifies near-optimal configurations within approximately 10 iterations. In contrast, generic tools like OpenTuner and Spearmint require significantly more iterations and often fail to reach the same level of performance.

Performance comparison of optimized configurations against uniform distribution strategies across three neural network architectures and cluster settings.

A key finding is that the "sweet spot" for performance in heterogeneous clusters is remarkably narrow. Assigning even a slightly disproportionate workload to a single node can create a bottleneck that degrades the entire cluster's throughput. The optimized configurations consistently outperformed "Uniform" strategies (splitting load equally across devices or GPUs), in some cases reducing iteration time by over 50%. For instance, on SpeechNet in Setting C, the bespoke optimizer achieved a median iteration time of 4.31s, compared to 8.71s for the best configuration found by OpenTuner.

Conclusion

By encoding the structural constraints of distributed systems into a probabilistic model, the authors demonstrate that Bayesian Optimization can be made highly efficient for complex infrastructure tuning. While the current model is tailored to the parameter server architecture, the success of this "structured" approach suggests a promising path for optimizing other distributed patterns, such as All-Reduce. The negligible overhead of the tuning process—typically under two hours—makes it a practical solution for long-running large-scale training tasks.

Summary updated

Abstract

We present an optimizer which uses Bayesian optimization to tune the system parameters of distributed stochastic gradient descent (SGD). Given a specific context, our goal is to quickly find efficient configurations which appropriately balance the load between the available machines to minimize the average SGD iteration time. Our experiments consider setups with over thirty parameters. Traditional Bayesian optimization, which uses a Gaussian process as its model, is not well suited to such high dimensional domains. To reduce convergence time, we exploit the available structure. We design a probabilistic model which simulates the behavior of distributed SGD and use it within Bayesian optimization. Our model can exploit many runtime measurements for inference per evaluation of the objective function. Our experiments show that our resulting optimizer converges to efficient configurations within ten iterations, the optimized configurations outperform those found by generic optimizer in thirty iterations by up to 2X.
BibTeX
@misc{dalibard2016tuning,
  author = {Valentin Dalibard and Michael Schaarschmidt and Eiko Yoneki},
  title = {{Tuning the Scheduling of Distributed Stochastic Gradient Descent with Bayesian Optimization}},
  year = {2016},
  eprint = {1612.00383},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.00383},
}
Figure