Manuscript Offprint
arXiv:2610.20087Binary Cyclic Gradient Coding: Exact Recovery and Robustness to Compression
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 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 classes that each cover the whole dataset, but it assigns the data through cyclic supports. Its encoding matrix has rank , and workers keep the balanced load , 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 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 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 , and whose decoding reduces to a single summation. Let be the number of workers, indexed by , let be the number of data chunks, and let be the maximum number of stragglers to tolerate. Following [9], we set , since the case can be treated in the same way, and we split the workers into classes according to their index modulo . Each worker receives a cyclic support of consecutive indices modulo , and when the last worker of each class receives a support of adjusted length. The workers of each class together cover exactly once, so summing the responses of any one class gives the full gradient. Since stragglers cannot meet all classes, at least one class is always complete. The scheme therefore tolerates any stragglers with the recovery threshold , which cannot be lowered, for every . The case is trivial, with .
The structure of the encoding matrix B depends on whether divides . When , B is circulant and each worker stores chunks, which is the minimum load for a row balanced scheme that tolerates stragglers [39, Theorem 1]. When , let with . In this case, B is nearly circulant and has the block form , where and . The block consists of the first rows of a circulant matrix, with rows of weight , while the rows of correspond to the last workers of the classes and have loads different from . Each chunk is still stored on exactly workers, one from each class. The recovery threshold therefore remains , and only these workers have a load different from .
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 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 distinct partitions when , 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 and a nearly circulant one otherwise, and which decodes by a single summation over one complete class, identified online with operations per response. We show that its binary recovering sets are exactly its classes, and that it tolerates any s stragglers at the optimal threshold with the minimal total load (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 and is cyclic when . For , 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 , every worker stores chunks and every chunk is stored by workers, which is the minimum for a row balanced scheme tolerating s stragglers. When , BCGC attains the minimal total load deviation of GFRC while keeping the load on 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 , BCGC induces 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 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 ), and is faster than the Gaussian MDS and Reed–Solomon codes. Under top sparsification with , 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 and when , 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.
A. Gradient coding
Consider a distributed learning setting in which a master solves an optimization problem by gradient descent, with the computation distributed across n workers. Given a dataset of N samples , the goal is to learn a parameter minimizing the loss function
where is the per-sample loss. We solve
by gradient descent, iterating the parameter update
where is the learning rate, kept constant throughout the paper, and is the full gradient. Throughout, parameters and gradients are regarded as row vectors in . To distribute this computation, we partition into chunks . A regularization term can be included by assigning it to a single chunk. Exact recovery does not require the chunks to have equal sizes, but we take them of equal size in our experiments. We write the partial gradients , so that the full gradient decomposes as
In each iteration, the master broadcasts the current model , the workers compute their partial gradients in parallel, and the master aggregates them according to (3) before performing the update (2). The computation of the partial gradients is distributed among the workers, of which at most may be stragglers, that is, nodes that do not respond or respond too slowly. Throughout, , and the case , without redundancy, is trivial. The master therefore receives at least responses, indexed by the set of fastest workers, which is not known in advance. The main goal of gradient coding is to recover the full gradient exactly from any worker responses. More generally, we call recovery threshold of a scheme the smallest integer such that, for every set of responding workers, the master can recover exactly from their messages, with any decoding function. A scheme that tolerates any stragglers has a recovery threshold at most .
To recover g from any responses, we construct an encoding matrix , with rows , such that, for every set with , there exists a decoding vector , with , satisfying
Here denotes the set of indices of the nonzero entries of a vector . Thus, the responses from any non-straggling workers suffice to recover the full gradient exactly. The scheme proceeds as follows.
Data distribution. The master partitions the dataset into k chunks and sends to worker i the chunks indexed by , along with the corresponding coefficients .
Local computation. At each iteration , the master broadcasts the current model to all workers. Worker then computes the partial gradients for , and returns the encoded message
(5) with .
○ Gradient update. Once the master has received the messages of a set I of at least n - s workers, it computes
It then performs the parameter update and broadcasts the new model .
The condition is central to gradient coding. In [39], this condition is characterized by the B-span condition, which we recall in the following definition.
Definition II.1 ([39, Condition 1]). A matrix satisfies the B-span condition for stragglers if
Remark II.2. In the literature, the B-span condition is enforced by several constructions, such as the fractional repetition and cyclic repetition schemes of [39], the generalized fractional repetition codes of [9], cyclic MDS codes [32], and Reed-Solomon codes [13]. Other works encode the data rather than the partial gradients, such as the moment encoding with LDPC codes of [28], which recovers the gradient approximately for linear regression by iterative decoding.
B. Binary gradient coding
We now recall the binary gradient coding schemes of [39, 9], in which the encoding matrix is required to satisfy and, for every with , the decoding vector is required to lie in with . Restricting both to removes scalar multiplications from the protocol entirely. Each worker sums the partial gradients it has been assigned,
and the master reconstructs the full gradient by summing a subset of the received messages, , with no linear system to solve online. The scheme therefore avoids the amplification of errors by large decoding coefficients, and the only numerical errors are those of the local gradient computations and of the floating-point summations. As in the general framework, the identity is understood over , so that the term binary refers to the 0/1 entries of and , and not to arithmetic modulo 2.
A binary matrix satisfying the B-span condition (Definition II.1) need not admit binary decoding vectors, since that condition only places in the real span of . The following sufficient condition, due to Charalambides et al. [9], guarantees binary decoding by exhibiting the decoding vector explicitly. For , we write for the indicator row vector of .
Proposition II.3 ([9, Prop. 3, Cor. 4]). Let and suppose that admits a partition into nonempty classes such that
Then, for every with , there exists with , and satisfies .
We now recall the encoding of the fractional repetition code (FRC) of Tandon et al. [39], a binary scheme in which the classes have equal sizes and the chunks are split uniformly within each class. The name reflects that each worker receives a fraction of the data, given by the support of its row, and that this assignment is repeated across the classes. Assume and , and write . A single class is encoded by the block matrix
whose rows have disjoint supports of size covering , so that the first worker of the class receives the first chunks, the second worker the next , and so on. Stacking copies gives
whose classes are the consecutive blocks of rows. Each such class is a copy of and therefore satisfies (7), so Proposition II.3 applies and tolerates s stragglers. Renumbering the worker q of the class j as yields the permutation-equivalent encoding
which is block diagonal with all-ones blocks of size , and in which the classes are the congruence classes , each selecting one row from every diagonal block.
III. BINARY CYCLIC GRADIENT CODING: THE DIVISIBLE CASE
We now present the binary cyclic gradient coding (BCGC) scheme, on which our results are based. BCGC combines two elements, the cyclic structure of cyclic codes and the binary encoding of FRC [39] and of its generalization GFRC [9], which removes the assumption . Its supports are those of the cyclic repetition scheme of [39], but with binary coefficients instead of real ones and with decoding by the summation of one class instead of a linear system, and it does not use the cyclic MDS codes of [32]. As in FRC and GFRC, the workers are partitioned into classes, each of which collectively holds the entire dataset, so that summing the messages of any complete class recovers the full gradient.
BCGC differs from FRC and GFRC in the choice of the supports. Its cyclic supports make the encoding matrix circulant when and near-circulant otherwise, and for this choice we characterize exactly the binary recovering sets. Following [39, 9], we set and index both the workers and the data chunks by , so that the partial gradients are and .
A. The encoding scheme
As in [9], we partition the workers according to their indices modulo . For , the congruence class of j is
We prove in Theorem III.6 that these classes are precisely the binary recovering sets of BCGC. When , they all have the same size.
Lemma III.1 (Class sizes [9, eq. (12)]). Let . For ,
and .
Proof. Identify with . Since , the residue modulo is well defined on , and is a subgroup of of order and index . For , we have if and only if , so . Since , no reduction modulo occurs, which gives the explicit form of and . Finally, the cosets are pairwise distinct, because are distinct modulo . As has exactly cosets, these are all of them, and they partition .
Proposition III.2. For , the classes satisfy
where .
Proof. By the proof of Lemma III.1, in , with . Hence .
We now define the cyclic support of worker i, that is, the set of indices of the data chunks assigned to it.
Definition III.3 (Cyclic support). For each , the cyclic support of worker i is
Since , these elements are pairwise distinct, so .
The following result is the basis of our construction. It shows that, for each congruence class , the supports , , form a partition of .
Proposition III.4. For every , the family is a partition of .
Proof. Let for , and . The support is the cyclic interval of length that starts at and ends just before . Hence the supports are consecutive cyclic intervals, each starting where the previous one ends, and their lengths sum to , so they cover exactly once.
To construct the matrix , we associate with each support its indicator row . Since , we have, for ,
It follows that B is the circulant matrix
where denotes the circulant matrix whose row is the right cyclic shift of the row vector by positions. Thus , and is the cyclic shift of by positions. Example III.8 displays for and .
Proposition III.5. The matrix B has nonzero entries, and all its rows and columns have weight .
Proof. Each row has ones, so . By (11), column is nonzero exactly at the workers (mod ), which are workers.
The following theorem shows that the full gradient can be recovered by simply summing the responses of a set of workers if and only if this set is a single class . This is a restriction compared with FRC and GFRC [39, 9], where workers of different classes may also be combined, so that these schemes have more binary recovering sets (Remark III.9).
Theorem III.6. Let B be as in (12).
- For every , the sum being taken over ,
- If is the set of responding workers and , then for some , and
The scheme tolerates any s stragglers, and its recovery threshold equals .
Proof. Indices are taken modulo , and is identified with . By (11), for all ,
- For , let be the coordinate of . Then
that is, is a partition of . This is the first equivalence.
If , then is a partition of by Proposition III.4. Conversely, assume that for all , and let . For , the index lies in , so forces
The unique with belongs to , hence by (14). Thus
Fix , and let be its class. Iterating (15) yields the elements , , of . They are pairwise distinct, since for , and they lie in , since reduction modulo preserves residues modulo when . As (Lemma III.1), they form , so . Finally, the supports of already partition (Proposition III.4) and every support is nonempty, so an element of would cover some index twice. Hence .
- Let , so that . The classes being pairwise disjoint, meets at most of them, and by the pigeonhole principle for some . By part (1) above, the supports of partition , so
Hence any responses suffice. The threshold cannot be lowered, even with real-valued or nonlinear decoding. Indeed, by Proposition III.5, each chunk belongs to exactly supports, and if these workers straggle, the received messages do not depend on . Therefore the recovery threshold equals .
The following remark describes schemes equivalent to BCGC, obtained by relabeling the chunks in the cyclic supports.
Remark III.7. Assume that and let be any permutation of , not necessarily an n-cycle, and , so that .
○ The encoding matrix is , with the permutation matrix of . The supports are no longer intervals of , but intervals of the cyclic order .
○ All the results of this section remain valid, except that is not circulant and its row space is not cyclic in general.
○ Under compression, only the chunks grouped in each block change, and Proposition V.9 holds with and instead of and .
Decoding. Since B is binary, no linear system needs to be solved. By Theorem III.6, it suffices to find a complete class and to sum the messages of its workers. Algorithm 1 processes the responses in their order of arrival, counts the responses received from each class, and stops as soon as one class is complete.
Algorithm 1 Decoding by complete class, divisible case
1: Input parameters , with , , and the messages of the responding workers, in their order of arrival
2: Output a complete class , used to recover
3: for responses received from
4: for to do
5: the class of worker
6:
7: if then
8: return
9: end if
10: end for
Correctness and complexity of Algorithm 1. Line 3 initializes one counter per class. At step , line 5 finds the class of the arriving worker , since is the set of indices congruent to modulo (Lemma III.1), and line 6 counts it. The workers are distinct and , so exactly when all the workers of have responded. The class returned at line 8 is therefore complete, and it is the first class to complete. The loop always returns. Indeed, after responses, at most workers are missing, and they meet at most of the disjoint classes, so some class is complete (Theorem III.6(2)). Hence the master waits for at most responses, and possibly only . The returned class satisfies by Theorem III.6(1). Each response costs operations, the final sum of messages of dimension costs , and no decoding matrix is stored. This is the decoder used in the experiments of Section VI.
The following example illustrates the scheme in the divisible case.
Example III.8. Let and , so that , , , , and . Then
and . If workers 0 and 1 straggle, the class is complete, and .
The following remark compares the recovering sets of BCGC and FRC.
Remark III.9. ○ By Theorem III.6(1), binary recovery in BCGC requires all the workers of a single class.
○ BCGC also accepts real-valued decoding, in which complete classes can be combined. Every with satisfies . In Example III.8, . Since each class involved must be complete, the threshold remains .
○ In , the workers of each diagonal block share the same support, so one worker per block suffices, even from incomplete classes. With the parameters of Example III.8, rows 0 and 4 of sum to , although and . Thus FRC has binary recovering sets, against for BCGC.
○ Both schemes tolerate any s stragglers with the same load and decoding cost, but FRC decodes from more straggler patterns and, with early stopping, needs fewer responses on average. In return, the classes of BCGC induce distinct partitions of the data, whereas all the binary recovering sets of FRC induce the same partition, and hence return the same compressed update (Proposition V.10).
B. Algebraic structure and comparison with the FRC scheme
In this subsection, we describe the code spanned by the rows of over , the field in which decoding takes place, and we compare with the FRC matrix of [39, 9]. We identify each vector with the polynomial in , and for we let denote the -th standard basis vector of .
Proposition III.10. Let be the subspace of spanned by the rows of B in (12). Then is the cyclic code with generator polynomial
Hence and . Moreover, is not MDS for .
Proof. Since is the cyclic shift of by positions, in . Hence is the cyclic code generated by . Since ,
Thus is a monic divisor of , so it is the generator polynomial of , and . By Proposition III.4, .
Now let . Then , so , and
is a nonzero codeword of weight . Hence , so the Singleton bound is not attained and is not MDS. Both conditions on are necessary. For , is an code, and for , is the repetition code. Both codes are MDS. Finally, for , and is the trivial code, which is also MDS.
We now compare B with the encoding matrix of FRC [39, 9]. Two matrices are permutation-equivalent if one is obtained from the other by permuting its rows and its columns. Such permutations preserve the rank, so two matrices of different ranks are not permutation-equivalent.
Proposition III.11 (Non-equivalence with FRC). Let be the matrix (10), which is permutation-equivalent to (9). Then
Consequently, for , the matrices and are not permutation-equivalent.
Proof. The first equality follows from Proposition III.10, since . The matrix is block diagonal with blocks of rank 1, so . If , then , so and
The two ranks differ, so the two matrices are not permutation-equivalent. The restriction on is necessary, since both matrices equal for and for .
IV. BINARY CYCLIC GRADIENT CODING: THE NON-DIVISIBLE CASE
We now drop the hypothesis , and write the Euclidean division of by as
A. The encoding scheme
We keep the congruence classes , , of Section III. They no longer have a common size, and they come in two sizes, as follows.
Lemma IV.1 (Class sizes [9, eq. (12)]). 1) If , then and .
- If , then and .
Moreover, .
Proof. An element lies in if and only if for some integer with , that is, . Hence
Since , we have
-
If , then , so and .
-
If , then , so and .
Since are pairwise distinct modulo , the classes are pairwise disjoint, and their sizes sum to . Hence they partition .
We now define the supports. By Lemma IV.1, each class has size . Within each class, the first workers receive a full cyclic support of size , as in the divisible case, and the last worker receives the remaining indices. This choice keeps workers at the load of the divisible case and concentrates the irregular loads on the last worker of each class.
Definition IV.2 (Cyclic support, non-divisible case). Let , , and let , , be the workers of . The cyclic support of worker is
where
Thus every worker receives consecutive indices, except the last worker of each class, which receives indices if (where ) and indices if (where ).
To construct B in this case, we take as rows the indicator vectors . Since , we have , so the elements , , are pairwise distinct, , and
which is the rule (11) of the divisible case with the constant s replaced by .
The last worker of is if , and if . Hence, by Definition IV.2, the sizes of the cyclic supports are
It follows that B splits into two horizontal blocks,
where collects the rows with , and collects the rows of the last workers of the classes. Let denote the cyclic right shift. The block consists of the first rows of the circulant matrix generated by ,
where for .
In , the length is no longer constant, so its rows are not successive shifts of a single row. Indexing them by , the support of row starts at column , so that, for ,
The middle block of zeros has length if and otherwise, so it is empty when and . Example IV.7 displays for and . The rows of have weight or , so B is not circulant. We call it near-circulant, since its first rows are the first rows of the circulant matrix , and it differs from only in its last rows, one for each class.
Remark IV.3. When , that is, , the classes with are singletons, whose workers store all chunks, and BCGC is close to replication. We therefore recommend , that is, . Every load is then at most , so that no worker stores the whole dataset.
The following result is central to our construction. For each congruence class , the corresponding cyclic supports , , form a partition of . The proof relies only on the facts that the sum of the sizes of the supports of each class equals and that the supports are consecutive.
Proposition IV.4. For every , the family is a partition of . Equivalently, .
Proof. Fix , and use the notation of Definition IV.2. Recall that with for , and that is the cyclic interval of length starting at , where for and . For , we have , and . Hence the supports are consecutive cyclic intervals, each starting where the previous one ends, and their lengths sum to , so they cover exactly once. Since the vectors are binary, this is equivalent to .
In particular, each chunk lies in exactly one support of each class, so every column of B has weight and , which is the minimal total load of Proposition III.5.
The characterization of Theorem III.6 remains valid without the divisibility assumption, with the constant support length replaced by the length of (16).
Theorem IV.5 (Recovery, non-divisible case). Assume , and let be as in (16).
- For every , the sum being taken over ,
- If is the set of responding workers and , then for some , and, with ,
The scheme tolerates any s stragglers, and its recovery threshold equals .
Proof. The proof follows that of Theorem III.6, with the constant length replaced by . Indices are taken modulo . By Definition IV.2, with , so that .
- Let . As in the divisible case,
If , the last condition holds by Proposition IV.4. Conversely, assume that for all , and let . If , then , so . Moreover, forces and to be the only worker of its class (Definition IV.2), so is a class. Otherwise, , and we show that . Since , the index does not belong to , so the unique with satisfies . If , then with , hence
a contradiction. Therefore , that is,
Let be the class of , with . By Definition IV.2, for and , hence
Iterating (19) from therefore gives . Finally, the supports of already partition (Proposition IV.4) and every support is nonempty, so an element of would cover some index twice. Hence .
- As in Theorem III.6(2), if , then for some by the pigeonhole principle, and by part (1) above,
The threshold cannot be lowered, even with real or nonlinear decoders. Indeed, each belongs to exactly supports, one in each class (Proposition IV.4), and if these workers struggle, the received messages do not depend on .
Remark III.7 also applies to the non-divisible case.
Remark IV.6. Assume that , let be any permutation of , not necessarily an n-cycle, and let , where is the cyclic support of Definition IV.2.
○ The encoding matrix is , with as in (17) and the permutation matrix of . The supports are the intervals of the cyclic order , with the lengths of (16).
○ All the results of this section remain valid for , since they are invariant under column permutations, except that its first rows are no longer cyclic shifts of in general (Remark IV.15).
○ Under compression, only the chunks grouped in each block change, and Proposition V.9 holds with and instead of l and .
Decoding. In the non-divisible case, the relation of Proposition III.2 fails for , since and . It holds for every other , since and then have the same size and no reduction modulo occurs. The decoder does not use this relation. Algorithm 2 is Algorithm 1 with the common class size replaced by , given by Lemma IV.1. Only lines 1, 3, 7 and 8 change.
Algorithm 2 Decoding by complete class, non-divisible case
1: Input parameters , with , and , and the messages of the responding workers, in their order of arrival
2: Output a complete class , used to recover
3: , and if , otherwise, for
4: for to do
5: the class of worker
6:
7: if then
8: return
9: end if
10: end for
Correctness and complexity of Algorithm 2. The argument for Algorithm 1 applies unchanged. The workers are distinct, so exactly when all the workers of have responded, and the class returned at line 8 is the first class to complete. After responses, at most workers are missing, and they meet at most of the disjoint classes, so some class is complete and the loop always returns. The returned class satisfies by Proposition IV.4. The master waits for at most responses, and possibly only , when a class with completes first. Each response costs operations, and the final sum of messages costs .
Example IV.7 (n = 11, s = 2). Here and r = 2, and Lemma IV.1 gives , and . By Definition IV.2, the first workers of each class receive consecutive indices, and the last worker receives the remaining ones. For , the supports are , , and . For , they are , , and . For , they are
and . Hence
The first rows are consecutive cyclic shifts of , the last rows have weights 5, 2 and 2, every column has weight 3, and the rows of each class sum to . If workers 0 and 1 straggle, the class is complete, and its three messages sum to . The threshold cannot be lowered. If workers 0, 1 and 2 straggle, no class is complete, and no decoder, even real-valued or nonlinear, recovers , since the chunk 2 is held only by the workers 0, 1 and 2.
B. Algebraic structure and comparison with GFRC
In this subsection, we extend the analysis of Section III-B to the non-divisible case with . We describe the code spanned by the rows of B over , the field in which decoding takes place, and we compare B with the encoding matrix of the GFRC scheme [9], which extends the FRC scheme to the case .
Proposition IV.8. Let be the subspace of spanned by the rows of in (17). Then and . Moreover, is not MDS.
Proof. By (16), every worker is not the last worker of its class, so . These rows are in echelon form, hence linearly independent, and their last coordinate is 0 since . By Proposition IV.4, , and its last coordinate is 1. Hence .
On the other hand, let for . By Proposition IV.4, . The classes are disjoint and nonempty, so the restrictions of to are linearly independent, and so are . Thus the left kernel has dimension at least , and .
As in the divisible case, the Singleton bound gives , with equality if and only if is MDS. We exhibit a nonzero codeword of weight less than .
○ If , then by (16), so , and .
○ If , then and . Hence the workers 0 and 1 satisfy , and (16) gives and . Thus has weight , and .
In both cases, , so is not MDS.
Remark IV.9. Unlike the divisible case, is not MDS even for , since then and .
We now recall the encoding of [9]. It uses one partition of for the classes of size and another one for the classes of size .
Definition IV.10 (GFRC encoding matrix). Write the Euclidean divisions with , and with . The integers , , and depend only on and , so the length of the support of below depends only on and . For and , let
and , where
For , the sum is empty, so the first worker of each class receives a support starting at the chunk 0.
The lengths of each class sum to , so the supports , are consecutive blocks that partition , with the larger blocks first. These blocks depend on only through the size of . We denote by the partition used by the classes of size and by the partition used by the classes of size . Thus all the classes of the same size use the same partition, whereas the partition of in BCGC starts at . In [9], the lengths of the classes of size are given separately for , where and , and for . The lengths of the classes of size are written and with , so that . Definition IV.10 combines these cases.
Remark IV.11. By Lemma IV.1, ranges over if and over if , and the lengths of each class sum to . Hence the supports , are consecutive blocks that partition . Unlike the supports of BCGC, they are not cyclic, and they depend on only through the condition . All the classes with thus use the same partition of into blocks, and all the classes with use the same partition into blocks.
Example IV.12. Let and , so that , and . The classes are and , of size , and , of size . We have , so and . Since and , the lengths are
Hence
where the blocks of are the supports and , and those of are and . With the rows ordered by worker index,
The workers 0 and 1, the workers 3 and 4, and the workers 6 and 7 have identical rows, since and use the same partition. For instance, the workers 0, 4 and 6, taken from and , have supports that partition [8], so GFRC can decode from them. The five distinct rows satisfy the single relation , so , whereas .
Within each class, the lengths differ by at most one. Moreover,
(20)
and the last upper bound is attained. Indeed, for the lengths are and , and gives , hence the first bound. For , we have with , and the largest length is if and if , so the last upper bound is attained.
Theorem IV.13. Let with and . Then
rank and .
If moreover and , then , so and are not permutation-equivalent.
Proof. By Proposition IV.8, rank . By Definition IV.10, for , the rows of satisfy
Let . Then for and for , so the row space of is , with and . Since ,
rank .
Since ,
If and , then . If and , then gives . In both cases , so , and the two matrices are not permutation-equivalent.
Remark IV.14 (The critical cases and ). If or , then , and Theorem IV.13 does not apply. For , the two matrices coincide. Indeed, , and , and both constructions give the supports , and , so . For , the two matrices are not permutation-equivalent, since permuting rows and columns preserves the multiset of row weights and the inclusions between supports.
○ If , then . The rows of B have weights 1 and , plus s rows of weight n, whereas those of have weights and , plus s rows of weight n. These multisets differ for .
○ If and , both matrices have rows of weight 2, one row of weight 1 and one row of weight 3. In B, the support of weight 1 is contained in the support of weight 3, whereas in BGFRC the support of weight 1 and the support of weight 3 are disjoint.
Hence, for and , the matrices and are permutation-equivalent if and only if .
We close with the following remark on the loads of BCGC and GFRC. When , the loads cannot all equal , and the remark compares how the two constructions distribute them and explains the choice of Definition IV.2.
Remark IV.15 (Load distribution). The load imbalance of an encoding matrix B is measured by its total deviation from the balanced load [9, Def. 6],
-
By (16), only the last worker of each class has a load different from , equal to r or . Hence , the minimum of [9, Th. 11].
-
The loads of B lie between and , and those of between and [9, Th. 8].
-
This wider range is the price of the cyclic supports, which keep the maximum number of workers with the load .
-
The cyclic supports also keep B as close as possible to a circulant matrix. Its first rows are the cyclic shifts of , so B differs from only in the rows of its irregular workers. No fewer rows can differ in a scheme whose classes have supports that partition . Indeed, gives , so the loads of each class, which sum to , cannot all equal , and each class contains a row of weight different from , which differs from every row of .
V. COMPATIBILITY WITH GRADIENT COMPRESSION
Without compression, every complete class returns g exactly, so the decoded class does not matter. Under a nonlinear compressor, it does. In this section, we show that a compressed binary scheme is an uncoded compressed scheme on a coarser partition of the data, that the standard guarantee of compressed gradient descent with a contractive compressor holds on every such partition, and that the classes of BCGC induce more distinct partitions than those of FRC and GFRC.
Compressing the coded messages of gradient coding has been studied in [22, 23, 24, 37], with real-valued decoding weights or a robust aggregation rule, and with unbiased compressors [22, 24, 37] or error feedback [23]. The cyclic task matrix of [24] has the supports of BCGC, but its rows are reassigned at random at every iteration and no class is decoded. Here, the decoding is binary and, in the absence of compression, recovers the gradient exactly.
Each worker sends , where denotes compression followed by decompression. Given a decoding vector with and , the master forms
Remark V.1 (Linear compressors). If is linear, then , for every scheme and every decoding vector.
Most compressors used in practice are nonlinear, such as Top- sparsification [2, 27], quantization [1] and sign compression [17]. From now on, is deterministic and possibly nonlinear, and we write for the compression error of worker .
Proposition V.2 (Error of the decoded update). Let be a decoding vector of an encoding matrix B. Then, for every compressor C,
and
Proof. Since , substituting into (21) gives the identity.
For the bound, the triangle inequality and the homogeneity of the norm give
where the sum can be restricted to since the other terms vanish. Bounding by gives the first term of the minimum. It follows that
As , we obtain the desired bound.
Large decoding coefficients, as in real-valued schemes, thus amplify the compression errors. Binary decoding avoids this.
Corollary V.3 (Binary decoding). Let , and let satisfy . Then is a decoding vector, and, decoding with ,
(22)
Proof. We have and , so is a decoding vector. Since and , Proposition V.2 gives the two bounds.
The next result is the key to the analysis. Binary decoding turns the compressed coded update into an uncoded compressed update on a coarser partition of the data.
Proposition V.4 (Coarser partition). Assume that the loss is a sum of per-sample losses, as in Section II. Let have nonzero rows, let be as in Corollary V.3, and, for , let and . Then , and, decoding with ,
That is, the decoded update is the naive compressed update on the coarse partition instead of the fine partition .
Proof. Since the rows are binary, nonzero, and , we have , hence . Since the loss is a sum of per-sample losses and the chunks are disjoint,
Substituting into (22) gives (23).
Since C is nonlinear, compressing the block gradients differs from compressing the chunk gradients . We now show that, for contractive compressors, the standard guarantee on the fine partition also holds on every coarse partition.
Definition V.5 (Contractive compressor). A compressor C is -contractive, with , if for all .
To prove convergence on a coarse partition, we use the following standard quantities from federated optimization with unbalanced local datasets [26, 43]. Each chunk is weighted by its fraction of the total data, and heterogeneity is measured by the weighted variance of the gradients.
Assume that all chunks are nonempty. For , let and be defined as in Proposition V.4, and set
Define
These quantities measure the heterogeneity of the fine and coarse partitions, respectively. In particular, if and only if for all . When , we have and .
At round , let be the set of responding workers, and let and denote the corresponding quantities evaluated at .
We also state the following standard assumptions, under which convergence holds.
Assumption V.6. 1) The loss is additive over samples, that is, for disjoint .
- The function is differentiable, -smooth and bounded below by , that is, for all ,
-
The compressor C is deterministic and -contractive for some .
-
There exist and with such that for all .
The following proposition establishes the convergence of compressed gradient descent on coarse partitions, and we then show that FRC, GFRC and BCGC satisfy its conditions.
Proposition V.7 (Convergence on coarse partitions). Let items 1 to 3 of Assumption V.6 hold, let , and let have nonzero rows. At each round , let the master decode with , where and , and let .
- The iterates satisfy
- If, moreover, item 4 holds, then, with ,
Proof. Fix , and write . By item 1 of Assumption V.6 and Proposition V.4, and . Let for , so that .
- Expanding and using and gives
(24)
By the convexity of , item 3 of Assumption V.6 and (24),
(25)
By item 2 of Assumption V.6, the descent lemma with gives
Since and , we obtain, using (25),
(26)
Summing (26) over gives
Using and dividing by gives item 1.
- Since and , we have . The Cauchy–Schwarz inequality gives
Dividing by , summing over and using , we obtain, by item 4 of Assumption V.6,
Since , inequality (26) becomes
Summing over , using and dividing by gives item 2.
The following corollary applies Proposition V.7 to FRC, GFRC and BCGC.
Corollary V.8. Let items 1, 2 and 4 of Assumption V.6 hold, and let .
- If C is deterministic and -contractive with , then FRC, GFRC and BCGC satisfy, under any pattern of at most s stragglers and for every complete class decoded at each round,
where .
- In particular, if with and , then
where .
Proof. 1) Item 3 of Assumption V.6 holds. The encoding matrices of FRC, GFRC and BCGC are binary with nonzero rows, and the supports of each of their classes partition [n] (Section II-B, Definition IV.10, and Propositions III.4 and IV.4). Since the classes are disjoint, at most stragglers leave a complete class at every round, and . Hence item 2 of Proposition V.7 applies.
- Top- is deterministic and -contractive with . The condition then reads , and , so the claim follows from item 1.
The residual term does not depend on , and it vanishes when or , that is, for Top- .
By Corollary V.8, FRC, GFRC and BCGC have the same guarantee, and they differ only through the coarse partitions , that is, through the chunks that are compressed together. For , let be the partition of induced by the class .
Proposition V.9 (Cyclic supports separate adjacent chunks). Let , and consider the partitions of BCGC, with indices modulo . For every and every , the chunks and lie in different blocks of if and only if . Hence exactly one class of BCGC separates the chunks and .
Proof. Every support is a cyclic interval , and since , with if . If , the block of containing is , which starts at and does not contain . Otherwise, the block of containing satisfies with , so . Since the classes partition , belongs to exactly one class.
Proposition V.10 (Distinct partitions). If , the partitions of BCGC are pairwise distinct, no one of them refines another, and when . In contrast, all the classes of FRC induce the same partition, and those of GFRC induce one of the two partitions and of Definition IV.10.
Proof. Let . Since and , Proposition V.9 shows that separates the chunks and , whereas does not. Exchanging and , the partition separates the chunks and , whereas does not. Hence neither partition refines the other. If , then (Proposition III.2) and , so . Every class of selects one row from each diagonal block, and the statement on GFRC follows from Definition IV.10.
Hence FRC always returns the same compressed update and GFRC one of two, whereas the complete classes of BCGC can return up to different ones. The following example shows that one of them can be exact when those of FRC and GFRC are not.
Example V.11 (Effect of the decoded class). Let and .
-
GFRC, , . Let , and for , so that . The chunks 0 and 1 lie in the same block of and of (Example IV.12), whose gradient (3,4) is compressed to (0,4), so GFRC always returns (0,4). In BCGC, separates the chunks 0 and 1, and the class returns (3,0) + (0,4) = exactly, whereas and return (0,4). If the workers 0 and 2 straggle, is the only complete class.
-
FRC, , . Let , and for . FRC always returns Top-1(3,4) = (0,4), whereas the class of BCGC (Example III.8), with blocks and , returns exactly.
VI. EXPERIMENTS
We implement all schemes in MPI (mpi4py) on the Toubkal supercomputer [20], with one master and workers, each pinned to a core. Communication is modeled as ( , ), and the master's decoding time is included in every reported wall time. We use four datasets, Amazon Employee Access with logistic regression ( ), MNIST and EMNIST digits with softmax regression ( ), and 20 Newsgroups with softmax regression on TF-IDF features ( ).
We compare BCGC with the uncoded (naive) scheme, with the binary GFRC of [9], which coincides with FRC when , and with two MDS gradient codes with real or complex coefficients, the Gaussian MDS code (G-MDS) of [39] and the Reed–Solomon code (RS) of [13]. We omit the cyclic MDS code of [32], since for its decoding vector has a norm of order and, at , its decoding is already inaccurate in double precision without compression. Each worker compresses its coded message with top sparsification, with . For RS, the messages are complex, they are sparsified by modulus, and the real part of the decoded sum is kept. All schemes run 100 iterations of Nesterov accelerated gradient descent from in double precision, with step size on Amazon, 0.1 on MNIST and EMNIST, and 1.0 on 20 Newsgroups. This optimizer differs from the plain gradient descent of Proposition V.7, so the experiments illustrate the analysis without being formally covered by it. Without compression, the naive and binary schemes recover the exact gradient and reach an AUC of 0.883.
on Amazon and an accuracy of 0.915, 0.925 and 0.617 on MNIST, EMNIST and 20 Newsgroups. The MDS codes reach the same values at , but at the complex decoding of RS is numerically unstable, and its accuracy already falls to 0.02 on 20 Newsgroups without compression.
All schemes share the same initialization, data and straggler schedule, so the differences between them come only from the coding scheme. Without compression, the runs of the exact schemes are identical, which confirms exact recovery, and top sparsification is deterministic.
A. Robustness of compressed gradient coding
We first isolate the effect of compression on the decoding step. Each scheme tolerates up to stragglers, and exactly workers are delayed at each iteration according to a fixed schedule. The binary schemes stop at the first complete class and sum its messages, whereas the MDS codes wait for responses and solve the linear system . Each worker compresses its message with the top sparsification operator, which keeps the entries of largest magnitude. We consider two straggler levels, , for which , and , for which .
Figure 1 shows the convergence on Amazon, Figure 2 reports the wall time, and Tables I to II summarize the results on the four datasets. Like the naive scheme, the binary schemes BCGC and GFRC remain within 0.022 of their uncompressed metric, and they are the fastest coded schemes, requiring about 27 s on Amazon against 46 to 56 s for the MDS codes. At , BCGC and GFRC have the same performance. At , where , BCGC is at most slower than GFRC, on 20 Newsgroups, since its construction assigns a larger load to a few workers in this case (Remark IV.15). By Proposition V.2, the error of the decoded update is bounded by . The binary codes keep both factors small, since they use unit coefficients and to 5, compared with about for the Gaussian MDS code (Table II). Under compression, the MDS codes diverge at , and their metric falls to between 0.06 and 0.58. At , their decoding system becomes poorly conditioned. The Gaussian MDS code still recovers the exact gradient without compression but diverges with compression, whereas RS is numerically unstable even without compression, with oscillations on Amazon and an accuracy of 0.02 on 20 Newsgroups. Its apparent convergence under compression on some datasets is therefore a numerical artifact and not a sign of robustness. Its large decoding norm, on 20 Newsgroups at , results from a different set of responding workers, determined by the response times, since the decoding vector depends only on this set. Since we record only for the minimum error decoder of Section VI-B, the effect of the compression error of individual messages on the MDS codes remains a hypothesis. BCGC therefore matches the binary state of the art and, unlike the MDS codes, preserves its accuracy under compression.

