source coding
Rate-Distortion Theory
You should know: shannon entropy, mutual information, data compression
Overview
Rate-distortion theory, developed by Shannon in 1959, provides the theoretical framework for lossy data compression. It answers the question: given that we allow a maximum average distortion D, what is the minimum bit rate R(D) required to encode a source? The rate-distortion function R(D) is a fundamental limit — no lossy compression scheme can operate below this curve. The trade-off is that allowing more distortion (larger D) permits lower bit rates. Applications include JPEG image compression, MP3 audio, video codecs, and neural network compression.
Intuition
Imagine you want to store a high-resolution photograph at low file size. You accept that the decoded image will not be a perfect reconstruction — some fine detail will be lost. Rate-distortion theory says: there is a minimum number of bits per pixel needed to keep the average distortion (e.g., mean squared error) below a target D. The curve R(D) traces this minimum over all possible D values. Allowing more blur (larger D) requires fewer bits (lower R). The curve drops sharply at first — a few extra bits buys a lot of quality — and flattens as D approaches 0 (lossless limit).
Formal Definition
Given source X with distribution p(x) and distortion measure d(x,x̂), the rate-distortion function R(D) is:
Notation
| Notation | Meaning |
|---|---|
| Rate-distortion function: minimum rate for distortion D | |
| Distortion measure between original x and reconstruction x̂ | |
| Maximum allowable average distortion |
Theorems
Worked Examples
- 1
Apply the Gaussian rate-distortion formula.
- 2
Substitute σ² = 4, D = 1.
✓ Answer
R(1) = 1 bit per sample. To achieve MSE ≤ 1 on a Gaussian source with variance 4, a minimum of 1 bit per sample is required.
Practice Problems
A binary source X ~ Bernoulli(0.3) uses Hamming distortion d(x,x̂) = 1_{x≠x̂}. What is R(D) for D = 0.1?
Explain why R(D) is a convex, non-increasing function of D, and what happens at D = 0 and D = Dmax.
Common Mistakes
Thinking R(D) can be achieved by any simple quantization scheme.
R(D) is a theoretical lower bound. Practical schemes (like JPEG) approach but generally do not achieve R(D), especially for finite block lengths.
Confusing rate-distortion theory (source coding with distortion) with channel capacity (channel coding).
Rate-distortion: how few bits to describe a source, with allowed distortion. Channel capacity: how many bits per channel use can be sent reliably. The two are related via the source-channel separation theorem.
Quiz
Historical Background
Shannon introduced rate-distortion theory in his 1959 paper 'Coding Theorems for a Discrete Source with a Fidelity Criterion.' While his 1948 paper established lossless compression limits, the 1959 work extended the theory to the more practically relevant case where some distortion is acceptable. The rate-distortion function for Gaussian sources with squared-error distortion — the simplest and most important case — leads to a water-filling interpretation that reappears throughout information theory and signal processing.
- 1959
Shannon publishes the rate-distortion theorem for sources with fidelity criterion.
Claude Shannon
- 1960s
Rate-distortion theory extended to vector Gaussian sources; water-filling solution discovered.
Berger
- 1971
Toby Berger publishes the first book on rate-distortion theory.
Toby Berger
- 1970s-present
Rate-distortion principles underpin practical codecs: JPEG, MPEG, MP3.
Summary
- The rate-distortion function R(D) = min_{E[d(X,X̂)]≤D} I(X;X̂) gives the minimum bit rate for lossy compression with average distortion ≤ D.
- R(D) is convex and non-increasing: more distortion tolerated means fewer bits needed; at D=0, R(0) = H(X).
- For Gaussian sources with squared-error distortion: R(D) = (1/2) log₂(σ²/D) bits — halving distortion costs (1/2) extra bit.
- The rate-distortion theorem guarantees this bound is achievable (as block length n → ∞) and not improvable.
References
- PaperShannon, C.E. (1959). Coding Theorems for a Discrete Source with a Fidelity Criterion. IRE National Convention Record, 4, 142-163.
- BookCover, T. and Thomas, J. (2006). Elements of Information Theory, 2nd ed. Wiley. Ch. 10.
Mathematics