Method and device for identifying spatial organization structure of spatial transcriptome data

By constructing sample graphs and using graph sampling aggregation network model for feature aggregation, the problem of low recognition accuracy caused by the inability to fully utilize spatial transcriptome data in the prior art is solved, and a higher recognition accuracy of spatial organization structure is achieved.

CN119673270AActive Publication Date: 2025-03-21HAINAN UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411740995.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In the prior art, when using spatial transcriptome data to identify the spatial tissue structure of tissue samples, spatial location data and gene expression data cannot be fully utilized, resulting in a low recognition accuracy.

Method used

By constructing a sample map that describes the similarity relationship of gene expression data of neighboring nodes and inputting it into the graph sampling and aggregation network model, node characteristics are aggregated, and the similarity information of gene expression data between neighboring nodes at spatial locations is fully utilized.

Benefits of technology

The accuracy of identification of spatial tissue structure of tissue samples is improved, and the problem of low recognition accuracy caused by the inability to fully utilize spatial transcriptome data in the prior art is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119673270A_ABST
    Figure CN119673270A_ABST
Patent Text Reader

Abstract

The invention discloses an identification method and device for a spatial organization structure of spatial transcriptome data. According to the scheme, a gene expression matrix and an adjacent matrix corresponding to space transcriptome data of a to-be-recognized sample tissue are obtained; constructing a sample graph based on the gene expression matrix and the adjacent matrix; inputting the sample graph into a graph sampling aggregation network model, and performing feature aggregation on the gene feature data of the neighbor node in the neighborhood of each node in the sample graph and the gene feature data of the node through the graph sampling aggregation network model to obtain the feature representation of the sample graph; and obtaining an identification result of a space tissue structure corresponding to the sample tissue according to the feature representation. According to the technical scheme, the similarity information of the gene expression data between the two adjacent nodes in the spatial position can be fully utilized in the feature aggregation process of the nodes, so that the accuracy of spatial tissue structure recognition of the tissue sample is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and device for identifying the spatial organization structure of spatial transcriptome data. Background Art

[0002] Spatial transcriptomics technology is an innovative molecular biology and genomics method that can simultaneously measure the gene expression data of cells in tissue samples and the precise spatial position of cells in the tissue (i.e., spatial location information). It provides important data references for studying the spatial organizational structure of cancer tumors, revealing the occurrence and development mechanism of cancer, and formulating effective treatment plans for cancer patients.

[0003] Existing technologies usually combine spatial location data and gene expression data, and use graph neural networks to learn the joint representation of different spatial location data and gene expression data to identify the spatial structure of tissue samples. However, the above methods often fail to fully utilize spatial location data and gene expression data, resulting in low accuracy in identifying the spatial structure of tissue samples. Summary of the invention

[0004] Based on the above problems, the present application provides a method and device for identifying the spatial organizational structure of spatial transcriptome data, with the aim of making full use of the similarity information of gene expression data between adjacent nodes in spatial position during the feature aggregation process of nodes, so as to improve the accuracy of identifying the spatial organizational structure of tissue samples.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] In a first aspect of the present application, a method for identifying the spatial organization structure of spatial transcriptome data is provided, the method comprising: obtaining a gene expression matrix and an adjacency matrix corresponding to the spatial transcriptome data of a sample tissue to be identified, wherein the gene expression matrix is ​​a matrix determined by the gene expression data in the spatial transcriptome data, and the adjacency matrix is ​​a matrix determined by the spatial position information corresponding to the gene expression data;

[0007] A sample graph is constructed based on the gene expression matrix and the adjacency matrix, wherein the sample graph is an undirected graph describing the similarity relationship of gene expression data between adjacent nodes;

[0008] The sample graph is input into the graph sampling aggregation network model, and the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph are aggregated with the gene feature data of the node through the graph sampling aggregation network model to obtain a feature representation of the sample graph, wherein the neighboring nodes in the neighborhood of each node include nodes that are directly or indirectly adjacent to the node;

[0009] The recognition result of the spatial organizational structure corresponding to the sample tissue is obtained based on the feature representation.

[0010] In an optional implementation, obtaining a recognition result of a spatial organizational structure corresponding to the sample organization based on the feature representation includes:

[0011] The feature representation is input into an adaptive graph contrastive learning model, an attention weight corresponding to each node in the feature representation is determined by the adaptive graph contrastive learning model, and feature aggregation is performed on the feature representation based on the attention weight corresponding to each node to obtain an enhanced feature representation;

[0012] Cluster analysis is performed on the enhanced feature representation to obtain the recognition result of the spatial organizational structure corresponding to the sample tissue.

[0013] In an optional implementation, the gene feature data of neighboring nodes in the neighborhood of each node in the sample graph are aggregated with the gene feature data of the node through a graph sampling aggregation network model to obtain a feature representation of the sample graph, including:

[0014] Perform a feature extraction operation, starting from the i-th node in the sample graph, and extracting gene feature data of M first-order neighbor nodes and L second-order neighbor nodes in the neighborhood of the i-th node in an iterative manner, wherein the first-order neighbor node is adjacent to the i-th node, and the second-order neighbor node is adjacent to the first-order neighbor node corresponding to the i-th node, and M and L are both positive integers;

[0015] Performing a feature aggregation operation to perform feature aggregation on the gene feature data of the M first-order neighbor nodes to obtain a first aggregate feature; and performing feature aggregation on the gene feature data of the L second-order neighbor nodes to obtain a second aggregate feature;

[0016] Perform a feature concatenation operation to concatenate the first aggregate feature, the second aggregate feature, and the gene feature data of the i-th node to obtain an embedded feature of the i-th node;

[0017] The feature extraction operation, the feature aggregation operation, and the feature concatenation operation are performed multiple times until the embedded features corresponding to the N nodes in the sample graph are obtained, and the feature representation is constructed based on the embedded features corresponding to the N nodes, where N is a positive integer.

[0018] In an optional implementation, the sample graph includes a positive sample graph and a negative sample graph, wherein the negative sample graph is a sample graph obtained after data enhancement processing is performed on the positive sample graph, the data enhancement processing is used to enhance the distinction between the positive sample graph and the negative sample graph, and the data enhancement processing includes random masking and random shuffling; constructing the sample graph based on the gene expression matrix and the adjacency matrix includes:

[0019] Construct a positive sample graph based on the gene expression matrix and adjacency matrix;

[0020] The gene expression matrix corresponding to the positive sample graph is randomly masked with a preset probability to obtain a masked positive sample graph;

[0021] The nodes in the masked positive sample graph are randomly shuffled to obtain the negative sample graph.

[0022] In an optional implementation, before inputting the sample graph into the graph sampling aggregation network model, the method for identifying the spatial organization structure of the spatial transcriptome data further includes:

[0023] Inputting the positive sample image and the negative sample image into the initial image sampling aggregation network model respectively, obtaining a first feature representation of the positive sample image and a second feature representation of the negative sample image output by the initial image sampling aggregation network model;

[0024] Inputting the first feature representation into the initial adaptive graph contrastive learning model, and the initial adaptive graph contrastive learning model performs feature aggregation on the first feature representation based on the initial attention weight corresponding to each node in the first feature representation to obtain a first global feature representation; and inputting the second feature representation into the initial adaptive graph contrastive learning model, and the initial adaptive graph contrastive learning model performs feature aggregation on the second feature representation based on the initial attention weight corresponding to each node in the second feature representation to obtain a second global feature representation;

[0025] Based on the first feature representation, the second feature representation, the first global feature representation and the second global feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are jointly trained. When the training cutoff condition is met, the model training is stopped to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model.

[0026] In an optional implementation, performing feature aggregation on the first feature representation based on the initial attention weight corresponding to each node in the first feature representation to obtain a first global feature representation includes:

[0027] Determining an initial attention weight corresponding to each node in the first feature representation through an attention pooling layer in an initial adaptive graph contrastive learning model;

[0028] The attention pooling layer performs weighted aggregation of the embedded features corresponding to N nodes based on the initial attention weight corresponding to each node to obtain the aggregated feature representation;

[0029] The first global feature representation is determined through the attention pooling layer based on the summarized feature representations.

[0030] In an optional implementation, based on the first feature representation, the second feature representation, the first global feature representation, and the second global feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are jointly trained, and the model training is stopped when the training cutoff condition is met, and the graph sampling aggregation network model and the adaptive graph contrastive learning model are obtained, including:

