Published June 19, 2026 | Version v3

stFormer integrates spatial ligand signaling into a foundation model for spatial transcriptomics

  • 1. ROR icon Shanghai University

Description

stFormer incorporates ligand genes within the spatial niche into transformer encoder of single-cell transcriptomics, and outputs gene embeddings specific to the intracellular context and spatial niche. These gene representations can serve as input of various downstream applications, including cell clustering, cell type prediction, gene function prediction, and in silico perturbation analysis of ligand-receptor interaction.

The model architecture is designed for ST data resolved at the single-cell level. We propose a biased cross-attention method to enable the model to do learning with single-cell resolution on low-resolution, whole-transcriptome Visium data, which is a widely available spatial resource.

We assembled a pretraining corpus comprising ~4.1 million spatial samples from public human Visium datasets, spanning diverse tissues, development stages, and disease states. After pretraining, stFormer is compatible with both single-cell and spot resolution ST data.

Files

Files (9.8 GB)

Name Size
md5:09f863f059ea0b2942f762c1fb7dc6e1
408.6 MB Download
md5:4a2f85f40afd65aceb7e76a46759ee38
9.3 GB Download

Additional details

Related works

Is published in
Publication: 10.1016/j.crmeth.2026.101612 (DOI)

Software

Repository URL
https://github.com/csh3/stFormer
Programming language
Python
Development Status
Active