Ru00y.
Jun 25, 2026 · 20 min

On Variational Bounds of Mutual Information

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#

I(X;Y)=Ep(x,y)[logp(xy)p(x)]=Ep(x,y)[logp(yx)p(y)](1)I(X; Y) = \mathbb{E}_{p(x,y)}\left[\log \frac{p(x \mid y)}{p(x)}\right] = \mathbb{E}_{p(x,y)}\left[\log \frac{p(y \mid x)}{p(y)}\right] \tag{1}

The two expressions are perfectly symmetric, conditioning on XX or YY 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(yx)p(y \mid x) and p(y)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\int q = 1). This is the most direct approach — you cannot compute p(y)p(y), so you replace it with some q(y)q(y).

The next two subsections are symmetric: Section 2.1 introduces q(y)q(y) to replace p(y)p(y), yielding an upper bound. Section 2.2 introduces q(xy)q(x \mid y) to replace p(xy)p(x \mid y), yielding a lower bound.

2.1 Upper Bound (VAE-Style)#

The goal is a computable upper bound. The strategy: replace the intractable p(y)p(y) with q(y)q(y).

Step 1. Multiply and divide by q(y)q(y) inside the log:

I(X;Y)=Ep(x,y)[logp(yx)p(y)]=Ep(x,y)[log(p(yx)q(y)q(y)p(y))]I(X; Y) = \mathbb{E}_{p(x,y)}\left[\log \frac{p(y \mid x)}{p(y)}\right] = \mathbb{E}_{p(x,y)}\left[\log \left( \frac{p(y \mid x)}{q(y)} \cdot \frac{q(y)}{p(y)} \right)\right]

Step 2. Split into two terms:

=Ep(x,y)[logp(yx)q(y)]term 1+Ep(x,y)[logq(y)p(y)]term 2= \underbrace{\mathbb{E}_{p(x,y)}\left[\log \frac{p(y \mid x)}{q(y)}\right]}_{\text{term 1}} + \underbrace{\mathbb{E}_{p(x,y)}\left[\log \frac{q(y)}{p(y)}\right]}_{\text{term 2}}

Step 3. Simplify each term.

For ①, expand the joint expectation:

=p(x,y)logp(yx)q(y)dxdy=p(x)p(yx)logp(yx)q(y)dxdy=p(x)[p(yx)logp(yx)q(y)dy]DKL(p(yx)q(y))dx=Ep(x)[DKL(p(yx)q(y))]\begin{aligned} \text{①} &= \iint p(x,y) \log \frac{p(y \mid x)}{q(y)} \,dx\,dy \\ &= \iint p(x) p(y \mid x) \log \frac{p(y \mid x)}{q(y)} \,dx\,dy \\ &= \int p(x) \underbrace{\left[\int p(y \mid x) \log \frac{p(y \mid x)}{q(y)} \,dy\right]}_{D_{KL}(p(y \mid x) \parallel q(y))} dx \\ &= \mathbb{E}_{p(x)}\left[D_{KL}(p(y \mid x) \parallel q(y))\right] \end{aligned}

For ②, since p(x,y)=p(xy)p(y)p(x,y) = p(x \mid y) p(y), the joint expectation over (x,y)(x,y) can be integrated over xx first:

=p(x,y)logq(y)p(y)dxdy=[p(xy)dx]p(y)logq(y)p(y)dy=p(y)logq(y)p(y)dy=DKL(p(y)q(y))\begin{aligned} \text{②} &= \iint p(x,y) \log \frac{q(y)}{p(y)} \,dx\,dy \\ &= \int \left[\int p(x \mid y) \,dx\right] p(y) \log \frac{q(y)}{p(y)} \,dy \\ &= \int p(y) \log \frac{q(y)}{p(y)} \,dy \\ &= -D_{KL}(p(y) \parallel q(y)) \end{aligned}

Step 4. Combine:

I(X;Y)=Ep(x)[DKL(p(yx)q(y))]DKL(p(y)q(y))I(X; Y) = \mathbb{E}_{p(x)}\left[D_{KL}(p(y \mid x) \parallel q(y))\right] - D_{KL}(p(y) \parallel q(y))

Step 5. Since DKL0D_{KL} \geq 0, dropping the second term yields an upper bound:

I(X;Y)Ep(x)[DKL(p(yx)q(y))]\boxed{I(X; Y) \leq \mathbb{E}_{p(x)}\left[D_{KL}(p(y \mid x) \parallel q(y))\right]}

Equality holds when q(y)=p(y)q(y) = p(y). The literature often calls this upper bound the rate RR (Alemi et al., 2017), used as a regularizer that limits representation capacity in VAE, β\beta-VAE, and VIB. It is not the same as the ELBO — the ELBO has an additional reconstruction term.

2.2 Lower Bound: Barber-Agakov (IBA, 2003)#

Symmetrically, replace p(xy)p(x \mid y) with q(xy)q(x \mid y).

Step 1. Start from the p(xy)p(x \mid y) side, multiply and divide by q(xy)q(x \mid y):

