Heterogeneous Graph Guided Contrastive Learning for Spatially Resolved Transcriptomics Data

Venue: acmmm_org_ACMMM_2024_Conference
Published: 2024-03-01 07:00:30

Abstract: Spatial transcriptomics provides revolutionary insights into cellular interactions and disease development mechanisms by combining high-throughput gene sequencing and spatially resolved imaging technologies to analyze genes naturally associated with spatially variable tissue genes. However, existing methods typically map aggregated multi-view features into a unified representation, ignoring the heterogeneity and view independence of genes and spatial information. To this end, we construct a heterogeneous Graph guided Contrastive Learning (stGCL) for aggregating spatial transcriptomics data. The method is guided by the inherent heterogeneity of cellular molecules by dynamically coordinating triple-level node attributes through comparative learning loss distributed across view domains, thus maintaining view independence during the aggregation process. In addition, we introduce a cross-view hierarchical feature alignment module employing a parallel approach to decouple spatial and genetic views on molecular structures while aggregating multi-view features according to information theory, thereby enhancing the integrity of inter- and intra-views. Rigorous experiments demonstrate that stGCL outperforms existing methods in various tasks and related downstream applications.
\end{abstract}

Main paper: 
 introduction: 
 Spatial transcriptomics is widely employed to explore the structural organization and functional roles of cells within tissues. This approach seeks to elucidate the spatial patterns of gene expression critical for applications, e.g., precision medicine, resolution of disease mechanisms, and discovery of disease biomarkers [3] . Unlike single-cell multi-omics, spatial transcriptomics offers insights into the spatial arrangements of cells, facilitating new perspectives on cell-cell interactions in complex biological processes [2, 31] .Top performers have merged spatial transcriptomics with computational vision, mathematical models, and graph convolution to Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. MM '24, Melbourne, Australia., © 2024 Association for Computing Machinery. ACM ISBN 979-8-4007-0108-5/23/101. . . $15.00 identify spatially variable genes, intending to leverage morphological priors of spatial features for cellular discrimination [6, 35] . However, organisms are defined by the relationships between cellular genes and cells with a regular spatial distribution in morphology [19] . It is quite a challenging task to combine the best of both perspectives, i.e., to integrate spatial and genetic information based on a priori relationships [21] .Recent proposals for graph neural networks (GNNs) to integrate spatial and genetic information, thereby processing multi-modal data from various sensors and learning to discern associations between modalities and adaptively learn associations between modalities [23] . SpaGCN [9] aggregates gene expression around each spot through spatial graph convolution. DeepST [29] integrates node features and positional information using denoising autoencoders and GNNs. Li et al. [11] introduces an unsupervised cell clustering method based on graph convolutional networks. GraphST [14] further integrates multiple tissue sections vertically and horizontally through spatial graph self-supervised contrast. MuSe-GNN [13] combines weighted similarity and contrastive learning for regularization, aiming to learn gene-gene relationships across datasets. Furthermore, due to sensor limitations, genetic data for one locus typically contains an average of more than a dozen cellular expressions [4] . Thus, the independence of gene and spatial views of cells is particularly critical for unbiasedly determining cell population boundaries for categorization, i.e., returning to the basics.As shown in Fig. 1 , a cellular organization typically exhibits spatial regularity resulting from cell expansion processes. However, the aforementioned method ignores the potential heterogeneity of spatial and gene associations for the expression of cellular categories, resulting in the absence of inter-cellular associations during the fusion process. There are two points: (1) Although spatial features at the boundaries of cell populations are highly correlated, cell categorization remains inconsistent and primarily dependent on gene markers. This inconsistency can cause spatial features to overly smooth representations at tissue boundaries, leading to confusion in cell categorization. (2) From a multi-view alignment perspective, previous studies have shown that fusion map distributions were equivalent in size to the distributions of individual modalities, obscuring the structural organization of spatial and genetic features and contributing to modality collapse during the fusion process (as depicted in Fig. 1 ). This is like shooting arrows; the larger the target (i.e., for the projected feature distribution), the better the arrow shot from each modality hits the bull's eye.To address the above issues, we propose an end-to-end framework of heterogeneous graph Guided Contrastive Learning (stGCL) for spatially resolved transcriptomics data. This framework constructs gene and spatial graphs utilizing features derived from independent parallel graph encoders, which are subsequently represented within latent distributions. To identify confusing organizational boundaries, we construct three levels based on spatial and genetic heterogeneity relationships, i.e., the joint, gene, and tissue levels, enabling the unbiased refinement of node attributes through heterogeneous contrastive learning loss, leveraging the independent a priori correlations among the three views.On the other hand, to alleviate the modality collapse problem, we design a cross-view hierarchical feature alignment (CHA) aggregator designed to integrate cross-view features at the molecular structure level while simultaneously tracing back to identify viewspecific structures. Inspired by information theory, the aggregated features are refined to encompass heterogeneous and homogeneous features, resulting in a comprehensive collection of coherent universal features with a consistent distribution size (as depicted in Fig. 1c ). stGCL incorporates a priori modeling for each view and implements discriminative clustering techniques ranging from coarse to fine, from tissue to molecular formulae. This integration ensures a genetic representation of the functional similarity of morphology across the views encompassed within the joint space.Contributions: The main contributions of this paper are:• We propose a stGCL for spatial transcriptomics data that end-to-end combines the heterogeneity of genetic and spatial a priori distributions to learn the intrinsic local organization of cells, providing a novel perspective on the mechanism of cellular interactions to address the coordination between different views in tissue. • A CHA module is designed to aggregate cross-view features at the structure level, maintaining the independent structural integrity of the spatial and genetic views according to information theory with a mapping-rescale paradigm. • We introduce Contrastive Heterogeneous Molecular Learning to identify node attributes based on a priori correlations of domain distributions at different levels to recognize molecular latent spaces in an unbiased manner. • We conduct comprehensive experiments on various three datasets, demonstrating the quantitative and qualitative superiority of our method. Its effectiveness was also confirmed in downstream ST tasks. 
