Spatial transcriptome data spatial domain identification method based on multi-space self-supervised contrast learning

By employing a multi-spatial self-supervised contrastive learning method and utilizing graph neural networks to generate rich graph feature representations, the problem of inaccurate spatial domain recognition in existing technologies is solved, achieving more efficient spatial domain recognition and clustering results.

CN120954500AActive Publication Date: 2025-11-14ANHUI UNIV

Patent Information

Application Number
CN202511493764.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2025-11-14
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Existing spatial transcriptome data analysis methods are insufficient in fully utilizing spatial and gene expression information, resulting in inaccurate clustering and significant noise impact, making it difficult to achieve accurate spatial domain identification.

Method used

A multi-spatial self-supervised contrastive learning method is adopted. By constructing a graph neural network, rich graph feature representations are generated. The network parameters are optimized by combining reconstruction loss and contrastive learning loss to achieve more accurate spatial domain recognition.

Benefits of technology

It improves clustering performance and spatial domain annotation accuracy, enhances robustness and adaptability to spatial information, and enables better extraction and utilization of multi-scale information from spatial transcriptome data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120954500A_ABST
    Figure CN120954500A_ABST
Patent Text Reader

Abstract

The invention discloses a spatial transcriptome data spatial domain identification method based on multi-space self-supervised contrast learning, and the method comprises the steps: carrying out the modeling to generate a spatial neighborhood graph, keeping the graph structure unchanged, disorganizing node features, and carrying out the data enhancement, thereby obtaining an enhanced graph; constructing an encoder based on a graph neural network, extracting spatial transcriptome data fused with spatial information and gene information to obtain potential embedding, and sending the potential embedding into a multi-space generator to generate multiple groups of rich graph feature representations; fusing graph feature representation and potential embedding to obtain refined representation, reconstructing a gene expression matrix through a decoder, and adding contrast learning loss and reconstruction loss as a total objective function; and updating network parameters by adopting an Adam optimizer according to the obtained total objective function to complete spatial transcriptome spatial domain identification. Spatial transcriptome data are fully mined from global and local angles, and accurate spatial domain identification is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of spatial transcriptome data analysis technology, and more specifically to a spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning. Background Technology

[0002] Spatial transcriptomics (ST) has recently emerged as a valuable tool, effectively assisting researchers in dissecting the complex relationships between tissue structure and function at the cellular and even subcellular levels. This technique measures gene expression levels against the backdrop of spatial location information, with resolution ranging from single-cell levels to local aggregates of multiple cells at a given spatial location (often referred to as "spots"). It provides new perspectives for studying key biological processes such as nervous system development, organ development, and the tumor microenvironment.

[0003] In the field of spatial transcriptome data analysis, a fundamental and important task is spatial domain identification, which aims to divide spatial sites with consistent gene expression and histological structure in tissue samples into meaningful clusters, similar to spatial clustering. Therefore, in recent years, the use of clustering methods to study spatial transcriptome data has become a hot topic in this field.

[0004] Currently, methods for identifying spatial domains can be broadly categorized into two types: non-spatial clustering methods and spatial clustering methods. Traditional non-spatial methods, such as the classic k-means and Leiden methods, only consider gene expression information and ignore spatial dependencies, thus easily clustering discontinuous organizational structures. Since graph neural network (GNN)-based methods can smooth gene expression within spatially adjacent regions, effectively reducing the impact of technical noise, these methods are often used as alternatives for spatial clustering tasks. Recently, self-supervised contrastive learning strategies, commonly used in image processing, have gradually been introduced as an effective strategy into spatial transcriptomics research.

[0005] While these graph neural network clustering methods based on contrastive learning strategies have yielded valuable insights, they still face several challenges in fully utilizing ST data to achieve accurate clustering of organizational structures. First, previous contrastive learning strategies often operate within a single space, and the resulting data scale is insufficient to capture a more comprehensive data distribution to support downstream tasks. Second, the presence of technical and biological noise often results in sparse ST expression matrices, thus affecting the quality of expression features. Summary of the Invention

[0006] The present invention provides a spatial domain identification method for spatial transcriptome data through multi-spatial self-supervised contrastive learning, which helps to improve clustering performance and achieve more accurate spatial domain annotation, and can at least solve one of the above-mentioned technical problems.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning includes the following steps: S1. Take the gene expression and spatial location of the spatial transcriptome data as input, perform data standardization, and then build a model based on the spatial information of the spatial transcriptome data to generate a spatial neighborhood graph. Take the gene expression data after data standardization as node features, and perform data augmentation by shuffling the node features for this spatial neighborhood graph while keeping the graph structure unchanged, to create an augmented graph. S2. An encoder is constructed based on a graph neural network to extract potential embeddings from spatial transcriptome data that integrates spatial and genetic information, and these potential embeddings are fed into a multi-space generator to generate multiple sets of rich graph feature representations. S3. The graph feature representation obtained from S2 is fused with the latent embedding to obtain a refined representation, and the refined representation is reconstructed into a gene expression matrix through a decoder. In this decoding and reconstruction process, the contrastive learning loss and the reconstruction loss are summed as the total objective function. S4. Based on the overall objective function obtained in S3, the Adam optimizer is used to update the network parameters to complete the spatial domain identification of the spatial transcriptome.

