Distributed Deep Learning In Open Collaborations

Michael Diskin, Alexey Bukhtiyarov, Max Ryabinin, Lucile Saulnier, Quentin Lhoest, Anton Sinitsin, Dmitry Popov, Dmitriy Pyrkin, Maxim Kashirin, Alexander Borzunov, Albert Villanova del Moral, Denis Mazur, Ilia Kobelev, Yacine Jernite, Thomas Wolf, Gennady Pekhimenko

Deep learning has a "compute divide" problem. Training state-of-the-art (SOTA) models like BERT or ResNet often requires massive High-Performance Computing (HPC) clusters that are the exclusive playground of big tech and a few elite labs. For everyone else, the options are limited: use a pre-trained "model zoo" (if a model for your specific task even exists) or give up.

In their NeurIPS 2021 paper, "Distributed Deep Learning In Open Collaborations," Michael Diskin and colleagues propose a third way: DeDLOC. It’s a framework that allows researchers to pool heterogeneous, unreliable, and geographically dispersed hardware—think home gaming rigs and office workstations—to train massive models collaboratively.

The Promise of Volunteer Computing

DeDLOC is a novel framework for "volunteer computing" applied to deep learning. By using an adaptive averaging algorithm that morphs to fit the available hardware and a decentralized coordination system, it enables large-scale training over the public internet. The result? Performance comparable to dedicated GPU clusters at a fraction of the cost.

Overcoming the Hurdles of the Open Internet

Standard distributed training algorithms, like Ring All-Reduce, are notoriously "brittle." They assume every node is equally fast and connected by a high-speed, reliable network. If one volunteer's home internet hiccups or their GPU is slightly older, the entire training run grinds to a halt.

Furthermore, volunteer devices face unique hurdles:

  1. Heterogeneity: A mix of high-end servers and consumer GPUs.
  2. Churn: Participants join and leave at will.
  3. Network Constraints: Most home computers are behind NATs or firewalls, making peer-to-peer communication difficult.

DeDLOC aims to make distributed training "elastic" and "fault-tolerant" enough to survive the wild west of the open internet.

Key Technical Innovations

The authors introduce several key technical innovations to make collaborative training viable:

1. Adaptive Averaging Algorithm Instead of a one-size-fits-all approach, DeDLOC uses a linear programming solver to dynamically assign roles. Depending on the current swarm's bandwidth and compute power, the system can automatically behave like a Parameter Server (one fast node, many slow ones), All-Reduce (many identical nodes), or a Hybrid strategy.

DeDLOC adapts its communication topology to fit heterogeneous hardware, dynamically assigning roles based on bandwidth and compute power.

2. Fault Tolerance and Moshpit SGD To handle node failures, DeDLOC avoids global synchronization. Instead, it uses a technique where nodes perform averaging in small, alternating groups. This ensures that if one node fails, it only affects its immediate group, not the whole collaboration.

Timeline of collaborative training showing how the system handles peer failures and late joiners without halting the global process.

3. Decentralized Coordination & NAT Traversal There is no "master" server. Instead, the system uses a Distributed Hash Table (DHT)—the same tech behind BitTorrent—to keep track of training progress, gradients, and peer locations. To connect home computers, the framework implements hole punching and relay techniques, allowing peers to talk to each other even through restrictive routers.

Key Insights and Results

The authors validated DeDLOC across several domains, including pretraining ResNet-50 using SwAV on ImageNet, and pretraining ALBERT-large on WikiText-103.

Several core insights emerged from these experiments:

  • Large Batches are Essential: To hide the high latency of the internet, DeDLOC uses extremely large batch sizes (e.g., 32,768 for SwAV). This ensures that GPUs spend more time computing and less time waiting for network transfers.
  • Heterogeneity as an Advantage: The adaptive algorithm realizes that a participant with a fast internet connection but no GPU is still valuable—they can act as a "reducer" (aggregator) for others, offloading the communication burden from the workers.
  • Mathematical Equivalence: The authors show that their synchronous update strategy makes collaborative training mathematically equivalent to large-batch training on a standard HPC cluster, ensuring model stability.

The sahajBERT Success Story

The most compelling proof of concept was the "sahajBERT" experiment. Forty volunteers using 91 unique devices trained a Bengali ALBERT model in just 8 days. This was 1.8x faster than a baseline of 8 high-end NVIDIA V100 GPUs.

Furthermore, the collaboratively trained sahajBERT outperformed several specialized monolingual baselines and even rivaled XLM-R Large—a model with 30x more parameters that was trained on over 500 data center GPUs.

Limitations and Future Work

While impressive, DeDLOC isn't a silver bullet:

  • Bandwidth Heavy: The average volunteer device consumed about 7 GB of traffic per hour. While comparable to 4K streaming or cloud gaming, it might be too much for users with data caps.
  • The "Backbone" Requirement: The system still needs a few "backbone" nodes with stable IPs to maintain the DHT, though these don't require expensive GPUs.
  • Incentives: The paper uses an "allowlist" for authentication but notes that motivating a community to donate compute for months at a time is a social challenge as much as a technical one.

Future work could involve integrating incentive mechanisms (like blockchain-based rewards) or further optimizing communication to support even more bandwidth-constrained devices like smartphones. Ultimately, DeDLOC proves that with the right algorithms, the open internet can rival the world's most exclusive supercomputers.

Summary updated

BibTeX
@inproceedings{diskin2021distributed,
  author = {Michael Diskin and Alexey Bukhtiyarov and Max Ryabinin and Lucile Saulnier and Quentin Lhoest and Anton Sinitsin and Dmitry Popov and Dmitriy Pyrkin and Maxim Kashirin and Alexander Borzunov and Albert Villanova del Moral and Denis Mazur and Ilia Kobelev and Yacine Jernite and Thomas Wolf and Gennady Pekhimenko},
  title = {{Distributed Deep Learning In Open Collaborations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=FYHktcK-7v},
}
Figure