Generalized Reed-Solomon codes over number fields and exact gradient coding

: This paper describes generalized Reed-Solomon (GRS) codes over number fields that are invariant under certain permutations. We call these codes generalized quasi-cyclic (GQC) GRS codes. Moreover, we describe an application of GQC GRS codes over number fields to exact gradient coding


Introduction
Data-intensive machine learning has become widely used, and as the size of training data increases, distributed methods are becoming increasingly popular.However, the performance of distributed methods is mainly determined by stragglers, i.e., nodes that are slow to respond or are unavailable.
Raviv et al. [11] used coding theory and graph theory to reduce stragglers in distributed synchronous gradient descent.A coding theory framework for straggler mitigation, called gradient coding, was first introduced by Tandon et al. [14].Gradient coding consists of a system with one master and n worker nodes, where the data are partitioned into k parts, and one or more parts are assigned to each worker.In turn, each worker computes the partial gradients on each given partition, combines the results linearly according to a predefined vector of coefficients, and sends this linear combination back to the primary node.By choosing the coefficients at each node appropriately, it can be guaranteed that the primary node can reconstruct the full gradient even if a machine fails to do its job.
The importance of straggler mitigation is demonstrated in [8,16].Specifically, it was shown by Tandon et al. [14] that stragglers run up to 5 times slower than the performance of typical workers (8 times in [16]).In [11], for gradient calculations, a cyclic maximum distance separable (MDS) code is used to obtain a better deterministic construction scheme than existing solutions, both in the range of parameters that can be applied and in the complexity of the algorithms involved.
One well-known family of MDS codes is generalized Reed-Solomon (GRS) codes.GRS codes have interesting mathematical structures and many real-world applications, such as mass storage systems, cloud storage systems, and public-key cryptosystems.On the other hand, although more complex than cyclic codes, quasi-cyclic codes satisfy the condition of the Gilbert-Varshamov lower bound at minimum distances, as shown in [6].Quasi-cyclic codes are also equivalent to linear codes with circulant block generator matrices.This type of matrix has circular blocks of the same size, such as m, which denotes the co-indexes of the associated quasi-cyclic code.From this point of view, one way to generalize quasi-cyclic codes is to let the generator matrix have circular blocks of different sizes.This code is called a generalized quasi-cyclic code with shared indices (m 1 , m 2 , . . ., m k ), where m 1 , m 2 , . . ., m k represents the size of the circular block in the generator matrix.
In [10], a generalized quasi-cyclic code without block length limitations is studied.By relaxing the conditions on block length, several new optimal codes with small lengths could be found.In addition, the code decomposition and dimension formulas given by [3,12,13] have been generalized.
In this paper, we describe the construction of generalized quasi-cyclic GRS codes over totally real number fields, as well as their application in exact gradient coding.The construction method is derived by integrating known results from the inverse Galois problem for totally real number fields.Furthermore, methods in [2,4,11,14] will be adapted to generalized quasi-cyclic GRS codes to mitigate stragglers.

Generalized Reed-Solomon codes
Let F be a Galois extension of Q and choose non-zero elements v 1 , . . ., v n in F and distinct elements a 1 , . . ., a n in F. Also, let v = (v 1 , . . ., v n ) and a = (a 1 , . . ., a n ) .For 1 ≤ k ≤ n, define the GRS codes as follows: where F[x] k is the set of all polynomials over F with degree less than k.The canonical generator of GRS n,k (a, v) is given by the following matrix: Theorem 2.1.[7] Let v ∈ F n be a tuple of non-zero elements in F and a ∈ F n be a tuple of pairwise distinct elements in F; then, b) The dual code of GRS n,k (a, v) is as follows: Proof.Let F = F ∪ {∞} and a be an n-tuple of mutually distinct elements of F, and let c be an n-tuple of non-zero elements of F. Also, define ) Let B(a, c) be the k × (n − k) matrix with the following entries: The following proposition shows that the GRS codes are also generalized Cauchy codes.
Proposition 2.3.[9, Proposition C.2] Let a be an n-tuple of mutually distinct elements of F, and let c be an n-tuple of non-zero elements of F. Also, let Let Gal(F/Q) be the Galois group of F over Q and PΓL(2, F) denote the group of semilinear fractional transformations given by where ad − bc 0 and γ ∈ Gal(F/Q).Let S n be the symmetric group on a set of n elements and where a σ(i) = f (a i ) for i = 1, . . ., n is a surjective group homomorphism.