[0008] Furthermore, in S1, the data standardization process involves the following operations on the original gene expression matrix: First, the top 3000 highly variable genes are selected from the original gene expression matrix to obtain the selected gene expression matrix. Then, the selected gene expression matrix is ​​normalized, and the values ​​in the matrix are incremented by 1. Logarithmic transformation is then performed, and finally, each gene expression feature is standardized to obtain the final standardized gene expression matrix.

[0009] Furthermore, in S1, the construction of the spatial neighborhood map utilizes spatial location information from spatial transcriptome data and is based on... The nearest neighbor algorithm yields a set of neighbors with a predefined number of neighbors. Undirected neighborhood graph The expression is: ; in, This represents the set of sites, where the number of sites is... , This represents the set of edges connecting points. , is defined as Given an adjacency matrix, if j∈V is a neighbor of i∈V, then a ij The value is 1 if it is not 0 otherwise, where i and j both represent nodes, and a ij This represents an element in the adjacency matrix, reflecting the connection relationship between node i and node j.

[0010] Furthermore, in S1, the data augmentation operation is performed by providing a neighborhood graph. and normalized gene expression matrix The gene expression vectors between loci are randomly shuffled to create an enhanced graph while maintaining the topology of the original graph. in, M represents the gene feature dimension; make If we represent an augmented graph, then This represents the shuffled gene expression matrix.

[0011] Furthermore, in S2 and S3, a graph neural network is used to construct an encoder to extract potential embeddings from spatial transcriptome data. This further refers to the introduction of a graph convolutional autoencoder to more comprehensively integrate gene expression information and spatial location information, and to learn a compact potential representation for spatial transcriptome data. The fusion of graph feature representation E and latent embedding refers to the concatenation operation of the low-dimensional embedding representation Z and the graph feature representation E along the feature dimension to obtain the fused representation. ; Both the encoder and decoder are composed of a single-layer graph convolutional network (GCN). The input includes a normalized gene expression matrix X and an adjacency matrix A generated by spatial coordinates. Within this framework, the encoder maps the input to a low-dimensional embedding representation Z, and the decoder combines the low-dimensional embedding representation Z with the fusion result. The gene expression matrix H was reconstructed. In form, Z and H are expressed as follows:

[0012]

[0013] in, This represents the normalized adjacency matrix. , It is the identity matrix. It is a diagonal matrix with diagonal elements as follows: , Represents a non-linear activation function. and These represent the trainable weight matrices in the encoder and decoder, respectively. To fully utilize the gene expression matrix X, the model is trained by minimizing the gene expression reconstruction loss, which can be represented as follows:

[0014] Among them, L recon Indicates the reconstruction loss. h represents the expression vector of the i-th node in the gene expression matrix X. i This represents the expression vector of the i-th node in the reconstructed gene expression matrix H.

[0015] Furthermore, in S2, the multi-space generator employs a multi-space contrastive learning strategy to ensure that the model captures rich global spatial context information of spatial points. Further, it embeds features from the original graph nodes encoded by a single-layer graph convolutional network (GCN). and enhanced graph node embedding features As input, they are fed into the multi-space generator MSG to obtain multiple graph embeddings, i.e., global embeddings; When the input is the original graph node embedding features When encoded by the space generator MSG, this process is represented as:

[0016] in, The number of spaces that need to be compared. Embed the node of the i-th space. Let l be the node feature dimension, and l represent the l-th space. When the input is an augmented graph node embedding feature When encoded by the space generator MSG, the process is similar to the previous one, and is also represented as:

[0017] in, Embed the node of the i-th space.

[0018] Furthermore, in S3, the contrastive learning loss refers to using intra-space and inter-space contrastive losses to learn diverse and information-rich representations, thereby capturing important global information of the graph; For the intra-spatial contrast loss, the goal is to maximize the mutual information (MI) between the two view representations within each group, making the representation of each individual group more informative. The paired representations are... The spatial contrast loss formula is then:

[0019] in, and , respectively, are the encoder parameters in the original graph and the enhanced graph, where k represents the k-th space; For inter-spatial contrast loss, pairwise relationships between different groups within the same view are constrained to enhance spatial diversity. Furthermore, an inter-spatial contrast loss based on mutual information minimization is used to ensure that any two representations within the same view capture different features of a given graph. Inter-spatial contrast focuses on the view... Each pair of representations between different groups within the same group, i.e. The spatial contrast loss formula is then:

[0020] Combining intra-spatial contrast loss and inter-spatial contrast loss, the final contrast loss function is obtained as follows:

