fbpx
Wikipedia

Locally testable code

A locally testable code is a type of error-correcting code for which it can be determined if a string is a word in that code by looking at a small (frequently constant) number of bits of the string. In some situations, it is useful to know if the data is corrupted without decoding all of it so that appropriate action can be taken in response. For example, in communication, if the receiver encounters a corrupted code, it can request the data be re-sent, which could increase the accuracy of said data. Similarly, in data storage, these codes can allow for damaged data to be recovered and rewritten properly.

In contrast, locally decodable codes use a small number of bits of the codeword to probabilistically recover the original information. The fraction of errors determines how likely it is that the decoder correctly recovers the original bit; however, not all locally decodable codes are locally testable.[1]

Clearly, any valid codeword should be accepted as a codeword, but strings that are not codewords could be only one bit off, which would require many (certainly more than a constant number) probes. To account for this, testing failure is only defined if the string is off by at least a set fraction of its bits. This implies words of the code must be longer than the input strings by adding some redundancy.

Definition

To measure the distance between two strings, the Hamming distance is used

 

The distance of a string   from a code   is computed by

 

Relative distances are computed as a fraction of the number of bits

 

A code   is called  -local  -testable if there exists a Turing machine M given random access to an input   that makes at most   non-adaptive queries of   and satisfies the following:[2]

  • For any   and  ,  . In other words, M accepts given access to any codeword of C.
  • For   such that  ,  . M must reject strings  -far from C at least half the time.

Also the rate of a code is the ratio between its message length and codeword length

 

Limits

It remains an open question whether there are any locally testable codes of linear size, but there are several constructions that are considered "nearly linear":[3]

  1. Polynomial arbitrarily close to linear; for any  ,  .
  2. Functions of the form  , where   is a function tending toward 0. This makes n closer to linear as k increases. For example:
    •  
    •   for some  
    •   for  

These have both been achieved, even with constant query complexity and a binary alphabet, such as with   for any  . The next nearly linear goal is linear up to a polylogarithmic factor;  . Nobody has yet to come up with a linearly testable code that satisfies this constraint.[3]

In November 2021 two preprints have reported[4][5][6][7] the first polynomial-time construction of " -LTCs" namely locally testable codes with constant rate  , constant distance   and constant locality  .

Connection with probabilistically checkable proofs

Locally testable codes have a lot in common with probabilistically checkable proofs (PCPs). This should be apparent from the similarities of their construction. In both, we are given   random nonadaptive queries into a large string and if we want to accept, we must with probability 1, and if not, we must accept no more than half the time. The major difference is that PCPs are interested in accepting   if there exists a   so that  . Locally testable codes, on the other hand, accept   if it is part of the code. Many things can go wrong in assuming a PCP proof encodes a locally testable code. For example, the PCP definition says nothing about invalid proofs, only invalid inputs.

Despite this difference, locally testable codes and PCPs are similar enough that frequently to construct one, a prover will construct the other along the way.[8]

Examples

Hadamard code

One of the most famous error-correcting codes, the Hadamard code, is a locally testable code. A codeword x is encoded in the Hadamard code to be the linear function   (mod 2). This requires listing out the result of this function for every possible y, which requires exponentially more bits than its input. To test if a string w is a codeword of the Hadamard code, all we have to do is test if the function it encodes is linear. This means simply checking if   for x and y uniformly random vectors (where   denotes bitwise XOR).

It is easy to see that for any valid encoding  , this equation is true, as that is the definition of a linear function. Somewhat harder, however, is showing that a string that is  -far from C will have an upper bound on its error in terms of  . One bound is found by the direct approach of approximating the chances of exactly one of the three probes yielding an incorrect result. Let A, B, and C be the events of  ,  , and   being incorrect. Let E be the event of exactly one of these occurring. This comes out to

 

This works for  , but shortly after,  . With additional work, it can be shown that the error is bounded by

 

For any given  , this only has a constant chance of false positives, so we can simply check a constant number of times to get the probability below 1/2.[3]

