rajeshrmahapatra.com Research

AI Research Library

Entropy, information and compression

Rajesh Ranjan Mahapatra

An observation becomes useful information only when knowing it shortens the best code for a declared target under a model that survives out-of-sample testing; rarity alone merely says the observation was expensive to predict.

© 2026 Rajesh Ranjan Mahapatra. 29 min read

Entropy, information and compressionAll AI Research Library

Entropy, information and compression

An observation becomes useful information only when knowing it shortens the best code for a declared target under a model that survives out-of-sample testing; rarity alone merely says the observation was expensive to predict.

TLDR

  1. Surprise is model-relative code length. A rare observation receives many bits under the probability model used to predict it, but that says nothing yet about meaning, harm or relevance.
  2. Entropy is the expected price of describing a source. With an accurate model and long sequences, it marks the lossless-compression limit rather than a mystical quantity inside each message.
  3. Mutual information is expected target code saving. A signal is informative about an outcome when conditioning on it reduces the bits needed to encode that outcome.
  4. Finite samples can manufacture dependence. Unique identifiers, leakage and sparse high-dimensional tables may show large training mutual information while providing no held-out code gain.
  5. Admit a signal only after its incremental code saving survives temporal holdout, permutation controls and translation into decision value, authority and recovery requirements.

Two alarms, equally rare

A factory monitors 10,000 batches. Two proposed alarms each fire on exactly 100 batches, so either alarm event has probability 0.01 and surprisal −log2(0.01) = 6.644 bits. One alarm is useless. The other identifies most of the batches that later fail.

For the first alarm, ten of its hundred firings precede failure. That is also the base failure rate: 1,000 of 10,000 batches fail. Knowing that the alarm fired leaves the failure probability unchanged at 10 per cent. The event is rare, visually dramatic and expensive to encode under the marginal model. It carries zero information about the target.

For the second alarm, ninety of its hundred firings precede failure. Its rarity is identical, but the joint arrangement is different. Knowing that it fired changes the target distribution sharply. Averaged across all batches, it saves 0.0259 bits when encoding failure or non-failure. That sounds small because the alarm occurs only one per cent of the time. On a fired-and-failed batch, however, the local evidence is 3.17 bits in favour of dependence.

The difference is not the amount of surprise in the alarm. It is the amount by which the alarm changes the code for something we care about. This distinction connects four ideas that are often blended together: surprisal, entropy, compression and mutual information. It also supplies a practical test for machine-learning features, anomaly signals, representation objectives and operational alerts.

Figure 1. Message code-length landscape

Ideal code length rises as model probability falls A curved line plots negative log base two probability against probability. Common, unusual, rare alarm and nonce points lie on the curve. A separate target axis remains disconnected, showing that self-surprise alone does not establish relevance. model probability q(x) ideal length −log₂ q(x), bits 02468 .001.01.11 rare alarm6.644 bits at p=.01 unusual common nonce target relevance is not on this axis
Rarity changes the code for the observation itself. The curve is exact for ideal self-information. The labels are illustrative. No point on this one-dimensional curve reveals whether the observation predicts, explains or changes a separate target.
Part I

Surprise belongs to a model

Imagine receiving the message “the pump stopped”. Its information content is not stored in the sentence like mass in a parcel. During a planned shutdown, the message was highly probable. During normal operation, it may have been unlikely. Under one model it costs almost no bits to predict; under another it costs many. The physical event can stay fixed while its formal surprise changes.

iq(x) = −log2 q(x)

x is the observed message. q(x) is the probability assigned by the predictive model q. The base-two logarithm measures ideal code length in bits. Lower assigned probability produces a longer code.

This formula earns its interpretation from coding. A prefix code cannot give every possible message a short word. Frequent messages should receive short words, and infrequent messages must pay with longer ones. Ideal lengths can be fractional even though a single binary codeword has an integer length. Across blocks of messages, the average can approach the ideal. Shannon made this bridge between probability and efficient communication precise.[1]

The subscript on i matters. It records whose probability model priced the message. When the model is accurate, a long code identifies a genuinely uncommon outcome under the operating distribution. When the model is stale, a long code may identify a forecasting error. Surprise is always evidence about the pair consisting of an observation and a model.

Thought experiment 1

Change dependence, hold rarity fixed

Return to the two one-per-cent alarms. Keep every marginal count fixed: 100 alarm firings and 1,000 failures. In the first world, distribute the alarm proportionally across failed and successful batches. In the second, move eighty alarm firings from successful batches to failed batches. Nothing about alarm rarity changes. Only the joint arrangement changes.