related work 2.1 spatial transcriptomics: 
 Spatial transcriptomics (ST) techniques are widely used in various fields, including oncology, neuroscience, and developmental biology [5] , providing new insights not available from traditional transcriptomics techniques that lack spatial resolution [4, 27] . Deciphering the spatial organization of gene expression can facilitate the discovery of new cell types [4] , delineation of molecular pathways [22] , and the identification of targets for therapeutic interventions [33] , among other applications [16] . ST has unique spatial organization information relative to single-cell multi-omics, so some excellent work has been done to construct representation learning networks based on spatial graphs to identify spatially variable genes from a spatial perspective and to identify cells using the morphological prior distribution of the spatial features [16] . Giotto employs a Hidden Markov Random Field to model gene expression at nodes, inspired by super-resolution in computer vision. SpaGCN [9] uses GCN to identify spatial domains based on gene expression, histology, and spatial location aggregation, identifying spatially variable genes within each domain. SEDR [30] trains both a depth self-encoder and a self-encoder to learn low-dimensional spatial embedding of ST. Graph self-encoder to learn the low-dimensional spatial embedding of ST. Squidpy [17] integrates omics and image analysis tools to facilitate an expandable description of ST. Inspired by the super-resolution technique in computer vision, BayesSpace [34] has developed a comprehensive Bayesian statistical model incorporating a Markov random field.Many studies [24] have explored the application of graph neural networks (GNNs) in partitioning and identifying spatial domains. These studies treat spatial and genetic features as distinct sources of multi-view information, aiming to facilitate adaptive learning of inter-view associations [7, 8] . For instance, stLearn [18] employs neighbor-based smoothing and morphological adjustment alongside a graph-based clustering approach to identify spatial domains by normalizing ST data. SpaceFlow [20] introduces spatially regularized deep graph networks to produce spatially coherent low-dimensional embeddings. ThItoGene [10] utilizes dynamic convolutional and capsule networks to detect potential molecular signals in histological images adaptively. Spatial-MGCN [26] employs graph convolution to adaptively learn intricate relationships between gene expression and spatial information. MuSe-GNN [13] integrates weighted similarity learning and contrast learning for regularization, enabling the exploration of gene-gene relationships across datasets. In this study, we propose a multi-view contrast learning framework based on spatial and gene views complemented by a multi-level heterogeneous guided fusion strategy. This framework aims to collaboratively mitigate the mismatch in cross-view feature expression during fusion. 
