Spatial single cell annotation model training method and device, equipment and storage medium

Through a model construction strategy combining graph neural network and metric learning, the problem of low accuracy of spatial single-cell annotation is solved, and more accurate identification and annotation of cell types and functional characteristics is achieved.

CN119539015APending Publication Date: 2025-02-28SHENZHEN UNIV

Patent Information

Application Number
CN202510106341.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art has low accuracy in spatial single-cell annotation, making it difficult to fully reflect the true functional status of cells, especially functional information such as protein translation modification and metabolic activities.

Method used

A model construction strategy combining graph neural network and metric learning is adopted to build a spatial single-cell annotation model. The model includes a spatial neighbor graph construction module, a triple construction module, an encoder module and a decoder module. Through unsupervised learning, the target loss function is minimized to improve the annotation accuracy.

Benefits of technology

The accuracy of the spatial single-cell annotation model for cell type identification and annotation of spatially resolved single-cell data is improved, which helps to reveal the spatial distribution and functional characteristics of cells in tissues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539015A_ABST
    Figure CN119539015A_ABST
Patent Text Reader

Abstract

The invention is applicable to the field of bioinformatics, and provides a spatial single cell annotation model training method, which comprises the following steps: constructing a spatial single cell annotation model by adopting a model construction strategy combining a graph neural network and metric learning, the model structure of the spatial single cell annotation model comprises a spatial neighbor graph construction module, a triple construction module, an encoder module and a decoder module for training, and unsupervised learning training is performed on the spatial single cell annotation model by using a single cell sample set. And iteratively updating the model parameters of the spatial single cell annotation model in the training process to minimize the target loss function of the spatial single cell annotation model until the target loss function converges, thereby improving the training effect of the spatial single cell annotation model. Therefore, the accuracy of cell type identification and annotation of the spatial single cell annotation model on the spatially distinguished single cell data is improved, and the spatial distribution and functional characteristics of cells in tissues are disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of bioinformatics, and in particular relates to a training method, device, equipment and storage medium for a spatial single-cell annotation model. Background Art

[0002] Spatial transcriptomics and spatial multi-omics are two important fields in modern biological research, and they play a key role in revealing the complexity and heterogeneity of biological systems. Among them, spatial transcriptomics is a science that combines spatial information with cellular transcriptomes to study the spatial distribution of gene expression, revealing the spatial arrangement of cells, the in situ expression of ribonucleic acid (RNA), and the complexity and heterogeneity of the aging process. This technology measures the total messenger ribonucleic acid (mRNA) of complete tissue sections, combines the spatial information of total mRNA with morphological content, to clearly quantify and locate cells in tissues, and map the locations where all gene expressions occur. It uses specifically designed probes or primers to detect gene expression in tissue samples. These probes or primers can bind to specific regions of target genes and carry fluorescent markers or molecular barcodes. Through in situ fluorescence imaging technology, these fluorescent markers or barcodes can be observed in specific areas of tissue sections or organs to determine the location and intensity of gene expression. Spatial multi-omics is a technology that comprehensively analyzes the information of multiple biomolecules in biological samples by integrating multiple omics data (such as genome, transcriptome, proteome, metabolome, etc.). This technology uses a variety of high-throughput sequencing and imaging technologies to simultaneously obtain the spatial distribution and expression information of multiple biomolecules in biological samples. These data can be integrated and analyzed under a single framework to reveal the functions and regulatory mechanisms of biological systems.