[0031] A positive data pair is formed based on the embedded feature corresponding to each node in the positive sample graph and the first global feature representation, thereby obtaining a total of N first positive data pairs;

[0032] Based on the embedded features corresponding to each node in the positive sample graph and the second global feature representation, a negative data pair is formed to obtain a total of N first negative data pairs;

[0033] Based on the embedded features and the second global feature representation corresponding to each node in the negative sample graph, a positive data pair is formed to obtain a total of N second positive data pairs;

[0034] Based on the embedded features corresponding to each node in the negative sample graph and the first global feature representation, a negative data pair is formed to obtain a total of N second negative data pairs;

[0035] Based on N first positive data pairs, N first negative data pairs, N second positive data pairs, N second negative data pairs, first feature representations and second feature representations, the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are jointly trained. When the training cutoff condition is met, the model training is stopped to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model.

[0036] In an optional implementation, based on N first positive data pairs, N first negative data pairs, N second positive data pairs, N second negative data pairs, first feature representations and second feature representations, the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are jointly trained, and the model training is stopped when the training cutoff condition is met, to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model, including:

[0037] Inputting N first positive data pairs into the discriminator in the initial adaptive graph contrastive learning model, obtaining a first probability corresponding to each node in the positive sample graph, wherein the first probability corresponding to each node is used to represent the similarity between the embedded feature corresponding to the node and the first global feature representation;

[0038] Inputting N first negative data pairs into the discriminator in the initial adaptive graph contrastive learning model, obtaining a second probability corresponding to each node in the positive sample graph, wherein the second probability corresponding to each node is used to represent the similarity between the embedded feature corresponding to the node and the second global feature representation;

[0039] Inputting N second positive data pairs into the discriminator, obtaining a third probability corresponding to each node in the negative sample graph, wherein the third probability corresponding to each node is used to represent the similarity between the embedded feature corresponding to the node and the second global feature representation;

[0040] Inputting N second negative data pairs into the discriminator, obtaining a fourth probability corresponding to each node in the negative sample graph, wherein the fourth probability corresponding to each node is used to characterize the similarity between the embedded feature corresponding to the node and the first global feature representation;

[0041] Based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability, the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are jointly trained. When the training cutoff condition is met, the model training is stopped to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model.

[0042] In an optional implementation, the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model are jointly trained based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability, and the model training is stopped when the training cutoff condition is met, and the graph sampling aggregation network model and the adaptive graph contrast learning model are obtained, including:

[0043] Determine a total loss value based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability, and the fourth probability, wherein the total loss value includes a loss value of the initial graph sampling aggregation network model and a loss value of the initial adaptive graph contrastive learning model;

[0044] The parameters of the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are iteratively updated based on the total loss value until the parameters meet the training cutoff condition, and the model training is stopped to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model.

[0045] In a second aspect of the present application, a device for identifying the spatial organization structure of spatial transcriptome data is provided, the device comprising:

[0046] A data acquisition module, used to acquire a gene expression matrix and an adjacency matrix corresponding to the spatial transcriptome data of the sample tissue to be identified, wherein the gene expression matrix is ​​a matrix determined by the gene expression data in the spatial transcriptome data, and the adjacency matrix is ​​a matrix determined by the spatial position information corresponding to the gene expression data;

[0047] A sample graph construction module is used to construct a sample graph based on a gene expression matrix and an adjacency matrix, wherein the sample graph is an undirected graph describing the similarity relationship of gene expression data between adjacent nodes;

[0048] A feature aggregation module is used to input the sample graph into the graph sampling aggregation network model, and perform feature aggregation on the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph and the gene feature data of the node through the graph sampling aggregation network model to obtain a feature representation of the sample graph, wherein the neighboring nodes in the neighborhood of each node include nodes that are directly or indirectly adjacent to the node;

[0049] The recognition result acquisition module is used to obtain the recognition result of the spatial organizational structure corresponding to the sample organization based on the feature representation.

[0050] In a third aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for identifying the spatial organization structure of spatial transcriptome data is implemented.

[0051] In a fourth aspect of the present application, a processor is provided for running a computer program, and when the computer program is running, the above-mentioned method for identifying the spatial organization structure of spatial transcriptome data is executed.

[0052] Compared with the prior art, this application has the following beneficial effects:

[0053] In the technical solution of the present application, the gene expression matrix and adjacency matrix corresponding to the spatial transcriptome data of the sample tissue to be identified are first obtained; secondly, a sample graph is constructed based on the gene expression matrix and the adjacency matrix; then the sample graph is input into the graph sampling aggregation network model, and the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph are feature aggregated with the gene feature data of the node through the graph sampling aggregation network model to obtain the feature representation of the sample graph; finally, the recognition result of the spatial organizational structure corresponding to the sample tissue is obtained based on the feature representation. Among them, the gene expression matrix is ​​a matrix determined by the gene expression data in the spatial transcriptome data, and the adjacency matrix is ​​a matrix determined by the spatial position information corresponding to the gene expression data; the sample graph is an undirected graph that describes the similarity relationship of the gene expression data between adjacent nodes; the neighbor nodes in the neighborhood of each node include nodes that are directly or indirectly adjacent to the node.

[0054] In the technical solution of the present application, a sample graph used to describe the similarity relationship of gene expression data between adjacent nodes is input into a pre-trained graph sampling aggregation network model, and the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph are feature aggregated with the gene feature data of the node through the graph sampling aggregation network model. Since the neighboring nodes in the neighborhood of each node in the sample graph include nodes that are directly or indirectly adjacent to the node, the similarity information of the gene expression data between adjacent nodes in spatial position can be fully utilized in the feature aggregation process of the node to obtain a feature representation that can accurately reflect the similarity of the gene expression data between adjacent nodes in the sample graph; therefore, a more accurate spatial organizational structure can be determined based on the feature representation, thereby improving the accuracy of spatial organizational structure recognition of tissue samples, thereby solving the technical problem that the prior art cannot fully utilize spatial transcriptome data (i.e., spatial position data and gene expression data), resulting in low accuracy in spatial organizational structure recognition of tissue samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0056] Figure 1 A flowchart of a method for identifying the spatial organization structure of spatial transcriptome data provided in an embodiment of the present application;

[0057] Figure 2 A flowchart of a process for obtaining a gene expression matrix and an adjacency matrix corresponding to spatial transcriptome data provided in an embodiment of the present application;

[0058] Figure 3 A flowchart of a process for obtaining a feature representation of a sample graph through a graph sampling aggregation network model provided in an embodiment of the present application;

[0059] Figure 4 A flowchart of a process for obtaining a recognition result of a spatial organizational structure provided in an embodiment of the present application;

[0060] Figure 5 A flowchart of a process for constructing a positive sample image and a negative sample image provided in an embodiment of the present application;

[0061] Figure 6 A flowchart of a model joint training process provided in an embodiment of the present application;

[0062] Figure 7 A flowchart of another model joint training process provided in an embodiment of the present application;

[0063] Fig. 8A A schematic diagram of a positive and negative data pair provided in an embodiment of the present application;

[0064] Figure 8B A schematic diagram of a discriminator provided in an embodiment of the present application;

[0065] Fig. 9 A flowchart of another model joint training process provided in an embodiment of the present application;

[0066] Fig.10 A flowchart of another method for identifying the spatial organization structure of spatial transcriptome data provided in an embodiment of the present application;

[0067] Fig.11 A schematic diagram of a spatial organization structure identified by various spatial organization structure identification technologies provided in an embodiment of the present application;

[0068] Fig.12 A schematic diagram of an adjusted Rand index of a spatial organization structure identified by various spatial organization structure identification technologies provided in an embodiment of the present application;

[0069] Fig.13 A schematic diagram of a device for identifying the spatial organization structure of spatial transcriptome data provided in an embodiment of the present application. DETAILED DESCRIPTION

[0070] As described above, current spatial tissue structure recognition technologies usually combine spatial location data and gene expression data, using graph neural networks to learn the joint representation of different spatial location data and gene expression data to recognize the spatial tissue structure of biological tissue samples. However, the above methods often fail to fully utilize spatial location data and gene expression data, resulting in low accuracy in spatial tissue structure recognition of tissue samples.

