Module contents
Lesson 19 of 19Research 120 min

The information bottleneck

Extract from X only what is relevant to Y by minimizing I(X;T) − β I(T;Y). Derive self-consistent equations and iterative annealing, connect rate–distortion and minimal sufficiency, study neural VIB and critically evaluate the information plane and compression hypothesis in deep learning.

After this lesson you can

  • Formulate the information bottleneck Lagrangian and derive its self-consistent equations.
  • Implement the iterative algorithm with β annealing and plot information curves and phase transitions.
  • Derive the VIB bounds and train a VIB in PyTorch.
  • Critically analyze why deterministic-network mutual information is infinite or trivial and how binning creates artifacts.
  • Place the information bottleneck in self-supervision, generalization and minimal sufficient representations.

Before you start

Motivation: representations that forget what is irrelevant

A good representation does not preserve the most; it preserves what matters. A digit classifier need not know stroke thickness or tilt; a system grouping words by topic need not distinguish “goal” from “goalkeeper”; a chess agent need not know the screen colors of pieces. In each case an observed variable XX (image, word, pixel) and a variable YY defining relevance (class, topic, position value) lead us to seek a representation TT of XX that is small yet informative about YY.

Classical statistics names the exact version. A statistic T=t(X)T = t(X) is sufficient for YY if XX adds nothing about YY once TT is known: Y−T−XY - T - X is a Markov chain. By the data processing inequality, this is equivalent to I(T;Y)=I(X;Y)I(T;Y) = I(X;Y): not one bit of mutual information is lost. It is minimal sufficient if it is also a function of every other sufficient statistic: it compresses most without loss.

The problem is that exact minimal sufficient statistics are almost never small. For independent samples from a parametric family, the Pitman–Koopman–Darmois theorem says that, if support does not depend on the parameter, only exponential families admit fixed-dimensional sufficient statistics as sample size grows. Outside these, the minimal sufficient representation grows with data. The natural way out is to relax the requirement: accept losing a little I(X;Y)I(X;Y) in exchange for substantial compression. That is Tishby, Pereira and Bialek’s (1999) information bottleneck: an approximately minimal sufficient statistic, with a parameter setting how many compression bits each relevance bit is worth.

The idea has had three lives. As a clustering method (words by topic, documents, genes, neurons), with an elegant iterative algorithm and phase transitions. As a trainable objective for neural networks, the variational information bottleneck, a close relative of the VAE. And as a deep learning theory, the hypothesis that networks first fit and then compress, which sparked an instructive debate about how (not) to measure information. This lesson covers all three with appropriate rigor and critical distance.

Throughout, log⁡\log is base 2 in figures and natural in derivatives. This makes no difference: changing base multiplies both informations in the Lagrangian by the same constant, leaving the optimum and β\beta (compression bits per relevance bit) unchanged.

The bottleneck problem

Start with a known joint distribution p(x,y)p(x, y), initially with discrete XX and YY. A representation is a stochastic encoder p(t∣x)p(t \given x): for each xx, a distribution over representation alphabet T\mathcal{T}. Since TT is built only from XX, the Markov chain T−X−YT - X - Y holds, and everything else follows from the joint and encoder:

p(t)=∑xp(x) p(t∣x),p(y∣t)=1p(t)∑xp(x,y) p(t∣x).p(t) = \sum_x p(x)\,p(t \given x), \qquad p(y \given t) = \frac{1}{p(t)} \sum_x p(x, y)\,p(t \given x).

The structure is that of rate–distortion theory: I(X;T)I(X;T) is the encoder rate, and what was a hand-chosen distortion there is information lost about YY here. Basic curve properties follow readily.

Proof

(1) Data processing applied to T−X−YT - X - Y gives I(T;Y)≤I(X;Y)I(T;Y) \le I(X;Y), and applied to Y−X−TY - X - T (the same chain reversed), I(T;Y)≤I(T;X)I(T;Y) \le I(T;X). (2) With I(X;T)=0I(X;T) = 0, TT is independent of XX and, by (1), YY. With T=XT = X (possible if R≥H(X)=I(X;X)R \ge H(X) = I(X;X)), I(X;Y)I(X;Y) is attained, the maximum by (1). (3) Monotonicity follows from constrained maximization. For concavity, take encoders with (R1,I1)(R_1, I_1) and (R2,I2)(R_2, I_2), an independent coin JJ with P(J=1)=λ\Pr(J = 1) = \lambda, and the encoder emitting T=(J,TJ)T = (J, T_J). Since JJ is independent of XX and YY, the chain rule gives I(X;T)=I(X;J)+I(X;TJ∣J)=λR1+(1−λ)R2I(X;T) = I(X;J) + I(X;T_J \given J) = \lambda R_1 + (1 - \lambda) R_2, and similarly for YY. The achievable set is convex and its upper boundary concave. (4) By (1), Lβ≥I(X;T)−βI(X;T)=(1−β)I(X;T)≥0\mathcal{L}_\beta \ge I(X;T) - \beta I(X;T) = (1 - \beta) I(X;T) \ge 0, while the trivial encoder gives 00.

∎

As in rate–distortion, the multiplier has a geometric interpretation: the optimum for given β\beta is where a line of slope 1/β1/\beta touches the concave curve from above (the rate–distortion Lagrangian reads similarly). At small β\beta the line is steep and touches the origin; as β\beta grows it flattens and the contact point moves right. Point (1) and concavity say the curve never has slope above 1, so for β≤1\beta \le 1 contact is always at the origin: point (4) in the plane. The actual threshold is above 1 and has an exact expression.

Before deriving anything, see what the algorithm built next does. With ∣Y∣=3\abs{\mathcal{Y}} = 3, each p(y∣x)p(y \given x) is a point in a triangle, and the bottleneck solution appears as a few centroids p(y∣t)p(y \given t) attracting points.

InteractiveThe bottleneck curve
Each point is an xx in the p(y∣x)p(y \mid x) simplex; rings are centroids p(y∣t)p(y \mid t)
p(y)
Information curve traced by annealing
I(X;Y)
Distinct clusters versus β\beta and predicted threshold 1/ρm21/\rho_m^2
1248β = 1β = 10β = 100
  • information curve (annealing)
  • current solution and line of slope 1/β1/\beta
  • bounds I(T;Y)≤I(X;T)I(T;Y) \le I(X;T) and I(T;Y)≤I(X;Y)I(T;Y) \le I(X;Y); threshold 1/ρm21/\rho_m^2
0.50
β = 0.50
I(X;T)I(X;T)…
I(T;Y)I(T;Y)…
I(X;Y)I(X;Y), the ceiling0.454 bits
Lagrangian I(X;T)−βI(T;Y)I(X;T) - \beta I(T;Y)…
Distinct clusters…
Predicted threshold 1/ρm21/\rho_m^22.51
First observed split…
Eight xx values, each with distribution p(y∣x)p(y \mid x) over three labels: a point in the triangle, sized by p(x)p(x). Rings are centroids p(y∣t)p(y \mid t) found by the iterative annealing algorithm (up to eight clusters), and segments connect each xx to its most probable cluster. Initial β=4\beta = 4; set β\beta to its minimum, 0.50.5, and play: below dashed threshold 1/ρm21/\rho_m^2 all centroids lie at p(y)p(y) and TT knows nothing; crossing it splits the single cluster, and each new split is an elbow in the information curve on the right. The magenta line has slope 1/β1/\beta and touches the curve at the current solution. Drag points: what happens to the threshold if you bring them together at the center? If you separate two in the same group?

