MXNET-MPI: Embedding MPI parallelism in Parameter Server Task Model for scaling Deep Learning

Amith R. Mamidala, Georgios Kollias, Chris Ward, Fausto ArticoarXiv 2018

Abstract

Existing Deep Learning frameworks exclusively use either Parameter Server (PS) approach or MPI parallelism. In this paper, we discuss the drawbacks of such approaches and propose a generic framework supporting both PS and MPI programming paradigms, co-existing at the same time. The key advantage of the new model is to embed the scaling benefits of MPI parallelism into the loosely coupled PS task model. Apart from providing a practical usage model of MPI in cloud, such framework allows for novel communication avoiding algorithms that do parameter averaging in Stochastic Gradient Descent (SGD) approaches. We show how MPI and PS models can synergestically apply algorithms such as Elastic SGD to improve the rate of convergence against existing approaches. These new algorithms directly help scaling SGD clusterwide. Further, we also optimize the critical component of the framework, namely global aggregation or allreduce using a novel concept of tensor collectives. These treat a group of vectors on a node as a single object allowing for the existing single vector algorithms to be directly applicable. We back our claims with sufficient emperical evidence using large scale ImageNet 1K data. Our framework is built upon MXNET but the design is generic and can be adapted to other popular DL infrastructures.

Introduction

Training massive Deep Learning (DL) models requires distributing workloads across extensive clusters. Currently, frameworks typically adopt one of two paths: the Parameter Server (PS) model or MPI-based synchronous parallelism. The PS model is favored for its elasticity and fault tolerance in cloud environments but often suffers from "network hotspots" and parameter staleness at scale. Conversely, MPI offers high-performance communication but is traditionally brittle and difficult to manage in dynamic cloud settings.

We introduce MXNET-MPI, a hybrid framework that bridges this gap by embedding high-performance MPI communication into the flexible PS model. This approach allows for hierarchical scaling, where the efficiency of MPI handles local communication while the PS manages global synchronization.

The MXNET-MPI Architecture

The core innovation of MXNET-MPI is the organization of workers into "MPI cliques." In this model, independent MPI jobs act as single clients to a global Parameter Server. This hierarchical structure allows for tight, synchronous communication within local groups (cliques) while maintaining loose, asynchronous synchronization globally.

System architecture of MXNET-MPI showing the integration of MPI cliques with a global Parameter Server.

As shown in the architecture diagram, the system utilizes a Launcher and a Resource Manager (such as LSF) to coordinate these processes. By wrapping MPI calls in C++11 lambdas and integrating them into MXNET’s dependency engine, the framework schedules communication tasks alongside computation, ensuring optimal resource utilization and reducing the overhead of managing thousands of individual worker connections.

Communication and Algorithmic Synergy

MXNET-MPI optimizes global aggregation through "Tensor Collectives." These collectives treat a group of vectors on a node as a single object, allowing existing single-vector algorithms to be applied to multi-GPU systems. This approach exploits high-speed interconnects like NVLink to achieve reduction bandwidths nearing theoretical hardware limits.

Comparison between individual worker push/pull and the optimized MPI Communicator push.

Furthermore, the framework enables the implementation of MPI-ESGD (Elastic SGD). This algorithm performs synchronous SGD within an MPI group but uses asynchronous elastic updates to the central server. This synergy significantly reduces the communication burden on the server and improves the rate of convergence by ensuring that workers operate on more up-to-date parameters compared to standard asynchronous PS models.

Experimental Results

The framework was benchmarked using the ImageNet 1K dataset and the ResNet-50 architecture on a 32-node IBM Minsky cluster. Key findings include:

  • Speedup: The hybrid method achieved a 6x improvement in training time per epoch compared to the standard MXNET Parameter Server implementation.
  • Convergence: The MPI-ESGD algorithm reached target accuracy 2x faster than traditional parallel SGD methods.
  • Accuracy: The system maintained high accuracy (over 0.72 validation accuracy), matching state-of-the-art results while scaling more efficiently.
  • Communication Efficiency: Optimized ring-based communication outperformed popular implementations like Baidu’s ring-allreduce by a factor of six on identical hardware.

Conclusion

MXNET-MPI demonstrates that MPI and Parameter Server models are not mutually exclusive but can be combined to achieve superior scaling and convergence. By shifting the communication burden to local MPI cliques and optimizing hardware-aware collectives, the framework provides a robust, high-performance solution for large-scale DL training in both cloud and HPC environments. Future work will explore extending this model to support model parallelism and enhancing fault tolerance within the MPI layer.

Summary updated

BibTeX
@misc{mamidala2018mxnet,
  author = {Amith R. Mamidala and Georgios Kollias and Chris Ward and Fausto Artico},
  title = {{MXNET-MPI: Embedding MPI parallelism in Parameter Server Task Model for scaling Deep Learning}},
  year = {2018},
  eprint = {1801.03855},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1801.03855},
}
Figure