Single cell annotation graph attention model training method and single cell annotation method

By constructing mixed graphs and using graph attention layers for feature learning, combining cell state data and active learning techniques, the limitations of existing single-cell annotation methods in terms of accuracy and applicability are solved, and more efficient single-cell annotation and more accurate cell type prediction are achieved.

CN119864086AActive Publication Date: 2025-04-22SHENZHEN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411879204.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-22
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

There are many limitations in the accuracy and applicability of existing single-cell annotation methods, including insufficient recognition of novel or rare cell types, ignoring high-order topological relationships between cells, high demand for large-scale labeling data, and ignoring the dynamic state information of cells.

Method used

A training method for single-cell annotation graph attention model is proposed. By constructing a hybrid graph, using the graph attention layer to perform feature learning, integrating cell state data, and actively learning to select the sample with the largest amount of information for the next round of training until the preset termination iteration condition is met.

Benefits of technology

It improves the accuracy and robustness of single-cell annotation, enhances the understanding of the relationship between single cells and the transmission of tag information, reduces the dependence on large-scale labeled data, and improves the accuracy and generalization ability of cell type prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119864086A_ABST
    Figure CN119864086A_ABST
Patent Text Reader

Abstract

The invention provides a single cell annotation graph attention model training method and a single cell annotation method, and the training method comprises the steps: obtaining a training set comprising a training sample and a test set comprising a test sample, constructing a mixed graph comprising the training sample and the test sample, carrying out the feature learning of the mixed graph through a graph attention layer, and obtaining a single cell annotation graph attention model; processing the obtained cell state data based on a pre-trained cell state auxiliary model to obtain an intermediate embedded feature, fusing the node embedded feature and the intermediate embedded feature to obtain a fused feature, and selecting a sample with the maximum information amount according to the mixed graph, the intermediate embedded feature and the fused feature, and taking the sample with the maximum information amount as a new training sample to carry out the next round of training until a preset iteration termination condition is met, and obtaining a single cell annotation map attention model. The problem of insufficient sample labels is solved, and the annotation accuracy of the single cell annotation map attention model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a training method for a single-cell annotation graph attention model and a single-cell annotation method. Background Art

[0002] In life science research, single-cell annotation methods are crucial for understanding the diversity and heterogeneity of cells in organisms. Different cell types often have specific gene expression patterns, and accurate identification of these patterns can deeply reveal cell functions and their role in biological processes. In addition, this technology can also be applied to disease research. Accurate single-cell annotation not only helps to locate specific abnormal cell types, but also provides an important basis for the diagnosis and treatment of diseases. With the rapid development of single-cell sequencing technology, the amount of data has surged, and reliable single-cell annotation methods have become the key to effectively mining this data.

[0003] Existing single-cell annotation methods mainly include marker gene-based methods, correlation analysis-based methods and machine learning-based methods, but these methods have many limitations in accuracy and applicability.

[0004] (1) Marker gene-based methods are highly dependent on prior knowledge and usually require existing marker gene information for accurate classification. Therefore, they are difficult to work with new or rare cell types. In addition, such methods are highly dependent on clustering analysis. The selection of clustering parameters (such as the number of clusters) directly affects the classification results. If the parameters are not selected properly, it is easy to cause classification bias and affect the annotation quality.

[0005] (2) Correlation analysis methods usually only consider linear relationships when calculating cell similarity, ignoring the high-order topological relationships between cells, which limits their performance in complex cell types. At the same time, such methods are sensitive to data performance from different platforms or batches and are easily affected by batch effects, resulting in unstable classification results.

[0006] (3) Traditional machine learning methods have high requirements for large-scale labeled data and perform poorly when labeled data is insufficient. They often only focus on gene expression features and ignore the dynamic state information of cells, which limits the accuracy and generalization ability when dealing with cell types with complex states.

[0007] The content of the background technology section is only the information known to the inventor personally, and does not mean that the above information has entered the public domain before the application date of this disclosure, nor does it mean that it can become the prior art of the present disclosure. Summary of the invention

[0008] The present disclosure provides a training method for a single-cell annotation graph attention model and a single-cell annotation method to solve at least one of the above-mentioned technical problems.

[0009] In a first aspect, the present disclosure provides a method for training a single-cell annotation graph attention model, comprising:

[0010] Obtaining a training set including training samples and a test set including test samples, wherein the training samples and the test samples respectively include single-cell gene expression data;

[0011] Constructing a mixed graph including training samples and test samples, wherein the mixed graph includes nodes and edges, each node represents a sample feature of gene expression data of a single cell, and an edge connecting two nodes represents the similarity or correlation between the two nodes;