The alarm’s self-surprisal remains 6.644 bits in both worlds. Its mutual information with failure moves from zero to 0.0259 bits. The intervention isolates the missing cause: useful information appears when the observation changes the target distribution, not when the observation is merely scarce.

Figure 2. Same rarity, different dependence

Two joint tables have identical marginals but different mutual information The left table shows an independent one-per-cent alarm with ten failed alarm cases. The right shows a precursor with ninety failed alarm cases. Both have one hundred alarms and one thousand failures. Independent alarm Precursor alarm I(X;Y) = 0 bits I(X;Y) = 0.0259 bits 1090 9908,910 alarm margin = 100 9010 9108,990 alarm margin = 100 failure margin = 1,000 in both worlds only the joint placement changed
Marginal surprise cannot distinguish independence from prediction. Counts are synthetic. Cell areas encode the two binary margins; the printed counts expose the changed joint arrangement.
Thought experiment 2

Change the model, hold the event fixed

A monitoring model was trained before a software rollout and assigns error code E42 probability 0.0001. Under that model, E42 carries 13.29 bits of surprisal. The rollout deliberately emits E42 on five per cent of healthy requests. The current operating probability is now 0.05, whose ideal code length is 4.32 bits.

The event did not become more harmful. The old model became wrong. On each E42 occurrence, the stale model pays about log2(0.05/0.0001) = 8.97 extra bits relative to the current distribution. That excess is a pointwise form of coding regret. A system that equates high stale-model surprisal with incident severity will flood its queue after every benign regime change.

Figure 3. A stale codebook turns change into false novelty

An error code receives a long code under a stale model and a shorter code under the current distribution Two vertical code ribbons show 13.29 bits under model q and 4.32 bits under current distribution p. The gap of 8.97 bits is labelled model regret, while a separate severity gauge remains unfilled. Stale model q Current source p 13.29bits 4.32bits 8.97 bitspointwise regret severity not inferred
Unexpected under q does not mean harmful in the world. Probabilities and bit lengths are calculated for the synthetic E42 scenario. The unfilled severity gauge marks a separate claim requiring a target, loss model or causal analysis.

Three different questions called entropy

Entropy appears across communication, thermodynamics, cryptography and machine learning. Shannon entropy describes average uncertainty under a probability distribution. Cryptographic work may emphasise min-entropy, a worst-case measure tied to the most likely outcome and guessing risk.[10] Algorithmic information asks for the shortest effective description of an individual object.[9]

These are not interchangeable badges for “interesting”. A random nonce can have excellent cryptographic unpredictability and no predictive value for a failure target. A repeated diagnostic pattern can have low marginal entropy and high decision value. An individually intricate string can be incompressible in an algorithmic sense while remaining independent of the label under investigation. Name the random variable, the probability model and the target before interpreting an entropy number.

Rare can also be evidence against the target

The phrase “rare and informative” often hides another mistake: assuming that a surprising observation must increase the probability of the event being investigated. Pointwise mutual information can be negative. Suppose a diagnostic marker appears on one per cent of all cases but almost never appears among genuine failures. Seeing the marker is still surprising under its marginal model, yet it shifts probability away from failure. Its target contribution is informative precisely because it contradicts the favoured hypothesis.

This matters in anomaly systems. A previously unseen client version may explain a burst of unusual logs and thereby reduce suspicion of an attack. A rare but authenticated maintenance token may make a dangerous-looking command more consistent with an approved intervention. The event’s rarity and the direction of its target evidence are independent questions. One is priced by −log q(x). The other is priced by a likelihood ratio comparing the joint event with what independence predicted.

Operational interfaces should therefore avoid a single “information score” that mixes novelty and target evidence. Show at least the model-relative surprise of the observation, the direction and magnitude of its evidence for the declared target, and the age of the model that supplied the baseline. A red novelty badge can coexist with evidence that lowers risk.

Part II
The argument in one passChart · flow
flowchart LR
  A["Two alarms, equally rare"] --> B["Surprise belongs to a model"]
  B --> C["Entropy becomes a compression<br/>limit"]
  C --> D["Dependence is target code saving"]
  D -. "re-test" .-> A
  classDef first fill:#0a1424,stroke:#087A98,stroke-width:2px,color:#e6f3ff
  classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff
  class A first
  class B,C,D step
A structural route through Entropy, information and compression, from Two alarms, equally rare to Conclusion and next decision. Reading use: follow the relation, then test it against the surrounding evidence and limits.

Entropy becomes a compression limit

Consider a source that emits four symbols with probabilities 1/2, 1/4, 1/8 and 1/8. A fixed-width code needs two bits for every symbol. A prefix code can assign lengths 1, 2, 3 and 3. The average is 1.75 bits, exactly the source entropy. Common symbols borrow short paths; rare symbols pay for the privilege by taking longer ones.

