Generalized minimum-distance decoding

From HandWiki

In coding theory, generalized minimum-distance (GMD) decoding provides an efficient algorithm for decoding concatenated codes, which is based on using an errors-and-erasures decoder for the outer code. A naive decoding algorithm for concatenated codes can not be an optimal way of decoding because it does not take into account the information that maximum likelihood decoding (MLD) gives. In other words, in the naive algorithm, inner received codewords are treated the same regardless of the difference between their hamming distances. Intuitively, the outer decoder should place higher confidence in symbols whose inner encodings are close to the received word. David Forney in 1966 devised a better algorithm called generalized minimum distance (GMD) decoding which makes use of those information better. This method is achieved by measuring confidence of each received codeword, and erasing symbols whose confidence is below a desired value. And GMD decoding algorithm was one of the first examples of soft-decision decoders. We will present three versions of the GMD decoding algorithm. The first two will be randomized algorithms while the last one will be a deterministic algorithm.

Setup

  • Hamming distance : Given two vectors [math]\displaystyle{ u, v\in\Sigma^n }[/math] the Hamming distance between [math]\displaystyle{ u }[/math] and [math]\displaystyle{ v }[/math], denoted by [math]\displaystyle{ \Delta(u, v) }[/math], is defined to be the number of positions in which [math]\displaystyle{ u }[/math] and [math]\displaystyle{ v }[/math] differ.
  • Minimum distance: Let [math]\displaystyle{ C\subseteq\Sigma^n }[/math] be a code. The minimum distance of code [math]\displaystyle{ C }[/math] is defined to be [math]\displaystyle{ d= \min\Delta(c_1, c_2) }[/math] where [math]\displaystyle{ c_1 \ne c_2 \in C }[/math]
  • Code concatenation: Given [math]\displaystyle{ m = (m_1, \cdots, m_K) \in [Q]^K }[/math], consider two codes which we call outer code and inner code
[math]\displaystyle{ C_\text{out} = [Q]^K \to [Q]^N, \qquad C_\text{in} : [q]^k \to [q]^n, }[/math]
and their distances are [math]\displaystyle{ D }[/math] and [math]\displaystyle{ d }[/math]. A concatenated code can be achieved by [math]\displaystyle{ C_\text{out} \circ C_\text{in} (m) = (C_\text{in} (C_\text{out} (m)_1), \ldots, C_\text{in} (C_\text{out} (m)_N)) }[/math] where [math]\displaystyle{ C_\text{out}(m) = ((C_\text{out} (m)_1, \ldots, (m)_N)). }[/math] Finally we will take [math]\displaystyle{ C_\text{out} }[/math] to be RS code, which has an errors and erasure decoder, and [math]\displaystyle{ K = O(\log N) }[/math], which in turn implies that MLD on the inner code will be polynomial in [math]\displaystyle{ N }[/math] time.
  • Maximum likelihood decoding (MLD): MLD is a decoding method for error correcting codes, which outputs the codeword closest to the received word in Hamming distance. The MLD function denoted by [math]\displaystyle{ D_{MLD} : \Sigma^n \to C }[/math] is defined as follows. For every [math]\displaystyle{ y\in\Sigma^n, D_{MLD}(y) = \arg \min_{c \in C}\Delta(c, y) }[/math].
  • Probability density function : A probability distribution [math]\displaystyle{ \Pr }[/math] on a sample space [math]\displaystyle{ S }[/math] is a mapping from events of [math]\displaystyle{ S }[/math] to real numbers such that [math]\displaystyle{ \Pr[A] \ge 0 }[/math] for any event [math]\displaystyle{ A, \Pr[S] = 1 }[/math], and [math]\displaystyle{ \Pr[A \cup B] = \Pr[A] + \Pr[B] }[/math] for any two mutually exclusive events [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math]
  • Expected value: The expected value of a discrete random variable [math]\displaystyle{ X }[/math] is
[math]\displaystyle{ \mathbb{E}[X] = \sum_x \Pr[X = x]. }[/math]