[0012] Performing feature learning on the hybrid graph through a graph attention layer to generate node embedding features;

[0013] Based on a pre-trained cell state auxiliary model, the obtained cell state data is processed to obtain intermediate embedded features, wherein the intermediate embedded features are used to characterize the cell function state;

[0014] Based on the cell state auxiliary model, the node embedding feature and the intermediate embedding feature are fused to obtain a fused feature;

[0015] According to the mixed graph, the intermediate embedded features, and the fused features, the sample with the largest amount of information is selected, and the sample with the largest amount of information is used as a new training sample for the next round of training until a preset termination iteration condition is met, thereby obtaining a single-cell annotation graph attention model.

[0016] In some embodiments, constructing a mixed graph including training samples and test samples includes:

[0017] The training samples and the test samples are processed by mutual nearest neighbor algorithm and canonical correlation analysis to obtain the mixed graph including the training samples and the test samples.

[0018] In some embodiments, the method further comprises:

[0019] The feature vectors after position encoding and linear mapping of each node in the hybrid graph are added to obtain a new feature representation of each node.

[0020] In some embodiments, the number of the graph attention layers is four, the output of the previous graph attention layer is the input of the next graph attention layer, and the input of the first graph attention layer is the mixed graph;

[0021] Among them, each graph attention layer is used to calculate the attention weights between the nodes in the mixed graph, so that the single-cell annotation graph attention model captures the local and global relationships between the nodes in the mixed graph.

[0022] In some embodiments, selecting the sample with the largest amount of information according to the mixed graph, the intermediate embedded features, and the fused features includes:

[0023] determining information density according to the intermediate embedded features;

[0024] determining a centrality based on the mixed graph;

[0025] Determining a prediction result according to the fusion feature, and determining information entropy according to the prediction result;

[0026] The sample with the largest amount of information is determined according to the information density, the centrality, and the information entropy.

[0027] In some embodiments, the preset termination iteration condition includes: the number of training times reaches a preset training times threshold, the number of training samples reaches a preset number threshold, and the change in the prediction performance of the single-cell annotation graph attention model is less than a preset change threshold;

[0028] Among them, the preset quantity threshold is determined based on a pre-constructed training bucket, and the preset quantity threshold is the maximum number of samples stored in the training bucket; the prediction performance change is determined based on the difference in changes in the information density and the information entropy.

[0029] In a second aspect, the present disclosure provides a single cell annotation method, comprising:

[0030] Obtain single-cell gene expression data to be annotated;

[0031] The single-cell gene expression data is input into a single-cell annotation graph attention model, and an annotation result is output, wherein the single-cell annotation graph attention model is trained based on the training method described in the first aspect.

[0032] In a third aspect, the present disclosure provides a training system for a single-cell annotation graph attention model, comprising:

[0033] A mixed graph construction unit, used to obtain a training set including training samples and a test set including test samples, wherein the training samples and the test samples respectively include single-cell gene expression data, and construct a mixed graph including the training samples and the test samples, wherein the mixed graph includes nodes and edges, each node represents a sample feature of the gene expression data of a single cell, and an edge connecting two nodes represents the similarity or correlation between the two nodes;

[0034] A graph attention mechanism unit, configured to perform feature learning on the hybrid graph through a graph attention layer to generate node embedding features;

[0035] A cell state information unit, used to process the obtained cell state data based on a pre-trained cell state auxiliary model to obtain an intermediate embedding feature, wherein the intermediate embedding feature is used to characterize the cell function state, and fuse the node embedding feature and the intermediate embedding feature to obtain a fused feature;

[0036] An active learning unit is used to select the sample with the largest amount of information according to the mixed graph, the intermediate embedded features, and the fused features, and use the sample with the largest amount of information as a new training sample for the next round of training until a preset termination iteration condition is met, thereby obtaining a single-cell annotation graph attention model.

[0037] In some embodiments, the mixed graph construction unit is specifically used to perform mutual nearest neighbor algorithm and canonical correlation analysis processing on the training samples and the test samples to obtain the mixed graph including the training samples and the test samples.

[0038] In some embodiments, the hybrid graph construction unit is further used to add feature vectors after position encoding and linear mapping of each node in the hybrid graph to obtain a new feature representation of each node.

[0039] In some embodiments, the number of the graph attention layers is four, the output of the previous graph attention layer is the input of the next graph attention layer, and the input of the first graph attention layer is the mixed graph;

