| KSG (classical) | 0.12 |
| MINDE (trained) | 0.064 |
| ALICE Base | 0.054 |
Mutual information without training: method, architecture, and benchmarks
Giulio Franzese · Simone Rossi · Pietro Michiardi
\[\MI(X;Y)=\KL{p_{XY}}{p_X\otimes p_Y}=\E\!\left[\log\frac{p_{XY}(x,y)}{p_X(x)\,p_Y(y)}\right]\]
\(X\) and \(Y\) can be vectors: a whole population, a whole trajectory.
Channel view: \(X\) is the message, and \(Y\) is the received signal. \(\MI(X;Y)\) is the information available at the receiver. The accuracy of a decoder tells how much of it that specific decoder uses.
More than 80 years of research in a few slides. First, the classical ones:
No training, few samples needed. All three break down as the dimension grows.
Second, the variational estimators (MINE, InfoNCE, NWJ):
Donsker-Varadhan Theorem: \[\KL{\mu}{\chi}=\sup_{T:\Omega\rightarrow\mathbb{R}}\;\E_\mu[T]-\log \E_\chi [\exp(T)]\]
From all possible functions \(T\) to the smaller class of neural networks: \[\MI(X;Y)\;\geq\; \sup_{\theta}\;\E_{p_{XY}}[T^\theta]-\log \E_{p_X\otimes p_Y} [\exp(T^\theta)]\]
Third, the diffusion estimators. They start from noise.
Take a clean sample \(x_0\) and mix it with Gaussian noise \(\epsilon\): \[x_t=(1-t)\,x_0+t\,\epsilon,\qquad t\in[0,1]\] At \(t=0\): the data. At \(t=1\): pure noise.
The denoiser is the best guess of the clean sample, given the noisy one: \[D_t(x)=\E\!\left[x_0 \mid x_t=x\right]\]
Every distribution has its own denoiser. A sample that looks like noise is pulled back toward the regions where that distribution has its data.
Our result (MINDE, ICLR 2024): two distributions differ as much as their denoisers disagree.
\[\KL{p^A}{p^B}=\int_0^1\frac{1-t}{t^3}\;\E_{p^A}\!\left[\norm{D^A_t(x_t)-D^B_t(x_t)}^2\right]dt\]
For MI, compare the denoiser of the joint with the denoisers that see one variable clean:
\[\MI(X;Y)=\int_0^1\frac{1-t}{t^3}\;\E\Big[\underbrace{\norm{D_t(x_t,y_t)|_X-D_t(x_t\mid y_0)}^2}_{\text{denoise } X\text{: joint against } Y \text{ clean}}+\underbrace{\norm{D_t(x_t,y_t)|_Y-D_t(y_t\mid x_0)}^2}_{\text{denoise } Y\text{: joint against } X \text{ clean}}\Big]\,dt\]
In MINDE, we train a neural network to be these denoisers: state of the art on difficult distributions.
Problem: every accurate estimator is trained anew for each distribution, and needs many samples.
What neural estimators require
What many problems provide
Classical learning
In-context learning
For us, a task is a distribution:
The learning algorithm is executed inside the forward pass of the Transformer.
The context and the query are concatenated into one input.
| \(x_1\) | \(x_2\) | \(y_1\) | \(y_2\) | ||
|---|---|---|---|---|---|
|
context \(n\) clean samples |
0.31 | -1.20 | 0.84 | 0.02 | |
| -0.55 | 0.47 | -0.91 | 1.33 | ||
| 1.02 | 0.08 | 1.75 | -0.40 | ||
| ⋮ | ⋮ | ⋮ | ⋮ | ||
|
query time \(t\) |
0.77 | -0.35 | 0.63 | 0.21 | → \(D_t(x_t\mid y_0)\) |
Orange cells: noised, to be predicted. White cells of the query: shown clean, as evidence.
Three masks give the three denoisers of the MI identity:
One training episode:
A different distribution at every step: to predict well, our model must infer the distribution from the context.
No MI labels are needed, and none are used.
\[\mathcal{L}(\theta)=\E_{p,\,\cC,\,z_0,\,t,\,\epsilon,\,m}\left[\frac{1}{\norm{m}_1}\,\norm{m\odot\big(v_\theta(z_t,t,m;\cC)-(z_0-\epsilon)\big)}^2\right]\]
The minimizer is the posterior-predictive velocity \(v^\star=\E[z_0-\epsilon\mid z_t,m,\cC]\): the Bayes-optimal answer given the context. As \(n\to\infty\) it converges to the velocity of the true distribution, and the MI estimator becomes exact.
Every task is a joint distribution of \((X,Y)\), cheap to sample, with no MI label.
| Family | How a task is drawn | What it varies |
|---|---|---|
| Copula mixtures (40%) | 1 to 60 Gaussian or Student-t components; random low-rank or sparse correlations; random invertible warps | Dependence strength, heavy tails, multimodality, independent blocks |
| Latent warps | Gaussian mixtures along a random curve, pushed through shifts, sinusoidal folds, and rotations | Nonlinear and non-invertible dependence |
| Random regressions | \(Y\) is a random smooth function of a Gaussian \(X\), plus noise | Nonlinear conditional mean, controlled noise level |
| Manifolds | Points on a curve or a surface, thickened by a small noise | Thin, near-singular supports |
One step of softmax attention is one retrieval step of a dense associative memory (Ramsauer et al., 2021):
\[x\;\leftarrow\;\sum_{k=1}^{n}\operatorname{softmax}_k\!\big(\beta\,\langle x, z^{(k)}\rangle\big)\,z^{(k)}\]
In-context denoising as retrieval (Smart et al., 2025): the context samples are the stored patterns, and the noisy query is the probe. The output is a kernel-weighted average of the context: an estimate of the posterior mean.
| Small | Base | |
|---|---|---|
| Hidden dimension | 384 | 768 |
| Layers | 5 | 6 |
| Attention heads | 8 | 12 |
| Induced latents \(K\) | 128 | 128 |
| Relation features \(R\) | 16 | 16 |
| Parameters | 19M | 85M |
| Training, 2 H200 GPUs | 2 d 22 h | 5 d 10 h |
The parameter count does not depend on the joint width or on the context length.
For comparison, to our understanding InfoAtlas requires 2 weeks on 16 H800 GPUs.
The dataset is the context. Nothing is trained.
\[\widehat{\MI}(X;Y)=\frac{1}{N}\sum_{i=1}^{N}\frac{1-t_i}{t_i^3}\Big[\norm{\hat D^{(i)}_{XY}\big|_X-\hat D^{(i)}_{X\mid Y}}^2+\norm{\hat D^{(i)}_{XY}\big|_Y-\hat D^{(i)}_{Y\mid X}}^2\Big]\]
Velocity: a rescaled denoiser, \(v_t(x)=(D_t(x)-x)/t\). It is the quantity used in the paper and in the code.
40 tasks of the “Beyond Normal” benchmark (Czyż et al., 2023): joint widths 2 to 100, heavy tails, nonlinear warps, known ground truth.
Mean absolute error in nats; lower is better. Rows: 1k, 5k, and 10k samples. Columns: task families. Stars mark the lowest error. Every competitor is trained and tuned on each task.
Mean absolute error over the 40 tasks, in nats:
| Estimator | 1k | 5k | 10k |
|---|---|---|---|
| ALICE Base (zero-shot) | 0.092 | 0.063 | 0.060 |
| MINDE (trained) | 0.353 | 0.070 | 0.065 |
| InfoNCE (trained) | 0.887 | 0.123 | |
| CCA (best other at 1k) | 0.195 | ||
| InfoAtlas (zero-shot) | 0.25 to 0.28 |
Key finding: with 1k samples, our estimator has less than half the error of every other estimator.
Error against inference compute. Labels: number of samples given to ALICE.
| Estimator | 1k | 5k | 10k | |
|---|---|---|---|---|
| Zero-shot | ALICE Base | 0.092 | 0.063 | 0.060 |
| ALICE Small | 0.101 | 0.103 | 0.104 | |
| InfoAtlas | 0.253 | 0.271 | 0.276 | |
| Trained | MINDE | 0.353 | 0.070 | 0.065 |
| MINE | 0.248 | 0.117 | 0.108 | |
| InfoNCE | 0.887 | 0.123 | 0.083 | |
| D-V | 1.229 | 0.279 | 0.144 | |
| NWJ | >10 | 1.261 | 0.130 | |
| Classical | KSG | 0.288 | 0.240 | 0.219 |
| LNN | 4.864 | 4.966 | 4.970 | |
| CCA | 0.195 | 0.192 | 0.181 |
Mean absolute error over the 40 tasks, in nats.
Protocol
The trained estimators need the step from 1k to 5k samples to become usable.
The same two axes on the benchmark. Mean absolute error in nats.
| KSG (classical) | 0.12 |
| MINDE (trained) | 0.064 |
| ALICE Base | 0.054 |
| KSG (classical) | 0.68 |
| MINDE (trained) | 0.060 |
| ALICE Base | 0.086 |
| KSG (classical) | 0.19 |
| MINDE (trained) | 0.12 |
| ALICE Base | 0.079 |
| KSG (classical) | 0.76 |
| MINDE (trained) | 1.44 |
| Best competitor (CCA) | 0.42 |
| ALICE Base | 0.15 |
Classical: fails on wide tasks at every budget (on width up to 4, KSG is at 0.06 with 1k samples and 0.03 with 10k). Trained: the best on wide tasks at 10k, unusable at 1k. ALICE: below 0.16 nats in the four quadrants.
| Tasks | 1k | 5k | 10k | |
|---|---|---|---|---|
| ALICE Base | width 2 to 10 | 0.079 | 0.057 | 0.054 |
| width 50, 100 | 0.153 | 0.090 | 0.086 | |
| ALICE Small | width 2 to 10 | 0.081 | 0.077 | 0.074 |
| width 50, 100 | 0.197 | 0.228 | 0.241 | |
| InfoAtlas | width 2 to 10 | 0.100 | 0.117 | 0.123 |
| width 50, 100 | 0.978 | 0.998 | 1.000 |
Mean absolute error in nats: 33 tasks of joint width up to 10, and 7 tasks of width 50 and 100.
ALICE Base with 10k samples: 35 of the 40 tasks are within 0.1 nats of the ground truth, and the mean signed error is \(-0.005\) nats. There is no global bias.
Two groups of tasks carry the error:
| Group | Error | Joint width |
|---|---|---|
| Spiral embeddings | under-estimated by 0.43 and 0.44 nats | 6 and 10 |
| under-estimated by 0.18 nats | 50 | |
| Dense multivariate normals | over-estimated by 0.15 nats | 50 |
| over-estimated by 0.23 nats | 100 |
ALICE Small shares both failure modes, with larger magnitudes.
Identities that MI satisfies for every distribution (Song and Ermon, 2020). \(A\in\bbR^{N}\) is a sample, and \(B_r\) its first \(r\) coordinates.
| Test | Identity | Ideal |
|---|---|---|
| Baseline | \(r\mapsto\MI(A;B_r)\) is non-decreasing, and \(\MI(A;B_0)=0\) | normalized curve from 0 to 1 |
| Data processing | \(\MI(A;[B_{r+k},B_r])=\MI(A;B_{r+k})\) | ratio 1 |
| Additivity | \(\MI([A^1,A^2];[B^1_r,B^2_r])=2\,\MI(A^1;B^1_r)\), with \(A^1,A^2\) independent | ratio 1 |
The same weak points as the benchmark with ground truth, located without any ground truth: a label-free check on new data.
One table: rows are samples, columns are variables, split into an \(X\) block and a \(Y\) block.
import math, torch
from alice import load_model, estimate_mi_fast
model = load_model("eurecom-probai/alice-1.0-base", device="cuda")
joint = torch.cat([x, y], dim=1) # (n_samples, d_x + d_y), raw values
d_x = x.shape[1]
mi, se = estimate_mi_fast(
model, joint,
slice(0, d_x), # X block
slice(d_x, joint.shape[1]), # Y block
n_context=512, # rows that determine the distribution
return_std=True, # Monte Carlo standard error
)
print(f"I(X;Y) = {mi / math.log(2):.2f} ± {se / math.log(2):.2f} bits")One estimate costs a few forward passes, so a loop gives a whole profile:
notebooks/alice_mi_tutorial.ipynbFree for noncommercial use (PolyForm Noncommercial license).
Thank you!
Every weight is shared across rows and columns. A larger table has more tokens, and the same parameters (85M for ALICE Base).
How do the columns talk to each other? Their dependence changes with every distribution.
The weights of the graph are shared across all pairs of columns: the same model works at joint width 2 and at joint width 100.
Two learned feature maps \(\ell,r:\bbR\to\bbR^{R}\) (\(R=16\)), shared across columns and rows, centered over the context:
\[c_{ij}=\frac{1}{2n}\sum_{k=1}^{n}\Big(\tilde\ell_i^{(k)}\odot\tilde r_j^{(k)}+\tilde r_i^{(k)}\odot\tilde\ell_j^{(k)}\Big)\in\bbR^{R}\]
A signed, gated edge for every head \(h\), and the message received by column \(i\):
\[A_{ij}^{(h)}=\tanh\!\big(w_s^{(h)\top} c_{ij}+b_s^{(h)}\big)\,\sigma\!\big(w_g^{(h)\top} c_{ij}+b_g^{(h)}\big),\qquad u_i^{(h)}=\frac{\sum_{j\ne i}A_{ij}^{(h)}\,\mathbf{r}_j^{(h)}}{\max\!\big(1,\sum_{j\ne i}|A_{ij}^{(h)}|\big)}\]
“How much does A tell us about B?” Shannon’s answer (1948): Mutual Information.
| Question | Setting |
|---|---|
| How much does the array tell us about the intended movement? | BMI decoding |
| Which channels carry that information, and at which latency? | Electrode selection |
| How many motor outputs can a stimulation protocol select? | Spinal stimulation |
| How much cortical information reaches the muscles below the lesion? | Recovery |
| Do areas, muscles, or electrodes act redundantly or synergistically? | Networks, cultures |
The challenge: these quantities are hard to estimate from a few hundred trials.
Data: Visual Behavior Neuropixels, Allen Institute.
Question: do the six areas carry overlapping information about a flash, or complementary information? Does it depend on what the mouse has already seen?
\[\Omega=\underbrace{\TC}_{\text{total correlation}}-\underbrace{\DTC}_{\text{dual total correlation}}\]
Both terms are integrals of squared denoiser differences, of the same form as MI:
One model provides all of them: 13 denoisers per evaluation point.
Previous analysis (score-based, trained)
With ALICE
Left: novel-image sessions, one thin line per mouse and flash type, medians in bold. Right: novel minus familiar session of each mouse, change flashes.
Key finding: a novel image drives a signal that is broadcast across the visual areas, and it fades with familiarity. The pooled analysis cannot see it.
A cell is a communication channel: an extracellular stimulus is the input, and the response of a signaling pathway is the output.
Data (Jetka et al., 2019): the NF-\(\kappa\)B pathway, which responds to the inflammatory cytokine TNF-\(\alpha\).
Question: how many doses can a single cell tell apart? Does it use the dynamics of the response, or its amplitude at one time?
MI depends on how often each dose is used. It decomposes over the doses:
\[\MI(X;Y)=\sum_i p_i\,D_i,\qquad D_i=\KL{p(y\mid \text{dose } i)}{p(y)}\]
Protocol: contexts of 1,024 cells. No training on biological data.
Probability of correct discrimination for every pair of doses: from the frame at minute 21 (left), from the trajectory (center), and the gain from dynamics (right). 0.5 is chance.
A promoter is the stretch of regulatory DNA that a gene needs to be expressed. It contains motifs: short patterns such as the TATA-box, about 30 bases upstream of the transcription start site (TSS).
Data: Arabidopsis thaliana sequences from the EPD database.
Question: which positions of the sequence tell whether it is a promoter?
\[\MI(\text{promoter label};\;\text{window of 6 bases at position } s)\qquad\text{for every } s\]
The label is binary and balanced: no window can carry more than \(\ln 2\approx 0.69\) nats.
ALICE was trained on continuous data. DNA is a sequence of four symbols.
Protocol: for each of the 246 window positions, a context of 1,024 label-window pairs, and 1,024 held-out pairs for evaluation.
The whole dataset has 2,994 sequences: an order of magnitude below what trained neural estimators require.
The trained competitor (INFO-SEDD, a discrete diffusion estimator) reports a single peak, with a substantially higher bias floor.