Long code

The Long code is another code with very large blowup which is close to locally testable. Given an input   (note, this takes   bits to represent), the function that returns the   bit of the input,  , is evaluated on all possible  -bit inputs  , and the codeword is the concatenation of these (of length  ). The way to locally test this with some errors is to pick a uniformly random input   and set  , but with a small chance of flipping each bit,  . Accept a function   as a codeword if  . If   is a codeword, this will accept   as long as   was unchanged, which happens with probability  . This violates the requirement that codewords are always accepted, but may be good enough for some needs.[9]

Other locally testable codes include Reed-Muller codes (see locally decodable codes for a decoding algorithm), Reed-Solomon codes, and the short code.

See also

References

  1. ^ Kaufman, Tali; Viderman, Michael. "Locally Testable vs. Locally Decodable Codes".
  2. ^ Ben-Sasson, Eli; Sudan, Madhu. "Robust Locally Testable Codes and Products of Codes" (PDF).
  3. ^ a b c Goldreich, Oded (2005). "Short Locally Testable Codes and Proofs (Survey)". CiteSeerX 10.1.1.110.2530.
  4. ^ Panteleev, Pavel; Kalachev, Gleb (2021-11-05). "Asymptotically Good Quantum and Locally Testable Classical LDPC Codes". arXiv:2111.03654 [cs.IT].
  5. ^ Dinur, Irit; Evra, Shai; Livne, Ron; Lubotzky, Alexander; Mozes, Shahar (2021-11-08). "Locally Testable Codes with constant rate, distance, and locality". arXiv:2111.04808 [cs.IT].
  6. ^ Rorvig, Mordechai (2021-11-24). "Researchers Defeat Randomness to Create Ideal Code". Quanta Magazine. Retrieved 2021-11-24.{{cite web}}: CS1 maint: url-status (link)
  7. ^ Rorvig, Mordechai (2022-01-06). "Qubits Can Be as Safe as Bits, Researchers Show". Quanta Magazine. Retrieved 2022-02-02.
  8. ^ Cheraghchi, Mahdi. "Locally Testable Codes".
  9. ^ Kol, Gillat; Raz, Ran. "Bounds on Locally Testable Codes with Unique Tests" (PDF).

External links

  • "Breakthroughs — Locally Testable Codes with Constant Rate, Distance, and Locality | Simons Institute for the Theory of Computing". simons.berkeley.edu. 6 October 2021.{{cite web}}: CS1 maint: url-status (link)

