stFormer integrates spatial ligand signaling into a foundation model for spatial transcriptomics.
Shenghao Cao, Kaiyuan Yang, Jiabei Cheng, Jiachen Li, Hong-Bin Shen, Xiaoyong Pan, Ye Yuan
Department of Mathematics, College of Sciences, Shanghai University, Shanghai 200444, China; Newtouch Center for Mathematics of Shanghai University, Shanghai University, Shanghai 200444, China; Institute of Image Processing and Pattern Recognition, Shanghai Jiao Tong University, Key Laboratory of System Control and Information Processing, Ministry of Education of China, Shanghai 200240, China. Electronic address: shcao@shu.edu.cn. · Institute of Image Processing and Pattern Recognition, Shanghai Jiao Tong University, Key Laboratory of System Control and Information Processing, Ministry of Education of China, Shanghai 200240, China.
Key points
From the paper's conclusion- We introduce stFormer, a transformer model tailored for ST data, which employs the cross-attention module to incorporate spatial ligand genes.
- To unify different ST technologies with a trade-off between resolution and gene coverage, we propose a biased cross-attention method that enables the model to do learning with single-cell resolution on whole-transcriptome but low-resolution Visium data.
- After pretraining, stFormer improved upon the state-of-the-art single-cell foundation model, scFoundation, across diverse tasks, including cell clustering, batch effect correction, cell type prediction, and gene function prediction.
Abstract
Recent foundation models for single-cell transcriptomic data generate informative, context-aware gene and cell representations. Spatial transcriptomic (ST) data offer extra positional insights but were not considered by these single-cell models. We introduce stFormer, a transformer model tailored for ST data, which employs the cross-attention module to incorporate spatial ligand genes. To unify different ST technologies with a trade-off between resolution and gene coverage, we propose a biased cross-attention method that enables the model to do learning with single-cell resolution on whole-transcriptome but low-resolution Visium data. We assembled a pretraining corpus comprising ∼4.1 million spatial samples from public human Visium datasets. After pretraining, stFormer improved upon the state-of-the-art single-cell foundation model, scFoundation, across diverse tasks, including cell clustering, batch effect correction, cell type prediction, and gene function prediction. stFormer also revealed intercellular ligand-receptor signaling responses via in silico perturbation. Finally, we demonstrated stFormer's utility in yielding biological findings on two case studies.
Read the paper
Discussion · 1
Science Skim's AI key points, plus readers' public thoughts
- We introduce stFormer, a transformer model tailored for ST data, which employs the cross-attention module to incorporate spatial ligand genes.
- To unify different ST technologies with a trade-off between resolution and gene coverage, we propose a biased cross-attention method that enables the model to do learning with single-cell resolution on whole-transcriptome but low-resolution Visium data.
- After pretraining, stFormer improved upon the state-of-the-art single-cell foundation model, scFoundation, across diverse tasks, including cell clustering, batch effect correction, cell type prediction, and gene function prediction.
Readers' thoughts
No reader thoughts yet.
Related papers
- SpaAxFormer: Fine-Grained Token Modeling of Spatial Transcriptomics with Axial TransformersbioRxiv · 2026
- FineST: contrastive learning integrates histology and spatial transcriptomics for nuclei-resolved ligand-receptor analysisNature Communications · 2026
- SpaLSTF: Diffusion-based generative model with BiLSTM and XCA-Transformer for spatial transcriptomics imputationPLoS Computational Biology · 2026
- Nicheformer: a foundation model for single-cell and spatial omicsNature Methods · 2025
- spaGFM is a scalable graph foundation model for spatial transcriptomics analyses.Research square · 2026
- Inferring single-cell gene expression profiles from multicellular spatial transcriptomics data with st2sc.bioRxiv : the preprint server for biology · 2026