A cross-domain cell annotation method for single-cell spatial transcriptome

CN122676949BActive Publication Date: 2026-10-23HUNAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611131629.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-23
Estimated Expiration
2046-07-29

AI Technical Summary

Technical Problem

[0005]本发明解决的技术问题是:针对现有细胞注释方法对局部异质区域细胞表征能力不够、跨域数据分布差异导致注释准确率下降的问题,提供一种面向单细胞空间转录组的跨域细胞注释方法,来有效提高局部异质区域细胞表征能力,并缓解跨域数据分布差异

Benefits of technology

[0034](1)本发明提出融合空间异质感知表征与预测类混淆全局约束的全流程迁移注释方法,实现复杂组织异质区域特征表征与跨域细胞识别的协同建模,能够有效缓解复杂组织区域的特征混合问题,提升在复杂组织区域的细胞识别稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122676949B_ABST
    Figure CN122676949B_ABST
Patent Text Reader

Abstract

The application discloses a cross-domain cell annotation method for single-cell spatial transcriptome, acquires target single-cell spatial transcriptome data and reference single-cell data to construct respective graph structures, and extracts corresponding first-order neighborhood graphs and non-overlapping second-order neighborhood graphs; the reference single-cell data, the target single-cell spatial transcriptome data and their respective extracted first-order neighborhood graphs and non-overlapping second-order neighborhood graphs are input into a parameter-shared spatial heterogeneity perception graph encoder, and a general low-dimensional latent representation of the reference single-cell data and the target single-cell spatial transcriptome data in a unified latent space is output; the general low-dimensional latent representation is input into a prototype classifier to model similarity, and a precise annotation result of a known cell category corresponding to the target single-cell spatial transcriptome data is predicted and output. The application can effectively improve the local heterogeneous region cell representation capability, alleviate the cross-domain data distribution difference, and improve the efficiency, accuracy and generalization ability of single-cell spatial transcriptome cell type identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses a cross-domain cell annotation method for single-cell spatial transcriptomics, which relates to the interdisciplinary fields of bioinformatics, spatial transcriptomics, and deep learning. Background Technology

[0002] With the rapid development of spatial transcriptomics (ST) technology, researchers can perform high-throughput detection of gene expression within tissues while preserving their spatial location information, enabling systematic studies of the tissue microenvironment, cell spatial distribution, and intercellular interactions. Furthermore, with the advancement of high-resolution spatial transcriptomics technologies such as MERFISH, seqFISH, and Xenium, the resolution of spatial transcriptomics data has continuously improved, gradually achieving single-cell and even subcellular level analysis capabilities. This type of single-cell spatial transcriptomics data can reveal the spatial heterogeneity and dynamic changes of different cell types within tissues in greater detail. Therefore, how to automatically and accurately identify cell types in spatial transcriptomics has become a key technical issue in spatial omics analysis.

[0003] To overcome the shortcomings of traditional manual annotation based on marker genes, which is inefficient and subject to significant subjective bias, existing automated cell annotation methods typically use single-cell RNA sequencing (scRNA-seq) data that incorporates whole transcriptome information as a reference map. Through cross-domain transfer learning or graph neural network technology, cell types in the spatial transcriptome data to be tested can be predicted. For example, Chinese patent application CN121122429A discloses a cell interaction identification method based on cellular spatial transcriptome data. Cell pairs are constructed based on cell spatial proximity, and the interaction signal matrix and spatial information of each cell pair are calculated by combining a ligand-receptor database. Subsequently, a graph neural network is used to generate cell pair embedding representations and calculate the similarity between cell pairs. At the same time, the similarity between cells is calculated based on the gene expression matrix.

[0004] However, these related methods have the following limitations in practical applications: First, existing graph neural network methods often implicitly rely on the assumption of local homogeneity, that is, they assume that spatially adjacent cells belong to the same type. In highly mixed heterogeneous regions of real tissues, this can easily introduce heterogeneous information at the boundaries, leading to overly smooth features that are mixed with neighborhood representations, thus weakening the discriminative ability of complex regions. Second, existing methods rely heavily on global feature matching for cross-platform alignment. When faced with scenarios of uneven cell distribution or highly overlapping features, the lack of direct constraints on the degree of confusion of the predicted class can easily lead to negative transfer, resulting in a decrease in annotation accuracy. Summary of the Invention

[0005] The technical problem solved by this invention is to address the shortcomings of existing cell annotation methods in representing cells in local heterogeneous regions and the decrease in annotation accuracy caused by differences in cross-domain data distribution. This invention provides a cross-domain cell annotation method for single-cell spatial transcriptomics to effectively improve the ability to represent cells in local heterogeneous regions and alleviate differences in cross-domain data distribution.

[0006] This invention is achieved using the following technical solution:

[0007] A cross-domain cellular annotation method for single-cell spatial transcriptomics includes the following steps:

[0008] S1. Obtain reference single-cell data with labeled cell types, construct a reference graph structure based on the gene expression profile of the reference single-cell data, construct a space-representation fusion graph structure based on the physical spatial coordinates of the target single-cell spatial transcriptome data and the gene expression profile, decompose and normalize the reference graph structure and the space-representation fusion graph structure respectively, and extract the corresponding first-order neighborhood graph and non-overlapping second-order neighborhood graph.

[0009] S2. Input the reference single-cell data and the target single-cell spatial transcriptome data, along with their respective extracted first-order neighborhood graphs and non-overlapping second-order neighborhood graphs, into the spatial heterogeneity sensing graph encoder, and output the general low-dimensional latent representations of the reference single-cell data and the target single-cell spatial transcriptome data in the unified latent space.

[0010] S3. Input the general low-dimensional latent representation into the prototype classifier for similarity modeling, and predict the accurate annotation results of the target single-cell spatial transcriptome data corresponding to the known cell categories.

[0011] In a cross-domain cell annotation method for single-cell spatial transcriptomes according to the present invention, the reference single-cell data is reference single-cell RNA sequencing data with existing cell type annotations. Common genes are extracted from the reference single-cell data and the target single-cell spatial transcriptome data, and the total cell count in each data is normalized and logarithmically transformed.