Three observations the rest of the lesson turns into theorems. In the initial example, nothing happens until β≈2.5\beta \approx 2.5, well above trivial limit β=1\beta = 1; this number comes from a singular-value decomposition of the joint. Splits are abrupt: the cluster count jumps and the curve has elbows, like a phase transition. And the solution at large β\beta is no longer soft: each xx goes with probability nearly 1 to a cluster, that of its nearest centroid in a specific sense, KL divergence.

Self-consistent equations

Everything rests on an identity rewriting lost relevance as mean distortion.

Proof

By the chain rule applied to I(X,T;Y)I(X, T; Y) in two ways, I(T;Y)+I(X;Y∣T)=I(X;Y)+I(T;Y∣X)I(T;Y) + I(X;Y \given T) = I(X;Y) + I(T;Y \given X). The Markov chain gives I(T;Y∣X)=0I(T;Y \given X) = 0, so I(X;Y)−I(T;Y)=I(X;Y∣T)I(X;Y) - I(T;Y) = I(X;Y \given T), a conditional mutual information. By definition, I(X;Y∣T)=Ep(x,t)KL⁡(p(y∣x,t) ∥ p(y∣t))I(X;Y \given T) = \E_{p(x,t)} \KL\big(p(y \given x, t)\,\|\,p(y \given t)\big), and again by the Markov chain, p(y∣x,t)=p(y∣x)p(y \given x, t) = p(y \given x).

∎

Using this identity, the Lagrangian becomes

Lβ=I(X;T)+β Ep(x,t)[dIB(x,t)]−β I(X;Y),dIB(x,t)=KL⁡(p(y∣x) ∥ p(y∣t)).\mathcal{L}_\beta = I(X;T) + \beta\,\E_{p(x,t)}\big[d_{\text{IB}}(x, t)\big] - \beta\,I(X;Y), \qquad d_{\text{IB}}(x, t) = \KL\big(p(y \given x)\,\|\,p(y \given t)\big).

The last term is constant. What remains is exactly the rate–distortion Lagrangian, with distortion measuring how wrong centroid p(y∣t)p(y \given t) is as a substitute for p(y∣x)p(y \given x), in nats. One difference changes everything: in rate–distortion the distortion is fixed, while here p(y∣t)p(y \given t) depends on the encoder itself. The reproduction alphabet is not given; it is chosen alongside assignment. Thus the problem ceases to be convex and local optima appear.

The derivation uses Lagrange multipliers with one normalization constraint per xx, worked through in the first proof exercise. The important part is the shape: a Gibbs distribution over clusters with prior p(t)p(t), energy dIB(x,t)d_{\text{IB}}(x, t) and inverse temperature β\beta. Both limits follow directly:

  • β→0\beta \to 0: the exponential is 1 and p(t∣x)=p(t)p(t \given x) = p(t). The representation ignores XX.
  • β→∞\beta \to \infty: mass concentrates on tt minimizing dIB(x,t)d_{\text{IB}}(x, t). The encoder is a hard partition of X\mathcal{X} assigning each xx to its nearest centroid in KL; this is k-means on the simplex with KL as distance and weights p(x)p(x). With at least as many clusters as distinct p(y∣x)p(y \given x) distributions, lost relevance can vanish, and for large finite β\beta the compression term breaks ties by merging xx with identical p(y∣x)p(y \given x): the optimum approaches the motivational minimal sufficient statistic x↦p(⋅∣x)x \mapsto p(\cdot \given x). With fewer clusters the optimum is the best partition that fits. This underlies hard clustering methods such as Slonim and Tishby’s agglomerative method for words and documents.

The equations are implicit: the right side depends on p(t)p(t) and p(y∣t)p(y \given t), which themselves depend on p(t∣x)p(t \given x). This suggests iteration.

Iterative algorithm and annealing

This has the structure of Blahut–Arimoto with one extra step (centroids). Convergence is proved likewise: viewing each step as exact minimization of a functional over a block of variables.

Proof

(1) ExKL⁡(p(t∣x) ∥ r)=I(X;T)+KL⁡(p(t) ∥ r)\E_x \KL(p(t \given x)\,\|\,r) = I(X;T) + \KL(p(t)\,\|\,r), verified by adding and subtracting log⁡p(t)\log p(t); the second term is ≥0\ge 0 and vanishes at r=p(t)r = p(t) by Gibbs’ inequality. (2) For each tt, ∑xp(x∣t)KL⁡(p(y∣x) ∥ q)=∑xp(x∣t)KL⁡(p(y∣x) ∥ p(y∣t))+KL⁡(p(y∣t) ∥ q)\sum_x p(x \given t) \KL(p(y \given x)\,\|\,q) = \sum_x p(x \given t)\KL(p(y \given x)\,\|\,p(y \given t)) + \KL(p(y \given t)\,\|\,q), the same identity with yy in place of tt. (3) For each xx, the part of FF depending on p(⋅∣x)p(\cdot \given x) is ∑tp(t∣x)[log⁡p(t∣x)r(t)+β KL⁡(p(y∣x) ∥ q(y∣t))]\sum_t p(t \given x)\big[\log\frac{p(t \given x)}{r(t)} + \beta\,\KL(p(y \given x)\,\|\,q(y \given t))\big], minimized by the indicated Gibbs distribution by the Gibbs variational principle. (4) Substitute: the first term is I(X;T)I(X;T) by (1) and the second β(I(X;Y)−I(T;Y))\beta(I(X;Y) - I(T;Y)) by the lost relevance identity. An iteration applies (2) and (1) (the first two steps), then (3); none increases FF, and after the first two steps FF equals Lβ+βI(X;Y)\mathcal{L}_\beta + \beta I(X;Y). The sequence is monotone and bounded below by −βI(X;Y)-\beta I(X;Y).

∎

The guarantee is descent, not a global optimum: FF is convex in each block separately but not all three jointly, like k-means. In practice use deterministic annealing (Rose 1998): start with small β\beta, where only the trivial solution exists, and raise β\beta gradually, each time starting from the previous solution with a tiny perturbation. While stable, the perturbation disappears; once unstable, it grows and the cluster splits. This follows the solution branch continuously and reveals bifurcations, as in the first interactive.

When does the first cluster split?

Proof

(1) By definition of s∗s^*, Lβ≥I(X;T)(1−βs∗)≥0\mathcal{L}_\beta \ge I(X;T)(1 - \beta s^*) \ge 0. (2) Perturb the trivial solution: p(t∣x)=p(t) (1+ε ht(x))p(t \given x) = p(t)\,(1 + \eps\,h_t(x)), with ∑tp(t)ht(x)=0\sum_t p(t) h_t(x) = 0 (normalization) and E[ht(X)]=0\E[h_t(X)] = 0 (so p(t)p(t) does not change). With (1+u)ln⁡(1+u)=u+u2/2+O(u3)(1 + u)\ln(1 + u) = u + u^2/2 + \bigO(u^3) and the first condition, the linear term cancels and

I(X;T)=ε22∑tp(t) E[ht(X)2]+O(ε3).I(X;T) = \frac{\eps^2}{2}\sum_t p(t)\,\E\big[h_t(X)^2\big] + \bigO(\eps^3).

