betaFeedback

WorksComputer Science

Binary Cyclic Gradient Coding: Exact Recovery and Robustness to Compression

Abstract

We introduce binary cyclic gradient coding (BCGC), an exact gradient coding scheme for nn workers and up to ss 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 κκ sparsification while the MDS codes diverge, and on heterogeneous data its partition diversity reduces the compression error and improves the accuracy.

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.

During the process each worker sends a high dimensional real vector to the master at every iteration over bandwidth limited links [29, 43]. This cost can be reduced by compression, mainly quantization [1], sparsification [2, 27], sketch based quantization [14] and low rank approximation [39], often with error feedback, which reuses the discarded part of each message in later iterations [37, 17, 33]. Stragglers are handled either by classical methods that add redundancy or move work at run time, such as task replication [40], work stealing [5] and work exchange [3], or by coding theory, which builds the redundancy into the data assignment before the computation, giving coded distributed computing (CDC) [29]. The master then recovers the result from the fastest workers with a worst case straggler guarantee, at the price of a higher computation load. CDC also reduces communication by encoding intermediate results [25] and offers fault tolerance, privacy [30] and security [45].

In this paper, we study how gradient coding interacts with the compression of the coded messages: the coding techniques handle the stragglers, and each worker compresses its coded message to reduce communication. Gradient coding, introduced by Tandon et al. [38], partitions the training data into replicated chunks assigned to the workers by an encoding matrix, so that a decoder recovers the exact full gradient from the fastest workers, without knowing in advance which respond. A parallel 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, 41], and online adaptation to the straggler statistics [18, 19]. In addition others adapt the assignment to the observed stragglers [7], and also the idea is used to speed up distributed matrix computations [21, 11].

Standard gradient coding does not reduce communication, since each responding worker sends a vector of dimension dd at every iteration. It can be reduced by increasing the computation load so that each worker sends a shorter coded vector [44, 16], or by compressing the coded messages [22, 23, 36, 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 handle this in specific settings, around a one bit quantizer [22], biased compressors with error feedback [23], jointly designed approximate codes and quantization [36], or a Byzantine threat model [24]. Second, exact recovery constructions with minimal storage, such as the Gaussian MDS code of [38], cyclic MDS codes [32], Reed–Solomon codes [13] and LDPC based schemes [28], decode with real or complex coefficients, which amplify rounding errors as the number of workers grows [8, 31] and, under compression, amplify the compression errors (Proposition IV.2). Binary gradient coding with decoding by summation removes the second difficulty. This is the principle of the fractional repetition coding (FRC) scheme of [38], named after the fractional repetition codes for distributed storage [34], and of its generalization GFRC [9], where 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 fastest workers without solving a linear system.

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. Here nn is the number of workers, indexed by [n]:={0,…,n−1}[n] := \{0,\ldots,n-1\}, kk the number of chunks, and ss the number of stragglers to tolerate. Following [9], we set k=nk=n and split the workers into s+1s+1 classes by their index modulo s+1s+1. Each worker receives a cyclic support of s+1s+1 consecutive indices modulo nn, the last worker of each class taking a support of adjusted length when (s+1)∤n(s+1)\nmid n. The workers of each class cover [n][n] exactly once, so summing any one class gives the full gradient; since ss stragglers cannot meet all s+1s+1 classes, at least one is always complete, and the scheme tolerates any ss stragglers at the recovery threshold n−sn-s, which cannot be lowered, for every 1≤s≤n−11\le s\le n-1 (the case s=0s=0 being trivial, with B=InB=I_n).

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, identified online in O(1)O(1) per response as in GFRC [9], but its binary recovering sets are exactly its classes, whereas FRC and GFRC may combine workers of different classes (Remark III.9). BCGC is not permutation-equivalent to FRC or GFRC and attains the minimal total load deviation of GFRC with a larger maximum load. The same circulant support appears in [38] with real coefficients and in [24] with randomly reassigned rows and approximate aggregation, whereas here the assignment is fixed and the decoding exact; existing cyclic gradient codes are either real valued, hence 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 formed by the supports of the decoded class, and for contractive compressors FRC, GFRC and BCGC share the standard guarantee of compressed gradient descent and differ only in these partitions. The cyclic supports produce s+1s+1 distinct partitions when n≥2(s+1)n\ge2(s+1), against one for FRC and two for GFRC, so BCGC can select the reconstruction closest to the exact gradient, a choice unavailable to FRC and GFRC (Section IV). Our comparison is with the standard block assignments. The general GFRC framework [9] also permits per-class chunk permutations, so partition diversity is not excluded for every GFRC variant, but our explicit construction achieves it with a fixed assignment and exact decoding.

To summarize, our contributions are as follows.

  • Construction and exact recovery. BCGC 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 decodes by a single summation over one complete class, it tolerates any ss stragglers at the optimal threshold n−sn-s with the minimal total load n(s+1)n(s+1).

  • Algebraic structure. The code spanned by the rows of the encoding matrix of the BCGC scheme has dimension n−sn-s and is cyclic when (s+1)∣n(s+1)\mid n; for 2≤s≤n−22\le s\le n-2 it is not MDS, and the matrix is not permutation-equivalent to those of FRC and GFRC.

  • Load distribution. BCGC attains the minimal total load deviation of GFRC, keeping the load s+1s+1 on n−s−1n-s-1 workers, with every worker and chunk at load s+1s+1 when (s+1)∣n(s+1)\mid n.

  • Compatibility with compression. First we prove that

any 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. This keeps binary schemes stable, whereas the large decoding coefficients of MDS codes amplify the compression error. For every contractive compressor the three schemes share the same convergence guarantee, but BCGC induces s+1s+1 distinct partitions (none refining another), against one for FRC and two for GFRC, so one of its classes can be exact when those of FRC and GFRC are not.

  • Experiments. On the Toubkal supercomputer with n=100n=100 workers and four datasets (Amazon, MNIST, EMNIST and 20 Newsgroups), BCGC matches GFRC in robustness and accuracy and is faster than the Gaussian MDS and Reed–Solomon codes. Under top-κ\kappa sparsification with κ=⌊0.05d⌋\kappa=\lfloor0.05d\rfloor it stays within 0.022 of its uncompressed metric while those codes diverge, and on heterogeneous data, selecting the complete class with the smallest compression error improves 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. Section III presents BCGC in both the divisible and non-divisible cases, with its recovery guarantee, its algebraic structure, and its comparison with FRC and GFRC. Section IV studies the effect of compression on binary gradient codes such as FRC, GFRC and BCGC. Section V reports the experimental results, and Section VI concludes the paper.

Preliminaries

In this section, we recall the general framework of gradient coding [38], together with its binary variant, which will be used throughout the paper. For a positive integer mm, we write [m]:={0,1,…,m−1}[m] := \{0,1,\ldots,m-1\}.

Gradient coding

Consider a distributed learning setting in which a master solves an optimization problem by gradient descent, with the computation distributed across nn workers. Given a dataset D\mathcal{D} of NN samples (x,y)(x,y), the goal is to learn a parameter β∗∈Rd\beta^*\in\mathbb{R}^d minimizing the loss function

L(D,β)=∑(x,y)∈Dϕ(x,y;β),L(\mathcal{D},\beta)=\sum_{(x,y)\in\mathcal{D}}\phi(x,y;\beta),

where ϕ\phi is the per-sample loss. We solve

β∗=arg⁡min⁡β∈Rd L(D,β)(1)\beta^*=\underset{\beta\in\mathbb{R}^d}{\arg\min}\ L(\mathcal{D},\beta) \tag*{(1)}

by gradient descent, iterating the parameter update

βt+1=βt−γg,(2)\beta_{t+1}=\beta_t-\gamma g, \tag*{(2)}

where γ>0\gamma>0 is the learning rate, kept constant throughout the paper, and g=∇L(D,βt)g=\nabla L(\mathcal{D},\beta_t) is the full gradient. Throughout, parameters and gradients are regarded as row vectors in Rd\mathbb{R}^d. To distribute this computation, we partition D\mathcal{D} into kk chunks D0,…,Dk−1\mathcal{D}_0,\ldots,\mathcal{D}_{k-1}, of equal size in our experiments. We write the partial gradients gj:=∇L(Dj,βt)\mathbf{g}_j := \nabla L(\mathcal{D}_j,\boldsymbol{\beta}_t), so that the full gradient decomposes as

g=∑j=0k−1∇L(Dj,βt)=∑j=0k−1gj.(3)\mathbf{g}=\sum_{j=0}^{k-1}\nabla L(\mathcal{D}_j,\boldsymbol{\beta}_t)=\sum_{j=0}^{k-1}\mathbf{g}_j. \tag*{(3)}

The nn workers compute the partial gradients gj\mathbf{g}_j where at most ss of them are stragglers at each iteration. The master thus receives at least n−sn-s responses, indexed by a set II of fastest workers, and must recover g\mathbf{g} exactly from them. The recovery threshold of a scheme is the smallest KK such that g\mathbf{g} can be recovered from any KK responses by some decoding function. A scheme tolerating any ss stragglers has threshold at most n−sn-s.

To recover g\mathbf{g} from any n−sn-s responses, we construct an encoding matrix B∈Rn×k\mathbf{B}\in\mathbb{R}^{n\times k}, with rows b0,…,bn−1\mathbf{b}_0,\ldots,\mathbf{b}_{n-1}, such that, for every set I⊆[n]I\subseteq[n] with ∣I∣≥n−s|I|\ge n-s, there exists a decoding vector aI∈R1×n\mathbf{a}_I\in\mathbb{R}^{1\times n}, with supp⁡(aI)⊆I\operatorname{supp}(\mathbf{a}_I)\subseteq I, satisfying

aIB=11×k.(4)\mathbf{a}_I\mathbf{B}=\mathbf{1}_{1\times k}. \tag*{(4)}

Here supp⁡(x)\operatorname{supp}(\mathbf{x}) denotes the set of indices of the nonzero entries of x\mathbf{x}. The master sends worker ii the chunks indexed by supp⁡(bi)\operatorname{supp}(\mathbf{b}_i) with the coefficients bi,jb_{i,j}. At each iteration tt it broadcasts βt\boldsymbol{\beta}_t, and worker ii returns the encoded message

g^i:=∑j∈supp⁡(bi)bi,jgj=big‾,g‾=[g0T,…,gk−1T]T.\widehat{\mathbf{g}}_i:=\sum_{j\in\operatorname{supp}(\mathbf{b}_i)}b_{i,j}\mathbf{g}_j=\mathbf{b}_i\overline{\mathbf{g}},\qquad\overline{\mathbf{g}}=[\mathbf{g}_0^{\mathsf{T}},\ldots,\mathbf{g}_{k-1}^{\mathsf{T}}]^{\mathsf{T}}.

Once any set II with ∣I∣≥n−s|I|\ge n-s has responded, the master recovers

∑i∈IaI(i)g^i=aIBg‾=11×kg‾=∑j=0k−1gj=g,(5)\sum_{i\in I}a_I(i)\widehat{\mathbf{g}}_i=\mathbf{a}_I\mathbf{B}\overline{\mathbf{g}}=\mathbf{1}_{1\times k}\overline{\mathbf{g}}=\sum_{j=0}^{k-1}\mathbf{g}_j=\mathbf{g}, \tag*{(5)}

and performs the update (2).

The condition aIB=11×k\mathbf{a}_I\mathbf{B}=\mathbf{1}_{1\times k} is central to gradient coding. In [38], this condition is characterized by the B\mathbf{B}-span condition, which we recall in the following definition.

Definition II.1 ([38 Condition 1]). A matrix B∈Rn×k\mathbf{B}\in\mathbb{R}^{n\times k} satisfies the B\mathbf{B}-span condition for ss stragglers if

11×k∈span⁡{bi∣i∈I},∀I⊆[n], ∣I∣=n−s.\mathbf{1}_{1\times k}\in\operatorname{span}\{\mathbf{b}_i\mid i\in I\},\qquad\forall I\subseteq[n],\ |I|=n-s.

Remark II.2. In the literature, the B\mathbf{B}-span condition is satisfied by several schemes: fractional repetition codes [38], generalized fractional repetition codes [9], cyclic MDS codes [32], and Reed–Solomon codes [13]. These schemes encode the partial gradients and recover the gradient exactly.

Binary gradient coding

We now recall the binary gradient coding schemes of [38, 9], in which the encoding matrix is required to satisfy B∈{0,1}n×k\mathbf{B}\in\{0,1\}^{n\times k} and, for every I⊆[n]I\subseteq[n] with ∣I∣=n−s|I|=n-s, the decoding vector is required to lie in {0,1}1×n\{0,1\}^{1\times n} with supp⁡(aI)⊆I\operatorname{supp}(\mathbf{a}_I)\subseteq I. Restricting both to {0,1}\{0,1\} removes scalar multiplications from the protocol entirely. Each worker sums the partial gradients it has been assigned,

g^i=big‾=∑j∈supp⁡(bi)gj,\widehat{\mathbf{g}}_i=\mathbf{b}_i\overline{\mathbf{g}}=\sum_{j\in\operatorname{supp}(\mathbf{b}_i)}\mathbf{g}_j,

and the master sums a subset of the received messages, g=∑i∈supp⁡(aI)g^i\mathbf{g}=\sum_{i\in\operatorname{supp}(\mathbf{a}_I)}\widehat{\mathbf{g}}_i, with no linear system to solve online, avoiding the error amplification of large decoding coefficients. The identity aIB=11×k\mathbf{a}_I\mathbf{B}=\mathbf{1}_{1\times k} is understood over R\mathbb{R}, so binary refers to the 0/10/1 entries of B\mathbf{B} and aI\mathbf{a}_I, not to arithmetic modulo 2.

A binary matrix satisfying the B\mathbf{B}-span condition (Definition II.1) need not admit binary decoding vectors, since that condition only places 11×k\mathbf{1}_{1\times k} in the real span of {bi∣i∈I}\{\mathbf{b}_i\mid i\in I\}. The following sufficient condition, due to Charalambides et al. [9], guarantees binary decoding by exhibiting the decoding vector explicitly. For K⊆[n]K\subseteq[n], we write 1K∈{0,1}1×n\mathbf{1}_K\in\{0,1\}^{1\times n} for the indicator row vector of KK.

Proposition II.3 ([9 Prop. 3, Cor. 4]). Let B∈{0,1}n×k\mathbf{B}\in\{0,1\}^{n\times k} and suppose that [n][n] admits a partition into s+1s+1 nonempty classes K0,…,KsK_0,\ldots,K_s such that

∑i∈Kjbi=11×k,j=0,…,s.(6)\sum_{i\in K_j}\mathbf{b}_i=\mathbf{1}_{1\times k},\qquad j=0,\ldots,s. \tag*{(6)}

Then, for every I⊆[n]I\subseteq[n] with ∣I∣=n−s|I|=n-s, there exists jj with Kj⊆IK_j\subseteq I, and aI:=1Kj\mathbf{a}_I:=\mathbf{1}_{K_j} satisfies aIB=11×k\mathbf{a}_I\mathbf{B}=\mathbf{1}_{1\times k}.

We now recall the encoding of the fractional repetition code (FRC) of Tandon et al. [38], a binary scheme in which each worker receives a fraction of the data, repeated across the s+1s+1 classes. Assume (s+1)∣n(s+1)\mid n and k=nk=n, and write ℓ:=ns+1\ell:=\frac{n}{s+1}. A single class is encoded by the block matrix

Bblock=Iℓ⊗11×(s+1)∈{0,1}ℓ×n,(7)\mathbf{B}_{\mathrm{block}}=\mathbf{I}_{\ell}\otimes\mathbf{1}_{1\times(s+1)}\in\{0,1\}^{\ell\times n}, \tag*{(7)}

whose rows have disjoint supports of size $s+1 covering [n][n]. Stacking s+1s+1 copies gives

BFRC=[Bblock⋮Bblock]=1(s+1)×1⊗Bblock∈{0,1}n×n,(8)\mathbf{B}_{\mathrm{FRC}}= \begin{bmatrix} \mathbf{B}_{\mathrm{block}}\\ \vdots\\ \mathbf{B}_{\mathrm{block}} \end{bmatrix} =\mathbf{1}_{(s+1)\times1}\otimes\mathbf{B}_{\mathrm{block}}\in\{0,1\}^{n\times n}, \tag*{(8)}

whose classes are the consecutive blocks of ℓ\ell rows. Each such class is a copy of Bblock\mathbf{B}_{\mathrm{block}} and therefore satisfies (6), so Proposition II.3 applies and BFRC\mathbf{B}_{\mathrm{FRC}} tolerates ss stragglers. Renumbering the worker qq of the class jj as q(s+1)+jq(s+1)+j yields the permutation-equivalent encoding

BFRC′=Iℓ⊗1(s+1)×(s+1)∈{0,1}n×n,(9)\mathbf{B}'_{\mathrm{FRC}}=\mathbf{I}_{\ell}\otimes\mathbf{1}_{(s+1)\times(s+1)}\in\{0,1\}^{n\times n}, \tag*{(9)}

which is block diagonal with ℓ\ell all-ones blocks of size (s+1)×(s+1)(s+1)\times(s+1), and in which the classes are the congruence classes Kj={i∈[n]∣i≡j(mods+1)}K_j=\{i\in[n]\mid i\equiv j\pmod{s+1}\}, each selecting one row from every diagonal block.

Binary Cyclic Gradient Coding

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 [38] and of its generalization GFRC [9]. Its supports are those of the cyclic repetition scheme of [38], 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 s+1s+1 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 (s+1)∣n(s+1)\mid n and near-circulant otherwise, and for this choice we characterize exactly the binary recovering sets.

Following [38, 9], we set k=nk=n and index both the workers and the data chunks by [n][n], so that the partial gradients are g0,…,gn−1\mathbf{g}_0,\ldots,\mathbf{g}_{n-1} and g=∑j∈[n]gj\mathbf{g}=\sum_{j\in[n]}\mathbf{g}_j. We write the Euclidean division of nn by s+1s+1 as

n=ℓ(s+1)+r,ℓ=⌊ns+1⌋≥1,0≤r≤s.n=\ell(s+1)+r,\qquad\ell=\left\lfloor\frac{n}{s+1}\right\rfloor\ge1,\qquad0\le r\le s.

The divisible case is r=0r=0, that is (s+1)∣n(s+1)\mid n, and the non-divisible case is 1≤r≤s1\le r\le s. The case s=0s=0 is trivial, with B=In\mathbf{B}=\mathbf{I}_n.

The encoding scheme

As in [9], we partition the workers according to their indices modulo s+1s+1. For j∈{0,…,s}j\in\{0,\ldots,s\}, the congruence class of jj is

Kj:={i∈[n]∣i≡j(mods+1)}.K_j:=\{i\in[n]\mid i\equiv j\pmod{s+1}\}.

We prove in Theorem III.6 that these classes are precisely the binary recovering sets of BCGC. Their sizes come in two values, as follows.

Lemma III.1 (Class sizes [9 eq. (12)]). For j=0,…,sj=0,\ldots,s,

Kj={j+q(s+1)∣0≤q≤∣Kj∣−1},K_j=\{j+q(s+1)\mid0\le q\le|K_j|-1\},

with

∣Kj∣=ℓ+1if 0≤j<r,∣Kj∣=ℓif r≤j≤s.|K_j|=\ell+1\quad\text{if }0\le j<r,\qquad|K_j|=\ell\quad\text{if }r\le j\le s.

When r=0r=0, all classes have size ℓ\ell. Moreover, [n]=K0∪˙⋯∪˙Ks[n]=K_0\mathbin{\dot\cup}\cdots\mathbin{\dot\cup}K_s.

Proof. 1) Size of KjK_j. An element i∈[n]i\in[n] lies in KjK_j exactly when i=j+q(s+1)i=j+q(s+1) with 0≤q≤(n−1−j)/(s+1)0\le q\le(n-1-j)/(s+1), so

