Spatial transcriptome data analysis method based on edge weighted graph attention and multi-view comparative learning

By combining edge-weighted graph attention with multi-view comparative learning, we solved the problem of long-distance intercellular dependencies not being considered in existing spatial transcriptome analysis, achieved accurate identification and stable analysis of complex tissue structures, and improved the integration capability and robustness of spatial transcriptome data.

CN120613008APending Publication Date: 2025-09-09HAINAN NORMAL UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510737840.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Existing spatial transcriptome analysis methods fail to fully consider the spatially dependent expression patterns between distant cells in tissues and lack multi-angle integration of spatial information, resulting in inaccurate characterization of complex tissue structures, especially in biological tissues with strong heterogeneity or long-range regulatory mechanisms, and lack of robustness.

Method used

A method based on edge-weighted graph attention and multi-view contrastive learning is adopted. By constructing the cell adjacency matrix, perturbation matrix and gene co-expression matrix, a multi-view contrastive learning framework is built. The edge-weighted graph attention autoencoder is used to map multiple views into a unified latent representation space for downstream analysis.

Benefits of technology

It effectively integrates the cooperative expression relationship between spatially adjacent and distant cells, enhances the model's ability to express complex spatial structures, improves the accuracy, stability and structure recognition ability of spatial transcriptome data analysis, and is suitable for tissue structure modeling and spatial domain recognition tasks at multiple resolution levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120613008A_ABST
    Figure CN120613008A_ABST
Patent Text Reader

Abstract

The invention discloses a space transcriptome data analysis method based on edge weighted graph attention and multi-view comparative learning, which comprises the following steps: preprocessing space transcriptome data to obtain preprocessed space transcriptome data; wherein the spatial transcriptome data comprises histological information, gene expression information and spatial position information; constructing a cell adjacency matrix, a disturbance matrix and a gene co-expression matrix based on the preprocessed space transcriptome data; based on the cell adjacency matrix, the perturbation matrix and the gene co-expression matrix, a multi-view comparison learning framework is constructed, and multiple views comprise a front view, a space view and a negative view; the multiple views are mapped to a unified potential representation space through an edge weighted graph attention auto-encoder, and node embedding is obtained; downstream analysis is performed based on node embedding. According to the method, different space structure modes can be accurately identified in space transcriptome data analysis, so that the clustering accuracy, compactness and separability of space data are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of spatial transcriptome data analysis, and in particular relates to a spatial transcriptome data analysis method based on edge-weighted graph attention and multi-view comparative learning. Background Art

[0002] With the rapid development of spatial transcriptomics technology, researchers can obtain cellular gene expression data while maintaining tissue spatial information, thereby achieving a joint analysis of tissue structure and cell function. In particular, the emergence of spatially resolved transcriptomics technology has further advanced spatial resolution to the single-cell and even subcellular level, greatly promoting research progress in developmental biology, tumor microenvironment, neuroscience and other fields. In practical applications, to cope with the high dimensionality, strong noise and complex spatial structure of spatial transcriptome data, researchers generally use models such as graph neural networks. By constructing a graph structure between spatially adjacent cells, they capture their coordinated expression relationships and then perform tasks such as clustering, regional division and functional annotation.

[0003] However, most existing spatial transcriptome analysis methods focus on the connections between local neighboring cells and fail to fully consider the potential spatially dependent expression patterns between distant cells in tissues. This neglect may lead to inaccurate characterization of complex tissue structures in practical applications, especially in biological tissues with strong heterogeneity or long-range regulatory mechanisms. In addition, existing spatial transcriptome analysis methods often lack multi-angle integration of spatial information. It is difficult for the model to capture local and global spatial expression characteristics at the same time, and it is easily affected by changes in the spatial distribution of samples, resulting in insufficient robustness. This defect is more prominent in data with high spatial resolution, seriously affecting the performance of key tasks such as cell type identification and tissue structure zoning. Summary of the Invention

[0004] To solve the above technical problems, the present invention proposes a spatial transcriptome data analysis method based on edge-weighted graph attention and multi-view contrastive learning to solve the problems existing in the above-mentioned prior art.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a spatial transcriptome data analysis method based on edge-weighted graph attention and multi-view contrastive learning, comprising:

[0006] Preprocessing the spatial transcriptome data to obtain preprocessed spatial transcriptome data; wherein the spatial transcriptome data includes histological information, gene expression information and spatial location information;

[0007] Based on the preprocessed spatial transcriptome data, the cell adjacency matrix, perturbation matrix and gene co-expression matrix were constructed;

[0008] Based on the cell adjacency matrix, the perturbation matrix, and the gene co-expression matrix, a multi-view contrast learning framework is constructed, wherein the multi-view includes a positive view, a spatial view, and a negative view;

[0009] Mapping the multiple views into a unified latent representation space through an edge-weighted graph attention autoencoder to obtain node embeddings;

[0010] Downstream analysis is performed based on the node embeddings.