[0040] Among them, each graph attention layer is used to calculate the attention weights between the nodes in the mixed graph, so that the single-cell annotation graph attention model captures the local and global relationships between the nodes in the mixed graph.

[0041] In some embodiments, the active learning unit is specifically used to determine the information density based on the intermediate embedded features; determine the centrality based on the mixed graph; determine the prediction result based on the fusion feature, and determine the information entropy based on the prediction result; determine the sample with the largest amount of information based on the information density, the centrality, and the information entropy.

[0042] In some embodiments, the preset termination iteration condition includes: the number of training times reaches a preset training times threshold, the number of training samples reaches a preset number threshold, and the change in the prediction performance of the single-cell annotation graph attention model is less than a preset change threshold;

[0043] Among them, the preset quantity threshold is determined based on a pre-constructed training bucket, and the preset quantity threshold is the maximum number of samples stored in the training bucket; the prediction performance change is determined based on the difference in changes in the information density and the information entropy.

[0044] In a fourth aspect, the present disclosure provides a single cell annotation system, the system comprising:

[0045] An acquisition unit, used for obtaining single-cell gene expression data to be annotated;

[0046] An annotation unit is used to input the single-cell gene expression data into a single-cell annotation graph attention model and output an annotation result, wherein the single-cell annotation graph attention model is trained based on the training method described in the first aspect.

[0047] In a fifth aspect, the present disclosure provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the method described in the first aspect or the second aspect above.

[0048] In a sixth aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect or the second aspect above.

[0049] The present disclosure provides a training method for a single-cell annotation graph attention model and a single-cell annotation method, wherein the training method comprises: obtaining a training set including training samples and a test set including test samples, wherein the training samples and the test samples respectively include single-cell gene expression data, constructing a mixed graph including the training samples and the test samples, wherein the mixed graph includes nodes and edges, each node represents a sample feature of the gene expression data of a single cell, and an edge connecting two nodes represents the similarity or correlation between the two nodes, performing feature learning on the mixed graph through a graph attention layer to generate node embedding features, processing the obtained cell state data based on a pre-trained cell state auxiliary model to obtain intermediate embedding features, wherein the intermediate embedding features are used to characterize the cell function state, fusing the node embedding features and the intermediate embedding features to obtain fused features, selecting samples with the largest amount of information according to the mixed graph, the intermediate embedding features, and the fused features, and using the samples with the largest amount of information as new training samples for the next round of training until a preset termination iteration condition is met, thereby obtaining a single-cell annotation graph attention model. In this embodiment, by constructing a hybrid graph, the single-cell annotation graph attention model is enhanced in its understanding of the relationship between single cells and the transmission of label information; by introducing a graph attention layer, the degree of attention to the features of neighboring nodes can be dynamically adjusted, so that the single-cell annotation graph attention model can more effectively capture important features and improve the classification accuracy of cell types; by integrating cell state data and utilizing the intermediate embedded features of the cell state auxiliary model, the features of the single-cell annotation graph attention model are enhanced, further improving the accuracy and robustness of cell type prediction; by selecting nodes with large amounts of information for training, the problem of insufficient sample labels is solved, thereby improving the annotation accuracy of the single-cell annotation graph attention model. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0051] Figure 1 A schematic diagram of a flow chart of a method for training a single-cell annotation graph attention model provided in an embodiment of the present disclosure;

[0052] Figure 2 A schematic diagram of the principle of a training method for a single-cell annotation graph attention model provided in an embodiment of the present disclosure;

[0053] Figure 3 A schematic diagram of the process of the single cell annotation method provided in the embodiment of the present disclosure;

[0054] Figure 4 A schematic diagram of the structure of a training system for a single-cell annotation graph attention model provided in an embodiment of the present disclosure;

[0055] Figure 5 A schematic diagram of the structure of a single cell annotation system provided in an embodiment of the present disclosure;

[0056] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.

[0057] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0059] It should be understood that the terms "including" and "having" and any variations thereof in the embodiments of the present disclosure are intended to cover but not exclude inclusion. For example, a product or device comprising a series of components is not necessarily limited to those components explicitly listed, but may include other components not explicitly listed or inherent to these products or devices.

[0060] In the embodiments of the present disclosure, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0061] The term "plurality" in the embodiments of the present disclosure refers to two or more than two, and other quantifiers are similar thereto.

[0062] The terms "first", "second", "third", etc. in the present disclosure are used to distinguish similar or similar objects or entities, and are not necessarily meant to limit a specific order or sequence, unless otherwise indicated. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, for example, they can be implemented in an order other than those given in the diagrams or descriptions of the embodiments of the present disclosure.

