Source-linked AI summary
MATCHA: Speeding Up Decentralized SGD via Matching Decomposition Sampling
Jianyu Wang, Anit Kumar Sahu, Zhouyi Yang, Gauri Joshi, Soummya Kar
TL;DR
Decentralized SGD faces a trade-off between error convergence and per-iteration communication time, and prior work focused mainly on iteration complexity. MATCHA uses matching decomposition sampling to prioritize connectivity-critical links; experiments show reduced communication delay while maintaining or improving error-versus-iterations convergence, including a 5× wall-clock-time reduction on CIFAR-100 to reach training loss 0.1.
Problem
Prior decentralized SGD analyses focused on iteration complexity and did not explicitly consider how network topology affects wall-clock time per iteration.
Source: §1 · p. 1Method
MATCHA samples a matching decomposition, communicating over connectivity-critical links with higher probability to reduce decentralized SGD communication delay.
Source: §7 · p. 9Results
Takeaways & Limitations
The authors conclude that MATCHA can reduce communication delay over arbitrary node topologies while maintaining the same or improving error-versus-iterations convergence.
Source: §7 · p. 9MATCHA separately optimizes activation probabilities and α because joint optimization is non-convex and cannot be solved efficiently.
Source: §4 · p. 6
Abstract
from arXiv · showhide
This paper studies the problem of error-runtime trade-off, typically encountered in decentralized training based on stochastic gradient descent (SGD) using a given network. While a denser (sparser) network topology results in faster (slower) error convergence in terms of iterations, it incurs more (less) communication time/delay per iteration. In this paper, we propose MATCHA, an algorithm that can achieve a win-win in this error-runtime trade-off for any arbitrary network topology. The main idea of MATCHA is to parallelize inter-node communication by decomposing the topology into matchings. To preserve fast error convergence speed, it identifies and communicates more frequently over critical links, and saves communication time by using other links less frequently. Experiments on a suite of datasets and deep neural networks validate the theoretical analyses and demonstrate that MATCHA takes up to $5\times$ less time than vanilla decentralized SGD to reach the same training loss.
1 Introduction
In decentralized SGD, network topology creates a trade-off between convergence speed and per-iteration communication time. MATCHA targets this trade-off by tuning how frequently neighboring nodes communicate.
1. Saving Communication Time by Using Disjoint Links
- MATCHA decomposes the graph into matchings and optimizes their activation probabilities to favor connectivity-critical links while saving communication time on other links.Each matching contains disjoint links that communicate in parallel; activation probabilities maximize the algebraic connectivity, captured by the second-smallest Laplacian eigenvalue λ2.Source: §1 · pp. 1–2
2. Flexible Communication Budget
- With communication budget Cb = 0.1, MATCHA achieves a 10× reduction in expected communication time per iteration, reducing communication more for higher-degree nodes.At Cb = 1, MATCHA reduces to vanilla decentralized SGD; asymmetric frequency reductions preserve fast error-versus-iterations convergence.Source: §1 · p. 2
3. Same or Faster Error Convergence than Vanilla Decentralized SGD
- MATCHA can match vanilla decentralized SGD’s spectral norm with 2.2× less communication budget, and at Cb = 0.6 its spectral norm is lower.The paper’s analysis relates smaller spectral norm ρ to faster error convergence; at Cb = 0.6, MATCHA reduces communication delay while also yielding faster error-versus-iterations convergence.Source: §1 · p. 2
4. Experimental Results on Error-versus-wallclock Time Convergence
- MATCHA reduces wall-clock time by up to 5.2× to reach the same training accuracy as vanilla decentralized SGD, with comparable or better test accuracy.The evaluation covers image classification on CIFAR-10/100 and language modeling on Penn Treebank across Erdős-Rényi and geometric graph topologies.Source: §1 · p. 2, Figure 1 · p. 2
5. Extendable to Other Subgraphs and Computations
- MATCHA’s approach can extend to subgraphs such as edges or cliques and to distributed computations or consensus algorithms requiring frequent synchronization between neighboring nodes.Source: §1 · p. 2
Connection to Gradient Compression and Quantization Techniques
- MATCHA reduces communication frequency rather than transmitted data per round, adds no runtime encoding or decoding overhead, and can combine with compression techniques.Its subgraph sequence is predetermined before training starts.Source: §1 · pp. 2–3
2 Problem Formulation and Preliminaries
The section formulates decentralized training over a connected communication graph, describes Decentralized SGD and its mixing matrix, and models communication time through the graph’s maximum degree. It also introduces graph connectivity and matchings as preliminaries.
Problem formulation
- Workers communicate only with neighbors in an arbitrary, possibly sparse, undirected connected graph, and collectively train on their joint dataset.Each node has access only to its own local data distribution.Source: §2 · p. 3
- The objective F(x) is formed from local objectives Fi(x), which average the sample loss ℓ(x; s) over each node’s local data distribution.x denotes model parameters.Source: §2 · p. 3
Decentralized SGD
- Decentralized SGD combines neighborhood consensus with local stochastic-gradient information to optimize the empirical risk.A symmetric, doubly stochastic mixing matrix is one way to ensure nodes converge to the same stationary point, and nonzero entries correspond to communication links.Source: §2 · p. 3
Communication Time Model
Preliminaries from Graph Theory
- For a connected graph, the Laplacian’s second-smallest eigenvalue λ2 is positive, larger λ2 indicates a denser graph, and a matching has at most one incident edge per vertex.Source: §2 · p. 3
3 MATCHA: Proposed Matching Decomposition Sampling Strategy
MATCHA decomposes a base communication graph into matchings, assigns their activation probabilities to favor connectivity under a communication budget, and samples activated topologies each iteration. The framework also allows alternative delay models, decompositions, and decentralized averaging algorithms.
Step 1: Matching Decomposition
- MATCHA decomposes the base graph into disjoint matchings, with edge coloring guaranteeing M = ∆(G) or ∆(G) + 1 matchings [17].Each matching allows parallel exchanges over disjoint links; under the stated delay model, communicating over one matching takes t(1) = 1 unit.Source: §3 · p. 4
Step 2: Computing Matching Activation Probabilities
- Independent Bernoulli activation probabilities p_j control matching use, with the budget constraint ∑p_j ≤ CbM; Cb = 0.1 targets 10% of vanilla DecenSGD’s per-iteration communication time.Setting every p_j to 1 recovers vanilla DecenSGD, which takes M time units for a consensus step.Source: §3 · p. 4
- MATCHA chooses probabilities to maximize expected-graph algebraic connectivity under the communication constraint, yielding a convex problem that can be solved efficiently.The expected graph has Laplacian ∑p_jL_j, and a larger λ2 typically indicates better connectivity.Source: §3 · pp. 4–5
Step 3: Generating Random Topology Sequence
- Each iteration independently samples each matching using its assigned probability, producing an activated topology that can be sparse or disconnected.The sampling information can be assigned to worker nodes before training begins.Source: §3 · p. 5
Extension to Other Design Choices
- MATCHA can accommodate general increasing delay functions, one matching per iteration, variable link costs, and decompositions into single edges or cliques.For a general delay t(∆(G)), the communication constraint becomes t(∑p_j) ≤ Cb · t(M).Source: §3 · p. 5
Why not use Periodic Decentralized SGD?
- Unlike P-DecenSGD, which activates all links together and treats them equally, MATCHA varies link frequency and can provide better error-convergence guarantees at the same communication reduction.P-DecenSGD reduces communication by synchronizing over the whole base graph only every few iterations [28].Source: §3 · p. 5
4 Further Optimizing MATCHA For Decentralized SGD
MATCHA can converge to a stationary point for any positive communication budget on a connected base graph by choosing a suitable mixing parameter. The section explains how that parameter is selected and why it is optimized separately from activation probabilities.
- The mixing parameter α sets the weight of neighbor information, and a smaller spectral norm ρ yields a smaller optimization-error bound.Source: §4 · p. 5
- For any communication budget Cb > 0 on a connected base graph, choosing α for W(k) = I − αL(k) can yield ρ < 1 and guarantee MATCHA converges to a stationary point.Source: §4 · p. 5
- The value of α is obtained by solving a semi-definite program once at the start of training, with negligible additional computation time.Source: §4 · p. 6
- Because activation probabilities also influence ρ, MATCHA optimizes them separately from α since joint optimization is non-convex and inefficient; optimizing probabilities via (5) minimizes an upper bound on ρ.Source: §4 · p. 6
5 Error Convergence Analysis
For non-convex objectives, the analysis tracks the averaged gradient norm and relates MATCHA’s optimization error bound to the mixing-matrix spectral norm ρ. Its communication budget can reduce communication time while preserving or improving ρ relative to vanilla DecenSGD.
5 Error Convergence Analysis
- The analysis uses the averaged gradient norm for non-convex objectives, which approaches zero as the algorithm converges to a stationary point.The stated assumptions include differentiable local objectives with L-Lipschitz gradients, unbiased stochastic gradients, bounded variance, and bounded deviation of local gradients.Source: §5 · p. 6
- Under Assumptions 1–4, MATCHA’s non-asymptotic guarantee has ρ < 1 for any communication budget Cb.The theorem assumes an i.i.d. mixing-matrix sequence generated by MATCHA and a learning rate satisfying its stated condition.Source: §5 · p. 6
- Theorem 2 recovers the fully synchronous SGD bound for fully averaging matrices and the vanilla DecenSGD bound for fixed mixing matrices; smaller ρ gives a lower optimization-error upper bound.The passage identifies the spectral norm ρ as the only difference between MATCHA’s and vanilla DecenSGD’s optimization-error upper bounds.Source: §5 · p. 6
- 2–3× less communication time lets MATCHA preserve the same ρ as vanilla DecenSGD, while a proper budget can yield a lower ρ.A lower ρ means a better error-convergence bound in terms of iterations; the figure uses 16 worker nodes.Source: Figure 3 · p. 7, §5 · p. 7
- With a properly configured learning rate, MATCHA achieves linear speedup in the number of worker nodes, matching the same rate as vanilla DecenSGD and fully synchronous SGD.Source: §5 · p. 7
6 Experimental Results
Across image-classification and language-modeling experiments, MATCHA reduces communication time while preserving or improving convergence, with the strongest reported speedup reaching 5× over vanilla DecenSGD. Its communication-budget and topology experiments show the trade-off across varied graphs and against periodic DecenSGD.
Experimental setup
- Experiments cover CIFAR-10 and CIFAR-100 image classification and Penn Treebank language modeling, with datasets evenly partitioned across workers.Learning rates were tuned for vanilla DecenSGD and reused for other algorithms, a choice the paper notes disadvantages MATCHA.Source: §6 · p. 7
Effectiveness of MATCHA
- At communication budget 0.5, MATCHA's training losses are nearly identical to vanilla DecenSGD at every epoch, while expected communication time per iteration is reduced by 50%.Source: §6 · p. 7
- 5× less wall-clock time than vanilla DecenSGD to reach training loss 0.1 on CIFAR-100 with communication budget Cb = 0.02.The comparison is shown in Figure 4a.Source: §6 · p. 8, Figure 4 · p. 8
Effects of Base Communication Topology
- With maximal degree 10, MATCHA at Cb = 0.4 reduces mean communication time per iteration by 2.5× and has lower error than vanilla DecenSGD.On the denser topology in Figure 5c, Cb = 0.3 reduces communication time per iteration by about 3.3× without hurting error-convergence.Source: Figure 5 · p. 8, §6 · p. 9
- Across base graphs of increasing density, MATCHA keeps 200-epoch training time nearly constant at about 11 minutes, while vanilla DecenSGD rises from 13 to 22 minutes.MATCHA maintains an effective maximal degree of about 4 and takes progressively less time to reach training loss 0.1 than vanilla DecenSGD and P-DecenSGD.Source: Figure 5 · p. 8, §6 · p. 9
Comparison to Periodic DecenSGD
- Given a fixed communication budget Cb, MATCHA consistently outperforms periodic DecenSGD, which synchronizes over the whole base graph every few iterations.MATCHA instead assigns different communication frequencies to different matchings.Source: §6 · p. 9
7 Concluding Remarks · A More Experimental Results
MATCHA reduces communication delay in decentralized SGD over arbitrary topologies by sampling connectivity-critical links more often, while maintaining or improving error-versus-iterations convergence. The conclusion also identifies future directions in adaptive communication budgets, directed graphs, and other decentralized algorithms.
7 Concluding Remarks
- MATCHA reduces communication delay while maintaining or improving error-versus-iterations convergence, according to theoretical analysis and experiments.Source: §7 · p. 9
- MATCHA targets communication-delay reduction for decentralized SGD over arbitrary node topologies.Source: §7 · p. 9
- Matching decomposition sampling gives workers higher communication probability on connectivity-critical links.Source: §7 · p. 9
- A future direction is to adaptively change the communication budget, similar to [27].Source: §7 · p. 9
- Another future direction is extending MATCHA to directed communication graphs [1].Source: §7 · p. 9
- The paper also proposes extending MATCHA to other decentralized computing algorithms.Source: §7 · p. 9
A.1 Detailed Experimental Setting
The experiments use separate image-classification and language-model training settings, with specified worker hardware and a PyTorch/MPI4Py implementation.
A.1 Detailed Experimental Setting
- CIFAR-10 and CIFAR-100 use a 64-example worker batch, learning rate 0.8 decayed by 10 after 100 and 150 epochs, and 200 vanilla DecenSGD epochs.Other algorithms run for the same wall-clock time as vanilla DecenSGD.Source: §A.1 · p. 11
- PTB training uses a two-layer LSTM with 1500 hidden nodes per layer [20], learning rate 40 decayed by 4 at saturation, batch size 10, embedding size 1500, and 40 epochs.PTB contains 923,000 training words.Source: §A.1 · p. 11
- Each worker node has one NVIDIA TitanX Maxwell GPU and a 40 Gbps (5000 MB/s) Ethernet interface; MATCHA is implemented with PyTorch and MPI4Py.Source: §A.1 · p. 11
A.2 More Results
MATCHA matches vanilla DecenSGD’s error convergence and, with Cb = 0.5, its test accuracy, while P-DecenSGD performs worse and lower communication budgets slightly reduce final accuracy.
A.2 More Results
- MATCHA has nearly identical error convergence to vanilla DecenSGD, while P-DecenSGD performs worse on all tasks despite the same average communication time per iteration.The comparison uses the base communication topology in Figure 1(a).Source: Figure 6 · p. 11
- With Cb = 0.5, MATCHA consistently reaches vanilla DecenSGD’s test accuracy; further reducing the communication budget only slightly degrades final test accuracy.The results correspond to the training loss curves in Figure 4 and are described as predicted by the theoretical result in Figure 1(c).Source: Figure 7 · p. 11
B Proof of Theorem 1 · B.1 Formulation of the Semi-Definite Programming Problem · B.2 Discussions on the Upper Bound of Spectral Norm
The appendix proves that connectivity permits a step size with spectral norm ρ < 1, formulates its selection as a semidefinite program, and relates topology optimization to minimizing an upper bound on ρ.
B Proof of Theorem 1
- The proof establishes positivity of the expected activated topology, existence of a step size with ρ < 1 under connectivity, and a semidefinite-programming method to obtain it.These are the proof’s three stated parts.Source: B Proof of Theorem 1 · p. 11
- The base communication topology’s connectivity gives a positive second eigenvalue for the sum of its link matrices, supporting positivity of the expected activated topology.The proof identifies this positivity as its first part.Source: B Proof of Theorem 1 · pp. 11–12
- For λ_m ≥ λ_2 > 0, the proof derives α* > 0 and h_λ(α*) < 1, with h_λ(α) < 1 over a range of step sizes.It gives the range as α ∈ (0, 2α*).Source: B Proof of Theorem 1 · p. 13
B.1 Formulation of the Semi-Definite Programming Problem
- The spectral-norm minimization over α is NP-hard in its direct form because it has a bilinear matrix inequality constraint.The appendix introduces an auxiliary variable β to relax this optimization.Source: §B.1 · p. 13
- Introducing β yields linear matrix inequality constraints and a standard semidefinite program, whose solutions satisfy α² = β and match the original problem.The appendix establishes the equality by contradiction.Source: §B.1 · p. 14
B.2 Discussions on the Upper Bound of Spectral Norm
- Using matrix-norm inequalities, the appendix shows that maximizing λ_2(L) is equivalent to minimizing an upper bound on the spectral norm ρ.This connects optimizing the p_i values via problem (5) to the spectral-norm upper bound.Source: §B.2 · p. 14
C Proofs of Theorem 2 and Corollary 1 … D Spectral Graph Theory
The appendix develops matrix-based proof machinery for decentralized SGD and introduces graph-spectral definitions, including the connectivity criterion based on the second Laplacian eigenvalue.
C.1 Preliminaries
- The proof writes the decentralized SGD update in matrix form and recalls the assumptions used in the subsequent derivation.Source: §C.1 · p. 15
C.2 Lemmas
- The proof assumes i.i.d. symmetric doubly stochastic m × m mixing matrices and uses their symmetry, preservation of J, and repeated-product argument.Source: §C.2 · p. 15
- The lemma proof takes expectations over successive mixing matrices and uses their i.i.d. property to repeat the argument.Source: §C.2 · p. 15
C.3 Proof of Theorem 1
- The proof of Theorem 1 uses smoothness and bounded variance to combine expected-update inequalities, then sums and averages them over iterations.Source: §C.3 · pp. 16–17
- The proof separately bounds local-model discrepancies using the decentralized update, common initialization, and a mixing-matrix property.Source: §C.3 · pp. 17–18
D Spectral Graph Theory
- The graph Laplacian is positive semidefinite, and a graph is connected exactly when its second-smallest eigenvalue λ2(L) is positive.The section defines the network as a simple undirected graph; simple graphs have no self-loops or multiple edges.Source: D Spectral Graph Theory · p. 20
Related papers
This paper cites
- Optimization Methods for Large-Scale Machine Learning2016
- Local SGD Converges Fast and Communicates Little2018
- Can Decentralized Algorithms Outperform Centralized Algorithms? A Case Study for Decentralized Parallel Stochastic Gradient Descent2017
- Dual Averaging for Distributed Optimization: Convergence Analysis and Network Scaling2010
- Cooperative SGD: A unified Framework for the Design and Analysis of Communication-Efficient SGD Algorithms2018