[0011] Preferably, the step of preprocessing the spatial transcriptome data comprises:

[0012] Integrate histological information, gene expression information, and spatial location information of spatial transcriptome data;

[0013] Eliminate sampling points that are not part of the main tissue area;

[0014] performing normalization and logarithmic transformation on the gene expression information;

[0015] Seurat v3 algorithm was used to screen highly variable genes from gene expression profiles;

[0016] The highly variable genes screened were normalized.

[0017] Preferably, the step of constructing a cell adjacency matrix based on the preprocessed spatial transcriptome data comprises:

[0018] For 10X Visium data, the cell adjacency matrix was constructed based on spatial coordinates using the KNN algorithm with radius restriction;

[0019] For Stereo-seq data, the nearest neighbor algorithm was used to construct the cell adjacency matrix.

[0020] Preferably, the step of constructing a disturbance matrix based on the preprocessed spatial transcriptome data comprises:

[0021] performing a random shuffling operation on the cell adjacency matrix;

[0022] Perform a mask operation on the shuffled cell adjacency matrix to generate a perturbation matrix.

[0023] Preferably, the step of constructing a gene co-expression matrix based on the pre-processed spatial transcriptome data comprises:

[0024] Calculate the cosine similarity of gene expression matrices between sampling points;

[0025] Performing PCA dimensionality reduction on the cosine similarity;

[0026] The gene co-expression matrix was constructed based on the cosine similarity after dimensionality reduction.

[0027] Preferably, the step of constructing a multi-view contrastive learning framework based on the cell adjacency matrix, the perturbation matrix and the gene co-expression matrix includes:

[0028] constructing a front view based on the cell adjacency matrix and the gene co-expression matrix;

[0029] constructing a spatial view based on the cell adjacency matrix;

[0030] constructing a negative view based on the perturbation matrix;

[0031] The front view, spatial view and negative view are processed using the InfoNCE loss function to construct a multi-view contrast learning framework.

[0032] Preferably, the step of constructing a front view based on the cell adjacency matrix and the gene co-expression matrix comprises:

[0033] integrating the edge lists of the cell adjacency matrix and the gene co-expression matrix;

[0034] performing a random masking operation on the gene co-expression matrix;

[0035] The integrated edge list is combined with the randomly masked gene expression matrix to construct the front view.

[0036] Preferably, the front view, the spatial view and the negative view are processed using the InfoNCE loss function, comprising:

[0037] performing batch normalization and nonlinear activation preprocessing on the latent representations of the front view, the spatial view, and the negative view;

[0038] maximizing the similarity between the front view and the spatial view;

[0039] minimizing the similarity between the spatial view and the negative view;

[0040] The multi-view contrastive learning framework is optimized by combining reconstruction loss and contrastive learning loss.

[0041] Preferably, the step of mapping the multiple views to a unified latent representation space by an edge-weighted graph attention autoencoder comprises:

[0042] Using the encoder of the edge-weighted graph attention autoencoder, the influence of neighbor nodes on the central node is calculated to obtain the potential representation;

[0043] Use the decoder of the edge-weighted graph attention autoencoder to reconstruct the original features;

[0044] The parameters of the edge-weighted graph attention autoencoder are optimized by minimizing the reconstruction loss.

[0045] Preferably, the step of performing downstream analysis based on the node embedding comprises:

[0046] Performing spatial domain clustering visualization based on the node embedding;

[0047] identifying specific marker genes based on the node embedding;

[0048] generating a UMAP cluster analysis graph based on the node embedding;

[0049] generating a density heatmap based on the node embeddings;

[0050] Differential genes are identified based on the node embedding, and enrichment analysis is performed on the differential genes.

[0051] Compared with the prior art, the present invention has the following advantages and technical effects:

[0052] The present invention provides a spatial transcriptome data analysis method based on edge-weighted graph attention and multi-view contrastive learning, comprising: first, preprocessing spatial transcriptome data to obtain preprocessed spatial transcriptome data; wherein the spatial transcriptome data includes histological information, gene expression information and spatial position information; second, constructing a cell adjacency matrix, a perturbation matrix and a gene co-expression matrix based on the preprocessed spatial transcriptome data; third, constructing a multi-view contrastive learning framework based on the cell adjacency matrix, the perturbation matrix and the gene co-expression matrix, wherein the multi-views include a positive view, a spatial view and a negative view; then, mapping the multi-views to a unified latent representation space through an edge-weighted graph attention autoencoder to obtain node embedding; finally, performing downstream analysis based on the node embedding.

[0053] This invention addresses the problems of existing spatial transcriptome analysis methods, which lack global spatial dependency modeling and have limited feature integration capabilities. By constructing a graph attention autoencoder with edge weights, it effectively extracts the co-expression relationships between spatially adjacent and distant cells, enhancing the model's ability to represent complex spatial structures. It also introduces a graph contrast learning mechanism to improve spatial structure recognition and dynamically integrates feature information within a multi-view fusion framework, thereby improving the accuracy, stability, and structural recognition capabilities of spatial transcriptome data analysis. This approach is suitable for tissue structure modeling and spatial domain recognition tasks at multiple resolution levels.