[0012] In a cross-domain cell annotation method for single-cell spatial transcriptomics according to the present invention, further, for the reference single-cell data, a K-nearest neighbor graph is constructed as a reference graph structure based on the cosine similarity between adjacent cells calculated according to the gene expression profile of the corresponding cell, and the edge weight of the reference graph is the cosine similarity.

[0013] For the target single-cell spatial transcriptome data, a candidate spatial neighbor set for each target single cell is matched according to the Euclidean distance between cells. In the candidate spatial neighbor set, the cosine similarity between adjacent cells is calculated based on the gene expression profile of the target single cell to construct a K-nearest neighbor graph as a spatial-representation fusion graph structure. The edge weight of the spatial-representation fusion graph is the product of the cosine similarity and the Gaussian kernel function of the Euclidean distance.

[0014] In a cross-domain cellular annotation method for single-cell spatial transcriptomics according to the present invention, the reference graph structure and the spatial-representation fusion graph structure are further decomposed and normalized as follows:

[0015] Extract topological adjacency relationships from the graph structure, construct an unweighted first-order adjacency matrix, and use the square of the first-order adjacency matrix corresponding to the graph structure to remove edges and self-loop connections that already exist in the first-order neighborhood, thereby obtaining a second-order neighborhood graph with eliminated redundancy and overlap and its corresponding second-order adjacency matrix.

[0016] The first-order adjacency matrix and the second-order adjacency matrix are respectively subjected to the self-loop addition operation, and symmetric normalization is performed using their respective degree matrices;

[0017] Extract the indices and corresponding weights of non-zero elements in the normalized matrix, and output the normalized edge indices and edge weights.

[0018] In a cross-domain cell annotation method for single-cell spatial transcriptomics according to the present invention, further, in step S2, the reference single-cell data and the target single-cell spatial transcriptomics data of the input spatial heterogeneity sensing map encoder are processed as follows:

[0019] Based on Wilcoxon class differential expression analysis of reference single-cell data, a prior weight vector of gene importance was constructed according to the log fold difference in expression of common genes in all cell categories between the reference single-cell data and the target single-cell spatial transcriptome data.

[0020] The dynamic feature gating matrix of common genes in the reference single-cell data and the target single-cell spatial transcriptome data is fused with the prior weight vector of the gene importance.

[0021] The fused dynamic feature gating matrix is ​​processed by linear mapping and normalization to output the low-dimensional initial feature embeddings of the reference single-cell data and the target single-cell spatial transcriptome data, which are used as the initial node features of the input spatial heterogeneous perceptual map encoder.

[0022] In a cross-domain cell annotation method for single-cell spatial transcriptomics according to the present invention, further, each graph attention coding layer in the spatial heterogeneous sensing graph encoder maintains an independent graph attention coding branch for a first-order neighborhood graph and a non-overlapping second-order neighborhood graph. The graph attention coding branch extracts the aggregated feature representation of the corresponding neighborhood graph and performs residual connection with the input features of the corresponding branch to obtain the updated feature representation.

[0023] Then, the updated feature representations of the first-order neighborhood graph and the non-overlapping second-order neighborhood graph are concatenated along the channel dimension to output the hierarchical feature representation of the attention encoding layer of the current graph.

[0024] After the initial node features of the input reference single-cell data and target single-cell spatial transcriptome data are concatenated with the hierarchical feature representation output by the graph attention coding layer at full scale, a dimensionality mapping is performed through a linear projection layer to output a general low-dimensional latent representation of the reference single-cell data and target single-cell spatial transcriptome data in a unified latent space.

[0025] In a cross-domain cell annotation method for single-cell spatial transcriptomes according to the present invention, further, in step S2, a decoder is used to reconstruct a general low-dimensional potential representation of reference single-cell data and target single-cell spatial transcriptome data. The decoder has a shared backbone network consisting of two fully connected layers and a domain-specific output head structure.

[0026] For reference single-cell data, the mean parameter and over-discrete parameter are estimated using the negative binomial distribution output head.

[0027] For target single-cell spatial transcriptome data, the mean parameter is estimated using the Poisson distribution output head.

[0028] The estimated parameters of the reference single-cell data and the target single-cell spatial transcriptome data are used to calculate the loss with their respective original counting matrices, and a reconstruction loss of a general low-dimensional latent representation is jointly constructed to constrain and optimize the entire spatial heterogeneous sensing map encoder.

[0029] In a cross-domain cell annotation method for single-cell spatial transcriptomes according to the present invention, further, in step S3, the prototype classifier is a prototype-based cosine classifier. The cosine classifier maintains learnable category prototype vectors corresponding to known cell categories. The general low-dimensional latent representation is input into the projection head of the cosine classifier for nonlinear mapping to obtain classification feature representation. By using the cosine similarity between the classification feature representation of each cell and the prototype vectors of each category, the predicted probability distribution of each cell belonging to the known cell category corresponding to the prototype vector of each category is output. According to the predicted probability distribution, the known cell category corresponding to the maximum predicted probability of each cell is selected as the final cell type annotation result of the corresponding cell in the target single-cell spatial transcriptome data.

[0030] In a cross-domain cell annotation method for single-cell spatial transcriptomes according to the present invention, further, in step S3, the predicted probability distributions of the reference single-cell data and the target single-cell spatial transcriptome data are output according to similarity modeling, the data focus loss of the reference single-cell data and the predicted class confusion constraint of the target single-cell spatial transcriptome data are obtained respectively, and the parameters of the spatial heterogeneous perception map encoder and the prototype classifier are updated by backpropagation in conjunction with the reconstruction loss of the general low-dimensional latent representation obtained in step S2.

[0031] In a cross-domain cell annotation method for single-cell spatial transcriptomics according to the present invention, the data focus loss is further calculated by using a focus loss function to calculate the classification loss of the reference single-cell data;

[0032] The prediction class confusion constraint constructs sample weight coefficients based on the prediction information entropy of the prediction probability of each target single cell in the target single-cell spatial transcriptome data. The prediction probability matrix of the target single-cell spatial transcriptome data is weighted by the main samples using the sample weight coefficients to obtain a row-normalized class confusion matrix. The prediction class confusion constraint is constructed by minimizing the sum of the off-diagonal elements of the class confusion matrix.