Huffman’s construction finds a minimum-redundancy prefix code for known symbol weights.[2] For arbitrary probabilities, one-symbol code lengths must be integers and may sit above the ideal. Coding long blocks, or using arithmetic-style schemes, can approach the entropy rate. Shannon’s noiseless coding theorem gives entropy its operational force: for a stationary source under its assumptions, long typical sequences can be represented near H bits per symbol, while reliable lossless coding below that rate is unavailable in the limit.[1]

Hp(X) = Ep[−log2 p(X)] = −Σx p(x) log2 p(x)

X is the source symbol, p(x) is its true probability under the stated source model, and the expectation averages ideal self-code lengths. If probability mass becomes more evenly spread, expected code length usually rises.

Entropy is therefore an average, not the code length of every outcome. For the one-per-cent alarm, the fired event costs 6.644 ideal bits, yet the binary variable’s entropy is only 0.0808 bits per batch because ninety-nine per cent of batches produce the predictable “no alarm”. Confusing these two quantities makes rare events look as though they dominate every stream even when they barely affect average storage or prediction.

One-symbol entropy can miss sequence structure

Now compare two binary streams with the same histogram. The first is an independent fair coin: approximately half zeros and half ones in no predictable order. The second alternates 0, 1, 0, 1 without exception, but begins with an unknown first bit. Each individual position has marginal probability one half for either symbol, so the one-symbol entropy is one bit in both streams. Their long-run compressibility is radically different.

After the first symbol of the alternating stream, every remaining symbol is determined. A code need only transmit the starting bit and the rule “alternate”. The independent stream continues to require about one bit per symbol. The relevant quantity for a source with memory is its entropy rate, the limiting uncertainty per symbol after dependencies across the sequence are accounted for:

H̄(X) = limn→∞ H(X1,…,Xn) / n

X1,…,Xn is a length-n block from the source. The limit, when it exists, prices new uncertainty per symbol after temporal structure is exploited. For the ideal alternating process it approaches zero; for an independent fair coin it remains one bit.

Counterexample

Equal histograms do not imply equal compressibility. A shuffled log and a strictly periodic log can share every single-event frequency while differing in transition structure, run lengths and entropy rate. A monitoring team that estimates only marginal entropy can label a deterministic protocol as maximally random.

This distinction reaches directly into machine intelligence. Token frequencies do not capture grammar. Independent feature entropies do not capture temporal state. A context model earns compression by predicting the next event from prior events. When a larger context window lowers held-out code length, it has captured sequence dependence under that evaluation distribution. Whether the dependence is useful for a later decision remains a separate target question.

Figure 4. From source probabilities to expected code length

Four source symbols flow through a prefix tree into an average code length Symbols A through D with probabilities one half, one quarter, one eighth and one eighth follow tree paths of lengths one, two, three and three. Their weighted lengths sum to 1.75 bits. source mass Ap=.5 Bp=.25 C.125 D.125 prefix paths 01 A · 0 01 B · 10 01 C · 110D · 111 .5×1 + .25×2 + .125×3 + .125×3 = 1.75 bits/symbol here the integer prefix code reaches H(X) exactly
Entropy is a weighted path length. Probabilities and codewords are an exact synthetic example. The tree is one optimal prefix code, not a claim that every source can attain fractional ideal lengths one symbol at a time.

The codebook is part of the measurement

A deployed compressor or probabilistic predictor rarely knows the true distribution p. It uses a model q. The average length it pays is cross-entropy. The gap between this cost and the best cost available under p is Kullback-Leibler divergence, introduced as an information measure by Kullback and Leibler.[3]

H(p,q) = Ep[−log2 q(X)] = H(p) + DKL(p ∥ q)

p is the operating distribution and q is the model used for coding. DKL(p ∥ q) is non-negative expected excess length. Improving q can reduce regret, but it cannot push expected loss below the entropy of p under lossless coding assumptions.

This decomposition makes log loss an especially useful evaluation instrument. A probabilistic model that places too little probability on realised outcomes pays longer codes. Under regularity conditions, the logarithmic score is strictly proper: in expectation, truthful probabilities optimise the score rather than merely producing correct labels.[6] Calibration, discrimination and operational value still need separate checks, but the code interpretation keeps probabilistic accuracy concrete.

Figure 5. Every wrong model pays a codelength premium

Cross entropy is split into irreducible source entropy and model regret A horizontal bar of total cross entropy contains a teal entropy segment and a coral Kullback-Leibler regret segment. Three model markers show regret shrinking as q approaches p. Expected code paid under model q H(p)source uncertainty Dₖₗ(p ∥ q)model regret H(p,q) = H(p) + regret stale qbetter qq = p model improvement can remove the premium, not the source entropy
Cross-entropy separates what the source makes uncertain from what the model gets wrong. Segment lengths are illustrative. The additive decomposition is exact when the distributions and support conditions are defined.

