Learning-Progress Sampling for Histology-Guided Spatial Transcriptomics

Spatial transcriptomics measures which genes are active at each location in an intact tissue slice. It is expensive. A stained microscope image of the same slice (an H&E slide) is nearly free, and models can already predict a rough expression map from the image alone. That makes a budgeted design question practical. Given the full image and enough money to measure expression at only a few hundred locations, which locations should be measured, one batch at a time, so that the image-to-expression model fills in the rest of the slide as accurately as possible? The obvious answer is to measure wherever the model is most surprised. Reinforcement learning research on curiosity shows why that answer fails. An agent rewarded for prediction error fixates on sources of irreducible randomness, the "noisy TV" problem. Spatial count data is full of such randomness: dropout rates near 90%, degraded tissue, folds, and expression driven by factors the image cannot see.

We propose to borrow the fix that the exploration literature found most robust, learning progress. The idea is to reward measuring where the model's error is actually going down, rather than where it is high. We apply it at the level of morphologically defined tissue regions. A region whose errors stay high because of technical noise, or because its expression cannot be inferred from the image, stops attracting measurements. A region whose predictions improve with each measurement keeps attracting them until it is learned. In two sentences: treat each region of a histology slide as a slot-machine arm whose payoff is the drop in held-out prediction error after measuring there, and spend the measurement budget on the arms that are still paying off. We test whether this beats diversity sampling and standard model-uncertainty sampling, especially on slides with artifacts and heterogeneous tumors.

Core Claim

Selecting where to measure on a slide faces two distinct "noisy TVs." The first is count-level technical noise. The second, which we think matters more and has been overlooked, is biology that H&E morphology cannot see. Scores that subtract predicted noise variance handle only the first. Learning progress measured on held-out spots within a region handles both, because neither kind of error shrinks when you collect more data from that region. We predict that on clean slides, learning progress roughly ties diversity sampling. On slides with artifacts or image-invisible heterogeneity, it reaches a target accuracy with substantially fewer measured spots. If it does not, the conclusion is that simple diversity sampling suffices, which is also worth knowing.

Relation to Prior Work

The exploration side supplies the method. Early intrinsic-motivation work (Intrinsically Motivated Reinforcement Learning) rewarded unpredicted events and observed a natural easy-to-hard curriculum. Curiosity-driven Exploration by Self-supervised Prediction and Surprise-Based Intrinsic Motivation for Deep Reinforcement Learning made prediction error the standard novelty signal. Two papers constrain the design by documenting how that signal breaks. How to Stay Curious while avoiding Noisy TVs using Aleatoric Uncertainty Estimation subtracts a learned noise variance from the error, which keeps MiniGrid agents exploring where plain error curiosity flatlined. Beyond Noisy-TVs: Noise-Robust Exploration Via Learning Progress Monitoring rewards the decrease in error over time. It reports that its bonus decays to zero on pure noise in about 150 steps versus 400 for the variance-subtraction method on Noisy MNIST, and only a 12.4% coverage drop versus up to 85% for baselines on noisy MountainCar. We reuse the learning-progress idea. We drop its main weakness, the extra network trained to predict past error, by computing progress directly from cross-fitted held-out error, which is cheap because spots, unlike game frames, are few.

The spatial side supplies the regime and shows the gap. Two methods already produce uncertainty estimates for spatial expression, and both use them only after the data are collected. Cross-Modal Imputation and Uncertainty Estimation for Spatial Transcriptomics fits count likelihoods to impute genes and outputs per-spot uncertainty on a fixed array. TISSUE wraps any imputation tool in conformal prediction intervals and discards high-uncertainty cells, cutting false discoveries by up to 50%. Neither decides what to measure next. TISSUE's filtering also risks throwing away the rare, atypical niches, such as the immunosuppressive hubs that Starfysh finds in metaplastic breast cancer. We treat those niches as acquisition targets instead. The image-to-expression models we build on are also passive: STFlow generates whole-slide expression by flow matching, and the foundation models benchmarked on HEST-1k and in HEST-1k: A Dataset For Spatial Transcriptomics and Histology Image Analysis HEST-1k: A Dataset For Spatial Transcriptomics and Histology Image Analysis all regress expression from fixed, fully measured slides.

