Locally decodable code

From HandWiki
Short description: Type of error-correcting code

A locally decodable code (LDC) is an error-correcting code that allows a single bit of the original message to be decoded with high probability by only examining (or querying) a small number of bits of a possibly corrupted codeword.[1][2][3] This property could be useful, say, in a context where information is being transmitted over a noisy channel, and only a small subset of the data is required at a particular time and there is no need to decode the entire message at once. Note that locally decodable codes are not a subset of locally testable codes, though there is some overlap between the two.[4]

Codewords are generated from the original message using an algorithm that introduces a certain amount of redundancy into the codeword; thus, the codeword is always longer than the original message. This redundancy is distributed across the codeword and allows the original message to be recovered with good probability even in the presence of errors. The more redundant the codeword, the more resilient it is against errors, and the fewer queries required to recover a bit of the original message.

Overview

More formally, a [math]\displaystyle{ (q, \delta, \epsilon) }[/math]-locally decodable code encodes an [math]\displaystyle{ n }[/math]-bit message [math]\displaystyle{ x }[/math] to an [math]\displaystyle{ N }[/math]-bit codeword [math]\displaystyle{ C(x) }[/math] such that any bit [math]\displaystyle{ x_i }[/math] of the message can be recovered with probability [math]\displaystyle{ 1 - \epsilon }[/math] by using a randomized decoding algorithm that queries only [math]\displaystyle{ q }[/math] bits of the codeword [math]\displaystyle{ C(x) }[/math], even if up to [math]\displaystyle{ \delta N }[/math] locations of the codeword have been corrupted.

Furthermore, a perfectly smooth local decoder is a decoder such that, in addition to always generating the correct output given access to an uncorrupted codeword, for every [math]\displaystyle{ j \in [q] }[/math] and [math]\displaystyle{ i \in [n] }[/math] the [math]\displaystyle{ j^{th} }[/math] query to recover the [math]\displaystyle{ i^{th} }[/math] bit is uniform over [math]\displaystyle{ [N] }[/math].[5] (The notation [math]\displaystyle{ [y] }[/math] denotes the set [math]\displaystyle{ \{1,\ldots, y\} }[/math]). Informally, this means that the set of queries required to decode any given bit are uniformly distributed over the codeword.

Local list decoders are another interesting subset of local decoders. List decoding is useful when a codeword is corrupted in more than [math]\displaystyle{ \delta/2 }[/math] places, where [math]\displaystyle{ \delta }[/math] is the minimum Hamming distance between two codewords. In this case, it is no longer possible to identify exactly which original message has been encoded, since there could be multiple codewords within [math]\displaystyle{ \delta }[/math] distance of the corrupted codeword. However, given a radius [math]\displaystyle{ \epsilon }[/math], it is possible to identify the set of messages that encode to codewords that are within [math]\displaystyle{ \epsilon }[/math] of the corrupted codeword. An upper bound on the size of the set of messages can be determined by [math]\displaystyle{ \delta }[/math] and [math]\displaystyle{ \epsilon }[/math].[6]

Locally decodable codes can also be concatenated, where a message is encoded first using one scheme, and the resulting codeword is encoded again using a different scheme. (Note that, in this context, concatenation is the term used by scholars to refer to what is usually called composition; see [5]). This might be useful if, for example, the first code has some desirable properties with respect to rate, but it has some undesirable property, such as producing a codeword over a non-binary alphabet. The second code can then transform the result of the first encoding over a non-binary alphabet to a binary alphabet. The final encoding is still locally decodable, and requires additional steps to decode both layers of encoding.[7]

Length of codeword and query complexity

The rate of a code refers to the ratio between its message length and codeword length: [math]\displaystyle{ \frac{|x|}{|C(x)|} }[/math], and the number of queries required to recover 1 bit of the message is called the query complexity of a code.