[0021] in, λ represents the contrast loss, and is a parameter that balances the effects of intra-space contrast loss and inter-space contrast loss.

[0022] Furthermore, in S3, the reconstruction loss L obtained in the autoencoder section is incorporated. recon And the contrastive loss obtained in the self-supervised contrastive learning part Calculate the total loss function L total The expression is: ; Where α and β are both weighting parameters; By minimizing the total loss function L total To obtain better gene expression remodeling results H.

[0023] Furthermore, regarding the spatial contrast loss, since when and When the distribution is unknown, mutual information This becomes difficult to handle, so a lower bound estimation of mutual information based on sampling samples is used instead of maximizing mutual information. The Jensen-Shannon mutual information estimation is employed, and the calculation formula is as follows:

[0024] in, It is a discriminator that takes the representations of two views as input and scores the consistency between them. Here, the discriminator is simply instantiated as the dot product between the two representations, i.e. SP(·) is the activation function. For the joint distribution expectation of two views within the same space k, The product of the independent distribution expectations of two views within the same space k; For spatial contrast loss, we similarly introduce an upper bound estimate of mutual information to replace minimizing mutual information, which is to invert the Jensen-Shannon mutual information estimation formula. The final contrastive loss function is determined as follows: ; in, This represents the expectation of the joint distribution expectation of two views within group k. This represents the expectation of the product of the independent distribution expectations of two views within group k. This represents the expectation obtained by taking group l and group k respectively under the joint distribution expectation of the two views in group k and group l.

[0025] Furthermore, in S4, the spatial domain identification of the spatial transcriptome further includes: taking the gene expression matrix H reconstructed from S3 as input, assigning a spatial region pseudo-label to each spatial site using the Mclust clustering algorithm. The pseudo-label is an integer value, ranging from [0, D], where D is the number of pre-specified spatial domain regions; subsequently, calculating relevant evaluation indicators for clustering accuracy with the manually annotated labels. Commonly used evaluation indicators include the Adjusted Landry Index (ARI) and the Normalized Mutual Information (NMI). The ARI ranges from [-1, 1], and the NMI ranges from [0, 1]. The higher the values ​​of both, the better the evaluation indicator; conversely, the lower the values, the worse the evaluation indicator.

[0026] The beneficial effects of this invention are reflected in: This invention designs a clustering method suitable for spatial transcriptome representation extraction, which is of great significance for further improving clustering performance and achieving more accurate spatial domain annotation. In this method, firstly, graph data is established and node features are randomly shuffled during the training phase; secondly, an encoder is constructed based on a graph neural network to extract latent embeddings of spatial transcriptome data that integrate spatial and genetic information, and a multi-spatial generator is used to generate multiple sets of rich graph features; subsequently, a decoder reconstructs the gene expression matrix, using contrastive learning loss and reconstruction loss as objective functions, and an Adam optimizer is used to update the network parameters to complete the identification of spatial domains in the spatial transcriptome. This method demonstrates stronger robustness and adaptability in terms of spatial information extraction and clustering accuracy, fully mining spatial transcriptome data from both global and local perspectives to achieve accurate spatial domain identification. Attached Figure Description

[0027] The accompanying drawings, which are provided to further understand this application and constitute a part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application.

[0028] Figure 1This is a schematic diagram of the overall process of the spatial domain identification method for spatial transcriptome data according to an embodiment of the present invention.

[0029] Figure 2 This is an overall block diagram of the spatial domain identification method for spatial transcriptome data according to an embodiment of the present invention.

[0030] Figure 3 This is an embodiment of the present invention. Figure 2 An enlarged schematic diagram of the data preprocessing section.

[0031] Figure 4 This is an embodiment of the present invention. Figure 2 A magnified schematic diagram of the domain feature extraction part.

[0032] Figure 5 This is an embodiment of the present invention. Figure 2 An enlarged schematic diagram of the downstream task section.

[0033] Figure 6 This is an embodiment of the present invention. Figure 2 A magnified diagram showing the internal details of the MSG.

[0034] Figure 7 This is a schematic diagram of the ARI metric clustering structure for all methods in the embodiment of the present invention in the dorsolateral prefrontal cortex DLPFC dataset.

[0035] Figure 8 This is a schematic diagram of the NMI metric clustering structure for all methods in the embodiment of the present invention in the dorsolateral prefrontal cortex DLPFC dataset.

[0036] Figure 9 This is a schematic diagram of the visualization results on slice 151672 in the embodiment of the present invention in the dorsolateral prefrontal cortex DLPFC dataset.

[0037] Figure 10 This is a visualization result of the UMAP map on slice 151672 in the embodiment of the dorsolateral prefrontal cortex DLPFC dataset of the present invention.

[0038] Figure 11 This is the trajectory inference visualization result of the PAGA map on slice 151672 in the embodiment of the dorsolateral prefrontal cortex DLPFC dataset of the present invention.

[0039] Figure 12 This is a schematic diagram of the ARI index clustering results of six methods in the mouse hypothalamus MERFISH dataset example of the present invention.