I=Ep(x,y)[logp(xy)p(x)]=Ep(x,y)[log(q(xy)p(x)p(xy)q(xy))]I = \mathbb{E}_{p(x,y)}\left[\log \frac{p(x \mid y)}{p(x)}\right] = \mathbb{E}_{p(x,y)}\left[\log \left( \frac{q(x \mid y)}{p(x)} \cdot \frac{p(x \mid y)}{q(x \mid y)} \right)\right]

Step 2. Split into two terms:

=Ep(x,y)[logq(xy)p(x)]+Ep(x,y)[logp(xy)q(xy)]= \mathbb{E}_{p(x,y)}\left[\log \frac{q(x \mid y)}{p(x)}\right] + \mathbb{E}_{p(x,y)}\left[\log \frac{p(x \mid y)}{q(x \mid y)}\right]

Step 3. Expand the log in the first term:

Ep(x,y)[logq(xy)p(x)]=Ep(x,y)[logq(xy)]Ep(x,y)[logp(x)]\mathbb{E}_{p(x,y)}\left[\log \frac{q(x \mid y)}{p(x)}\right] = \mathbb{E}_{p(x,y)}[\log q(x \mid y)] - \mathbb{E}_{p(x,y)}[\log p(x)]

Denote h(X)=Ep(x,y)[logp(x)]h(X) = -\mathbb{E}_{p(x,y)}[\log p(x)] as the differential entropy of XX, giving Ep(x,y)[logq(xy)]+h(X)\mathbb{E}_{p(x,y)}[\log q(x \mid y)] + h(X).

Step 4. The second term is a KL divergence:

Ep(x,y)[logp(xy)q(xy)]=Ep(y)[DKL(p(xy)q(xy))]0\mathbb{E}_{p(x,y)}\left[\log \frac{p(x \mid y)}{q(x \mid y)}\right] = \mathbb{E}_{p(y)}\left[D_{KL}(p(x \mid y) \parallel q(x \mid y))\right] \geq 0

Step 5. Since KL 0\geq 0, dropping it gives a lower bound:

I(X;Y)Ep(x,y)[logq(xy)]+h(X)IBA\boxed{I(X; Y) \geq \mathbb{E}_{p(x,y)}[\log q(x \mid y)] + h(X) \triangleq I_{BA}}

Two problems arise: (1) h(X)h(X) is incalculable because p(x)p(x) is unknown; (2) modeling q(xy)q(x \mid y) is hard when xx is high-dimensional data.

3. Unnormalized Lower Bounds: Using Energy-Based Functions as Stand-Ins#

Recall the two problems with IBA:

  1. h(X)h(X) is incalculable — it contains p(x)p(x), which is unknown.
  2. q(xy)q(x \mid y) is hard to model — xx 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(xy)q(x \mid y), define it indirectly through an energy function (a critic) f(x,y)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)h(X)? The answer lies in the design of equation (2).

3.1 Key Construction: Energy-Based Variational Distribution#

The authors design the variational distribution as follows:

q(xy)=p(x)Z(y)ef(x,y)(2)\boxed{q(x \mid y) = \frac{p(x)}{Z(y)} e^{f(x,y)}} \tag{2}

Each component has a specific design purpose:

f(x,y)f(x, y) — the critic function. An arbitrary neural network that takes (x,y)(x, y) as input and outputs a scalar. It only needs to score each pair (x,y)(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)p(x) — explicitly multiplied in. This is deliberate. When we substitute this into IBA, logq(xy)\log q(x \mid y) expands to include logp(x)\log p(x), which exactly cancels with h(X)=E[logp(x)]h(X) = -\mathbb{E}[\log p(x)]. In other words, p(x)p(x) is inserted specifically to “eat” the h(X)h(X) term.

Do we need the density value of p(x)p(x) in practice? No. After substituting into IBA, logp(x)\log p(x) cancels out in the derivation. The final objective IUBA=E[f]E[logE[ef]]I_{UBA} = \mathbb{E}[f] - \mathbb{E}[\log \mathbb{E}[e^f]] contains no p(x)p(x) whatsoever. Training only requires sampling xx from the dataset (to estimate outer expectations and Ep(x)[ef]\mathbb{E}_{p(x)}[e^f]), never the probability density of p(x)p(x).

Z(y)=Ep(x)[ef(x,y)]Z(y) = \mathbb{E}_{p(x)}[e^{f(x,y)}] — the partition function. The numerator p(x)ef(x,y)p(x) e^{f(x,y)} does not guarantee integration to 1 over xx, so dividing by Z(y)Z(y) enforces normalization: q(xy)dx=1Z(y)p(x)ef(x,y)dx=Z(y)Z(y)=1\int q(x \mid y)\, dx = \frac{1}{Z(y)}\int p(x) e^{f(x,y)} dx = \frac{Z(y)}{Z(y)} = 1.