∣Kj∣=⌊n−1−js+1⌋+1.|K_j|=\left\lfloor\frac{n-1-j}{s+1}\right\rfloor+1.

Writing n−1−j=(ℓ−1)(s+1)+(r+s−j)n-1-j=(\ell-1)(s+1)+(r+s-j) gives

⌊n−1−js+1⌋=ℓ−1+⌊r+s−js+1⌋.\left\lfloor\frac{n-1-j}{s+1}\right\rfloor=\ell-1+\left\lfloor\frac{r+s-j}{s+1}\right\rfloor.

If 0≤j<r0\le j<r, then s+1≤r+s−j<2(s+1)s+1\le r+s-j<2(s+1), so the last floor equals 1 and ∣Kj∣=ℓ+1|K_j|=\ell+1. If r≤j≤sr\le j\le s, then 0≤r+s−j<s+10\le r+s-j<s+1, so the last floor equals 0 and ∣Kj∣=ℓ|K_j|=\ell.

  1. Partition. The classes are pairwise disjoint, since 0,…,s0,\ldots,s are distinct modulo s+1s+1, and their sizes add up to

r(ℓ+1)+(s+1−r)ℓ=n,r(\ell+1)+(s+1-r)\ell=n,

so [n]=K0∪˙⋯∪˙Ks[n]=K_0\mathbin{\dot\cup}\cdots\mathbin{\dot\cup}K_s.

In the divisible case the classes are, moreover, cyclic shifts of one another, which underlies the circulant structure of B\mathbf{B} and the shift relation between the partitions used later.

Proposition III.2. If r=0r=0, then Kj+1=Kj+1K_{j+1}=K_j+1 for j=0,…,s−1j=0,\ldots,s-1, where Kj+1:={(x+1) mod n∣x∈Kj}K_j+1:=\{(x+1)\bmod n\mid x\in K_j\}.

Proof. Identify [n][n] with Zn\mathbb{Z}_n. Since r=0r=0, the set H:=⟨s+1⟩H:=\langle s+1\rangle is a subgroup of Zn\mathbb{Z}_n of order ℓ\ell, and Kj=j+HK_j=j+H for every jj. Therefore Kj+1=(j+1)+H=Kj+1K_j+1=(j+1)+H=K_{j+1}.

We now define the cyclic support SiS_i of worker ii, that is, the set of indices of the data chunks assigned to it. Within each class, the first workers receive a full cyclic support of size s+1s+1, and the last worker receives the remaining indices.

Definition III.3 (Cyclic support). Let j∈{0,…,s}j\in\{0,\ldots,s\}, mj:=∣Kj∣m_j:=|K_j|, and let iq=j+q(s+1)i_q=j+q(s+1), 0≤q≤mj−10\le q\le m_j-1, be the workers of KjK_j. The cyclic support of worker iqi_q is

Siq:={(iq+t) mod n∣0≤t≤Liq−1},S_{i_q}:=\{(i_q+t)\bmod n\mid0\le t\le L_{i_q}-1\},

where

