We introduce SpatialWhisperer: zero-shot cell-type annotation of H&E images, learned from molecular measurements of single cells.
International Conference on Machine Learning (ICML), 2026 · Seoul, Korea
Cancer diagnosis depends on identifying cells in tissue images, which today still takes time-consuming assays or expert annotation. We built SpatialWhisperer, a model that annotates cell types in H&E images zero-shot, learned from abundant molecular measurements of single cells.
Rich single-cell identity annotations are abundant in the transcriptomics domain, but absent for histopathology images. We transfer this knowledge to H&E by composing two paired data sources: spatial transcriptomics pairs images (I) with gene expression (G); single-cell atlases pair gene expression (G) with text (T) annotations. Gene expression is the shared bridge that transitively links images to text.
SpatialWhisperer aligns the three modalities in one shared embedding space. Training uses 921K I↔G pairs from HEST-1K and 1.08M G↔T pairs from CellWhisperer; the shared G modality transitively induces I↔T, which is never directly trained. A single InfoNCE objective combines the two losses, L = LIG + LGT. Encoders are UNI2 (image), Geneformer (expression) and BioBERT (text); the UNI2 and Geneformer backbones stay frozen, while the BioBERT text encoder and all projection heads are trained.
SpatialWhisperer zero-shot annotates cell types in H&E image patches, outperforming all five tested baselines in mean AUROC across three independent benchmarks.
To explain why an alignment we never train on (I↔T) should emerge, we relate its loss to the quality of the two observed pairs. Encoder quality is captured by the two margins we care about in contrastive learning: matched pairs are close (similarity ≥ 1−ε) and mismatched pairs stay far apart (≤ η).
Our finding: the unobserved I↔T InfoNCE loss is provably upper-bounded by (ε, η) and tightens as the observed pairs align (ε, η ↓).
1. The value of task-matched data. Transitive data helps most when task-specific labels are scarce (low-N).
2. Bridge-modality overlap. Imperfect overlap in the shared bridge adds only O(√δ) slack (deviation δ), so transfer degrades gracefully. Harmonizing annotation style (curation) raises image ↔ text similarity and improves typing.
SpatialWhisperer transfers the rich cell-type knowledge of single-cell transcriptomics onto ordinary histopathology images, zero-shot and without task-specific labels, turning cheap and ubiquitous H&E into a molecularly interpretable, cell-resolved readout.
Outlook. Applying SpatialWhisperer to emerging single-cell-resolution spatial data is a natural next step, which we expect to sharpen alignment and further boost performance.
@inproceedings{schaefer2026transitive,
title={Transitive Representation Learning Enhances Histopathology Annotation},
author={Schaefer, Moritz and Piran, Zoe and Walter, Nils Philipp
and Awasthi, Animesh and Bock, Christoph
and Leskovec, Jure and Good, Zinaida},
booktitle={Proceedings of the 43rd International Conference on Machine Learning},
series={Proceedings of Machine Learning Research},
publisher={PMLR},
year={2026}
}