Also p(t∣y)=∑xp(x∣y) p(t∣x)=p(t)(1+ε E[ht(X)∣Y=y])p(t \given y) = \sum_x p(x \given y)\,p(t \given x) = p(t)\big(1 + \eps\,\E[h_t(X) \given Y = y]\big), so I(T;Y)=ε22∑tp(t) E[E[ht(X)∣Y]2]+O(ε3)I(T;Y) = \frac{\eps^2}{2}\sum_t p(t)\,\E\big[\E[h_t(X) \given Y]^2\big] + \bigO(\eps^3). The Lagrangian falls below 0 for some hh iff β E[E[h(X)∣Y]2]>E[h(X)2]\beta\,\E[\E[h(X) \given Y]^2] > \E[h(X)^2] for some centered hh. The supremum of this ratio is the squared norm of the conditional-expectation operator on centered functions, ρm2\rho_m^2 (the optimal gg in the definition is g∝E[h∣Y]g \propto \E[h \given Y]). In the discrete case, writing hh in the p(x)\sqrt{p(x)} basis makes that operator Q⊤Q\T restricted to the complement of p(x)\sqrt{p(x)}, and its norm the second singular value of QQ (singular value decomposition). Finally, ρm2≤s∗\rho_m^2 \le s^* because the limit of these perturbations is a family of TT with ratio I(T;Y)/I(X;T)→ρm2I(T;Y)/I(X;T) \to \rho_m^2.

∎

In the initial interactive example, 1/ρm2=2.511/\rho_m^2 = 2.51 and, estimating s∗s^* numerically, 1/s∗=2.451/s^* = 2.45: a narrow window exists where the global optimum is already nontrivial but the trivial solution remains stable, so annealing arrives “late.” For some joints, such as doubly symmetric binary (uniform XX through a binary symmetric channel) or Gaussian, s∗=ρm2s^* = \rho_m^2 and the thresholds coincide. Above the first threshold, each cluster has its own, tied to correlation of the joint restricted to its xx values, resulting in cascading bifurcations (general analysis with symmetric bifurcation theory appears in Gedeon, Parker and Dimitrov, 2012).

Deterministic information bottleneck

Strouse and Schwab (2017) observed that I(X;T)I(X;T) is not always the right cost. If TT is transmitted or stored using a code, the cost is its entropy H(T)H(T), not its mutual information with XX. Since I(X;T)=H(T)−H(T∣X)I(X;T) = H(T) - H(T \given X), the general objective is

Lα=H(T)−α H(T∣X)−β I(T;Y),\mathcal{L}_{\alpha} = H(T) - \alpha\,H(T \given X) - \beta\,I(T;Y),

with α=1\alpha = 1 for the information bottleneck and α→0\alpha \to 0 for the deterministic information bottleneck, minimizing H(T)−βI(T;Y)H(T) - \beta I(T;Y). Repeating the derivation, the optimum satisfies p(t∣x)∝exp⁡(1α[log⁡p(t)−β KL⁡(p(y∣x) ∥ p(y∣t))])p(t \given x) \propto \exp\big(\tfrac{1}{\alpha}[\log p(t) - \beta\,\KL(p(y \given x)\,\|\,p(y \given t))]\big), and as α→0\alpha \to 0 the encoder is hard:

t∗(x)=arg max⁡t[log⁡p(t)−β KL⁡(p(y∣x) ∥ p(y∣t))].t^*(x) = \argmax_t \Big[\log p(t) - \beta\,\KL\big(p(y \given x)\,\|\,p(y \given t)\big)\Big].

The log⁡p(t)\log p(t) term rewards large clusters: the deterministic method produces fewer and more unequal clusters, and the algorithm is k-means with KL and a size bonus. If the representation is a code, this version makes sense.

The Gaussian case: canonical correlations

For continuous variables the problem rarely has a closed form. The exception, as usual, is the Gaussian. Chechik, Globerson, Tishby and Weiss (2005) solved the case where X∈RdxX \in \R^{d_x} and Y∈RdyY \in \R^{d_y} are centered jointly Gaussian with covariances Σx\mat{\Sigma}_x, Σy\mat{\Sigma}_y, Σxy\mat{\Sigma}_{xy} and Σx∣y=Σx−ΣxyΣy−1Σxy⊤\mat{\Sigma}_{x \given y} = \mat{\Sigma}_x - \mat{\Sigma}_{xy}\mat{\Sigma}_y\inv\mat{\Sigma}_{xy}\T.

The interpretation is clear. Solution directions are those of canonical correlation analysis (CCA) and activate one at a time: component ii enters when β\beta exceeds 1/ρi21/\rho_i^2. The first threshold, 1/ρ121/\rho_1^2, is 1/ρm21/\rho_m^2 from the previous theorem, since for Gaussians maximal correlation is the first canonical correlation. Directions with ρi=0\rho_i = 0 never enter. Information bottleneck adds to CCA how many bits to allocate to each direction, a rule resembling reverse water filling in Gaussian rate–distortion.

In one dimension everything is calculated by hand. With correlation ρ\rho and T=aX+ξT = aX + \xi, covariance of a Gaussian affine transformation gives I(X;T)=12ln⁡(1+a2σx2)I(X;T) = \tfrac12\ln(1 + a^2 \sigma_x^2) and Corr⁡(T,Y)2=ρ2 a2σx2/(1+a2σx2)\Corr(T, Y)^2 = \rho^2\,a^2\sigma_x^2/(1 + a^2\sigma_x^2). Eliminating aa,

IY(R)=−12ln⁡ ⁣(1−ρ2(1−e−2R))(en nats),I_Y(R) = -\tfrac12 \ln\!\big(1 - \rho^2 (1 - e^{-2R})\big) \quad \text{(en nats)},

a concave curve leaving the origin with slope ρ2\rho^2 and approaching I(X;Y)=−12ln⁡(1−ρ2)I(X;Y) = -\tfrac12\ln(1 - \rho^2). With nIn_I active components, the curve is, also in nats,

IY=IX−nI2ln⁡(∏i=1nI(1−λi)1/nI+e2IX/nI∏i=1nIλi1/nI),I_Y = I_X - \frac{n_I}{2}\ln\Big(\prod_{i=1}^{n_I}(1 - \lambda_i)^{1/n_I} + e^{2 I_X/n_I}\prod_{i=1}^{n_I}\lambda_i^{1/n_I}\Big),

made of pieces joining continuously at the βic\beta_i^c. A cell below checks this in a three-dimensional example.

Variational information bottleneck

For real data (images, text) those formulas do not work: XX lives in a huge space, p(x,y)p(x, y) is known only through samples, and the encoder is a network. Both informations require intractable marginals: I(X;T)I(X;T) needs p(t)=Ex p(t∣x)p(t) = \E_x\,p(t \given x) and I(T;Y)I(T;Y) needs p(y∣t)p(y \given t). Alemi, Fischer, Dillon and Murphy (2017) resolved this with two variational bounds, one per term. Write ZZ for the latent, as in VAEs.

