arXiv:2611.02681cs.LGNov 2026

Manuscript Offprint

arXiv:2611.02681

HistoTx: Early fusion of H&E images and spatial transcriptomics at varying spatial transcriptomics resolution with self-supervised learning

Alice Driessen, Emil Malmsten, Steffen Wolf, Bernd Illing, Isinsu Katircioglu, Adriano Martinelli, Rolf Stahel, Solange Peters, Enriqueta Felip, Sanjay Popat, Krisztian Homicsko, Raphael Gottardo, Marianna Rapsomaniki, Fei Tang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Spatial transcriptomics maps gene expression across tissue sections and, when integrated with whole slide images, jointly captures both morphological architecture and molecular activity to provide a rich, multimodal view of tissue biology. ML approaches combining spatial transcriptomics and WSIs typically learn a mapping from morphological features to molecular profiles via contrastive alignment or supervised fine-tuning of pathology foundation models. In both cases, transcriptomics serves as a training signal rather than a true input modality, leaving inference fundamentally image-driven. We propose an early-fusion vision transformer architecture in which transcript tokens are constructed at arbitrary spatial resolution, merged with image patch tokens, and jointly processed through a shared transformer stack for deep cross-modal interaction. Starting from a pretrained vision-only pathology foundation model, we train HistoTx by continuing self-supervised pretraining on paired image and spatial transcriptomics data and demonstrate that: 1) at inference with image only, performance remains on par with the baseline on most tasks while improving on tasks that inherently benefit from molecular knowledge, such as gene expression prediction; 2) when both modalities are available at inference, jointly providing image and transcript inputs outperforms either modality alone.

1. Introduction

Hematoxylin and eosin (H&E)-stained whole slide images (WSIs) are the gold standard for cancer diagnosis, routinely used for tumor detection, subtyping, and clinical decision making, yet their interpretation remains a labor-intensive task demanding years of specialized pathologist training (Thomas & Button, 2015). Recent advances in artificial intelligence have led to the emergence of large pathology foundation models trained on vast collections of WSIs, achieving strong performance across a broad range of clinically relevant tasks (Wang et al., 2022; Chen et al., 2024; Xu et al., 2024), yet their capabilities remain limited for tasks that could benefit from additional molecular knowledge.

In parallel, advances in spatial transcriptomics (ST) technologies now enable molecular profiling directly on tissue sections, facilitating precise cell type identification, detection of functional cell states, and richer tumor characterization (Jain & Eadon, 2024). ST data comes in different formats depending on the platform. For example, high-resolution Xenium data consists of individual transcript detections, each annotated with its spatial location and gene identity but limited to a fixed gene panel. By contrast, Visium data is whole-transcriptome based and consists of a regular grid of barcoded spots, each with a diameter of 55 µm, where transcripts are aggregated into a single expression profile per spot. Due to the different nature and granularity of the ST data it is nontrivial to train a model on both Xenium and Visium data. In fact most models use only on spot-based (Chen et al., 2025; Chung et al., 2024; Pang et al., 2021; Xie et al.; Hemker et al., 2026; Zhan et al.) or probe-based data (Fu et al., 2025; Martinelli et al., 2026; Gindra et al., 2025) for training. To our best knowledge, only MINT (Lee et al., 2026) is able to encode both modalities with one model, however this model is limited to one learnable ST token.

To leverage molecular information alongside histology, early approaches trained supervised models to predict gene expression directly from H&E images (Schmauch et al., 2025; Chung et al., 2024; Nonchev et al., 2025; Pang et al., 2021; Hu et al., 2026). More recently, methods inspired by CLIP

¹kaiko.ai, Zürich, Switzerland ²Biomedical Data Science Center, Lausanne University Hospital, Lausanne, Switzerland ³Swiss Institute of Bioinformatics (SIB), Lausanne, Switzerland ⁴ETOP IBCSG Partners Foundation ⁵Vall d'Hebron University Hospital, Barcelona, Spain ⁶The Royal Marsden, London, United Kingdom ⁷Department of Oncology, Lausanne University Hospital, Lausanne, Switzerland ⁸Faculty of Biology and Medicine, University of Lausanne, Lausanne, Switzerland ⁹School of Life Sciences, Ecole Polytechnique Fédérale de Lausanne, Lausanne, Switzerland. Correspondence to: Alice Driessen alice.driessen@kaiko.ai, Fei Tang fei@kaiko.ai.

Preprint. November 3, 2026.

have employed contrastive learning to align image and ST embeddings in a shared latent space, using the transcriptomic modality merely as a supervision signal to guide visual representation learning (Chen et al., 2025; Zhang et al., 2026; Xie et al.; Hemker et al., 2026). Multimodal fusion is reduced to late-stage feature-level concatenation or averaging, rather than being deeply integrated into the model architecture. We argue that this image-centric strategy is well motivated in practice: given the high cost of ST, molecular profiles are rarely available in routine clinical workflows, whereas H&E images are inexpensive and virtually ubiquitous. Leveraging limited ST data as a supervision signal to endow the image encoder with molecular knowledge is therefore a natural and clinically practical design choice. However, existing contrastive approaches apply this supervision crudely, typically at the coarse patch level, failing to exploit the fine-grained spatial correspondence between transcript distributions and image content. At the same time, in the cases where transcriptomics data are available at inference, deeper and more principled multimodal fusion beyond simple concatenation or averaging remains desirable to fully exploit the complementary information carried by both modalities, as can be achieved by early-fusion (Martinelli et al., 2026).

We present HistoTx, an early-fusion multimodal transformer building on (Martinelli et al., 2026) that integrates H&E images and ST. We extend the architecture to accommodate both Visium and Xenium platforms by constructing spatially aligned image and transcript tokens at multiple spatial resolutions, merging them into a joint token sequence, and processing them through a shared transformer stack for deep cross-modal interaction. HistoTx is trained by continuing DINOv2 (Oquab et al., 2024) self-supervised pretraining on paired image and ST data, warm-started from a pretrained vision-only pathology foundation model. By constructing tokens at multiple spatial resolutions, the model captures biological structures across scales, from subcellular transcript patterns to tissue-level morphology. The two main contributions of this work are:

  • Multimodal self-supervised pretraining: a training strategy that continues DINOv2 pretraining on paired image and ST data from a vision-only pathology foundation model, yielding a model that retains strong image-only performance, improves on tasks requiring molecular knowledge, and further benefits when both modalities are available at inference.

  • Flexible transcript tokenization strategy: This enables a single backbone to handle both Xenium and Visium data, allowing training on the full HEST-1k (Jaume et al., 2024) dataset and broadening exposure to diverse tissues, gene panels, and spatial scales.

References (68)