Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Authors: Yunhak Oh
Junseok Lee
Yeongmin Kim
Sangwoo Seo
Namkyeong Lee
Chanyoung Park
Venue: ICML 2025 poster (2025)
Keywords: Spatially Resolved Transcriptomics
Self-Supervised Learning
Primary area: applications->health_medicine

Abstract: Spatially Resolved Transcriptomics (SRT) is a cutting-edge technique that captures the spatial context of cells within tissues, enabling the study of complex biological networks. Recent graph-based methods leverage both gene expression and spatial information to identify relevant spatial domains. However, these approaches fall short in obtaining meaningful spot representations, especially for spots near spatial domain boundaries, as they heavily emphasize adjacent spots that have minimal feature differences from an anchor node. To address this, we propose Spotscape, a novel framework that introduces the Similarity Telescope module to capture global relationships between multiple spots. Additionally, we propose a similarity scaling strategy to regulate the distances between intra- and inter-slice spots, facilitating effective multi-slice integration. Extensive experiments demonstrate the superiority of Spotscape in various downstream tasks, including single-slice and multi-slice scenarios.

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Yunhak Oh
Junseok Lee
Yeongmin Kim
Sangwoo Seo
Namkyeong Lee² Chanyoung Park
Abstract
noise caused by the technology's limited resolution and high dimensionality.
Spatially Resolved Transcriptomics (SRT) is a cutting-edge technique that captures the spatial context of cells within tissues, enabling the study of complex biological networks. Recent graph- based methods leverage both gene expression and spatial information to identify relevant spatial do- mains. However, these approaches fall short in obtaining meaningful spot representations, espe- cially for spots near spatial domain boundaries, they heavily emphasize adjacent spots that have minimal feature differences from anchor node. To address this, we propose Spotscape, novel framework that introduces the Similarity Telescope module to capture global relationships between multiple spots. Additionally, we pro- pose similarity scaling strategy to regulate the distances between intra- and inter-slice spots, fa- cilitating effective multi-slice integration. Exten- sive experiments demonstrate the superiority of Spotscape in various downstream tasks, includ- ing single-slice and multi-slice scenarios. Our code is available at the following link: https: / //gi thg......... cww yunhakunaakkkkk 0/ Otaeek/OOSpppttee Spotsccpp..
In response to these challenges, representation learning methods have been developed to capture biologically mean- ingful spot representations by integrating spatial and gene expression data. Specifically. graph- based methods (Xu et al., 2024a; Hu et al., 2021) construct graphs using spatial coordinates to gather information from nearby spots and gen- erate representations using graph neural networks (GNNs), While this approach effectively incorporates spatial informa- tion into latent representations, it faces limitations for spots near spatial domain boundaries. These boundary spots may receive information from nodes representing different types of spots (i.e., heterophilic nodes), which complicate accurate representation learning. To address this limitation, STAGATE (Dong & Zhang, 2022) utilized graph attention networks (GAT) (Veličković et al., 2017) to learn spot sim- ilarities, enhancing the representations spots at spatial domain boundaries.
Despite the effectiveness STAGATE, we argue that learn- ing attention weights in SRT data remains challenging due to the continuous nature of biological systems, where gene expression values vary smoothly along spatial coordinates (Cembrowski & Menon, 2018; Phillips et al., 2019; Adler et al., 2019; Harris et al., 2021). This continuity blurs the distinction between spatial domains, as shown Figure (a), since spots in local neighborhoods exhibit high similar- ity even across different domains. Furthermore, even with well-learned edge weights (c.g., assigning high weights to same-type spots and low weights otherwise), an anchor spot may still struggle to extract meaningful information from its neighbors due to marginal feature differences. As a result, the received information may be largely redundant, hinder- ing representation quality. To corroborate our argument, compared the clustering performance of various graph autoencoder (GAE) architectures, as shown in Figure I (b); (I) GAE on the original spatial nearest neighbor (SNN) graph' (2) GAE with a GAT encoder, (3) GAE with oracle
1. Introduction
Recently, Spatially Resolved Transcriptomics (SRT) has gained significant attention for its ability capture the spatial context of cells within tissues. It provides spatially resolved gene expressions, quantifying gene activity levels and mapping each spot's ' physical location within the tissue. Although it helps uncover complex transcriptional structures in tissue, amalyzing SRT data remains challenging due to
'Equal contribution 'Grauutee School of Data Science, KAIST, Daejeon, Republic of Korea DDeparmeent of Industrial & Systems Engineering, KAIST, Daejeon, Republic of Korea DDepartment of Mathematical Sciences, KAIST, Dacjeon, Republic of Korea. Correspondence to: Chanyoung Park <ce, ccy.park@ kr.>.
'The SNN graph is constructed by connecting spots that are either within predefined radius among the nearest top k neighbors based on spatial distance.
Proceedings of the ndnd International Conference Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
(1) Global view
Correctly Clustared
Wrongly Dustered in Boundary
Wrongly Clustered Inside
(Tessa Cat 0.5037, Boundayy 0.3094) (Tess Cai 8.5851 Banndry 6.335) (Tasa 0.012, 64122) (TeaniCk 08822, Boundayy
(2) Local view
Spenial
Similirrty
1ayer
GAE
GAE GAT ancoder (STAIGATE)
(3) GAE (e/ aracle edgest
Spatscape [Oun)
Lapor
(a) Feature similarity comparison
(b) Clustering performance comparison
Figure 1. (a) Feature similarity comparison from global and local perspectives. In global view, the similarity between the anchor (i.e., red dot) and other spots gradually changes with their spatial coordinates. In contrast, in the local view. neighboring spots exhibit minimal feature discrepancy compared to the anchor, irrespective of the true spatial domain. (b) Clustering performance comparison in terms clustering accuracy for all spots (Total CA) and particularly for spots located the boundary of clusters (Boundary CA) in the human dorsolateral prefrontal cortex (DLPFC) dataset.
edge weights", and (4) GAE incorporating global similarity learning (our proposed method). While the attention mecha- nism improves general clustering performance (i.e., Total CA), it degrades the clustering performance of boundary spots (i.e., Boundary CA). This highlights the difficulty of learning spot representations near the boundary of spatial domains using attention. Another interesting observation is that even with oracle edge weights, improvement in terms of boundary CA is not significant compared with the GAE on the original SNN, supporting our argument that solely relying on the local view provides limited information.
same domain) from different slices in latent space. More- over, we propose a similarity scale matching loss that ex- plicitly balances the similarity scales of inter- and intra- relationships to mitigate the batch effect. This strategy enhances the integration of representations across slices, enabling our model to handle both single- and multi-slice SRT data effectively.
In summary, our contributions are four-fold:
We find that capturing similarity among spatially local neighbors alone is insufficient for learning meaningful representations in SRT data, especially near the bound- aries of spatial domains.
In addition to addressing the aforementioned challenges in single-slice analysis, representation learning models for the SRT dataset must account for batch effects (Li et al., 2020b) to facilitate multi-slice analysis. The batch effect refers to the phenomenon where gene expression profiles from the same slice cluster together unexpectedly, regardless of their biological relevance, during multi-slice integration. While integrating multiple datasets offers significant advantages, addressing batch effects remains a key challenge.
To address this limitation, we propose global similarity learning scheme called the Similarity Telescope module to capture the relationships between spots the global context.
We adopt a PCL scheme and introduce a similarity scale matching strategy to mitigate batch effects during si- multaneous training with multiple slices, enabling our model to perform effectively on both single-slice and multi-slice SRT data.
To this end, we propose Spotscape, a novel framework designed to tackle challenges in both single-slice and multi- slice tasks. Based our findings that relying solely on spa- tially local neighbors provides limited performance gains, Spotscape introduces the Similarity Telescope module, which captures relative similarities not only among spatially neighboring spots but also across global spots. This learning scheme is particularly beneficial for SRT data, as optimiz- ing similarity directly supports downstream analyses that involve comparing relative distances, such clustering or marker gene detection.
We conduct extensive experiments across various tasks and datasets to validate the effectiveness of Spotscape in both single- and multi-slice datasets.
2. Related Work
2.1. Representation learning for SRT data
Learning effective representations of SRT data is critical for downstream tasks, such spatial domain identifica- tion (SDI), which categorizes biologically meaningful tissue regions and enhances our understanding of tissue organi- zation (Maynard et al., 2021). Recently, graph-based deep learning methods have incorporated spatial coordinates and gene expression. For instance, SEDR (Xu et al., 2024a)
Furthermore, we extend Spotscape to multi-slice tasks by employing prototypical contrastive learning (PCL) scheme to cluster semantically similar spots (i.e., spots with the
'Edges between spots of the same type were assigned a weight of 1, and 0 otherwise. That is. remove heterophilic edges.
2

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
and denoise spatial gene expression, while SpaGCN (Hu et al., 2021) integrates spatial and gene expression data us-
employs a graph autoencoder (GAE) with masking to learn
Single Sicce
f Vat
Golt Sod' ao
2
Multi
PCL Aucc
Z'
GNN To
2(03)
MLP Jl
ing graph neural networks and clustering loss (Xie et al.,
SNN Graph
Harb
2016). STAGATE (Dong & Zhang, 2022) applies graph attention networks to address boundary heterogeneity. Self- supervised learning has also gained popularity for captur- ing robust representations without labels. SpaceFlow (Ren et al., 2022) utilizes Deep Graph Infomax (DGI) (Veličković et al., 2018) with spatial regularization for spatial consis- tency, while SpaCAE (Hu et al., 2024) uses a GAE with contrastive learning to handle sparse and noisy SRT data.
Eor Telescope
simitaitt
Simiteity
grd - amny
L
circkr spots
20())
MLP Bo
X'(
Simllrtty
Scaling
Ase
Figure 2. Overall framework of Spotscape, which is trained with the SNN graph using (a) similarity telescope and reconstruction loss, while additionally utilizing (b) PCL and similarity scale matching loss in multi-slice SRT.
2.2. Slice Integration and Alignment
Numerous SRT studies collect data from neighboring tissue sections, but inconsistencies in dissection and positioning lead to misaligned spatial coordinates. As a result, inte- grating data across slices is essential for extracting diverse insights. PASTE (Zeira et al., 2022) addresses this using op- timal transport to align spots into shared embedding space. However, SRT data is sometimes generated under varying conditions (e.g., different technology platforms, develop- mental stages, or sample conditions). We refer to this as the heterogeneous case, which presents an additional chal- lenge: batch effects, where gene expression profiles from the same slice cluster together, irrespective of their biologi- cal significance. STAligner (Zhou et al., 2023) mitigates this by defining mutual nearest neighbors as positive samples and using triplet loss to integrate embeddings across slices. GraphST (Long et al., 2023) employs DGI to correct batch effects by maximizing mutual information in vertical or hor- izontal integrations. Moreover, PASTE2 (Liu et al., 2023) uses partial optimal transport concept for partial alignment. Furthermore, SLAT (Xia et al., 2023) uses graph adversarial training for robust slice alignment and CAST (Tang al., 2024) leverages CCA-SSG (Zhang et al., 2021) for hetero- geneous slices integration and alignment. Our approach addresses both homogeneous and heterogeneous integration and alignment tasks using a prototypical contrastive learning scheme and simple similarity scale matching strategy.
resent the entire structure as G = (X, A). The adjacency matrix A E NNN,N, is defined such that A. = 1 if there is an edge connecting nodes i and j. and Aij = 0 otherwise. For simplicity, we do not define a separate adjacency matrix for each slice, resulting in a block-diagonal matrix where all elements are zero across different slices.
Task description. Given the constructed SNN graph G, our goal is to train graph neural network (GNN) that generates spot representations without any label information, i.e., self- supervised learning. The trained GNN is then utilized for various downstream tasks, including SDI, trajectory infer- ence, imputation, multi-slice integration, and alignment.
4. Methodology
In this section, we introduce our method, Spotscape. In a nutshell, Spotscape learns spot representations by captur- ing global similarities between spots through the Similarity Telescope module (Sec 4.2) for the single-slice tasks. More- over, to enhance multi-slice tasks, we adopt a prototypical contrastive learning module (Sec 4.3) to group spots from the same spatial domain across different slices and introduce similarity scaling strategy (Sec 4.4) to balance intra- and inter-slice similarities, thereby alleviating batch effects. The overall framework of Spotscape is depicted in Figure 2.
3. Problem Statement
4.1. Model Architecture
In this work, we propose novel self-supervised learning strategies specifically tailored for SRT data, while adhering to a basic siamese network structure for our model architec- ture. In siamese network, we generate two augmented views, I (X, A) and ć' (X', A'), by applying a stochastic graph augmentation T to the original graph G, which con- sists of node feature masking and edge masking. Then, Spotscape computes spot representations Ž = fa and Ž = fx A') ), fo is a shared GNN-based encoder, Ž E R N. and Ž E N.XD represent spot representa- tions derived from augmented graph & and G', respectiveel,
Notations. The SRT data is composed of spatial coordinates S E N2 and gene expression profile X E NRNNNN,, where N, represents the total number of spots across all slices, and Ng denotes the number of genes. In multi- slice cases, the spatial coordinates and gene expression profiles are denoted as S (8(1), S(2) ...., S(Na)) and X = -xX(1) ., X (Na)), respectively, where Na rep- resents the number of slices. We construct spatial nearest neighbors (SNN) graphs G = (g(), ge)).... (Na)) based on distances computed from spatial coordinates and rep-
3

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomies
and D denotes the dimension size of representations.
ical processes by analyzing the continuity of gene expres- sion across the entire tissue or organ. For this analysis, researchers need to identify corresponding or similar spots across different slices, requiring an integrated representa- tion space. To ensure a well-integrated representation space, spots should be merged based on meaningful characteristics. To this end, Spotscape employs a prototypical contrastive learning (PCL) scheme (Li al., 2020a; De Donno et al., 2023; Lee et al., 2023) to group spots with the same spatial domain while distancing others in latent space. Specifi- cally, we obtain prototypes (i.e., centroids) by performing K -means clustering on spot representations 2 derived from an augmented view g' Pairs of spots assigned to the same prototype are categorized as positive pairs, while pairs be- longing to different prototypes are treated as negative pairs. This clustering is repeated T times with varying values of K to identify semantically similar groups across different granularities. It is formally represented as follows:
4.2. Similarity Telescope with Relation Consistency
Biological systems exhibit a continuous nature, where gene expression values vary smoothly along spatial coordinates. This continuity results in feature similarities between neigh- boring spots, influenced by both meaningful functional char- acteristics and spatial proximity. Consequently, spatially neighboring spots provide limited information, as their fea- ture differences are not fully obtained from meaningful ones and are often merely close due to their spatial proximity. Therefore, relying solely on spatially neighboring spots is in- sufficient for accurate representation learning. highlighting the importance of reflecting the global context in this do- main. To this end, we propose a novel relation consistency loss for spot representation learning, which aims to capture the relationship between cells in the biological systems by reflecting the global context among multiple spots.
T
(sim) &. (o)
Specifically, given spot representations 2 and Z', we pro- pose to learn the consistent relationship that are invariant under augmentation as follows:
1pc1 (ux)
log Σk=
(4)
T 1=1 Lj=1 ( (2 p/)//)
where represents temperature, and K, indicates the num- ber of clusters at each level of granularity during the t- th clustering iteration. Par (P), ...., Pt, ..... pT) rep- resents the collection of prototype sets, with each pd (pi, P2, ... containing the set of prototype representa- tions for a specific granularity t. Additionally, (-), denotes the mapping function that assigns each spot to a cor- responding prototype based on the clustering assignments. By applying this to all spot representations, the overall PCL loss is given as follows:
Lsc ) = MSE normn (
norm) T 7 /nomm (Z T)
where Znom E R x, denotes the L2-normalized version of Z, and MSE represents the Mean Squared Error. That is, we aim to minimize the cosine similarity between the spot representations that are obtained through differently augmented SNN graph. By doing so, the model learns con- sistent relationships, which is represented as cosine similar- ity, between all paired spots under different augmentations, capturing the continuous variations of spot representations across the entire slice. A more detailed interpretation of the relation consistency loss Lsc can be found in Appendix L.
Lr
PPI (2i, P.a)).
(5)
N.
Note that to avoid the risk of obtaining inaccurate prototypes, the PCL loss CPCL gets involved in the training procedure after warm-up period (500 epochs). This loss could be applied to single-slice cases; however, since the representa- tions in this case are better grouped than in multi-slice cases, we chose not to use it due to the trade-off with running time. We discuss this trade-off in Appendix F.
To avoid degenerate solutions, Spotscape employs a recon- struction loss as follows:
RRccon X, X, x') = MSE(X, X) + MSE X
(2)
where X = (z) and X' = 90(22) are reconstructed feature matrices predicted by a shared MLP decoder 9e from each augmented view. Note that utilizing this reconstruction module offers additional advantages, as the reconstructed output (i.e., imputed data) can be valuable for imputing and denoising raw transcriptomics data.
4.4. Similarity Scaling Strategy
The primary challenge of learning representations from mul- tiple slices is the batch effect, which causes representations from the same slice to cluster together unexpectedly, regard- less of their biological significance. From a computational perspective, this means that a given spot's top-k nearest neighbors from the same batch exhibit higher similarity than those from different batches, causing its representation space to be dominated by same-batch spots.
Combining all these two losses, the final training loss for single-slice representation learning is formally defined as:
Single = AscLse + ARecon CRecon
(3)
4.3. Prototypical Contrastive Learning
Beyond single-slice SRT, multi-slice SRT analysis eluci- dates the spatial regulatory mechanisms of specific biolog-
To alleviate this issue, given the SNN graph g( and go) of the current slice e and another slice j, respectively, we
4

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomies
explicitly regulate the scale of these similarities to maintain consistency across spots, described below:
AD groups in the MTG dataset for heterogeneous integra- tion. Lastly, we evaluate heterogeneous alignment using the Mouse embryo dataset, where slices from different devel- opmental stages require alignment to track developmental progression, and the Breast Cancer dataset, which includes spots corresponding to cancer cell types. Further details about data statistics can be found in Table of Appendix A.
Iss (S,,H,, g()) (Mean (S(op) Mean()()))) for i Gl
where S(u Tie- [Z] = (a1, 02 ak),
5(5) = Top-kiegtn [H] = (b1, b2 be......uu bk)
(6)
Compared methods. To ensure a fair comparison, we carefully select baseline methods based on their relevance to specific tasks. For the single-slice tasks, we com- pare Spotscape with five statc-of-the arts methods, i.c., SEDR (Xu et al., 2024a), STAGATE (Dong & Zhang, 2022), SpaCAE (Hu et al., 2024), SpaceFlow (Ren et al., 2022), and GraphST (Long et al., 2023). For homogeneous inte- gration, we add three more methods, PASTE (Zeira et al., 2022), STAligner (Zhou et al., 2023), and CAST (Tang et al., 2024). For heterogeneous tasks, we compare with GraphST, STAligner (Zhou et al., 2023), and CAST, while for hetero- geneous alignment, we compare with PASTE2 (Liu et al., 2023), CAST, STAligner, and SLAT (Xia et al., 2023), both specialized for alignment tasks. Further details about each method's adoptable application can be found in Table 6 of Appendix B.
Here, H- zarmm ( mm ) E R N.N.N. represents the simi- larity matrix that we optimize in the Similarity Telescope module, and [s] refers to the element in the i-th row and s-th column of this matrix. Stop is the list of the top-k high- est similarity values for spot within its own slice, and the list Sup consists of the top-k highest similarity values for spot i in another slice j. By doing this, Spotscape ensures that the distances between the top-k spots remain nearly the same, regardless of their slice, effectively incorporating all spots from different slices within the latent space. By ex- tending it to all spots and slices, the final similarity scaling loss is given follows:
N 1 & got) Iss(HH go))
ΣΣ Css No ==
(7) where 1(i & G(D) is the indicator function that equals 1 if spot i is not included in go) and 0 otherwise. Note that since this loss matches similarities across different slices, it is not applicable to the single-slice case. Finally, the overall loss for multi-slice SRT data is formally represented as:
Evaluation protocol. Since Spotscape and all baseline methods focus on learning spot representations, we first ob- tain representations from each method and apply the same evaluation tools for downstream tasks. For single-slice spa- tial domain identification, we apply K-means clustering and evaluate performance using Adjusted Rand Index (ARI), Normalized Mutual Information (NMI), and Clustering Ac- curacy (CA). For trajectory inference, we compute the pseu- dotime following Spaceflow (Ren et al., 2022) and measure its spearman correlation with gold-standard layers with seal- ing. For multi-slice integration, we assess clustering using the same metrics as in the single-slice experiments and ad- ditionally evaluate batch effect correction using Silhouette Batch, kBET, Graph Connectivity, and PCR comparison. For alignment, we utilize the 'spatial matching' function from SLAT (Xia et al., 2023) and evaluate the alignment quality using Label Transfer ARI (LTARI), which measures the agreement between true and the aligned labels. To en- sure fairness, we conduct a hyperparameter search for all baseline methods instead of using their default settings, as optimal hyperparameters may vary across datasets. The best- pest--erforming hyperparameters are determined based on NMI using the first seed. For Spotscape, only the learning rate is searched using the same criterion. Details of the selected hyperparameters and search spaces are provided in Appendix E. 1. along with an unsupervised approach for hy- perparameter selection in Appendix E.2 to address potential concerns about our evaluation strategy. All experiments are repeated over 10 runs with different random seeds, and we report the mean and standard deviation of the results. For all
MMuli = AscC + OR + CPCL + +AssCss (8)
where APCL. Ass are additional balancing parameters of pro- totypical contrastive learning loss and similarity scaling loss, respectively. The pseudo-code for Spotscape is provided in Appendix C.
5. Experiments
Datasets. We conduct a comprehensive evaluation of Spotscape across five datasets derived from different se- quencing technologies. For single-slice experiments, we use the dorsolateral prefrontal cortex (DLPFC) dataset, which includes 3 patients, each with 4 slices (12 slices in total). Additionally, we assess the middle temporal gyrus (MTG) dataset, comprising slices from a control group and an Alzheimer's disease (AD) group, as well as the Mouse embryo dataset. Lastly, we utilize non-small cell lung cancer (NSCLC) data obtained from CosMX sequenc- ing, which provides one of the highest subcellular resolu- tions among sequencing platforms, In multi-slice experi- ments, we integrate the four slices from the same patient in the DLPFC dataset for the homogeneous integration task, while analyzing the differences between the control and
5

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomies
Table 1. Single-slice spatial domain identification performance on (a) DLPFC, (b) MTG, (c) Mouse Embryo, and (d) NSCLC datasets.
DLPFC (Putiont
Sliee 191073
Slice 151814
Sliee 151675
Slice 191676
NM
SETRR
0:96 mm
0:00 yrit
0.55 mm
(:37
D:04 csm
0.35 pm
0-15 pm
0151 (m
0.79
0.11 pr4
0:47 mm
STAGATE
0.37 6:30
0.55 mis
0.52 6:9
0.34
0.50
0.51 cm3
0.35 p.)
0,50
0.48 mm)
0.33
0.47 mm
0.52 600
SpuCAA
mm
0:37 pmr
0.35 pm
0-11 pm
mB)
0.2)
1134
0.35mm
Spucstiww
0.52 wm
0,52 pm
0:11 (4th)
1 pm
0.2 mm
[131 mm)
0:3
[121 60)
0,33
GuyAST
0.30
0,40wxm
Figure 3. Trajectory con-
Spatecapp
0,88
0
0
0
0
0,4599
0.00
0
I.42
0
1.37
(a DLPPC (Polion 21
servation between pseu-
151917
Sleee 1510
Slee 151309
151510
dotimes and Layers in
ARII
SMI
CA
ARI
NMI
CA
AR1
NMI
NMI
CA
DLPFC data.
StIDEE
0.29
02.5 xm
0.21 mx
0.31 (18))
11:9
0.22 so2
0.47
0:5 1000
0:31 m030
1644 a6
1441-am0
STAGATE
0.41
km
0.5
0.57 md
0.6
6:3
0,50am
Blarerd worker poeal
0.31
0:37
0.35
0.41
0.55
Lague
Spotscape
0.00P au
IL72" w0i
1:48" J4n
B64 (00
6A3 Du1
0 v330
0.71 VARO
0 0.20
1L53P ax0
167 310
0.64 140
DLPFC (Palioni
Stae 151009
Steee 151670
Silee 353671
Silee 333672
0:44 Standand]layyerr wakker
ARI
NMH
CA
ARI
NYI
CA
ARI
NMI
CA
ARI
NMH
1134
1140umm
01:6
0334
0.99 pom
1648
0.57
0.30
0,99
1140
1335%
0.06
STAGATTE
0.75 mm
0.45
0.5
0.38 v:0
0-00
0.09 am
0653 km
0.38.0 am
0.51 am
0.54 Xm
SpaCAE
(.21 m0:
021 X00
0.25
0.58 8.30
0.29 am
040 kmo
0.25 aM
0.35 pm0
0.50 MAD
Spasifiow
mm50
0.58 ym1
0.07 am
240 you
0.00
0.70 845
0.73 xmN
GreptST
0.37 mae
0.26
0.43
0.14 600
0.23 m0
am
sm
MA
Sporscape
(045
11,5
0,45*
0
0
0,50P
0,79
UL75
0.74
0,44
INIIGG- Cinii---iiidd Grapp
DN SIT AD Greup
Moxee Eneheys
101 WWWLL
ex- Figure 4. Spatial
AMI
XMI
UA
AHII
NM0
NM
AHI
NM0
pression of raw and
am
8.11 om
(66
mm
SPUCAE
B34
3.0
STNDAT
SaCAE
032
6:5.vo
(1.1
(U8 6m
065
066
Spotscape imputed data
146
3.5
(12)
mm
for marker genes of Layer
Spotscape
638" pm)
436 pma
6:11
643
6 in DLPFC data.
experimental results, Bold indicates the best performance, underlining denotes the second-best, and an asterisk (*) marks statistically significant improvements of Spotscape over the top-performing baseline based on paired t-test (**;
provided in Section 5.3, and comparison to general self- supervised learning methods can be found in Appendix B.
Trajectory inference. To further validate the broad applica- bility of Spotscape, we conducted trajectory inference on DLPFC data. The results, shown in Figure 3, demonstrate that Spotscape effectively performs trajectory inference and accurately captures biologically meaningful spatiotem- poral patterns. Specifically, Spotscape reveals layer- patterned pseudotime, indicating a pseuudo-spatiotemporal order from White Matter to Layer 1, which aligns with the correct inside-out developmental sequence of cortical layers and reflects the tissue's 's layered spatial organization. Additional details can be found in Appendix H.
p < 0.01, #: p < 0.05), with the numbers in parentheses representing the standard deviation.
5.1. Single-slice Experimental Results
Spatial domain identification (SDI). Experimental results on four different datasets are reported in Table 1, which shows the SDI performance on (a) DLPFC, (b) MTG, (c) Mouse Embryo, and (d) NSCLC datasets, respectively. From these results, we have the following observations: 1) Spotscape consistently outperforms in all 16 slices across four datasets in terms of ARI, NMI, and CA. We argue that this is because Spotscape not only explores information from spatially local neighbors, which provides limited in- sights due to the continuous nature of SRT data, but also leverages global contextual information. 2) SpaceFlow also shows high performance compared to other basclines by mapping the spatial distance between spots to the represen- tation space through regularization loss. This suggests that accurately capturing the distance between spots is crucial for SRT data analysis. 3) However, it still exhibits lower performance compared to Spotscape, as the proposed sim- ilarity telescope module directly optimizes the similarities (i.e., distances) between spots by maintaining consistency between augmentations, thereby providing more accurate similarities. Further analysis of this learned similarity is
Imputation. To demonstrate the benefits of incorporating decoder layer and reconstruction loss, we perform impu- tation tasks to show that the reconstructed outputs can help identify marker genes that were not differentially expressed in the raw data. In Figure 4, we show that NR4A2, a marker for layer 6 neurons (Maynard et al., 2021; 1; Darbandi et al., 2018) 8), which was not well well-recognized in the raw data, be- comes more distinct in the denoised output. Comprehensive results additional marker gene detection and quantitative comparisons with baselines are provided in Appendix I.
5.2. Multi-slice Experimental Results
Homogeneous integration. Among the multi-slice exper- iments, we first start with homogeneous integration tasks, which aim to integrate multiple slices from the homoge-
6

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Table 2. Homogenenus integration performance on DLPFC data.
Patient
Patient
Patient 3
ARI
NMI
CA
ARI
NMI
CA
ARI
NMI
CA
SEDR
0.38
3030
0.56
0.32 3130
0.48
0.4 (t
0.56
STAGATE
0.31 oue:
0.46 was
0.19 (329)
0.30 102
0.45 1a
0.48 uvc)
0.31 12.9)
0.43 quel
0.54 avoo
SpoCAE
0.21 (vm:
0.36 (uzz)
0.40 (3.
0.12 9.30
0.19 a.th)
0.32 ase
0.13 (2:9)
0.14 out))
0:45 muo0
SpuceFllw
0.48
yaats
0:44
0.58 non
0.51 (t
0.69 airt
GaahST
0.18 ovn
0.32 a01
0.38 (3:2)
0.25 m031
a amo
0.42 ave
0:25 (2:00
0.30 mon
0.50 (01
PASTE
0.54
0:45 0130
0.54 (3:00
0.17
0.38 an
0.40 over
0.29 (c
0.43amr ooes
0:54 2000
STAligner
0.38 nuw
0.55 (3:4)
0.29 (022)
10
0.45 ooo
0.37 (c.0)
0.59 sue
Figure 5. Alignment
CAST
0.37 3uz9
0.42 (3:
0.30 11:60
0:43 19
0.47 osor
0.38 mc
0:40 now
0.56 suts
results of Mouse embryo data.
Spotscape
0,57 que)
0,70** auro
0.67* 15:89)
0,53 auED
0.67 12.00
0.63* (00))
0.63* 19.091
0.68 (000)
0,75**
Table 3. Heterogeneous integration performance on MTG data.
Table 4. Alignment
Clustering Metric
Batch Effect Correction Metric
performance of Mouse embryo data.
Graph
PCR comparison
ART
NMI
Silhonette batch
kBFT
connectivity
LTARI
GraphST
0.23
0,42 ma00)
0.39 (000))
0.56 s00;
0.02 (0.00
0.65 (002)
0.00 (00))
PASTE2
0,21 0000
STAligner
0.38 (um
0.54 mor)
0.49 (040))
0.62 2oot
0.11 (000)
0.85 (v04)
0.18 (ul0)
CAST
0.10
CAST
0.48 (our)
0.52 (008)
(0:0))
jouz)
0.11 (302))
(u06))
(103))
STAliguer
0,46 m.00
Spotscape twks (ycL)
0.61
0,71
0.70 (9/02)
0.67 1001:
0.03
0.79 (002)
0.50 (004)
SLAT
0.41 (L1))
Spotscape (wib Coo)
0.47 cm
0.60 (0:04)
0. 59 (3.00)
0.24 a001
0.00 2.00
0.63 (000))
0.00 (092))
Spotscape
0.51 (200
Spotscape
0.72* (po0))
0.76 (100)
0 (B.05)
0.69 m..0)
0.08 (ouz7)
0.86 (1o1))
(Dv08)
Raw
GrighST
STAlggarr
CAST
Spotscape Ewilo [qec)
Spotenape Iwto ka)
Spotacope
Stngie-stica sot (OLPEC)
1800 (Bare))
6.0
0.40
GraundTrvn
Lond
Carca w/o
Spotscape
kissars
w/o Exp ale
wio Ese
Spotscape
Figure 6. UMAP of Raw, GraphST, STAligner, CAST, Spotscape (w/o Lss), Spotscape (wlo LyCl), Figure 7. Ablation Spotscape by slice, ground truth, and K -mmans clustering results.
stud-
ies.
neous sample. To do so, we conduct experiments on the DLPFC data, which consists of multiple slices obtained from vertical cuts of single patient. Since these slices are from a single patient, they do not exhibit significant batch ef- fects, enabling us to incorporate both multi-slice integration methods as well as single-slice SDI methods as baselines. As shown in Table 2, we observe that Spotscape consis- tently outperforms all baseline methods, demonstrating its effectiveness in integrating spots from the multiple slices.
from different slices are well integrated while preserving their biological meaning. We also verified that both PCL and similarity scaling perform as intended by evaluating their effects after removing each component. Without PCL (i.e., Spotscape w/o LPCL), we observe drop in cluster- ing performance, as the spot representations are not tightly condensed in the representation space. Additionally, we observe that the batch effect becomes severe without the similarity scaling module (i.e., Spotscape w/o Lss), result- ing in a significant degradation in clustering performance, which highlights the importance of this module to alleviate the batch effect for handling multiple slices.
Heterogeneous integration. For the heterogeneous integra- tion experiments, we assess the model's 's ability in integrating two distinct types of samples-the the control (CT) group and the Alzheimer's 's disease (AD) group in the MTG data-to analyze the differences between them. In this experiment, we also report batch effect correction metrics to evaluate the effectiveness of correcting batch effects, along with clus- tering metrics. In Table 3, Spotscape demonstrates its effectiveness in integrating multi-slice data in terms of both clustering and batch effect correction, showing significantly better performance than the baselines. Moreover, in Fig- ure 6, we observe that Spotscape's 's spot representations
Differentially expressed gene analysis. We verify that our results yield biologically meaningful insights by inves- tigating differentially expressed genes (DEGs) and their biological functions between the Control and AD groups using Gene Ontology (GO) enrichment analysis for each cluster representing a cortical layer. Spotscape reveals that layer 2 reflects early-stage AD processes (e.g., oxida- tive stress), while layer 5 captures later-stage events (e.g.. inclusion body assembly), aligning with established AD

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
1200
Deglske
Erpast
4X0
0.00
18.
Figure 8. Sensitivity analysis of loss balancing parameters.
(6) Gingle sicce
(b) Matti
Raw
SEDA
STAGATE
SpaDAE
Liper
Figure 10. The running time of Spotscape and baseline methods over the various number of spots on (a) the single and (b) multi- slice dataset.
e Lope
Line
Spacef how
GrighSi
Spothcape Lge)
Spotscape
scaling (Css) demonstrates its necessity, with significant performance drop observed without this module. Addition- ally, we perform ablation studies encoder variations in the Appendix F.
Sensitivity analysis. We conduct a sensitivity analysis on four balancing parameters ARecon Àsc, APCI. and Àss in Figure 8. The reconstruction loss and similarity consistency loss demonstrate robustness across wide range of values. However, when the weight of the reconstruction loss (ARecon) is excessively high, performance tends to degrade, indicat- ing that it serves primarily as an auxiliary loss to prevent degenerate solutions. In contrast, the relation consistency loss (Asc) leads to performance degradation when its weight is too small, highlighting its critical role in capturing global similarities within Spotscape. The prototypical contrastive loss (APCL) negatively impacts performance when assigned excessive weight. We attribute this to its tendency to group spots from different domains in the latent space when it dominates the overall training process. Finally, the simi- larity scaling (Ass) maintains robust performance, except when set to extremely low or high values.
Figure 9. Similarity comparison based on anchor node 489 in Layer
pathology and showcasing Spotscape's 's utility in uncover- ing meaningful biological variation. The detailed results are provided in Appendix J due to space limitations.
Multi-slice alignment. We conduct experiments multi- slice alignments of the Mouse Embryo data, which re- quire alignment results to track the development stages of the embryo. To this end, we match E11.5 and E12.5 and report the Label Transfer ARI (LTARI) in Table 4, which measures the agreement between true labels and the labels assigned through the alignment process, and vi- sualize our results in Figure 5. These results show that Spotscape achieves better alignment than SLAT, which is specifically designed for aligmment tasks, demonstrating the general applicability of Spotscape. Furthermore, we conduct cross-technology alignment between data obtained from Xenium and Visium, as reported in Appendix K, to demonstrate that Spotscape can successfully align spots from more heterogeneous scenarios.
Similarity analysis. As a deeper analysis of Spotscape, examine whether it successfully learns the relative simi- larities between spots, which is a key motivation behind our approach. In Figure 9, we randomly select an an- chor spot from the DLPFC data and visualize the similar- ity between the selected anchor and other remaining spots. While other baselines fail to capture appropriate similarities, Spotscape accurately reflects the dynamics of the SRT data with respect to the spatial distance and exhibits varying levels of similarity corresponding to true spatial domain.
5.3. Model Analysis
Ablation studies. We conduct ablation studies on the com- ponents of Spotscape clarify the necessity of each mod- ule, shown in Figure 7. Across both tasks, our proposed Similarity Telescope (i.e., Lsc) demonstrates its importance by showing a significant performance drop without this module, highlighting the value of incorporating global con- text. In contrast, the reconstruction loss (Creson) does not show significant performance gains, as it mainly serves to prevent degenerate solutions. In these experiments, results show that degeneracy does not occur without this module, but it is necessary to address potential issues when apply- ing to other datasets. Additionally, prototypical contrastive learning (i.e., LPC1.) further confirms its role in grouping semantically similar spots in latent space by consistently showing performance improvements. Similarly, similarity
Scalability. With recent advancements in sequencing technologies, model scalability has become a crucial factor in performance evaluation. To assess this, we generate a synthesized dataset by downsampling or oversampling the Mouse Embryo dataset, creating datasets ranging from 1,000 to 100,000 spots. We report the cor- responding runtime in Figure 10. Our results indicate that Spotscape achieves fast training times, highlighting its practicality for throuhhhou datasets (e.g.. 100,000 spots) within a reasonable timeframe. Furthermore, to demonstrate the scalability of Spotscape for real-world,
8

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
large-scale datasets, we present the runtime for varying numbers of slices in Appendix G. These results show that Spotscape can handle extremely large datasets without an exponential increase in runtime as the number of slices grows.
References
Adler, M., Kohanim, Y. K., Tendler, A., Mayo, A., and Alon, U. Continuum of gene-expression profiles provides spatial division of labor within a differentiated cell type. Cell systems, 8(1):43-52, 2019.
6. Conclusion
Bhuva, D. D., Tan, C. W., Salim, A., Marceaux, C., Pick- ering, M. A., Chen, J., Kharbanda, M., Jin, X., Liu, N., Feher, K., et al. Library size confounds biology in spatial transcriptomics data. Genome Biology, 25(1):99, 2024.
In this work, we propose Spotscape, novel framework for representation learning on SRT data, designed to ad- dress challenges in both single-slice and multi-slice tasks. Recognizing the limitations of relying solely on spatial lo- cality due to the continuous nature of SRT data, Spotscape captures global spot similarities through the Similarity Tele- scope module, preserving a global similarity map invariant to augmentations. Additionally, we extend Spotscape to multi-slice tasks by employing prototypical contrastive learning scheme and introducing simple yet effective simi- larity scaling strategy to group spots with the same domain across different slices and mitigate batch effects. Exten- sive experiments demonstrate that Spotscape outperforms existing baselines, uncovering biologically meaningful in- sights and paving the way for more effective SRT analysis in diverse applications.
Brucato, D. R. and Benjamin, D. E. Synap- tic pruning in alzheimer's disease: Role of the complement system. Global Journal of
Medical Research, 20/F6):1-20, May 2020. URL
htgp::///mmiccllrreeeeeaaoooaal index. http::/ppgg/cooaaaaaaaccc///e//e
Caron, M., Misra, I., Mairal, J., Goyal, P., Bojanowski, P., and Joulin, A. Unsupervised learning of visual features by contrasting cluster assignments. Advances in neural information processing systems, 33:9912 999994,,,,,,,,,,, 2020a.
Caron, M., Misra, I., Mairal, J., Goyal, P., Bojanowski, P., and Joulin, A. Unsupervised learning of visual features by contrasting cluster assignments. Advances in neural information processing systems, 33:9912-9924 2020b.
Acknowledgements
This work was supported by Institute of Information & communications Technology Planning & Evaluation (ITTP) grant funded by the Korea goveramenn(MSIT)) (RS-2025- 02304967, AI Star Fellowship(KAISST), the National Re- search Foundation of Korea(NRH)) grant funded by the Korea goVernment(MSSTT) (RS-2024-004069855, and the National Research Foundation of Korea(NRF) funded by Ministry of Science and ICT (RS-2022-NR006855).
Cembrowski, M. S. and Menon, V. Continuous varia- tion within cell types of the nervous system. Trends in Neurosciences, (1(6))337-348, 2018.
Chen, A., Liao, S., Cheng, M., Ma, K., Wu, L., Lai, Y., Qiu, X., Yang, J., Xu, J., Hao, S., et al. Spatiotempo- ral transcriptomic atlas of mouse organogenesis using dna nanoball patterredd arrays. Cell, 185(10):1777-1192. 2022a.
Impact Statement
Chen, S., Chang, Y., Li, L., Acosta, D., Li, Y., Guo, Q., Wang. C., Turkes, E., Morrison, C.. Julian, D., et al. Spatially resolved transcriptomies reveals genes associated with the vulnerability of middle temporal gyrus in alzheimer's disease. Acta Neuropathologica Communications, 10(1):188, 2022b.
This paper advances the field of Machine Learning for bio- sciences by improving spatial transcriptomies data analysis. Our proposed method may have potential applications in biomedical research, including disease understanding and precision medicine. The method may assist in identifying spatial gene expression patterns relevant to disease charac- terization or treatment development, but ethical considera- tions regarding data privacy and responsible use of machine learning in biomedical contexts should be considered in real- world applications. Beyond these general considerations, we think none require specific emphasis that require explicit discussion.
Chen, T., Kornblith, S., Norouzi, M., and Hinton, G. sim- ple framework for contrastive learning of visual represen- tations. In International conference machine learning, pp. 16597-1077 PMLR, 2020.
Clark, F. A., Rutln, M., Capano, I., S., Aviles, S., Saadon, J. R., Taneja. P., Zhang, Q., Bullis, J. B., Lauer, T., Myers, E., et al. Cortical ror, is required for layer 4 transcrip- tional identity and barrel integrity. Elife, 9:e52370, 2020.
Darbandi, S. F., Schwartz, S. E. R., Qi, Q. Catta-Preta, R., Pai, E. L.-L.,, Mandell, D., Everitt, A., Rubin, A.,
9

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Krasnoff, R. A., Katzman, S., et al. Neonatal tbrl dosage controls cortical layer 6 connectivity. Neuron, 100(4): 831-845, 2018.
Hu, Y., Xiao, K., Yang. H., Liu, X., Zhang, C., and Shi, Q. Spatially contrastive variational autoencoder for deci- phering tissue heterogeneity from spatially resolved tran- scriptomics. Briefings in Bioinformatics, 25(2):bbae016, 2024.
Donno, C., Hediyeh-Zadeh, S., Moinfar, A. A., Wa- genstetter, M., Zappia, L., Lotfollahi, M., and Theis, J. Population-level integration of single-cell datasets enables multi-scale analysis across samples. Nature Methods, 20(11):1683-161) 2023.
Janesick, A., Shelansky, R., Gottscho, A. D., Wagner, F,, Williams, S. R., Rouault, M., Beliakoff, G., Morrison, C. A., Oliveira, M. F., Sicherman, T.,, et al. High resolution mapping of the tumor microenvironment using integrated single-cell, spatial and in situ analysis. Nature Communications, 14(1):8353, 2023.
Dong, K. and Zhang. S. Deciphering spatial domains from spatially resolved transcriptomics with an adaptive graph attention auto-encoder. Nature communications, 13(1): 1739, 2022.
Kipf, T. N. and Welling, M. Semi-supervisee classifica- tion with graph convolutional networks. arXiv preprint Xiv: 1 0091669..2200 009997, 2016.
Gao, C., Jiang. J., Tan, Y., and Chen, S. Microglia in neurodegeneratiiee diseases: mechanism and potential therapeutic targets. Signal Transduction and Targeted Therapy, 8(1): 2023. ISSN 2059-3635, doi: 10.1038/ $41392-0223011588-0, URL https:
Lee, J., Kim, S., Hyun, D., Lee, N., Kim, Y., and Park, C. Deep single-cell raasse data clustering with graph prototypical contrastive learning. Bioinformatics, 39(6); btad342, 2023.
Lee, J., Yun, S., Kim, Y., Chen, T., Kellis, M., and Park, C. Single-cell ma sequencing data imputation using bi-level feature propagation. Briefings in Bioinformatics, 25(3): bbae209, 2024.
Goel, P., Chakrabarti, S., Goel, K., Bhutani, K., Chopra, T., and Bali, S. Neuronal cell death mechanisms in alzheimer's disease: An insight. Frontiers in Molecular Neuroscience, 15, 2022. ISSN 1662- 5099. doi: 10.388//mmo1.2222.87773
Li, J., Zhou, P., Xiong, C., and Hoi, S. C. Prototypical con- trastive learning unsupervised representations. arXiv preprint Seli::2005004960 2020a.
URL
https://wwat www.::wwoootiiiiiooiomom http:///www.ootttarrsrooooo/////
mole hoolecclarnmeerracieeeeertttdedd (1989/fnmo..220 2tt.mm....22.291133.... 937133.
Li, X., Wang, K., Lyu, Y., Pan, H., Zhang, J., Stambolian, D., Susztak, K., Reilly, M. P., Hu, G., and Li, M. Deep learn ing enables accurate clustering with batch effect removal in single-cell rna-seq analysis. Nature communications, 1 (1 (1):2338, 2020b.
Goralski, T. M., Meyerdirk, L., Breton, L., Brasseur, L., Kurgat, K., DeWeerd, D., Turner, L., Becker, K., Adams, M., Newhouse, D. J., al. Spatial transcriptomics re- veals molecular dysfunction associated with cortical lewy pathology. Nature Communications, 15(1):2642, 2024.
Liu, X., Zeira, R., and Raphael, B. J. Paste2: partial align- ment of multi-slice spatially resolved transcriptomics data. bioRxiv, 2023.
Grill, J.-.., Strub, F., Altché, F., Tallec, C., Richemond, P., Buchatskaya, E., Doersch, C., Avila Pires, B., Guo, Z., Gheshlaghi Azar, M. et al. Bootstrap your own latent-a new approach to self-supervised learning. Advances in neural information processing systems, 33:21271-21284, 2020.
Long, Y., Ang, K. S., Li, M.. Chong, K. L. K., Sethi, R. Zhong, C., Xu, H., Ong, Z., Sachaphibulkij. K., Chen, A., al. Spatially informed clustering, integration, and deconvolution of spatial transcriptomics with graphst. Nature Communications, 14(1):1155, 2023.
Maynard, K. R., Collado-Torres, L., Weber, L. M., Uytingco, C., Barry, B. K., Williams, S. R., Catallini, J. L., Tran, M. N., Besich, Z., Tippani, M., et al. Transeriptome- scale spatial gene expression in the human dorsolateral prefrontal cortex. Nature neuroscience, 24(3):425-436 2021.
Harris, B. D.. Crow, M., Fischer, S., and Gillis, J. Single- cell co-expression analysis reveals that transcriptional modules are shared across cell types in the brain. Cell systems, 12(7):748-755) 2021.
Hu, J., Li, X., Coleman, K., Schroeder, A., Ma, N., Irwin, J., Lee, F. B., Shinohara, R. T., and Li, M. Spagen: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graph convolutional network. Nature methods, 18(11): 1342-1351, 2021.
Phillips, J. W., Schulmann, A., Hara, E., Winnubst, J., Liu, C., Valakh, V., Wang, L., Shields, B. C., Korff, W., Chan- drashekar, J., et al. A repeated molecular architecture across thalamic pathways. Nature neuroscience, 22(1 1925-1935, 2019.
10

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Ren, H., Walker, B. L., Cang. Z.., and Nie, Q. Identifying multicellular spatiotemporal organization of cells with spaceflow. Nature communications, 13(1):4076, 2022.
Xu, Z.,, Wang, W., Yang, T., Li, L.,, Ma, X., Chen, J., Wang, J., Huang, Y., Gould, J., Lu, H., al. Stomicsdh: prehensive database for spatial transcriptomics data shar- ing, analysis and visualization. Nucleic acids research, 52(DI):D10S3-D101. 2024b.
Romito-DiGiacomo, R. R., Menegay, H.,, Cicero, S. A., and Herrup, K. Effects of alzheimer's s disease on dif- ferent cortical layers: The role of intrinsic differences in amyloid beta susceptibility. Journal of Neuroscience, doi: 10. URL https:// w wttp::sccc..oo..oooooooooooeoooo http::/.ooooooooeeeeeoeoooo /ttptt////222/////
Zeira, R., Land, M., Strzalkowski, A., and Raphael, B. J. Alignment and integration of spatial transcriptomics data. Nature Methods, 19(5):567-575, 2022.
27(32):849-88544 2007. ISSN 0270-6474. 1523/NEUROSCL10080022222 www.
Zhang, H., Wu, Q. Yan, J., Wipf, D., and Yu, P.
From canonical correlation analysis self-supervised graph neural networks. Advances in Neural Information Processing Systems, 14:76-89, 2021.
Stuart, T., Butler, A., Hoffman, Hafemeister, C., Papalexi, E., Mauck, W. M., Hao, Y., Stoeckius, M., Smibert, P., and Satija, R. Comprchensive integration of single-cell data. cell, 177(7):1888-199))
2019.
Zhou, X., Dong, K., and Zhang, S. Integrating spatial transcriptomics data across different conditions, technolo- gies and developmental stages. Nature Computational Science, 3(10): 2023.
Tang, Z., Luo. S., Zeng. H., Huang, J., Sui, X., Wu, M., and Wang, X. Search and match across spatial omics samples at single-cell resolution. Nature methods, 21 (10):1818-1829, 2024.
Zhu, Y., Xu, Y., Yu, F., Liu, Q.. Wu, S., and Wang. L. Deep graph contrastive representation learning. arXiv preprint ErXiv22006041333 2020.
Thakoor, S., Tallec, C., Azar, M. G., Azabou, M., Dyer, E. L., Munos, R., Veličković, P., and Valko, M. Large- scale representation learning on graphs via bootstrapping. arXiv preprint arXiv:2102.06514, 2021.
Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Graph attention networks. arXiv preprint Xiv: 10...1100000 10903, 2017.
Veličković, P., Fedus, W., Hamilton, W. L., Liò, P., Bengio, Y., and Hjelm, R. D. Deep graph infomax. arXiv preprint arXiv: 1899 10341, 2018.
Wegener, A.. Deboux, C., Bachelin, C., Frah, M., Kerni- non, C., Seilhean, D., Weider, M., Wegner, M., and Nait- Oumesmar, B. Gain of olig2 function in oligodendrocyte progenitors promotes remyelination. Brain, 138(1): 20- 135, 2015.
Wolf, F. A., Angerer, P., and Theis, J. Scanpy: large- scale single-cell gene expression data analysis. Genome biology, 19:1-5, 2018.
2018.
Xia, C.-R., Cao, 7..J., Tu, X.-M., and Gao, Spatial- linked alignment tool (slat) for aligning heterogenous slices. Nature Communications, 14(1):7236, 2023.
Xie, J. Girshick, R., and Farhadi, A. Unsupervised deep embedding for clustering analysis. In International conference machine learning, pp. 478-487. PMLR, 2016.
Xu, H., Fu, H., Long, Y., Ang, K. S., Sethi, R., Chong, K., Li, M., Uddamvathanak, R., Lee, H. K., Ling, J., et al. Unsupervised spatially embedded deep representation of spatial transcriptomics. Genome Medicine, 16(1):12, 2024a.

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
A. Datasets
Table 5. Statistics for datasets used for experiments.
Speciis
Tisane
Technology
Resolation
CelloiSpots
Genes
Sparial Domains
Reforence
Hamun
Bmin (Jorsolateral prefrontal coetes; Tt PPC)
Vistum
jm
3460 4289
33538
(Maynard et 2021)
MTG
Human
Brain (middle jemporal gyns: MTG)
10x Visium
50 um
3415 4832
36601
6"7
(Chen al. 20226)
Mouse Embeyo
Whole
Sizreo-seq
0.2
30756 55295
25485
27330
18
(Chen et. 2022a)
NSCT
Haman
Non-small lung cancer (NSCL,C)
NamoString CosMX
Subceilutar
11756
(Rhura 2024)
Breast Canser
Human
Breat Cancer
10x Visium
50 um
4992
18085
11
(Janesick et al., 2023)
Brewst Cancer
Human
Breast Cancer
Xenium
Subcellular
167780
313
Ounesick 2023)
In this section, we compare Spotscape with baseline methods on various datasets. The data statistics are in Table 5.
Human Dorsolateral Prefrontal Cortex (DLPFC). It comprises 12 tissue slices from 3 adult samples, with 4 consecutive slices per sample, derived from the dorsolateral prefrontal cortex. These slices were profiled using the 10x Visium platform. The original study manually annotated neocortical layers (layers to 6) as well as the white matter (see Figure 11).
Slice 151673
Slice 151673
Slice 151673
Slice 151673
Layer 1
n
Layer_2
Layer_3
Layer,
Layer_5
Layer
WM
unknown
Slice 151507
Slice 151508
Slice 151509
Slice 151510
Layer_ _
Layer
Layer_3
Layer
Layer_5
Layer 6
unknown
Slice 151669
Slice 151670
Slice 151671
Slice 151672
Layer
Layer
Layer
Layer
WM
unknown
Figure 11. Spatial coordinates of DLPFC dataset.
Middle Temporal Gyrus (MTG). The MTG (middle temporal gyrus) dataset includes samples from both control and Alzheimer's disease (AD) groups The MTG a brain region particularly vulnerable early AD pathology. In the original study, spatial transcriptomics profiles characterized for both AD and control MTG samples by the neocortical layers (layer 1 to 6) and white matter, utilizing the 10x Visium platform for detailed tissue profiling. The spot distribution is denoted in Figure 12.
Mouse Embryo. It is mouse whole embryo datasets by development stages. It was profiled by Stereo-seg technology, which allows spatial transcriptomics at the cellular level by integrating DNA nanoball pantball-patterned arrays with in situ RNA capture. offers detailed spatiotemporal transcriptomic atlas (MOSTA) of mouse embryonic development (see Figure 14).
Non-small Cell Lung Cancer (NSCLC). The dataset comprises high-resolution, subcellular-Ievel spatial transcriptomies data from human lung tissue, encompassing four distinct spatial domains (see Figure 13), including tumor region. This data was generated using the NanoString CosMX platform.
Human Breast Cancer. It comprises spatial transcriptomics of human breast cancer tissues using 10x Visium for whole- transcriptome spatial data and 10x Xenium for high-resolution gene expression at the subcellular level. This combined approach offers detailed mapping of tumor microenvironments (see Figure 31), highlighting molecular differences and cell-type composition better understand cancer heterogeneity and invasion.
12

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Control
AD
Layer_1
Layer_2
Abnormal epithelium
Layer
Fibrotic
Layer_4
Stroma
Layer_5
Layer 6
WM
unknown
Figure 12. Spatial coordinates of MTG dataset.
Figure 13. Spatial coordinates of NSCLC dataset.
E11.5
E12.5
Blood vessel
Inner
Blood vecon
Liver
Brain
Jaw and looth
Brein
Ling primardiumm
Branchial arch
Cartllage primtrdtum Cevity
Meninges
Cautly
primondium
Mesenbery
Connective
Meninees
Choroit clous
Mesothellmm
Demmonystome
Scoeotome
Connective txsue
Muconal epithelum
Donsal
Spinal card
Donsal rost gang
Musce
tract
Ep domes
Ovary
Head mesenchyme
Urogentaall
tract
Pancreas
Heart
Sympereent enic nerve
Jaw and tooth Kanny
Urogenital nage
Figure 14. Spatial coordinates of Mouse Development dataset.
B. Baseline Methods
In Table 6, we indicate which baseline methods are applicable to specific tasks, categorizing them based on whether their respective papers address those problems. Furthermore, we compare the performance Spotscape with general self-supervised representation learning schemes. Graph Contrastive Learning (Chen et al., 2020; Zhu et al., 2020) is instance-wise contrastive learning method that learns representations by pushing negative pairs apart and pulling positive pairs together. BGRL (Thakoor et al., 2021; Grill et al., 2020) is consistency regularization method that learns representations by enforcing consistency between two differently augmented views. SwAV (Caron et al., 2020b) learns representations by minimizing the difference between two cluster assignments that are obtained through optimal transport. Barlow twins (Caron al., 2020a) learns representations by minimizing redundancy between two augmented view. Although these methods demonstrate strong performance across various domains, our results in Figure 15 indicate that Spotscape is the most suitable model for SRT data, emphasizing its effectiveness in this context.
SO.
Spetsope
Table 6. Baseline methods and their application across various tasks.
Single-dlie Tacks
Multi-dier
Spatial domala
Trajectory Inference
Homogemenus Integration
Heterogencous Integration
3.45
identilication
Insuttation
alignment
aligument
STAGATE
SpaCAE
335
Spac:Flow
GraphST
PASTE
STAligner
PASTE2
Figure 15. Comparison with self- supervised learning.
CAST
Spotscape
13

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
C. Pseudo Code
this section, we provide pseudocode of Spotscape in Algorithm
Algorithm Overall framework Spotscape
Require: Spatial nearest neighbor graph 9 = (A, feature matrix X, adjacency matrix A, graph augmentation T. GCN encoder Ja. MLP decoder number of slices Na. number of spots N., number of latent dimensions D. loss balancing parameters (Dacon Asc; ApcI. Ass), temperature т, learning rate y
Ensure: Node embeddings Z, reconstructed feature matrix X
1: for epoch in epochs:
G = =()), g' T (g)
/ two randomly augmented version
3:
Step 1: Graph Autoencoder
4:
fo(g), 2 fo(g)
1 compute spot embedding using GCN encoder
5:
= (2), X = (2))
1* reconstruct the feature matrix using MLP decoder
6:
Step 2: Similarity Telescope with Relation Consistency (Section 4.2)
CResn Reconstruction Loss(X, X, X')
(Fqn. 2)
8:
Lsc, H Similarity Telescope with Relation Consistency Loss 2, 2')
9:
Step 3: Prototypical Contrastive Learning (Section 4.3)
10:
if Na 2 and epoch 2 warm-up epoch then
/ for multi-slice only */
11:
CrL = PCL Loss(2, )
12:
else
13:
LPCL
end
15:
Step 4: Similarity Scaling Strategy (Section 4.4)
16:
if Na 2 2 then
/* for multi-slice only * (Eqn.
17:
Lss Similarity Scaling Loss(H, H,
18:
else
19:
Lss
20:
end
21:
Step 5: Compute Loss
22:
AReconRRasco + AscCsc LeCL, Ass
23:
Step 6: Backpropagation and Parameter Update
24:
Update parameters using Adam optimizer: Oepuch <- Adam
25:
Return: Node embeddings Z, reconstructed feature matrix x
Utility Functions #/
26:
Function Similarity Telescope with Relation Consistency Loss(2, Z
27:
Zuurm L2-norm(2). (2), Z L2-norm ž')
1* LL2-normalization 1* compute cosine similarity (Eqn.
28:
H Znwm (Zurrn)) ST. HH' (Zwem))
29:
Lsc MSE(H, IT
30:
Return: Lsc, H
31:
Function PCL Loss( ž'):
32:
# Poet: the collection of prototype sets from K-means clustering
33:
Por +
Assign Prototype(Z')
34:
Calculate the prototypical contrastive loss LeCL using r, Z. and P.e.
(Eqn. 4, 5)
35:
Return: LrC
36:
Function Assign Prototype(Z):
37:
Psa [[]
38:
for K in
KT)
39:
Cluster each cell into K clusters based Z
40:
Compute a prototype matrix P RxXD by averaging the spot embeddings per cluster
41:
Append P to Pai
42:
Return: Puei
14

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
D. Sensitivity Analysis
conduct broad sensitivity analysis for all of the four balance parameters (ARecon Asc, XPCL Ass), temperature т, and the learning rate in Figure 16, 17, 18, and 19. Furthermore, the sensitivity the number of clusters used in K K-means clustering and the ground truth clusters reported in Figure 20. These results indicate that the representation learned by Spotscape remains robust even when the number of clusters is not perfectly accurate with that ground truth clusters.
NMI
CA
Pasient Slice 151673
Pattent Siice 151676
Patient 153675
Patlent 1- Slice 151676
0.2
32
62
682
1$1507
Patient
Patlent 151500
Patlent S8ice 151510
2.2
3.5
6.6
0.0
0.
0.2
100
0361
5.01
10.0
0.8
0.0
0.4
0,4
0.001
0.92
150
0.311
2.0
150
0.355
0.01
10.0
0.51
Figure 16. Sensitivity analysis for reconstruction loss balancing parameter (ARocon) of single DLPFC.
Pattent 151673
Patlent Sliow 151678
151675
Patient -8cc 151476
3.001
0.2
160
0.45
16.0
00
Patlent 2- Siice 151507
Potient 2- Slice 151500
Palient 2 Slie 181500
Patlent 2- sice 151510
2.6
0.5
22011
6.2
Pattent Slll 151669
Putlent 2- Slice 151670
Patlant 3 Slice 151671
Patient -Sice 151672
Figure 17. Sensitivity analysis similarity telescope loss balancing parameter (Asc) of single DLPFC.
15

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
ARI
NMI
CA
Patlent Siice 151473
Pablent Slice 151474
Patient Slice 151675
Patlent Slice
23
6.3
06
0.
02
1e45
28:5
6,911
3ed5 0,0001
60LL
0.5
0.3
S645
Pattent Siice 151660
Patient Slice
Patient Slice 151471
Patlent Slice 151672
3.3
6.-
05
1e45
2ed5
50WG
6,901
Se45
0,0000
1e45
600L
Figure 18. Sensitivity analysis for learning rate of single DLPFC.
ARI
NMI
PCL Loss Balancing Parameter (bra)
Similarity Scaling
Balancing Parameter (Ass)
0.8
0.8
0.8
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.0
0.0
0.0
0.001
0.01
0.1
1.0
10.0
0.001
0.01
0.1
1.0
10.0
0.1
0.25
0.5
0.75
1.0
Figure 19. Sensitivity analysis for multi-slice parameters.
ARI
NMI
Petient Slice
2.
0.4
82
61
K-3
Ko2
82
Kol
83
82
Krl
Kr2
81
K-l
K-2
3.4
3.4
82
6-1
K-11
8-2
64
8-2
801
K-1
Figure 20. Sensitivity analysis for number of cluster (K) of single DLPFC.
16

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
E. Hyperparammterr Selection and Implementation Details
E.1. Hyperparamter search for model performance comparison
To ensure a fair comparison, we conducted a hyperparameter search for both Spotscape and the bascline meth- ods. The best-performing hyperparameters were selected by evaluating the NMI with the first seed. Specifically, for Spotscape, the hyperparameter search was conducted only for the learning rate, with the search space consisting of {0.00001, ; 0.00005, 0.0001, 0.0005, 0.0013. The remaining hyperparameters were fixed, and the ones used report the experimental results are listed in Table 7.
Table 7. Hyperparameter settings of Spotscape.
Fised
DLPFC Single
MTC Siggle
Mouse Embhey
NSCEC
DLPPC Entegration
MTG Mulii Intespation
Mouse
Alianncut
Visiun Xenium Alignecn
<<<>
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
1.0
1.0
1.0
1.0
1.0
100
1.0
1.0
ApCL
NA
MIA
NIA
NIA
0.01
0.01
0.01
0.01
NA
M/A
MIA
NIA
1,0
100
3,8
3.0
GCN secode: dimessions
IN,, 256 64)
[N,, 255 64
[N,, 256 64)
[M, 256, 64)
[1% 256, 64]
IN 256 64)
[M 256, [4]
[N, 256, [4]
NAA
N/A
NAA
N/A
0.75
0.75
0.75
0.75
Top-2
N/A
N/A
N/A
N/A
5
Traning spocls
1030
1000
spoclo
500
Leoning iile
[1000)
0.0001
000000
0,0005
0.003
0,005
0.00011
madking ().1)
0.1
00
(T
02
0.2
0.3
02
0.2
0.2
Edee madinn (7..2)
02
02
0.2
Additionally, we conducted grid search primarily targeting the learning rate and loss balancing parame- ters for the baseline models. The learning rates for all baselines were explored within the search space {0.00001, 0.00005, 0.0001, 0.0005, 0.001, 0.005, 0.01, 0.05). Similarly, the loss balancing parameters were tuned across the range {0.1, 1.0, 10.0} including their default parameter. More precisely, for SEDR, it searched learning rate and balance parameters regarding reconstruction loss, VGAE loss, and self-supervised loss. For STAGATE, the search focused solely on the learning rate. In the case of SpaCAE, both the learning rate and the spatial expression augmentation parameter (a) optimized by adjusting the learning rate and the spatial consistency loss
were tuned within {0.5, 1.0]. SpaceFlow balancing parameter. For GraphST, we explored the learning rate and the balancing parameters for feature reconstruction loss and self-supervised contrastive loss. Regarding STAligner, we searched for the optimal learning rates for both the pretrained model (i.e., STAGATE) and the fine-tuning process. Finally, for SLAT, we applied the default parameters since the experiments were conducted under identical settings and with the same dataset. This systematic parameter-tuning process facilitated the effective optimization of each baseline model's performance.
E.2. Unsupervised Hyperparameter Search Strategy
Table 8. Optimized hyperparameter settings for Spotscape.
Type
Dataset
Learning Rate
Single
DLPFC Patient I
0.00005
Single
DLPFC Patient 2
0.0001
Single
DLPFC Patient 3
0.0001
Single
MTG Control
0.0005
Single
MTG AD
0.0001
Single
Mouse Embryo
0.00001
Single
NSCLC
0.00005
Multi Integration
DLPFC
0.001
Multi Integration
MTG
0.0005
Multi Alignment
Mouse Embryo
0.001
Multi Alignment
Breast Cancer
0.00001
To apply Spotscape to new data, appropriate hyperparameter search strategy is essential. Fortunately, since Spotscape is largely robust to hyperparameters, we fix all parameters except the learning rate and search for the learning rate that maximizes the silhouette score, which can be achieved without any supervised information. Using this hyperparameter optimization strategy, we obtained the hyperparameters listed in Table 8 and reported the computed silhouette scores during the search process for DLPFC in Figure 21. It shows that the trend between the Silhouette Score and clustering performance (i.e., ART) similar, indicating that these strategies work well.
17

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
We then compared the performance of the hyperparameters optimized without supervision with that of the hyperparameters optimized with supervision, which were used solely for performance comparison with the baseline methods in Figure 22. In this comparison, the performances of both sets of hyperparameters are competitive, with the unsupervised optimization showing even better performance in some cases, thereby demonstrating the effectiveness of our search strategy and confirming the robustness of hyperparameter sensitivity.
Silhouette
ARI
PIC Single - Stice 15167' (Potient Learnnng
DIPFIC Single -Sice 151557 (Parient Leaming
DUPFIC Single- - Slice 151669 (Patient 1) (Dptimized Learing 0,50
6.5
$.45
64
0.15
0.3
0.5
16:05 55-5 6.501 6,2005 0.00;
1-:5 56-05 3,0011 5,005 3002
1e-15 fe.5 10111 10155 6.00
Learing Rate
lasming
Leaiing Fans
NTG Single
House Embryo
[Optimized Learning Relle 0028
(Optimized Lewtning Rate: 0,0001)
[0ptimizet flate: 1e-25)
0:00
0.4
023
15:5 5o 0.0001 0,200s 0M00
1o So 2.0023
500t5 3002
16:55 5et5 2.00E 5.0255 0.C0L
NSCLC
DLFFC Mulli
10ptiniized Leamnnng Rate: 0,00005)
(Optiiteed leaminn Fate: 0,001)
(Optimized Leamiing Rate: 0.6005]
0.5
0.6
6.3
Laaming
Figure 21. Unsupervised hyperparameter searching strategy using silhouette scores.
Optimized
Reported
0.8
0.7
ARI
0.3
0.2
151673
sinple DUPPC sice 151674
Single Du DLPFC siice 151675
Single PFC Siice 151676
151507
Single DuPYe slice 151508
single DLPPe siice 151509
single DL PLPPC sice 151510
single DLPPC sicee 151669
Single DLPFC Siice 151670
Single DLPFC 151671
Single DLPFC Sicce 151672
simdle MTG Control
Single MTG AD
single Embryo
Single NSCLC.
Multi PFC Patient
Multi DUFC Patient
Mulli CUPFC Patient
Muiti MTG MTG
Single DLPFC sice
single DLPPe sicce
Figure 22. Performance comparison between optimized and reported hyperparameters.
E.3. Implementation Details
Model architecture and training. The model employs a 2-layer GCN (Kipf & Welling, 2016) as the GNN-based encoder and 2-layer MLP as the decoder, both utilizing batch normalization and ReLU activation functions. The encoder's 's hidden dimensions are set to [N 256, 64], while the decoder's dimensions are configured as [64, 256, Ngg.. The clustering process PCL performed T 3 times, with the K-means granularity set to [K, 1.5K, 15K,2KK 2K] to get a fine-grained representation.
18

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Optimization is carried using the Adam optimizer with learning rate determined through hyperparameter searching (see Appendix E. and weight decay of 0.0001.
Preprocessing. We follow the preprocessing methodology described in prior work (Dong & Zhang, 2022). Initially, 5000 highly variable genes are selected using Seurat v3 (Stuart et al., 2019). The data is then normalized to CPM target of 10,00 000 and log-transe bog-transformed using the SCANPY package (Wolf et al., 2018). For datasets with multiple slices, we concatenate the slices to enable integration or alignment.
Computational Resources. All the experiments are conducted on Intel Xeon Gold 6326 CPU and NVIDIA GeForee A6000 (48GB).
Software Configuration. Spotscape is implemented in Python 3 (version 3.9.7) using PyTorch 2.1.1 (https: //pytorch.org. org/) with Pytorch Geometric (https://gitte com/ caan/pgg-teaee taam haaam/yytrcccccoo geometrric) pack- ages.
F. Empirical Validation of Spotscape Architecture
Loss design for single-slice tasks. In this section, we evaluate the impact of PCL loss on single-slice tasks. While it can be applied in this setting, there is trade-off between performance gains and computational cost, shown in Figure 23, Although PCL loss helps cluster spots from the same spatial domain while separating others, the improvement is marginal compared to the significant increase in running time. Consequently, we chose to exclude PCL loss for single-slice tasks.
Additionally, similarity scaling loss, which is specifically designed to align similarities across different slices, only applicable to multi-slice integration and does not apply to single-slice cases.
0.54
0.52
52
0.48
0.46
46
0.44
Spotscape (Caecon + Cscl
Spotscape CECL
[Caernn Car + Coril
Figure 23. Trade-off between single-slice SDI performance and running time for LeCL
GNN vs. MLP in Spatially Resolved Transcriptomics. this section, we aim to validate the architecture Spotscapeby investigating whether Graph Neural Networks (GNNs) are indeed more suitable than Multi-Layer Perceptrons (MLPs) in the domain of Spatially Resolved Transcriptomics. We further examine whether GNNs maintain their advantage over MLPs when modeling cell type-specific signals rather than spatial domain information.
To this end, we used the Postnatal Mouse Brain (PMB) from STOmicsDB (Xu et al., 2024b) (Database ID: STDS0000004), which is annotated by cell types. We conduct ablation studies comparing the performance of GNN-based encoder with an MLP encoder on both the PMB dataset and the Dorsolateral Prefrontal Cortex (DLPFC) dataset, with clustering results reported in Tables 9 and 10.
Our results consistently show that the GNN-based encoder outperforms the MLP-based encoder for both spatial signals (i.c., DLPFC dataset) and cell type-specific signals (i.e., PMB dataset). However, the GNN-based encoder offers less pronounced benefits in the PMB dataset, which focuses cell-type signals, compared to the DLPFC dataset, which emphasizes spatial domain clustering. This observation supports the intuition that spatial graphs encode richer spatial-specific information, while cell-type-see -peeefcc- signals are less spatially dependent. Nevertheless, the GNN still provides a measurable performance gain on the PMB dataset. This can be attributed to the fact that spatial regions inherently carry signals related to cell types, as similar cell types tend to cluster together within tissues. Such clustering reflects their functional and structural organization and their interactions within specific tissue regions. Supporting this, the homophily ratio for the Shared Nearest
19

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Neighbor (SNN) graphs in both DLPFC and PMB datasets is high (0.92), indicating that spatial neighborhoods indeed contain substantial cell-type-related information.
Table 9. Spatial domain clustering performance for DLPFC dataset. Bold indicates the best performance, with the numbers in parentheses
representing the standard deviation.
ARI
NMI
CA
Spotscape (w/ MLP encoder)
0.20 (0.01)
0.30 (0.01)
0.42 (0.02)
Spotscape
0.48 (0.02)
0.64 (0.01)
0.61 (0.02)
Table 10, Cell-type clustering performance for Postnatal Mouse Brain (PMB) dataset. Bold indicates the best performance, with the
numbers in parentheses representing the standard deviation.
ARI
NMI
CA
Spotscape (w/ MLP encoder)
0.58 (0.03)
0.65 (0.02)
0.67 (0.03)
Spotscape
0.61 (0.07)
0.68 (0.03)
0.74 (0.06)
G. Scalability of Spotscape for Large Dataset
In this section, we conduct additional analysis for time complexity using the mouse main olfactory bulb dataset from STOmicsDB (Xu et al., 2024b), which comprises 39 slices and total of 1,792,797 spots. This result highlights the Spotscape's 's efficiency with extremely large-scale data, as shown in Figure 24.
Time Complexity Analysis (STOmics Dataset ID: STDS0000142)
35000
30000
Training Time (s)
25000
20000
STAligner
Spotscape
15000
10000
5000
(222.482)
10 (475,812)
20 (941,625)
39 (1,792,797)
(71,19
Number of Slices (Number Spots/Cells)
Figure 24. The running time of Spotscape and baseline methods over various number of slices on the large dataset (ST Omics DB Dataset ID: STDS0000142)
20

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
H. Trajectory Analysis
For quantitative validation, we assign numerical values to layers as follows: WM = O, layer 6 1, layer = 2, layer 4 layer 4, layer 5, and layer 6. We then calculate pseudotimes following Spaceflow (Ren al., 2022) using the representation from each model. Finally, we compute the spearman correlation with scaling between these assigned values and the calculated pseudotimes and report the results in Figure 25. We also present these results visually in Figure 26. In these results, Spotscape demonstrates effectiveness in the trajectory inference task, further validating its broad applicability.
RAN
SEOR
STAGATE
SAN
SpazeRow
GrapSST
Spotscape
0.5
0.5
0.4
0.2
-1.2
-3.4
132073
(a) DLPFC Patient
STAGATE
SpaCAE
Spacefiow
CruposT
Spoticape
1.4
0.0
Siice 153507
Sin 151504
lce 15150s
Sikce 158530
(b) DLPFC Patient
0.2
0.0
Sice 151659
5 151672
Ice 151671
Sice 151672
(c) DLPFC Patient
Figure 25. Trajectory conservation between pseudotimes and Layers in DLPFC data.
21

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Patient Slice 151673
excudaliin Ioomeaaonn
Layer Nap
Poga Graph
(a) DLPFC Patient
Slice
uscualtive
Nap
(b) DLPFC Patient
151669
escudiline
Locks
(c) DLPFC Patient
Figure 26. Trajectory inference results Spotscape.
22

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
I. Imputation
For quantitative evaluation with baseline methods, we masked certain non-zero values in the data and evaluated whether the model successfully recovers these values, following the settings from previous works (Lee et al., 2024). In Figure 27, Spotscape outperforms in terms of both RMSE and median Ll-distance, demonstrating its superiority in imputation tasks. Moreover, also report the broad results for marker gene detection results of denoised output from Spotscape in Figure 28. Specifically, RORB serves as canonical marker for layer 4 neurons (Clark et al., 2020); ETVI is associated with layer 5 neurons (Goralski et al., 2024); NTNG2 and NR4A2 are well-recognized markers for layer 6 neurons (Maynard et al., 2021; Darbandi et al., 2018); and OLIG2 is indicative of white matter regions (Wegener et al., 2015). The results show that after imputation using Spotscape, marker genes are more distinctly expressed, demonstrating the practical applicability of Spotscape.
STAGATE
GraphST
SpaCAE
SEDR
Spotscape
RMSE
Median L1 distance
2.0
2.0
1.6
1.4
0.1
0.2
0.3
0.4
0.5
0.2
0.2
0.3
0.4
0.5
Drop rate
Drop rate
Figure 27. Imputation error comparison across various drop rates in the DLPFC.
RORB
ETV1 (Layer 5 marker gene)
NTNG2 (Layer marker gene)
NR4A2 (Layer marker genel
OUG2
(Layer 4 marker gene)
(WM marker gene)
Layer_1 1
Layer_2
Layer
L
Layer_5 5
Layer_ 6
unknown
ROR8
ETV1 (Layer 5 marker g gene)
NTNG2 (Layer marker gene)
NR4A2 (Layer marker genel
QUG2
Gold Standard
[Layer marker gene)
(WM marker gene)
Figure 28, Spatial expression of raw and Spotscape imputed data for marker genes DLPFC
23

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
J. Differentially Expressed Gene Analysis
To check whether our results yield biologically meaningful results, we investigate differentially expressed genes (DEGs) and their biological functions between the Control and Alzheimer's disease (AD) groups through Gene Ontology (GO) enrichment analysis for each cluster, representing cortical layer a brain. We use cells whose number of genes is between 500 and 7,500, the number of reads is between 1,000 and 30,000, and the ratio of the mitochondrial gene is below 35% for quality control. Genes with (fold) >> 0.25 and an adjusted p-value of DESeq2 < 0.05 are considered differentially expressed genes (DEG).
Since Spotscape provides spatially organized and reliably distributed clusters as actual cortical layers in brain, all clusters are assigned to the cortical layers. As the pathological influence of AD on different cortical layers diverse, highly worthwhile identify the differences between Control and AD each region (Romito-DiGiaaoo
et al., 2007). We compare two clusters corresponding to layer and layer 5, respectively. Layer is regarded superficial layer, while layer 5 is deemed deeper layer. As depicted in Figure 29 and Figure 30, terms relevant AD such regulation of apoptosis, microglial cell activation, and synapse pruning are enriched in both layer 2 and layer 5, identifying the shared alteration of AD and ensuring the reliability of the result (Goel et al., 2022; Gao et al., 2023; Brucato & Benjamin, 2020). Comparison of the top terms enriched uniquely in each layer provides interesting observations, that is, layer shows hallmark processes of carly-stage AD pathology, such as oxidative stress responses, while layer 5 reflects later-stage events involving inclusion body assembly and advanced apoptotic pathways. Critically, these findings align with the established understanding that layer 2 is among the earliest sites impacted in AD, whereas deeper layers (including layer 5) exhibit more pronounced synaptic and proteostatic perturbations in later stages PRomito-DiGiaee onto these distinct laminar features, Spotscape demonstrates utility in uncovering meaningful biological variation from spatial transcriptomics data and in corroborating the different influences of AD across cortical layers.
al., 2007). By delineating clusters that map
Negative Regulation Of Apoptotic Process (GO:0043066)-
Cellular R Response To Metal lon (GO:0071248)-
Microglial Cell Activation (GO:0001774)-
Regulation Of Trophoblast Cell Migration (GO:1901163)-
Chaperone Cofactor-Dependent P rotein Refolding (GO:0051085)-
Positive Regulation Of Endocytosis (G0:0045807)-
Negative Regulation Of Trophoblast Cell Migration (60:1901164)
Humoral Immune Response Mediated By Circulating
(G0:0000)
'De Novo' Post-Translational Potein Folding (GO:0051084)
Adjusted P-value
Positive Regulation Of N Neroon Death (GO:1901216)-
Regulation Of Receptor-Meditee Endocytosis (GO:0048259)-
GO Term
Negative R Regulation Of Execution P Phase Of Apoptosi (GO:1900118)
0.001
Cellular Response Calcium lon (G0:0071277)>
Chaperome-Mediaae P rotein Complex Assembly (G0:0051131)-
0.002
Synapse P Pruning (GO:0098883)-
0.003
Response To Unfolded Protein (G0:0006986)-
Negative Regulation Of LTng-Term Synaptic Potentiation (GO:1900272)-
Cellular Response To Salt (G0:1902075)
Negative Regulation Of Cellular P Process (G0:0048523)-
Regulation Execution Phase Of Apottosis (GO:1900117)-
Negative Regulation Of Cellular Component Organization (G0:0051129)-
Cellular Response To Oxidative Stress (G0:0034599).
Regulation PoteiinContaaiiin Complex Assembly (GO:0043254)
Positive Regulation Of Cell Death (G0:0010942)
Removal Of uperoxide R Radicals (G0:0019430)
0.0
0.2
0.4
0.6
G Gnn ratio
Figure 29. Top 25 biological process that DEGs between AD and Control enriched in cluster assigned layer 2.
24

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
Negative Regulation Of pootootcc P Process (GO:0043066)-
Response Unfolded Protein (GO:0006986)-
Chaperone Cofactor-Dependent P rotein Refolding (GO:0051085)-
Chaperone-Mediatee P rotein Complex Assembly (GO:0051131)
'De Nova' Post-Translatonal/ P rotein Folding (GO:0051084)-
Regulation Of Inclusion Body Assembly (GO:0090083)
Negative Regulation Of Trophoblast Cell Migration (G0:1901164)
Microglial Cell Activation (GO:0001774)
Regulation Of Trophoblast Cell Migration (GO:1901163)
Adjusted P-value
Negative Regulation Of Cellular Component Organization (GO:0051129)
Synapse Pruning (GO:0098883)
GO Term
roteii Stabilization (GO:0050821)
Negative Regulation Of Cell Migration (GO:0030336)
0.001
Positive Regulation Of Cytokine P Poduction (GO:0001819)
Negative Regulation Inclusion Body Assembly (GO:0090084)
0.002
Positive Regulation Of Neuron Death (GO:1901216)
Negative Regulation Of Protein Metabolic Process (GO:0051248)
Negative Regulation Pooeein Catabolic Process (GO:0042177)
Negative Regulation Of Neuron Apoptotic Process (GO:0043524)-
Chemical Synaptic Transmission (GO:0007268)-
R Regulation Of Neuron Death (G0:1901214)-
Positive Regulation Of Endocytosis (GO:0045807)
Synapse Organization (GO:0050808)
R Regulation Of Neuron Apoptotic P Process (GO:0043523)
Negative Regulation Peptidase Activity (GO (GO:0010466)-
0.0
0.2
0.4
0.6
0.8
Gene ratio
Figure 30. Top 25 biological process that DEGs between AD and Control enriched in a cluster assigned to layer 5.
25

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
K. Cross-technology Alignment
Xenium
Alignment Result
FN
FP
Visium
Figure 31, Alignment results triple positive cells.
We conduct cross-technology alignment between data obtained from Xenium and Visium. Since Xenium offers higher resolution than Visium, while Visium provides more comprehensive transcriptome view, aligning Xenium with Visium creates a complementary approach that combines the strengths of both: high resolution and broader coverage. To this end, we align triple-positive cells in Xenium-thow positively enriched for the ERBB2, PGR, and ESRI marker genes associated with breast tumors with corresponding Visium spots. Figure 31 shows that Spotscape successfully outputs seven aligned points and identifies five triple-positive cells in the Visium data. This demonstrates the superiority of Spotscape, as can successfully align extremely rare cell types (e.g., cancer cells).
L. Interpretation of Lsc
The similarity consistency loss in Equation (1) serves two key purposes: 1) explicitly guiding the embedding space to capture quantitative similarity relationships, and 2) encouraging the model to learn a global relational structure that spans all nodes.
In downstream tasks, we rely on cosine similarity between normalized embeddings. In other words, treat the normalized embedding space Fuclidean space, where distance serves proxy for semantic closeness. However, embeddings from GAE trained solely with the reconstruction loss are optimized for compression. As result, the cosine similarity between embeddings lacks direct interpretability or consistency across different pairs. In an Euclidean space, the consistency loss equals zero ideally. Thus, the consistency loss serves as a regularizer that aligns the embedding space more closely with the desired geometry, making similarity values more meaningful and consistent.
Moreover, the reconstruction loss satisfies 8 Lasae 0 for i + j. which implies that updates to each embedding do not 87.87,
depend on the others. This is problematic, since downstream tasks involve comparing representations of even distant nodes. The consistency loss helps mitigate this limitation by considering similarity relations between all node pairs. The second derivative of the consistency loss, 8² Lsc can have non-zero values, indicating that the update each embedding depends on others. A detailed proof is provided below.
87,07,
Let P Zmorm (2/mm) T
Q Z (Zmam)T
Since P = QT
eCsc
2
Q2,)(
OPh 0%
aQu 0z
(
Qis)
OP. 0z
(9)
05
N2
N
4.
26

---

Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
In addition,
0Pkj 0zk
1
1
2j
(1
(10)
|
|
||
PP. 0,
i k.
(11)
0šk
Hence,
dLsc dīg
PPkj
2j
x
(Piss - Qki)
Σ(Pks
Qki)
(1
2k
(12)
Uzv 3
1|5x
1 112
||
Therefore, Eq (13) can take nonzero values.
8 Lsc x (Puj - Qky) 0zj05s
(1
=
(13)
|| ||
|
In summary, the consistency loss not only enhances the quantitative interpretability of similarity in the learned space, but also provides mechanism for global information flow, thus improving the utility of the representations for downstream tasks.
M. Future Works
In this work, we discover that reflecting the global relationships between spots provides significant information on SRT data; however, we currently leverage this relationship only implicitly through the loss function. We recognize that the model could benefit from incorporating more complex interactions by constructing edges between spots, thereby implementing graph structure learning. Future work could explore this avenue to enhance the representation of spatial relationships, allowing the model leverage valuable information from the global context more effectively.
Furthermore, SRT data frequently includes histology images that offer critical contextual information about tissue architecture and cellular organization. However, in this study, we concentrate on a more general case that limits our analysis to spatial coordinates and gene expression profiles, potentially overlooking the rich insights that histological features could provide. We anticipate that integrating this information with Spotscape could represent a promising direction for future research.
27


Reviews:
[{"review_id": "6FPCMbEoDs", "reviewer": "Reviewer_uFL9", "summary": "The paper introduces Spotscape, a novel framework for representation learning in Spatially Resolved Transcriptomics (SRT) data. Spotscape incorporates a Similarity Telescope module to capture global similarity relationships and integrates Prototypical Contrastive Learning (PCL) and a similarity scaling strategy to tackle challenges in both single-slice and multi-slice tasks. Extensive experiments demonstrate Spotscape’s superiority in spatial domain identification, trajectory inference, imputation, and multi-slice integration compared to other baselines.", "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": "Thank you for your positive feedback regarding our manuscript. To address your concerns, we have added tables and figures in this [external link](https://anonymous.4open.science/r/Spotscape-31B6/Rebuttal.pdf).\n\n**W1) The scalability analysis is incomplete**\n\nIn our _manuscript_, we initially focused on training time in _Figure 10_ because our performance improvements had already been demonstrated through various experiments. The scalability experiment was conducted using synthetic data without meaningful spot information, making it unsuitable for reporting performance metrics.\n\nTo provide a more comprehensive evaluation, we generated another synthetic dataset using scCube [1], with mouse embryo data as the reference. In **Figure 6 in the external link**, we demonstrate that Spotscape not only achieves fast inference but also maintains robust performance across varying numbers of spots and slices.\n\n**Q1) t-tests results**\n\nIn the **external link**, we have conducted t-tests for all our experiments. We indicate statistical significance with ** for p-value < 0.01 and * for p-value < 0.05.\n\n**Q2) Comparison with domain-specific imputation methods**\n\nMost existing imputation methods in spatial transcriptomics, such as Tangram [2] and stDiff [3], rely on single-cell RNA sequencing data as a reference for improvement. However, this approach is not always applicable, as single-cell reference data is not always available, making these methods unsuitable as direct baselines for our study.\n\nGiven this limitation, we considered STAGATE, GraphST, SpaCAE, and SEDR as state-of-the-art baselines, as they denoise input expression data using decoded outputs and have also reported imputation results in their respective papers.\nTo further address your concern, we additionally include stMCDI [4], which employs masked conditional diffusion strategies. To our knowledge, this is the most recent baseline that operates under the same setting as ours. Through this experiment in **Figure 7 (external link)**, we demonstrate that Spotscape continues to achieve the best results.\n\n**Q3) Discussion on the theoretical underpinnings of the loss functions**\n\nAs you pointed out in your review, our paper primarily focused on practical applications rather than theoretical analysis. However, to provide more clarity on the theoretical underpinnings of our approach, we would like to elaborate on the similarity consistency loss presented in _Equation (1) of our manuscript_. This loss function is a key contribution and one of the main components in _Equation (8) of our manuscript_. We discussed this loss in our rebuttal regarding **Q1** for reviewer **aaPZ** due to character limits.\n\nMeanwhile, outliers may potentially impact the embeddings of other nodes, as the loss considers global relationships, which could be a limitation. Despite these challenges, the consistency loss remains an effective tool for improving the model's global contextual understanding.\n\n**Q4) Guidance on the hyper-parameter tuning process**\n\n_In lines 245-253 of our manuscript_, we clarify that \n> To ensure fairness, we conduct a hyperparameter search for all baseline methods instead of using their default settings, as optimal hyperparameters may vary across datasets. The best-performing hyperparameters are determined based on NMI using the first seed. For Spotscape, only the learning rate is searched using the same criterion. Details of the selected hyperparameters and search spaces are provided in _Appendix E.1 of our manuscript_.\n\nWe ensure fairness in the comparison by conducting a broader hyperparameter search for the baseline methods compared to our proposed method, making the comparison as fair and consistent as possible. Specifically, _in Appendix E.1 of our manuscript_, we state that for Spotscape, we utilized default parameters across all datasets except for the learning rate. However, for the baseline methods, additional parameters, such as loss balancing, are also tuned along with the learning rate because some baselines are highly sensitive to them. In this section, we also provide the full search spaces for each baseline.\nTo further address your concern, we have now added the final selected hyperparameters for all baseline methods across all datasets to our [Anonymous Github](https://anonymous.4open.science/r/Spotscape-31B6/config/README.md), ensuring full transparency and reproducibility.\n\n---\n[1] \"Simulating multiple variability in spatially resolved transcriptomics with scCube,\" Nature Communnications  \n[2] \"Deep learning and alignment of spatially resolved single-cell transcriptomes with Tangram,\" Nature Methods  \n[3] \"stDiff: A diffusion model for imputing spatial transcriptomics through single-cell transcriptomic,\" Briefings in Bioinformatics  \n[4] \"stMCDI: Masked Conditional Diffusion Model with Graph Neural Network for Spatial Transcriptomics Data Imputation,\" BIBM 2024", "claims_and_evidence": "Most of the paper’s claims are supported by the presented experiments and results; however, there are a few issues:\n1. In Section 5.3 on Scalability, the authors discuss only the training time. They should also present evidence of performance improvements, as both efficiency and effectiveness are important when assessing scalability.\n2. For imputation tasks, the manuscript lacks comparisons with domain-specific imputation methods. Including results from specialized methods would strengthen this claim.", "methods_and_evaluation_criteria": "The methods and evaluation criteria are well designed. The paper provides rigorous benchmarking across diverse datasets and tasks, which supports the evaluation of Spotscape’s capabilities.", "theoretical_claims": "The submission does not introduce new theoretical claims or detailed proofs. Instead, the authors justify their methodological contributions through empirical experiments and biological reasoning. It would be beneficial for the authors to discuss any theoretical limitations or provide additional analysis—for instance, by citing references that explain the rationale behind the design of the loss functions in formula (8).", "experimental_designs_or_analyses": "The experimental framework is generally sound, with extensive benchmarking and detailed evaluations. However, some aspects could be improved:\n1. The results are reported as mean ± standard deviation over 10 runs. Incorporating statistical significance tests (e.g., t-tests) would help confirm that the improvements are statistically robust.\n2. It appears that Spotscape requires considerable effort for hyper-parameter tuning. The authors should provide guidance or strategies for tuning these hyper-parameters to benefit readers who may want to reproduce or build upon this work.", "relation_to_broader_scientific_literature": "The paper’s contributions address current limitations in spatially resolved transcriptomics (SRT) analysis, graph-based representation learning, and prototypical contrastive learning for biological data. Specifically, the work builds on:\\\n(1) Spatially resolved transcriptomics (baselines): STAGATE[1], SpaGCN[2], SpaceFlow[3], etc.\\\n(2) Graph-based representation learning (methodology): Graph Convolutional Networks (GCN)[4], etc.\\\n(3) Prototypical contrastive learning (methodology): scGPCL[5], scPoli[6], etc.\n\n[1] Deciphering spatial domains from spatially resolved transcriptomics with an adaptive graph attention auto-encoder[J]. Nature communications, 2022.\\\n[2] SpaGCN: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graph convolutional network[J]. Nature methods, 2021.\\\n[3] Identifying multicellular spatiotemporal organization of cells with SpaceFlow[J]. Nature communications, 2022.\\\n[4] Semi-supervised classification with graph convolutional networks[J]. 2016.\\\n[5] Deep single-cell RNA-seq data clustering with graph prototypical contrastive learning[J]. Bioinformatics, 2023.\\\n[6] Population-level integration of single-cell datasets enables multi-scale analysis across samples[J]. Nature methods, 2023.", "essential_references_not_discussed": "For imputation tasks, the authors should compare Spotscape with specialized imputation methods. Including domain-specific methods would enhance the credibility of their claims and provide a more comprehensive evaluation.", "other_strengths_and_weaknesses": "Other strengths:\n1. The paper is well-organized and easy to follow.\n2. Although the methodological contribution is incremental, the practical application in SRT data analysis is compelling.\n3. The experiments are well-designed, with rigorous benchmarking across multiple datasets and tasks.\n   \nOther weaknesses:\n1. The scalability analysis is incomplete, as it focuses solely on training time without addressing performance improvements.\n2. The manuscript does not compare Spotscape with specialized imputation methods, which is critical for validating the imputation task claims.\n3. The paper could benefit from additional statistical analysis and clearer guidance on hyper-parameter tuning.", "other_comments_or_suggestions": "I recommend that the authors:\n1. Include statistical significance tests (e.g., t-tests) to support the experimental findings.\n2. Provide comparisons with domain-specific imputation methods to strengthen the claims related to imputation.\n3. Offer additional discussion on the theoretical underpinnings of the loss functions (e.g., in formula (8)) and clarify any potential limitations of their approach.\n4. Include guidance on the hyper-parameter tuning process to assist readers in replicating the experiments.", "questions_for_authors": "See above.", "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": "HBKZafT2Ly", "reviewer": "Reviewer_eTFY", "summary": "This paper proposed a new computational method, known as Spotscape, to integrate different spatial transcriptomics data. This model is improved by graph neural networks.\n\n## update after rebuttal\n\nI keep my score.", "questions": "", "limitations": "", "rating": 2, "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": "Thank you for your constructive feedback. To address your concerns, we upload additional results in the [external link](https://anonymous.4open.science/r/Spotscape-31B6/Rebuttal.pdf).\n\n**Q1-1) Presentation of Figure 1**\n\n_Figure 1_ highlights the limitations of previous methods that address the issues present in the Vanilla GAE (b-1), particularly the problem where boundary spots receive noisy information from spots in different spatial domains.\n\nWhile we describe the observation from _Figure 1 in the second paragraph of our manuscript_, we understand that the presentation of _Figure 1_ may have caused some confusion, as we did not clearly indicate which part of _Figure 1_ readers should focus on. The most important part of _Figure 1_ is the number of red dots, which represent **Wrongly Clustered in Boundary** and **boundary CA**. We will revise the manuscript to make this point more prominent.\n\nAdditionally, the spot colors in _Figure 1_ (a) and (b) are independent. Please refer to the legend at the top of the _Figure 1_ (a) of our manuscript.\n\n**Q1-2) Spotscape vs. GAE variation**\n\nSpotscape did not exceed GAE with **oracle edges** (b-3), which is connected with the same ground truth only, in terms of Total CA, which is not a real scenario. However, Spotscape does outperform the oracle setting in terms of boundary CA, demonstrating the effectiveness of our proposed method in addressing the boundary-related issues.\n\n**Q2) GNN for cell-type specific signals**\n\nYour concern arises from the fact that all of the datasets we used are annotated by spatial domains rather than cell types, and that our evaluations only focus on spatial domains. You may also have assumed that as our graph is primarily constructed based on spatial coordinates, this would be only effective for capturing spatial signals, while not as useful for encoding cell-type-specific signals.\n\nTo address this, we introduce a new dataset from the **Postnatal Mouse Brain (PMB)** (STOmicsDB ID: STDS0000004), **annotated by cell types**, and perform ablation studies with an MLP encoder. The clustering performance for PMB and DLPFC both is reported in **Table 5 and 6 in the external link**.\n\nWe observe that the GNN-based encoder is less beneficial in the PMB dataset (cell-type) than in the DLPFC dataset (spatial domain) clustering. This indeed aligns with your intuition that the spatial graph carries more information regarding spatial-specific signals rather than cell-type-specific signals. However, GNN still provides a performance gain in the PMB data since spatial regions also implicitly carry signals related to cell types because the same cell types tend to cluster together within tissues, reflecting their functional and structural organization, as well as their interactions within specific tissue regions [1]. In fact, the homophily ratio of both the SNN graph in the DLPFC and the PMB data is 0.92, demonstrating that spatial regions also carry cell-type-related signals. \n\n**Q3) Scalability**\n\nPlease refer to _Figure 10 in our manuscript_ about reasonable runtime up to 100,000 spots. To further address your concern, we conducted additional experiments using the Mouse Main Olfactory Bulb dataset (STOmicsDB ID: STDS0000142 - 1,792,797 spots in 39 slices).\nIn **Figure 5 in the external link**, we present the runtime for different numbers of slices, demonstrating that Spotscape can handle large datasets without exponential runtime growth as the number of slices grows.\n\n**Q4-1) Hyper-parameters setting**\n\nPlease refer to our rebuttal regarding **Q4** to reviewer **uFL9** due to the character limits.\n\n**Q4-2) More baselines**\n\nWe have updated the baselines **in the external link**.\n* PASTE2: Slice-to slice alignment using optimal transport in **Table 4**\n* CAST: Integration and alignment using CCA-SSG in **Table 3** (Heterogeneous integration), **Figure 1** (UMAP for batch effect), **Figure 3** (Trajectory inference), and **Table 4** (Alignment)\n\n**Q5-1) Figure 6 UMAP & Trajectory of raw expression**\n\nWe did not intend to show trajectory inference results in _Figure 6_. Our goal was to highlight the performance of the heterogeneous integration reducing batch effect. \n\nTo address your concern, we show that the scores based on the raw expression do not provide reliable information on trajectory. To evaluate this, we calculate the pseudo-Spatiotemporal Map and report its correlation with the ground-truth layer, adding the results in **Figure 2 in the external link**. These results indicate that raw expression alone performs the worst, demonstrating the necessity of additional representation learning methods.\n\nFinally, we also conducted trajectory inference on this dataset and reported the results **in Figure 3 and 4 in the external link**. These results show that while Spotscape successfully captures the trajectory, the raw expression-based approach fails to do so.\n\n---\n[1] \"An introduction to spatial transcriptomics for biomedical research,\" Genome Medicine", "claims_and_evidence": "Yes.", "methods_and_evaluation_criteria": "Yes.", "theoretical_claims": "Yes, I have checked the correctness of proofs and claims.", "experimental_designs_or_analyses": "Yes, I have checked the analyses and designs. I have some questions about this, which is discussed in my later question section.", "relation_to_broader_scientific_literature": "The contribution is minor, but the scientists working on spatial transcriptomics analysis will be interested in reading it.", "essential_references_not_discussed": "NA.", "other_strengths_and_weaknesses": "Please see my comments.", "other_comments_or_suggestions": "Please see my questions.", "questions_for_authors": "This paper proposed a method for spatial transcriptomics integration, which seems to have good performance, but I have some questions about benchmarking analysis and model design. If the authors can address my concerns, I may consider raising my score.\n\n1. The presentation of Figure 1 is not clear to me. It seems that GAE variations and the proposed method identify similar regions. Why proposed method cannot exceed GAE variation in both metrics? What is the meaning of the colors presented in the right panels? I think it does not align well with the labels presented in the left panel. The authors should consider improving the presentation.\n\n2. It has been shown that the variation of spatial transcriptomic data can be decomposed into cell type-specific signals and spatial signals. Therefore, is it still meaningful to use a GNN to encode cell-type specific signals? The answers should include oblivion studies based on normal MLP.\n\n3. What about the scalability of the purposed models can it handle large-scale datasets? For example, the spatial atlas data suggested by spatial AD/HC database: https://ngdc.cncb.ac.cn/databasecommons/database/id/9046 or STImage 1K4M (https://github.com/JiawenChenn/STimage-1K4M)?\n\n4. The authors do not present the turning results of baseline methods. Do they keep the default hyper-parameters for the baselines? If so, how to ensure the comparison is fair as the authors are tuning their proposed method across different datasets? Also, the authors may need to consider PASTE2 (https://github.com/raphael-group/paste2) or CAST (https://www.nature.com/articles/s41592-024-02410-7) as a baseline. \n\n5. The UMAP presented in Figure 6 looks strange. Do they observe trajectory patterns for this figure? If so, it will be helpful if they also compute scores based on the raw expression profiles as I think the raw data capture the most information on trajectory relationship and it looks like we do not need to run other methods in analyzing this dataset.", "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": "NA"}}, {"review_id": "rhmhpW1Mki", "reviewer": "Reviewer_aapZ", "summary": "The paper introduces Spotscape, a novel framework for representation learning in Spatially Resolved Transcriptomics (SRT) data. The key contribution of the paper is the Similarity Telescope module, which captures global relationships between spots, addressing the limitations of existing graph-based methods that rely heavily on local spatial information. Additionally, the paper extends Spotscape to multi-slice tasks by introducing a prototypical contrastive learning (PCL) scheme and a similarity scaling strategy to mitigate batch effects during multi-slice integration. The authors conduct extensive experiments on multiple datasets, demonstrating the superiority in various downstream tasks.", "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": "Thank you for taking the time to provide constructive feedback on our paper. To address your concerns, we have added tables and figures in this [external link](https://anonymous.4open.science/r/Spotscape-31B6/Rebuttal.pdf)\n\n**Q1) Theoretical Justification**\n\nThe similarity consistency loss in _Equation (1) of our manuscript_ serves two key purposes: **1) explicitly guiding the embedding space to capture quantitative similarity relationships**, and **2) encouraging the model to learn a global relational structure that spans all nodes**.\n\nIn downstream tasks, we rely on cosine similarity between normalized embeddings. In other words, we treat the normalized embedding space as an Euclidean space, where distance serves as a proxy for semantic closeness. However, embeddings from GAE trained solely with the reconstruction loss are optimized for compression. As a result, the cosine similarity between embeddings lacks direct interpretability or consistency across different pairs. In an Euclidean space, the consistency loss equals zero ideally. Thus, the consistency loss serves as a regularizer that aligns the embedding space more closely with the desired geometry, making similarity values more meaningful and consistent.\n\nMoreover, the limited receptive field of GNNs is problematic because downstream tasks involve comparing representations of distant nodes. The consistency loss helps mitigate this limitation by considering similarity relations between all node pairs. The reconstruction loss satisfies $\\frac{\\partial^2 \\mathcal{L}_{\\text{recon}}}{\\partial \\tilde{Z}_i \\partial \\tilde{Z'}_j} = 0$ for $i \\neq j$, which implies that updates to each embedding do not depend on the others. \n\nIn contrast, the second derivative of the consistency loss, $\\frac{\\partial^2 \\mathcal{L}_{\\text{SC}}}{\\partial \\tilde{Z}_i \\partial \\tilde{Z'}_j}$, can have non-zero values, indicating that the update to each embedding depends on others as shown in our proof **R1.1 in the external link**.\n\nIn summary, the consistency loss not only enhances the quantitative interpretability of similarity in the learned space, but also provides a mechanism for global information flow, thus improving the utility of the representations for downstream tasks.\n\n**Q2) Scenarios where the global similarity assumption may not hold**\n\nWe understand your concern that Spotscape could introduce noise, particularly when spots far from the anchor node but still within the same spatial domain are considered.\nHowever, we want to clarify that our method does not rely on any form of aggregation from global nodes. Instead, Spotscape is designed to learn the similarities between all spots, irrespective of their global or local relationships.\n\nOur approach focuses on learning these similarities directly, without assuming that distant spots within the same spatial domain must always share meaningful information. Rather than aggregating information from any nodes, the model learns the relationships between spots through augmentation-based consistency, which expects that only meaningful relationships are captured. This avoids the risk of noise from distant spots and emphasizes learning the inherent semantic relationships between spots based on the data itself.\n\nIn summary, Spotscape prioritizes the direct learning of spot similarities and consistency across augmentations, without aggregating information from distant or global nodes, which could potentially introduce noise. \n\n**Q3) More baselines**\n\nWe have updated our experiments to include these two latest SRT clustering methods, MAFN (TKDE'24) and stGCL (ACM MM'24), across all relevant tasks, including clustering and integration. The results are now reported in **Tables 1, 2, and 3 in the external link**.\n\nCompared to these baselines, Spotscape still demonstrates superior performance, highlighting the effectiveness of our proposed method.\n\n**Q4) Trade-offs between performance gains and computational cost of the PCL scheme**\n\nTo address your concern regarding the trade-offs between performance gains and computational costs associated with prototypical contrastive learning (PCL), we generated a synthetic dataset using scCube [1], with mouse embryo data as the reference, and reported the results in **Figure 6 (external link)**. This analysis demonstrates that while PCL does require more training time, it leads to better performance.\nWe argue that in practical scenarios, the decision to use PCL depends on the user's preference for balancing training time and performance. However, we emphasize that PCL does not lead to impractical training times, as it is not excessively slow, and can still be viable for real-world applications.\n\n---\n[1] \"Simulating multiple variability in spatially resolved transcriptomics with scCube,\" Nature Communications", "claims_and_evidence": "The claims made in the paper are generally well-supported by clear and convincing evidence. The authors provide extensive experimental results across multiple datasets, showing that Spotscape outperforms existing baselines in tasks such as spatial domain identification, trajectory inference, and multi-slice integration. The ablation studies further validate the importance of each proposed module (e.g., Similarity Telescope, PCL, and similarity scaling). However, the paper could benefit from a more detailed discussion on the theoretical justification for the global similarity learning scheme, particularly how it addresses the limitations of local spatial information in SRT data.", "methods_and_evaluation_criteria": "The proposed methods, including the Similarity Telescope module, prototypical contrastive learning (PCL) scheme, and similarity scaling strategy, are designed to address key challenges in Spatially Resolved Transcriptomics (SRT) data analysis. While the authors claim that these modules are novel and effective, I find that the theoretical justification and logical coherence of these methods are not sufficiently robust. For the Similarity Telescope Module, the authors argue that capturing global relationships between spots is crucial, especially for spots near spatial domain boundaries. However, the paper lacks a clear theoretical foundation for why global similarity learning is superior to local spatial information in all cases.", "theoretical_claims": "The paper does not present formal theoretical proofs. The authors provide intuitive explanations for the design choices, such as the global similarity learning scheme and the prototypical contrastive learning module. While the lack of theoretical guarantees is not a major drawback, a more formal analysis of the global similarity learning mechanism could strengthen the paper.", "experimental_designs_or_analyses": "The experimental design is sound and well-executed. The authors evaluate Spotscape on multiple datasets, covering both single-slice and multi-slice scenarios. The results are consistent across different datasets, demonstrating the generalizability of the proposed method. The ablation studies and sensitivity analysis provide valuable insights into the contribution of each module. However, the paper could benefit from a more detailed discussion of the limitations of the proposed method, particularly in scenarios where the global similarity assumption may not hold.", "relation_to_broader_scientific_literature": "The authors acknowledge the limitations of existing graph-based methods and propose a novel approach to address these limitations. The introduction of global similarity learning and prototypical contrastive learning aligns with recent trends in self-supervised learning and graph representation learning. The paper builds on prior work such as STAGATE and SpaceFlow, but introduces significant improvements by incorporating global context and multi-slice integration.", "essential_references_not_discussed": "The paper adequately covers the relevant literature, but it could benefit from a discussion of recent advances in SRT clustering and multi-view representation learning, which are closely related to the proposed method.", "other_strengths_and_weaknesses": "Strengths:\n1)The extension to multi-slice tasks using prototypical contrastive learning is well-designed and addresses a key challenge in SRT analysis.\n2)The extensive experimental results and ablation studies provide strong evidence for the effectiveness of the proposed method.\n3) The code is made publicly available, which enhances the reproducibility of the results.\nWeaknesses:\n1) The paper lacks a formal theoretical analysis of the global similarity learning mechanism.\n2) The limitations of the proposed method, particularly in scenarios where the global similarity assumption may not hold, are not thoroughly discussed. For example, considering the relationship between spots from a global perspective may introduce noise, making it difficult to learn spot information with the same semantic relationship.", "other_comments_or_suggestions": "The paper is well-written presents the contributions and results. However, the authors should consider adding a discussion on the limitations of their method, particularly in scenarios where the global similarity assumption may not hold.", "questions_for_authors": "1) Theoretical Justification:Could the authors provide a more formal theoretical justification for the global similarity learning mechanism? How does it address the limitations of local spatial information in SRT data?\n2) What are the limitations of the proposed method, particularly in scenarios where the global similarity assumption may not hold? How might these limitations be addressed in future work? For example, considering the relationship between spots from a global perspective may introduce noise, making it difficult to learn spot information with the same semantic relationship.\n3) In the comparison methods, please add the latest SRT clustering methods, such as [MAFN, TKDE'24] and [stGCL, ACM MM'24], to further validate the effectiveness of the proposed method.\n4) The results indicate that Spotscape achieves fast training times, highlighting its practicality for high-throughput datasets (e.g., 100,000 spots) within a reasonable timeframe. However, the introduction of the prototypical contrastive learning (PCL) scheme might slow down the training process. Could the authors provide an analysis of the time complexity of each module, particularly focusing on the impact of PCL on the overall training time? This would help clarify the trade-offs between performance gains and computational cost.", "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 received mixed recommendations: one Weak Reject (eTFY), one Weak Accept (aapZ), and one Accept (uFL9). The two reviewers with positive ratings explicitly acknowledged the novelty of the proposed framework, the thorough experimental evaluation, and the quality of the presentation. Reviewer eTFY, who rated the paper as Weak Reject, raised concerns about the clarity of Figure 1, the scalability of the approach to large-scale datasets, and the experimental details required for fair comparison. After examining the detailed reviewer feedback and the anonymous external material provided, AC believes that most of these concerns can be adequately addressed.

Reviewer eTFY also commented that the improvements presented in the paper may not be of strong interest to the broader machine learning community. However, given the growing importance of SRT, AC believes that this work could be very valuable to application-oriented researchers.

In summary, based on the assessments of all three reviewers, AC finds that the strengths and contributions of the paper outweigh the concerns, and recommends that the paper be accepted for presentation at ICML 2025. AC also encourages the authors to appropriately incorporate the supporting materials into the final version of the paper.
Decision: Accept (poster)