The first is the Barber–Agakov bound seen among variational mutual information bounds, and the second the VAE’s variational rate bound; you prove them in the second proof exercise. Together they upper-bound the Lagrangian, Lβ≤E KL⁡(pθ(z∣x) ∥ r)−βH(Y)−β Elog⁡qϕ(y∣z)\mathcal{L}_\beta \le \E\,\KL(p_\theta(z \given x)\,\|\,r) - \beta H(Y) - \beta\,\E\log q_\phi(y \given z). Divide by β\beta and remove the constant, with γ=1/β\gamma = 1/\beta:

With a Gaussian encoder, the rate has the closed form of KL between Gaussians,

KL⁡(N(μ,diag⁡σ2) ∥ N(0,I))=12∑j=1K(μj2+σj2−1−ln⁡σj2),\KL\big(\Normal(\vb{\mu}, \diag\vb{\sigma}^2)\,\|\,\Normal(\vb{0}, \mat{I})\big) = \frac12\sum_{j=1}^{K}\big(\mu_j^2 + \sigma_j^2 - 1 - \ln\sigma_j^2\big),

and cross-entropy is estimated with one sample z=μθ(x)+σθ(x)⊙ε\vb{z} = \vb{\mu}_\theta(x) + \vb{\sigma}_\theta(x) \odot \vb{\eps}, ε∼N(0,I)\vb{\eps} \sim \Normal(\vb{0}, \mat{I}): the reparameterization gradient lets gradients flow through sampling. The rest is ordinary training with backpropagation and Adam.

The VAE connection is structural. A β-VAE minimizes reconstruction distortion of xx plus a rate; VIB minimizes prediction distortion of yy plus the same rate. VIB is a supervised VAE: same encoder, prior and KL, with a decoder predicting labels instead of reconstructing input. A VAE is the case where the relevant variable is XX itself.

InteractiveVIB: latent as β varies
Means μ(x)\mu(x) with γ=0.1\gamma = 0.1; circles: prior at 1 and 2 deviations
721041495906901597349665407401313472712117423512446355604195789374643070291732977627847361369314176960549921948739744492547679058566578101646731718202995515603446546545144723271818185089250111090316423611395294593903655722728473388792259872302957282685988030982252658200080330036530033866806866888888
Accuracy versus input noise
Variational information plane: H(Y)−CEH(Y) - \text{CE} versus rate RR (bits, log scale)
0.111010010000123H(Y)
  • selected VIB
  • other VIBs
  • deterministic MLP
0.1
Rate R=E KL⁡(p(z∣x) ∥ r(z))R = \E\,\KL(p(z \mid x)\,\|\,r(z))5.42 bits
H(Y)−CEH(Y) - \text{CE} (bound on I(Z;Y)I(Z;Y))1.92 bits
Test accuracy89.6 %
Accuracy with noise σ = 0.366.4 %
Mean σ\sigma / dispersion of means0.22
At γ=0.1\gamma = 0.1 rate drops to 5.4 bits: the latent contracts toward the prior, noise circles overlap and accuracy falls to 89.6%.
Seven VIBs trained on MNIST with a two-dimensional Gaussian latent for plotting; each number is mean μ(x)\mu(x) of a test digit, and its faint circle has radius σ(x)\sigma(x). Gray circles show one and two prior standard deviations. Start at γ=0.1\gamma = 0.1 and decrease to 10−410^{-4}: what happens to latent scale and noise? Then increase to 0.30.3 and 11. Right: accuracy when Gaussian noise is added to pixels (the dashed line is the same MLP without noise or KL), and the variational information plane: rate, an upper bound on I(X;Z)I(X;Z), versus H(Y)H(Y) minus cross-entropy, a lower bound on I(Z;Y)I(Z;Y).

The numbers tell the Lagrangian’s story. With γ=10−4\gamma = 10^{-4} rate is nearly free: the encoder separates means by tens of units and shrinks σ(x)\sigma(x); measured rate is 614 bits and accuracy 90.3 %. With γ=0.01\gamma = 0.01 clusters approach prior scale and noise becomes visible but does not mix them: 30 bits and 91.8 %. With γ=0.1\gamma = 0.1, 5.4 bits and 89.6 %; with γ=0.3\gamma = 0.3, 2.2 bits and 81.8 %. With γ=1\gamma = 1 the model collapses to the prior: 0.06 bits and 21 % accuracy. The last is point (4) of the curve properties: with β=1/γ≤1\beta = 1/\gamma \le 1 no representation pays off.

Two subtleties. First, rate is a bound and can be very loose. If XX is uniform over the 2000 test images, I(X;Z)≤log⁡22000≈11I(X;Z) \le \log_2 2000 \approx 11 bits, so almost all of the 614 bits measured with γ=10−4\gamma = 10^{-4} are the gap KL⁡(p(z) ∥ r(z))\KL(p(z)\,\|\,r(z)) between aggregated latent distribution and prior. At moderate γ\gamma, KL forces the aggregate toward the prior and tightens the bound. Second, robustness improves, but only slightly. With pixel noise of standard deviation 0.3, the best VIB achieves 71.4 % and the deterministic model 65.8 %. Alemi et al. found greater gains against adversarial examples with 256-dimensional latents; with a 2-dimensional latent and eight epochs, the advantage is modest. It is a regularizer, not a vaccine.

Information bottleneck in deep learning

In 2015, Tishby and Zaslavsky proposed viewing a deep network as the Markov chain Y−X−T1−T2−⋯−TL−Y^Y - X - T_1 - T_2 - \dots - T_L - \hat{Y}, where TℓT_\ell is layer ℓ\ell‘s activation, and evaluating each layer as a representation using the bottleneck’s two informations.

Shwartz-Ziv and Tishby (2017) trained hyperbolic-tangent networks on a synthetic 12-bit task, estimated both informations by binning each neuron into 30 intervals, and described two phases: a short fitting phase where layers gain information about XX and YY, and a long compression phase where I(X;Tℓ)I(X;T_\ell) decreases. They attributed compression to stochastic gradient noise dominating the mean gradient in the second phase, linked it to generalization and conjectured that layers converge to the information bottleneck curve. The proposal was influential and heavily criticized; the criticisms teach more than the hypothesis.

Saxe et al. (2018). Their reproduction showed three things. Compression depends on nonlinearity: it appears with saturating tanh, but not ReLU, which does not saturate above, using their added-noise estimator, and both networks generalize. It also appears with full-batch gradient descent without stochastic noise, so diffusion does not cause it. And in deep linear networks, where everything is exactly calculable, good generalization occurs without compression.

Kolchinsky, Tracey and Van Kuyk (2019). In classification, YY is often a deterministic function of XX. Then the information curve is trivial: IY(R)=min⁡(R,H(Y))I_Y(R) = \min(R, H(Y)), a line and a horizontal segment. The Lagrangian cannot traverse it (at β=1\beta = 1 every point ties; for β>1\beta > 1 the optimum is a function of YY with I(X;T)=H(Y)I(X;T) = H(Y)), and optimal representations are trivial transformations of the label. They proposed changing the functional to recover curve exploration.

Goldfeld et al. (2019). The underlying issue is definition. If XX is continuous and the network deterministic with strictly monotone nonlinearities such as tanh or sigmoid, Tℓ=fℓ(X)T_\ell = f_\ell(X) retains all information about XX and I(X;Tℓ)=∞I(X;T_\ell) = \infty. If XX is uniform over a finite set of nn examples and fℓf_\ell is injective on them (typical with generic weights), I(X;Tℓ)=log⁡nI(X;T_\ell) = \log n at all layers and epochs. Both planes are trivial; binning drew activation geometry, how many fall in the same bin. Goldfeld et al. proposed networks with injected Gaussian noise, where I(X;Tℓ)I(X;T_\ell) is finite and estimable, showing that compression, when present, coincides with clustering same-class representations.