Fig. 1. Convergence on Amazon with top sparsification for . The test AUC is shown on the left and the training loss, on a logarithmic scale, on the right, for (top) and (bottom). Solid lines correspond to uncompressed training and dashed lines to compressed training.

Fig. 2. Total wall time for 100 iterations on Amazon for , without compression (plain bars) and with top sparsification (hatched bars), for (left) and (right).
TABLE I FINAL TEST ACCURACY ON ALL DATASETS WITH TOP SPARSIFICATION, , n = 100.
| Dataset | s | Uncompr. | Naive | BCGC | GFRC | G-MDS | RS |
|---|---|---|---|---|---|---|---|
| Amazon | 20 | 0.883 | 0.883 | 0.874 | 0.874 | 0.581 | 0.540 |
| 24 | 0.883 | 0.874 | 0.874 | 0.516 | 0.525 | ||
| MNIST | 20 | 0.915 | 0.895 | 0.894 | 0.893 | 0.196 | 0.087 |
| 24 | 0.895 | 0.895 | 0.895 | 0.116 | 0.896 | ||
| EMNIST | 20 | 0.925 | 0.903 | 0.903 | 0.903 | 0.153 | 0.202 |
| 24 | 0.903 | 0.903 | 0.903 | 0.206 | 0.904 | ||
| 20 NG | 20 | 0.617 | 0.617 | 0.609 | 0.609 | 0.151 | 0.063 |
| 24 | 0.617 | 0.609 | 0.610 | 0.100 | 0.603 |
TABLE II MEAN NORM OF THE DECODING VECTOR FOR .
| Dataset | s | BCGC | GFRC | G-MDS | RS |
|---|---|---|---|---|---|
| Amazon | 20 | 4.7 | 4.7 | 53 | |
| 24 | 4.0 | 4.0 | |||
| MNIST | 20 | 4.8 | 4.8 | 53 | |
| 24 | 4.0 | 4.0 | |||
| EMNIST | 20 | 5.0 | 4.9 | 53 | |
| 24 | 4.0 | 4.0 | |||
| 20 NG | 20 | 4.5 | 4.6 | 53 | |
| 24 | 4.0 | 4.0 |
In summary, the binary schemes remain stable under compression and stay within 0.022 of their uncompressed metric on all four datasets, while the Gaussian MDS and RS codes diverge at and become numerically unstable at . This agrees with Proposition V.2, since the binary codes use unit coefficients and a decoding norm of about 4 to 5, whereas the decoding norm of the Gaussian MDS code is of order . The binary schemes are also the fastest, as they decode from the first complete class without solving a linear system. BCGC has the same performance as GFRC at and is at most slower at , where a few of its workers carry a larger load.
B. Partition diversity on heterogeneous data
All binary schemes share the same convergence guarantee and differ only in the partitions induced by their complete classes (Corollary V.8). To isolate this effect, we use a minimum error decoder. Among the classes that are complete after responses, it selects the one with the smallest total compression error , where . Each worker also sends the scalar , which adds an communication cost, so BCGC and GFRC wait for the same responses and have the same wall time. We fix , so that , use top sparsification with , and compare two partitions of each dataset, an i.i.d. partition, obtained by shuffling the data, and a non-i.i.d. partition, obtained by sorting the data by label so that each chunk contains essentially one class, with and .
Table III and Figures 3 and 4 report the results. On the i.i.d. partition, BCGC and GFRC give the same results, as predicted by the theory. On the non-i.i.d. partition, BCGC has a total compression error 15 to lower than GFRC on Amazon, MNIST and EMNIST, and improves the accuracy by 5.0 points on MNIST and 4.9 points on EMNIST. This removes about half of the accuracy lost to compression, at the same wall time of about 40 s. This time is longer than that of the first complete class decoder in Table I, because the minimum error decoder waits for responses. On Amazon and 20 Newsgroups, the two schemes agree to within 0.001. When compression loses little information, as with sparse text gradients, or when the chunks are similar, the choice of partition has little effect. The gain therefore requires both heterogeneous data and a significant compression error, and BCGC is never worse than GFRC by more than 0.001.
TABLE III PARTITION DIVERSITY WITH THE MINIMUM ERROR DECODER AND TOP SPARSIFICATION, , , .
| Dataset | i.i.d. | non-i.i.d. | ||||
|---|---|---|---|---|---|---|
| BCGC | GFRC | BCGC | GFRC | BCGC | GFRC | |
| Amazon (AUC) | 0.874 | 0.874 | 0.877 | 0.877 | 111 | 130 |
| MNIST | 0.895 | 0.895 | 0.875 | 0.825 | ||
| EMNIST | 0.902 | 0.903 | 0.880 | 0.831 | ||
| 20 NG | 0.609 | 0.610 | 0.615 | 0.614 | 94 | 95 |
In summary, partition diversity is useful when the data are heterogeneous and compression is lossy. On the i.i.d. partition, BCGC and GFRC give the same results. On the non-i.i.d. partition, the minimum error decoder of BCGC selects a class with a total compression error 15 to lower than that of GFRC, which improves the accuracy by about 5 points on MNIST and EMNIST and removes about half of the accuracy lost to compression, at the same wall time. On Amazon and 20 Newsgroups, where the choice of partition has little effect on the compression error, the two schemes agree to within 0.001.
VII. CONCLUSION
We introduced BCGC, a binary gradient code with a circulant or nearly circulant encoding matrix whose binary recovering sets are exactly its classes. It tolerates any stragglers at the optimal threshold , achieves the minimal total load , and decodes by a single summation. For , it is neither MDS nor equivalent up to permutation to FRC or GFRC. We showed that binary gradient coding with compression is equivalent to uncoded compressed computation on a coarser partition of the data. This explains its stability under compression, whereas the large decoding coefficients of MDS codes amplify the compression error. For every contractive compressor, FRC, GFRC and BCGC share the same convergence guarantee and differ only in their partitions, with one, two and distinct partitions, respectively, and no partition of BCGC refines another. Experiments on four datasets show that BCGC matches GFRC in robustness and accuracy, runs faster than the two MDS codes, and remains stable under compression while these codes diverge. On heterogeneous data, selecting the complete class with the smallest compression error improves the accuracy by up to 5 points over GFRC at the same cost (Section VI-B). Future work will study convergence under broader classes of compressors, evaluate class selection on multiclass tasks, and extend the approach to dynamic coding schemes and to other computationally intensive algorithms affected by stragglers.
ACKNOWLEDGMENT
The authors gratefully acknowledge the support and computing resources provided by the Toubkal Supercomputer [20] (https://toubkal.um6p.ma) at UM6P, Morocco.
Naive (uncompr.) GFRC + Top-k BCGC + Top-k



Fig. 3. Partition diversity on MNIST with the minimum error decoder, n = 100, s = 24, on the i.i.d. partition (top) and the non-i.i.d. partition (bottom).
Naive (uncompr.) GFRC + Top-k BCGC + Top-k

Fig. 4. Test metric on the non-i.i.d. partition with the minimum error decoder, n = 100, s = 24.
REFERENCES
[1] Dan Alistarh et al. “QSGD: Communication-Efficient SGD via Gradient Quantization and Encoding”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 30. 2017, pp. 1709–1720.
[2] Dan Alistarh et al. “The Convergence of Sparsified Gradient Methods”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 31. 2018.
[3] Mohamed Adel Attia and Ravi Tandon. Combating Computational Heterogeneity in Large-Scale Distributed Computing via Work Exchange. arXiv preprint arXiv:1711.08452. 2017.
[4] Rawad Bitar, Mary Wootters, and Salim El Rouayheb. "Stochastic Gradient Coding for Straggler Mitigation in Distributed Learning". In: IEEE Journal on Selected Areas in Information Theory 1.1 (2020), pp. 277–291.
[5] R. D. Blumofe and C. E. Leiserson. “Scheduling Multi-threaded Computations by Work Stealing”. In: Journal of the ACM 46.5 (1999), pp. 720–748. DOI: 10.1145/324133.324234.
[6] L. Bottou, F. E. Curtis, and J. Nocedal. “Optimization Methods for Large-Scale Machine Learning”. In: SIAM Review 60.2 (2018), pp. 223–311.
[7] B. Buyukates et al. “Gradient Coding With Dynamic Clustering for Straggler-Tolerant Distributed Learning”. In: IEEE Transactions on Communications 71.6 (2023), pp. 3317–3332. DOI: 10.1109/TCOMM.2022.3166902.
[8] Neophytos Charalambides, Hessam Mahdavifar, and Alfred O. Hero III. “Numerically Stable Binary Gradient Coding”. In: Proc. IEEE International Symposium on Information Theory (ISIT). 2020, pp. 2622–2627.
[9] Neophytos Charalambides, Hessam Mahdavifar, and Alfred O. Hero III. “Generalized Fractional Repetition Codes for Binary Coded Computations”. In: IEEE Transactions on Information Theory 71.3 (2025), pp. 2170–2194. DOI: 10.1109/TIT.2025.3529680.
[10] Z. Charles, D. Papailiopoulos, and J. Ellenberg. Approximate Gradient Coding via Sparse Random Graphs. arXiv preprint arXiv:1711.06771. 2017.
[11] S. Dutta et al. “On the Optimal Recovery Threshold of Coded Matrix Multiplication”. In: IEEE Transactions on Information Theory 66.1 (2020), pp. 278–301. DOI: 10.1109/TIT.2019.2929328.
[12] M. Glasgow and M. Wootters. “Approximate Gradient Coding with Optimal Decoding”. In: IEEE Journal on Selected Areas in Information Theory 2.3 (2021), pp. 855–866. DOI: 10.1109/JSAIT.2021.3100110.
[13] W. Halbawi et al. “Improving Distributed Gradient Descent Using Reed–Solomon Codes”. In: Proceedings of the IEEE International Symposium on Information Theory (ISIT). 2018, pp. 2027–2031. DOI: 10.1109/ISIT.2018.8437467.
[14] Jiawei Jiang et al. “SketchML: Accelerating Distributed Machine Learning with Data Sketches”. In: Proc. ACM International Conference on Management of Data (SIGMOD). 2018, pp. 1269–1284.
[15] S. Kadhe, O. O. Koyluoglu, and K. Ramchandran. "Gradient Coding Based on Block Designs for Mitigating Adversarial Stragglers". In: Proceedings of the IEEE International Symposium on Information Theory (ISIT). 2019, pp. 2813–2817. DOI: 10.1109/ISIT.2019.8849690.
[16] Swanand Kadhe, O. Ozan Koyluoglu, and Kannan Ramchandran. “Communication-Efficient Gradient Coding for Straggler Mitigation in Distributed Learning”. In: Proc. IEEE International Symposium on Information Theory (ISIT). 2020, pp. 2634–2639.
[17] Sai Praneeth Karimireddy et al. “Error Feedback Fixes SignSGD and Other Gradient Compression Schemes”. In: Proc. International Conference on Machine Learning (ICML). Vol. 97. PMLR. 2019, pp. 3252–3261.
[18] S. Kas Hanna et al. “Adaptive Distributed Stochastic Gradient Descent for Minimizing Delay in the Presence of Stragglers”. In: Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). 2020, pp. 4262–4266.
[19] S. Kas Hanna et al. Adaptive Stochastic Gradient Descent for Fast and Communication-Efficient Distributed Learning. arXiv preprint arXiv:2208.03134. 2022.
[20] Imad Kissami et al. “TOUBKAL: a high-performance supercomputer powering scientific research in Africa”. In: The Journal of Supercomputing 81.15 (2025), p. 1401. DOI: 10.1007/s11227-025-07858-8.
[21] K. Lee et al. “Speeding Up Distributed Machine Learning Using Codes”. In: IEEE Transactions on Information Theory 64.3 (2018), pp. 1514–1529. DOI: 10.1109/TIT.2017.2736066.
[22] Chengxi Li and Mikael Skoglund. “Distributed Learning Based on 1-Bit Gradient Coding in the Presence of Stragglers”. In: IEEE Transactions on Communications 72.8 (2024), pp. 4903–4916.
[23] Chengxi Li, Ming Xiao, and Mikael Skoglund. Biased Compression in Gradient Coding for Distributed Learning. arXiv preprint arXiv:2603.16353. 2026.
[24] Chengxi Li et al. Byzantine-Robust and Communication-Efficient Distributed Training: Compressive and Cyclic Gradient Coding. arXiv preprint arXiv:2603.28780. 2026.
[25] Songze Li et al. “A Fundamental Tradeoff Between Computation and Communication in Distributed Computing”. In: IEEE Transactions on Information Theory
64.1 (2018), pp. 109–128. DOI: 10.1109/TIT.2017.2756959.
[26] Tian Li et al. “Federated Optimization in Heterogeneous Networks”. In: Proc. Machine Learning and Systems (MLSys). Vol. 2. 2020, pp. 429–450.
[27] Yujun Lin et al. “Deep Gradient Compression: Reducing the Communication Bandwidth for Distributed Training”. In: International Conference on Learning Representations (ICLR). 2018.
[28] Raj Kumar Maity, Ankit Singh Rawat, and Arya Mazumdar. “Robust Gradient Descent via Moment Encoding and LDPC Codes”. In: 2019 IEEE International Symposium on Information Theory (ISIT). 2019, pp. 2734–2738. DOI: 10.1109/ISIT.2019.8849514.
[29] Jer Shyuan Ng et al. “A Comprehensive Survey on Coded Distributed Computing: Fundamentals, Challenges, and Networking Applications”. In: IEEE Communications Surveys & Tutorials 23.3 (2021), pp. 1800–1837. DOI: 10.1109/COMST.2021.3091684.
[30] Hanzaleh Akbari Nodehi and Mohammad Ali Maddah-Ali. “Limited-Sharing Multi-Party Computation for Massive Matrix Operations”. In: 2018 IEEE International Symposium on Information Theory (ISIT). 2018, pp. 1231–1235. DOI: 10.1109/ISIT.2018.8437651.
[31] Aditya Ramamoorthy and Li Tang. “Numerically Stable Coded Matrix Computations via Circulant and Rotation Matrix Embeddings”. In: IEEE Transactions on Information Theory 68.4 (2022), pp. 2684–2703. DOI: 10.1109/TIT.2021.3137266.
[32] N. Raviv et al. “Gradient Coding from Cyclic MDS Codes and Expander Graphs”. In: IEEE Transactions on Information Theory 66.12 (2020), pp. 7475–7489. DOI: 10.1109/TIT.2020.3029396.
[33] Peter Richtárik, Igor Sokolov, and Ilyas Fatkhullin. "EF21: A New, Simpler, Theoretically Better, and Practically Faster Error Feedback". In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 34. 2021, pp. 4384–4396.
[34] Salim El Rouayheb and Kannan Ramchandran. “Fractional Repetition Codes for Repair in Distributed Storage Systems”. In: 48th Annual Allerton Conference on Communication, Control, and Computing. 2010, pp. 1510–1517. DOI: 10.1109/ALLERTON.2010.5707092.
[35] Michael Rudow et al. “Compression-Informed Coded Computing”. In: Proc. IEEE International Symposium on Information Theory (ISIT). Taipei, Taiwan, 2023, pp. 2177–2182. DOI: 10.1109/ISIT54713.2023.10206890.
[36] Heekang Song and Wan Choi. “Approximate Gradient Coding for Distributed Learning with Heterogeneous Stragglers”. In: Advances in Neural Information Processing Systems (NeurIPS). arXiv:2510.22539. 2025.
[37] Heekang Song and Wan Choi. Communication-Efficient Approximate Gradient Coding for Distributed Learning in Heterogeneous Systems. arXiv preprint arXiv:2605.15890. 2026.
[38] Sebastian U. Stich, Jean-Baptiste Cordonnier, and Martin Jaggi. “Sparsified SGD with Memory”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 31. 2018.
[39] R. Tandon et al. “Gradient Coding: Avoiding Stragglers in Distributed Learning”. In: Proceedings of the International Conference on Machine Learning (ICML). Vol. 70. PMLR. 2017, pp. 3368–3376.
[40] Thijs Vogels, Sai Praneeth Karimireddy, and Martin Jaggi. “PowerSGD: Practical Low-Rank Gradient Compression for Distributed Optimization”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 32. 2019.
[41] Da Wang, Gauri Joshi, and Gregory Wornell. “Using Straggler Replication to Reduce Latency in Large-Scale Parallel Computing”. In: ACM SIGMETRICS Performance Evaluation Review 43.3 (2015), pp. 7–11. DOI: 10.1145/2847220.2847223.
[42] H. Wang, Z. Charles, and D. Papailiopoulos. Erasure-Head: Distributed Gradient Descent without Delays Using Approximate Gradient Coding. arXiv preprint arXiv:1901.09671. 2019.
[43] Jianyu Wang et al. “Tackling the Objective Inconsistency Problem in Heterogeneous Federated Optimization”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 33. 2020, pp. 7611–7623.
[44] S. Wang, J. Liu, and N. Shroff. “Fundamental Limits of Approximate Gradient Coding”. In: Proceedings of the ACM on Measurement and Analysis of Computing Systems (POMACS) 3.3 (2019).
[45] Hang Xu et al. “GRACE: A Compressed Communication Framework for Distributed Machine Learning”. In: Proc. IEEE International Conference on Distributed Computing Systems (ICDCS). 2021, pp. 561–572. DOI: 10.1109/ICDCS51616.2021.00060.
[46] M. Ye and E. Abbe. “Communication-Computation Efficient Gradient Coding”. In: Proceedings of the International Conference on Machine Learning (ICML). Vol. 80. PMLR. 2018, pp. 5610–5619.
[47] Qian Yu et al. “Lagrange Coded Computing: Optimal Design for Resiliency, Security, and Privacy”. In: Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics (AISTATS). Vol. 89. PMLR. 2019, pp. 1215–1225.