Compression is not semantic understanding

A compressor exploits regularity. It need not know why the regularity exists. Repeating “authorised” a thousand times is highly compressible whether the word appears in a valid policy, a malicious injection or a corrupt log. Conversely, an unpredictable cryptographic token can resist compression while carrying no broad semantic content.

Minimum-description-length methods extend the coding idea to model selection: pay for a model and the residual data under that model, then prefer a short total description.[4] This disciplines complexity, but the selected regularities remain relative to the model class and coding scheme. Kolmogorov’s algorithmic approach pushes toward the shortest programme producing an individual object, which clarifies why one string may be simple and another incompressible without an ensemble.[9] General Kolmogorov complexity is not computable, and individual-object brevity still does not specify relevance to a target.

Boundary condition

Compression establishes exploitable regularity under a representation and code family. It does not by itself establish truth, causality, semantic adequacy, consciousness or business usefulness. Those claims need targets and bridges that coding efficiency alone does not provide.

Part III

Dependence is target code saving

Entropy prices uncertainty in one variable. To ask whether an observation helps, introduce a target. Let Y be the outcome we must encode and X a candidate signal. First build the shortest expected code for Y alone. Then allow the coder to see X. The expected reduction is mutual information.

I(X;Y) = H(Y) − H(Y|X) = E log2 [p(X,Y) / (p(X)p(Y))]

H(Y) is baseline target uncertainty. H(Y|X) is target uncertainty after observing X. The log ratio is positive where a joint event occurs more often than independence predicts and negative where it occurs less often. Averaging gives non-negative mutual information.

This definition makes “useful” precise but local. The target must be named. An alarm can have high information about machine type and zero information about failure. A text embedding can retain document identity while discarding the contractual clause needed for a decision. Tishby, Pereira and Bialek formalised relevant information in exactly this target-relative way: compress X while preserving what it says about Y.[5]

Figure 6. Shared uncertainty is the code saving

Overlapping source and target uncertainty regions Two overlapping ellipses represent H of X and H of Y. Their overlap is mutual information. The non-overlap inside Y is conditional entropy H of Y given X. A side annotation says high H of X can sit outside the target. H(X)signal uncertainty H(Y)target uncertainty I(X;Y)target code saving large H(X) can remain irrelevant to Y H(Y|X) remains to be coded
The overlap, not the size of the signal, is the target-relevant quantity. This is a conceptual information diagram. Entropies obey the shown decomposition for discrete variables, but the areas are not metric-scaled measurements.
Worked example 1 · Minimal

A binary sensor saves 0.140 bits per case

Ten per cent of items are defective, so the baseline target entropy is h2(0.10) = 0.469 bits. A sensor is positive on twenty per cent of items. Among positive items, the defect rate is 0.40. Among negative items, it is 0.025. These rates preserve the ten-per-cent overall prevalence.

Conditioning on the sensor gives H(Y|S) = 0.2 × h2(0.40) + 0.8 × h2(0.025) = 0.329 bits. The mutual information is 0.469 − 0.329 = 0.140 bits per case. Across 100,000 cases, an ideal target coder would save about 13,988 bits. That number describes predictive dependence, not inspection benefit.

Figure 7. The binary sensor removes part of the target code

A waterfall from baseline target entropy to conditional entropy A baseline bar of 0.469 bits is reduced by a lavender 0.140-bit mutual-information segment, leaving a teal 0.329-bit conditional entropy bar. Expected target code per case 0.469H(Y) save 0.140 0.329H(Y|S) decisionvalue requires costs,thresholds andavailable actions
Predictive code saving stops before the action boundary. Entropy values are exact for the synthetic binary example. The grey decision column is deliberately unquantified because information alone does not supply a loss function.

Local evidence and average information

The rare precursor’s fired-and-failed cell has pointwise mutual information log2(0.009/(0.01 × 0.10)) = log2(9) = 3.17 bits. The event is nine times more common than independence predicts. Yet it occurs in only ninety of 10,000 batches. Other cells contribute smaller positive and negative terms. The average settles at 0.0259 bits.

This resolves an apparent contradiction. A rare observation may be strongly diagnostic when it occurs while contributing little average mutual information across the population. Pointwise evidence is relevant to the current case. Average mutual information is relevant to expected coding and broad feature value. A consequential design may need both, plus tail-specific loss. Do not use an average dependence measure to erase a rare but costly stratum.