Liq:={s+1,0≤q≤mj−2,n−(mj−1)(s+1),q=mj−1.L_{i_q}:= \begin{cases} s+1, & 0\le q\le m_j-2,\\ n-(m_j-1)(s+1), & q=m_j-1. \end{cases}

Thus every worker receives s+1s+1 consecutive indices, except the last worker of each class. When r=0r=0, every Liq=s+1L_{i_q}=s+1.

We take as rows of B\mathbf{B} the indicator vectors bi:=1Si∈{0,1}1×n\mathbf{b}_i:=\mathbf{1}_{S_i}\in\{0,1\}^{1\times n}. Since Li≤s+1+r≤nL_i\le s+1+r\le n, the elements (i+t) mod n(i+t)\bmod n, 0≤t≤Li−10\le t\le L_i-1, are pairwise distinct, ∣Si∣=Li|S_i|=L_i, and

bi,l=1⟺l∈Si⟺(l−i) mod n≤Li−1.(10)b_{i,l}=1\Longleftrightarrow l\in S_i\Longleftrightarrow(l-i)\bmod n\le L_i-1. \tag*{(10)}

The last worker of KjK_j is n−r+jn-r+j if j<rj<r and n−s−1−r+jn-s-1-r+j if j≥rj\ge r, so the sizes of the cyclic supports are

Li={s+1,0≤i≤n−s−2,s+1+r,n−s−1≤i≤n−r−1,r,n−r≤i≤n−1.(11)L_i= \begin{cases} s+1, & 0\le i\le n-s-2,\\ s+1+r, & n-s-1\le i\le n-r-1,\\ r, & n-r\le i\le n-1. \end{cases} \tag*{(11)}

When r=0r=0, all Li=s+1L_i=s+1 and B\mathbf{B} is the circulant matrix

B=Circ⁡(11×(s+1),01×(n−s−1))∈{0,1}n×n,(12)\mathbf{B}=\operatorname{Circ}(\mathbf{1}_{1\times(s+1)},\mathbf{0}_{1\times(n-s-1)})\in\{0,1\}^{n\times n}, \tag*{(12)}

where Circ⁡(c)\operatorname{Circ}(\mathbf{c}) denotes the circulant matrix whose row ii is the right cyclic shift of c\mathbf{c} by ii positions, so that bi\mathbf{b}_i is the cyclic shift of b0=1S0\mathbf{b}_0=\mathbf{1}_{S_0} by ii positions. When 1≤r≤s1\le r\le s, the lengths LiL_i are no longer constant and B\mathbf{B} splits into two horizontal blocks,

B=(B1B2)∈{0,1}n×n,(13)\mathbf{B}= \begin{pmatrix} \mathbf{B}_1\\ \mathbf{B}_2 \end{pmatrix} \in\{0,1\}^{n\times n}, \tag*{(13)}

where B1∈{0,1}(n−s−1)×n\mathbf{B}_1\in\{0,1\}^{(n-s-1)\times n} collects the rows bi\mathbf{b}_i with 0≤i≤n−s−20\le i\le n-s-2, which are the first n−s−1n-s-1 rows of the circulant matrix generated by b0\mathbf{b}_0, and B2∈{0,1}(s+1)×n\mathbf{B}_2\in\{0,1\}^{(s+1)\times n} collects the rows of the last workers of the s+1s+1 classes, of weight s+1+rs+1+r or rr. We then call B\mathbf{B} near-circulant, since it differs from Circ⁡(b0)\operatorname{Circ}(\mathbf{b}_0) only in these s+1s+1 rows, one for each class. Example III.7 displays B\mathbf{B} for n=6n=6, s=2s=2 (divisible), and Example III.8 for n=11n=11, s=2s=2 (non-divisible).

The following result is the basis of our construction: for each class KjK_j, the supports SiS_i, i∈Kji\in K_j, partition [n][n].

Proposition III.4. For every j∈{0,…,s}j\in\{0,\ldots,s\}, the family {Si∣i∈Kj}\{S_i\mid i\in K_j\} is a partition of [n][n], i.e., ∑i∈Kjbi=11×n\sum_{i\in K_j}\mathbf{b}_i=\mathbf{1}_{1\times n}.

Proof. By Definition III.3, each SiqS_{i_q} is the cyclic interval of length LiqL_{i_q} starting at iqi_q.

  1. Consecutive intervals. The starting points satisfy

iq+Liq=iq+1(0≤q≤mj−2),imj−1+Limj−1=j+n≡i0(modn).i_q+L_{i_q}=i_{q+1}\quad(0\le q\le m_j-2),\qquad i_{m_j-1}+L_{i_{m_j-1}}=j+n\equiv i_0\pmod n.

Hence each interval begins where the previous one ends, and Si0,…,Simj−1S_{i_0},\ldots,S_{i_{m_j-1}} wrap once around [n][n].

  1. Cover. Their lengths sum to nn, so they cover [n][n] exactly once, that is, {Si}i∈Kj\{S_i\}_{i\in K_j} partitions [n][n]. Since the bi\mathbf b_i are binary, this is equivalent to

∑i∈Kjbi=11×n.\sum_{i\in K_j}\mathbf b_i=\mathbf1_{1\times n}.

We next turn to the storage cost of the scheme and show that it is the least possible: each chunk is replicated on exactly s+1s+1 workers, the minimum needed to tolerate ss stragglers.

Proposition III.5. Let B\mathbf B be the encoding matrix of the BCGC scheme. Then every column of B\mathbf B has weight s+1s+1, and the number of nonzero entries nnzr⁡(B)=n(s+1)\operatorname{nnzr}(\mathbf B)=n(s+1) is the minimal total load for a scheme tolerating ss stragglers. Moreover, when r=0r=0, every row also has weight s+1s+1.

Proof. 1) Column weights. By Proposition III.4, the supports of each class partition [n][n], so each chunk lies in exactly one support of each of the s+1s+1 classes. Hence every column of B\mathbf B has weight s+1s+1, and

nnzr⁡(B)=n(s+1).\operatorname{nnzr}(\mathbf B)=n(s+1).
  1. Minimality. To tolerate ss stragglers, each chunk must be stored on at least s+1s+1 workers, so nnzr⁡(B)≥n(s+1)\operatorname{nnzr}(\mathbf B)\ge n(s+1) for every such scheme. Thus n(s+1)n(s+1) is the minimal total load.

  1. Row weights when r=0r=0. Here (11) gives Li=s+1L_i=s+1 for every ii, so every row of B\mathbf B also has weight s+1s+1.

The following theorem shows that the full gradient is recovered by summing the responses of a set of workers if and only if that set is a single class KjK_j. This is a restriction compared with FRC and GFRC [38, 9], where workers of different classes may also be combined, so that those schemes have more binary recovering sets.

Theorem III.6. Let B\mathbf B have rows bi=1Si\mathbf b_i=\mathbf1_{S_i} as above, with Li=∣Si∣L_i=|S_i| given by (11).

  1. For every R⊆[n]R\subseteq[n], the sum being taken over R\mathbb R,

∑i∈Rbi=11×n⟺{Si}i∈R is a partition of [n]\sum_{i\in R}\mathbf b_i=\mathbf1_{1\times n}\Longleftrightarrow\{S_i\}_{i\in R}\text{ is a partition of }[n]
⟺R=Kj for some j.\Longleftrightarrow R=K_j\text{ for some }j.
  1. If I⊆[n]I\subseteq[n] with ∣I∣≥n−s|I|\ge n-s, then Kj∗⊆IK_{j^*}\subseteq I for some j∗∈{0,…,s}j^*\in\{0,\ldots,s\}, and, with aI=1Kj∗\mathbf a_I=\mathbf1_{K_{j^*}},

aIB=11×n,∑i∈Kj∗∑l∈Sigl=g.\mathbf a_I\mathbf B=\mathbf1_{1\times n},\qquad\sum_{i\in K_{j^*}}\sum_{l\in S_i}g_l=g.

The scheme tolerates any ss stragglers, and its recovery threshold equals n−sn-s.

Proof. Throughout, indices are taken modulo nn and [n][n] is identified with Zn\mathbb Z_n. For R⊆[n]R\subseteq[n] and l∈[n]l\in[n], let

nR(l):=∣{i∈R∣l∈Si}∣,n_R(l):=\lvert\{i\in R\mid l\in S_i\}\rvert,

the ll-th coordinate of ∑i∈Rbi\sum_{i\in R}\mathbf b_i. Then

∑i∈Rbi=11×n⟺nR(l)=1 for all l⟺{Si}i∈R partitions [n],\sum_{i\in R}\mathbf b_i=\mathbf1_{1\times n}\Longleftrightarrow n_R(l)=1\text{ for all }l\Longleftrightarrow\{S_i\}_{i\in R}\text{ partitions }[n],

which is the first equivalence in part (1).

Part (1): {Si}i∈R\{S_i\}_{i\in R} partitions [n][n] if and only if R=KjR=K_j for some jj.

  1. If R=KjR=K_j, this holds by Proposition III.4.

  1. Conversely, assume nR(l)=1n_R(l)=1 for all ll and fix a∈Ra\in R. We consider two cases.

Case La=nL_a=n. Then Sa=[n]S_a=[n], so R={a}R=\{a\}. Moreover La=nL_a=n forces ℓ=1\ell=1 with aa the unique worker of its class, so RR is a class.

Case La<nL_a<n. Then a+La∉Saa+L_a\notin S_a, so the unique i∈Ri\in R with a+La∈Sia+L_a\in S_i satisfies i≠ai\ne a. If i≠a+Lai\ne a+L_a, then a+La=i+ta+L_a=i+t with 1≤t≤Li−11\le t\le L_i-1, hence a+La−1∈Si∩Saa+L_a-1\in S_i\cap S_a and nR(a+La−1)≥2n_R(a+L_a-1)\ge2, contradicting nR=1n_R=1. Therefore i=a+Lai=a+L_a, which proves

a∈R⟹a+La∈R.(14)a\in R\Longrightarrow a+L_a\in R. \tag*{(14)}

Let Kj∗={i0,…,imj∗−1}K_{j^*}=\{i_0,\ldots,i_{m_{j^*}-1}\} be the class of aa. Since

iq+Liq=iq+1(q≤mj∗−2),imj∗−1+Limj∗−1≡i0(modn)i_q+L_{i_q}=i_{q+1}\quad(q\le m_{j^*}-2),\qquad i_{m_{j^*}-1}+L_{i_{m_{j^*}-1}}\equiv i_0\pmod n

iterating (14) from aa yields Kj∗⊆RK_{j^*}\subseteq R. The supports of Kj∗K_{j^*} already partition [n][n], so any element of R∖Kj∗R\setminus K_{j^*} would cover some index twice. Hence R=Kj∗R=K_{j^*}.

Part (2): straggler tolerance and threshold.

  1. Recovery from n−sn-s responses. Let T=[n]∖IT=[n]\setminus I, so ∣T∣≤s|T|\le s. The s+1s+1 classes are disjoint, so TT meets at most ss of them, and by the pigeonhole principle Kj∗⊆IK_{j^*}\subseteq I for some j∗j^*. By part (1),

∑i∈Kj∗∑l∈Sigl=∑l∈[n]gl=g.\sum_{i\in K_{j^*}}\sum_{l\in S_i}g_l=\sum_{l\in[n]}g_l=g.
  1. Optimality of the threshold. The threshold cannot be lowered, even by real-valued or nonlinear decoding. By Proposition III.5, each chunk ll belongs to exactly s+1s+1 supports. If these s+1s+1 workers straggle, the n−s−1n-s-1 received messages do not depend on glg_l, so gg cannot be recovered. Hence the recovery threshold equals n−sn-s.

Decoding. Since B\mathbf 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 those received from each class, and stops as soon as one class is complete.

Algorithm 1 Decoding by complete class

  1. Input parameters nn, ss with n=ℓ(s+1)+rn=\ell(s+1)+r, and the messages g^i1,g^i2,…\hat{\mathbf{g}}_{i_1},\hat{\mathbf{g}}_{i_2},\ldots of the responding workers, in their order of arrival

  2. Output a complete class Kj∗K_{j_*}, used to recover g=∑i∈Kj∗g^i\mathbf{g}=\sum_{i\in K_{j_*}}\hat{\mathbf{g}}_i

  3. cj←0c_j\leftarrow0, and mj←ℓ+1m_j\leftarrow\ell+1 if j<rj<r, mj←ℓm_j\leftarrow\ell otherwise, for j=0,…,sj=0,\ldots,s ▹mj=∣Kj∣\triangleright m_j=|K_j|

  4. for t=1t=1 to n−sn-s do

  5. j←it mod (s+1)j\leftarrow i_t\bmod(s+1); cj←cj+1c_j\leftarrow c_j+1 ▹\triangleright the class of worker iti_t

  6. if cj=mjc_j=m_j then

  7. return Kj={j+q(s+1)∣q=0,…,mj−1}K_j=\{j+q(s+1)\mid q=0,\ldots,m_j-1\}

  8. end if

  9. end for

Correctness and complexity. The workers iti_t are distinct and ∣Kj∣=mj|K_j|=m_j, so cj=mjc_j=m_j exactly when all workers of KjK_j have responded, and line 7 returns the first class to complete. After n−sn-s responses, at most ss workers are missing, meeting at most ss of the s+1s+1 disjoint classes, so some class is complete and the loop always returns (Theorem III.6(2)), with ∑i∈Kj∗g^i=g\sum_{i\in K_{j_*}}\hat{\mathbf{g}}_i=\mathbf{g} by Theorem III.6(1). Each response costs O(1)O(1), and the final sum of mj∗≤ℓ+1m_{j_*}\le\ell+1 messages of dimension dd costs O((ℓ+1)d)O((\ell+1)d), with no decoding matrix stored. This decoder is used in the experiments of Section V.

Example III.7 (Divisible case, n=6n=6, s=2s=2). Here ℓ=2\ell=2, r=0r=0, K0={0,3}K_0=\{0,3\}, K1={1,4}K_1=\{1,4\}, K2={2,5}K_2=\{2,5\}, and Si={i,i+1,i+2}(mod6)S_i=\{i,i+1,i+2\}\pmod6. Then

B=Circ⁡(1,1,1,0,0,0)=(111000011100001110000111100011110001),\mathbf{B}=\operatorname{Circ}(1,1,1,0,0,0)= \begin{pmatrix} 1&1&1&0&0&0\\ 0&1&1&1&0&0\\ 0&0&1&1&1&0\\ 0&0&0&1&1&1\\ 1&0&0&0&1&1\\ 1&1&0&0&0&1 \end{pmatrix},

and each class covers [6][6] exactly once, b0+b3=b1+b4=b2+b5=11×6\mathbf{b}_0+\mathbf{b}_3=\mathbf{b}_1+\mathbf{b}_4=\mathbf{b}_2+\mathbf{b}_5=\mathbf{1}_{1\times6}, yielding the three distinct data partitions {{0,1,2},{3,4,5}}\{\{0,1,2\},\{3,4,5\}\}, {{1,2,3},{4,5,0}}\{\{1,2,3\},\{4,5,0\}\} and {{2,3,4},{5,0,1}}\{\{2,3,4\},\{5,0,1\}\}. If workers 0 and 1 straggle, the class K2={2,5}K_2=\{2,5\} is complete and the master recovers (g2+g3+g4)+(g5+g0+g1)=g(\mathbf{g}_2+\mathbf{g}_3+\mathbf{g}_4)+(\mathbf{g}_5+\mathbf{g}_0+\mathbf{g}_1)=\mathbf{g}; if instead workers 1 and 2 straggle, the complete class is K0={0,3}K_0=\{0,3\}, giving (g0+g1+g2)+(g3+g4+g5)=g(\mathbf{g}_0+\mathbf{g}_1+\mathbf{g}_2)+(\mathbf{g}_3+\mathbf{g}_4+\mathbf{g}_5)=\mathbf{g}.

Example III.8 (Non-divisible case, n=11n=11, s=2s=2). Here ℓ=3\ell=3, r=2r=2, and K0={0,3,6,9}K_0=\{0,3,6,9\}, K1={1,4,7,10}K_1=\{1,4,7,10\}, K2={2,5,8}K_2=\{2,5,8\}. The first workers of each class receive s+1=3s+1=3 consecutive indices and the last receives the remaining ones; for K2K_2, the supports are S2={2,3,4}S_2=\{2,3,4\}, S5={5,6,7}S_5=\{5,6,7\} and S8={8,9,10,0,1}S_8=\{8,9,10,0,1\}. Hence

B=(1110000000001110000000001110000000001110000000001110000000001110000000001110000000001110110000001110000000001110000000001),\mathbf{B}= \begin{pmatrix} 1&1&1&0&0&0&0&0&0&0&0\\ 0&1&1&1&0&0&0&0&0&0&0\\ 0&0&1&1&1&0&0&0&0&0&0\\ 0&0&0&1&1&1&0&0&0&0&0\\ 0&0&0&0&1&1&1&0&0&0&0\\ 0&0&0&0&0&1&1&1&0&0&0\\ 0&0&0&0&0&0&1&1&1&0&0\\ 0&0&0&0&0&0&0&1&1&1&0\\ 1&1&0&0&0&0&0&0&1&1&1\\ 0&0&0&0&0&0&0&0&0&1&1\\ 1&0&0&0&0&0&0&0&0&0&1 \end{pmatrix},

whose first n−s−1=8n-s-1=8 rows are consecutive cyclic shifts of b0=1{0,1,2}\mathbf{b}_0=\mathbf{1}_{\{0,1,2\}} and form the block B1\mathbf{B}_1, while the last three rows, the block B2\mathbf{B}_2 of the workers 8, 9, 10, have weights 5, 2 and 2. Every column has weight 3, and the rows of each class sum to 11×11\mathbf{1}_{1\times11}; for instance b2+b5+b8=11×11\mathbf{b}_2+\mathbf{b}_5+\mathbf{b}_8=\mathbf{1}_{1\times11}. If workers 0 and 1 straggle, the class K2={2,5,8}K_2=\{2,5,8\} is complete and the master recovers g=(g2+g3+g4)+(g5+g6+g7)+(g8+g9+g10+g0+g1)\mathbf{g}=(\mathbf{g}_2+\mathbf{g}_3+\mathbf{g}_4)+(\mathbf{g}_5+\mathbf{g}_6+\mathbf{g}_7)+(\mathbf{g}_8+\mathbf{g}_9+\mathbf{g}_{10}+\mathbf{g}_0+\mathbf{g}_1). The threshold n−s=9n-s=9 cannot be lowered: if workers 0, 1 and 2 straggle, chunk 2 is held only by them, so no decoder, even real-valued or nonlinear, recovers g\mathbf{g}.

Remark III.9. By Theorem III.6(1), binary recovery in BCGC requires all the workers of a single class. In BFRC=Iℓ⊗1(s+1)×(s+1)\mathbf{B}_{\mathrm{FRC}}=\mathbf{I}_\ell\otimes\mathbf{1}_{(s+1)\times(s+1)}, by contrast, the workers of each diagonal block share the same support, so one worker per block suffices, even from incomplete classes. Thus FRC has (s+1)ℓ(s+1)^\ell binary recovering sets, against s+1s+1 for BCGC, and decodes from more straggler patterns; in return, the s+1s+1 classes of BCGC induce s+1s+1 distinct data partitions, whereas all the recovering sets of FRC induce the same one and hence return the same compressed update (Proposition IV.10).

Algebraic structure and comparison with FRC and GFRC

We describe the code CB⊆Rn\mathcal{C}_{\mathbf{B}}\subseteq\mathbb{R}^n spanned by the rows of B\mathbf{B} over R\mathbb{R}, the field in which decoding takes place, and compare B\mathbf{B} with the encoding matrices of FRC [38] and GFRC [9]. We identify c=(c0,…,cn−1)∈Rn\mathbf{c}=(c_0,\ldots,c_{n-1})\in\mathbb{R}^n with the polynomial c(x)=∑jcjxjc(x)=\sum_j c_jx^j in R[x]/(xn−1)\mathbb{R}[x]/(x^n-1), and write ϵi:=1{i}\epsilon_i:=\mathbf{1}_{\{i\}}. Two matrices are permutation-equivalent if one is obtained from the other by permuting rows and columns; such permutations preserve the rank, so matrices of different ranks are not permutation-equivalent.

We first determine the dimension of CB\mathcal{C}_{\mathbf{B}}, its cyclic structure in the divisible case, and whether it is MDS; the rank will then separate B\mathbf{B} from the FRC and GFRC matrices.

Proposition III.10. We have dim⁡CB=rank⁡B=n−s\dim\mathcal{C}_{\mathbf{B}}=\operatorname{rank}\mathbf{B}=n-s and 11×n∈CB\mathbf{1}_{1\times n}\in\mathcal{C}_{\mathbf{B}}. When r=0r=0, CB\mathcal{C}_{\mathbf{B}} is the cyclic code with generator polynomial b0(x)=1+x+⋯+xsb_0(x)=1+x+\cdots+x^s. Moreover, CB\mathcal{C}_{\mathbf{B}} is not MDS, except when r=0r=0 and s∈{0,1,n−1}s\in\{0,1,n-1\}.

Proof. First we start by computing the rank of B\mathbf{B}. For 0≤i≤n−s−20\le i\le n-s-2, (11) gives Li=s+1L_i=s+1, so bi=1{i,…,i+s}\mathbf{b}_i=\mathbf{1}_{\{i,\ldots,i+s\}} with i+s≤n−2i+s\le n-2. These n−s−1n-s-1 rows are in echelon form, hence linearly independent, and each has last coordinate 0. By Proposition III.4,

11×n=∑i∈K0bi∈CB,\mathbf{1}_{1 \times n}=\sum_{i\in K_0}\mathbf{b}_i\in C_B,

and its last coordinate is 1, so adjoining it to the n−s−1n-s-1 rows gives n−sn-s independent vectors and rank⁡B≥n−s\operatorname{rank} B\ge n-s. For the reverse bound, set

vj:=1K0−1Kj,j=1,…,s.\mathbf{v}_j:=\mathbf{1}_{K_0}-\mathbf{1}_{K_j},\qquad j=1,\ldots,s.

By Proposition III.4, vjB=0\mathbf{v}_jB=0, and the vj\mathbf{v}_j are independent because the classes are disjoint and nonempty. Thus the left kernel of BB has dimension at least ss, so rank⁡B≤n−s\operatorname{rank} B\le n-s. The two bounds give rank⁡B=n−s\operatorname{rank} B=n-s.

Next we prove that the code CBC_B is cyclic when r=0r=0. Each row bi\mathbf{b}_i is the cyclic shift of b0\mathbf{b}_0 by ii positions, so bi(x)=xib0(x)\mathbf{b}_i(x)=x^i b_0(x) in R[x]/(xn−1)\mathbb{R}[x]/(x^n-1), and CBC_B is the cyclic code generated by b0(x)b_0(x). From

xn−1=(x−1)b0(x)∑l=0ℓ−1xl(s+1),x^n-1=(x-1)b_0(x)\sum_{l=0}^{\ell-1}x^{l(s+1)},

b0(x)b_0(x) is a monic divisor of xn−1x^n-1, hence its generator polynomial, and dim⁡CB=n−deg⁡b0=n−s\dim C_B=n-\deg b_0=n-s. Finally we prove that CBC_B is not MDS. By the Singleton bound, dmin⁡(CB)≤n−dim⁡CB+1=s+1d_{\min}(C_B)\le n-\dim C_B+1=s+1, with equality if and only if CBC_B is MDS. It suffices to exhibit a codeword of weight less than s+1s+1:

  • if r=1r=1, then Ln−1=1L_{n-1}=1, so bn−1=en−1\mathbf{b}_{n-1}=\mathbf{e}_{n-1} has weight 1;

  • if r≥2r\ge2 (so s≥2s\ge2 and n−s−1≥2n-s-1\ge2), or if r=0r=0 and 2≤s≤n−22\le s\le n-2, then b0−b1=e0−es+1\mathbf{b}_0-\mathbf{b}_1=\mathbf{e}_0-\mathbf{e}_{s+1} has weight 2<s+12<s+1.

In the remaining cases r=0r=0 and s∈{0,1,n−1}s\in\{0,1,n-1\}, the code is the trivial [n,n,1][n,n,1] code (s=0s=0), the [n,n−1,2][n,n-1,2] code (s=1s=1), or the [n,1,n][n,1,n] repetition code (s=n−1s=n-1), all of which are MDS.

We now recall the encoding of GFRC [9], which extends FRC to the non-divisible case. It uses one partition of [n][n] for the rr classes of size ℓ+1\ell+1 and another for the s+1−rs+1-r classes of size ℓ\ell.

Definition III.11 (GFRC encoding matrix). Write n=λ(ℓ+1)+r~n=\lambda(\ell+1)+\tilde r with 0≤r~≤ℓ0\le\tilde r\le\ell, and n=μℓ+un=\mu\ell+u with 0≤u≤ℓ−10\le u\le\ell-1. For j∈{0,…,s}j\in\{0,\ldots,s\} and iq=j+q(s+1)∈Kji_q=j+q(s+1)\in K_j, let

Liq′:={λ+1,j<r, q<r~,λ,j<r, q≥r~,μ+1,j≥r, q<u,μ,j≥r, q≥u,Siq′:={αiq′,…,αiq+Liq′−1′},L'_{i_q}:= \begin{cases} \lambda+1, & j<r,\ q<\tilde r,\\ \lambda, & j<r,\ q\ge\tilde r,\\ \mu+1, & j\ge r,\ q<u,\\ \mu, & j\ge r,\ q\ge u, \end{cases} \qquad S'_{i_q}:=\{\alpha'_{i_q},\ldots,\alpha'_{i_q+L'_{i_q}-1}\},

where αiq′:=∑l=0q−1Lil′\alpha'_{i_q}:=\sum_{l=0}^{q-1}L'_{i_l}, so that the first worker i0=ji_0=j of each class receives a support starting at chunk 0.

The lengths of each class sum to nn, so the supports Si′S'_i, i∈Kji\in K_j, are consecutive blocks partitioning [n][n], depending on jj only through the size of KjK_j. All classes of size ℓ+1\ell+1 thus use one partition G1G_1 of [n][n], and all classes of size ℓ\ell use another partition G2G_2. Unlike the cyclic supports SiS_i of BCGC, the supports Si′S'_i are not cyclic.

Comparing the ranks of the three encoding matrices now shows that BCGC is a genuinely new construction, not a relabelling of FRC or GFRC.

Comparing the ranks of the three encoding matrices now shows that BCGC is a genuinely new construction, not a relabelling of FRC or GFRC.

Theorem III.12 (Non-equivalence with FRC and GFRC). We have rank⁡B=n−s\operatorname{rank} B=n-s, whereas rank⁡BFRC′=ℓ\operatorname{rank} B'_{\mathrm{FRC}}=\ell when r=0r=0 and rank⁡BGFRC≤2ℓ\operatorname{rank} B_{\mathrm{GFRC}}\le2\ell when 1≤r≤s1\le r\le s. Consequently, BB is not permutation-equivalent to BFRC′B'_{\mathrm{FRC}} for 1≤s≤n−21\le s\le n-2, nor to BGFRCB_{\mathrm{GFRC}} when s≥2s\ge2 and n≠s+2n\ne s+2.

Proof. By Proposition III.10, rank⁡B=n−s\operatorname{rank} B=n-s. We compute the other two ranks and compare.

  1. FRC (r=0r=0). The matrix BFRC′=Iℓ⊗1(s+1)×(s+1)B'_{\mathrm{FRC}}=I_\ell\otimes\mathbf{1}_{(s+1)\times(s+1)} is block diagonal with ℓ\ell rank-1 blocks, so rank⁡BFRC′=ℓ\operatorname{rank} B'_{\mathrm{FRC}}=\ell. For 1≤s≤n−21\le s\le n-2 we have ℓ≥2\ell\ge2, hence

(n−s)−ℓ=s(ℓ−1)>0.(n-s)-\ell=s(\ell-1)>0.
  1. GFRC (1≤r≤s1\le r\le s). Definition III.11 gives bj+q(s+1)′=bq(s+1)′\mathbf{b}'_{j+q(s+1)}=\mathbf{b}'_{q(s+1)} for j<rj<r and bj+q(s+1)′=bs+q(s+1)′\mathbf{b}'_{j+q(s+1)}=\mathbf{b}'_{s+q(s+1)} for j≥rj\ge r. Hence the row space is V0+VsV_0+V_s, where

V0:=span⁡{bi′∣i∈K0},Vs:=span⁡{bi′∣i∈Ks}V_0:=\operatorname{span}\{\mathbf{b}'_i\mid i\in K_0\},\qquad V_s:=\operatorname{span}\{\mathbf{b}'_i\mid i\in K_s\}

have dimensions at most ℓ+1\ell+1 and ℓ\ell. Since 11×n∈V0∩Vs\mathbf{1}_{1\times n}\in V_0\cap V_s,

rank⁡BGFRC=dim⁡V0+dim⁡Vs−dim⁡(V0∩Vs)≤(ℓ+1)+ℓ−1=2ℓ.\operatorname{rank} B_{\mathrm{GFRC}}=\dim V_0+\dim V_s-\dim(V_0\cap V_s) \le(\ell+1)+\ell-1=2\ell.

Moreover (n−s)−2ℓ=(ℓ−1)(s−1)+(r−1)≥0(n-s)-2\ell=(\ell-1)(s-1)+(r-1)\ge0, and this is positive unless ℓ=r=1\ell=r=1, i.e. n=s+2n=s+2.

In every case covered by the statement the ranks differ, so the matrices are not permutation-equivalent. □\square

Beyond the rank, the two schemes also differ in how they spread the storage load across the workers. The next remark records the loads of BCGC in both the divisible and non-divisible cases, where it attains the same minimal total deviation as GFRC but over a wider range.

Remark III.13 (Load distribution). The storage load of BCGC depends on whether (s+1)∣n(s+1)\mid n. We measure its imbalance by the total deviation ds(B):=∑i∈[n]∣∥bi∥0−(s+1)∣d_s(B):=\sum_{i\in[n]}\lvert\lVert\mathbf{b}_i\rVert_0-(s+1)\rvert [9 Def. 6].

  1. Divisible case (r=0r=0). By (11) every row of BB has weight s+1s+1, so all workers carry the same load s+1s+1 and ds(B)=0d_s(B)=0.

  1. Non-divisible case (1≤r≤s1\le r\le s). The loads cannot all equal s+1s+1. By (11) only the last worker of each class deviates, with load rr or s+1+rs+1+r, so ds(B)=2r(s+1−r)=ds(BGFRC)d_s(B)=2r(s+1-r)=d_s(B_{\mathrm{GFRC}}) is minimal [9 Th. 11]. The loads of BB range over [r,s+1+r][r,s+1+r], wider than [⌊n/(ℓ+1)⌋,⌈n/ℓ⌉][\lfloor n/(\ell+1)\rfloor,\lceil n/\ell\rceil] for GFRC [9 Th. 8]. This is the price of the cyclic supports, which keep the maximum number of workers, n−s−1n-s-1, at load s+1s+1 and BB as close as possible to circular.

Compatibility with gradient compression

Without compression, every complete class returns g\mathbf{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, 36], with real-valued or robust-aggregation decoding.

Each worker ii sends C(g^i)C(\hat{\mathbf{g}}_i), where C:R1×d→R1×dC : \mathbb{R}^{1 \times d} \to\mathbb{R}^{1 \times d} denotes compression followed by decompression. Given a decoding vector aI\mathbf{a}_I with supp⁡(aI)⊆I\operatorname{supp}(\mathbf{a}_I) \subseteq I and aIB=11×n\mathbf{a}_I\mathbf{B}=\mathbf{1}_{1\times n}, the master forms

CIcod(g):=∑i∈IaI(i)C(g^i).(15)C_I^{\mathrm{cod}}(\mathbf{g}) := \sum_{i\in I} \mathbf{a}_I(i) C(\hat{\mathbf{g}}_i). \tag*{(15)}

Remark IV.1 (Linear compressors). If CC is linear, then CIcod(g)=C(aIBgˉ)=C(11×ngˉ)=C(g)C_I^{\mathrm{cod}}(\mathbf{g})=C(\mathbf{a}_I\mathbf{B}\bar{\mathbf{g}})=C(\mathbf{1}_{1\times n}\bar{\mathbf{g}})=C(\mathbf{g}), for every scheme and every decoding vector.

Most compressors used in practice are nonlinear, such as Top-κ\kappa sparsification [2, 27], quantization [1] and sign compression [17]. From now on, CC is deterministic and possibly nonlinear, and we write εi:=C(g^i)−g^i\boldsymbol{\varepsilon}_i:=C(\hat{\mathbf{g}}_i)-\hat{\mathbf{g}}_i for the compression error of worker ii.

We first bound the error of the decoded update by the decoding coefficients times the per-worker compression errors. This makes explicit why real-valued schemes with large coefficients are unstable under compression.

Proposition IV.2 (Error of the decoded update). Let aI\mathbf{a}_I be a decoding vector of an encoding matrix B\mathbf{B}. Then, for every compressor CC,

CIcod(g)−g=∑i∈IaI(i)εi,C_I^{\mathrm{cod}}(\mathbf{g})-\mathbf{g}=\sum_{i\in I}\mathbf{a}_I(i)\boldsymbol{\varepsilon}_i,

and

∥CIcod(g)−g∥≤min⁡{∥aI∥∞∑i∈supp⁡(aI)∥εi∥, ∥aI∥1max⁡i∈supp⁡(aI)∥εi∥}.\left\|C_I^{\mathrm{cod}}(\mathbf{g})-\mathbf{g}\right\| \le\min\left\{\|\mathbf{a}_I\|_\infty\sum_{i\in\operatorname{supp}(\mathbf{a}_I)}\|\boldsymbol{\varepsilon}_i\|,\ \|\mathbf{a}_I\|_1\max_{i\in\operatorname{supp}(\mathbf{a}_I)}\|\boldsymbol{\varepsilon}_i\|\right\}.

Proof. Substituting C(g^i)=g^i+εiC(\hat{\mathbf{g}}_i)=\hat{\mathbf{g}}_i+\boldsymbol{\varepsilon}_i into (15) and using ∑i∈IaI(i)g^i=aIBgˉ=g\sum_{i\in I}\mathbf{a}_I(i)\hat{\mathbf{g}}_i=\mathbf{a}_I\mathbf{B}\bar{\mathbf{g}}=\mathbf{g} gives the identity. Restricting to supp⁡(aI)\operatorname{supp}(\mathbf{a}_I), since the other terms vanish, the triangle inequality gives

∥CIcod(g)−g∥=∥∑i∈supp⁡(aI)aI(i)εi∥≤∑i∈supp⁡(aI)∣aI(i)∣∥εi∥,\left\|C_I^{\mathrm{cod}}(\mathbf{g})-\mathbf{g}\right\| =\left\|\sum_{i\in\operatorname{supp}(\mathbf{a}_I)}\mathbf{a}_I(i)\boldsymbol{\varepsilon}_i\right\| \le\sum_{i\in\operatorname{supp}(\mathbf{a}_I)}|\mathbf{a}_I(i)|\|\boldsymbol{\varepsilon}_i\|,

and bounding ∣aI(i)∣|\mathbf{a}_I(i)| by ∥aI∥∞\|\mathbf{a}_I\|_\infty, or the sum ∑i∣aI(i)∣=∥aI∥1\sum_i|\mathbf{a}_I(i)|=\|\mathbf{a}_I\|_1 times the maximum error, gives the two terms of the minimum.

Large decoding coefficients, as in real-valued schemes, thus amplify the compression errors. Binary decoding avoids this.

Corollary IV.3 (Binary decoding). Let B∈{0,1}n×n\mathbf{B}\in\{0,1\}^{n\times n}, and let R⊆IR\subseteq I satisfy ∑i∈Rbi=11×n\sum_{i\in R}\mathbf{b}_i=\mathbf{1}_{1\times n}. Then 1R\mathbf{1}_R is a decoding vector, and, decoding with aI=1R\mathbf{a}_I=\mathbf{1}_R,

CIcod(g)=∑i∈RC(g^i),C_I^{\mathrm{cod}}(\mathbf{g})=\sum_{i\in R}C(\hat{\mathbf{g}}_i),
∥CIcod(g)−g∥≤∑i∈R∥εi∥≤∣R∣max⁡i∈R∥εi∥.(16)\left\|C_I^{\mathrm{cod}}(\mathbf{g})-\mathbf{g}\right\| \le\sum_{i\in R}\|\boldsymbol{\varepsilon}_i\| \le|R|\max_{i\in R}\|\boldsymbol{\varepsilon}_i\|. \tag*{(16)}

Proof. We have supp⁡(1R)=R⊆I\operatorname{supp}(\mathbf{1}_R)=R\subseteq I and 1RB=11×n\mathbf{1}_R\mathbf{B}=\mathbf{1}_{1\times n}, so 1R\mathbf{1}_R is a decoding vector. Since ∥1R∥∞=1\|\mathbf{1}_R\|_\infty=1 and ∥1R∥1=∣R∣\|\mathbf{1}_R\|_1=|R|, Proposition IV.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 IV.4 (Coarser partition). Assume that the loss is a sum of per-sample losses, as in Section II. Let B∈{0,1}n×n\mathbf{B}\in\{0,1\}^{n\times n} and have nonzero rows, let RR be as in Corollary IV.3, and, for i∈Ri\in R, let Si:=supp⁡(bi)S_i:=\operatorname{supp}(\mathbf{b}_i) and Dˉi:=⋃j∈SiDj\bar{D}_i:=\bigcup_{j\in S_i}D_j. Then Dˉ=⨆i∈RDˉi\bar{D}=\bigsqcup_{i\in R}\bar{D}_i, and, decoding with 1R\mathbf{1}_R,

CIcod(g)=∑i∈RC(∇L(Dˉi,β)).(17)C_I^{\mathrm{cod}}(\mathbf{g})=\sum_{i\in R}C\bigl(\nabla L(\bar{D}_i,\beta)\bigr). \tag*{(17)}

That is, the decoded update is the naive compressed update on the coarse partition {Dˉi}i∈R\{\bar{D}_i\}_{i\in R} instead of the fine partition {Dj}j∈[n]\{D_j\}_{j\in[n]}.

Proof. Since the rows are binary, nonzero, and ∑i∈Rbi=11×n\sum_{i\in R}\mathbf{b}_i=\mathbf{1}_{1\times n}, we have [n]=⨆i∈RSi[n]=\bigsqcup_{i\in R}S_i, hence Dˉ=⨆i∈RDˉi\bar{D}=\bigsqcup_{i\in R}\bar{D}_i. Since the loss is a sum of per-sample losses and the chunks are disjoint,

g^i=∑j∈Si∇L(Dj,β)=∇L(Dˉi,β).\hat{\mathbf{g}}_i=\sum_{j\in S_i}\nabla L(D_j,\beta)=\nabla L(\bar{D}_i,\beta).

Substituting into (16) gives (17).

Since CC is nonlinear, compressing the block gradients g^i\hat{\mathbf{g}}_i differs from compressing the chunk gradients gj\mathbf{g}_j. We now show that the standard convergence guarantee of compressed gradient descent with a contractive compressor [37, 17], which holds on the fine partition, also holds on every coarse partition.

Definition IV.5 (Contractive compressor [37, 17]). A compressor CC is δ\delta-contractive, with δ∈(0,1]\delta\in(0,1], if ∥C(x)−x∥2≤(1−δ)∥x∥2\|C(\mathbf{x})-\mathbf{x}\|^2\le(1-\delta)\|\mathbf{x}\|^2 for all x∈R1×d\mathbf{x}\in\mathbb{R}^{1\times d}.

To prove convergence on a coarse partition, we use standard quantities from federated optimization with unbalanced local datasets [26, 42], weighting each chunk by its fraction of the data and measuring heterogeneity by the weighted variance of the gradients. For i∈[n]i\in[n], let SiS_i and Dˉi\bar{D}_i be as in Proposition IV.4, set wj:=∣Dj∣/Nw_j:=|D_j|/N and wˉi:=∣Dˉi∣/N=∑j∈Siwj\bar{w}_i:=|\bar{D}_i|/N=\sum_{j\in S_i}w_j, and define

ζ2(β):=∑j∈[n]∥gj−wjg∥2wj,ζˉR2(β):=∑i∈R∥g^i−wˉig∥2wˉi,\zeta^2(\beta):=\sum_{j\in[n]}\frac{\|\mathbf{g}_j-w_j\mathbf{g}\|^2}{w_j},\qquad \bar{\zeta}_R^2(\beta):=\sum_{i\in R}\frac{\|\hat{\mathbf{g}}_i-\bar{w}_i\mathbf{g}\|^2}{\bar{w}_i},

the heterogeneity of the fine and coarse partitions. Thus ζ2(β)=0\zeta^2(\beta)=0 if gj=wjg\mathbf{g}_j=w_j\mathbf{g} for all jj, and ζˉ[n]2=ζ2\bar{\zeta}_{[n]}^2=\zeta^2 when B=In\mathbf{B}=\mathbf{I}_n. At round t=0,…,T−1t=0,\ldots,T-1, let ItI_t be the responding set and

let g(t)\mathbf{g}^{(t)}, g^i(t)\hat{\mathbf{g}}_i^{(t)} be the quantities evaluated at βt\beta_t. We state the following standard assumptions.

Assumption IV.6. 1) The loss is additive over samples, that is, L(A⊔A′,⋅)=L(A,⋅)+L(A′,⋅)\mathcal{L}(A \sqcup A', \cdot)=\mathcal{L}(A,\cdot)+\mathcal{L}(A',\cdot) for disjoint A,A′⊆DA,A'\subseteq\mathcal{D}.

  1. The function L(D,⋅)\mathcal{L}(\mathcal{D},\cdot) is differentiable, ρ\rho-smooth and bounded below by L∗∈RL^*\in\mathbb{R}, that is, for all β,β′∈Rd\beta,\beta'\in\mathbb{R}^d,

∥∇L(D,β)−∇L(D,β′)∥≤ρ∥β−β′∥\lVert\nabla\mathcal{L}(\mathcal{D},\beta)-\nabla\mathcal{L}(\mathcal{D},\beta')\rVert\leq\rho\lVert\beta-\beta'\rVert

and

L(D,β)≥L∗.\mathcal{L}(\mathcal{D},\beta)\geq L^*.
  1. The compressor CC is deterministic and δ\delta-contractive for some δ∈(0,1]\delta\in(0,1].

  1. There exist ζ∗≥0\zeta_*\geq0 and M≥0M\geq0 with (1−δ)(1+M)<1(1-\delta)(1+M)<1 such that ζ2(β)≤ζ∗2+M∥∇L(D,β)∥2\zeta^2(\beta)\leq\zeta_*^2+M\lVert\nabla\mathcal{L}(\mathcal{D},\beta)\rVert^2 for all β\beta.

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 IV.7 (Convergence on coarse partitions). Let items 1 to 3 of Assumption IV.6 hold, let 0<γ≤1/ρ0<\gamma\leq1/\rho, and let B∈{0,1}n×nB\in\{0,1\}^{n\times n} have nonzero rows. At each round tt, let the master decode with 1RtP\mathbf{1}_{R_t}P, where Rt⊆ItR_t\subseteq I_t and ∑i∈Rtbi=11×n\sum_{i\in R_t}\mathbf{b}_i=\mathbf{1}_{1\times n}, and let βt+1=βt−γCItcod⁡(g(t))\beta_{t+1}=\beta_t-\gamma C_{I_t}^{\operatorname{cod}}(\mathbf{g}^{(t)}).

  1. The iterates satisfy

1T∑t=0T−1∥g(t)∥2≤2(L(D,β0)−L∗)δγT+1−δδT∑t=0T−1ζˉRt2(βt).\frac{1}{T}\sum_{t=0}^{T-1}\lVert\mathbf{g}^{(t)}\rVert^2\leq\frac{2(\mathcal{L}(\mathcal{D},\beta_0)-L^*)}{\delta\gamma T}+\frac{1-\delta}{\delta T}\sum_{t=0}^{T-1}\bar{\zeta}_{R_t}^2(\beta_t).
  1. If, moreover, item 4 holds, then, with δM:=1−(1−δ)(1+M)>0\delta_M:=1-(1-\delta)(1+M)>0,

1T∑t=0T−1∥g(t)∥2≤2(L(D,β0)−L∗)δMγT+1−δδMζ∗2.\frac{1}{T}\sum_{t=0}^{T-1}\lVert\mathbf{g}^{(t)}\rVert^2\leq\frac{2(\mathcal{L}(\mathcal{D},\beta_0)-L^*)}{\delta_M\gamma T}+\frac{1-\delta}{\delta_M}\zeta_*^2.

Proof. Fix tt, and write g=g(t)\mathbf{g}=\mathbf{g}^{(t)}, g^i=g^i(t)\hat{\mathbf{g}}_i=\hat{\mathbf{g}}_i^{(t)}. By item 1 of Assumption IV.6 and Proposition IV.4, ∑i∈Rtg^i=g\sum_{i\in R_t}\hat{\mathbf{g}}_i=\mathbf{g} and ∑i∈Rtwˉi=1\sum_{i\in R_t}\bar{w}_i=1. Let ui:=g^i−wˉig\mathbf{u}_i:=\hat{\mathbf{g}}_i-\bar{w}_i\mathbf{g} for i∈Rti\in R_t, so that ∑i∈Rtui=0\sum_{i\in R_t}\mathbf{u}_i=\mathbf{0}.

  1. Expanding ∥wˉig+ui∥2\lVert\bar{w}_i\mathbf{g}+\mathbf{u}_i\rVert^2 and using ∑i∈Rtwˉi=1\sum_{i\in R_t}\bar{w}_i=1 and ∑i∈Rtui=0\sum_{i\in R_t}\mathbf{u}_i=\mathbf{0} gives

∑i∈Rt∥g^i∥2wˉi=∑i∈Rt(wˉi∥g∥2+2⟨g,ui⟩+∥ui∥2wˉi)=∥g∥2+ζˉRt2(βt).(18)\sum_{i\in R_t}\frac{\lVert\hat{\mathbf{g}}_i\rVert^2}{\bar{w}_i} =\sum_{i\in R_t}\left(\bar{w}_i\lVert\mathbf{g}\rVert^2+2\langle\mathbf{g},\mathbf{u}_i\rangle+\frac{\lVert\mathbf{u}_i\rVert^2}{\bar{w}_i}\right) =\lVert\mathbf{g}\rVert^2+\bar{\zeta}_{R_t}^2(\beta_t). \tag*{(18)}

By the convexity of ∥⋅∥2\lVert\cdot\rVert^2, item 3 of Assumption IV.6 and Eq. (18),

∥CItcod⁡(g)−g∥2=∥∑i∈RtwˉiC(g^i)−g^iwˉi∥2≤∑i∈Rt∥C(g^i)−g^i∥2wˉi≤(1−δ)∑i∈Rt∥g^i∥2wˉi=(1−δ)(∥g∥2+ζˉRt2(βt)).(19)\left\lVert C_{I_t}^{\operatorname{cod}}(\mathbf{g})-\mathbf{g}\right\rVert^2 =\left\lVert\sum_{i\in R_t}\bar{w}_i\frac{C(\hat{\mathbf{g}}_i)-\hat{\mathbf{g}}_i}{\bar{w}_i}\right\rVert^2 \leq\sum_{i\in R_t}\frac{\lVert C(\hat{\mathbf{g}}_i)-\hat{\mathbf{g}}_i\rVert^2}{\bar{w}_i} \leq(1-\delta)\sum_{i\in R_t}\frac{\lVert\hat{\mathbf{g}}_i\rVert^2}{\bar{w}_i} =(1-\delta)(\lVert\mathbf{g}\rVert^2+\bar{\zeta}_{R_t}^2(\beta_t)). \tag*{(19)}

By item 2 of Assumption IV.6, the descent lemma with βt+1=βt−γCItcod⁡(g)\beta_{t+1}=\beta_t-\gamma C_{I_t}^{\operatorname{cod}}(\mathbf{g}) gives

L(D,βt+1)≤L(D,βt)−γ⟨g,CItcod⁡(g)⟩+ργ22∥CItcod⁡(g)∥2.\mathcal{L}(\mathcal{D},\beta_{t+1})\leq\mathcal{L}(\mathcal{D},\beta_t)-\gamma\langle\mathbf{g},C_{I_t}^{\operatorname{cod}}(\mathbf{g})\rangle+\frac{\rho\gamma^2}{2}\lVert C_{I_t}^{\operatorname{cod}}(\mathbf{g})\rVert^2.

Since ργ≤1\rho\gamma\leq1 and −2⟨g,CItcod⁡(g)⟩+∥CItcod⁡(g)∥2=∥CItcod⁡(g)−g∥2−∥g∥2-2\langle\mathbf{g},C_{I_t}^{\operatorname{cod}}(\mathbf{g})\rangle+\lVert C_{I_t}^{\operatorname{cod}}(\mathbf{g})\rVert^2=\lVert C_{I_t}^{\operatorname{cod}}(\mathbf{g})-\mathbf{g}\rVert^2-\lVert\mathbf{g}\rVert^2, we obtain, using (19),

L(D,βt+1)≤L(D,βt)−γ2(∥g∥2−∥CItcod⁡(g)−g∥2)≤L(D,βt)−γδ2∥g∥2+γ(1−δ)2ζˉRt2(βt).(20)\mathcal{L}(\mathcal{D},\beta_{t+1})\leq\mathcal{L}(\mathcal{D},\beta_t)-\frac{\gamma}{2}\left(\lVert\mathbf{g}\rVert^2-\left\lVert C_{I_t}^{\operatorname{cod}}(\mathbf{g})-\mathbf{g}\right\rVert^2\right) \leq\mathcal{L}(\mathcal{D},\beta_t)-\frac{\gamma\delta}{2}\lVert\mathbf{g}\rVert^2+\frac{\gamma(1-\delta)}{2}\bar{\zeta}_{R_t}^2(\beta_t). \tag*{(20)}

Summing (20) over t=0,…,T−1t=0,\ldots,T-1 gives

γδ2∑t=0T−1∥g(t)∥2≤L(D,β0)−L(D,βT)+γ(1−δ)2∑t=0T−1ζˉRt2(βt).\frac{\gamma\delta}{2}\sum_{t=0}^{T-1}\lVert\mathbf{g}^{(t)}\rVert^2\leq\mathcal{L}(\mathcal{D},\beta_0)-\mathcal{L}(\mathcal{D},\beta_T)+\frac{\gamma(1-\delta)}{2}\sum_{t=0}^{T-1}\bar{\zeta}_{R_t}^2(\beta_t).

Using L(D,βT)≥L∗\mathcal{L}(\mathcal{D},\beta_T)\geq L^* and dividing by γδT/2\gamma\delta T/2 gives item 1.

  1. Since g^i=∑j∈Sigj\hat{\mathbf{g}}_i=\sum_{j\in S_i}\mathbf{g}_j and wˉi=∑j∈Siwj\bar{w}_i=\sum_{j\in S_i}w_j, we have ui=∑j∈Si(gj−wjg)\mathbf{u}_i=\sum_{j\in S_i}(\mathbf{g}_j-w_j\mathbf{g}). The Cauchy–Schwarz inequality gives

∥ui∥2≤(∑j∈Siwj)∑j∈Si∥gj−wjg∥2wj=wˉi∑j∈Si∥gj−wjg∥2wj.\lVert\mathbf{u}_i\rVert^2\leq\left(\sum_{j\in S_i}w_j\right)\sum_{j\in S_i}\frac{\lVert\mathbf{g}_j-w_j\mathbf{g}\rVert^2}{w_j} =\bar{w}_i\sum_{j\in S_i}\frac{\lVert\mathbf{g}_j-w_j\mathbf{g}\rVert^2}{w_j}.

Dividing by wˉi\bar{w}_i, summing over i∈Rti\in R_t and using [n]=⨆i∈RtSi[n]=\bigsqcup_{i\in R_t}S_i, we obtain, by item 4 of Assumption IV.6,

ζˉRt2(βt)≤ζ2(βt)≤ζ∗2+M∥g∥2.\bar{\zeta}_{R_t}^2(\beta_t)\leq\zeta^2(\beta_t)\leq\zeta_*^2+M\lVert\mathbf{g}\rVert^2.

Since δ−(1−δ)M=1−(1−δ)(1+M)=δM\delta-(1-\delta)M=1-(1-\delta)(1+M)=\delta_M, inequality (20) becomes

L(D,βt+1)≤L(D,βt)−γδM2∥g∥2+γ(1−δ)2ζ∗2.\mathcal{L}(\mathcal{D},\beta_{t+1})\leq\mathcal{L}(\mathcal{D},\beta_t)-\frac{\gamma\delta_M}{2}\lVert\mathbf{g}\rVert^2+\frac{\gamma(1-\delta)}{2}\zeta_*^2.

Summing over t=0,…,T−1t=0,\ldots,T-1, using L(D,βT)≥L∗\mathcal{L}(\mathcal{D},\beta_T)\geq L^* and dividing by γδMT/2\gamma\delta_M T/2 gives item 2. □\square

The following corollary applies Proposition IV.7 to FRC, GFRC and BCGC.

Corollary IV.8. Let items 1, 2 and 4 of Assumption IV.6 hold and let 0<γ≤1/ρ0<\gamma\leq1/\rho.

  1. If CC is deterministic and δ\delta-contractive with (1−δ)(1+M)<1(1-\delta)(1+M)<1, then FRC, GFRC and BCGC satisfy, under any pattern of at most ss stragglers and for every complete class decoded at each round,

1T∑t=0T−1∥g(t)∥2≤2(L(D,β0)−L∗)δMγT+1−δδMζ∗2,\frac{1}{T}\sum_{t=0}^{T-1}\lVert\mathbf{g}^{(t)}\rVert^2\leq\frac{2(\mathcal{L}(\mathcal{D},\beta_0)-L^*)}{\delta_M\gamma T}+\frac{1-\delta}{\delta_M}\zeta_*^2,

where δM=1−(1−δ)(1+M)\delta_M=1-(1-\delta)(1+M).

  1. In particular, if C=Top⁡\mathcal{C}=\operatorname{Top}-κ\kappa with 1≤κ≤d1 \le\kappa\le d and (d−κ)(1+M)<d(d-\kappa)(1+M)<d, then

1T∑t=0T−1∥g(t)∥2≤2(L(D,β0)−L⋆)δMγT+d−κdδMε⋆2,\frac{1}{T}\sum_{t=0}^{T-1}\lVert g^{(t)}\rVert^2 \le\frac{2(L(\mathcal{D},\beta_0)-L^\star)}{\delta_M\gamma T}+\frac{d-\kappa}{d\delta_M}\varepsilon_\star^2,

where δM=1−d−κd(1+M)\delta_M=1-\frac{d-\kappa}{d}(1+M).

Proof. 1) Item 3 of Assumption IV.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][n] (Section II-B, Definition III.11, and Proposition III.4). Since the s+1s+1 classes are disjoint, at most ss stragglers leave a complete class Rt⊆ItR_t\subseteq I_t at every round, and ∑i∈Rtbi=11×n\sum_{i\in R_t}b_i=\mathbf{1}_{1\times n}. Hence item 2 of Proposition IV.7 applies.

  1. Top-κ\kappa is deterministic and δ\delta-contractive with δ=κ/d\delta=\kappa/d. The condition (1−δ)(1+M)<1(1-\delta)(1+M)<1 then reads (d−κ)(1+M)<d(d-\kappa)(1+M)<d, and 1−δδM=d−κdδM\frac{1-\delta}{\delta_M}=\frac{d-\kappa}{d\delta_M}, so the claim follows from item 1.

By Corollary IV.8, FRC, GFRC and BCGC have the same guarantee, and they differ only through the coarse partitions {Di}i∈Rt\{\mathcal{D}_i\}_{i\in R_t}, that is, through the chunks that are compressed together. For j∈{0,…,s}j\in\{0,\ldots,s\}, let Pj:={Si}i∈Kj\mathcal{P}_j:=\{S_i\}_{i\in K_j} be the partition of [n][n] induced by the class KjK_j.

We now show that these s+1s+1 partitions are genuinely different. The first step is that the cyclic supports make each class separate a distinct pair of adjacent chunks.

Proposition IV.9 (Cyclic supports separate adjacent chunks). Let ℓ≥2\ell\ge2, and consider the partitions Pj\mathcal{P}_j of BCGC, with indices modulo nn. For every l∈[n]l\in[n] and every j∈{0,…,s}j\in\{0,\ldots,s\}, the chunks ll and l+1l+1 lie in different blocks of Pj\mathcal{P}_j if and only if l+1∈Kjl+1\in K_j. Hence exactly one class of BCGC separates the chunks ll and $l+1.

Proof. Every support is a cyclic interval Si={i,…,i+Li−1}S_i=\{i,\ldots,i+L_i-1\}, and Li≤s+1+r<nL_i\le s+1+r<n since ℓ≥2\ell\ge2, with r:=0r:=0 if (s+1)∣n(s+1)\mid n. If l+1∈Kjl+1\in K_j, the block of Pj\mathcal{P}_j containing l+1l+1 is Sl+1S_{l+1}, which starts at l+1l+1 and does not contain ll. Otherwise, the block SiS_i of Pj\mathcal{P}_j containing l+1l+1 satisfies l+1=i+ul+1=i+u with 1≤u≤Li−11\le u\le L_i-1, so l∈Sil\in S_i. Since the classes partition [n][n], l+1l+1 belongs to exactly one class.

This separation property makes the partitions pairwise distinct, so the decoded class genuinely matters under compression.

Proposition IV.10 (Distinct partitions). If ℓ≥2\ell\ge2, the s+1s+1 partitions P0,…,Ps\mathcal{P}_0,\ldots,\mathcal{P}_s of BCGC are pairwise distinct, no one of them refines another, and Pj=P0+j\mathcal{P}_j=\mathcal{P}_0+j when (s+1)∣n(s+1)\mid n. In contrast, all the classes of FRC induce the same partition, and those of GFRC induce one of the two partitions G1\mathcal{G}_1 and G2\mathcal{G}_2 of Definition III.11.

Proof. Let j≠j′j\ne j'. Since j∈Kjj\in K_j and j∉Kj′j\notin K_{j'}, Proposition IV.9 shows that Pj\mathcal{P}_j separates the chunks j−1j-1 and jj, whereas Pj′\mathcal{P}_{j'} does not. Exchanging jj and j′j', the partition Pj′\mathcal{P}_{j'} separates the chunks j′−1j'-1 and j′j', whereas Pj\mathcal{P}_j does not. Hence neither partition refines the other. If (s+1)∣n(s+1)\mid n, then Kj=K0+jK_j=K_0+j (Proposition III.2) and Si+j=Si+jS_{i+j}=S_i+j, so Pj=P0+j\mathcal{P}_j=\mathcal{P}_0+j. Every

class of BFRC′\mathcal{B}'_{\mathrm{FRC}} selects one row from each diagonal block, and the statement on GFRC follows from Definition III.11.

Experiments

We implement all schemes in MPI (mpi4py) on the Toubkal supercomputer [20], with one master and n=100n=100 workers, each pinned to a core. Communication is modeled as T=α+βs/dT=\alpha+\beta s/d (α=5×10−4 s\alpha=5\times10^{-4}\,\mathrm{s}, β=30 MB/s\beta=30\,\mathrm{MB/s}), and the master’s decoding time is included in every reported wall time. We use four datasets, Amazon Employee Access with logistic regression (d=213,776d=213{,}776), MNIST and EMNIST digits with softmax regression (d=7,850d=7{,}850), and 20 Newsgroups with softmax regression on TF-IDF features (d=788,480d=788{,}480).

We compare BCGC with four schemes: the uncoded (naive) scheme, the binary GFRC of [9], which coincides with FRC when (s+1)∣n(s+1)\mid n, and two MDS gradient codes with real or complex coefficients, the Gaussian MDS code (G-MDS) of [38] and the Reed–Solomon code (RS) of [13]. Each worker compresses its coded message with top κ\kappa sparsification, κ=⌊0.05d⌋\kappa=\lfloor0.05d\rfloor. The RS messages are complex, so we sparsify them by modulus and keep the real part of the decoded sum. All schemes run 100 iterations of Nesterov accelerated gradient descent from β0=0\beta_0=0 in double precision, with step size γ=10\gamma=10 on Amazon, 0.1 on MNIST and EMNIST, and 1.0 on 20 Newsgroups. This optimizer differs from the plain gradient descent of Proposition IV.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 s=20s=20. At s=24s=24, however, 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 κ\kappa sparsification is deterministic.

Robustness of compressed gradient coding

We first isolate the effect of compression on the decoding step. Each scheme tolerates up to ss stragglers, and exactly ss 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 n−sn-s responses and solve the linear system aB=11×naB=\mathbf{1}_{1\times n}. Each worker compresses its message with top κ\kappa sparsification, κ=⌊0.05d⌋\kappa=\lfloor0.05d\rfloor. We consider two straggler levels, s=20s=20, for which (s+1)∤n(s+1)\nmid n, and s=24s=24, for which (s+1)∣n(s+1)\mid n.

Figure 1a shows the convergence on Amazon, Figure 1b the wall time, and Tables I–II the results on all four datasets. We report three findings: accuracy, wall time, and the effect of the decoding coefficients.

Accuracy. Like the naive scheme, BCGC and GFRC stay within 0.022 of their uncompressed metric. The MDS codes, in contrast, diverge under compression. At s=20s=20 their metric falls to between 0.06 and 0.58. At s=24s = 24, G-MDS recovers the exact gradient without compression but diverges with it, while RS is numerically unstable even without compression, where its accuracy on 20 Newsgroups is already 0.02; its apparent convergence under compression is therefore a numerical artifact rather than robustness.

DatasetssUncompr.NaiveBCGCGFRCG-MDSRS
Amazon200.8830.8830.8740.8740.5810.540
240.8830.8740.8740.8740.5160.525
MNIST200.9150.8950.8940.8930.1960.087
240.8950.8950.8950.8950.1160.896
EMNIST200.9250.9030.9030.9030.1530.202
240.9030.9030.9030.9030.2060.904
20 NG200.6170.6170.6090.6090.1510.063
240.6170.6090.6100.6100.1000.603

Table I. Final test accuracy on all datasets with top κ\kappa sparsification, κ=⌊0.05d⌋\kappa= \lfloor0.05d \rfloor, n=100n = 100.

DatasetssBCGCGFRCG-MDSRS
Amazon204.74.72.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}2.2×1022.2 \times10^{2}
MNIST204.84.82.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}2.2×1022.2 \times10^{2}
EMNIST205.04.92.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}2.2×1022.2 \times10^{2}
20 NG204.54.62.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}1.8×1041.8 \times10^{4}

