Spatial Transcriptomics Multi-View Clustering Method Based on Enhanced Spatial Expression and High-Confidence Guidance
By constructing a multi-view collaborative convolution network and a high-reliability clustering guidance module, the problem of failure to fully integrate gene expression and spatial location information in the existing technology is solved, and more accurate spatial domain recognition and trajectory inference are achieved, and cancer gene heterogeneity analysis is promoted.
Patent Information
- Application Number
- CN202510015448.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-01-06
AI Technical Summary
The existing spatial transcriptomics methods fail to fully explore their complementary information when integrating gene expression and spatial location information, resulting in limited performance in spatial domain recognition and trajectory inference.
By designing multi-view building blocks, building feature views, spatial views and enhanced views, combining collaborative convolutional networks and attention mechanisms, synergistic embeddings are generated, and cluster prediction is used to optimize the total loss function to improve cluster accuracy and stability.
It improves the accuracy of spatial domain recognition and the accuracy of trajectory inference, can better understand cancer gene heterogeneity, and conduct in-depth research on cell biology and disease development processes.
Smart Images

Figure CN119943164B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bioinformatics, and in particular to a spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance. Background Art
[0002] Spatial transcriptomics, a cutting-edge molecular biology technique, focuses on precisely capturing gene expression and simultaneously analyzing the spatial distribution of these expression patterns within tissue sections. Cleverly incorporating spatial dimensional information helps understand the regulation of gene expression by environmental factors, thereby further revealing the spatial heterogeneity of gene expression in disease states. Accurately identifying spatial domains is a core challenge in spatial transcriptomic analysis. Identifying spatial domains involves identifying regions where gene expression patterns and histologically consistent physical space are present.
[0003] To overcome this challenge, researchers have developed a series of innovative strategies in recent years aimed at deeply integrating spatial information with gene expression profiles. Existing spatial domain recognition methods can be roughly divided into two categories: those based on probabilistic modeling and those based on deep learning. In the field of probabilistic modeling, Giotto introduced the Hidden Markov Random Field model, which captures the complex spatial dependencies between spots to achieve precise positioning of the spatial domain. SpatialPCA innovatively improves the PCA method, taking location data as input and using a kernel matrix to simulate and strengthen the correlation structure between spots, thereby improving clustering effects.
[0004] In the field of deep learning, GraphST combines graph neural networks with self-supervised contrastive learning to learn gene structural features by minimizing the embedding distance between spatially adjacent spots. Spatial-MGCN uses a multi-view convolutional encoder to jointly model spatial structure and gene expression similarity and dynamically learn the complex dependencies between them through an attention mechanism. Although these methods have made significant progress, most focus on capturing the consistency between gene expression and position coordinates, while the complementary information contained in the data has not been fully explored. Although Spatial-MGCN reveals the complementarity between data to a certain extent by separately evaluating the similarity of gene expression and spatial location, its capture of the complex nonlinear characteristics of gene expression is still insufficient, limiting its further performance improvement. Therefore, further exploring how to more comprehensively integrate spatial location and gene expression data and deeply explore their complementarity is of great significance for promoting spatial transcriptome analysis to new heights. Summary of the Invention
[0005] The objective of the present invention is to provide a multi-view clustering method for spatial transcriptomics based on enhanced spatial expression and high-confidence guidance, which has good performance in spatial domain recognition, trajectory inference, and cancer gene heterogeneity, and is conducive to helping researchers deeply understand the cell biology and the development process of diseases.
[0006] To achieve the above objective, the present invention provides a multi-view clustering method for spatial transcriptomics based on enhanced spatial expression and high-confidence guidance, including the following steps:
[0007] Step 1: Design a multi-view construction module. First, construct a feature neighbor matrix and a spatial neighbor matrix, combine the gene expression matrix to form a feature view and a spatial view, and then construct a weighted neighbor matrix and generate a complementary enhanced gene expression matrix to construct an enhanced view to fully learn the complementary information of the gene expression structure;
[0008] Step 2: Construct a multi-view collaborative convolutional network framework, independently learn the embedding representation of each view, then introduce an attention mechanism to integrate the embeddings of each view to generate a more comprehensive and accurate collaborative embedding, and finally use the zero-inflated negative binomial distribution (ZINB) decoder to reconstruct the gene expression data based on the collaborative embedding;
[0009] Step 3: Design a high-confidence clustering guidance module, perform clustering prediction on the spatial embedding, feature embedding, enhanced embedding, and collaborative embedding through a weight-sharing pseudo-label classifier, and use the high-confidence clustering results as guidance to ensure the accuracy and stability of the clustering process;
[0010] Step 4: Jointly optimize the training total loss function, cluster the optimized collaborative embedding to generate clustering labels for downstream task analysis such as spatial domain recognition, visualization, and trajectory inference.
[0011] Preferably, Step 1 specifically includes the following steps:
[0012] Step 1.1: The spatial view consists of the spatial neighbor matrix and the original gene expression matrix X, is the preprocessed gene expression matrix, N is the number of spots, M is the number of filtered genes. If the Euclidean distance between spot i and spot j is less than the set threshold r, then set Otherwise, set Among them, is the value of the i-th row and j-th column of the spatial neighbor matrix, is the value of the j-th row and i-th column of the spatial neighbor matrix;
[0013] Step 1.2: The feature view consists of the feature neighbor matrix and the original gene expression matrix X. Based on the k-nearest neighbor algorithm, k spots with the smallest cosine distance to spot i are selected as its neighbors. If spot j is a neighbor of spot i , then Otherwise where, is the value of the i-th row and j-th column of the feature neighbor matrix;
[0014] Step 1.3: The enhanced view consists of the weighted neighbor matrix and the enhanced gene expression matrix . First, for each spot screened by the spatial view in Step 1.1, calculate the cosine distance between adjacent spots, and transform this distance into a similarity matrix The weighted neighbor matrix A w is calculated according to the following formula:
[0015] S ij = exp(2 - cosine_dist(spot i , spot j ));
[0016]
[0017] where, S ij is the feature similarity coefficient between spot i and spot j , is the value of the i-th row and j-th column of the weighted neighbor matrix;
[0018] Finally, obtain the enhanced gene expression level of each spot by comparing and learning the shared information of neighbors, thereby constructing the enhanced gene expression matrix, which is calculated according to the following formula:
[0019] X a = X + βXA w ;
[0020] where β is an adjustable parameter that can be manually set to control the influence of spatial neighborhood similarity on the spatial domain.
[0021] Preferably, Step 2 specifically includes the following steps:
[0022] Step 2.1: Use the feature view, spatial view, and enhanced view obtained in Step 1 as the feature convolutional network FGCN, spatial convolutional network SGCN, and enhanced convolutional network AGCN respectively to learn the embedding features of each view. The embedding of the feature convolutional network H f , the embedding of the spatial convolutional network H s , the embedding of the enhanced convolutional network Ha , calculated according to the following formula:
[0023]
[0024] Where, is the output of the (l + 1)-th convolutional layer of view ι, is the output of the l-th convolutional layer of view ι, and W ι (l) is the trainable parameter matrix of the l-th convolution of view ι. The value of view ι is {s, f, a}, and the initial value of the convolutional network is set σ is the activation function in the convolutional network, is 's angular matrix, is the angular matrix the result of taking the reciprocal of the power, and I N is an identity matrix of size N×N;
[0025] Step 2.2, Based on the three views obtained in Step 1, construct a co-convolutional network CoGCN to extract and construct the co-embedding representation between the three views. The propagation rule of the co-convolutional network is defined as follows:
[0026]
[0027] Where, is the latent embedding extracted from the (l + 1)-th co-convolutional network of view ρ, is the trainable parameter matrix of the l-th layer of the co-convolutional network, is the latent embedding extracted from the l-th co-convolutional network of view ρ. The value of view ρ is {s, f, a}, and the initial layer is set to is 's angular matrix, is an adjacency matrix with self-loops added, where I N is an identity matrix of size N×N, is the angular matrix the result of taking the reciprocal of the
[0028] Step 2.3, Based on the co-convolutional network in Step 2.2, obtain the feature co-embedding of the l-th layer Spatial co-embedding Enhanced co-embedding Calculate the co-embedding of the l-th layer according to the following formula
[0029]
[0030] Step 2.4: Introduce an attention mechanism for adaptively learning the contribution degree of each embedding, and integrate the feature embedding H f , the spatial embedding H s , the enhanced embedding H a and the co-embedding H c , and obtain the collaborative embedding H to achieve fine-grained recognition in the spatial domain. The contribution degree of each view embedding is calculated according to the following formula:
[0031] ξ ν = softmax(W ν ·σ(WH ν + b));
[0032] where σ is the activation function, W is the trainable weight matrix, b is the bias vector, and H ν represents each view embedding, where ν takes values from {s, f, a, c}, and ξ ν is the contribution degree coefficient of view ν to the collaborative embedding H. Combine each view embedding to obtain the final collaborative embedding H, which is calculated according to the following formula:
[0033]
[0034] where, is a single linear layer for learning highly variable features of the embedding;
[0035] Step 2.5: Use the ZINB distribution model to simulate the distribution of latent features and capture the features of the collaborative embedding, that is, reconstruct the original gene expression matrix X data using the distribution parameters of the collaborative embedding matrix:
[0036]
[0037] ZINB(X|π, μ, θ) = π·δ0(x)+(1 - π)·NB(X|μ, θ);
[0038] where μ and θ represent the mean and dispersion, π controls the probability of the zero-value production process, NB(X|μ, θ) is the negative binomial distribution part, representing the distribution in the non-zero production process; Γ(X + θ) is the gamma function value of X + θ, Γ(θ) is the gamma function value of θ, X! is the factorial of X, and δ0(x) is an indicator function used to represent the zero-value production process;
[0039] Step 2.6: After obtaining the collaborative embedding, connect three fully connected layers to learn the parameters corresponding to the ZINB model, and use the negative log-likelihood reconstruction loss L zinb , which is defined as follows:
[0040] L zinb= ∑ -log(ZINB(X|π,μ,θ)).
[0041] Preferably, step 3 specifically includes the following steps:
[0042] Step 3.1, input the spatial embedding H s , the feature embedding H f , the enhancement embedding H a and the collaborative embedding H into the pseudo-label classifier with shared weights for clustering prediction, generating the corresponding clustering distribution matrix, Y s = gc(H s ), Y f = gc(H f ), Y a = gc(H a ), Y = gc(H), gc is the pseudo-label classifier with shared weights, C is the number of clustering clusters. For the sake of convenience of expression, define to represent the clustering distribution vector of the j-th column of Y s , Y f , Y a , Y and Y s are represented uniformly,[[]]
[0043]
[0044] wherein,[[]] represents the probability value that Y s is assigned to the j-th cluster,[[]] is the probability value that spot i in the clustering distribution matrix of the spatial embedding is assigned to the j-th cluster;[[]]
[0045] Step 3.2, calculate the contrast loss between the clustering distribution vectors of each cluster in the feature embedding H f , the spatial embedding H s and the enhancement embedding H a . By minimizing this loss, the ambiguity of the clustering result is effectively reduced and calculated according to the following formula:[[]]
[0046]
[0047] wherein,[[]] represents calculating the contrast loss of the j-th cluster of the spatial embedding H s ,[[]] represents calculating the contrast loss of the j-th cluster of the feature embedding H f ,[[]] represents calculating the contrast loss of the j-th cluster of the enhancement embedding H a ,[[]] is[[[]] and[[[]] The exponential result of the similarity function between for and The exponential result of the similarity function between for and The exponential result of the similarity function between them, τ is the cluster-level weight parameter that controls the softness, and the total contrast loss of clustering is expressed as follows:
[0048]
[0049] in, represents information entropy, is the maximum entropy, is the distribution probability of the t-th sample in the j-th cluster of the spatially embedded cluster distribution matrix, T(Y f ) is Y f The information entropy, T(Y a ) is Y a The information entropy, T(Y f ) and T(Y a ) and T(Y s ) is calculated in the same way;
[0050] Step 3.3, based on the four cluster distribution matrices, adopt the maximum cluster selection strategy, select the maximum value of the probability of each spot belonging to each cluster from the four matrices, so as to determine the target cluster of the spot, and then construct the target distribution matrix Q, spot i Cluster soft labels are calculated using the following formula:
[0051]
[0052] Step 3.4: Soft label q based on step 3.3 ij To improve the high confidence of the collaborative embedding H, the target distribution matrix Q is normalized so that the sum of all cluster probabilities of each spot is 1, calculated as follows:
[0053]
[0054] Among them, p ij is the normalized probability value, ensuring that the sum of all cluster probabilities of each sample is 1, is the maximum probability value selected from the four cluster distribution matrices to determine the target cluster for each sample;
[0055] Step 3.5: The normalized target distribution matrix P is used as an auxiliary guide for clustering results. The optimization target is calculated according to the following formula:
[0056]
[0057] Among them, KL(Y‖P) represents the KL divergence between the clustering distribution matrix Y and the target distribution matrix P, and y ij is the probability of the i-th sample in the clustering distribution matrix Y in the j-th cluster.
[0058] Preferably, step 4 specifically includes the following steps:
[0059] Step 4.1: Calculate the cosine similarity matrix and the spatial neighbor matrix A of the collaborative embedding H s of the cross-entropy loss, ensuring that the collaborative embedding of each spot is as similar as possible to its adjacent spots in space during the model training process. The spatial consistency constraint loss is calculated according to the following formula:
[0060]
[0061] where cosine_dist(H i , H j ) represents the cosine similarity calculated based on the collaborative embedding between spot i and spot j , δ i is the spatial neighbor set of spot i , H i is the spatial embedding vector of spot i , and H j is the spatial embedding vector of spot j ;
[0062] Step 4.2: Jointly optimize the high-confidence clustering guidance loss, the ZINB reconstruction loss, and the spatial consistency constraint loss. The total loss objective of stMHCG is defined as follows:
[0063] L = ε1L reg + ε2L clu + ε3L hcg + ε4L zinb ;
[0064] where, L reg is the spatial consistency constraint, L clu is the clustering loss, L hcg is the high-confidence clustering guidance loss, L zinb is the ZINB reconstruction loss, and ε1, ε2, ε3, ε4 are weighting factors that balance the influence of the loss functions.
[0065] Therefore, the present invention adopts the above-mentioned spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance, which has good performance in spatial domain identification, trajectory inference, and cancer gene heterogeneity, and is conducive to helping researchers deeply understand the process of cell biology and disease development.
[0066] The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 is a schematic flowchart of the present invention;
[0068] Figure 2 is a box plot of the manual annotation results of the human dorsolateral prefrontal cortex dataset and the ARI and NMI metrics of the present invention and other methods on this dataset;
[0069] Figure 3 is a result graph of spatial domain recognition of the present invention and other methods on the human dorsolateral prefrontal cortex dataset;
[0070] Figure 4 is a result graph of spatial domain recognition of the present invention and other methods on the mouse visual cortex dataset;
[0071] Figure 5 is a result graph of visualization and trajectory inference of the present invention and other methods on the human dorsolateral prefrontal cortex dataset;
[0072] Figure 6 Result graph of spatial domain recognition of the present invention on the human breast cancer dataset;
[0073] Figure 7 is a result graph of gene heterogeneity analysis of the present invention on the human breast cancer dataset. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0074] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0075] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the ordinary meanings understood by those of ordinary skill in the field to which the present invention belongs.
[0076] Embodiment 1
[0077] As Figure 1 shown, the present invention provides a multi-view clustering method for spatial transcriptomics based on enhanced spatial expression and high-confidence guidance, including the following steps:
[0078] Step 1: As Figure 1 shown in A of, design a multi-view construction module. First, construct a feature neighbor matrix and a spatial neighbor matrix, combine the gene expression matrix to form a feature view and a spatial view, and then construct a weighted neighbor matrix and generate a complementary enhanced gene expression matrix to construct an enhanced view to fully learn the complementary information of the gene expression structure;
[0079] Specifically, it includes the following steps:
[0080] Step 1.1. The spatial view consists of the spatial neighbor matrix and the original gene expression matrix X. is the preprocessed gene expression matrix, N is the number of spots, M is the number of filtered genes. If the Euclidean distance between spot i and spot j is less than the set threshold r, then set Otherwise, set where, is the value of the i-th row and j-th column of the spatial neighbor matrix, is the value of the j-th row and i-th column of the spatial neighbor matrix;
[0081] Step 1.2. The feature view consists of the feature neighbor matrix and the original gene expression matrix X. Based on the k-nearest neighbor algorithm, select the k spots with the smallest cosine distance from spot i as its neighbors. If spot j is a neighbor of spot i , then Otherwise where, is the value of the i-th row and j-th column of the feature neighbor matrix;
[0082] Step 1.3. The enhanced view consists of the weighted neighbor matrix and the enhanced gene expression matrix . First, according to the neighbors of each spot selected by the spatial view in Step 1.1, calculate the cosine distance between adjacent spots, and transform this distance into a similarity matrix The weighted neighbor matrix A w is calculated according to the following formula:
[0083] S ij = exp(2 - cosine_dist(spot i , spot j ));
[0084]
[0085] where, S ij is the feature similarity coefficient between spot i and spot j , is the value of the i-th row and j-th column of the weighted neighbor matrix;
[0086] Finally, by comparing and learning the shared information of neighbors, obtain the enhanced gene expression level of each spot, and thus construct the enhanced gene expression matrix, which is calculated according to the following formula:
[0087] X a = X + βXA w ;
[0088] where β is an adjustable parameter that can be manually set to control the influence of spatial neighborhood similarity on the spatial domain.
[0089] Step 2, as shown in B of Figure 1 construct a multi-view collaborative convolutional network framework, independently learn the embedding representations of each view, then introduce an attention mechanism to integrate the embeddings of each view to generate a more comprehensive and accurate collaborative embedding, and finally use the zero-inflated negative binomial distribution ZINB decoder to reconstruct the gene expression data based on the collaborative embedding;
[0090] Specifically, it includes the following steps:
[0091] Step 2.1, use the feature view, spatial view, and enhanced view obtained in Step 1 as the feature convolutional network FGCN, spatial convolutional network SGCN, and enhanced convolutional network AGCN respectively to learn the embedding features of each view. The embedding of the feature convolutional network H f , the embedding of the spatial convolutional network H s , and the embedding of the enhanced convolutional network H a are calculated according to the following formula:
[0092]
[0093] where, is the output of the (l + 1)-th convolutional layer of view ι, is the output of the l-th convolutional layer of view ι, and W ι (l) is the trainable parameter matrix of the l-th convolution of view ι. View ι takes values of {s, f, a}. The initial value of the convolutional network is set σ is the activation function in the convolutional network, is 's angular matrix, is the result of taking the reciprocal of the -th power of the angular matrix, is an adjacency matrix with self-loops added, where I N is an identity matrix of size N×N;
[0094] Step 2.2, based on the three views obtained in Step 1, construct a co-convolutional network CoGCN to extract and construct the co-embedding representation between the three views. The propagation rule of the co-convolutional network is defined as follows:
[0095]
[0096] where, is the latent embedding extracted from the l+1th layer of the co-convolutional network for view ρ, is the trainable parameter matrix of the lth layer of the co-convolutional network, is the latent embedding extracted from the lth layer of the co-convolutional network for view ρ, where the value of view ρ is {s, f, a}, and the initial layer is set to is the corner matrix of is an adjacency matrix with self-loops added, where I N is an identity matrix of size N×N, is the corner matrix the result of taking the reciprocal of the
[0097] Step 2.3, based on the co-convolutional network in Step 2.2, obtain the feature co-embedding of the lth layer Spatial co-embedding Enhanced co-embedding Calculate the lth layer co-embedding according to the following formula
[0098]
[0099] Step 2.4, introduce an attention mechanism for adaptively learning the contribution degrees of each embedding, and integrate the feature embedding H f , the spatial embedding H s , the enhanced embedding H a and the co-embedding H c , to obtain the collaborative embedding H to achieve fine-grained recognition in the spatial domain. The contribution degrees of each view embedding are calculated according to the following formula:
[0100] ξ ν = softmax(W ν ·σ(WH ν + b));
[0101] where σ is the activation function, W is the trainable weight matrix, b is the bias vector, and H ν represents each view embedding, where ν takes values of {s, f, a, c}, and ξ ν is the contribution degree coefficient of view ν to the collaborative embedding H. Combine each view embedding to obtain the final collaborative embedding H, and calculate it according to the following formula:
[0102]
[0103] where, is a single linear layer for learning highly variable features of the embedding;
[0104] Step 2.5: Use the ZINB distribution model to simulate the distribution of latent features and capture the co-embedded features, that is, reconstruct the original gene expression matrix X data using the distribution parameters of the co-embedded matrix:
[0105]
[0106] ZINB(X|π,μ,θ)=π·δ0(x)+(1-π)·NB(X|μ,θ);
[0107] where μ and θ represent the mean and dispersion, π controls the probability of the zero-value production process, NB(X|μ,θ) is the negative binomial distribution part, representing the distribution in the non-zero generation process; Γ(X + θ) is the gamma function value of X + θ, Γ(θ) is the gamma function value of θ, X! is the factorial of X, and δ0(x) is an indicator function used to represent the zero-value generation process;
[0108] Step 2.6: After obtaining the co-embedding, connect three fully connected layers to learn the parameters corresponding to the ZINB model, and use the negative log-likelihood reconstruction loss L zinb , defined as follows:
[0109] L zinb =∑-log(ZINB(X|π,μ,θ));
[0110] Step 3: As shown in C in Figure 1 , design a high-confidence clustering guidance module to perform clustering predictions on the spatial embedding, feature embedding, enhanced embedding, and co-embedding through a pseudo-label classifier with weight sharing, and use the high-confidence clustering results as guidance to ensure the accuracy and stability of the clustering process;
[0111] Specifically, it includes the following steps:
[0112] Step 3.1: Input the spatial embedding H s , feature embedding H f , enhanced embedding H a and co-embedding H into the pseudo-label classifier with weight sharing for clustering prediction, and generate the corresponding clustering distribution matrix, Y s =gc(H s ), Y f =gc(H f ), Y a =gc(H a ), Y=gc(H), gc is the pseudo-label classifier with weight sharing, C is the number of clustering clusters, and for the sake of convenience of expression, it is defined that represents the clustering distribution vector of the j-th column of Y s , Y f , Y a, Y and Y s represents unity
[0113]
[0114] where represents the probability value that Y s is assigned to the j-th cluster, is the probability value that spot in the clustering distribution matrix of spatial embedding i is assigned to the j-th cluster;
[0115] Step 3.2, calculate the contrast loss between the clustering distribution vectors of each cluster in the feature embedding H f , the spatial embedding H s and the enhanced embedding H a . By minimizing this loss, the ambiguity of the clustering result is effectively reduced, and it is calculated according to the following formula:
[0116]
[0117]
[0118] where represents the contrast loss of the j-th cluster for calculating the spatial embedding H s , represents the contrast loss of the j-th cluster for calculating the feature embedding H f , represents the contrast loss of the j-th cluster for calculating the enhanced embedding H a , is and the exponentiated result of the similarity function between them, is and the exponentiated result of the similarity function between them, is and the exponentiated result of the similarity function between them, τ is the cluster-level weight parameter that controls softness, and the total clustering contrast loss is expressed as follows:
[0119]
[0120] where represents the information entropy, is to maximize the entropy, is the distribution probability of the t-th sample in the j-th cluster of the clustering distribution matrix of spatial embedding, T(Y f ) is the information entropy of Y f , T(Y a ) is the information entropy of Y a ) is the information entropy of Yf ) and T(Y a ) and T(Y s ) has the same calculation method, which is a strategy to avoid allocating all spots to the same cluster;
[0121] Step 3.3: Based on the four clustering distribution matrices, adopt the maximum cluster selection strategy. On each spot, select the maximum value among the probabilities of belonging to each cluster from the four matrices to determine the target cluster of the spot, and then construct the target distribution matrix Q, spot i The clustering soft labels are calculated according to the following formula:
[0122]
[0123] Step 3.4: Based on the soft label q in Step 3.3 ij Boost the high confidence of the collaborative embedding H, normalize the target distribution matrix Q, so that the sum of the probabilities of all clusters for each spot is 1, and calculate according to the following formula:
[0124]
[0125] where, p ij is the normalized probability value, ensuring that the sum of the probabilities of all clusters for each sample is 1, is the maximum probability value selected from the four clustering distribution matrices, used to determine the target cluster of each sample;
[0126] Step 3.5: Normalize the target distribution matrix P as an auxiliary to guide the clustering result, and calculate the optimization objective according to the following formula:
[0127]
[0128] where, KL(Y||P) represents the KL divergence between the clustering distribution matrix Y and the target distribution matrix P, and y ij is the probability of the i-th sample in the j-th cluster in the clustering distribution matrix Y.
[0129] Step 4: Jointly optimize the training total loss function, cluster the optimized collaborative embedding, generate clustering labels, and be used for downstream task analysis such as spatial domain recognition, visualization, and trajectory inference;
[0130] Specifically, it includes the following steps:
[0131] Step 4.1: Calculate the cosine similarity matrix of the collaborative embedding H and the cross-entropy loss of the spatial neighbor matrix A s to ensure that the collaborative embedding of each spot is as similar as possible to its adjacent spots in space during the model training process. The spatial consistency constraint loss is calculated according to the following formula:
[0132]
[0133] where cosine_dist(H i , H j ) represents the cosine similarity of spot i and spot j calculated based on co - embedding, δ i is the spatial neighbor set of spot i , H i is the spatial embedding vector of spot i , and H j is the spatial embedding vector of spot j ;
[0134] Step 4.2, jointly optimize the high - confidence clustering guidance loss, ZINB reconstruction loss, and spatial consistency constraint loss. The total loss objective of stMHCG is defined as follows:
[0135] L = ε1L reg + ε2L clu + ε3L hcg + ε4L zinb ;
[0136] where L reg is the spatial consistency constraint, L clu is the clustering loss, L hcg is the high - confidence clustering guidance loss, L zinb is the ZINB reconstruction loss, and ε1, ε2, ε3, ε4 are weighting factors for weighing the influence of the loss functions.
[0137] To verify the effectiveness of the present invention, in this embodiment, the performance of the present invention is tested from three aspects: spatial domain recognition, trajectory inference, and cancer heterogeneity analysis.
[0138] 1. Dataset and evaluation metrics
[0139] (1) Dataset
[0140] Obtain the gene expression matrices, spatial location information, and histological images of 3 datasets from the 10X Visium and STARmap platforms. The dataset overview is shown in Table 1. The first dataset is 12 human dorsolateral prefrontal cortex slices (Layer1 - Layer6) and white matter layer (WM) manually annotated by Maynard et al. through marker genes and cell structures. The second dataset is the mouse visual cortex with 7 strip regions. The third dataset comes from the 10X Visium platform and focuses on human breast cancer tissue, containing 20 spatial regions.
[0141] (2) Evaluation metrics
[0142] The most direct way to quantify the impact of clustering is to assess the differences in the clustering results from different cluster vectors. stMHCG uses the Adjusted Rand Index (ARI) and Normalized Mutual Information (NMI) as metrics to evaluate clustering effectiveness. Higher ARI and NMI values indicate a higher consistency between the clustering results and the ground truth, thus reflecting a higher clustering accuracy.
[0143] Table 1 Dataset overview
[0144]
[0145] 2. Comparative Analysis of Experimental Results
[0146] (1) Spatial domain recognition experiment
[0147] a. Human dorsolateral prefrontal cortex dataset
[0148] like Figure 2 As shown in , stMHCG first implemented experiments on 12 slices of the human dorsolateral prefrontal cortex dataset. Figure 2 A in the figure is the spatial domain result of the DLPFC151510 dataset manually annotated, which serves as the benchmark for the experiment. Figure 2 B and Figure 2 As shown in Figure C, the performance of stMHCG is compared with five state-of-the-art methods: SpaGCN, SEDR, STAGATE, GraphST, and Spatial-MGCN. The experimental results show that stMHCG achieves the highest average ARI and NMI values across 12 slices. This demonstrates that the enhanced view design of stMHCG complements the original gene expression and spatial coordinate data, providing complementary information on the underlying structure of gene expression and improving clustering accuracy.
[0149] like Figure 3 As shown in the figure, in the spatial domain recognition visualization results, stMHCG also demonstrated the ability to be closest to the actual annotation results. In contrast, SpaGCN and STAGATE were unable to distinguish the boundaries of different spot types, resulting in unnecessary discrete points in the same area. SEDR failed to accurately identify Layer 2 and made mistakes in identifying the strip areas of Layer 1. Although GraphST and Spatial-MGCN identified the seven main areas more accurately, the recognition width of Layer 6 exceeded the actual range. However, stMHCG, with its high-confidence multi-view clustering guidance, was able to accurately capture the true width of Layer 6 and achieve more accurate boundary division.
[0150] b. Mouse visual cortex dataset
[0151] As shown Figure 4 in the figure, spatial domain recognition experiments were further conducted in seven striate layers of the mouse visual cortex. Figure 4 In [reference], A shows the manually annotated results of this data. Two evaluation metrics, ARI and NMI, were used to compare and analyze these six methods, as shown in Figure 4 B in the figure. Among them, the ARI value of stMHCG is 0.463, ranking first, and the NMI value is 0.721, slightly lower than the STAGATE method, ranking second. Due to its enhanced data and highly reliable algorithm design, stMHCG successfully and relatively accurately delineated seven different strip regions, as shown in Figure 4 C1 in the figure, thus verifying its advantage in analyzing complex spatial structures. On the contrary, as shown in Figure 4 C2 in the figure, Figure 4 C3 in the figure, and Figure 4 C4 in the figure, GraphST, STAGATE, and SEDR showed varying degrees of misclassification during the clustering process, including the incorrect fusion of layer L1 and layer L2 - 3, and unclear boundary division in different regions, jointly indicating their limitations in dealing with specific spatial patterns. In summary, stMHCG demonstrated excellent performance and robustness in the spatial domain recognition task related to the STARmap mouse visual cortex, highlighting its potential as a valuable tool for neuroscience research.
[0152] (2) Trajectory inference experiment
[0153] As shown Figure 5 in the figure, to prove that the learned features of stMHCG can be well generalized to other downstream tasks, uniform manifold approximation and projection (UMAP) was further used on the human dorsolateral prefrontal cortex dataset to visualize the distance between clustering and PAGA, thereby inferring the spatial trajectory. In the UMAP maps of SEDR and SpaGCN, spots in layer 2 and layer 4, layer 3 and layer 5 were mixed. STAGATE, GraphST, Spatial - MGCN, and stMHCG all well separated all clusters, but it can be seen that the trajectory inference of STAGATE and GraphST was incorrect. Only Spatial - MGCN and stMHCG correctly inferred the trajectory from layer 1 to layer 6 and then to the VM layer. In the visualization results, compared with other methods, stMHCG showed a higher degree of aggregation and differentiation, promoting closer clustering of similar cell types.
[0154] (3) Cancer heterogeneity analysis experiment
[0155] As shown Figure 6As shown, when performing spatial domain recognition tasks on the human breast cancer dataset, stMHCG found that stMHCG identified two different spot types (cluster 3 and cluster 13) in cluster IDC_8. SEDR and STAGATE also responded to this observation, but stMHCG showed more superior cluster boundaries. Similarly, in cluster DCIS / LCIS_4, stMHCG accurately separated two spot types (cluster 2 and cluster 12). To delve into the molecular basis of these cell clusters, the top four differential genes of clusters 3 and 13 and clusters 2 and 12 were selected respectively. The different expression patterns of these genes between clusters were depicted by violin plots, highlighting the substantial differences between cluster 3 and cluster 13, as Figure 7 shown in A of
[0156] To further analyze the gene expression differences between cluster IDC_6 and cluster DCIS / LCIS_2, volcano plots were drawn to identify 109 differentially expressed genes with statistical significance, as Figure 7 shown in B of
[0157] Among them, matrix metalloproteinase-7 (MMP-7) and secretory leukocyte protease inhibitor (SLPI) play key roles in the invasive and metastatic processes of breast cancer and the survival prognosis of patients. The close association between MMP-7 single nucleotide polymorphism and the survival rate of breast cancer patients has been widely and systematically verified. On the other hand, it has been found that in the highly metastatic triple-negative breast cancer TNBC4T1 cell model, the gene expression level of SLPI is significantly higher than that of non-metastatic cells. This finding has opened up new horizons for breast cancer treatment strategies, suggesting that targeted inhibition of SLPI secretion may become a potential and novel treatment approach that can effectively reduce the incidence of breast cancer.
[0157] Therefore, the present invention adopts the above-mentioned spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance, which has good performance in spatial domain recognition, trajectory inference, and cancer gene heterogeneity, and is conducive to helping researchers deeply understand the process of cell biology and disease development.
[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify or equivalently replace the technical solutions of the present invention, and such modifications or equivalent replacements do not make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance, characterized by: The following steps are involved: Step 1: Design a multi-view construction module. First, construct a feature neighbor matrix and a spatial neighbor matrix. Combined with the gene expression matrix, the feature view and the spatial view are constructed. Then, by constructing a weighted neighbor matrix and generating a complementary enhanced gene expression matrix, an enhanced view is constructed to fully learn the complementary information of the gene expression structure. Step 2: Build a multi-view collaborative convolutional network framework to independently learn the embedding representation of each view. Then, introduce an attention mechanism to integrate the embeddings of each view to generate a more comprehensive and accurate collaborative embedding. Finally, use the zero-inflated negative binomial distribution (ZINB) decoder to reconstruct the gene expression data based on the collaborative embedding. Step 3: Design a high-confidence clustering guidance module to perform cluster predictions on spatial embedding, feature embedding, enhanced embedding, and collaborative embedding through a weight-sharing pseudo-label classifier. Use the high-confidence clustering results as guidance to ensure the accuracy and stability of the clustering process. Step 4: Jointly optimize the total training loss function, cluster the optimized collaborative embeddings, and generate cluster labels for downstream task analysis such as spatial domain recognition, visualization, and trajectory inference.
2. The spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance according to claim 1, characterized in that: Step 1 specifically includes the following steps: Step 1.1: Spatial view is determined by spatial neighbor matrix and the original gene expression matrix X, is the gene expression matrix after preprocessing, N is the number of spots, M is the number of genes after filtering, if spot i with spot j The Euclidean distance between them is less than the set threshold r, then set Otherwise set in, is the value of the i-th row and j-th column of the spatial neighbor matrix, is the value of the jth row and ith column of the spatial neighbor matrix; Step 1.2, the feature view is composed of the feature neighbor matrix and the original gene expression matrix X, based on the k-nearest neighbor algorithm to select and spot i The k spots with the smallest cosine distance are its neighbors. If spot j It's spot i 's neighbors, then otherwise in, is the value of the i-th row and j-th column of the feature neighbor matrix; Step 1.3: Enhance the view by weighted neighbor matrix and enhanced gene expression matrix First, we calculate the cosine distance between adjacent spots based on the neighbors of each spot filtered out by the spatial view in step 1.1, and transform this distance into a similarity matrix through exponential transformation. Weighted neighbor matrix A w Calculated using the following formula: S ij =exp(2-cosine_dist(spot i ,spot j )); Among them, S ij spot i with spot j Feature similarity coefficient, is the value of the i-th row and j-th column of the weighted neighbor matrix; Finally, the enhanced gene expression of each spot is obtained by comparing and learning the shared information of neighbors, thereby constructing the enhanced gene expression matrix, which is calculated according to the following formula: X a =X+βXA w ; Where β is an adjustable parameter that can be manually set to control the impact of spatial neighborhood similarity on the spatial domain.
3. The spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance according to claim 1, characterized in that: Step 2 specifically includes the following steps: Step 2.1: The feature view, spatial view, and enhanced view obtained in step 1 are used as the feature convolution network FGCN, the spatial convolution network SGCN, and the enhanced convolution network AGCN to learn the embedded features of each view. The feature convolution network embeds H f , spatial convolutional network embedding H s , enhanced convolutional network embedding H a , calculated according to the following formula: in, is the output of the l+1th convolutional layer of view ι, is the output of the l-th convolutional layer of view ι, is the trainable parameter matrix of the l-th layer convolution of view ι, view ι takes the value of {s, f, a}, and the initial value of the convolution network is set σ is the activation function in the convolutional network, yes The angle matrix of is the diagonal matrix The result of taking the reciprocal of the power is is an adjacency matrix with self-loops added, where I N is an N×N identity matrix; Step 2.2: Based on the three views obtained in step 1, a co-convolutional network CoGCN is constructed to extract and construct the co-embedding representation between the three views. The propagation rule of the co-convolutional network is defined as follows: in, is the latent embedding extracted from the l+1th layer co-convolutional network for view ρ, is the trainable parameter matrix of the lth layer of the co-convolutional network, is the potential embedding extracted from the l-th layer of the co-convolutional network for view ρ, where the value of view ρ is {s, f, a} and the initial layer is set to yes The angle matrix of is an adjacency matrix with self-loops added, where I N is an N×N identity matrix, is the diagonal matrix The result of taking the reciprocal of the power; Step 2.3: Based on the co-convolutional network in step 2.2, the feature co-embedding of the lth layer is obtained. Spatial co-embedding Enhanced co-embedding The co-embedding of the lth layer is calculated according to the following formula Step 2.4: Introduce the attention mechanism for adaptively learning the contribution of each embedding and integrate the feature embedding H f , spatial embedding H s , enhanced embedding H a and co-embedded H c , we get the collaborative embedding H to achieve fine-grained recognition in the spatial domain, and the embedding contribution of each view is calculated according to the following formula: x ν =softmax(W ν ·σ(WH ν +b)); Among them, σ is the activation function, W is the trainable weight matrix, b is the bias vector, H ν Represents the embedding of each view, where ν is {s, f, a, c}, ξ ν is the contribution coefficient of view ν to the collaborative embedding H. The final collaborative embedding H is obtained by combining the embeddings of each view, which is calculated as follows: in, is a single linear layer used to learn highly variable features for embedding; Step 2.5: Use the ZINB distribution model to simulate the distribution of potential features and capture the characteristics of co-embedding. That is, use the distribution parameters of the co-embedding matrix to reconstruct the original gene expression matrix X data: ZINB(X|π,μ,θ)=π·δ0(x)+(1-π)·NB(X|μ,θ); where μ and θ represent the mean and dispersion, π controls the probability of the zero-value production process, NB(X|μ,θ) is the negative binomial distribution, representing the distribution during the non-zero generation process; Γ(X+θ) is the gamma function value of X+θ, Γ(θ) is the gamma function value of θ, X! is the factorial of X, and δ0(x) is an indicator function used to represent the zero-value generation process; Step 2.6: After obtaining the collaborative embedding, connect 3 fully connected layers to learn the parameters corresponding to the ZINB model and use the negative log-likelihood reconstruction loss L zinb , defined as follows: L zinb =Σ-log(ZINB(X|π,μ,θ)).
4. The spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance according to claim 1, characterized in that: Step 3 specifically includes the following steps: Step 3.1: Embed the space into H s , feature embedding H f , enhanced embedding H a And the collaborative embedding H is input into the weight-sharing pseudo-label classifier for cluster prediction to generate the corresponding cluster distribution matrix, Y s =gc(H s ), Y f =gc(H f ), Y a =gc(H a ), Y=gc(H), gc is a weight-sharing pseudo-label classifier, C is the number of clusters, and for ease of expression, we define Indicates Y s The cluster distribution vector of the jth column, Y f ,Y a ,Y and Y s To express unity, in, Indicates Y s The probability vector of being assigned to the jth cluster, is the spot in the spatially embedded cluster distribution matrix i The probability value of being assigned to the jth cluster; Step 3.2: Calculate feature embedding H f , spatial embedding H s and enhanced embedding H a The contrast loss between the cluster distribution vectors of each cluster in , by minimizing this loss, effectively reduces the ambiguity of the clustering results, and is calculated according to the following formula: in, Represents the computational space embedding H s The contrast loss of the j-th cluster is, Represents the calculation feature embedding H f The contrast loss of the j-th cluster is, Denotes computationally enhanced embedding H a The contrast loss of the j-th cluster is, for and The exponential result of the similarity function between for and The exponential result of the similarity function between for and The exponential result of the similarity function between them, τ is the cluster-level weight parameter that controls the softness, and the total contrast loss of clustering is expressed as follows: in, represents information entropy, is the maximum entropy, is the distribution probability of the t-th sample in the j-th cluster of the spatially embedded cluster distribution matrix, T(Y f ) is Y f The information entropy, T(Y a ) is Y a The information entropy, T(Y f ) and T(Y a ) and T(Y s ) is calculated in the same way; Step 3.3, based on the four cluster distribution matrices, adopt the maximum cluster selection strategy, select the maximum value of the probability of each spot belonging to each cluster from the four matrices, so as to determine the target cluster of the spot, and then construct the target distribution matrix Q, spot i Cluster soft labels are calculated using the following formula: Step 3.4: Soft label q based on step 3.3 ij To improve the high confidence of the collaborative embedding H, the target distribution matrix Q is normalized so that the sum of all cluster probabilities of each spot is 1, calculated as follows: Among them, p ij is the normalized probability value, ensuring that the sum of all cluster probabilities of each sample is 1, is the maximum probability value selected from the four cluster distribution matrices to determine the target cluster for each sample; Step 3.5: The normalized target distribution matrix P is used as an auxiliary guide for clustering results. The optimization target is calculated according to the following formula: Among them, KL(Y‖P) represents the KL divergence between the cluster distribution matrix Y and the target distribution matrix P, y ij is the probability that the i-th sample in the cluster distribution matrix Y is in the j-th cluster.
5. The spatial transcriptomics multi-view clustering method based on spatial expression enhancement and high-confidence guidance according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step 4.
1. Calculate the cosine similarity matrix and spatial neighbor matrix A of the co-embedding H s The cross entropy loss ensures that the co-embedding of each spot in the model training process is as similar as possible to its neighboring spots in space. The spatial consistency constraint loss is calculated as follows: Where cosine_dist(H i ,H j ) indicates spot i with spot j Cosine similarity calculated based on collaborative embedding, δ i It's spot i The spatial neighbor set, H i spot i The spatial embedding vector of j spot j The spatial embedding vector of Step 4.2: Jointly optimize the high-confidence clustering guidance loss, ZINB reconstruction loss, and spatial consistency constraint loss. The total loss target of stMHCG is defined as follows: L=ε1L reg +ε2L clu +ε3L hcg +ε4L zinb ; Among them, L reg is the spatial consistency constraint, L clu is the clustering loss, L hcg is the guidance loss for high confidence clustering, L zinb is the ZINB reconstruction loss, and ε1, ε2, ε3, and ε4 are weighting factors that weigh the impact of the loss function.
Citation Information
Patent Citations
Multi-view clustering model implementation method based on graph contrast learning
CN117036760A
Spatial domain identification method integrating spatial transcriptome multi-modal information
CN118016149A