[0054] This method effectively integrates the relationship between spatial dependencies and gene expression from structural information at different scales, capturing the spatial structural characteristics of complex tissues. Furthermore, it can accurately identify different spatial structural patterns in spatial transcriptome data analysis, thereby improving the clustering accuracy, compactness, and separability of spatial data. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0056] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0057] Figure 2 This is a schematic diagram of differential gene identification according to an embodiment of the present invention;

[0058] Figure 3 Schematic diagram of enrichment analysis according to an embodiment of the present invention. DETAILED DESCRIPTION

[0059] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0060] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0061] Example 1

[0062] like Figure 1 As shown, this embodiment provides a spatial transcriptome data analysis method based on edge-weighted graph attention and multi-view comparative learning, including:

[0063] S1. Preprocessing the spatial transcriptome data to obtain preprocessed spatial transcriptome data, wherein the spatial transcriptome data includes histological information, gene expression information, and spatial location information;

[0064] Furthermore, the step of preprocessing the spatial transcriptome data includes:

[0065] S101, integrating histological information, gene expression information and spatial location information of spatial transcriptome data;

[0066] S102. Remove sampling points that do not belong to the main tissue area;

[0067] S103, performing normalization and logarithmic transformation on the gene expression information;

[0068] S104, using the Seurat v3 algorithm to screen highly variable genes from gene expression profiles;

[0069] S105. Standardize the screened highly variable genes.