Randomized algorithm

Consider the received word [math]\displaystyle{ \mathbf{y} = (y_1,\ldots,y_N) \in [q^n]^N }[/math] which was corrupted by a noisy channel. The following is the algorithm description for the general case. In this algorithm, we can decode y by just declaring an erasure at every bad position and running the errors and erasure decoding algorithm for [math]\displaystyle{ C_\text{out} }[/math] on the resulting vector.

Randomized_Decoder
Given : [math]\displaystyle{ \mathbf{y} = (y_1,\dots,y_N) \in [q^n]^N }[/math].

  1. For every [math]\displaystyle{ 1 \le i \le N }[/math], compute [math]\displaystyle{ y_i' = MLD_{C_\text{in}}(y_i) }[/math].
  2. Set [math]\displaystyle{ \omega_i = \min(\Delta(C_\text{in}(y_i'), y_i), \tfrac{d}{2}) }[/math].
  3. For every [math]\displaystyle{ 1 \le i \le N }[/math], repeat : With probability [math]\displaystyle{ 2\omega_i \over d }[/math], set [math]\displaystyle{ y_i'' \leftarrow ?, }[/math] otherwise set [math]\displaystyle{ y_i'' = y_i' }[/math].
  4. Run errors and erasure algorithm for [math]\displaystyle{ C_\text{out} }[/math] on [math]\displaystyle{ \mathbf{y}'' = (y_1'', \ldots, y_N'') }[/math].

Theorem 1. Let y be a received word such that there exists a codeword [math]\displaystyle{ \mathbf{c} = (c_1,\cdots, c_N) \in C_\text{out}\circ{C_\text{in}} \subseteq [q^n]^N }[/math] such that [math]\displaystyle{ \Delta(\mathbf{c}, \mathbf{y}) \lt \tfrac{Dd}{2} }[/math]. Then the deterministic GMD algorithm outputs [math]\displaystyle{ \mathbf{c} }[/math].

Note that a naive decoding algorithm for concatenated codes can correct up to [math]\displaystyle{ \tfrac{Dd}{4} }[/math] errors.

Lemma 1. Let the assumption in Theorem 1 hold. And if [math]\displaystyle{ \mathbf{y}'' }[/math] has [math]\displaystyle{ e' }[/math] errors and [math]\displaystyle{ s' }[/math] erasures (when compared with [math]\displaystyle{ \mathbf{c} }[/math]) after Step 1, then [math]\displaystyle{ \mathbb{E}[2e' + s'] \lt D. }[/math]

Remark. If [math]\displaystyle{ 2e' + s' \lt D }[/math], then the algorithm in Step 2 will output [math]\displaystyle{ \mathbf{c} }[/math]. The lemma above says that in expectation, this is indeed the case. Note that this is not enough to prove Theorem 1, but can be crucial in developing future variations of the algorithm.

Proof of lemma 1. For every [math]\displaystyle{ 1 \le i \le N, }[/math] define [math]\displaystyle{ e_i = \Delta(y_i, c_i). }[/math] This implies that

[math]\displaystyle{ \sum_{i=1}^N e_i \lt \frac{Dd}{2} \qquad\qquad (1) }[/math] Next for every [math]\displaystyle{ 1 \le i \le N }[/math], we define two indicator variables:

[math]\displaystyle{ \begin{align} X{_i^?} = 1 &\Leftrightarrow y_i'' = ? \\ X{_i^e} = 1 &\Leftrightarrow C_\text{in}(y_i'') \ne c_i \ \text{and} \ y_i'' \neq ? \end{align} }[/math] We claim that we are done if we can show that for every [math]\displaystyle{ 1 \le i \le N }[/math]:

[math]\displaystyle{ \mathbb{E} \left [2X{_i^e + X{_i^?}} \right ] \leqslant {2e_i \over d}\qquad\qquad (2) }[/math] Clearly, by definition

[math]\displaystyle{ e' = \sum_i X_i^e \quad \text{and} \quad s' = \sum_i X_i^?. }[/math] Further, by the linearity of expectation, we get

[math]\displaystyle{ \mathbb{E}[2e' + s'] \leqslant \frac{2}{d}\sum_ie_i \lt D. }[/math] To prove (2) we consider two cases: [math]\displaystyle{ i }[/math]-th block is correctly decoded (Case 1), [math]\displaystyle{ i }[/math]-th block is incorrectly decoded (Case 2):

Case 1: [math]\displaystyle{ (c_i = C_\text{in}(y_i')) }[/math]

Note that if [math]\displaystyle{ y_i'' = ? }[/math] then [math]\displaystyle{ X_i^e = 0 }[/math], and [math]\displaystyle{ \Pr[y_i'' = ?] = \tfrac{2\omega_i}{d} }[/math] implies [math]\displaystyle{ \mathbb{E}[X_i^?] = \Pr[X_i^? = 1] = \tfrac{2\omega_i}{d}, }[/math] and [math]\displaystyle{ \mathbb{E}[X_i^e] = \Pr[X_i^e = 1] = 0 }[/math].

Further, by definition we have

[math]\displaystyle{ \omega_i = \min \left (\Delta(C_\text{in}(y_i'), y_i), \tfrac{d}{2} \right ) \leqslant \Delta(C_\text{in}(y_i'), y_i) = \Delta(c_i, y_i) = e_i }[/math] Case 2: [math]\displaystyle{ (c_i \ne C_\text{in}(y_i')) }[/math]

In this case, [math]\displaystyle{ \mathbb{E}[X_i^?] = \tfrac{2\omega_i}{d} }[/math] and [math]\displaystyle{ \mathbb{E}[X_i^e] = \Pr[X_i^e = 1] = 1 - \tfrac{2\omega_i}{d}. }[/math]

Since [math]\displaystyle{ c_i \ne C_\text{in}(y_i'), e_i + \omega_i \geqslant d }[/math]. This follows another case analysis when [math]\displaystyle{ (\omega_i = \Delta(C_\text{in}(y_i'), y_i) \lt \tfrac{d}{2}) }[/math] or not.

Finally, this implies

[math]\displaystyle{ \mathbb{E}[2X_i^e + X_i^?] = 2 - {2\omega_i \over d} \le {2e_i \over d}. }[/math] In the following sections, we will finally show that the deterministic version of the algorithm above can do unique decoding of [math]\displaystyle{ C_\text{out} \circ C_\text{in} }[/math] up to half its design distance.

Modified randomized algorithm

Note that, in the previous version of the GMD algorithm in step "3", we do not really need to use "fresh" randomness for each [math]\displaystyle{ i }[/math]. Now we come up with another randomized version of the GMD algorithm that uses the same randomness for every [math]\displaystyle{ i }[/math]. This idea follows the algorithm below.

Modified_Randomized_Decoder
Given : [math]\displaystyle{ \mathbf{y} = (y_1, \ldots,y_N) \in [q^n]^N }[/math], pick [math]\displaystyle{ \theta \in [0, 1] }[/math] at random. Then every for every [math]\displaystyle{ 1 \le i \le N }[/math]:

  1. Set [math]\displaystyle{ y_i' = MLD_{C_\text{in}}(y_i) }[/math].
  2. Compute [math]\displaystyle{ \omega_i = \min(\Delta(C_\text{in}(y_i'), y_i), {d\over2}) }[/math].
  3. If [math]\displaystyle{ \theta\lt \tfrac{2\omega_i}{d} }[/math], set [math]\displaystyle{ y_i'' \leftarrow ?, }[/math] otherwise set [math]\displaystyle{ y_i'' = y_i' }[/math].
  4. Run errors and erasure algorithm for [math]\displaystyle{ C_\text{out} }[/math] on [math]\displaystyle{ \mathbf{y}'' = (y_1'',\ldots, y_N'') }[/math].

For the proof of Lemma 1, we only use the randomness to show that

[math]\displaystyle{ \Pr[y_i'' = ?] = {2\omega_i \over d}. }[/math] In this version of the GMD algorithm, we note that

[math]\displaystyle{ \Pr[y_i'' = ?] = \Pr \left [\theta \in \left [0, \tfrac{2\omega_i}{d} \right ] \right ] = \tfrac{2\omega_i}{d}. }[/math] The second equality above follows from the choice of [math]\displaystyle{ \theta }[/math]. The proof of Lemma 1 can be also used to show [math]\displaystyle{ \mathbb{E}[2e' + s'] \lt D }[/math] for version2 of GMD. In the next section, we will see how to get a deterministic version of the GMD algorithm by choosing [math]\displaystyle{ \theta }[/math] from a polynomially sized set as opposed to the current infinite set [math]\displaystyle{ [0, 1] }[/math].

Deterministic algorithm

Let [math]\displaystyle{ Q = \{0,1\} \cup \{{2\omega_1 \over d}, \ldots,{2\omega_N \over d}\} }[/math]. Since for each [math]\displaystyle{ i, \omega_i = \min(\Delta(\mathbf{y_i'}, \mathbf{y_i}), {d \over 2}) }[/math], we have

[math]\displaystyle{ Q = \{0, 1\} \cup \{q_1, \ldots,q_m\} }[/math] where [math]\displaystyle{ q_1 \lt \cdots \lt q_m }[/math] for some [math]\displaystyle{ m \le \left \lfloor \frac{d}{2} \right \rfloor }[/math]. Note that for every [math]\displaystyle{ \theta \in [q_i, q_{i+1}] }[/math], the step 1 of the second version of randomized algorithm outputs the same [math]\displaystyle{ \mathbf{y}''. }[/math]. Thus, we need to consider all possible value of [math]\displaystyle{ \theta \in Q }[/math]. This gives the deterministic algorithm below.

Deterministic_Decoder
Given : [math]\displaystyle{ \mathbf{y} = (y_1,\ldots,y_N) \in [q^n]^N }[/math], for every [math]\displaystyle{ \theta \in Q }[/math], repeat the following.

  1. Compute [math]\displaystyle{ y_i' = MLD_{C_\text{in}}(y_i) }[/math] for [math]\displaystyle{ 1 \le i \le N }[/math].
  2. Set [math]\displaystyle{ \omega_i = \min(\Delta(C_\text{in}(y_i'), y_i), {d\over2}) }[/math] for every [math]\displaystyle{ 1 \le i \le N }[/math].
  3. If [math]\displaystyle{ \theta \lt {2\omega_i \over d} }[/math], set [math]\displaystyle{ y_i'' \leftarrow ?, }[/math] otherwise set [math]\displaystyle{ y_i'' = y_i' }[/math].
  4. Run errors-and-erasures algorithm for [math]\displaystyle{ C_\text{out} }[/math] on [math]\displaystyle{ \mathbf{y}'' = (y_1'', \ldots, y_N'') }[/math]. Let [math]\displaystyle{ c_\theta }[/math] be the codeword in [math]\displaystyle{ C_\text{out} \circ C_\text{in} }[/math] corresponding to the output of the algorithm, if any.
  5. Among all the [math]\displaystyle{ c_\theta }[/math] output in 4, output the one closest to [math]\displaystyle{ \mathbf{y} }[/math]

Every loop of 1~4 can be run in polynomial time, the algorithm above can also be computed in polynomial time. Specifically, each call to an errors and erasures decoder of [math]\displaystyle{ \lt dD/2 }[/math] errors takes [math]\displaystyle{ O(d) }[/math] time. Finally, the runtime of the algorithm above is [math]\displaystyle{ O(NQn^{O(1)} + NT_\text{out}) }[/math] where [math]\displaystyle{ T_\text{out} }[/math] is the running time of the outer errors and erasures decoder.

See also

References