[0063] The term "unit / module" as used in this disclosure refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic or a combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0064] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0065] According to one aspect of the present disclosure, an embodiment of the present disclosure provides a method for training a single-cell annotation graph attention model.

[0066] See also Figure 1 , Figure 1 A flow chart of a method for training a single-cell annotation graph attention model provided in an embodiment of the present disclosure. Figure 1 As shown, the method includes:

[0067] S101: Obtain a training set including training samples and a test set including test samples, wherein the training samples and the test samples respectively include single-cell gene expression data.

[0068] Exemplarily, the execution subject of the training method of the single-cell annotation graph attention model provided in this embodiment (hereinafter referred to as the training method) can be a training system of the single-cell annotation graph attention model (hereinafter referred to as the training system). Among them, the training system can be a server, an electronic device, or a chip, etc., which are not listed here one by one. The training system is described elsewhere in this specification.

[0069] This embodiment does not limit the way in which the training system obtains the training set and the test set. For example, taking obtaining the training set as an example, the training system can be implemented using the following example:

[0070] In one example, the training system can be connected to the collection device and receive the training set sent by the collection device.

[0071] In another example, the training system may provide a data loading tool, and the user may transfer the training set to the training system through the data loading tool.

[0072] Among them, the tool for loading data can be an interface for connecting to an external device, such as an interface for connecting to other storage devices, through which the training set transmitted by the external device is obtained; the tool for loading data can also be a display device, such as the training system can input an interface for loading data function on the display device, and the user can import the training set into the training system through this interface.

[0073] It is worth noting that, in this embodiment, the training system obtains the training set and the test set separately, and also performs training in combination with the training set and the test set.

[0074] The training set includes training samples. The number of training samples is usually multiple, which is not limited in this embodiment and can be determined based on demand, historical records, experiments, etc. A training sample can be gene expression data of a single cell (i.e., single cell based expression data).

[0075] Similarly, the test set includes test samples. The number of test samples is usually multiple, which is not limited in this embodiment and can be determined based on demand, historical records, experiments, etc. A test sample can be the gene expression data of a single cell (i.e., single cell based expression data).

[0076] S102: Construct a mixed graph including training samples and test samples, wherein the mixed graph includes nodes and edges, each node represents a sample feature of gene expression data of a single cell, and an edge connecting two nodes represents the similarity or correlation between the two nodes.

[0077] Exemplarily, a hybrid graph may also be referred to as graph data (structure) or hybrid graph data (structure). A hybrid graph mainly includes nodes and edges.

[0078] For example, Figure 2 As shown, the training system divides the training set and the test set into a grid and transforms them into a matrix form. The training system constructs a mixed graph including multiple nodes and multiple edges.

[0079] Among them, one node represents one sample. For example, one node represents a single cell corresponding to a training sample, or one node represents a single cell corresponding to a test sample. And one node has a corresponding sample feature, so as to represent the single cell gene expression data of the corresponding sample through the sample feature.

[0080] An edge connects two nodes, and the edge is used to represent the similarity or correlation between the two nodes it connects. That is, the edge is used to represent the association relationship between the two samples it connects.

[0081] In this embodiment, by constructing a mixed graph, the single-cell annotation graph attention model can enhance the understanding of the relationship between single cells and the transmission effect of label information.

[0082] In some embodiments, S102 may include performing Mutual Nearest Neighbors (MMN) and Canonical Correlation Analysis (CCA) processing on the training samples and the test samples to obtain a mixed graph including the training samples and the test samples.

[0083] Exemplarily, the training system determines the mutual nearest neighbors between training samples and test samples through a mutual nearest neighbor algorithm to construct their relationship; at the same time, the training samples and test samples are projected into the same low-dimensional space using canonical correlation analysis to reduce batch effects between different data sources, so that cells with biological relevance can be closely connected in the mixed graph.

[0084] In some embodiments, after S102, the training method may further include: adding feature vectors after position encoding and linear mapping of each node in the hybrid graph to obtain a new feature representation of each node.

[0085] Combined with the above analysis, the mixed graph includes multiple nodes, one node represents a single cell corresponding to a training sample, or one node represents a single cell corresponding to a test sample, and one node has corresponding sample features.

[0086] Accordingly, in this step, Figure 2 As shown, the training system can add the feature vectors after the position encoding and linear mapping of each node to obtain a new feature representation of each node, thereby obtaining a processed mixed graph.

[0087] For example, the training system can generate position encodings for nodes based on Laplace position encoding, which increases the position information of the nodes and improves the expressiveness of the model. The training system can also project the new feature representation of each node into a space of the same dimension based on linear mapping, eliminating the batch effect between different data sources and ensuring data consistency.