Incremental information needs context

A second sensor can look informative only because it copies the first. Let Z denote signals already available. The correct admission question is often conditional mutual information:

I(X;Y|Z) = H(Y|Z) − H(Y|X,Z)

Z is the existing context. The quantity asks how many additional target bits X saves after the coder already knows Z. A feature with high I(X;Y) can have nearly zero I(X;Y|Z) when it is redundant.

Feature-selection research has connected many information-theoretic criteria to conditional likelihood and the assumptions used to approximate this incremental quantity.[7] The practical implication is straightforward: rank a proposed signal against the system it will join, not against an empty baseline. A duplicate feed can look excellent in isolation and add no new evidence to a mature model.

Recoding cannot manufacture true dependence

Suppose a representation T is produced deterministically from X. Under a fixed joint distribution, post-processing cannot increase the true mutual information with Y: I(T;Y) ≤ I(X;Y). An invertible relabelling preserves the quantity because no distinctions are lost. A many-to-one compression can preserve or discard target evidence, but it cannot create evidence that was absent from X. This data-processing boundary is one reason the information bottleneck frames representation learning as a trade between compression of X and retention of information about Y.[5]

Estimated values can appear to violate the intuition because estimators, finite samples and model classes change. A neural critic may fit T more easily than raw X and therefore produce a larger lower bound, even though the underlying true information did not grow. That can make T a better practical representation for the estimator without proving that the transformation generated new dependence. Separate a better measuring instrument from a larger underlying quantity.

Thought experiment 3

The XOR feature that every univariate screen rejects

Let X1 and X2 be independent fair bits, and define Y as their exclusive OR. Knowing X1 alone leaves Y perfectly balanced, so I(X1;Y) = 0. The same holds for X2. Knowing the pair determines Y exactly, so I((X1,X2);Y) = 1 bit.

Nothing is wrong with mutual information. The failure lies in screening variables one at a time. The target evidence is synergistic: it exists in the relation between features. A pipeline that rejects every zero-univariate-information feature will discard both necessary inputs. Conditional analysis reveals the interaction because I(X1;Y|X2) = 1 bit.

XOR gives a hard boundary for simplistic feature ranking. Redundancy means several variables repeat the same evidence; synergy means a group supplies evidence that none carries alone. Real systems can contain both. Evaluate candidate sets, interactions and model classes against a held-out target code rather than assuming that a list of marginal scores composes additively.

Negative control

The identifier that predicts every training label

Give each row a unique session identifier. In the training table, every identifier occurs once and therefore determines its observed label perfectly. The plug-in estimate reports I(session;Y) = H(Y), as though the identifier contained all target information. On held-out data, every identifier is unseen. A defensible conditional coder falls back to the base rate and saves exactly zero bits.

This is not a quirk of identifiers. Fine-grained timestamps, document hashes, account numbers and memorised embeddings can create the same illusion. In-sample mutual information can reward memorisation whenever the feature alphabet grows too quickly for the sample.

Figure 8. The identifier trap separates training dependence from reusable information

Training mutual information and held-out code gain for five synthetic features Paired bars compare training plug-in mutual information and test code gain. A session identifier has high training mutual information but zero test gain. The common sensor remains positive on test, while random and shuffled controls sit near zero. Bits per case rare randomrare precursorcommon sensorshuffled sensorsession ID 0.030 test0.148 test0.467 train0 test training plug-in I held-out code gain non-positive control bar scale: 0 to 0.47 bits per case
Memorisation disappears when the code must price unseen cases. Values are generated by the companion Python lab using 20,000 synthetic rows, a seeded 70/30 split and Laplace-smoothed conditional probabilities. Small negative test gains mean the conditional model coded slightly worse than the baseline.

Estimation is itself a model choice

True probabilities are rarely available. Histogram bins, smoothing, nearest neighbours, density models and neural variational bounds each impose assumptions. Paninski’s analysis shows why plug-in entropy and mutual-information estimates become unreliable when samples are sparse relative to the alphabet.[8] In high dimensions, Poole and colleagues found important bias-variance trade-offs among variational bounds.[11] McAllester and Stratos proved a sharper distribution-free limitation: a high-confidence lower bound estimated from N samples cannot generally grow beyond order log N.[12]

These results do not make mutual information unusable. They change the evidence standard. Use estimators matched to data type and dimensionality. Report uncertainty. Include exact synthetic distributions where truth is known. Compare against permutation controls. Test code savings out of sample. Inspect sensitivity to binning, representation and model capacity. When neural bounds are optimised as objectives, do not quietly reinterpret the bound value as an accurate measurement of true mutual information.

A measurement protocol for dependence