[0033] The present invention, by adopting the above technical solution, has the following beneficial effects:

[0034] (1) This invention proposes a full-process transfer annotation method that integrates spatial heterogeneous perception representation and prediction class confusion global constraints to achieve collaborative modeling of feature representation of heterogeneous regions of complex tissues and cross-domain cell recognition. This method can effectively alleviate the feature mixing problem in complex tissue regions and improve the stability of cell recognition in complex tissue regions.

[0035] (2) Based on the joint framework of spatial heterogeneous perception representation and prediction class confusion global constraint (SpaMiCA), this invention can improve cross-domain adaptation ability, reduce class misjudgment and negative transfer problems, effectively improve the cell representation ability of local heterogeneous regions, and alleviate cross-domain data distribution differences. The overall algorithm has significantly improved the recognition of different cell categories compared with existing cell annotation methods.

[0036] (3) This invention supports feature representation of heterogeneous regions in complex tissues and reference data spatial mapping across technology platforms. It is compatible with multiple mainstream imaging and sequencing platforms such as MERFISH, STARmap PLUS, and osmFISH, and has good cross-platform applicability. By constructing a fully automated cell annotation system, it can achieve high-precision automated analysis of known cell types in complex tissue microenvironments across technology platforms.

[0037] In summary, the cross-domain cell annotation method for single-cell spatial transcriptomics provided by this invention can effectively improve the cell characterization ability of local heterogeneous regions and alleviate the differences in cross-domain data distribution, realize feature extraction and cross-platform domain adaptation for spatial heterogeneity perception, thereby improving the efficiency, accuracy and generalization ability of single-cell spatial transcriptomics cell type identification.

[0038] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0039] Figure 1 This is a schematic diagram illustrating the overall process of implementing a cross-domain cell annotation method for single-cell spatial transcriptomics according to the present invention.

[0040] Figure 2 This is a schematic diagram of the overall architecture of a cross-domain cell annotation method for single-cell spatial transcriptomes according to the present invention. Part A corresponds to step S1, which extracts the first-order neighborhood graph and non-overlapping second-order neighborhood graph of the reference single-cell data and single-cell spatial transcriptome data. Part B corresponds to step S2, which shows the output of the spatial heterogeneity sensing map encoder of the universal low-dimensional latent representation of the reference single-cell data and the target single-cell spatial transcriptome data in a unified latent space. Part C corresponds to step S3, which shows the prediction output of the annotation of the target single-cell spatial transcriptome data corresponding to the known cell type. Part D is a schematic diagram of the overall objective function, specifically including the flowchart of prediction confusion constraint, focus loss and reconstruction loss.

[0041] Figure 3 This is a spatial distribution diagram of the annotation results of this embodiment and the comparison method on the HPR dataset of the MERFISH platform. Among them, Figure 3 The middle (a) subplot shows the standard annotation results of the target single-cell spatial transcriptome data; Figure 3The middle (b) section shows the annotation results of the SpaMiCA method of the present invention; Figure 3 The middle (c) subplot is the annotation result of the SpatialMap comparison method; Figure 3 The middle (d) section plot shows the annotation results of the comparison method HIDF; Figure 3 The middle (e) section shows the annotation results of the comparison method scHeteroNet; Figure 3 The middle (f) plot shows the annotation results of the SpaGDA comparison method; Figure 3 The (g) subplot is the annotation result of the comparison method TOSICA; Figure 3 The h-part plot shows the annotation results of the comparison method DSCT; Figure 3 The middle (i) section shows the annotation results of the comparison method SPANN.

[0042] Figure 4 This is a spatial distribution map of the annotation results of this embodiment and the comparison method on the mouse somatosensory cortex dataset of the osmFISH platform. Among them, Figure 4 The middle (a) subplot shows the standard annotation results of the target single-cell spatial transcriptome data; Figure 4 The middle (b) section shows the annotation results of the SpaMiCA method of the present invention; Figure 4 The middle (c) subplot is the annotation result of the SpatialMap comparison method; Figure 4 The middle (d) section plot shows the annotation results of the comparison method HIDF; Figure 4 The middle (e) section shows the annotation results of the comparison method scHeteroNet; Figure 4 The middle (f) plot shows the annotation results of the SpaGDA comparison method; Figure 4 The (g) subplot is the annotation result of the comparison method TOSICA; Figure 4 The (h) subplot shows the annotation results of the comparison method DSCT. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. However, the scope of protection of the present invention is not limited to the following embodiments.

[0044] Example

[0045] See Figure 1 The present invention provides a cross-domain cell annotation method for single-cell spatial transcriptomics, which specifically includes the following steps:

[0046] S1. Obtain reference single-cell data with labeled cell types, construct a reference graph structure based on the gene expression profile of the reference single-cell data, construct a space-representation fusion graph structure based on the physical spatial coordinates of the target single-cell spatial transcriptome data and the gene expression profile, decompose and normalize the reference graph structure and the space-representation fusion graph structure respectively, and extract the corresponding first-order neighborhood graph and non-overlapping second-order neighborhood graph.

[0047] In this step, the reference single-cell data is reference single-cell RNA sequencing data with existing cell type annotations. Common genes are extracted from the reference single-cell data and the target single-cell spatial transcriptome data, and the total cell count in each data set is normalized and logarithmically transformed.

[0048] Specifically, reference single-cell data and target single-cell spatial transcriptome data with existing cell type annotations from public databases are obtained, and common genes in the two datasets are extracted to unify the gene feature dimensions of the two types of data and reduce the data distribution bias caused by differences in gene feature dimensions. The total count of each cell in the reference single-cell data and target single-cell spatial transcriptome data are normalized and logarithmically transformed to eliminate sequencing depth fluctuations. The original count matrix without normalization is stored in a separate data layer as the reconstruction target for subsequent feature reconstruction tasks, so as to preserve the distribution characteristics of the original discrete counts during data dimensionality reduction and noise reduction.

