Multi-view space transcriptomics clustering method based on sharing-specific information mining
By constructing a dual-view graph structure and a shared-specific decomposition coding network, combined with multi-task decoding and clustering optimization, the shortcomings of existing methods in integrating multi-view information and data statistical characteristics are addressed, achieving high-precision spatial domain identification and biological analysis support.
Patent Information
- Application Number
- CN202511731848.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-04-07
AI Technical Summary
Existing spatial transcriptomics clustering methods struggle to effectively integrate multi-view information when dealing with complex tissues, and their insufficient optimization of data statistical characteristics and clustering objectives leads to low robustness and accuracy of clustering results.
We employ a multi-view spatial transcriptomics clustering method based on shared-specific information mining. By constructing a dual-view graph structure, we design a shared-specific decomposition coding network and combine multi-task decoding and clustering optimization, including graph convolutional networks, shared encoders, specific encoders, decorrelation constraints, and attention fusion, to optimize the loss function and achieve high-precision spatial domain recognition.
It significantly improves the robustness and accuracy of spatial domain identification, better reflects cross-view consistency and view differentiation features, provides clear targets for downstream biological analysis, and adapts to complex data scenarios.
Smart Images

Figure CN121811980A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of bioinformatics and machine learning, specifically to a multi-view spatial transcriptomics clustering method based on shared-specific information mining. Background Technology
[0002] In recent years, spatial transcriptomics has become a cutting-edge tool for understanding cellular dynamics and their in situ microenvironment. Unlike single-cell RNA sequencing, spatial transcriptomics preserves spatial location information while acquiring cellular gene expression profiles, providing a powerful tool for analyzing tissue spatial structure and exploring the molecular mechanisms of disease development. Spatial domain identification, as a core task of spatial transcriptomics data analysis, aims to divide tissue sections into biologically significant functional regions based on gene expression and spatial location information. The results form the basis for subsequent cell type annotation, spatial functional analysis, and other related work.
[0003] In the development of spatial domain identification technologies, clustering methods have always been a core tool. Early classic methods, such as K-means, Louvain, and Leiden algorithms, mainly relied on the statistical distribution characteristics of gene expression data for unsupervised partitioning. Although they achieved basic spatial domain clustering, they did not fully consider the spatial proximity relationships between cells, often leading to spatial discontinuities in the partitioning results. To overcome this deficiency, researchers have developed improved clustering modeling methods based on distance calculation or probability estimation. For example, the paper titled "Spatial transcriptomics at subspot resolution with BayesSpace" proposes a Bayesian statistical framework combined with prior knowledge of spatial domain continuity to achieve subspot resolution spatial domain partitioning through probabilistic inference, improving the spatial consistency of the results. The paper titled "SC-MEB: spatial clustering with hidden Markov random field using empirical Bayes" introduces hidden Markov random fields to model spatial dependencies between cells, and further enhances the discovery of associations between neighboring cells by optimizing model parameters through empirical Bayesian methods.
[0004] However, the aforementioned spatial domain annotation methods based on traditional machine learning still have significant limitations: they mostly characterize data relationships through pre-defined linear or simple nonlinear models, making it difficult to capture the complex non-Euclidean structures in spatial transcriptome data (such as local tissue topology and long-range functional associations between cells). Furthermore, their ability to reduce dimensionality and extract features from high-dimensional gene expression data is limited, resulting in insufficient domain partitioning accuracy in complex tissues (such as tumor heterogeneity). To address this issue, deep learning-based graph clustering methods have emerged and become the mainstream approach due to their powerful modeling capabilities for unstructured data. For example, the paper titled "SpaGCN: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graphconvolutional network" innovatively constructs an undirected weighted graph to quantify the dependencies of spatial data—using cells as nodes, combining gene expression similarity and spatial distance as edge weights, and then using a graph convolutional network to aggregate neighborhood information to extract high-dimensional hidden embeddings. Finally, iterative clustering is used to achieve spatial domain partitioning, significantly improving the domain identification accuracy of complex tissues. Subsequent studies, such as STAGATE, further introduce a graph attention mechanism to optimize feature aggregation through adaptive weighted space and expression information, while STMVAGE combines a variational autoencoder framework to enhance the robustness of embeddings.
[0005] Despite the effectiveness of these deep learning-based graph clustering methods, significant challenges remain. First, the robustness of graph structure construction is poor. Most methods rely on a single similarity metric (such as spatial distance or gene expression similarity) to construct graph data, making it difficult to comprehensively and accurately characterize the complex relationships between cells within a tissue. Spatial distance reflects local continuity but may ignore long-range functional similarities; gene expression similarity reflects functional patterns but is easily detached from the real spatial context, making clustering results highly sensitive to the metric. Second, multi-view information fusion is insufficient. While some methods attempt to combine spatial and gene expression views, they fail to systematically model shared information across views (such as biological characteristics shared by spatially adjacent and similarly expressed cell populations) and view-specific information (such as the unique local topology of the spatial view and the unique gene regulation patterns of the expression view). They often employ simple "feature stacking" or "weighted aggregation" methods, making it difficult to capture underlying biological mechanisms and limiting generalization ability in complex scenarios (such as tumor heterogeneity studies). Third, data modeling is disconnected from clustering objectives. Spatial transcriptome expression data exhibits characteristics of "zero inflation" (missing a large number of gene detection signals) and "excessive dispersion" (expression variance greater than the mean). Existing methods are mostly based on Gaussian assumptions or mean squared errors for reconstruction, which cannot accurately characterize the statistical properties of the data. At the same time, some methods do not jointly optimize graph structure reconstruction with clustering objectives, resulting in a lack of discriminativeness in the latent representation, making it difficult to meet the requirements of high-precision spatial domain partitioning.
[0006] Therefore, there is an urgent need for a spatial transcriptomics analysis method that can effectively integrate multi-view information, accurately characterize data statistical properties, and achieve collaborative optimization of representation learning and clustering objectives, so as to improve the accuracy and robustness of spatial domain identification. Summary of the Invention
[0007] The purpose of this invention is to provide a multi-view spatial transcriptomics clustering method based on shared-specific information mining. By constructing a dual-view graph structure, designing a shared-specific decomposition coding network, and combining multi-task decoding and clustering optimization, it achieves high-precision spatial domain identification and provides support for downstream biological analysis.
[0008] To achieve the above-mentioned objectives, the present invention employs the following technical solution: a multi-view spatial transcriptomics clustering method based on shared-specific information mining, comprising the following steps:
[0009] S1: Obtain raw spatial transcriptome data; including a two-dimensional spatial coordinate matrix of cells or capture points. With gene expression matrix N represents the number of cells or capture points, D represents the number of genes, and X represents the number of cells or capture points. r The aw is normalized to obtain the input feature matrix. Construct a spatial view adjacency matrix A based on spatial coordinates. s Construct a feature view adjacency matrix A based on gene expression similarity. f and for A s A f Adding a self-loop and performing symmetric normalization yields...
[0010] S2: Construct a shared-specific decomposition coding network based on graph convolutional network GCN;
[0011] S3: Design a multi-task decoder and clustering module;
[0012] S4: Construct an overall loss function that includes ZINB expression loss, structure reconstruction loss, clustering loss, domain discrimination loss, and shared-specific decorrelation loss. Use gradient descent to update network parameters and train shared-specific decomposition coding and multi-task modules.
[0013] S5: During the testing phase, based on the unified embedding and soft assignment probabilities output by the network after training, cells or capture points are assigned to corresponding clusters to obtain spatial domain partitioning results; downstream biological analyses such as marker gene annotation, spatial localization, and cross-slice consistency assessment are carried out.
[0014] Further, step S1 includes the following steps:
[0015] S11: Data Preprocessing: Obtain raw spatial transcriptome data, including two-dimensional spatial coordinate matrices of cells / capture points. (N is the total number of cells / capture points, c per line) i (representing the (x, y) coordinates of the i-th cell), and the original gene expression matrix. (D represents the total number of genes, x in each line) raw,i (representing the gene expression vector of the i-th cell); for X r The AW algorithm performs logarithmic normalization and standardization to eliminate the influence of sequencing depth differences, resulting in the input feature matrix.
[0016] S12: Spatial View Construction: Constructing a spatial view graph G based on the physical proximity of cell spatial coordinates. s =(A s (,X), where Given a spatial adjacency matrix; calculate the Euclidean distance L between any two cells i and j. i j = ||c i -c j ||2, Set a distance threshold r (adaptively adjusted based on the dataset's organization density, e.g., set to 55 for the 10X Visium dataset). If L ijIf r ≤ r, then the two cells are considered spatially adjacent. Let A s,ij =1, otherwise A s,ij =0; for stable graph convolution information propagation, for A s Add a self-loop (set diagonal elements to 1) and use a symmetric normalization formula. Processing (D) s For A s (where I is the degree matrix and I is the identity matrix), to obtain the normalized spatial adjacency matrix.
[0017] S13: Feature View Construction: Based on the similarity of cell gene expression patterns, construct the feature view graph G. f =(A f (,X), where Given a feature adjacency matrix; calculate the cosine similarity of gene expression vectors between any two cells i and j. Using the K-nearest neighbor algorithm (K value adjusted according to dataset size), if cell j belongs to the top K highly similar cells of cell i, then let A... f,ij =1, otherwise A f,ij =0; Same as the spatial view diagram processing flow, for A f Adding self-loops and symmetric normalization yields the normalized eigenadjacency matrix.
[0018] Further, step S2 includes the following steps:
[0019] S21: Shared Encoder Design: A two-layer GCN structure is used as a shared encoder, with parameters shared between the spatial view and the feature view. This is used to extract common biological information across views (such as features shared by "spatially adjacent and similarly expressed cell populations"). The calculation process is as follows, using the normalized adjacency matrix and the input feature matrix as inputs:
[0020]
[0021] in, For the shared parameter matrix (D) ′ σ(·) represents the dimension of the hidden layer (e.g., 256), and σ(·) is the sigmoid activation function. This is the hidden representation output by the first layer GCN. (D r For the shared representation dimension, such as 128, these are the shared representations of the spatial view and the feature view, respectively, characterizing the biological patterns shared by the two views.
[0022] S22: View-Specific Encoder Design: Two-layer GCN-structured specific encoders are designed for the spatial view and the feature view respectively, with no parameter sharing. These encoders are used to extract information specific to each view (local topology of the spatial view, gene regulatory patterns of the feature view). The calculation process is as follows, using the normalized adjacency matrix and the input feature matrix as inputs:
[0023]
[0024] S23: Shared-specific decorrelation and domain-discrimination constraints:
[0025] Shared-Specific Decorrelation Regularization: To avoid information redundancy between shared and specific representations, a decorrelation regularization L is introduced. orth For shared representation r v Normalization by sample dimension ( (where 'a' is the feature dimension), calculate the correlation matrix. Only diagonal elements (linearly related elements in the same semantic dimension) are penalized, as shown in the following formula:
[0026]
[0027] in, ( (These represent the shared representation dimensions of spatial / feature views), ensuring that the functions of sharing and specific information complement each other.
[0028] Domain Discriminant Loss: To enhance the diversity of view-specific representations, a Softmax classifier is constructed as the domain discriminant, with the input specific representation s. (v) Output view category probabilities (spatial view labels are set to 0, feature view labels are set to 1), domain discrimination loss L dom The formula is as follows:
[0029]
[0030] in, The loss is the view classification probability of the i-th cell output by the discriminator. This loss forces the model to learn the view-specific differential features.
[0031] S24: Attention Fusion: For specific representations s (s) ,s (f) Each is mapped to a single MLP projection head. (D emb (for the embedding dimension), and with the shared representation r s ,r f By residual jump connection Fusion, preserving shared information while enhancing specific features; employing an attention mechanism to... Adaptive weighting, calculating attention weights:
[0032]
[0033] Wherein, MLP(·) is a single-layer perceptron (input dimension D) emb Output dimension 1) is used to learn view importance; ultimately, a unified embedding is achieved. The calculation formula is:
[0034]
[0035] Further, step S3 includes the following steps:
[0036] S31: ZINB Expression Decoder: Addressing the characteristics of "zero inflation" (missing signals for many gene detections) and "excessive dispersion" (variance greater than the mean) in spatial transcriptome expression data, this decoder uses a zero-inflated negative binomial (ZINB) distribution for modeling, unifying the three parameters of the embedded Z-prediction ZINB distribution: dropout probability π∈(0,1). N×D (Depicting technical zero value), mean (Characterizing the expected level of gene expression), dispersion (To characterize variance inflation), the parameter prediction formula is as follows:
[0037] (π,μ,θ)=MLP ZINB (Z) (9)
[0038] Among them, MLP ZINB (·) represents a three-layer MIP (with activation functions sigmoid, softplus, and softplus, respectively); representing the reconstruction loss L. ZINB To minimize the negative log-likelihood between the observed representation and the predicted distribution:
[0039]
[0040] in, Let NB(·) be the indicator function, and let NB(·) be the negative binomial probability density function.
[0041] S32: Structure Decoder: To maintain the graph topological consistency of the embedded representation, the spatial and feature adjacency matrices are reconstructed using an inner product form, with the unified embedding Z as input. The reconstruction formula is as follows:
[0042]
[0043] Where σ(·) is the sigmoid function, mapping the reconstructed values to the interval [0,1]; the structural reconstruction loss L structThe sum of squared Frobenius norms of the original adjacency matrix and the reconstructed adjacency matrix:
[0044]
[0045] This loss ensures that the adjacency relationships of cells in the embedded space are consistent with the original vision. Figure 1 To.
[0046] S33: Student's t-distribution clustering objective: To enhance the clustering discriminativeness of the embedding representation, a clustering module based on Student's t-distribution is introduced. The number of clusters is K (adaptively determined based on the true number of domains or silhouette coefficients in the dataset), and the cluster centers are... Calculate the embedding z of the i-th cell i The soft assignment probability q of the k-th cluster center ik :
[0047]
[0048] Here, α = 1 represents the degrees of freedom, enhancing robustness to outliers; to improve clustering confidence, a target distribution p is constructed. ik :
[0049]
[0050] Clustering loss L c luster is p i k and q ik KL divergence:
[0051]
[0052] S34: Overall Loss and Network Training: Construct an overall loss function that integrates the multi-task loss and regularization term mentioned above.
[0053] L = L ZINB +L struct +L cluster +λ dom L dom +λ orth L orth (16)
[0054] Further, step S4 includes the following steps:
[0055] S41: Parameter Initialization: Initialize the learnable parameters of the shared-specific decomposition coding network, multi-task decoder, and clustering module. Shared parameter matrix. View-specific parameter matrix ZINB decoder MLP parameters, structure decoder mapping parameters, and cluster centers μ1,...,μ KAll parameters are initialized using the He normal distribution; the MLP parameters of the attention fusion module are initialized using the Xavier normal distribution to ensure that the parameter distribution is reasonable in the early stage of training and to avoid gradient vanishing or exploding.
[0056] S42: Gradient Descent Optimization Configuration: The Adam optimizer is used to update gradient descent parameters, with a learning rate of 1×10⁻⁶. -4 The batch size is 64; the total number of training rounds is set to 200, and the target distribution p of the clustering module is updated every 10 rounds. ik The adjacency matrix of the dual-view graph structure is updated every 20 rounds.
[0057] Further, step S5 includes the following steps:
[0058] S51: Output of spatial domain partitioning results:
[0059] Embedding extraction: The full spatial transcriptome data (including training set and unsplit test set samples) is input into the trained shared-specific decomposition coding network, and the unified embedding Z of all cells / capture points is obtained through forward propagation.
[0060] Cluster assignment: Input Z into the clustering module to calculate the soft assignment probability of each cell / capture point to each cluster center, and assign the cell / capture point to the cluster with the highest probability to obtain the spatial domain partitioning result; use heat map or spatial scatter plot to visualize the partitioning result, and mark different clusters (spatial domains) on the original tissue slice image with different colors to intuitively show the continuity and boundary of the spatial distribution of tissue functional areas.
[0061] S52: Downstream biological analysis:
[0062] Marker gene annotation: Differentially expressed genes (DEG) were analyzed for each spatial domain. The Wilcoxon rank-sum test was used to calculate the expression differences of genes within and between clusters. Genes with adjusted p-values <0.05 and log2 fold change (log2FC) >1 were selected as cluster marker genes. For example, in Cluster 14 of the BRCA1 (breast cancer) dataset, the marker genes Rims2 (synaptic-related) and Ryr3 (calcium signaling-related) can reveal that this cluster is a tumor marginal cell population with enhanced neuronal-like communication, providing a basis for the biological function definition of the spatial domain.
[0063] Spatial localization verification: Combine histopathological images to verify the matching degree between the spatial domain division results and known anatomical structures or pathological regions; for example, on the DLPFC (prefrontal cortex) dataset, ensure that the divided cortical regions such as Layer_3 and Layer_4 are consistent with the actual tissue layering, with clear boundaries and no breaks.
[0064] Cluster-level abundance difference analysis: For multi-condition samples (such as CRC10 primary colorectal cancer lesions and LM4 liver metastases), the proportion of cells in each spatial domain in different samples was statistically analyzed to identify condition-specific enriched spatial domains, providing data support for metastasis mechanism research.
[0065] To better achieve the above-mentioned objectives, the present invention also provides a multi-view spatial transcriptomics clustering system based on shared-specific information mining:
[0066] The spatial transcriptome raw data module is configured to perform the following process: constructing a spatial view adjacency matrix A based on spatial coordinates. s And constructing a feature view adjacency matrix A based on gene expression similarity f and A s A f Adding a self-loop and performing symmetric normalization, we get
[0067] The shared-specific decomposition coding network module of the Graph Convolutional Network (GCN) is configured to perform the following process: using a shared encoder, two view-specific encoders, a decorrelation and domain discrimination submodule, and an attention fusion submodule;
[0068] The multi-task decoder and clustering module are configured to perform the following processes: the ZINB expression decoder predicts the zero-inflated negative binomial distribution parameters of gene expression to reconstruct the expression; the structure decoder reconstructs the spatial and feature adjacency matrix to preserve the graph topology; the clustering module calculates the soft assignment probability of samples to cluster centers based on Student's t-distribution, constructs the target distribution, and optimizes clustering by minimizing KL divergence.
[0069] The overall loss function model, which includes ZINB expression loss, structure reconstruction loss, clustering loss, domain discrimination loss, and shared-specific decorrelation loss, is configured to perform the following process:
[0070] Gradient descent is used to update network parameters and train shared-specific decomposition and multi-task modules.
[0071] The testing module is configured to perform the following processes: based on the unified embedding and soft assignment probabilities of the network output after training, assign cells or capture points to corresponding clusters to obtain spatial domain partitioning results; and conduct downstream biological analyses such as marker gene annotation, spatial localization, and cross-slice consistency assessment.
[0072] Furthermore, the shared-specific decomposition coding network module of the graph convolutional network GCN includes:
[0073] The shared encoder encodes the spatial view and the feature view separately to extract cross-view shared information;
[0074] A specific encoder encodes each view individually to extract unique information;
[0075] The decorrelation and domain discrimination submodules constrain the independence of shared and specific information, while the attention fusion submodules adaptively weight and fuse dual-view information to achieve unified embedding.
[0076] Meanwhile, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed, it implements the steps of the method of the present invention.
[0077] In addition, the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program being configured to implement the steps of the method of the present invention when invoked by a processor.
[0078] Finally, the present invention provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method of the present invention.
[0079] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0080] (1) Dual-view collaborative modeling to improve the robustness of spatial domain recognition: This invention breaks through the limitations of existing methods that rely on a single similarity measure to construct graph data. At the same time, it constructs a spatial view based on cell spatial coordinates and a feature view based on gene expression similarity, which effectively reduces the sensitivity of clustering results to a single measurement method. It maintains stable performance on multiple datasets such as DLPFC and BRCA1, and its robustness is significantly better than that of comparison methods such as SpaGCN and STAGATE that only use a single view.
[0081] (2) Shared-Specific Information Explicit Decomposition Enhances Downstream Analysis: This invention innovatively designs a shared-specific decomposition coding network. A shared encoder extracts cross-view common information, while a dual-view specific encoder retains modality-specific information. Furthermore, decorrelation constraints and domain discrimination constraints are combined to avoid information redundancy. This design enables the latent representation to reflect cross-view... Figure 1 It maintains consistency while highlighting the unique features of the view, providing clear targets for downstream functional analysis.
[0082] (3) Multi-task joint optimization to improve clustering accuracy: This invention designs a multi-task constraint-ZINB expression decoder to accurately characterize the statistical characteristics of gene expression, namely "zero expansion" and "excessive dispersion," based on the characteristics of spatial transcriptome data. The structure decoder maintains the topological continuity of the graph, and the Student's t-distribution clustering module enhances intra-cluster compactness and inter-cluster separation. Through multi-task loss joint optimization, the latent representation simultaneously satisfies the triple objectives of "statistical fitting," "structure preservation," and "cluster discrimination," resulting in more accurate spatial domain boundary delineation.
[0083] (4) Attention-Adaptive Fusion for Complex Data Scenarios: This invention introduces an attention mechanism in the representation fusion stage to dynamically learn the weight allocation between the spatial view and the feature view, eliminating the need for manually preset fixed weights. This mechanism enables the model to adaptively adjust the view contribution according to the data distribution, providing stable support for the analysis of the disease microenvironment. Attached Figure Description
[0084] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0085] Figure 1 This is a flowchart illustrating the multi-view spatial transcriptomics graph clustering method based on shared-specific information modeling of the present invention.
[0086] Figure 2 This is an overall block diagram of the multi-view spatial transcriptomics graph clustering method based on shared-specific information modeling of the present invention.
[0087] Figure 3 Method validation of the present invention - performance evaluation comparison on the DLPFC dataset: ARI and NMI comparison chart.
[0088] Figure 4 To verify the method of this invention, a comparison chart of clustering effects was generated on the DLPFC dataset.
[0089] Figure 5 Visual illustration of the method verification of this invention on the DLPFC dataset.
[0090] Figure 6 Comparison of clustering results on a mouse cerebellum dataset for method verification of the present invention.
[0091] Figure 7 This is a visualization diagram of mouse brain posterior sagittal dataset and mouse cerebellar slice clustering for method verification of the present invention. Detailed Implementation
[0092] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Of course, the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0093] Example 1:
[0094] See Figures 1 to 2 This embodiment provides a technical solution: a multi-view spatial transcriptomics clustering method based on shared-specific information mining, comprising the following steps:
[0095] S1: Acquire raw spatial transcriptome data and preprocess it to construct a dual-view structure:
[0096] S11: Taking the DLPFC (dorsolateral prefrontal cortex) dataset on the 10X Visium platform as an example, the original data contains a spatial coordinate matrix of 5264 capture points. With gene expression matrix For X raw Perform logarithmic normalization (X = log(X)) raw +1)) and standardization (X=(X-mean(X)) / std(X)) yields the input feature matrix.
[0097] S12: Construct spatial view G s =(A s ,X): Calculate the Euclidean distance L between any two capture points. ij Set the distance threshold r = 55 (unit: μm, adapted to 10X Visium chip resolution), if L ij If A ≤ 55, then A s ,ij=1, otherwise A s ,ij=0; after adding a self-loop and symmetric normalization, we get
[0098] S13: Construct the feature view graph G f =(A f ,X): Calculate the cosine similarity of gene expression vectors cos(x,X). i ,x j Using the K=14 nearest neighbor algorithm, if j∈TopK(i), then A f ,ij=1, otherwise A f ,ij=0; after adding a self-loop and symmetric normalization, we get
[0099] S2: Construct a shared-specific decomposition-coding network and extract the embeddings:
[0100] S21: Shared encoder: Employs a two-layer GCN with shared parameters. sigmoid activation, output shared representation
[0101] S22: Specific Encoder: Two GCN layers are set for each of the spatial and feature views, and parameters are not shared. sigmoid activation, output specificity representation
[0102] S23: Constraint Settings: De-correlated Regularization L orth d min =128; the domain discriminator is a single-layer Softmax classifier with an input dimension of 128 and an output dimension of 2,L dom weight λ dom =1e-3.
[0103] S24: Attention Fusion: Projector is a single-layer MLP (128→256), attention MLP (256→1), output is uniformly embedded.
[0104] S3: Design a multi-task decoder and clustering module: ZINB expression decoder: a three-layer MLP that outputs π, μ, θ, and negative log-likelihood loss L. ZINB The adjacency matrix is reconstructed using the inner product of the structural decoder. The number of clusters in the clustering module is K=7, and the degrees of freedom of the Student's t distribution are α=1. The KL divergence loss is calculated.
[0105] S4: Network training parameter configuration: Optimizer: Adam, learning rate 1e-4, batch size 64, training 200 epochs, target distribution p updated every 10 epochs. ik The adjacency matrix is updated every 20 rounds. Total loss: L = L ZINB +L struct +L cluster +1e-3L dom +1e-3L orth A dropout probability of 0.5 suppresses overfitting.
[0106] S5: Spatial Domain Identification and Downstream Analysis: Cluster Assignment: Capture points are assigned to the clusters with the highest probability, resulting in 7 spatial domains, which are then visualized and labeled on tissue slices. Marker Gene Identification: Wilcoxon test is used to screen for marker genes, matching them with known cortical markers.
[0107] Example 2:
[0108] Referring to Example 1, this example will use the parameters calculated in Example 1 to compare with other algorithms on the dorsolateral prefrontal cortex DLPFC dataset, demonstrating the superiority of the present invention. The final results show that the present invention is preferred over other algorithms.
[0109] 1. Comparison of algorithms and metrics
[0110] This embodiment selects the following seven comparison algorithms:
[0111] 1) SpaGCN: This paper proposes a graph convolutional network method that combines gene expression, spatial location, and histology to aggregate gene expression at neighboring points, identify spatial domains, and perform differential expression analysis, effectively detecting genes with rich spatial expression patterns. (Paper title: "SpaGCN: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graph convolutional network")
[0112] 2) DeepST: Proposes an accurate and general deep learning framework that can finely analyze and organize spatial structures by identifying spatial domains, thereby improving the analysis of spatial transcription data. (Paper title: "DeepST: identifying spatial domains in spatial transcriptomics by deep learning")
[0113] 3) Seruat: Proposed a weighted nearest neighbor analysis method to learn the relative importance of each data point in cells by integrating multimodal data and constructing a multimodal reference atlas of the circulating immune system. (Paper title: "Integrated analysis of multimodal single-cell data")
[0114] 4) STAGATE: By integrating spatial information and gene expression, this paper utilizes a graph attention mechanism to accurately identify spatial domains, improving spatial domain recognition accuracy, reducing noise, and preserving spatial expression patterns. (Paper title: "Deciphering spatialdomains from spatially resolved transcriptomics with an adaptive graphattention auto-encoder")
[0115] 5) stAA: Proposes an adversarial graph autoencoder that combines gene expression and spatial information, utilizing graph neural networks and Wasserstein distance to accurately identify spatial domain boundaries and improve spatial clustering accuracy. (Paper title: "stAA: adversarial graph autoencoder for spatial clustering task of spatially resolved transcriptomics")
[0116] 6) SpaNCMG: Proposes a spatial domain identification method based on a neighborhood-complementary mixed-view graph convolutional network. It integrates local KNN information with the r-radius global structure to construct a complementary neighborhood graph, uses an attention mechanism for adaptive fusion and reconstruction of the representation, and combines KPCA dimensionality reduction to adapt to spatial transcriptomics data of different resolutions, thereby improving the accuracy of spatial domain identification. (Paper title: "SpaNCMG:improving spatial domains identification of spatial transcriptomics using neighborhood-complementary mixed-view graph convolutional network")
[0117] 7) STMVGAE: This paper proposes an analysis tool combining multi-view variational graph autoencoders with consensus clustering. It extracts histological image features and fuses them with gene expression data to construct a multi-view graph structure. After learning low-dimensional embeddings through the variational graph autoencoder, the results are integrated using consensus clustering, improving clustering accuracy and stability. (Paper title: "Deep clustering representation of spatially resolved transcriptomics data using multi-view variational graph auto-encoders with consensus clustering")
[0118] 8) MAFN: Proposes an end-to-end multi-view adaptive fusion network method, constructing spatial and feature maps, using a GCN encoder to learn complementary and discriminative features, designing a CCR strategy to filter irrelevant information, combining the CAM module to adaptively fuse features, and then optimizing spatial domain recognition by constraining the distribution through spatial regularization and ZINB decoder. (Paper title: "Multi-View AdaptiveFusion Network for Spatially Resolved Transcriptomics Data Clustering")
[0119] To verify the effectiveness of the present invention, NMI and ARI were used as evaluation indicators, with higher values indicating better performance.
[0120] 2. Comparison Results
[0121] The DLPFC dataset consists of 12 slices, and a comprehensive comparison of all 12 slices was performed. Figure 3The results for all methods on ARI and NMI are shown. The results demonstrate that the present invention consistently outperforms the others across all metrics. Compared to graph-based autoencoder methods (SpaGCN, stAA, DeepST), the present invention achieves the best performance, indicating that simultaneously exploring multi-scale information is effective. Furthermore, Figure 4 The visualization results of the present invention and all methods on 151,672 slices are shown. It can be seen that the clustering depiction of the present invention is the best, indicating that it can accurately identify the spatial domain structure of cells. Notably, the present invention demonstrates the best recognition performance in the Layer 3 case compared with other methods.
[0122] at last, Figure 5 These are the UMAP and PAGA trajectory inference results of this invention. The UMAP results clearly show the different regions of each layer, indicating that the method of this invention can effectively distinguish the domains of each layer. In addition, the PAGA plot reveals a linear trajectory from WM to the 3rd layer, further proving that the developmental trajectory inferred by this invention is highly consistent with the spatial topology of the slice.
[0123] Example 3:
[0124] Referring to Example 1, this example uses the parameters calculated in Example 1 to compare the invention with eight comparative algorithms in Example 2 on an unlabeled mouse cerebellum dataset, demonstrating the superiority of the present invention. The final results show that the present invention is preferred over other algorithms.
[0125] 1. Comparison of algorithms and metrics
[0126] Referring to Example 2, this example will select eight comparison algorithms from Example 2. For unlabeled datasets, silhouette coefficient (SC) and Davies-Bouldin (DB) are used as evaluation metrics. Specifically, a higher SC value indicates better clustering performance, while a lower DB value indicates better overall performance.
[0127] 2. Comparison Results
[0128] First, the five methods were compared on a mouse brain posterior sagittal dataset. Figure 6 (a) shows the performance of nine algorithms on the SC and DB metrics. The results show that the proposed method outperforms the other eight algorithms on the SC metric. Furthermore, on the DB metric, the proposed method's value is significantly lower than the other methods (lower values indicate better performance), further validating the effectiveness of the proposed method on unlabeled datasets. Figure 7 (a) shows the visualization results of the present invention, demonstrating its most significant spatial depiction effect. The results indicate that the present invention can accurately identify these three regions.
[0129] Figure 6 (b) shows the clustering results of six methods on a mouse cerebellum dataset. Among these methods, the SC value of this invention is significantly higher than the other methods, while the DB value is the lowest, indicating its superior performance in spatial domain segmentation. Figure 7 (b) Further visualization results of the invention demonstrate its ability to effectively segment and identify complex spatial domains.
[0130] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A multi-view spatial transcriptomics clustering method based on shared-specific information mining, characterized in that, Includes the following steps: S1: Obtain raw spatial transcriptome data; including a two-dimensional spatial coordinate matrix of cells or capture points. With gene expression matrix N represents the number of cells or capture points, D represents the number of genes, and X represents the number of cells or capture points. r The aw is normalized to obtain the input feature matrix. Construct a spatial view adjacency matrix A based on spatial coordinates. s Construct a feature view adjacency matrix A based on gene expression similarity. f and for A s A f Adding a self-loop and performing symmetric normalization yields... S2: Construct a shared-specific decomposition coding network based on graph convolutional network GCN; S3: Design a multi-task decoder and clustering module; S4: Construct an overall loss function that includes ZINB expression loss, structure reconstruction loss, clustering loss, domain discrimination loss, and shared-specific decorrelation loss. Use gradient descent to update network parameters and train shared-specific decomposition coding and multi-task modules. S5: During the testing phase, based on the unified embedding and soft assignment probabilities output by the network after training, cells or capture points are assigned to corresponding clusters to obtain spatial domain partitioning results; downstream biological analyses such as marker gene annotation, spatial localization, and cross-slice consistency assessment are carried out.
2. The multi-view spatial transcriptomics clustering method based on shared-specific information mining according to claim 1, characterized in that, In step S2, a shared-specific decomposition coding network based on a graph convolutional network (GCN) is constructed, comprising a shared encoder, two view-specific encoders, a decorrelation and domain discrimination submodule, and an attention fusion submodule; specifically, the steps are as follows: S21: The shared encoder adopts a two-layer GCN structure, with parameters shared between the spatial view and the feature view. The calculation process is as follows: in, Let σ(·) be the shared parameter matrix, and let σ(·) be the sigmoid activation function. D represents the shared representation of the spatial view and the feature view, respectively. r To share representation dimensions; S22: The specific encoder designs two-layer GCN structures for the spatial view and the feature view respectively, with parameters not shared. The calculation process is as follows: in, For view-specific parameter matrix, D represents the specific representation of the spatial view and the feature view, respectively. s Dimensions are used to represent specificity; S23: Introduce shared-specific decorrelational regularization L orth After normalizing the shared and specific representations by sample dimension, linear correlation within the same semantic dimension is penalized to suppress information leakage. in, For the correlation matrix, For the normalized shared representation; introduce domain discriminant loss L dom Construct a Softmax classifier to distinguish between spatially specific representations and feature-specific representations, thereby enhancing view diversity: Among them, y i =0 indicates space-specific representation, y i =1 indicates the specificity of the marker feature. The classification probability output by the classifier; S24: Z is obtained by mapping the specific representation through the projection head. (s) Z (f) And obtained through residual jump connection with the shared representation. Using attention mechanism Adaptive weighted fusion yields a unified embedding. D emb For the embedded dimension: Where, α s ,α f represents the attention weights, and MLP(·) represents a multilayer perceptron.
3. The multi-view spatial transcriptomics clustering method based on shared-specific information mining according to claim 1, characterized in that, In step S3, a multi-task decoder and a clustering module are designed. The multi-task decoder includes a ZINB expression decoder and a structure decoder. The ZINB expression decoder predicts the zero-inflated negative binomial distribution parameters of gene expression to reconstruct the expression, while the structure decoder reconstructs the spatial and feature adjacency matrices to preserve the graph topology. The clustering module calculates the soft assignment probability of samples to cluster centers based on Student's t-distribution, constructs the target distribution, and optimizes clustering by minimizing KL divergence, specifically including the following: S31: The ZINB expression decoder addresses the "zero inflation" and "excessive dispersion" characteristics of gene expression data by using a unified embedding Z to predict the ZINB distribution parameters (π, μ, θ), where π is the dropout probability, μ is the mean, and θ is the dispersion. Expression reconstruction is achieved by minimizing the log-likelihood loss (LZINB). in, Let NB(·) be the indicator function, and let NB(·) be the negative binomial distribution. S32: The structural decoder reconstructs the spatial adjacency matrix and the feature adjacency matrix using an inner product form, by minimizing the Frobenius norm loss L. struct Preserve graph topology: Where σ(·) is the sigmoid function, ||·|| F It is the Frobenius norm; S33: The Student's t-distribution clustering objective is based on the unified embedding Z. It introduces the Student's t-distribution to construct a clustering module and calculates the soft assignment probability q of a sample to a cluster center. ik And construct the target distribution p ik By minimizing the KL divergence loss L cluster Enhancing intra-class compactness and inter-class separation: Where, μ k Let α be the center of the l-th cluster, α = 1 be the degree of freedom, and K be the number of clusters.
4. The multi-view spatial transcriptomics clustering method based on shared-specific information mining according to claim 1, characterized in that, S5 includes the following steps: S51: After network training converges, the soft assignment probability q is based on the unified embedding Z and the output of the clustering module. ik Each cell or capture point is assigned to the cluster with the highest probability to obtain the spatial domain partitioning result; S52: Based on the spatial domain division results, conduct marker gene annotation, spatial localization, cross-slice consistency assessment, and cluster-level abundance difference analysis.
5. The multi-view spatial transcriptomics clustering method based on shared-specific information mining according to claim 1, characterized in that, In S52, The marker gene annotation process involves identifying marker genes in each cluster through differential expression analysis. The spatial positioning employs a visualized organization and distribution of each spatial domain; The cross-slice consistency assessment terminology quantifies the similarity of spatial domains between different tissue slices. The cluster-level abundance difference analysis enables the comparison of the proportion differences of each spatial domain under different samples or conditions.
6. The multi-view spatial transcriptomics clustering system based on shared-specific information mining according to claim 1, characterized in that, The spatial transcriptome raw data module is configured to perform the following process: constructing a spatial view adjacency matrix A based on spatial coordinates. s And constructing a feature view adjacency matrix A based on gene expression similarity f and A s A f Adding a self-loop and performing symmetric normalization, we get The shared-specific decomposition coding network module of the Graph Convolutional Network (GCN) is configured to perform the following process: using a shared encoder, two view-specific encoders, a decorrelation and domain discrimination submodule, and an attention fusion submodule; The multi-task decoder and clustering module are configured to perform the following processes: the ZINB expression decoder predicts the zero-inflated negative binomial distribution parameters of gene expression to reconstruct the expression; the structure decoder reconstructs the spatial and feature adjacency matrix to preserve the graph topology; the clustering module calculates the soft assignment probability of samples to cluster centers based on Student's t-distribution, constructs the target distribution, and optimizes clustering by minimizing KL divergence. The overall loss function model, which includes ZINB expression loss, structure reconstruction loss, clustering loss, domain discrimination loss, and shared-specific decorrelation loss, is configured to perform the following process: Gradient descent is used to update network parameters and train shared-specific decomposition and multi-task modules. The testing module is configured to perform the following processes: based on the unified embedding and soft assignment probabilities of the network output after training, assign cells or capture points to corresponding clusters to obtain spatial domain partitioning results; and conduct downstream biological analyses such as marker gene annotation, spatial localization, and cross-slice consistency assessment.
7. The multi-view spatial transcriptomics clustering system based on shared-specific information mining according to claim 6, characterized in that, The shared-specific decomposition coding network module of the graph convolutional network GCN includes: The shared encoder encodes the spatial view and the feature view separately to extract cross-view shared information; A specific encoder encodes each view individually to extract unique information; The decorrelation and domain discrimination submodules constrain the independence of shared and specific information, while the attention fusion submodules adaptively weight and fuse dual-view information to achieve unified embedding.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed, it implements the steps of the method as described in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is configured to implement the steps of the method according to any one of claims 1 to 5 when invoked by a processor.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 5.
Citation Information
Cited By
Multi-granularity clustering method and system for cross-batch single-cell spatial omics data
CN122135793A