To summarize the construction in one sentence: use an easy-to-model scalar critic ff in place of a hard-to-model high-dimensional distribution qq, while inserting p(x)p(x) to cancel h(X)h(X) later — at the cost of introducing a new intractable term logZ(y)\log Z(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#

Step 1. Substitute (2) into IBAI_{BA}:

IUBA=Ep(x,y)[logq(xy)]+h(X)I_{UBA} = \mathbb{E}_{p(x,y)}[\log q(x \mid y)] + h(X)

First compute logq(xy)\log q(x \mid y):

logq(xy)=logp(x)Z(y)ef(x,y)=logp(x)logZ(y)+f(x,y)\log q(x \mid y) = \log \frac{p(x)}{Z(y)} e^{f(x,y)} = \log p(x) - \log Z(y) + f(x,y)

Step 2. Substitute:

IUBA=Ep(x,y)[logp(x)logZ(y)+f(x,y)]+h(X)I_{UBA} = \mathbb{E}_{p(x,y)}\left[\log p(x) - \log Z(y) + f(x,y)\right] + h(X)

Expand:

=Ep(x,y)[logp(x)]h(X)Ep(x,y)[logZ(y)]+Ep(x,y)[f(x,y)]+h(X)= \underbrace{\mathbb{E}_{p(x,y)}[\log p(x)]}_{-h(X)} - \mathbb{E}_{p(x,y)}[\log Z(y)] + \mathbb{E}_{p(x,y)}[f(x,y)] + h(X)

Step 3. Ep(x,y)[logp(x)]=h(X)\mathbb{E}_{p(x,y)}[\log p(x)] = -h(X) and the outer +h(X)+h(X) cancel exactly:

IUBA=Ep(x,y)[f(x,y)]Ep(y)[logZ(y)]I_{UBA} = \mathbb{E}_{p(x,y)}[f(x,y)] - \mathbb{E}_{p(y)}[\log Z(y)]

Expand Z(y)Z(y):

IUBA=Ep(x,y)[f(x,y)]Ep(y)[logEp(x)[ef(x,y)]](3)\boxed{I_{UBA} = \mathbb{E}_{p(x,y)}[f(x,y)] - \mathbb{E}_{p(y)}\left[\log \mathbb{E}_{p(x)}[e^{f(x,y)}]\right]} \tag{3}

h(X)h(X) is gone. But logE[ef]\log \mathbb{E}[e^f] 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)]1nig(xi)\mathbb{E}[g(x)] \approx \frac{1}{n}\sum_i g(x_i). As nn \to \infty, the approximation converges to the true value, and for any finite nn, the expected value of the estimator equals E[g(x)]\mathbb{E}[g(x)] — this is what “unbiased” means.

For the second term of IUBAI_{UBA}, Ep(y)[logEp(x)[ef]]\mathbb{E}_{p(y)}[\log \mathbb{E}_{p(x)}[e^f]]: the inner expectation Ep(x)[ef]\mathbb{E}_{p(x)}[e^f] can be estimated unbiasedly with 1nief(xi,y)\frac{1}{n}\sum_i e^{f(x_i,y)}, but the outer log\log is nonlinear. Jensen’s inequality tells us E[log(estimate)]log(E[estimate])\mathbb{E}[\log(\text{estimate})] \neq \log(\mathbb{E}[\text{estimate}]), so plugging the sample mean into the log — log(1niefi)\log(\frac{1}{n}\sum_i e^{f_i}) — 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 IUBAI_{UBA} to achieve equality when q(xy)=p(xy)q(x \mid y) = p(x \mid y) (recovering IBA’s tightness condition):

q(xy)=p(x)Z(y)ef(x,y)=p(xy)=p(x,y)p(y)ef(x,y)=p(x,y)p(x)Z(y)p(y)=p(yx)Z(y)p(y)f(x,y)=logp(yx)+logZ(y)p(y)\begin{aligned} q(x \mid y) &= \frac{p(x)}{Z(y)} e^{f(x,y)} = p(x \mid y) = \frac{p(x,y)}{p(y)} \\ e^{f(x,y)} &= \frac{p(x,y)}{p(x)} \cdot \frac{Z(y)}{p(y)} = p(y \mid x) \cdot \frac{Z(y)}{p(y)} \\ f^*(x,y) &= \log p(y \mid x) + \log \frac{Z(y)}{p(y)} \end{aligned} f(x,y)=logp(yx)+c(y)\boxed{f^*(x,y) = \log p(y \mid x) + c(y)}

where c(y)=logZ(y)p(y)c(y) = \log \frac{Z(y)}{p(y)} is a function of yy alone.

3.3 IDV (Donsker-Varadhan) / MINE#

The problem: logE[ef]\log \mathbb{E}[e^f] is incalculable.

The strategy: use Jensen’s inequality to move it outside the log. Since log\log is concave, E[log]logE[]\mathbb{E}[\log \cdot] \leq \log \mathbb{E}[\cdot].

Step 1. Apply Jensen to the second term of IUBAI_{UBA}:

Ep(y)[logEp(x)[ef(x,y)]]logEp(y)[Ep(x)[ef(x,y)]]\mathbb{E}_{p(y)}\left[\log \mathbb{E}_{p(x)}[e^{f(x,y)}]\right] \leq \log \mathbb{E}_{p(y)}\left[\mathbb{E}_{p(x)}[e^{f(x,y)}]\right]

Step 2. Flip the inequality direction (since we subtract this term):

IUBA=Ep(x,y)[f]Ep(y)[logZ(y)]Ep(x,y)[f]logEp(y)[Z(y)]I_{UBA} = \mathbb{E}_{p(x,y)}[f] - \mathbb{E}_{p(y)}[\log Z(y)] \geq \mathbb{E}_{p(x,y)}[f] - \log \mathbb{E}_{p(y)}[Z(y)]

