arXiv:2610.20087cs.ITOct 2026

Manuscript Offprint

arXiv:2610.20087

Binary Cyclic Gradient Coding: Exact Recovery and Robustness to Compression

Hassan Ou-azzou, Imad Kissami, El Houcine Bergou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Hassan Ou-azzou, Imad Kissami, and El Houcine Bergou

Abstract—We introduce binary cyclic gradient coding (BCGC), an exact gradient coding scheme for n workers and up to s stragglers. Its encoding matrix is binary, circulant when (s+1)∣n(s+1) \mid n and nearly circulant otherwise, and the master decodes by a single summation. Like the fractional repetition coding scheme (FRC) and its generalized version (GFRC), BCGC splits the workers into s+1s+1 classes that each cover the whole dataset, but it assigns the data through cyclic supports. Its encoding matrix has rank n−sn-s, and n−s−1n-s-1 workers keep the balanced load s+1s+1, which is the largest possible number. We prove that encoding matrix of BCGC is not permutation-equivalent to those of FRC and GFRC schemes. Moreover, We also prove that a binary coded scheme with compression is equivalent to an uncoded compressed scheme on a coarser partition of the data. This explains why binary schemes remain stable under compression, whereas the large decoding coefficients of MDS codes amplify the compression error and lead to divergence in our experiments. For every contractive compressor, the standard convergence guarantee of compressed gradient descent holds on each coarse partition. FRC, GFRC and BCGC therefore share the same convergence guarantee and differ only in their partitions, with one partition for FRC, two for GFRC and s+1s+1 distinct partitions for BCGC. Choosing among these partitions can recover the exact gradient in cases where FRC and GFRC cannot. Experiments on four datasets confirm the theory. BCGC matches GFRC, keeps its accuracy under top κ\kappa sparsification while the MDS codes diverge, and on heterogeneous data its partition diversity reduces the compression error and improves the accuracy.

Index Terms—Gradient coding, coded distributed computing, straggler mitigation, fractional repetition codes, cyclic codes, MDS codes, gradient compression.

I. INTRODUCTION

Distributed gradient descent splits the computation of gradients for large learning problems across several workers coordinated by a central master [6]. At large scale, its efficiency is mainly limited by two factors. The first is the communication of high dimensional gradients to the master. The second is the presence of stragglers, that is, workers that respond slowly or fail to respond.

The communication cost arises because each worker sends a real vector of high dimension to the master at every iteration, over links with limited bandwidth [29, 45]. Existing works reduce this cost through compression, mainly by quantization [1], sparsification [2, 27], sketch based quantization [14] and low rank approximation [40], often combined with error feedback, which reuses the discarded part of each message in later iterations to keep the training convergent [38, 17, 33]. Stragglers have been handled in two ways. Classical methods such as task replication [41], work stealing [5] and work exchange [3] add redundancy or move work between workers during the computation, which requires monitoring and coordinating the workers. Coding theory instead builds the redundancy into the data assignment once, before the computation, which leads to coded distributed computing (CDC) [29]. The master then recovers the result from the fastest workers, with a guarantee on the number of slow or failed workers tolerated in the worst case, at the price of a computation load multiplied by the replication factor. CDC can also reduce communication by encoding intermediate results [25], and it offers further benefits such as fault tolerance, privacy [30] and security [47].

In this paper, we study how gradient coding interacts with the compression of the coded messages. The code handles the stragglers, and an existing compressor, applied by each worker to its coded message, reduces the communication. Gradient coding, introduced by Tandon et al. [39], partitions the training data into chunks that are replicated and assigned to the workers by an encoding matrix, so that a suitable decoder recovers the exact full gradient from the responses of the fastest workers, without knowing in advance which workers will respond. Another line of work relaxes exact recovery, through sparse random graphs [10], block designs for adversarial stragglers [15], stochastic assignments [4], approximate codes with optimal decoding [12] and their implementation [42], fundamental limits [44], heterogeneous stragglers [36], and online adaptation to the straggler statistics [18, 19]. Other works adapt the assignment to the observed stragglers [7], and codes also speed up distributed matrix computations [21, 11].

Standard gradient coding does not reduce communication, since each responding worker sends a vector of dimension d at every iteration. Communication can be reduced by increasing the computation load so that each worker sends a shorter coded vector [46, 16], or by compressing the coded messages before sending them [22, 23, 37], and compression has also been combined with coded computing more broadly [35]. Compressing coded messages raises two difficulties. First, coded messages are linear combinations of partial gradients, whereas compression is generally nonlinear and can destroy the linear structure that decoding requires. Existing works address this difficulty in different settings. The scheme of [22] is designed around a quantizer with one bit per coordinate, [23] combines stochastic gradient coding with biased compressors and error feedback and recovers an approximate gradient by a real weighted aggregation, [37] designs approximate gradient codes and quantization jointly, and [24] considers the stronger Byzantine threat model. Second, exact recovery constructions