[0049] Specifically, such as Figure 2 As shown in section A, for the reference single-cell data, a K-nearest neighbor graph is constructed as a reference graph structure by calculating the cosine similarity between adjacent cells based on the gene expression profile of the corresponding cells. The edge weights of the reference graph are cosine similarity.

[0050] For the target single-cell spatial transcriptome data, a candidate spatial neighbor set for each target single cell is matched according to the Euclidean distance between cells. In the candidate spatial neighbor set, the cosine similarity between adjacent cells is calculated based on the gene expression profile of the target single cell to construct a K-nearest neighbor graph as a spatial-representation fusion graph structure. The edge weight of the spatial-representation fusion graph is the product of the cosine similarity and the Gaussian kernel function of the Euclidean distance.

[0051] For the gene expression profiles of the processed reference single-cell data, cosine similarity is calculated between each pair of cells. Based on the cosine similarity, a K-nearest neighbor graph is constructed for each cell, matching the K most similar neighbor cells as the reference graph structure for the reference single-cell data. The edge weights of the graph are the cosine similarity values. This graph structure is used to characterize the association of expression features between cells.

[0052] To construct a graph for the processed target single-cell spatial transcriptome data, the Euclidean distance between cells is first calculated based on the physical coordinates of the target single cell. Then, the 50 nearest cells to each target single cell are selected as candidate spatial neighbors based on the Euclidean distance. Within the candidate spatial neighbor set, the cosine similarity between cells is further calculated based on the gene expression profile of the target single cell. A K-nearest neighbor graph is then constructed as the spatial-representation fusion graph structure of the target single-cell spatial transcriptome data. The edge weights of the graph are the product of the cosine similarity between cells and the Gaussian kernel function of the Euclidean distance.

[0053] Specifically, for cells in the target single-cell spatial transcriptome data and cells Let their physical coordinates be respectively and The gene expression vectors are respectively and Then the edge weight The calculation formula is as follows:

[0054] .

[0055] In the formula, Cosine similarity of gene expression profiles in target single-cell spatial transcriptome data. This represents the Euclidean distance between cells. The bandwidth parameter is the Gaussian kernel. This space-representation fusion graph structure is used for semantic alignment with the reference graph structure of the reference single-cell data.

[0056] The corresponding first-order neighborhood graphs are extracted from the reference graph structure and the target space-representation fusion graph structure, respectively, and corresponding non-overlapping second-order neighborhood graphs are generated based on matrix powers and topological pruning. Specifically, the reference graph structure and the space-representation fusion graph structure are decomposed and normalized as follows: topological adjacency relations are extracted from the graph structure, an unweighted first-order adjacency matrix is ​​constructed, and edges and self-loop connections already existing in the first-order neighborhood are removed using the square of the first-order adjacency matrix corresponding to the graph structure, resulting in a second-order neighborhood graph and its corresponding second-order adjacency matrix that eliminates redundancy and overlap; self-loop addition operations are performed on the first-order adjacency matrix and the second-order adjacency matrix respectively, and symmetric normalization is performed using their respective degree matrices; the indices of non-zero elements and their corresponding weights in the normalized matrices are extracted, and the normalized edge indices and edge weights are output.

[0057] Taking the reference graph structure of single-cell data as an example, for the first-order adjacency matrix corresponding to the reference graph structure... The square of the first-order adjacency matrix is ​​calculated using matrix multiplication, and edges and self-loop connections already existing in the first-order neighborhood are removed, thereby obtaining a second-order neighborhood graph with eliminated redundancy and overlap, and its corresponding second-order adjacency matrix. Subsequently, self-loop addition operations are performed on the first-order and second-order adjacency matrices, respectively, and symmetric normalization is performed using their corresponding degree matrices. Finally, the indices and corresponding weights of the non-zero elements in the normalized matrices are extracted, and the normalized edge indices and edge weights are output for feature aggregation in the graph attention encoding layer.

[0058] The spatial-representation fusion graph structure of the target single-cell spatial transcriptome data is subjected to the same decomposition and graph normalization operations as above to obtain the first-order and non-overlapping second-order normalized graph structure of the target single-cell spatial transcriptome data.

[0059] The first-order neighborhood graph and non-overlapping second-order neighborhood graph corresponding to the reference single-cell data obtained from the above sub-steps, as well as the first-order neighborhood graph and non-overlapping second-order neighborhood graph corresponding to the target spatial transcriptome data, together constitute the dedicated multi-order graph input for the subsequent spatial heterogeneous sensing graph encoder.

[0060] S2. Input the reference single-cell data and the target single-cell spatial transcriptome data, along with their respective extracted first-order neighborhood graphs and non-overlapping second-order neighborhood graphs, into a parameter-shared spatial heterogeneous sensing graph encoder. This encoder outputs a universal low-dimensional latent representation of the reference single-cell data and the target single-cell spatial transcriptome data in a unified latent space. The reference single-cell data and the target single-cell spatial transcriptome data are encoded using the same spatial heterogeneous sensing graph encoder and share all learnable parameters within that encoder.

[0061] In this step, considering the varying importance of different genes in cell type identification, the following adjustments are made before inputting the reference single-cell data and target single-cell spatial transcriptome data into the spatial heterogeneity sensing map encoder:

[0062] Based on Wilcoxon class-specific differential expression analysis of reference single-cell data, a prior weight vector of gene importance is constructed according to the logarithmic fold difference in expression of common genes in all cell categories between the reference single-cell data and the target single-cell spatial transcriptome data. The dynamic feature gating matrix of common genes in the reference single-cell data and the target single-cell spatial transcriptome data is obtained and fused with the prior weight vector of gene importance. The fused dynamic feature gating matrix is ​​processed by linear mapping and normalization to output the low-dimensional initial feature embeddings of the reference single-cell data and the target single-cell spatial transcriptome data, which are then input into the spatial heterogeneous perceptual map encoder as initial node features.