[0003] Compared with spatial multi-omics, the main disadvantage of spatial transcriptomics technology is the singleness of data, which is limited to mRNA expression and lacks coverage of various biomolecular information such as proteome and epigenome. It is difficult for mRNA data alone to fully reflect the true functional state of cells, especially functional information such as post-translational modification and metabolic activity of proteins. Spatial multi-omics can improve the accurate analysis of cell functions and dynamic processes through the integration of multi-omics data. The resolution and data coverage of spatial transcriptomics technology may be limited by technology, while spatial multi-omics can enhance the resolution and data coverage of tissue space through multi-layer data integration. Therefore, spatial multi-omics data can not only identify and annotate spatial cell types, but also analyze spatial cell states and functions. However, spatial multi-omics involves a large amount of heterogeneous data (such as mRNA, protein, metabolites, etc.), which are generated at different times, spaces and experimental conditions, with different formats, scales and noise levels, and are difficult to integrate directly. Spatial multi-omics data involve multiple omics levels (such as transcriptome, proteome, epigenetic group, metabolome, etc.), and the resolution, scale and dynamic range of these data are different, making it difficult to integrate data under a single framework. Multi-omics data not only differ at the molecular level, but also have inconsistencies in spatial positioning. For example, some spatial transcriptomics technologies have low resolution, while proteomics technologies such as mass spectrometry imaging may have higher spatial resolution. How to effectively integrate these data with different spatial resolutions is a difficult point. At the same time, different omics experiments are often accompanied by different noise sources and batch effects, making data cleaning and noise elimination more complicated. In addition, the background noise and signal strength of different omics data are also inconsistent, and direct integration will affect the accuracy of integration. Summary of the invention

[0004] The purpose of the present invention is to provide a training method, device, equipment and storage medium for a spatial single-cell annotation model, aiming to solve the problem of low accuracy of spatial single-cell annotation due to the prior art.

[0005] In one aspect, the present invention provides a method for training a spatial single-cell annotation model, the method comprising the following steps: A spatial single-cell annotation model is constructed by adopting a model construction strategy combining graph neural network and metric learning, wherein the model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triple construction module, an encoder module, and a decoder module corresponding to the encoder module for training; The spatial single-cell annotation model is trained for unsupervised learning using a single-cell sample set, and the model parameters of the spatial single-cell annotation model are iteratively updated during the training process to minimize the objective loss function of the spatial single-cell annotation model until the objective loss function converges.

[0006] Preferably, the step of performing unsupervised learning training on the spatial single-cell annotation model using a single-cell sample set, and iteratively updating the model parameters of the spatial single-cell annotation model during the training process to minimize the objective loss function of the spatial single-cell annotation model comprises: According to the spatial coordinate data of each single cell sample in the single cell sample set, generating a corresponding spatial neighbor graph for the single cell sample set by the spatial neighbor graph construction module; According to the multi-omics expression data of each single cell sample in the single cell sample set and the spatial neighbor graph, a plurality of modal triplets are generated by the triple construction module, wherein each of the modal triplet is composed of an anchor point, a positive sample and a negative sample; According to the multi-omics expression data, encoding each node in the spatial neighbor graph by the encoder module to generate a multi-omics feature embedding corresponding to each node; According to the multi-omics feature embedding, decoding each node in the spatial neighbor graph by the decoder module to generate a node reconstruction feature corresponding to each node; According to the multi-omics expression data, the modality triples and the node reconstruction features, a target loss value of the target loss function is calculated, and the model parameters are updated according to the target loss value to minimize the target loss function.

[0007] Preferably, the objective loss function includes a triplet loss function and a reconstruction loss function, wherein the reconstruction loss function is used to optimize the spatial single-cell annotation model by minimizing the difference between the multi-omics expression data and the node reconstruction features, and the triplet loss function is used to optimize the spatial single-cell annotation model by minimizing the distance between the anchor point and the positive sample and maximizing the distance between the anchor point and the negative sample.

[0008] Preferably, the encoder module and the decoder module both comprise a SAGEConv layer.

[0009] Preferably, the step of encoding each node in the spatial neighbor graph by the encoder module comprises: For each node in the spatial neighbor graph, randomly sampling a preset number of neighbor nodes; The SAGEConv layer is used to aggregate the node features of each of the nodes with the corresponding node features of all the sampled neighboring nodes to generate the multi-omics feature embedding corresponding to each of the nodes.

[0010] On the other hand, the present invention provides a training device for a spatial single-cell annotation model, the device comprising: An annotation model construction unit, used to construct a spatial single-cell annotation model by adopting a model construction strategy combining graph neural network and metric learning, wherein the model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triple construction module, an encoder module, and a decoder module for training corresponding to the encoder module; The annotation model training unit is used to perform unsupervised learning training on the spatial single-cell annotation model using a single-cell sample set, and iteratively update the model parameters of the spatial single-cell annotation model during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges.

