This Information Theory concept is the current idea: keep the same invariant visible across Intuition, Math, Code, Interactive Demo.
Information Theory
Entropy, Mutual Information, and the Information Bottleneck
Entropy measures uncertainty, mutual information measures dependence in a joint table, and the information bottleneck asks which compressed representation keeps the information that matters.
Concept Structure
Entropy, Mutual Information, and the Information Bottleneck
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learner Contract
What this page should let you do.
2 prerequisites listed; refresh them before leaning on the math or code.
Explain the mechanism, trace the main notation, and test one prediction in the live demo.
Read the intuition before the notation; the math should name a mechanism you already felt.
Follow this edge after making one prediction here; the next page should reuse the result, not restart the route.
Claim/source review status
Substantive review recorded
1/1 claims have bounded review metadata; still check caveats and source scope.Metadata-derived; review may be AI-assisted. Not a human certification.01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
Start with two random variables:
- : what you observe, such as an input pattern, token context, image patch, or hidden state.
- : what you care about predicting, such as a label, next token, class, or downstream fact.
Entropy asks how uncertain one variable is by itself. If can land in many plausible states, is large. If one state dominates, is small.
Mutual information asks a different question: how much does knowing one variable reduce uncertainty about the other? If and move independently, observing does not help with , so . If some states of strongly tilt the distribution of , then is positive.
The information bottleneck adds a representation question. Suppose you do not want to keep all of . You choose a compressed variable made from . A useful should throw away nuisance detail while keeping information about .
So the tension is:
This is a useful lens for representation learning, but it is not a magic explanation of every neural network. In real continuous high-dimensional models, mutual information can be hard to estimate and can depend on the stochastic encoder, noise model, and estimator. This page stays with the finite table where every quantity can be computed exactly.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Let and be finite discrete random variables with joint distribution
The marginals are
Using base-2 logarithms, entropy is measured in bits:
The convention is that terms with contribute , because .
Conditional entropy measures the uncertainty left in after observing :
Mutual information is the uncertainty reduction:
Equivalently, it is the KL divergence between the true joint table and the independent table formed from the marginals:
That identity is the operational test for dependence. If everywhere, the log ratio is and . If the joint table differs from independence, mutual information is positive.
Now introduce a representation produced from . In the most general discrete form, an encoder defines
The bottleneck objective can be written as a tradeoff:
where controls how much we punish complexity. The relevance term says how much the representation keeps about the target. The complexity term says how much detail about the original input survived.
In the deterministic merge used in the demo, , so and
That makes the tradeoff visible without estimators. A merge can reduce , but because is computed from , it cannot create new information about :
The best bottleneck is therefore not always the representation with maximum relevance and not always the smallest representation. It depends on the penalty and on which distinctions in matter for .
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
joint = np.array([[0.20, 0.10],
[0.15, 0.35],
[0.05, 0.15]])
def entropy(p):
p = np.asarray(p, dtype=float)
p = p[p > 0]
return float(-(p * np.log2(p)).sum())
def mutual_information(table):
table = np.asarray(table, dtype=float)
px = table.sum(axis=1, keepdims=True)
py = table.sum(axis=0, keepdims=True)
independent = px @ py
mask = table > 0
return float((table[mask] * np.log2(table[mask] / independent[mask])).sum())
def compress(groups):
return np.array([joint[group].sum(axis=0) for group in groups])
mappings = {
"keep all X states": [[0], [1], [2]],
"merge X1 and X2": [[0], [1, 2]],
"collapse all": [[0, 1, 2]],
}
print("H(X)", round(entropy(joint.sum(axis=1)), 3))
print("H(Y)", round(entropy(joint.sum(axis=0)), 3))
print("I(X;Y)", round(mutual_information(joint), 3))
lam = 0.10
for name, groups in mappings.items():
t_y = compress(groups)
complexity = entropy(t_y.sum(axis=1)) # I(X;T) for deterministic T=g(X)
relevance = mutual_information(t_y) # I(T;Y)
score = relevance - lam * complexity
print(name, round(complexity, 3), round(relevance, 3), round(score, 3))
The same joint table drives all three quantities. Entropy reads the marginals. Mutual information compares the joint table to the independent product table. The bottleneck step merges rows of and checks what target information survives.
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
The lab gives you a joint distribution and three compression penalties.
First inspect the table. Then choose which representation should win under the current score:
After you commit, the table reveals the complexity, relevance, conditional uncertainty, and score for every merge. Use the low-penalty and high-penalty settings to see the bottleneck move from "keep the target signal" toward "compress aggressively."
Live Concept Demo
Explore Entropy, Mutual Information, and the Information Bottleneck
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Entropy, Mutual Information, and the Information Bottleneck should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Entropy measures uncertainty, mutual information measures dependence in a joint table, and the information bottleneck asks which compressed representation keeps the information that matters.
Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Entropy, Mutual Information, and the Information Bottleneck should make visible.
Visual Inquiry
Make the image answer a mathematical question
Entropy measures uncertainty, mutual information measures dependence in a joint table, and the information bottleneck asks which compressed representation keeps the information that matters.
Which visible object should carry the first intuition?
Pick the cue that should make Entropy, Mutual Information, and the Information Bottleneck easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Grounds entropy, KL divergence, cross-entropy, and the information-theory notation used in deep learning.
Open sourceGrounds entropy, joint entropy, conditional entropy, and mutual information identities for ML learners.
Open sourceBenchmark curriculum source for probability, information, and representation-learning prerequisites.
Open sourceIntroduces the information bottleneck objective: compress X while preserving information about a relevant variable Y.
Open sourceModern neural variational bottleneck reference; useful for caveats about estimators and learned stochastic encoders.
Open sourceClaim Review
Entropy measures uncertainty, mutual information measures dependence in a joint table, and the information bottleneck asks which compressed representation keeps the information that matters.
Claims without a substantive review badge still need exact source-support review.
goodfellow-2016-deep-learning, d2l-2026-information-theory, murphy-2022-probml, tishby-1999-information-bottleneck, alemi-2017-deep-variational-information-bottleneck
Use equations, runnable code, and demos to check whether the source support is operational.
The sources support the finite entropy and mutual-information formulas, the KL interpretation of dependence, and the bottleneck objective as a compression-relevance tradeoff.
Sources: Deep Learning, Dive into Deep Learning: Information Theory, Probabilistic Machine Learning: An Introduction, The Information Bottleneck Method, Deep Variational Information BottleneckThis concept does not claim that information bottleneck universally explains all deep neural networks. The demo uses finite discrete variables and deterministic merges, not continuous neural activations or difficult mutual-information estimation.A bounded review summary is present; still check caveats and exact reference scope.Checked Goodfellow Ch.3 and D2L information-theory appendix for entropy, conditional entropy, KL, cross-entropy, and mutual-information identities; checked Tishby, Pereira, and Bialek for the compression/relevance variational framing; checked Alemi et al. for the neural variational bottleneck context and caveat that high-dimensional learned bottlenecks are estimator- and modeling-dependent. The local page restricts the interactive contract to finite discrete tables and deterministic merges.
Reviewer: codex-local-source-audit; reviewed 2026-07-02Source support candidates
book 2016Deep LearningGrounds entropy, KL divergence, cross-entropy, and the information-theory notation used in deep learning.
book 2026Dive into Deep Learning: Information TheoryGrounds entropy, joint entropy, conditional entropy, and mutual information identities for ML learners.
book 2022Probabilistic Machine Learning: An IntroductionBenchmark curriculum source for probability, information, and representation-learning prerequisites.
paper 1999The Information Bottleneck MethodIntroduces the information bottleneck objective: compress X while preserving information about a relevant variable Y.
Practice Loop
Try the idea before it explains itself
Entropy measures uncertainty, mutual information measures dependence in a joint table, and the information bottleneck asks which compressed representation keeps the information that matters.
Before touching the demo, predict one visible change that should happen in Entropy, Mutual Information, and the Information Bottleneck.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to a claim, equation, code, or demo
Pick the concept, equation, source, runnable code, claim, misconception, or demo state before asking for help. The handoff keeps that page item in context.Open the draft below to save one note and next action in this browser.
Entropy, Mutual Information, and the Information Bottleneck
What is the smallest example that makes Entropy, Mutual Information, and the Information Bottleneck click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays in this browser, attached to the selected learning item.
- References to inspect: attached references on this page.
- Definition, prerequisite, and contrast concept links
- The equation or runnable code that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Entropy, Mutual Information, and the Information Bottleneck Selected item key: recorded for copy. Context: Information Theory Page anchor: recorded for copy. Open question: What is the smallest example that makes Entropy, Mutual Information, and the Information Bottleneck click without losing the math? Evidence to inspect: - References to inspect: attached references on this page. - Definition, prerequisite, and contrast concept links - The equation or runnable code that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/information-theory/entropy-mutual-information-information-bottleneck
concept:information-theory/entropy-mutual-information-information-bottleneck