Step 3. Merge into a joint expectation: Ep(y)[Ep(x)[ef]]=Ep(x)p(y)[ef]\mathbb{E}_{p(y)}[\mathbb{E}_{p(x)}[e^f]] = \mathbb{E}_{p(x)p(y)}[e^f]:

IDV=Ep(x,y)[f(x,y)]logEp(x)p(y)[ef(x,y)](4)\boxed{I_{DV} = \mathbb{E}_{p(x,y)}[f(x,y)] - \log \mathbb{E}_{p(x)p(y)}[e^{f(x,y)}]} \tag{4}

This is the Donsker-Varadhan bound used by MINE. Because of Jensen, IDVIUBAII_{DV} \leq I_{UBA} \leq 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]I_{DV} = \mathbb{E}[f] - \log \mathbb{E}[e^f] is a lower bound on IUBAI_{UBA} (because E[logZ]logE[Z]\mathbb{E}[\log Z] \leq \log \mathbb{E}[Z]). But the Monte Carlo estimate of logE[ef]\log \mathbb{E}[e^f] effectively computes an approximation of E[f]\mathbb{E}[f] rather than logE[ef]\log \mathbb{E}[e^f], making the optimization target an upper bound on IUBAI_{UBA}. 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\log means the expected gradient of each batch is not equal to the true gradient. The optimizer is really optimizing Ebatch[log(1Bef)]\mathbb{E}_{\text{batch}}[\log(\frac{1}{B}\sum e^f)] rather than the theoretically required logEbatch[1Bef]\log \mathbb{E}_{\text{batch}}[\frac{1}{B}\sum e^f]. 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 ff 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.

3.4 ITUBA: A Truly Tractable Bound#

The problem: IDVI_{DV} from Jensen still contains logE[ef]\log \mathbb{E}[e^f], and its Monte Carlo estimate is not a bound.

The strategy: use a different inequality. For all x,a>0x, a > 0, we have logxxa+loga1\log x \leq \frac{x}{a} + \log a - 1.

Step 1. Let x=Ep(x)[ef(x,y)]=Z(y)x = \mathbb{E}_{p(x)}[e^{f(x,y)}] = Z(y) and a=a(y)a = a(y) (a positive function to be learned):

logZ(y)Z(y)a(y)+loga(y)1\log Z(y) \leq \frac{Z(y)}{a(y)} + \log a(y) - 1

Equality holds when a(y)=Z(y)a(y) = Z(y).

Step 2. Substitute into IUBAI_{UBA}:

IUBA=Ep(x,y)[f]Ep(y)[logZ(y)]Ep(x,y)[f]Ep(y)[Z(y)a(y)+loga(y)1]\begin{aligned} I_{UBA} &= \mathbb{E}_{p(x,y)}[f] - \mathbb{E}_{p(y)}[\log Z(y)] \\ &\geq \mathbb{E}_{p(x,y)}[f] - \mathbb{E}_{p(y)}\left[\frac{Z(y)}{a(y)} + \log a(y) - 1\right] \end{aligned}

Step 3. Expand Z(y)=Ep(x)[ef(x,y)]Z(y) = \mathbb{E}_{p(x)}[e^{f(x,y)}]:

ITUBA=Ep(x,y)[f]Ep(y)[Ep(x)[ef(x,y)]a(y)+loga(y)1](5)\boxed{I_{TUBA} = \mathbb{E}_{p(x,y)}[f] - \mathbb{E}_{p(y)}\left[\frac{\mathbb{E}_{p(x)}[e^{f(x,y)}]}{a(y)} + \log a(y) - 1\right]} \tag{5}

There is no more logE[]\log \mathbb{E}[\cdot]. 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)a(y).

3.5 INWJ (Nguyen-Wainwright-Jordan, 2010)#

The strategy: do not want to learn a(y)a(y)? Set it to a constant.

Step 1. Set a(y)=ea(y) = e (chosen to simplify the algebra):

ITUBA=Ep(x,y)[f]Ep(y)[Ep(x)[ef]e+loge1]I_{TUBA} = \mathbb{E}_{p(x,y)}[f] - \mathbb{E}_{p(y)}\left[\frac{\mathbb{E}_{p(x)}[e^{f}]}{e} + \log e - 1\right]

loge1=0\log e - 1 = 0, which drops out:

=Ep(x,y)[f]1eEp(y)[Ep(x)[ef]]= \mathbb{E}_{p(x,y)}[f] - \frac{1}{e} \mathbb{E}_{p(y)}\left[\mathbb{E}_{p(x)}[e^{f}]\right]

Step 2. Merge the double expectation Ep(y)Ep(x)=Ep(x)p(y)\mathbb{E}_{p(y)}\mathbb{E}_{p(x)} = \mathbb{E}_{p(x)p(y)}:

INWJ=Ep(x,y)[f(x,y)]e1Ep(x)p(y)[ef(x,y)](6)\boxed{I_{NWJ} = \mathbb{E}_{p(x,y)}[f(x,y)] - e^{-1}\, \mathbb{E}_{p(x)p(y)}[e^{f(x,y)}]} \tag{6}

Also known as the f-GAN bound or MINE-f. No a(y)a(y) is needed, but the critic must self-normalize.