[0040] Figure 13 This is a schematic diagram of the NMI index clustering results of six methods in the mouse hypothalamus MERFISH dataset example of the present invention.

[0041] Figure 14 This is a schematic diagram of the visualization results on the m0.04 slice in the mouse hypothalamus MERFISH dataset example of the present invention.

[0042] Figure 15 This is a schematic diagram of the visualization results on the m0.09 slice in the mouse hypothalamus MERFISH dataset example of the present invention.

[0043] Figure 16 This is a schematic diagram of the visualization results on the m0.14 slice in the mouse hypothalamus MERFISH dataset example of the present invention.

[0044] Figure 17 This is a structural block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] It should be noted that the meaning of "and / or" throughout the text includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or a solution that simultaneously satisfies A and B. Furthermore, "multiple" refers to two or more. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0047] See Figure 1 This invention provides a method for spatial domain identification of spatial transcriptome data using multi-spatial self-supervised contrastive learning, comprising the following steps: S1. Take the gene expression and spatial location of the spatial transcriptome data as input, perform data standardization, and then build a model based on the spatial information of the spatial transcriptome data to generate a spatial neighborhood graph. Take the gene expression data after data standardization as node features, and perform data augmentation by shuffling the node features for this spatial neighborhood graph while keeping the graph structure unchanged, to create an augmented graph. S2. An encoder is constructed based on a graph neural network to extract potential embeddings from spatial transcriptome data that integrates spatial and genetic information, and these potential embeddings are fed into a multi-space generator to generate multiple sets of rich graph feature representations. S3. The graph feature representation obtained from S2 is fused with the latent embedding to obtain a refined representation, and the refined representation is reconstructed into a gene expression matrix through a decoder. In this decoding and reconstruction process, the contrastive learning loss and the reconstruction loss are summed as the total objective function. S4. Based on the overall objective function obtained in S3, the Adam optimizer is used to update the network parameters to complete the spatial domain identification of the spatial transcriptome.

[0048] The purpose of this invention is to provide a spatial domain identification method for spatial transcriptome data based on multi-spatial self-supervised contrastive learning. This method primarily addresses the technical problems of latent representations extracted at a single spatial scale failing to fully capture the comprehensive data distribution and the impact of sparse expression profiles in ST (Spatial Transcriptional Analysis) on the quality of expression features. The method aims to improve the accuracy and robustness of spatial domain annotation by designing a novel contrastive framework to explore multi-scale information in spatial transcriptome data.

[0049] In this embodiment, in step S1, the data standardization process involves the following operations on the original gene expression matrix: First, the top 3000 highly variable genes are selected from the original gene expression matrix to obtain the selected gene expression matrix. Then, the selected gene expression matrix is ​​normalized, and the values ​​in the matrix are incremented by 1. Logarithmic transformation is then performed, and finally, each gene expression feature is standardized to obtain the final standardized gene expression matrix.

[0050] In this embodiment, in step S1, the construction of the spatial neighborhood map utilizes spatial location information from spatial transcriptome data and is based on... The nearest neighbor algorithm yields a set of neighbors with a predefined number of neighbors. Undirected neighborhood graph The expression is: ; in, This represents the set of sites, where the number of sites is... , This represents the set of edges connecting points. , is defined as Given an adjacency matrix, if j∈V is a neighbor of i∈V, then a ij The value is 1 if it is not 0 otherwise, where i and j both represent nodes, and a ij This represents an element in the adjacency matrix, reflecting the connection relationship between node i and node j.

[0051] In this embodiment, in step S1, the data augmentation operation is performed by providing a neighborhood graph. and normalized gene expression matrix The gene expression vectors between loci are randomly shuffled to create an enhanced graph while maintaining the topology of the original graph. in, M represents the gene feature dimension; make If we represent an augmented graph, then This represents the shuffled gene expression matrix.

[0052] In this embodiment, in S2 and S3, a graph neural network is used to construct an encoder to extract potential embeddings from spatial transcriptome data. Further, a graph convolutional autoencoder is introduced to more comprehensively fuse gene expression information and spatial location information, and to learn a compact potential representation for spatial transcriptome data. The fusion of graph feature representation E and latent embedding refers to the concatenation operation of the low-dimensional embedding representation Z and the graph feature representation E along the feature dimension to obtain the fused representation. ; Both the encoder and decoder are composed of a single-layer graph convolutional network (GCN). The input includes a normalized gene expression matrix X and an adjacency matrix A generated by spatial coordinates. Within this framework, the encoder maps the input to a low-dimensional embedding representation Z, and the decoder combines the low-dimensional embedding representation Z with the fusion result. The gene expression matrix H was reconstructed. In form, Z and H are expressed as follows:

[0053]