[0070] Specifically, this embodiment integrates histological information, gene expression information, and spatial location information from spatial transcriptome data and performs standardized preprocessing on them ( Figure 1 The purpose of this step is to unify the scale and distribution of different information sources, ensure that different types of data can work together, and provide consistent data input for subsequent analysis.

[0071] This example applies EW-GCLST to four spatial transcriptomics datasets, covering brain and cancer tissue data generated using different sequencing technologies, including 10XVisium and Stereo-seq.

[0072] Four spatial transcriptomics datasets, including:

[0073] The first dataset is the LIBD human dorsolateral prefrontal cortex (DLPFC) dataset. This example uses all 12 slices generated from the DLPFC dataset to fully verify the robustness and generalization ability of the model in multi-slice and multi-region scenarios.

[0074] The second dataset is mouse olfactory bulb tissue sequenced by Stereo-seq technology. The data has been processed for high resolution and presented at a spatial resolution of approximately 14 microns. It is used as high-resolution spatial transcriptome data to help test the performance of EW-GCLST at subcellular resolution.

[0075] The third dataset is the first area (coronal region) of the adult mouse brain, sequenced by the 10X Visium platform, containing 2,903 sampling points. The annotation map of this dataset is publicly available from the Allen BrainAtlas website and has good organizational structure hierarchical information.

[0076] The last dataset is the human breast cancer (HBC) dataset, which is divided into 20 spatial domains using the SEDR tool and is used to evaluate the model's ability in identifying tumor heterogeneity.

[0077] Detailed information on the relevant datasets is shown in Table 1.

[0078] Table 1

[0079]

[0080] The process of data preprocessing includes: first, the present embodiment removes sampling points that do not belong to the main tissue area from all data sets. The definition of the main tissue area is based on the histological characteristics or spatial position annotations provided in the original study. Subsequently, the gene expression data are normalized and logarithmically transformed using the SCANPY software package, specifically including normalizing the total expression of each cell to 10,000 and logarithmically transforming the normalized data. Then, 3000 highly variable genes are screened out from the gene expression spectrum using the Seuratv3 algorithm. The screening of highly variable genes is based on the variability threshold recommended by the algorithm, such as variance and mean level. Finally, the genes screened out are standardized. These processed gene data are used as input to the EW-GCLST model for subsequent analysis and modeling.

[0081] S2. Based on the preprocessed spatial transcriptome data, construct the cell adjacency matrix, perturbation matrix, and gene co-expression matrix;

[0082] Furthermore, S2 specifically includes:

[0083] Based on the preprocessed spatial transcriptome data, the steps of constructing the cell adjacency matrix include:

[0084] For 10X Visium data, the cell adjacency matrix was constructed based on spatial coordinates using the KNN algorithm with radius restriction;

[0085] For Stereo-seq data, the nearest neighbor algorithm was used to construct the cell adjacency matrix.

[0086] Based on the pre-processed spatial transcriptome data, the step of constructing a disturbance matrix includes:

[0087] performing a random shuffling operation on the cell adjacency matrix;

[0088] Perform a mask operation on the shuffled cell adjacency matrix to generate a perturbation matrix.

[0089] The steps of constructing a gene co-expression matrix based on the pre-processed spatial transcriptome data include:

[0090] Calculate the cosine similarity of gene expression matrices between sampling points;

[0091] Performing PCA dimensionality reduction on the cosine similarity;

[0092] The gene co-expression matrix was constructed based on the cosine similarity after dimensionality reduction.

[0093] Specifically, based on spatial location information, a cell adjacency matrix, a perturbation matrix, and a gene co-expression matrix are constructed to comprehensively capture the spatial and gene expression characteristics of the tissue. This invention can comprehensively capture the spatial and gene expression characteristics of the tissue and improve the parsing ability of spatial transcriptome data ( Figure 1 B) in.

[0094] The cell adjacency matrix can effectively capture the coordinated expression patterns between spatially adjacent sampling points and enhance the extraction of spatial expression information.

[0095] The perturbation matrix is ​​dynamically generated and continuously updated during the training process, which enhances the robustness of the model and enables it to better adapt to the underlying gene expression patterns.

[0096] The gene co-expression matrix helps the model identify sampling points that are far apart in space but have similarities in gene expression, thereby improving the accuracy of capturing inter-gene synergy.

[0097] Specifically, EW-GCLST constructs the cell adjacency matrix M based on the preprocessed data. cell , perturbation matrix M per and the gene co-expression matrix M coop These matrices reveal the underlying biological spatial structure of the tissue from different perspectives. cell The gene expression matrix Gene X and its edge list Edge cell In 10X Visium data, Edge cell Based on spatial coordinates, a KNN algorithm with radius restriction is used to construct the nearest neighbors of the sampling points by setting the radius parameter (default value is 150) and limiting each sampling point to a maximum of k = 6 neighbors to optimize the representation of spatial relationships. For platforms with uneven distribution of sampling points (such as Stereo-seq), the k-nearest neighbor algorithm is used to calculate spatial neighbors to adapt to the variation of sampling density in different regions. The perturbation matrix M is generated by randomly shuffling and randomly masking the cell adjacency matrix. per .

[0098] Gene co-expression matrix M coop Gene expression matrix X and its edge list Edge coop Edge coop This is generated by calculating the cosine similarity of the gene expression matrix between each sampling point. To reduce computational complexity and improve efficiency, the gene expression matrix is ​​reduced to a latent space representation using principal component analysis (PCA), retaining the principal components to explain the majority of gene expression variation. Finally, the similarity of the reduced data is calculated, and each sampling point is connected to the six points with the most similar expression.

[0099] S3. Based on the cell adjacency matrix, the perturbation matrix, and the gene co-expression matrix, construct a multi-view contrast learning framework, wherein the multi-view includes a positive view, a spatial view, and a negative view;

[0100] Furthermore, based on the cell adjacency matrix, the perturbation matrix, and the gene co-expression matrix, the steps of constructing a multi-view comparative learning framework include:

[0101] S301, constructing a front view based on the cell adjacency matrix and the gene co-expression matrix;

[0102] Based on the cell adjacency matrix and the gene co-expression matrix, the step of constructing the front view includes:

[0103] (1) integrating the edge lists of the cell adjacency matrix and the gene co-expression matrix;

[0104] (2) performing a random masking operation on the gene co-expression matrix;

[0105] (2) Combine the integrated edge list with the randomly masked gene expression matrix to construct the front view.

[0106] S302, constructing a spatial view based on the cell adjacency matrix;

[0107] S303, constructing a negative view based on the perturbation matrix;

[0108] S304: Process the front view, the spatial view, and the negative view using the InfoNCE loss function to construct a multi-view contrast learning framework.

[0109] Furthermore, the front view, the spatial view, and the negative view are processed using the InfoNCE loss function, including:

[0110] (1) performing batch normalization and nonlinear activation preprocessing on the latent representations of the front view, spatial view, and negative view;

[0111] (2) maximizing the similarity between the front view and the spatial view;

[0112] (3) minimizing the similarity between the spatial view and the negative view;

[0113] (4) The multi-view contrastive learning framework is optimized by combining reconstruction loss and contrastive learning loss.

[0114] Specifically, this embodiment designs a multi-view contrastive learning framework based on the above matrix ( Figure 1C in [1] and combines contrastive learning optimization methods to improve model learning performance. The framework includes positive, spatial, and negative views. The positive view integrates the gene co-expression matrix and the cell adjacency matrix to capture local and long-range gene expression coordination patterns. The spatial view uses the pixel adjacency matrix to describe local spatial features. The negative view enhances the diversity of feature embeddings by perturbing the matrix.

[0115] During the contrastive learning optimization process, the InfoNCE loss function is used to optimize the latent representation similarity of sample points in the positive and spatial views, while simultaneously extracting multi-level structural features from the gene co-expression matrix and the cell adjacency matrix. Combined with the edge-weighted graph attention mechanism and the application of a perturbation matrix, this method enhances the ability to distinguish between spatial and negative views, avoids spatial representation collapse, and ensures that gene expression features can be effectively distinguished during training.

[0116] In this embodiment, based on the three matrices in step 2, EW-GCLST constructs the front view, space view, and negative view. is obtained by integrating the cell adjacency matrix M cell (Gene X , Edge cell ) and gene co-expression matrix M coop (Gene X , Edge coop )'s edge list generates Edge ceco Gene expression matrix X Perform random mask operation to generate The front view combines the spatial proximity relationship and gene expression similarity information to enhance the model's ability to express complex biological features. cell (Gene X , Edge cell ) is based on the cell adjacency matrix M cell (Gene X , Edge cell ) is constructed, which retains the structural characteristics of local spatial relationships and provides basic support for the analysis of organizational structure. neg (X neg , Edge cell ) then use the perturbation matrix M per (X per , Edge cell By introducing a perturbation operation, the negative view prevents features from converging to a single distribution (feature collapse) in the representation space and improves the model's ability to distinguish different samples by increasing the separation between features.

[0117] In this embodiment, in multi-view learning, different views provide multi-dimensional information about the data structure, and contrastive learning provides a powerful tool for the model to capture the relationship between global and local features by maximizing the similarity of positive samples and the difference of negative samples. To this end, the model uses the InfoNCE loss function to extract discriminative information from the latent representations of the positive view, spatial view, and negative view. At the same time, to ensure the quality of the latent representation and the stability of contrastive learning, the model pre-processes the latent representations of the three views with batch normalization and nonlinear activation before learning. The specific formula is:

[0118] S′=φ(BN(S)) (1)

[0119] Among them, S is the original potential representation, S′ is the potential representation after batch normalization and activation function processing, φ is the activation function ELU, and BN represents batch normalization. The activation function ELU is defined as:

[0120]

[0121] Among them, when x ≥ 0, the input value is directly output, and when x < 0, the nonlinear output in the negative region is adjusted by the parameter β, and the gradient of the negative value is retained to enhance the training stability. The calculation formula of batch normalization is:

[0122]

[0123] where E[S] denotes the mean of the latent representation S, Var[S] denotes the variance, η is a small constant to prevent the denominator from being zero, and λ and δ are trainable scaling and bias parameters.

[0124] The model uses the InfoNCE loss function to calculate the contrast loss between views, and its formula is:

[0125]

[0126] Among them, s′ cell,i is the potential representation of the i-th sample in the spatial view, s′ pos,i and s′ neg,j are the potential representations of the positive and negative images, respectively. T is the temperature coefficient, which is set to 0.05 in 10X Visium data and 1 in Stereo-seq data. The similarity calculation formula is:

[0127]

[0128] By maximizing the similarity between the positive view and the spatial view, while minimizing the similarity between the spatial view and the negative view, the model can extract effective structural information and avoid representation collapse. Finally, the total loss function combines the reconstruction loss and the contrastive learning loss, and is defined as:

[0129]

[0130] Among them, μ is a balance parameter used to adjust the weight of contrastive learning in the overall optimization. In the experiment, it is set to 0.2 to achieve performance optimization and balance.

[0131] S4. Mapping the multiple views to a unified latent representation space through an edge-weighted graph attention autoencoder to obtain node embeddings;

[0132] Furthermore, the step of mapping the multiple views to a unified latent representation space by an edge-weighted graph attention autoencoder includes:

[0133] S401. Using the encoder of the edge-weighted graph attention autoencoder, calculate the influence of neighbor nodes on the central node and obtain a potential representation;

[0134] S402, using the decoder of the edge-weighted graph attention autoencoder to reconstruct the original features;

[0135] S403. Optimize the parameters of the edge-weighted graph attention autoencoder by minimizing the reconstruction loss.

[0136] Specifically, this embodiment uses an edge-weighted graph attention autoencoder (Edge-Weighted GAT, EW-GAT) to map the three views into a unified latent representation space ( Figure 1 D in the figure). Through the edge weighting mechanism and attention mechanism, the autoencoder can dynamically allocate attention weights between adjacent nodes, enhance the sensitivity to the strength of edge connections, and thus accurately capture local cooperation representations and key connections.

[0137] In order to improve the biological consistency and accuracy of the latent representation, the matching between the latent representation and the input gene expression profile is optimized by reconstruction loss function, which further improves the quality of latent space representation and ensures the influence of key nodes on spatial features.

[0138] This example uses the front view, spatial view, and negative view as input to EW-GCLST, and learns node representations through a shared edge-weighted graph attention autoencoder (EW-GAT). The EW-GAT autoencoder uses a single-head attention-based mechanism, combining graph attention and edge weight information, to effectively generate high-quality node embeddings by evaluating the importance of neighbor node features and the strength of edge connections. The introduction of edge weights plays a key role in the calculation of attention scores, enabling the model to capture more detailed graph structural features.

[0139] Compared with traditional graph attention autoencoders, EW-GAT demonstrates significant computational efficiency and memory optimization performance in large-scale graph data and resource-constrained environments. The single-head attention mechanism improves debugging and optimization efficiency by reducing model parameters and complexity, while avoiding the problem of excessive information fusion in multi-head attention, focusing on the key relationship between neighbor nodes and central nodes, and ensuring that the model's representation in specific tasks is more stable and efficient. In addition, combined with edge weight information, EW-GAT significantly enhances the ability to model the connection strength of the graph structure and can more accurately characterize the relationship between nodes. The autoencoder consists of two parts, an encoder and a decoder, which are used to map input features to the latent space and reconstruct the original features from the latent space. In the encoder, EW-GAT uses a single-head attention mechanism combined with edge weights to calculate the influence of neighbor nodes on the central node, thereby generating a potential representation of the node. The specific formula of the encoder is as follows:

[0140]

[0141] Among them, z i represents the potential representation of node i, σ is the activation function, and x j represents the input feature of node j, N(i) represents the neighbor set of node i, w ij represents the edge weight between nodes i and j, a ij is the attention weight calculated by the single-head attention mechanism, reflecting the relative importance between nodes i and j, Denotes the feature x applied to neighbor node j j The learnable weight matrix on . Attention weight α ij The calculation formula is:

[0142]

[0143] Among them, α ij represents the attention weight of node i to neighbor node j, α is a learnable vector, exp(LeakyReLU(·)) represents the nonlinear transformation through the LeakyReLU activation function, Represents the concatenation operation of the features of nodes i and j, and the denominator represents the normalization of the attention weights of all neighboring nodes k so that their sum is 1. The decoder is used to reconstruct the potential representation back to the original feature space, and its formula is:

[0144]

[0145] Where x′ i represents the reconstruction feature of node i, W′ d represents the learnable weight matrix in the decoder, σ is the activation function, and the potential representation z of the neighboring nodes j By edge weight wij and attention weight α ij Perform weighted summation. In this embodiment, the activation function σ uses LeakyReLU, which is defined as:

[0146]

[0147] When x ≥ 0, the input value is directly output. When x < 0, a negative slope α is introduced as a parameter to avoid the problem of the standard ReLU outputting zero in the negative region. The EW-GAT autoencoder optimizes the model parameters by minimizing the reconstruction loss, so that the reconstructed node features are as close as possible to the original input features. The loss function is defined as:

[0148]

[0149] Among them, L Rec represents the reconstruction loss, N is the total number of nodes in the graph, and x′ i is the node feature after model reconstruction, x i is the original feature of node i, and the loss is the square of the Euclidean distance between the two.

[0150] S5. Perform downstream analysis based on the node embedding.

[0151] Furthermore, the step of performing downstream analysis based on the node embedding includes:

[0152] Performing spatial domain clustering visualization based on the node embedding;

[0153] identifying specific marker genes based on the node embedding;

[0154] generating a UMAP cluster analysis graph based on the node embedding;

[0155] generating a density heatmap based on the node embeddings;

[0156] Differential genes are identified based on the node embedding, and enrichment analysis is performed on the differential genes.

[0157] Specifically, this embodiment performs spatial clustering analysis based on the potential representation of spatial views to accurately identify different spatial domains ( Figure 1 In addition, the present invention provides a variety of functional supports, including spatial clustering visualization, PAGA trajectory inference, identification of specific marker genes, variable gene screening, differential gene identification (such as Figure 2 ) and enrichment analysis (as shown in Figure 3 It provides a comprehensive and efficient tool for in-depth analysis of spatial transcriptome data.

[0158] By integrating edge-weighted graph attention mechanism and graph contrast learning technology, the present invention can efficiently and accurately analyze spatial transcriptome data and provide a more detailed and accurate spatial domain feature recognition and analysis method.

[0159] This example uses the potential representation of spatial transcriptome data for downstream analysis to achieve a deeper understanding of spatial structural characteristics. Downstream analysis mainly includes but is not limited to the following aspects:

[0160] Spatial Domain Cluster Visualization: We perform spatial cluster analysis and visualize the results using the latent representation of spatial views. This process accurately identifies and delineates spatial domains, revealing the spatial distribution of different cell types and tissue regions, helping researchers understand the complex spatial structure of spatial transcriptomic data.

[0161] Identification of specific marker genes: Gene co-expression matrices and cell adjacency matrices are used to identify marker genes associated with specific spatial domains or cell types. This step helps reveal genes that play important roles in specific spatial locations or tissue regions and provides data support for subsequent functional analysis and biomarker screening.

[0162] UMAP Cluster Analysis: Based on the latent representations in spatial data, the UMAP (Uniform Manifold Approximation and Projection) algorithm is used for dimensionality reduction and cluster analysis, generating a UMAP cluster diagram. This analysis can transform high-dimensional spatial data into low-dimensional representations, helping researchers identify important patterns and group structures in spatial data.

[0163] Density heatmap analysis: Density heatmap analysis can be used to display gene expression patterns and spatial structure distribution density in spatial transcriptome data. This analysis helps identify regions with concentrated gene expression and further reveals potential biological patterns in spatial data.

[0164] Differential gene identification: Differential gene detection methods are used to identify genes with significant changes between different spatial regions or tissue states. This analysis helps reveal genes associated with specific biological processes, disease states, or treatment responses, thereby providing valuable biomarkers for disease research and precision medicine.

[0165] Enrichment analysis: Combined with identified differentially expressed genes, functional enrichment analysis is performed to identify biological pathways and functional modules associated with gene expression changes. This analysis helps further understand the biological mechanisms behind gene expression changes and provides theoretical support for further disease research and clinical applications.

[0166] Through these downstream analysis steps, the framework provided by this invention can efficiently identify key structural and functional information in spatial transcriptome data, significantly improving the accuracy and interpretability of data analysis. This method has excellent performance across multiple datasets, demonstrating its broad application prospects in disease research, cell type localization, and functional gene identification.

[0167] Tables 2, 3, and 4 show the ARI, NMI, and FMI scores of the aforementioned methods for all slices in the DLPFC dataset, with the best results for each slice highlighted in bold. The results show that EW-GCLST demonstrates significant advantages in the spatial clustering task, with an average ARI score of 0.57, significantly higher than SEDR's 0.53, MuCoST and GraphST's 0.52, and STAGATE's 0.51, while the average ARI scores of the other methods did not exceed 0.50. Regarding the NMI metric, EW-GCLST achieved an average score of 0.68, surpassing CCST (0.59) and SpaGCN (0.54), and also exceeding the other methods (ranging from 0.64 to 0.66). Regarding the FMI metric, EW-GCLST was the only method to achieve an average score of 0.67, while the average scores of the other methods did not exceed 0.64.

[0168] Table 2

[0169] ARI EW-GCLST MuCoST SEDR STAligner GraphST STAGATE CCST SpaGCN 151507 0.51 0.45 0.51 0.49 0.49 0.52 0.48 0.47 151508 0.46 0.45 0.52 0.47 0.47 0.51 0.42 0.36 151509 0.54 0.47 0.45 0.49 0.49 0.47 0.43 0.46 151510 0.53 0.48 0.55 0.42 0.46 0.43 0.34 0.43 151669 0.51 0.49 0.42 0.47 0.47 0.43 0.34 0.27 151670 0.50 0.45 0.34 0.40 0.40 0.43 0.33 0.36 151671 0.62 0.61 0.61 0.57 0.57 0.57 0.46 0.50 151672 0.76 0.62 0.56 0.59 0.59 0.58 0.42 0.55 151673 0.66 0.59 0.62 0.57 0.57 0.60 0.36 0.38 151674 0.63 0.57 0.62 0.40 0.40 0.38 0.51 0.39 151675 0.54 0.51 0.61 0.44 0.44 0.60 0.37 0.34 151676 0.60 0.54 0.58 0.51 0.50 0.54 0.52 0.30

[0170] Table 3

[0171] NMI EW-GCLST MuCoST SEDR STAligner GraphST STAGATE CCST SpaGCN 151507 0.68 0.65 0.64 0.64 0.65 0.66 0.65 0.59 151508 0.65 0.64 0.64 0.61 0.66 0.66 0.57 0.46 151509 0.66 0.65 0.65 0.66 0.67 0.64 0.64 0.60 151510 0.62 0.61 0.66 0.60 0.64 0.62 0.56 0.57 151669 0.63 0.62 0.58 0.62 0.52 0.58 0.53 0.39 151670 0.57 0.58 0.53 0.57 0.56 0.58 0.52 0.48 151671 0.72 0.72 0.69 0.70 0.72 0.70 0.60 0.62 151672 0.75 0.71 0.67 0.69 0.72 0.69 0.57 0.64 151673 0.73 0.72 0.72 0.71 0.73 0.71 0.59 0.55 151674 0.73 0.68 0.73 0.54 0.64 0.50 0.64 0.55 151675 0.67 0.66 0.72 0.58 0.70 0.70 0.59 0.48 151676 0.68 0.63 0.69 0.65 0.68 0.67 0.63 0.47

[0172] Table 4

[0173]

[0174]

[0175] During experimental validation, EW-GCLST outperformed existing spatial clustering algorithms across multiple spatial transcriptome datasets, including the DLPFC dataset, mouse olfactory bulb dataset, adult mouse brain dataset, and human breast cancer dataset. Compared to leading methods such as MuCoST, SEDR, STAligner, GraphST, STAGATE, CCST, and SpaGCN, EW-GCLST demonstrated higher clustering accuracy, successfully capturing subtle spatial structures, such as the pyramidal cell layer, in a mouse brain slice dataset. In subcellular-resolution coronal slice data from the mouse olfactory bulb measured by Stereo-seq, EW-GCLST was able to resolve laminar structures in fine spatial domains. EW-GCLST demonstrated excellent performance and compatibility, accurately identifying spatial hierarchical structures and outperforming other methods.

[0176] Beneficial effects of this embodiment:

[0177] The proposed multi-view edge-weighted graph attention contrastive learning framework (EW-GCLST) can effectively integrate the relationship between spatial dependencies and gene expression from structural information at different scales, capturing the characteristics of complex spatial structures. This framework can accurately identify different spatial structural patterns in spatial transcriptome data analysis, thereby improving the clustering accuracy, compactness, and separability of spatial data.

[0178] Furthermore, through functional spatial domain analysis, EW-GCLST significantly improves the interpretability of complex heterogeneous breast cancer tissues, making it of great application value in clinical and biological research. Overall, the EW-GCLST framework enhances the ability to identify spatial structural patterns by integrating multi-perspective structural information and achieves consistent optimization results across multiple spatial analysis tasks, providing new methods and tools for spatial transcriptome data analysis.

[0179] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A spatial transcriptome data analysis method based on edge-weighted graph attention and multi-view contrastive learning, characterized by: The following steps are involved: Preprocessing the spatial transcriptome data to obtain preprocessed spatial transcriptome data; The spatial transcriptome data includes histological information, gene expression information and spatial location information; Based on the preprocessed spatial transcriptome data, the cell adjacency matrix, perturbation matrix and gene co-expression matrix were constructed; Based on the cell adjacency matrix, the perturbation matrix, and the gene co-expression matrix, a multi-view contrast learning framework is constructed, wherein the multi-view includes a positive view, a spatial view, and a negative view; Mapping the multiple views into a unified latent representation space through an edge-weighted graph attention autoencoder to obtain node embeddings; Downstream analysis is performed based on the node embeddings.

2. The method according to claim 1, characterized in that The step of preprocessing the spatial transcriptome data includes: Integrate histological information, gene expression information, and spatial location information of spatial transcriptome data; Eliminate sampling points that are not part of the main tissue area; performing normalization and logarithmic transformation on the gene expression information; Seurat v3 algorithm was used to screen highly variable genes from gene expression profiles; The highly variable genes screened were normalized.

3. The method according to claim 2, characterized in that Based on the preprocessed spatial transcriptome data, the steps of constructing the cell adjacency matrix include: For 10X Visium data, the cell adjacency matrix was constructed based on spatial coordinates using the KNN algorithm with radius restriction; For Stereo-seq data, the nearest neighbor algorithm was used to construct the cell adjacency matrix.

4. The method according to claim 1, wherein Based on the pre-processed spatial transcriptome data, the step of constructing a disturbance matrix includes: performing a random shuffling operation on the cell adjacency matrix; Perform a mask operation on the shuffled cell adjacency matrix to generate a perturbation matrix.

5. The method according to claim 1, wherein The steps of constructing a gene co-expression matrix based on the pre-processed spatial transcriptome data include: Calculate the cosine similarity of gene expression matrices between sampling points; Performing PCA dimensionality reduction on the cosine similarity; The gene co-expression matrix was constructed based on the cosine similarity after dimensionality reduction.

6. The method according to claim 1, characterized in that Based on the cell adjacency matrix, perturbation matrix, and gene co-expression matrix, the steps of constructing a multi-view contrastive learning framework include: constructing a front view based on the cell adjacency matrix and the gene co-expression matrix; constructing a spatial view based on the cell adjacency matrix; constructing a negative view based on the perturbation matrix; The positive view, spatial view and negative view are processed using the InfoNCE loss function to construct a multi-view contrast learning framework.

7. The method according to claim 6, characterized in that Based on the cell adjacency matrix and the gene co-expression matrix, the step of constructing the front view includes: integrating the edge lists of the cell adjacency matrix and the gene co-expression matrix; performing a random masking operation on the gene co-expression matrix; The integrated edge list is combined with the randomly masked gene expression matrix to construct the front view.

8. The method according to claim 6, characterized in that The processing of the front view, the spatial view, and the negative view using the InfoNCE loss function includes: performing batch normalization and nonlinear activation preprocessing on the latent representations of the front view, the spatial view, and the negative view; maximizing the similarity between the front view and the spatial view; minimizing the similarity between the spatial view and the negative view; The multi-view contrastive learning framework is optimized by combining reconstruction loss and contrastive learning loss.

9. The method according to claim 1, characterized in that The steps of mapping the multiple views to a unified latent representation space through an edge-weighted graph attention autoencoder include: Using the encoder of the edge-weighted graph attention autoencoder, the influence of neighbor nodes on the central node is calculated to obtain the potential representation; Use the decoder of the edge-weighted graph attention autoencoder to reconstruct the original features; The parameters of the edge-weighted graph attention autoencoder are optimized by minimizing the reconstruction loss.

10. The method according to claim 1, characterized in that The steps for performing downstream analysis based on the node embeddings include: Performing spatial domain clustering visualization based on the node embedding; identifying specific marker genes based on the node embedding; generating a UMAP cluster analysis graph based on the node embedding; generating a density heatmap based on the node embeddings; Differential genes are identified based on the node embedding, and enrichment analysis is performed on the differential genes.

Citation Information

Cited By

  • Spatial transcriptome data analysis method based on artificial intelligence

    CN121260260A

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

    CN121838890A