[0011] Preferably, the annotation model training unit comprises: A neighbor graph generating unit, configured to generate a corresponding spatial neighbor graph for the single cell sample set through the spatial neighbor graph construction module according to the spatial coordinate data of each single cell sample in the single cell sample set; A triplet generation unit, configured to generate a plurality of modal triplets through the triplet construction module according to the multi-omics expression data of each single-cell sample in the single-cell sample set and the spatial neighbor graph, wherein each of the modal triplet is composed of an anchor point, a positive sample, and a negative sample; A feature embedding generation unit, configured to encode each node in the spatial neighbor graph through the encoder module according to the multi-omics expression data, and generate a multi-omics feature embedding corresponding to each node; A reconstruction feature generation unit, configured to decode each node in the spatial neighbor graph through the decoder module according to the multi-omics feature embedding, and generate a node reconstruction feature corresponding to each node; A loss value calculation unit is used to calculate a target loss value of the target loss function according to the multi-omics expression data, the modal triples and the node reconstruction features, and to update the model parameters according to the target loss value to minimize the target loss function.

[0012] Preferably, the objective loss function includes a triplet loss function and a reconstruction loss function, wherein the reconstruction loss function is used to optimize the spatial single-cell annotation model by minimizing the difference between the multi-omics expression data and the node reconstruction features, and the triplet loss function is used to optimize the spatial single-cell annotation model by minimizing the distance between the anchor point and the positive sample and maximizing the distance between the anchor point and the negative sample.

[0013] On the other hand, the present invention also provides a computing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps described in the training method of the above-mentioned spatial single-cell annotation model are implemented.

[0014] On the other hand, the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the steps described in the training method of the above-mentioned spatial single-cell annotation model.

[0015] The present invention adopts a model construction strategy that combines graph neural networks and metric learning to construct a spatial single-cell annotation model. The model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triplet construction module, an encoder module, and a decoder module for training. The spatial single-cell annotation model is trained for unsupervised learning using a single-cell sample set, and the model parameters of the spatial single-cell annotation model are iteratively updated during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges, thereby improving the training effect of the spatial single-cell annotation model, and further improving the accuracy of the spatial single-cell annotation model in identifying and annotating cell types for spatially resolved single-cell data, which helps to reveal the spatial distribution and functional characteristics of cells in tissues. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flowchart for implementing a training method for a spatial single-cell annotation model provided in Example 1 of the present invention; Figure 2 is a schematic diagram of the structure of a training device for a spatial single-cell annotation model provided in Embodiment 2 of the present invention; Figure 3 It is a schematic diagram of a preferred structure of a training device for a spatial single-cell annotation model provided in the second embodiment of the present invention; Figure 4 It is a schematic diagram of the structure of a computing device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0018] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments: Embodiment 1: Figure 1The implementation process of the training method of the spatial single cell annotation model provided in the first embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows: In step S101, a model construction strategy combining graph neural network and metric learning is adopted to construct a spatial single-cell annotation model, wherein the model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triple construction module, an encoder module, and a decoder module for training corresponding to the encoder module.

[0019] The embodiment of the present invention is applicable to computing devices, such as personal computers, servers, etc. In the embodiment of the present invention, a spatial single-cell annotation model (SMART model for short) is constructed based on a model construction strategy combining a graph neural network (GNN) and metric learning, so as to extract and integrate potential embedded features with deep spatial significance from multi-omics data, which can more comprehensively reveal the structural domain of spatial tissue samples, thereby improving the accuracy of the SMART model for spatial single-cell annotation. Among them, the model structure of the SMART model includes a spatial neighbor graph construction module, a triple construction module, an encoder module, and a decoder module corresponding to the encoder module for training. Specifically, the spatial neighbor graph construction module is used to generate a graph structure according to the spatial information of the single-cell sample, so that the model can effectively capture spatial features and local structural information in subsequent processing; the triple construction module is used to prepare effective sample pairs for model training by selecting similar and dissimilar samples, thereby enhancing the learning ability of the model, so that the model can distinguish different categories in the feature space; the encoder module is used to learn the high-dimensional representation of the node using the adjacency information of the node, and the decoder module is used to reconstruct the original feature from the high-dimensional representation generated by the encoder or further generate a new representation.