The authors are with the College of Computing, Mohammed VI Polytechnic University, Ben Guerir, Morocco (e-mail: hassan.ouazzou-ext@um6p.ma; imad.kissami@um6p.ma; elhoucine.bergou@um6p.ma).

with minimal storage, such as the Gaussian MDS code of [39], cyclic MDS codes [32], Reed–Solomon codes [13] and LDPC based schemes [28], decode with real or complex coefficients. In finite precision, these coefficients can amplify rounding errors as the number of workers grows [8, 31], and under compression they also amplify the compression errors (Proposition V.2).

Binary gradient coding with decoding by summation removes the second difficulty. This is the principle of the fractional repetition coding (FRC) scheme of [39], named after the fractional repetition codes for distributed storage [34], and of its generalization, the generalized fractional repetition codes (GFRC) of [9]. In these schemes, the encoding matrix is binary and each worker sends the sum of its partial gradients, so the master recovers the full gradient by summing the messages of the fastest workers, without solving a linear system. Binary decoding does not remove the first difficulty, but it makes it simpler. In this direction, we propose binary cyclic gradient coding (BCGC), an exact scheme whose encoding matrix is binary and circulant, or nearly circulant when (s+1)∤n(s+1) \nmid n, and whose decoding reduces to a single summation. Let nn be the number of workers, indexed by [n]:={0,…,n−1}[n] := \{0, \ldots, n-1\}, let kk be the number of data chunks, and let ss be the maximum number of stragglers to tolerate. Following [9], we set k=nk = n, since the case k<nk < n can be treated in the same way, and we split the workers into s+1s+1 classes according to their index modulo s+1s+1. Each worker receives a cyclic support of s+1s+1 consecutive indices modulo nn, and when (s+1)∤n(s+1) \nmid n the last worker of each class receives a support of adjusted length. The workers of each class together cover [n][n] exactly once, so summing the responses of any one class gives the full gradient. Since ss stragglers cannot meet all s+1s+1 classes, at least one class is always complete. The scheme therefore tolerates any ss stragglers with the recovery threshold n−sn - s, which cannot be lowered, for every 1≤s≤n−11 \leq s \leq n-1. The case s=0s = 0 is trivial, with B=In\mathbf{B} = I_n.

The structure of the encoding matrix B depends on whether s+1s + 1 divides nn. When (s+1)∣n(s + 1) \mid n, B is circulant and each worker stores s+1s + 1 chunks, which is the minimum load for a row balanced scheme that tolerates ss stragglers [39, Theorem 1]. When (s+1)∤n(s + 1) \nmid n, let n=ℓ(s+1)+rn = \ell(s + 1) + r with 1≤r≤s1 \leq r \leq s. In this case, B is nearly circulant and has the block form B=(B1B2)\mathbf{B} = \begin{pmatrix} \mathbf{B}_1 \\ \mathbf{B}_2 \end{pmatrix}, where B1∈{0,1}(n−s−1)×n\mathbf{B}_1 \in \{0, 1\}^{(n-s-1) \times n} and B2∈{0,1}(s+1)×n\mathbf{B}_2 \in \{0, 1\}^{(s+1) \times n}. The block B1\mathbf{B}_1 consists of the first n−s−1n-s-1 rows of a circulant matrix, with rows of weight s+1s+1, while the s+1s+1 rows of B2\mathbf{B}_2 correspond to the last workers of the classes and have loads different from s+1s+1. Each chunk is still stored on exactly s+1s+1 workers, one from each class. The recovery threshold therefore remains n−sn-s, and only these s+1s+1 workers have a load different from s+1s+1.

