Error Exponents for Source Coding

The Redundancy–Reliability Tradeoff

Shannon's source coding theorem (Chapter 5) tells us that we can compress a source at any rate R>H(X)R > H(X) with vanishing error probability. But how fast does the error probability vanish? And what if we want to compress at a rate slightly above H(X)H(X) — how much "redundancy" do we need to achieve a given reliability? The method of types gives a precise answer: the error probability decays exponentially in blocklength nn, and the exponent depends on RH(X)R - H(X) in a precise way.

Definition:

Source Coding Error Event

A block source code of rate RR for a DMS {Xi}P\{X_i\} \sim P assigns to each source sequence xXn\mathbf{x} \in \mathcal{X}^n an index f(x){1,,2nR}f(\mathbf{x}) \in \{1, \ldots, 2^{nR}\}. The error event is the event that the source sequence cannot be uniquely recovered: En={xXn:x is not in the codebook}.\mathcal{E}_n = \{\mathbf{x} \in \mathcal{X}^n : \mathbf{x} \text{ is not in the codebook}\}. The error probability is Pe(n)=Pn(En)P_e^{(n)} = P^n(\mathcal{E}_n).

Theorem: Source Coding Error Exponent

For a DMS with distribution PP on X\mathcal{X} and a source code of rate RR:

  • If R>H(P)R > H(P), the optimal error exponent is Es(R)=minQ:H(Q)RD(QP).E_s(R) = \min_{Q : H(Q) \geq R} D(Q \| P). That is, there exists a sequence of codes with Pe(n)2nEs(R)P_e^{(n)} \leq 2^{-nE_s(R)}, and no sequence of codes can achieve a strictly larger exponent.
  • If R<H(P)R < H(P), then Pe(n)1P_e^{(n)} \to 1.

The error occurs when the source sequence has a type QQ with H(Q)>RH(Q) > R — meaning the type class is too large for the codebook to cover. By Sanov's theorem, the probability of such types is dominated by the one closest to PP in KL divergence. The redundancy RH(P)R - H(P) controls how far the "bad" types are from PP, and hence how fast the error decays.

Example: Error Exponent for a Binary Source

Compute the source coding error exponent Es(R)E_s(R) for a binary source with P(0)=0.3P(0) = 0.3, P(1)=0.7P(1) = 0.7 at rate R=0.95R = 0.95 bits/symbol.

Source Coding Error Exponent Es(R)E_s(R)

Plot the source coding error exponent Es(R)E_s(R) as a function of rate for a binary source. Observe how the exponent starts at zero when R=H(P)R = H(P) and increases as redundancy grows. The slider controls the source parameter pp.

Parameters
0.3
100

The Redundancy–Reliability Tradeoff

The source coding exponent reveals a fundamental tradeoff: redundancy (RH(P)R - H(P), the excess rate beyond entropy) buys reliability (Es(R)E_s(R), the rate at which errors vanish). At the Shannon limit R=H(P)R = H(P), the exponent is zero — errors vanish, but only sub-exponentially. Any positive redundancy yields exponential error decay. This is the source coding analogue of the channel coding result that rates below capacity give exponential reliability.

🔧Engineering Note

Practical Implications of Source Coding Exponents

In practice, source codes (Huffman, arithmetic, LZ) operate at rates very close to entropy, so their "exponent" is effectively zero — they rely on large blocklengths for reliability rather than excess rate. The error exponent framework is more relevant for fixed-rate source coding (used in delay-constrained systems like real-time video) where you must choose a rate above entropy and want to know how many source symbols to block together to achieve a target error probability. A practical rule of thumb: to achieve error probability below 10610^{-6}, you need blocklength n6log210/Es(R)20/Es(R)n \geq 6 \log_2 10 / E_s(R) \approx 20 / E_s(R).

Quick Check

For a DMS with entropy H(P)=2H(P) = 2 bits and a source code at rate R=2R = 2 bits/symbol (zero redundancy), the error probability:

Decays exponentially to zero

Goes to zero, but sub-exponentially

Stays bounded away from zero

Goes to 1

Key Takeaway

The source coding error exponent Es(R)=minQ:H(Q)RD(QP)E_s(R) = \min_{Q : H(Q) \geq R} D(Q \| P) quantifies the redundancy-reliability tradeoff: coding at rate R>H(P)R > H(P) gives error probability decaying as 2nEs(R)2^{-nE_s(R)}. The exponent is zero at the Shannon limit and increases with redundancy. This is a direct application of Sanov's theorem to the set of "bad" types.