Introduction
We introduce a new coding-theoretic property which we call unshardability . This property seeks to address the following central question: Can we intertwine many pieces of data by jointly encoding them such that it is impossible to delete any single piece without also deleting many others? This problem is intuitively motivated by censorship resistance: an adversary playing the role of a public data store holds the encoded data and should not be able to selectively censor any individual piece of data without causing significant collateral damage deleting much more.
To formalize this goal we first need a more precise notion of what it means for a piece of data to be deleted. Let C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n be any encoding map. We say a subset T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] determines i ∈ [ k ] i \in[k] i ∈ [ k ] (with respect to C C C ) if every pair of messages m , m ′ \mathbf{m},\mathbf{m}' m , m ′ that disagree at the i i i th coordinate also disagree on their codewords restricted to T T T : C ( m ) ∣ T ≠ C ( m ′ ) ∣ T C(\mathbf{m})|_T \ne C(\mathbf{m}')|_T C ( m ) ∣ T = C ( m ′ ) ∣ T . We think of a component m i m_i m i of the message as having been deleted if i i i is not determined by the set of remaining codeword symbols after some erasures. We are now ready to present our main definition.
Definition 1.1 (Unshardable Codes). Let C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n . We say C C C is ( ℓ , s ) (\ell,s) ( ℓ , s ) -unshardable if it satisfies the following two properties:
Local decoding under no errors: For every i ∈ [ k ] i \in[k] i ∈ [ k ] there is a subset D ⊆ [ n ] D \subseteq[n] D ⊆ [ n ] of size at most ℓ \ell ℓ that determines i i i .
Unshardability: Take any arbitrary pattern of codeword symbol erasures and let T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] denote the set of non-erased symbols. If there is some index i ∈ [ k ] i \in[k] i ∈ [ k ] that is not determined by T T T , then the same is true of at least s s s such indices. Equivalently, T T T either determines all of [ k ] [k] [ k ] , or fails to determine all j j j in a set S ⊆ [ k ] S \subseteq[k] S ⊆ [ k ] of size at least s s s .
We propose this as a natural coding-theoretic property that has a distinct flavor relative to other notions considered in the literature. For instance, whereas error correction seeks to upper bound the impact of a “small enough” number of errors, unshardability lower bounds the damage of a “large enough” number of erasures. Local decoding says that each data location can be recovered efficiently by only reading a few codeword locations, while unshardability requires the data to be intertwined. Therefore, the two properties are seemingly contradictory and it is a priori unclear whether they can be satisfied simultaneously with good parameters e.g., ℓ = o ( k ) \ell= o(k) ℓ = o ( k ) and s = Ω ( k ) s = \Omega(k) s = Ω ( k ) .1 {}^{1} 1
Unshardability with Erasures vs. Errors. The unshardability property, as we’ve defined it, gives a guarantee on the behavior of destroying data in the presence of an arbitrary unbounded set of erasures . It is natural to ask what happens if consider an arbitrary set of errors . However this is too strong to be achievable. For instance, for any target i ∈ [ k ] i \in[k] i ∈ [ k ] , an adversary could simply overwrite the codeword with the values ( m j ) j ≠ i (m_j)_{j \ne i} ( m j ) j = i (and erase/zero out any remaining symbols). Clearly under these errors, the modified codeword determines all components of m \mathbf{m} m except the i i i th. Therefore, we naturally restrict our definition to erasures. Furthermore, referring back to the motivating example of censorship resistance, one also could potentially justify the erasure model using cryptographic authentication techniques (e.g., based on Merkle hashing) to enforce that the adversary can only erase and not introduce new errors.2 {}^{2} 2
Local Decoding with Bounded Errors. It is also natural to ask whether the errorless local decoding property can be strengthened to support local decoding in the presence of a bounded fraction of errors. Here the answer is yes, and we also consider that definition in this work. Concretely we say C C C is a ( δ , ℓ , s ) (\delta,\ell,s) ( δ , ℓ , s ) -unshardable code if it meets the above definition where we replace the first condition with the following: There exists a randomized local decoding algorithm L w ( i ) \mathcal{L}^{w}(i) L w ( i ) that reads at most ℓ \ell ℓ locations from w \mathbf{w} w and outputs m i m_i m i with probability at least 3 / 4 3/4 3/4 whenever w \mathbf{w} w is at most δ \delta δ -far in relative Hamming distance from C ( m ) C(\mathbf{m}) C ( m ) . Effectively such a code is a ( δ , ℓ ) (\delta,\ell) ( δ , ℓ ) -locally decodable code with an additional unshardability property added on.
General vs. Linear Codes. Our notion of unshardability is well defined for general codes. However, unshardability in the case of nonlinear codes is quite subtle. For example, if C C C is a nonlinear code and m \mathbf{m} m is uniformly random, C ( m ) ∣ T C(\mathbf{m})|_T C ( m ) ∣ T may information theoretically determine partial information about m i m_i m i (such as its most significant bit) without (fully) determining it in the above sense. On the other hand, in the setting of linear codes, if T T T determines m i m_i m i in the sense defined above, then C ( m ) ∣ T C(\mathbf{m})|_T C ( m ) ∣ T uniquely determines m i m_i m i in the information-theoretic sense and otherwise contains no information about m i m_i m i . This makes unshardability much more effective and intuitively appealing for linear codes. Coupled with the efficiency and simplicity of linear codes, in this work all our constructions will be restricted to linear codes.
Limitation of Unshardable Codes. We observe that any unshardable code cannot be systematic. Indeed if C ( m ) = ( m , c ′ ) C(\mathbf{m})=(\mathbf{m},c') C ( m ) = ( m , c ′ ) then setting T = [ k ] ∖ { i } T=[k]\setminus\{i\} T = [ k ] ∖ { i } for any i ∈ [ k ] i\in[k] i ∈ [ k ] and erasing the rest of the symbols in the codeword clearly deletes i i i , but T T T still determines all other indices. This argument can be generalized in a straightforward manner to yield the following lower bound that demonstrates a trade-off between unshardability and locality that we will prove formally later in § 3 .
Theorem 1.2 (Limits of unshardable codes). If a linear code C : F k → F n C:\mathbb{F}^{k}\to\mathbb{F}^{n} C : F k → F n is ( ℓ , s ) (\ell,s) ( ℓ , s ) -unshardable, then we must have
s ≤ k − k / ℓ + 1. s \le k-k/\ell+1. s ≤ k − k / ℓ + 1.
Simple Constructions of Unshardability without Local Decoding. Next we note that achieving unshardability without local decoding is easy. For an illustrative example, consider a Reed-Solomon code C : F k → F n C:\mathbb{F}^{k}\to\mathbb{F}^{n} C : F k → F n under the evaluation encoding map: interpret m \mathbf{m} m as the evaluations of a degree k − 1 k-1 k − 1 polynomial p m p_{\mathbf{m}} p m on some fixed set of distinct α 1 , … , α k ∈ F ∖ { 0 } \alpha_1,\ldots,\alpha_k\in\mathbb{F}\setminus\{0\} α 1 , … , α k ∈ F ∖ { 0 } , then C ( m ) = ( p m ( β 1 ) , … , p m ( β n ) ) C(\mathbf{m})=(p_{\mathbf{m}}(\beta_1),\ldots,p_{\mathbf{m}}(\beta_n)) C ( m ) = ( p m ( β 1 ) , … , p m ( β n )) for another set of distinct β 1 , … , β n ∈ F ∖ { 0 } \beta_1,\ldots,\beta_n\in\mathbb{F}\setminus\{0\} β 1 , … , β n ∈ F ∖ { 0 } disjoint from the α i \alpha_i α i ’s.10 For any T ⊆ [ n ] T\subseteq[n] T ⊆ [ n ] , the data of C ( m ) ∣ T C(\mathbf{m})|_T C ( m ) ∣ T is a set of ∣ T ∣ |T| ∣ T ∣ evaluations of a polynomial of degree k − 1 k-1 k − 1 . If ∣ T ∣ ≥ k |T|\ge k ∣ T ∣ ≥ k then T T T determines all i ∈ [ k ] i\in[k] i ∈ [ k ] by interpolation, but if ∣ T ∣ < k |T|<k ∣ T ∣ < k then T T T doesn’t determine any i i i because k − 1 k-1 k − 1 evaluations of a degree k − 1 k-1 k − 1 polynomial cannot determine its value at any other different k k k th point. Thus this Reed-Solomon code has unshardability s = k s=k s = k . This argument works even if k = n k=n k = n which demonstrates that the unshardability of a code is independent of its distance. The fact that Reed-Solomon codes have high unshardability is related to the fact that they are maximum distance separable (MDS).11
Challenges. Here, we try to point to some of the difficulties in constructing unshardable codes (with local decoding), and show why certain natural extensions do not work, before moving on to our final constructions. First, we note that we can modify the trivial construction from the above paragraph to get some simple tradeoff between unshardability and locality, though with poor parameters. Simply “batch” the message into k \sqrt{k} k -size chunks and apply a Reed-Solomon code block-wise. To decode i i i , one must only look at the codeword for its batch, and to delete i i i one must delete the whole batch, hence this is a ( k , k ) (\sqrt{k},\sqrt{k}) ( k , k ) -unshardable code. This trivial argument works for any parameters not just k \sqrt{k} k , but never gives unshardability s s s better than locality ℓ \ell ℓ . Thus, in our actual results below, we will aim at achieving ( o ( k ) , Ω ( k ) ) (o(k),\Omega(k)) ( o ( k ) , Ω ( k )) -unshardable codes. In fact, our main constructions will achieve optimal or almost optimal trade-offs, nearly matching the limits set by Theorem 1.2.
Another natural attempt may be to try and extend the Reed-Solomon construction by taking more variables (denoted m > 1 m > 1 m > 1 ), i.e., a tensor-product of Reed-Solomon codes. For such a design to work, one has to come up with a suitable choice of the message evaluation points (denoted I ⊆ F q m I \subseteq\mathbb{F}_q^m I ⊆ F q m )12 and the codeword evaluation points (denoted E ⊆ F q m E \subseteq\mathbb{F}_q^m E ⊆ F q m ). While such codes can be shown to have local decodability (e.g. O ( d ) = O ( k ) O(d)=O(\sqrt{k}) O ( d ) = O ( k ) queries when m = 2 m=2 m = 2 ), in fact, even in the presence of a constant fraction of errors, obtaining interesting bounds on unshardability remains unclear (for any choice of I I I and E E E ). In fact, we establish a negative result for some natural evaluation sets (in particular, when I = S 2 I=S^2 I = S 2 , where S ⊆ F q S \subseteq\mathbb{F}_q S ⊆ F q is a subfield and E ⊇ S ‾ 2 E \supseteq\overline{S}^2 E ⊇ S 2 ). We defer the details to Appendix § 9 .
Our Results
As our main technical contribution we give a generic transformation from any linear code to one with almost optimal unshardability. The transformation preserves the rate and distance of the underlying code but does require a larger (but still constant) field size. Instantiating our transformation with an asymptotically good code yields the following theorem.
Theorem 1.3 (Explicit unshardable codes). For every R < 1 R < 1 R < 1 and ε > 0 \varepsilon> 0 ε > 0 , there exists q ≤ 2 O R ( 1 / ε ) q \leq2^{O_R(1/\varepsilon)} q ≤ 2 O R ( 1/ ε ) and an explicit infinite family of linear codes G : F q k → F q n G:\mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n of rate at least R R R that are ( O R ( 1 / ε ) , ( 1 − ε ) k ) (O_R(1/\varepsilon),(1-\varepsilon)k) ( O R ( 1/ ε ) , ( 1 − ε ) k ) -unshardable .
We complement the above results with another set of incomparable results as we discuss in the below remark:
achieve Maximum-Distance-Separability (MDS) in addition to unshardability (see Theorem 6.7 ). We refer to § 6 for these results.
Next we shift our focus to the setting of ( δ , ℓ , s ) (\delta,\ell,s) ( δ , ℓ , s ) -unshardable codes that have local decoding in the presence of errors. First we show that if we instantiate our generic transformation with a locally correctable code (LCC) we can achieve local decoding in the presence of errors, at the cost of increasing the locality parameter, degrading the tradeoff between locality and unshardability. Plugging in the state of the art LCCs due to Kopparty, Meir, Ron-Zewi, and Saraf [KMRS17] to our transformation yields the following theorem.
Theorem 1.5 (High-rate unshardable LDCs). For every R < 1 R < 1 R < 1 and ε > 0 \varepsilon> 0 ε > 0 , there exist δ = δ ( R ) > 0 \delta= \delta(R) > 0 δ = δ ( R ) > 0 , q ≤ 2 O R ( 1 / ε ) q \leq2^{O_R(1/\varepsilon)} q ≤ 2 O R ( 1/ ε ) , and an explicit infinite family of linear codes G : F q k → F q n G : \mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n of rate at least R R R that are ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable, where ℓ = O R ( exp ( log n log log n ) ⋅ ε − 2 ⋅ log ( 1 / ε ) ) \ell= O_R(\exp(\sqrt{\log n \log\log n}) \cdot\varepsilon^{-2} \cdot\log(1/\varepsilon)) ℓ = O R ( exp ( log n log log n ) ⋅ ε − 2 ⋅ log ( 1/ ε )) .
In particular, the query complexity is subpolynomial in the blocklength of the code n n n . As with Theorem 1.3, we prove a more general transformation of any LCC into an unshardable one (see Theorem 5.1 ) – in particular, on the other end of the spectrum, we can also achieve relative distance approaching 1 / 2 1/2 1/2 (and error parameter δ → 1 / 4 \delta\to1/4 δ → 1/4 ) with constant rate.
Finally, we show that we can slightly modify our generic transformation into a similar transformation that converts a given LDC directly into an unshardable LDC. We instantiate this with the constant-query LDCs of Efremenko [7 ] yielding the following theorem.
Theorem 1.7 (Constant-query unshardable LDCs). For every r ∈ N r \in\mathbb{N} r ∈ N and ε > 0 \varepsilon> 0 ε > 0 , there exist δ = δ ( r ) > 0 \delta= \delta(r) > 0 δ = δ ( r ) > 0 , q ≤ 2 O ( 1 / ε ) q \leq2^{O(1/\varepsilon)} q ≤ 2 O ( 1/ ε ) , and an explicit infinite family of linear codes G : F q k → F q n G : \mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n that are ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable, where ℓ = O ( 2 r ⋅ ε − 2 ⋅ log ( 1 / ε ) ) \ell= O(2^r \cdot\varepsilon^{-2} \cdot\log(1/\varepsilon)) ℓ = O ( 2 r ⋅ ε − 2 ⋅ log ( 1/ ε )) and n = exp ( exp ( log k log log r − 1 k r ) ) n = \exp(\exp(\sqrt[r]{\log k \log\log^{r-1} k})) n = exp ( exp ( r log k log log r − 1 k )) .
In particular, we obtain subexponential length codes with near-maximal unshardability and constant-query local decoding.
Local-Local Unshardability
In a separate direction, we also briefly consider an incomparable variant of unshardability and prove a strong lower bound for that variant. Our main definition (Definition 1.1 ) considers a global notion of deletion: if i i i is not determined by reading all of c ∣ T c|_T c ∣ T then so are many other indices. We can also consider a “local-local” notion of unshardability: if i i i is not determined by reading any small number of locations in c ∣ T c|_T c ∣ T then the same is true of many other indices. This local-local unshardability is incomparable to (standard) unshardability because both the premise and conclusion are weaker. Nonetheless we prove a strong lower bound that any ( ℓ , s ) (\ell,s) ( ℓ , s ) -local-local unshardable code must have s ≤ ℓ s \leq\ell s ≤ ℓ , effectively ruling out any non-trivial constructions. See § 7 for details.
Technical Overview
The key steps involved in arriving at our constructions of unshardable codes are sketched below:
Idea 1: A useful criterion for unshardability. Let us start with the goal of constructing the generating matrix G ∈ F q k × n G \in\mathbb{F}_q^{k \times n} G ∈ F q k × n of a linear code with some non-trivial unshardability s ≥ 2 s \ge2 s ≥ 2 . A preliminary observation highlighted in the above subsection is that G G G cannot contain the k × k k \times k k × k identity matrix (denoted I k I_k I k ) as a submatrix. On the contrary, if G G G does contain I k I_k I k as a submatrix, there exists a subset of columns T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] of size k − 1 k-1 k − 1 such that the corresponding submatrix G T G_T G T has a vector of Hamming weight 1 in its (left) kernel. This suggests that we want to have vectors of large Hamming weight in the kernel of the submatrix G T G_T G T (whenever it is non-empty). Indeed if we have m T G T = 0 T \mathbf{m}^{\mathsf{T}}G_T = \mathbf{0}^{\mathsf{T}} m T G T = 0 T for some message m ∈ F q k \mathbf{m} \in\mathbb{F}_q^k m ∈ F q k , then it is easy to see that every coordinate i ∈ [ k ] i \in[k] i ∈ [ k ] such that m i ≠ 0 m_i \ne0 m i = 0 is not determined by T T T . This is exactly the condition we will exhibit in our constructions to show that a given code has high unshardability (see Proposition 3.1 ).
Idea 2: Sparse rebasing. Now, it remains to design the code G G G with the above property while also being locally decodable (under no erasures or errors, to begin with). Equivalently, we want to ensure that each standard basis vector 1 i \mathbf{1}_i 1 i can be spanned by a small number of columns of G G G . One natural way to achieve this (while avoiding I k I_k I k as a submatrix) is by taking
G = [ A A + I k ] , G = \begin{bmatrix} A & A + I_k \end{bmatrix}, G = [ A A + I k ] ,
for some A ∈ F q k × k A \in\mathbb{F}_q^{k \times k} A ∈ F q k × k . Viewed differently, the above matrix G G G is obtained by applying some simple elementary column operations to manufacture locality (hence the name sparse rebasing ). However, we have to choose A A A such that the linear-algebraic criterion from Idea 1 applies to G G G . It turns out that one can further show that if all the “large” submatrices of G G G are full rank (this property is known as superregularity (see Definition 2.13 )), then the linear-algebraic criterion indeed applies, giving the desired bounds on unshardability. Using known (relatively simple) constructions of superregular matrices for the matrix A A A , and a careful argument to “transfer” the superregularity from A A A to G G G , we thus get explicit constructions of codes with locality 2 and unshardability Ω ( k ) \Omega(k) Ω ( k ) over sufficiently large fields (see § 6 ).
Idea 3: Sparse rebasing w.r.t. extension fields. The challenge remains to obtain unshardable codes over a constant-alphabet (i.e., prove Theorem 1.3). For this we abstract out the sparse rebasing notion above more generally such that we need not have to analyze the superregularity of a base code anymore but instead only take advantage of its relative distance. Let A ∈ F q k × n A \in\mathbb{F}_q^{k \times n} A ∈ F q k × n be a code and B ∈ F q k × k B \in\mathbb{F}_q^{k \times k} B ∈ F q k × k be an invertible matrix such that each column of B B B is a “sparse” linear combination of columns of A A A . Then, we essentially have access to a locally decodable code (under no errors) given by the map
m T B ↦ m T A . \mathbf{m}^{\mathsf{T}}B \mapsto\mathbf{m}^{\mathsf{T}}A. m T B ↦ m T A .
The linear-algebraic criterion from Item 1 (under this basis change) translates to saying that we want to exhibit a message m ∈ F q k \mathbf{m} \in\mathbb{F}_q^k m ∈ F q k such that ⟨ m , b i ⟩ ≠ 0 \langle\mathbf{m}, \mathbf{b}_i\rangle\ne0 ⟨ m , b i ⟩ = 0 for many i ∈ [ k ] i \in[k] i ∈ [ k ] , while at the same time having ⟨ m , a i ⟩ = 0 \langle\mathbf{m}, \mathbf{a}_i\rangle= 0 ⟨ m , a i ⟩ = 0 for all i ∈ T i \in T i ∈ T , where b 1 , … , b n \mathbf{b}_1,\ldots,\mathbf{b}_n b 1 , … , b n and a 1 , … , a n \mathbf{a}_1,\ldots,\mathbf{a}_n a 1 , … , a n denote the columns of B B B and A A A respectively. Taking m ≠ 0 \mathbf{m} \ne\mathbf{0} m = 0 to be an arbitrary vector in the kernel of A T A_T A T (if one exists), we observe that ⟨ m , a i ⟩ ≠ 0 \langle\mathbf{m},\mathbf{a}_i\rangle\ne0 ⟨ m , a i ⟩ = 0 for a constant fraction of the coordinates if A A A has a constant relative distance.
The goal now is to design the sparse column combinations of A A A so that these non-zeroes translate to many of the inner products ⟨ m , a i ⟩ \langle\mathbf{m},\mathbf{a}_i\rangle ⟨ m , a i ⟩ being non-zero. In turn, we want an edge-labeled (with field elements, denoting the sparse linear combinations) n × k n \times k n × k bipartite graph H H H such that the many non-zeroes on the left are “well-propagated” to the right (the precise notion we need here is vertex-expansion – see Claim 4.5 ). This is because ⟨ m , b i ⟩ \langle\mathbf{m},\mathbf{b}_i\rangle ⟨ m , b i ⟩ (for some i ∈ [ k ] i \in[k] i ∈ [ k ] ) is a corresponding sparse linear combination of the inner products corresponding to the set of left-neighbors of i i i . Now, without loss of generality, suppose we have
b i = ∑ j = 1 ℓ λ i ⋅ a i , \mathbf{b}_i = \sum_{j=1}^{\ell} \lambda_i \cdot\mathbf{a}_i, b i = j = 1 ∑ ℓ λ i ⋅ a i ,
for some small sparsity ℓ ∈ N \ell\in\mathbb{N} ℓ ∈ N and λ i ∈ F q \lambda_i \in\mathbb{F}_q λ i ∈ F q . In turn, we get
⟨ m , b i ⟩ = ∑ i = 1 ℓ λ i ⋅ ⟨ m , a i ⟩ . (1) \langle\mathbf{m},\mathbf{b}_i\rangle= \sum_{i=1}^{\ell} \lambda_i \cdot\langle\mathbf{m},\mathbf{a}_i\rangle. \tag*{(1)} ⟨ m , b i ⟩ = i = 1 ∑ ℓ λ i ⋅ ⟨ m , a i ⟩ . (1)
Had it turned out that each inner product term of (1) lies in a small subfield of F q \mathbb{F}_q F q , and λ i \lambda_i λ i ’s were say “generic” field elements, then one can guarantee that if any of the inner products on the RHS of (1) is non-zero (which happens for many i ∈ [ k ] i \in[k] i ∈ [ k ] due to high distance of the code A A A and good vertex expansion of H H H ), then the LHS of (1) is also non-zero (since some λ i \lambda_i λ i “survives”). Stated slightly differently and more explicitly, it suffices to take the coefficients λ i \lambda_i λ i to be F q \mathbb{F}_q F q -linearly independent elements from a field extension F q b \mathbb{F}_q^b F q b for a sufficiently large b ∈ N b \in\mathbb{N} b ∈ N . Thus, the basis change matrix B B B and our final code (i.e., G = B − 1 A G = B^{-1}A G = B − 1 A ) will be over an extension field and have the desired sparsity/locality (governed by the maximum degree of H H H ) and unshardability (governed by the expansion of H H H and distance of the code A A A ) – see Theorem 4.4 for the final parameters (for q = 2 q = 2 q = 2 ).
We note that one has to prove that matrix B B B we get at the end of the above rebasing is invertible. This is done by carefully setting the values of some of the coefficients λ i ∈ F q \lambda_i \in\mathbb{F}_q λ i ∈ F q of (1) in a special manner (see Claim 4.6).
We point out here that the above construction closely resembles constructions of graph-based codes of Gallager [Gal62] (and many more later developments in coding theory; see e.g. [Tan81; ABNNR92; AEL95; SS96]) which use similar “belief-propagation” arguments. However, it is worth noting that in our context, the graph (i.e., H H H ) interacts with the generator matrix of a code (i.e., A A A ), whereas in expander code constructions, (the parity-check matrix of) a code is defined based on a graph. Another key innovation is in using a field extension to reason about the number of right-vertices that evaluate to a non-zero value given a non-zero assignment (from the base field) to the left-vertices.
Idea 4: Local decodability under errors. Our final result is for constructing unshardable codes that are locally decodable in the presence of constant fraction of erasures or errors. The key ideas from the above construction (Idea 3) are sufficiently robust to almost immediately give this result. More specifically, we take the base code A A A above to be one that is locally correctable from errors. Then, since the columns of B B B are sparse combinations of columns of
A A A , the local correctability of A A A is enough to get local decodability for G G G up to the same error parameter. We instantiate this reduction with existing LCCs and LDCs to obtain unshardable codes with this stronger local decodability feature (see Theorem 5.1 ).
We remark that the source of Ideas 3 and 4 was AI. In particular, while we can construct explicit unshardable codes using connection to superregular matrices (and other results from § 6 ), it was not clear to us how to extend those constructions to the setting of local decodability under errors (i.e., Theorem 1.5), until the notion of a sparse rebasing over an extension field was brought into the picture.
Organization. We present the required coding-theoretic preliminaries in § 2 . Then in § 3 we provide a linear-algebraic criterion for high unshardability that will be used throughout the paper. In § 4 , we set up the main frameworks to construct unshardable codes and prove Theorem 1.3 (i.e., unshardable codes that only locally decodable under no errors). In § 5 , we then give constructions that also work under a constant fraction of errors (i.e., Theorem 1.5 and Theorem 1.7). We then give multiple improvements and incomparable constructions (for the no-error version) in § 6 based on superregularity criteria discussed above. Finally in § 7 , we discuss close variants of our main notion of unshardability.
Preliminaries
Let F = F q \mathbb{F} = \mathbb{F}_q F = F q denote the finite field of size q q q (where q q q is a prime power) and F × = F ∖ { 0 } \mathbb{F}^{\times} = \mathbb{F} \setminus\{0\} F × = F ∖ { 0 } denote its multiplicative group. For positive integers k k k and i ∈ [ k ] i \in[k] i ∈ [ k ] , let 1 i ∈ F k \mathbf{1}_i \in\mathbb{F}^k 1 i ∈ F k denote the i i i -th standard basis vector. We use span ( ⋅ ) \operatorname{span}(\cdot) span ( ⋅ ) (or span F ( ⋅ ) \operatorname{span}_{\mathbb{F}}(\cdot) span F ( ⋅ ) to be more explicit when dealing with subfields/extension fields) and dim ( ⋅ ) \dim(\cdot) dim ( ⋅ ) to denote the F \mathbb{F} F -linear span and dimension of a subset of vectors in F k \mathbb{F}^k F k . We use rank ( ⋅ ) \operatorname{rank}(\cdot) rank ( ⋅ ) to denote the rank of a matrix, and det ( ⋅ ) \det(\cdot) det ( ⋅ ) the determinant of a square matrix.
For a finite alphabet Σ \Sigma Σ , D ⊆ [ n ] D \subseteq[n] D ⊆ [ n ] , and u ∈ Σ n \mathbf{u} \in\Sigma^n u ∈ Σ n , let u ∣ D ∈ Σ D \mathbf{u}|_D \in\Sigma^D u ∣ D ∈ Σ D denote the vector obtained by restricting u \mathbf{u} u to the coordinates of D D D . For a , b ∈ Σ n \mathbf{a},\mathbf{b} \in\Sigma^n a , b ∈ Σ n , let Δ ( a , b ) \Delta(\mathbf{a},\mathbf{b}) Δ ( a , b ) denote their Hamming distance and δ ( a , b ) : = Δ ( a , b ) / n \delta(\mathbf{a},\mathbf{b}) := \Delta(\mathbf{a},\mathbf{b})/n δ ( a , b ) := Δ ( a , b ) / n their relative Hamming distance. Let ∣ a ∣ : = Δ ( a , 0 ) |\mathbf{a}| := \Delta(\mathbf{a},\mathbf{0}) ∣ a ∣ := Δ ( a , 0 ) denote the Hamming weight of a \mathbf{a} a . We say that a code C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n has rate k / n k/n k / n and distance min m 1 ≠ m 2 ∈ Σ k Δ ( C ( m 1 ) , C ( m 2 ) ) \min_{\mathbf{m}_1 \ne\mathbf{m}_2 \in\Sigma^k} \Delta(C(\mathbf{m}_1), C(\mathbf{m}_2)) min m 1 = m 2 ∈ Σ k Δ ( C ( m 1 ) , C ( m 2 )) . We refer to the distance divided by the blocklength n n n as the relative distance of the code. It is desirable to have both rate and relative distance be constants bounded away from zero – we call such families of codes asymptotically good. For a matrix M ∈ Σ m × n M \in\Sigma^{m \times n} M ∈ Σ m × n and A ⊆ [ m ] A \subseteq[m] A ⊆ [ m ] and B ⊆ [ n ] B \subseteq[n] B ⊆ [ n ] , we let M A , B M_{A,B} M A , B denote the submatrix of M M M with rows indexed by A A A and columns indexed by B B B . We let M A , : : = M A , [ n ] M_{A,:} := M_{A,[n]} M A , : := M A , [ n ] and M : , B : = M [ m ] , B M_{:,B} := M_{[m],B} M : , B := M [ m ] , B . We say that C C C is a linear code with generating matrix G ∈ F k × n G \in\mathbb{F}^{k \times n} G ∈ F k × n if Σ = F \Sigma= \mathbb{F} Σ = F , rank ( G ) = k \operatorname{rank}(G) = k rank ( G ) = k , and C ( m ) : = m T G C(\mathbf{m}) := \mathbf{m}^{\mathsf{T}}G C ( m ) := m T G . We say that G G G (and C C C ) is systematic if G : , k = I G_{:,k} = I G : , k = I (i.e., the identity matrix).
Main Notions: Locality and Unshardability
Now, we define the notions of local decodability and unshardability of codes more formally.
Definition 2.1 (Locality under no errors). A code C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n is said to be ℓ \ell ℓ -locally decodable (or “has locality ℓ \ell ℓ ”) if for all indices i ∈ [ k ] i \in[k] i ∈ [ k ] , there exists a set D ⊆ [ n ] D \subseteq[n] D ⊆ [ n ] of size at most ℓ \ell ℓ such that
∀ m , m ′ ∈ Σ k : C ( m ) ∣ D = C ( m ′ ) ∣ D ⟹ m i = m i ′ . (2) \forall\mathbf{m}, \mathbf{m}' \in\Sigma^k : C(\mathbf{m})|_D = C(\mathbf{m}')|_D \Longrightarrow m_i = m'_i. \tag*{(2)} ∀ m , m ′ ∈ Σ k : C ( m ) ∣ D = C ( m ′ ) ∣ D ⟹ m i = m i ′ . (2)
We refer to the condition (2) as saying D D D determines i i i w.r.t. C C C .
The following standard observation gives a linear-algebraic characterization for the notion of determining message symbols for linear codes.
Observation 2.2. Let the columns of G ∈ F k × n G \in\mathbb{F}^{k \times n} G ∈ F k × n be denoted by v 1 , v 2 , … , v n ∈ F k \mathbf{v}_1,\mathbf{v}_2,\ldots,\mathbf{v}_n \in\mathbb{F}^k v 1 , v 2 , … , v n ∈ F k . For i ∈ [ k ] i \in[k] i ∈ [ k ] and D ⊆ [ n ] D \subseteq[n] D ⊆ [ n ] , D D D determines i i i w.r.t. G G G if and only if 1 i ∈ span { v j : j ∈ D } \mathbf{1}_i \in\operatorname{span}\{\mathbf{v}_j : j \in D\} 1 i ∈ span { v j : j ∈ D } .
Definition 2.3 (Locality under errors). A code C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n is said to be ( δ , ℓ ) (\delta,\ell) ( δ , ℓ ) -locally decodable (or “has locality ℓ \ell ℓ up to error δ \delta δ ”) if there exists a randomized algorithm L \mathcal{L} L , which when given as input an index i ∈ [ k ] i \in[k] i ∈ [ k ] and oracle access to a word w ∈ F n \mathbf{w} \in\mathbb{F}^n w ∈ F n such that δ ( w , C ( m ) ) ≤ δ \delta(\mathbf{w},C(\mathbf{m})) \leq\delta δ ( w , C ( m )) ≤ δ for some message m ∈ F k \mathbf{m} \in\mathbb{F}^k m ∈ F k , makes at most ℓ \ell ℓ oracle queries and outputs m i m_i m i with probability at least 3 / 4 3/4 3/4 . That is13 :
Pr [ L w ( i ) = m i ] ≥ 3 / 4. \Pr[\mathcal{L}^{\mathbf{w}}(i)=m_i] \geq3/4. Pr [ L w ( i ) = m i ] ≥ 3/4.
Unless mentioned otherwise, we reserve the phrases Locally Decodable Codes (LDCs) and Locally Correctable Codes (LCCs) for when the error parameter δ = Ω ( 1 ) \delta= \Omega(1) δ = Ω ( 1 ) and ℓ = o ( k ) \ell= o(k) ℓ = o ( k ) . Although our primary interest is local decodable codes (LDCs) in this paper, some of our constructions make use of locally correctable codes (LCCs). In particular, we will use the following constructions of LDCs and LCCs in a black-box way for some of our main results.
Theorem 2.5 ([KMRS17, Theorem 1.1]). The following statements hold true for infinitely many k k k . For every ε > 0 \varepsilon> 0 ε > 0 , there exist δ > 0 \delta> 0 δ > 0 and explicit linear codes C : F 2 k → F 2 n C : \mathbb{F}_2^k \to\mathbb{F}_2^n C : F 2 k → F 2 n of rate at least 1 − ε 1-\varepsilon 1 − ε and relative distance at least δ \delta δ that are ( δ , exp ( log n log log n ) ) (\delta,\exp(\sqrt{\log n \log\log n})) ( δ , exp ( log n log log n )) -locally correctable.14 Moreover, the above codes are systematic linear codes, so they are also locally decodable with the same parameters.
Theorem 2.6 ([7 Theorem 3.6] ). For every r ∈ N r \in\mathbb{N} r ∈ N , there exists δ = δ ( r ) > 0 \delta=\delta(r)>0 δ = δ ( r ) > 0 and infinitely many k ∈ N k \in\mathbb{N} k ∈ N such that there are explicit linear codes C : F 2 k → F 2 n C : \mathbb{F}_2^k \to\mathbb{F}_2^n C : F 2 k → F 2 n of relative distance at least δ \delta δ that are ( δ , O ( 2 r ) ) (\delta,O(2^r)) ( δ , O ( 2 r )) -locally decodable with n = exp ( exp ( log k log r − 1 k r ) ) n=\exp(\exp(\sqrt[r]{\log k \log^{r-1} k})) n = exp ( exp ( r log k log r − 1 k )) .
We now formally define the notion of unshardability that we introduce in this paper.
Definition 2.7 (Unshardability). A code C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n is said to be s s s -unshardable (or “has unshardability s s s ”) if the following holds for all sets T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] : If there exists an index i ∈ [ k ] i \in[k] i ∈ [ k ] that is not determined by T T T , then there are at least s s s such indices.
We note that unshardability is most interesting in the context of linear codes (as also indicated by our results) since Observation 2.2 implies that if some message index i ∈ [ k ] i \in[k] i ∈ [ k ] is not determined, then it is completely undetermined , as in each alphabet symbol is equally likely to be the actual message symbol m i m_i m i for a random message.
Locality and unshardability are opposing features of a code. We combine these two definitions to arrive at the main focus of this paper.
Definition 2.8 ((δ , ℓ , s \delta,\ell,s δ , ℓ , s )-unshardable). A code C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n is said to be ( δ , ℓ , s ) (\delta,\ell,s) ( δ , ℓ , s ) -unshardable if it is ( δ , ℓ ) (\delta,\ell) ( δ , ℓ ) -locally decodable and s s s -unshardable.
Abusing notation slightly, we refer to a weaker notion of ( ℓ , s ) (\ell,s) ( ℓ , s ) -unshardable to mean that the code is ℓ \ell ℓ -locally decodable and s s s -unshardable.
MDS Codes and Superregularity
We now define Maximum Distance Separable (MDS) codes, which are codes that achieve the best rate-distance trade-off.
Definition 2.9 (MDS code). We say that G : F k → F n G : \mathbb{F}^k \to\mathbb{F}^n G : F k → F n is a (linear) MDS code if d = n − k + 1 d = n-k+1 d = n − k + 1 , where d d d is the distance of the code G G G . Equivalently, every collection of k k k columns of G G G are linearly independent.
It is easy to see that for linear codes, MDS property is independent under a basis change, i.e., for all invertible matrices A ∈ F k × k A \in\mathbb{F}^{k \times k} A ∈ F k × k , G G G is MDS if and only if A G AG A G is MDS. Moreover, MDS codes are easy to construct explicitly, where throughout the paper, we say that a code G : F q k → F q n G : \mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n is explicit if its generating matrix can be deterministically constructed in time poly ( k , n , log q ) \operatorname{poly}(k,n,\log q) poly ( k , n , log q ) given as input k k k , n n n , and q q q . In fact, it is well-known that the Reed-Solomon code is MDS:
Definition 2.10 (Reed-Solomon code). Let k , n ≥ 1 k,n \ge1 k , n ≥ 1 be integers and α 1 , … , α n ∈ F \alpha_1,\ldots,\alpha_n \in\mathbb{F} α 1 , … , α n ∈ F be pairwise distinct elements. Then the corresponding Reed-Solomon code G : F k → F n G : \mathbb{F}^k \to\mathbb{F}^n G : F k → F n is defined by
G ( m 1 , … , m k ) i = ∑ j = 1 k m j − 1 ⋅ α i j − 1 , G(m_1,\ldots,m_k)_i = \sum_{j=1}^{k} m_{j-1}\cdot\alpha_i^{j-1}, G ( m 1 , … , m k ) i = j = 1 ∑ k m j − 1 ⋅ α i j − 1 , for i ∈ [ n ] i \in[n] i ∈ [ n ] . In words, the messages correspond to polynomials of degree at most k − 1 k-1 k − 1 (in particular, G G G is said to be a degree-( k − 1 ) (k-1) ( k − 1 ) RS code) and the codewords correspond to their evaluations at n n n field elements.
Fact 2.11 (RS code is MDS). For every choice of integers n ≥ k ≥ 1 n \ge k \ge1 n ≥ k ≥ 1 , field F \mathbb{F} F with pairwise distinct elements α 1 , … , α n ∈ F \alpha_1,\ldots,\alpha_n \in\mathbb{F} α 1 , … , α n ∈ F , the corresponding degree-( k − 1 ) (k-1) ( k − 1 ) Reed-Solomon code is MDS.
The following (closely related) fact (often called the Schwartz-Zippel lemma) bounds the fraction of zeroes of low-degree polynomials, and will be useful for probabilistic constructions.
Fact 2.12 (Polynomial identity lemma, [6 Sch80, Zip79] ). Let F \mathbb{F} F be an arbitrary field, d ≥ 0 d \ge0 d ≥ 0 , and S ⊆ F S \subseteq\mathbb{F} S ⊆ F be non-empty . If P ∈ F [ X 1 , … , X n ] P \in\mathbb{F}[X_1,\ldots,X_n] P ∈ F [ X 1 , … , X n ] is a non-zero polynomial of degree at most d d d , then
Pr a ∈ S n [ P ( a ) = 0 ] ≤ d ∣ S ∣ . \Pr_{\mathbf{a} \in S^n}[P(\mathbf{a}) = 0] \le\frac{d}{|S|}. a ∈ S n Pr [ P ( a ) = 0 ] ≤ ∣ S ∣ d .
We now define the notion of superregular matrices, which will be crucial for some of our constructions of unshardable codes.
Definition 2.13 (Superregular matrices). For integers a ≤ k a \le k a ≤ k and b ≤ n b \le n b ≤ n , we say that a matrix A ∈ F k × n A \in\mathbb{F}^{k \times n} A ∈ F k × n is ( a , b ) (a,b) ( a , b ) -superregular if every a × b a \times b a × b submatrix of A A A is full rank.
We say that A A A is (full) superregular if it is ( a , b ) (a,b) ( a , b ) -superregular for all a ≤ k a \le k a ≤ k and b ≤ n b \le n b ≤ n .
It is easy to give an existential construction of superregular matrices using the probabilistic method and the polynomial identity lemma (Fact 2.12 ). The following lemma shows how to construct superregular matrices explicitly using MDS codes (i.e., using Fact 2.11 ).
Lemma 2.14 (Explicit superregular matrices, e.g. [RL89]). Let n ≥ k n \ge k n ≥ k be positive integers, q ≥ n q \ge n q ≥ n be a prime power, and
G = [ I A ] . G = \begin{bmatrix} I & A \end{bmatrix}. G = [ I A ] . where I ∈ F k × k I \in\mathbb{F}^{k \times k} I ∈ F k × k is the identity matrix and A ∈ F k × ( n − k ) A \in\mathbb{F}^{k \times(n-k)} A ∈ F k × ( n − k ) . Then G G G is MDS if and only if A A A is superregular.
Proof. Let S ⊆ [ n ] S \subseteq[n] S ⊆ [ n ] be a set of k k k columns of G G G such that S 1 ⊆ [ k ] S_1 \subseteq[k] S 1 ⊆ [ k ] and S 2 ⊆ [ k ] S_2 \subseteq[k] S 2 ⊆ [ k ] are the indices of S S S corresponding to the first half and the second half of the columns respectively (i.e., S = S 1 ∪ ( k + S 2 ) S = S_1 \cup(k+S_2) S = S 1 ∪ ( k + S 2 ) ). By rearranging rows and columns, we notice that G . , S = [ I . , S 1 A . , S 2 ] G_{.,S} = \begin{bmatrix} I_{.,S_1} & A_{.,S_2} \end{bmatrix} G . , S = [ I . , S 1 A . , S 2 ] can be transformed into a matrix of the form
[ I A S 1 , S 2 0 A S 1 ‾ , S 2 ] . \begin{bmatrix}
I & A_{S_1,S_2} \\
0 & A_{\overline{S_1},S_2}
\end{bmatrix}. [ I 0 A S 1 , S 2 A S 1 , S 2 ] .
where S 1 ‾ = [ k ] ∖ S 1 \overline{S_1} = [k] \setminus S_1 S 1 = [ k ] ∖ S 1 . Thus, we have det ( G . , S ) = det ( A S 1 ‾ , S 2 ) \det(G_{.,S}) = \det(A_{\overline{S_1},S_2}) det ( G . , S ) = det ( A S 1 , S 2 ) . Observing that A S 1 ‾ , S 2 A_{\overline{S_1},S_2} A S 1 , S 2 is a submatrix of A A A , we get the desired equivalence that G G G is MDS if and only if A A A is superregular. □
We need the notion of subfields/extension fields and linear independence.
Definition 2.15. For positive integers ℓ ≤ b \ell\le b ℓ ≤ b and q = 2 b q = 2^b q = 2 b , we say that λ 1 , … , λ ℓ ∈ F q \lambda_1,\ldots,\lambda_\ell\in\mathbb{F}_q λ 1 , … , λ ℓ ∈ F q are F 2 \mathbb{F}_2 F 2 -linearly independent if for all non-zero Boolean vectors b ∈ F 2 ℓ \mathbf{b} \in\mathbb{F}_2^\ell b ∈ F 2 ℓ , it holds that
∑ i = 1 ℓ b i ⋅ λ i ≠ 0. \sum_{i=1}^{\ell} b_i \cdot\lambda_i \ne0. i = 1 ∑ ℓ b i ⋅ λ i = 0. Equivalently, the vectors ( ρ ( i ) ) i ∈ [ ℓ ] ∈ F 2 b (\rho(i))_{i\in[\ell]} \in\mathbb{F}_2^b ( ρ ( i ) ) i ∈ [ ℓ ] ∈ F 2 b are linearly independent, where ρ : F q → F 2 b \rho:\mathbb{F}_q \to\mathbb{F}_2^b ρ : F q → F 2 b is an arbitrary F 2 \mathbb{F}_2 F 2 -linear bijection15 . In particular, the field elements ( ρ − 1 ( i ) ) i ∈ [ b ] (\rho^{-1}(i))_{i\in[b]} ( ρ − 1 ( i ) ) i ∈ [ b ] are F 2 \mathbb{F}_2 F 2 -linearly independent.
Bipartite Expanders
We will need explicit bipartite graphs with the following expansion properties.
Lemma 2.16 (Bipartite expanders). For every R < 1 R < 1 R < 1 and δ , ε > 0 \delta,\varepsilon> 0 δ , ε > 0 , there exist infinitely many k ∈ N k \in\mathbb{N} k ∈ N and k ≥ R n k \ge Rn k ≥ R n such that there are explicit bipartite graphs H : [ n ] × [ k ] → { 0 , 1 } H:[n]\times[k]\to\{0,1\} H : [ n ] × [ k ] → { 0 , 1 } of degree at most d = O ( 1 / ( R δ ε ) ) d = O(1/(R\delta\varepsilon)) d = O ( 1/ ( R δ ε )) such that for all L ⊆ [ n ] L \subseteq[n] L ⊆ [ n ] of size at least δ n \delta n δ n , the size of the neighborhood of L L L is at least ( 1 − ε ) k (1-\varepsilon)k ( 1 − ε ) k . Moreover, there exists a matching of size k k k in H H H .
We refer to H H H satisfying the above expansion condition as a ( ≥ δ n , ( 1 − ε ) k ) (\ge\delta n,(1-\varepsilon)k) ( ≥ δ n , ( 1 − ε ) k ) -vertex expander.
Proof. We take H H H to be a subgraph of a suitable bipartite spectral expander. In particular, we let d = O ( 1 / ( R δ ε ) ) d = O(1/(R\delta\varepsilon)) d = O ( 1/ ( R δ ε )) be a sufficiently large integer and choose G : [ n ] × [ n ] → N G:[n]\times[n]\to\mathbb{N} G : [ n ] × [ n ] → N be a d d d -regular bipartite Ramanujan multigraph: that is, the second eigenvalue of its adjacency matrix is
λ ≤ 2 d − 1 . (3) \lambda\le2\sqrt{d-1}. \tag*{(3)} λ ≤ 2 d − 1 . (3)
Explicit constructions of such graphs are known to exist from the works of [MSS18; Coh16].
Now, we define the graph H H H to be the subgraph of G G G obtained by removing some arbitrary n − k n-k n − k right vertices and their incident edges in G G G . Furthermore, we also replace all repeated edges with a single edge so that H H H is a simple graph.
Let S ⊆ [ n ] S \subseteq[n] S ⊆ [ n ] be an arbitrary subset of size at least δ n \delta n δ n . Suppose, towards a contradiction, that the set of neighbors of S S S in H H H is of size less than ( 1 − ε ) k (1-\varepsilon)k ( 1 − ε ) k . Then, we have a subset T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] of size greater than ε k \varepsilon k ε k such that there are no edges between S S S and T T T in H H H (and hence in G G G ). In other words, e G ( S , T ) = 0 e_G(S,T)=0 e G ( S , T ) = 0 . Applying the expander-mixing lemma (see e.g. [Vad12, Lemma 4.15]) for bipartite graphs, we obtain
∣ e G ( S , T ) n ⋅ d − δ ⋅ ∣ T ∣ n ∣ ≤ λ d δ ⋅ ∣ T ∣ n \left\lvert\frac{e_G(S,T)}{n \cdot d}-\delta\cdot\frac{\lvert T\rvert}{n}\right\rvert\leq\frac{\lambda}{d}\sqrt{\delta\cdot\frac{\lvert T\rvert}{n}} n ⋅ d e G ( S , T ) − δ ⋅ n ∣ T ∣ ≤ d λ δ ⋅ n ∣ T ∣
which in turns implies that λ ≥ d R δ ε \lambda\geq d\sqrt{R\delta\varepsilon} λ ≥ d R δ ε . Combined with (3) , we obtain
d ≤ 4 R δ ε , d \leq\frac{4}{R\delta\varepsilon}, d ≤ R δ ε 4 ,
which is a contradiction by taking d : = ⌈ 10 / ( R δ ε ) ⌉ d:=\lceil10/(R\delta\varepsilon)\rceil d := ⌈ 10/ ( R δ ε )⌉ . Hence, we conclude that H H H is a ( ≥ δ n , ( 1 − ε ) k ) (\geq\delta n,(1-\varepsilon)k) ( ≥ δ n , ( 1 − ε ) k ) -vertex expander.
Finally, we show that there is a matching of size k k k in H H H . For this, it suffices to show that there is a perfect matching in G G G . We prove this using Hall’s theorem. Let S ⊆ [ n ] S \subseteq[n] S ⊆ [ n ] be arbitrary and T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] be its neighborhood. The number of edges between S S S and T T T is equal to d ⋅ ∣ S ∣ d\cdot\lvert S\rvert d ⋅ ∣ S ∣ since the left-degree is d d d . On the other hand, since the right-degree is also d d d , the number of edges between S S S and T T T is at most d ⋅ ∣ T ∣ d\cdot\lvert T\rvert d ⋅ ∣ T ∣ . Put together, this gives ∣ T ∣ ≥ ∣ S ∣ \lvert T\rvert\geq\lvert S\rvert ∣ T ∣ ≥ ∣ S ∣ . Hence, H H H contains a matching of size k k k .
Characterizing Unshardability
We prove the following proposition, which establishes a clean linear-algebraic proxy for unshardability that will be used for our constructions.
Proposition 3.1 (Characterizing unshardability). Let G : F k → F n G:\mathbb{F}^{k}\to\mathbb{F}^{n} G : F k → F n be a linear code and s ≤ k s\leq k s ≤ k be a positive integer. Consider the following statements.
G G G is s s s -unshardable.
For all subsets T ⊆ [ n ] T\subseteq[n] T ⊆ [ n ] , if rank ( G ⋅ , T ) < k \operatorname{rank}(G_{\cdot,T})<k rank ( G ⋅ , T ) < k , then there exists m ∈ F k \mathbf{m}\in\mathbb{F}^{k} m ∈ F k such that m T G ⋅ , T = 0 T \mathbf{m}^{\mathsf{T}}G_{\cdot,T}=\mathbf{0}^{\mathsf{T}} m T G ⋅ , T = 0 T and ∣ m ∣ ≥ s \lvert\mathbf{m}\rvert\geq s ∣ m ∣ ≥ s .
G G G is ( s − 1 , k − 1 ) (s-1,k-1) ( s − 1 , k − 1 ) -superregular.
For every two messages m 1 ≠ m 2 ∈ F k \mathbf{m}_1\ne\mathbf{m}_2\in\mathbb{F}^{k} m 1 = m 2 ∈ F k , it holds that
Δ ( m 1 , m 2 ) < s ⟹ Δ ( G ( m 1 ) , G ( m 2 ) ) > n − k + 1. \Delta(\mathbf{m}_1,\mathbf{m}_2)<s\Longrightarrow\Delta(G(\mathbf{m}_1),G(\mathbf{m}_2))>n-k+1. Δ ( m 1 , m 2 ) < s ⟹ Δ ( G ( m 1 ) , G ( m 2 )) > n − k + 1. We have that Item 4 ⟹ \Longrightarrow ⟹ Item 3 ⟹ \Longrightarrow ⟹ Item 2 ⟹ \Longrightarrow ⟹ Item 1 .
Remark 3.2. We note that while we never use Item 4 in our main proofs, it has an interesting interpretation that close-by messages are encoded to far-away codewords. It also suggests that unshardable codes are “close” to being MDS in a sense.16
Proof of Proposition 3.1 . (Item 2 ⟹ \Longrightarrow ⟹ Item 1 ) Let T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] be arbitrary. We have two cases:
Case 1: rank ( G ⋅ , T ) = k \operatorname{rank}(G_{\,\cdot,T}) = k rank ( G ⋅ , T ) = k : Equivalently, the columns of G G G indexed by T T T span F k \mathbb{F}^k F k . In particular, we have for all i ∈ [ k ] i \in[k] i ∈ [ k ] , 1 i ∈ span { g j : j ∈ T } \mathbf{1}_i \in\operatorname{span}\{\mathbf{g}_j : j \in T\} 1 i ∈ span { g j : j ∈ T } so T T T determines i i i (by Observation 2.2 ), and we are done.
Case 2: rank ( G ⋅ , T ) < k \operatorname{rank}(G_{\,\cdot,T}) < k rank ( G ⋅ , T ) < k : Let m ∈ F k \mathbf{m} \in\mathbb{F}^k m ∈ F k be the vector guaranteed by Item 2 : i.e., we have ∣ m ∣ ≥ s |\mathbf{m}| \ge s ∣ m ∣ ≥ s and
m T G ⋅ , T = 0 T . (4) \mathbf{m}^{\mathsf{T}}G_{\,\cdot,T}=\mathbf{0}^{\mathsf{T}}. \tag*{(4)} m T G ⋅ , T = 0 T . (4)
We will now argue for all i ∈ [ k ] i \in[k] i ∈ [ k ] , m i ≠ 0 m_i \ne0 m i = 0 implies that T T T doesn’t determine i i i . To prove the contrapositive, suppose T T T determines i i i . Denoting the j j j -th column of G G G by g j \mathbf{g}_j g j , we then have
1 i ∈ span { g j : j ∈ T } . \mathbf{1}_i \in\operatorname{span}\{\mathbf{g}_j : j \in T\}. 1 i ∈ span { g j : j ∈ T } .
Combining the above fact with (4) , we get
m i = m T 1 i = 0. m_i=\mathbf{m}^{\mathsf{T}}\mathbf{1}_i=0. m i = m T 1 i = 0.
Therefore, we conclude that the number of indices not determined by T T T is at least ∣ m ∣ ≥ s |\mathbf{m}| \ge s ∣ m ∣ ≥ s .
(Item 3 ⟹ \Longrightarrow ⟹ Item 2 ) Suppose G G G is ( s − 1 , k − 1 ) (s-1,k-1) ( s − 1 , k − 1 ) -superregular and T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] be an arbitrary subset of columns of G G G such that rank ( G ⋅ , T ) < k \operatorname{rank}(G_{\,\cdot,T}) < k rank ( G ⋅ , T ) < k . We first note that we can assume that the columns indexed by T T T are linearly independent since the condition m T G ⋅ , T = 0 T \mathbf{m}^{\mathsf{T}}G_{\,\cdot,T}=\mathbf{0}^{\mathsf{T}} m T G ⋅ , T = 0 T only depends on the column span of G ⋅ , T G_{\,\cdot,T} G ⋅ , T . That is, rank ( G ⋅ , T ) = ∣ T ∣ ≤ k − 1 \operatorname{rank}(G_{\,\cdot,T})=|T|\le k-1 rank ( G ⋅ , T ) = ∣ T ∣ ≤ k − 1 . We can further assume that ∣ T ∣ = k − 1 |T|=k-1 ∣ T ∣ = k − 1 since adding additional indices to T T T only makes it harder to satisfy m T G ⋅ , T = 0 T \mathbf{m}^{\mathsf{T}}G_{\,\cdot,T}=\mathbf{0}^{\mathsf{T}} m T G ⋅ , T = 0 T .
Now, since the matrix G ⋅ , T G_{\,\cdot,T} G ⋅ , T has rank less than its number of rows k k k , by the rank-nullity theorem, there exists a non-zero message m ∈ F k \mathbf{m} \in\mathbb{F}^k m ∈ F k such that
m T G ⋅ , T = 0 T . (5) \mathbf{m}^{\mathsf{T}}G_{\,\cdot,T}=\mathbf{0}^{\mathsf{T}}. \tag*{(5)} m T G ⋅ , T = 0 T . (5)
Since every non-empty subset of s − 1 s-1 s − 1 rows of G ⋅ , T G_{\,\cdot,T} G ⋅ , T are linearly independent (using ( s − 1 , k − 1 ) (s-1,k-1) ( s − 1 , k − 1 ) -superregularity of G G G ), we must have that the Hamming weight of m \mathbf{m} m be least s s s , proving Item 2 .
(Item 4 ⟹ \Longrightarrow ⟹ Item 3 ) We first note that because G G G is linear, Item 4 is equivalent to the following:
∀ m ∈ F k : 0 < ∣ m ∣ < s ⟹ ∣ G ( m ) ∣ > n − k + 1. (6) \forall\mathbf{m} \in\mathbb{F}^k: 0 < |\mathbf{m}| < s \Longrightarrow|G(\mathbf{m})| > n-k+1. \tag*{(6)} ∀ m ∈ F k : 0 < ∣ m ∣ < s ⟹ ∣ G ( m ) ∣ > n − k + 1. (6)
We will show for every subset of rows R ⊆ [ k ] R \subseteq[k] R ⊆ [ k ] of size s − 1 s-1 s − 1 and subset of columns C ⊆ [ n ] C \subseteq[n] C ⊆ [ n ] of size k − 1 k-1 k − 1 , that G R , C G_{R,C} G R , C has full row rank i.e., s − 1 s-1 s − 1 . Let α ∈ F R \boldsymbol{\alpha} \in\mathbb{F}^{R} α ∈ F R be an arbitrary non-zero vector. Applying (6) for m \mathbf{m} m given by
m i = { α i , i ∈ R , 0 , i ∈ [ k ] ∖ R , m_i =
\begin{cases}
\alpha_i, & i \in R,\\
0, & i \in[k] \setminus R,
\end{cases} m i = { α i , 0 , i ∈ R , i ∈ [ k ] ∖ R ,
we have
∣ G ( m ) ∣ = ∣ α T G R , ⋅ ∣ > n − k + 1. |G(\mathbf{m})| = |\alpha^{\mathsf{T}}G_{R,\cdot}| > n-k+1. ∣ G ( m ) ∣ = ∣ α T G R , ⋅ ∣ > n − k + 1.
Note that α T G R , C \alpha^{\mathsf{T}}G_{R,C} α T G R , C is a subvector of α T G R , ⋅ \alpha^{\mathsf{T}}G_{R,\cdot} α T G R , ⋅ obtained by restricting to the indices of C C C . Thus, we have the following lower bound for the number of non-zero entries of α T G R , C \alpha^{\mathsf{T}}G_{R,C} α T G R , C :
∣ α T G R , C ∣ ≥ ∣ α T G R , ⋅ ∣ − ( n − ∣ C ∣ ) > ( n − k + 1 ) − ( n − ( k − 1 ) ) = 0. |\alpha^{\mathsf{T}}G_{R,C}| \geq|\alpha^{\mathsf{T}}G_{R,\cdot}|-(n-|C|) > (n-k+1)-(n-(k-1))=0. ∣ α T G R , C ∣ ≥ ∣ α T G R , ⋅ ∣ − ( n − ∣ C ∣ ) > ( n − k + 1 ) − ( n − ( k − 1 )) = 0.
Hence, every non-zero linear combination of the rows of G R , C G_{R,C} G R , C produces a non-zero vector. In other words, G R , C G_{R,C} G R , C has full row rank. This finishes the proof of the key proposition needed to construct unshardable codes (Proposition 3.1 ).
We now give a formal justification for the opposing nature of locality and unshardability alluded to in the introduction:
Theorem 1.2 (Limits of unshardable codes). If a linear code C : F k → F n \mathcal{C}:\mathbb{F}^{k}\to\mathbb{F}^{n} C : F k → F n is ( ℓ , s ) (\ell,s) ( ℓ , s ) -unshardable, then we must have
s ≤ k − k / ℓ + 1. s \leq k-k/\ell+1. s ≤ k − k / ℓ + 1. Proof. For each i ∈ [ k ] i\in[k] i ∈ [ k ] , let D i ⊆ [ n ] D_i\subseteq[n] D i ⊆ [ n ] be the subset of size at most ℓ \ell ℓ guaranteed by local decoding that determines i i i . Let m m m be the largest integer such that ∣ ⋃ i = 1 m D i ∣ < k |\bigcup_{i=1}^{m}D_i|<k ∣ ⋃ i = 1 m D i ∣ < k . Clearly, we have m + 1 ≥ k / ℓ m+1\geq k/\ell m + 1 ≥ k / ℓ . Then T : = ⋃ i = 1 m D i T:=\bigcup_{i=1}^{m}D_i T := ⋃ i = 1 m D i cannot determine all indices in [ k ] [k] [ k ] (since the dimension of { v i : i ∈ T } \{v_i:i\in T\} { v i : i ∈ T } , where v 1 , … , v n v_1,\ldots,v_n v 1 , … , v n denote the columns of G G G , is less than k k k , it cannot span all the standard basis vectors), so it doesn’t determine at least s s s indices of the message. However, it does determine the indices 1 , 2 , … , m 1,2,\ldots,m 1 , 2 , … , m . Hence, we obtain m ≤ k − s m\leq k-s m ≤ k − s , which implies that s ≤ k − k / ℓ + 1 s\leq k-k/\ell+1 s ≤ k − k / ℓ + 1 .
Explicit Unshardable Codes
Building on the intuition laid out in § 1.3 , the key idea in proving our main theorem (Theorem 1.3) is to find a basis change so that any given linear code with some reasonable nice properties (such as having good distance as we will see) can be turned into a code with high unshardability (over an extension field). However, we also need the basis change to be such that it keeps the code locally decodable. The following notion of a sparse rebasing (Definition 4.1 ) encapsulates these two requirements.
Definition 4.1 (Sparse rebasing). Let q = 2 b q=2^b q = 2 b for b ∈ N b\in\mathbb{N} b ∈ N . We say that an invertible matrix B ∈ F q k × k B\in\mathbb{F}_q^{k\times k} B ∈ F q k × k is a ( ℓ 1 , s ) (\ell_1,s) ( ℓ 1 , s ) -sparse rebasing of A ∈ F 2 k × n A\in\mathbb{F}_2^{k\times n} A ∈ F 2 k × n if the following conditions hold:
(Sparsity) Each column of B B B can be expressed as an F q \mathbb{F}_q F q -linear combination of some ℓ 1 \ell_1 ℓ 1 columns of A A A , and
(Distance for Boolean inputs) For all z ∈ F 2 k ∖ { 0 } z\in\mathbb{F}_2^k\setminus\{0\} z ∈ F 2 k ∖ { 0 } , we have ∣ z T B ∣ ≥ s |z^{\mathsf{T}}B|\geq s ∣ z T B ∣ ≥ s .
We highlight the fact that the above notion involves both the fields F 2 \mathbb{F}_2 F 2 and F q ⊇ F 2 \mathbb{F}_q\supseteq\mathbb{F}_2 F q ⊇ F 2 . In particular, Item 1 (which will be used to derive local decodability) involves looking at F q \mathbb{F}_q F q -linear spans of the columns of A A A , whereas Item 2 (which will be used to derive unshardability) involves looking at F 2 \mathbb{F}_2 F 2 -linear spans of the rows of B B B (as indicated by the test vectors z z z being Boolean). Indeed if the matrix B B B were to be Boolean, Item 2 cannot hold for invertible matrices. Going to the extension field F q \mathbb{F}_q F q from F 2 \mathbb{F}_2 F 2 gives us the additional flexibility needed for our construction.
A Generic Transformation
We show that any code with a good distance can be transformed into one that has good unshardability and locality (see Theorem 4.4 ). We first show that a sparse rebasing immediately yields unshardability:
Lemma 4.2. If an invertible matrix B ∈ F q k × n B \in\mathbb{F}_q^{k \times n} B ∈ F q k × n is a ( ℓ 1 , s ) (\ell_1,s) ( ℓ 1 , s ) -sparse rebasing of A ∈ F 2 k × n A \in\mathbb{F}_2^{k \times n} A ∈ F 2 k × n , then G = B − 1 A G = B^{-1}A G = B − 1 A is s s s -unshardable.
Proof. Using Proposition 3.1 , it suffices to show that for all subsets T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] such that rank ( G ⋅ , T ) < k \operatorname{rank}(G_{\cdot,T}) < k rank ( G ⋅ , T ) < k , there exists a vector m ∈ F q k \mathbf{m} \in\mathbb{F}_q^k m ∈ F q k such that ∣ m ∣ ≥ s |\mathbf{m}| \ge s ∣ m ∣ ≥ s and m T G ⋅ , T = 0 T \mathbf{m}^{\mathsf{T}}G_{\cdot,T} = \mathbf{0}^{\mathsf{T}} m T G ⋅ , T = 0 T . For this, we first note that
G ⋅ , T = B − 1 ⋅ A ⋅ , T . G_{\cdot,T} = B^{-1} \cdot A_{\cdot,T}. G ⋅ , T = B − 1 ⋅ A ⋅ , T .
so rank F q ( A ⋅ , T ) = rank F q ( B ⋅ G ⋅ , T ) < k \operatorname{rank}_{\mathbb{F}_q}(A_{\cdot,T}) = \operatorname{rank}_{\mathbb{F}_q}(B \cdot G_{\cdot,T}) < k rank F q ( A ⋅ , T ) = rank F q ( B ⋅ G ⋅ , T ) < k as B B B is invertible. Recall that A A A has entries from F 2 \mathbb{F}_2 F 2 . We now argue that rank F 2 ( A ⋅ , T ) < k \operatorname{rank}_{\mathbb{F}_2}(A_{\cdot,T}) < k rank F 2 ( A ⋅ , T ) < k . Otherwise, there exists T ′ ⊆ T T' \subseteq T T ′ ⊆ T of size k k k such that rank F 2 ( A ⋅ , T ′ ) = k \operatorname{rank}_{\mathbb{F}_2}(A_{\cdot,T'}) = k rank F 2 ( A ⋅ , T ′ ) = k , which means that its determinant is det F 2 ( A ⋅ , T ′ ) ≠ 0 \det_{\mathbb{F}_2}(A_{\cdot,T'}) \ne0 det F 2 ( A ⋅ , T ′ ) = 0 . In particular, we obtain det F 2 ( A ⋅ , T ′ ) = 1 \det_{\mathbb{F}_2}(A_{\cdot,T'}) = 1 det F 2 ( A ⋅ , T ′ ) = 1 and thus, det F q ( A ⋅ , T ′ ) = 1 ∈ F q \det_{\mathbb{F}_q}(A_{\cdot,T'}) = 1 \in\mathbb{F}_q det F q ( A ⋅ , T ′ ) = 1 ∈ F q . Therefore, A ⋅ , T ′ A_{\cdot,T'} A ⋅ , T ′ (and hence A ⋅ , T A_{\cdot,T} A ⋅ , T ) is of rank equal to k k k , which is a contradiction. Therefore, rank F 2 ( A ⋅ , T ) < k \operatorname{rank}_{\mathbb{F}_2}(A_{\cdot,T}) < k rank F 2 ( A ⋅ , T ) < k . By rank-nullity, there exists z ∈ F 2 k ∖ { 0 } \mathbf{z} \in\mathbb{F}_2^k \setminus\{0\} z ∈ F 2 k ∖ { 0 } such that
z T A ⋅ , T = 0 T . (7) \mathbf{z}^{\mathsf{T}} A_{\cdot,T} = \mathbf{0}^{\mathsf{T}}. \tag*{(7)} z T A ⋅ , T = 0 T . (7)
Let m : = B T z ∈ F q k \mathbf{m} := B^{\mathsf{T}}\mathbf{z} \in\mathbb{F}_q^k m := B T z ∈ F q k . From Definition 4.1 , we have
∣ m ∣ = ∣ z T B ∣ ≥ s . |\mathbf{m}| = |\mathbf{z}^{\mathsf{T}}B| \ge s. ∣ m ∣ = ∣ z T B ∣ ≥ s .
Using (7) , we also have
m T G ⋅ , T = ( z T B ) ⋅ G ⋅ , T = z T A ⋅ , T = 0 T . \mathbf{m}^{\mathsf{T}}G_{\cdot,T} = (\mathbf{z}^{\mathsf{T}}B) \cdot G_{\cdot,T} = \mathbf{z}^{\mathsf{T}}A_{\cdot,T} = \mathbf{0}^{\mathsf{T}}. m T G ⋅ , T = ( z T B ) ⋅ G ⋅ , T = z T A ⋅ , T = 0 T .
Hence, G G G is s s s -unshardable.
We now claim that one can always find a sparse rebasing if A A A has good distance:
Lemma 4.3. Let A ∈ F 2 k → F 2 n A \in\mathbb{F}_2^k \to\mathbb{F}_2^n A ∈ F 2 k → F 2 n be a linear code of rate at least R R R and relative distance at least δ > 0 \delta> 0 δ > 0 . Then there exists q ≤ 2 O ( 1 / ( R δ ε ) ) q \le2^{O(1/(R\delta\varepsilon))} q ≤ 2 O ( 1/ ( R δ ε )) that is a power of 2 2 2 and an invertible matrix B ∈ F q k × k B \in\mathbb{F}_q^{k \times k} B ∈ F q k × k that is a ( ℓ 1 , s ) (\ell_1,s) ( ℓ 1 , s ) -sparse rebasing of A A A with ℓ 1 = O ( 1 / ( R δ ε ) ) \ell_1 = O(1/(R\delta\varepsilon)) ℓ 1 = O ( 1/ ( R δ ε )) and s = ( 1 − ε ) k s = (1-\varepsilon)k s = ( 1 − ε ) k . Moreover, B B B can be computed explicitly given A A A .
With the above two lemmas in place, we prove that any code with a good relative distance yields unshardable codes:
Theorem 4.4. Given a linear code A : F 2 k → F 2 n A : \mathbb{F}_2^k \to\mathbb{F}_2^n A : F 2 k → F 2 n of rate R < 1 R < 1 R < 1 and relative distance δ > 0 \delta> 0 δ > 0 , there exists q ≤ 2 O ( 1 / ( R δ ε ) ) q \le2^{O(1/(R\delta\varepsilon))} q ≤ 2 O ( 1/ ( R δ ε )) and an explicit linear code G : F q k → F q n G : \mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n that is ( O ( 1 / ( R δ ε ) ) , ( 1 − ε ) k ) (O(1/(R\delta\varepsilon)),(1-\varepsilon)k) ( O ( 1/ ( R δ ε )) , ( 1 − ε ) k ) -unshardable.
Proof. We take
G = B − 1 A . G = B^{-1}A. G = B − 1 A .
where B ∈ F q k × k B \in\mathbb{F}_q^{k \times k} B ∈ F q k × k is a ( ℓ 1 , ( 1 − ε ) k ) (\ell_1,(1-\varepsilon)k) ( ℓ 1 , ( 1 − ε ) k ) -sparse rebasing of A A A given by Lemma 4.3 , where ℓ 1 = O ( 1 / ( R δ ε ) ) \ell_1 = O(1/(R\delta\varepsilon)) ℓ 1 = O ( 1/ ( R δ ε )) . In particular, the rate of G G G is also at least R R R . Moreover, it is clear from Lemma 4.2 that G G G is ( ( 1 − ε ) k ) ((1-\varepsilon)k) (( 1 − ε ) k ) -unshardable. Using the sparsity property of B B B , we now observe that each column of B B B can be spanned by some ℓ 1 \ell_1 ℓ 1 columns of A A A . In turn, this implies that for all i ∈ [ k ] i \in[k] i ∈ [ k ] , the basis vector 1 i \mathbf{1}_i 1 i is spanned by some ℓ 1 \ell_1 ℓ 1 columns of G = B − 1 A G=B^{-1}A G = B − 1 A . Hence, G G G is ℓ 1 \ell_1 ℓ 1 -locally decodable (from Observation 2.2 ). Therefore, G G G is ( O ( 1 / ( R δ ε ) ) , ( 1 − ε ) k ) (O(1/(R\delta\varepsilon)),(1-\varepsilon)k) ( O ( 1/ ( R δ ε )) , ( 1 − ε ) k ) -unshardable.
Using the above theorem, we immediately obtain our main theorem as stated in the introduction:
Theorem 1.3 (Explicit unshardable codes). For every R < 1 R<1 R < 1 and ε > 0 \varepsilon>0 ε > 0 , there exists q ≤ 2 O R ( 1 / ε ) q \leq2^{O_R(1/\varepsilon)} q ≤ 2 O R ( 1/ ε ) and an explicit infinite family of linear codes G : F q k → F q n G:\mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n of rate at least R R R that are ( O R ( 1 / ε ) , ( 1 − ε ) k ) (O_R(1/\varepsilon),(1-\varepsilon)k) ( O R ( 1/ ε ) , ( 1 − ε ) k ) -unshardable.
Proof. We apply Theorem 4.4 with the code A : F 2 k → F 2 n A:\mathbb{F}_2^k \to\mathbb{F}_2^n A : F 2 k → F 2 n being an explicit linear code of rate at least R R R and relative distance δ ≥ Ω ε ( 1 ) \delta\geq\Omega_\varepsilon(1) δ ≥ Ω ε ( 1 ) ; it is well-known that such codes can be constructed explicitly for every constant R < 1 R<1 R < 1 (see e.g. [GRS23]).
We now prove the key lemma asserting that a sparse rebasing always exists (Lemma 4.3 ).
Proof of Lemma 4.3 . Let q = 2 b q=2^b q = 2 b for a sufficiently large b = O R , ε ( 1 ) b=O_{R,\varepsilon}(1) b = O R , ε ( 1 ) that is to be fixed later. We first note that we can assume that A A A is systematic without loss of generality. Indeed, since rank F 2 ( A ) = k \operatorname{rank}_{\mathbb{F}_2}(A)=k rank F 2 ( A ) = k we can always find an invertible matrix E ∈ F 2 k × k E\in\mathbb{F}_2^{k\times k} E ∈ F 2 k × k such that A ′ : = E A A' := EA A ′ := E A is systematic and has relative distance at least δ \delta δ . Now, if B ′ ∈ F q k × k B'\in\mathbb{F}_q^{k\times k} B ′ ∈ F q k × k is a ( ℓ 1 , s ) (\ell_1,s) ( ℓ 1 , s ) -sparse rebasing of A ′ A' A ′ , using Definition 4.1 , it follows that B : = E − 1 B ′ B:=E^{-1}B' B := E − 1 B ′ is a ( ℓ 1 , s ) (\ell_1,s) ( ℓ 1 , s ) -sparse rebasing of A A A .
We will now model the “sparsity” part of the sparse rebasing B B B by letting
B = A ⋅ S , (8) B=A\cdot S, \tag*{(8)} B = A ⋅ S , (8)
where S ∈ F q n × k S\in\mathbb{F}_q^{n\times k} S ∈ F q n × k is column-sparse: in particular, it has at most ℓ 1 \ell_1 ℓ 1 non-zero elements in each column. For any such S S S , we observe that each column of B B B is a F q \mathbb{F}_q F q -linear combination of some ℓ 1 \ell_1 ℓ 1 columns of A A A . Our goal now is to find such an S S S such that the “distance” part of the sparse rebasing (i.e., Item 2 of Definition 4.1 ) holds. Towards this, we show the following key claim:
Claim 4.5. *Suppose the non-zero elements in each column of S S S are F 2 \mathbb{F}_2 F 2 -linearly independent and that the bipartite graph H : [ n ] × [ k ] → { 0 , 1 } H:[n]\times[k]\to\{0,1\} H : [ n ] × [ k ] → { 0 , 1 } defined by: H ( j , i ) = 1 H(j,i)=1 H ( j , i ) = 1 if S ( j , i ) ≠ 0 S(j,i)\ne0 S ( j , i ) = 0 and 0 0 0 otherwise, is a ( ≥ δ n , s ) (\geq\delta n,s) ( ≥ δ n , s ) -vertex expander17 . Then ∣ z T B ∣ ≥ s \lvert\mathbf{z}^{\mathsf{T}}B\rvert\geq s ∣ z T B ∣ ≥ s for all z ∈ F q k ∖ { 0 } \mathbf{z}\in\mathbb{F}_q^k\setminus\{0\} z ∈ F q k ∖ { 0 } .*
Proof. Note that c : = z T A ∈ F 2 n \mathbf{c}:=\mathbf{z}^{\mathsf{T}}A\in\mathbb{F}_2^n c := z T A ∈ F 2 n has Hamming weight at least δ n \delta n δ n since A A A has relative distance δ \delta δ . For i ∈ [ k ] i\in[k] i ∈ [ k ] , we have
( z T B ) i = ( z T A S ) i = ( c ⋅ S ) i = ∑ j = 1 n c j ⋅ S ( j , i ) = ∑ j ∈ T S ( j , i ) , (\mathbf{z}^{\mathsf{T}}B)_i=(\mathbf{z}^{\mathsf{T}}AS)_i=(\mathbf{c}\cdot S)_i=\sum_{j=1}^{n}c_j\cdot S(j,i)=\sum_{j\in T}S(j,i), ( z T B ) i = ( z T A S ) i = ( c ⋅ S ) i = j = 1 ∑ n c j ⋅ S ( j , i ) = j ∈ T ∑ S ( j , i ) ,
where T ⊆ [ n ] T\subseteq[n] T ⊆ [ n ] denotes the indicator subset of c \mathbf{c} c . By the F 2 \mathbb{F}_2 F 2 -linear independence assumption on the non-zero entries of S . , i S_{.,i} S . , i and the definition of H H H , we have the implication:
L ( i ) ∩ T ≠ ∅ ⟹ ( z T B ) i ≠ 0 , (9) L(i)\cap T\ne\varnothing\Longrightarrow(\mathbf{z}^{\mathsf{T}}B)_i\ne0, \tag*{(9)} L ( i ) ∩ T = ∅ ⟹ ( z T B ) i = 0 , (9)
where L ( i ) ⊆ [ n ] L(i)\subseteq[n] L ( i ) ⊆ [ n ] denotes the set of left-neighbors of a right-vertex i ∈ [ k ] i\in[k] i ∈ [ k ] in H H H . Therefore, ∣ z T B ∣ \lvert\mathbf{z}^{\mathsf{T}}B\rvert ∣ z T B ∣ is lower bounded by the number of right-neighbors of T T T , which is at least s s s , using the vertex expansion of H H H . This finishes the proof of Claim 4.5 .
Therefore, it suffices to find a matrix S S S such that the premise of Claim 4.5 holds (and also ensure B B B is invertible). We first take H : [ n ] × [ k ] → { 0 , 1 } H : [n] \times[k] \to\{0,1\} H : [ n ] × [ k ] → { 0 , 1 } to be a ( ≥ δ n , ( 1 − ε ) k ) (\ge\delta n,(1-\varepsilon)k) ( ≥ δ n , ( 1 − ε ) k ) -vertex expander as given by Lemma 2.16 . Let the largest degree of a right-vertex of H H H be denoted by
ℓ 1 = O ( 1 / ( R δ ε ) ) . \ell_1 = O(1/(R\delta\varepsilon)). ℓ 1 = O ( 1/ ( R δ ε )) .
Now, we construct S S S from H H H by labeling the edges of H H H carefully. In other words, we let S ∈ F q n × k S \in\mathbb{F}_q^{n \times k} S ∈ F q n × k be such that S ( j , i ) ≠ 0 S(j,i) \ne0 S ( j , i ) = 0 iff H ( j , i ) = 1 H(j,i)=1 H ( j , i ) = 1 and call S ( j , i ) S(j,i) S ( j , i ) the label of H H H . Assuming q ≥ 2 ℓ 1 + 1 q \ge2^{\ell_1+1} q ≥ 2 ℓ 1 + 1 (which can be ensured by taking b = O ( 1 / ( R δ ε ) ) b=O(1/(R\delta\varepsilon)) b = O ( 1/ ( R δ ε )) ), let
ζ 1 , … , ζ ℓ 1 + 1 ∈ F q (10) \zeta_1,\ldots,\zeta_{\ell_1+1} \in\mathbb{F}_q \tag*{(10)} ζ 1 , … , ζ ℓ 1 + 1 ∈ F q (10)
be F 2 \mathbb{F}_2 F 2 -linearly independent field elements18 . Labeling the edges incident on each right-vertex using these field elements, we obtain the desired condition that the non-zero elements in each column of S S S are F 2 \mathbb{F}_2 F 2 -linearly independent. However, we also need to make sure that the labeling is such that B = A S B=AS B = A S is invertible.
For this, we will use the fact that there exists a matching in H H H saturating its right vertices (i.e. Lemma 2.16 ). Suppose M : = { ( i , i ) : i ∈ [ k ] } M := \{(i,i):i \in[k]\} M := {( i , i ) : i ∈ [ k ]} is such a matching without loss of generality19 . We first give the labeling of the edges of H H H except those in M M M . In particular, we fix the labels of the edges incident on a right vertex i ∈ [ k ] i \in[k] i ∈ [ k ] , except the edge ( i , i ) ∈ M (i,i) \in M ( i , i ) ∈ M , using pairwise distinct labels from { ζ 1 , … , ζ ℓ 1 − 1 } \{\zeta_1,\ldots,\zeta_{\ell_1-1}\} { ζ 1 , … , ζ ℓ 1 − 1 } in an arbitrary way20 . Now, we claim that there exists a labeling of the edges in M M M using only the field elements ζ ℓ 1 \zeta_{\ell_1} ζ ℓ 1 and ζ ℓ 1 + 1 \zeta_{\ell_1+1} ζ ℓ 1 + 1 such that B B B is invertible. Note that for any such assignment, the premise of Claim 4.5 still holds. Let λ i ∈ { ζ ℓ 1 , ζ ℓ 1 + 1 } \lambda_i \in\{\zeta_{\ell_1},\zeta_{\ell_1+1}\} λ i ∈ { ζ ℓ 1 , ζ ℓ 1 + 1 } denote the label of the edge ( i , i ) (i,i) ( i , i ) that we wish to find. Observe that the matrix S S S now is of the form
S = [ D 0 ] + S 0 , S =
\begin{bmatrix}
D\\
0
\end{bmatrix}
+ S_0, S = [ D 0 ] + S 0 ,
where D = diag ( λ 1 , … , λ k ) D=\operatorname{diag}(\lambda_1,\ldots,\lambda_k) D = diag ( λ 1 , … , λ k ) and S 0 ∈ F q n × k S_0 \in\mathbb{F}_q^{n \times k} S 0 ∈ F q n × k is some fixed matrix. Hence, by inspecting (8) and using the fact that A A A is systematic, we have
for some fixed B 0 ∈ F q k × k B_0 \in\mathbb{F}_q^{k \times k} B 0 ∈ F q k × k (indeed, B 0 = A S 0 B_0=AS_0 B 0 = A S 0 ). The following claim now finishes the construction of B B B .
Claim 4.6. For all B 0 ∈ F q k × k B_0 \in\mathbb{F}_q^{k \times k} B 0 ∈ F q k × k and ζ ≠ ζ ′ ∈ F q \zeta\ne\zeta' \in\mathbb{F}_q ζ = ζ ′ ∈ F q , there exist λ 1 , … , λ k ∈ { ζ , ζ ′ } \lambda_1,\ldots,\lambda_k \in\{\zeta,\zeta'\} λ 1 , … , λ k ∈ { ζ , ζ ′ } such that B = D + B 0 B=D+B_0 B = D + B 0 is invertible, where D = diag ( λ 1 , … , λ k ) D=\operatorname{diag}(\lambda_1,\ldots,\lambda_k) D = diag ( λ 1 , … , λ k ) .
Proof. The proof is by induction on k k k . The base case k = 1 k=1 k = 1 is true since for all a 0 ∈ F q a_0 \in\mathbb{F}_q a 0 ∈ F q , det ( B ) = det ( λ 1 + a 0 ) = λ 1 + a 0 ≠ 0 \det(B)=\det(\lambda_1+a_0)=\lambda_1+a_0 \ne0 det ( B ) = det ( λ 1 + a 0 ) = λ 1 + a 0 = 0 , for at least one value of λ 1 ∈ { ζ , ζ ′ } \lambda_1 \in\{\zeta,\zeta'\} λ 1 ∈ { ζ , ζ ′ } . Now, suppose k > 1 k>1 k > 1 and assume the claim holds for k − 1 × k − 1 k-1 \times k-1 k − 1 × k − 1 matrices. In particular, let B ~ 0 ∈ F q k − 1 × k − 1 \widetilde{B}_0 \in\mathbb{F}_q^{k-1 \times k-1} B 0 ∈ F q k − 1 × k − 1 denote the submatrix of B 0 B_0 B 0 corresponding to the first k − 1 k-1 k − 1 rows and columns. By applying induction hypothesis, fix λ 1 , … , λ k − 1 ∈ { ζ , ζ ′ } \lambda_1,\ldots,\lambda_{k-1} \in\{\zeta,\zeta'\} λ 1 , … , λ k − 1 ∈ { ζ , ζ ′ } such that
B ~ : = diag ( λ 1 , … , λ k − 1 ) + B ~ 0 \widetilde{B}:=\operatorname{diag}(\lambda_1,\ldots,\lambda_{k-1})+\widetilde{B}_0 B := diag ( λ 1 , … , λ k − 1 ) + B 0
is invertible. Once λ 1 , … , λ k − 1 \lambda_1,\ldots,\lambda_{k-1} λ 1 , … , λ k − 1 are fixed, note that det ( B ) \det(B) det ( B ) is a linear polynomial in the variable λ k \lambda_k λ k . Furthermore, the coefficient of λ k \lambda_k λ k is exactly det ( B ~ ) ≠ 0 \det(\widetilde{B}) \ne0 det ( B ) = 0 . Hence, we conclude that there is at most one value of λ k ∈ F q ⊇ { ζ , ζ ′ } \lambda_k \in\mathbb{F}_q \supseteq\{\zeta,\zeta'\} λ k ∈ F q ⊇ { ζ , ζ ′ } such that det ( B ) = 0 \det(B)=0 det ( B ) = 0 . This finishes the proof of Claim 4.6.
Now, we put everything together to complete the proof that the matrix B B B is the desired sparse rebasing of A A A . First, we note that the matrix B B B given by the above discussion is indeed a ( ℓ 1 , ( 1 − ε ) k ) (\ell_1,(1-\varepsilon)k) ( ℓ 1 , ( 1 − ε ) k ) -sparse rebasing of A A A by applying Claim 4.5 . Finally, we remark that the matrix B B B can be explicitly computed since constructions of the matrix S S S (which depends on the bipartite graph H H H given by Lemma 2.16 and F 2 \mathbb{F}_2 F 2 -linearly independent field elements used in (10) ) and the matrix D D D from the proof of Claim 4.6 can all be made explicit. Thus we can construct a sparse rebasing of a given code explicitly, proving Lemma 4.3 .
Local Decodability Under Errors
In this section, we present constructions of codes with linear (in message length) unshardability while being locally decodable from a constant fraction errors in sublinear amount of queries.
High-Rate Regime
We provide explicit constructions of asymptotically good LDCs with near-maximal unshardability (Theorem 1.5). In fact, we prove a more general theorem that converts any arbitrary linear LDC21 into an unshardable one:
Theorem 5.1. Given a ( δ , ℓ 0 ) (\delta,\ell_0) ( δ , ℓ 0 ) -locally correctable code A : F 2 k → F 2 n A:\mathbb{F}_2^k \to\mathbb{F}_2^n A : F 2 k → F 2 n of rate R < 1 R<1 R < 1 and relative distance at least δ > 0 \delta>0 δ > 0 , there exists q ≤ 2 1 / ( R δ ε ) q \le2^{1/(R\delta\varepsilon)} q ≤ 2 1/ ( R δ ε ) and an explicit linear code G : F q k → F q n G:\mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n that is ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable, where ℓ = O ( ℓ 0 ⋅ ( R δ ε ) − 2 ⋅ log ( 1 / ( R δ ε ) ) ) \ell=O(\ell_0\cdot(R\delta\varepsilon)^{-2}\cdot\log(1/(R\delta\varepsilon))) ℓ = O ( ℓ 0 ⋅ ( R δ ε ) − 2 ⋅ log ( 1/ ( R δ ε ))) .
We immediately obtain our main result as a corollary:
Theorem 1.5 (High-rate unshardable LDCs). For every R < 1 R<1 R < 1 and ε > 0 \varepsilon>0 ε > 0 , there exist δ = δ ( R ) > 0 \delta=\delta(R)>0 δ = δ ( R ) > 0 , q ≤ 2 O R ( 1 / ε ) q\le2^{O_R(1/\varepsilon)} q ≤ 2 O R ( 1/ ε ) , and an explicit infinite family of linear codes G : F q k → F q n G:\mathbb{F}_q^k\to\mathbb{F}_q^n G : F q k → F q n of rate at least R R R that are ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable, where ℓ = O R ( exp ( log n log log n ) ⋅ ε − 2 ⋅ log ( 1 / ε ) ) \ell=O_R(\exp(\sqrt{\log n\log\log n})\cdot\varepsilon^{-2}\cdot\log(1/\varepsilon)) ℓ = O R ( exp ( log n log log n ) ⋅ ε − 2 ⋅ log ( 1/ ε )) .
Proof. We instantiate Theorem 5.1 with the LCC code A : F 2 k → F 2 n A:\mathbb{F}_2^k\to\mathbb{F}_2^n A : F 2 k → F 2 n being the LCCs of [KMRS17] given by Theorem 2.5. That is, we have that A A A is ( Ω ε ( 1 ) , ℓ 0 , s ( 1 − ε ) k ) (\Omega_\varepsilon(1),\ell_0,s(1-\varepsilon)k) ( Ω ε ( 1 ) , ℓ 0 , s ( 1 − ε ) k ) -unshardable for some ℓ 0 = O R ( exp ( log n log log n ) ) \ell_0=O_R(\exp(\sqrt{\log n\log\log n})) ℓ 0 = O R ( exp ( log n log log n )) . Hence, we get that G G G is indeed ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable for ℓ = O ( ℓ 0 ⋅ ( R δ ε ) − 2 ⋅ log ( 1 / ( R δ ε ) ) ) = O R ( exp ( log n log log n ) ⋅ ε − 2 ⋅ log ( 1 / ε ) ) \ell=O(\ell_0\cdot(R\delta\varepsilon)^{-2}\cdot\log(1/(R\delta\varepsilon)))=O_R(\exp(\sqrt{\log n\log\log n})\cdot\varepsilon^{-2}\cdot\log(1/\varepsilon)) ℓ = O ( ℓ 0 ⋅ ( R δ ε ) − 2 ⋅ log ( 1/ ( R δ ε ))) = O R ( exp ( log n log log n ) ⋅ ε − 2 ⋅ log ( 1/ ε )) .
Thus, we turn to the proof of the black-box reduction (Theorem 5.1 ):
Proof of Theorem 5.1 . The idea is to perform the generic transformation discussed in § 4 and argue that the local correcting properties of A A A are sufficient to get local decodability of G G G (under errors). That is, we claim that
is the desired unshardable LDC where B ∈ F q k × k B \in\mathbb{F}_q^{k \times k} B ∈ F q k × k is a ( ℓ 1 , ( 1 − ε ) k ) (\ell_1,(1-\varepsilon)k) ( ℓ 1 , ( 1 − ε ) k ) -sparse rebasing of A A A given by Lemma 4.3 , where b , ℓ 1 = O ( 1 / ( R δ ε ) ) b,\ell_1 = O(1/(R\delta\varepsilon)) b , ℓ 1 = O ( 1/ ( R δ ε )) , and q = 2 b q = 2^b q = 2 b . In other words, for a vector m ~ ∈ F q k \widetilde{\mathbf{m}} \in\mathbb{F}_q^k m ∈ F q k , we treat m = B T m ~ \mathbf{m} = B^{\mathsf{T}}\widetilde{\mathbf{m}} m = B T m as the message and c = m ~ T A \mathbf{c} = \widetilde{\mathbf{m}}^{\mathsf{T}}A c = m T A as the corresponding codeword.
We immediately observe that G G G is ( ( 1 − ε ) k ) ((1-\varepsilon)k) (( 1 − ε ) k ) -unshardable using Lemma 4.2 . We now show that G G G is ( δ , ℓ ) (\delta,\ell) ( δ , ℓ ) -locally decodable. Let L ′ \mathcal{L}' L ′ be the local corrector corresponding to A A A , i.e., we have for all m ′ ∈ F q k \mathbf{m}' \in\mathbb{F}_q^k m ′ ∈ F q k , w ′ ∈ F 2 n \mathbf{w}' \in\mathbb{F}_2^n w ′ ∈ F 2 n such that δ ( w ′ , m ′ T A ) ≤ δ \delta(\mathbf{w}',\mathbf{m}'^{\mathsf{T}}A) \leq\delta δ ( w ′ , m ′ T A ) ≤ δ and i ∈ [ n ] i \in[n] i ∈ [ n ] :
Pr [ L ′ w ′ ( i ) = m ′ T b i ] ≥ 1 − 1 10 b ℓ 1 , (11) \Pr\left[\mathcal{L}'^{\mathbf{w}'}(i)=\mathbf{m}'^{\mathsf{T}}\mathbf{b}_i\right]\geq1-\frac{1}{10b\ell_1}, \tag*{(11)} Pr [ L ′ w ′ ( i ) = m ′ T b i ] ≥ 1 − 10 b ℓ 1 1 , (11)
where b 1 , … , b k \mathbf{b}_1,\ldots,\mathbf{b}_k b 1 , … , b k denote the columns of B B B and a 1 , … , a n \mathbf{a}_1,\ldots,\mathbf{a}_n a 1 , … , a n denote the columns of A A A . We then claim that the following (Algorithm 1, denoted L \mathcal{L} L ) is a local decoder for G G G .
Algorithm 1: Local decoder of $G
Input: Oracle access to w ∈ F q n \mathbf{w} \in\mathbb{F}_q^n w ∈ F q n , index i ∈ [ k ] i \in[k] i ∈ [ k ]
Find T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] of size ℓ 1 \ell_1 ℓ 1 and ( λ j ) j ∈ T (\lambda_j)_{j\in T} ( λ j ) j ∈ T in F q \mathbb{F}_q F q guaranteed by Definition 4.1 , i.e.: b i = ∑ j ∈ T λ j ⋅ a j \mathbf{b}_i=\sum_{j\in T}\lambda_j\cdot\mathbf{a}_j b i = ∑ j ∈ T λ j ⋅ a j .
Let W ∈ F 2 b × n W \in\mathbb{F}_2^{b\times n} W ∈ F 2 b × n be defined by W ⋅ , j ← ρ ( w j ) W_{\cdot,j}\leftarrow\rho(w_j) W ⋅ , j ← ρ ( w j ) for j ∈ [ n ] j\in[n] j ∈ [ n ] , where ρ : F q → F 2 b \rho:\mathbb{F}_q\to\mathbb{F}_2^b ρ : F q → F 2 b is a F 2 \mathbb{F}_2 F 2 -linear bijection.
for 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b do
w ( j ′ ) ← W j ′ , ⋅ \mathbf{w}^{(j')}\leftarrow W_{j',\cdot} w ( j ′ ) ← W j ′ , ⋅ (i.e., the j ′ j' j ′ -th row of W W W ).
for j ∈ T j\in T j ∈ T do
c j ′ ← ρ − 1 ( L w ( 1 ) ( j ) , … , L w ( b ) ( j ) ) \mathbf{c}'_j\leftarrow\rho^{-1}(\mathcal{L}^{\mathbf{w}^{(1)}}(j),\ldots,\mathcal{L}^{\mathbf{w}^{(b)}}(j)) c j ′ ← ρ − 1 ( L w ( 1 ) ( j ) , … , L w ( b ) ( j )) .
return ∑ j ∈ T λ j ⋅ c j ′ \sum_{j\in T}\lambda_j\cdot\mathbf{c}'_j ∑ j ∈ T λ j ⋅ c j ′ .
In order to show correctness of the above local decoder L \mathcal{L} L , let m = B T m ~ ∈ F q k \mathbf{m}=B^{\mathsf{T}}\widetilde{\mathbf{m}}\in\mathbb{F}_q^k m = B T m ∈ F q k and c = m T G = m ~ T A \mathbf{c}=\mathbf{m}^{\mathsf{T}}G=\widetilde{\mathbf{m}}^{\mathsf{T}}A c = m T G = m T A be a message-codeword pair such that δ ( w , c ) ≤ δ \delta(\mathbf{w},\mathbf{c})\leq\delta δ ( w , c ) ≤ δ . We will prove that L \mathcal{L} L returns m i = b i T m ~ m_i=\mathbf{b}_i^{\mathsf{T}}\widetilde{\mathbf{m}} m i = b i T m with high probability. Let M ~ ∈ F 2 b × k \widetilde{M}\in\mathbb{F}_2^{b\times k} M ∈ F 2 b × k and C ~ ∈ F 2 b × n \widetilde{C}\in\mathbb{F}_2^{b\times n} C ∈ F 2 b × n be formed by applying ρ ( ⋅ ) \rho(\cdot) ρ ( ⋅ ) to m ~ \widetilde{\mathbf{m}} m and c \mathbf{c} c coordinate-wise. Since ρ \rho ρ is F 2 \mathbb{F}_2 F 2 -linear, we obtain for all 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b :
m ~ ( j ′ ) A = c ( j ′ ) , \widetilde{\mathbf{m}}^{(j')}A=\mathbf{c}^{(j')}, m ( j ′ ) A = c ( j ′ ) ,
where m ~ ( j ′ ) : = M ~ j ′ , ⋅ \widetilde{\mathbf{m}}^{(j')}:=\widetilde{M}_{j',\cdot} m ( j ′ ) := M j ′ , ⋅ and c ( j ′ ) : = C ~ j ′ , ⋅ \mathbf{c}^{(j')}:=\widetilde{C}_{j',\cdot} c ( j ′ ) := C j ′ , ⋅ . Moreover, since δ ( w ( j ′ ) , c ( j ′ ) ) ≤ δ ( w , c ) ≤ δ \delta(\mathbf{w}^{(j')},\mathbf{c}^{(j')})\leq\delta(\mathbf{w},\mathbf{c})\leq\delta δ ( w ( j ′ ) , c ( j ′ ) ) ≤ δ ( w , c ) ≤ δ for 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b , using (11) , we have for all j ∈ T j\in T j ∈ T and 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b that
Pr [ L w ( j ′ ) ( j ) = c j ( j ′ ) ] ≥ 1 − 1 10 b ℓ 1 . \Pr\left[\mathcal{L}^{\mathbf{w}^{(j')}}(j)=c^{(j')}_j\right]\geq1-\frac{1}{10b\ell_1}. Pr [ L w ( j ′ ) ( j ) = c j ( j ′ ) ] ≥ 1 − 10 b ℓ 1 1 .
Now, by a union bound over j ∈ T j\in T j ∈ T and 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b and using F 2 \mathbb{F}_2 F 2 -linearity of the map ρ \rho ρ , we have for all j ∈ T j\in T j ∈ T :
c j ′ = ρ − 1 ( c j ( 1 ) , … , c j ( b ) ) = c j , \mathbf{c}'_j=\rho^{-1}(c^{(1)}_j,\ldots,c^{(b)}_j)=c_j, c j ′ = ρ − 1 ( c j ( 1 ) , … , c j ( b ) ) = c j ,
with probability at least
1 − ∣ T ∣ ⋅ b ⋅ 1 10 b ℓ 1 ≥ 3 4 . 1-|T|\cdot b\cdot\frac{1}{10b\ell_1}\ge\frac{3}{4}. 1 − ∣ T ∣ ⋅ b ⋅ 10 b ℓ 1 1 ≥ 4 3 .
Therefore, with the same probability, the output of Algorithm 1 (i.e., L w ( i ) \mathcal{L}^{\mathbf{w}}(i) L w ( i ) ) is equal to
∑ j ∈ T λ j ⋅ c j = ∑ j ∈ T λ j ⋅ m ~ ⊤ a j = m ~ ⊤ b i = m i , \sum_{j\in T}\lambda_j\cdot c_j=\sum_{j\in T}\lambda_j\cdot\widetilde{\mathbf{m}}^{\top}\mathbf{a}_j=\widetilde{\mathbf{m}}^{\top}\mathbf{b}_i=m_i, j ∈ T ∑ λ j ⋅ c j = j ∈ T ∑ λ j ⋅ m ⊤ a j = m ⊤ b i = m i ,
the i i i -th message symbol. Finally note that each L ′ \mathcal{L}' L ′ call in Algorithm 1 makes O ( ℓ 0 log ( b ℓ 1 ) ) O(\ell_0\log(b\ell_1)) O ( ℓ 0 log ( b ℓ 1 )) oracle queries. Thus, L \mathcal{L} L makes ℓ = O ( b ℓ 0 ℓ 1 log ( b ℓ 1 ) ) = O ( ℓ 0 ⋅ ( R δ ε ) − 2 ⋅ log ( 1 / ( R δ ε ) ) ) \ell=O(b\ell_0\ell_1\log(b\ell_1))=O(\ell_0\cdot(R\delta\varepsilon)^{-2}\cdot\log(1/(R\delta\varepsilon))) ℓ = O ( b ℓ 0 ℓ 1 log ( b ℓ 1 )) = O ( ℓ 0 ⋅ ( R δ ε ) − 2 ⋅ log ( 1/ ( R δ ε ))) oracle queries. Hence, this concludes the proof of Theorem 5.1 that G G G is ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable. □
Constant-Query Regime
We also construct constant query LDCs of subexponential length with near-maximal unshardability:
Theorem 1.7 (Constant-query unshardable LDCs). For every r ∈ N r\in\mathbb{N} r ∈ N and ε > 0 \varepsilon>0 ε > 0 , there exist δ = δ ( r ) > 0 \delta=\delta(r)>0 δ = δ ( r ) > 0 , q ≤ 2 O ( 1 / ε ) q\le2^{O(1/\varepsilon)} q ≤ 2 O ( 1/ ε ) , and an explicit infinite family of linear codes G : F q k → F q n G:\mathbb{F}_q^k\to\mathbb{F}_q^n G : F q k → F q n that are ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable, where ℓ = O ( 2 r ⋅ ε − 2 ⋅ log ( 1 / ε ) ) \ell=O(2^r\cdot\varepsilon^{-2}\cdot\log(1/\varepsilon)) ℓ = O ( 2 r ⋅ ε − 2 ⋅ log ( 1/ ε )) and n = exp ( exp ( log k log log r − 1 k r ) ) n=\exp(\exp(\sqrt[r]{\log k\log\log^{r-1}k})) n = exp ( exp ( r log k log log r − 1 k )) .
Proof. The high level strategy is similar to our proof of Theorem 1.5 where we essentially use a sparse rebasing to make a given locally correctable code unshardable. However, we note that in the above proof, the assumption of A A A being an LCC was too strong. Indeed, in this proof, we will use an LDC over a larger message length to effectively accomplish the needed local decoding. In particular, we use the same notion of sparse rebasing (Definition 4.1 ) but with an additional “intermediate code”. More specifically, let k ′ = 2 k k'=2k k ′ = 2 k and D : F 2 k → F 2 k ′ D:\mathbb{F}_2^k\to\mathbb{F}_2^{k'} D : F 2 k → F 2 k ′ be an explicit systematic code of relative distance Ω ( 1 ) \Omega(1) Ω ( 1 ) . Moreover, suppose A : F 2 k ′ → F 2 n A:\mathbb{F}_2^{k'}\to\mathbb{F}_2^n A : F 2 k ′ → F 2 n is a systematic ( δ , ℓ 0 ) (\delta,\ell_0) ( δ , ℓ 0 ) -locally decodable code of [7 ] given by Theorem 2.6. Thus we have
ℓ 0 = O ( 2 r ) and n = exp ( exp ( log k ′ log log r − 1 k ′ r ) ) . (12) \ell_0=O(2^r)\quad\text{and}\quad n=\exp\left(\exp\left(\sqrt[r]{\log k'\log\log^{r-1}k'}\right)\right). \tag*{(12)} ℓ 0 = O ( 2 r ) and n = exp ( exp ( r log k ′ log log r − 1 k ′ ) ) . (12)
Let B ∈ F q k × k B\in\mathbb{F}_q^{k\times k} B ∈ F q k × k be a ( ℓ 1 , s ) (\ell_1,s) ( ℓ 1 , s ) -sparse rebasing of the code D D D given by Lemma 4.3 : in particular, we have b , ℓ 1 = O ( 1 / ε ) b,\ell_1=O(1/\varepsilon) b , ℓ 1 = O ( 1/ ε ) , q = 2 b q=2^b q = 2 b , and s = ( 1 − ε ) k s=(1-\varepsilon)k s = ( 1 − ε ) k . We then claim that
is the desired code.
We start by showing that G G G has good unshardability. For this, we will show that B B B is actually a ( ℓ 1 , s ) (\ell_1,s) ( ℓ 1 , s ) -sparse rebasing of D B DB D B (which is a k × n k\times n k × n matrix over F 2 \mathbb{F}_2 F 2 ). We note that distance condition of Definition 4.1 only depends on the matrix B B B so it continues to hold when D D D is replaced with D B DB D B . It remains to show that the sparsity condition also holds: Indeed, this follows by noting that the first k ′ k' k ′ columns of D B DB D B are exactly the columns of D D D , since A A A is systematic. Hence, we immediately conclude (by applying Lemma 4.2 ) that G G G is s s s -unshardable.
We now show that G G G is ( δ , ℓ ) (\delta,\ell) ( δ , ℓ ) -locally decodable. Let L ′ \mathcal{L}' L ′ be the local decoder corresponding to A A A , i.e., we have for all m ′ ∈ F q k ′ \mathbf{m}'\in\mathbb{F}_q^{k'} m ′ ∈ F q k ′ , w ′ ∈ F 2 n \mathbf{w}'\in\mathbb{F}_2^n w ′ ∈ F 2 n such that δ ( w ′ , m ′ ⊤ A ) ≤ δ \delta(\mathbf{w}',\mathbf{m}'^{\top}A)\le\delta δ ( w ′ , m ′ ⊤ A ) ≤ δ and i ∈ [ k ′ ] i\in[k'] i ∈ [ k ′ ] :
Pr [ L w ′ ( i ) = m i ′ ] ≥ 1 − 1 10 b ℓ 1 . (13) \Pr\left[\mathcal{L}^{\mathbf{w}'}(i)=m'_i\right]\ge1-\frac{1}{10b\ell_1}. \tag*{(13)} Pr [ L w ′ ( i ) = m i ′ ] ≥ 1 − 10 b ℓ 1 1 . (13)
We then claim that the following (Algorithm 2, denoted L \mathcal{L} L ) is a local decoder for G G G . Let b 1 , … , b k \mathbf{b}_1,\ldots,\mathbf{b}_k b 1 , … , b k denote the columns of B B B and d 1 , … , d k ′ \mathbf{d}_1,\ldots,\mathbf{d}_{k'} d 1 , … , d k ′ denote the columns of D D D .
Algorithm 2: Local decoder of G G G
Input: Oracle access to w ∈ F q n \mathbf{w}\in\mathbb{F}_q^n w ∈ F q n , index i ∈ [ k ] i\in[k] i ∈ [ k ]
Find T ⊆ [ k ′ ] T\subseteq[k'] T ⊆ [ k ′ ] of size ℓ 1 \ell_1 ℓ 1 and ( λ j ) j ∈ T (\lambda_j)_{j\in T} ( λ j ) j ∈ T in F q \mathbb{F}_q F q guaranteed by Definition 4.1 , i.e.:
b i = ∑ j ∈ T λ j ⋅ d j \mathbf{b}_i=\sum_{j\in T}\lambda_j\cdot\mathbf{d}_j b i = ∑ j ∈ T λ j ⋅ d j .
Let W ∈ F 2 b × n W\in\mathbb{F}_2^{b\times n} W ∈ F 2 b × n be defined by W ⋅ , j ← ρ ( w j ) W_{\cdot,j}\leftarrow\rho(w_j) W ⋅ , j ← ρ ( w j ) for j ∈ [ n ] j\in[n] j ∈ [ n ] , where ρ : F q → F 2 b \rho:\mathbb{F}_q\to\mathbb{F}_2^b ρ : F q → F 2 b is a F 2 \mathbb{F}_2 F 2 -linear bijection.
for 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b do
w ( j ′ ) ← W j ′ , ⋅ \mathbf{w}^{(j')}\leftarrow W_{j',\cdot} w ( j ′ ) ← W j ′ , ⋅ , (i.e., the j ′ j' j ′ -th row of W W W ).
for j ∈ T j\in T j ∈ T do
c j ′ ← ρ − 1 ( L w ( 1 ) ( j ) , … , L w ( b ) ( j ) ) \mathbf{c}'_j\leftarrow\rho^{-1}\left(\mathcal{L}^{\mathbf{w}^{(1)}}(j),\ldots,\mathcal{L}^{\mathbf{w}^{(b)}}(j)\right) c j ′ ← ρ − 1 ( L w ( 1 ) ( j ) , … , L w ( b ) ( j ) ) .
return ∑ j ∈ T λ j ⋅ c j ′ \sum_{j\in T}\lambda_j\cdot\mathbf{c}'_j ∑ j ∈ T λ j ⋅ c j ′ .
In order to show correctness of the above local decoder L \mathcal{L} L , let m = B T m ~ ∈ F q k \mathbf{m}=B^{\mathsf T}\widetilde{\mathbf{m}}\in\mathbb{F}_q^k m = B T m ∈ F q k and c = m T G = m ~ T D B \mathbf{c}=\mathbf{m}^{\mathsf T}G=\widetilde{\mathbf{m}}^{\mathsf T}DB c = m T G = m T D B be a message-codeword pair such that δ ( w , c ) ≤ δ \delta(\mathbf{w},\mathbf{c})\leq\delta δ ( w , c ) ≤ δ . We will prove that L \mathcal{L} L returns m i = b i T m ~ m_i=\mathbf{b}_i^{\mathsf T}\widetilde{\mathbf{m}} m i = b i T m with high probability. Let M ~ ∈ F 2 b × n \widetilde{M}\in\mathbb{F}_2^{b\times n} M ∈ F 2 b × n and C ~ ∈ F 2 b × n \widetilde{C}\in\mathbb{F}_2^{b\times n} C ∈ F 2 b × n be formed by applying ρ ( ⋅ ) \rho(\cdot) ρ ( ⋅ ) to m ~ \widetilde{\mathbf{m}} m and c \mathbf{c} c coordinate-wise. Since ρ \rho ρ is F 2 \mathbb{F}_2 F 2 -linear, we obtain for all 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b :
m ~ ( j ′ ) D A = c ( j ′ ) , \widetilde{\mathbf{m}}^{(j')}DA=\mathbf{c}^{(j')}, m ( j ′ ) D A = c ( j ′ ) ,
where m ~ ( j ′ ) : = M ~ j ′ , ⋅ \widetilde{\mathbf{m}}^{(j')}:=\widetilde{M}_{j',\cdot} m ( j ′ ) := M j ′ , ⋅ , and c ( j ′ ) : = C ~ j ′ , ⋅ \mathbf{c}^{(j')}:=\widetilde{C}_{j',\cdot} c ( j ′ ) := C j ′ , ⋅ . Moreover, since δ ( w ( j ′ ) , c ( j ′ ) ) ≤ δ ( w , c ) ≤ δ \delta(\mathbf{w}^{(j')},\mathbf{c}^{(j')})\leq\delta(\mathbf{w},\mathbf{c})\leq\delta δ ( w ( j ′ ) , c ( j ′ ) ) ≤ δ ( w , c ) ≤ δ for 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b , using (13) , we have for all j ∈ T j\in T j ∈ T and 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b that
Pr [ L w ( j ′ ) ( j ) = ( m ~ ( j ′ ) D ) j ] ≥ 1 − 1 10 b ℓ 1 . \Pr\left[\mathcal{L}^{\mathbf{w}^{(j')}}(j)=(\widetilde{\mathbf{m}}^{(j')}D)_j\right]\geq1-\frac{1}{10b\ell_1}. Pr [ L w ( j ′ ) ( j ) = ( m ( j ′ ) D ) j ] ≥ 1 − 10 b ℓ 1 1 .
Now, by a union bound over j ∈ T j\in T j ∈ T and 1 ≤ j ′ ≤ b 1\leq j'\leq b 1 ≤ j ′ ≤ b and using F 2 \mathbb{F}_2 F 2 -linearity of the map ρ \rho ρ , we have for all j ∈ T j\in T j ∈ T :
c j ′ = ρ − 1 ( m ~ ( 1 ) d j , … , m ~ ( b ) d j ) = m ~ T d j , \mathbf{c}'_j=\rho^{-1}\left(\widetilde{\mathbf{m}}^{(1)}\mathbf{d}_j,\ldots,\widetilde{\mathbf{m}}^{(b)}\mathbf{d}_j\right)=\widetilde{\mathbf{m}}^{\mathsf T}\mathbf{d}_j, c j ′ = ρ − 1 ( m ( 1 ) d j , … , m ( b ) d j ) = m T d j ,
with probability at least
1 − ∣ T ∣ ⋅ b ⋅ 1 10 b ℓ 1 ≥ 3 4 . 1-|T|\cdot b\cdot\frac{1}{10b\ell_1}\geq\frac{3}{4}. 1 − ∣ T ∣ ⋅ b ⋅ 10 b ℓ 1 1 ≥ 4 3 .
Therefore, with the same probability, the output of L w ( i ) \mathcal{L}^{\mathbf{w}}(i) L w ( i ) is equal to
∑ j ∈ T λ j ⋅ c j ′ = ∑ j ∈ T λ j ⋅ m ~ T d j = m ~ T b i = m i . \sum_{j\in T}\lambda_j\cdot\mathbf{c}'_j
=\sum_{j\in T}\lambda_j\cdot\widetilde{\mathbf{m}}^{\mathsf T}\mathbf{d}_j
=\widetilde{\mathbf{m}}^{\mathsf T}\mathbf{b}_i
=m_i. j ∈ T ∑ λ j ⋅ c j ′ = j ∈ T ∑ λ j ⋅ m T d j = m T b i = m i .
Note that each call to L ′ \mathcal{L}' L ′ in Algorithm 2 makes O ( ℓ 0 log ( b ℓ 1 ) ) O(\ell_0\log(b\ell_1)) O ( ℓ 0 log ( b ℓ 1 )) oracle queries. Finally, using (12) , note that L \mathcal{L} L makes ℓ = O ( b ℓ 0 ℓ 1 log ( b ℓ 1 ) ) = O ( 2 r ⋅ ε − 2 ⋅ log ( 1 / ε ) ) \ell=O(b\ell_0\ell_1\log(b\ell_1))=O(2^r\cdot\varepsilon^{-2}\cdot\log(1/\varepsilon)) ℓ = O ( b ℓ 0 ℓ 1 log ( b ℓ 1 )) = O ( 2 r ⋅ ε − 2 ⋅ log ( 1/ ε )) oracle queries and the blocklength of G G G is n = exp ( exp ( log k r log log r − 1 k ) ) n=\exp(\exp(\sqrt[r]{\log k}\log\log^{r-1}k)) n = exp ( exp ( r log k log log r − 1 k )) as desired. Hence, this concludes the proof of Theorem 1.7 that G G G is ( δ , ℓ , ( 1 − ε ) k ) (\delta,\ell,(1-\varepsilon)k) ( δ , ℓ , ( 1 − ε ) k ) -unshardable.
Superregularity-based constructions
Note that the constructions discussed in the above sections (say Theorem 1.3) do not yield anything for small number of queries like 2, since the locality (even though constant) depends on the relative distance of the underlying F 2 \mathbb{F}_2 F 2 base code used. Here, we give simpler constructions of unshardable codes over fields of linear size, with locality 2 (under no errors) and unshardability Ω ( k ) \Omega(k) Ω ( k ) . All the constructions in this section are under the weaker notion of local decoding without errors, and are built on the superregularity connection from Proposition 3.1 . In particular, they circumvent the use of extension fields and expanders as done in § 4 . In the later subsections, we present several improvements to this base construction.
(2,Ω ( k ) \Omega(k) Ω ( k ) )-Unshardable Codes
We first show the existence of ( 2 , Ω ( k ) ) (2,\Omega(k)) ( 2 , Ω ( k )) -unshardable codes and then make the construct explicit later (in Theorem 6.3 ).
Theorem 6.1. Let k ≥ 1 k \ge1 k ≥ 1 , n = 2 k n=2k n = 2 k and q > 2 k 4 k q>2k4^k q > 2 k 4 k be a prime power. There exists G ∈ F q k × n G \in\mathbb{F}_q^{k \times n} G ∈ F q k × n that is ( 2 , ⌈ ( k + 1 ) / 2 ⌉ ) (2,\lceil(k+1)/2\rceil) ( 2 , ⌈( k + 1 ) /2 ⌉) -unshardable.
Proof. We take
G = [ A A + I ] G=\begin{bmatrix} A & A+I \end{bmatrix} G = [ A A + I ]
where A ∈ F q k × k A \in\mathbb{F}_q^{k \times k} A ∈ F q k × k is a matrix that we will choose later and I ∈ F q k × k I \in\mathbb{F}_q^{k \times k} I ∈ F q k × k is the identity matrix. That is, denoting the columns of A A A by ( a i ) i ∈ [ k ] (\mathbf{a}_i)_{i\in[k]} ( a i ) i ∈ [ k ] , the columns of G G G (denoted by ( g i ) i ∈ [ 2 k ] (\mathbf{g}_i)_{i\in[2k]} ( g i ) i ∈ [ 2 k ] ) are given as:
g i = { a i for 1 ≤ i ≤ k and a i − k + 1 i − k for k < i ≤ 2 k . \mathbf{g}_i =
\begin{cases}
\mathbf{a}_i & \text{for } 1 \le i \le k \text{ and}\\
\mathbf{a}_{i-k}+\mathbf{1}_{i-k} & \text{for } k < i \le2k.
\end{cases} g i = { a i a i − k + 1 i − k for 1 ≤ i ≤ k and for k < i ≤ 2 k .
It is clear that G G G is locally decodable with 2 queries by Observation 2.2 , since we have
1 i = ( a i + 1 i ) − ( a i ) = g k + i − g i , \mathbf{1}_i=(\mathbf{a}_i+\mathbf{1}_i)-(\mathbf{a}_i)=\mathbf{g}_{k+i}-\mathbf{g}_i, 1 i = ( a i + 1 i ) − ( a i ) = g k + i − g i ,
for all i ∈ [ k ] i \in[k] i ∈ [ k ] .
We will now pick A A A as given by the following lemma.
Lemma 6.2. There exists A ∈ F q k × k A \in\mathbb{F}_q^{k \times k} A ∈ F q k × k such that both A A A and A + I A+I A + I are superregular.
To show that the unshardability is at least s : = ⌈ ( k + 1 ) / 2 ⌉ s:=\lceil(k+1)/2\rceil s := ⌈( k + 1 ) /2 ⌉ for the matrix G G G given by the above A A A , using Proposition 3.1 , it suffices to show that G G G is ( s − 1 , k − 1 ) (s-1,k-1) ( s − 1 , k − 1 ) -superregular. That is, for a subset of rows R ⊆ [ k ] R \subseteq[k] R ⊆ [ k ] of size s − 1 s-1 s − 1 and a subset of columns T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] of size k − 1 k-1 k − 1 of G G G , we will show that the corresponding submatrix G R , T G_{R,T} G R , T is full row rank. Let
G R , T = [ A ′ B ′ ] , G_{R,T}=\begin{bmatrix} A' & B' \end{bmatrix}, G R , T = [ A ′ B ′ ] ,
where A ′ A' A ′ is some submatrix of A A A and B ′ B' B ′ is some submatrix of A + I A+I A + I . Since ∣ T ∣ = k − 1 |T|=k-1 ∣ T ∣ = k − 1 , we note that either A ′ A' A ′ or B ′ B' B ′ has at least ⌈ ( k − 1 ) / 2 ⌉ = s − 1 \lceil(k-1)/2\rceil=s-1 ⌈( k − 1 ) /2 ⌉ = s − 1 columns. Without loss of generality22 , assume that A ′ A' A ′ has at least s − 1 s-1 s − 1 columns. Then, by Lemma 6.2, there exists a square submatrix of A ′ A' A ′ of order s − 1 s-1 s − 1 that is full rank. Hence, G R , T G_{R,T} G R , T must also be of full rank. This finishes the proof of Theorem 6.1 .
We now give a proof of Lemma 6.2.
Proof of Lemma 6.2. The proof is by a straightforward application of the probabilistic method. We note for every non-empty R , C ⊆ [ k ] R,C \subseteq[k] R , C ⊆ [ k ] of equal size, that the determinant of the corresponding submatrix A R , C A_{R,C} A R , C is a non-zero polynomial in the entries of A A A of degree at most k k k . Hence, applying the polynomial identity lemma (Fact 2.12 ) and taking a union bound over all choices of R R R and C C C , we have that
Pr A [ ∃ R , C ⊆ [ k ] : ∣ R ∣ = ∣ C ∣ ≠ 0 and rank ( A R , C ) ≠ ∣ R ∣ ] ≤ 2 k ⋅ 2 k ⋅ k q \Pr_A\left[\exists R,C \subseteq[k] : |R|=|C|\ne0\text{ and }\operatorname{rank}(A_{R,C})\ne|R|\right] \le2^k\cdot2^k\cdot\frac{k}{q} A Pr [ ∃ R , C ⊆ [ k ] : ∣ R ∣ = ∣ C ∣ = 0 and rank ( A R , C ) = ∣ R ∣ ] ≤ 2 k ⋅ 2 k ⋅ q k
Since the distribution of A + I A+I A + I is uniform for a uniform random choice of A A A , we obtain the same bound for A + I A+I A + I :
Pr A [ ∃ R , C ⊆ [ k ] : ∣ R ∣ = ∣ C ∣ ≠ 0 and rank ( ( A + I ) R , C ) ≠ ∣ R ∣ ] ≤ 2 k ⋅ 2 k ⋅ k q \Pr_A\left[\exists R,C \subseteq[k] : |R|=|C|\ne0\text{ and }\operatorname{rank}((A+I)_{R,C})\ne|R|\right] \le2^k\cdot2^k\cdot\frac{k}{q} A Pr [ ∃ R , C ⊆ [ k ] : ∣ R ∣ = ∣ C ∣ = 0 and rank (( A + I ) R , C ) = ∣ R ∣ ] ≤ 2 k ⋅ 2 k ⋅ q k
By a union bound, we thus have, over a uniform random choice of A ∈ F q k × k A\in\mathbb{F}_q^{k\times k} A ∈ F q k × k , that the probability that there is some square submatrix of A A A or A + I A+I A + I that is not full rank is at most
2 ⋅ 2 k ⋅ 2 k ⋅ k q < 1 , 2\cdot2^k\cdot2^k\cdot\frac{k}{q}<1, 2 ⋅ 2 k ⋅ 2 k ⋅ q k < 1 ,
by our choice of q q q . Hence, a matrix A ∈ F q k × k A\in\mathbb{F}_q^{k\times k} A ∈ F q k × k with the claimed property exists. □
In this section, we obtain several improvements to the above construction in various axes including rate, distance, better unshardability, and field size.
Now, we turn the construction of Theorem 6.1 into an explicit code (by losing a constant factor in the unshardability).
Theorem 6.3 (2-query unshardable codes). Let k ≥ 1 k\ge1 k ≥ 1 , n = 2 k n=2k n = 2 k , and q ≥ n q\ge n q ≥ n be a prime power. There exists an explicit code G : F q k → F q n G:\mathbb{F}_q^k\to\mathbb{F}_q^n G : F q k → F q n that is ( 2 , ⌈ k / 3 ⌉ ) (2,\lceil k/3\rceil) ( 2 , ⌈ k /3 ⌉) -unshardable.
Proof. Similar to the proof of Theorem 6.1 , we take
G = [ A A + I ] G=\begin{bmatrix}A&A+I\end{bmatrix} G = [ A A + I ]
where A A A is an explicit superregular matrix. However, unlike the proof of Theorem 6.1 , we don’t impose any condition for A + I A+I A + I to be superregular. We first note that G G G is always 2-locally decodable regardless of the choice of A A A . We will show that G G G is ⌈ k / 3 ⌉ \lceil k/3\rceil ⌈ k /3 ⌉ -unshardable.
Using Proposition 3.1 , it suffices to prove that G R , T G_{R,T} G R , T is full rank for all subsets of rows R ⊆ [ k ] R\subseteq[k] R ⊆ [ k ] of size s − 1 s-1 s − 1 and subsets of columns T ⊆ [ n ] T\subseteq[n] T ⊆ [ n ] of size k − 1 k-1 k − 1 , in order to conclude that G G G is s s s -unshardable, where s : = ⌈ k / 3 ⌉ s:=\lceil k/3\rceil s := ⌈ k /3 ⌉ . Let T = T 1 ∪ ( k + T 2 ) T=T_1\cup(k+T_2) T = T 1 ∪ ( k + T 2 ) where T 1 ⊆ [ k ] T_1\subseteq[k] T 1 ⊆ [ k ] and T 2 ⊆ [ k ] T_2\subseteq[k] T 2 ⊆ [ k ] correspond to the columns of T T T corresponding to the first and second block respectively. Observe that
G R , T = [ A R , T 1 ( A + I ) R , T 2 ] G_{R,T}=\begin{bmatrix}A_{R,T_1}&(A+I)_{R,T_2}\end{bmatrix} G R , T = [ A R , T 1 ( A + I ) R , T 2 ]
Now, since I I I is the identity matrix, we observe that A R , T 2 ∖ R A_{R,T_2\setminus R} A R , T 2 ∖ R is a submatrix of ( A + I ) R , T 2 (A+I)_{R,T_2} ( A + I ) R , T 2 . Hence, G R , T G_{R,T} G R , T contains as a submatrices A R , T 1 A_{R,T_1} A R , T 1 and A R , T 2 ∖ R A_{R,T_2\setminus R} A R , T 2 ∖ R . We have two cases:
Case 1: ∣ T 1 ∣ ≥ s − 1 |T_1| \ge s-1 ∣ T 1 ∣ ≥ s − 1 . Since ∣ R ∣ = s − 1 |R|=s-1 ∣ R ∣ = s − 1 and A A A is ( s − 1 , k − 1 ) (s-1,k-1) ( s − 1 , k − 1 ) -superregular, we conclude that A R , T 1 A_{R,T_1} A R , T 1 , and hence G R , T G_{R,T} G R , T , has full row rank.
∣ T 2 ∖ R ∣ ≥ ∣ T 2 ∣ − ∣ R ∣ = k − 1 − ∣ T 1 ∣ − ∣ R ∣ ≥ k − 2 s + 2 ≥ s , |T_2 \setminus R| \ge|T_2|-|R|=k-1-|T_1|-|R| \ge k-2s+2 \ge s, ∣ T 2 ∖ R ∣ ≥ ∣ T 2 ∣ − ∣ R ∣ = k − 1 − ∣ T 1 ∣ − ∣ R ∣ ≥ k − 2 s + 2 ≥ s ,
where the last inequality is using s = ⌈ k / 3 ⌉ s=\lceil k/3\rceil s = ⌈ k /3 ⌉ . Hence, in particular, A R , T 2 ∖ R A_{R,T_2\setminus R} A R , T 2 ∖ R (being a submatrix of A A A ) is full row rank as ∣ R ∣ < s |R|<s ∣ R ∣ < s . Therefore, G R , T G_{R,T} G R , T is also full row rank.
This concludes the proof of Theorem 6.3 , that G G G is ( 2 , ⌈ k / 3 ⌉ ) (2,\lceil k/3\rceil) ( 2 , ⌈ k /3 ⌉) -unshardable. □
Optimal Locality-Unshardability Trade-Off
Note that the above subsection cannot achieve unshardability beyond ≈ k / 2 \approx k/2 ≈ k /2 since it only makes 2 queries (see Theorem 1.2). Our constructions from § 4 are also not optimal in terms of the locality they achieve (considering constant factors). Here, we remedy these two drawbacks by achieving an optimal trade-off between the locality and unshardability for all regimes of these two parameters (existentially).
Theorem 6.4 (Optimal locality-unshardability). Let k ≥ 1 , ℓ ≥ 2 k\ge1,\ell\ge2 k ≥ 1 , ℓ ≥ 2 , n = ℓ k n=\ell k n = ℓ k and q ≤ ℓ O ( k ) q\le\ell^{O(k)} q ≤ ℓ O ( k ) be a sufficiently large prime power. There exists a code G : F q k → F q n G:\mathbb{F}_q^k\to\mathbb{F}_q^n G : F q k → F q n that is ( ℓ , ( ℓ − 1 ℓ ) ⋅ ( k − 1 ) ) (\ell,(\frac{\ell-1}{\ell})\cdot(k-1)) ( ℓ , ( ℓ ℓ − 1 ) ⋅ ( k − 1 )) -unshardable. In particular, for every ε > 0 \varepsilon>0 ε > 0 , there exist ( 1 / ε + O ( 1 ) , ( 1 − ε ) k ) (1/\varepsilon+O(1),(1-\varepsilon)k) ( 1/ ε + O ( 1 ) , ( 1 − ε ) k ) -unshardable codes.
Proof. The proof is an extension of that of Theorem 6.1 where G G G is formed by two “blocks”. Here we take G G G to be a matrix formed by ℓ \ell ℓ blocks as follows:
G = [ A 1 A 2 ⋯ A ℓ − 1 A ℓ ] (14) G=\begin{bmatrix} A_1 & A_2 & \cdots& A_{\ell-1} & A_\ell\end{bmatrix} \tag*{(14)} G = [ A 1 A 2 ⋯ A ℓ − 1 A ℓ ] (14)
where A 1 , … , A ℓ − 1 ∈ F q k × k A_1,\ldots,A_{\ell-1}\in\mathbb{F}_q^{k\times k} A 1 , … , A ℓ − 1 ∈ F q k × k will be fixed later and A ℓ : = A 1 + ⋯ + A ℓ − 1 + I A_\ell:=A_1+\cdots+A_{\ell-1}+I A ℓ := A 1 + ⋯ + A ℓ − 1 + I . We immediately note that G G G is ℓ \ell ℓ -query locally decodable by construction (using Observation 2.2 ). In order to show that G G G has good unshardability, we need to define the notion of G G G being t t t -wise superregular , which means that every collection of t t t “blocks” of G G G form a superregular matrix (where a “block” refers to A i A_i A i for i ∈ [ ℓ ] i\in[\ell] i ∈ [ ℓ ] ). With this definition, we have the following lemma (analogous to Lemma 6.2).
Lemma 6.5. There exists a matrix G ∈ F q k × ℓ k G\in\mathbb{F}_q^{k\times\ell k} G ∈ F q k × ℓ k of the form (14) that is ( ℓ − 1 ) (\ell-1) ( ℓ − 1 ) -wise superregular.
Assuming the above lemma holds, let R ⊆ [ k ] R\subseteq[k] R ⊆ [ k ] and T ⊆ [ n ] T\subseteq[n] T ⊆ [ n ] be row and column indices of sizes s − 1 s-1 s − 1 and k − 1 k-1 k − 1 respectively, where s : = ( ℓ − 1 ℓ ) ⋅ ( k − 1 ) s:=\left(\frac{\ell-1}{\ell}\right)\cdot(k-1) s := ( ℓ ℓ − 1 ) ⋅ ( k − 1 ) . Let T = T 1 ∪ ⋯ ∪ T ℓ T=T_1\cup\cdots\cup T_\ell T = T 1 ∪ ⋯ ∪ T ℓ , where T i T_i T i corresponds to the columns in the i i i -th block of G G G (i.e., A i A_i A i ). By Proposition 3.1 , it suffices to show that the submatrix G R , T G_{R,T} G R , T is full rank. By the pigeon-hole principle, we observe that there exists a block i ∗ ∈ [ ℓ ] i^*\in[\ell] i ∗ ∈ [ ℓ ] such that ∣ T i ∗ ∣ ≤ k − 1 ℓ |T_{i^*}|\le\frac{k-1}{\ell} ∣ T i ∗ ∣ ≤ ℓ k − 1 . In other words, ∣ T ∖ T i ∗ ∣ ≥ s |T\setminus T_{i^*}|\ge s ∣ T ∖ T i ∗ ∣ ≥ s . Now, note that T ∖ T i ∗ T\setminus T_{i^*} T ∖ T i ∗ only contains indices of columns of G G G that are not in the i ∗ i^* i ∗ -th block. Since G G G is ( ℓ − 1 ) (\ell-1) ( ℓ − 1 ) -wise superregular, we conclude that G R , T ∖ T i ∗ G_{R,T\setminus T_{i^*}} G R , T ∖ T i ∗ is full row rank (since ∣ R ∣ < s |R|<s ∣ R ∣ < s ). Hence, G R , T G_{R,T} G R , T is also full row rank. □
We now prove Lemma 6.5 .
Proof. Similar to Lemma 6.2, we use the probabilistic method. We note that for A 1 , … , A ℓ − 1 ∈ F q k × k A_1,\ldots,A_{\ell-1}\in\mathbb{F}_q^{k\times k} A 1 , … , A ℓ − 1 ∈ F q k × k uniformly and independently chosen (and A ℓ = A 1 + ⋯ + A ℓ − 1 + I A_\ell=A_1+\cdots+A_{\ell-1}+I A ℓ = A 1 + ⋯ + A ℓ − 1 + I ), that the matrix G G G is “( ℓ − 1 ) (\ell-1) ( ℓ − 1 ) -wise uniform”, i.e., the marginal distribution of any ℓ − 1 \ell-1 ℓ − 1 blocks of G G G is uniform. Hence, using the polynomial identity lemma (Fact 2.12 ) and a union bound over suitable submatrices of G G G , the probability that G G G is not ( ℓ − 1 ) (\ell-1) ( ℓ − 1 ) -wise superregular is at most
ℓ ⋅ ( ( ℓ − 1 ) k k ) ⋅ 2 2 k ⋅ k q ≤ ℓ O ( k ) q < 1 , \ell\cdot\binom{(\ell-1)k}{k}\cdot2^{2k}\cdot\frac{k}{q}\leq\frac{\ell^{O(k)}}{q}<1, ℓ ⋅ ( k ( ℓ − 1 ) k ) ⋅ 2 2 k ⋅ q k ≤ q ℓ O ( k ) < 1 ,
by taking q q q suitably large.
Improving Rate and Distance (MDS)
We note that the 2-query constructions discussed above have a rate of at most 1 / 2 1/2 1/2 (i.e., n ≥ 2 k n\geq2k n ≥ 2 k ). The distance of the code is unclear. In this subsection, we show how to get a rate approaching one, admittedly at the expense of a worse unshardability, and also achieve the best possible distance (i.e., MDS property). In particular, we show the following.
Proposition 6.6. Let c ≥ 1 c\geq1 c ≥ 1 , k k k be a multiple of c c c , n = k + k / c n=k+k/c n = k + k / c , and q ≥ n q\geq n q ≥ n be a prime power. There exists an explicit code G : F q k → F q n G:\mathbb{F}_q^k\to\mathbb{F}_q^n G : F q k → F q n that is ( 2 , ( k − 1 ) / ( 2 c + 2 ) ) (2,(k-1)/(2c+2)) ( 2 , ( k − 1 ) / ( 2 c + 2 )) -unshardable.
In particular, for every ε > 0 \varepsilon>0 ε > 0 , there exist explicit ( 2 , Ω ( ε k ) ) (2,\Omega(\varepsilon k)) ( 2 , Ω ( ε k )) -unshardable codes of rate 1 − Θ ( ε ) 1-\Theta(\varepsilon) 1 − Θ ( ε ) .
Proof. The proof closely follows that of Theorem 6.3 . Let k = c ⋅ k ′ k=c\cdot k' k = c ⋅ k ′ where k ′ ∈ N k'\in\mathbb{N} k ′ ∈ N . We take
G = [ A B + I ] , G=\begin{bmatrix} A & B+I \end{bmatrix}, G = [ A B + I ] ,
where A A A is a k × k ′ k\times k' k × k ′ matrix that we will choose later and B B B is a k × k k\times k k × k matrix given by $B=
\begin{bmatrix} A & A & \cdots & A \end{bmatrix} $
(repeated c c c many times). Note that the resulting blocklength is n = k ′ + k = k + k / c n=k'+k=k+k/c n = k ′ + k = k + k / c , as desired. We now take
A = [ A 1 A 2 ⋮ A c ] , A=\begin{bmatrix} A_1 \\ A_2 \\ \vdots\\ A_c \end{bmatrix}, A = A 1 A 2 ⋮ A c ,
where A 1 , A 2 , … , A c A_1,A_2,\ldots,A_c A 1 , A 2 , … , A c are k ′ × k ′ k'\times k' k ′ × k ′ matrices such that A A A is superregular; such a matrix can be constructed explicitly using Lemma 2.14 . That is, we have
G = [ A 1 A 1 + I A 1 ⋯ A 1 A 2 A 2 A 2 + I ⋯ A 2 ⋮ ⋮ ⋮ ⋱ ⋮ A c A c A c ⋯ A c + I ] . G=\begin{bmatrix}
A_1 & A_1+I & A_1 & \cdots& A_1 \\
A_2 & A_2 & A_2+I & \cdots& A_2 \\
\vdots& \vdots& \vdots& \ddots& \vdots\\
A_c & A_c & A_c & \cdots& A_c+I
\end{bmatrix}. G = A 1 A 2 ⋮ A c A 1 + I A 2 ⋮ A c A 1 A 2 + I ⋮ A c ⋯ ⋯ ⋱ ⋯ A 1 A 2 ⋮ A c + I .
In order to argue about the locality and unshardability of G G G , we divide the message indices [ k ] [k] [ k ] into c c c many contiguous blocks, and similarly we divide the columns of G G G into c + 1 c+1 c + 1 many contiguous blocks (and index the blocks as 0 , 1 , … , c 0,1,\ldots,c 0 , 1 , … , c from left to right). By inspecting the matrix G G G , we note that for every message index i ∈ [ k ] i \in[k] i ∈ [ k ] , if i i i is the j j j -th block, we have
1 i = g k ′ + i − g j , \mathbf{1}_i=\mathbf{g}_{k'+i}-\mathbf{g}_j, 1 i = g k ′ + i − g j ,
where g 1 , … , g n \mathbf{g}_1,\ldots,\mathbf{g}_n g 1 , … , g n denote the columns of G G G . Hence G G G can be locally decoded in 2 queries. We now show that the unshardability of G G G is at least ( k − 1 ) / ( 2 c + 2 ) (k-1)/(2c+2) ( k − 1 ) / ( 2 c + 2 ) .
Let T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] be of size k − 1 k-1 k − 1 and s : = ( k − 1 ) / ( 2 c + 2 ) s := (k-1)/(2c+2) s := ( k − 1 ) / ( 2 c + 2 ) . By Proposition 3.1 , it suffices to show that for an arbitrary subset of rows R ⊆ [ k ] R \subseteq[k] R ⊆ [ k ] of size at most s s s that G R , T G_{R,T} G R , T has full rank. First, note that there exists at least one block of columns of G G G , say j ∈ { 0 , 1 , … , c } j \in\{0,1,\ldots,c\} j ∈ { 0 , 1 , … , c } that T T T intersects in at least ( k − 1 ) / ( c + 1 ) (k-1)/(c+1) ( k − 1 ) / ( c + 1 ) indices (call these indices T ′ ⊆ [ n ] T' \subseteq[n] T ′ ⊆ [ n ] ). If j = 0 j=0 j = 0 , we observe that G R , T ′ G_{R,T'} G R , T ′ is a submatrix of the matrix A A A . Thus, by our assumption on the matrix A A A , we have that G R , T ′ G_{R,T'} G R , T ′ is full rank. Now, suppose j > 0 j>0 j > 0 . Since each row of G R , T ′ G_{R,T'} G R , T ′ differs from the corresponding row of A R , T ′ A_{R,T'} A R , T ′ on at most one index, we observe that there exists T ′ ′ ⊆ T ′ T'' \subseteq T' T ′′ ⊆ T ′ of size at least
∣ T ′ ∣ − ∣ R ∣ ≥ ( k − 1 ) / ( c + 1 ) − ( k − 1 ) / ( 2 c + 2 ) = s , |T'|-|R| \ge(k-1)/(c+1)-(k-1)/(2c+2)=s, ∣ T ′ ∣ − ∣ R ∣ ≥ ( k − 1 ) / ( c + 1 ) − ( k − 1 ) / ( 2 c + 2 ) = s ,
such that G R , T ′ ′ = A R , T ′ ′ G_{R,T''}=A_{R,T''} G R , T ′′ = A R , T ′′ . Then, since A R , T ′ ′ A_{R,T''} A R , T ′′ (being a submatrix of A A A ) must have full rank, we obtain that G R , T ′ ′ G_{R,T''} G R , T ′′ (and hence G R , T G_{R,T} G R , T ) must be full rank. This finishes the proof that G G G has unshardability at least ( k − 1 ) / ( 2 c + 2 ) (k-1)/(2c+2) ( k − 1 ) / ( 2 c + 2 ) .
Now, we show that there exist unshardable codes achieving rate close to 1 with good distance. In fact, we show that one can guarantee the MDS property on top of locality and unshardability23 .
Theorem 6.7 (Optimal rate-distance (MDS)). Let c ≥ 1 c \ge1 c ≥ 1 , k k k be a multiple of c c c , n = k + k / c n=k+k/c n = k + k / c , and q = 2 O ( k ) q=2^{O(k)} q = 2 O ( k ) be a sufficiently large prime power. Then there exists an MDS code G : F q k → F q n G:\mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n that is ( 2 , ( k − 1 ) / ( 2 c + 2 ) ) (2,(k-1)/(2c+2)) ( 2 , ( k − 1 ) / ( 2 c + 2 )) -unshardable.
In particular, for every ε > 0 \varepsilon>0 ε > 0 , there exist ( 2 , Ω ( ε k ) ) (2,\Omega(\varepsilon k)) ( 2 , Ω ( ε k )) -unshardable MDS codes of rate 1 − Θ ( ε ) 1-\Theta(\varepsilon) 1 − Θ ( ε ) .
Proof. The idea is to show that the construction of Proposition 6.6 is actually an MDS code for a random choice of the matrix A A A , with high probability. We take
G = [ A 1 A 1 + I A 1 ⋯ A 1 A 2 A 2 A 2 + I ⋯ A 2 ⋮ ⋮ ⋮ ⋱ ⋮ A c A c A c ⋯ A c + I ] , G=
\begin{bmatrix}
A_1 & A_1+I & A_1 & \cdots& A_1\\
A_2 & A_2 & A_2+I & \cdots& A_2\\
\vdots& \vdots& \vdots& \ddots& \vdots\\
A_c & A_c & A_c & \cdots& A_c+I
\end{bmatrix}, G = A 1 A 2 ⋮ A c A 1 + I A 2 ⋮ A c A 1 A 2 + I ⋮ A c ⋯ ⋯ ⋱ ⋯ A 1 A 2 ⋮ A c + I ,
where k ′ : = k / c k' := k/c k ′ := k / c and A 1 , … , A c ∈ F q k ′ × k ′ A_1,\ldots,A_c \in\mathbb{F}_q^{k'\times k'} A 1 , … , A c ∈ F q k ′ × k ′ are chosen uniformly and independently. Note that G G G is always 2-locally decodable. By a similar argument as in Proposition 6.6 , we note that G G G is ( ( k − 1 ) / ( 2 c + 2 ) ) ((k-1)/(2c+2)) (( k − 1 ) / ( 2 c + 2 )) -unshardable if the matrix [ A 1 T ⋯ A c T ] [A_1^{\mathsf{T}}\ \cdots\ A_c^{\mathsf{T}}] [ A 1 T ⋯ A c T ] is superregular, which happens with probability at least
1 − 4 k ⋅ k q > 1 2 . (15) 1-4^k\cdot\frac{k}{q}>\frac{1}{2}. \tag*{(15)} 1 − 4 k ⋅ q k > 2 1 . (15)
It remains to show that G G G is also an MDS code with high probability. For this, we show that each k × k k \times k k × k minor of G G G is symbolically non-zero. More specifically, let S 0 , S 1 , … , S c ⊆ [ k ′ ] S_0, S_1, \ldots, S_c \subseteq[k'] S 0 , S 1 , … , S c ⊆ [ k ′ ] be arbitrary subsets whose sizes sum to k k k corresponding to some k k k columns of G G G . We will show that there exists a choice of vectors ( a i ) i ∈ [ k ′ ] (\mathbf{a}_i)_{i \in[k']} ( a i ) i ∈ [ k ′ ] in F q k ′ \mathbb{F}_q^{k'} F q k ′ such that
{ a i : i ∈ S 0 } ∪ { a i + 1 i : i ∈ S 1 } ∪ ⋯ ∪ { a i + 1 ( c − 1 ) k ′ + i : i ∈ S c } (16) \{\mathbf{a}_i : i \in S_0\} \cup\{\mathbf{a}_i + \mathbf{1}_i : i \in S_1\} \cup\cdots\cup\{\mathbf{a}_i + \mathbf{1}_{(c-1)k'+i} : i \in S_c\} \tag*{(16)} { a i : i ∈ S 0 } ∪ { a i + 1 i : i ∈ S 1 } ∪ ⋯ ∪ { a i + 1 ( c − 1 ) k ′ + i : i ∈ S c } (16)
are linearly independent. By performing elementary column operations { a , a + 1 i } ↦ { a , 1 i } \{\mathbf{a}, \mathbf{a}+\mathbf{1}_i\} \mapsto\{\mathbf{a},\mathbf{1}_i\} { a , a + 1 i } ↦ { a , 1 i } , (16) is equivalent to the following vectors being linearly independent:
{ a i : i ∈ S 0 } ∪ ⋃ j ∈ [ c ] { 1 ( j − 1 ) k ′ + i : i ∈ S j ∩ S 0 } ∪ ⋃ j ∈ [ c ] { a i + 1 ( j − 1 ) k ′ + i : i ∈ S j ∖ S 0 } . (17) \{\mathbf{a}_i : i \in S_0\} \cup\bigcup_{j \in[c]} \{\mathbf{1}_{(j-1)k'+i} : i \in S_j \cap S_0\} \cup\bigcup_{j \in[c]} \{\mathbf{a}_i+\mathbf{1}_{(j-1)k'+i} : i \in S_j \setminus S_0\}. \tag*{(17)} { a i : i ∈ S 0 } ∪ j ∈ [ c ] ⋃ { 1 ( j − 1 ) k ′ + i : i ∈ S j ∩ S 0 } ∪ j ∈ [ c ] ⋃ { a i + 1 ( j − 1 ) k ′ + i : i ∈ S j ∖ S 0 } . (17)
Now, we observe that taking a i = 0 \mathbf{a}_i=\mathbf{0} a i = 0 for all i ∈ ⋃ j ∈ [ c ] S j ∖ S 0 i \in\bigcup_{j \in[c]} S_j \setminus S_0 i ∈ ⋃ j ∈ [ c ] S j ∖ S 0 results in pairwise disjoint standard basis vectors along with ( a i ) i ∈ S 0 (\mathbf{a}_i)_{i \in S_0} ( a i ) i ∈ S 0 . Hence, there exists vectors as in (16) that are linearly independent. Applying the polynomial distance lemma (Fact 2.12 ) for the determinant, we thus conclude that the probability that a particular k × k k \times k k × k submatrix of G G G is not full rank is at most k / q k/q k / q . Union bounding over all such submatrices, we obtain a total error of at most
( n k ) ⋅ k q ≤ 2 O ( k ) q < 1 2 . (18) \binom{n}{k} \cdot\frac{k}{q} \le\frac{2^{O(k)}}{q} < \frac{1}{2}. \tag*{(18)} ( k n ) ⋅ q k ≤ q 2 O ( k ) < 2 1 . (18)
Using (15) and (18) , this completes the proof of existence of a code G G G that is MDS as well as being ( 2 , ( k − 1 ) / ( 2 c + 2 ) ) (2,(k-1)/(2c+2)) ( 2 , ( k − 1 ) / ( 2 c + 2 )) -unshardable.
Small Fields
The results of Theorem 6.4 achieving optimal unshardability for a given locality parameter, only apply for fields of size depending on the message length k k k . In this subsection, we provide a way to get similar results over fields of size independent of n n n (again, non-explicitly).
Theorem 6.8 (Constant-sized fields). For every ε > 0 \varepsilon> 0 ε > 0 , there exists a prime power q = ( 1 / ε ) O ( 1 / ε ) q=(1/\varepsilon)^{O(1/\varepsilon)} q = ( 1/ ε ) O ( 1/ ε ) such that for all integers k ≥ 1 k \ge1 k ≥ 1 , there exists a code G : F q k → F q n G:\mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n that is ( O ( 1 / ε ) , ( 1 − ε ) k ) (O(1/\varepsilon),(1-\varepsilon)k) ( O ( 1/ ε ) , ( 1 − ε ) k ) -unshardable, where n = O ( k / ε ) n=O(k/\varepsilon) n = O ( k / ε ) .
Proof. We extend the proof of Theorem 6.4 and take G G G to be a matrix formed by ℓ : = ⌈ c / ε ⌉ \ell:= \lceil c/\varepsilon\rceil ℓ := ⌈ c / ε ⌉ (where c c c is a constant that we will choose later) blocks as follows:
G = [ A 1 A 2 ⋯ A ℓ − 1 A ℓ ] , (19) G=\begin{bmatrix} A_1 & A_2 & \cdots& A_{\ell-1} & A_\ell\end{bmatrix}, \tag*{(19)} G = [ A 1 A 2 ⋯ A ℓ − 1 A ℓ ] , (19)
where A 1 , … , A ℓ − 1 ∈ F q k × k A_1,\ldots,A_{\ell-1}\in\mathbb{F}_q^{k\times k} A 1 , … , A ℓ − 1 ∈ F q k × k are chosen independently and uniformly at random and A ℓ : = A 1 + ⋯ + A ℓ − 1 + I A_\ell:= A_1+\cdots+A_{\ell-1}+I A ℓ := A 1 + ⋯ + A ℓ − 1 + I . Clearly, G G G has locality ℓ \ell ℓ . We now show that it has unshardability s : = ⌈ ( 1 − ε ) k ⌉ s:=\lceil(1-\varepsilon)k\rceil s := ⌈( 1 − ε ) k ⌉ with positive probability. We now deviate from the proof of Theorem 6.4 by a more careful bound on the error probability. Because of Proposition 3.1 , recall that it suffices to show that G G G is ( s − 1 , k − 1 ) (s-1,k-1) ( s − 1 , k − 1 ) -superregular. However, using a pigeon-hole argument as in Theorem 6.4 , it is enough to show that G G G is ( ℓ − 1 ) (\ell-1) ( ℓ − 1 ) -wise ( s − 1 , t ) (s-1,t) ( s − 1 , t ) -superregular24 where t : = ( ℓ − 1 ℓ ) ⋅ ( k − 1 ) t:=\left(\frac{\ell-1}{\ell}\right)\cdot(k-1) t := ( ℓ ℓ − 1 ) ⋅ ( k − 1 ) . Note that the marginal distribution of G G G restricted to any ℓ − 1 \ell-1 ℓ − 1 blocks is uniformly random. Hence, the following fact will be useful.
Fact 6.9 (e.g. [3 ] ). For s < t s < t s < t , the probability of a uniformly random s × t s \times t s × t matrix over F q \mathbb{F}_q F q being full rank is equal to
∏ i = 0 s − 1 ( 1 − 1 q t − i ) ≥ 1 − s q t − s + 1 . \prod_{i=0}^{s-1}\left(1-\frac{1}{q^{t-i}}\right) \ge1-\frac{s}{q^{t-s+1}}. i = 0 ∏ s − 1 ( 1 − q t − i 1 ) ≥ 1 − q t − s + 1 s .
Now, applying a union bound over all s × t s \times t s × t submatrices of G G G entirely contained in some ℓ − 1 \ell-1 ℓ − 1 blocks, we obtain that the probability that G G G is not ( ℓ − 1 ) (\ell-1) ( ℓ − 1 ) -wise ( s − 1 , t ) (s-1,t) ( s − 1 , t ) -superregular is at most
ℓ ⋅ ( k s ) ⋅ ( ( ℓ − 1 ) k t ) ⋅ s q t − s + 1 ≤ ℓ O ( k ) q t − s + 1 < 1 , \ell\cdot\binom{k}{s} \cdot\binom{(\ell-1)k}{t} \cdot\frac{s}{q^{t-s+1}} \le\frac{\ell^{O(k)}}{q^{t-s+1}} < 1, ℓ ⋅ ( s k ) ⋅ ( t ( ℓ − 1 ) k ) ⋅ q t − s + 1 s ≤ q t − s + 1 ℓ O ( k ) < 1 ,
using the fact that t − s ≥ ε k / 2 t-s \ge\varepsilon k/2 t − s ≥ ε k /2 (taking c = 2 c=2 c = 2 and assuming k ≥ 10 ε k \ge10\varepsilon k ≥ 10 ε ) and taking suitable q = ( 1 / ε ) Θ ( 1 / ε ) q=(1/\varepsilon)^{\Theta(1/\varepsilon)} q = ( 1/ ε ) Θ ( 1/ ε ) . Hence, this completes the proof of Theorem 6.8 .
We note that the above proofs (including Theorem 1.3 and Theorem 6.8 ) only work for sufficiently large fields and in particular, do not yield anything for the binary alphabet F 2 \mathbb{F}_2 F 2 . We show below how to get unshardable codes over all fields (existentially).
Theorem 6.10 (All fields). For every finite field F q \mathbb{F}_q F q , there exist infinite values of k k k such that there exists n ≤ 2 k n \le2k n ≤ 2 k and a code G : F q k → F q n G:\mathbb{F}_q^k \to\mathbb{F}_q^n G : F q k → F q n that is ( 2 , Ω ( k ) ) (2,\Omega(k)) ( 2 , Ω ( k )) -unshardable.
Proof. We remark that the proof of Theorem 6.8 does not immediately extend to very small fields since the union bound is not strong enough. Regardless, the construction achieving rate close to 1 (i.e., Proposition 6.6 ) does extend as we prove below. In particular, we let c ≥ 1 c \ge1 c ≥ 1 be a sufficiently large constant dividing k k k , n : = k + k / c n := k+k/c n := k + k / c , and take
G = [ A 1 A 1 + I A 1 ⋯ A 1 A 2 A 2 A 2 + I ⋯ A 2 ⋮ ⋮ ⋮ ⋱ ⋮ A c A c A c ⋯ A c + I ] , G=\begin{bmatrix}
A_1 & A_1+I & A_1 & \cdots& A_1\\
A_2 & A_2 & A_2+I & \cdots& A_2\\
\vdots& \vdots& \vdots& \ddots& \vdots\\
A_c & A_c & A_c & \cdots& A_c+I
\end{bmatrix}, G = A 1 A 2 ⋮ A c A 1 + I A 2 ⋮ A c A 1 A 2 + I ⋮ A c ⋯ ⋯ ⋱ ⋯ A 1 A 2 ⋮ A c + I ,
where A 1 , … , A c A_1,\ldots,A_c A 1 , … , A c are k ′ × k ′ k' \times k' k ′ × k ′ matrices chosen uniformly and independently at random, where k ′ : = k / c k' := k/c k ′ := k / c . Using Observation 2.2 , G G G is always 2-locally decodable. We now show that G G G is Ω ( k ) \Omega(k) Ω ( k ) -unshardable with positive probability. In particular, by an identical argument as Proposition 6.6 , it suffices to show that the matrix
A = [ A 1 A 2 ⋮ A c ] A=\begin{bmatrix}
A_1\\
A_2\\
\vdots\\
A_c
\end{bmatrix} A = A 1 A 2 ⋮ A c
is ( s − 1 , ⌊ ( k − 1 ) / ( c + 1 ) ⌋ ) (s-1,\lfloor(k-1)/(c+1)\rfloor) ( s − 1 , ⌊( k − 1 ) / ( c + 1 )⌋) -superregular to conclude that G G G is s s s -unshardable (where s s s is such that s ≤ ⌊ ( k − 1 ) / ( 2 c + 2 ) ⌋ s \le\lfloor(k-1)/(2c+2)\rfloor s ≤ ⌊( k − 1 ) / ( 2 c + 2 )⌋ ). Applying a union bound over all ( s − 1 ) × ⌊ ( k − 1 ) / ( c + 1 ) ⌋ (s-1) \times\lfloor(k-1)/(c+1)\rfloor ( s − 1 ) × ⌊( k − 1 ) / ( c + 1 )⌋ submatrices of A A A and using Fact 6.9 , we get that the probability that G G G is not s s s -unshardable is at most
( k s ) ⋅ ( k / c ⌊ ( k − 1 ) / ( c + 1 ) ⌋ ) ⋅ s q ⌊ ( k − 1 ) / ( c + 1 ) ⌋ − s + 1 . (20) \binom{k}{s}\cdot\binom{k/c}{\lfloor(k-1)/(c+1)\rfloor}\cdot\frac{s}{q^{\lfloor(k-1)/(c+1)\rfloor-s+1}}. \tag*{(20)} ( s k ) ⋅ ( ⌊( k − 1 ) / ( c + 1 )⌋ k / c ) ⋅ q ⌊( k − 1 ) / ( c + 1 )⌋ − s + 1 s . (20)
We will now set s : = ⌊ ( k − 1 ) / ( 2 c + 2 ) ⌋ 2 s := \left\lfloor(k-1)/(2c+2)\right\rfloor^2 s := ⌊ ( k − 1 ) / ( 2 c + 2 ) ⌋ 2 and argue that the above quantity is less than 1. First, we have
( k s ) ≤ ( e k s ) s ≤ c O ( k / c 2 ) . \binom{k}{s} \le\left(\frac{\mathrm{e}k}{s}\right)^s \le c^{O(k/c^2)}. ( s k ) ≤ ( s e k ) s ≤ c O ( k / c 2 ) .
By similar calculations, the second factor is
( k / c ⌊ ( k − 1 ) / ( c + 1 ) ⌋ ) = ( k / c k / c − ⌊ ( k − 1 ) / ( c + 1 ) ⌋ ) ≤ c O ( k / c 2 ) . \binom{k/c}{\left\lfloor(k-1)/(c+1)\right\rfloor} = \binom{k/c}{k/c-\left\lfloor(k-1)/(c+1)\right\rfloor} \le c^{O(k/c^2)}. ( ⌊ ( k − 1 ) / ( c + 1 ) ⌋ k / c ) = ( k / c − ⌊ ( k − 1 ) / ( c + 1 ) ⌋ k / c ) ≤ c O ( k / c 2 ) .
Finally, we have
s q ⌊ ( k − 1 ) / ( c + 1 ) ⌋ − s + 1 ≤ k 2 Ω ( k / c ) . \frac{s}{q^{\left\lfloor(k-1)/(c+1)\right\rfloor-s+1}} \le\frac{k}{2^{\Omega(k/c)}}. q ⌊ ( k − 1 ) / ( c + 1 ) ⌋ − s + 1 s ≤ 2 Ω ( k / c ) k .
Combining the above three bounds, we get that (20) is at most
c O ( k / c 2 ) ⋅ k 2 Ω ( k / c ) ≤ 1 2 Ω ( k / c − log k − k log c / c 2 ) < 1 , c^{O(k/c^2)} \cdot\frac{k}{2^{\Omega(k/c)}} \le\frac{1}{2^{\Omega(k/c-\log k-k\log c/c^2)}} < 1, c O ( k / c 2 ) ⋅ 2 Ω ( k / c ) k ≤ 2 Ω ( k / c − l o g k − k l o g c / c 2 ) 1 < 1 ,
where the last inequality follows by choosing c = O ( 1 ) c = O(1) c = O ( 1 ) to be sufficiently large. Therefore, there exists a code G G G that is s = Ω ( k ) s = \Omega(k) s = Ω ( k ) -unshardable concluding Theorem 6.10 .
Ruling Out Local-Local Unshardability
In this section, we discuss a variant of our definition of unshardability, which we call “local-local unshardability,” and show a negative result for the same.
For a map C C C , we say T T T ℓ \ell ℓ -locally determines i i i w.r.t. C C C if there exists D ⊆ T D \subseteq T D ⊆ T of size ∣ D ∣ ≤ ℓ |D| \le\ell ∣ D ∣ ≤ ℓ such that D D D determines i i i w.r.t. C C C . We now define a variant of unshardability where if one party fails to locally decode then the same will be true for many other parties.
Definition 7.1 (Local-Local Unshardability). Let n , k ∈ N n,k \in\mathbb{N} n , k ∈ N and C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n . We say C C C is a ( ℓ , s ) (\ell,s) ( ℓ , s ) -local-local unshardable code if the following holds:
C C C is ℓ \ell ℓ -locally decodable under no errors (as in Definition 2.1 ).
For every T ⊆ [ n ] T \subseteq[n] T ⊆ [ n ] , if there exists an index i ∈ [ k ] i \in[k] i ∈ [ k ] that is not ℓ \ell ℓ -locally determined by T T T then there are at least s s s indices in [ k ] [k] [ k ] that are also not ℓ \ell ℓ -locally determined by T T T .
We note that it is apriori unclear how the above definition compares to our original definition of unshardability since both the premise and conclusion of Item 2 in the above definition are weaker than those of Definition 2.7 . Regardless, we are able to essentially rule out the existence of interesting local-local unshardable codes.
Theorem 7.2. Any C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n that is a ( ℓ , s ) (\ell,s) ( ℓ , s ) -local-local unshardable code must have s ≤ ℓ s \le\ell s ≤ ℓ .
Proof. Fix any C : Σ k → Σ n C : \Sigma^k \to\Sigma^n C : Σ k → Σ n that satisfies condition (1) of the above definition. Choose the minimal subset T ∗ ⊆ [ n ] T^* \subseteq[n] T ∗ ⊆ [ n ] such that condition (1) still holds for C ∣ T ∗ C|_{T^*} C ∣ T ∗ . For this T ∗ T^* T ∗ , every i ∈ [ k ] i \in[k] i ∈ [ k ] is determined by some D i ⊆ T ∗ D_i \subseteq T^* D i ⊆ T ∗ of size ∣ D i ∣ ≤ ℓ |D_i| \le\ell ∣ D i ∣ ≤ ℓ . We will find the j ∗ ∈ [ n ] j^* \in[n] j ∗ ∈ [ n ] that is “touched” by the fewest D i D_i D i ’s, that is, j ∗ j^* j ∗ minimizes φ ( j ) : = ∣ { i : j ∈ D i } ∣ \varphi(j) := |\{i : j \in D_i\}| φ ( j ) := ∣ { i : j ∈ D i } ∣ over all j ∈ [ n ] j \in[n] j ∈ [ n ] . Using the upper bound on the size of each D i D_i D i , by an averaging argument we have φ ( j ∗ ) ≤ k ℓ / ∣ T ∗ ∣ ≤ ℓ \varphi(j^*) \le k\ell/|T^*| \le\ell φ ( j ∗ ) ≤ k ℓ /∣ T ∗ ∣ ≤ ℓ where the final inequality follows since ∣ T ∗ ∣ ≥ k |T^*| \ge k ∣ T ∗ ∣ ≥ k because C ∣ T ∗ C|_{T^*} C ∣ T ∗ is injective. Now set T ′ = T ∗ ∖ { j ∗ } T' = T^* \setminus\{j^*\} T ′ = T ∗ ∖ { j ∗ } . By minimality of T ∗ T^* T ∗ we have that there exists i ∗ ∈ [ k ] i^* \in[k] i ∗ ∈ [ k ] that is not locally determined by any D ⊆ T ′ D \subseteq T' D ⊆ T ′ of size ≤ ℓ \le\ell ≤ ℓ . On the other hand, there are at least ( k − ℓ ) (k-\ell) ( k − ℓ ) -many i i i ’s such that D i D_i D i avoids j ∗ j^* j ∗ so D i ⊆ T ′ D_i \subseteq T' D i ⊆ T ′ ; these i i i ’s remain ℓ \ell ℓ -locally determined by T ′ T' T ′ . We conclude that s ≤ ℓ s \le\ell s ≤ ℓ .
It is easy to tightly meet this lower bound with the “batching” style construction that we briefly described in § 1 . That is, simply group the input into ℓ \ell ℓ -size blocks and apply a superregular linear map block-wise. This is unsurprising as the batching technique essentially makes local and global determination equivalent.
AI Disclosure. The main technical ideas and constructions of § 4 and consequently § 5 using the notion of a sparse rebasing w.r.t. extension fields (Definition 4.1 ) were found by ChatGPT Sol-5.6 prompted on an initial draft of our characterizations and constructions from § 3 and § 6 . The authors verified, digested, and contextualized the AI proofs and take full responsibility for the results. More details can be found in § 1.3 . AI tools were used to assist with formatting and organizing the manuscript, and correcting typos. No AI tools were used in modeling or defining unshardable codes.
References
Unshardability of Tensor-Product Reed-Solomon Codes
In this section, we show the challenge in constructing unshardable codes using a tensor-product of Reed-Solomon codes (equivalently multivariate polynomials with an individual degree bound). While such codes can be locally decoded in ℓ = o ( k ) \ell= o(k) ℓ = o ( k ) queries, obtaining unshardability appears to be challenging. In particular, we show that for the natural setting of treating the message symbols as low-individual-degree evaluations over a “grid”, there exist settings where unshardability remains s = O ( ℓ ) s = O(\ell) s = O ( ℓ ) .
We start with a few definitions. For positive integers d , m d,m d , m , let P d ( F q m ) \mathcal{P}_d(\mathbb{F}_q^m) P d ( F q m ) (or simply P d \mathcal{P}_d P d if the rest of the parameters are known from context) denote the set of m m m -variate polynomials over F q \mathbb{F}_q F q of individual degree at most d d d . We say that I ⊆ F q m I \subseteq\mathbb{F}_q^m I ⊆ F q m is an interpolating set for P d ( F q m ) \mathcal{P}_d(\mathbb{F}_q^m) P d ( F q m ) if for every assignment f : I → F q f : I \to\mathbb{F}_q f : I → F q , there exists a unique polynomial P ∈ P d ( F q m ) P \in\mathcal{P}_d(\mathbb{F}_q^m) P ∈ P d ( F q m ) such that f ( a ) = P ( a ) f(\mathbf{a}) = P(\mathbf{a}) f ( a ) = P ( a ) for all a ∈ I a \in I a ∈ I . A concrete interpolating set that is the focus of this section is the “grid” I = S 2 I = S^2 I = S 2 , with ∣ S ∣ = d + 1 |S| = d + 1 ∣ S ∣ = d + 1 .
We are now ready to define polynomial evaluation codes.
Definition A.1 (Polynomial evaluation codes). For an interpolating set I ⊆ P d ( F q m ) I \subseteq\mathcal{P}_d(\mathbb{F}_q^m) I ⊆ P d ( F q m ) and an evaluation set E ⊆ F q m E \subseteq\mathbb{F}_q^m E ⊆ F q m , we define the evaluation code C d ( I , E ) : F q I → F q E C_d(I,E) : \mathbb{F}_q^I \to\mathbb{F}_q^E C d ( I , E ) : F q I → F q E (or just C d C_d C d for simplicity) as follows: For a given f ∈ F q I f \in\mathbb{F}_q^I f ∈ F q I , let P ∈ P d P \in\mathcal{P}_d P ∈ P d be the unique polynomial such that P ( a ) = f ( a ) P(a) = f(a) P ( a ) = f ( a ) for all a ∈ I a \in I a ∈ I . We then let
C d ( f ) = ( P ( b ) ) b ∈ E . C_d(f) = (P(b))_{b \in E}. C d ( f ) = ( P ( b ) ) b ∈ E .
Note that C d ( I , E ) C_d(I,E) C d ( I , E ) has message length k = ∣ I ∣ k = |I| k = ∣ I ∣ and blocklength n = ∣ E ∣ n = |E| n = ∣ E ∣ . We mainly focus on m = 1 m = 1 m = 1 and m = 2 m = 2 m = 2 . We begin by recalling our discussion from § 1 that when m = 1 m = 1 m = 1 (i.e., for (a variant of) Reed-Solomon codes) we achieve maximal unshardability (but no locality):
Claim A.2 (m = 1 m = 1 m = 1 ). Let I ⊆ F q I \subseteq\mathbb{F}_q I ⊆ F q be of size d + 1 d + 1 d + 1 and E ⊆ I ‾ E \subseteq\overline{I} E ⊆ I be of size at least d + 1 d + 1 d + 1 . Then C d ( I , E ) C_d(I,E) C d ( I , E ) is ( d + 1 , d + 1 ) (d + 1,d + 1) ( d + 1 , d + 1 ) -unshardable .
We now prove that for m = 2 m = 2 m = 2 , there exist choices of I = S 2 I = S^2 I = S 2 such that C d C_d C d has unshardability at most O ( k ) O(\sqrt{k}) O ( k ) . Combined with the fact that C d C_d C d is O ( d ) = O ( k ) O(d) = O(\sqrt{k}) O ( d ) = O ( k ) establishes the main conclusion of this section.
Claim A.3. Let S S S be a subfield of F q \mathbb{F}_q F q of size d + 1 d + 1 d + 1 and q ≥ 4 d + 3 q \ge4d + 3 q ≥ 4 d + 3 . Then, for I = S 2 I = S^2 I = S 2 and E ⊇ S ‾ 2 E \supseteq\overline{S}^2 E ⊇ S 2 , if C d ( I , E ) C_d(I,E) C d ( I , E ) is ( ℓ , s ) (\ell,s) ( ℓ , s ) -unshardable, then we have s ≤ d + 1 = ∣ I ∣ s \le d + 1 = \sqrt{|I|} s ≤ d + 1 = ∣ I ∣ .
Proof. For α ∈ F q \alpha\in\mathbb{F}_q α ∈ F q , let L α : = { ( a 1 , a 2 ) ∈ F q 2 : a 1 + a 2 = α } L_\alpha:= \{(a_1,a_2) \in\mathbb{F}_q^2 : a_1 + a_2 = \alpha\} L α := {( a 1 , a 2 ) ∈ F q 2 : a 1 + a 2 = α } . Letting T : = ( ⋃ α ∈ S ∖ { 0 } L α ) ∩ S ‾ 2 T := \left(\bigcup_{\alpha\in S \setminus\{0\}} L_\alpha\right) \cap\overline{S}^2 T := ( ⋃ α ∈ S ∖ { 0 } L α ) ∩ S 2 , we first note that T T T does not determine ( 0 , 0 ) ∈ I (0,0) \in I ( 0 , 0 ) ∈ I since ∏ α ∈ S ∖ { 0 } ( X + Y − α ) \prod_{\alpha\in S \setminus\{0\}}(X + Y - \alpha) ∏ α ∈ S ∖ { 0 } ( X + Y − α ) (which is a non-zero polynomial in P d \mathcal{P}_d P d ) vanishes on T T T but not at ( 0 , 0 ) (0,0) ( 0 , 0 ) . We will show that T T T doesn’t determines at most d + 1 d + 1 d + 1 points in S 2 S^2 S 2 . Let P ( X , Y ) ∈ P d P(X,Y) \in\mathcal{P}_d P ( X , Y ) ∈ P d be a polynomial of individual degree at most d d d such that P ( a 1 , a 2 ) = 0 P(a_1,a_2) = 0 P ( a 1 , a 2 ) = 0 for all ( a 1 , a 2 ) ∈ T (a_1,a_2) \in T ( a 1 , a 2 ) ∈ T . We will show that P ( a 1 , a 2 ) = 0 P(a_1,a_2) = 0 P ( a 1 , a 2 ) = 0 for all ( a 1 , a 2 ) ∈ S 2 (a_1,a_2) \in S^2 ( a 1 , a 2 ) ∈ S 2 such that a 1 + a 2 ≠ 0 a_1 + a_2 \ne0 a 1 + a 2 = 0 . In turn, this would establish that T T T determines all ( a 1 , a 2 ) ∈ S 2 (a_1,a_2) \in S^2 ( a 1 , a 2 ) ∈ S 2 such that a 1 + a 2 ≠ 0 a_1 + a_2 \ne0 a 1 + a 2 = 0 and hence the unshardability s s s must be at most
∣ S 2 ∣ − ∣ { ( a 1 , a 2 ) ∈ S 2 : a 1 + a 2 ≠ 0 } ∣ = ( d + 1 ) 2 − d ( d + 1 ) = d + 1. |S^2| - |\{(a_1,a_2) \in S^2 : a_1 + a_2 \ne0\}| = (d + 1)^2 - d(d + 1) = d + 1. ∣ S 2 ∣ − ∣ {( a 1 , a 2 ) ∈ S 2 : a 1 + a 2 = 0 } ∣ = ( d + 1 ) 2 − d ( d + 1 ) = d + 1.
Fix α ∈ S ∖ { 0 } \alpha\in S \setminus\{0\} α ∈ S ∖ { 0 } arbitrarily. Since P P P vanishes on L α ∩ S ‾ 2 L_\alpha\cap\overline{S}^2 L α ∩ S 2 , we have that P ( X , α − X ) = 0 P(X,\alpha- X) = 0 P ( X , α − X ) = 0 for all X ∈ S ‾ X \in\overline{S} X ∈ S such that α − X ∈ S ‾ \alpha- X \in\overline{S} α − X ∈ S . As ∣ S ∣ = d + 1 |S| = d + 1 ∣ S ∣ = d + 1 , there are at most 2 ( d + 1 ) 2(d + 1) 2 ( d + 1 ) values of X ∈ F q X \in\mathbb{F}_q X ∈ F q such that X ∉ S ‾ X \notin\overline{S} X ∈ / S or α − X ∉ S ‾ \alpha- X \notin\overline{S} α − X ∈ / S . Hence there are at least q − 2 ( d + 1 ) ≥ 2 d + 1 q - 2(d + 1) \ge2d + 1 q − 2 ( d + 1 ) ≥ 2 d + 1 values of X X X such that X ∈ S ‾ X \in\overline{S} X ∈ S and α − X ∈ S ‾ \alpha- X \in\overline{S} α − X ∈ S . In other words, P ( X , α − X ) P(X,\alpha- X) P ( X , α − X ) has at least 2 d + 1 2d + 1 2 d + 1 zeroes. However, note that P ( X , α − X ) P(X,\alpha- X) P ( X , α − X ) is a polynomial of degree at most 2 d 2d 2 d (since P P P has individual degree at most d d d ). Thus, P ( X , α − X ) ≡ 0 P(X,\alpha- X) \equiv0 P ( X , α − X ) ≡ 0 identically and hence ( X + Y − α ) (X + Y - \alpha) ( X + Y − α ) divides P ( X , Y ) P(X,Y) P ( X , Y ) . Therefore, P ( a 1 , a 2 ) = 0 P(a_1,a_2) = 0 P ( a 1 , a 2 ) = 0 for ( a 1 , a 2 ) ∈ S 2 (a_1,a_2) \in S^2 ( a 1 , a 2 ) ∈ S 2 such that a 1 + a 2 = α a_1 + a_2 = \alpha a 1 + a 2 = α . Since this holds for all α ∈ S ∖ { 0 } \alpha\in S \setminus\{0\} α ∈ S ∖ { 0 } and S S S is a subfield, we have that P ( a 1 , a 2 ) = 0 P(a_1,a_2) = 0 P ( a 1 , a 2 ) = 0 for all ( a 1 , a 2 ) ∈ S 2 (a_1,a_2) \in S^2 ( a 1 , a 2 ) ∈ S 2 such that a 1 + a 2 ≠ 0 a_1 + a_2 \ne0 a 1 + a 2 = 0 . This finishes the proof. □