[0020] In step S102, the spatial single-cell annotation model is trained by unsupervised learning using a single-cell sample set, and the model parameters of the spatial single-cell annotation model are iteratively updated during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges.

[0021] In an embodiment of the present invention, a single-cell sample set is input into a SMART model, the SMART model is trained using an unsupervised learning method, and the model parameters of the SMART model are iteratively updated during the training process to minimize the target loss function of the SMART model until the target loss function converges, wherein the single-cell sample set input into the SMART model may be a data set that records the feature matrix and spatial coordinates of all capture positions, and the data in the data set may be of any modality, including but not limited to transcriptomics, proteomics, and epigenomics, etc., so that the SMART model can comprehensively integrate data from different sources, providing a rich biological information basis for the SMART model.

[0022] In a feasible embodiment, unsupervised learning training of the SMART model is implemented through the following steps: (1) Based on the spatial coordinate data of each single-cell sample in the single-cell sample set, a corresponding spatial neighbor graph is generated for the single-cell sample set through a spatial neighbor graph construction module; In an embodiment of the present invention, the spatial neighbor graph construction module constructs a corresponding spatial neighbor graph according to the spatial coordinate data of each single cell sample in the single cell sample set, in which each node represents a single cell, and the edge represents the spatial adjacency relationship between cells. Specifically, the spatial neighbor graph construction module first extracts the spatial coordinate data of the cell from each single cell sample in the single cell sample set input, and then uses the K-Nearest Neighbors (KNN) algorithm to determine the neighbor nodes of each single cell sample. Specifically, each single cell sample is taken as the central node, and according to the preset K value (K is generally selected as 4), the K samples closest to it are found as neighbor nodes, thereby establishing the spatial adjacency relationship between samples. Finally, according to the spatial adjacency relationship, the edge connection is established between the nodes, and the graph structure formed in this way is the spatial neighbor graph, which can intuitively reflect the spatial distribution and local structure information between samples, thereby enhancing the similarity between spatial adjacent positions (spots) by directly integrating the spatial coordinates into the embedded features of the multimodal data, so that the model can more accurately reflect the spatial structure characteristics and better parse the tissue structure domain of the sample.

[0023] (2) Based on the multi-omics expression data and spatial neighbor graph of each single-cell sample in the single-cell sample set, a number of modal triplets are generated through the triple construction module, where each modal triplet consists of an anchor point, a positive sample, and a negative sample; In an embodiment of the present invention, the multi-omics expression data and spatial neighbor graph of each single-cell sample in the single-cell sample set are used to generate multiple modal triplets through a triple construction module. Each modal triplet is composed of an anchor, a positive sample, and a negative sample. These modal triplets are constructed based on the similarity of different omics data (such as transcriptomics, proteomics, epigenomics, etc.). During the construction process, the triple construction module will refer to the spatial neighbor graph to ensure that the selected positive and negative samples have a reasonable proximity or distance to the anchor in space, thereby providing rich sample pairs with spatial context information for subsequent model training, thereby enhancing the model's ability to distinguish different categories in the feature space.

[0024] In a feasible embodiment, the multi-omics expression data and spatial neighbor graph of each single-cell sample in the single-cell sample set are input into the triple construction module. Then, the triple construction module randomly selects a single cell from the single-cell sample set as an anchor point, and uses the spatial neighbor graph to determine other cells that are spatially adjacent to the anchor point. These cells are called spatial neighbors of the anchor point. After that, the triple construction module uses the multi-omics expression data to calculate the similarity between the anchor point and its various spatial neighbors (such as Euclidean distance or cosine similarity). Finally, based on the calculated similarity and a preset similarity threshold, the triple construction module selects cells with similar features from the spatial neighbors of the anchor point as positive samples (i.e., cells of the same type), and selects dissimilar cells from non-spatial neighbors or cells with large feature differences as negative samples (i.e., heterogeneous cells). Through this process, the triple construction module can generate a triple (anchor point, positive sample, negative sample) containing spatial context information and feature similarity information.