methodology 3.1 overview: 
 Given spatial and gene features, a spatial graph 𝜓 𝑠𝑝𝑎 = (𝜓 𝑠 , 𝑋 ) is constructed based on neighbor associations, where is the spatial adjacency matrix for 𝑁 points, and 𝑋 ∈ R 𝑁 ×𝑀 represents the normalized gene expression matrix, with 𝑀 being the number of filtered genes. We set 𝜓 𝑖 𝑗 𝑠 = 𝜓 𝑗𝑖 𝑠 = 1 if the Euclidean distance 𝑆 𝑖 𝑗 between points 𝑖 and 𝑗 is less than the predefined radius 𝑟 , otherwise, it is set to 0, which can be formalized as:𝜓 𝑠 ∈ R 𝑁 ×𝑁EQUATIONOn the other hand, the gene expression graph is formed by measuring the similarity of gene expressions using cosine distance. Specifically, we construct the k-nearest neighbor graph 𝜓 𝑔𝑒𝑛𝑒 = (𝜓 𝑓 , 𝑋 ) of the gene expression matrix 𝑋 , where 𝜓 𝑓 ∈ R 𝑁 ×𝑁 is the feature adjacency matrix. The adjacency matrix 𝐴 𝑓 for this graph is defined using a binary classification system, where:EQUATION)ensure that only the first 𝑘 neighbors of each point based on the gene cosine similarity are considered in the graph, and calculated using the gene expression vectors x 𝑖 and x 𝑗 from 𝑋 to compute the cosine similarity between the two points 𝑖 and 𝑗, with the formula: sim(x 𝑖 , x 𝑗 ) =x 𝑖 •x 𝑗 ∥x 𝑖 ∥ ∥x 𝑗 ∥ . The spatial and gene-view graphs are then processed separately through graph convolutional encoders to maximize their potential expression, formulated as follows:EQUATIONwhere 𝐻 (𝑙+1) denotes the node embeddings at the (𝑙 + 1)-th layer, 𝐻 (𝑙 ) represents the node features at the 𝑙-th layer, ψ is the adjacency matrix of the graph with added self-connections, D is the degree matrix of ψ , 𝑊 (𝑙 ) is the weight matrix for the 𝑙-th layer, and 𝜎 denotes a ReLU function.After refining the graphs and decoupling into inter-and intraview features by the CHA module, the node attributes are analyzed at the genetic, spatial, and collaborative levels. Subsequently, the resulting triple heterogeneity-aware graphs are globally aligned and mapped to a unified representation as follows:EQUATIONwhere UAP stands for universal aligned projection. The resulting 𝜓 𝑟𝑒 𝑓 𝑖𝑛𝑒 is a comprehensive and well-constructed aggregated representation that maximizes multi-view information expression in a confined space. Thus, stGCL not only reveals spatial and genetic associations at the molecular level, but also exhibits sound generalizability across multiple downstream tasks. 3.2 Cross-view Hierarchical Feature Align.We first show that view heterogeneity informs the aggregation strategy and then analyze it through information theory. After obtaining genetic and spatial graphs with specific features derived from independent parallel encoders, embedding them in joint latent distributions, and identifying cell categories through bi-determined expanded central cluster distributions, can be formulated as: 𝜓 𝑗𝑜𝑖𝑛𝑡 = C 𝜓 𝑔𝑒𝑛𝑒 ,𝜓 𝑠𝑝𝑎 . As shown in Fig. 3 , we generate three layers of features to extract low-frequency information through dynamic structure-aware attention respectively, which helps to update 𝜓 𝑔𝑒𝑛𝑒 and 𝜓 𝑠𝑝𝑎 from the prior distribution in the case of 𝜓 𝑗𝑜𝑖𝑛𝑡 . This process can be expressed as:EQUATIONwhere T denotes the transformer block, C(•) indicates channel concat, and the bi-directional attention is denoted as:EQUATIONwhere √ 𝑑 is the scaling factor and 𝑊 is the weight transformation matrix. This cross-modality hierarchical decoupling guidance allows the fused image to diffuse out of the constraints of the vanilla distribution, ensuring that it encompasses the low-frequency diverse distributions of both modalities. Universal Aigned Project We then obtain two intra-view spatial and gene features and an inter-view collaborate feature. These are aligned onto a distribution 𝜓 𝑢𝑛𝑖𝑣𝑒𝑟𝑠𝑎𝑙 , which possesses a larger size compared to 𝜓 𝑔𝑒𝑛𝑒 + 𝜓 𝑠𝑝𝑎 + 𝜓 𝑗𝑜𝑖𝑛𝑡 , formulated as:EQUATIONwhere P comprises a stacked layer of transformer and MLP. Then, 𝜓 𝑟𝑒 𝑓 𝑖𝑛𝑒 is condensed into a succinct and complete representation of 𝜓 𝑢𝑛𝑖𝑣𝑒𝑟𝑠𝑎𝑙 , denoted as:EQUATIONwhere UAP consists of three layers of MLP. Employing the mappingto-deflation strategy, we achieve a refined representation 𝐹 that not only optimally restores spatial and genetic features but also enhances downstream task analyses. Next, we analyze the traditional fusion paradigm of spatial transcriptomics from an information theory perspective. Theorem 1. In the fusion of multiple views into a compact fusion feature, the mapping to global spatial deflation strategy is better expressed and more effective than direct fusion. Proof. According to information theory [25] , consider two nonorthogonal modalities 𝑋 and 𝑌 with sizes 𝑥 and 𝑦, respectively, and an aggregate mode 𝐹 of size 𝑓 . When 𝑓 ≥ 𝑥 + 𝑦, a model can be learned that contains all information of 𝑋 and 𝑌 , that is,EQUATIONwhere 𝐼 denotes mutual information and 𝐻 denotes entropy.Given the sparsity of gene data, the aggregation process should satisfy 𝑓 < 𝑥 + 𝑦, aiming for a compact model that retains the connection and original characteristics of 𝑋 and 𝑌 within a narrower distribution. Typically, in spatial transcriptomics data, we often find 𝑓 = 𝑥 = 𝑦. The mutual information acquired, 𝐼 (𝐹 ; 𝑋 ) + 𝐼 (𝐹 ; 𝑌 ), represents the combined information about 𝑋 and 𝑌 retrievable from 𝐹 . When 𝑓 < 𝑥 + 𝑦, the maximization tends to prioritize the shared information of 𝑋 and 𝑌 , denoted as: max{𝐼 This objective function ignores the orthogonal (independent, nonoverlapping) information components, resulting in a biased representation of 𝐹 towards either 𝑋 or 𝑌 , leading to an inconsistent expression of the combined modality.Considering the heterogeneity of spatial and gene data in ST, the joint entropy 𝐻 (𝑋, 𝑌 ) is minimal and difficult to aggregate, complicating the creation of a compact, efficient, and effective representation. This complexity becomes especially apparent in various downstream tasks, where a task might rely on the independent information components of 𝑋 or 𝑌 , potentially causing the learned modal aggregation information to collapse. As a result, the learned 𝑍 may lack the ability to adequately express 𝑋 and 𝑌 .Inspired by archery in Fig. 1 , our method leverages the prior distributions 𝑃 (𝑇 |(𝑋, 𝑌 )) of 𝑋 and 𝑌 through an intermediate distribution 𝑇 of size 𝑡, where 𝑡 > 𝑥 + 𝑦 > 𝑓 , formulated as:EQUATIONwhere 𝑋, 𝑌, 𝐴,𝑇 corresponds to 𝜓 𝑔𝑒𝑛𝑒 ,𝜓 𝑠𝑝𝑎 ,𝜓 𝑗𝑜𝑖𝑛𝑡 and 𝜓 𝑢𝑛𝑖𝑣𝑒𝑟𝑠𝑎𝑙 in the CHA module of Section 3.2, indicating that 𝑇 captures information from both 𝑋 and 𝑌 . Subsequently, the information within 𝑇 undergoes low-pass filtering, and 𝑇 is compressed through a low-pass filter to obtain unbiased estimates 𝐹 of 𝑋 and 𝑌 . This strategy enables 𝐹 to learn multi-view orthogonality and shared essential features by aggregating 𝑋 and 𝑌 through 𝑇 rather than directly through 𝐹 , thereby facilitating the discovery of the alignment mapping of 𝑋 and 𝑌 within 𝐹 . More details are provided in the Supplementary Material.Learning.The spatial maps of cell populations exhibit high edge similarity, but their type discrimination relies solely on genetic features, resulting in spatial features blurring tissue boundaries. Therefore, we categorize the obtained views into triple levels, synergistically identifying cells in parallel. At the collaborative level, we distinguish nodes identified as the same type by multiple views by comparing the loss of cross-view features, thereby minimizing the disparity between gene and spatial features. The loss can be defined as:EQUATIONwhere 𝑁 and 𝑀 represent the spatial and gene data sample sizes, respectively. 𝑠 𝑖 and 𝑔 𝑗 represent the feature representations of the 𝑖 𝑡ℎ spatial data sample and the 𝑗 𝑡ℎ gene data sample. 𝑦 𝑖 𝑗 serves as a binary label indicating whether samples 𝑖 and 𝑗 belong to the same category (e.g., 𝑦 𝑖 𝑗 = 1 for same category, and 𝑦 𝑖 𝑗 = 0 for different categories). 𝑤 𝑖 𝑗 dynamically assigns weights to spatial and genetic information, using intra-view features (i.e., genes) to alleviate category mixing issues at cell boundary locations. This process leverages view heterogeneity relationships to drive 𝜓 𝑡𝑒𝑥𝑡𝑔𝑒𝑛𝑒 and 𝜓 𝑡𝑒𝑥𝑡𝑠𝑝𝑎 closer together, guiding the cross-view feature 𝜓 𝑡𝑒𝑥𝑡 𝑗𝑜𝑖𝑛𝑡 to effectively differentiate between nodes universally recognized as being of the same kind across multiple views. As a single spot may represent the mean gene expression of multiple cells at the gene level, we employ the zero-inflated negative binomial distribution [32] to capture crucial aspects of gene expression data, including zero inflation (high sparsity) caused by true and dropout zeros, discreteness, and over-dispersion (variance greater than the mean). We model the distribution 𝑝 (𝜓 𝑔𝑒𝑛𝑒 | 𝑍 ) as:EQUATIONwhere 𝑝 ψ𝑔𝑒𝑛𝑒 𝑖 | 𝜋 𝑖 , 𝜇 𝑖 , 𝜎 2 𝑖 is the ZINB distribution parameterized by 𝜋 𝑖 , 𝜇 𝑖 , 𝜎 2 𝑖 ∈ R 𝑛 𝑔 . Specifically, 𝜋 𝑖 = sigmoid 𝑊 𝜋 𝑓 𝐷 (𝑧 𝑖 ) represents the variance of the negative binomial, where 𝑊 𝜎 is the weight matrix of 𝜎 2 . The loss function of the parameter estimation is defined as the negative log-likelihood of the ZINB distribution:EQUATION)On the other hand, spatially adjacent spots should be proximate, whereas spatially non-adjacent spots should be distant in the latent space. Thus, we incorporate both similarity and spatial neighbor features to compute the spatial regularization constraint loss:EQUATION)where 𝑛 represents the number of spots, this method minimizes the embedding distance between spatial neighbor spots through the spatial regularization constraint, enhancing the informativeness and discriminative power of the learned latent space. Overall loss function. During the training process, the multiview GCN encoder, the ZINB decoder, and the spatial regularization constraints are collectively optimized. The ultimate training objective of stGCL is defined as:EQUATIONwhere 𝛼, 𝛽, 𝛾, and 𝜆 represent the weighting factors used to balance the influences of reconstruction loss, consistency loss, and spatial regularization constraint loss. 
