A spatial domain identification method and system for spatial transcriptomic data
Patent Information
- Application Number
- CN202611101299.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-23
AI Technical Summary
尽管取得了一定进展,但这些现有方法在处理复杂组织结构时仍面临两大挑战:第一,在融合层面,现有基于多视图的方法未能充分考虑到测序位点级别的局部微环境异质性,往往采用粗粒度的全局固定图融合策略,限制了模型对复杂且细微组织结构(如平滑的解剖层或狭窄的特定生态位)的精细刻画能力;第二,在计算效率层面,现有算法在构建与融合复杂多视图图结构时,通常计算复杂度较高、训练耗时长,难以高效处理当下不断扩增的大规模、高分辨率SRT数据
[0062]1、提出了一种测序位点特异性的自适应图融合机制。突破了现有方法采用粗粒度固定融合权重的局限,本发明通过为每个测序位点动态分配测序位点特异性的空间图与表达图的融合权重,能够精准捕获局部微环境的异质性,有效克服了传统图融合策略在刻画复杂组织边界时精细度不足的问题;
Smart Images

Figure CN122619129B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of spatial transcriptomics, bioinformatics and deep learning, and more specifically, relates to a spatial domain identification method and system for spatial transcriptomics data. Background Technology
[0002] With the deepening of spatial omics research, spatially resolved transcriptomics (SRT) technology has gradually matured. This technology can efficiently capture gene expression profiles of specific physical coordinate regions (usually called spots, i.e., sequencing sites) on tissue sections while fully preserving their spatial location information, effectively overcoming the limitations of traditional bulk sequencing and single-cell sequencing in simultaneously capturing spatial location information. SRT technology is increasingly widely used in tasks such as exploring tissue development mechanisms, tracing the origins of diseased tissues, and elucidating the mechanisms of life activities, and has significant practical implications for promoting the development of life science and medical research.
[0003] Spatial domain identification is a core task in the spatial transcriptomics data analysis workflow. It uses unsupervised clustering to segment tissue regions with similar biological characteristics and consistent spatial distribution patterns. This is a crucial foundation for subsequent differential gene analysis, cell type annotation, and pathological feature mining, and also a vital bridge connecting basic experimental data with practical medical research. In recent years, the rapid development of SRT technology has spurred the creation of massive datasets at various resolutions, leading to a growing demand for large-scale spatial domain analysis. However, obtaining high-quality tissue region segmentation results still heavily relies on meticulous manual annotation by pathologists. This method is not only extremely labor-intensive and costly, but also clearly inadequate for analyzing massive amounts of data, necessitating the development of efficient and accurate automated identification algorithms.
[0004] To achieve automated spatial domain identification, various computational methods have emerged. Early mainstream analysis approaches often constructed connectivity graphs based on basic spatial location information and used gene expression features to complete spatial domain division. However, these identification methods mostly rely on simple spatial proximity associations, which are difficult to effectively filter out noise interference generated during sequencing and tend to blur the boundary features of fine functional regions in tissues, thus limiting the accuracy of spatial domain division results.
[0005] To further integrate spatial physical topology and transcriptome features, multi-view-based deep learning models have emerged. Despite some progress, these existing methods still face two major challenges in handling complex tissue structures: First, at the fusion level, existing multi-view-based methods fail to fully consider the heterogeneity of local microenvironments at the sequencing site level, often employing coarse-grained global fixed-graph fusion strategies, which limits the model's ability to finely characterize complex and subtle tissue structures (such as smooth anatomical layers or narrow specific ecological niches); Second, in terms of computational efficiency, existing algorithms typically have high computational complexity and long training times when constructing and fusing complex multi-view graph structures, making it difficult to efficiently handle the ever-expanding large-scale, high-resolution SRT data.
[0006] In summary, current technologies still lack a spatial domain identification scheme that can adaptively and meticulously fuse multi-view features to accurately capture the heterogeneity of local microenvironments, while also possessing high computational efficiency and strong cross-platform generalization capabilities. Therefore, it is necessary to propose a novel method to achieve high-accuracy, low-computational-cost spatial domain identification, thereby significantly reducing the workload of expert manual annotation, improving the efficiency of spatial transcriptomics data analysis, and accelerating its downstream translational applications. Summary of the Invention
[0007] The purpose of this invention is to provide a spatial domain identification method for spatial transcriptomics data, which aims to address the shortcomings of existing technologies in fine-grained structural characterization, be compatible with the needs of multi-platform dataset analysis, and achieve accurate and efficient unsupervised spatial domain identification.
[0008] The technical solution provided by this invention is as follows:
[0009] On the one hand, a spatial domain identification method for spatial transcriptomics data includes:
[0010] Step 1: Obtain raw spatial transcriptomics data, perform data preprocessing and graph construction on the raw spatial transcriptomics data to obtain the preprocessed feature matrix, spatially normalized adjacency matrix and expression-normalized adjacency matrix;
[0011] Step 2: Multi-view fusion and sequencing site characterization embedding extraction;
[0012] The obtained preprocessed feature matrix, spatially normalized adjacency matrix, and expression-normalized adjacency matrix are perturbed and subjected to graph convolution feature extraction to obtain spatial context embedding and transcriptome functional context embedding. After splicing, these are input into a gating network, and then the activation function outputs sequencing site-specific spatial graph fusion weights and expression graph fusion weights. The corresponding edges in the spatially normalized adjacency matrix and expression-normalized adjacency matrix are dynamically weighted and fused with the sequencing site-specific spatial graph fusion weights and expression graph fusion weights to obtain an adaptive fusion adjacency matrix. Then, feature propagation and multilayer perceptron mapping are performed through graph convolution to obtain the sequencing site representation embedding.
[0013] Step 3: Using the spatially normalized adjacency matrix as a soft constraint, the sequencing site representation embeddings are aggregated within their spatial neighborhoods to obtain spatially smooth embeddings. A spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site representation embedding and the spatially smooth embedding. The sequencing site representation embeddings are input into the decoder to reconstruct the preprocessed feature matrix, resulting in a reconstruction loss term. The spatial smoothing regularization term and the reconstruction loss term are used as a joint loss function to train the spatial domain recognition model formed by the graph convolutional network, gated network, multilayer perceptron, and decoder in Step 2, resulting in a trained spatial domain recognition model.
[0014] Step 4: Use the trained spatial domain recognition model to obtain the final sequencing site representation embedding of the original spatial transcriptomics data and perform unsupervised clustering to obtain the spatial domain recognition results of the original spatial transcriptomics data.
[0015] In the final identification, the preprocessed feature matrix, spatially normalized adjacency matrix, and expression-normalized adjacency matrix of the original spatial transcriptomics data obtained in step 1 are input into the trained spatial domain identification model to obtain the final sequencing site representation embedding of the original spatial transcriptomics data. Then, unsupervised clustering is performed to obtain the spatial domain identification results of the original spatial transcriptomics data. When using the spatial domain identification model, the trained spatial domain identification model is placed in the evaluation mode to extract features from the original spatial transcriptomics data, which is common knowledge in this field.
[0016] Furthermore, the calculation process for the sequencing site-specific spatial map fusion weights and expression map fusion weights is as follows:
[0017] ;
[0018] ;
[0019] ;
[0020] ;
[0021] in, Indicates the first Specific fusion weight vector for each sequencing site and Let represent the spatial graph fusion weight and expression graph fusion weight of sequencing site i, respectively, and satisfy . ; This represents the normalized exponential function; The scaling hyperparameter represents the sharpness of the distribution of spatial map fusion weights and expression map fusion weights used to control the specificity of sequencing sites; This represents a gating network composed of multilayer perceptrons. Indicates the first The joint contextual characterization of sequencing sites is, in other words, The i-th row; Presentation layer normalization operation, This indicates a splicing operation. The joint contextual representation of all sequencing sites is obtained by splicing spatial context embeddings and transcriptome functional context embeddings and then performing layer normalization. The view context embeddings representing all sequencing sites. Indicates the view type. The value is and , Represents a spatial view. Represents the view, that is Represents the spatial context embedding of all sequencing sites. Transcriptome functional context embeddings representing all sequencing sites; This represents the learnable bias parameter; This indicates a batch normalization operation; Represents the activation function of the exponential linear unit; A graph corruption function indicating that edges are randomly dropped; It is a matrix. This represents the total number of sequencing sites, where each element follows a parameter of . The Bernoulli distribution, i.e. , Indicates the Bernoulli distribution. This represents the probability of discarding an edge; This represents the preprocessed feature matrix after feature-level discarding and Gaussian perturbation. The learnable weight matrix of the graph convolutional network, which represents the space-normalized adjacency matrix and the expression-normalized adjacency matrix, is shared. Represents the space or expresses the normalized adjacency matrix. and These represent the spatially normalized adjacency matrix and the representationally normalized adjacency matrix, respectively.
[0022] In the calculation of sequencing site-specific spatial map fusion weights and expression map fusion weights, the input to the gating network comes from the concatenation of two view embeddings, rather than a single view feature or ignoring view features. This design enables the gating network to simultaneously perceive the local differences of each sequencing site in both its spatial and transcriptomic functional contexts when generating specific fusion weights, thus giving the weight allocation decision a dual-view perception capability.
[0023] Furthermore, the corresponding edges in the spatially normalized adjacency matrix and the expression-normalized adjacency matrix are dynamically weighted and fused with sequencing site-specific spatial graph fusion weights and expression graph fusion weights to obtain an adaptive fused adjacency matrix. Then, feature propagation and multilayer perceptron mapping are performed through graph convolution to obtain the specific calculation process for the sequencing site representation embedding:
[0024] ;
[0025] ;
[0026] ;
[0027] ;
[0028] in, Represents the nodes in the adaptive fusion adjacency matrix With nodes The edge weights between nodes are such that each node in the adjacency matrix uniquely corresponds to a sequencing site. and Represent the space-normalized adjacency matrix respectively With expression normalized adjacency matrix The corresponding edge in; It is an adaptive fusion adjacency matrix. It is the identity matrix; It is a feature propagation fusion adjacency matrix obtained by adaptive fusion adjacency matrix through self-loop enhancement; This represents the propagation embedding after propagation on the feature propagation fusion adjacency matrix. This represents a two-layer multilayer perceptron with activation functions. Indicates the residual weight; This indicates the sequencing site characterization embedding.
[0029] The adaptive fusion adjacency matrix is the structural basis for graph convolution feature propagation. This means that the neighborhood aggregation range of sequencing site representation embeddings is determined by the sequencing site-specific spatial graph fusion weights and expression graph fusion weights, rather than the fixed spatial graph topology commonly used in existing methods. In other words, the fusion graph is both a product of the sequencing site-specific spatial graph fusion weights and the expression graph fusion weights, and also the structural basis for the generation of sequencing site representation embeddings. The result of the adaptive fusion mechanism directly affects the neighborhood perception range of the sequencing site representation embeddings.
[0030] Step A: Using the spatial graph fusion weights specific to sequencing sites and the expression graph fusion weights, the corresponding edges in the spatially normalized adjacency matrix and the expression-normalized adjacency matrix are dynamically weighted and fused to obtain an adaptive fusion adjacency matrix that reflects the local microenvironment characteristics at the sequencing site level.
[0031] Step B: Introduce an identity matrix into the adaptive fusion adjacency matrix to perform self-loop enhancement processing, and obtain the feature propagation fusion adjacency matrix;
[0032] Step C: Using feature propagation to fuse the adjacency matrix, graph convolution feature propagation is performed on the sequencing site joint context representation to obtain the propagation embedding. After introducing residual connections, the propagation embedding is mapped to a low-dimensional latent space through a two-layer multilayer perceptron with activation functions to obtain the sequencing site representation embedding.
[0033] The sequencing site representation embedding extraction process described in steps 2 and A through C above is based solely on forward computation results using randomly initialized parameters before model training is complete. At this stage, the parameters of the graph convolutional network, gated network, multilayer perceptron, and decoder have not yet been optimized using the joint loss function, and the resulting embeddings do not yet possess sufficient spatial domain discrimination capabilities. Only after end-to-end training in step 3, where the model parameters are fully optimized under the joint constraints of the reconstruction loss term and the spatial smoothing regularization term, and then after step 4: using the trained model to extract the final sequencing site representation embeddings from the original spatial transcriptomics data, and performing unsupervised clustering on these final embeddings, can reliable spatial domain identification results be obtained.
[0034] Furthermore, the spatial or representation-normalized adjacency matrix is calculated using the following formula:
[0035] ;
[0036] ;
[0037] in, Indicates the view type. Represents a spatial view. Represents the view. This represents a hybrid space containing self-connections or an adjacency matrix. This represents a hybrid adjacency matrix containing self-connections. This represents a hybrid adjacency matrix containing self-connections; express The degree matrix; This represents the weight hyperparameters that control self-connection; Represents the identity matrix; Represents the initial adjacency matrix. Initial spatial adjacency matrix, This represents the initial adjacency matrix.
[0038] Furthermore, the Adam optimizer is used, with an initial learning rate set to 0.001 and a weight decay coefficient set to [value missing]. End-to-end optimization training is performed using the following joint loss function:
[0039] ;
[0040] in, and These are the non-negative hyperparameters used to balance the contributions of the reconstruction loss term and the spatial smoothing regularization term, respectively. , These represent the reconstruction loss term and the spatial smoothing regularization term, respectively.
[0041] Furthermore, a structure-guided contrastive learning loss term is constructed and added to the joint loss function:
[0042] ;
[0043] , ;
[0044] ;
[0045] ;
[0046] ;
[0047] in, , and These are used to balance the reconstruction loss terms. Structure-guided contrastive learning loss term and spatial smoothing regularization term Non-negative hyperparameters of contribution; Indicates the view type. Represents a spatial view. Represents the view; This represents the function for calculating cosine similarity. Indicates temperature hyperparameter; Indicates the first View context embedding of sequencing sites Projector head shared by spatial view and presentation view After processing and normalization, the view-specific embedding is specifically used to compute the structure-guided contrastive learning loss term. Indicates the first Each sequencing site characterizes the embedding. The projection head used for characterization and embedding. After processing and normalization, the fusion embedding is specifically used to compute the structure-guided contrastive learning loss term. and These are the positive sample pairs in the structure-guided contrastive learning loss term; Indicates view-specific embedding With Fusion Embedding The concatenated matrix, where, The time corresponds to the first View-specific embedding of sequencing sites When j>N, it corresponds to the first Fusion embedding of sequencing sites ; Indicates the first The view context embeddings of each sequencing site are, in other words, the view context embeddings of each sequencing site. The i-th row, The view context embeddings representing all sequencing sites; and Both are projection heads consisting of a two-layer multilayer sensor. and The calculation form can be uniformly expressed as: In the formula This is the weight matrix. , For bias terms, This is the ReLU activation function. and They represent respectively with and For anchor points, a contrastive learning negative sample exclusion set is constructed based on an adaptive fusion graph; specifically, to construct an effective negative sample set, the following embeddings are excluded from the denominator calculation of the anchor points using the adaptive fusion graph: When it is an anchor point, Exclude (1) Anchor point embedding itself (corresponding index) (2) The first in the adaptive fusion graph The sequencing sites are directly neighbors View-specific embedding (index ) and fusion embedding (index );by When it is an anchor point, Exclude (1) Anchor point embedding itself (corresponding index) (2) The first in the adaptive fusion graph The sequencing sites are directly neighbors View-specific embedding (index ) and fusion embedding (index ).
[0048] The adaptive fusion adjacency matrix serves as the topological basis for negative sample masking. This design was proposed by the inventors of this scheme to address specific technical problems: First, the adaptive fusion adjacency matrix is generated from sequencing site-specific spatial graph fusion weights and expression graph fusion weights. Its topological structure simultaneously encodes dual-view information of spatial context and transcriptome functional context. Using this as the basis for negative sample exclusion can effectively avoid incorrectly including truly relevant sequencing sites in the negative sample set under both views. Second, the adaptive fusion adjacency matrix also represents the joint context. The structural basis of graph convolutional feature propagation, therefore, the adaptive fusion adjacency matrix determines the joint context representation. The neighborhood aggregation method determines the division of positive and negative samples in structure-guided contrastive learning, making the multi-view fusion and sequencing site characterization embedding extraction module and the joint loss construction and training module inseparable.
[0049] Furthermore, spatial smoothing embeddings are obtained by spatial neighborhood aggregation of sequencing site characterization embeddings, and the formula for the spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site characterization embedding and the spatial smoothing embedding:
[0050] ;
[0051] in, This represents the space smoothing regularization term; and They represent the first The sequencing site and the adjacent sequencing site Sequencing site characterization embedding of each sequencing site; Indicates sequencing sites A set of spatial neighbors.
[0052] Furthermore, the sequencing site characterization is embedded into the input decoder to reconstruct the preprocessed feature matrix, and the formula for the reconstruction loss term is as follows:
[0053] ;
[0054] in, Indicates the reconstruction loss item; This represents the true preprocessed feature vector; This represents the reconstructed feature vector output by the decoder.
[0055] Furthermore, after the end-to-end training in step 3 to obtain the spatial domain recognition model, the parameters of the graph convolutional network, gating network, multilayer perceptron, and decoder in this model have been fully optimized through backpropagation of the joint loss function. In step 4, the trained spatial domain recognition model is used to extract the final sequencing site representation embeddings from the original spatial transcriptomics data, and unsupervised clustering is performed on these final embeddings to obtain the spatial domain recognition results.
[0056] Secondly, a spatial domain identification system for spatial transcriptomics data includes:
[0057] Preprocessing and normalization unit: Obtain raw spatial transcriptomics data, perform data preprocessing and graph construction on the raw spatial transcriptomics data to obtain the preprocessed feature matrix, spatial normalized adjacency matrix and expression normalized adjacency matrix;
[0058] The multi-view fusion and sequencing site representation embedding extraction unit: perturbs and extracts graph convolution features from the obtained preprocessed feature matrix, spatially normalized adjacency matrix, and expression-normalized adjacency matrix to obtain spatial context embedding and transcriptome functional context embedding. After splicing, these are input into a gating network, and then output through an activation function to obtain sequencing site-specific spatial graph fusion weights and expression graph fusion weights. The corresponding edges in the spatially normalized adjacency matrix and expression-normalized adjacency matrix are dynamically weighted and fused with the sequencing site-specific spatial graph fusion weights and expression graph fusion weights to obtain an adaptive fusion adjacency matrix. Then, feature propagation and multilayer perceptron mapping are performed through graph convolution to obtain the sequencing site representation embedding.
[0059] Joint Loss Construction and Training Unit: Using the spatially normalized adjacency matrix as a soft constraint, spatial smooth embeddings are obtained by aggregating sequencing site representation embeddings within their spatial neighborhoods. A spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site representation embedding and the spatial smooth embedding. The sequencing site representation embeddings are input into the decoder to reconstruct the preprocessed feature matrix, resulting in a reconstruction loss term. The spatial smoothing regularization term and the reconstruction loss term are used as a joint loss function to train the spatial domain recognition model formed by the graph convolutional network, gating network, multilayer perceptron, and decoder in the multiview fusion and sequencing site representation embedding extraction process, resulting in a trained spatial domain recognition model.
[0060] Identification Unit: The final sequencing site representation embedding of the original spatial transcriptomics data is obtained by using the trained spatial domain identification model and unsupervised clustering to obtain the spatial domain identification results of the original spatial transcriptomics data.
[0061] Compared to existing methods, the advantages of this invention are:
[0062] 1. A sequencing site-specific adaptive graph fusion mechanism is proposed. Overcoming the limitations of existing methods that use coarse-grained fixed fusion weights, this invention dynamically assigns fusion weights between the sequencing site-specific spatial map and expression map for each sequencing site. This enables precise capture of the heterogeneity of local microenvironments and effectively overcomes the problem of insufficient precision in characterizing complex tissue boundaries using traditional graph fusion strategies.
[0063] 2. Compared with existing multi-view comparison methods, this invention introduces a contrastive learning loss guided by an adaptive fusion adjacency matrix structure. The adaptive fusion graph serves as both the topological basis for graph convolution feature propagation and the structural basis for negative sample exclusion in the structure-guided contrastive learning loss. This allows the quality of the adaptive fusion graph to be supervised by both reconstruction and contrast consistency, thereby enabling the synergistic effect of each component to go beyond the simple superposition of components and exhibit more refined recognition capabilities on complex and subtle structures.
[0064] 3. On datasets covering multiple spatial transcriptomics platforms such as 10x Visium, Stereo-seq, and STARmap, the model of this invention achieves an average adjusted Land coefficient (ARI) for spatial domain identification that is about 9.25% higher than existing leading baseline methods, and is able to reconstruct the fine anatomical structure and local boundaries of complex tissues (such as the DLPFC cortical structure and the subtle RMS layer in MOB). Attached Figure Description
[0065] Figure 1 This is a schematic diagram of the overall architecture of the model corresponding to the spatial domain identification method described in this embodiment of the invention;
[0066] Figure 2 This is a schematic diagram of the overall process of the method described in the embodiments of the present invention;
[0067] Figure 3a This is the actual human-annotated result for 151,672 slices in the DLPFC dataset;
[0068] Figure 3b The identification method and its corresponding model in the embodiments of the present invention are in Figure 3a The ARI scores on all 12 slices of the DLPFC dataset shown are as follows ( Figure 3b (1) and FMI score ( Figure 3b (2) Comparison of box plots;
[0069] Figure 3c The identification method and its corresponding model in the embodiments of the present invention are in Figure 3a The visualization shows the spatial domain clustering results on slice 151672 of the DLPFC dataset.
[0070] Figure 3d The spSAGE model corresponding to the recognition method described in this embodiment of the invention is... Figure 3a The UMAP embedding map and PAGA trajectory inference map on the DLPFC dataset are shown below;
[0071] Figure 4a The spatial domain of the mouse olfactory bulb (MOB) dataset from the Stereo-seq technology platform is manually annotated.
[0072] Figure 4b The identification method and its corresponding model and three comparison methods described in the embodiments of the present invention are in Figure 4a Comparison of spatial domain recognition results on the MOB dataset shown;
[0073] Figure 4c The model corresponding to the recognition method described in the embodiments of the present invention is in Figure 4a The results show the spatial consistency verification of each spatial domain identified on the MOB dataset with its corresponding typical marker gene high-expression region. Detailed Implementation
[0074] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0075] Example 1.
[0076] This invention constructs a model spSAGE corresponding to the spatial domain recognition method, such as... Figure 1 As shown, spSAGE is used for unsupervised spatial domain identification of spatial transcriptomics data. Taking the original gene expression matrix and spatial physical coordinate matrix as input, spSAGE achieves accurate spatial domain identification through adaptive fusion of multi-view features, structure-guided contrastive learning loss, reconstruction loss term, and spatial smoothing regularization term collaborative modeling.
[0077] In this embodiment of the invention, the spatial domain identification model used for accurate spatial domain identification consists of a graph convolutional network, a gated network, a multilayer perceptron, and a decoder. The graph convolutional network is a single-layer structure that shares a learnable weight matrix for both the spatial view and the expression view. It performs graph convolutional feature extraction on the spatially normalized adjacency matrix and the expression-normalized adjacency matrix, respectively, and outputs spatial context embedding and transcriptome functional context embedding after activation function and batch normalization. The gated network takes the joint context representation as input and generates specific spatial graph fusion weights and expression graph fusion weights for each sequencing site. The multilayer perceptron is used to reduce the dimensionality of the propagated embedding obtained by graph convolutional feature propagation on the feature propagation fusion adjacency matrix to a low-dimensional sequencing site representation embedding. The decoder is used to reconstruct the preprocessed feature matrix from the sequencing site representation embedding.
[0078] like Figure 2 As shown, a spatial domain identification method for spatial transcriptomics data includes:
[0079] Step 1: Obtain raw spatial transcriptomics data, perform data preprocessing and graph construction on the raw spatial transcriptomics data to obtain the preprocessed feature matrix, spatially normalized adjacency matrix and expression-normalized adjacency matrix;
[0080] The gene expression matrix in the original spatial transcriptomics data was normalized, scaled, and reduced in dimensionality by principal component analysis to obtain the preprocessed feature matrix.
[0081] The spatial or representational normalized adjacency matrix is calculated using the following formula:
[0082] ;
[0083] ;
[0084] in, Indicates the view type. Represents a spatial view. Represents the view. This represents a hybrid space containing self-connections or an adjacency matrix. This represents a hybrid adjacency matrix containing self-connections. This represents a hybrid adjacency matrix containing self-connections; express The degree matrix; This represents the weight hyperparameters that control self-connection; Represents the identity matrix; Represents the initial adjacency matrix. Initial spatial adjacency matrix, This represents the initial adjacency matrix; Represents the space or expresses the normalized adjacency matrix. Represents the space-normalized adjacency matrix. This represents the normalized adjacency matrix.
[0085] Step 2: Multi-view fusion and sequencing site characterization embedding extraction;
[0086] The obtained preprocessed feature matrix, spatially normalized adjacency matrix, and expression-normalized adjacency matrix are perturbed and subjected to graph convolution feature extraction to obtain spatial context embedding and transcriptome functional context embedding. After splicing, these are input into a gating network, and then the activation function outputs sequencing site-specific spatial graph fusion weights and expression graph fusion weights. The corresponding edges in the spatially normalized adjacency matrix and expression-normalized adjacency matrix are dynamically weighted and fused with the sequencing site-specific spatial graph fusion weights and expression graph fusion weights to obtain an adaptive fusion adjacency matrix. Then, feature propagation and multilayer perceptron mapping are performed through graph convolution to obtain the sequencing site representation embedding.
[0087] The specific calculation process for dynamically weighting and fusing the corresponding edges in the spatially normalized adjacency matrix and the expression-normalized adjacency matrix with sequencing site-specific spatial graph fusion weights and expression graph fusion weights to obtain an adaptive fused adjacency matrix, and then obtaining the sequencing site representation embedding through graph convolution feature propagation and mapping, is as follows:
[0088] Step A: Using the spatial graph fusion weights specific to sequencing sites and the expression graph fusion weights, the corresponding edges in the spatially normalized adjacency matrix and the expression-normalized adjacency matrix are dynamically weighted and fused to obtain an adaptive fusion adjacency matrix that reflects the local microenvironment characteristics at the sequencing site level.
[0089] ;
[0090] in, Represents the adaptive fusion adjacency matrix Middle node With nodes The edge weights between nodes are such that each node in the adjacency matrix uniquely corresponds to a sequencing site. and Represent the space-normalized adjacency matrix respectively With expression normalized adjacency matrix The corresponding edge in;
[0091] ;
[0092] in, Indicates the first Specific fusion weight vector for each sequencing site and Let represent the spatial graph fusion weight and expression graph fusion weight of sequencing site i, respectively, and satisfy . ; This represents the normalized exponential function; The scaling hyperparameter represents the sharpness of the distribution of spatial map fusion weights and expression map fusion weights used to control the specificity of sequencing sites; This represents a gating network composed of multilayer perceptrons. Indicates the first The joint contextual characterization of sequencing sites is called joint contextual characterization. The i-th row; This represents the learnable bias parameter;
[0093] ;
[0094] ;
[0095] in, The view context embeddings representing all sequencing sites. Indicates the view type. The value is and , Represents a spatial view. Represents the view, that is Represents the spatial context embedding of all sequencing sites. Transcriptome functional context embeddings representing all sequencing sites; This indicates a batch normalization operation; Represents the activation function of the exponential linear unit; A graph corruption function indicating that edges are randomly dropped; It is a matrix. This represents the total number of sequencing sites, where each element follows a parameter of . Bernoulli distribution, i.e. , Indicates the Bernoulli distribution. This represents the probability of discarding an edge; This represents the preprocessed feature matrix after feature-level discarding and Gaussian perturbation. The learnable weight matrix of the graph convolutional network is shared by the representation space normalized adjacency matrix and the expression normalized adjacency matrix.
[0096] Step B: Introduce an identity matrix into the adaptive fusion adjacency matrix to perform self-loop enhancement processing, and obtain the feature propagation fusion adjacency matrix;
[0097] ;
[0098] in, It is an adaptive fusion adjacency matrix. It is the identity matrix; It is a feature propagation fusion adjacency matrix obtained by adaptive fusion adjacency matrix through self-loop enhancement;
[0099] Step C: Using feature propagation to fuse the adjacency matrix, graph convolution feature propagation is performed on the joint context representation of the sequencing site. After introducing residual connections, the propagated embedding is mapped to a low-dimensional latent space through a two-layer multilayer perceptron with activation functions to obtain the representation embedding of the sequencing site.
[0100] ;
[0101] ;
[0102] ;
[0103] in, Presentation layer normalization operation, This indicates a splicing operation. The joint contextual representation of all sequencing sites is obtained by splicing spatial context embeddings and transcriptome functional context embeddings and then performing layer normalization. This represents the propagation embedding after propagation on the feature propagation fusion adjacency matrix. This represents a two-layer multilayer perceptron with activation functions. Indicates the residual weight; This indicates the sequencing site characterization embedding.
[0104] The sequencing site characterization embedding obtained in step 2 above Before model training is complete, the intermediate representations obtained are based on randomly initialized parameters and cannot effectively distinguish different spatial domains. End-to-end training of the model using the joint loss function in step 3 is required to enable the graph convolutional network, gating network, and multilayer perceptron to learn parameters with spatial domain discrimination capabilities. Further, in step 4, the trained spatial domain recognition model is placed in evaluation mode to obtain the final sequencing site representation embeddings from the original spatial transcriptomics data. Unsupervised clustering of these final embeddings is then performed to obtain reliable spatial domain recognition results.
[0105] Step 3: Using the spatially normalized adjacency matrix as a soft constraint, the sequencing site representation embeddings are aggregated within their spatial neighborhoods to obtain spatially smooth embeddings. A spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site representation embedding and the spatially smooth embedding. The sequencing site representation embeddings are input into the decoder to reconstruct the preprocessed feature matrix, resulting in a reconstruction loss term. The spatial smoothing regularization term and the reconstruction loss term are used as a joint loss function to train the spatial domain recognition model formed by the graph convolutional network, gated network, multilayer perceptron, and decoder in Step 2, resulting in a trained spatial domain recognition model.
[0106] In this example, a structure-guided contrastive learning loss is also added to the joint loss function. The construction process of the structure-guided contrastive learning loss term is as follows: the spatial context embedding and the transcriptome functional context embedding are input into the projection head shared by the two views. The sequencing site characterization is embedded into an input independent projection head. Dimensionality unification and norm normalization are performed, and relevant sequencing sites are excluded from the negative sample set using the topological structure corresponding to the adaptive fusion adjacency matrix. The consistency loss between the context embedding of each view and the fusion representation is calculated, thereby obtaining the structure-guided contrastive learning loss term. The constructed loss function is as follows:
[0107] ;
[0108] , ;
[0109] ;
[0110] ;
[0111] ;
[0112] in, , and These are used to balance the reconstruction loss terms. Structure-guided contrastive learning loss term and spatial smoothing regularization term Non-negative hyperparameters of contribution; Indicates the view type. Represents a spatial view. Represents the view; This represents the function for calculating cosine similarity. This indicates temperature hyperparameters; Indicates the first View context embedding of sequencing sites Projector head shared by spatial view and presentation view After processing and normalization, the view-specific embedding is specifically used to compute the structure-guided contrastive learning loss term. Indicates the first Each sequencing site characterizes the embedding. The projection head used for characterization and embedding. After processing and normalization, the fusion embedding is specifically used to compute the structure-guided contrastive learning loss term. and These are the positive sample pairs in the structure-guided contrastive learning loss term; Indicates view-specific embedding With Fusion Embedding The concatenated matrix, where, The time corresponds to the first View-specific embedding of sequencing sites , The time corresponds to the first Fusion embedding of sequencing sites ; for The i-th row; and Both are projection heads consisting of a two-layer multilayer sensor. and The calculation form can be uniformly expressed as: In the formula This is the weight matrix. , For bias terms, This is the ReLU activation function. and They represent respectively with and For anchor points, a contrastive learning negative sample exclusion set is constructed based on an adaptive fusion graph; specifically, to construct an effective negative sample set, the following embeddings are excluded from the denominator calculation of the anchor points using the adaptive fusion graph: When it is an anchor point, Exclude (1) Anchor point embedding itself (corresponding index) (2) The first in the adaptive fusion graph The sequencing sites are directly neighbors View-specific embedding (index ) and fusion embedding (index );by When it is an anchor point, Exclude (1) Anchor point embedding itself (corresponding index) (2) The first in the adaptive fusion graph The sequencing sites are directly neighbors View-specific embedding (index ) and fusion embedding (index ).
[0113] Spatial smoothing embeddings are obtained by aggregating the spatial neighborhood of the sequencing site characterization embeddings. The formula for the spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site characterization embedding and the spatial smoothing embedding:
[0114] ;
[0115] in, This represents the space smoothing regularization term; and They represent the first The sequencing site and the adjacent sequencing site Sequencing site characterization embedding of each sequencing site; Indicates sequencing sites A set of spatial neighbors.
[0116] The formula for obtaining the reconstruction loss term is as follows: The feature matrix after preprocessing the embedding reconstruction is characterized by sequencing sites.
[0117] ;
[0118] in, Indicates the reconstruction loss item; This represents the true preprocessed feature vector; This represents the reconstructed feature vector output by the decoder.
[0119] During the training of the spatial domain recognition model, when a structure-guided contrastive learning loss term is added, the training parameters also need to include the parameters of two projection heads constructed from two-layer multilayer perceptrons. The Adam optimizer is used, with an initial learning rate set to 0.001 and a weight decay coefficient set to... Optimization training is performed end-to-end according to the set loss function.
[0120] After the end-to-end training in step 3 above, each component of the model has learned parameters that can accurately characterize the features of the spatial domain through optimization of the joint loss function.
[0121] Step 4: Use the trained spatial domain recognition model to obtain the final sequencing site representation embedding of the original spatial transcriptomics data and perform unsupervised clustering to obtain the spatial domain recognition results of the original spatial transcriptomics data.
[0122] The K-Means clustering algorithm was used to perform unsupervised clustering on the final sequencing site characterization embeddings of the obtained raw spatial transcriptomics data, thereby assigning a corresponding clustering label to each sequencing site and obtaining the final spatial domain identification results.
[0123] The obtained spatial domain recognition results are compared with the real histological anatomical labels, and the adjusted Land coefficient (ARI) and Fowlkes-Mallows index (FMI) are calculated to achieve a quantitative evaluation of the model's spatial domain recognition performance.
[0124] Experimental Section: To verify the generalization ability of the model corresponding to the method described in this invention on different sequencing platforms and complex tissue microenvironments, this embodiment uses a multi-platform spatial transcriptomics dataset for validation experiments. The experimental dataset covers multiple mainstream spatial transcriptomics platforms, including 10xVisium, STARmap, Stereo-seq, osmFISH, and MERFISH, and contains data of various resolutions, effectively adapting to different experimental scenarios. Detailed information on the spatial transcriptomics datasets used in this embodiment is shown in Table 1. The MOB dataset, lacking real labels, is only used for visual clustering effect comparison.
[0125] Table 1: Spatial Transcriptomics Datasets Used for Model Evaluation
[0126]
[0127] To evaluate model performance, ARI and FMI were used to assess the clustering results obtained by the model. To verify the effectiveness of the method of this invention, seven representative spatial domain identification methods, namely SpaGCN, STAGATE, GraphST, MMSpa, Spatial-MGCN, MAFN, and spCLUE, were selected as comparative baselines.
[0128] ARI (Adjusted Rand Index): A metric for evaluating the similarity between two clustering results, comparing the clustering result to a known reference cluster. The score ranges from -1 to 1. 1 indicates perfect consistency (clustering results are completely identical), 0 indicates random assignment (no significant consistency), and negative values mean consistency is below randomness. The calculation formula is as follows:
[0129] ;
[0130] in, This indicates that they both belong to the same cluster in the first clustering. and clusters in the second cluster The number of points, Indicates the cluster in the first clustering The number of points contained therein, and This indicates that the cluster in the second clustering is... The number of points contained.
[0131] FMI (Fowlkes-Mallows index): An external metric used to evaluate the similarity between two clustering results (cluster predictions and true reference labels). It is defined as the geometric mean of pairwise precision and pairwise recall. FMI values range from 0 to 1. The closer the value is to 1, the higher the consistency between the clustering result and the reference label; when FMI is 1, it indicates a perfect match between the two clustering results. Its calculation formula is as follows:
[0132] ;
[0133] in:
[0134] TP (True Positive): Represents the number of sample pairs that are grouped into the same cluster in the predicted clustering and also belong to the same cluster in the true label.
[0135] FP (False Positive): Represents the number of sample pairs that are grouped into the same cluster in the predicted clustering but belong to different clusters in the true label.
[0136] FN (False Negative): Represents the number of sample pairs that are classified into different clusters in the predicted clustering but belong to the same cluster in the true label.
[0137] To verify the superior performance of this invention, the model corresponding to the method proposed in this embodiment was compared and evaluated with existing baseline methods on the aforementioned dataset. Specific ARI scores are shown in Table 2, and specific FMI scores are shown in Table 3, where bold indicates the optimal index and underline indicates the suboptimal index.
[0138] Specifically, to evaluate the baseline performance of the model corresponding to the method proposed in this embodiment, the model was applied to the human dorsolateral prefrontal cortex (DLPFC) benchmark dataset obtained from the 10x Visium platform. Figure 3a The results for 151,672 slices from the DLPFC dataset are presented. As a multi-slice dataset, the DLPFC dataset is presented as mean results in the experimental results table. DLPFC tissue exhibits a clear layered anatomical structure, consisting of six cortical layers and white matter (WM). On all 12 slices of the DLPFC dataset, spSAGE achieved leading ARI and FMI scores, significantly outperforming other baseline methods. Figure 3b The ARI scores of 12 slices were displayed. Figure 3b(1) and FMI score ( Figure 3b (2) Box plot). This demonstrates that the feature fusion mechanism of the spatial graph and representation graph constructed by the spSAGE model can learn a highly compact, highly cohesive spatial topological representation with excellent inter-class separation. Figure 3c The clustering results visualization shows that spSAGE clearly identified layer 4 as a smooth and independent anatomical layer on slice 151672, exhibiting the highest consistency with manual annotation. Meanwhile, Figure 3d In the UMAP embedding map shown, spSAGE yielded five well-separated clusters; its trajectory inference PAGA map exhibited a well-defined linear topology with stronger connections (thicker edges) between adjacent cortical layers, which highly matches the known biological anatomical continuity of DLPFC.
[0139] The spatial domain recognition performance of spSAGE was further validated on the mouse olfactory bulb (MOB) dataset analyzed using the Stereo-seq technology platform. Based on previous research, the MOB dataset was annotated with the rostral migration flow (RMS), granular cell layer (GCL), inner plexiform layer (IPL), mitral cell layer (MCL), outer plexiform layer (EPL), glomerular layer (GL), and olfactory nerve layer (ONL). Figure 4a ). Figure 4b This paper presents a comparison between spSAGE and three other methods (SpaGCN, STAGATE, and spCLUE) that achieve the best visualization results on the MOB dataset. For the finest RMS layers, only spSAGE successfully identified their long and narrow structures through a sophisticated integration strategy of spatial and expression information. Furthermore, the reliability of the spSAGE results was validated by examining the expression of known marker genes and their corresponding spatial domains. Figure 4c As shown, the regions identified by spSAGE precisely match the highly expressed regions of their corresponding typical marker genes (ONL: Apod; GL: Cck; EPL: Slc6a11; MCL: Gabra1; IPL: Pcp4; GCL: Nrgn; RMS: Mbp), indicating that spSAGE effectively captures fine-grained spatial and functional context and can identify fine spatial domains.
[0140] Table 2: Performance comparison of deep learning models for spatial domain recognition on five datasets (ARI)
[0141]
[0142] Table 3: Performance Comparison of Spatial Domain Recognition Deep Learning Models on Five Datasets (FMI)
[0143]
[0144] In summary, the quantitative experimental results demonstrate that the proposed method (spSAGE) significantly and comprehensively outperforms existing methods in both ARI and FMI metrics across cross-platform and cross-tissue type datasets. The spSAGE model not only exhibits higher spatial domain recognition accuracy and anatomical structure reconstruction on data from similar platforms, but also maintains stable clustering performance across different platforms. This proves that the spSAGE model possesses stronger stability and superior cross-platform generalization ability in spatial domain recognition tasks within spatial transcriptomics.
[0145] In addition, to further evaluate the computational efficiency of the model when adopting the multi-view fusion strategy, this embodiment compares the training time (in seconds) of Spatial-MGCN and MAFN, which are also multi-view architecture comparison methods, on five spatial transcriptomics datasets. The specific results are shown in Table 4.
[0146] Table 4: Comparison of training time for the multi-view method on five datasets
[0147]
[0148] On all datasets, similar multi-view methods Spatial-MGCN and MAFN have training times ranging from 200 to 450 seconds. In contrast, the spSAGE model in this embodiment maintains a training time of less than 30 seconds on all datasets, achieving a balance between computational efficiency and spatial domain recognition accuracy.
[0149] Example 2.
[0150] This example provides a spatial domain identification system for spatial transcriptomics data, including:
[0151] Preprocessing and normalization unit: Obtain raw spatial transcriptomics data, perform data preprocessing and graph construction on the raw spatial transcriptomics data to obtain the preprocessed feature matrix, spatial normalized adjacency matrix and expression normalized adjacency matrix;
[0152] The multi-view fusion and sequencing site representation embedding extraction unit: perturbs and extracts graph convolution features from the obtained preprocessed feature matrix, spatially normalized adjacency matrix, and expression-normalized adjacency matrix to obtain spatial context embedding and transcriptome functional context embedding. After splicing, these are input into a gating network, and then output through an activation function to obtain sequencing site-specific spatial graph fusion weights and expression graph fusion weights. The corresponding edges in the spatially normalized adjacency matrix and expression-normalized adjacency matrix are dynamically weighted and fused with the sequencing site-specific spatial graph fusion weights and expression graph fusion weights to obtain an adaptive fusion adjacency matrix. Then, feature propagation and multilayer perceptron mapping are performed through graph convolution to obtain the sequencing site representation embedding.
[0153] Joint Loss Construction and Training Unit: Using the spatially normalized adjacency matrix as a soft constraint, spatial smooth embeddings are obtained by aggregating sequencing site representation embeddings within their spatial neighborhoods. A spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site representation embedding and the spatial smooth embedding. The sequencing site representation embeddings are input into the decoder to reconstruct the preprocessed feature matrix, resulting in a reconstruction loss term. The spatial smoothing regularization term and the reconstruction loss term are used as a joint loss function to train the spatial domain recognition model formed by the graph convolutional network, gating network, multilayer perceptron, and decoder in the multiview fusion and sequencing site representation embedding extraction process, resulting in a trained spatial domain recognition model.
[0154] Identification Unit: The final sequencing site representation embedding of the original spatial transcriptomics data is obtained by using the trained spatial domain identification model and unsupervised clustering to obtain the spatial domain identification results of the original spatial transcriptomics data.
[0155] The system uses the aforementioned spatial domain identification method for spatial transcriptomics data for identification; the specific process will not be described in detail here.
[0156] Those skilled in the art will understand that embodiments of the present invention can be implemented entirely in hardware, entirely in software, or through a combination of hardware and software functions. Typically, the present invention can be deployed using a computer-readable storage medium (including but not limited to disk storage, non-volatile memory, optical memory, etc.) containing usable program code. The flowcharts and block diagrams presented in the specification and drawings illustrate the logical functions and execution timing of the control architecture of the present invention. Each action and combination thereof in these flowcharts or block diagrams can be implemented by a general-purpose computer, a dedicated computing platform, or an embedded data processing device that executes specific machine-readable instructions, thereby completing the feature extraction and clustering functions of the present invention in spatial domain recognition.
[0157] Finally, it should be noted that the above description is merely a preferred embodiment of the technical solution of the present invention, and its purpose is to explain the technical logic of the present invention in detail, rather than to impose an absolute limitation on the scope of protection. Any equivalent substitutions or engineering evolutions made within the core control concept and technical architecture of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A spatial domain identification method for spatial transcriptomics data, characterized in that, include: Step 1: Obtain raw spatial transcriptomics data, perform data preprocessing and graph construction on the raw spatial transcriptomics data to obtain the preprocessed feature matrix, spatially normalized adjacency matrix and expression-normalized adjacency matrix; Step 2: Multi-view fusion and sequencing site characterization embedding extraction; The obtained preprocessed feature matrix, spatially normalized adjacency matrix, and expression-normalized adjacency matrix are perturbed and graph convolution feature extracted to obtain spatial context embedding and transcriptome functional context embedding. After splicing, they are input into a gating network, and then the activation function outputs sequencing site-specific spatial graph fusion weights and expression graph fusion weights. The corresponding edges in the spatially normalized adjacency matrix and the expression-normalized adjacency matrix are dynamically weighted and fused with the spatial graph fusion weights and expression graph fusion weights specific to the sequencing site to obtain an adaptive fused adjacency matrix. Then, feature propagation and multilayer perceptron mapping are performed through graph convolution to obtain the sequencing site representation embedding. Step 3: Using the spatially normalized adjacency matrix as a soft constraint, the sequencing site representation embeddings are aggregated within their spatial neighborhoods to obtain spatially smooth embeddings. A spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site representation embedding and the spatially smooth embedding. The sequencing site representation embeddings are input into the decoder to reconstruct the preprocessed feature matrix, resulting in a reconstruction loss term. The spatial smoothing regularization term and the reconstruction loss term are used as a joint loss function to train the spatial domain recognition model formed by the graph convolutional network, gated network, multilayer perceptron, and decoder in Step 2, resulting in a trained spatial domain recognition model. Step 4: Use the trained spatial domain recognition model to obtain the final sequencing site representation embedding of the original spatial transcriptomics data and perform unsupervised clustering to obtain the spatial domain recognition results of the original spatial transcriptomics data; The calculation process for the spatial map fusion weights and expression map fusion weights specific to sequencing sites is as follows: ; ; ; ; in, Indicates the first Specific fusion weight vector for each sequencing site and These represent sequencing sites. The specific spatial graph fusion weights and representation graph fusion weights, and satisfying ; This represents the normalized exponential function; The scaling hyperparameter represents the sharpness of the distribution of spatial map fusion weights and expression map fusion weights used to control the specificity of sequencing sites; This represents a gating network composed of multilayer perceptrons. Indicates the first The joint contextual characterization of sequencing sites is, in other words, The OK; Presentation layer normalization operation, This indicates a splicing operation. The joint contextual representation of all sequencing sites is obtained by splicing spatial context embeddings and transcriptome functional context embeddings and then performing layer normalization. The view context embeddings representing all sequencing sites. Indicates the view type. The value is and , Represents a spatial view. Represents the view, that is Represents the spatial context embedding of all sequencing sites. Transcriptome functional context embeddings representing all sequencing sites; This represents the learnable bias parameter; This indicates a batch normalization operation; Represents the activation function of the exponential linear unit; A graph corruption function indicating that edges are randomly dropped; It is a matrix. This represents the total number of sequencing sites, where each element follows a parameter of . The Bernoulli distribution, i.e. , Indicates the Bernoulli distribution. This represents the probability of discarding an edge; This represents the preprocessed feature matrix after feature-level discarding and Gaussian perturbation. The learnable weight matrix of the graph convolutional network, which represents the space-normalized adjacency matrix and the expression-normalized adjacency matrix, is shared. Represents the space or expresses the normalized adjacency matrix. and These represent the spatially normalized adjacency matrix and the representationally normalized adjacency matrix, respectively.
2. The method according to claim 1, characterized in that, The specific calculation process for obtaining the sequencing site representation embedding is as follows: The corresponding edges in the spatially normalized adjacency matrix and the expression-normalized adjacency matrix are dynamically weighted and fused using sequencing site-specific spatial graph fusion weights and expression graph fusion weights to obtain an adaptive fused adjacency matrix. Then, through graph convolutional feature propagation and multilayer perceptron mapping, the specific calculation process for the sequencing site representation embedding is obtained. ; ; ; ; in, Represents the adaptive fusion adjacency matrix Middle node With nodes The edge weights between nodes are such that each node in the adjacency matrix uniquely corresponds to a sequencing site. and Represent the space-normalized adjacency matrix respectively With expression normalized adjacency matrix The corresponding edge in; It is an adaptive fusion adjacency matrix. It is the identity matrix; It is a feature propagation fusion adjacency matrix obtained by adaptive fusion adjacency matrix through self-loop enhancement; This represents the propagation embedding after propagation on the feature propagation fusion adjacency matrix. This represents a two-layer multilayer perceptron with activation functions. Indicates the residual weight; This indicates the sequencing site characterization embedding.
3. The method according to claim 1, characterized in that, The spatial or representational normalized adjacency matrix is calculated using the following formula: ; ; in, Indicates the view type. Represents a spatial view. Represents the view. This represents a hybrid space containing self-connections or an adjacency matrix. This represents a hybrid adjacency matrix containing self-connections. This represents a hybrid adjacency matrix containing self-connections; express The degree matrix; This represents the weight hyperparameters that control self-connection; Represents the identity matrix; Represents the initial adjacency matrix. Represents the initial spatial adjacency matrix. This represents the initial adjacency matrix.
4. The method according to claim 1, characterized in that, The Adam optimizer was used, with an initial learning rate of 0.001 and a weight decay coefficient set to [value missing]. End-to-end optimization training is performed using the following joint loss function: ; in, and These are the non-negative hyperparameters used to balance the contributions of the reconstruction loss term and the spatial smoothing regularization term, respectively. , These represent the reconstruction loss term and the spatial smoothing regularization term, respectively.
5. The method according to claim 1, characterized in that, Construct a structure-guided contrastive learning loss term and incorporate it into the joint loss function: ; , ; ; ; ; in, , and These are used to balance the reconstruction loss terms. Structure-guided contrastive learning loss term and spatial smoothing regularization term Non-negative hyperparameters of contribution; Indicates the view type. Represents a spatial view. Represents the view; This represents the function for calculating cosine similarity. This indicates temperature hyperparameters; Indicates the first View context embedding of sequencing sites Projector head shared by spatial view and presentation view After processing and normalization, the view-specific embedding is specifically used to compute the structure-guided contrastive learning loss term. Indicates the first Each sequencing site characterizes the embedding. The projection head used for characterization and embedding. After processing and normalization, the fusion embedding is specifically used to compute the structure-guided contrastive learning loss term. and These are the positive sample pairs in the structure-guided contrastive learning loss term; Indicates view-specific embedding With Fusion Embedding The concatenated matrix, where, The time corresponds to the first View-specific embedding of sequencing sites , > The time corresponds to the first Fusion embedding of sequencing sites ; and Both are projection heads consisting of a two-layer multilayer sensor. Indicates the first The view context embeddings of each sequencing site are, in other words, the view context embeddings of each sequencing site. The i-th row, The view context embeddings representing all sequencing sites; and They represent respectively with and The negative sample exclusion set for contrastive learning constructed based on the adaptive fusion graph when the anchor point is used includes the anchor point itself and the anchor point's direct neighbors in the adaptive fusion graph.
6. The method according to any one of claims 1-5, characterized in that, Spatial smoothing embeddings are obtained by aggregating the spatial neighborhood of the sequencing site characterization embeddings. The formula for the spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site characterization embedding and the spatial smoothing embedding: ; in, This represents the space smoothing regularization term; and They represent the first The sequencing site and the adjacent sequencing site Sequencing site characterization embedding of each sequencing site; Indicates sequencing sites A set of spatial neighbors.
7. The method according to any one of claims 1-5, characterized in that, The sequencing site characterization is embedded into the input decoder to reconstruct the preprocessed feature matrix, and the formula for the reconstruction loss term is as follows: ; in, Indicates the reconstruction loss item; This represents the true preprocessed feature vector; This represents the reconstructed feature vector output by the decoder.
8. The method according to claim 1, characterized in that, The gene expression matrix in the original spatial transcriptomics data was normalized, scaled, and reduced in dimensionality by principal component analysis to obtain the preprocessed feature matrix.
9. A spatial domain identification system for spatial transcriptomics data, characterized in that, include: Preprocessing and normalization unit: Obtain raw spatial transcriptomics data, perform data preprocessing and graph construction on the raw spatial transcriptomics data to obtain the preprocessed feature matrix, spatial normalized adjacency matrix and expression normalized adjacency matrix; Multi-view fusion and sequencing site characterization embedding extraction unit: The obtained preprocessed feature matrix, spatially normalized adjacency matrix and expression normalized adjacency matrix are perturbed and graph convolution feature extracted to obtain spatial context embedding and transcriptome functional context embedding. After splicing, they are input into the gating network and then output sequencing site-specific spatial graph fusion weights and expression graph fusion weights through the activation function. The corresponding edges in the spatially normalized adjacency matrix and the expression-normalized adjacency matrix are dynamically weighted and fused with the spatial graph fusion weights and expression graph fusion weights specific to the sequencing site to obtain an adaptive fused adjacency matrix. Then, feature propagation and multilayer perceptron mapping are performed through graph convolution to obtain the sequencing site representation embedding. Joint Loss Construction and Training Unit: Using the spatially normalized adjacency matrix as a soft constraint, spatial smooth embeddings are obtained by aggregating sequencing site representation embeddings within their spatial neighborhoods. A spatial smoothing regularization term is obtained by penalizing the deviation between each sequencing site representation embedding and the spatial smooth embedding. The sequencing site representation embeddings are input into the decoder to reconstruct the preprocessed feature matrix, resulting in a reconstruction loss term. The spatial smoothing regularization term and the reconstruction loss term are used as a joint loss function to train the spatial domain recognition model formed by the graph convolutional network, gating network, multilayer perceptron, and decoder in the multiview fusion and sequencing site representation embedding extraction process, resulting in a trained spatial domain recognition model. Identification Unit: The trained spatial domain identification model is used to obtain the final sequencing site representation embedding of the original spatial transcriptomics data and perform unsupervised clustering to obtain the spatial domain identification results of the original spatial transcriptomics data. The calculation process for the spatial map fusion weights and expression map fusion weights specific to sequencing sites is as follows: ; ; ; ; in, Indicates the first Specific fusion weight vector for each sequencing site and These represent sequencing sites. The specific spatial graph fusion weights and representation graph fusion weights, and satisfying ; This represents the normalized exponential function; The scaling hyperparameter represents the sharpness of the distribution of spatial map fusion weights and expression map fusion weights used to control the specificity of sequencing sites; This represents a gating network composed of multilayer perceptrons. Indicates the first The joint contextual characterization of sequencing sites is, in other words, The OK; Presentation layer normalization operation, This indicates a splicing operation. The joint contextual representation of all sequencing sites is obtained by splicing spatial context embeddings and transcriptome functional context embeddings and then performing layer normalization. The view context embeddings representing all sequencing sites. Indicates the view type. The value is and , Represents a spatial view. Represents the view, that is Represents the spatial context embedding of all sequencing sites. Transcriptome functional context embeddings representing all sequencing sites; This represents the learnable bias parameter; This indicates a batch normalization operation; Represents the activation function of the exponential linear unit; A graph corruption function indicating that edges are randomly dropped; It is a matrix. This represents the total number of sequencing sites, where each element follows a parameter of . Bernoulli distribution, i.e. , Indicates the Bernoulli distribution. This represents the probability of discarding an edge; This represents the preprocessed feature matrix after feature-level discarding and Gaussian perturbation. The learnable weight matrix of the graph convolutional network, which represents the space-normalized adjacency matrix and the expression-normalized adjacency matrix, is shared. Represents the space or expresses the normalized adjacency matrix. and These represent the spatially normalized adjacency matrix and the representationally normalized adjacency matrix, respectively.
Citation Information
Patent Citations
Organization structure clustering method based on spatial transcriptome data and related device
CN120766776A
Spatial multi-omics structural domain identification method and system based on Taylor linear attention graph convolution
CN121542572A