Two very different measurement systems share one problem: most of their numbers are zero, and a zero can mean two things. In spatial transcriptomics, a technique that counts gene transcripts at thousands of small spots across a tissue slice, a zero may mean the gene is silent there or that the assay failed to catch its few molecules. In vector surveillance at the edge between towns and farmland, a mosquito trap with no infected pools may mean the virus is not circulating there or that too few mosquitoes were tested to find it. Both fields already use "zero-inflated" models, which mix a "truly absent" switch with a count distribution. They do not tie that switch to the one quantity that separates the two meanings: how much looking was done. In tissue, that is the number of transcripts captured at a spot. In surveillance, it is the number of pools tested at a trap.
We propose a zero-inflated negative binomial (ZINB) model in which the "truly absent" probability is forbidden from depending on sampling effort, and effort enters only as a scaling of the expected count. Because effort varies across otherwise similar spots or traps, this constraint makes true absence identifiable in a way an unconstrained gate is not. We build it as the output layer of a model that predicts gene expression from ordinary stained microscope slides (hematoxylin and eosin, H&E), test it on HEST-1k, and then apply the same estimator to West Nile virus surveillance in agricultural Italy. In that second setting, telling "absent" from "undersampled" decides where control effort should go.
Core Claim
The negative binomial is a count distribution whose variance can exceed its mean. For an observation $i$ (a spot-gene pair or a trap-week) with count $y_i$ and recorded effort $s_i$, we model
$$P(y_i) = \pi(x_i)\,\mathbb{I}(y_i=0) + \big(1-\pi(x_i)\big)\,\mathrm{NB}\big(y_i \mid s_i\,\rho(x_i),\ \theta\big),$$
where $x_i$ is the context the predictor sees (an H&E image patch, or habitat and weather around a trap). $\pi(x_i)$ is the probability of true absence. $\rho(x_i)$ is the expected count per unit of effort, and $\theta$ is the dispersion. The gate $\pi$ is computed from $x_i$ alone and never sees $s_i$.
The consequence is easy to see. As effort grows, the negative binomial's probability of producing a zero shrinks toward zero, but the structural zero does not. Comparing low-effort and high-effort observations with similar context therefore pins down $\pi$. The file flags trade-offs between $\pi$ and dispersion as a known instability of ZINB decoders. Our claim is that anchoring to effort removes most of that trade-off. It also makes $\pi$ interpretable as "absent," not as a free parameter that absorbs whatever the count model fits badly.
Relation to Prior Work
Histology-to-expression models supply the backbone and the benchmark, and they motivate the gap. HiST runs a sparse hierarchical transformer over tissue spots and regresses expression. HistoPrism regresses about 39,000 genes directly and shows that errors on individual genes wash out at the pathway level. MoLF and Stem generate expression through flow matching or diffusion in a continuous latent space to avoid averaged, smeared outputs. None of them gives a calibrated probability that a gene is absent at a spot, and none models raw counts given capture depth. We reuse their image encoders and change the output distribution and loss.
Count models for measured spatial data supply the likelihood but not the cross-modal setting. The ZINB graph autoencoder, DisConST, and single-cell autoencoders such as Yu et al. reconstruct measured counts with free per-entry gates. They never predict from images, and their gates are not tied to effort.
Peri-urban epidemiology supplies the second application and its strongest classical competitor. Cox et al. fit a two-part hurdle model with a spatial random field to ten years of Emilia-Romagna trapping. It links presence to agricultural land cover and a roughly 13°C minimum temperature. Its presence component is not conditioned on how many pools were tested, so "no positive pool" and "no circulation" are merged. The Beijing analysis of hantavirus by Fang et al., with paddies and orchards raising incidence and built-up land lowering it, and the satellite graph model MAGAT both motivate the regime: risk concentrates where habitat and people overlap, which is also where surveillance is patchy.
We deliberately do not claim the file's speculative Gap 3, virtual spatial transcriptomics on wild rodent tissue along urban gradients. No paired data exist in the file, and building them is a separate project.
Research Program
The tissue arm builds on a shared image encoder from the HEST-1k foundation-model line. On top of it sit three heads: a gate head for $\pi$, a rate head for $\rho$, and per-gene dispersions $\theta$. The model is trained by negative log-likelihood on raw counts, with the spot's total captured transcripts used as $s_i$. We will stabilize training with the gate initialized near zero and log-parameterized rates, which addresses the dead-gradient issue the file attributes to forcing sparsity through activations (Lu et al.). An optional term penalizes a high gate at a spot whose physical neighbors show high predicted rate, which targets the "dropout flagged among expressing neighbors" failure listed as open.
The surveillance arm uses the identical likelihood. Here $s_i$ is the number of pools tested in a trap-week, and $x_i$ is land cover, temperature, and spatial location, encoded either by a small network or by the same spatial random field Cox et al. use. Keeping the field fixed isolates the effect of the effort anchor.
Baselines
The naive reference in tissue is predicting each gene's training-set mean at every spot. In surveillance it is a model that predicts presence from trap identity and season alone. Every method must beat these on held-out likelihood and zero calibration, or it is not learning context.
The strongest point-prediction competitor is HistoPrism, which reports a micro-average Pearson correlation of 0.318 on HEST-1k across ten cancer types, against 0.292 for STPath (HistoPrism). HiST reports a Pearson correlation of 0.59 and $R^2$ of 0.34 on its HEST-1k split (HiST). MoLF reports a zero-shot mouse-melanoma correlation of 0.202 (MoLF). We will retrain HistoPrism and MoLF on the same splits, with the same frozen image encoder and an equal hyperparameter search budget, so that only the output layer differs. We do not expect to beat their correlations by much. Beating them means matching their correlation within noise while giving much better calibrated zero probabilities and higher held-out count likelihood. No reported result was found on Lacuna for zero-probability calibration or count likelihood on HEST-1k, so those numbers will come from our reruns.
The strongest surveillance competitor is the Cox et al. hurdle model, which reports a presence/absence AUC of 0.891. We will refit it on the same years and folds. Beating it means equal or better AUC plus better calibration specifically in low-effort trap-weeks, where the two models disagree by design.
Two ablations isolate the key ingredient. The first is an unconstrained ZINB whose gate may depend on everything, including effort. The second is a plain negative binomial with an effort offset and no gate at all.
Why not just…?
Why not just regress log-transformed expression with mean squared error and aggregate to pathways, as HistoPrism does? For correlation and pathway coherence, this may well tie us, and HistoPrism's results suggest it will. It cannot answer "is this gene off here," because it outputs no probability, and squared error on zero-heavy data pulls predictions toward the mean, as ScRAE argues. The thinning experiment below tests whether this matters in practice. If a regressor's predicted values, thresholded, recover structural zeros as well as our gate does, we will report that the gate adds nothing beyond interpretability.
Why not just use a negative binomial with an effort offset and drop the zero-inflation gate entirely? This is the most serious threat. For capture-based counts, a well-specified negative binomial scaled by depth may already explain the zeros. It is our second ablation. Our model contains it as the case $\pi = 0$, so the comparison is a direct test of whether structural absence exists beyond what depth explains. If the offset-only model matches us on held-out likelihood and zero calibration in tissue, we will say so and concentrate the claim on surveillance. There, ecological absence, meaning unsuitable habitat, is much more plausibly real.
Why not just keep the classical hurdle model for surveillance? It is well established, and it is strong on a dataset of about 70 traps. We keep its spatial field and change only how effort enters, so any gain is attributable to the anchor rather than to deep learning. If the effort-conditioned hurdle and our model are indistinguishable, the contribution reduces to "add pools tested as a covariate of detection." That would still be useful, and we would report it that way.
Why not just use a generative flow model like MoLF, which already captures multimodal expression? MoLF models a continuous latent space and does not represent counts given depth, so its sampled outputs carry no explicit notion of detection. We will decode MoLF samples to counts and compare their zero rates against observed zeros across depth bins. If MoLF's zero rates track depth correctly, the gap we target is smaller than we think.
Decisive Checks
The central tissue experiment uses binomial thinning. We take high-depth HEST-1k spots and randomly downsample their transcripts to several lower depths. Thinning creates new technical zeros while leaving the set of truly silent genes unchanged by construction. A correct gate should keep $\pi$ nearly constant across thinning levels while the rate absorbs the change. An unconstrained ZINB's gate should inflate. A mean-squared-error regressor's predictions should shrink at low depth with no way to say why. We will measure gate drift against thinning fraction and Brier score for structural zeros defined at full depth. Head-to-head correlation against HistoPrism, HiST, and MoLF on the standard top-50 variable genes and on the Gene Pathway Coherence benchmark checks that nothing is lost. Cross-species transfer to mouse slides, as in MoLF's evaluation, checks whether the gate generalizes.
The central surveillance experiment applies, given access to the Emilia-Romagna data, leave-one-season-out validation. The key test uses an independent signal: wild-bird WNV positivity, which Cox et al. find predicts mosquito presence (coefficient 0.776). It is withheld from training. In trap-weeks with zero positive pools, our model's $1-\pi$ should be higher where nearby birds were positive and few pools were tested, and lower where many pools were tested and birds were negative. The hurdle baseline, blind to effort, should separate these cases less well. We will also map predicted true absence against agricultural land cover. The test is whether the model separates "habitat unsuitable" from "undersampled" in the peri-urban fringe, which matters most for where to add traps. If the Emilia-Romagna data are unavailable, the surveillance arm shrinks to a simulation study, because the SIMAN dataset used by MAGAT lacks effort counts. We state that limitation up front.
References
- HiST: A Hierarchical Sparse Transformer for Cross-Modal Spatial Transcriptomics Modeling
- HistoPrism: Unlocking Functional Pathway Analysis from Pan-Cancer Histology via Gene Expression Prediction
- MoLF: Mixture-of-Latent-Flow for Pan-Cancer Spatial Gene Expression Prediction from Histology
- Diffusion Generative Modeling for Spatially Resolved Gene Expression Inference from Histology Images
- Flexible integration of spatial and expression information for precise spot embedding via ZINB-based graph-enhanced autoencoder
- DisConST: Distribution-aware Contrastive Learning for Spatial Domain Identification
- ZINB-Based Graph Embedding Autoencoder for Single-Cell RNA-Seq Interpretations
- Meteorological and environmental drivers of West Nile virus prevalence in Culex pipiens mosquitoes in Emilia-Romagna, Italy in 2013 to 2022
- Spatiotemporal Dynamics of Hemorrhagic Fever with Renal Syndrome, Beijing, People’s Republic of China
- Spotting Virus From Satellites: Modeling the Circulation of West Nile Virus Through Graph Neural Networks
- Sparse autoregressive models for scalable generation of sparse images in particle physics
- scRAE: Deterministic Regularized Autoencoders With Flexible Priors for Clustering Single-Cell Gene Expression Data