[0088] S103: The mixed graph is passed through the Graph Attention Layers for feature learning to generate node embedding features.

[0089] The graph attention layer may be a multi-head graph attention layer. Exemplarily, the training system performs feature learning on the mixed graph based on the multi-head graph attention layer to obtain an embedded representation of each cell node (i.e., a node embedded feature).

[0090] In this embodiment, through the graph attention layer, the training system can assign different weights to each node and its neighborhood based on the self-attention mechanism to capture the subtle relationship between different single cells, thereby improving the accuracy of annotation. In other words, by introducing the graph attention layer, the degree of attention to the characteristics of neighboring nodes can be dynamically adjusted, so that the single-cell annotation graph attention model can more effectively capture important features and improve the classification accuracy of cell types.

[0091] In some embodiments, the number of graph attention layers is four, the output of the previous graph attention layer is the input of the next graph attention layer, and the input of the first graph attention layer is a mixed graph.

[0092] Among them, each graph attention layer is used to calculate the attention weights between nodes in the mixed graph, so that the single-cell annotation graph attention model can capture the local and global relationships between nodes in the mixed graph.

[0093] Continue reading Figure 2 , the nodes in the processed mixed graph are subjected to feature learning through four layers of graph attention layers. Each layer of graph attention layer calculates the attention weights between nodes, enabling the model to more accurately capture the local and global relationships of nodes and generate node embedding features for subsequent single-cell annotation (i.e., single-cell classification).

[0094] S104: Based on the pre-trained cell state auxiliary model, the obtained cell state data is processed to obtain intermediate embedded features, wherein the intermediate embedded features are used to characterize the cell functional state.

[0095] Exemplarily, before training the single-cell annotation graph attention model, a cell state auxiliary model can be trained by a training system or other system, so that the cell state auxiliary model can extract intermediate embedding features for characterizing the cell functional state from the cell state data.

[0096] Accordingly, continue to refer to Figure 2 ,In the process of training the single cell annotation graph attention model, the training system can input the ,obtained cell state data into the cell state auxiliary model to compare the ,cell state score predicted by the regressor with the true value (i.e., the true state label of the ,cell), calculate the loss and perform back-propagation to update the ,model parameters.

[0097] S105: Based on the cell state auxiliary model, the node embedding feature and the intermediate embedding feature are fused to obtain a fused feature.

[0098] Continue reading Figure 2 The training system can fuse the node embedding features and the intermediate embedding features to obtain fused features. The fusion can be splicing or other operations, which is not limited in this embodiment.

[0099] In this embodiment, the training system fuses the node embedding features and the intermediate embedding features to obtain a single-cell annotation graph attention model based on the fused features, thereby enhancing the classification accuracy of the single-cell annotation graph attention model for cell types.

[0100] S106: According to the mixed graph, the intermediate embedded features, and the fused features, the sample with the largest amount of information is selected, and the sample with the largest amount of information is used as a new training sample for the next round of training until the preset termination iteration condition is met, thereby obtaining a single-cell annotation graph attention model.

[0101] Among them, training samples are samples with labels, and test samples are samples without labels.

[0102] In this embodiment, the training system can calculate the amount of information for each node based on the mixed graph, intermediate embedded features, and fused features. And the sample with the largest amount of information is used as a new training sample. This can solve the problem of insufficient sample labels, and can also enable the single-cell annotation graph attention model to prioritize learning samples with high information content, and can also reduce dependence on large-scale labeled data, improve annotation efficiency and generalization ability, and can also improve the performance of the single-cell annotation graph attention model under sparse label data.

[0103] In some embodiments, S106 may include:

[0104] S1061: Determine information density based on the intermediate embedded features.

[0105] S1062: Determine the centrality according to the mixed graph.

[0106] S1063: Determine a prediction result according to the fusion feature, and determine information entropy (or entropy value) according to the prediction result.

[0107] S1064: Determine the sample with the largest amount of information based on information density, centrality, and information entropy.

[0108] Exemplary, combined Figure 2 It can be seen that the training system can calculate the information density of each node based on the intermediate embedded features; calculate the centrality of each node based on the processed mixed graph; and calculate the information entropy of each node based on the predicted nodes corresponding to the fused features.

[0109] Accordingly, the training system calculates the comprehensive score of each node based on the information density, centrality, and information entropy of each node. The comprehensive score of a node represents the amount of information in the node. The training system selects the sample with the highest comprehensive score as the new training sample.