[0063] Specifically, firstly, based on the Wilcoxon differential expression analysis results of the reference single-cell data, the maximum absolute value of the logarithmic expression fold change of each common gene in all cell categories is calculated, and this maximum value is normalized by the minimum-maximum value, thereby constructing a static gene importance prior weight vector. Secondly, for the initial shared gene matrix of the reference single-cell data and the target single-cell spatial transcriptome data, a dynamic feature gating matrix is ​​calculated using a single-layer linear mapping network. and prior trust coefficient And utilize prior trust coefficient For static prior weights With dynamic gating matrix Weighted fusion is performed to obtain the fused gating matrix. The same gating adjustment process is performed on the gene expression matrices of both the reference single-cell data and the target single-cell spatial transcriptome data. The calculation formulas involved in the above process are as follows:

[0064] ;

[0065] .

[0066] In the formula, This represents element-wise multiplication. The original gene expression feature matrix is ​​used as a reference for single-cell data or for target single-cell spatial transcriptome data. The gene expression feature matrix is ​​adjusted based on either reference single-cell data or target single-cell spatial transcriptome data. The weighted adjusted expression features are processed through a linear mapping layer and a normalization layer to output low-dimensional initial feature embeddings corresponding to the reference single-cell data and the target single-cell spatial transcriptome data, respectively. These embeddings serve as the initial node features for the subsequent spatial heterogeneous sensing map encoder.

[0067] The spatial heterogeneous perception map encoder is designed for the task of representing spatially heterogeneous regions. This encoder employs a first-order and non-overlapping second-order neighborhood-separated attention encoding and a multi-scale stitching and fusion structure. Specifically, as follows... Figure 2As shown in section B, each graph attention coding layer in the spatial heterogeneous sensing graph encoder maintains an independent graph attention coding branch for the first-order neighborhood graph and the non-overlapping second-order neighborhood graph. It extracts the independent aggregated feature representations of the first-order neighborhood graph and the non-overlapping second-order neighborhood graph and performs residual connections with the corresponding branch input features to obtain updated feature representations. The updated feature representations from the first-order neighborhood graph and the non-overlapping second-order neighborhood graph are concatenated along the channel dimension to output the hierarchical feature representation of the current graph attention coding layer. The initial node features of the input reference single-cell data and the target single-cell spatial transcriptome data are concatenated along the channel dimension with the hierarchical feature representations output by each graph attention coding layer. Then, a linear projection layer is used for dimensional mapping to output the general low-dimensional latent representations of the reference single-cell data and the target single-cell spatial transcriptome data in a unified latent space.

[0068] The adjusted low-dimensional initial feature embeddings corresponding to the reference single-cell data and the target single-cell spatial transcriptome data are respectively input into a parameter-shared spatial heterogeneous perceptual graph encoder. Each node in the graph structure uniquely corresponds to a cell, and the feature representation of the node is the gene expression feature embedding of that cell. Each graph attention encoding layer in the spatial heterogeneous perceptual graph encoder maintains an independent graph attention encoding branch for the first-order neighborhood graph and the non-overlapping second-order neighborhood graph; for the first... The order neighborhood, in which Combined with the feature transformation matrix Learnable attention parameters and and edge weights introduced as structural a priori Adjustment coefficient for eliminating dimensionless differences compute nodes To the node Attention coefficient The calculation formula is as follows:

[0069] .

[0070] In the formula, and Representing nodes respectively and nodes Feature representation; then using the attention coefficient We perform weighted aggregation on the node features within each order of neighborhood. Specifically, for each node... In the Aggregation feature representation of the order neighborhood The calculation formula is as follows:

[0071] .

[0072] In the formula, Represents a node In the The set of neighboring nodes in the order neighborhood; This represents the feature transformation matrix of the corresponding order. Through the above aggregation operations, the aggregated feature representations corresponding to the first-order neighborhood graph and the non-overlapping second-order neighborhood graph are obtained respectively.

[0073] The independent aggregated feature representations of the first-order neighborhood graphs and non-overlapping second-order neighborhood graphs obtained from each graph attention coding branch are residually concatenated with the input features of the corresponding graph attention coding branch to obtain the updated neighborhood feature representations of each order graph. Then, the updated feature representations from the first-order neighborhood graphs and non-overlapping second-order neighborhood graphs are concatenated along the channel dimension to output the hierarchical feature representation of the current graph attention coding layer. When the spatial heterogeneous perceptual graph encoder contains multiple graph attention coding layers, this hierarchical feature representation serves as the input feature of the next graph attention coding layer.

[0074] The low-dimensional initial feature embeddings corresponding to the reference single-cell data and target single-cell spatial transcriptome data of the input spatial heterogeneous perception map encoder, as well as the hierarchical feature representations output by each graph attention encoding layer, are concatenated across all scale channels to obtain a global multi-scale aggregated feature representation. This global multi-scale aggregated feature representation is then dimension-mapped through a linear projection layer, ultimately outputting a general low-dimensional latent representation of the reference single-cell data and target single-cell spatial transcriptome data in a unified latent space. The specific calculation formula for the dimension mapping is as follows:

[0075] .

[0076] In the formula, Represents a node The final fused low-dimensional embedding vector is the fused low-dimensional embedding vector of all nodes in the target single-cell spatial transcriptome data. Stacking them row by row forms a general low-dimensional latent representation matrix. ; This represents the learnable weight matrix of the linear projection layer; Indicates feature concatenation operation; , and Representing nodes respectively The initial node features, and the hierarchical feature representations of the outputs of the first and second layer graph attention encoding layers.

[0077] Finally, a decoder is used to reconstruct the general low-dimensional latent representations of the reference single-cell data and the target single-cell spatial transcriptome data. This decoder has a shared backbone network consisting of two fully connected layers and a domain-specific output head structure. The general low-dimensional latent representations of the reference single-cell data and the target single-cell spatial transcriptome data are synchronously input into the decoder with the shared backbone network and domain-specific output head structure to perform reconstruction operations. The shared backbone network extracts common reconstructed features, while the domain-specific output heads estimate the negative binomial distribution parameters of the reference data and the Poisson distribution parameters of the target data, respectively, thus ensuring that the output general low-dimensional latent representation retains the original biological characteristic information.

[0078] For the reference single-cell data, the mean parameter and over-discrete parameter are estimated using the negative binomial (NB) distribution output head; for the target single-cell spatial transcriptome data, the mean parameter is estimated using the Poisson distribution output head; the estimated parameters of the reference single-cell data and the target single-cell spatial transcriptome data are combined with their respective original counting matrices to calculate the loss, and the reconstruction loss of the general low-dimensional latent representation is jointly constructed to constrain and optimize the entire spatial heterogeneous sensing map encoder.