datasets and details: 
 The DLPFC [15] dataset comprises 12 tissue slices obtained from 3 adult samples sourced from the dorsolateral prefrontal cortex of individuals from the Lieber Institute for Brain Development (LIBD), each containing four adjacent slices. These slices, obtained using 10x Visium, were manually labeled to identify DLPFC layers and To demonstrate the superior performance of the proposed stGCL, we have chosen six benchmark methods for comparative analysis, including DeepST [29] , GraphST [14] , SCANPY [28] , SCGDL [12] , SpaGCN [9] , and Spatial-MGCN [26] .Comparative tests between stGCL and six other models across 12 DLPFC slices are presented in Table 1 . Our method outperforms the existing state-of-the-art on nine of these datasets, achieving performance enhancements of over 5% in clusters ranging from 151507 to 151672, particularly with a 22% improvement on #151510. Notably, many methods exhibit extreme performance dips below 30% on specific datasets, which significantly undermines the reliability and applicability of results in both scientific research and clinical settings. In contrast, stGCL surpasses the average performance of competing methods across all datasets, with several clusters showing improvements above 40%, thereby demonstrating its robustness and broad applicability. of stGCL's hierarchical processing of ST data. Moreover, Fig. 5 showcases the overall performance of the algorithms, clearly indicating that stGCL performs better than the competing algorithms.Visium Human Breast Cancer dataset. Table 1 compares our method with six other models. Although clustering performance among these models is generally similar due to significant differences in the sizes of small cell populations across 21 categories, stGCL achieves a 4% improvement over the highest-performing model, Spatial-MGCN, with an ARI of 68%. This indicates that stGCL effectively addresses the challenges of category imbalance between large and small cell clusters by leveraging heterogeneous comparisons to identify ambiguous nodes.Cluster visualization displays the situation of the human breast cancer dataset, as shown in Figure 4b . Unlike SCGDL, DeepST, and SCANPY, stGCL not only misclassifies fewer nodes but also delineates small cell populations. Although most methods produce visualizations with irregularly shaped cells and usually display new negative sample categories in the center of cell clusters, particularly in the top right and top left corners, stGCL successfully clarifies the tissue shapes. This method enhances the distinction at cell boundaries by shifting focus from inter-view to intra-view features, leading to more accurate node classification.Anterior Tissue dataset. Fig. 6 6 and the last row of Table 1 display the comparative results between stGCL and other algorithms. Notably, stGCL uniquely and accurately delineates the layer structure, achieving the highest ARI of 0.45, surpassing the performance of alternative methods. In contrast, competing algorithms such as DeepST, SCANPY, and SCGDL report lower ARI scores of 0.25, 0.23, and 0.26, respectively. These methods tend to amalgamate recognized layers, failing to represent the trustworthy structural organization of the data accurately. This evidence indicates that stGCL offers a more precise and dependable analysis of ST data, enhancing the utility of spatial and genetic features through optimized mutual information between views. 1 demonstrates that stGCL exhibits state-of-the-art performance across various datasets, including DLPFC, human breast cancer, and mouse brain anterior, showcasing effective generalization.In this study, we conducted an ablation experiment using DLPFC to evaluate the contributions of various components within our proposed model. The results, presented in Table 2 , elucidate the individual and collective impacts of the Structure-Aware module (SA), universal aligned projection (UAP) module, and cross-entropy loss function (L 𝑐𝑟𝑜𝑠𝑠 ) on the performance, as measured by the ARI.Effect of CHA module.To verify the validity of our framework and information theory, we remove the SA and UAP components of CHA, respectively. It can be seen that w/o SA is 2% lower than stGCL, indicating that global structure awareness is helpful for highly sparse gene data.Effect of UAP. Analysis of the third and fifth rows in Table 1 indicates that incorporating UAP enhances performance by over 4%, further validating the effectiveness of our mapping to deflation strategy. Additionally, removing the UAP component while maintaining SA and L𝑐𝑟𝑜𝑠𝑠, the ARI of 0.5643 is 3% lower than w/o SA. This suggests that while the structure-aware module contributes to model validity, its impact is not as critical as that of the UAP, as evidenced by the higher ARI of 0.5946 obtained for the model without SA, including UAP and L𝑐𝑟𝑜𝑠𝑠. Hence, the UAP module from mapping to deflation is more effective than the SA module's low-pass filter-like fusion paradigm, maximizing the retention of essential information in multiple view features.Effect of L 𝑐𝑟𝑜𝑠𝑠 . As shown in the first and third rows of Table I , independently incorporating L 𝑐𝑟𝑜𝑠𝑠 leads to a 4% improvement, proving that heterogeneity-based guided comparison learning is indispensable. On the other hand, w/o L𝑐𝑟𝑜𝑠𝑠 and w/o CHA with stCGL showed a performance difference of 3% and 6%, respectively. This indicates that the CHA module and L 𝑐𝑟𝑜𝑠𝑠 are complementary, synergistically enhancing multi-view heterogeneity learning.4.4.1 UMAP visualization. We illustrate the uniform manifold approximation and projection (UMAP) visualization results of the stGCL method alongside five other methods applied to three datasets, as depicted in Fig. 7 . stGCL accurately delineates the orderly development of individual cortical layers, including layers 1 through 6 and white matter (WM), outperforming the baseline methods. Interestingly, the UMAP plots of most methods (e.g., GraphST, SCGDL) exhibit insufficient point spacing between layers, which blurs the distinction between them. In contrast, stGCL achieves greater separation between clusters on all three datasets and exhibits a more structured expansion in various directions, demonstrating how heterogeneity modeling effectively enhances the differentiation between categories by synergizing spatial and genetic clustering. Compared to Spatial-MGCN, the class clusters of stGCL are more compact, with branches more precisely arranged within the constrained space. This improvement stems from our approach of employing comparative learning to effectively mitigate confounding factors in the slightly mixed developmental trajectories typical 4.4.2 Gene Imputation. Spatial transcriptomic data are frequently compromised by noise and data loss, adversely affecting the accuracy of gene expression analyses. To establish that stGCL employs heterogeneity-guided learning to preserve critical tissue distribution information from raw data efficiently, we introduced this method, which utilizes positive and negative sample comparisons guided by tissue heterogeneity. When applied to DLPFC, stGCL enabled analysis of the spatial expression patterns of six primitive layer marker genes (ATP2B4, FKBP1A, CRYM, NEFH, RXFP1, B3GALT2). Fig. 8 illustrates how stGCL mitigates considerable noise interference in slice #151507 of DLPFC raw data. The stGCL interpolation generates embeddings that accurately delineate cortical layer boundaries. These findings demonstrate that stGCL effectively eliminates irrelevant noise and data loss artifacts, and dynamically captures and reconstructs spatial transcriptomics data. This ensures that the spatial distributions of these marker genes are consistent with prior observations. Comparative analyses using violin plots of raw and interpolated gene expressions reveal significant improvements in spatial expression patterns, which more closely align with manually annotated organizational structures. Hence, stGCL excels in interpolating gene expression, demonstrating its superior ability to maintain critical spatial data integrity.Furthermore, to further explore the heterogeneity of tumor tissue, we focused on the DCIS/LCIS_1 and IDC_1 clusters to analyze the expression of the top 10 DEGs shown in Fig. 9 . This analysis revealed significant heterogeneity among the clusters. 