locally, testable, code, locally, testable, code, type, error, correcting, code, which, determined, string, word, that, code, looking, small, frequently, constant, number, bits, string, some, situations, useful, know, data, corrupted, without, decoding, that, . A locally testable code is a type of error correcting code for which it can be determined if a string is a word in that code by looking at a small frequently constant number of bits of the string In some situations it is useful to know if the data is corrupted without decoding all of it so that appropriate action can be taken in response For example in communication if the receiver encounters a corrupted code it can request the data be re sent which could increase the accuracy of said data Similarly in data storage these codes can allow for damaged data to be recovered and rewritten properly In contrast locally decodable codes use a small number of bits of the codeword to probabilistically recover the original information The fraction of errors determines how likely it is that the decoder correctly recovers the original bit however not all locally decodable codes are locally testable 1 Clearly any valid codeword should be accepted as a codeword but strings that are not codewords could be only one bit off which would require many certainly more than a constant number probes To account for this testing failure is only defined if the string is off by at least a set fraction of its bits This implies words of the code must be longer than the input strings by adding some redundancy Contents 1 Definition 2 Limits 3 Connection with probabilistically checkable proofs 4 Examples 4 1 Hadamard code 4 2 Long code 5 See also 6 References 7 External linksDefinition EditTo measure the distance between two strings the Hamming distance is used D x y i x i y i displaystyle Delta x y i x i neq y i The distance of a string w displaystyle w from a code C 0 1 k 0 1 n displaystyle C 0 1 k to 0 1 n is computed by D w C min x D w C x displaystyle Delta w C min x Delta w C x Relative distances are computed as a fraction of the number of bits d x y D x y n and d w C D w C n displaystyle delta x y Delta x y n text and delta w C Delta w C n A code C 0 1 k 0 1 n displaystyle C 0 1 k to 0 1 n is called q displaystyle q local d displaystyle delta testable if there exists a Turing machine M given random access to an input w displaystyle w that makes at most q displaystyle q non adaptive queries of w displaystyle w and satisfies the following 2 For any x 0 1 k displaystyle x in 0 1 k and w C x displaystyle w C x P r M w 1 k 1 1 displaystyle Pr M w 1 k 1 1 In other words M accepts given access to any codeword of C For w 0 1 n displaystyle w in 0 1 n such that d w C gt d displaystyle delta w C gt delta P r M w 1 k 1 1 2 displaystyle Pr M w 1 k 1 leq 1 2 M must reject strings d displaystyle delta far from C at least half the time Also the rate of a code is the ratio between its message length and codeword length r x C x displaystyle r frac x C x Limits EditIt remains an open question whether there are any locally testable codes of linear size but there are several constructions that are considered nearly linear 3 Polynomial arbitrarily close to linear for any ϵ gt 0 displaystyle epsilon gt 0 n k 1 ϵ displaystyle n k 1 epsilon Functions of the form n k 1 ϵ k displaystyle n k 1 epsilon k where ϵ k displaystyle epsilon k is a function tending toward 0 This makes n closer to linear as k increases For example 1 log log k displaystyle 1 log log k 1 log k c displaystyle 1 log k c for some c 0 1 displaystyle c in 0 1 exp log log log k c log k displaystyle exp log log log k c log k for c 0 1 displaystyle c in 0 1 These have both been achieved even with constant query complexity and a binary alphabet such as with n k 1 1 log k c displaystyle n k 1 1 log k c for any c 0 1 displaystyle c in 0 1 The next nearly linear goal is linear up to a polylogarithmic factor n poly log k k displaystyle n text poly log k k Nobody has yet to come up with a linearly testable code that satisfies this constraint 3 In November 2021 two preprints have reported 4 5 6 7 the first polynomial time construction of c 3 displaystyle c 3 LTCs namely locally testable codes with constant rate r displaystyle r constant distance d displaystyle delta and constant locality q displaystyle q Connection with probabilistically checkable proofs EditLocally testable codes have a lot in common with probabilistically checkable proofs PCPs This should be apparent from the similarities of their construction In both we are given q displaystyle q random nonadaptive queries into a large string and if we want to accept we must with probability 1 and if not we must accept no more than half the time The major difference is that PCPs are interested in accepting x displaystyle x if there exists a w displaystyle w so that M w x 1 displaystyle M w x 1 Locally testable codes on the other hand accept w displaystyle w if it is part of the code Many things can go wrong in assuming a PCP proof encodes a locally testable code For example the PCP definition says nothing about invalid proofs only invalid inputs Despite this difference locally testable codes and PCPs are similar enough that frequently to construct one a prover will construct the other along the way 8 Examples EditHadamard code Edit One of the most famous error correcting codes the Hadamard code is a locally testable code A codeword x is encoded in the Hadamard code to be the linear function f y i x i y i displaystyle f y sum i x i y i mod 2 This requires listing out the result of this function for every possible y which requires exponentially more bits than its input To test if a string w is a codeword of the Hadamard code all we have to do is test if the function it encodes is linear This means simply checking if w x w y w x y displaystyle w x oplus w y w x oplus y for x and y uniformly random vectors where displaystyle oplus denotes bitwise XOR It is easy to see that for any valid encoding w displaystyle w this equation is true as that is the definition of a linear function Somewhat harder however is showing that a string that is d displaystyle delta far from C will have an upper bound on its error in terms of d displaystyle delta One bound is found by the direct approach of approximating the chances of exactly one of the three probes yielding an incorrect result Let A B and C be the events of w x displaystyle w x w y displaystyle w y and w x y displaystyle w x oplus y being incorrect Let E be the event of exactly one of these occurring This comes out to P E P A B C 3 P A B 3 P A 3 P A B 3 P A B 3 d 6 d 2 displaystyle begin aligned P E amp geq P A cup B cup C 3 P A cup B amp geq 3 P A 3 P A cup B 3 P A cup B amp geq 3 delta 6 delta 2 end aligned This works for 0 lt d 5 16 displaystyle 0 lt delta leq 5 16 but shortly after 3 d 6 d 2 lt d displaystyle 3 delta 6 delta 2 lt delta With additional work it can be shown that the error is bounded by f x 3 d 6 d 2 0 d 5 16 45 128 5 16 d 45 128 d 45 128 d 1 2 displaystyle f x begin cases 3 delta 6 delta 2 amp 0 leq delta leq 5 16 45 128 amp 5 16 leq delta leq 45 128 delta amp 45 128 leq delta leq 1 2 end cases For any given d displaystyle delta this only has a constant chance of false positives so we can simply check a constant number of times to get the probability below 1 2 3 Long code Edit The Long code is another code with very large blowup which is close to locally testable Given an input 0 i 2 k displaystyle 0 leq i leq 2 k note this takes k displaystyle k bits to represent the function that returns the i t h displaystyle i th bit of the input f i x x i displaystyle f i x x i is evaluated on all possible 2 k displaystyle 2 k bit inputs 0 x 2 2 k displaystyle 0 leq x leq 2 2 k and the codeword is the concatenation of these of length n 2 2 k displaystyle n 2 2 k The way to locally test this with some errors is to pick a uniformly random input x displaystyle x and set y x displaystyle y x but with a small chance of flipping each bit m gt 0 displaystyle mu gt 0 Accept a function f displaystyle f as a codeword if f x f y displaystyle f x f y If f displaystyle f is a codeword this will accept f displaystyle f as long as x i displaystyle x i was unchanged which happens with probability 1 m displaystyle 1 mu This violates the requirement that codewords are always accepted but may be good enough for some needs 9 Other locally testable codes include Reed Muller codes see locally decodable codes for a decoding algorithm Reed Solomon codes and the short code See also EditGilbert Varshamov bound Hamming code Expander codeReferences Edit Kaufman Tali Viderman Michael Locally Testable vs Locally Decodable Codes Ben Sasson Eli Sudan Madhu Robust Locally Testable Codes and Products of Codes PDF a b c Goldreich Oded 2005 Short Locally Testable Codes and Proofs Survey CiteSeerX 10 1 1 110 2530 Panteleev Pavel Kalachev Gleb 2021 11 05 Asymptotically Good Quantum and Locally Testable Classical LDPC Codes arXiv 2111 03654 cs IT Dinur Irit Evra Shai Livne Ron Lubotzky Alexander Mozes Shahar 2021 11 08 Locally Testable Codes with constant rate distance and locality arXiv 2111 04808 cs IT Rorvig Mordechai 2021 11 24 Researchers Defeat Randomness to Create Ideal Code Quanta Magazine Retrieved 2021 11 24 a href Template Cite web html title Template Cite web cite web a CS1 maint url status link Rorvig Mordechai 2022 01 06 Qubits Can Be as Safe as Bits Researchers Show Quanta Magazine Retrieved 2022 02 02 Cheraghchi Mahdi Locally Testable Codes Kol Gillat Raz Ran Bounds on Locally Testable Codes with Unique Tests PDF External links Edit Breakthroughs Locally Testable Codes with Constant Rate Distance and Locality Simons Institute for the Theory of Computing simons berkeley edu 6 October 2021 a href Template Cite web html title Template Cite web cite web a CS1 maint url status link Retrieved from https en wikipedia org w index php title Locally testable code amp oldid 1069559791, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.