[0025] In another feasible embodiment, the multiple modal triplets generated by the triplet construction module include RNA modal triplets, antibody derived tags (ADT) modal triplets, and chromatin accessibility (Assay for Transposase-Accessible Chromatin using sequencing, ATAC) modal triplets, wherein the RNA modal triplet is constructed based on RNA feature similarity, the ADT modal triplet is constructed based on ADT feature similarity, and the ATAC modal triplet is constructed based on ATAC feature similarity, thereby enhancing the model's ability to distinguish different categories in the feature space.

[0026] (3) Based on the multi-omics expression data, each node in the spatial neighbor graph is encoded through the encoder module to generate the multi-omics feature embedding corresponding to each node; In an embodiment of the present invention, the multi-omics expression data and spatial neighbor graph of each single-cell sample in a single-cell sample set are input into an encoder module. Subsequently, the encoder module combines the features of each node in the spatial neighbor graph with the features of its neighbor nodes through layer-by-layer learning. In this process, the encoder module not only considers the characteristics of the node itself, but also fully considers the information of its neighbor nodes, so as to capture the interactions between cells and their positional relationships in the spatial structure. Finally, the encoder module outputs a high-level feature representation of the node containing various omics information for each node. The high-level feature representation of the node containing various omics information is called multi-omics feature embedding.

[0027] In a feasible embodiment, the encoder module includes a SAGEConv layer, which is a graph convolution layer implemented based on the Graph Sample and Aggregate (GraphSAGE) algorithm, and is used to process graph structured data. The SAGEConv layer aims to update the representation of the current node by aggregating information of neighboring nodes, thereby generating a more accurate and useful feature representation.

[0028] In another feasible embodiment, encoding each node in the spatial neighbor graph is achieved by the following steps: ①For each node in the spatial neighbor graph, randomly sample a preset number of neighbor nodes; ② The SAGEConv layer is used to aggregate the node features of each node with the corresponding node features of all the sampled neighboring nodes to generate the multi-omics feature embedding corresponding to each node.

[0029] In an embodiment of the present invention, the multi-omics expression data of a single-cell sample corresponding to a node in a spatial neighbor graph is used as the node feature of the node. For each node in the spatial neighbor graph, the encoder module first randomly samples a preset number of neighbor nodes for each node to reduce computational complexity and enable the model to process large-scale graph data. After that, the node features of each node itself are aggregated with the node features of all corresponding sampled neighbor nodes using the SAGEConv layer to extract a high-level representation of the node. In this way, each node will have a new embedded representation (i.e., multi-omics feature embedding) containing neighbor information. This process effectively captures the relationships between cells and their characteristics in the spatial structure, providing strong support for subsequent cell clustering and spatial single-cell annotation.

[0030] (4) Based on the multi-omics feature embedding, each node in the spatial neighbor graph is decoded through the decoder module to generate the node reconstruction features corresponding to each node; In an embodiment of the present invention, the spatial neighbor graph and the multi-omics features corresponding to each node output by the encoder module are embedded into an input decoder module. Subsequently, the decoder module reconstructs the original node features for each node by aggregating the multi-omics feature embeddings of each node and its neighbor nodes, thereby obtaining the node reconstruction features corresponding to each node.

[0031] In one possible embodiment, the decoder module contains a SAGEConv layer.

[0032] In another feasible embodiment, for each node in the spatial neighbor graph, the decoder module first randomly samples a preset number of neighbor nodes for each node, and then uses the SAGEConv layer to aggregate the multi-omics feature embedding of each node itself with the sampled multi-omics feature embedding of all neighbor nodes corresponding to the node to obtain the multi-omics aggregate feature corresponding to each node. Finally, the multi-omics aggregate feature is subjected to dimensionality reduction processing to extract the reconstructed representation of the node, and finally the node reconstruction feature corresponding to the node is obtained, thereby generating the final node representation by aggregating information and reducing dimensionality, ensuring that important feature information is retained during the decoding process.