Begin with a synthetic calibration suite whose joint distributions are known. Include independence, perfect copying, weak rare dependence, nonlinear dependence, redundancy, XOR synergy and high-cardinality noise. An estimator that cannot recover these controlled cases within declared tolerances has not earned interpretation on the production data.

Then separate fitting from measurement. Fit density models, discretisers or neural critics on one partition. Estimate target code gain on another. Use a third temporal or domain holdout for the release claim when the data volume permits it. Repeat across seeds or resamples and report intervals, not only the best run. For feature discovery across many candidates, account for selection: the largest observed estimate is partly a winner of noise.

Finally, replay the measurement under plausible representation choices. Change bins, smoothing strength, embedding dimension and category pooling. A dependence claim that reverses under minor admissible choices is estimator-sensitive evidence, not a stable property of the system. Preserve the full manifest so that later data can reproduce the old estimate under the old boundary before replacing it with a new one.

Part IV

Admit signals by what they save

A production team rarely wants information in the abstract. It wants to decide whether a new signal deserves collection, storage, model complexity, monitoring and influence over an action. Entropy alone answers the wrong question. Raw mutual information answers only part of the right one. The admission test should move through four boundaries: source, target, generalisation and consequence.

Worked example 2 · Production-shaped scenario

A signal for exception routing

Consider a synthetic payment-operations system. The target Y is whether an exception will require specialist review within two hours. Existing context Z contains amount band, payment rail, account history and deterministic policy flags. A team proposes a text-derived signal X from the exception narrative.

First, freeze the target definition, horizon and label availability. Train a probabilistic baseline on Z and measure held-out log loss by calendar week. Then add X and measure the reduction. This estimates operationally relevant conditional code gain, not an unrestricted representation score. Split by time and by stable entity where possible so that repeated cases, templates or customer identifiers cannot leak across the boundary.

Next, run controls. Permute X within appropriate strata. Replace it with request ID. Mask obvious target leakage. Compare a compact vocabulary, a learned embedding and a deliberately lossy summary. If the flexible representation wins only on random row splits, the result is evidence about memorisation or temporal leakage. If it shortens the target code on later weeks and unfamiliar entities, the dependence has survived one meaningful shift.

Finally, translate probability improvement into action. The routing policy may have only two staffing levels and a hard review threshold. A signal can reduce log loss while changing no routing decision. Another can affect a tiny high-loss tail despite modest average information. The release decision therefore uses both code gain and expected consequence.

Time is part of the information contract

Production labels mature after actions occur. A specialist-review label may arrive hours later, be corrected after investigation or remain unknown when a case is abandoned. A signal can also be logged after the decision it supposedly predicted. The evaluation manifest must therefore record event time, evidence-available time, decision time and label-finalisation time. Otherwise a future fact can leak backwards and create impressive code savings that no live system could realise.

The same discipline governs drift. Store the baseline and conditional code lengths by decision cohort, not only as one cumulative average. A rising baseline loss means the target distribution or existing model has changed. A stable baseline with collapsing conditional gain means the proposed signal has lost its incremental relation. Both conditions can trigger withdrawal, but they diagnose different failures. The fallback should reconstruct the decision using Z alone rather than substituting a stale narrative about what X used to mean.

Unknown outcomes need explicit treatment. Silently dropping unresolved cases changes the evaluated population, often in a way correlated with difficulty. Report their rate and reason. Where later labels arrive, replay the original decision with the evidence and model version available at that time. Information is valid at a decision moment, not merely somewhere in the completed record.

V(X|Z) = E[L(aZ,Y) − L(aX,Z,Y)] − Cacquire − Coperate

L is the declared loss of an action and realised target. aZ is the best permitted action using current context, while aX,Z may also use X. Acquisition and operating costs include latency, privacy, review and maintenance. Positive information does not guarantee positive V.

This formula also clarifies authority. A feature can improve a prediction while remaining unauthorised for a protected decision. It can arrive too late to change the action. It can increase operational fragility beyond its expected benefit. It can be informative about a proxy that policy forbids. Information theory prices predictive dependence. Governance decides whether that dependence may be used.

Figure 9. Signal admission crosses four evidence gates

A proposed signal moves through source, target, generalisation and consequence gates A flowing path begins with a high-entropy signal and passes four narrowing gates: representation contract, conditional target code gain, held-out controls, and decision value with authority. Rejected branches leave at each gate. candidatesignal X 1 · sourcetype, time,provenance,cardinality 2 · targetI(X;Y|Z)or held-outlog-loss gain 3 · reusetime holdout,permutation,drift, tails 4 · consequenceloss, cost,authority,recovery untyped novelty sample artefact
A signal earns influence through a sequence, not one score. This is the paper’s practitioner synthesis. The gates are a release method, not a published empirical result. Rejection can mean redesign, further evidence or a deliberate decision not to collect the signal.