One result motivates our focus on the second kind of noise. HESCAPE found that aligning image and expression embeddings degraded gene prediction relative to a plain Gigapath encoder, and it attributes this partly to batch effects. Image-invisible variation is therefore large enough to mislead training. We expect it to mislead acquisition in the same way.

Research Program

The model for each slide is deliberately simple, so that differences come from the acquisition rule. The image patch under every spot is embedded once with a frozen pathology encoder: UNI as the main choice, with H-Optimus-0 as a check, since (HEST-1k: A Dataset For Spatial Transcriptomics and Histology Image Analysis; HEST-1k: A Dataset For Spatial Transcriptomics and Histology Image Analysis) found it best on average. A small ensemble of heads, optionally initialized from other slides, predicts the mean and dispersion of a negative binomial distribution for each target gene. The negative binomial is the standard count model for overdispersed expression.

The slide is partitioned into $C$ regions by clustering the image embeddings, so regions are defined only from information available before any measurement. Acquisition then proceeds in rounds. Measured spots in each region are split into two halves. Each half is scored by a model that never saw it, giving a held-out negative-binomial deviance $D_c(t)$ for region $c$ after round $t$. Deviance here is the per-spot negative log-likelihood, so it penalizes both wrong means and wrong spread. The learning-progress score of a region is

$$ \mathrm{LP}_c(t) = D_c(t-\Delta) - D_c(t) + \frac{\beta}{\sqrt{n_c(t)+1}}, $$

where $\Delta$ is a lag of a few rounds, $n_c(t)$ is the number of spots measured in region $c$, and $\beta$ sets a small optimism bonus so that unvisited regions get tried. The bonus form follows standard upper-confidence-bound bandits.

Irreducible error contributes equally to both deviance terms and cancels. A region full of dropout artifacts, or one whose expression is unrelated to its morphology, therefore earns a score near zero once it has been sampled a few times. Each round picks the highest-scoring regions. Within each chosen region, it picks the spot where the ensemble's predicted means disagree most, with spatial spreading to avoid adjacent duplicates.

We deliberately do not train a reinforcement-learning policy that moves across the slide. Measuring a spot carries no travel cost and does not change the tissue, so the problem is a non-stationary bandit, and a learned policy would add variance without adding information.

Baselines

The naive reference point is uniform random spot selection under the same budget and the same model. Next to it, as a naive spatial design, is a regular grid at matching density. The ceiling is the same model trained on every spot of the slide, which shows how much of full-supervision accuracy each method recovers.

The strongest competitor is diversity sampling: greedy k-center selection in the frozen foundation-model embedding space. It ignores labels entirely, and we expect it to be hard to beat, because foundation embeddings already separate tissue types well.

The strongest uncertainty competitor is spot-level ensemble disagreement over predicted negative-binomial means. This is the standard active-learning measure of model uncertainty, and it already separates model uncertainty from count noise. A third competitor applies TISSUE-style conformal interval width (TISSUE) as an acquisition score, choosing spots with the widest calibrated intervals. Two region-level controls share our clustering and bandit machinery but swap the score. The first scores each region by its current held-out error, the analog of raw curiosity. The second scores it by error minus predicted negative-binomial variance, the analog of variance subtraction.

Two ablations isolate our key ingredient. One replaces held-out deviance with training-set deviance. The other varies the region count $C$ from 4 to 64, which tests whether the benefit comes from grouping spots by morphology at all.

Every method uses the same encoder, the same head architecture and ensemble size, identical initial random seeds of 10 spots, batches of 10, and the same total compute. Hyperparameters ($\beta$, $\Delta$, $C$ for ours; ensemble size and k-center distance for the baselines) receive an equal tuning budget on a held-out set of HEST-1k slides that is never used for reporting.

For reference numbers, the file contains no absolute gene-prediction correlation for any fully supervised model. HEST-1k reports H-Optimus-0 as best on average across its nine tasks, STFlow reports an 18% average relative improvement over UNI and Gigapath, and HESCAPE reports Gigapath as highest correlation on its 5K panel, all without values in the file. No reported result found on Lacuna for budgeted or active spot selection on any spatial transcriptomics benchmark. We will therefore report full-supervision correlations ourselves as the ceiling.