[0033] (5) Based on the multi-omics expression data, modal triples, and node reconstruction features, the target loss value of the target loss function is calculated, and the model parameters are updated according to the target loss value to minimize the target loss function.

[0034] In an embodiment of the present invention, during the training process, the target loss value of the target loss function is calculated based on the multi-omics expression data, modal triples and node reconstruction features, and based on the calculated target loss value, the Adam optimizer is used to update the model parameters of the spatial single-cell annotation model to minimize the target loss function.

[0035] In a feasible embodiment, the target loss function includes a triplet loss function and a reconstruction loss function, wherein the reconstruction loss function is used to optimize the spatial single-cell annotation model by minimizing the difference between the multi-omics expression data and the node reconstruction features, and the triplet loss function is used to optimize the spatial single-cell annotation model by minimizing the distance between the anchor point and the positive sample and maximizing the distance between the anchor point and the negative sample, thereby aligning the original modal features and the embedded features through the reconstruction loss, and using the triplet loss to maintain the similarity between spatial neighbors. This loss design effectively integrates multimodal information while retaining spatial characteristics, so that the integrated embedded features can reflect local spatial relationships while maintaining modal characteristics, which is helpful to analyze the commonalities and differences between multimodal data.

[0036] In an embodiment of the present invention, a model construction strategy combining graph neural network and metric learning is adopted to construct a spatial single-cell annotation model. The model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triplet construction module, an encoder module, and a decoder module for training. The spatial single-cell annotation model is trained for unsupervised learning using a single-cell sample set, and the model parameters of the spatial single-cell annotation model are iteratively updated during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges, thereby improving the training effect of the spatial single-cell annotation model, and further improving the accuracy of the spatial single-cell annotation model in identifying and annotating cell types for spatially resolved single-cell data, which helps to reveal the spatial distribution and functional characteristics of cells in tissues.

[0037] Embodiment 2: Figure 2 The structure of the training device of the spatial single cell annotation model provided by the second embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, including: An annotation model construction unit 21 is used to construct a spatial single-cell annotation model by adopting a model construction strategy combining graph neural network and metric learning, wherein the model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triple construction module, an encoder module, and a decoder module for training corresponding to the encoder module; The annotation model training unit 22 is used to perform unsupervised learning training on the spatial single-cell annotation model using the single-cell sample set, and iteratively update the model parameters of the spatial single-cell annotation model during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges.

[0038] Preferably, if Figure 3 As shown, the annotation model training unit 22 includes: A neighbor graph generating unit 221 is used to generate a corresponding spatial neighbor graph for the single cell sample set through a spatial neighbor graph construction module according to the spatial coordinate data of each single cell sample in the single cell sample set; A triplet generation unit 222 is used to generate a plurality of modal triplets through a triplet construction module according to the multi-omics expression data and the spatial neighbor graph of each single cell sample in the single cell sample set, wherein each modal triplet is composed of an anchor point, a positive sample and a negative sample; A feature embedding generation unit 223 is used to encode each node in the spatial neighbor graph through an encoder module according to the multi-omics expression data to generate a multi-omics feature embedding corresponding to each node; A reconstruction feature generation unit 224 is used to decode each node in the spatial neighbor graph through a decoder module according to the multi-omics feature embedding to generate a node reconstruction feature corresponding to each node; The loss value calculation unit 225 is used to calculate the target loss value of the target loss function according to the multi-omics expression data, modal triples and node reconstruction features, and update the model parameters according to the target loss value to minimize the target loss function.

[0039] Preferably, the objective loss function includes a triplet loss function and a reconstruction loss function, wherein the reconstruction loss function is used to optimize the spatial single-cell annotation model by minimizing the difference between the multi-omics expression data and the node reconstruction features, and the triplet loss function is used to optimize the spatial single-cell annotation model by minimizing the distance between the anchor point and the positive sample and maximizing the distance between the anchor point and the negative sample.

[0040] Preferably, both the encoder module and the decoder module comprise SAGEConv layers.