The rate of a code is inversely related to the query complexity, but the exact shape of this tradeoff is a major open problem.[8][9] It is known that there are no LDCs that query the codeword in only one position, and that the optimal codeword size for query complexity 2 is exponential in the size of the original message.[8] However, there are no known tight lower bounds for codes with query complexity greater than 2. Approaching the tradeoff from the side of codeword length, the only known codes with codeword length proportional to message length have query complexity [math]\displaystyle{ k^\epsilon }[/math] for [math]\displaystyle{ \epsilon \gt 0 }[/math][8][needs update] There are also codes in between, that have codewords polynomial in the size of the original message and polylogarithmic query complexity.[8]

Applications

Locally decodable codes have applications to data transmission and storage, complexity theory, data structures, derandomization, theory of fault tolerant computation, and private information retrieval schemes.[9]

Data transmission and storage

Locally decodable codes are especially useful for data transmission over noisy channels. The Hadamard code (a special case of Reed Muller codes) was used in 1971 by Mariner 9 to transmit pictures of Mars back to Earth. It was chosen over a 5-repeat code (where each bit is repeated 5 times) because, for roughly the same number of bits transmitted per pixel, it had a higher capacity for error correction. (The Hadamard code falls under the general umbrella of forward error correction, and just happens to be locally decodable; the actual algorithm used to decode the transmission from Mars was a generic error-correction scheme.)[10]

LDCs are also useful for data storage, where the medium may become partially corrupted over time, or the reading device is subject to errors. In both cases, an LDC will allow for the recovery of information despite errors, provided that there are relatively few. In addition, LDCs do not require that the entire original message be decoded; a user can decode a specific portion of the original message without needing to decode the entire thing.[11]

Complexity theory