Several features distinguish our construction. Like FRC and GFRC, and unlike cyclic MDS [32] and Reed–Solomon [13] codes, BCGC is binary and decodes by summing one complete class, which is identified online with O(1)O(1) operations per response, as in GFRC [9]. Moreover, we show that the binary recovering sets of BCGC are exactly its classes, whereas FRC and GFRC may combine workers of different classes (Remark III.9). BCGC is not equivalent up to permutation to FRC or GFRC, and it attains the minimal total load deviation of GFRC, with a larger maximum load. The same circulant support appears in [39] with real coefficients, and in [24] with a random reassignment of the rows and an approximate robust aggregation, whereas here the assignment is fixed and the decoding is exact. BCGC thus provides a binary cyclic gradient code with exact recovery, whereas the existing cyclic gradient codes are either real valued, and can then be numerically unstable and sensitive to compression, or binary with approximate decoding. Under a nonlinear compressor, binary decoding turns the decoded update into an uncoded compressed update on the partition of the data formed by the supports of the decoded class. For contractive compressors, the standard guarantee of compressed gradient descent holds on every such partition, so FRC, GFRC and BCGC share the same guarantee and differ only in these partitions. The cyclic supports of BCGC produce s+1s + 1 distinct partitions when n≥2(s+1)n \geq 2(s + 1), whereas FRC has one partition and GFRC has two. As a result, one partition of BCGC can recover the exact gradient when the partitions of FRC and GFRC cannot (Section V). The cyclic structure is therefore essential, because it provides a diversity of partitions that the standard block assignments of FRC and GFRC do not provide. Our comparison is with these standard assignments. The general GFRC framework of [9] also allows the chunks to be permuted differently in each class, so partition diversity is not excluded for every variant of GFRC, but our explicit cyclic construction achieves it with a fixed assignment and exact decoding by a single summation.

To summarize, our contributions are as follows.

o Construction and exact recovery. We introduce BCGC, which assigns the data through cyclic supports, giving a circulant encoding matrix when (s+1)∣n(s+1) \mid n and a nearly circulant one otherwise, and which decodes by a single summation over one complete class, identified online with O(1)O(1) operations per response. We show that its binary recovering sets are exactly its s+1s+1 classes, and that it tolerates any s stragglers at the optimal threshold n−sn-s with the minimal total load n(s+1)n(s+1) (Theorems III.6 and IV.5, Proposition III.5).

o Algebraic structure and comparison with FRC and GFRC. We show that the code spanned by the rows of the encoding matrix of BCGC has dimension n−sn - s and is cyclic when (s+1)∣n(s + 1) \mid n. For 2≤s≤n−22 \leq s \leq n - 2, this code is not MDS, and the encoding matrix is not equivalent up to permutation to those of FRC and GFRC (Propositions III.10, III.11 and IV.8, Theorem IV.13, Remark IV.14).

o Load distribution. When (s+1)∣n(s+1) \mid n, every worker stores s+1s+1 chunks and every chunk is stored by s+1s+1 workers, which is the minimum for a row balanced scheme tolerating s stragglers. When (s+1)∤n(s+1) \nmid n, BCGC attains the minimal total load deviation of GFRC while keeping the load s+1s+1 on n−s−1n-s-1 workers (Remark IV.15).

o Compatibility with compression. We prove that a compressed binary scheme is exactly the uncoded compressed scheme on a coarser partition of the data, whose blocks are the supports of the decoded class (Proposition V.4). This explains why binary schemes remain stable under compression, whereas the large decoding coefficients of MDS codes can amplify the compression error (Proposition V.2), which leads to divergence for the codes and settings of our experiments. For every contractive compressor, the standard guarantee of compressed gradient descent holds on each coarse partition, for every decoded class and every straggler pattern. Moreover, a coarser partition never increases the gradient heterogeneity, so the guarantee of the compressed coded scheme is at least as good as that of the uncoded compressed scheme (Proposition V.7, Corollary V.8). We also show that, for ℓ≥2\ell \geq 2, BCGC induces s+1s + 1 distinct partitions, none of which refines another, against one partition for FRC and two for GFRC (Propositions V.9 and V.10). Its complete classes can therefore return different compressed updates, one of which can be exact when those of FRC and GFRC are not (Example V.11).

Experiments. Our experiments on the Toubkal supercomputer with n=100n = 100 workers and four datasets (Amazon, MNIST, EMNIST and 20 Newsgroups) confirm the theory. BCGC matches GFRC in robustness and accuracy, is comparable in speed (within 17% when (s+1)∤n(s+1) \nmid n), and is faster than the Gaussian MDS and Reed–Solomon codes. Under top κ\kappa sparsification with κ=⌊0.05d⌋\kappa = \lfloor 0.05 d \rfloor, BCGC stays within 0.022 of its uncompressed test metric, whereas the Gaussian MDS and Reed–Solomon codes diverge. On heterogeneous data, selecting the complete class with the smallest compression error lets BCGC exploit its partition diversity, which reduces the error of the decoded update and improves the accuracy over GFRC by up to 5 points at the same cost.

The paper is organized as follows. Section II recalls gradient coding and its binary variant. Sections III and IV present BCGC when (s+1)∣n(s+1) \mid n and when (s+1)∤n(s+1) \nmid n, respectively, with its recovery guarantee, its algebraic structure, and its comparison with FRC and GFRC. Section V studies the effect of compression on binary gradient codes such as FRC, GFRC and BCGC. Section VI reports the experimental results, and Section VII concludes the paper.

References (47)