[0041] Preferably, the feature embedding generation unit 223 includes: A neighbor node sampling unit, used for randomly sampling a preset number of neighbor nodes for each node in the spatial neighbor graph; A node feature aggregation unit is used to aggregate the node feature of each node with the corresponding node features of all the sampled neighboring nodes using the SAGEConv layer to generate the multi-omics feature embedding corresponding to each node.

[0042] In the embodiment of the present invention, each unit of the training device of the spatial single cell annotation model can be implemented by a corresponding hardware or software unit, and each unit can be an independent software or hardware unit, or can be integrated into a software or hardware unit, which is not intended to limit the present invention. Specifically, the implementation of each unit can refer to the description of the aforementioned embodiment 1, which will not be repeated here.

[0043] Embodiment three: Figure 4 The structure of a computing device provided in the third embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown.

[0044] The computing device 4 of the embodiment of the present invention includes a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the training method embodiment of the spatial single cell annotation model are implemented, such as Figure 1Alternatively, when the processor 40 executes the computer program 42, the functions of each unit in the above-mentioned device embodiments are realized, for example Figure 2 Function of the unit shown.

[0045] In an embodiment of the present invention, a model construction strategy combining graph neural network and metric learning is adopted to construct a spatial single-cell annotation model. The model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triplet construction module, an encoder module, and a decoder module for training. The spatial single-cell annotation model is trained for unsupervised learning using a single-cell sample set, and the model parameters of the spatial single-cell annotation model are iteratively updated during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges, thereby improving the training effect of the spatial single-cell annotation model, and further improving the accuracy of the spatial single-cell annotation model in identifying and annotating cell types for spatially resolved single-cell data, which helps to reveal the spatial distribution and functional characteristics of cells in tissues.

[0046] The computing device of the embodiment of the present invention may be a personal computer or a server. The steps implemented when the processor 40 in the computing device 4 executes the computer program 42 to implement the training method of the spatial single cell annotation model can refer to the description of the aforementioned method embodiment, which will not be repeated here.

[0047] Embodiment 4: In an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps in the training method embodiment of the above-mentioned spatial single-cell annotation model are implemented, for example, Figure 1 Alternatively, when the computer program is executed by a processor, the functions of each unit in the above-mentioned device embodiments are realized, for example Figure 2 Function of the unit shown.

[0048] In an embodiment of the present invention, a model construction strategy combining graph neural network and metric learning is adopted to construct a spatial single-cell annotation model. The model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triplet construction module, an encoder module, and a decoder module for training. The spatial single-cell annotation model is trained for unsupervised learning using a single-cell sample set, and the model parameters of the spatial single-cell annotation model are iteratively updated during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges, thereby improving the training effect of the spatial single-cell annotation model, and further improving the accuracy of the spatial single-cell annotation model in identifying and annotating cell types for spatially resolved single-cell data, which helps to reveal the spatial distribution and functional characteristics of cells in tissues.

[0049] The computer-readable storage medium of the embodiment of the present invention may include any entity or device or recording medium capable of carrying computer program code, for example, ROM / RAM, magnetic disk, optical disk, flash memory and other memories.

[0050] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A training method for a spatial single-cell annotation model, characterized in that: The method comprises the following steps: A spatial single-cell annotation model is constructed by adopting a model construction strategy combining graph neural network and metric learning, wherein the model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triple construction module, an encoder module, and a decoder module corresponding to the encoder module for training; The spatial single-cell annotation model is trained for unsupervised learning using a single-cell sample set, and the model parameters of the spatial single-cell annotation model are iteratively updated during the training process to minimize the objective loss function of the spatial single-cell annotation model until the objective loss function converges.

