← All publications

ALICE: In-context, Zero-shot, Mutual Information Estimation

  • Generative Modeling
  • Diffusion Models

ALICE estimates mutual information from samples using a frozen transformer trained on synthetic distributions, replacing per-distribution fitting with in-context velocity-field estimation.

Paper arXiv preprint 2026

Giulio Franzese1, Simone Rossi1, Pietro Michiardi1

  1. EURECOM

Mutual-information estimators often require a new neural network for every distribution, making repeated analyses expensive when samples are scarce. We introduce ALICE, a transformer pretrained on synthetic distributions that estimates dependence from a clean sample context with frozen weights. It predicts rectified-flow velocity fields and combines their differences into mutual information. On the 40-task Beyond Normal benchmark, ALICE Base achieves the lowest mean absolute error at matched budgets of 1,000, 5,000, and 10,000 samples.

Pretraining from synthetic sample contexts and frozen estimation using three noising masks
Pretraining regresses velocity targets from synthetic distributions. At inference, one context and three aligned masked queries produce the information estimate, replacing distribution-specific optimization with forward evaluations.

Turning statistical dependence into velocity differences

For variables XX and YY with joint density pXYp_{XY} and marginals pX,pYp_X,p_Y, mutual information measures departure from independence:

MI⁡(X;Y)=KL⁡ ⁣[pXY ∥ pX⊗pY].\operatorname{MI}(X;Y)=\operatorname{KL}\!\left[p_{XY}\,\|\,p_X\otimes p_Y\right].

Direct density estimation is difficult in high dimensions. We instead represent a distribution through a field along a path from data to independent Gaussian noise. For Z0∼pXYZ_0\sim p_{XY}, independent ϵ∼N(0,I)\epsilon\sim\mathcal N(0,I), and t∈[0,1]t\in[0,1], we use

Zt=(1−t)Z0+tϵ,vt(z)=E[Z0−ϵ∣Zt=z].Z_t=(1-t)Z_0+t\epsilon, \qquad v_t(z)=\mathbb E[Z_0-\epsilon\mid Z_t=z].

The sign convention points toward clean data. Let zt=(xt,yt)z_t=(x_t,y_t), and let vt(xt∣y0)v_t(x_t\mid y_0) denote the field obtained by noising XX while holding YY clean. For smooth densities with finite second moments, finite KL divergence, and vanishing boundary terms, mutual information satisfies

MI⁡(X;Y)=∫011−tt E[∥vt(zt)∣X−vt(xt∣y0)∥2+∥vt(zt)∣Y−vt(yt∣x0)∥2] dt.\begin{aligned} \operatorname{MI}(X;Y) &=\int_0^1\frac{1-t}{t}\,\mathbb E\Big[ \left\|v_t(z_t)|_X-v_t(x_t\mid y_0)\right\|^2\\ &\hspace{5.6em}+\left\|v_t(z_t)|_Y-v_t(y_t\mid x_0)\right\|^2 \Big]\,\mathrm dt. \end{aligned}

Here ∣X|_X and ∣Y|_Y select coordinate blocks. A shared noise draw aligns the three evaluations. The squared differences measure how the field changes when the other block becomes clean evidence. Monte Carlo averaging over held-out samples, times, and noise approximates the integral.

Learning fields from a sample context

ALICE conditions its prediction vθ(zt,t,m;C)v_\theta(z_t,t,m;C) on clean samples CC. A binary mask mm selects noised coordinates; the others remain observed. For synthetic distributions p∼Tp\sim\mathcal T, we minimize

L(θ)=E ⁣[∥m⊙(vθ(zt,t,m;C)−(z0−ϵ))∥2∥m∥1].\mathcal L(\theta)=\mathbb E\!\left[ \frac{\left\|m\odot\big(v_\theta(z_t,t,m;C)-(z_0-\epsilon)\big)\right\|^2}{\|m\|_1} \right].