[0054] in, This represents the normalized adjacency matrix. , It is the identity matrix. It is a diagonal matrix with diagonal elements as follows: , This represents a nonlinear activation function, such as ReLU (Modified Linear Unit). and These represent the trainable weight matrices in the encoder and decoder, respectively. To fully utilize the gene expression matrix X, the model is trained by minimizing the gene expression reconstruction loss, which can be represented as follows:

[0055] Among them, L recon Indicates the reconstruction loss. h represents the expression vector of the i-th node in the gene expression matrix X. i This represents the expression vector of the i-th node in the reconstructed gene expression matrix H.

[0056] In this embodiment, in step S2, the multi-space generator employs a multi-space contrastive learning strategy to ensure that the model captures rich global spatial context information of spatial points. Furthermore, it embeds features from the original graph nodes encoded by a single-layer graph convolutional network (GCN). and enhanced graph node embedding features As input, they are fed into the multi-space generator MSG to obtain multiple graph embeddings, i.e., global embeddings; When the input is the original graph node embedding features When encoded by the space generator MSG, this process is represented as:

[0057] in, The number of spaces that need to be compared. Embed the node of the i-th space. Let l be the node feature dimension, and l represent the l-th space. When the input is an augmented graph node embedding feature When encoded by the space generator MSG, the process is similar to the previous one, and is also represented as:

[0058] in, Embed the node of the i-th space.

[0059] Regarding the internal details of MSG, such as Figures 2-6 As shown, it is a global multi-feature generator based on a self-attention mechanism, and in which, Figures 2-5 This is a schematic diagram of the overall framework of the spatial domain identification method for spatial transcriptome data. The feature matrix is ​​mapped to key embedding K and value embedding V through two independent linear projections, and the calculation method is as follows: ; ; in, and These represent different projection matrices related to the key and value, respectively.

[0060] In addition, this invention introduces a set of query vectors. This approach focuses on multiple spaces of global features, where each query vector represents a space and guides specific representation learning. The number of query vectors determines the number of target spaces. Furthermore, the dimension of each query vector needs to be proportional to the matrix... The number of columns in the middle is the same. The matrix consists of trainable parameters, which are randomly initialized at the start of training and participate in the training process together. This is achieved by utilizing the query vector. Key Attention is used to generate new attention weights for node features. A larger attention weight indicates that the corresponding node contains richer information in the space corresponding to the query vector. The attention weight is normalized along the node dimension, as shown in the following expression: ; Finally, the node features are weighted and summed based on these attention weights to obtain the final result. Global embedding of a space: .

[0061] In this embodiment, in S3, the contrastive learning loss refers to using intra-space and inter-space contrastive losses to learn diverse and information-rich representations, thereby capturing important global information of the graph; For the intra-spatial contrast loss, the goal is to maximize the mutual information (MI) between the two view representations within each group, making the representation of each individual group more informative. The paired representations are... The spatial contrast loss formula is then:

[0062] in, and , respectively, are the encoder parameters in the original graph and the enhanced graph, where k represents the k-th space; For inter-spatial contrast loss, pairwise relationships between different groups within the same view are constrained to enhance spatial diversity. Furthermore, an inter-spatial contrast loss based on mutual information minimization is used to ensure that any two representations within the same view capture different features of a given graph. Inter-spatial contrast focuses on the view... Each pair of representations between different groups within the same group, i.e. The spatial contrast loss formula is then:

[0063] Combining intra-spatial contrast loss and inter-spatial contrast loss, the final contrast loss function is obtained as follows:

[0064] in, λ represents the contrast loss, and is a parameter that balances the effects of intra-space contrast loss and inter-space contrast loss.

[0065] In this embodiment, in step S3, the reconstruction loss L obtained in the autoencoder section is combined with... recon And the contrastive loss obtained in the self-supervised contrastive learning part Calculate the total loss function L total The expression is: ; Where α and β are both weighting parameters; By minimizing the total loss function L total To obtain better gene expression remodeling results H.

[0066] Throughout the learning process, reconstruction loss aims to extract useful features from spatial location information and gene expression data, while contrastive learning loss optimizes the latent embedding from a global perspective to obtain a more comprehensive and discriminative representation.

[0067] In this embodiment, for the spatial contrast loss, since when and When the distribution is unknown, mutual information This becomes difficult to handle, so a lower bound estimation of mutual information based on sampling samples is used instead of maximizing mutual information. The Jensen-Shannon mutual information estimation is employed, and the calculation formula is as follows:

[0068] in, It is a discriminator that takes the representations of two views as input and scores the consistency between them. Here, the discriminator is simply instantiated as the dot product between the two representations, i.e. SP(·) is the activation function. For the joint distribution expectation of two views within the same space k, The product of the independent distribution expectations of two views within the same space k; For spatial contrast loss, we similarly introduce an upper bound estimate of mutual information to replace minimizing mutual information, which is to invert the Jensen-Shannon mutual information estimation formula. The final contrastive loss function is determined as follows: ; in, This represents the expectation of the joint distribution expectation of two views within group k. This represents the expectation of the product of the independent distribution expectations of two views within group k. This represents the expectation obtained by taking group l and group k respectively under the joint distribution expectation of the two views in group k and group l.

