Skip to main content
QUICK REVIEW

[Paper Review] BlueFog: Make Decentralized Algorithms Practical for Optimization and Deep Learning

Bicheng Ying, Kun Yuan|arXiv (Cornell University)|Nov 8, 2021
IoT and Edge/Fog ComputingComputer Science81 references12 citations
TL;DR

BlueFog is an open-source Python library that enables high-performance, easy-to-use implementation of decentralized optimization algorithms for deep learning. By abstracting communication operations and supporting dynamic, asynchronous, and directed network topologies, BlueFog achieves 1.2× to 1.8× speedup over Horovod on ResNet-50 and BERT-large training tasks, demonstrating practicality and efficiency in real-world distributed training environments.

ABSTRACT

Decentralized algorithm is a form of computation that achieves a global goal through local dynamics that relies on low-cost communication between directly-connected agents. On large-scale optimization tasks involving distributed datasets, decentralized algorithms have shown strong, sometimes superior, performance over distributed algorithms with a central node. Recently, developing decentralized algorithms for deep learning has attracted great attention. They are considered as low-communication-overhead alternatives to those using a parameter server or the Ring-Allreduce protocol. However, the lack of an easy-to-use and efficient software package has kept most decentralized algorithms merely on paper. To fill the gap, we introduce BlueFog, a python library for straightforward, high-performance implementations of diverse decentralized algorithms. Based on a unified abstraction of various communication operations, BlueFog offers intuitive interfaces to implement a spectrum of decentralized algorithms, from those using a static, undirected graph for synchronous operations to those using dynamic and directed graphs for asynchronous operations. BlueFog also adopts several system-level acceleration techniques to further optimize the performance on the deep learning tasks. On mainstream DNN training tasks, BlueFog reaches a much higher throughput and achieves an overall $1.2 imes \sim 1.8 imes$ speedup over Horovod, a state-of-the-art distributed deep learning package based on Ring-Allreduce. BlueFog is open source at https://github.com/Bluefog-Lib/bluefog.

Motivation & Objective

  • To bridge the gap between theoretical decentralized algorithms and practical deployment in distributed deep learning.
  • To provide a unified, easy-to-use software interface for implementing diverse decentralized algorithms without low-level communication complexity.
  • To support advanced features like asynchronous updates, time-varying topologies, and one-way communication for real-world robustness.
  • To achieve high performance comparable to or exceeding state-of-the-art frameworks like Horovod in large-scale DNN training.
  • To enable researchers and practitioners to rapidly prototype and deploy decentralized optimization algorithms in PyTorch.

Proposed method

  • BlueFog introduces a unified abstraction layer for decentralized communication operations, decoupling algorithm logic from low-level communication details.
  • It supports both synchronous and asynchronous communication using static or dynamic, undirected or directed graphs for partial averaging.
  • The library provides intuitive Python APIs for implementing algorithms such as DmSGD, QG-DmSGD, and vanilla DmSGD with configurable averaging coefficients.
  • System-level optimizations include efficient memory management and low-latency communication primitives tailored for deep learning workloads.
  • BlueFog integrates with PyTorch and enables SPMD (Single Program, Multiple Data) execution across multiple nodes with minimal code changes.
  • It supports dynamic topology selection, where each node picks a new neighbor per iteration, reducing communication cost without sacrificing convergence.

Experimental results

Research questions

  • RQ1Can a high-level, easy-to-use library make decentralized deep learning algorithms practical for real-world deployment?
  • RQ2How does decentralized communication compare to Ring-Allreduce in terms of training throughput and convergence on large-scale DNNs?
  • RQ3To what extent can dynamic and asymmetric network topologies reduce communication overhead while maintaining model accuracy?
  • RQ4Can asynchronous and one-way communication primitives be efficiently supported in a high-performance deep learning framework?
  • RQ5What performance gains can be achieved by optimizing system-level communication patterns in decentralized training?

Key findings

  • BlueFog achieves 1.2× to 1.8× speedup over Horovod on ResNet-50 and BERT-large training tasks, with training times reduced from 14,648 seconds (Horovod) to 10,229 seconds (BlueFog) on 90 epochs.
  • On ImageNet-1k with ResNet-50, BlueFog's AWC variant achieved 74.5% top-1 accuracy in 10,228.92 seconds, outperforming Horovod in speed while maintaining competitive accuracy.
  • Dynamic exponential topologies reduced communication cost without noticeable performance degradation, with top-1 accuracy within 0.5% of static topologies across all models and algorithms.
  • The system demonstrated consistent scaling efficiency across 8×8 GPU configurations, with minimal drop in performance when scaling from one to two AWS p3.16xlarge instances.
  • BlueFog's implementation of decentralized algorithms achieved similar convergence behavior to global averaging baselines, confirming its correctness and stability.
  • The library enables users to implement complex decentralized algorithms in just a few lines of clean Python code, significantly lowering the barrier to entry for distributed learning research.

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.