Spatially Gene Expression Prediction using Dual-Scale Contrastive Learning

Mingcheng Qu, Yuncong Wu, Donglin Di, Yue Gao, Tonghua Su +2 more
6/30/2025
10 citations
cs.CV
contrastive-ssl

Official code: MCPathology/NH2ST (4 stars, Python, last commit 2025-07-03).

Abstract

Spatial transcriptomics (ST) provides crucial insights into tissue micro-environments, but is limited to its high cost and complexity. As an alternative, predicting gene expression from pathology whole slide images (WSI) is gaining increasing attention.

Show full abstract

However, existing methods typically rely on single patches or a single pathology modality, neglecting the complex spatial and molecular interactions between target and neighboring information (e.g., gene co-expression). This leads to a failure in establishing connections among adjacent regions and capturing intricate cross-modal relationships. To address these issues, we propose NH2ST, a framework that integrates spatial context and both pathology and gene modalities for gene expression prediction. Our model comprises a query branch and a neighbor branch to process paired target patch and gene data and their neighboring regions, where cross-attention and contrastive learning are employed to capture intrinsic associations and ensure alignments between pathology and gene expression. Extensive experiments on six datasets demonstrate that our model consistently outperforms existing methods, achieving over 20% in PCC metrics. Codes are available at https://github.com/MCPathology/NH2ST

View on arXivView PDF

Code Implementations(1)

MCPathology/NH2STOfficial100%
40PythonMay 26, 20251 years ago

Similar Papers

Cite this paper

@article{qu2025spatially,
  title  = {Spatially Gene Expression Prediction using Dual-Scale Contrastive Learning},
  author = {Mingcheng Qu and Yuncong Wu and Donglin Di and Yue Gao and Tonghua Su and Yang Song and Lei Fan},
  year   = {2025},
  eprint = {2506.23827},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.23827v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.23827.svg)](https://codeofpaper.com/paper/2506.23827)

Discussion