A unified framework connecting MINE, InfoNCE, NWJ, and TUBA — all variational MI estimators with their derivation relationships and bias-variance tradeoffs.
One-sentence summary: All variational MI estimators — MINE, InfoNCE, NWJ, TUBA — fit into a single framework. The paper clarifies their derivation relationships and bias-variance tradeoffs.
1. Starting Point: Two Equivalent Forms of Mutual Information#
The two expressions are perfectly symmetric, conditioning on X or Y respectively. The derivations below will pick whichever side is more convenient.
2. Normalized Bounds: Using Proper Probability Distributions as Stand-Ins#
Why derive these bounds at all? Equation (1) defines mutual information, but the true p(y∣x) and p(y) cannot be computed in high-dimensional spaces. The standard variational inference move is: introduce a computable substitute distribution (a variational distribution), turning an incalculable quantity into an optimizable upper or lower bound.
“Normalized” means the variational distribution itself is a valid, normalized probability distribution (∫q=1). This is the most direct approach — you cannot compute p(y), so you replace it with some q(y).
The next two subsections are symmetric: Section 2.1 introduces q(y) to replace p(y), yielding an upper bound. Section 2.2 introduces q(x∣y) to replace p(x∣y), yielding a lower bound.
Step 5. Since DKL≥0, dropping the second term yields an upper bound:
I(X;Y)≤Ep(x)[DKL(p(y∣x)∥q(y))]
Equality holds when q(y)=p(y). The literature often calls this upper bound the rate R (Alemi et al., 2017), used as a regularizer that limits representation capacity in VAE, β-VAE, and VIB. It is not the same as the ELBO — the ELBO has an additional reconstruction term.
Step 5. Since KL ≥0, dropping it gives a lower bound:
I(X;Y)≥Ep(x,y)[logq(x∣y)]+h(X)≜IBA
Two problems arise: (1) h(X) is incalculable because p(x) is unknown; (2) modeling q(x∣y) is hard when x is high-dimensional data.
3. Unnormalized Lower Bounds: Using Energy-Based Functions as Stand-Ins#
Recall the two problems with IBA:
h(X) is incalculable — it contains p(x), which is unknown.
q(x∣y) is hard to model — x might be an image, and having a neural network output a normalized probability distribution over images is extremely difficult.
The unnormalized bounds approach: instead of directly modeling q(x∣y), define it indirectly through an energy function (a critic) f(x,y). This sidesteps the difficulty of outputting a valid probability distribution.
But there is a more important question: how to also get rid of h(X)? The answer lies in the design of equation (2).
The authors design the variational distribution as follows:
q(x∣y)=Z(y)p(x)ef(x,y)(2)
Each component has a specific design purpose:
f(x,y) — the critic function. An arbitrary neural network that takes (x,y) as input and outputs a scalar. It only needs to score each pair (x,y) — high scores indicate the pair is more likely from the joint distribution, low scores indicate it is more likely from the product of marginals. Modeling a scalar function is far easier than modeling a high-dimensional probability distribution.
p(x) — explicitly multiplied in. This is deliberate. When we substitute this into IBA, logq(x∣y) expands to include logp(x), which exactly cancels with h(X)=−E[logp(x)]. In other words, p(x) is inserted specifically to “eat” the h(X) term.
Do we need the density value of p(x) in practice? No. After substituting into IBA, logp(x) cancels out in the derivation. The final objective IUBA=E[f]−E[logE[ef]] contains no p(x) whatsoever. Training only requires sampling x from the dataset (to estimate outer expectations and Ep(x)[ef]), never the probability density of p(x).
Z(y)=Ep(x)[ef(x,y)] — the partition function. The numerator p(x)ef(x,y) does not guarantee integration to 1 over x, so dividing by Z(y) enforces normalization: ∫q(x∣y)dx=Z(y)1∫p(x)ef(x,y)dx=Z(y)Z(y)=1.
To summarize the construction in one sentence: use an easy-to-model scalar critic f in place of a hard-to-model high-dimensional distribution q, while inserting p(x) to cancel h(X) later — at the cost of introducing a new intractable term logZ(y).
Now we substitute into IBA and watch each design intention play out step by step.
3.2 IUBA: Substituting the Energy-Based Form into IBA#
h(X) is gone. But logE[ef] remains intractable — the expectation sits inside the log, so Monte Carlo estimation cannot be unbiased.
What does unbiased Monte Carlo estimation mean? Monte Carlo methods approximate expectations with sample means: E[g(x)]≈n1∑ig(xi). As n→∞, the approximation converges to the true value, and for any finite n, the expected value of the estimator equals E[g(x)] — this is what “unbiased” means.
For the second term of IUBA, Ep(y)[logEp(x)[ef]]: the inner expectation Ep(x)[ef] can be estimated unbiasedly with n1∑ief(xi,y), but the outer log is nonlinear. Jensen’s inequality tells us E[log(estimate)]=log(E[estimate]), so plugging the sample mean into the log — log(n1∑iefi) — produces a biased estimator.
The rest of Section 3 is essentially about: using various inequalities to pull the log out from around the expectation.
What is the optimal critic? Set IUBA to achieve equality when q(x∣y)=p(x∣y) (recovering IBA’s tightness condition):
Step 3. Merge into a joint expectation: Ep(y)[Ep(x)[ef]]=Ep(x)p(y)[ef]:
IDV=Ep(x,y)[f(x,y)]−logEp(x)p(y)[ef(x,y)](4)
This is the Donsker-Varadhan bound used by MINE. Because of Jensen, IDV≤IUBA≤I. On paper, it is a valid lower bound.
But MINE in practice is not a strict bound. The paper’s argument has two layers. First, MINE in practice “reverses” the Jensen direction: the original IDV=E[f]−logE[ef] is a lower bound on IUBA (because E[logZ]≤logE[Z]). But the Monte Carlo estimate of logE[ef] effectively computes an approximation of E[f] rather than logE[ef], making the optimization target an upper bound on IUBA. Second, layered on top of this is the finite-sample error from mini-batches. The final value is neither an upper nor a lower bound on the true MI.
From a gradient perspective: with mini-batch gradient estimates, the nonlinearity of log means the expected gradient of each batch is not equal to the true gradient. The optimizer is really optimizing Ebatch[log(B1∑ef)] rather than the theoretically required logEbatch[B1∑ef]. The Jensen directions of these two objectives are opposite.
Can MINE still be used? As an MI estimator (when you want a number), it is unreliable — you cannot take MINE’s output of “3.2 nats” and claim the mutual information is at least 3.2 nats, because that 3.2 could be above or below the true MI. As a training objective (maximizing MI to learn representations), it can work. The gradient direction, though not a rigorous bound, still pushes f to distinguish joint samples from marginal samples, and representation learning results in practice are decent.
The paper’s contribution lies in diagnosing the root cause and then providing bounds that genuinely survive Monte Carlo estimation — ITUBA and InfoNCE. All subsequent work revolves around this goal.
There is no more logE[⋅]. All expectations are on the outside and can be estimated unbiasedly with Monte Carlo. The cost is needing to learn an additional network a(y).
3.6 IJS: Training a Critic with JS Divergence (Practical Variant)#
Training a critic with INWJ’s own objective can be unstable — the ef term has high variance. The paper proposes an engineering compromise called IJS:
First, train the critic using Jensen-Shannon divergence (as in GANs / Hjelm et al., 2018). This trains a binary classifier to distinguish joint samples from marginal samples, yielding a log density ratio estimate V(x,y)≈logp(x)p(y)p(x,y). JS training is far more stable than INWJ because it avoids the exponential ef term.
Second, evaluate MI by plugging V into the INWJ formula:
IJS=1+Ep(x,y)[V(x,y)]−Ep(x)p(y)[eV(x,y)]
The key point: training and evaluation use different objectives — JS for training (stable), INWJ for evaluation (a valid MI lower bound). The paper’s dSprites experiments actually use IJS.
Under the optimal critic, INWJ is an unbiased (not low-bias) estimator — see the paper’s Figure 3. ITUBA and INWJ/IDV are all single-sample unnormalized bounds, which the paper groups together as “high variance” methods. Learning a(y) in ITUBA helps but does not eliminate the problem. ITUBA’s variance is typically somewhat lower than INWJ, but both fall in the high-variance category.
The core tension: these single-sample bounds — which use only one x to estimate Z(y) per evaluation — all suffer from high variance, because Z(y)=Ep(x)[ef] is an estimate that depends heavily on the tails of the x distribution.
The solution direction: use multiple samples within a batch to share the partition function estimate.
5. Multi-Sample Bounds: Reducing Variance with Batches#
Instead of using 1 sample x to estimate Z(y), use K samples: Z(y)≈K1∑i=1Kef(xi,y). The cost is introducing bias (the estimator itself is no longer an unbiased estimate of Z(y)), but the variance drops substantially.
Step 0. Setup. We have one pair (x1,y) from p(x1)p(y∣x1), and K−1 independent samples x2:K∼rK−1(x). In practice r is usually the data distribution p(x) itself. Denote x1:K=(x1,x2,…,xK).
Since x2:K is independent of (x1,y), we can “absorb” the extra negative samples into the mutual information without changing its true value. This happens in two conceptual steps.
Step A: wrap an expectation around it, which does not change the value.
I(X1;Y)=ErK−1(x2:K)[I(X1;Y)]
I(X1;Y) has nothing to do with x2:K. Taking the expectation over x2:K, the term I(X1;Y) is a constant pulled outside — the expectation of a constant is the constant. It is like your exam score depending only on how much you studied, not on what you ate for dinner; the average of your exam score over all possible dinners is still your exam score.
Step B: “swallow” the expectation into the mutual information.
ErK−1(x2:K)[I(X1;Y)]=I(X1,X2:K;Y)
By the chain rule of mutual information:
I(X1,X2:K;Y)=I(X1;Y)+=0I(X2:K;Y∣X1)
Since X2:K is completely independent of (X1,Y), knowing X1 does not create any information overlap between X2:K and Y. The conditional mutual information is zero. Therefore:
I(X1;Y)=I(X1,X2:K;Y)(8)
In one sentence: the extra negative samples are independent of (X1,Y), and through the chain rule they can be absorbed into I(X1,X2:K;Y) without changing the true MI. The benefit is enormous — we can now apply INWJ to I(X1,X2:K;Y) and let these “extra samples” help estimate the partition function.
Step 1. Construct a critic that considers all K samples:
f(x1:K,y)=1+loga(y;x1:K)ef(x1,y)(9)
where a(y;x1:K) is a substitute for the partition function estimated from K samples.
Step 2. Substitute (9) into the INWJ formula INWJ=Ep[f]−e−1Ep⊗p[ef]:
Upper bound ceiling.INCE≤logK. When the critic perfectly distinguishes positive from negative pairs, for each positive (xi,yi) we have ef(xi,yi)≫ef(xi,yj) for j=i, the denominator approaches K1ef(xi,yi), and the log term approaches logK. This means: if the true I(X;Y)>logK, InfoNCE is loose — batch size determines the ceiling on estimation accuracy.
Optimal critic.f∗(x,y)=logp(y∣x)+c(y), same as IUBA. The choice of c(y) does not change the value of InfoNCE — all critics of the form f(x,y)=logp(y∣x)+c(y) form an equivalence class within which InfoNCE takes identical values (Ma & Collins, 2018). The reason: for the i-th term of the softmax, c(yi) appears simultaneously in the numerator and the j=i term of the denominator and cancels out, while for j=i terms, logp(yj∣xi)+c(yj) has the same form, so the entire softmax does not depend on the specific choice of c.
6. Interpolated Bound Iα: The Bias-Variance Tradeoff#
Step 1. The key to InfoNCE’s derivation was choosing a(y;x1:K)=m(y;x1:K) (the sample mean). What if we choose a convex combination of m and some baseline q(y)?
aα(y;x1:K)=α⋅m(y;x1:K)+(1−α)⋅q(y),α∈[0,1]
where q(y) is any distribution. In practice it can be a uniform distribution, or a neural network can learn q(y) as in IJS.
Step 2. Substitute aα into equation (9), then into INWJ:
The practical takeaway: smaller α gets closer to the true MI (low bias) but with high variance and unstable training; larger α gives more stable training (low variance) but may underestimate MI. You can tune α according to the demands of the task.
In representation learning, Y is the learned representation, and the encoder p(y∣x) is itself tractable (e.g., a Gaussian distribution). In this setting we can do something cleaner.
Step 1. Return to the VAE-style upper bound from Section 2.1:
I≤Ep(x)[DKL(p(y∣x)∥q(y))]
Step 2. Approximate q(y) using the other samples in the batch. Given a batch {(xi,yi)}i=1K, estimate q(y) for the i-th sample using the remaining K−1:
Without any additional variational distributions or critic networks, the MI is sandwiched between an upper and lower bound.
7.4 Reparameterized Critic: Connecting INWJ and the VAE Upper Bound#
When p(y∣x) is known, INWJ’s critic does not need to be learned from scratch. Recall INWJ’s optimal critic f∗(x,y)=1+logp(x)p(x∣y). Using Bayes’ rule p(x∣y)=p(y)p(y∣x)p(x):
f∗(x,y)=1+logp(y)p(y∣x)
But we do not know p(y). Introduce a variational distribution q(y) to replace it:
f(x,y)=1+logq(y)p(y∣x)
The critic is now reparameterized to require only learning q(y) (typically a small network), rather than learning a full (x,y)→R critic from scratch. Substituting this form into INWJ:
After simplification, this yields a bound that only needs q(y). The form is structurally symmetric with the VAE-style upper bound I≤Ep(x)[DKL(p(y∣x)∥q(y))]: one evaluates KL between p(y∣x) and q(y), the other evaluates cross-entropy.
7.5 Upper Bounding Total Correlation (Application to Disentangled Representations)#
The paper further shows how to use the sandwich bound to constrain the total correlation of a representation:
TC(Y)=i=1∑dI(X;Yi)−I(X;Y)
where Y=(Y1,…,Yd) is a d-dimensional representation. TC(Y) measures the statistical dependence among the dimensions of the representation — the smaller TC(Y) is, the more disentangled the representation.
Using the Section 7.1 lower bound to sandwich I(X;Y) and the Section 7.2 upper bound to sandwich each I(X;Yi), one can constrain TC(Y) using only the tractable encoder p(y∣x) and a single batch, with no additional networks. This provides an information-theoretic foundation for disentanglement methods like β-VAE and FactorVAE.
The hierarchy of bounds, starting from mutual information I(X;Y) at the root:
The VAE-style upper bound branches into the Leave-One-Out upper bound (denominator excludes self). On the lower bound side, the path splits into normalized bounds — IBA plus h(X), which is intractable — and unnormalized bounds, where q=(p/Z)ef.
The unnormalized path leads to IUBA, which successfully removes h(X) but leaves logE[ef] intractable. From IUBA, three branches emerge. IDV/MINE applies Jensen to produce a lower bound, but its Monte Carlo estimate is not actually a bound in practice. ITUBA uses the inequality logx≤x/a+loga−1, yielding a tractable bound at the cost of learning a(y). INWJ/f-GAN sets a(y)=e as a special case — low bias, high variance, and no extra network needed.
From INWJ, two multi-sample variants branch out. InfoNCE corresponds to α=1: high bias, low variance, with an upper ceiling of logK. The interpolated bound Iα allows tuning α∈(0,1), with an upper ceiling of log(K/α), trading off continuously between bias and variance.
When the encoder p(y∣x) is tractable, substituting f=logp(y∣x) into either InfoNCE or Iα yields structured bounds. The sandwich bound captures MI between a lower bound (denominator includes self) and an upper bound (denominator excludes self) — the only difference being whether the i-th sample participates in its own denominator.
MINE is not a bound in empirical practice: the Monte Carlo estimate of logE[ef] reverses the Jensen direction relative to the theoretical bound.
The bias-variance tradeoff is tunable: NWJ (α=0) sits at one end, InfoNCE (α=1) at the other, and Iα adjusts α to balance between them.
When p(y∣x) is tractable, you can sandwich the MI: the upper and lower bounds differ only in whether the denominator includes the sample itself, requiring no additional networks.
This paper connects to several other works in the information-theoretic foundations of contrastive learning. Noise Contrastive Estimation lays the statistical groundwork — turning density estimation into binary classification — that InfoNCE builds on. Contrastive Predictive Coding is InfoNCE’s first large-scale application, learning representations by predicting future observations in a compact latent space. MINE (Belghazi et al., 2018) implements the IDV bound with neural networks and is subsumed as a special case within this unified framework.