The expectation covers distributions, contexts, clean queries, uniform times, independent Gaussian noise, and nonzero masks. The sampled target is available directly, so pretraining needs neither density values nor mutual-information labels. At inference, disjoint context and evaluation sets avoid reusing query samples as conditioning evidence; a coordinate-wise copula map is fitted on the context.

ALICE architecture showing cached context processing, induced latents, relation graph, and query decoding
Shared scalar projections and a context-derived relation graph connect coordinates; induced latents summarize samples. The context branch is cached, allowing repeated velocity queries without rebuilding the representation.

A fixed bank of induced tokens compresses each coordinate's context. Learned nonlinear feature covariances form a relation graph that carries cross-coordinate dependence. Context-dependent attention grows linearly with sample count at a fixed latent budget; the relation graph retains a quadratic dependence on dimension. A boundary parameterization enforces v0(z)=zv_0(z)=z, controlling positive bias near the integral's large (1−t)/t(1-t)/t weight.

We also use frozen context-conditioned predictors to construct conformal regression intervals.

Accuracy, context length, and model capacity

Every benchmark estimator receives the same sample budget. ALICE reserves 64 samples for queries and uses the remainder as context, with 64 time draws per query and eight independent context draws. Base achieves MAEs of 0.092, 0.063, and 0.060 nats at the three budgets; the best competing values are 0.195, 0.070, and 0.065.

Category-wise estimation errors at three sample budgets across Gaussian families, transformed distributions, and geometric tasks
Rows vary the total sample budget and columns group the 40 benchmark tasks. ALICE leads every group at 1,000 samples; geometric tasks remain challenging. Stars mark each group's lowest error and triangles indicate off-scale values.
Mutual-information mean absolute error against inference FLOPs for ALICE Small, ALICE Base, and InfoAtlas
Increasing context improves Base while Small plateaus, exposing a capacity-dependent trade-off. At 8,192 samples, Base reaches 0.060 nats for 1.6×10131.6\times10^{13} inference FLOPs per task; pretraining cost is outside this comparison.

Contexts above the final 2,048-sample training window require extrapolation. Base underestimates spiral embeddings and overestimates dense high-dimensional Gaussians, locating specific limits of the pretrained estimator.

Scientific analyses with the same frozen model

The applications test transfer to data absent from pretraining. In single-cell signaling, contexts contain 1,024 cells; estimated channel capacity compares individual measurements with prefixes of NF-K\mathcal KB response trajectories.

Cellular responses by stimulus dose, single-frame channel capacity, and capacity from growing trajectory prefixes
Across 11 TNF-α\alpha doses, single-frame capacity peaks around 15–21 minutes, while early trajectory prefixes carry more information. Temporal structure helps distinguish stimuli whose response amplitudes overlap. Response bands show interquartile ranges at extreme doses; capacity bands span seeds.

For promoter localization, we score six-base windows using 1,024 context pairs and 1,024 held-out pairs from a balanced Arabidopsis TATA-promoter dataset, a positive control for localization. In mouse visual cortex, matched 128-flash contexts support separate estimates for each session and flash type.

Information between promoter labels and six-base DNA windows along their offset from the transcription start site
The strongest peak occurs 32 bases upstream of the transcription start site, within the known TATA-box region. A smaller peak localizes the initiator element; the dotted line marks the binary-label entropy ceiling.
Session-wise redundancy across six visual areas and paired differences between novel and familiar image sessions
O-information compares redundant with synergistic dependence among multiple variables. Its positive value indicates redundancy across six areas, peaking at 100–150 ms in novel-image sessions. Paired session contrasts expose experience-dependent structure that pooling across animals can obscure.
Familiar-session redundancy and paired flash-type and experience contrasts across five post-stimulus windows
The paired contrasts separate familiar from novel sessions and change from repeated flashes. The change-versus-repeat effect depends on experience and response window, showing how the measured redundancy varies across experimental conditions.

In the neuroscience data, familiar sessions precede novel sessions by one day, so experience and recording order remain coupled. The scientific applications assess localization and consistency; their underlying mutual information is unknown.