InteractiveThe information plane and its artifacts
H(X) = 12H(Y) = I(X;Y)
  • layer 1 (10)
  • layer 2 (7)
  • layer 3 (5)
  • layer 4 (4)
  • layer 5 (3)
  • H(Y)H(Y): ceiling of I(T;Y)I(T;Y)
Activation
3000
epoch 3000
Epoch3000
Accuracy (training / test)98.5 % / 98.0 %
Layer 5: measured I(X;T)I(X;T)1.19 bits
Layer 5: measured I(T;Y)I(T;Y)0.892 bits
Compression measured so far (layer 5)4.36 bits
Layer 5 rises to its maximum then loses 4.4 bits: the “compression phase”. With tanh, activations saturate as weights grow and fall into fewer bins. Change the estimator and see how its size changes.
A 12-10-7-5-4-3-2 network trained on 80 % of 4096 inputs of a 12-bit task (inspired by Shwartz-Ziv and Tishby), with tanh or ReLU; informations are measured over all 4096. Each color is a hidden layer; the large dot is the current epoch. Start with tanh and 30 bins and play training: deeper layers rise and ‘compress’. Change the estimator (8 or 100 bins, noise 0.1 or 0.01) and see how much compression changes. Switch to ReLU with added noise: is there compression? Finally choose the exact value with ReLU: where are the five layers?

With tanh and 30 bins, the fifth layer rises to 5.55 bits at epoch 64 and falls to 1.19 bits at the end, while I(T;Y)I(T;Y) stabilizes at 0.89 bits: the classic picture. With 100 bins the same layer starts higher and compression changes scale; with ReLU and added noise, I(X;T)I(X;T) never falls. Exact ReLU values pin all five layers at (12,H(Y))(12, H(Y)) throughout training (apart from hundredths of a bit in early epochs from a few collisions): with 4096 equiprobable inputs and an injective network, I(X;Tℓ)=12I(X;T_\ell) = 12 bits always. With tanh, even exact counting “compresses” deep layers, because in float32 the hyperbolic tangent of a large number is exactly ±1\pm 1 and many inputs end up at the same vector: floating-point arithmetic discretizes. None of these compressions is a property of the learning problem; all belong to the network–measurement instrument pair.

Where does the debate stand? There is broad agreement on three points. A deterministic network’s information plane, estimated with binning or noise added after training, measures not network mutual information but an estimator-dependent geometric quantity. Compression as clustering of each class’s representations occurs in many networks but is not necessary for generalization. And information bottleneck remains useful as an objective (VIB and descendants) and as language for thinking about representations, its current use.

Frontier: self-supervision, generalization and usable information

Self-supervised learning. Multi-view methods (SimCLR, CPC, VICReg) have no labels: two versions V1V_1, V2V_2 of the same datum are obtained through augmentations. The bottleneck interpretation takes V2V_2 as relevant for V1V_1: a good representation Z1Z_1 is sufficient for V2V_2 (I(Z1;V2)=I(V1;V2)I(Z_1;V_2) = I(V_1;V_2)) and minimal (discarding what views do not share). Contrastive losses maximize a lower bound on I(Z1;Z2)I(Z_1;Z_2), the InfoNCE bound, while augmentations supply compression: what changes between views cannot be shared. Shwartz-Ziv and LeCun’s (2023) review organizes this literature and concludes with nuance: under the redundancy assumption (task information is shared between views), a minimal sufficient representation is optimal; when a task needs something augmentation destroys, compression hurts.

Generalization bounds. Kawaguchi, Deng, Ji and Huang (2023) proved generalization error bounds depending on a layer’s conditional information I(X;Z∣Y)I(X; Z \given Y), input information retained beyond the label, rather than parameter count; the bound grows as the square root of that quantity divided by sample count, up to logarithmic factors, with ZZ trained on those same examples. The authors state this precisely: controlling the bottleneck is one way to control generalization, neither the only nor a necessary one. In their experiments, generalization error correlates with that information across many architectures.

Usable information. A fundamental limitation of Shannon theory for representations is that it ignores computation: by data processing no layer can have more information about YY than the input, yet deep layers make information easier to use. Xu, Zhao, Song, Stewart and Ermon (2020) defined V\mathcal{V}-information, information extractable by a restricted predictor family V\mathcal{V} (for example linear predictors). Processing can create usable information, making “what does a layer do?” nontrivial. In a sense this bridges information bottleneck and the previous lesson’s minimum description length: both measure information relative to a model class.

How to read a paper measuring information inside a network

The lesson condenses into six questions to ask any paper measuring I(X;T)I(X;T) or I(T;Y)I(T;Y) with activation TT.

  1. What random variable is XX? The data distribution (continuous), uniform over training data (finite), or something in between? This determines whether the quantity is ∞\infty, log⁡n\log n, or meaningful.
  2. Is the network deterministic? If it is and XX is continuous, I(X;T)I(X;T) is infinite. Something else is measured, and the paper should say what.
  3. Which estimator, with which hyperparameters, and how much do conclusions change with them? Binning, neighbors and added noise have known biases (plug-in bias); a figure with one bin size is not evidence.
  4. Is it an estimate or a bound, and which way can it err? InfoNCE cannot exceed log⁡K\log K; VIB rate is an upper bound that can be extremely loose.
  5. Is the quantity invariant where it should be? Mutual information does not change under invertible transformations. If an invertible layer “compresses,” the estimator does it.
  6. Does the causal claim have an intervention behind it? Compression and generalization occurring together does not imply one causes the other; Saxe et al. separated them by changing only the nonlinearity.

Implementation from scratch

The first cell implements iterative annealing on a joint of words and topics: 32 words, 4 topics; 24 words specific to one topic, 4 shared by two and 4 neutral. It plots the information curve, compares the first threshold with 1/ρm21/\rho_m^2, detects transitions as peaks in dI(X;T)/dlog⁡β\mathrm{d}I(X;T)/\mathrm{d}\log\beta (the specific-heat analogue), and compares with k-means on p(y∣x)p(y \given x) rows, using Euclidean distance without weighting by p(x)p(x).

[ ]Iterative information bottleneck with annealingBrowser
import numpy as np
import matplotlib.pyplot as plt

rng = np.random.default_rng(0)
K, n = 4, 32                        # temas (Y) y palabras (X)
# 6 palabras propias de cada tema, 4 compartidas por parejas de temas y 4 neutras
perfiles = []
for k in range(K):
    for _ in range(6):
        a = np.full(K, 0.3); a[k] = 6.0
        perfiles.append(a)
for k in range(K):
    a = np.full(K, 0.3); a[k] = a[(k + 1) % K] = 3.0
    perfiles.append(a)
perfiles += [np.full(K, 4.0)] * 4
py_x = np.array([rng.dirichlet(a) for a in perfiles])     # p(y | x), una fila por palabra
px = rng.dirichlet(np.full(n, 2.0))                       # p(x)