Table II. Mean norm ∥aI∥1\lVert a_I \rVert_1 of the decoding vector for n=100n = 100.

Wall time. BCGC and GFRC are the fastest coded schemes, about 27 s on Amazon against 46 to 56 s for the MDS codes. The two binary schemes are identical at s=24s = 24. At s=20s = 20, where (s+1)∤n(s + 1) \nmid n, BCGC is at most 17% slower, on 20 Newsgroups, because of its larger load on a few workers (Remark III.13).

Decoding coefficients. By Proposition IV.2, the decoded error is bounded by ∥aI∥1max⁡i∥εi∥\lVert a_I \rVert_1 \max_i \lVert\varepsilon_i \rVert. The binary codes keep ∥aI∥1≈4\lVert a_I \rVert_1 \approx4 to 5 with unit coefficients, against about 10410^4 for G-MDS (Table II), which explains why the MDS codes amplify the compression error.

Overall, BCGC matches the binary state of the art and, unlike the MDS codes, preserves its accuracy under compression.

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 IV.8). To isolate this effect, we use a minimum error decoder. Among the classes that are complete after n−sn - s responses, it selects the one with the smallest total compression error ∑i∈Kj∥εi∥\sum_{i \in K_j} \lVert\varepsilon_i \rVert, where εi=C(gi)−gi\varepsilon_i = C(g_i) - g_i. Each worker also sends the scalar ∥εi∥\lVert\varepsilon_i \rVert, which adds an O(1)O(1) communication cost, so BCGC and GFRC wait for the same

