Skip to main content
QUICK REVIEW

[Paper Review] MXNet: A Flexible and Efficient Machine Learning Library for Heterogeneous Distributed Systems

Tianqi Chen, Mu Li|arXiv (Cornell University)|Dec 3, 2015
Advanced Memory and Neural ComputingEngineering9 references1,917 citations
TL;DR

MXNet is a lightweight, multi-language machine learning library that unifies symbolic computation and imperative tensor operations for efficient execution on heterogeneous systems, from mobile devices to distributed GPU clusters. It achieves high performance and memory efficiency through unified engine scheduling, in-place operations, and optimized communication, demonstrating super-linear scalability on distributed training with 10x speedup on ImageNet.

ABSTRACT

MXNet is a multi-language machine learning (ML) library to ease the development of ML algorithms, especially for deep neural networks. Embedded in the host language, it blends declarative symbolic expression with imperative tensor computation. It offers auto differentiation to derive gradients. MXNet is computation and memory efficient and runs on various heterogeneous systems, ranging from mobile devices to distributed GPU clusters. This paper describes both the API design and the system implementation of MXNet, and explains how embedding of both symbolic expression and tensor operation is handled in a unified fashion. Our preliminary experiments reveal promising results on large scale deep neural network applications using multiple GPU machines.

Motivation & Objective

  • Address the growing complexity of deep learning workloads requiring efficient, scalable systems across diverse hardware.
  • Unify symbolic and imperative programming paradigms to balance optimization potential and implementation flexibility.
  • Enable efficient execution on heterogeneous systems, including CPUs, GPUs, and distributed clusters, with minimal performance overhead.
  • Reduce memory footprint through in-place operations and memory reuse while maintaining correctness and reproducibility.
  • Support seamless distributed training across multiple machines with minimal code changes, achieving high scalability.

Proposed method

  • Use a unified engine to schedule both symbolic computation graphs and imperative tensor operations, tracking data and dependency flow across all operations.
  • Represent all computation units—NDArrays, random number generators, and memory spaces—as tagged resources to enable fine-grained dependency tracking and scheduling.
  • Support mutation operations as first-class resources, allowing in-place updates and enabling efficient parameter updates and memory reuse.
  • Implement a two-level parameter server architecture (KVStore) for distributed training, with intra-machine and inter-machine synchronization layers to reduce bandwidth and support different consistency models.
  • Integrate communication and computation scheduling via the engine to ensure data consistency and seamless coordination across devices and machines.
  • Apply aggressive memory optimization techniques, including in-place operations and coalesced memory allocation, to minimize memory usage during training and inference.

Experimental results

Research questions

  • RQ1How can symbolic and imperative programming paradigms be effectively unified in a single ML system to maximize both optimization opportunities and developer flexibility?
  • RQ2What system-level design patterns enable efficient execution of deep learning models across heterogeneous hardware, from mobile to multi-GPU clusters?
  • RQ3To what extent can memory footprint be reduced in deep learning training without sacrificing performance or correctness?
  • RQ4How does the integration of computation and communication scheduling affect the scalability and convergence of distributed deep learning?
  • RQ5Can a unified engine manage both symbolic computation graphs and imperative tensor operations while maintaining high performance and low overhead?

Key findings

  • MXNet achieves comparable raw performance to Torch7 and Caffe on a single GPU, with TensorFlow being approximately 2x slower due to its use of an older CUDNN version.
  • Memory usage is reduced by up to 4x during inference and 2x during training through in-place operations and coalesced memory allocation, with VGGNet requiring less than 16MB extra memory for training.
  • Distributed training on 10 machines using MXNet achieves a 10x speedup in average data pass time (14K sec on single machine vs. 1.4K sec on 10 machines), demonstrating super-linear scalability on the ILSVRC12 dataset.
  • The system converges faster than single-machine training after 10 data passes in distributed settings, indicating effective communication and synchronization strategies.
  • The unified engine enables seamless integration of imperative operations and symbolic computation, allowing developers to use both paradigms in the same program without performance penalties.
  • The two-level KVStore architecture reduces inter-machine communication bandwidth and supports different consistency models for intra- and inter-machine synchronization, improving system efficiency and reliability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.