def info_mutua(pab):
    pa, pb = pab.sum(1, keepdims=True), pab.sum(0, keepdims=True)
    m = pab > 0
    return float((pab[m] * np.log2(pab[m] / (pa @ pb)[m])).sum())

def kl_filas(P, Q):
    """KL(P_i || Q_j) en nats para todas las parejas de filas."""
    return (P * np.log(np.where(P > 0, P, 1))).sum(1)[:, None] - P @ np.log(np.maximum(Q, 1e-300)).T

def centroides(pt_x):
    pt = px @ pt_x                                                           # p(t)
    py_t = (px[:, None] * pt_x).T @ py_x / np.maximum(pt, 1e-300)[:, None]   # p(y | t), por Bayes
    return pt, py_t

def paso_ib(pt_x, beta):
    pt, py_t = centroides(pt_x)
    logits = np.log(np.maximum(pt, 1e-300)) - beta * kl_filas(py_x, py_t)
    logits -= logits.max(1, keepdims=True)                                   # estabilidad numérica
    nuevo = np.exp(logits)
    return nuevo / nuevo.sum(1, keepdims=True)

def curva(pt_x):
    pxt = px[:, None] * pt_x
    return info_mutua(pxt), info_mutua(pxt.T @ py_x)

# recocido: beta creciente, cada beta parte de la solución anterior con una perturbación pequeña
M, betas = 8, np.geomspace(0.8, 40, 80)
pt_x = np.full((n, M), 1 / M) * (1 + 1e-2 * rng.standard_normal((n, M)))
pt_x /= pt_x.sum(1, keepdims=True)
traza = []
for b in betas:
    pt_x = np.abs(pt_x * (1 + 1e-3 * rng.standard_normal(pt_x.shape)))
    pt_x /= pt_x.sum(1, keepdims=True)
    for _ in range(60):
        pt_x = paso_ib(pt_x, b)
    traza.append(curva(pt_x))
ix, iy = np.array(traza).T

Q = px[:, None] * py_x / np.sqrt(np.outer(px, px @ py_x))
rho2 = np.linalg.svd(Q, compute_uv=False)[1] ** 2
sus = np.gradient(ix, np.log(betas))                      # dI(X;T)/dlog(beta): picos en las transiciones
picos = [i for i in range(1, len(betas) - 1) if sus[i] > max(sus[i - 1], sus[i + 1]) and sus[i] > 0.3]
print(f"I(X;Y) = {info_mutua(px[:, None] * py_x):.3f} bits,  H(X) = {-(px * np.log2(px)).sum():.3f} bits")
print(f"umbral previsto 1/rho_m^2 = {1 / rho2:.3f};  primer beta con I(X;T) > 0.001: {betas[np.argmax(ix > 1e-3)]:.3f}")
print("transiciones (picos de dI(X;T)/dlog beta) en beta =", np.round(betas[picos], 2))

# k-means de Lloyd sobre las filas p(y|x): euclídeo y sin pesos p(x)
def kmeans(P, k, reps=10):
    mejor, coste_min = None, np.inf
    for _ in range(reps):
        C = P[rng.choice(len(P), k, replace=False)]
        for _ in range(50):
            et = ((P[:, None] - C[None]) ** 2).sum(-1).argmin(1)
            C = np.array([P[et == j].mean(0) if np.any(et == j) else C[j] for j in range(k)])
        coste = ((P - C[et]) ** 2).sum()
        if coste < coste_min:
            mejor, coste_min = et, coste
    return mejor

puntos_km = [curva(np.eye(k)[kmeans(py_x, k)]) for k in range(2, 7)]
for k, (a, b) in zip(range(2, 7), puntos_km):
    print(f"k-means k = {k}: I(X;T) = {a:.3f}, I(T;Y) = {b:.3f};  curva IB en ese I(X;T): {np.interp(a, ix, iy):.3f}")

fig, ax = plt.subplots(1, 2, figsize=(10, 3.8))
ax[0].plot(ix, iy, "-", label="IB con recocido")
ax[0].plot(*np.array(puntos_km).T, "s", label="k-means sobre p(y|x)")
ax[0].axhline(info_mutua(px[:, None] * py_x), ls="--", c="gray", label="I(X;Y)")
ax[0].set_xlabel("I(X;T) (bits)"); ax[0].set_ylabel("I(T;Y) (bits)"); ax[0].legend()
ax[1].semilogx(betas, ix, label="I(X;T)")
ax[1].semilogx(betas, iy, label="I(T;Y)")
ax[1].axvline(1 / rho2, ls="--", c="gray", label="1/ρ²")
for i in picos:
    ax[1].axvline(betas[i], ls=":", c="k", lw=0.8)
ax[1].set_xlabel("β"); ax[1].legend(); plt.tight_layout(); plt.show()

The predicted first threshold is 1/ρm2=1.521/\rho_m^2 = 1.52 and information begins growing at β≈1.68\beta \approx 1.68, slightly later because of critical slowing and grid spacing. Transitions appear as susceptibility peaks at β≈1.7\beta \approx 1.7, 3.43.4, 7.17.1, 7.87.8 and 11.611.6: the first exits the trivial solution and the rest separate finer subgroups, with diminishing relevance gains as expected for a concave curve. K-means remains below the curve: with two clusters, 0.41 relevance bits versus 0.48 on the curve for equal compression; with three, 0.71 versus 0.78. The difference has two sources: distance (KL penalizes grouping a word almost certain of its topic with an ambiguous one much more) and weights p(x)p(x), ignored by k-means.

The second cell checks the Gaussian solution: construct the theorem’s encoder for several β\beta, compute both informations using determinants and compare with the curve formula; then perturb the encoder randomly and check that the Lagrangian does not fall.

[ ]The Gaussian solution verifiedBrowser
import numpy as np

rng = np.random.default_rng(3)
dx, dy = 3, 2
B = rng.standard_normal((dx + dy, dx + dy))
S = B @ B.T + 0.5 * np.eye(dx + dy)                       # covarianza conjunta de (X, Y)
Sx, Sy, Sxy = S[:dx, :dx], S[dx:, dx:], S[:dx, dx:]
Sx_y = Sx - Sxy @ np.linalg.solve(Sy, Sxy.T)               # covarianza de X dado Y

# autovectores por la izquierda de Sx_y Sx^-1 (autovectores de su traspuesta)
lam, V = np.linalg.eig((Sx_y @ np.linalg.inv(Sx)).T)
orden = np.argsort(lam.real)
lam, V = lam.real[orden], V.real[:, orden]
# correlaciones canónicas, por la SVD de Sx^-1/2 Sxy Sy^-1/2 (con Cholesky)
Lx, Ly = np.linalg.cholesky(Sx), np.linalg.cholesky(Sy)
rho = np.linalg.svd(np.linalg.solve(Lx, Sxy) @ np.linalg.inv(Ly).T, compute_uv=False)
print("lambda_i       :", np.round(lam, 4))
print("1 - rho_i^2    :", np.round(np.sort(np.r_[1 - rho**2, np.ones(dx - dy)]), 4))
print("beta crítico_i :", np.round(1 / (1 - lam[:dy]), 3), "(el tercero es infinito: esa dirección no dice nada de Y)")