conclusions: 
 We introduce the heterogeneous graph guided contrastive learning (stGCL) method for aggregated ST data. This method effectively merges gene and spatial information into unified potential distributions by dynamically refining node attributes across various levels, leveraging cross-view heterogeneity. The cross-view hierarchical feature align module ensures structural integrity and optimal feature aggregation, using information principles. Experimental evaluations reveal that stGCL outperforms current methods in various tasks, showcasing its potential in complex biological analyses through advanced contrastive learning.  
 
 Appendix:  


Decision: According to all the review comments, rebuttals, discussions and final ratings, the majority of the reviewers gave positive ratings to this paper and the concerns were well addressed. I am happy to recommend to accept this paper. Please carefully revise the final manuscript according to the comments and discussions.

Reviews: review: paper_summary: paper_summary: This paper studies a problem of spatial transcriptomics. Specifically, this paper proposes a method named stGCL (spatial transcriptomics Graph Contrastive Learning) to analyze spatial transcriptomics data. This method aims to enhance the understanding of cellular interactions and disease mechanisms by leveraging a contrastive learning framework that respects the heterogeneity of spatial and genetic data. The experiments on DLPFC, Human Breast Cancer and Mouse Brain Anterior Tissue  datasets demonstrate the effectiveness of stGCL over baselines.
strength_weakness: strength_weakness: 1. The topic that studies spatial transcriptomics is practical and interesting.
2. The experimental results  of stGCL on 3 real-world datasets are good.
3. The idea to integrating spatial and genetic data is interesting.
limitations: limitations: 1. Since this paper consider two modalities, gene and spatial. I would like to know the contribution of each modality. Would you have discuss theoretically and empirically?
2. Why not just directly apply some existing method for heterogeneous graphs, e.g., [1]? Could you have a discussion about it?