[0069] In this embodiment, step S4, spatial domain identification of the spatial transcriptome, further includes: taking the gene expression matrix H reconstructed by step S3 as input, assigning a pseudo-label of a spatial region to each spatial site using the Mclust clustering algorithm. The pseudo-label is an integer value, ranging from [0, D], where D is the number of pre-specified spatial domain regions. Subsequently, the clustering accuracy is evaluated using relevant metrics, such as the adjusted Landry index (ARI) and normalized mutual information (NMI). The ARI ranges from [-1, 1], and the NMI ranges from [0, 1]. Higher values ​​indicate better evaluation metrics, while lower values ​​indicate worse evaluation metrics.

[0070] In this embodiment, two ST datasets of different cell types were obtained from different platforms: (1) ST dataset from the 10x Visium platform: human dorsolateral prefrontal cortex cells (DLPFC); (2) ST dataset from Merfish: mouse hypothalamus dataset.

[0071] To further verify the superiority of this method, the present invention provides the following embodiment, which compares it with other algorithms on the dorsolateral prefrontal cortex DLPFC dataset. The specific process is as follows: 1. Comparison of algorithms and metrics Based on relevant research, this embodiment selects the following five comparison algorithms: 1) SCANPY: A high-efficiency single-cell transcriptome data analysis toolkit based on Python, supporting a complete single-cell data analysis workflow from preprocessing, dimensionality reduction, clustering to visualization. (Paper title: "SCANPY: large-scale single-cell gene expression data analysis") 2) SpaceFlow: This paper uses the Deep Graph Infomax (DGI) framework to compare information between the spot representation and the global representation, and introduces an embedding regularization mechanism to guide the model to learn an expression pattern that reflects meaningful spatial structure. (Paper title: "Identifying multicellular spatiotemporal organization of cells with SpaceFlow") 3) STAGATE: Utilizes graph attention networks and combines gene expression and spatial information to learn low-dimensional representations of ST points for spatial domain detection. (Paper title: "Deciphering spatial domains from spatially resolved transcriptomics with an adaptive graph attention auto-encoder") 4) GraphST: In its proposed self-supervised contrastive learning framework, it first uses GCN as the base encoder, and then obtains better feature representations by contrastive learning through information between a single spot and its spatial neighbors. (Paper title: "Spatially informed clustering, integration, and deconvolution of spatial transcriptomics with GraphST") 5) SEDR: This method uses a deep autoencoder network to learn low-dimensional gene expression representations and embeds spatial information into the representation via a variational autoencoder for subsequent spatial domain recognition. (Paper title: "Unsupervised spatiallyembedded deep representation of spatial transcriptomics") To verify the effectiveness of the present invention, NMI, ARI and Purity were used as evaluation indicators, where a higher value indicates better performance.

[0072] 2. Comparison Results The DLPFC dataset consists of 12 slices, and a comprehensive comparison of all 12 slices was performed. Figures 7-9 The results of all methods for measuring ARI and NMI are shown. The results demonstrate that this invention consistently outperforms other metrics across all metrics, exhibiting a particularly significant advantage in ARI. This indicates that simultaneously exploring multi-scale information is effective. Furthermore, Figure 9 The visualization results of the present invention on 151,672 slices are shown, with an ARI value of 0.82 and an NMI value of 0.79. As can be seen from the figure, the clustering depiction of the present invention is good and can accurately identify the spatial domain structure of cells.

[0073] at last, Figure 10 and Figure 11These are the UMAP diagram and PAGA trajectory inference results of this invention, respectively. The UMAP results clearly show the different regions of each layer, indicating that the method of this invention can effectively distinguish the domains of each layer. In addition, the PAGA diagram reveals a linear trajectory from WM to the 3rd layer, further demonstrating that the developmental trajectory inferred by this invention is highly consistent with the spatial topology of the slice.

[0074] To further verify the superiority of this method, the present invention provides the following embodiment, which compares the method with the five comparative algorithms in the above embodiment on the mouse hypothalamus MERFISH dataset. The specific process is as follows: Figure 12 and Figure 13 The results of index clustering for six methods on a mouse hypothalamic dataset are presented. Among these methods, the ARI and NMI values ​​of this invention are significantly higher than those of the other methods, indicating its superior performance in spatial domain segmentation. Figures 14-16 The visualization results of the present invention are further demonstrated, proving its ability to effectively segment and identify complex spatial domains, wherein... Figure 14 On the m0.04 slice, the ARI value is 0.40 and the NMI value is 0.51. Figure 15 On the m0.09 slice, the ARI value is 0.49 and the NMI value is 0.55. Figure 16 On the m0.14 slice, the ARI value is 0.46 and the NMI value is 0.52.

[0075] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the spatial domain identification method for spatial transcriptome data as described above in the multi-spatial self-supervised contrastive learning method.