[0079] Specifically, the general low-dimensional latent representation The data is input into a decoder with a shared backbone network consisting of two fully connected layers and a domain-specific output head structure for reconstruction. For reference single-cell data with over-discrete characteristics, the mean parameter and over-discrete parameter are estimated using a negative binomial (NB) distribution output head. For target single-cell spatial transcriptome data with low dispersion, the mean parameter is estimated using a Poisson distribution output head. The estimated parameters are then compared with their corresponding original counting matrices to calculate the loss function for reconstruction. Constraint optimization is performed on the entire network. The reconstruction loss function... The specific calculation formula is as follows:

[0080] ;

[0081] ;

[0082] .

[0083] in, This represents the negative binomial distribution reconstruction loss from the reference single-cell data; This represents the Poisson distribution reconstruction loss of the target single-cell spatial transcriptome data. This represents the original counting matrix of the reference single-cell data. This represents the mean parameter of the negative binomial distribution corresponding to the j-th gene in the i-th cell predicted by the decoder. This represents the overdiscrete parameter of the negative binomial distribution corresponding to the j-th gene; This represents the raw counting matrix of the target single-cell spatial transcriptome data. This represents the mean parameter of the Poisson distribution corresponding to the j-th gene in the i-th sample predicted by the decoder; Indicates the first The first cell The original expression count of each gene.

[0084] After the above encoding and reconstruction process, this step finally outputs a universal low-dimensional latent representation that maps the reference single-cell data and the target single-cell spatial transcriptome data to a unified latent space. This indicates It is an embedding vector specifically designed for the prototype-based cross-domain classification and prediction class confusion constraints in the subsequent steps of this invention, under the dual constraints of "preserving the original count distribution" and "integrating multi-level heterogeneous neighborhood information". The feature distribution directly determines the estimation quality of the subsequent classification confusion matrix.

[0085] S3. Input the general low-dimensional latent representation into the prototype classifier for similarity modeling, and predict the accurate annotation results of the target single-cell spatial transcriptome data corresponding to the known cell categories.

[0086] The prototype classifier in this step is a prototype-based cosine classifier. The cosine classifier maintains learnable category prototype vectors corresponding to known cell categories. The general low-dimensional latent representation is input into the projection head of the cosine classifier for nonlinear mapping to obtain classification feature representation. By using the cosine similarity between the classification feature representation of each cell and the prototype vectors of each category, the predicted probability distribution of each cell belonging to the known cell category corresponding to the prototype vector of each category is output. According to the predicted probability distribution, the known cell category corresponding to the maximum predicted probability of each cell is selected as the final cell type annotation result of the corresponding cell in the target single-cell spatial transcriptome data and output.

[0087] Specifically, such as Figure 2 As shown in section C, this prototype classifier maintains Learnable category prototype vectors corresponding to known cell categories (in ). General low-dimensional latent representation The input is nonlinearly mapped through two layers of projection heads in the prototype classifier to obtain the classification feature representation. , of which The classification feature vector corresponding to each cell is denoted as . ; Calculate the classification feature representation of each cell With each category prototype vector Cosine similarity between Ultimately, through a learnable temperature coefficient The cosine similarity is scaled and normalized to output the predicted probability of each cell belonging to each known cell category. The distribution, and the specific calculation formulas involved are as follows:

[0088] .

[0089] In the formula, Represents cells Belongs to a known cell category The predicted probability, For cells The classification features are represented. For known cell types prototype vector, It is a learnable temperature coefficient.

[0090] At this point, this step outputs the class prediction probability distributions of the reference single-cell data and the target single-cell spatial transcriptome data respectively based on similarity modeling. Then, the data focus loss of the reference single-cell data and the predicted class confusion constraint of the target single-cell spatial transcriptome data are obtained respectively. The reconstruction loss of the general low-dimensional latent representation described in step S2 is jointly obtained and the parameters of the spatial heterogeneous sensing map encoder and cosine classifier are backpropagated and updated.

[0091] like Figure 2 As shown in section D, the predicted probability output by the prototype classifier. Distribution, firstly, using the focus loss function The classification loss of the reference single-cell data is calculated using the following formula:

[0092] .

[0093] In the formula, The batch size of the reference single-cell dataset used for current training. Indicates cells in reference single-cell data Belongs to the category of real cells The predicted probability, i.e., the predicted probability output by the prototype classifier. middle, The value of , For focusing parameters.

[0094] For target single-cell spatial transcriptome data, the predicted probabilities are first determined based on the output of the prototype classifier. Calculate each target single cell in the target single-cell spatial transcriptome data Predictive information entropy , And convert it into sample weight coefficients. ,in Preset weighting coefficients are used. Then, the predicted probability matrix on the target space transcriptome data is weighted sample-by-sample to further construct a row-normalized class confusion matrix. The predicted class confusion constraint is constructed by minimizing the sum of the off-diagonal elements of the class confusion matrix. The specific calculation formulas involved are as follows:

[0095] .