The information admission record

The following instrument makes the hidden choices reviewable. It should accompany any claim that a feature, representation, alert or retrieval result is “informative”.

1. Target and horizonName Y, its population, boundary, observation time and prediction horizon. State who can act on it.
2. Baseline codeRecord the current context Z, probability model, test split and baseline held-out log loss.
3. Signal contractSpecify X, provenance, cardinality, missingness, acquisition timing, permitted transformations and privacy class.
4. Incremental savingMeasure I(X;Y|Z) when estimable, or out-of-sample target code gain under a declared conditional model.
5. Negative controlsUse permutation, unique identifiers, leaked labels, random features and simpler baselines to expose estimator optimism.
6. Stability surfaceReport uncertainty and results by time, entity, subgroup, operating regime and rare high-consequence stratum.
7. Decision translationCalculate expected loss reduction under available actions, thresholds, latency and human-review capacity.
8. Release and recoveryBind use to authority, monitoring, drift triggers, withdrawal conditions and a fallback that excludes the signal.
Decision rule

Reject “high entropy” and “high mutual information” as stand-alone release arguments. Require a declared target, an existing-context baseline, held-out code saving, at least one independence or leakage control, stability evidence and a positive decision-value calculation within the permitted authority boundary.

Read the admission result as a diagnosis

High signal entropy with zero held-out target gain means the source is varied but irrelevant under the tested target and context. Do not collect or retain it merely because it looks rich. Low signal entropy with stable positive gain can be valuable: a rare deterministic flag may remove exactly the uncertainty that matters. Complexity is not a prerequisite for usefulness.

Positive training information with zero or negative held-out gain points first to leakage, memorisation, sparse estimation or shift. Freeze deployment and inspect the split before changing the model. Stable code gain with zero decision value means the signal improves probability estimates without altering any permitted action enough to repay its costs. It may still support forecasting or monitoring, but it has not justified decision influence.

Positive decision value with an authority failure is not a technical pass. Route the signal to an authorised reviewer or redesign the action boundary. Positive average value with a harmed subgroup or catastrophic tail also remains blocked until the loss and constraint model reflects that consequence. The instrument is useful because each failure suggests a different remedy rather than compressing every outcome into “informative” or “not informative”.

Executable mutual-information lab

Enter a binary joint table. Rows are X=0/1 and columns are Y=0/1. The lab calculates marginal surprise, entropy, conditional entropy, mutual information and total ideal target-code saving. All cases are synthetic.

Cases N10,000
P(X=1)1.000%
Surprisal X=16.644 bits
H(X)0.081 bits
H(Y)0.469 bits
H(Y|X)0.443 bits
I(X;Y)0.0259 bits
Saved target bits258.9 bits
PMI at X=1,Y=13.170 bits

The alarm is rare and dependent: it shortens the expected target code, though most cases still receive no alarm.

The browser lab exposes exact discrete logic. The companion Python programme adds a seeded train/test experiment with a useful sensor, an equally entropic shuffled control and the unique-identifier trap. It uses no external packages and fails its assertions if controls begin to look reusable or predictive features lose held-out code gain.

Python · central audit pattern
gain_bits = baseline_test_log_loss_bits - conditional_test_log_loss_bits

assert rare_precursor_gain > 0.015       # positive case
assert abs(rare_random_gain) < 0.005     # independence control
assert session_id_train_mi > 0.40        # memorisation appears strong
assert session_id_test_gain == 0.0       # but cannot price unseen IDs

release = (
    gain_bits > declared_minimum
    and permutation_gain <= 0.0
    and stable_across_time
    and expected_decision_value > 0.0
)

Run the embedded programme in this page. Expected output includes 6.644 bits of surprise for either one-per-cent alarm, zero mutual information for the independent table, 0.025890 bits for the precursor table, positive held-out gains for the precursor and common sensor, and zero held-out gain for the unique session identifier.

Optional depth: what a passing code-gain test does and does not prove

A positive held-out gain supports a bounded claim: under this target, data-generating regime, split, representation and conditional model, the signal improved probabilistic coding of later outcomes. It does not prove that X causes Y, that the feature is semantically legitimate, that the improvement survives a new regime, or that an action should use it.

A non-positive gain can mean genuine irrelevance, redundancy given Z, poor representation, insufficient sample size, a misspecified conditional model or shift between training and test. The right response is diagnosis, not automatic deletion. Test simpler models, larger samples, meaningful strata and alternate representations before concluding that the underlying phenomenon carries no target information.

Explicit failure boundary