One of the applications of locally decodable codes in complexity theory is hardness amplification. Using LDCs with polynomial codeword length and polylogarithmic query complexity, one can take a function [math]\displaystyle{ L: \{0,1\}^n \rightarrow \{0,1\} }[/math] that is hard to solve on worst case inputs and design a function [math]\displaystyle{ L': \{0,1\}^N \rightarrow \{0,1\} }[/math] that is hard to compute on average case inputs.

Consider [math]\displaystyle{ L }[/math] limited to only length [math]\displaystyle{ t }[/math] inputs. Then we can see [math]\displaystyle{ L }[/math] as a binary string of length [math]\displaystyle{ 2^t }[/math], where each bit is [math]\displaystyle{ L(x) }[/math] for each [math]\displaystyle{ x \in \{ 0, 1\}^t }[/math]. We can use a polynomial length locally decodable code [math]\displaystyle{ C }[/math] with polylogarithmic query complexity that tolerates some constant fraction of errors to encode the string that represents [math]\displaystyle{ L }[/math] to create a new string of length [math]\displaystyle{ 2^{O(t)} = 2^{t'} }[/math]. We think of this new string as defining a new problem [math]\displaystyle{ L' }[/math] on length [math]\displaystyle{ t' }[/math] inputs. If [math]\displaystyle{ L' }[/math] is easy to solve on average, that is, we can solve [math]\displaystyle{ L' }[/math] correctly on a large fraction [math]\displaystyle{ 1 - \epsilon }[/math] of inputs, then by the properties of the LDC used to encode it, we can use [math]\displaystyle{ L' }[/math] to probabilistically compute [math]\displaystyle{ L }[/math] on all inputs. Thus, a solution to [math]\displaystyle{ L' }[/math] for most inputs would allow us to solve [math]\displaystyle{ L }[/math] on all inputs, contradicting our assumption that [math]\displaystyle{ L }[/math] is hard on worst case inputs.[5][8][12]

Private information retrieval schemes

A private information retrieval scheme allows a user to retrieve an item from a server in possession of a database without revealing which item is retrieved. One common way of ensuring privacy is to have [math]\displaystyle{ k }[/math] separate, non-communicating servers, each with a copy of the database. Given an appropriate scheme, the user can make queries to each server that individually do not reveal which bit the user is looking for, but which together provide enough information that the user can determine the particular bit of interest in the database.[3][11]

One can easily see that locally decodable codes have applications in this setting. A general procedure to produce a [math]\displaystyle{ k }[/math]-server private information scheme from a perfectly smooth [math]\displaystyle{ k }[/math]-query locally decodable code is as follows:

Let [math]\displaystyle{ C }[/math] be a perfectly smooth LDC that encodes [math]\displaystyle{ n }[/math]-bit messages to [math]\displaystyle{ N }[/math]-bit codewords. As a preprocessing step, each of the [math]\displaystyle{ k }[/math] servers [math]\displaystyle{ S_1,\ldots ,S_k }[/math] encodes the [math]\displaystyle{ n }[/math]-bit database [math]\displaystyle{ x }[/math] with the code [math]\displaystyle{ C }[/math], so each server now stores the [math]\displaystyle{ N }[/math]-bit codeword [math]\displaystyle{ C(x) }[/math]. A user interested in obtaining the [math]\displaystyle{ i^{th} }[/math] bit of [math]\displaystyle{ x }[/math] randomly generates a set of [math]\displaystyle{ k }[/math] queries [math]\displaystyle{ q_1,\ldots q_k }[/math] such that [math]\displaystyle{ x_i }[/math] can be computed from [math]\displaystyle{ C(x)_{q_1}, \ldots C(x)_{q_k} }[/math] using the local decoding algorithm [math]\displaystyle{ A }[/math] for [math]\displaystyle{ C }[/math]. The user sends each query to a different server, and each server responds with the bit requested. The user then uses [math]\displaystyle{ A }[/math] to compute [math]\displaystyle{ x_i }[/math] from the responses.[8][11] Because the decoding algorithm is perfectly smooth, each query [math]\displaystyle{ q_j }[/math] is uniformly distributed over the codeword; thus, no individual server can gain any information about the user's intentions, so the protocol is private as long as the servers do not communicate.[11]

Examples

The Hadamard code

The Hadamard (or Walsh-Hadamard) code is an example of a simple locally decodable code that maps a string of length [math]\displaystyle{ k }[/math] to a codeword of length [math]\displaystyle{ 2^k }[/math]. The codeword for a string [math]\displaystyle{ x \in \{0, 1\}^k }[/math] is constructed as follows: for every [math]\displaystyle{ a_j\in\{0, 1\}^k }[/math], the [math]\displaystyle{ j^{th} }[/math] bit of the codeword is equal to [math]\displaystyle{ x \odot a_j }[/math], where [math]\displaystyle{ x \odot y = \sum\limits_{i=1}^{k} x_{i}y_i }[/math] (mod 2). It is easy to see that every codeword has a Hamming distance of [math]\displaystyle{ \frac{n}{2} }[/math] from every other codeword.

The local decoding algorithm has query complexity 2, and the entire original message can be decoded with good probability if the codeword is corrupted in less than [math]\displaystyle{ \frac{1}{4} }[/math] of its bits. For [math]\displaystyle{ \rho \lt \frac{1}{4} }[/math], if the codeword is corrupted in a [math]\displaystyle{ \rho }[/math] fraction of places, a local decoding algorithm can recover the [math]\displaystyle{ i^{th} }[/math] bit of the original message with probability [math]\displaystyle{ 1 - 2\rho }[/math].

Proof: Given a codeword [math]\displaystyle{ H }[/math] and an index [math]\displaystyle{ i }[/math], the algorithm to recover the [math]\displaystyle{ i^{th} }[/math] bit of the original message [math]\displaystyle{ x }[/math] works as follows:

Let [math]\displaystyle{ e^j }[/math] refer to the vector in [math]\displaystyle{ \{0, 1\}^k }[/math] that has 1 in the [math]\displaystyle{ j^{th} }[/math] position and 0s elsewhere. For [math]\displaystyle{ y \in \{0, 1\}^k }[/math], [math]\displaystyle{ f(y) }[/math] denotes the single bit in [math]\displaystyle{ H }[/math] that corresponds to [math]\displaystyle{ x \odot y }[/math]. The algorithm chooses a random vector [math]\displaystyle{ y \in \{0, 1\}^k }[/math] and the vector [math]\displaystyle{ y' = y \oplus e^i }[/math] (where [math]\displaystyle{ \oplus }[/math] denotes bitwise XOR). The algorithm outputs [math]\displaystyle{ f(y) \oplus f(y') }[/math] (mod 2).

Correctness: By linearity,

[math]\displaystyle{ (x \odot y) \oplus (x \odot y') = (x \odot y) \oplus (x \odot (y \oplus e^i)) = (x \odot y) \oplus (x \odot y) \oplus (x \odot e^i) = x \odot e^i }[/math]

But [math]\displaystyle{ (x \odot e^i) = x_i }[/math], so we just need to show that [math]\displaystyle{ f(y) = x \odot y }[/math] and [math]\displaystyle{ f(y') = x \odot y' }[/math] with good probability.

Since [math]\displaystyle{ y }[/math] and [math]\displaystyle{ y' }[/math] are uniformly distributed (even though they are dependent), the union bound implies that [math]\displaystyle{ f(y) = x \odot y }[/math] and [math]\displaystyle{ f(y') = x \odot y' }[/math] with probability at least [math]\displaystyle{ 1 - 2\rho }[/math]. Note: to amplify the probability of success, one can repeat the procedure with different random vectors and take the majority answer. [13]

The Reed–Muller code

The main idea behind local decoding of Reed-Muller codes is polynomial interpolation. The key concept behind a Reed-Muller code is a multivariate polynomial of degree [math]\displaystyle{ d }[/math] on [math]\displaystyle{ l }[/math] variables. The message is treated as the evaluation of a polynomial at a set of predefined points. To encode these values, a polynomial is extrapolated from them, and the codeword is the evaluation of that polynomial on all possible points. At a high level, to decode a point of this polynomial, the decoding algorithm chooses a set [math]\displaystyle{ S }[/math] of points on a line that passes through the point of interest [math]\displaystyle{ x }[/math]. It then queries the codeword for the evaluation of the polynomial on points in [math]\displaystyle{ S }[/math] and interpolates that polynomial. Then it is simple to evaluate the polynomial at the point that will yield [math]\displaystyle{ x }[/math]. This roundabout way of evaluating [math]\displaystyle{ x }[/math] is useful because (a) the algorithm can be repeated using different lines through the same point to improve the probability of correctness, and (b) the queries are uniformly distributed over the codeword.

More formally, let [math]\displaystyle{ \mathbb{F} }[/math] be a finite field, and let [math]\displaystyle{ l, d }[/math] be numbers with [math]\displaystyle{ d \lt |\mathbb{F}| }[/math]. The Reed-Muller code with parameters [math]\displaystyle{ \mathbb{F}, l, d }[/math] is the function RM : [math]\displaystyle{ \mathbb{F}^{\binom{l+d}{d}} \rightarrow \mathbb{F}^{|\mathbb{F}|^l} }[/math] that maps every [math]\displaystyle{ l }[/math]-variable polynomial [math]\displaystyle{ P }[/math] over [math]\displaystyle{ \mathbb{F} }[/math] of total degree [math]\displaystyle{ d }[/math] to the values of [math]\displaystyle{ P }[/math] on all the inputs in [math]\displaystyle{ \mathbb{F}^l }[/math]. That is, the input is a polynomial of the form [math]\displaystyle{ P(x_1, \ldots, x_l) = \sum\limits_{i_1+\ldots+i_l\le d}c_{i_1,\ldots,i_l}x_1^{i_1}x_2^{i_2}\cdots x_l^{i_l} }[/math] specified by the interpolation of the [math]\displaystyle{ \binom{l+d}{d} }[/math] values of the predefined points and the output is the sequence [math]\displaystyle{ \{P(x_1, \ldots, x_l)\} }[/math] for every [math]\displaystyle{ x_1, \ldots, x_l \in \mathbb{F} }[/math].[14]

To recover the value of a degree [math]\displaystyle{ d }[/math] polynomial at a point [math]\displaystyle{ w \in \mathbb{F}^n }[/math], the local decoder shoots a random affine line through [math]\displaystyle{ w }[/math]. Then it picks [math]\displaystyle{ d + 1 }[/math] points on that line, which it uses to interpolate the polynomial and then evaluate it at the point where the result is [math]\displaystyle{ w }[/math]. To do so, the algorithm picks a vector [math]\displaystyle{ v \in \mathbb{F}^n }[/math] uniformly at random and considers the line [math]\displaystyle{ L = \{w + \lambda v \mid \lambda \in \mathbb{F}\} }[/math] through [math]\displaystyle{ w }[/math]. The algorithm picks an arbitrary subset [math]\displaystyle{ S }[/math] of [math]\displaystyle{ \mathbb{F} }[/math], where [math]\displaystyle{ |S| = d+1 }[/math], and queries coordinates of the codeword that correspond to points [math]\displaystyle{ w+\lambda v }[/math] for all [math]\displaystyle{ \lambda \in S }[/math] and obtains values [math]\displaystyle{ \{e_{\lambda}\} }[/math]. Then it uses polynomial interpolation to recover the unique univariate polynomial [math]\displaystyle{ h }[/math] with degree less than or equal to [math]\displaystyle{ d }[/math] such that [math]\displaystyle{ h(\lambda) = e_{\lambda} }[/math] for all [math]\displaystyle{ \lambda \in S }[/math]. Then, to get the value of [math]\displaystyle{ w }[/math], it just evaluates [math]\displaystyle{ h(0) }[/math]. To recover a single value of the original message, one chooses [math]\displaystyle{ w }[/math] to be one of the points that defines the polynomial.[8][14]

Each individual query is distributed uniformly at random over the codeword. Thus, if the codeword is corrupted in at most a [math]\displaystyle{ \delta }[/math] fraction of locations, by the union bound, the probability that the algorithm samples only uncorrupted coordinates (and thus correctly recovers the bit) is at least [math]\displaystyle{ 1 - (d+1)\delta }[/math].[8] For other decoding algorithms, see.[8]

See also

References

  1. Sergey Yekhanin. "Locally decodable codes: a brief survey". http://research.microsoft.com/en-us/um/people/yekhanin/papers/survey_iwcc.pdf. 
  2. "Private Locally Decodable Codes". http://eprint.iacr.org/2007/025.pdf. 
  3. 3.0 3.1 Sergey Yekhanin. New locally decodable codes and private information retrieval schemes, Technical Report ECCC TR06-127, 2006.
  4. Kaufman, Tali; Viderman, Michael. "Locally Testable vs. Locally Decodable Codes". http://eccc.hpi-web.de/report/2010/130/revision/1/download/. 
  5. 5.0 5.1 5.2 Luca Trevisan. "Some Applications of Coding Theory in Computational Complexity". http://theory.stanford.edu/~trevisan/pubs/codingsurvey.pdf. 
  6. "Section 19.5". Computational Complexity: A Modern Approach. Cambridge University Press. 2009. ISBN 978-0-521-42426-4. http://www.cs.princeton.edu/theory/complexity/. 
  7. Arora & Barak 2009, Section 19.4.3
  8. 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 Sergey Yekhanin. "Locally Decodable Codes". http://research.microsoft.com/en-us/um/people/yekhanin/Papers/LDC_now.pdf. 
  9. 9.0 9.1 Sergey Yekhanin. "Locally Decodable Codes". https://www.iacr.org/workshops/tcc2012/survey_tcc.pdf. 
  10. "Combinatorics in Space The Mariner 9 Telemetry System". http://www-math.ucdenver.edu/~wcherowi/courses/m7409/mariner9talk.pdf. 
  11. 11.0 11.1 11.2 11.3 Sergey Yekhanin. "Private Information retrieval". http://research.microsoft.com/pubs/141305/cacm_2010.pdf. 
  12. Arora & Barak 2009, Section 19.4
  13. Arora & Barak 2009, Section 11.5.2
  14. 14.0 14.1 Arora & Barak 2009, Section 19.4.2