[1] Heterogeneous Graph Neural Network. KDD 2019.
paper_summary: paper_summary: In this study, the authors propose a method to learn representations from different views for spatial transcriptomics data. The key elements of their approach include heterogeneous graph, contrastive learning and  feature alignments.
strength_weakness: strength_weakness: 1. This paper is easy to read and the expression is clear.
2. The method presented in the paper appears to be technically sound.
3. The experiments are extensive and comprehensive.
limitations: limitations: 1. Is it necessary to construct graph structured data or heterogeneous graph structured data?  How can we ensure the accuracy of the constructed graph data, and that the connections can reflect the relationships in the biological information?
2. The authors directly use the expression X of genes to calculate similarity, which I think is unreasonable. Firstly, the expression is high-dimensional, and the distance does not represent the biological relationship. Secondly, if the original expressions of these samples are already similar (A_ij), what is the meaning of using GCN? In my opinion, there are many defects and issues in the method.)
3. I feel that the clinical significance of this paper is not very high. Specifically, in the fields of bioinformatics analysis and medical data analysis, the most important aspect is the clinical significance, followed by the methods and data.
4. The method lacks innovation, and the theoretical content is also not very useful. Most of the information theory-based method can be written in a similar way.
paper_summary: paper_summary: The authors presents a method called stGCL for analyzing spatial transcriptomics data. The approach leverages the inherent heterogeneity of spatial and genetic information by dynamically coordinating triple-level node attributes through comparative learning loss. The introduction of a cross-view hierarchical feature alignment module further enhances the integrity of both spatial and genetic views. Experiments demonstrate that stGCL outperforms existing methods in various tasks and related downstream applications.
strength_weakness: strength_weakness: 1.  The proposed stGCL method addresses the challenge of integrating spatial and genetic information by maintaining view independence during aggregation. The CHA module maximizes the preservation of original molecular information, enhancing the interpretability and accuracy of the results.