Optimal critic. Via variational calculus:

δINWJδf=p(x,y)e1p(x)p(y)ef(x,y)=0\frac{\delta I_{NWJ}}{\delta f} = p(x,y) - e^{-1} p(x) p(y) e^{f(x,y)} = 0 ef(x,y)=ep(x,y)p(x)p(y)=ep(xy)p(x)e^{f^*(x,y)} = e \cdot \frac{p(x,y)}{p(x)p(y)} = e \cdot \frac{p(x \mid y)}{p(x)} f(x,y)=1+logp(xy)p(x)(7)\boxed{f^*(x,y) = 1 + \log \frac{p(x \mid y)}{p(x)}} \tag{7}

3.6 IJSI_{JS}: Training a Critic with JS Divergence (Practical Variant)#

Training a critic with INWJ’s own objective can be unstable — the efe^f term has high variance. The paper proposes an engineering compromise called IJSI_{JS}:

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,y)p(x)p(y)V(x,y) \approx \log \frac{p(x,y)}{p(x)p(y)}. JS training is far more stable than INWJ because it avoids the exponential efe^f term.

Second, evaluate MI by plugging VV into the INWJ formula:

IJS=1+Ep(x,y)[V(x,y)]Ep(x)p(y)[eV(x,y)]I_{JS} = 1 + \mathbb{E}_{p(x,y)}[V(x,y)] - \mathbb{E}_{p(x)p(y)}[e^{V(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 IJSI_{JS}.

4. Comparing the Unnormalized Bounds#

BoundDerivation TechniqueNo logE\log\mathbb{E} NestingStill a Bound After MCBiasVariance
IUBASubstitute energy-based formNo
IDV (MINE)Jensen lower boundYesNoLowHigh
ITUBAlogxx/a+loga1\log x \leq x/a + \log a -1YesYesLowHigh
INWJ (f-GAN)a(y)=ea(y) = e special caseYesYesUnbiased*High

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)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 xx to estimate Z(y)Z(y) per evaluation — all suffer from high variance, because Z(y)=Ep(x)[ef]Z(y) = \mathbb{E}_{p(x)}[e^{f}] is an estimate that depends heavily on the tails of the xx distribution.

The solution direction: use multiple samples within a batch to share the partition function estimate.

5. Multi-Sample Bounds: Reducing Variance with Batches#

5.1 The Idea#

Instead of using 1 sample xx to estimate Z(y)Z(y), use KK samples: Z(y)1Ki=1Kef(xi,y)Z(y) \approx \frac{1}{K}\sum_{i=1}^K e^{f(x_i, y)}. The cost is introducing bias (the estimator itself is no longer an unbiased estimate of Z(y)Z(y)), but the variance drops substantially.

5.2 Deriving InfoNCE from INWJ#

Step 0. Setup. We have one pair (x1,y)(x_1, y) from p(x1)p(yx1)p(x_1)p(y \mid x_1), and K1K-1 independent samples x2:KrK1(x)x_{2:K} \sim r^{K-1}(x). In practice rr is usually the data distribution p(x)p(x) itself. Denote x1:K=(x1,x2,,xK)x_{1:K} = (x_1, x_2, \ldots, x_K).

Since x2:Kx_{2:K} is independent of (x1,y)(x_1, 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)=ErK1(x2:K)[I(X1;Y)]I(X_1; Y) = \mathbb{E}_{r^{K-1}(x_{2:K})}[I(X_1; Y)]

I(X1;Y)I(X_1; Y) has nothing to do with x2:Kx_{2:K}. Taking the expectation over x2:Kx_{2:K}, the term I(X1;Y)I(X_1; 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.

ErK1(x2:K)[I(X1;Y)]=I(X1,X2:K;Y)\mathbb{E}_{r^{K-1}(x_{2:K})}[I(X_1; Y)] = I(X_1, X_{2:K}; Y)

By the chain rule of mutual information:

I(X1,X2:K;Y)=I(X1;Y)+I(X2:K;YX1)=0I(X_1, X_{2:K}; Y) = I(X_1; Y) + \underbrace{I(X_{2:K}; Y \mid X_1)}_{=0}

Since X2:KX_{2:K} is completely independent of (X1,Y)(X_1, Y), knowing X1X_1 does not create any information overlap between X2:KX_{2:K} and YY. The conditional mutual information is zero. Therefore:

I(X1;Y)=I(X1,X2:K;Y)(8)\boxed{I(X_1; Y) = I(X_1, X_{2:K}; Y)} \tag{8}

In one sentence: the extra negative samples are independent of (X1,Y)(X_1, Y), and through the chain rule they can be absorbed into I(X1,X2:K;Y)I(X_1, X_{2:K}; Y) without changing the true MI. The benefit is enormous — we can now apply INWJ to I(X1,X2:K;Y)I(X_1, X_{2:K}; Y) and let these “extra samples” help estimate the partition function.

Step 1. Construct a critic that considers all KK samples:

f(x1:K,y)=1+logef(x1,y)a(y;x1:K)(9)f(x_{1:K}, y) = 1 + \log \frac{e^{f(x_1, y)}}{a(y; x_{1:K})} \tag{9}

where a(y;x1:K)a(y; x_{1:K}) is a substitute for the partition function estimated from KK samples.

Step 2. Substitute (9) into the INWJ formula INWJ=Ep[f]e1Epp[ef]I_{NWJ} = \mathbb{E}_{p}[f] - e^{-1}\mathbb{E}_{p \otimes p}[e^{f}]:

IEp(x1:K)p(yx1)[1+logef(x1,y)a(y;x1:K)]e1Ep(x1:K)p(y)[e1+logef(x1,y)a(y;x1:K)]I \geq \mathbb{E}_{p(x_{1:K})p(y \mid x_1)}\left[1 + \log \frac{e^{f(x_1, y)}}{a(y; x_{1:K})}\right] - e^{-1}\, \mathbb{E}_{p(x_{1:K})p(y)}\left[e^{1 + \log \frac{e^{f(x_1, y)}}{a(y; x_{1:K})}}\right]

Step 3. Simplify the second term. Note e1+logefa=eefae^{1 + \log \frac{e^f}{a}} = e \cdot \frac{e^f}{a}:

Second term=e1Ep(x1:K)p(y)[eef(x1,y)a(y;x1:K)]=Ep(x1:K)p(y)[ef(x1,y)a(y;x1:K)]\begin{aligned} \text{Second term} &= e^{-1} \cdot \mathbb{E}_{p(x_{1:K})p(y)}\left[e \cdot \frac{e^{f(x_1, y)}}{a(y; x_{1:K})}\right] \\ &= \mathbb{E}_{p(x_{1:K})p(y)}\left[\frac{e^{f(x_1, y)}}{a(y; x_{1:K})}\right] \end{aligned}

Step 4. Choose a(y;x1:K)a(y; x_{1:K}) to be the sample mean:

a(y;x1:K)=m(y;x1:K)=1Ki=1Kef(xi,y)(10)\boxed{a(y; x_{1:K}) = m(y; x_{1:K}) = \frac{1}{K}\sum_{i=1}^{K} e^{f(x_i, y)}} \tag{10}

Now the second term has a crucial property — by symmetry, every xix_i in the batch has equal status:

Ep(x1:K)p(y)[ef(x1,y)m(y;x1:K)]=Ep(x1:K)p(y)[1Ki=1Kef(xi,y)m(y;x1:K)]=Ep(x1:K)p(y)[m(y;x1:K)m(y;x1:K)]=1\begin{aligned} \mathbb{E}_{p(x_{1:K})p(y)}\left[\frac{e^{f(x_1, y)}}{m(y; x_{1:K})}\right] &= \mathbb{E}_{p(x_{1:K})p(y)}\left[\frac{\frac{1}{K}\sum_{i=1}^K e^{f(x_i, y)}}{m(y; x_{1:K})}\right] \\ &= \mathbb{E}_{p(x_{1:K})p(y)}\left[\frac{m(y; x_{1:K})}{m(y; x_{1:K})}\right] \\ &= 1 \end{aligned}

Step 5. The second term is exactly 1, canceling with the +1+1 from the first term:

IEp(x1:K)p(yx1)[logef(x1,y)1Ki=1Kef(xi,y)]I \geq \mathbb{E}_{p(x_{1:K})p(y \mid x_1)}\left[\log \frac{e^{f(x_1, y)}}{\frac{1}{K}\sum_{i=1}^{K} e^{f(x_i, y)}}\right]

Step 6. Extend to the full batch. For a batch {(xi,yi)}i=1K\{(x_i, y_i)\}_{i=1}^{K}, each pair takes a turn as the positive:

INCE=E[1Ki=1Klogef(xi,yi)1Kj=1Kef(xi,yj)](12)\boxed{I_{NCE} = \mathbb{E}\left[\frac{1}{K}\sum_{i=1}^{K} \log \frac{e^{f(x_i, y_i)}}{\frac{1}{K}\sum_{j=1}^{K} e^{f(x_i, y_j)}}\right]} \tag{12}

This is InfoNCE — the core loss function of CPC and SimCLR.

5.3 Key Properties of InfoNCE#

Upper bound ceiling. INCElogKI_{NCE} \leq \log K. When the critic perfectly distinguishes positive from negative pairs, for each positive (xi,yi)(x_i, y_i) we have ef(xi,yi)ef(xi,yj)e^{f(x_i, y_i)} \gg e^{f(x_i, y_j)} for jij \neq i, the denominator approaches 1Kef(xi,yi)\frac{1}{K} e^{f(x_i, y_i)}, and the log term approaches logK\log K. This means: if the true I(X;Y)>logKI(X; Y) > \log K, InfoNCE is loose — batch size determines the ceiling on estimation accuracy.

Optimal critic. f(x,y)=logp(yx)+c(y)f^*(x, y) = \log p(y \mid x) + c(y), same as IUBA. The choice of c(y)c(y) does not change the value of InfoNCE — all critics of the form f(x,y)=logp(yx)+c(y)f(x,y) = \log p(y \mid x) + c(y) form an equivalence class within which InfoNCE takes identical values (Ma & Collins, 2018). The reason: for the ii-th term of the softmax, c(yi)c(y_i) appears simultaneously in the numerator and the j=ij=i term of the denominator and cancels out, while for jij \neq i terms, logp(yjxi)+c(yj)\log p(y_j \mid x_i) + c(y_j) has the same form, so the entire softmax does not depend on the specific choice of cc.

6. Interpolated Bound IαI_\alpha: The Bias-Variance Tradeoff#

6.1 Motivation#

BoundBiasVarianceReason
INWJ (α=0\alpha=0)LowHighDoes not use batch to share Z(y)Z(y) estimates
InfoNCE (α=1\alpha=1)HighLowReplaces Z(y)Z(y) with m(y)=1Kefm(y) = \frac{1}{K}\sum e^f

Can we interpolate continuously between the two?

6.2 Derivation#

Step 1. The key to InfoNCE’s derivation was choosing a(y;x1:K)=m(y;x1:K)a(y; x_{1:K}) = m(y; x_{1:K}) (the sample mean). What if we choose a convex combination of mm and some baseline q(y)q(y)?

aα(y;x1:K)=αm(y;x1:K)+(1α)q(y),α[0,1]a_\alpha(y; x_{1:K}) = \alpha \cdot m(y; x_{1:K}) + (1 - \alpha) \cdot q(y), \quad \alpha \in [0, 1]

where q(y)q(y) is any distribution. In practice it can be a uniform distribution, or a neural network can learn q(y)q(y) as in IJSI_{JS}.

Step 2. Substitute aαa_\alpha into equation (9), then into INWJ:

Iα=1+Ep(x1:K)p(yx1)[logef(x1,y)αm+(1α)q(y)]Ep(x1:K)p(y)[ef(x1,y)αm+(1α)q(y)](13)I_\alpha = 1 + \mathbb{E}_{p(x_{1:K})p(y \mid x_1)}\left[\log \frac{e^{f(x_1,y)}}{\alpha \cdot m + (1-\alpha) \cdot q(y)}\right] - \mathbb{E}_{p(x_{1:K})p(y)}\left[\frac{e^{f(x_1,y)}}{\alpha \cdot m + (1-\alpha) \cdot q(y)}\right] \tag{13}

Step 3. Boundary cases:

α=0\alpha=0 gives a0=q(y)a_0 = q(y), reverting to INWJ. α=1\alpha=1 gives a1=m(y)a_1 = m(y), reverting to InfoNCE.

6.3 Upper Bound#

IαlogKα\boxed{I_\alpha \leq \log \frac{K}{\alpha}}
α\alphaEquivalent BoundUpper Bound
00INWJNo upper bound limit
0.50.5Intermediatelog2K\log 2K
11InfoNCElogK\log K

The practical takeaway: smaller α\alpha gets closer to the true MI (low bias) but with high variance and unstable training; larger α\alpha gives more stable training (low variance) but may underestimate MI. You can tune α\alpha according to the demands of the task.

7. Structured Bounds: When p(yx)p(y \mid x) Is Tractable#

In representation learning, YY is the learned representation, and the encoder p(yx)p(y \mid x) is itself tractable (e.g., a Gaussian distribution). In this setting we can do something cleaner.

7.1 InfoNCE with Tractable Conditional#

Directly substitute the optimal critic form f(x,y)=logp(yx)f(x,y) = \log p(y \mid x) into InfoNCE (recall c(y)c(y) cancels in the softmax):

IE[1Ki=1Klogp(yixi)1Kj=1Kp(yixj)](14)\boxed{I \geq \mathbb{E}\left[\frac{1}{K}\sum_{i=1}^{K} \log \frac{p(y_i \mid x_i)}{\frac{1}{K}\sum_{j=1}^{K} p(y_i \mid x_j)}\right]} \tag{14}

7.2 Leave-One-Out Upper Bound#

Step 1. Return to the VAE-style upper bound from Section 2.1:

IEp(x)[DKL(p(yx)q(y))]I \leq \mathbb{E}_{p(x)}\left[D_{KL}(p(y \mid x) \parallel q(y))\right]

Step 2. Approximate q(y)q(y) using the other samples in the batch. Given a batch {(xi,yi)}i=1K\{(x_i, y_i)\}_{i=1}^K, estimate q(y)q(y) for the ii-th sample using the remaining K1K-1:

qi(y)=1K1jip(yxj)q_i(y) = \frac{1}{K-1} \sum_{j \neq i} p(y \mid x_j)

Step 3.

Ep(xi)[DKL(p(yxi)qi(y))]=Ep(xi)p(yxi)[logp(yxi)qi(y)]=E[logp(yixi)1K1jip(yixj)]\begin{aligned} \mathbb{E}_{p(x_i)}[D_{KL}(p(y \mid x_i) \parallel q_i(y))] &= \mathbb{E}_{p(x_i)p(y \mid x_i)}\left[\log \frac{p(y \mid x_i)}{q_i(y)}\right] \\ &= \mathbb{E}\left[\log \frac{p(y_i \mid x_i)}{\frac{1}{K-1}\sum_{j \neq i} p(y_i \mid x_j)}\right] \end{aligned}

Averaging over the batch:

IE[1Ki=1Klogp(yixi)1K1jip(yixj)](17)\boxed{I \leq \mathbb{E}\left[\frac{1}{K}\sum_{i=1}^K \log \frac{p(y_i \mid x_i)}{\frac{1}{K-1}\sum_{j \neq i} p(y_i \mid x_j)}\right]} \tag{17}

7.3 The Sandwich Bound#

Compare the lower bound (14) and upper bound (17): the only difference is whether the denominator includes the sample itself.

p(yixi)1Kjp(yixj)Lower bound: denominator includes self, smaller    True MI    p(yixi)1K1jip(yixj)Upper bound: denominator excludes self, larger\underbrace{\frac{p(y_i \mid x_i)}{\frac{1}{K}\sum_{j} p(y_i \mid x_j)}}_{\text{Lower bound: denominator includes self, smaller}} \;\leq\; \text{True MI} \;\leq\; \underbrace{\frac{p(y_i \mid x_i)}{\frac{1}{K-1}\sum_{j \neq i} p(y_i \mid x_j)}}_{\text{Upper bound: denominator excludes self, larger}}

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(yx)p(y \mid x) is known, INWJ’s critic does not need to be learned from scratch. Recall INWJ’s optimal critic f(x,y)=1+logp(xy)p(x)f^*(x,y) = 1 + \log \frac{p(x \mid y)}{p(x)}. Using Bayes’ rule p(xy)=p(yx)p(x)p(y)p(x \mid y) = \frac{p(y \mid x) p(x)}{p(y)}:

f(x,y)=1+logp(yx)p(y)f^*(x,y) = 1 + \log \frac{p(y \mid x)}{p(y)}

But we do not know p(y)p(y). Introduce a variational distribution q(y)q(y) to replace it:

f(x,y)=1+logp(yx)q(y)\boxed{f(x,y) = 1 + \log \frac{p(y \mid x)}{q(y)}}

The critic is now reparameterized to require only learning q(y)q(y) (typically a small network), rather than learning a full (x,y)R(x,y) \to \mathbb{R} critic from scratch. Substituting this form into INWJ:

IEp(x,y)[1+logp(yx)q(y)]e1Ep(x)p(y)[ep(yx)q(y)]I \geq \mathbb{E}_{p(x,y)}\left[1 + \log \frac{p(y \mid x)}{q(y)}\right] - e^{-1}\, \mathbb{E}_{p(x)p(y)}\left[e \cdot \frac{p(y \mid x)}{q(y)}\right]

After simplification, this yields a bound that only needs q(y)q(y). The form is structurally symmetric with the VAE-style upper bound IEp(x)[DKL(p(yx)q(y))]I \leq \mathbb{E}_{p(x)}[D_{KL}(p(y \mid x) \parallel q(y))]: one evaluates KL between p(yx)p(y \mid x) and q(y)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=1dI(X;Yi)I(X;Y)TC(Y) = \sum_{i=1}^d I(X; Y_i) - I(X; Y)

where Y=(Y1,,Yd)Y = (Y_1, \ldots, Y_d) is a dd-dimensional representation. TC(Y)TC(Y) measures the statistical dependence among the dimensions of the representation — the smaller TC(Y)TC(Y) is, the more disentangled the representation.

Using the Section 7.1 lower bound to sandwich I(X;Y)I(X; Y) and the Section 7.2 upper bound to sandwich each I(X;Yi)I(X; Y_i), one can constrain TC(Y)TC(Y) using only the tractable encoder p(yx)p(y \mid x) and a single batch, with no additional networks. This provides an information-theoretic foundation for disentanglement methods like β\beta-VAE and FactorVAE.

8. Summary: How All Bounds Relate#

The hierarchy of bounds, starting from mutual information I(X;Y)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)h(X), which is intractable — and unnormalized bounds, where q=(p/Z)efq = (p/Z) e^f.

The unnormalized path leads to IUBA, which successfully removes h(X)h(X) but leaves logE[ef]\log \mathbb{E}[e^f] 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 logxx/a+loga1\log x \leq x/a + \log a - 1, yielding a tractable bound at the cost of learning a(y)a(y). INWJ/f-GAN sets a(y)=ea(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\alpha=1: high bias, low variance, with an upper ceiling of logK\log K. The interpolated bound IαI_\alpha allows tuning α(0,1)\alpha \in (0,1), with an upper ceiling of log(K/α)\log(K/\alpha), trading off continuously between bias and variance.

When the encoder p(yx)p(y \mid x) is tractable, substituting f=logp(yx)f = \log p(y \mid x) into either InfoNCE or IαI_\alpha 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 ii-th sample participates in its own denominator.

Three Core Takeaways#

  1. MINE is not a bound in empirical practice: the Monte Carlo estimate of logE[ef]\log \mathbb{E}[e^f] reverses the Jensen direction relative to the theoretical bound.
  2. The bias-variance tradeoff is tunable: NWJ (α=0\alpha = 0) sits at one end, InfoNCE (α=1\alpha = 1) at the other, and IαI_\alpha adjusts α\alpha to balance between them.
  3. When p(yx)p(y \mid 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 IDVI_{DV} bound with neural networks and is subsumed as a special case within this unified framework.

On Variational Bounds of Mutual Information
https://ru00ys-lab.com/blog/variational-bounds-of-mutual-information
Author Ru00y
Published at June 25, 2026

Enjoyed this post? Never miss out on future posts

Loading comments...

Best in the dark?

This site looks its best in dark mode. Give it a try!