Expander Codes, LDPC Bipartite Graphs, and Sipser-Spielman Linear-Time Decoding
Anchor (Master): Sipser & Spielman 1996; Tanner 1981 A Recursive Approach to Low Complexity Codes; Barg & Zemor 2002 Error Exponents of Expander Codes; Guruswami & Indyk 2000 Expander-Based Constructions of Efficiently Decodable Codes
Intuition Beginner
Imagine a network of computers arranged in a grid. Each computer stores one bit. Neighbouring groups of computers run parity checks: they count the number of 1s among them and flag any group whose count looks wrong. If enough groups flag errors, you can figure out which bits got corrupted.
This is the idea behind expander codes. The "network" is a graph, and the "groups" are the neighbours of each check node. The key property is that the graph is well-connected: every set of nodes has many neighbours outside itself. This means that any corruption pattern touches many check groups, making errors easy to detect and correct.
Why does connectivity matter? Suppose a small set of bits are corrupted. Each corrupted bit is connected to several check nodes. If the graph is well-connected, most of those check nodes see exactly one corrupted bit, because the neighbours of the corrupted set spread out widely. A check node that sees only one corrupted bit can fix it. So the decoder works by repeatedly finding check nodes that see few errors and correcting them.
The Sipser-Spielman result from 1996 showed that this idea gives codes that correct a constant fraction of errors in time proportional to the message length (linear time). Before this, the fastest known decoders for good codes took much longer. The trick is that the graph structure does all the work: the expansion property ensures that the decoder makes progress at every step.
Visual Beginner
| Code family | Graph type | Decoding | Time complexity |
|---|---|---|---|
| Expander codes (Sipser-Spielman) | Bipartite expander | GMD (flip worst bit) | |
| LDPC (Gallager) | Sparse bipartite | Belief propagation | per iteration |
| Reed-Solomon | No graph | Berlekamp-Massey | |
| Algebraic geometry | No graph | Skorobogatov-Vladut |
Figure: a bipartite Tanner graph with 6 variable nodes (left, circles) and 4 check nodes (right, squares). Each variable node connects to 2 check nodes; each check node connects to 3 variable nodes. The check node enforces that the sum of its neighbour bits is even. If bit 3 flips, check nodes A and C detect an error. The decoder identifies bit 3 as the unique variable connected to both unhappy checks, and flips it back.
Worked example Beginner
A small expander code uses a graph with 4 variable nodes and 2 check nodes. Each variable connects to both checks. The local code at each check requires its two neighbours to be a valid codeword of a simple repetition code.
Valid local codewords for a check with 2 neighbours: (0,0) and (1,1). So each check enforces: its two neighbours must agree.
With 4 variables and checks , (each check has 3 neighbours):
Check says: all three bits must agree (repetition). Check says: all three bits must agree.
If the transmitted codeword is (0,0,0,0) and bit flips to give (0,1,0,0):
- Check sees (0,1,0): two 0s and one 1. Not all agree. Error detected.
- Check sees (1,0,0): two 0s and one 1. Error detected.
The decoder finds that is the only variable in both unhappy checks. It flips back to 0. Done in one pass.
Check your understanding Beginner
Formal definition Intermediate+
Let be a -regular bipartite graph with variable nodes and check nodes, where each check node has degree . Let be a binary linear code of length with minimum distance and rate .
Definition (Expander code). The expander code is the set of all assignments to the variable nodes such that for every check node , the restriction of to the neighbours of is a codeword of .
The rate of is at least .
Definition (Graph expansion). The graph is a -expander if for every subset with , the number of unique neighbours of in satisfies:
where a unique neighbour of is a node in that is adjacent to exactly one node in .
Definition (GMD decoding). The generalised minimum distance (GMD) decoder for expander codes operates iteratively:
- Find a variable node that is in more unsatisfied check nodes than satisfied ones.
- Flip the bit at .
- Repeat until no such variable exists.
Theorem (Sipser-Spielman). If is a -expander for some and has minimum distance , then the GMD decoder corrects all error patterns of weight at most in time.
Connection to LDPC Tanner graphs
An LDPC code 46.08.01 is defined by its parity-check matrix , which can be represented as a bipartite Tanner graph: variable nodes on one side, check nodes on the other, with an edge wherever . The sparse parity-check matrix (each row has few 1s) means the graph is sparse, and the belief propagation decoder passes messages along the edges.
Expander codes are a subclass of LDPC codes where the Tanner graph has the expansion property. The expansion guarantees that the local decoder (GMD) converges, while the sparsity ensures linear-time complexity. The connection to graph theory 40.04.01 is that expander graphs are objects of deep combinatorial interest, with constructions from Ramanujan graphs (Lubotzky-Phillips-Sarnak), zig-zag products, and random graphs.
Key theorem with proof Intermediate+
Theorem (Minimum distance of expander codes). If is a -expander and the local code has minimum distance , then the expander code has minimum distance at least .
Proof. Suppose is a codeword of weight . Let be the support of (the set of variable nodes where ). By the expansion property, the number of unique neighbours of is .
Each unique neighbour of is a check node that sees exactly one variable in . Since is a codeword, the restriction to each check must be a codeword of . A check with exactly one non-zero neighbour has a local assignment with weight 1, which cannot be a codeword of (since ).
Therefore the number of unique neighbours must be zero, giving , which contradicts . Hence no non-zero codeword has weight less than .
Bridge. The expansion property builds toward the density evolution analysis of LDPC codes in 46.08.01 where the graph structure determines the decoding threshold; this appears again in 46.08.04 where expander codes are compared with other capacity-achieving families; the foundational reason expansion guarantees good distance is that errors cannot cluster without touching many checks, and this is dual to the covering arguments in channel coding; the central insight is that the combinatorial property of the graph (expansion) translates directly into the coding-theoretic property (minimum distance), and putting these together reveals the deep connection between graph theory 40.04.01 and coding theory.
Exercises Intermediate+
Lean formalization Intermediate+
Mathlib has no formalisation of expander graphs, expander codes, or GMD decoding. The graph theory library in Mathlib provides SimpleGraph and basic adjacency structures, but lacks spectral gap definitions, Cheeger inequalities, and the unique-neighbour expansion property. The Tanner graph representation of linear codes and the iterative decoding algorithm are absent. The proof that expansion implies minimum distance requires counting arguments about bipartite neighbourhoods, which Mathlib's combinatorics library does not support. The connection between eigenvalues and expansion (the Alon-Boppana bound, the expander mixing lemma) is unformalised. This unit ships without a lean_module.
Advanced results Master
The expander mixing lemma and spectral expansion
The expander mixing lemma connects the spectral gap of a graph to its combinatorial expansion. For a -regular bipartite graph with second-largest eigenvalue :
for all and . This shows that the edge distribution is nearly uniform: every pair of subsets has approximately the expected number of edges, with deviation controlled by . The smaller is (relative to ), the better the expansion.
The Alon-Boppana bound states that for any -regular graph. Ramanujan graphs (constructed by Lubotzky, Phillips, and Sarnak in 1988) achieve , matching this bound. These graphs are optimal expanders and produce optimal expander codes.
Tanner's recursive construction
Tanner's 1981 paper introduced the recursive construction of codes on graphs. Instead of using a single-level bipartite graph, the construction nests codes within codes: each check node of the outer graph is itself a codeword of an inner code defined on a smaller graph. This recursive structure allows the code designer to compose weak codes into strong ones, with the expansion of the outer graph amplifying the distance of the inner codes.
The Tanner construction generalises both expander codes (single level) and turbo codes (two-level concatenation with interleaving). The distance bound for the recursive construction is the product of the distances at each level, multiplied by the expansion parameter.
Expander codes and list decoding
Guruswami and Indyk (2000) showed that expander codes admit efficient list-decoding algorithms. For a code with relative distance , the list-decoding problem asks: given a received word, find all codewords within Hamming distance for . The expander structure enables linear-time list decoding up to the Zyablov radius (a bound derived from the concatenation structure), and subsequent work by Guruswami and Rudra achieved list-decoding capacity.
The key technique is to reduce the list-decoding problem for the expander code to the list-decoding problem for the local code at each check node. Since the local code is small (length ), list-decoding it is fast. The expansion property ensures that the local lists can be combined consistently into a global list.
Synthesis. Expander codes are the graph-theoretic bridge between combinatorics 40.04.01 and coding theory; the central insight is that the expansion property translates directly into good minimum distance and efficient decoding; this builds toward the LDPC framework in 46.08.01 where belief propagation generalises the GMD decoder; putting these together, expander codes demonstrate that global coding-theoretic properties (distance, rate) can be engineered from local combinatorial structures (graph expansion, local codes); the foundational reason this works is that expansion forces errors to spread across many checks, preventing any error pattern from hiding, and this generalises to the message-passing paradigm of modern coding theory.
Full proof set Master
Proposition (Rate of expander codes). The expander code where is a -left-regular bipartite graph with and , and has dimension , has rate at least .
Proof. The code is a linear subspace of defined by the constraints that each check node's local view is a codeword of . Each check node contributes at most independent linear constraints (the parity-check matrix of has rows). The total number of constraints is at most , though some may be linearly dependent. Therefore:
and the rate is . Since (each variable has edges and each check has edges, so ), the rate is .
Proposition (GMD decoding convergence). If is a -expander and the error pattern has weight , then GMD decoding corrects all errors in at most iterations.
Proof. At each iteration, the decoder flips a variable that is in more unsatisfied checks than satisfied ones. Let be the current error set (initially of size ). The unique neighbours of are check nodes seeing exactly one error, which are necessarily unsatisfied (since means a single non-zero bit violates the local code). There are at least unique neighbours.
Each variable in has at most edges going to non-unique neighbours. So the number of unsatisfied checks incident to any is at least per variable, minus potential double-counting. A careful count shows that each variable in has at least unsatisfied incident checks. Since each variable has exactly incident checks, more than half are unsatisfied, so every error variable is "bad" and eligible for flipping.
Flipping any bad variable reduces the error weight by 1. After at most flips, the error weight is zero and all checks are satisfied.
Connections Master
46.07.01— Weight enumerators and the MacWilliams identity provide the algebraic framework for bounding code distance; expander codes use graph-theoretic (rather than algebraic) distance arguments.40.04.01— Graph theory provides the expander graphs, spectral gap, Cheeger inequalities, and the combinatorial expansion property that underpin expander codes.46.08.01— LDPC codes on Tanner graphs use belief propagation, which generalises the GMD decoder; expansion determines the decoding threshold.46.08.04— Expander codes are one of several capacity-achieving code families; the unified view compares them with LDPC, turbo, and polar codes.46.03.01— Channel capacity is the target that expander-based code constructions aim to approach; the expansion property provides the structural mechanism for approaching it.
Historical & philosophical context Master
Michael Sipser and Daniel Spielman introduced expander codes in their 1996 paper "Expander Codes" (IEEE Transactions on Information Theory 42(6):1710-1722). Their key insight was that the expansion property of a graph, long studied in combinatorics and theoretical computer science, could be harnessed to construct codes with both good distance and linear-time decoding. Prior to their work, the best codes in terms of rate-distance tradeoff (such as algebraic geometry codes) required decoding algorithms with super-linear complexity.
The Tanner graph representation was introduced by Michael Tanner in 1981 ("A Recursive Approach to Low Complexity Codes," Information and Control 27(4):533-573). Tanner recognised that codes could be defined on bipartite graphs with local constraints at each check node, and that the graph structure determines the code properties. This paper laid the groundwork for both expander codes and LDPC codes.
Expander graphs themselves have a rich history. The explicit construction of expanders was achieved by Margulis (1973) using group representations, and optimised by Lubotzky, Phillips, and Sarnak (1988) who constructed Ramanujan graphs achieving the optimal spectral gap. The probabilistic method shows that random regular graphs are expanders with high probability, but explicit constructions are needed for code applications.
The connection between expansion and decoding was further developed by Zemor (2001) who improved the Sipser-Spielman decoding radius, and by Barg and Zemor (2002) who computed the error exponents of expander codes. Guruswami and Indyk (2000, 2005) showed that expander codes achieve linear-time list decoding, bringing them closer to the theoretical limits of coding.
Bibliography Master
@article{sipser-spielman1996,
author = {Sipser, M. and Spielman, D. A.},
title = {Expander Codes},
journal = {IEEE Transactions on Information Theory},
volume = {42},
number = {6},
pages = {1710--1722},
year = {1996},
}
@article{tanner1981,
author = {Tanner, R. M.},
title = {A Recursive Approach to Low Complexity Codes},
journal = {Information and Control},
volume = {27},
number = {4},
pages = {533--573},
year = {1981},
}
@inproceedings{guruswami-indyk2000,
author = {Guruswami, V. and Indyk, P.},
title = {Expander-Based Constructions of Efficiently Decodable Codes},
booktitle = {Proceedings of the 41st Annual Symposium on Foundations of Computer Science (FOCS)},
pages = {658--667},
year = {2000},
}
@article{barg-zemor2002,
author = {Barg, A. and Zemor, G.},
title = {Error Exponents of Expander Codes},
journal = {IEEE Transactions on Information Theory},
volume = {48},
number = {6},
pages = {1643--1648},
year = {2002},
}
@book{richardson-urbanke2008,
author = {Richardson, T. and Urbanke, R.},
title = {Modern Coding Theory},
publisher = {Cambridge University Press},
year = {2008},
}
@article{lubotzky-phillips-sarnak1988,
author = {Lubotzky, A. and Phillips, R. and Sarnak, P.},
title = {Ramanujan Graphs},
journal = {Combinatorica},
volume = {8},
number = {3},
pages = {261--277},
year = {1988},
}