2.  The authors conducted extensive experiments across multiple datasets, demonstrating the quantitative and qualitative superiority of their method. This thorough evaluation provides strong evidence for the effectiveness of stGCL.
limitations: limitations: 1.  The method is pretty complex. And some sections detailing the methodology are densely packed with information, such as the collaborate-level. 

2.  The scalability of the stGCL method to very large datasets is not thoroughly addressed. Given the increasing size of spatial transcriptomics datasets, a discussion on computational efficiency and scalability would be valuable.

Minor:
3. How were the hyperparameters of the weighting of the 4 training objectives tuned to make the method work well? The inclusion of ablation studies to analyze the impact of different weighting of loss function is also needed.
paper_summary: paper_summary: The paper introduces an interesting approach called Heterogeneous Graph Guided Contrastive Learning (stGCL) for analyzing spatially resolved transcriptomics data. This method leverages gene sequencing and spatial imaging technologies to explore cellular interactions and disease mechanisms. The stGCL framework incorporates three levels of node attributes based on spatial and genetic heterogeneity relationships, enabling unbiased refinement through contrastive learning loss. It also includes a cross-view hierarchical feature alignment module to separate spatial and genetic views while aggregating features, enhancing the integrity of inter- and intra-views. Experimental results demonstrate the superiority of stGCL over existing methods in various tasks and downstream applications in the field of spatial transcriptomics.
strength_weakness: strength_weakness: + The paper effectively communicates the related concepts and framework in a clear and understandable manner, making it accessible to a wide audience.
+ The flow of the paper is well-structured, with logical progression from introduction to methodology and results, enhancing readability and comprehension.
+ The studied topic, aiming to learn multi-level representations for spatial transcriptomics analysis, is indeed critical and could bring far-reaching real-world impacts.
+ The idea to incorporate the heterogeneity of genetic and spatial a priori distributions is technically sound and inspring.
limitations: limitations: - Only one evaluation metric is adopted during experimental comparisons. As previously raised by the authors, the learned representations could be used for various down-stream tasks. However, no quantitative results are presented in those aspects. It would be appealing to see if the proposed graph contrastive learning method could attain good results on those tasks.
- The proof for theorem 1 is not rigorous. Currently, the deduction is mostly qualitative and intuitive, not mathematically sound.