Kayavak / Information Theory / IT·07 Joint and Conditional Entropy, Mutual Information / Deeper
Deeper · Information Theory
Joint and Conditional Entropy, Mutual Information
The questions the chapter doesn't stop for: why this exists, the model to keep in your head, what changes when an assumption does, how sure we are of each claim, and what's still open. Read it after the chapter; back to the chapter.
Why does this exist?
Correlation was the nineteenth century's measure of dependence: Francis Galton (1888) and Karl Pearson made it the standard way to say how two quantities move together. But correlation only sees straight-line relationships: for symmetric around zero has correlation zero while is completely determined by . Shannon's 1948 paper needed something else: a way to say how much a received signal tells you about a sent one, whatever the relationship. His conditional entropy and rate of transmission answered it, and they measure every kind of dependence.
The ideas spread well beyond communication. Robert Fano (1961) turned them into a textbook theory with his inequality linking uncertainty to error. In statistics, Solomon Kullback (1959) built on them. In machine learning, J. Ross Quinlan's ID3 decision trees (1986) chose questions by "information gain", the mutual information between a question and the answer. In neuroscience, from the 1950s, researchers asked how many bits a neuron's spikes carry about a stimulus. In imaging, mutual information became the standard way to align scans from different machines (1995). The data processing inequality became a principle with a philosophical edge: computation can rearrange information but never create it.
The mental model
Try it yourself first: write your own model in the Mental Model Explorer, then compare.
Two variables share information when knowing one reduces uncertainty about the other. The shared part is the mutual information; what's left is conditional entropy; the chain rule adds them up. Processing can only lose shared information.
| Question | Answer |
|---|---|
| What is it? | Measures of uncertainty and information for two or more related variables |
| Problem it solves | How much one thing tells you about another, of any kind of relationship |
| Parts | Joint entropy, conditional entropy, mutual information, the chain rule, Markov chains |
| How it works | Surprises of conditional probabilities, averaged; differences of entropies |
| Assumptions | Known (or well-estimated) joint distribution |
| When they change | Estimated from data, every quantity is biased; with many values, badly |
| Where it fails | Says how much dependence, not what form; three-way quantities can be negative |
| Related ideas | Conditional probability (ch03), entropy (ch04), channel capacity (ch09), KL divergence (ch11) |
What if?
What if we used correlation instead of mutual information?
Reason it through, then open
Correlation measures how well a straight line fits, so it misses any relationship that isn't linear. For uniform on and , the correlation is exactly 0, while bit and is fully determined by . On the other hand, correlation is easy to estimate from little data and has a sign (it says which way), while mutual information needs much more data and only says how much. In practice: correlation for quick checks of linear trends, mutual information when the relationship might be anything.
What if processing could create information?
Reason it through, then open
Then you could start with a noisy measurement, run it through a clever enough algorithm, and end up knowing more about the world than the measurement contained: an image upscaler that recovered real detail that the camera never recorded, or a model that learned facts absent from its data. The data processing inequality forbids it. What such systems actually do is add information from somewhere else, their training data or built-in assumptions, which is why an upscaled image's "detail" is a plausible guess, not a recovery, and can be confidently wrong.
What if English had no memory beyond the previous letter?
Reason it through, then open
Then the conditional entropy given the last letter (about 3.3 bits per symbol in the lab) would be the entropy rate, and the best possible compressor would reach that and no further. Shannon's "second-order approximation" to English is exactly such text: it has the right pairs of letters but reads as nonsense ("ON IE ANTSOUTINYS ARE T INCTORE ST" in his 1948 paper). Real English carries far less information per letter, around 1 bit, because words, grammar and meaning reach back much further than one letter.
Where the boundary is
| Aspect | Mutual information | Correlation |
|---|---|---|
| Detects | Any dependence | Linear dependence only |
| Range | 0 to bits | −1 to 1 |
| Zero means | Independent | No linear relationship (could still be dependent) |
| Direction | None: symmetric, unsigned | Signed: says which way |
| Units | Bits | None |
| Data needed | A lot, especially for many values | Little |
| For , symmetric | 1 bit (fully dependent) | 0 |
Derive it
Why the chain rule for mutual information gives the data processing inequality.
- The chain rule for entropy, applied to conditional entropies, gives a chain rule for mutual information: : the information that and together carry about is what carries plus what adds once is known.
- The same quantity can be expanded in the other order: .
- In a Markov chain , once is known, is independent of , so .
- Setting the two expansions equal: .
- Conditional mutual information is never negative, so , with equality exactly when keeps everything knew about (a "sufficient statistic").
How sure are we?
| Claim | How it's known | Where from |
|---|---|---|
| Theorem | The product rule, averaged | |
| Conditioning reduces entropy on average | Theorem | The chapter's proof; Cover and Thomas |
| Mutual information is zero only for independent variables | Theorem | It's a KL divergence (chapter 11), zero only for equal distributions |
| Processing can't increase information | Theorem | The derivation above |
| Long contexts overfit English badly when estimated from counts | Measured | The chapter's lab: 0.97 bits on training text, 3.34 on unseen |
| English carries about 1 bit per letter with long context | Measured, with models | Shannon (1951); modern language models report lower |
| "Mutual information" as the name | Convention | Shannon called it the rate of transmission; the present name became standard in the 1950s and 1960s, Fano's 1961 book among the first texts to use it throughout |
Still open
Estimating mutual information from data, especially for continuous or high-dimensional variables, is an active research area: classic estimators (binning, nearest neighbours) and neural ones each fail in known ways, and some results show that estimating large mutual information accurately needs exponentially many samples. How to define information shared among three or more variables (synergy, redundancy, unique information) is unsettled, with several competing "partial information decompositions" since 2010.
What would change your mind? The chapter claims that no processing can increase information about . An experiment where a function of predicted better than the best predictor using itself would refute it; whenever this seems to happen, the function turns out to have used extra information (training data, side channels), which is outside the chain .
Recall
What is conditional entropy H(Y | X)?
The average uncertainty about Y that remains once X is known.
State the chain rule for entropy.
H(X, Y) = H(X) + H(Y | X).
Can learning something increase uncertainty?
A single observation can, but on average conditioning never increases entropy: H(Y | X) ≤ H(Y).
What is mutual information, in terms of entropies?
I(X; Y) = H(X) + H(Y) − H(X, Y) = H(Y) − H(Y | X); symmetric, zero only for independence.
What does the data processing inequality say?
If X → Y → Z, then I(X; Z) ≤ I(X; Y): processing can't increase information.
Why did long contexts do worse on unseen text?
Overfitting: most long contexts were seen only a few times, so their counts memorised the training text.
Reflect
Be honest with yourself; this stays in your browser. Anything you can't tick yet is what to revisit.