S837 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S8 · Lesson 37 · LDPC codes and iterative decoding

Sparse parity-check matrices and their Tanner graphs, regular ensembles and design rate, the peeling decoder on the erasure channel, density evolution and the decoding threshold, belief propagation with log-likelihood ratios, and why these codes run within a fraction of a decibel of capacity

Lesson 36 ended with codes that come close to Shannon's limit. Low-density parity-check codes, invented by Gallager in 1960 and forgotten for thirty years, now protect the data in Wi-Fi, 5G, satellite television and most solid-state drives. Their parity-check matrices are almost entirely zeros, and they're decoded by passing short messages back and forth along the edges of a graph. Richardson and Urbanke showed how to predict, from a one-line recursion, exactly how much noise such a code survives. Where does that recursion come from?

  • A (d_v, d_c)-regular LDPC code on the binary erasure channel, which erases each bit with probability ε. Density evolution tracks x, the probability that a message from a bit node is still an erasure, one decoding iteration at a time: x→f(x)=ϵ(1−(1−x)dc−1)dv−1.
  • Decoding succeeds if iterating from x = ε reaches zero, which happens exactly when the curve f(x) stays below the line y = x. Where they touch, decoding stalls at a nonzero fixed point.
  • For the (3, 6) code (rate 1/2) the threshold is ε* = 0.4294, against the capacity limit of 0.5. Move ε across it and watch the tunnel between the curve and the line close.

Predict

A rate-1/2 code is used on an erasure channel that erases 45% of the bits. Could any code at rate 1/2 work? Can the (3, 6) LDPC code with iterative decoding?

Name it

Sparse parity checks and Tanner graphs

An LDPC code is defined by a parity-check matrix H that is mostly zeros. Draw it as a bipartite Tanner graph: n bit (variable) nodes, one per column, m check nodes, one per row, and an edge for every 1. In a (dv,dc)-regular code every bit sits in dv checks and every check involves dc bits, so there are ndv=mdc edges and the design rate is

R=1−mn=1−dvdc

Codes are drawn from an ensemble of random graphs with the given degrees; for long blocks almost every member performs like the average.

Decoding erasures by peeling

On the binary erasure channel each bit arrives correctly or as "?". Any check with exactly one erased bit determines it: that bit is the XOR of the others. Fill it in, remove it, and repeat. Decoding stops when every bit is known or when every remaining check has two or more erasures (a stopping set). The work is proportional to the number of edges, linear in block length.

Density evolution

For a long random code, the graph around any edge looks like a tree for many iterations, so messages are independent. A check sends an erasure unless all dc−1 other incoming messages are known; a bit sends an erasure only if its channel value and all dv−1 other check messages are erasures. So the erasure probability x on bit-to-check messages evolves as

xℓ+1=ϵ(1−(1−xℓ)dc−1)dv−1

The threshold ε is the largest ε for which xℓ→0. For (3, 6), ε = 0.4294; for (4, 8), 0.3834. Higher degrees aren't better for iterative decoding, though they help the code's minimum distance.

Belief propagation on noisy channels

On channels with noise, messages are log-likelihood ratios L=ln⁡P(b=0)P(b=1). A bit node adds its channel LLR and the incoming check messages (except on the edge it sends along). A check node combines its other inputs by the tanh rule

Lout=2atanh∏itanh⁡Li2

often approximated by the min-sum rule: the smallest magnitude, with the product of the signs. Density evolution then tracks distributions of LLRs, and optimized irregular codes reach within a few hundredths of a decibel of the Shannon limit on the AWGN channel at long block lengths.

Worked example

A (3, 6)-regular code has n = 1000 bits. How many checks and edges does it have, and what's its rate? How does decoding go at ε = 0.4?

Show the solution
  1. Edges. 3×1000=3000
  2. Checks. m=3000/6=500
  3. Rate. R=1−500/1000=1/2
  4. Density evolution at ε = 0.4. From x0 = 0.4 it gives 0.340, 0.306, 0.282, 0.262, 0.244, 0.227, slowing as it squeezes through the narrow gap between the curve and the line near x ≈ 0.25, then racing to zero: below 10⁻⁶ after 18 iterations.
  5. Against the threshold. Since 0.4 is below ε* = 0.4294, a long code decodes; at 0.45 the recursion settles at x = 0.355 and most erased bits stay unknown.

Answer 500 checks and 3000 edges, rate 1/2; at ε = 0.4 decoding succeeds, with the erasure fraction below 10⁻⁶ after 18 iterations.

Worked example

A check node receives LLRs of 2 and 3 from its other two bits. What does it send to the third, by the tanh rule and by min-sum?

Show the solution
  1. Tanh of each half-LLR. tanh⁡1=0.762tanh⁡1.5=0.905 with product 0.689.
  2. Tanh rule. Lout=2atanh(0.689)=ln⁡1+0.6891−0.689=1.69
  3. Min-sum. It sends min(2, 3) = 2, with a positive sign.
  4. Why the output is weaker. The parity check is weaker evidence than either input: the third bit is inferred from two uncertain bits, so its confidence is below the less certain one. Min-sum's overestimate is why practical decoders scale or offset its outputs.

Answer 1.69 by the tanh rule and 2 by min-sum.

Worked example

A check node receives LLRs 1.5, −2 and 3 from its other bits. What does it send by the tanh rule, and by min-sum?

Show the solution
  1. Tanh of each half-LLR. tanh⁡0.75=0.635tanh⁡(−1)=−0.762tanh⁡1.5=0.905
  2. Tanh rule. Lout=2artanh(0.635×−0.762×0.905)=2artanh(−0.438)=−0.94
  3. Min-sum. The product of the signs (−) times the smallest magnitude (1.5): −1.5.
  4. Overconfidence. Min-sum overstates confidence, which practical decoders correct with a scaling factor or an offset.

Answer −0.94 by the tanh rule and −1.5 by min-sum.

Check

What's the design rate of a (3, 7)-regular LDPC code?

Check

A (3, 12)-regular code has 1200 bits. How many check nodes does it have?

Check

A (3, 8)-regular code sees erasure probability 0.4. What's the erasure probability on bit-to-check messages after one iteration of density evolution?

Check

A check node's other inputs carry LLRs 2 and 1.5. What LLR does it send by the tanh rule?

Check

A bit node has channel LLR 1.2 and receives −1 and 3 from its other checks. What does it send to its third check?

Check

An erasure channel erases bits with probability 0.35. What's the highest rate any code can reliably achieve on it?

Check

A (3, 6)-regular LDPC code has 4800 bits.

(a)

How many check nodes does it have?

(b)

How many edges does its Tanner graph have?

(c)

What is its design rate?

Check

Density evolution runs on a (v, c)-regular code over an erasure channel with probability e; the current bit-to-check erasure probability is x.

Step 1

What erasure probability do check-to-bit messages carry?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why can a one-line recursion predict exactly how a long LDPC code decodes?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.