def informacion(A):
    """I(X;T) e I(T;Y) en nats para T = A X + ruido N(0, I)."""
    St, St_y = A @ Sx @ A.T + np.eye(len(A)), A @ Sx_y @ A.T + np.eye(len(A))
    return 0.5 * np.log(np.linalg.det(St)), 0.5 * np.log(np.linalg.det(St) / np.linalg.det(St_y))

def codificador_optimo(beta):
    filas = []
    for i in range(dx):
        v = V[:, i]
        a2 = (beta * (1 - lam[i]) - 1) / (lam[i] * (v @ Sx @ v))
        filas.append(np.sqrt(max(a2, 0.0)) * v)
    return np.array(filas)

for beta in (1.5, 6, 100):
    A = codificador_optimo(beta)
    Ix, Iy = informacion(A)
    n_act = int(np.sum(beta > 1 / (1 - lam)))
    l = lam[:n_act]
    formula = Ix - n_act / 2 * np.log(np.prod(1 - l) ** (1 / n_act) + np.exp(2 * Ix / n_act) * np.prod(l) ** (1 / n_act))
    L = Ix - beta * Iy
    L_pert = min(np.subtract(*np.array(informacion(A + 0.05 * rng.standard_normal(A.shape))) * [1, beta]) for _ in range(200))
    print(f"beta = {beta:5}: componentes activas {n_act}, I(X;T) = {Ix:.4f}, I(T;Y) = {Iy:.4f}, "
          f"fórmula de la curva {formula:.4f};  L = {L:.4f} <= mín. de 200 perturbaciones {L_pert:.4f}")

The λi\lambda_i agree with 1−ρi21 - \rho_i^2 to four digits, thresholds are 1.341.34 and 27.827.8 (the third direction, uncorrelated with YY, never enters), the curve formula reproduces I(T;Y)I(T;Y), and none of 200 perturbations improves the Lagrangian. With β=100\beta = 100 two components are already active.

VIB in PyTorch

The local cell implements Alemi et al.’s VIB on a laptop scale: a 784-256-256 MLP encoder giving mean and standard deviation of a 16-dimensional latent, linear softmax decoder, prior N(0,I)\Normal(\vb{0}, \mat{I}), three γ\gamma values, and the same deterministic MLP as reference. It measures rate, the H(Y)−CEH(Y) - \text{CE} bound, and accuracy under input noise, and verifies closed-form KL with torch.distributions. Translating formulas to tensors is direct (from equations to PyTorch). It runs on CPU in seconds.

[ ]Variational information bottleneck on MNIST (CPU)Local GPU
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"          # experimento pequeño: CPU
import math, time
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Normal, kl_divergence
from torchvision import datasets

torch.manual_seed(0)
torch.set_num_threads(2)
root = os.path.join(os.path.expanduser("~"), ".cache", "atlas-data")   # MNIST se descarga la primera vez (unos 11 MB)
tr = datasets.MNIST(root, train=True, download=True)
te = datasets.MNIST(root, train=False, download=True)
Xtr, ytr = tr.data[:20000].reshape(-1, 784).float() / 255, tr.targets[:20000]
Xte, yte = te.data[:2000].reshape(-1, 784).float() / 255, te.targets[:2000]
K, LN2 = 16, math.log(2)

class VIB(nn.Module):
    """Codificador gaussiano p(z|x) = N(mu(x), diag sigma(x)^2), decodificador softmax q(y|z), prior N(0, I)."""
    def __init__(self, estocastico=True):
        super().__init__()
        self.enc = nn.Sequential(nn.Linear(784, 256), nn.ReLU(), nn.Linear(256, 256), nn.ReLU(), nn.Linear(256, 2 * K))
        self.dec = nn.Linear(K, 10)
        self.estocastico = estocastico
    def codificar(self, x):
        h = self.enc(x)
        return h[:, :K], F.softplus(h[:, K:] - 5.0)          # sigma empieza pequeña
    def forward(self, x):
        mu, sigma = self.codificar(x)
        z = mu + sigma * torch.randn_like(mu) if self.estocastico else mu   # reparametrización
        return self.dec(z), mu, sigma

def kl_normal_estandar(mu, sigma):
    """KL(N(mu, diag sigma^2) || N(0, I)) por ejemplo, en nats (forma cerrada)."""
    return 0.5 * (mu**2 + sigma**2 - 1 - 2 * torch.log(sigma)).sum(1)

def entrenar(gamma, estocastico=True, epocas=5):
    torch.manual_seed(0)
    m = VIB(estocastico)
    opt = torch.optim.Adam(m.parameters(), lr=1e-3)
    for _ in range(epocas):
        perm = torch.randperm(len(Xtr))
        for i in range(0, len(Xtr), 128):
            idx = perm[i:i + 128]
            logits, mu, sigma = m(Xtr[idx])
            perdida = F.cross_entropy(logits, ytr[idx])
            if estocastico:
                perdida = perdida + gamma * kl_normal_estandar(mu, sigma).mean()
            opt.zero_grad(); perdida.backward(); opt.step()
    return m

@torch.no_grad()
def evaluar(m):
    mu, sigma = m.codificar(Xte)
    tasa = kl_normal_estandar(mu, sigma).mean().item() / LN2 if m.estocastico else float("inf")
    z = mu + sigma * torch.randn_like(mu) if m.estocastico else mu
    ce = F.cross_entropy(m.dec(z), yte).item() / LN2
    exact = []
    g = torch.Generator().manual_seed(1)
    for s in (0.0, 0.2, 0.4):
        mu_r, _ = m.codificar(Xte + s * torch.randn(Xte.shape, generator=g))
        exact.append((m.dec(mu_r).argmax(1) == yte).float().mean().item())
    return tasa, ce, exact

# comprobación de la forma cerrada de la KL con torch.distributions
mu, sigma = torch.randn(4, K), torch.rand(4, K) + 0.1
ref = kl_divergence(Normal(mu, sigma), Normal(0.0, 1.0)).sum(1)
print("KL cerrada frente a torch.distributions:", torch.allclose(kl_normal_estandar(mu, sigma), ref, atol=1e-5))

H_Y = -sum(p * math.log2(p) for p in (torch.bincount(yte, minlength=10) / len(yte)).tolist())
print(f"H(Y) = {H_Y:.3f} bits\n")
print("modelo          R (bits)   H(Y)-CE   exactitud con ruido σ = 0 / 0.2 / 0.4")
t0 = time.time()
for gamma in (1e-3, 1e-2, 1e-1):
    R, ce, ex = evaluar(entrenar(gamma))
    print(f"VIB γ = {gamma:<6g}  {R:8.1f}   {H_Y - ce:7.3f}   " + " / ".join(f"{100 * a:.1f} %" for a in ex))
R, ce, ex = evaluar(entrenar(0.0, estocastico=False))
print(f"determinista         ∞      {H_Y - ce:7.3f}   " + " / ".join(f"{100 * a:.1f} %" for a in ex))
print(f"\n({time.time() - t0:.0f} s en CPU)")
This cell needs the local lab (PyTorch with your GPU). Start it with npm run lab and open the connection link.