[0071] After research, the inventors input a sample graph used to describe the similarity relationship of gene expression data between adjacent nodes into a pre-trained graph sampling aggregation network model, and then perform feature aggregation on the gene feature data of neighbor nodes in the neighborhood of each node in the sample graph with the gene feature data of the node through the graph sampling aggregation network model. Since the neighbor nodes in the neighborhood of each node in the sample graph include nodes that are directly or indirectly adjacent to the node, the similarity information of gene expression data between adjacent nodes in spatial position can be fully utilized in the feature aggregation process of the node to obtain a feature representation that can accurately reflect the similarity of gene expression data between adjacent nodes in the sample graph; therefore, a more accurate spatial organizational structure can be determined based on the feature representation, thereby improving the accuracy of spatial organizational structure recognition of tissue samples, thereby solving the technical problem that the prior art cannot fully utilize spatial transcriptome data, resulting in low accuracy in spatial organizational structure recognition of tissue samples.

[0072] Definitions of Key Terms:

[0073] Spatial transcriptome data: refers to a data set obtained through spatial transcriptomics technology that contains information on gene expression levels at different locations in biological tissue samples. This technology can measure mRNA molecules at specific spatial locations, thereby reflecting the distribution of cells in the tissue.

[0074] STAGATE: is an algorithm that uses an autoencoder architecture based on Graph Attention Networks (GATs) to reconstruct gene expression data and optimizes the model by minimizing the reconstruction error loss.

[0075] SpaGCN: is an algorithm for integrating gene expression, spatial location, and histological information to identify spatial domains and spatially variable genes (SVGs) in spatial transcriptomic data.

[0076] CCST: is an unsupervised cell clustering method based on GCNs (Graph Convolutional Networks), which is used to improve de novo cell clustering and cell subtype discovery based on manually organized cell class annotations.

[0077] GraphST: is a graph self-supervised contrastive learning method that uses spatial information and gene expression profiles for spatial information clustering, integration, and cell type deconvolution.

[0078] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0079] Method Embodiment

[0080] The present application provides an embodiment of a method for identifying the spatial organization structure of spatial transcriptome data. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. In addition, although the logical order is shown in the flowchart, it is only an example order provided. In some cases, the steps shown or described can be performed in a different order than here.

[0081] See also Figure 1 , which is a flow chart of a method for identifying the spatial organization structure of spatial transcriptome data provided by an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0082] Step S101, obtaining a gene expression matrix and an adjacency matrix corresponding to the spatial transcriptome data of a sample tissue to be identified.

[0083] In an optional embodiment, a recognition system for the spatial organization structure of spatial transcriptome data can be used as the execution subject of the recognition method for the spatial organization structure of spatial transcriptome data in the embodiment of the present application. For the convenience of description, the recognition system for the spatial organization structure of spatial transcriptome data is referred to as the recognition system below.

[0084] Among them, the above-mentioned recognition system includes a data preprocessing module, a data enhancement module, an ST-GraphSAGE (full name Spatial Transcriptomics-Graph Sample and Aggregate, idle-graph sampling aggregation network) network model (referred to as the graph sampling aggregation network model in this application) and an adaptive graph contrast learning model.

[0085] In this embodiment, a sample tissue of a cancer patient is taken as an example, and the sample tissue of the cancer patient is used as the sample tissue to be identified.

[0086] In step S101, the gene expression matrix is ​​a matrix determined by the gene expression data in the spatial transcriptome data, and the adjacency matrix is ​​a matrix determined by the spatial position information corresponding to the gene expression data. The data preprocessing module of the system can obtain the gene expression matrix through the following steps:

[0087] S1, spatial transcriptome data were extracted by scanpy.pp.highly_variable_genes() method (i.e. Figure 2 The gene expression data in the spatial transcriptome (i.e. Figure 2 The top 2500 highly variable genes in the gene expression shown in . Among them, scanpy.pp.highly_variable_genes() is a function in the Scanpy library that is used to identify highly variable genes.

[0088] S2, the total count of cells is normalized to 10000 by the scanpy.pp.normalize_total() method. Among them, scanpy.pp.normalize_total() is a function in the Scanpy library, which is used to normalize single-cell RNA sequencing data.

[0089] S3, the scanpy.pp.log1p() method was used to perform Log transformation on the normalized data to obtain the gene expression matrix (i.e. Figure 2 where scanpy.pp.log1p() is a function in the Scanpy library that applies a natural logarithmic transformation operation to the data.

[0090] In this embodiment, if Figure 2 As shown, the data preprocessing module of the recognition system can use the K nearest neighbor algorithm to calculate the Euclidean distance between all points in the spatial position information corresponding to the gene expression data, and select three nearest neighbors to output the adjacency matrix Among them, N s is the total number of nodes.

[0091] Step S102: construct a sample graph based on the gene expression matrix and the adjacency matrix.

[0092] In step S102, the sample graph is an undirected graph describing the similarity relationship of gene expression data between adjacent nodes, wherein the node attribute of the undirected graph is gene expression, and the edges between the nodes describe the similarity relationship of gene expression data between adjacent nodes.

[0093] Step S103, input the sample graph into the graph sampling aggregation network model, and perform feature aggregation on the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph and the gene feature data of the node through the graph sampling aggregation network model to obtain the feature representation of the sample graph.

[0094] In step S103 , the neighbor nodes in the neighborhood of each node include nodes that are directly or indirectly adjacent to the node.

[0095] In order to improve the accuracy of spatial organizational structure recognition of tissue samples and solve the problem in the prior art that the spatial organizational structure recognition of tissue samples is low in accuracy due to the inability to fully utilize spatial position data and gene expression data, the recognition system of the present application can input a sample graph used to describe the similarity relationship of gene expression data between adjacent nodes into a pre-trained graph sampling aggregation network model, and perform feature aggregation on the gene feature data of neighboring nodes in the neighborhood of each node in the sample graph with the gene feature data of the node through the graph sampling aggregation network model. Since the neighboring nodes in the neighborhood of each node in the sample graph include nodes that are directly or indirectly adjacent to the node, the recognition system can fully utilize the similarity information of gene expression data between adjacent nodes in spatial position during the feature aggregation process of the nodes, thereby obtaining a feature representation that accurately reflects the similarity of gene expression data between adjacent nodes in the sample graph.

[0096] See also Figure 3 , which is a flowchart of a process of obtaining a feature representation of a sample graph through a graph sampling aggregation network model provided by an embodiment of the present application, such as Figure 3 As shown, the process includes the following steps:

[0097] Step S201, performing a feature extraction operation, starting from the i-th node in the sample graph, and extracting the gene feature data of M first-order neighbor nodes and L second-order neighbor nodes in the neighborhood of the i-th node in an iterative manner, wherein M and L are both positive integers.

[0098] In this embodiment, the neighborhood includes a plurality of first-order neighbor nodes, a plurality of second-order neighbor nodes, a plurality of third-order neighbor nodes, a plurality of fourth-order neighbor nodes, ..., a plurality of K-order neighbor nodes corresponding to the i-th node, wherein the first-order neighbor node is adjacent to the i-th node, the second-order neighbor node is adjacent to the first-order neighbor node corresponding to the i-th node, the third-order neighbor node is adjacent to the second-order neighbor node corresponding to the i-th node, the fourth-order neighbor node is adjacent to the third-order neighbor node corresponding to the i-th node, ..., and so on. The above only takes the first-order neighbor nodes and the second-order neighbor nodes corresponding to the i-th node as examples. In this embodiment, the recognition system can also extract the gene feature data of a plurality of third-order neighbor nodes, a plurality of fourth-order neighbor nodes, ..., and a plurality of K-order neighbor nodes in sequence by performing feature extraction operations.

[0099] In other words, the recognition system of the present application can adopt an iterative hierarchical neighbor sampling method through a graph sampling aggregation network model. Starting from the i-th node, the first-order neighbor node of the i-th node is randomly selected, and its genetic feature data is extracted; then, taking the selected first-order neighbor node as the starting point, the first-order neighbor node of the node (that is, the second-order neighbor node corresponding to the i-th node) is randomly selected, and its genetic feature data is extracted... and so on, iterating in sequence.

[0100] Step S202 , performing a feature aggregation operation to perform feature aggregation on the gene feature data of M first-order neighbor nodes to obtain a first aggregate feature; and perform feature aggregation on the gene feature data of L second-order neighbor nodes to obtain a second aggregate feature.

[0101] In step S202, the system may perform feature aggregation on the gene feature data of the neighboring nodes in the field corresponding to the i-th node through formula (1).

[0102]

[0103] Where MeanAGG represents mean aggregation; k represents k-order neighbor sampling, k = 1, 2, 3, ...; N i is the neighborhood of the ith node, Represents the neighborhood N of the i-th node i The aggregate features of the k-order neighbor nodes in, for example, k = 1, represents the first aggregate feature of the first-order neighbor node of the i-th node; k = 2, represents the second aggregate feature of the second-order neighbor node of the i-th node; j represents the neighbor node, j∈N i .

[0104] Step S203, performing a feature concatenation operation to concatenate the first aggregate feature, the second aggregate feature, and the gene feature data of the i-th node to obtain an embedded feature of the i-th node.

[0105] In step S203, the system may perform feature concatenation on the aggregated features of the neighboring nodes in the domain corresponding to the i-th node using formula (2).

[0106]

[0107] in, represents the k-time aggregated embedding feature of the i-th node; σ represents the nonlinear activation function ReLU; represents the k-1 aggregated embedding features of the i-th node; W k is a learnable weight matrix.

[0108] Step S204, performing feature extraction operations, feature aggregation operations, and feature concatenation operations multiple times until embedded features corresponding to N nodes in the sample graph are obtained, and constructing feature representations based on the embedded features corresponding to the N nodes, where N is a positive integer.

[0109] In step S204, after the ST-GraphSAGE network model (i.e., graph sampling aggregation network model), the embedding features corresponding to the N nodes are Characterization of the components s :

[0110]

[0111] Among them, E ST-GraphSAGE (·) can represent the ST-GraphSAGE network model, N s Indicates the total number of nodes.

[0112] It should be noted that the graph sampling aggregation network model in the present application can adopt an iterative hierarchical neighbor sampling method to extract the gene feature data of the directly adjacent or indirectly adjacent neighbor nodes corresponding to each node in the sample graph, and perform feature aggregation on the extracted gene feature data of the above-mentioned neighbor nodes and the gene feature data of the node, so that in the feature aggregation process of the nodes, the similarity information of the gene expression data between adjacent nodes in spatial position can be fully utilized to obtain a feature representation that can accurately reflect the similarity of the gene expression data between adjacent nodes in the sample graph.

[0113] Step S104: obtaining a recognition result of the spatial organizational structure corresponding to the sample tissue according to the feature representation.

[0114] In step S104, the recognition system can obtain a more accurate spatial organization structure based on the feature representation that can accurately reflect the similarity of gene expression data between adjacent nodes in the sample graph. For example, the recognition system can input the feature representation into a pre-trained adaptive graph contrastive learning model to obtain an enhanced feature representation output by the adaptive graph contrastive learning model; then the recognition system can perform cluster analysis on the enhanced feature representation to obtain a recognition result of the spatial organization structure corresponding to the sample organization.

[0115] Based on the scheme introduced in the above steps S101 to S104, it can be known that in the present application, a sample graph for describing the similarity relationship of gene expression data between adjacent nodes is constructed through the gene expression matrix and the adjacency matrix corresponding to the spatial transcriptome data of the sample tissue, and the sample graph is input into a pre-trained graph sampling aggregation network model, and the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph are feature aggregated with the gene feature data of the node through the graph sampling aggregation network model. Since the neighboring nodes in the neighborhood of each node in the sample graph include nodes that are directly or indirectly adjacent to the node, the similarity information of the gene expression data between adjacent nodes in spatial position can be fully utilized in the feature aggregation process of the node, and a feature representation that can accurately reflect the similarity of the gene expression data between adjacent nodes in the sample graph is obtained. Therefore, based on the feature representation, a more accurate spatial organizational structure can be determined, thereby improving the accuracy of spatial organizational structure recognition of tissue samples, thereby solving the technical problem that the prior art cannot fully utilize spatial transcriptome data, resulting in low accuracy in spatial organizational structure recognition of tissue samples.

[0116] When identifying the spatial organization structure of tissue samples, the prior art often obtains the spatial organization structure of tissue samples by learning the joint representation of the spatial location data and gene expression data of existing tissue samples. However, the spatial location data and gene expression data of different tissue samples may be quite different, and the joint representation learned above is a unified feature learned from the spatial location data and gene expression data of existing tissue samples. The aggregation weight in the feature aggregation process corresponds to the joint representation, that is, the prior art cannot adaptively adjust the aggregation weight for the feature representation of different tissue samples, resulting in the inability of the prior art to accurately identify the spatial organization structure of tissue samples when facing new and unknown tissue samples.

[0117] In order to solve the above problems and improve the accuracy of spatial organizational structure recognition of new tissue samples, the recognition system in this application obtains the recognition result of the spatial organizational structure corresponding to the sample tissue through the following process:

[0118] Step 1: input the feature representation into an adaptive graph contrastive learning model, determine the attention weight corresponding to each node in the feature representation through the adaptive graph contrastive learning model, and perform feature aggregation on the feature representation based on the attention weight corresponding to each node to obtain an enhanced feature representation;

[0119] Step 2: Perform cluster analysis on the enhanced feature representation to obtain the recognition result of the spatial organizational structure corresponding to the sample organization.

[0120] Through the above steps, the recognition system of the present application can be used to sample the graph aggregation network model (i.e. Figure 4 The feature representation of the output of the ST-GraphSAGE network shown in Figure 1 is the input graph contrastive learning (i.e. Figure 4 In the adaptive graph contrastive learning (AGL) model, an attention pooling operation is performed on the feature representation to determine the attention weight corresponding to each node in the feature representation, and the feature representation is feature aggregated based on the attention weight corresponding to each node. Since in the feature aggregation process, the attention weight corresponding to each node (i.e., the aggregation weight) is the weight corresponding to the feature representation of the sample tissue to be identified, rather than the aggregation weight corresponding to the joint representation of multiple sample tissues, that is, the recognition system of the present application can adaptively adjust the aggregation weight according to the feature data of different tissue samples, so that when facing new and unknown tissue samples, the recognition system can more accurately capture the key information in the feature representation according to its corresponding aggregation weight, and obtain an enhanced feature representation that can better reflect the similarity of gene expression data between adjacent nodes in the sample graph; then the recognition system performs cluster analysis on the enhanced feature representation based on a preset clustering algorithm to obtain a more accurate recognition result of the spatial organizational structure corresponding to the sample tissue.

[0121] In this embodiment, the preset clustering algorithm may adopt any one or more of the mclust clustering algorithm, the K-Means clustering algorithm, and the Louvain clustering algorithm. The clustering algorithm used may be selected for clustering analysis according to actual needs.

[0122] Optionally, in the identification method for the spatial organization structure of spatial transcriptome data provided in an embodiment of the present application, the sample graph includes a positive sample graph and a negative sample graph, wherein the negative sample graph is a sample graph obtained after data enhancement processing is performed on the positive sample graph, and the data enhancement processing is used to enhance the distinction between the positive sample graph and the negative sample graph, and the data enhancement processing includes random masking and random shuffling; constructing the sample graph based on the gene expression matrix and the adjacency matrix, including: constructing a positive sample graph based on the gene expression matrix and the adjacency matrix through a recognition system; randomly masking the gene expression matrix corresponding to the positive sample graph with a preset probability through the recognition system to obtain a masked positive sample graph; randomly shuffling the nodes in the masked positive sample graph through the recognition system to obtain a negative sample graph.

[0123] In order to increase the distinction between positive sample images and negative sample images, thereby providing accurate sample data for subsequent model joint training and spatial organizational structure recognition, the recognition system in this application can be based on the gene expression matrix (i.e. Figure 5 Gene expression in ) and adjacency matrix construction Figure 5 The positive sample graph G shown in s , G s =(V,E), where V is the vertex set and E is the edge set; then, the recognition system keeps the adjacency matrix in the positive sample graph unchanged and randomly masks the gene expression matrix with a preset probability to obtain the masked positive sample graph G′ s , for example, randomly masking with a probability of 60%; finally, the recognition system uses the masked positive sample graph G′ s The nodes in are randomly shuffled to obtain Figure 5 The negative sample graph shown in in, It is composed of enhanced gene expression and adjacency matrix, and the enhanced gene expression is the gene expression matrix after data enhancement processing. Among them, the recognition system can perform random shuffling and random masking processing through formula (3).

[0124]

[0125] in, It is the gene expression matrix after data enhancement; represents random shuffle; F is the gene expression matrix; Z represents the preset mask matrix, and Z obeys the Bernoulli distribution, in which each element in Z is set to 1 with a probability of P% and is set to 0 with a probability of 1-P%. For example, each element is set to 1 with a probability of 60% and is set to 0 with a probability of 40%.

[0126] Figure 6 A flowchart of a model joint training process provided in an embodiment of the present application, such as Figure 6 As shown, the process includes the following steps:

[0127] Step S301, inputting the positive sample image and the negative sample image into the initial image sampling aggregation network model respectively, and obtaining the first feature representation of the positive sample image and the second feature representation of the negative sample image output by the initial image sampling aggregation network model.

[0128] In step S301, the initial graph sampling aggregation network model is a model that has not been iteratively trained. The initial graph sampling aggregation network model is composed of an iterative hierarchical neighbor sampling-aggregation layer and a loss function. The iterative hierarchical neighbor sampling-aggregation layer in the initial graph sampling aggregation network model can obtain the first feature representation of the positive sample image and the second feature representation of the negative sample image through the above formula (1) and formula (2).

[0129] Step S302: input the first feature representation into the initial adaptive graph contrastive learning model, and the initial adaptive graph contrastive learning model performs feature aggregation on the first feature representation based on the initial attention weight corresponding to each node in the first feature representation to obtain a first global feature representation; and input the second feature representation into the initial adaptive graph contrastive learning model, and the initial adaptive graph contrastive learning model performs feature aggregation on the second feature representation based on the initial attention weight corresponding to each node in the second feature representation to obtain a second global feature representation.

[0130] In step S302, the initial adaptive graph contrastive learning model is a model that has not been iteratively trained, wherein the initial adaptive graph contrastive learning model includes an input layer, a feature encoding layer, an attention pooling layer, a discriminator, and a loss function; the attention pooling layer includes two linear layers, an activation function, attention weights, and L2 norm normalization.

[0131] Optionally, in this embodiment, feature aggregation is performed on the first feature representation based on the initial attention weight corresponding to each node in the first feature representation to obtain a first global feature representation, including: determining the initial attention weight corresponding to each node in the first feature representation through the attention pooling layer in the initial adaptive graph contrast learning model; weightedly summarizing the embedded features corresponding to N nodes based on the initial attention weight corresponding to each node through the attention pooling layer to obtain an aggregated feature representation; and determining the first global feature representation based on the aggregated feature representation through the attention pooling layer.

[0132] In this embodiment, the attention pooling layer can obtain the first global feature representation G through formula (4) to formula (9): g .

[0133] G g =AP(E s ) (4)

[0134]

[0135] s=Linear 2 (ReLU(Linear 1 (E s ))) (6)

[0136]

[0137] Among them, G g represents the first global feature representation; D represents the feature dimension; AP represents attention pooling, ReLU represents the activation function; Linear 1 and Linear 2represents the linear layer; s is the feature vector after activation function and linear transformation, s i is an element in s; w i represents the attention weight; g represents the summarized feature representation under the attention mechanism; Represents the set of real numbers corresponding to the feature representation.

[0138] It should be noted that the attention pooling layer of the recognition system can also obtain the second global feature representation through formula (4) to formula (9): Therefore, the processing process of the second global feature representation will not be described in detail here.

[0139] Step S303, based on the first feature representation, the second feature representation, the first global feature representation and the second global feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model are jointly trained, and the model training is stopped when the training cutoff condition is met to obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

[0140] It should be noted that by jointly training the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model based on the first feature representation, the second feature representation, the first global feature representation and the second global feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model can have a strong correlation, thereby improving the accuracy of the model, and then improving the accuracy of spatial tissue structure recognition of tissue samples.

[0141] Figure 7 A flowchart of another model joint training process provided in an embodiment of the present application, such as Figure 7 As shown, the process includes the following steps:

[0142] Step S401, constructing a positive data pair based on the embedded features corresponding to each node in the positive sample graph and the first global feature representation, and obtaining a total of N first positive data pairs.

[0143] In step S401, the embedded features corresponding to each node in the positive sample graph, that is, the local features in the positive sample graph The system can construct a positive data pair (i.e., Fig. 8A ), a total of N first positive data pairs are obtained.

[0144] Step S402, constructing a negative data pair based on the embedded features corresponding to each node in the positive sample graph and the second global feature representation, and obtaining a total of N first negative data pairs.

[0145] In step S402, the system can form a negative data pair with the local feature corresponding to each node in the positive sample graph and the global feature (i.e., the second global feature representation) corresponding to the negative sample graph, and obtain a total of N first negative data pairs (i.e., Fig. 8A negative data pairs shown in ).

[0146] Step S403, constructing a positive data pair based on the embedded features corresponding to each node in the negative sample graph and the second global feature representation, and obtaining a total of N second positive data pairs.

[0147] In step S403, the embedded features corresponding to each node in the negative sample graph, that is, the local features in the negative sample graph The system can construct a positive data pair (i.e., Fig. 8A ), a total of N second positive data pairs are obtained.

[0148] Step S404: construct a negative data pair based on the embedded features corresponding to each node in the negative sample graph and the first global feature representation, and obtain a total of N second negative data pairs.

[0149] In step S404, the system may form a negative data pair with the local feature corresponding to each node in the negative sample graph and the global feature corresponding to the positive sample graph (i.e., the first global feature representation), and obtain a total of N second negative data pairs (i.e., Fig. 8A negative data pairs shown in ).

[0150] Step S405, based on N first positive data pairs, N first negative data pairs, N second positive data pairs, N second negative data pairs, the first feature representation and the second feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model are jointly trained, and the model training is stopped when the training cutoff condition is met to obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

[0151] Optionally, based on N first positive data pairs, N first negative data pairs, N second positive data pairs, N second negative data pairs, the first feature representation and the second feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are jointly trained, and the model training is stopped when the training cutoff condition is met, to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model, including the following steps:

[0152] Step 1: Input N first positive data pairs into the discriminator in the initial adaptive graph contrastive learning model to obtain the first probability corresponding to each node in the positive sample graph.

[0153] In step one, the first probability corresponding to each node is used to characterize the similarity between the embedded feature corresponding to the node and the first global feature representation, that is, the first probability is used to characterize the similarity between the local feature corresponding to the node in the positive sample graph and the global feature corresponding to the positive sample graph.

[0154] Alternatively, if Figure 8B As shown, the discriminator in this application is a discriminator composed of a bilinear function combined with spectral normalization, which can be expressed by formula (10):

[0155]

[0156] Among them, D s represents the discriminator; D represents the dimension of the feature; Represents the set of real numbers corresponding to the feature representation.

[0157] Step 2: Input the N first negative data pairs into the discriminator to obtain the second probability corresponding to each node in the positive sample graph.

[0158] In step 2, the second probability corresponding to each node is used to characterize the similarity between the embedded feature corresponding to the node and the second global feature representation, that is, the second probability is used to characterize the similarity between the local feature corresponding to the node in the positive sample graph and the global feature corresponding to the negative sample graph.

[0159] Step three, input the N second positive data pairs into the discriminator to obtain the third probability corresponding to each node in the negative sample graph.

[0160] In step three, the third probability corresponding to each node is used to characterize the similarity between the embedded feature corresponding to the node and the second global feature representation, that is, the third probability is used to characterize the similarity between the local feature corresponding to the node in the negative sample graph and the global feature corresponding to the negative sample graph.

[0161] Step 4: Input the N second negative data pairs into the discriminator to obtain the fourth probability corresponding to each node in the negative sample graph.

[0162] In step four, the fourth probability corresponding to each node is used to characterize the similarity between the embedded feature corresponding to the node and the first global feature characterization, that is, the fourth probability is used to characterize the similarity between the local feature corresponding to the node in the negative sample graph and the global feature corresponding to the positive sample graph.

[0163] Step five, based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability, the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model are jointly trained, and the model training is stopped when the training cutoff condition is met to obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

[0164] It should be noted that the probability values ​​(i.e., the first probability, the second probability, the third probability and the fourth probability) used to characterize the similarity between the local features corresponding to the nodes and the global features are obtained by the discriminator composed of a bilinear function combined with spectral normalization, and the first feature representation and the second feature representation are used to jointly train the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model. The initial graph sampling aggregation network model and the initial adaptive graph contrast learning model can be jointly trained according to the similarity between the local features corresponding to the nodes and the global features, thereby further improving the accuracy of the model and thus improving the accuracy of spatial tissue structure recognition of tissue samples.

[0165] Fig. 9 A flowchart of another model joint training process provided in an embodiment of the present application is as follows: Fig. 9 As shown, the process includes the following steps:

[0166] Step S501, determining a total loss value based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability.

[0167] In step S501, the total loss value includes the loss value of the initial graph sampling aggregation network model and the loss value of the initial adaptive graph contrast learning model. The total loss value can be obtained by the total loss function shown below:

[0168] L=λ 1 L r +λ 2 (L 1 +L 2 )

[0169] Among them, L r represents the loss function of the initial graph sampling aggregation network model; (L 1 +L 2 ) represents the loss function of the initial adaptive graph contrastive learning model; λ 1 and λ 2 is the weight factor; the loss function L of the initial graph sampling aggregation network model r As shown below:

[0170]

[0171] Among them, L r represents the loss function; fi represents the original gene expression data; r i represents the reconstructed gene expression data, that is, the gene expression data obtained by the decoder through feature representation; F represents the Frobenius norm; N s is the total number of nodes. The recognition system can be represented by the first feature, the second feature and the loss function Lr Determine the loss value for the initial graph sampling aggregation network model.

[0172] The loss value of the initial adaptive graph contrastive learning model can be obtained by the loss function (12) as shown below:

[0173]

[0174]

[0175] Among them, L2 is the symmetric form of L1; E ST-GraphSAGE () represents the output result of the ST-GraphSAGE network model, for example, the first feature representation and the second feature representation mentioned above, where E in the above loss function (12) ST-GraphSAGE (F,M) is used to represent the first feature representation, Used to represent the second feature representation; D s () is used to represent the probability of the similarity between the local feature corresponding to the discriminator calculation node and the global feature, such as the first probability, the second probability, the third probability and the fourth probability mentioned above, where represents the first probability, represents the second probability, represents the third probability, represents the fourth probability; G g is the first global feature representation; is the second global feature representation; the embedded feature corresponding to each node in the negative sample graph (i.e. local features); the embedded features corresponding to each node in the positive sample graph (ie local features). The recognition system obtains the loss value of the initial adaptive graph contrast learning model through the first feature representation, the second feature representation, the first probability, the second probability, the third probability, the fourth probability and the loss function (12).

[0176] Step S502, iteratively update the parameters of the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model based on the total loss value until the parameters meet the training cutoff condition, then stop model training, and obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model.

[0177] In step S502, the model is trained for 25000 epochs and the learning rate learning_rate is 0.0001. The system can use the Adam optimizer in PyTorch to update parameters in the back propagation phase through the total loss function value to obtain a graph sampling aggregation network model and an adaptive graph contrast learning model.

[0178] It should be noted that by iteratively updating the parameters of the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model based on the total loss value, a strong correlation can be made between the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model, thereby improving the accuracy of the model.

[0179] See also Fig.10 , which is a flowchart of another method for identifying the spatial organization structure of spatial transcriptome data provided by an embodiment of the present application, such as Fig.10 As shown, the recognition system of the present application first obtains the gene expression matrix and adjacency matrix corresponding to the spatial transcriptome data of the sample tissue to be identified (for the specific process, see Figure 2 ), and then construct the positive and negative sample graph based on the gene expression matrix and adjacency matrix (see the detailed process for details). Figure 5 ), then the recognition system can input the positive and negative sample images into the graph sampling aggregation network model to obtain the feature representation of the sample image. Then the recognition system inputs the feature representation into the adaptive graph contrast learning model, constructs positive and negative data pairs based on the output results of the graph sampling aggregation network model and the global feature representation obtained by the attention pooling mechanism, and then the recognition system can input the positive and negative data pairs into the discriminator constructed by the bilinear function and spectral normalization (see Figure 8B ), and obtain the enhanced feature representation (the specific process can be seen in Figure 4 ). Finally, the recognition system obtains the recognition result of the spatial organizational structure through cluster analysis.

[0180] Furthermore, taking breast cancer tissue samples as an example, the spatial organization structure obtained by the method provided by this application (abbreviated as GATCL), four latest existing technical methods: STAGATE, SpaGCN, CCST, GraphST, and the manually labeled spatial organization structure are compared, and the comparison results can be shown as follows: Fig.11 As shown, it can be seen that the method provided by this application is closest to manual labeling. The accuracy evaluation index of spatial organizational structure recognition is the Adjusted Rand Index (ARI). The ARI of the method provided by this application is 0.6182, the ARI of STAGATE is 0.4638, the ARI of SpaGCN is 0.4411, the ARI of CCST is 0.5109, and the ARI of GraphST is 0.5480. Fig.12 It can be seen that the ARI of the method provided in the present application is the highest, that is, the accuracy of the spatial organizational structure identified by the method provided in the present application is the highest, and the method provided in the present application is superior to the method of the prior art.

[0181] Through the method for identifying the spatial organizational structure of spatial transcriptome data provided by the embodiment of the present application, it is possible to fully utilize the similarity information of gene expression data between adjacent nodes in spatial positions during the feature aggregation process of nodes, and obtain a feature representation that can accurately reflect the similarity of gene expression data between adjacent nodes in the sample graph. Therefore, based on the feature representation, a more accurate spatial organizational structure can be determined, thereby improving the accuracy of identifying the spatial organizational structure of tissue samples, thereby solving the technical problem of low accuracy in identifying the spatial organizational structure of tissue samples due to the inability to fully utilize spatial transcriptome data in the prior art.

[0182] Through the method for identifying the spatial organizational structure of spatial transcriptome data provided in the embodiment of the present application, it is also possible to adaptively adjust the aggregation weight according to the characteristic data of different tissue samples, so that when faced with new and unknown tissue samples, the recognition system can more accurately capture the key information in the feature representation according to its corresponding aggregation weight, and obtain an enhanced feature representation that can better reflect the similarity of gene expression data between adjacent nodes in the sample graph, thereby improving the accuracy of identifying the spatial organizational structure of new tissue samples, and further solving the problem that the prior art cannot accurately identify the spatial organizational structure of tissue samples when faced with new and unknown tissue samples.

[0183] Device Embodiment

[0184] The embodiment of the present application provides a device for identifying the spatial organization structure of spatial transcriptome data, wherein: Fig.13 A schematic diagram of a device for identifying the spatial organization structure of spatial transcriptome data provided in an embodiment of the present application is shown in FIG. Fig.13 As shown, the device includes: a data acquisition module 11, a sample graph construction module 12, a feature aggregation module 13 and a recognition result acquisition module 14. Fig.13 You can see the connection relationship between several modules.

[0185] The data acquisition module is used to acquire the gene expression matrix and adjacency matrix corresponding to the spatial transcriptome data of the sample tissue to be identified, wherein the gene expression matrix is ​​a matrix determined by the gene expression data in the spatial transcriptome data, and the adjacency matrix is ​​a matrix determined by the spatial position information corresponding to the gene expression data;

[0186] A sample graph construction module is used to construct a sample graph based on a gene expression matrix and an adjacency matrix, wherein the sample graph is an undirected graph describing the similarity relationship of gene expression data between adjacent nodes;

[0187] A feature aggregation module is used to input the sample graph into the graph sampling aggregation network model, and perform feature aggregation on the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph and the gene feature data of the node through the graph sampling aggregation network model to obtain a feature representation of the sample graph, wherein the neighboring nodes in the neighborhood of each node include nodes that are directly or indirectly adjacent to the node;

[0188] The recognition result acquisition module is used to obtain the recognition result of the spatial organizational structure corresponding to the sample organization based on the feature representation.

[0189] Optionally, the recognition result acquisition module also includes: a feature enhancement module and a cluster analysis module.

[0190] The feature enhancement module is used to input the feature representation into the adaptive graph contrastive learning model, determine the attention weight corresponding to each node in the feature representation through the adaptive graph contrastive learning model, and perform feature aggregation on the feature representation based on the attention weight corresponding to each node to obtain an enhanced feature representation;

[0191] The cluster analysis module is used to perform cluster analysis on the enhanced feature representation to obtain the recognition result of the spatial organizational structure corresponding to the sample organization.

[0192] Optionally, the feature aggregation module includes: a feature extraction unit, a feature aggregation unit, a feature splicing unit and an execution unit.

[0193] The feature extraction unit is used to perform a feature extraction operation, starting from the i-th node in the sample graph, and extracting the gene feature data of M first-order neighbor nodes and L second-order neighbor nodes in the neighborhood of the i-th node in an iterative manner, wherein the first-order neighbor node is adjacent to the i-th node, and the second-order neighbor node is adjacent to the first-order neighbor node corresponding to the i-th node, and M and L are both positive integers;

[0194] A feature aggregation unit is used to perform a feature aggregation operation to perform feature aggregation on the gene feature data of M first-order neighbor nodes to obtain a first aggregate feature; and to perform feature aggregation on the gene feature data of L second-order neighbor nodes to obtain a second aggregate feature;

[0195] A feature splicing unit, used to perform a feature splicing operation to splice the first aggregate feature, the second aggregate feature and the gene feature data of the i-th node to obtain an embedded feature of the i-th node;

[0196] The execution unit is used to perform feature extraction operations, feature aggregation operations, and feature concatenation operations multiple times until embedded features corresponding to N nodes in the sample graph are obtained, and feature representations are constructed based on the embedded features corresponding to the N nodes, where N is a positive integer.

[0197] Optionally, the sample graph construction module includes: a construction unit, a random shielding unit and a random shuffling unit.

[0198] Wherein, the construction unit is used to construct a positive sample graph based on the gene expression matrix and the adjacency matrix;

[0199] A random masking unit is used to randomly mask the gene expression matrix corresponding to the positive sample graph with a preset probability to obtain a masked positive sample graph;

[0200] The random shuffling unit is used to randomly shuffle the nodes in the masked positive sample graph to obtain a negative sample graph.

[0201] Optionally, the device for identifying the spatial organization structure of spatial transcriptome data further includes: a first determination module, a second determination module and a model training module.

[0202] The first determination module is used to input the positive sample image and the negative sample image into the initial image sampling aggregation network model respectively, and obtain the first feature representation of the positive sample image and the second feature representation of the negative sample image output by the initial image sampling aggregation network model;

[0203] A second determination module is used to input the first feature representation into an initial adaptive graph contrastive learning model, and the initial adaptive graph contrastive learning model performs feature aggregation on the first feature representation based on an initial attention weight corresponding to each node in the first feature representation to obtain a first global feature representation; and input the second feature representation into the initial adaptive graph contrastive learning model, and the initial adaptive graph contrastive learning model performs feature aggregation on the second feature representation based on an initial attention weight corresponding to each node in the second feature representation to obtain a second global feature representation;

[0204] The model training module is used to perform joint model training on the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model based on the first feature representation, the second feature representation, the first global feature representation and the second global feature representation, stop model training when the training cutoff condition is met, and obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

[0205] Optionally, the first determination module includes: a first determination unit, a weighted aggregation unit and a second determination unit.

[0206] The first determination unit is used to determine the initial attention weight corresponding to each node in the first feature representation through the attention pooling layer in the initial adaptive graph contrast learning model;

[0207] A weighted aggregation unit is used to perform weighted aggregation of the embedded features corresponding to N nodes based on the initial attention weight corresponding to each node through the attention pooling layer to obtain the aggregated feature representation;

[0208] The second determining unit is used to determine the first global feature representation according to the summarized feature representation through the attention pooling layer.

[0209] Optionally, the model training module includes: a first construction unit, a second construction unit, a third construction unit, a fourth construction unit and a model training unit.

[0210] The first construction unit is used to construct a positive data pair based on the embedded features corresponding to each node in the positive sample graph and the first global feature representation, so as to obtain a total of N first positive data pairs;

[0211] A second construction unit is used to construct a negative data pair based on the embedded features corresponding to each node in the positive sample graph and the second global feature representation, so as to obtain a total of N first negative data pairs;

[0212] A third construction unit is used to construct a positive data pair based on the embedded feature corresponding to each node in the negative sample graph and the second global feature representation, so as to obtain a total of N second positive data pairs;

[0213] A fourth construction unit is used to construct a negative data pair based on the embedded feature corresponding to each node in the negative sample graph and the first global feature representation, so as to obtain a total of N second negative data pairs;

[0214] A model training unit is used to perform joint model training on an initial graph sampling aggregation network model and an initial adaptive graph contrastive learning model based on N first positive data pairs, N first negative data pairs, N second positive data pairs, N second negative data pairs, first feature representations and second feature representations, and stop model training when a training cutoff condition is met to obtain a graph sampling aggregation network model and an adaptive graph contrastive learning model.

[0215] Optionally, the model training unit includes: a first probability determination unit, a second probability determination unit, a third probability determination unit, a fourth probability determination unit and a model training sub-unit.

[0216] The first probability determination unit is used to input N first positive data pairs into the discriminator in the initial adaptive graph contrast learning model to obtain a first probability corresponding to each node in the positive sample graph, wherein the first probability corresponding to each node is used to represent the similarity between the embedded feature corresponding to the node and the first global feature representation;

[0217] The second probability determination unit is used to input the N first negative data pairs into the discriminator in the initial adaptive graph contrast learning model to obtain the second probability corresponding to each node in the positive sample graph, wherein the second probability corresponding to each node is used to represent the similarity between the embedded feature corresponding to the node and the second global feature representation

[0218] A third probability determination unit is used to input the N second positive data pairs into the discriminator to obtain a third probability corresponding to each node in the negative sample graph, wherein the third probability corresponding to each node is used to represent the similarity between the embedded feature corresponding to the node and the second global feature representation;

[0219] A fourth probability determination unit is used to input the N second negative data pairs into the discriminator to obtain a fourth probability corresponding to each node in the negative sample graph, wherein the fourth probability corresponding to each node is used to characterize the similarity between the embedded feature corresponding to the node and the first global feature representation;

[0220] The model training subunit is used to perform joint model training on the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability, and stop the model training when the training cutoff condition is met to obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

[0221] Optionally, the model training subunit includes: a loss value determination subunit and a model parameter updating subunit.

[0222] Wherein, the loss value determination subunit is used to determine the total loss value based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability, wherein the total loss value includes the loss value of the initial graph sampling aggregation network model and the loss value of the initial adaptive graph contrast learning model;

[0223] The model parameter updating subunit is used to iteratively update the parameters of the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model based on the total loss value until the parameters meet the training cutoff condition, and then stop the model training to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model.

[0224] Storage Medium Embodiments

[0225] The embodiment of the present application provides a computer-readable storage medium, on which a program is stored, wherein the program, when executed by a processor, implements some or all of the steps in the method for identifying the spatial organization structure of spatial transcriptome data introduced in the aforementioned method embodiment of the present application. The storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.

[0226] Processor Embodiments

[0227] An embodiment of the present application provides a processor, which is used to run a program, wherein when the program is running, some or all of the steps in the method for identifying the spatial organization structure of spatial transcriptome data introduced in the aforementioned method embodiment are executed.

[0228] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0229] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for identifying the spatial organization structure of spatial transcriptome data, characterized in that: include: Obtaining a gene expression matrix and an adjacency matrix corresponding to the spatial transcriptome data of the sample tissue to be identified, wherein the gene expression matrix is ​​a matrix determined by the gene expression data in the spatial transcriptome data, and the adjacency matrix is ​​a matrix determined by the spatial position information corresponding to the gene expression data; Constructing a sample graph based on the gene expression matrix and the adjacency matrix, wherein the sample graph is an undirected graph describing the similarity relationship of gene expression data between adjacent nodes; The sample graph is input into a graph sampling aggregation network model, and the gene feature data of the neighboring nodes in the neighborhood of each node in the sample graph are aggregated with the gene feature data of the node through the graph sampling aggregation network model to obtain a feature representation of the sample graph, wherein the neighboring nodes in the neighborhood of each node include nodes that are directly or indirectly adjacent to the node; The recognition result of the spatial tissue structure corresponding to the sample tissue is obtained according to the feature representation.

2. The method according to claim 1, characterized in that The obtaining of the recognition result of the spatial organizational structure corresponding to the sample tissue according to the feature representation includes: Inputting the feature representation into an adaptive graph contrastive learning model, determining the attention weight corresponding to each of the nodes in the feature representation through the adaptive graph contrastive learning model, and performing feature aggregation on the feature representation based on the attention weight corresponding to each of the nodes to obtain an enhanced feature representation; Cluster analysis is performed on the enhanced feature representation to obtain an identification result of the spatial organizational structure corresponding to the sample tissue.

3. The method according to claim 2, characterized in that The step of performing feature aggregation on the gene feature data of neighboring nodes in the neighborhood of each node in the sample graph and the gene feature data of the node through the graph sampling aggregation network model to obtain a feature representation of the sample graph includes: Performing a feature extraction operation, starting from the i-th node in the sample graph, extracting gene feature data of M first-order neighbor nodes and L second-order neighbor nodes in the neighborhood of the i-th node in an iterative manner, wherein the first-order neighbor node is adjacent to the i-th node, the second-order neighbor node is adjacent to the first-order neighbor node corresponding to the i-th node, and M and L are both positive integers; Performing a feature aggregation operation to perform feature aggregation on the gene feature data of the M first-order neighbor nodes to obtain a first aggregate feature; and performing feature aggregation on the gene feature data of the L second-order neighbor nodes to obtain a second aggregate feature; Performing a feature concatenation operation to concatenate the first aggregate feature, the second aggregate feature, and the gene feature data of the i-th node to obtain an embedded feature of the i-th node; The feature extraction operation, the feature aggregation operation, and the feature concatenation operation are performed multiple times until the embedded features corresponding to the N nodes in the sample graph are obtained, and the feature representation is constructed based on the embedded features corresponding to the N nodes, where N is a positive integer.

4. The method according to claim 3, characterized in that The sample graph includes a positive sample graph and a negative sample graph, wherein the negative sample graph is a sample graph obtained after data enhancement processing is performed on the positive sample graph, the data enhancement processing is used to enhance the distinction between the positive sample graph and the negative sample graph, and the data enhancement processing includes random shielding and random shuffling; the sample graph is constructed based on the gene expression matrix and the adjacency matrix, including: Constructing the positive sample graph based on the gene expression matrix and the adjacency matrix; Performing the random masking on the gene expression matrix corresponding to the positive sample graph with a preset probability to obtain a masked positive sample graph; The nodes in the shielded positive sample graph are randomly shuffled to obtain the negative sample graph.

5. The method according to claim 4, characterized in that Before inputting the sample graph into the graph sampling aggregation network model, the method further includes: Inputting the positive sample image and the negative sample image into an initial image sampling aggregation network model respectively, to obtain a first feature representation of the positive sample image and a second feature representation of the negative sample image output by the initial image sampling aggregation network model; Inputting the first feature representation into an initial adaptive graph contrastive learning model, and having the initial adaptive graph contrastive learning model perform feature aggregation on the first feature representation based on the initial attention weight corresponding to each of the nodes in the first feature representation, to obtain a first global feature representation; and inputting the second feature representation into the initial adaptive graph contrastive learning model, and having the initial adaptive graph contrastive learning model perform feature aggregation on the second feature representation based on the initial attention weight corresponding to each of the nodes in the second feature representation, to obtain a second global feature representation; Based on the first feature representation, the second feature representation, the first global feature representation and the second global feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model are jointly trained, and the model training is stopped when the training cutoff condition is met to obtain the graph sampling aggregation network model and the adaptive graph contrastive learning model.

6. The method according to claim 5, characterized in that The performing feature aggregation on the first feature representation based on the initial attention weight corresponding to each of the nodes in the first feature representation to obtain a first global feature representation includes: Determining an initial attention weight corresponding to each of the nodes in the first feature representation through an attention pooling layer in the initial adaptive graph contrastive learning model; The embedded features corresponding to the N nodes are weighted and summarized based on the initial attention weight corresponding to each node by the attention pooling layer to obtain a summarized feature representation; The first global feature representation is determined through the attention pooling layer based on the summarized feature representation.

7. The method according to claim 5, characterized in that The method of performing joint model training on the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model based on the first feature representation, the second feature representation, the first global feature representation, and the second global feature representation, stopping model training when a training cutoff condition is met, and obtaining the graph sampling aggregation network model and the adaptive graph contrastive learning model includes: Based on the embedded features corresponding to each of the nodes in the positive sample graph and the first global feature representation, a positive data pair is formed, thereby obtaining a total of N first positive data pairs; Based on the embedded features corresponding to each of the nodes in the positive sample graph and the second global feature representation, a negative data pair is formed to obtain a total of N first negative data pairs; Based on the embedded features corresponding to each of the nodes in the negative sample graph and the second global feature representation, a positive data pair is formed to obtain a total of N second positive data pairs; Based on the embedded features corresponding to each of the nodes in the negative sample graph and the first global feature representation, a negative data pair is formed, and a total of N second negative data pairs are obtained; Based on the N first positive data pairs, N first negative data pairs, N second positive data pairs, N second negative data pairs, the first feature representation and the second feature representation, the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model are jointly trained, and the model training is stopped when the training cutoff condition is met to obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

8. The method according to claim 7, characterized in that The method of performing joint model training on the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model based on the N first positive data pairs, the N first negative data pairs, the N second positive data pairs, the N second negative data pairs, the first feature representation, and the second feature representation, stopping model training when a training cutoff condition is met, and obtaining the graph sampling aggregation network model and the adaptive graph contrastive learning model includes: Inputting N first positive data pairs into the discriminator in the initial adaptive graph contrastive learning model to obtain a first probability corresponding to each of the nodes in the positive sample graph, wherein the first probability corresponding to each of the nodes is used to represent the similarity between the embedded feature corresponding to the node and the first global feature representation; Inputting N first negative data pairs into the discriminator to obtain a second probability corresponding to each of the nodes in the positive sample graph, wherein the second probability corresponding to each of the nodes is used to represent the similarity between the embedded feature corresponding to the node and the second global feature representation; Inputting N second positive data pairs into the discriminator to obtain a third probability corresponding to each of the nodes in the negative sample graph, wherein the third probability corresponding to each of the nodes is used to represent the similarity between the embedded feature corresponding to the node and the second global feature representation; Inputting N second negative data pairs into the discriminator to obtain a fourth probability corresponding to each of the nodes in the negative sample graph, wherein the fourth probability corresponding to each of the nodes is used to represent the similarity between the embedded feature corresponding to the node and the first global feature representation; Based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability, the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model are jointly trained, and the model training is stopped when the training cutoff condition is met to obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

9. The method according to claim 8, characterized in that The method of performing joint model training on the initial graph sampling aggregation network model and the initial adaptive graph contrastive learning model based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability and the fourth probability, stopping model training when a training cutoff condition is met, and obtaining the graph sampling aggregation network model and the adaptive graph contrastive learning model includes: Determine a total loss value based on the first feature representation, the second feature representation, the first probability, the second probability, the third probability, and the fourth probability, wherein the total loss value includes a loss value of the initial graph sampling aggregation network model and a loss value of the initial adaptive graph contrastive learning model; The parameters of the initial graph sampling aggregation network model and the initial adaptive graph contrast learning model are iteratively updated based on the total loss value, and the model training is stopped when the parameters meet the training cutoff condition, so as to obtain the graph sampling aggregation network model and the adaptive graph contrast learning model.

10. A device for identifying the spatial organization structure of spatial transcriptome data, characterized in that: include: A data acquisition module, used to acquire a gene expression matrix and an adjacency matrix corresponding to the spatial transcriptome data of the sample tissue to be identified, wherein the gene expression matrix is ​​a matrix determined by the gene expression data in the spatial transcriptome data, and the adjacency matrix is ​​a matrix determined by the spatial position information corresponding to the gene expression data; A sample graph construction module, used to construct a sample graph based on the gene expression matrix and the adjacency matrix, wherein the sample graph is an undirected graph describing the similarity relationship of gene expression data between adjacent nodes; A feature aggregation module, used for inputting the sample graph into a graph sampling aggregation network model, and performing feature aggregation on the gene feature data of neighboring nodes in the neighborhood of each node in the sample graph and the gene feature data of the node through the graph sampling aggregation network model to obtain a feature representation of the sample graph, wherein the neighboring nodes in the neighborhood of each node include nodes directly or indirectly adjacent to the node; The recognition result acquisition module is used to obtain the recognition result of the spatial organizational structure corresponding to the sample tissue according to the feature representation.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for identifying the spatial organization structure of spatial transcriptome data according to any one of claims 1 to 9 is implemented.

12. A processor, characterized in that: Used to run a computer program, which, when running, executes the method for identifying the spatial organization structure of spatial transcriptome data according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Network representation learning method based on graphene neighborhood enhancement

    CN115062766A

  • Spatial domain identification method based on spatial transcriptomics data feature extraction

    CN116189785A

  • Spatial transcriptome data clustering method

    CN117253550A

  • Spatial domain identification method in spatial transcriptomics based on deep graph learning

    CN117708628A

  • Spatial domain identification method integrating spatial transcriptome multi-modal information

    CN118016149A