Mutual information ceases to be a sufficient decision instrument when the target is ill-defined, the joint distribution shifts, estimator bias dominates, average gain hides asymmetric tail harm, available actions cannot exploit the gain, or policy forbids the dependence. It is symmetric and observational, so it does not establish causal direction. It also ignores identity, authority, fairness, recovery and the cost of acquiring the signal.

Glossary

Surprisal
The ideal code length −log2q(x) assigned to one observation by a stated model q.
Entropy
The expected self-information of a random variable under a specified distribution, commonly measured in bits.
Cross-entropy
The expected code length paid when data follow p but the code or predictor uses q.
KL divergence
The expected excess code length from using q rather than p, under suitable support conditions.
Mutual information
The expected reduction in the code length of one variable after observing another.
Pointwise mutual information
The local log likelihood ratio for one pair of outcomes relative to independence.
Conditional mutual information
The additional expected code saving from X about Y after existing context Z is known.
Min-entropy
A worst-case unpredictability measure determined by the most likely outcome, often used in cryptographic entropy assessment.

References

  1. Primary foundation. Claude E. Shannon, “A Mathematical Theory of Communication”, Bell System Technical Journal, 1948. Used for entropy, conditional entropy and the operational source-coding interpretation.
  2. Primary coding method. David A. Huffman, “A Method for the Construction of Minimum-Redundancy Codes”, Proceedings of the IRE, 1952.
  3. Primary information measure. Solomon Kullback and Richard A. Leibler, “On Information and Sufficiency”, Annals of Mathematical Statistics, 1951.
  4. Primary model-selection account. Jorma Rissanen, “Modeling by Shortest Data Description”, Automatica, 1978.
  5. Primary relevance framework. Naftali Tishby, Fernando C. Pereira and William Bialek, “The Information Bottleneck Method”, 2000.
  6. Authoritative statistical account. Tilmann Gneiting and Adrian E. Raftery, “Strictly Proper Scoring Rules, Prediction, and Estimation”, Journal of the American Statistical Association, 2007.
  7. Primary feature-selection synthesis. Gavin Brown, Adam Pocock, Ming-Jie Zhao and Mikel Luján, “Conditional Likelihood Maximisation: A Unifying Framework for Information Theoretic Feature Selection”, JMLR, 2012.
  8. Primary estimation analysis. Liam Paninski, “Estimation of Entropy and Mutual Information”, Neural Computation, 2003.
  9. Primary competing conception. A. N. Kolmogorov, “Three Approaches to the Quantitative Definition of Information”, 1965.
  10. Official security specification. NIST, SP 800-90B: Recommendation for the Entropy Sources Used for Random Bit Generation. Used only for the distinct cryptographic role of min-entropy and entropy-source validation.
  11. Primary limitation and method comparison. Ben Poole and colleagues, “On Variational Bounds of Mutual Information”, ICML 2019.
  12. Primary formal limitation. David McAllester and Karl Stratos, “Formal Limitations on the Measurement of Mutual Information”, AISTATS 2020.
How the claim changes under pressureChart · state
stateDiagram-v2
  [*] --> Claim
  state "Change dependence, hold rarity<br/>fixed" as Claim
  state "Change the model, hold the<br/>event fixed" as Test
  state "Three different questions<br/>called entropy" as Revision
  Claim --> Test: expose mechanism
  Test --> Decision: evidence survives
  Test --> Revision: rival survives
  Revision --> Claim: narrow or rebuild
  Decision --> [*]
The revision loop begins with Change dependence, hold rarity fixed and keeps counterexamples inside the reasoning path. Reading use: follow the relation, then test it against the surrounding evidence and limits.

The decision this changes

When a dashboard, model card or research result calls a signal “high-information”, ask which code became shorter. If the answer is only the code for the signal itself, the claim concerns surprise or entropy. If the answer names a target, existing context and tested conditional model, the claim may concern useful dependence. If no held-out code becomes shorter, the apparent information may be leakage, memorisation or estimator noise.

The changed architecture decision is to replace novelty-first signal admission with target-code admission. Define the outcome and horizon, establish the baseline code, measure incremental savings outside the fitting sample, challenge the result with controls, then translate the surviving gain into loss reduction and permitted action. Store those results with the feature contract so that drift or model change can withdraw influence rather than leave yesterday’s surprise score in control.

Entropy remains fundamental because it prices uncertainty and sets a compression limit. Mutual information remains powerful because it turns dependence into expected code saving. Their discipline lies in what they refuse to say. A rare message may be noise. A compressible stream may be meaningless. A predictive feature may be unusable. Information becomes operationally useful only after the target, model, evidence boundary and consequence are all explicit.