Galois group of a number field
A number field F is a finite Galois extension of the rational field Q.In this section, we describe a way to construct a number field F with Gal(F/Q) ⟨σ⟩ for σ ∈ S n , where ⟨σ⟩ is a cyclic subgroup generated by σ.
Let σ = σ 1 σ 2 • • • σ t be a permutation in S n , where σ 1 , σ 2 , . . ., σ t are disjoint cycles.Also, let ⟨σ⟩ be the cyclic group generated by σ.Let l(σ j ) be the length of the cycle σ j , and define a set P = p : p prime and ∃ j ∈ {1, . . ., t} ∋ p|l(σ j ) .Since P is finite, assume that p 1 < p 2 < • • • < p |P| are all elements in P. For any j, we have where α i j ∈ Z ≥0 .Based on Eq (3.1), we have where ord(σ) is the order of the permutation σ.Since ⟨σ⟩ contains the element of order p max j {α i j } i for all i = 1, . . ., |P|, by the structure theorem for finite Abelian groups, we have Let ζ p be the primitive p-th root of unity and Q(ζ p ) be the corresponding cyclotomic extension of Q.The following theorem shows a Galois extension of Q, where its Galois group is isomorphic to ⟨σ⟩.The proof of the theorem is similar to the proof of [5,Theorem 3.1.11].We write the proof here to give a sense of how to construct the related Galois extension.Theorem 3.1.There exists a totally real Galois extension K of Q such that Gal(K/Q) ⟨σ⟩.
Proof.By Eq (3.3), we have where p is a prime number such that p ≡ 1 mod 2 • ord(σ).

GRS GQC codes over number fields
In this section, we describe a way to construct an invariant GRS code under a given permutation in S n .We call this GRS code the GRS generalized quasi-cyclic (GQC) code.Let σ = σ 1 , σ 2 , • • • , σ t be a permutation in S n , where σ 1 , σ 2 , . . ., σ t are disjoint cycles.Also, let G = ⟨σ⟩ be a cyclic group generated by σ.Theorem 4.1.If σ is a permutation in S n , then there exists a GQC GRS n,k (α, b) over F, with its corresponding permutation being σ for some totally real number field F.
n-tuple of non-zero elements of C n and If Λ and B satisfy the EC condition with respect to β, then, for all r ∈ [t], we have that v r = ∇L S (w (r) ).
Proof.Given r ∈ [t], let B ′ be the matrix whose i-th row b ′ i equals to b i if i ∈ K r , and 0 otherwise.The matrix C in Algorithm 1 can be written as For a given n and s, let C = GRS n,n−s (α, β) GQC code over a number field F with corresponding permutation π of order n.Clearly, the vector β is in C.Moreover, by [11,Lemma 8], there exists a codeword c 1 in C whose support is {1, 2, . . ., s + 1}.Let c i = π i−1 (c 1 ) for i = 2, . . ., n and B = c T 1 , c T 2 , . . ., c T n .Theorem 5.3.The matrix B satisfies the following properties: a) Each row of B is a codeword in σ(C), where σ is a permutation such that c i , c π n−1 (i) , c π n−2 (i) , . . ., c π(i) .
Since ord(π) = n, the i-th row of B is a permutation of c 1 for all i = 1, . . ., n.Moreover, by considering the last row of B, we can see that all rows of B constitute a codeword in σ(C), where σ is the permutation as in Eq (5.1).
where n is the length of the code C. The set Per(C) is called the permutation group of the code C. We have the following theorem that is related to the permutation group of a Cauchy code.Theorem 2.4.[1, Corollary 2] Let C = C k (a, y) be a Cauchy code over F, where 2 ≤ k ≤ n − 2 and a = (a 1 , . . ., a n ) .Also, let L = {a 1 , . . ., a n }.Then, the map

. 1 )
b) w H (b) = s + 1 for each row b in B. c) The column span of B is the code C. d) Every set of n − s rows of B are linearly independent over F. Proof.(a) Let c 1 = (c 1 , . . ., c n ).Notice that the i-th row of B is as follows:

.
choose a prime p such that Let ζ p be the p-th root of unity.By [5, Theorem C.0.3], Q(ζ p ) is a Galois extension of Q, with its corresponding Galois group being isomorphic to G = (Z/pZ) × , where (Z/pZ) × is the multiplicative group of Z/pZ − 0 .Since p is a prime number, G is a cyclic group.Moreover, we can find a unique subgroup H of G such that Let Q(ζ p ) H be a subset of Q(ζ p ) which is invariant under the action of H.By the fundamental theorem of Galois theory ( [15, Theorem 25]), Q(ζ p ) H is also a Galois extension of Q, with the corresponding Galois group isomorphic to G/H.Moreover, |G/H| = Also, by using a similar argument as in the proof of [5, Theorem 3.1.11],we have that Q(ζ p ) H is a totally real Galois extension of Q.The following algorithm provides a way to construct Q(ζ p ) H in the proof of Theorem 3.1.The algorithm is based on Theorem 3.1 and [5, Proposition 3.3.2].Algorithm 3.2.Suppose that σ ∈ S n and G .2) Then, by Proposition 2.3, C k (α, c) is a GRS n,k (α, b) code.Moreover, according to Theorem 2.4 and Eq (4.1), ω(γ) = σ is an element in Per (C k (α, c)) .Example 4.2.Let σ = (1, 2, 3, 4)(5, 6) in S 6 .We would like to construct a GRS code of length 6 over a totally real number field that is invariant under the action of σ.We can see that ord(σ) = 4 and ⟨σ⟩ = Z/4Z.Choose p = 17 so that p ≡ 1 mod 2×4.The corresponding subgroup H of Gal(Q(ζ 17 )/Q) will have the order equal to 4. Since the unique subgroup of (Z/17Z) × with order 4 is {1, 4, 13, 16}, we have H = {λ k |k = 1, 4, 13, 16}, where λ k : ζ 17 → ζ k 17 .Then, we have