More Genes, Faster Inference: Efficient Large-Panel Spatial Transcriptomics Prediction from Histology
Authors: Songming Zhang, Yuxiao Luo, Shifu Luo, Siran Chen, Shuquan Su, Jinyan Li
Organizations: School of Computer Science, Nanjing University · Faculty of Computer Engineering and Artificial Intelligence, Shenzhen University of Advanced Technology · Department of Land Surveying and Geospatial Science (LSGS), The Hong Kong Polytechnic University · Faculty of Health Sciences, University of Macau · Tencent
Spatial transcriptomics (ST) prediction from histology aims to infer spatially resolved gene expression profiles directly from tissue images. This is a challenging problem that is currently often addressed with complicated model architectures, additional inputs, and complicated training procedures, while remaining limited to fixed, small gene panels. This raises a natural question: Is there an efficient method for large-panel ST prediction? Here, we present GeneFlow, a simpler yet effective framework for large-scale spatial gene expression prediction that unifies flow-matching generative modeling with structured multimodal fusion. Specifically, GeneFlow first encodes both histological morphology and cross-gene interactions in spatial spots through histology and gene tokenizers. The model directly predicts spatial gene expression, rather than an intermediate velocity field, while being trained with a velocity-based flow-matching objective. We show that, even without relying on heavy generative pipelines, GeneFlow achieves state-of-the-art performance across multiple ST benchmarks, with up to 56.8% gains in 1,000-gene prediction. Extensive experiments further show that GeneFlow produces biologically meaningful spot profiles while reducing computational cost by orders of magnitude, thereby improving efficiency and scalability, particularly in clinical settings. We believe GeneFlow provides an opportunity for leveraging widely available histology images for downstream biological discovery. Code is available at: https://github.com/ZZhangsm/GeneFlow
Figures & tables
Figure 1. Average PCC- 1000 vs. inference time across all datasets. GeneFlow delivers high accuracy with low inference time.
Figure 2. Overview of GeneFlow. The training data for GeneFlow consists of ST datasets with paired H&E histology images and spot-level expression profiles. Gene expressions are first tokenized into latent representations, while image patches centered at each spot are encoded using a pretrained pathology foundation model to provide conditioning features. These image features guide a genetic flow-based network to learn endpoint-based gene expression prediction with velocity loss. At inference time, GeneFlow iteratively predicts gene expression from a given histology image patch.
Figure 3. Visualization of GeneFlow architecture.
Dataset
Metric
StNet
EGN
BLEEP
TRIPLEX
Stem
STFlow
GeneFlow
Δ(↑)
(Nat. BE, 2020)
(CVPR, 2023)
(NeurIPS, 2023)
(CVPR, 2024)
(ICLR, 2025)
(ICML, 2025)
Kidney
PCC-10
0.4337
0.3039
0.2779
0.4641
0.4662
0.3301
0.5837 ± 0.0012
+25.21%
PCC-50
0.3680
0.1807
0.2165
0.3823
0.4121
0.2544
0.5345 ± 0.0023
+29.71%
PCC-200
0.2936
0.1562
0.1632
0.2769
0.3200
0.1824
0.4545 ± 0.0013
+42.03%
PCC-1000
0.1604
0.1473
0.0532
0.1923
0.1752
0.0800
0.3159 ± 0.0013
+64.27%
Mouse Brain
PCC-10
0.5412
0.4687
0.3800
0.5373
0.5393
0.4757
0.5886 ± 0.0005
+8.76%
Table 1. The results of gene expression prediction across spatial omics datasets. Bold indicates the best performance, underlined indicates the second-best performance.
Figure 4. Visualization of biomarker gene expression with the corresponding PCC values. The color scale ranges from blue (low expression) to red (high expression). Predicted expression of Rab5a and Atp1a2 on the Mouse Brain tissue slide NCBI667.
Model
Param (M)
GFLOPs
Time (s)
StNet
8.0
5.57
3.52
EGN
231
17.66
20.42
BLEEP
12.5
3.63
48.3
TRIPLEX
85.1
33.56
4.35
STFlow
8.1
53.35
1.02
Stem
35.0
42.79
554
Table 2. Computational efficiency comparison using torch.profiler .
Figure 5. Results of the ablation study on the scalability of GeneFlow to large gene sets. Here, gene num represents the number of predicted genes provided to the model.
Figure 6. Effect of Training and Sampling Steps.
PCC-10
PCC-50
PCC-200
PCC-1000
GeneFlow
0.5888
0.5277
0.4424
0.2874
w/o gene tokenizer
0.5070
0.4521
0.3880
0.1997
w/o CONCH
0.3024
0.2379
0.1686
0.0645
w/o UNI
0.2478
0.1865
0.1312
0.0374
w/ v -pred / x -loss
0.5342
0.4731
0.3848
0.2642
w/ v -pred / v -loss
0.5214
0.4608
0.3824
0.2498
Table 3. Ablation study of GeneFlow.
Figure 7. Correlation between PCC and MSE/MAE
Prior Type
PCC-10
PCC-50
PCC-200
PCC-1000
Zero
0.5108
0.4417
0.3411
0.1763
Gaussian
0.5641
0.5023
0.4137
0.2625
ZINB
(0.1, 1)
0.5743
0.5121
0.4252
0.2739
(0.1, 2)
0.5666
0.5043
0.4144
0.2674
(0.1, 4)
0.5432
0.4848
0.3936
0.2374
(0.2, 1)
0.5535
0.4938
0.4056
0.2582
Table 5. Performance under different prior types and ZINB parameter settings
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Oncotree
Num. of Slides
Tech.
Slide ID
Test Slide
PRAD
23
Visium
MEND139-162
MEND145
Kidney
23
Visium
NCBI692-715
NCBI697
Mouse Brain
14
Visium
NCBI658-672
NCBI667
HER2ST
37
Visium
SPA119-155
SPA148
Appendix
Table 6. Dataset statistics of spatially resolved transcriptomics dataset.
Figure 8. The distribution of PCC scores across all predicted genes for each model on MEND145 and NCBI667.
DiT depth
PCC-10
PCC-50
PCC-200
PCC-1000
3
0.5761
0.5109
0.4192
0.2616
6
0.5716
0.5122
0.4208
0.2545
9
0.5743
0.5180
0.4243
0.2633
12
0.5743
0.5121
0.4252
0.2739
Appendix
Table 7. Performance metrics under different DiT depths.
Figure 9. Visualization of biomarker genes. Predicted expression of KLK3 and MSMB in PRAD tissue slide MEND145.
Dim. H
PCC-10
PCC-50
PCC-200
PCC-1000
12
0.5502
0.4872
0.3919
0.2299
24
0.5888
0.5277
0.4424
0.2874
36
0.5851
0.5254
0.4369
0.2834
48
0.5856
0.5238
0.4287
0.2723
96
0.5741
0.5123
0.4237
0.2725
Appendix
Table 8. Performance under different hidden dimensions of gene tokenizer
Figure 10. GO Biological Process Enrichment heatmap for learned gene tokens in GeneFlow.
Figure 11. Training loss curves across different hidden dimensions of the gene tokenizer.
Department of Clinical Neurosciences University of Cambridge UK · Usher Institute The University of Edinburgh EH16 RUX · Department of Diagnostic Radiology National University of Singapore Singapore