Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
Authors: Tinglin Huang
Tianyu Liu
Mehrtash Babadi
Wengong Jin
Rex Ying
Venue: ICML 2025 spotlightposter (2025)
Keywords: Spatial transcriptomics
histology images
Primary area: applications->health_medicine

Abstract: Spatial transcriptomics (ST) has emerged as a powerful technology for bridging histology imaging with gene expression profiling. However, its application has been limited by low throughput and the need for specialized experimental facilities. Prior works sought to predict ST from whole-slide histology images to accelerate this process, but they suffer from two major limitations. First, they do not explicitly model cell-cell interaction as they factorize the joint distribution of whole-slide ST data and predict the gene expression of each spot independently. Second, their encoders struggle with memory constraints due to the large number of spots (often exceeding 10,000) in typical ST datasets. Herein, we propose STFlow, a flow matching generative model that considers cell-cell interaction by modeling the joint distribution of gene expression of an entire slide. It also employs an efficient slide-level encoder with local spatial attention, enabling whole-slide processing without excessive memory overhead. On the recently curated HEST-1k and STImage-1K4M benchmarks, STFlow substantially outperforms state-of-the-art baselines and achieves over 18% relative improvements over the pathology foundation models.

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
Tinglin Huang' Tianyu Liu
Mehrtash Babadi Wengong Jin 23 Rex Ying'
Abstract
is the prediction of biomarkers in digital pathology, often visualized in hematoxylin and eosin slide images (WSIs), by analyzing the gene expression lev- els in relation to the tissue morphology (Levy-Jurgenson et al., 2020; Zhang et al., 2022). However, the conventional ST methods (Moffitt al., 2018: Eng et al., 2019; Stähl et al., 2016) suffer from low throughput and need of spe- cialized equipment, limiting their application compared to standard histology imaging.
stained whole-
Spatial transcriptomics (ST) has emerged as a powerful technology for bridging histology imag- ing with gene expression profiling. However, its application has been limited by low throughput and the need for specialized experimental facili- ties. Prior works sought to predict ST from whole- slide histology images to accelerate this process, but they suffer from two major limitations. First, they do not explicitly model cell-cell interaction as they factorize the joint distribution of whole- slide ST data and predict the gene expression of each spot independently. Second, their encoders struggle with memory constraints due to the large number of spots (often exceeding 10,000) in typ- ical ST datasets. Herein, we propose STFlow, a flow matching generative model that considers cell-cell interaction by modeling the joint distribu- tion of gene expression of an entire slide. also employs an efficient slide-level encoder with lo- cal spatial attention, enabling whole-slide process- ing without excessive memory overhead. On the recently curated HEST-1K k and STimage-1 KK4M benchmarks, STFlow substantially outperforms state-of the-ar art baselines and achieves over 18% relative improvements over the pathology founda- tion models.
To address this, recent works resort to deep learning to pre- dict spatially-resolved gene expression from H&E images. As illustrated Figure I(a), a histology image is segmented into small spots, with the objective of predicting the gene expression with the spot image and the coordinate. This line of research has achieved promising results using an image foundation model to encode local spot-level features (Chen et al., 2024b; He et al., 2020; Ciga et al., 2022; He et al., 2016), but they neglect the utilization of spatial dependen- cies between spots. To bridge this gap, some studies intro- duce an additional slide-level encoder to incorporate global spatial context (Xu et al., 2024; Chung al., 2024; Pang et al., 2021; Zeng al., 2021) with vision transformer.
Despite their initial success, these methods are limited by (I) high computational complexity: the exhaustive attention mechanism among all spots leads to significant computa- tional overhead, making it impractical for standard gigapixel slides, which contain tens of thousands of spots (Campanella et al., 2019; Lu al., 2021); (2) weak utilization of spatial dependencies: these methods typically encode coordinates as positional embeddings, making them sensitive to numeri- cal noise and variations in coordinate scales caused by batch effectt. (3) overlooking cell-cell interaction, i.c., certain genes regulating the expression of genes other cells (Fig- ure 1(b)) (Li et al., 2022; Biancalani al., 2021).
1. Introduction
Compared to the early days of bulk RNA sequencing, recent advancements in spatial transcriptomics (ST) technology of- fer novel approach to molecular profiling within the spatial context of tissues, providing insights into cellular interac- tions and the microenvironment (Stähl et al., 2016; Xiao & Yu, 2021). One of the promising clinical applications of ST
In light of this, we propose STFlow', flow matching- based model that reformulates the original regression task generative modeling problem. Instead of performing one- step regression, we model the joint distribution over the whole-slide gene expression through an iterative refinement
Yale University. "Broad Institute of MIT and Harvard. " NNrttheattm University. Correspondence to: Tinglin Huang stinglin.huang yale.edu>.
Proceedings of the 4rnd International Conference Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
IImleementation can he found at https: / htt.gggttt.ccoommmo Graph- Gecmet c-lannnn ng/ /0gg//TT STF10 ow

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
(a) Notations
Visual Features
(b) Modeling cell interaction via spatial attention
Histology Image
Pathology
21
Foundation Model
7-2
Cell-cell interaction
TP5a
BRCAI
EGFR
YEGEA
ADHI8
AaPI
6ST
Zu
Gene Expression
Coordinates
1253
BRCA1
EGFR
YEGFA
ADH18
AGP1
Ca (h)
GST
(C. Y.
Cs (1)
Spat1
Spot2
Spot3
Cyt (Xp, Yn)
SpotN
(c) Flow matching
7P53
BRCAL
EGFR
YEGFA
ADAiB
ACPI
GST
TP53
BRCA1
EGFR
YEGFA
ADHIB
AGPI
GST
TP53
BRCAI
EGFR
YEGFA
ADW18
AQP1
GST
Yo.
1,0
YT0
Sample
Yo.1
V11
YT.1
Yoa
Denoiser
Y1a
Denoiser
Y72
Prior Distribution
Yax
VIN
YT.
Yo
Y1
Yr
Figure An overview of gene expression prediction from histology image with STFlow. (a): The histology image segmented a set of spot images, each associated with 2D coordinate and gene expression. Each spot image is then encoded using pathology foundation model. (b): STFlow encodes the slide-level context by aggregating the neighhoring spots through spatial attention and interaction between cells explicitly incorporated within the attention caleulation. (c): STFlow iteratively optimizes the gene expression predictions, starting from a sample drawn from a prior distribution, such as zero-infie rero-inflated negative binomial (ZINB) distribution.
process, depicted in Figure 1(c). Each refinement step is guided by the flow matching framework, where the pre- dicted gene expression serves as context for the subsequent step. This enables explicit modeling cell-cell interac- tions, leading to more biologically meaningful predictions. The denoising network employs a frame averaging (FA)- based (Puny al., 2021) spatial model with E(2)-invariant spatial attention and achieves great efficiency by modeling the local context of each spot.
have enabled the detection of RNA transcript spatial dis- tribution at sub-cellular resolution (Moffitt et al., 2018; Codeluppi et al., 2018; Eng et al., 2019; Ståhl et al., 2016;
Stickels et al., 2021). Machine learning-baad based approaches have recently shown promising results in predicting expres- sion from histology image (Lee al., 2023). The previous studies fall into categories: (1) spot-based approaches which solely encode the spot and predict the gene expression individually. i.e., modeling p( (,, (He et al., 2020; Pang et al., 2021; Chen et al., 2024b; Ciga et al., 2022; Xic et al., 2023). Some of these methods leverage foundation models pretrained on large-scale digital pathology datasets, achiev- ing promising results in gene expression prediction (Jaume et al., 2024). One concurrent work (Zhu al., 2025) lever- ages diffusion models for ST gene expression generation, but they still treat each spot independently. In contrast, our generative model operates at the whole-slide level, explicitly modeling the joint distribution of genes across spots. (2) slide-based approaches which incorporate the slide-level context and predict the gene expression of each spot individ- ually, i.e., modeling p( Y; oo.... IN) (Pang al., 2021; Zeng et al., 2021; Jia et al., 2024; Xu al., 2024; Chung et al., 2024). The main idea of these methods is to aggregate the representations of other spots after the image encoders extract each spot's features. The key difference between our proposed STFlow and previous methods is that STFlow
We evaluate STFlow on HEST-1k (Jaume et al., 2024) and STImage- K4M (Chen et al., 2024a), two large-scale ST- WSI collections comprising total 17 benchmark datasets. Compared five spot-based and three slide-based methods, STFlow consistently outperforms all baselines and achieves an 18% average relative improvement over the pathology foundation models. It also excels in the prediction of 4 biomarker genes, highlighting its clinical potential. More- over, our proposed architecture offers orders-ol of of-magnitude faster runtime and lower memory cost than existing slide- based approaches.
2. Related Work
WSI-based spatial gene expression prediction Rapid ad- vances in spatial transcriptomics (ST) (Li & Wang, 2021)
2

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
explicitly utilizes gene-gene dependency between cells for prediction using generative model, i.e., modeling the joint distribution p( (Y o. Y oo ... ).))
Algorithm 1 STFlow: Training
Require: Training WSIs (C,1,Y)
Sample prior Yo ~ 2(1, O, T)
Flow matching Flow matching is generative modeling paradigm (Lipman et al., 2022; Albergo & Vanden-Eijnden, 2022; Liu et al., 2022; Jing et al., 2024; Nori & Jin, 2024) that has shown impressive results across various modalities, including images and biomolecules. The objective is ap- proximate the marginal vector field of the dime-dependent probability path using neural network. In this work, we re- formulate the gene expression regression as a generative task and apply the flow matching since (1) its iterative denoising scheme allows us to incorporate the gene expression within the modeling, and (2) offers flexibility in selecting gene expression-specife prior distribution, e.g., zero-inflated neg- ative binomial distribution.
Sample timestep t ~ Uniform [0,
Interpolate Y, + 1. Y +
() Yo Predict Y + So (C,I,Y,,0)
Minimize objective MSB(Y, Y)
Algorithm STFlow: Inference Require: Testing WSIs (C,1) Sample prior Yo ~ Z(4, T) for 0 to 5-1
Let t + s/S and ts + (s 1)/S Predict Y + fe I, ,1,
Geometric deep learning Geometric deep learning has achieved significant success in chemistry, physics, and bi- ology (Bronstein et al., 2021; Zhang et al., 2023; Liu et al., 2023). The key to this success lies in generating invariant representations for 3D structures, such as molecule confor- mation, that remain consistent under E(n) transformations, where represents the dimension of the Euclidean space. E(n) transformations include translations, rotations, and reflections. Previous methods achieve invariance by lever- aging invariant features (Satorras et al., 2021; Schütt et al., 2018; Gasteiger et al., 2021) or employing equivariant trans- formations, such as irredueible representations (Fuchs et al., 2020; Liao & Smidt, 2022; Weiler & Cesa, 2019) and frame averaging (FA) (Puny et al., 2021; Huang et al., 2024). The architecture of the denoiser encodes the spatial context of WSIs using an FA-based Transformer architecture, designed to produce invariant representations for each spot, regardless of any E(2) transformations.
8 = S - then
return Y
end if
Interpolate Y,, +- Y,, + (8-Yy) (I-t,) * (12 (1)
end for
Y is the count of detected RNA transcripts for particular gene (starting from 0), representing the gene's 's expression level. In this study, the goal of STFlow is to predict the gene expression Y among spots with the input of (C,
Pathology Foundation Model We define fPEM(-) as a pathology foundation model, which aims to extract general- purpose embeddings for digital pathology after being pre- trained on large-scale histology slides (Ciga et al., 2022; Chen et al., 2024b; Xu et al.. 2024). They receive a patch from the slide as input and produce the embedding for down- stream tasks:
3. Method
(Zo, In} = SPPM ((To.... IN])
(1)
In this section, we introduce STFlow, flow matching frame- work for modeling the joint distribution of gene expression across spots, along with an E(2)-invariant denoiser for cap- turing spatial dependencies. We first introduce the necessary background in Section 3.1 and elaborate on the learning framework Section 3.2. The introduction of architecture is provided in Section 3.3.
where Z, I, represent the i-th spot's encoded representa- tion and H&E image.
In our study, we leverage these foundation models ex- tract visual features for each spot image instead of training individual image encoder. The motivation is that, after being pretrained on large-scale histology slides, these foun- dation models exhibit strong generalization abilities and help mitigate batch effect (Jaume et al., 2024).
3.1. Preliminaries
Problem Formulation An HtE-stained WSI is seg- mented into set of patches, which can be represented as (C, I, Y,Y,, with coordinates C' E RXx2, spot images I NX3XHXW and gene expression levels Y E RNNG where N is the number of spots, G the number of genes, and H. W indicate the image dimensions. Each element in
3.2. Learning with Flow Matching
Modeling cell-cell interaction is essential for predicting the gene expression of each spot. Our key hypothesis is that the expression levels of certain genes in neighboring regions can strongly indicate the target spot's expression
3

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
2.00
IDC
COAD
probability mass function:
1.75
2.5
1.50
p y pr (,O,T) =
1:25
1.00
2.3
0.75
π + (1-T)
((y+o) [(o)
(
((
if y 0,
0.50
@+
dtp
0.25
0.3
(1 [1-m) T)
(Tott) ((()
(
d (+t
$
if 0,
10
20
30
50
10
20
40
50
Exprassion Level
Expression 19:30
LUNG
SKCM
3.0
2.5
2.5
where is the count outcome, j is the mean of the distri- bution, Φ denotes the number of failures until stopped, and I is the zero-inflation probability. The negative binomial component introduces ó to explicitly account for variability beyond what is expected under Poisson distribution, there- fore modeling the overdispersion. Besides, the zero-inflation component represents the sparsity with dropout propabil- ity (Virshup et al., 2023; Gayoso et al., 2022; Eraslan et al., 2019). Besides ZINB, Gaussian and zero distributions can also serve as priors, as further explored in Appendix C.
Fequanccy
1.5
1.0
0.5
0.5
0.0
30
0.0
20
Level
Expression Level 1n.77:1.79, std. 74.90
mean:12.91, std:54.40
Figure 2. Distribution of gene expression level on ST samples, with levels above 50 truncated for clarity.
Training As shown in Algo. during training, we sample time step from the uniform distribution and interpolate the ground- gene expression Y with the sampled noise Yo to obtain noisy sample Y,. The denoiser predicts the denoised gene expression with the inputs of image features, coordinates, noisy samples, and time steps. The model then optimized by minimizing the difference between the prediction and the ground-truth expression.
(Li et al., 2022; Biancalani et al., 2021; Cordell, 2009). However, the standard regression objective cannot model cell-cell interaction as it predicts gene expression in one go. To address this issue, we reformulate the gene expression regression model into a generative model, using samples from prior distribution as input, which is then iteratively optimized instead of performing one-step prediction.
Specifically, we apply flow matching (Lipman et al., 2022: Albergo& & Ganden-Eijndent 2022; Jing et al., 2024) as the optimization framework, which aims to learn a denoiser model fo(:):
Sampling As shown in Algo.2, we begin with an initial "expression guess" Yo sampled from the ZINB distribu- tion and iteratively refine it using the trained denoiser. The model interpolates between the noisy input Y, and the pre- dicted denoised expression Y over multiple steps, with a decay coefficient that gradually increases as the time steps increase. This process ultimately converges to the optimal gene expression in the final step.
min MSE (Y, fo (Y,,,,,,
where is time step sampled uniformly from the uniform distribution [0, 1], and Y, is linear interpolation between Y and sample Yo drawn from prior distribution Po(-), i.e. Y,- t. Y + (1 - f)- Yo- Technically, fo(-) ap- proximates the marginal vector field of the time-dependent conditional probability paths pY(Y.) [Y. enabling generat- ing Y with the noisy sample from (-(-).
3.3. Denoiser Architecture fo
The STFlow's denoiser receives visual features Z, coordi- nates I, and gene expression Y, at time step as imput. The backbone is based on the Transformer architecture (Vaswani, 2017), achieving ((2)-invariance to the coordinates by incor- porating frame averaging (FA) within each layer and explic- itly encoding spatial dependencies by conducting attention to each spot's 's local neighbors. The overall architecture is shown in Figure 3(a).
Prior Distribution One key advantage of flow matching over diffusion models is its compatibility with different prior distributions. To explore gene expression patterns in ST samples, we analyze certain datasets from HEST- lk (Jaume et al.. 2024). Figure 2 shows the distribution of gene expression frequencies across four datasets, revealing two key observations: (1) non-activated genes dominate the dataset, and (2) the data exhibits an overdispersion pattern (variance > mean).
Local Spatial Context Cells within the tissues can interact and influence each other's gene expression, thereby form- ing a spatial context with spot-to-spot dependencies. To efficiently leverage such dependencies, we encode the local spatial context around each spot and limit the attention to its k-nearest neighbors, i.c., (i),, in the WSI. Long-range context information can be captured through multi-layer
In light of this, we explore zero-inflated negative binomial (ZINB) distribution 2(H, @ T). defined by the following

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
Representation
Gene expression Y E R Vxx
from one source spot depends on the target spot, which is compatible with the attention mechanism.
E N=D
MLP
After transforming the image features Z; into query, key, and value representations: Zq KK.. Zv, we adopt MLP attention (Brody et al., 2021) to derive the attention weight between spots, which incorporates the spatial infor- mation and the gene expression difference between spots within the calculation:
Zi
Z
7
Coordinate
XLP
C 2xx
Local Spatial
Attantion
Feedforward Network
MLP
X
MiLP
Ao
MLP
Softmax;
(MLP (Zo,s || ΣKJ |l Clas ll
(Y Y(s))
Z'
Y
(a) Denoiser Architecture
(b) E(2)-nnariant Spatial Attention
where A,y denotes the attention score between i-th and j-th spots, and Softmax; is the softmax function operated on the attention scores of spot i's neighbors.
Figure 3. The overall architecture the proposed denoiser (a) and the B(2)-invariant spatial attention scheme (b).
The spatial representation is then aggregated as the context for updating the spot representation, and the gene expression is iteratively updated at each layer, which progressively denoises the gene expression data across different receptive fields:
attention within the local neighbors of every spot.
E(2)-Invariant Spatial Attention We introduce a spatial attention mechanism that generates spot representations in- variant to E(2) operations, i.e., rotation, translation, and reflection, of the coordinates. To achieve this, we adapt frame averaging (FA), an E(2))invariant transformation for point clouds (Puny et al., 2021), to the attention scheme. The flexibility of FA provides recipe for encoding the coordinates with minimal modification to the Transformer. Specifically, for i-th spot, we first construct the local context with the direction vectors from it to its neighbors:
Z MLP
Σ (EN(()
A.jZv.
Σ A:sCi-ss
+
Z.
JEN(()
(8)
Y = MLP (Z))
(9)
C; = (Cjja (JE(())
(4)
where Z and Y represent the updated i-th spot's rep- resentation and gene expression from the spatial attention module. This process is repeated across each layer, with the gene expression updates from each layer averaged to produce the final gene expression prediction.
where C.-j Cj is the direction vector and rep- resents the orientation between spots. Such geometric context is then projected into frames extracted by PCA:
F(C,) ((U,C) U (cqu,,auus) 012 E {-1,1}}, (5)
3.4. Discussion
Notes on invariance For the spot-level, Equ.6 demonstrates B(2)-im -nvariiance to the coordinates as it encodes and averages the coordinates across different frames, which is guaranteed by the frame averaging framework. Consequently, the spa- tial attention mechanism (Equ.7 and Equ.9) that relies on the output of Equ.6 is E(2)-invariant, For the pixel level, we apply pathology foundation models, which are pretrained with extensive image augmentations, making the extracted spot features robust to any B(2) transformations.
where F(-) denotes four extracted frames with the two principal components (u1, u2) and centroid We use C22 = (C.-s - 2)U to denote the projected direction vector from i-th to j-th spot using g-th frames. Building on top of them, we embed these spatial spot-spot dependencies with linear layers and achieve invariance by averaging the representations in different frames:
C,, [F(C,)) EMPP(C..))
1
(6)
Computational Complexity For spatial attention, FA is ef- ficient due to the low dimensionality of the coordinates (only 2) and the accelerated PCA algorithm, thus we ignore its complexity. The attention calculation involves neighboring spots and linear transformations, resulting in complexity
where C, E RRdd, is the encoded representation the spa- tial relationship between i-th spot and its neighbor j at I-th layer. With such pairwise encoding, the spatial information
5

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
Table 1. The results of gene expression prediction across two benchmarks. The best result is marked in bold, and the hest baseline is underlined. OOM indicates an out-of ofmomor error.
Spot-based Gigapath
Slide-based
Ciga
UNI
STNet
BLEEP
Gigapath-slide
HisToGene
TRIPLEX
STFlow
IDC
0.424 000
0.520,onl
0.513 001
0.375
0,533 001
OOM
0.355 ona
0.606 oos
0.587 003
PRAD
0.345 001
0.371 .002
0.384.c0 0o0
0.343 .00
0.382 002
0.385 000
0.270.005
0.402 009
0.421 002
PAAD
0.408 000
0.432 002
0,436 ooo
0.366 .000
0,459 000
0.393 000
0.310 oor
0.492 000
0.507 004
SKCM
0.493 001
0.629.0o 001
0.500 oos
0.381 .022
0,566 033
0.548.002 002
0.321 o008
0.699
0.704 005
COAD
0.273.00
0.285,cm o022
0. 0.290.co 002
0.248.001
0.303 .007
00M
0.070.o06
0.319
0.326
HEST
READ
0.051 .002
0.159.com
0,151 no1
0.097.000
0,236 o011
0.186.por
-0.000.om
0.195.cm .06
0.240 0144
CCRCC
0.136.000
0.178. 002
0.187.mm po1
0.2044.02
0.298 o03
0.181.co
0.112.o03
0.289 .055
0.332 o03
HCC
0.040.o01
0.052.com .000
0.051 poo
0.072.004 .004
0.086.o0
0.025.com
0.028 n01
0.062.cm oos
0.124 004
LUNG
0.544.000
0.559.om
0.569.cm 000
0.526.001
0,588 004
0.528.oo 0o3
0.480.o07
0.601
0.610.cm
LYMPH
0.236.000
0.263.com
0.274.po1
0.250..or
0.234.000
0.284.c00
0.230.oos
0.292.com
0.305..0
Average
0.295
0.344
0.344
0.286
0.368
/
0.237
0.395
0.415
Breast
0.354.000
0.412.com .000
0.384.
0.318.000
0.131,o01
OOM
0.172.019
0.418 osa
0.404.02
Brain
0.331 am0
0.344 om
0.364 boo
0.321 .002
0.322. oon4
0.362 poo
0.020,o10
0.292.us ooss
0.357 .002
Skin
0.174.000
0.128 o01
0.235 no1
0.192 ams
0.301
0.174.pox
0.031 o0z1
0.319 011
0.310 0111
STImage
Mouth
0.176 ano
0.177
0.198 oo1
0.177 .001
0.191
0.164
0.042.
0.107
0.146
Stomach
0.169 ano
0.217 .002
0.222 po1
0.213 .104
0.295 ous
OOM
0.070,011
0.248 o18
0.305
Prostate
0.128 ouz
0.163.cm o01
0.173. pou
0.042 .100
0.167 ozss
0.208 po1
0.033,o10
0.148 oz1
0.210 uz4
Colon
0.262,002 002
0.276 001
0.307 .000
0.175.000
0.120,013
0.268 000
0.186,007
0.238 0s0
0.323 015
Average
0.227
0.245
0.269
0.205
0.232
0.232
0.252
0.293
1K (Jaume et al., 2024) and STImage- KKMM K4M (Chen et al., 2024a). Specifically, HEST-IK includes ten benchmarks? and applies a patient-stratified split to prevent data leakage resulting in k-fold cross-validation setup. For STImage- IK4M, we select the cancer samples for each organ and randomly split the dataset into train/val/test sets (8:1:1). Per- formance is evaluated using the Pearson correlation between the predicted and measured gene expressions for the top 50 highly variable genes after log normalization. We con- duct the experiments using three different random seeds and report the mean and standard deviation for each dataset.
Table 2. Comparison on biomarker prediction.
GATA3
ERBB2
UBE2C
VWF
UNI
0.838 ooB
0.801 oos
0.704.
0.572. 007
STNet
0.607 oo1
0.5466 ous
0.662 aco
0.290 aoo
BLEEP
0.806 0o4
0.761 oon
0.758 oos
0.535 ond
TRIPLEX
0.853. 008
0.832.co 001
0.749 aoa
0.612
STFlow
0.860 ons
0.844 000
0.772 cos
0.666 oo
STFlow w/o FM
0.842. 00G
0.822 002
0.750,00
0.570
of O(Ndd + Nkdd), where is the embedding size, and is efficient since < N. With flow matching, the computa- tion scales linearly with the number of refinement steps S. In practice, this remains efficient flow matching requires relatively few steps, key advantage over diffusion models. In our experiments, we set S to 5.
Baselines There are two categories of methods:
Spot- approaches, including Ciga (Ciga et al., 2022). UNI (Chen et al., 2024b), Gigapath (Xu et al., 2024), STNet (He et al., 2020), and BLEEP (Xie al., 2023), predict the gene expression solely based on the spot image. BLEEP applies UNI as the image encoder. For pathology foundation models, we use a Random Forest model as the regression head, following the setup of HEST-IK.
4. Experiment
In this section, we evaluate our proposed STFlow for gene expression and biomarker prediction across two datasets, comparing it against 8 baselines. The implementation de- tails can be found in Appendix A, the dataset statistics are shown in Appendix B, and more studies are presented in Appendix C.
Slide-basee approaches, including Gigapath which is the slide encoder of Gigapath, HisToGene (Pang et al., 2021), and TRIPLEX (Chung al., 2024), incorporate the whole-slide information by aggregating the local or global context around each spot. The coordinates are embedded
4.1. Gene Expression Prediction
"Note that the COAD dataset was updated after the paper's release, leading to a significant difference in the performance reported the HEST-Ik manuscript.
Datasets We employ two public collections of spatial tran- scriptomics data paired with staned WSIs, HEST-
6

---

Scalable Generation of Spatial Transcriptomies from Histology Images via Whole-Slide Flow Matching
Groundiruth
STNat 706
BLSEP.0.732
TRIPLEX0..07
UNI:0.742
STF
STFRow FM:0.829
(a) Expression of UBE2C at TENX141
Groundiruth
STNan: 391
BL55P.0.576
TRIPLEX00.533
UN80
STFlbu00667
STFOow FM:0.627
Expizaten Land
(b) Expression VWF at TENX115
Figure 4. STFlow for Biomarker Discovery in Breast Samples: (a) TENX141 and (b) TENXI15. The top row of subfigures shows gene UB2EC, while bottom row shows gene VWF. Pearson correlation hetween ground truth and predictions is provided in each subfigure's title. STFlow w/o FM refers the model where the iterative refinement is removed and one-step prediction is performed.
using a linear layer or a convolution layer, serving as position encoding. STFlow and TRIPLEX apply UNI the image encoder.
OOM
00M
30000
Noneee (M8)
Time ta
80
25000
20000
60
15000
Results As shown in Table I, even with simple linear head, the pathology foundation models demonstrate a significant correlation over most datasets. Besides, building on these foundation models, our proposed STFlow can reach better performance and achieve 18% improvement on average, highlighting its compatibility with the pathology foundation models and demonstrating the effectiveness of leveraging spatial context and gene interaction.
40
10000
20
5000
1000
5000
20000
1000
5000
10000
30000
aSpols
4Spots
Figure Efficiency comparison of dide-based models.
et al., 2018). We utilize two datasets from HEST and report the average correlation for each gene across different cross- validation folds. Specifically, the IDC dataset is used for GATA3 and ERBB2, while LUNG is used for UBE2C, and SKCM for VWF. All results are averaged over three random seeds and the default visual extractor is UNI. In Table 2, STFlow achieves the highest correlation across all biomark- ers, demonstrating its potential for clinical applications.
Additionally, some approaches fail to achieve strong gene expression prediction performance. For example, STNNet (PCC= 0.286) and HisToGene PPCC=0.237 both under- perform compared to UNI (PCC 0.344). We attribute this to the patient-level data split, which introduces a more challenging scenario than previous splits, making difficult for these methods to capture the meaningful semantics of the spot images. This observation is consistent with the findings in (Chung et al., 2024). This also highlights the advantage of using a foundation model and the need for an effective spatial encoder. Furthermore, Gigapath-slide, which aggregates whole-slide information, does not out- perform Gigapath in most tasks. This may be because the slide encoder's pretrained objective is tailored for slide-level tasks rather than spot-level tasks.
Additionally, we visualize the expression levels of UBE2C and VWF in two samples (Figure 4). The results further highlight the strong correlation between STFlow's 's predic- tions and ground truth gene expression. Taking UBE2C in TENX141 as an example, flow matching effectively opti- mizes high-expression regions (red areas) more accurately than the model without flow matching.
4.3. Further Analysis on STFlow
4.2. Biomarker Prediction
Efficiency Comparison To evaluate the efficiency of STFlow, compare the total inference time and GPU memory usage across slide-based models with varying num- bers of spots, as shown in Figure 5. Inference time is re- ported as the total duration for 100 repeated runs. For a fair comparison, we exclude the time required for visual feature extraction for all models. Notably, compared to
One of the important applications of spatial gene expression prediction is to understand disease progression in relation to tissue morphology. In this section, we evaluate model performance in predicting four biomarker genes: GATA3, ERBB2, UBE2C, and VWF (Mehra et al., 2005; Revillion al., 1998; Ma et al., 2023; Dachy et al., 2024; Takaya
7

---

Scalable Generation of Spatial Transcriptomies from Histology Images via Whole-Slide Flow Matching
Table R(2)-invariant architecture and slide-based models com- parison using different pathology foundation models. The com- plete results can be found in Appendix C.
Table 4. Ablation study on STFlow. The complete results can he found in Appendix C.
STFlow w/ FM
STFlow w/o FA
STFlow
B(2)-based Arch,
SOTA Baselines
EGNN
E2CNN
BLEEP
TRIPLEX
STFlow
Ciga UNI Gigapath 0.397
0.351
0.348
0.361
0,405
0,406
0.415
Ciga
0.314
0.334
0.323
0.342
0.361
0.397
0.406
UNI
0.400
0.363
0.368
0.395
0.415
Gigapath
0.391
0.375
0.369
0.399
0.406
baselines, showcasing the effectiveness of modeling cell- cell interactions with flow matching and the expressiveness of our proposed architecture.
other architectures that rely on complicated attention mech- anisms, our proposed architecture achieves higher efficiency by leveraging spatial attention among local neighbors.
A blation Studies We conduct ablation study assess the effectiveness of the flow matching framework and frame averaging- based modules. Specifically, we evaluate two settings: disabling the flow matching learning framework (w/o FM) and removing frame averaging-related transfor- mations (w/o FA). Notably, without FA-based modules, the architecture reverts to a standard attention scheme without utilizing spatial information. The results presented in Ta- ble 4 indicate that removing either core module leads to decline in STFIow's performance.
B(2)-Invariant Architecture Comparison To verify the effectiveness of our proposed E(2)-invariant denoiser, we replace our proposed architecture with two representative E(n)-invariant architectures individually:
EGNN (Satorras et al., 2021) is representative E(n) graph neural network that leverages invariant geometric feature distance between coordinates to ensure represen- tation invariance. The model conducts representation aggregation among the k-nearest neighbors for each spot. For a fair comparison, EGNN also receives the input of extracted image features as spot features.
Furthermore, we evaluate the impact of removing flow matching on the biomarker prediction task, as shown in Table 2. The results demonstrate the importance of flow matching, as its absence leads to performance degradation. As illustrated in Figure 4, the iterative refinement process enhances the alignment between predicted and ground-trut truth expression levels, resulting in improved correlation.
E2CNN (Weiler& & Cesa, 2019) is a representative frame- work for E(n) convolutional neural networks that utilizes irredueible representations. We use the extracted features as input channels and construct a tensor of neighboring spots centered around the target spots. This tensor is then fed into a ResNet model built using E2CNN.
Effect on Number of Refinement Steps We vary the num- ber of refinement steps (S) in the range 1, 2, 5, 10, 16 and report the corresponding performance of STFlow in Table 5, It should be noted that S = 1 corresponds to a model with- out iterative refinement, performing single-step prediction. The results demonstrate a clear performance improvement when moving from one-step prediction (S = 1) to itera- tive refinement (S = 2). In certain datasets, performance continues improve up to S = 5 (e.g., PAAD: 0.488 - 0.507; IDC: 0.580 - 0.587). However, beyond 5 = the gains plateau or slightly decline. This trend is consistent with prior studies such as AlphaFlow (Jing et al., 2024) and RNAFlow (Nori & Jin, 2024), which also adopt S = 5 as the default setting.
More description and implementation regarding these two methods can be found Appendix A. The comparison re- sults are presented in Table 3, where we only show the aver- age results across the benchmark datasets of HEST-1K k due to the space limit. The results show that STFlow's 's performance decreases to varying degrees when using EGNN or E2CNN in all cases. We attribute this to the fact that the geometric features used in these models are either simple, as in the case of distances in EGNN, or extracted through constrained functions, such as group steerable kernels in E2CNN. In contrast, FA-based transformation directly leverages the di- rection vectors, allowing the model to automatically learn relevant geometric features in the latent space.
During the inference process of flow matching, the de- noiser's output is interpolated with the noisy input each step using decay coefficient, allowing for gradual conver- gence toward an accurate prediction. Figure 6 presents two breast cancer examples illustrating STFlow's 's refinement pro- cess for gene expression prediction. The process begins with a randomly initialized prediction Yo. which is progressively refined through iterative denoising steps. As refinement
Effect on Pathology Foundation Model As presented in Table 3. we further compare STFlow with the SOTA methods using different pathology foundation models. The results demonstrate a consistent improvement of STFlow over the pathology foundation models, highlighting its com- patibility. Moreover, STFlow consistently outperforms all
8

---

Scalable Generation of Spatial Transcriptomies from Histology Images via Whole-Slide Flow Matching
Groundtruth
Step
Step 2
Step
Step
Step 5
(a) Refinement Process of UBE2C at TENX141
Step
Step 2
Step
Step
Step 5
(b) Refinement Process of VWF at TENX115
Figure Two breast cancer examples the refinement process performed by STFlow: (a) TENXI41 and (b) TENXIIS. The top row subfigures shows gene UB2EC, while the bottom row shows gene VWF.
1k (Jaume al., 2024) and S 144M (Chen et al., 2024a)), including 17 datasets and 4 biomarker genes, show that STFlow consistently outperforms the SOTA baseline methods.
Table The performance of STFlow with different numbers of refinement steps, where S denotes one-step prediction.
$
S
S
S 10
S
IDC
0,580
0.585 .002
0.587
0.585
0.585.co
PRAD
0.420.cm 003
0.416. .o3
0.421 o02
0.414.00s
0.415.00x
Limitation Our learning framework does not include the estimation of the hyperparameters for the ZINB distribution; instead, we grid search identify the optimal hyperpa- rameter combination. A potential improvement would be to initially employ the empirical distribution or a distribution estimation model, such as a Variational Autoencoder (VAE), to estimate the hyperparameters based on the training set, which will be explored for future work.
PAAD
0.488.00 001
0.498
0.507
0.499
0.498.
SKCM
0.705 00z
0.707 ove
0.704.00s
0.703.co ous
0.703..v
COAD
0.315.cc oos
0.343 204
0.326 oce
0.320 oos
0.321 000
READ
0.232.cc 009
0.239 .022
0.240.o0 014
0.239 oos
0.239.cc 0o1
CCRCC
0.322.co 0011
0.340, .022
0.332.cm oos
0.330 002
0.319.c0 oos
HCC
0.115.008
0.119. .002
0.124.c00
0.117.00
0.118.00 0022
LUNG
0.604.002
0.612. o022
0.610.co
0.611.o0 oo02
0.611
LYMPH
0.278.ooz
0.310 oon
0.305.c0
0.306 ou
0.305.o0
Average
0.405
0.417
0.415
0.412
0.411
Acknowledgment
proceeds, the predicted expression patterns increasingly re- semble the ground truth, demonstrating STFlow 's ability to recover biologically meaningful spatial gene expression through interpolation guided by the decay coefficient.
We thank Yangtian Zhang, Weikang Qiu, and anonymous reviewers for their valuable feedback on the manuscript. This work was supported by the BroadIgnite Award, the Eric and Wendy Schmidt Center at the Broad Institute of MIT and Harvard, NSF IIS Div Of Information Intelligent Systems 2403317, Amazon research, Yale AI Engineering Research Seed Grants, Yale Office of the Provost, and Yale Wu Tsai Institute.
5. Conclusion
In this paper, we study the problem of gene expression prediction from histology images. Despite the promising results achieved by the previous methods, we argue that cell interaction, which a key factor regulating gene expres- sion, has been overlooked. Motivated by this, we propose STFlow, flow matching framework incorporating gene- gene dependency with an iterative refinement paradigm. We explore the zero-inflated negative binomial distribution the prior distribution, which utilizes the inductive bias of the gene expression data. Specifically, the denoiser architec- Transformer that integrates spatial
Impact Statement
This paper presents work whose goal is to advance the field of spatial transcriptomics prediction on histology images. All the datasets used in this study publicly available. There are some potential societal consequences of our work, none of which we feel must be specifically highlighted here.
ture is a context and gene interactions within the attention mecha- nism. Our experimental results across benchmarks (HEST-
9

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
References
Dachy, G., Vankeerbergen, M., Vanlangendonck, N., Straet-
mans, N., Lambert, C., Hermans, C.,, and Poiré, X. Von willebrand factor as potential predictive biomarker of early complications of endothelial origin after allogeneic hematopoietic stem cell transplantation. Bone Marrow Transplantation, pp. 1-3, 2024.
Albergo, M. S. and Vanden-Eijnden, E. Building normal- izing flows with stochastic interpolants. arXiv preprint mrXiv:2209.1557/1 2022.
Biancalani, T., Scalia, G., Buffoni, L.,, Avasthi, R., Lu, Z.,, Sanger, A., Tokcan, N., Vanderburg, C. R., Segerstolpe, Å., Zhang, M., et al. Deep learning and alignment of spatially resolved single-cell transcriptomes with tangram. Nature methods, 18(1 (611)):332-1362 2021.
Eng. C.-H. L., Lawson, M., Zhu, Q.. Dries, R., Koulena, N., Takei, Y., Yun, J., Cronin, C., Karp, C., Yuan, G.-C., et al. Transcriptome-scale super-resolved imaging in tissues by ma segfish+. Nature, 568(7751):235 223.)299,,9 2019.
Brody, S., Alon, U., and Yahav, E. How attentive are graph attention networks? arXiv preprint arXiv:2105.1449, 2021.
Eraslan, G., Simon, L. M., Mircea, M., Mueller, N. S., and Theis, F. J. Single-cell ma-seq denoising using deep count autoencoder. Nature communications, 10(1):390, 2019.
Bronstein, M. M., Bruna, J., Cohen, T., and Veličković, P. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv preprint 1rX1v:2104.13478, 2021.
Fuchs, F. Worrall, D., Fischer, V., and Welling, M. Se (3)-transformers: 3d roto-translation equivariant attention networks. Advances in neural information processing systems, 33:1970-1999 1980,,99111111 2020.
Campanella, G., Hanna, M. G., Geneslaw, L., Miraflor, A., Werneck Krauss Silva, V., Busam, K. J., Brogi, E., Reuter, V. E., Klimstra, D. S., and Fuchs, T. J. Clinicalggrade computational pathology using weakly supervised deep learning on whole slide images. Nature medicine, 25(8): 1301-1309, 2019.
Gasteiger, J., Becker, F., and Günnemann, S. Gemnet: Uni- versal directional graph neural networks for molecules. Advances in Neural Information Processing Systems, 34: 6790-6802, 2021.
Gayoso, A., Lopez, R., Xing, G., Boyeau, P., Valiol- lah Pour Amiri, V., Hong, J., Wu, K., Jayasuriya, M., Mehlman, E., Langevin, M., et al. A python library for probabilistic analysis of single-cell omics data. Nature biotechnnoooyy, 40(2):163-166. 2022.
Chen, J. Zhou, M., Wu, W., Zhang, J., Li, Y., and Li, D. Stimage- Ik4m: A histopathology image-gene expres- sion dataset for spatial transcriptomics. arXiv preprint arXiv:2406.06:5 06393, 2024a.
He, B., Bergensträhle, L., Stenbeck, L., Abid, A., Anders- son, A., Borg. A., Maaskola, J., Lundeberg. J., and Zou, J. Integrating spatial gene expression and breast tumour morphology via deep learning. Nature biomedical engi- neering, 4(8):827-834 2020.
Chen, R. J., Ding, T., Lu, M. Y., Williamson, D. F., Jaume, G., Song, A. H., Chen, B., Zhang, A., Shao, D., Shaban, M., et al. Towards a general-purge purpose foundation model for computational pathology. Nature Medicine, 30(3): 850-862, 2024b.
He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learn- ing for image recognition. In Proceedings of the IEEE conference computer vision and pattern recognition, pp. 770-778, 2016.
Chung, Y. Ha, J. H., Im, K. C., and Lee, J. S. Accurate spatial gene expression prediction by integrating multi- resolution features. In Proceedings of the IEEF/CVF Conference on Computer Vision and Pattern Recognition, pp. 11591-11600, 2024.
Huang, T., Song, 7.,, Ying, R., and Jin, W. Protein-nucleic acid complex modeling with frame averaging transformer. arXiv preprint arXiv:2406.0 09586, 2024.
Ciga, O., Xu, T., and Martel, A. L. Self supervised con- trastive learning for digital histopathology. Machine Learning with Applications, 7:100198, 2022.
Jaume, G., Doucet, P., Song, A. H., Lu, M. Y., Almagro- Perez, C., Wagner, J., Vaidya, A. J., Chen, R. J., Williamson, D. F. K., Kim, A., and Mahmood, F. HEST- 1k: A Dataset for Spatial Transeriptomics and Histol- ogy Image Analysis. arXiv, June 2024. URL https: / / aaaaiivv... org/ abs 2400 16192v1.
Codeluppi, S., Borm, L. E.,, Zeisel, A., La Manno, G., van Lunteren, J. A., Svensson, C. I., and Linnarsson, S. Spa- tial organization of the somatosensory cortex revealed by osmfish. Nature methods, 15(11):932-935, 2018.
Jia, Y., Liu, J., Chen, L., Zhao, T., and Wang, Y. Thi- togene: a deep learning method for predicting spatial transcriptomics from histological images. Briefings in Bioinformatics, 25(1 (5(1):bad4444, 2024.
Cordell, H. Detecting gene-gent interactions that underlie human diseases. Nature Reviews Genetics, 10(6):392- 404, 2009.
10

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
Jing, B., Berger, B., and Jaakkola, T. Alphafold meets flow matching for generating protein ensembles. arXiv preprint ar arXiv:2402.04845, 2024.
global gene expression meta-analysis. Cancer research, (5(24):11259-111 11264, 2005.
Moffit, J. R., Bambah-Mukku, D., Eichhorn, S. W., Vaughn, E., Shekhar, K., Perez, D., Rubinstein, N. D., Hao, J., Regev, A., Dulac, C., et al. Molecular, spatial, and func- tional single-cell profiling of the hypothalamic preoptic region. Science, 362(64 (2ea4444),, 2018.
Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. XrXiv preprint 1412: 2014.
Lee, J., Cahill, R., and Abbasi-Asl, R. Machine learning for uncovering biological insights in spatial transcrip- tomics data. ArXiv, 2023.
Nori, D. and Jin, W. Rnaflow: Rna structure & sequence design via inverse folding-basee based flow matching. arXiv preprint arXiv:2405.
Levy-Jurgenson, A., Tekpli, X., Kristensen, V. N., and Yakhini, Z. Spatial transcriptomics inferred from pathol- ogy whole-slide images links tumor heterogeneity to sur- vival in breast and lung cancer. Scientific reports, 10(1): 18802, 2020.
2024.
Pang, M., Su, K., and Li, M. Leveraging information in spatial transcriptomics to predict super-resolution gene expression from histology images in tumors. BioRxiv, pp. 2021-11, 2021.
Li, B., Zhang, W. Guo, C., Xu, H., Li, L., Fang, M., Hu, Y., Zhang, X., Yao, X., Tang, M., et al. Benchmarking spatial and single-cell transcriptomics integration meth- ods for transcript distribution prediction and cell type deconvolution. Nature methods, 19(6):622-670, 2022.
Puny, O., Atzmon, M., Ben-Hamu, H., Misra, I,, Grover, A., Smith, E. J., and Lipman, Y. Frame averaging for invariant and equivariant network design. arXiv preprint arXiv:2110.03336, 2021.
Li, X. and Wang, C.-Y. From bulk, single-cell to spatial rna sequencing. International journal oral science, 13(1): 36, 2021.
Revillion, F., Bonneterre, J., and Peyrat, J. Erbb2 onco- gene in human breast cancer and its clinical significance. European Journal of Cancer, 34(6))791-806 1998.
Liao, Y.-L. and Smidt, Equiformer: Equivariant graph attention transformer for 3d atomistic graphs. arXiv preprint arXiv:2206.1 1990, 2022.
Satorras, V. G., Hoogeboom, E., and Welling, M. E (n) equivariant graph neural networks. In International con- ference on machine learning, pp. 9323-9332. PMLR, 2021.
Lipman, Y., Chen, R. T., Ben-Hame H., Nickel, M., and Le, M. Flow matching for generative modeling. arXiv preprint arXiv:2210.02744 02747, 2022.
Schütt, T., Sauceda, H. E., Kindermans, P.-J., Tkatchenko, A., and Müller, K.-R. Schnet-a deep learn- ing architecture for molecules and materials. The Journal of Chemical Physics, 148(24), 2018.
Liu, S. Du, W. Li. Y. Li. Z., Zheng, Z.. Duan, C., Ma, Z., Yaghi, O., Anandkumar, A., Borgs, C., et al. Symmeetr-iiformedd informed geometric representation for molecules, proteins, and crystalline materials. arXiv preprint arXiv:2306. 233795,00. 2023.
Stähl, P. L., Salmén, F., Vickovie, S., Lundmark, A., Navarro, J. F., Magnusson, J., Giacomello, S., Asp, M.. Westholm, J. O., Huss, M., et al. Visualization and analy- sis of gene expression in tissue sections by spatial tran- scriptomics. Science, 353(6294):78 82, 2016.
Liu, X.,
Gong, C., and Liu, Q. Flow straight and fast: Learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.088 03003, 2022.
Stickels, R. R., Murray, E.,, Kumar, P., Li, J., Marshall, J. L., Di Bella, D. J., Arlotta, P., Macosko, E. Z., and Chen, F. Highly sensitive spatial transcriptomics at near-cellular resolution with slide-seqv2. Nature biotechnology. 39(3): 313-319, 2021.
Lu, M. Y., Williamson, bieri, M., and Mahmood, F. Data-efficient and weakly su- pervised computational pathology whole-slide images. Nature biomedical engineering, (6):555-570, 2021.
Chen, Y., Chen, R. J., Bar-
Ma, S., Chen, Q., Li, X., Fu, J., and Zhao, L. Ube2c serves as a prognosis biomarker of uterine corpus endometrial careinoma via promoting tumor migration and invasion. Scientific Reports, 13(1):1889, 2023.
Takaya, H., Kawaratani, H., Tsuji, Y., Nakanishi, K.. Saikawa, S., Sato, S., Sawada, Y., Kaji, K., Okura, Y., Shimozato, N., et al. von willebrand factor is useful biomarker for liver fibrosis and prediction of hepatocel- lular carcinoma development in patients with hepatitis and c. United European gastroenterology journal, 6(9): 1401-1409, 2018
Mehra, R., Varambally, S., Ding, L., Shen, R., Sabel, M. S., Ghosh, D., Chinnaiyan, A. M., and Kleer, C. G. Identifi- cation of gata3 as breast cancer prognostic marker by

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
Vaswani, A. Attention is all you need. Advances in Neural Information Processing Systems, 2017.
Virshup, I., Bredikhin, D., Heumos, L., Palla, G., Sturm, G., Gayoso, A., Kats, I., Koutrouli, M., Berger, B., et al. The severse project provides computational ecosystem for single-cell omics data analysis. Nature biotechnology. 41 (5):604-606, 2023.
Weiler, M. and Cesa, G. General (2)-equivariant steerable cnns. Advances in neural information processing systems, 32, 2019.
Xiao, and Yu, D. Tumor microenvironment as a therapeu- tic target in cancer. Pharmucology & therapeutics, 221: 107753, 2021.
Xie, R., Pang, K., Chung, S., Perciani, C., MacParland, S., Wang, B., and Bader, G. Spatially resolved gene expression prediction from histology images via bi-modal contrastive learning. Advances in Neural Information Processing Systems, 36:70626-70637 2023.
Xu, H., Usuyama, N., Bagga, J., Zhang, S., Rao, R., Nau- mann, T., Wong. C., Gero, Z., González, J., Gu, Y., al. whole-slide foundation model for digital pathology from real-wor woaldworld data, Nature, pp. 1-8, 2024.
Zeng Y. Wei, Z., Yu, W., Yin, R., Li, B., Tang. Z., Lu, Y., and Yang, Y. Spatial transcriptomics prediction from histology jointly through transformer and graph neural networks. biorxiv, 2021.
Zhang, L., Chen, D., Song, D., Liu, X., Zhang, Y., Xu, X., and Wang, Clinical and translational values of spatial transcriptomics. Signal Transduction and Targeted Therapy, 7(1):111, 2022.
Zhang, X., Wang, L., Helwig, J., Luo, Y., Fu, C., Xie, Y., Liu, M., Lin, Y., Xu, Z., Yan, K., et al. Artificial intelli- gence for science in quantum, atomistic, and continuum systems. arXiv preprint arXiv:2307.08423. 2023.
Zhu, S., Zhu, Y., Tao, M., and Qiu, P. Diffusion generative modeling for spatially resolved gene expression inference from histology images. arXiv preprint arXiv:2501. 2025.
12

---

Scalable Generation of Spatial Transcriptomies from Histology Images via Whole-Slide Flow Matching
A. Implementation
The experiments are conducted on a single Linux server with The AMD EPYC 7763 64-Core Processor, 1024G RAM, and 8 RTX A6000-48GB. Our method is implemented on PyTorch 2.3.0 and Python 3.10.14.
Running environment
Training details For all the models, we fix the optimizer as Adam (Kingma & Ba, 2014) and MSE loss as the loss function. The gradient norm is clipped to 1.0 in each training step to ensure learning stability. The learning rate is tuned within [Ie-3, 5e-4, 1e-4] and is set to Se-4 by default, as it generally yields the best performance. The performance of HEST- Ik is evaluated using a cross- voossvvaldattion setup and reported based on three different random seeds. For STImage- I K4M, performance on the test set is reported using the model that achieves the best validation set performance, also evaluated across three random sceds. Besides, all the weights of pathology foundation models are frozen.
For each model, we search the hyperparameters in the following ranges: the dropout rate in {0, 0.2, 0.5), the number of nearest neighbors for the slide-based methods in (4, 8, 25), and the number of attention heads in (1, 2, 4, 8). All models trained for 100 epochs, with early stopping applied if no performance improvement is observed for 20 epochs. The implementation and hyperparameters used in each method are shown below:
STFlow: The number of layers, attention heads, and neighbors are 4, 4, and 8, respectively. Besides, dropout and hidden sizes are set at 0.2 and 128. The number of sampling steps for flow matching is set to 5. For the ZINB distribution, zero-inflatiin probability is fixed as 0.5, the mean is searched (0.2,0.2.0.4), and the number of failures is searched in [1,2,4). For efficient training, each sample is a randomly selected continuous region from the WSI, with its size determined by a proportion sampled from a uniform distribution ranging from 0 to In each training step, we will sample a region from WSI.
We download the pretrained weight from the official repository and normalize the input images using the ImageNet mean and standard deviation. The Random Forest model with 70 trees serves as the linear head. Additionally, Gigapath offers three different pretrained versions; we selected the one with the largest hidden size, i..., ggigapath_slide leteeennn1__e 1211536d". For the Gigapath-slide all the spot images of WSI are input for global attention.
Ciga', UNI*, and Gigapath": :
Following the official implementation, we use a pretrained DenseNet12) 21 as the image encoder and an MLP as the linear head. The input spot images are randomly augmented with horizontal flips and rotations and are then normalized using the ImageNet mean and standard deviation. The batch size (the number of spot images in each training step) is 128.
STNett:
BLEEP":
This method trains an image encoder and a gene expression encoder using contrastive loss. For given spot image, retrieves the gene expressions of similar spots from a reference set, using the average expression of these spots the prediction. We use pretrained pathology foundation as the image encoder and MLPs linear heads to project the extracted visual features and gene expressions. The temperature for the contrastive loss is set to 1, and the number of retrieved spots is 50. For a fair comparison, we directly use the training WSI as the reference set, as there are no additional splits in HEST-1k and STTmaae-11K44 K4M. The batch size is set as 128.
His' : This model includes ViT for encoding spot images within the WSL. The number of layers, the number of attention heads, the dropout rate, and the hidden size are set as 4, 16, 0. and 128. The coordinates are embedded with a linear layer. The input spot images are randomly augmented with horizontal flips and rotations and are then normalized using the ImageNet mean and standard deviation. For efficient training, we sample a continuous region from WSI in each training step, similar to STFlow.
This model comprises a target encoder for the target spot, a local encoder for the neighboring spots, a global encoder for WSI, and a fusion encoder for combining all these representations. In line with the official implementation, the spot images are first embedded using a pathology foundation model before being fed into the model. Each encoder configured with 2 layers, 8 attention heads, and a dropout rate of 0.1. The local encoder considers 25 neighboring spots.
TRIPLEX":
13

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
The coordinates embedded using a proposed atypical position encoding generator based convolutional network. A continuous region from WSI is sampled for each training step, using the same strategy STFlow.
The number of model parameters is presented Table 6, highlighting that our model has the lowest parameter count among slide-level baselines. Specifically, HistToGene utilizes dedicated image encoders, significantly increasing their parameter count. TRIPLEX employs brrec- attention mechanism, which substantially more complex and heavier compared our proposed spatial attention model.
Table Number of parameters comparison.
STNet BLEEP
HistToGene
TRIPLEX
STFlow
#Params (M)
0.051
0.670
149.046
13.767
1.147
We also provide the implementation of the E(2)-invariant encoder baselines:
EG Similar to standard GNN, EGNN propagates representations from neighboring spots the target spots and uses MLPs for transformation, incorporating the distances between them in the calculations. The number of layers and neighbors is set to 4 and 8, respectively, with hidden size of 128 and a dropout rate of 0.2. For fair comparison, EGNN leverages the visual features extracted by the pathology foundation model and integrated with the flow matching.
E2CNN": E2CNN an F(n) convolution framework that implements various equivariant operations, such as convolution layers, batchnorm, and pooling layers. Here, we use the 10-layer ResNet from the official codebase as the backbone. To construct the input batch, each spot and its surrounding neighbors are arranged into 5 x grid with the target spot the center. The visual features extracted by the foundation models are then stacked as channels, resulting in tensor of dimensions d x 5 x 5.
B. Dataset
Table 7 lists the statistics of HEST-Bench. Further details about these datasets can be found in (Jaume et al., 2024). Note that the COAD dataset differs from the version in (Jaume al., 2024), as was updated two months after the paper's release.
Table Dataset statistics of HEST-Bench.
IDC
PRAD
PAAD
SKCM
COAD
READ
CCRCC
HСC
LUNG
LYMPH
Organ Technology
Breast
Prostate
Pancreas Xenium
Skin Xenium
Colon
Rectum
Kidney
Liver
Lung Xenium
Axillary Lymph Nodes Visium
Xenium
Visium
Visium
Visium
Visium
Visium
#Patients
4
2
3
2
3
2
24
2
4
#Samples
4
23
3
#Splits
4
2
3
2
2
2
2
Avg. spots
4925
2454
2780
1741
5079
1909
2792
1941
1944
4990
We additionally construct 7 benchmark datasets based on STImage- K44M (Chen et al., 2024a). Specifically, we select cancer samples for each organ and randomly split the train/validation/tee sets 18:1:1 at the slide level, which is different from the cross-validation setting used in HEST-Bench. Note that we only include organs where the models achieve significant correlations (at least 0.1). The model predicts the top 50 highly variable genes, with Pearson correlation used as the evaluation metric. The statisties are shown in Table
Table Dataset statisties of STImage- Bencc.
Breast
Brain
Skin
Mouth
Prostate
Stomach
Colon
Technology
Visium
Visium
Visium
Visium
Visium
Visium
Visium
#Samples
81
22
4
16
12
4
Avg. spots
1762
2156
2232
2730
3326
3117
4024
"https: httptthbccm/gggsttttrr//g/g///
"https: //gi thub. wwtp.//oo//vaaaaeo httm:///wwelll///22c//tteeeetete
14

---

Scalable Generation of Spatial Transcriptomics from Histology Images via Whole-Slide Flow Matching
C. Additional Experiments
Ablation study In this experiment, we perform an ablation study to evaluate the impact of STFlow's core modules. Specifically, we individually disable the flow matching learning framework (w/o FM) and the frame averaging-related transformations (w/ FA). As shown in the Table 9, we can observe that removing any of the core modules leads to performance degradation to varying degrees, and this trend remains consistent across different pathology foundation models.
Table 9. Ablation study.
IDC
PRAD
PAAD
SKCM
COAD
READ
CCRCC
HCC
LUNG
LYMPH
Avg.
STFLow
D.160 ons
0.375.oc0
0.140,co cos
0.602.02 o02
0.331
0.137
0,250.c44
0.081.o01
0.583
0.308
0.361
Ciga
w/o FM
0.436
0.350,cca
0.4
0.595 004
0.336 o0s
0.124.0ca
0.245
0.006.000
0.585,001
0.295 002
0.351
w/o
0.446 ono
0.371.oca
0.434 cor
0.585 006
0.330 007
0.120),or
0.235,000
0.090 ona
0.580 oga
0.295 002
0.348
STFlow
0.565
0.415 ac
0.510 poo
0.652
0.315
0.257
0.326
0.117 o00
0.6022
0,305
0.106
Gigapath
w/o FM
a.5
0.409 oca
0.504.cos
0.054..00
0.296 oos
0.225 mos
0.325,.04
0.120.o00
0. 0.503,002 0012
0. 0.285 on2
0.307
w/o FA
0.560.o0 onc
0.418,oco
0.504.co
0.615 000
0.326 p05
0.250 oce
0.302,
0.111 000
0.583 000
0.291 .oo
0.397
STHoow
D.587 ow
0.421.ox oce
0.507 oor
0.7 oos
0.326 one
0.2240 014
0.332 oos
0.1244ou
0.610 ooe
0.305 om7
0.415
UNI
w/o FM
0. 2.680.cmm ous
0.420.ocs
0,488.co
0. 0.705.ue
0.315 o0s
1.232 mme
0.322.co
0.115..m ous
0.604
0.278 onz
0.405
w/o FA
0.580 oos
0.421 .001
0.501
0.673
0.323
0.245 015
0.305
0.1 0.113,co
0.600
0.209 oos
0.406
Prior distribution comparison We conduct an experiment to investigate the influence of different prior distributions used in STFlow. Specifically, we replace the ZINB distribution with two alternatives: zero distribution, where all samples are zero, and standard Gaussian distribution. The results are summarized in Table 10, from which we can observe that the ZINB distribution consistently achieves the best performance across all cases. This demonstrates that it is better suited to represent gene expression data, which is often sparse and overdispersed. Note that comparing the average Pearson correlation across datasets might underestimate the contribution of ZINB due to significant scale differences between datasets.
Table 10. Prior distribution comparison on STFFow.
Gaussian UNI
Zero UNI
ZINB UNI
Ciga
Gigapath
Ciga
Gigapath
Ciga
Gigapath
IDC
0.451 oo0
0.380.oo
0.559 om
0,450 po0
0.585 o03
0.567.000
0.460 ozs
0.587 oos
0. 0.565 o00
PRAD
0.370 o00
0.410.00
0.410 oos
0.370. pos
0.410.oo 0000
0.4144.00
0.375 .00
0.421 o0
0.415.00
PAAD
0.430 ooo
0.500.om
0.507 oos
0.424. po9
0.196 oo1
0.506.co oo0
0.440 oos
0.507 oou
0.510.000
SKCM
0.600 ooz
0.698 ous
0.643 ous
0.600 pot
0.698 ooz
0.654. po1
0.602 ouz
0.704 oos
0.652.
COAD
0.337 ou7
0.317 oos
0.320 ou1
0.332 p022
0.319 oos
0.316 po4
0.334, oos
0.326 oore
0.315.007
READ
0.043 0o3
0.226 013
0.253 oo0
0.1330 poo
0.230 ooo
0.265 n01
0.137 0044
0.240 014
0.257 o06
CCRCC
0.259 004
0.326
0.320 o022
0.233.cm p011
0.319. 9,002
0.324. _002
0.250. 054
0.332 oos
0.326 003
HCC
0.103 000
0.115.001
0.115 5000
0.095.com .000
0.115.002
0.114.004
0.094.co1
0.124.00 004
0.117.001
LUNG
0.575 000
0.605 201
0.594.oos
D. 0.580,co 0011
0.604_no2
0.596 poo
0.583.co oo0
0.610 oo2
0.602.o00
LYMPH
0,300 002
0.302. 0o0
0,302 001
0.301.o05
0.300,n00
0.301.o02
0.308 on0
0.305 001
0.305.o01
Average
0.347
0.407
0.402
0.351
0.407
0.405
0.361
0.415
0.406
Comparison of Architecture and Pathology Foundation Model Table 11 presents the complete results of E(2)-invariant architectures, i.e., EGNN and E2CNN, and Table 12 shows the results of state-of-the-art baselines, i.e., BLEEP and TRIPLEX, on each dataset. The performance of each model using different pathology foundation models is presented.
Table 11.
architecture comparison.
EGNN UNI
E2CNN UNI
STFlow UNI
Ciga
Gigapath
Ciga
Gigapath
Ciga
Gigapath
IDC
0.450 941
0.375.cm
0.565 007
0.451 .002
0.562 n02
0.547 .000
0.460 ozs
0.587 008
0.565.000
PRAD
0.200 600
0.409..m .00
0.410 007
0.300, p02
0.240 no1
0.372 003
0.375 000
0.421.co
0.415.00
PAAD
0.420 om
0.492..m
0.505 o0s
0.442 ooe
0.458, nes
0.470 om2
0.440 oos
0.507 not
0.510.000
SKCM
0.571 pos
0.661 .ous
0.600 oum
0.572 uoo
0.674 aua
0.621 muz
0.602 o012
0.704.cos
0.652, oon
COAD
0.341 p012
0.321 .0o1
0.324. po1
0.335 po1
0.329 pu7
0.307 .0o4
0.334 oos
0.326 oo9
0.315, o07
READ
0.118 p04
0.238 .011
0.230 pos
0.119 po1
0.221 o10
0.223 ooo
0.137 0oo
0.240 014
0.257 ooo
CCRCC
0.091 ooo
0.317 .003
0.296 po0a
0.268 .011
0.300 oc2
0.292 oo0
0.250 054
0.332 oo3
0.326 003
HCC
0.095 ooG
0.100 .oo6
0.104 p04
0.060 o02
0.090 oco
0.103.004 .0o4
0.094 001
0.124. 004
0.117 001
LUNG
0.555 oos
0.592.an4 .092
0.584 pas
0.502 001
01.999 o02
0.550 oo2
0.583 0o0
0.610 002
0.602.oo 000
LYMPH
0.302 001
0.290.cm .011
0.293 ooo
0.292,co 001
0.2660.0o
0.274.po1
0.308 ooo
0.305 001
0.305.o01
Average
0.314
0.400
0.391
0.334
0.363
0.375
0.361
0.415
0.406
15

---

Scalable Generation of Spatial Transcriptomies from Histology Images via Whole-Slide Flow Matching
Table 12. The comparison between models using different pathology foundation models.
BLEEP UNI
TRIPLEX
STFFlow UNI
Ciga
Gigapath
Ciga
UNI
Gigapath
Ciga
Gigapath
IDC
0.432 001
0.533.oo 001
0.519 000
0.4933.om 000
0.606.nos
0.591.002
0.460,com ons
0.587 ooo
0.565.cc 000
PRAD
0.337 000
0.382. .002
0.386 001
0.353 000
0. 0.402.0o8
0.405..00
0.375.000
0.421 002
0. 0.415.001
PAAD
0.411 oos
0.459.00 000
0.473 o01
0.430.cm po1
0. 0.492.mm .002.000
0.505..o0 000
0.440..o oos
0.507 not
0.510.000
SKCM
0.542 oos
0.566.ass
0.571 o002
0,5800.m poe
0.699.nc .009
0.670. 002
0.602 002
0.704 cos
0.652.o0
COAD
0.295 013
0.303.cm
0.301 oou
0.308 out
0.319.uc 004
0.315
0.334. oos
0.326
0.315.o07
READ
0.133
0.236 oux
0.251
0.1
0.195,um oce
0.212
0.137
0.240
0.257
CCRCC
0.224
0.298.om
0.270 o25
0.240 po1
0.289 oes
0.291
0.250 004
0.332
0.326,
HCC
0.071
0.086.ou1
0.094 0011
0.046 coo
0.062, o003
0.101 p00
0.094 001
0.124
0.117
LUNG
0.537
0.588 0044
0.578
0.554.
0.601 .022
0.606 ooe
0.583 oo0
0.610
0.6022.c
LYMPH
0.252
0.234,o04
0.248
0.297 .ooa
0. 0.292.002
0. 0.300..01
0.308 .000
0.305
0.305,001
Average
0.323
0.368
0.369
0.342
0.395
0.399
0.361
0.415
0.406
Biomarker examples We present two biomarker examples from sample in the IDC dataset (Figure 7), demonstrating that STFlow accurately predicts spatially resolved gene expression with strong alignment to the ground truth.
Grounctruth
STN2tt0.727
BLEEP 0.694
TRIPLEX-0.86
UNI108611
STF
burecoton
Grounctruth
STNet:0.692
BLEEP-0.602
TRIPLEX-0.887
UNI: 0.8
S1F
Expression of GATA3 (top) and ERBB2 (bottom) TENX95
Figure 7, STFlow for Biomarker Discovery in Breast Samples (IDC dataset from HEST-IK)
Hyperparameter study of ZINB distribution We set the zero-inflation probability x 00.5, as higher dropout rates degrade ZINB to near-zero distribution. We conducted an ablation over the mean fa E 0.2, 0.4) and dispersion & E {1,2,4), with results shown in Table 13. STFlow is generally robust to these hyperparameters due to its iterative refinement, though performance can vary slightly on some datasets (e.g., 0.496-0.507 on PAAD).
Table 13. Hyperparameter study on ZINB distribution.
(0.1.1)
(0.2.1)
(0.4,1)
(0.1,2)
(0.2,2)
(0.4.2)
(0.1,4)
(0.2,4)
(0.4,4)
IDC
0.586 001
0.585.00s
0.585 no1
0.581.oo:
0.585.od 0885
0.587.c08
0. 0.585.cm oo1
0.583 oo:
0.585 o01
PRAD
0.417 002
0.415.00
0.413.
0.415.000
0.421 002
0.413.po po:
0.415.oe 500
0.415,cc 002
0.418.00
PAAD
0.196 002
0.507.oox
0.499 ooo
0.499 pos
0.502 0p4
0.500 por
0. 0.498 ono
0.499 po2
0. 0.502. oo6
SKCM
0.707 .007
0.704.
0.710, 0000
0.704 po0
0.709 oca
0.704 po09
0.709 oca
0.703 oos
0.707 oos
COAD
0.339 .02
0.342 .n93
0.341 .0o4
0.343, noo
0.338 noa
0.343 .o4
0.342 2022
0.343 oos
0.340 000
READ
0.253 on3
0.231 oo00
0.243.oc0
0.247 .04
0.244. .044
0.245 poo
0.236.co oo1
0.246 ooo
0.249. 002
CCRCC
0.339 001
0.337 .007
0.340. 0004
0.334 poo
0.342, oo88
0.329 pos
0.334. o00
0.336 p02
0.337 oo8
HCC
0.118 001
0.122 ono
0.123.a05
0.120 pos
0.120. 1.120.001
0.122 po4
0.1 0.126.
0.125 pcs
0.124.ors
LUNG
0.611
0.611 ooo
0.611 o0o
0.610 poo
0.611 ooo
0.610 por
0.608 oot
0. 1.609 pco
0.613.00
LYMPH
0.308
0.310
0.308
0.309
0.308
0.304
0.306
0.305
0.304.
16


Reviews:
[{"review_id": "XXhkHC2T5E", "reviewer": "Reviewer_WwPE", "summary": "The authors propose STFlow, a model for spatially resolved gene-expression prediction from WSIs.\n\nSTFlow is based on flow matching, modelling the joint distribution of the full spatial gene-expression data across each WSI, through an iterative refinement process. This enables explicit modelling of spot-to-spot interactions. \n\nThe denoiser network is a frame-averaging transformer, integrating spatial context and gene interactions within the attention mechanism.\n\nThe proposed STFlow is evaluated on both the HEST-1k and STImage-1K4M datasets. It performs well compared to recent spot-based and slide-based baseline models.\n\n\n\n\n\n\n##########\n\n##########\n\n##########\n\n##########\n\nUpdate after the rebuttal:\n\nAll reviewers are positive overall, and the authors have provided a very solid rebuttal.\n\nThis is an interesting and very solid paper, I don't really see any reason for why it shouldn't be accepted. I have increased my score to \"_4: Accept_\".", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We greatly appreciate your valuable suggestions and will revise the manuscript accordingly. Due to character limits, all additional results are available in our anonymous codebase: https://anonymous.4open.science/r/Anonymous_STFlow-3616/.\n\n```\nI found it quite difficult to follow and understand the method description in Section 3.3\n```\n\nAns: We apologize for the confusion. Section 3.3 introduces the formulation of frame averaging, which may be difficult to follow due to dense notation. We will simplify the notations and streamline the equations to better highlight the core idea and improve clarity for readers.\n\n```\nIt would be interesting to see the computational cost for STFlow and UNI reported in Table 1.\n```\n\nAns: We present the average inference time on the test set of each dataset across splits in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/time.md). The time required for visual feature extraction is excluded, as this step can be performed during preprocessing. Notably, STFlow demonstrates high efficiency due to its use of local neighborhood information.\n\n```\nSection 4.1, *\"Additionally, some ST-based approaches fail to predict significantly correlated gene expression\"*: Could you clarify exactly what you refer to in Table 1 here?\n```\n\nAns: Yes, this refers to STNet (0.286) and HisToGene (0.237), which underperform compared to the pathology foundation model UNI (0.344) on HEST-1k. This highlights the advantage of using a foundation model and the need for an effective spatial encoder—HisToGene encodes spatial context but still underperforms. We will clarify this in the revised manuscript.\n\n```\nIn Section 4.2, could perhaps clarify that these 3 datasets are from HEST-1k?\n```\n\nAns: We apologize for any confusion and will clarify it in our manuscript: “We utilize two datasets from HEST and report the average correlation for each gene across different cross-validation folds. Specifically, the IDC dataset is used for GATA3 and ERBB2, while LUNG is used for UBE2C, and SKCM for VWF.”\n\n```\nIt's not entirely clear to me what \"STFlow w/o FM\" in Table 2, Figure 4 and Table 4 means, does this correspond to setting S = 1 in Algorithm 2?\n```\n\nAns: \"STFlow w/o FM\" refers to the model where the iterative refinement is removed and one-step prediction is performed, i.e., setting the number of sampling steps S = 1. We will clarify this in the revised manuscript to avoid confusion.\n\n```\nFigure 4 is neat, it would be interesting to see more examples like these, could you perhaps add a couple to the appendix?\n```\n\nAns: We include two biomarker examples on a sample from the IDC dataset in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/biomarker_case_study.png), which will be added to our manuscript.\n\n```\nIt would also be interesting to see Figure 4-like visualizations of the predicted gene-expression during the iterative refinement process?\n```\n\nAns: We include two examples showing how STFlow refines gene expression predictions in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/refinement_process.png). Step 1 shows the initial random sample Y_0, and Steps 2–5 indicate progressive denoising. The results illustrate how flow matching gradually converges to the final prediction via interpolation with a decay coefficient. The results will be included in the revised manuscript.\n\n```\nIt would also be interesting to see the regression accuracy as a function of the number of refinement steps S.\n```\n\nAns: We report STFlow’s performance across different numbers of refinement steps in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/FM_sample_steps.md). The results show a clear improvement from one-step prediction (S=1) to introducing iterative refinement (S=2). In some datasets, performance improves up to S = 5 (e.g., PAAD: 0.488 → 0.507). However, gains plateau or slightly decline beyond that. This trend aligns with prior works like AlphaFlow and RNAFlow, which adopt S=5 as default. The analysis will be included in the revised manuscript.\n\n```\nRegarding the Limitations paragraph in Section 5: I think it would be relevant to refer to the results in Table 9 in the appendix here, or at least somewhere in the main paper? Because, I think these are encouraging results?\n```\n\nAns: Yes, the model is generally robust to the choice of prior, as the iterative refinement process helps mitigate noise from the initialization. But the ZINB distribution introduces three additional hyperparameters that can impact the performance on certain datasets, such as 0.496~0.507 on PAAD as shown in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/ZINB_hyperparameters.md). Automatically estimating these parameters could be a valuable future direction.\n\n```\nMinor things regarding the writing.\n```\n\nAns: We sincerely appreciate these helpful comments and will incorporate all the suggestions in the revised manuscript.", "claims_and_evidence": "Yes.", "methods_and_evaluation_criteria": "Yes.", "theoretical_claims": "N/A.", "experimental_designs_or_analyses": "Solid experimental setup.", "relation_to_broader_scientific_literature": "Good discussion of related work in Section 2.", "essential_references_not_discussed": "N/A.", "other_strengths_and_weaknesses": "Strengths:\n- Although the paper contains quite a few typos, it's well written overall.\n- The studied problem is interesting and relevant.\n- The proposed STFlow model is quite interesting, I think it makes sense to jointly model the full spatial gene-expression data using flow matching.\n- The experimental evaluation is solid, utilizing both the HEST-1k and STImage-1K4M datasets.\n- The proposed STFlow seems to perform well compared to relevant and recent baselines (BLEEP: NeurIPS 2023, TRIPLEX: CVPR 2024). Moreover, Section 4.3 presents relevant ablation studies which indicate that the main model components positively affect the performance.\n\n\n\n\nWeaknesses:\n- The paper is well written overall but does contain quite a few typos etc, it would definitely benefit from some additional careful proofreading.\n- I found it quite difficult to follow and understand the method description in Section 3.3. I think Section 3.1 and 3.2 are fine, but I struggled with 3.3. I think an effort should be made to work through this section again, making sure everything is described as clearly as possible.", "other_comments_or_suggestions": "Questions/Suggestions:\n- It would be interesting to see the computational cost for STFlow and UNI reported in Table 1. I don't really consider added computational cost a major issue, but just to see how much the transformer model and iterative refinement slows down STFlow compared to the UNI + regression layer baseline.\n- Section 4.1, _\"Additionally, some ST-based approaches fail to predict significantly correlated gene expression\"_: Could you clarify exactly what you refer to in Table 1 here? The results for STNet and HisToGene?\n- In Section 4.2, could perhaps clarify that these 3 datasets are from HEST-1k?\n- It's not entirely clear to me what \"STFlow w/o FM\" in Table 2, Figure 4 and Table 4 means, does this correspond to setting S = 1 in Algorithm 2?\n- Figure 4 is neat, it would be interesting to see more examples like these, could you perhaps add a couple to the appendix?\n- It would also be interesting to see Figure 4-like visualizations of the predicted gene-expression during the iterative refinement process? I.e., what does the initial random sample $Y_0$ look like? And how does this then evolve during the S=5 refinement steps?\n- It would also be interesting to see the regression accuracy as a function of the number of refinement steps S (e.g. for S = 1, 2, 4, 8, 16), does the performance increase with more and more steps, or does it quickly plateau?\n- Regarding the Limitations paragraph in Section 5: I think it would be relevant to refer to the results in Table 9 in the appendix here, or at least somewhere in the main paper? Because, I think these are encouraging results? If initializing $Y_0$ with all zeros instead of sampling from the ZINB distribution, the performance drops from 0.415 to 0.407 for UNI, which is not a lot? This would still beat all baselines in Table 1? I.e., this indicates that the model is quite robust to this choice of prior?\n\n\n\n\n\nMinor things:\n- Line 86: \"This enables explicit modeling cell-cell interactions\" --> \"This enables explicit modeling of cell-cell interactions\"?\n- Line 94: \"WSI collections comprising total 17 benchmark datasets\" --> \"WSI collections comprising a total of 17 benchmark datasets\"?\n- Line 83: \"have enabled the detecting of RNA\" --> \"have enabled the detection of RNA\"?\n- Line 96: \"et al., 2024).One concurrent work\" --> \"et al., 2024). One concurrent work\".\n- Line 97: \"leverages diffusion model for\" --> \"leverages a diffusion model for\" / \"leverages diffusion models for\"?\n- Line 111: \"modeling joint distribution\" --> \"modeling the joint distribution\"?\n- Line 120: \"In this work, we repurpose\" --> \"In this work, we reformulate\"?\n- Line 142: \"whole-slide images (WSIs) using an FA-based Transformer\", don't need to define WSIs again here.\n- Line 137: \"In this study, the goal of STFlow aims to predict\" --> \"In this study, the goal of STFlow is to predict\"?\n- Line 185: \"However, standard regression objective cannot model cell-cell interaction as it predicts\" ---> \"However, the standard regression objective cannot model cell-cell interaction as it predicts\"?\n- Line 194: \"denoised model\" --> \"denoiser model\"?\n- \"Algorithm 1 STFlow: Train\" --> \"Algorithm 1 STFlow: Training\"?\n- I think all \"<--\" in Algorithm 1 and 2 could be replaced with just \"=\"?\n- Line 244: \"an E(2)-invariant transformation for point cloud\" --> \"an E(2)-invariant transformation for point clouds\"?\n- Line 247: \"minimal modification to Transformer\" --> \"minimal modifications to the Transformer\"?\n- Line 266: \"guaranteed by frame averaging framework\" --> \"guaranteed by the frame averaging framework\"?\n- Section 3.4: I think it's more common to use \"Eq.\" instead of \"Equ.\".\n- _Spatially Resolved Gene Expression Prediction from H&E Histology Images via Bi-modal Contrastive Learning_ is a NeurIPS 2023 paper, not 2024?\n- Line 363: \"Table 2 achieves the highest correlation across all biomarkers\" --> \"In Table 2, STFlow achieves the highest correlation across all biomarkers\"?\n- Line 767: \"Table 10 and presents\", typo.", "questions_for_authors": "1. Could you update Section 3.3?\n\n2. Could you clarify what setting \"STFlow w/o FM\" corresponds to?\n\n3. Could you add results for other refinement steps S (not just S = 5)?\n\n4. Could you add some more Figure 4-like visualizations?\n\n\n\n\n\nJustification of overall recommendation:\n\nThe studied problem is interesting and relevant, the proposed STFlow model conceptually makes sense overall, the experimental setup is solid, and STFlow seems to perform well compared to relevant baselines. While the current version requires some more proofreading and polishing, and could benefit from some additional results and visualizations (at least added to the appendix), I think that a solid rebuttal by the authors should make me want to accept this paper. I'm definitely leaning towards accept right now at least.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "RLLPvjCPHv", "reviewer": "Reviewer_kzNE", "summary": "The paper introduces a scalable and efficient framework for predicting spatial transcriptomics from histology images. By integrating flow matching for progressive gene refinement, E(2)-invariant spatial attention for robust spatial modeling, and whole-slide scalability, STFlow formulates gene expression prediction as a generative modeling task, effectively capturing spatial dependencies and cell-cell interactions while overcoming the limitations of existing approaches.  Experimental results demonstrate that STFlow achieves state-of-the-art performance on 17 benchmark datasets (HEST-1k and STImage-1K4M), excelling in gene expression prediction and biomarker identification tasks. It outperforms pathology foundation models in spatial gene expression prediction and achieves the highest correlation scores in biomarker gene prediction (GATA3, ERBB2, UBE2C, VWF), demonstrating its effectiveness in modeling spatial dependencies and gene interactions.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thanks for your feedback on our work! We will explain your concerns point by point.\n\n```\nThe authors should perform a hyperparameter study on the number of refinement steps in the flow matching process.\n```\n\nAns: We report STFlow’s performance across different numbers of refinement steps below. The results show a clear improvement from one-step prediction (S=1) to introducing iterative refinement (S=2). In some datasets, performance continues to improve up to S = 5 (e.g., PAAD: 0.488 → 0.507). However, gains plateau or slightly decline beyond that. This trend aligns with prior works like AlphaFlow and RNAFlow, which also adopt S=5 as default. The analysis will be included in the revised manuscript.\n\n| #steps | S=1 | S=2 | S=5 | S=10 | S=16 |\n| --- | --- | --- | --- | --- | --- |\n| IDC | 0.580(.005) | 0.585(.002) | 0.587(.003) | 0.585(.001) | 0.585(.001) |\n| PRAD | 0.420(.003) | 0.416(.003) | 0.421(.002) | 0.414(.003) | 0.415(.004) |\n| PAAD | 0.488(.001) | 0.498(.001) | 0.507(.004) | 0.499(.001) | 0.498(.001) |\n| SKCM | 0.705(.002) | 0.707(.005) | 0.704(.005) | 0.703(.005) | 0.703(.005) |\n| COAD | 0.315(.008) | 0.343(.004) | 0.326(.009) | 0.320(.003) | 0.321(.004) |\n| READ | 0.232(.009) | 0.239(.002) | 0.240(.014) | 0.239(.003) | 0.239(.004) |\n| CCRCC | 0.322(.001) | 0.340(.002) | 0.332(.003) | 0.330(.002) | 0.319(.003) |\n| HCC | 0.115(.008) | 0.119(.002) | 0.124(.004) | 0.117(.003) | 0.118(.002) |\n| LUNG | 0.604(.002) | 0.612(.002) | 0.610(.002) | 0.611(.002) | 0.611(.001) |\n| LYMPH_IDC | 0.278(.002) | 0.310(.001) | 0.305(.001) | 0.306(.001) | 0.305(.001) |\n| Average | 0.405 | 0.417 | 0.415 | 0.412 | 0.411 |\n\n```\nThe authors should conduct an ablation study on the hyperparameters of the ZINB prior (μ, ϕ, π) to demonstrate their impact on prediction performance.\n```\n\nAns: We set the zero-inflation probability $\\pi=0.5$, as higher dropout rates degrade ZINB to a near-zero distribution. We conducted an ablation over the mean $\\mu\\in\\{0.1,0.2,0.4\\}$ and dispersion $\\phi\\in\\{1,2,4\\}$, with results shown below. STFlow is generally robust to these hyperparameters due to its iterative refinement, though performance can vary slightly on some datasets (e.g., 0.496–0.507 on PAAD). Exploring automated strategies for tuning prior parameters is a promising direction, as noted in our Limitation section.\n\n| ZINB(mean, number of failures) | (0.1,1) | (0.2,1) | (0.4,1) | (0.1,2) | (0.2,2) | (0.4,2) | (0.1,4) | (0.2,4) | (0.4,4) |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| IDC | 0.586(.001) | 0.585(.003) | 0.585(.001) | 0.584(.001) | 0.585(.002) | 0.587(.003) | 0.585(.001) | 0.583(.001) | 0.585(.001) |\n| PRAD | 0.417(.002) | 0.415(.001) | 0.413(.000) | 0.415(.000) | 0.421(.002) | 0.413(.001) | 0.415(.000) | 0.415(.002) | 0.418(.001) |\n| PAAD | 0.496(.002) | 0.507(.004) | 0.499(.000) | 0.499(.005) | 0.502(.004) | 0.500(.001) | 0.498(.000) | 0.499(.002) | 0.502(.006) |\n| SKCM | 0.707(.007) | 0.704(.002) | 0.710(.004) | 0.704(.007) | 0.709(.003) | 0.704(.009) | 0.709(.003) | 0.703(.005) | 0.707(.008) |\n| COAD | 0.339(.002) | 0.342(.003) | 0.341(.004) | 0.343(.000) | 0.338(.003) | 0.343(.004) | 0.342(.002) | 0.343(.006) | 0.340(.000) |\n| READ | 0.253(.003) | 0.231(.000) | 0.243(.000) | 0.247(.004) | 0.244(.004) | 0.245(.000) | 0.236(.001) | 0.246(.000) | 0.249(.002) |\n| CCRCC | 0.339(.001) | 0.337(.003) | 0.340(.004) | 0.334(.000) | 0.342(.008) | 0.329(.005) | 0.334(.000) | 0.336(.002) | 0.337(.003) |\n| HCC | 0.118(.001) | 0.122(.000) | 0.123(.005) | 0.120(.003) | 0.120(.001) | 0.122(.004) | 0.126(.002) | 0.125(.003) | 0.124(.003) |\n| LUNG | 0.611(.001) | 0.611(.000) | 0.611(.001) | 0.610(.000) | 0.611(.001) | 0.610(.001) | 0.608(.001) | 0.609(.000) | 0.613(.001) |\n| LYMPH_IDC | 0.308(.001) | 0.310(.002) | 0.308(.001) | 0.309(.000) | 0.308(.001) | 0.304(.000) | 0.306(.001) | 0.305(.002) | 0.304(.002) |", "claims_and_evidence": "Overall, the claims in the paper are well-supported by quantitative evidence. However, to further validate the choice of ZINB, an ablation study on its hyperparameters (μ,ϕ,π) should be conducted to demonstrate their impact on prediction performance. Additionally, a hyperparameter study on the number of refinement steps in the flow matching process is needed to assess its contribution to model accuracy and convergence stability.", "methods_and_evaluation_criteria": "The proposed methods and evaluation criteria in the submission appear well-aligned with the problem of spatial transcriptomics prediction.\nSTFlow addresses the challenge of predicting spatial transcriptomics from histology images by introducing a flow matching-based generative model. STFlow explicitly models the joint distribution of gene expression across the entire slide, incorporates cell-cell interactions, and employs a local spatial attention-based slide-level encoder to reduce computational overhead. This approach overcomes the limitations of previous methods, which struggled with capturing spatial dependencies and suffered from high computational complexity. \nEvaluated on two large-scale benchmark datasets, HEST-1k and STImage-1K4M, STFlow outperforms eight state-of-the-art baselines in gene expression and biomarker prediction, achieving a relative improvement compared to pathology foundation models while demonstrating superior computational efficiency. \nThe evaluation criteria include Pearson correlation for gene expression prediction, accuracy in predicting four key biomarkers, and computational efficiency metrics such as runtime and memory usage, ensuring a robust and comprehensive assessment.", "theoretical_claims": "No", "experimental_designs_or_analyses": "The study introduces STFlow, a deep learning-based approach for predicting spatial transcriptomics (ST) data from histology images. Overall, the experimental design and analysis are rigorous, and the effectiveness of the model has been validated through multiple evaluations.\nRegarding the experimental design, the study compares spot-based and slide-based methods to ensure a comprehensive performance assessment. Additionally, it employs two large-scale benchmark datasets, HEST-1k and STImage-1K4M, which help reduce dataset-specific biases. To prevent data leakage, k-fold cross-validation is used, with patient-stratified splits ensuring that training and test sets do not overlap at the patient level. The study also conducts ablation experiments to assess the contributions of key components, such as the flow matching mechanism and spatial attention module, to model performance.\nIn terms of analysis, the study employs Pearson correlation coefficient as the primary evaluation metric to measure the relationship between predicted and actual gene expression levels. Additionally, it evaluates model performance on four critical biomarkers (GATA3, ERBB2, UBE2C, and VWF), demonstrating superior predictive accuracy over existing methods. The study also provides visualizations of gene expression predictions, showing a strong alignment between STFlow’s predictions and ground-truth expression levels, enhancing interpretability.", "relation_to_broader_scientific_literature": "First, Previous methods either predicted gene expression independently for each spot, neglecting cell-cell interactions, or relied on computationally expensive global attention mechanisms. STFlow overcomes these issues by introducing a flow matching-based generative modeling framework, which models the joint distribution of gene expression across an entire slide. This allows for iterative refinement, leading to more biologically meaningful predictions. \nSecond, STFlow leverages spatial attention with E(2)-invariant properties, ensuring robustness to spatial variations such as rotation and translation.", "essential_references_not_discussed": "No", "other_strengths_and_weaknesses": "This paper is clearly written and easy to read. It presents a novel approach to spatial transcriptomics prediction by introducing flow matching-based generative modeling, which effectively models joint gene expression distributions across entire slides while incorporating cell-cell interactions. STFlow demonstrates state-of-the-art performance on HEST-1k and STImage-1K4M, achieving improvement over pathology foundation models. Additionally, it excels in biomarker prediction experiments, accurately predicting key genes such as GATA3, ERBB2, UBE2C, and VWF, highlighting its potential for clinical applications.", "other_comments_or_suggestions": "No", "questions_for_authors": "1.\tThe authors should perform a hyperparameter study on the number of refinement steps in the flow matching process.\n2.\tThe authors should conduct an ablation study on the hyperparameters of the ZINB prior (μ, ϕ, π) to demonstrate their impact on prediction performance.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {"ethical_review_concerns": "No"}}, {"review_id": "a5XIQTgUxb", "reviewer": "Reviewer_iKre", "summary": "This paper proposes a flow matching (FM) approach (called STFlow) for predicting the spatial transcriptomics (ST) from pathological Whole-Slide Images (WSIs). The core designs of STFlow contain i) learning the joint distribution $p(Y_0,\\cdots,Y_N|I_0,\\cdots,I_N)$ using the FM approach and ii) the E(2)-invariant spatial attention that adapts frame averaging (FA) to the attention operation for learning invariant spot-level representations. Two large-scale benchmarks are adopted to verify the effectiveness of STFlow. The experimental results show the superiority of STFlow over existing methods.\n\n## update after rebuttal\n\nThanks for the author's rebuttal and the additional results. My concerns are well addressed. I am happy to raise my score from 2 to 3. The authors are encouraged to include the addition results into the revised paper and also carefully revised the paper to further improve the presentation quality.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for the insightful comments and will revise the manuscript accordingly. Due to character limits, all additional results are available in our anonymous codebase: https://anonymous.4open.science/r/Anonymous_STFlow-3616/.\n\n```\nThe Introduction analyzes the issues of existing schemes yet does not clearly explain how this work tackles these issues.\n```\n\nAns: STFlow addresses the issues as follows: (1) it reduces computational complexity via a spatial local attention mechanism, (2) it enhances spatial dependency modeling by encoding and incorporating relative orientation into attention, and (3) it captures cell-cell interactions through flow matching that effectively uses gene expression as context. We will clarify these points in the manuscript.\n\n```\nThe layout of some Tabs and Figs could be improved, *e.g.*, Tab 2 on page 6.\n```\n\nAns: Thank you for pointing this out! We will improve the layout of all tables and figures in the revised manuscript.\n\n```\nCould the authors provide the visualization of the inference process of FM. This experiments could help readers better understand STFlow.\n```\n\nAns: We include two examples showing how STFlow refines gene expression predictions in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/refinement_process.png). Step 1 shows the initial random sample Y_0, and Steps 2–5 indicate progressive denoising. The results illustrate how flow matching gradually converges to the final prediction via interpolation with a decay coefficient. The results will be included in the revised manuscript.\n\n```\nCould the authors represent the results of STFlow with different S.\n```\n\nAns: We report STFlow’s performance across different numbers of refinement steps in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/FM_sample_steps.md). The results show a clear improvement from one-step prediction (S=1) to introducing iterative refinement (S=2). In certain datasets, performance improves up to S = 5 (e.g., PAAD: 0.488 → 0.507). However, gains plateau or slightly decline beyond that. This observation aligns with prior works such as AlphaFlow and RNAFlow, which adopt S=5 as the default setting. The analysis will be included in the revised manuscript.\n\n```\nSome results have large variance (Table 1).\n```\n\nAns: For the HEST benchmark with cross-validation, the variances are generally low, indicating stable performance. On STImage, which uses a train-val-test split, slide-based methods show higher variance than spot-based ones, likely due to variability in spatial patterns and the noise introduced by slide-level aggregation. Nevertheless, STFlow achieves lower variance than the SOTA baseline TRIPLEX in most cases.\n\n```\nSome commonly-used metrics seem missing.\n```\n\nAns: We followed the HEST-1k benchmark setup, which uses Pearson correlation to evaluate performance. Metrics like MSE or MAE depend on absolute expression values and can be influenced by different normalization strategies, making direct comparisons less reliable. The MSE metrics on HEST are shown in [link](https://anonymous.4open.science/r/Anonymous_STFlow-3616/rebuttal/MSE.md), from which STFlow achieves the best performance.\n\n```\nHow is the w/o FM implemented?\n```\n\nAns: \"STFlow w/o FM\" refers to the model where the iterative refinement is removed and one-step prediction is performed, i.e., setting the number of sampling steps S = 1. We will clarify this in the revised manuscript to avoid confusion.\n\n```\nThe effectiveness of one core design, *i.e.*, modeling the joint distribution p(Y0,⋯,YN|I0,⋯,IN), seems to lack convincing evidence.\n```\n\nAns: Modeling the joint distribution captures dependencies across spatial spots, rather than predicting each independently. Our flow matching framework enables this by using whole-slide gene expressions as context during iterative refinement. Its effectiveness is shown in the “STFlow w/o FM” ablation, where removing the refinement process reduces the model to a one-step predictor. Prior gene imputation studies also support the value of leveraging spatial gene expression context.\n\n```\nIt would be better to provide an intuitive explanation for how FM realizes the modeling of joint distribution.\n```\n\nAns: Flow matching models the joint distribution by iteratively refining each spot’s gene expression using predictions from neighboring spots. This allows information to flow across spatial locations, so each prediction is influenced by its context. Through this process, the model learns how gene expressions co-vary across the tissue, effectively capturing the joint distribution.\n\n```\nIn Algo.2, is Y0 sampled once or multiple times when deriving the prediction of one WSI from the model?\n```\n\nAns: In our current implementation, Y_0 is sampled once per inference. A potential improvement is to sample multiple times and select the most confident prediction using a confidence model, which will be explored for future work.", "claims_and_evidence": "Most of the claims are justified by empirical experiments. However, \n- the effectiveness of the author's one core design, *i.e.*, modeling the joint distribution $p(Y_0,\\cdots,Y_N|I_0,\\cdots,I_N)$, seems to lack convincing evidence. \n- In addition, I have several concerns about the experimental design and the results, which are specified below for the authors to answer in the rebuttal.", "methods_and_evaluation_criteria": "**Methods**: Yes, the proposed methods make sense for the problem studied in this paper.\n\n**Evaluation Criteria**: Some commonly-used metrics are not presented in the paper.", "theoretical_claims": "N/A", "experimental_designs_or_analyses": "Yes, I have carefully checked the experimental design and the results. I have several concerns about them:\n- Lack of the experiments for the setting of $S$ and the visualization of the inference process of FM. These experiments could help to validate the stability of the proposed method and help readers better understand the model. \n- Some results have large variance (Table 1). This calls into question the stability of the proposed method.", "relation_to_broader_scientific_literature": "No. The key contribution of this paper seems independent with existing works.", "essential_references_not_discussed": "No", "other_strengths_and_weaknesses": "Strengths:\n- This paper propose a new generative approach to predicting ST from WSIs. It learns the joint distribution $p(Y_0,\\cdots,Y_N|I_0,\\cdots,I_N)$ using the FM framework. This seems novel and could be a valid contribution to the field.\n- The proposed STFlow considers to learn the invariant representation for spots via E(2)-invariant spatial attention.\n- Impressive results are obtained in this paper. STFlow often outperforms existing methods by large margins.\n\nWeaknesses:\n- The presentation quality is subpar. The authors fail to clarify how they tackle the issues of existing methods in Introduction. Please see *Questions For Authors* for more details\n- Some important experiments are not presented in this paper. In addition, an important design in STFlow, *i.e.*, modeling the joint distribution $p(Y_0,\\cdots,Y_N|I_0,\\cdots,I_N)$, seems to lack justification. Please see *Questions For Authors* for more details", "other_comments_or_suggestions": "Please see *Questions For Authors*", "questions_for_authors": "The proposed approach seems interesting and novel. Moreover, some promising results are obtained in this paper. Overall, I acknowledge this paper's technical contribution to the field and the novelty of the proposed scheme. However, I have several concerns about the presentation quality and experiments of this work. My concerns and questions are as follows:\n- The Introduction analyzes the issues of existing schemes yet does not clearly explain how this work tackles these issues. Although some explanations are made in the following sections, this way could lead to inefficient reading.\n- The layout of some Tabs and Figs could be improved, *e.g.*, Tab 2 on page 6.\n- Could the authors provide the visualization of the inference process of FM. This experiments could help readers better understand STFlow. \n- Could the authors represent the results of STFlow with different $S$. It may help to validate the stability of the proposed method.\n- Some results have large variance (Table 1). This may call into question the stability of the proposed method.\n- Some commonly-used metrics seem missing, *e.g.*, those metrics presented in the compared methods, TRIPLEX and HisToGene.\n- How is the `w/o FM` implemented? I fail to find the details.\n- The effectiveness of one core design, *i.e.*, modeling the joint distribution $p(Y_0,\\cdots,Y_N|I_0,\\cdots,I_N)$, seems to lack convincing evidence. How is this core design justified? Could the authors explain this?\n- It would be better to provide an intuitive expatiation for how FM realizes the modeling of joint distribution. This could be more friendly to the reader unfamiliar with FM.\n- In Algo.2, is $Y_0$ sampled once or multiple times when deriving the prediction of one WSI from the model?\n\nIf my concerns could be resolved, I would be happy to raise my rating.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "M3c8BAk0C4", "reviewer": "Reviewer_LYQK", "summary": "This paper proposes a method to predict gene expression from histology whole-slide images using generative flow matching. Spatial transcriptomics (ST) datasets are used to train and evaluate the model. A foundation-model encoder is used to extract visual features. Spatial attention is used to model spatial dependencies. Flow matching models the joint distribution of gene expression over the whole slide in an iterative fashion.\n\n## update after rebuttal:\nAfter carefully reviewing the author's rebuttal and considering other reviewer's input, i decide to keep my accept rating.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for the insightful comments and will revise the manuscript accordingly. Please see our detailed responses below:\n\n```\nA complex system with several modules and hyperparameters makes it challenging to evaluate.\n```\n\nAns: Thank you so much for the feedback. STFlow primarily consists of two core components: (1) a frame averaging (FA)-based encoder and (2) a flow matching (FM) optimization framework. We evaluate their effectiveness by (i) comparing different geometric encoders and ablating FA, and (ii) removing the iterative refinement process. Additionally, we provide results on varying the number of refinement steps and ZINB prior hyperparameters to further assess stability below. We will refine our discussion to more clearly highlight each component’s contribution.\n\n| #steps | S=1 | S=2 | S=5 | S=10 | S=16 |\n| --- | --- | --- | --- | --- | --- |\n| IDC | 0.580(.005) | 0.585(.002) | 0.587(.003) | 0.585(.001) | 0.585(.001) |\n| PRAD | 0.420(.003) | 0.416(.003) | 0.421(.002) | 0.414(.003) | 0.415(.004) |\n| PAAD | 0.488(.001) | 0.498(.001) | 0.507(.004) | 0.499(.001) | 0.498(.001) |\n| SKCM | 0.705(.002) | 0.707(.005) | 0.704(.005) | 0.703(.005) | 0.703(.005) |\n| COAD | 0.315(.008) | 0.343(.004) | 0.326(.009) | 0.320(.003) | 0.321(.004) |\n| READ | 0.232(.009) | 0.239(.002) | 0.240(.014) | 0.239(.003) | 0.239(.004) |\n| CCRCC | 0.322(.001) | 0.340(.002) | 0.332(.003) | 0.330(.002) | 0.319(.003) |\n| HCC | 0.115(.008) | 0.119(.002) | 0.124(.004) | 0.117(.003) | 0.118(.002) |\n| LUNG | 0.604(.002) | 0.612(.002) | 0.610(.002) | 0.611(.002) | 0.611(.001) |\n| LYMPH_IDC | 0.278(.002) | 0.310(.001) | 0.305(.001) | 0.306(.001) | 0.305(.001) |\n| Average | 0.405 | 0.417 | 0.415 | 0.412 | 0.411 |\n\n| ZINB(mean, number of failures) | (0.1,1) | (0.2,1) | (0.4,1) | (0.1,2) | (0.2,2) | (0.4,2) | (0.1,4) | (0.2,4) | (0.4,4) |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| IDC | 0.586(.001) | 0.585(.003) | 0.585(.001) | 0.584(.001) | 0.585(.002) | 0.587(.003) | 0.585(.001) | 0.583(.001) | 0.585(.001) |\n| PRAD | 0.417(.002) | 0.415(.001) | 0.413(.000) | 0.415(.000) | 0.421(.002) | 0.413(.001) | 0.415(.000) | 0.415(.002) | 0.418(.001) |\n| PAAD | 0.496(.002) | 0.507(.004) | 0.499(.000) | 0.499(.005) | 0.502(.004) | 0.500(.001) | 0.498(.000) | 0.499(.002) | 0.502(.006) |\n| SKCM | 0.707(.007) | 0.704(.002) | 0.710(.004) | 0.704(.007) | 0.709(.003) | 0.704(.009) | 0.709(.003) | 0.703(.005) | 0.707(.008) |\n| COAD | 0.339(.002) | 0.342(.003) | 0.341(.004) | 0.343(.000) | 0.338(.003) | 0.343(.004) | 0.342(.002) | 0.343(.006) | 0.340(.000) |\n| READ | 0.253(.003) | 0.231(.000) | 0.243(.000) | 0.247(.004) | 0.244(.004) | 0.245(.000) | 0.236(.001) | 0.246(.000) | 0.249(.002) |\n| CCRCC | 0.339(.001) | 0.337(.003) | 0.340(.004) | 0.334(.000) | 0.342(.008) | 0.329(.005) | 0.334(.000) | 0.336(.002) | 0.337(.003) |\n| HCC | 0.118(.001) | 0.122(.000) | 0.123(.005) | 0.120(.003) | 0.120(.001) | 0.122(.004) | 0.126(.002) | 0.125(.003) | 0.124(.003) |\n| LUNG | 0.611(.001) | 0.611(.000) | 0.611(.001) | 0.610(.000) | 0.611(.001) | 0.610(.001) | 0.608(.001) | 0.609(.000) | 0.613(.001) |\n| LYMPH_IDC | 0.308(.001) | 0.310(.002) | 0.308(.001) | 0.309(.000) | 0.308(.001) | 0.304(.000) | 0.306(.001) | 0.305(.002) | 0.304(.002) |", "claims_and_evidence": "The method claim to better consider cell-cell interaction through both spatial attention at the encoder and the flow matching iterative generative process. Although spatial attention clearly provides a way to model spatial dependencies, it is not very clear intuitively how the flow matching (FM) helps. Nevertheless, the ablation study shows that without FM, there's a small performance degradation on all benchmarks.", "methods_and_evaluation_criteria": "The proposed method is appropriate for the problem. In particular, it has been proven in the litterature that ST model benefits from spatial attention as the tumor generally grows out spatially. THe evaluation benchmark dataset are also appropriate for the task and have been used previously in the literature.", "theoretical_claims": "No theoretical claims are made in the paper.", "experimental_designs_or_analyses": "The experimental section includes 8 baselines (5 spot-base and 3 slide-based) across two benchmark ST datasets (each covering several organs). Further, two ablation studies verify the effectiveness of each module of the proposed approach, showing the improvement for each one.\nOverall, this is a sound and valid experimental section.", "relation_to_broader_scientific_literature": "The key contributions are well-related to specific litterature, in my opinion. Both key contributions (spatial attention and flow matching) are properly related to current publications and the ST litterature is also well referenced.", "essential_references_not_discussed": "Not that i know of.", "other_strengths_and_weaknesses": "strengths:\n- The paper applies flow-matching methods (used in generative modeling of molecule and proteins) to gene expressions regression from image encodings. This is novel, as far as i know.\n- a strong experimental analysis with extensive benchmark, ablation + complexity studies\n- outperforms SOTA methods\n- well written and organized. Clear math and algorithms.\n- code repository is proposed\n\ncons:\n- a complex system with several modules and hyperparameters makes it challenging to evaluate\n-", "other_comments_or_suggestions": "no typos to report!", "questions_for_authors": "No questions.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: This paper proposes a new method to predict spatially-resolved gene expression data from H&E images at a whole slide level, through training on spatial transcriptomics data. The idea is to use generative flow matching to predict gene expressions at each location/spot/patch, and use E(2)-invariant spatial attention to aggregate representation between spatially nearby spots. The paper is generally well perceived by the reviewers for its novelty, efficacy, and thorough experimental evaluation. The rebuttal resolved some raised issues and all reviewers support the paper to be accepted.
Decision: Accept (spotlight poster)