Robustness on Amazon under top kappa sparsification

Figure 1. (a) Convergence: test AUC (left) and training loss on a logarithmic scale (right), for s=20s = 20 (top) and s=24s = 24 (bottom); solid lines uncompressed, dashed lines compressed. (b) Total wall time for 100 iterations, without compression (plain bars) and with top κ\kappa sparsification (hatched bars), for s=20s = 20 (left) and s=24s = 24 (right).

n−sn-s responses and have the same wall time. We fix s=24s = 24, so that (s+1)∤n(s+1) \nmid n, and use top κ\kappa sparsification with κ=⌊0.05d⌋\kappa= \lfloor0.05d \rfloor, n=100n = 100 and b=30b = 30 MB/s. For each dataset we compare two data partitions. The i.i.d. partition is obtained by shuffling the data. The non-i.i.d. partition is obtained by sorting the data by label, so that each chunk contains essentially one class.

Table III and Figure 2 and Figure 3 report the results. On the i.i.d. partition, BCGC and GFRC coincide, as predicted by the theory. On the non-i.i.d. partition, BCGC has a total compression error 15 to 19% lower than GFRC on Amazon, MNIST and EMNIST. It improves the accuracy by 5.0 points on MNIST and 4.9 points on EMNIST, removing about half of the accuracy lost to compression, at the same wall time of about 40 s. This wall time is longer than that of the first-complete-class decoder of Table I, which waits for fewer responses. On Amazon and 20 Newsgroups the two schemes agree to within 0.001, because the partition has little effect when compression loses little information, as with the sparse