[0076] See Figure 17 The present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the spatial transcriptome data spatial domain identification method described above for multi-spatial self-supervised contrastive learning.

[0077] This invention also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of the spatial domain identification method for spatial transcriptome data as described above in the multi-spatial self-supervised contrastive learning method.

[0078] It is understood that the systems, devices, and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding parts of the above-described method for spatial domain identification of spatial transcriptome data in multi-spatial self-supervised contrastive learning.

[0079] It should be noted that those skilled in the art will understand that all or part of the steps implemented in the embodiments of the present invention can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented in hardware, it can be implemented entirely or partially by purchasing standard parts or modifications. When implemented in software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks (SSDs)).

[0080] In summary, this invention addresses the limitations of single-scale feature representation and insufficient spatial information extraction by providing a spatial domain identification method for spatial transcriptome data based on multi-spatial self-supervised contrastive learning. Specifically, the method involves: first, establishing graph data and randomly shuffling node features during the training phase; second, constructing an encoder based on a graph neural network to extract latent embeddings of spatial transcriptome data that integrate spatial and genetic information, and generating multiple sets of rich graph features using a multi-spatial generator; subsequently, reconstructing the gene expression matrix using a decoder, employing contrastive learning loss and reconstruction loss as objective functions, and updating network parameters using an Adam optimizer to complete the identification of the spatial domain of the spatial transcriptome. This invention demonstrates stronger robustness and adaptability in spatial information extraction and clustering accuracy, fully mining spatial transcriptome data from both global and local perspectives to achieve accurate spatial domain identification.

[0081] It should be understood that the examples and embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Those skilled in the art can make various modifications or changes based on them. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning, characterized in that, Includes the following steps: S1. Take the gene expression and spatial location of the spatial transcriptome data as input, perform data standardization, and then build a model based on the spatial information of the spatial transcriptome data to generate a spatial neighborhood graph. Take the gene expression data after data standardization as node features, and perform data augmentation by shuffling the node features for this spatial neighborhood graph while keeping the graph structure unchanged, to create an augmented graph. S2. An encoder is constructed based on a graph neural network to extract potential embeddings from spatial transcriptome data that integrates spatial and genetic information, and these potential embeddings are fed into a multi-space generator to generate multiple sets of rich graph feature representations. S3. The graph feature representation obtained from S2 is fused with the latent embedding to obtain a refined representation, and the refined representation is reconstructed into a gene expression matrix through a decoder. In this decoding and reconstruction process, the contrastive learning loss and the reconstruction loss are summed as the total objective function. S4. Based on the overall objective function obtained in S3, the Adam optimizer is used to update the network parameters to complete the spatial domain identification of the spatial transcriptome.

2. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In S1, the data standardization process involves the following operations on the original gene expression matrix: First, the top 3000 highly variable genes are selected from the original gene expression matrix to obtain the selected gene expression matrix. Then, the selected gene expression matrix is ​​normalized, and the values ​​in the matrix are incremented by 1. Logarithmic transformation is then performed, and finally, each gene expression feature is standardized to obtain the final standardized gene expression matrix.

3. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In S1, the construction of the spatial neighborhood map utilizes spatial location information from spatial transcriptome data and is based on... The nearest neighbor algorithm yields a set of neighbors with a predefined number of neighbors. Undirected neighborhood graph The expression is: ; in, This represents the set of sites, where the number of sites is... , This represents the set of edges connecting points. , is defined as Given an adjacency matrix, if j∈V is a neighbor of i∈V, then a ij The value is 1 if it is not 0 otherwise, where i and j both represent nodes, and a ij This represents an element in the adjacency matrix, reflecting the connection relationship between node i and node j.

4. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In S1, the data augmentation operation is performed by providing a neighborhood graph. and normalized gene expression matrix The gene expression vectors between loci are randomly shuffled to create an enhanced graph while maintaining the topology of the original graph. in, M represents the gene feature dimension; make If we represent an augmented graph, then This represents the shuffled gene expression matrix.

5. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In S2 and S3, a graph neural network is used to construct an encoder to extract potential embeddings from spatial transcriptome data. Further, a graph convolutional autoencoder is introduced to more comprehensively integrate gene expression information and spatial location information, and to learn a compact potential representation for spatial transcriptome data. The fusion of graph feature representation E and latent embedding refers to the concatenation operation of the low-dimensional embedding representation Z and the graph feature representation E along the feature dimension to obtain the fused representation. ; Both the encoder and decoder are composed of a single-layer graph convolutional network (GCN). The input includes a normalized gene expression matrix X and an adjacency matrix A generated by spatial coordinates. Within this framework, the encoder maps the input to a low-dimensional embedding representation Z, and the decoder combines the low-dimensional embedding representation Z with the fusion result. The gene expression matrix H was reconstructed. In form, Z and H are expressed as follows: in, This represents the normalized adjacency matrix. , It is the identity matrix. It is a diagonal matrix with diagonal elements as follows: , Represents a non-linear activation function. and These represent the trainable weight matrices in the encoder and decoder, respectively. To fully utilize the gene expression matrix X, the model is trained by minimizing the gene expression reconstruction loss, which can be represented as follows: Among them, L recon Indicates the reconstruction loss. h represents the expression vector of the i-th node in the gene expression matrix X. i This represents the expression vector of the i-th node in the reconstructed gene expression matrix H.

6. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In S2, the multi-space generator employs a multi-space contrastive learning strategy to ensure that the model captures rich global spatial context information of spatial points. Furthermore, it embeds features from the original graph nodes encoded by a single-layer graph convolutional network (GCN). and enhanced graph node embedding features As input, they are fed into the multi-space generator MSG to obtain multiple graph embeddings, i.e., global embeddings; When the input is the original graph node embedding features When encoded by the space generator MSG, this process is represented as: in, The number of spaces that need to be compared. Embed the node of the i-th space. Let l be the node feature dimension, and l represent the l-th space. When the input is an augmented graph node embedding feature When encoded by the space generator MSG, the process is similar to the previous one, and is also represented as: in, Embed the node of the i-th space.

7. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In S3, contrastive learning loss refers to using intra-space and inter-space contrastive losses to learn diverse and information-rich representations, thereby capturing important global information of the graph; For the intra-spatial contrast loss, the goal is to maximize the mutual information (MI) between the two view representations within each group, making the representation of each individual group more informative. The paired representations are... The spatial contrast loss formula is then: in, and , respectively, are the encoder parameters in the original graph and the enhanced graph, where k represents the k-th space; For inter-spatial contrast loss, pairwise relationships between different groups within the same view are constrained to enhance spatial diversity. Furthermore, an inter-spatial contrast loss based on mutual information minimization is used to ensure that any two representations within the same view capture different features of a given graph. Inter-spatial contrast focuses on the view... Each pair of representations between different groups within the same group, i.e. The spatial contrast loss formula is then: Combining intra-spatial contrast loss and inter-spatial contrast loss, the final contrast loss function is obtained as follows: in, λ represents the contrast loss, and is a parameter that balances the effects of intra-space contrast loss and inter-space contrast loss.

8. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In S3, the reconstruction loss L obtained in the autoencoder part is incorporated. recon And the contrastive loss obtained in the self-supervised contrastive learning part Calculate the total loss function L total The expression is: ; Where α and β are both weighting parameters; By minimizing the total loss function L total To obtain better gene expression remodeling results H.

9. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 7, characterized in that, For intra-spatial contrast loss, since when and When the distribution is unknown, mutual information This becomes difficult to handle, so a lower bound estimation of mutual information based on sampling samples is used instead of maximizing mutual information. The Jensen-Shannon mutual information estimation is employed, and the calculation formula is as follows: ; in, It is a discriminator that takes the representations of two views as input and scores the consistency between them. Here, the discriminator is simply instantiated as the dot product between the two representations, i.e. SP(·) is the activation function. For the joint distribution expectation of two views within the same space k, The product of the independent distribution expectations of two views within the same space k; For spatial contrast loss, we similarly introduce an upper bound estimate of mutual information to replace minimizing mutual information, which is to invert the Jensen-Shannon mutual information estimation formula. The final contrastive loss function is determined as follows: ; in, This represents the expectation of the joint distribution expectation of two views within group k. This represents the expectation of the product of the independent distribution expectations of two views within group k. This represents the expectation obtained by taking group l and group k respectively under the joint distribution expectation of the two views in group k and group l.

10. The spatial domain identification method for spatial transcriptome data using multi-spatial self-supervised contrastive learning as described in claim 1, characterized in that, In step S4, spatial domain identification of the spatial transcriptome further includes: taking the gene expression matrix H reconstructed in step S3 as input, assigning a pseudo-label of a spatial region to each spatial site using the Mclust clustering algorithm. The pseudo-label is an integer value with a range of [0, D], where D is the number of pre-specified spatial domain regions. Subsequently, the clustering accuracy is evaluated using relevant metrics, such as the adjusted Landry index (ARI) and the normalized mutual information (NMI). The ARI ranges from [-1, 1], and the NMI ranges from [0, 1]. Higher values ​​indicate better evaluation metrics, while lower values ​​indicate worse evaluation metrics.

Citation Information

Patent Citations

  • Spatial transcriptome spatial domain identification method and system based on neighbor contrast learning

    CN117976057A

  • Method for carrying out spatial domain division on spatial transcriptomics data

    CN118588159A

  • Space transcription data clustering method based on dual multi-scale graph learning

    CN120126580A

  • Spatial domain identification method based on multi-view weighted fusion GCN network

    CN120148635A

  • Transcriptomics spatial domain identification method

    CN120600121A

Cited By

  • In-vitro tissue space transcriptome data analysis method based on graph neural network

    CN121838890A