2. The method according to claim 1, characterized in that The step of performing unsupervised learning training on the spatial single-cell annotation model using a single-cell sample set, and iteratively updating the model parameters of the spatial single-cell annotation model during the training process to minimize the target loss function of the spatial single-cell annotation model comprises: According to the spatial coordinate data of each single cell sample in the single cell sample set, generating a corresponding spatial neighbor graph for the single cell sample set by the spatial neighbor graph construction module; According to the multi-omics expression data of each single cell sample in the single cell sample set and the spatial neighbor graph, a plurality of modal triplets are generated by the triple construction module, wherein each of the modal triplet is composed of an anchor point, a positive sample and a negative sample; According to the multi-omics expression data, encoding each node in the spatial neighbor graph by the encoder module to generate a multi-omics feature embedding corresponding to each node; According to the multi-omics feature embedding, decoding each node in the spatial neighbor graph by the decoder module to generate a node reconstruction feature corresponding to each node; According to the multi-omics expression data, the modality triples and the node reconstruction features, a target loss value of the target loss function is calculated, and the model parameters are updated according to the target loss value to minimize the target loss function.

3. The method according to claim 2, characterized in that The objective loss function includes a triplet loss function and a reconstruction loss function, wherein the reconstruction loss function is used to optimize the spatial single-cell annotation model by minimizing the difference between the multi-omics expression data and the node reconstruction features, and the triplet loss function is used to optimize the spatial single-cell annotation model by minimizing the distance between the anchor point and the positive sample and maximizing the distance between the anchor point and the negative sample.

4. The method according to claim 2, characterized in that The encoder module and the decoder module both contain SAGEConv layers.

5. The method according to claim 4, characterized in that The step of encoding each node in the spatial neighbor graph by the encoder module comprises: For each node in the spatial neighbor graph, randomly sampling a preset number of neighbor nodes; The SAGEConv layer is used to aggregate the node features of each of the nodes with the corresponding node features of all the sampled neighboring nodes to generate the multi-omics feature embedding corresponding to each of the nodes.

6. A training device for a spatial single-cell annotation model, characterized in that: The device comprises: An annotation model construction unit, used to construct a spatial single-cell annotation model by adopting a model construction strategy combining graph neural network and metric learning, wherein the model structure of the spatial single-cell annotation model includes a spatial neighbor graph construction module, a triple construction module, an encoder module, and a decoder module for training corresponding to the encoder module; The annotation model training unit is used to perform unsupervised learning training on the spatial single-cell annotation model using a single-cell sample set, and iteratively update the model parameters of the spatial single-cell annotation model during the training process to minimize the target loss function of the spatial single-cell annotation model until the target loss function converges.

7. The device according to claim 6, characterized in that The annotation model training unit comprises: A neighbor graph generating unit, configured to generate a corresponding spatial neighbor graph for the single cell sample set through the spatial neighbor graph construction module according to the spatial coordinate data of each single cell sample in the single cell sample set; A triplet generation unit, configured to generate a plurality of modal triplets through the triplet construction module according to the multi-omics expression data of each single-cell sample in the single-cell sample set and the spatial neighbor graph, wherein each of the modal triplet is composed of an anchor point, a positive sample, and a negative sample; A feature embedding generation unit, configured to encode each node in the spatial neighbor graph through the encoder module according to the multi-omics expression data, and generate a multi-omics feature embedding corresponding to each node; A reconstruction feature generation unit, configured to decode each node in the spatial neighbor graph through the decoder module according to the multi-omics feature embedding, and generate a node reconstruction feature corresponding to each node; A loss value calculation unit is used to calculate a target loss value of the target loss function according to the multi-omics expression data, the modal triples and the node reconstruction features, and to update the model parameters according to the target loss value to minimize the target loss function.

8. The device according to claim 7, characterized in that The objective loss function includes a triplet loss function and a reconstruction loss function, wherein the reconstruction loss function is used to optimize the spatial single-cell annotation model by minimizing the difference between the multi-omics expression data and the node reconstruction features, and the triplet loss function is used to optimize the spatial single-cell annotation model by minimizing the distance between the anchor point and the positive sample and maximizing the distance between the anchor point and the negative sample.

9. A computing device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Attention-based single-cell RNA data clustering model and construction method thereof

    CN118136120A

Cited By

  • Cross-batch single cell space omics data multi-granularity clustering method and system

    CN122135793A

  • Multi-granularity clustering method and system for cross-batch single-cell spatial omics data

    CN122135793B