Dataseti.i.d. BCGCi.i.d. GFRCnon-i.i.d. BCGCnon-i.i.d. GFRC∑i∈K∥εi∥\sum_{i\in K}\lVert\varepsilon_i\rVert BCGC∑i∈K∥εi∥\sum_{i\in K}\lVert\varepsilon_i\rVert GFRC
Amazon (AUC)0.8740.8740.8770.877111130
MNIST0.8950.8950.8750.8254.1×1044.1\times10^45.0×1045.0\times10^4
EMNIST0.9020.9030.8800.8311.9×1051.9\times10^52.3×1052.3\times10^5
20 NG0.6090.6100.6150.6149495

Table III. Partition diversity with the minimum error decoder and top κ\kappa sparsification, κ=⌊0.05d⌋\kappa= \lfloor0.05d\rfloor, n=100n = 100, s=24s = 24.

Partition diversity plots for i.i.d. and non-i.i.d. partitions

Figure 2. Partition diversity on MNIST with the minimum error decoder, n=100n = 100, s=24s = 24, on the i.i.d. partition (top) and the non-i.i.d. partition (bottom).

Figure 3. Test metric on the non-i.i.d. partition with the minimum error decoder, n=100n = 100, s=24s = 24.

@page 11/13 starts_mid=1 ends_mid=1