[0110] In some embodiments, the preset termination iteration conditions include: the number of training times reaches a preset training times threshold, the number of training samples reaches a preset number threshold, and the change in the prediction performance of the single-cell annotation graph attention model is less than a preset change threshold.

[0111] Among them, the preset quantity threshold is determined based on the pre-built training bucket, and the preset quantity threshold is the maximum number of samples stored in the training bucket; the prediction performance change is determined based on the difference in changes in information density and information entropy.

[0112] Exemplarily, the preset termination conditions may include the following conditions:

[0113] Condition 1: When the number of training rounds reaches the maximum number of training rounds (ie, the preset training rounds threshold), the training system stops training. Similarly, the maximum number of training rounds can be determined based on demand, historical records, experiments, etc., and this embodiment does not limit it.

[0114] Condition 2: Based on the above analysis, after each training iteration, the training system will select the test sample with the largest amount of information as the new training sample and put it into the training bucket. When the number of training samples in the training bucket reaches the maximum number of samples that the training bucket can hold, the training system stops training. Similarly, the maximum number of samples that the training bucket can hold can be determined based on demand, historical records, experiments, etc., and this embodiment does not limit it.

[0115] Condition 3: If the change in the prediction performance of the single-cell annotation graph attention model is less than the preset change threshold, the training system stops training. That is, the training of the training system will no longer significantly improve the annotation ability of the single-cell annotation graph attention model, and the training system stops training. For example, after multiple iterations, the nodes selected by the training system (i.e., unlabeled samples) have little improvement on the single-cell annotation graph attention model (i.e., the differences in information entropy and information density become insignificant), and the training system can terminate training.

[0116] Based on the above analysis, it can be seen that the single-cell annotation graph attention model provided by the present disclosure is used for single-cell annotation, that is, cells are classified according to the gene expression data of single cells, and active learning and cell state information are combined to improve the performance of the model. Therefore, the single-cell annotation graph attention model provided by the present disclosure can be called a single-cell annotation graph attention model based on active learning and cell state (Single-Cell Active Learning and Graph Attention Model, scALGT model).

[0117] That is, in this embodiment, the single-cell annotation graph attention model (scALGT model) first constructs a mixed graph between the training data and the test data using the CCA-MNN algorithm, then performs eigenvalue decomposition on the Laplacian matrix to obtain the position encoding information of the nodes in the graph, and projects the sample features and feature encodings to the same dimensional space using linear mapping, and then adds them as new features of the sample. Then scALGT begins to train using the mixed graph and the latest sample features. The scALGT classification model uses the graph attention mechanism layer to learn the input samples, including four layers of graph attention layers and a classifier based on the fully connected layer. The scALGT regression model is based on the input of cell state data, and uses the graph attention model to perform the prediction regression task of the cell state score. When the regression task is completed, the parameters of the original regression model are retained as an auxiliary model to help the scALGT classification model. The expression data of the cell type will be forward calculated by the auxiliary model again, and after obtaining the intermediate sample embedding, it will be added to the intermediate embedding of the original classification model and then put into the classifier for classification learning. In each round of classification model training, the active learning module calculates the sample's information density score and sample uncertainty score, combines the centrality calculated for the graph data sample at the beginning, selects the sample with the highest comprehensive score of the three, and after obtaining a new node, puts it into the training set.

[0118] According to another aspect of the present disclosure, the present disclosure also provides a single cell annotation method.

[0119] See also Figure 3 , Figure 3 A schematic diagram of the process of the single-cell annotation method provided in the embodiment of the present disclosure.

[0120] like Figure 3 As shown, the method includes:

[0121] S301: Obtain single-cell gene expression data to be annotated.

[0122] It can be understood that in order to avoid cumbersome descriptions, the features of this embodiment that are the same or similar to those in the above examples will not be described in detail in this embodiment.

[0123] For example, the execution subject of this embodiment may be a single cell annotation system, which may be the same system as the training system or a different system.

[0124] For another example, regarding the method of obtaining the single-cell gene expression data to be annotated, reference may be made to the implementation principle of obtaining the training set in the above example.

[0125] S302: Input the single-cell gene expression data into the single-cell annotation graph attention model, and output the annotation result, wherein the single-cell annotation graph attention model is trained based on the training method described in the above embodiment.

[0126] Exemplarily, after the single-cell annotation graph attention model is trained, the single-cell gene expression data can be used as the single-cell annotation graph attention model to perform annotation (i.e., cell classification) based on the single-cell annotation graph attention model to obtain and output the annotation results.