[0096] In the formula, The total number of categories, This is the batch size of the target single-cell spatial transcriptome dataset for the current training. For cells Category The predicted probability, For the same cell Category The predicted probability ( The product of the two is used to measure the cell's category. and The degree of confusion between predictions.

[0097] Combined with the focus loss function calculated on reference single-cell data And the predicted class confusion constraint calculated on the target single-cell spatial transcriptome data Then, a dynamic progressive adjustment coefficient that increases automatically with the number of training rounds is introduced. The reconstruction loss function of the universal low-dimensional potential representation of the reference single-cell data and the target single-cell spatial transcriptome data in step S2. Constructing the global objective function in closed-set scenarios This is used to iteratively update the entire network parameters in this invention. The overall objective function... The specific calculation formula is as follows:

[0098] .

[0099] In the above formula, , , This represents the preset balance weight hyperparameter; Indicates the number of training rounds. A gradually increasing dynamic adjustment coefficient.

[0100] Step S3 utilizes the general low-dimensional latent representation output from step S2. The prototype classifier outputs the predicted class probability of the target single cell. This prediction result, together with the reconstruction loss in step S2, the reference data focus loss in step S3, and the predicted class confusion constraint of the target data, constitutes a joint and unified overall objective function, driving the end-to-end update of the entire network. Through parameter-sharing spatial heterogeneous perceptual map encoder and classifier parameters, an end-to-end overall optimization process is formed. The final output of the trained model is a high-precision annotation of the known cell type corresponding to each cell in the target single-cell spatial transcriptome data.

[0101] This embodiment verifies the effectiveness of the cross-domain cell annotation method for single-cell spatial transcriptomics of the present invention in closed-set known cell annotation scenarios by conducting experiments on multiple publicly available imaging single-cell spatial transcriptomics technology platform datasets.

[0102] The specific datasets include: a mouse hypothalamic preoptic area (HPR) dataset from the MERFISH technology platform, containing 153 shared genes; a mouse Alzheimer's disease cortical tissue dataset from the STARmap PLUS technology platform, containing 2611 shared genes; and a mouse somatosensory cortex dataset from the osmFISH technology platform, containing 33 shared genes. The reference single-cell data corresponding to these three sets of single-cell spatial transcriptome data are from the same tissue and include standard cell type annotations, used to provide supervision information for known cell types. The specific details of all the datasets are shown in Table 1 (in the table, "target" refers to the target single-cell spatial transcriptome data, and "reference" refers to the reference single-cell data).

[0103] Table 1: Dataset Information Statistics

[0104]

[0105] This embodiment sets up two types of evaluation metrics: accuracy, macro F1 score, and weighted F1 score to evaluate the cell type annotation performance of the method in core application scenarios;

[0106] To verify the technical advantages of this invention in known cell annotation scenarios, the method of this invention (SpaMiCA) was compared with existing single-cell spatial transcriptome annotation methods (SpaGDA, DSCT, SPANN and SpatialMap), single-cell annotation methods (TOSICA and scHeteroNet), and spatial transcriptome deconvolution method (HIDF). The comparison results are shown in Tables 2, 3 and 4, respectively.

[0107] Table 2: Comparative experiments on the HPR dataset of the MERFISH platform

[0108]

[0109] Table 3: Comparative experiments on the mouse prefrontal cortex dataset on the STARmap PLUS platform

[0110]

[0111] Table 4: Comparative experiments on the mouse somatosensory cortex dataset of the osmFISH platform

[0112]

[0113] On three spatial transcriptome datasets across three mainstream imaging technologies tested, compared to existing methods, the proposed method (SpaMiCA) achieved significant performance improvements in accuracy, macro F1 score, and weighted F1 score in closed-set known cell annotation scenarios. Experimental results demonstrate that the proposed method possesses excellent cross-platform adaptive transfer capabilities and stable cell type recognition performance.

[0114] In qualitative analysis, such as Figure 3 As shown, the annotation results of the present invention's method (SpaMiCA) and existing methods on the HPR dataset are visualized in sub-plots (a)-(i). Only SpaMiCA and HIDF can relatively completely identify the ependymal cells (Epen) distributed in a thin, elongated band in the center and the mature oligodendrocytes (OD Mature) at the tissue edge, and preserve their spatial tissue boundaries well. In contrast, most baseline methods such as SpatialMap, scHeteroNet, and DSCT tend to misannotate a large number of central region cells as astrocytes, causing the originally continuous ependymal band structure to be misidentified as Astro. Considering the characteristics of Epen cells, such as their thin spatial distribution and continuous band-like tissue structure, the above results indicate that existing methods are still prone to prediction confusion for cell types with special spatial tissue structures. The present invention's method (SpaMiCA), which combines spatial heterogeneity perception feature extraction and prediction class confusion constraints, can effectively adapt to cell types with special spatial tissue structures and significantly reduce the problem of class misclassification in cross-domain scenarios. Figure 4 As shown, the annotation results of the present invention (SpaMiCA) and existing methods on a mouse somatosensory cortex dataset containing only 33 genes on the osmFISH platform are visualized. Figure 4 The subplot (b) obtained a spatial distribution more consistent with the reference annotation results through the method of this invention (SpaMiCA), and compared with... Figure 4Existing methods for the (c)-(h) subplot are better able to distinguish low-abundance cell types in a dense background.

[0115] In summary, the method of this invention, by integrating spatial heterogeneity perception representation and prediction class confusion global constraint mechanism, can complete feature modeling and cross-domain cell recognition tasks for complex tissue regions, alleviate the defects of feature oversmoothing and class misjudgment in traditional methods, and effectively improve the cross-platform annotation accuracy and robustness of single-cell spatial transcriptome data.

[0116] Those skilled in the art will understand that various modifications or equivalent substitutions can be made to the above embodiments without departing from the technical solution of the present invention, and all such modifications or substitutions should fall within the protection scope of the present invention.

Claims

1. A cross-domain cellular annotation method for single-cell spatial transcriptomics, characterized in that, Includes the following steps: S1. Obtain reference single-cell data with labeled cell types, construct a reference graph structure based on the gene expression profile of the reference single-cell data, construct a space-representation fusion graph structure based on the physical spatial coordinates of the target single-cell spatial transcriptome data and the gene expression profile, decompose and normalize the reference graph structure and the space-representation fusion graph structure respectively, and extract the corresponding first-order neighborhood graph and non-overlapping second-order neighborhood graph. S2. The reference single-cell data and the target single-cell spatial transcriptome data, along with their respective extracted first-order neighborhood maps and non-overlapping second-order neighborhood maps, are input into the spatial heterogeneous perceptual graph encoder. Each graph attention coding layer in the spatial heterogeneous perceptual graph encoder maintains an independent graph attention coding branch for the first-order neighborhood map and the non-overlapping second-order neighborhood map. The graph attention coding branch extracts the aggregated feature representation of the corresponding neighborhood map and performs residual connection with the input features of the corresponding branch to obtain the updated feature representation. Then, the updated feature representations of the first-order neighborhood map and the non-overlapping second-order neighborhood map are concatenated along the channel dimension to output the hierarchical feature representation of the current graph attention coding layer. After the initial node features of the input reference single-cell data and target single-cell spatial transcriptome data are concatenated with the hierarchical feature representation output by the graph attention coding layer at full scale, the dimension is mapped through a linear projection layer to output the general low-dimensional latent representations of the reference single-cell data and target single-cell spatial transcriptome data in a unified latent space. S3. Input the general low-dimensional latent representation into the prototype classifier for similarity modeling, and predict the accurate annotation results of the target single-cell spatial transcriptome data corresponding to the known cell categories. Based on similarity modeling, the predicted probability distributions of the reference single-cell data and the target single-cell spatial transcriptome data are output separately. The data focus loss of the reference single-cell data and the predicted class confusion constraint of the target single-cell spatial transcriptome data are obtained separately. The reconstruction loss of the general low-dimensional latent representation obtained in step S2 is combined with the backpropagation update of the parameters of the spatial heterogeneous perceptual map encoder and the prototype classifier. The data focus loss is calculated by using the focus loss function to calculate the classification loss of the reference single-cell data. The predicted class confusion constraint is constructed by constructing sample weight coefficients based on the predicted information entropy of the predicted probability of each target single cell in the target single-cell spatial transcriptome data. The predicted probability matrix of the target single-cell spatial transcriptome data is weighted by the main samples using the sample weight coefficients to obtain the row-normalized class confusion matrix. The predicted class confusion constraint is constructed by minimizing the sum of the off-diagonal elements of the class confusion matrix.

2. The cross-domain cellular annotation method for single-cell spatial transcriptomics according to claim 1, characterized in that: The reference single-cell data is reference single-cell RNA sequencing data with existing cell type annotations. Common genes are extracted from the reference single-cell data and the target single-cell spatial transcriptome data, and the total cell count in each data set is normalized and logarithmically transformed.

3. The cross-domain cellular annotation method for single-cell spatial transcriptomics according to claim 2, characterized in that: For the reference single-cell data, a K-nearest neighbor graph is constructed as a reference graph structure by calculating the cosine similarity between adjacent cells based on the gene expression profile of the corresponding cells. The edge weights of the reference graph are cosine similarity. For the target single-cell spatial transcriptome data, a candidate spatial neighbor set for each target single cell is matched according to the Euclidean distance between cells. In the candidate spatial neighbor set, the cosine similarity between adjacent cells is calculated based on the gene expression profile of the target single cell to construct a K-nearest neighbor graph as a spatial-representation fusion graph structure. The edge weight of the spatial-representation fusion graph is the product of the cosine similarity and the Gaussian kernel function of the Euclidean distance.

4. A cross-domain cellular annotation method for single-cell spatial transcriptomics according to claim 3, characterized in that: The reference graph structure and the space-representation fusion graph structure are both decomposed and normalized as follows: Extract topological adjacency relationships from the graph structure, construct an unweighted first-order adjacency matrix, and use the square of the first-order adjacency matrix corresponding to the graph structure to remove edges and self-loop connections that already exist in the first-order neighborhood, thereby obtaining a second-order neighborhood graph with eliminated redundancy and overlap and its corresponding second-order adjacency matrix. The first-order adjacency matrix and the second-order adjacency matrix are respectively subjected to the self-loop addition operation, and symmetric normalization is performed using their respective degree matrices; Extract the indices and corresponding weights of non-zero elements in the normalized matrix, and output the normalized edge indices and edge weights.

5. A cross-domain cellular annotation method for single-cell spatial transcriptomics according to claim 1, characterized in that: In step S2, the reference single-cell data and target single-cell spatial transcriptome data of the input spatial heterogeneous sensing map encoder are processed as follows: Based on Wilcoxon class differential expression analysis of reference single-cell data, a prior weight vector of gene importance was constructed according to the log fold difference in expression of common genes in all cell categories between the reference single-cell data and the target single-cell spatial transcriptome data. The dynamic feature gating matrix of common genes in the reference single-cell data and the target single-cell spatial transcriptome data is fused with the prior weight vector of the gene importance. The fused dynamic feature gating matrix is ​​processed by linear mapping and normalization to output the low-dimensional initial feature embeddings of the reference single-cell data and the target single-cell spatial transcriptome data, which are used as the initial node features of the input spatial heterogeneous perceptual map encoder.

6. A cross-domain cellular annotation method for single-cell spatial transcriptomics according to claim 1, characterized in that: In step S2, a decoder is used to reconstruct a general low-dimensional potential representation of the reference single-cell data and the target single-cell spatial transcriptome data. The decoder has a shared backbone network consisting of two fully connected layers and a domain-specific output head structure. For reference single-cell data, the mean parameter and over-discrete parameter are estimated using the negative binomial distribution output head. For target single-cell spatial transcriptome data, the mean parameter is estimated using the Poisson distribution output head. The estimated parameters of the reference single-cell data and the target single-cell spatial transcriptome data are used to calculate the loss with their respective original counting matrices, and a reconstruction loss of a general low-dimensional latent representation is jointly constructed to constrain and optimize the entire spatial heterogeneous sensing map encoder.

7. A cross-domain cellular annotation method for single-cell spatial transcriptomics according to claim 1, characterized in that: In step S3, the prototype classifier is a prototype-based cosine classifier. The cosine classifier maintains learnable category prototype vectors corresponding to known cell categories. The general low-dimensional latent representation is input into the projection head of the cosine classifier for nonlinear mapping to obtain classification feature representation. By using the cosine similarity between the classification feature representation of each cell and the prototype vectors of each category, the predicted probability distribution of each cell belonging to the known cell category corresponding to the prototype vector of each category is output. According to the predicted probability distribution, the known cell category corresponding to the maximum predicted probability of each cell is selected as the final cell type annotation result of the corresponding cell in the target single-cell spatial transcriptome data.

Citation Information

Patent Citations

  • Cell interaction identification method based on cell space transcriptome data

    CN121122429A

  • Dual self-supervised clustering analysis method and system for space transcriptome

    CN115985403A

  • Spatial transcriptome domain identification method based on double decoders and neighborhood comparison

    CN121983145A