DatasetssUncompr.NaiveBCGCGFRCG-MDSRS
Amazon200.8830.8830.8740.8740.5810.540
240.8830.8740.8740.8740.5160.525
MNIST200.9150.8950.8940.8930.1960.087
240.8950.8950.8950.8950.1160.896
EMNIST200.9250.9030.9030.9030.1530.202
240.9030.9030.9030.9030.2060.904
20 NG200.6170.6170.6090.6090.1510.063
240.6170.6090.6100.6100.1000.603

Table I (PDF p. 11). Final test accuracy on all datasets with top κ\kappa sparsification, κ=⌊0.05d⌋\kappa= \lfloor0.05d \rfloor, n=100n = 100.

DatasetssBCGCGFRCG-MDSRS
Amazon204.74.72.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}2.2×1022.2 \times10^{2}
MNIST204.84.82.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}2.2×1022.2 \times10^{2}
EMNIST205.04.92.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}2.2×1022.2 \times10^{2}
20 NG204.54.62.0×1042.0 \times10^{4}53
244.04.01.3×1041.3 \times10^{4}1.8×1041.8 \times10^{4}

Table II (PDF p. 11). Mean norm ∥aI∥1\lVert a_I \rVert_1 of the decoding vector for n=100n = 100.

metric falls to between 0.06 and 0.58. At s=24s = 24, G-MDS recovers the exact gradient without compression but diverges with it, while RS is numerically unstable even without compression, where its accuracy on 20 Newsgroups is already 0.02; its apparent convergence under compression is therefore a numerical artifact rather than robustness.

