Data Processing Inequality Guide
Post-processing never invents information. A label guessed from a compression holds at most what the compression kept from the photo.
Why Does This Exist?
Pipelines stack: sensor to embedding to prediction to decision. Each stage hopes to recover signal the last one dropped through cleverer post-processing. The inequality ends that hope with one line. On a Markov chain :
In plain words: the end of the chain knows at most what the weakest link carried. Budget effort upstream instead of polishing downstream. It needs mutual information and the chain rule in joint and conditional entropy, and it motivates the tradeoff in information bottleneck.
The one idea you need first
The chain is Markov when : the last stage sees the first only through the middle. Every feedforward pipeline without a side path qualifies. The quantity measures the shared bits across each link.
Think of It Like This
Photocopies of photocopies
Copy a photo, then copy the copy. The second copy never regains detail the first lost. Toner cannot invent pores. A sharpening filter guesses plausibly, but the guess is not the pore.
Sufficiency is the exception that proves the rule: a lossless copy keeps everything, and then equality holds. Where it stops: copies are pure degradations, while learned pipelines inject prior knowledge that looks like recovered detail but is really hallucination. Realistic is not the same as informed.
How It Actually Works
Write the information in the pair about two ways with the chain rule: and also . Markov structure makes because once is known, adds nothing about . Equate the two expansions:
In plain words: the end-to-end information equals the first link minus whatever the last stage discarded, so it cannot exceed the first link. The symmetric argument caps it by the second link too. Equality needs , meaning is sufficient: it kept everything had about . Corollaries follow directly: no function of the data beats the data itself, and a noisy channel caps every downstream receiver.
Worked example
Photo , JPEG keeping bit, classifier with bits. Then . The measured end-to-end value is bits after classifier noise, sitting below the cap as the diagram shows. A super-resolution head claiming bits about from alone contradicts the inequality unless it smuggles a side prior, in which case the true chain was never alone. The weakest link rules: sits below .
Concretely, chain two binary symmetric channels: equals with probability , then equals with probability . Agreement of with is , down from after one link. Hand check: both links correct gives , both wrong also agrees for , total . No post-processing of recovers the fidelity of .
Code
The snippet below uses only the standard library. It evaluates the exact agreement formula hand-computed above, plus the cap from the photo fixture.
agree_xy = 0.9 # first link fidelityagree_yz = 0.8 # second link fidelity
# Both right (agree) or both wrong (also agree): no other path agrees.agree_xz = agree_xy * agree_yz + (1.0 - agree_xy) * (1.0 - agree_yz)
print(round(agree_xy, 3)) # -> 0.9print(round(agree_xz, 3)) # -> 0.74
first_link = 1.0 # I(X;Y) photo fixture in bitssecond_link = 0.4 # I(Y;Z) classifier fixture in bitsmeasured = 0.3 # I(X;Z) measured end to end
print(min(first_link, second_link)) # -> 0.4print(measured <= min(first_link, second_link)) # -> TrueAgreement degrades to down the chain, and sits below the cap. No function applied to afterwards changes either number.
Watch Out For
Smuggling priors and crying violation
Generative upscalers appear to beat the limit by injecting learned priors: the real chain is , not . Calling that a violation misreads the graph and overtrusts hallucinations as recovered facts.
Draw the full graph including priors before invoking the bound. If side information enters downstream, the bound moves with it.
Chasing downstream fixes for upstream loss
Retraining heads on frozen weak embeddings plateaus at the embedding ceiling. Teams burn GPU on the head while the encoder starves, and the curve flatlines exactly where the inequality said it would.
Measure the upstream link first with probe accuracy or reconstruction. If that link is the bottleneck, retrain upstream or recollect data rather than tuning the head.
The Quick Version
- Markov gives .
- Example: -bit compression into a -bit guess caps end-to-end at , with measured.
- Two noisy links at and fidelity give end-to-end agreement, never recovering .
- Equality needs sufficiency: keeps everything had about .
- Side priors change the graph, so draw them before crying violation.
- Fix upstream links before downstream heads.