Beating the strongest baseline means two things. On clean slides, the area under the accuracy-versus-budget curve must not be significantly below k-center. On artifact-bearing or heterogeneous slides, our method must need at least 25% fewer spots than both k-center and ensemble disagreement to reach 95% of full-supervision accuracy, with paired significance across slides.

Why not just…?

Why not just measure a random subset or a grid? For a homogeneous tissue this may be nearly optimal, and we will report that honestly. Random coverage, though, spends its budget in proportion to area. In tumors the informative structures, such as immune hubs and invasive fronts, can be small. The rare-region recall experiment below measures directly whether random and grid sampling miss them at small budgets.

Why not just sample where predicted error is highest? Error cannot be observed before a spot is measured. It can only be extrapolated from measured neighbors, and the extrapolation inherits the noisy-TV pathology. Regions with dropout or folded tissue keep high error forever. The exploration results above show plain error curiosity collapsing under injected noise (How to Stay Curious while avoiding Noisy TVs using Aleatoric Uncertainty Estimation). Our region-error control tests the same failure on tissue, and the artifact-injection check measures how much budget it wastes.

Why not just use ensemble disagreement, which already targets model uncertainty rather than noise? This is the real threat. In principle disagreement shrinks with data even where expression is invisible in the image. Our hypothesis is that at budgets of a few hundred spots it shrinks too slowly there, and keeps pulling measurements into regions where the image carries no signal. The shuffled-region check is designed to settle exactly this. If disagreement abandons the shuffled region as fast as learning progress does, our main advantage disappears. In that case we would report learning progress as at most a cheap, ensemble-free equivalent.

Why not just use diversity sampling in foundation-model space? It needs no labels, and on clean slides it may match us. It cannot learn that a morphologically distinct region is uninformative or saturated, so it keeps allocating the same share of spots to every region. The comparison under artifacts and the per-round allocation traces will show whether that rigidity actually costs accuracy.

Why not just filter uncertain spots afterward, as TISSUE does? Filtering improves analyses of data already paid for, but it cannot buy new data. It also removes exactly the atypical spots that rare niches produce. We include conformal width as an acquisition baseline to separate "calibrated uncertainty" from "learning progress" as the useful signal.

Proposed Experiments

All main experiments are retrospective simulations. Each spot's expression stays hidden until the spot is "measured." We use HEST-1k Visium slides with the HEST-Benchmark highly variable gene panels (HEST-1k), stratified into tumor and non-tumor tissue. Generality to single-cell-resolution Xenium data is checked on HESCAPE slides (HESCAPE). The primary metric is mean per-gene Pearson correlation on unmeasured spots of the same slide, plotted against budgets from 20 to 300 spots and summarized by area under that curve and by spots needed to reach 95% of the full-supervision ceiling. A secondary metric is held-out negative-binomial deviance.

Three decisive checks decide the claim. In the artifact check, we binomially thin counts by 90% inside a contiguous patch covering 10% of a slide, mimicking a degraded region, and record the fraction of budget each method spends there. We predict raw-error selection spends heavily there and learning progress spends little after a few rounds.

In the invisible-biology check, we shuffle expression vectors among spots within one morphology region. Shuffling keeps the marginal statistics but breaks any link between image and expression, so no image-based method can predict that region. Every method's spending on it is then compared, with ensemble disagreement as the critical contrast.

In the rare-niche check, we cluster the full ground-truth expression of tumor slides, define clusters covering under 3% of spots as rare, and measure both how many rare clusters are represented among acquired spots and the prediction accuracy within them. This tests directly whether acquiring uncertain regions, the opposite of TISSUE-style filtering, finds niches that random, grid, and diversity sampling miss.

A final cross-slide variant starts the heads from a model trained on other HEST-1k slides. It asks whether learning progress that stalls early on a new slide flags batch discordance, the failure HESCAPE attributes to batch effects, faster than raw error does.