Wall time. BCGC and GFRC are the fastest coded schemes, about 27 s on Amazon against 46 to 56 s for the MDS codes. The two binary schemes are identical at s=24s = 24. At s=20s = 20, where (s+1)∤n(s + 1) \nmid n, BCGC is at most 17% slower, on 20 Newsgroups, because of its larger load on a few workers (Remark III.13).

Decoding coefficients. By Proposition IV.2, the decoded error is bounded by ∥aI∥1max⁡i∥εi∥\lVert a_I \rVert_1 \max_i \lVert\varepsilon_i \rVert. The binary codes keep ∥aI∥1≈4\lVert a_I \rVert_1 \approx4 to 5 with unit coefficients, against about 10410^4 for G-MDS (Table II), which explains why the MDS codes amplify the compression error.

Overall, BCGC matches the binary state of the art and, unlike the MDS codes, preserves its accuracy under compression.

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 IV.8). To isolate this effect, we use a minimum error decoder. Among the classes that are complete after n−sn - s responses, it selects the one with the smallest total compression error ∑i∈Kj∥εi∥\sum_{i \in K_j} \lVert\varepsilon_i \rVert, where εi=C(gi)−gi\varepsilon_i = C(g_i) - g_i. Each worker also sends the scalar ∥εi∥\lVert\varepsilon_i \rVert, which adds an O(1)O(1) communication cost, so BCGC and GFRC wait for the same

Robustness on Amazon under top kappa sparsification

Figure 1 (PDF p. 11). (a) Convergence: test AUC (left) and training loss on a logarithmic scale (right), for s=20s = 20 (top) and s=24s = 24 (bottom); solid lines uncompressed, dashed lines compressed. (b) Total wall time for 100 iterations, without compression (plain bars) and with top κ\kappa sparsification (hatched bars), for s=20s = 20 (left) and s=24s = 24 (right).

n−sn-s responses and have the same wall time. We fix s=24s = 24, so that (s+1)∤n(s+1) \nmid n, and use top κ\kappa sparsification with κ=⌊0.05d⌋\kappa= \lfloor0.05d \rfloor, n=100n = 100 and b=30b = 30 MB/s. For each dataset we compare two data partitions. The i.i.d. partition is obtained by shuffling the data. The non-i.i.d. partition is obtained by sorting the data by label, so that each chunk contains essentially one class.

Table III and Figure 2 and Figure 3 report the results. On the i.i.d. partition, BCGC and GFRC coincide, as predicted by the theory. On the non-i.i.d. partition, BCGC has a total compression error 15 to 19% lower than GFRC on Amazon, MNIST and EMNIST. It improves the accuracy by 5.0 points on MNIST and 4.9 points on EMNIST, removing about half of the accuracy lost to compression, at the same wall time of about 40 s. This wall time is longer than that of the first-complete-class decoder of Table I, which waits for fewer responses. On Amazon and 20 Newsgroups the two schemes agree to within 0.001, because the partition has little effect when compression loses little information, as with the sparse text gradients, or when the chunks are similar. The gain therefore requires both heterogeneous data and a significant compression error, and BCGC is never worse than GFRC by more than 0.001.

Conclusion

We introduced BCGC, a binary gradient code with a circulant or near-circulant encoding matrix whose binary recovering sets are exactly its s+1s+1 classes. It tolerates any ss stragglers at the optimal threshold n−sn-s with minimal total load n(s+1)n(s+1), decodes by a single summation, and for 2≤s≤n−22\le s\le n-2 is neither MDS nor permutation-equivalent to FRC or GFRC. Under compression it reduces to uncoded compression on a coarser partition, which keeps it stable where MDS codes amplify the error, and its s+1s+1 distinct partitions let it select the reconstruction closest to the exact gradient. Experiments on four datasets confirm that BCGC matches GFRC, runs faster than the MDS codes, stays stable under compression, and improves accuracy by up to 5 points on heterogeneous data. Future work will extend the approach to broader compressors and dynamic coding schemes.

Acknowledgment

The authors gratefully acknowledge the support and computing resources provided by the Toubkal Supercomputer [20] (https://toubkal.um6p.ma) at UM6P, Morocco.

References

  1. [1]D. 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. [2]D. Alistarh et al. “The Convergence of Sparsified Gradient Methods”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 31. 2018.
  3. [3]M. A. Attia and R. Tandon. Combating Computational Heterogeneity in Large-Scale Distributed Computing via Work Exchange. arXiv preprint arXiv:1711.08452. 2017.arxiv.org/abs/1711.08452
  4. [4]R. Bitar, M. Wootters, and S. E. 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. DOI: 10.1109/JSAIT.2020.3242433.arxiv.org/abs/1905.05383
  5. [5]R. D. Blumofe and C. E. Leiserson. “Scheduling Multithreaded Computations by Work Stealing”. In: Journal of the ACM 46.5 (1999), pp. 720–748. DOI: 10.1145/324133.324234.
  6. [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. [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.DOI
  8. [8]N. Charalambides, H. Mahdavifar, and A. O. H. III. “Numerically Stable Binary Gradient Coding”. In: Proc. IEEE International Symposium on Information Theory (ISIT). 2020, pp. 2622–2627.arxiv.org/abs/2001.11449
  9. [9]N. Charalambides, H. Mahdavifar, and A. O. H. 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.DOI
  10. [10]Z. Charles, D. Papailiopoulos, and J. Ellenberg. Approximate Gradient Coding via Sparse Random Graphs. arXiv preprint arXiv:1711.06771. 2017.arxiv.org/abs/1711.06771
  11. [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.DOI
  12. [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.DOI
  13. [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.8457467.arxiv.org/abs/1706.05436
  14. [14]J. 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. [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.DOI
  16. [16]S. Kadhe, O. O. Koyluoglu, and K. Ramchandran. “Communication-Efficient Gradient Coding for Straggler Mitigation in Distributed Learning”. In: Proc. IEEE International Symposium on Information Theory (ISIT). 2020, pp. 2634–2639.arxiv.org/abs/2005.07184
  17. [17]S. P. 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.arxiv.org/abs/1901.09847
  18. [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. [19]S. Kas Hanna et al. Adaptive Stochastic Gradient Descent for Fast and Communication-Efficient Distributed Learning. arXiv preprint arXiv:2208.03134. 2022.
  20. [20]I. 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.DOI
  21. [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.DOI
  22. [22]C. Li and M. 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.arxiv.org/abs/2403.14716
  23. [23]C. Li, M. Xiao, and M. Skoglund. Biased Compression in Gradient Coding for Distributed Learning. arXiv preprint arXiv:2603.16353. 2026.arxiv.org/abs/2603.16353
  24. [24]C. Li et al. Byzantine-Robust and Communication-Efficient Distributed Training: Compressive and Cyclic Gradient Coding. arXiv preprint arXiv:2603.28780. 2026.arxiv.org/abs/2603.28780
  25. [25]S. 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.DOI
  26. [26]T. Li et al. “Federated Optimization in Heterogeneous Networks”. In: Proc. Machine Learning and Systems (MLSys). Vol. 2. 2020, pp. 429–450.
  27. [27]Y. Lin et al. “Deep Gradient Compression: Reducing the Communication Bandwidth for Distributed Training”. In: International Conference on Learning Representations (ICLR). 2018.arxiv.org/abs/1712.01887
  28. [28]R. K. Maity, A. S. Rawat, and A. 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.DOI
  29. [29]J. S. 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.DOI
  30. [30]H. A. Nodehi and M. A. 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.DOI
  31. [31]A. Ramamoorthy and L. 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.DOI
  32. [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.DOI
  33. [33]P. Richtárik, I. Sokolov, and I. Fatkhullin. “EF21: A New, Simpler, Theoretically Better, and Practically Faster Feedback”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 34. 2021, pp. 4384–4396.arxiv.org/abs/2106.05203
  34. [34]H. Rouayheb and K. 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. [35]M. 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.DOI
  36. [36]H. Song and W. Choi. Communication-Efficient Approximate Gradient Coding for Distributed Learning in Heterogeneous Systems. arXiv preprint arXiv:2605.15890. 2026.arxiv.org/abs/2605.15890
  37. [37]S. U. Stich, J.-B. Cordonnier, and M. Jaggi. “Sparsified SGD with Memory”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 31. 2018.arxiv.org/abs/1809.07599
  38. [38]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.
  39. [39]T. Vogels, S. P. Karimireddy, and M. Jaggi. “PowerSGD: Practical Low-Rank Gradient Compression for Distributed Optimization”. In: Advances in Neural Information Processing Systems (NeurIPS). Vol. 32. 2019.arxiv.org/abs/1905.13727
  40. [40]D. Wang, G. Joshi, and G. 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.DOI
  41. [41]H. Wang, Z. Charles, and D. Papailiopoulos. ErasureHead: Distributed Gradient Descent without Delays Using Approximate Gradient Coding. arXiv preprint arXiv:1901.09671. 2019.arxiv.org/abs/1901.09671
  42. [42]J. 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.arxiv.org/abs/2007.07481
  43. [43]H. 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.DOI
  44. [44]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.arxiv.org/abs/1802.03475
  45. [45]Q. 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.

Paper details

vlnc:W_tqv4d8s3
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents