Network-accelerated Distributed Machine Learning Using MLFabric

Raajay Viswanathan, Aditya AkellaarXiv 2019

Introduction

Distributed machine learning (DML) systems are increasingly essential for training large-scale models across clusters of workers. However, these systems often treat the underlying network as a "black box," focusing primarily on optimizing computation while viewing communication as a fixed overhead. This network-agnostic approach leads to significant bottlenecks, particularly when transferring massive model updates (gradients). Common issues include stragglers, where a single slow link stalls the entire training process; staleness, where delayed updates in asynchronous setups degrade algorithmic convergence; and fault tolerance overhead, where replicating models for reliability consumes excessive bandwidth.

To address these challenges, we introduce MLfabric, a network-aware communication library designed to sit between DML applications (like TensorFlow or PyTorch) and the physical network. MLfabric takes holistic control of the network to actively schedule, aggregate, and replicate model updates based on real-time conditions, achieving up to a 3x speedup in training large models.

The MLfabric Architecture

MLfabric employs three primary techniques to optimize communication and improve training efficiency:

1. Update Ordering and Delay Management

Instead of allowing workers to send updates haphazardly, MLfabric implements a shortest-transfer-first heuristic combined with strict deadlines. This approach bounds the "staleness" of updates. If a network link becomes too congested and an update is significantly delayed, MLfabric drops the update at the worker. This saves bandwidth and prevents "stale" math from negatively impacting model convergence.

2. Dynamic In-Network Aggregation

In traditional parameter server architectures, all workers send updates directly to a central server, often overwhelming its network interface. MLfabric dynamically constructs aggregation trees based on real-time bandwidth availability. It groups updates and combines them at intermediate nodes (aggregators) before they reach the server.

Comparison of direct server updates (left) versus MLfabric's in-network aggregation (right), which reduces server load by combining updates at intermediate nodes.

3. Bounded Consistency Replication

Standard fault tolerance often relies on strict chain replication, which forces the primary server to wait for a replica to acknowledge every update. MLfabric introduces "bounded consistency," allowing the replica to slightly lag behind the primary server. As long as the mathematical divergence between the two models remains within a user-defined limit, training continues without waiting for the replica, drastically reducing overhead.

Experimental Evaluation

We evaluated MLfabric using two communication-intensive workloads: ImageNet1K for deep learning (ResNet-50 and ResNet-152) and the NY Times Dataset for Latent Dirichlet Allocation (LDA) topic modeling.

Key Results

  • Overall Performance: MLfabric achieved a 3x speedup in total training time compared to state-of-the-art synchronous approaches in environments with network stragglers.
  • Deep Learning Efficiency: For ResNet-50, MLfabric's asynchronous variant was 1.74x faster than the highly optimized Ring-AllReduce (RR-Sync) baseline while reaching the same 74% target accuracy.
  • Topic Modeling: LDA convergence was 24% faster than standard synchronous methods and up to 7x faster than vanilla asynchronous methods lacking aggregation.
  • Replication Efficiency: Bounded consistency reduced the network overhead of fault tolerance by up to 30x compared to standard chain replication.

Discussion and Future Work

MLfabric demonstrates that network control is a powerful tool for improving algorithmic convergence. By bounding update delays and utilizing in-network aggregation, asynchronous training—which often struggles with network bottlenecks—becomes a highly competitive alternative to synchronous methods for massive models. Furthermore, the results show that strict consistency is often unnecessary for the inherently stochastic nature of ML algorithms; bounding divergence is sufficient for robust fault tolerance.

While MLfabric currently relies on greedy heuristics for scheduling (as the optimal schedule is an NP-hard problem) and a centralized scheduler, it scales effectively for clusters of up to 1,000 updates per batch. Future work will focus on decentralizing the scheduler and extending the system to handle models sharded across multiple parameter servers to support even larger model architectures.

Summary updated

BibTeX
@misc{viswanathan2019network,
  author = {Raajay Viswanathan and Aditya Akella},
  title = {{Network-accelerated Distributed Machine Learning Using MLFabric}},
  year = {2019},
  eprint = {1907.00434},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.00434},
}
Figure