[0127] Based on the above analysis of the training method, it can be seen that in this embodiment, by using the single-cell annotation graph attention model for single-cell annotation, the accuracy and reliability of cell classification can be improved.

[0128] According to another aspect of the present disclosure, the present disclosure also provides a training system for a single-cell annotation graph attention model.

[0129] See also Figure 4 , Figure 4 A schematic diagram of the structure of a training system for a single-cell annotation graph attention model provided in an embodiment of the present disclosure. Figure 4 As shown, the training system 400 of the single-cell annotation graph attention model includes:

[0130] A mixed graph construction unit 401 is used to obtain a training set including training samples and a test set including test samples, wherein the training samples and the test samples respectively include single-cell gene expression data, and construct a mixed graph including the training samples and the test samples, wherein the mixed graph includes nodes and edges, each node represents a sample feature of the gene expression data of a single cell, and an edge connecting two nodes represents the similarity or correlation between the two nodes;

[0131] A graph attention mechanism unit 402, configured to perform feature learning on the hybrid graph through a graph attention layer to generate node embedding features;

[0132] A cell state information unit 403 is used to process the obtained cell state data based on a pre-trained cell state auxiliary model to obtain an intermediate embedding feature, wherein the intermediate embedding feature is used to characterize the cell function state, and fuse the node embedding feature and the intermediate embedding feature to obtain a fused feature;

[0133] The active learning unit 404 is used to select the sample with the largest amount of information according to the mixed graph, the intermediate embedded features, and the fused features, and use the sample with the largest amount of information as a new training sample for the next round of training until the preset termination iteration condition is met, thereby obtaining a single-cell annotation graph attention model.

[0134] In some embodiments, the mixed graph construction unit 401 is specifically used to perform mutual nearest neighbor algorithm and canonical correlation analysis processing on the training samples and the test samples to obtain the mixed graph including the training samples and the test samples.

[0135] In some embodiments, the hybrid graph construction unit 401 is further used to add feature vectors after position encoding and linear mapping of each node in the hybrid graph to obtain a new feature representation of each node.

[0136] In some embodiments, the number of the graph attention layers is four, the output of the previous graph attention layer is the input of the next graph attention layer, and the input of the first graph attention layer is the mixed graph;

[0137] Among them, each graph attention layer is used to calculate the attention weights between the nodes in the mixed graph, so that the single-cell annotation graph attention model captures the local and global relationships between the nodes in the mixed graph.

[0138] In some embodiments, the active learning unit 404 is specifically used to determine the information density based on the intermediate embedded features; determine the centrality based on the mixed graph; determine the prediction result based on the fusion feature, and determine the information entropy based on the prediction result; determine the sample with the largest amount of information based on the information density, the centrality, and the information entropy.

[0139] In some embodiments, the preset termination iteration condition includes: the number of training times reaches a preset training times threshold, the number of training samples reaches a preset number threshold, and the change in the prediction performance of the single-cell annotation graph attention model is less than a preset change threshold;

[0140] Among them, the preset quantity threshold is determined based on a pre-constructed training bucket, and the preset quantity threshold is the maximum number of samples stored in the training bucket; the prediction performance change is determined based on the difference in changes in the information density and the information entropy.

[0141] According to another aspect of the present disclosure, the present disclosure also provides a single cell annotation system.

[0142] See also Figure 5 , Figure 5 A schematic diagram of the structure of the single-cell annotation system provided in an embodiment of the present disclosure.

[0143] like Figure 5 As shown, the single cell annotation system 500 includes:

[0144] An acquisition unit 501 is used to obtain single-cell gene expression data to be annotated;

[0145] The annotation unit 502 is used to input the single-cell gene expression data into a single-cell annotation graph attention model and output an annotation result, wherein the single-cell annotation graph attention model is trained based on the training method described in the first aspect.

[0146] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0147] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the above-mentioned training method or single-cell annotation method.

[0148] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0149] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0150] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0151] The computing unit 601 can be various general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as training methods and single cell annotation methods. For example, in some embodiments, the training method and the single cell annotation method can be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the training method and the single cell annotation method described above can be executed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the training method and the single cell annotation method in any other suitable manner (eg, by means of firmware).

