Transitive Representation Learning Enhances Histopathology Annotation

Moritz Schaefer, Zoe Piran, Nils Philipp Walter, Animesh Awasthi, Christoph Bock, Jure Leskovec, Zinaida GoodICML 2026

The Challenge: The Annotation Bottleneck in Histopathology

While artificial intelligence holds immense promise for clinical decision-making in histopathology, its potential is currently bottlenecked by the coarse-grained nature of available training data. Most AI models are trained on whole-slide images paired with high-level pathology reports. These reports describe large tumor regions but miss the crucial identities, states, and interactions of the thousands of individual cells within the tissue.

Manually labeling millions of cells is prohibitively expensive and time-consuming. Alternatively, spatial transcriptomics—which measures gene expression at specific physical locations on a slide—provides a highly accurate molecular ground truth, but it remains too costly for routine clinical use. The core challenge is teaching a model to recognize specific cell types in standard, inexpensive Hematoxylin and Eosin (H&E) images without relying on massive datasets of manually labeled cells.

The Solution: SpatialWhisperer and Transitive Learning

To bridge this gap, researchers introduce SpatialWhisperer, a trimodal contrastive learning framework. Instead of relying on the standard bimodal approach (Image $\leftrightarrow$ Text), SpatialWhisperer introduces a third modality: Gene Expression (G).

Gene expression serves as a biological "bridge" or semantic anchor. By leveraging community-scale datasets where images are paired with gene expression (Spatial Transcriptomics) and datasets where gene expression is paired with cell-type text labels (Single-cell RNA-seq), the model learns to transitively link histopathology images with natural language descriptions.

Trimodal Alignment Methodology

SpatialWhisperer utilizes three specialized, pre-trained encoders to process the distinct data types:

  • UNI 2 for encoding histopathology images.
  • Geneformer for processing gene expression profiles.
  • BioBERT for understanding natural language descriptions.

The model is trained using an InfoNCE loss function to project all three modalities into a shared 2048-dimensional embedding space. Crucially, it learns to align Images (I) and Text (T) transitively through their mutual alignment with Gene Expression (G). The authors provide mathematical proof demonstrating that tightening the alignment between the observed pairs (I-G and G-T) effectively places an upper bound on the loss of the unobserved pair (I-T), inducing a strong transitive alignment.

Key Insights and Results

The model was trained on a massive scale using HEST-1K (921k image-gene pairs) and CellWhisperer (~1M gene-text pairs). It was then evaluated across three independent cell-typing benchmarks: PathoCell (colorectal cancer), Lizard (colon adenocarcinoma), and PanNuke (spanning 19 different organs).

  • State-of-the-Art Accuracy: SpatialWhisperer achieved relative AUROC gains of 13.9% on PathoCell, 15.9% on Lizard, and 13.9% on PanNuke over the strongest published baselines (including CONCH, PLIP, and OmiCLIP).
  • Zero-Shot Flexibility: Because the model understands the underlying relationship between morphology and molecular signatures, it can accurately identify cell types it was never explicitly shown in an image-text pair. Users can simply query the embedding space with a text prompt like "T-cells" to perform zero-shot cell type annotation directly from H&E images.
  • Biological Sensitivity and Robustness: The model proved particularly effective at identifying immune and vasculature cells, which possess distinct gene expression signatures. Performance gains were consistent across 19 tissues and 20 cell types, demonstrating broad generalizability.
  • Data Efficiency: Transitive learning acts as a powerful regularizer. In low-data regimes where direct image-text pairs are scarce, leveraging the gene expression bridge provides a massive performance boost that traditional bimodal models cannot match.
  • Style Harmonization: The researchers found that transitive learning is sensitive to dataset "drift." Using Large Language Models (LLMs) to rewrite image captions to match the technical style of single-cell annotations significantly boosted overall performance.

Limitations and Future Directions

While SpatialWhisperer establishes a new paradigm for fine-grained histopathology interpretation, the authors note a few limitations. Current image inputs operate at the "patch" level (roughly 10–50 cells), though the ultimate goal is true single-cell resolution as sub-cellular spatial data becomes more widely available. Additionally, there is a "gene bottleneck"—not all tissue features, such as physical cellular architecture, are fully captured by gene expression alone and might still benefit from direct image-text supervision.

Finally, while technically impressive, the model has not yet undergone prospective clinical validation and is not intended for diagnostic use. Future work will explore alternative encoders and adapter mechanisms to better handle the inherent heterogeneity of different spatial transcriptomics assays.

Summary updated

BibTeX
@inproceedings{schaefer2026transitive,
  author = {Moritz Schaefer and Zoe Piran and Nils Philipp Walter and Animesh Awasthi and Christoph Bock and Jure Leskovec and Zinaida Good},
  title = {{Transitive Representation Learning Enhances Histopathology Annotation}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Ze7U293Zw4},
}
Figure