[Paper Review] RelaySum for Decentralized Deep Learning on Heterogeneous Data
This paper proposes RelaySGD, a decentralized stochastic gradient descent algorithm that uses RelaySum—a spanning tree-based message relaying mechanism—to achieve exact uniform distribution of model updates across workers in finite time, independent of data heterogeneity. Unlike gossip averaging, which asymptotically converges and weakens updates over hops, RelaySum ensures each worker receives a full, undecayed copy of every update within a delay bounded by the network diameter, enabling robust, scalable, and accurate training on heterogeneous data with theoretical convergence guarantees.
In decentralized machine learning, workers compute model updates on their local data. Because the workers only communicate with few neighbors without central coordination, these updates propagate progressively over the network. This paradigm enables distributed training on networks without all-to-all connectivity, helping to protect data privacy as well as to reduce the communication cost of distributed training in data centers. A key challenge, primarily in decentralized deep learning, remains the handling of differences between the workers' local data distributions. To tackle this challenge, we introduce the RelaySum mechanism for information propagation in decentralized learning. RelaySum uses spanning trees to distribute information exactly uniformly across all workers with finite delays depending on the distance between nodes. In contrast, the typical gossip averaging mechanism only distributes data uniformly asymptotically while using the same communication volume per step as RelaySum. We prove that RelaySGD, based on this mechanism, is independent of data heterogeneity and scales to many workers, enabling highly accurate decentralized deep learning on heterogeneous data. Our code is available at http://github.com/epfml/relaysgd.
Motivation & Objective
- To address the challenge of data heterogeneity in decentralized deep learning, where traditional gossip averaging leads to slow and biased convergence.
- To design a communication mechanism that distributes model updates uniformly and exactly within finite time, avoiding asymptotic convergence and signal decay.
- To develop a decentralized training algorithm that maintains convergence speed and accuracy regardless of local data distribution shifts across workers.
- To enable scalable, privacy-preserving, and robust distributed training on large-scale networks without central coordination or server dependency.
Proposed method
- RelaySum uses spanning trees to route model updates from each worker to all others via intermediate nodes, ensuring each update is delivered with full weight and no decay.
- Each node acts as a relay, forwarding messages along tree edges without reweighting, and merging messages from multiple sources through summation to maintain constant communication cost.
- The algorithm constructs spanning trees using the Spanning Tree Protocol in a decentralized manner, enabling deployment on arbitrary network topologies.
- RelaySGD integrates RelaySum into stochastic gradient descent, where each worker averages its local gradient with a uniformly distributed global update received via the relay tree.
- The method requires only O(n) communication per step (one message per edge), matching gossip averaging, but achieves exact uniformity in finite time.
- Theoretical analysis shows convergence depends on network diameter rather than spectral gap, making it robust to poor mixing in irregular graphs.
Experimental results
Research questions
- RQ1Can a decentralized learning algorithm achieve exact and finite-time uniform distribution of model updates across all workers, independent of data heterogeneity?
- RQ2How does the convergence of decentralized SGD change when update propagation is exact and bounded in delay, compared to asymptotic gossip averaging?
- RQ3Can a communication mechanism be designed that maintains the same bandwidth cost as gossip averaging while eliminating signal decay over multiple hops?
- RQ4Does RelaySGD outperform existing decentralized methods on highly heterogeneous data distributions, especially when prior theoretically robust methods fail in practice?
- RQ5What is the impact of network topology—particularly tree-based vs. general graphs—on the convergence and scalability of decentralized deep learning?
Key findings
- RelaySGD achieves convergence independent of data heterogeneity, with theoretical iteration complexity bounded by O(1/ε³/² + 1/ε) for ε-optimality, where ε is the target accuracy.
- The convergence rate depends on the network diameter τ_max rather than the spectral gap, making it robust to poorly connected or irregular topologies.
- On a double binary tree topology, RelaySGD uses only constant memory (two extra model copies) and sends/receives just two model parameters per iteration, enabling linear scalability.
- In experiments on CIFAR-10 with VGG-11, RelaySGD outperforms both standard gossip-based methods and heuristic alternatives on highly heterogeneous data, especially without momentum.
- RelaySGD/Grad, a variant using gradient averaging, shows a plateau in convergence under fixed learning rates, unlike RelaySGD, which converges linearly and is less sensitive to heterogeneity.
- Empirical results show that RelaySGD maintains high accuracy (88.4% top-1 accuracy on CIFAR-10 with α=0.01) even under extreme data skew, outperforming baseline gossip methods and momentum-augmented variants.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.