[0152] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0153] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0154] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0156] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0157] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0158] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0159] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A training method for a single-cell annotation graph attention model, characterized in that: The method comprises: Obtaining a training set including training samples and a test set including test samples, wherein the training samples and the test samples respectively include single-cell gene expression data; Constructing a mixed graph including training samples and test samples, wherein the mixed graph includes nodes and edges, each node represents a sample feature of gene expression data of a single cell, and an edge connecting two nodes represents the similarity or correlation between the two nodes; Performing feature learning on the hybrid graph through a graph attention layer to generate node embedding features; Based on a pre-trained cell state auxiliary model, the obtained cell state data is processed to obtain intermediate embedded features, wherein the intermediate embedded features are used to characterize the cell function state; Based on the cell state auxiliary model, the node embedding feature and the intermediate embedding feature are fused to obtain a fused feature; According to the mixed graph, the intermediate embedded features, and the fused features, the sample with the largest amount of information is selected, and the sample with the largest amount of information is used as a new training sample for the next round of training until a preset termination iteration condition is met, thereby obtaining a single-cell annotation graph attention model.

2. The method according to claim 1, characterized in that The construction includes a mixed graph of training samples and test samples, including: The training samples and the test samples are processed by mutual nearest neighbor algorithm and canonical correlation analysis to obtain the mixed graph including the training samples and the test samples.

3. The method according to claim 1, characterized in that The method further comprises: The feature vectors after position encoding and linear mapping of each node in the hybrid graph are added to obtain a new feature representation of each node.

4. The method according to claim 1, characterized in that: The number of the graph attention layers is four, the output of the previous graph attention layer is the input of the next graph attention layer, and the input of the first graph attention layer is the mixed graph; Among them, each graph attention layer is used to calculate the attention weights between the nodes in the mixed graph, so that the single-cell annotation graph attention model captures the local and global relationships between the nodes in the mixed graph.

5. The method according to claim 1, characterized in that: The selecting the sample with the largest amount of information according to the mixed graph, the intermediate embedded features, and the fused features includes: determining information density according to the intermediate embedded features; determining a centrality based on the mixed graph; Determining a prediction result according to the fusion feature, and determining information entropy according to the prediction result; The sample with the largest amount of information is determined according to the information density, the centrality, and the information entropy.

6. The method according to claim 5, characterized in that The preset termination iteration condition includes: the number of training times reaches a preset training times threshold, the number of training samples reaches a preset number threshold, and the change in the prediction performance of the single-cell annotation graph attention model is less than a preset change threshold. Among them, the preset quantity threshold is determined based on a pre-constructed training bucket, and the preset quantity threshold is the maximum number of samples stored in the training bucket; the prediction performance change is determined based on the difference in changes in the information density and the information entropy.

7. A single cell annotation method, characterized in that: The method comprises: Obtain single-cell gene expression data to be annotated; The single-cell gene expression data is input into a single-cell annotation graph attention model, and an annotation result is output, wherein the single-cell annotation graph attention model is trained based on the training method described in any one of claims 1 to 6.

8. A training system for a single-cell annotation graph attention model, characterized in that: include: A mixed graph construction unit, used to obtain a training set including training samples and a test set including test samples, wherein the training samples and the test samples respectively include single-cell gene expression data, and construct a mixed graph including the training samples and the test samples, wherein the mixed graph includes nodes and edges, each node represents a sample feature of the gene expression data of a single cell, and an edge connecting two nodes represents the similarity or correlation between the two nodes; A graph attention mechanism unit, configured to perform feature learning on the hybrid graph through a graph attention layer to generate node embedding features; A cell state information unit, used to process the obtained cell state data based on a pre-trained cell state auxiliary model to obtain an intermediate embedding feature, wherein the intermediate embedding feature is used to characterize the cell function state, and fuse the node embedding feature and the intermediate embedding feature to obtain a fused feature; An active learning unit is used to select the sample with the largest amount of information according to the mixed graph, the intermediate embedded features, and the fused features, and use the sample with the largest amount of information as a new training sample for the next round of training until a preset termination iteration condition is met, thereby obtaining a single-cell annotation graph attention model.

9. A single cell annotation system, characterized in that: The system comprises: An acquisition unit, used for obtaining single-cell gene expression data to be annotated; An annotation unit is used to input the single-cell gene expression data into a single-cell annotation graph attention model and output an annotation result, wherein the single-cell annotation graph attention model is trained based on the training method according to any one of claims 1 to 6.

10. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a computer program, wherein the computer program is used to cause the processor to execute the method according to any one of claims 1 to 6; or, the computer program is used to cause the processor to execute the method according to claim 7.

Citation Information

Patent Citations

  • Construction method and device of scRNA-Seq cell type annotation database and electronic equipment

    CN115579069A

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

    CN118136120A

  • Hybrid deep learning for anomaly detection

    US20220392056A1

  • Live-cell label-free prediction of single-cell omics profiles by microscopy

    US20240371184A1