<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>On Improved Distributed Random Reshuffling over Networks</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE</publisher>
				<date>04/14/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10569357</idno>
					<idno type="doi">10.1109/ICASSP48485.2024.10447202</idno>
					
					<author>Pranay Sharma</author><author>Jiarui Li</author><author>Gauri Joshi</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[In this paper, we consider a distributed optimization problem. A network of n agents, each with its own local loss function, aims to collaboratively minimize the global average loss. We prove improved convergence results for two recently proposed random reshuffling (RR) based algorithms, D-RR and GT-RR, for smooth strongly-convex and nonconvex problems, respectively. In particular, we prove an additional speedup with increasing n in both cases. Our experiments show that these methods can provide further communication savings by carrying multiple gradient steps between successive communications while also outperforming decentralized SGD. Our experiments also reveal a gap in the theoretical understanding of these methods in the nonconvex case.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">INTRODUCTION</head><p>This paper considers the problem of collaboratively optimizing the average of n local cost functions, each owned by individual agents connected in a network. The local function at each agent depends on the corresponding local dataset. Mathematically, the problem is as follows:</p><p>where n is the number of agents, f i is the local loss of agent i &#8712; [n] &#8796; {1, 2, . . . , n}, m is the local dataset size, and f i,j is the loss corresponding to the j-th sample at the i-th agent. This problem has applications in signal processing and machine learning (ML), and has been studied for decades <ref type="bibr">[1,</ref><ref type="bibr">2,</ref><ref type="bibr">3]</ref>. However, modern applications also face an explosion in the amount of data available at the edge devices. This additional challenge precludes the usage of classical algorithms like gradient descent <ref type="bibr">[4]</ref>, that require full gradient computation at each step. In this situation, distributed stochastic gradient methods emerge as simple yet powerful alternatives.</p><p>This work was supported in part by NSF grants CCF 2045694, CNS-2112471, CPS-2111751, SHF-2107024 and ONR N00014-23-1-2149.</p><p>Stochastic gradient descent (SGD) is one of the most popular methods in modern ML. Consequently, its decentralized versions have also been extensively studied in the literature <ref type="bibr">[5,</ref><ref type="bibr">6]</ref>. When minimizing smooth objective functions, decentralized SGD (D-SGD) eventually achieves the same convergence as that of centralized SGD, implying network independence of the convergence error <ref type="bibr">[7]</ref>. Subsequent work has focused on proposing more sophisticated algorithms to further improve the performance of D-SGD. Such methods include gradient tracking (GT) <ref type="bibr">[8]</ref> and exact diffusion (ED) <ref type="bibr">[9,</ref><ref type="bibr">10]</ref>.</p><p>The theoretical analysis of vanilla SGD assumes withreplacement sampling at each step to compute the gradient estimate <ref type="bibr">[11]</ref>. However, in practice, without replacement sampling is observed to perform better. A commonly used SGD variant, called Random Reshuffling (RR), is used in deep-learning packages like PyTorch and TensorFlow. RR permutes the dataset at the beginning of each epoch, and computes gradient estimates using mini-batches sampled from the permuted sequence. Recent work <ref type="bibr">[12,</ref><ref type="bibr">13]</ref> has theoretically shown the benefits of RR compared to SGD. Specifically, given the dataset size N<ref type="foot">foot_0</ref> and number of epochs T , for smooth strongly-convex problems RR achieves (for large enough T ) a convergence of O(1/(N T 2 )), compared to O(1/(N T )) for SGD. For smooth nonconvex objectives, RR achieves O(1/(N T 2 ) 1/3 ), compared to O(1/ &#8730; N T ) for SGD. These benefits of RR over SGD naturally call for exploring RR in the decentralized setting.</p><p>The initial works that studied RR in the decentralized setting <ref type="bibr">[14,</ref><ref type="bibr">15]</ref> do not show any superiority over decentralized SGD. Subsequent work in <ref type="bibr">[16,</ref><ref type="bibr">17]</ref> proposed decentralized algorithms to solve smooth strongly-convex and nonconvex problems. Ignoring network dependence terms, the achieved convergence rates are O(1/(mT 2 )) in the strongly-convex, and O(1/(mT 2 ) 1/3 ) in the nonconvex case. These outperform D-SGD in certain parameter regimes (see Table <ref type="table">1</ref>). However, two crucial questions remain unanswered.</p><p>1. Can decentralized RR methods (D-RR and GT-RR) achieve convergence speedup with increasing network size n?</p><p>2. How to design RR-based algorithms that achieve network independent asymptotic convergence?</p><p>In this paper, we answer the first question in the affirmative, and highlight some interesting empirical observations that might help answering the second question.</p><p>Table <ref type="table">1</ref>: Comparison of the convergence rates of different decentralized algorithms. We omit the higher-order terms. O &#955; indicates that the dominant terms have network dependence that has been omitted for simplicity.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Contributions</head><p>We perform a refined analysis of two existing decentralized random reshuffling based algorithms: D-RR <ref type="bibr">[16]</ref> for smooth strongly-convex, and GT-RR <ref type="bibr">[17]</ref> for smooth nonconvex problems. Compared to existing results in <ref type="bibr">[16,</ref><ref type="bibr">17]</ref>, we achieve an additional speedup in terms of the number of agents n (see Table <ref type="table">1</ref>) in both the cases.</p><p>Further, our experiments reveal some interesting observations. First, D-RR (and GT-RR) achieves a smaller error than D-SGD even if the agents in the former communicate significantly less often, with agents taking multiple stochastic gradient steps between successive communications. Second, in the nonconvex case, we discover a gap in the existing theoretical analysis and the empirical results. The convergence results in this case (in <ref type="bibr">[16,</ref><ref type="bibr">17]</ref>, as well as ours) bound &#8741;&#8711;f (x)&#8741; 2 , where x is the global average of iterates, and have network dependence (see <ref type="bibr">[17,</ref> Table <ref type="table">1</ref>] and Theorem 2). However, our experiments in Figure <ref type="figure">2</ref> suggest that &#8741;&#8711;f (x)&#8741; 2 is independent of the network across different topologies. On the other hand, the convergence of</p><p>in the analysis of D-SGD and related methods) does indeed depend on the underlying network.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">ALGORITHM AND THEORETICAL RESULTS</head><p>We reproduce below the D-RR algorithm from <ref type="bibr">[16]</ref>, and refer the reader to <ref type="bibr">[17]</ref> for the GT-RR algorithm. Next, we introduce the assumptions needed in our theoretical results.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Assumptions</head><p>We assume the agents in the network are connected via a graph G = (N , E), where N = [n] denotes the set of agents, and E &#166; N &#215; N denotes the set of edges. We denote the set of neighbors of agent i by</p><p>Algorithm 1 Distributed Random Reshuffling (D-RR) <ref type="bibr">[16]</ref> 1: Input:</p><p>for j = 0, . . . , m -1 do</p><p>end for</p><p>end for 13: end for 14: Output {x i,T } Assumption 1 (Network Weight Matrix). The network graph G is undirected and connected, i.e., there exists a path between any two nodes in G. There is a direct link between nodes i and j (i &#824; = j) if and only if w ij &gt; 0 and w ji &gt; 0; otherwise, w ij = w ji = 0. The mixing matrix is nonnegative, symmetric, and stochastic, i.e., W = W &#166; and W 1 = 1.</p><p>We denote by &#955; the spectral norm of matrix W -11 &#166; /n. By Assumption 1, &#955; &lt; 1. Next, we discuss the assumptions on the loss functions in (1).</p><p>Assumption 2 (Smoothness). Each local component function f i,j is bounded from below and L-smooth, i.e., &#8741;&#8711;f i,j (x) -&#8711;f i,j (y)&#8741; f L &#8741;x -y&#8741; , for all x, y &#8712; R d . Assumption 3 (Strong Convexity). Each local function f i,j is &#181;-strongly convex, i.e., for all i, j and x, y &#8712; R d &#239;&#8711;f i,j (x) -&#8711;f i,j (y), xy&#240; g &#181; &#8741;x -y&#8741; 2 .</p><p>The above assumption can be relaxed to PL condition on the global function f <ref type="bibr">[17]</ref>, but we retain it here for simplicity. Next, we state and discuss our convergence results.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Convergence Results</head><p>Theorem 1 (Strongly Convex Case). Suppose Assumptions 1, 2 and 3 hold. If we choose &#945; t = &#952; m&#181;(t+K) with &#952; &gt; 12 and appropriately chosen K, we have <ref type="bibr">Theorem 1]</ref>, with an addition speedup with respect to the number of agents n in the first term and improving the dependence on the number of component functions m in the second term. In settings with n &lt; m and well-connected underlying graphs (such that 1  1-&#955; is independent of n), the first term dominates, and the convergence becomes almost network independent, recovering the performance of centralized RR (C-RR) <ref type="bibr">[18]</ref>. For example, in Figure <ref type="figure">1c</ref>, with exponential graphs, both D-RR and C-RR show similar convergence.</p><p>The improved bound in Theorem 1 results from a tighter bound on the shuffling variance &#963; 2 shuffle , defined in [16, Definition 1], which we state next.</p><p>Lemma 2.1. Under Assumption 2, we have</p><p>Remark 2. The bound in (3) has an extra 1/n factor that is missing in the corresponding bound in [16, <ref type="bibr">Lemma 6]</ref>, and results in the linear speedup in the number of agents n in Theorem 1. Note that &#963;2 * defined in Lemma 2.1 is different from &#963; 2 * in <ref type="bibr">[16]</ref>, where</p><p>However, it is easy to see that &#963;2 * f 4&#963; 2 * . Next, we state the convergence of GT-RR, a gradient tracking-based method proposed in <ref type="bibr">[17]</ref>, for smooth nonconvex problems. It is proved in <ref type="bibr">[17]</ref> that GT-RR has better network dependence compared to D-RR.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Theorem 2 (Nonconvex Case). Suppose Assumptions 1, 2, and [17, Assumption 2.1] hold. Then, with appropriately chosen step-sizes {&#945; t }, iterates generated by GT-RR satisfy</head><p>Remark 3. Our bound above improves the corresponding bound O</p><p>in [17, Theorem 4.1], by again achieving an addition speedup with respect to the number of agents n in the first term, and improving the dependence on the number of component functions m in the second term. Remark 4. We state the result in Theorem 2 in terms of E &#8711;f (x 0 t ) 2 for direct comparison with the corresponding results in <ref type="bibr">[16,</ref><ref type="bibr">17]</ref>. However, there are two limitations of the current bound. First, the bound does not explicitly quantify how different the individual iterates {x 0 i,t } n i=1 are. Therefore, many existing works <ref type="bibr">[6,</ref><ref type="bibr">10]</ref> bound</p><p>To see the benefit of the latter quantity, note that</p><p>which follows from Assumption 2. Second, our experiments suggest (see Figure <ref type="figure">2</ref> and the accompanying discussion) that &#8711;f (x 0 t ) 2 for both GT-RR and D-RR is independent of the network topology, and matches the performance of centralized RR. This suggests that the 1 1-&#955; factor in (4) might be an artifact of the analysis. On the other hand, Figure <ref type="figure">2</ref> shows that 1</p><p>2 is indeed network dependent.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">EXPERIMENT RESULTS</head><p>We evaluate the numerical performance of D-RR and GT-RR algorithms on the same binary classification problems on CIFAR10 dataset <ref type="bibr">[19]</ref>, as those considered in <ref type="bibr">[17]</ref>, but uncover some interesting observations. Centralized-RR and SGD serve as the baselines in all our experiments. All the curves have values averaged over 5 independent trials. The per agent batch-size for decentralized algorithms is 10 (for the centralized algorithms, it is 10 &#215; n). In the strongly-convex case, we solve the following optimization problem.</p><p>where D i (i = 1, . . . , n) denotes the local dataset for agent i, such that m = |D i | for all i. &#961; is set as 0.2.</p><p>In Figure <ref type="figure">1</ref>, we compare the performance of D-RR and GT-RR with that of D-SGD over a network of n = 16 agents connected in a ring, grid, and exponential graph. Centralized-RR (C-RR) and SGD serve as respective baselines. We plot the average iterate distance from the optimum</p><p>As discussed in Theorem 1 and Remark 1, the error floor for D-RR has network dependence. This is evident from the worse error floors of D-RR and GT-RR. However, if the graph is well-connected, as with exponential graph (Figure <ref type="figure">1c</ref>), the difference is negligible.</p><p>We also explore the impact of changing the communication frequency. As communication becomes more infrequent (increasing value of C) the error floor worsens. However, for well-connected networks, D-RR can still achieve a significantly better error floor than D-SGD (with C = 1). For exponential graphs, we can choose C as large as 25 and still outperform D-SGD. This suggests that decentralized RR-based methods with multiple gradient steps between successive communications can be beneficial in communicationconstrained settings and require further exploration. The special case with C = m has been studied in <ref type="bibr">[15]</ref>. 0 20 40 60 80 100 120 140 Epochs 10 -1 10 -3 10 -5 10 -7 10 -9 ||&#8711;f (x 0 t )|| 2 SGD C-RR D-SGD (C=1) D-RR (C=1) GT-RR (C=1) 0 20 40 60 80 100 120 140 Epochs 10 -1 10 -3 10 -5 10 -7 10 -9 1 n n i=1 ||&#8711;f (x 0 i,t )|| 2 SGD C-RR D-SGD (C=1) D-RR (C=1) GT-RR (C=1) (a) Ring graph 0 20 40 60 80 100 120 140 Epochs 10 -1 10 -3 10 -5 10 -7 10 -9 ||&#8711;f (x 0 t )|| 2 SGD C-RR D-SGD (C=1) D-RR (C=1) GT-RR (C=1) 0 20 40 60 80 100 120 140 Epochs 10 -1 10 -3 10 -5 10 -7 10 -9 1 n n i=1 ||&#8711;f (x 0 i,t )|| 2 SGD C-RR D-SGD (C=1) D-RR (C=1) GT-RR (C=1) (b) Exponential graph Fig. 2: Comparison of decentralized random reshuffling based algorithms: D-RR and GT-RR with centralized-RR, D-SGD and SGD for solving the strongly-convex binary classification problem (5) on CIFAR10 dataset, over networks with n = 16 agents.</p><p>C is fixed at 1. The step-size is sequentially set as 0.02, 0.004 and 0.001.</p><p>At the other extreme, in some cases, communication might be cheaper than gradient computation. This case is represented by the C &lt; 1 case, where each gradient computation is followed by 1/C rounds of communication. As expected, more communication results in improved consensus error, hence better convergence.</p><p>In the nonconvex case, we again solve a binary classification problem, but with a different regularizer, which leads to the following optimization problem.</p><p>, where x q denotes the q-th element of x &#8712; R d . We set &#951; = 0.2.</p><p>In Figure <ref type="figure">2</ref>, we fix the communication frequency to C = 1. We plot both the gradient norm at the average iterate &#8711;f (x 0 t ) 2 , as well as the average of gradient norms at individual iterates 1 n n i=1 &#8711;f (x 0 i,t ) 2 . For both ring and exponential graphs, the convergence of &#8711;f (x 0 t ) 2 seems independent of the network. This observation points to the need for an improved theoretical analysis, which removes the network dependence from the leading terms in Theorem 2.</p><p>On the other hand, 1 n n i=1 &#8711;f (x 0 i,t ) 2 has network dependence. GT-RR improves the error floor compared to D-RR but does not eliminate the network dependence completely.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">CONCLUSION</head><p>We presented improved analyses of two existing randomreshuffling based decentralized algorithms, D-RR and GT-RR. We show that the convergence of the two algorithms improves with increasing network size. Experimental results, while corroborating our theory, also point out some gaps in the current theoretical understanding of the nonconvex case, which requires further investigation. Other pertinent directions for future work include proposing algorithms that achieve network-independent convergence and shorter transient times. Corresponding work on D-SGD like methods <ref type="bibr">[7,</ref><ref type="bibr">10]</ref> can possibly provide some insights in this direction.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>These results are in the centralized setting. Comparing with the distributed setting in (1), N = mn.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_1"><p>979-8-3503-4485-1/24/$31.00 &#169;2024 IEEE ICASSP 2024 Authorized licensed use limited to: Carnegie Mellon University Libraries. Downloaded on January 31,2025 at 19:36:00 UTC from IEEE Xplore. Restrictions apply.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_2"><p>Authorized licensed use limited to: Carnegie Mellon University Libraries. Downloaded on January 31,2025 at 19:36:00 UTC from IEEE Xplore. Restrictions apply.</p></note>
		</body>
		</text>
</TEI>