At 16 dimensions the latent is no longer the interactive’s extremely narrow bottleneck, so the pattern changes scale but not shape. With γ=10−2\gamma = 10^{-2} VIB uses 21.5 rate bits, reaches 96.4 % accuracy, and 81.0 % with pixel noise of standard deviation 0.4; the same-size deterministic MLP reaches 94.6 % and 76.0 %. With γ=10−3\gamma = 10^{-3} rate rises to 64 bits without gains, and with γ=0.1\gamma = 0.1 falls to 7.9 bits and accuracy to 93.8 %. With five epochs on 20 000 images, differences of one or two points depend on the seed: treat them as a trend, not a measurement. Alemi et al.’s experiment uses a 256-dimensional latent, all 60 000 images and long training; its main result is the whole accuracy-versus-γ\gamma curve with an interior maximum.

Common mistakes

Exercises

NumericThe relevance ceiling
If I(X;Y)=0.6I(X;Y) = 0.6 bits, what is the maximum possible I(T;Y)I(T;Y) in bits for any representation TT of XX (that is, with T−X−YT - X - Y)?
NumericThreshold of a binary symmetric channel
XX is uniform on {0,1}\{0, 1\} and YY is XX with the bit flipped with probability 0.20.2. For this pair, maximal correlation is Pearson correlation between XX and YY. At what β\beta does the trivial representation become unstable?
NumericA point on the Gaussian curve
XX and YY are scalar Gaussians with ρ2=0.75\rho^2 = 0.75. For the optimal representation with I(X;T)=1I(X;T) = 1 bit, what is I(T;Y)I(T;Y) in bits?
NumericWhen the second component enters
In a Gaussian problem, canonical correlations between XX and YY are 0.90.9 and 0.50.5. At what β\beta does the optimal representation have two active components?
QuizInformation in a deterministic network
A deterministic tanh network receives continuous input XX with a density. For an intermediate layer T=f(X)T = f(X) with generic weights, what is I(X;T)I(X;T) and what does it imply for the information plane?
QuizThe two extremes of β
What representation does the information bottleneck give as β→∞\beta \to \infty, and what when β\beta lies below critical threshold 1/s∗1/s^*?
QuizReading a paper critically
A paper claims: ‘Layer 4 of our classification network (deterministic, ReLU, continuous input) compresses: we estimate I(X;T4)I(X;T_4) with 30 bins per neuron and it falls 2 bits in the second half of training as test error improves; therefore compression causes generalization.’ Which objections are valid?

More than one answer may be correct.

ProofThe self-consistent equations
Prove: Interior stationary points of Lβ=I(X;T)−βI(T;Y)\mathcal{L}_\beta = I(X;T) - \beta I(T;Y) over encoders p(t∣x)p(t \mid x) satisfy p(t∣x)=p(t)Z(x,β)exp⁡(−β KL⁡(p(y∣x) ∥ p(y∣t)))p(t \mid x) = \frac{p(t)}{Z(x,\beta)}\exp(-\beta\,\KL(p(y \mid x)\,\|\,p(y \mid t))).
0
Add a multiplier λ(x)\lambda(x) for each normalization constraint ∑tp(t∣x)=1\sum_t p(t \mid x) = 1 and differentiate Lβ+∑xλ(x)∑tp(t∣x)\mathcal{L}_\beta + \sum_x \lambda(x)\sum_t p(t \mid x) with respect to p(t∣x)p(t \mid x), remembering p(t)p(t) and p(y∣t)p(y \mid t) depend on the encoder. Work in nats.

Step 1 of 4. What is ∂I(X;T)/∂p(t∣x)\partial I(X;T)/\partial p(t \mid x), with I(X;T)=∑x,tp(x)p(t∣x)ln⁡p(t∣x)p(t)I(X;T) = \sum_{x,t} p(x)p(t \mid x)\ln\frac{p(t \mid x)}{p(t)}?

ProofThe two VIB bounds
Prove: For any q(y∣z)q(y \mid z) and r(z)r(z), I(Z;Y)≥H(Y)+Elog⁡q(y∣z)I(Z;Y) \ge H(Y) + \E\log q(y \mid z) and I(X;Z)≤Ex KL⁡(p(z∣x) ∥ r(z))I(X;Z) \le \E_x\,\KL(p(z \mid x)\,\|\,r(z)); consequently minimizing the VIB objective minimizes an upper bound on the Lagrangian.
0
The chain is Z−X−YZ - X - Y, with encoder p(z∣x)p(z \mid x) and induced distributions p(z)p(z) and p(y∣z)p(y \mid z).

Step 1 of 4. How do you start the first bound?

CodeOne iterative information bottleneck step
Implement paso_ib(px, py_x, pt_x, beta), taking marginal px (shape (n,)), matrix py_x with rows p(y∣x)p(y \mid x) (shape (n, m), all entries positive), current encoder pt_x (shape (n, M)), and β\beta, and returning the next encoder: compute p(t)p(t) and p(y∣t)p(y \mid t) from pt_x, then p(t∣x)∝p(t)exp⁡(−β KL⁡(p(y∣x) ∥ p(y∣t)))p(t \mid x) \propto p(t)\exp(-\beta\,\KL(p(y \mid x)\,\|\,p(y \mid t))) in nats. Ensure numerical stability (for large β\beta exponentials overflow unless the maximum is subtracted) and handle empty clusters.
import numpy as np

def paso_ib(px, py_x, pt_x, beta):
  """Una iteración de las ecuaciones autoconsistentes. Devuelve p(t|x) con forma (n, M)."""
  px, py_x, pt_x = np.asarray(px, float), np.asarray(py_x, float), np.asarray(pt_x, float)
  # tu código: p(t), p(y|t), la matriz de KL(p(y|x) || p(y|t)) y la Gibbs normalizada por filas
  return pt_x
Shift+Enter to run

Summary

Key idea
Information bottleneck seeks a representation TT of XX forgetting as much as possible about XX while retaining as much as possible about YY: it minimizes I(X;T)−βI(T;Y)I(X;T) - \beta I(T;Y). It is rate–distortion where distortion KL⁡(p(y∣x) ∥ p(y∣t))\KL(p(y \mid x)\,\|\,p(y \mid t)) is defined by the relevant variable itself.
  • Information curve IY(R)I_Y(R) is concave, lies below min⁡(R,I(X;Y))\min(R, I(X;Y)), and its supporting line has slope 1/β1/\beta. With β≤1/s∗\beta \le 1/s^* the solution is trivial; the trivial solution loses stability at β=1/ρm2\beta = 1/\rho_m^2, where ρm\rho_m is maximal correlation.
  • Optima satisfy self-consistent equations: a Gibbs distribution with KL energy over centroids p(y∣t)p(y \mid t). Iteration decreases the Lagrangian each step; annealing in β\beta follows solution branches and reveals phase transitions where clusters split.
  • In the Gaussian case the solution is noisy CCA: canonical direction ii activates at β=1/ρi2\beta = 1/\rho_i^2.
  • VIB replaces both informations by bounds, a lower bound on I(Z;Y)I(Z;Y) using a decoder and upper bound on I(X;Z)I(X;Z) using a prior, trained as a supervised VAE: cross-entropy plus γ\gamma times KL, with reparameterization.
  • A deterministic network’s information plane measures the estimator rather than the network: I(X;T)I(X;T) is infinite or constant. Compression depends on nonlinearity and estimator, and is unnecessary for generalization.
  • Frontier work uses the bottleneck as objective and language: minimal sufficient representations in self-supervision, generalization bounds with I(X;Z∣Y)I(X;Z \given Y) and information usable by restricted models.