Probability and statistics

I(X;Y)=H(X)−H(X∣Y)I(X; Y) = H(X) - H(X \mid Y) Mutual information

I(X; Y) is how much knowing Y tells you about X, in bits or nats. Zero means independent.

In ML papers

I(X;Y)I(X; Y) is the mutual information between two random variables: how much knowing one reduces the uncertainty (Entropy and cross-entropy) of the other. It is symmetric, never negative, and zero exactly when XX and YY are independent. The semicolon separates the two sides; I(X;Y∣Z)I(X; Y \mid Z) is the same quantity with ZZ known.

It equals the KL divergence between the joint distribution and the product of the marginals: I(X;Y)=DKL(p(x,y)∥p(x) p(y))I(X; Y) = D_{\mathrm{KL}}(p(x, y) \| p(x)\,p(y)). Contrastive methods maximize lower bounds on it; the InfoNCE loss of Oord et al. (2018) gives I≥log⁡N−LNI \geq \log N - \mathcal{L}_N for NN samples.

Other meanings, by context

How to type it

LaTeXShows
I(X; Y)I(X;Y)I(X; Y)
\operatorname{MI}(X, Y)MI⁡(X,Y)\operatorname{MI}(X, Y)

A worked example

Y=X, X a fair coin  ⇒  I(X;Y)=H(X)=1 bitY = X,\ X \text{ a fair coin} \;\Rightarrow\; I(X; Y) = H(X) = 1 \text{ bit}

If YY copies XX, knowing YY removes all of XX's 1 bit of uncertainty. If YY is an independent coin, I(X;Y)=0I(X; Y) = 0.

Common confusions

Related

H(p)=−∑xp(x)log⁡p(x)H(p) = -\sum_x p(x) \log p(x)Entropy and cross-entropyDKL(q ∥ p)D_{\mathrm{KL}}(q \,\|\, p)KL divergencep(x;θ)p(x; \theta)Semicolon (parameterized by)

Decode this example →