A method and system for regulating timing fusion of single-cell intelligent precise annotation
Patent Information
- Application Number
- CN202611275220.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-23
AI Technical Summary
(1)基于标记基因(marker gene)的人工注释方法依赖领域专家经验,耗时耗力且主观性强,难以应对大规模数据集
本申请使用转录因子-靶基因调控关系构建基因调控图,结合不确定性量化,使用基因调控图拓扑作为图注意力网络的结构约束,本申请进一步通过基因调控图约束、伪时间时序、四类细胞特征融合和不确定性分析形成完整的细胞类型自动注释流程,相较于现有技术,大大提升了鲁棒性且能够量化预测不确定性。
Smart Images

Figure CN122967768A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cell annotation technology, and in particular to a single-cell intelligent and precise annotation method and system for regulating temporal fusion. Background Technology
[0002] Single-cell RNA sequencing (scRNA-seq) technology can comprehensively analyze gene expression heterogeneity at single-cell resolution, and has become a core technology in fields such as developmental biology, tumor immunology, and precision medicine. With the advancement of large-scale single-cell atlas projects (such as Human Cell Atlas and Tabula Sapiens), the scale of data generated has reached millions or even tens of millions of cells, creating an urgent need for efficient and accurate computational methods.
[0003] Cell type annotation is a crucial step in single-cell data analysis, aiming to map each cell or cell cluster to a known biological cell type label. Existing methods primarily face the following technical bottlenecks: (1) Manual annotation methods based on marker genes rely on the experience of domain experts, are time-consuming and labor-intensive, and are highly subjective, making them difficult to handle large-scale datasets.
[0004] (2) Automatic annotation methods based on reference datasets (such as SingleR, CellTypist, scArches, etc.) usually employ simple correlation calculations or shallow machine learning models, which fail to fully capture the high-order regulatory relationships between gene expression and have significant shortcomings in generalization ability across datasets, species, and platforms.
[0005] (3) Most existing deep learning methods treat gene expression vectors as independent features and ignore the inherent regulatory network topology between genes (such as transcription factor-target gene regulatory relationship, upstream and downstream relationship of signaling pathway), resulting in poor robustness of the model under low-quality data (high dropout rate, low sequencing depth).
[0006] (4) For intermediate cells in the developmental trajectory or dynamic differentiation process, the existing static classification method cannot effectively model the continuous changes in cell state, resulting in the incorrect annotation of transitional cells.
[0007] (5) In recent years, graph neural network methods have begun to be applied to the field of single-cell annotation. However, some methods only construct graph structures from expression data and do not explicitly use the transcription factor-target gene relationship supported by sample specificity and motif as the graph topology. Although some methods use Graph Transformer, GCN or other attention structures, they do not combine gene regulation graph constraints, cell state temporal modeling and prediction uncertainty quantification at the same time.
[0008] (6) Single-cell basic models (such as scGPT, Geneformer, and scFoundation) have achieved generalized gene expression representation capabilities through large-scale pre-training. However, these models have a huge number of parameters (usually exceeding 100 million parameters), resulting in high training and inference costs. Furthermore, their general representation may not be able to fully capture the key regulatory features of cell types in specific tissues or diseases. In addition, basic models usually process gene expression sequences and do not explicitly model the topology of regulatory networks between genes.
[0009] Therefore, there is an urgent need for an automated cell type annotation method for single-cell transcriptomes that can utilize sample-specific gene regulatory map topology, possess dynamic state modeling capabilities, and quantify annotation uncertainty. Summary of the Invention
[0010] This application provides a single-cell intelligent and precise annotation method and system for regulating temporal fusion, so as to at least solve the above-mentioned technical problems existing in the prior art.
[0011] According to a first aspect of this application, a single-cell intelligent and precise annotation method for regulating temporal fusion is provided, comprising the following steps: S1 receives the original single-cell gene expression matrix, performs data preprocessing, selects highly variable genes for principal component analysis, and obtains a low-dimensional principal component embedding matrix. S2. Based on the output of SCENIC, read the regulatory relationship between transcription factors and target genes, complete the unified mapping from gene symbols to Ensembl identifiers, and obtain a set of directed regulatory edges; determine the normalized regulatory edge weight for each directed regulatory edge in the set of directed regulatory edges, and construct a gene regulation graph. S3 uses the gene regulation graph as the topology and the gene expression values of each cell as the initial features of the nodes to build a multi-layer graph attention network to generate gene regulation perception cell embedding for each cell. S4 uses diffusion mapping to calculate the pseudo-temporal order of cells, sorts the cells, and uses a one-dimensional causal convolutional network to model cell features along the pseudo-temporal axis; after completing the temporal feature calculation, the original cell order is restored to obtain the temporally enhanced cell embedding. S5 integrates four types of cell features, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and low-dimensional principal component embedding; based on a gated fusion mechanism, the four types of cell features are spliced together to obtain the cell fusion feature; the fusion feature is input into a multilayer perceptron classifier containing two hidden layers to obtain the cell type probability distribution. S6. Monte Carlo Dropout is used for uncertainty estimation. The average prediction probability and prediction entropy of T forward propagations are calculated. An uncertainty threshold is set. If the prediction entropy is less than or equal to the uncertainty threshold, the class with the highest average prediction probability is used as the final annotation for cell i. If the prediction entropy is greater than the uncertainty threshold, the cell is marked as undetermined.
[0012] In some embodiments of the first aspect of this application, step S1 includes the following steps: S1.1: Receive the original single-cell gene expression matrix Where n is the number of cells and m is the number of genes; the original single-cell gene expression matrix Quality control measures are implemented to remove at least one of the following: low-quality cells and rare genes. S1.2: Normalize the single-cell gene expression matrix after quality control; S1.3: Select highly variable genes as a feature subset; Calculate the mean and variance of gene g in n cells;
[0013]
[0014]
[0015] in, The mean value of gene g in n cells; This represents the number of cells; Represents cells Normalized expression level of gene g after SCTransform treatment; The variance of gene g is represented in n cells; This represents the mean offset; Represents the variance offset; Divide the range of the logarithm of the mean into multiple equally wide intervals to construct the logarithmic mean variable and the logarithmic variance variable as follows:
[0016] After removing empty intervals containing no genes, the remaining K intervals are arranged in ascending order of their center values; the center value of the k-th non-empty interval is denoted as ā. kAll within this interval The arithmetic mean is denoted as k ; For any value 'a' between the centers of adjacent intervals, the mean-variance trend function 'f' is used for piecewise linear interpolation according to the following formula:
[0017] when When it is not greater than the center of the first interval, Take the first interval Mean; when When it is not less than the center of the last interval, Take the last interval Mean; Selected from highest to lowest dispersion score One gene; The method for calculating the dispersion score is as follows:
[0018] in, This represents the dispersion score.
[0019] In some embodiments of the first aspect of this application, step S2 includes the following steps: S2.1: Read the transcription factor-target gene regulatory relationships from the SCENIC analysis results of the samples to be annotated, and retain only the high-confidence relationships; S2.2: For each directed control edge in the set of directed control edges EGRN Determine the normalized control edge weights; the calculation method for the control edge weights is as follows:
[0020] in, CoexWeight is the co-expression weight output by the SCENIC analysis results; Represents transcription factor nodes; Indicates the target gene node; Represents the directed control edge Normalized adjustment edge weights; S2.3: Constructing a gene regulation map ;in, The Ensembl gene node set that participates in the construction of the gene regulation map in the single-cell gene expression matrix; It is a set of directed control edges; The normalized control edge weights; S2.4: The gene regulation map Perform sparsification.
[0021] In some embodiments of the first aspect of this application, step S3 includes the following steps: S3.1: Construct a multi-layer graph attention network; for each cell, use the gene regulation graph as the topology and the expression values of each gene in the cell as the initial features of the nodes; S3.2: Employ a multi-head attention mechanism, where the q-th attention head uses independent parameters. and The aggregation results of each attention head are then spliced together. ; Where q∈{1,…,H} is the attention head index; σ represents the nonlinear activation function; N(i) is the set of neighbors of node i; This represents concatenating the outputs of H attention heads along the feature dimension; S3.3: Stack multiple graph attention layers, with residual connections and layer normalization between each layer; S3.4: After L-layer graph attention encoding, for each cell, the gene nodes j Context-aware features are obtained; then attention pooling is performed on all gene node features of the cell to obtain the gene regulation-aware cell embedding of the cell.
[0022] In some embodiments of the first aspect of this application, step S4 includes the following steps: S4.1: Use diffusion mapping to calculate the pseudo-temporal ordering of cells.
[0023] Construct a Gaussian kernel similarity matrix between cells based on a low-dimensional principal component embedding matrix;
[0024] in, and These are the i-th and j-th rows of the low-dimensional principal component embedding matrix Z, respectively, representing the low-dimensional principal component embeddings of cell i and cell j. For diffusion mapping kernel bandwidth; Then, the intercellular Gaussian kernel similarity matrix was analyzed. Perform eigenvalue decomposition and take the first few features. A non-trivial eigenvector is used to construct the diffusion coordinates; S4.2: Sort cells using the first nontrivial eigenvector of the diffusion coordinates as the initial estimate of the pseudo-time axis; S4.3: Construct time-aware architecture by using a one-dimensional causal convolutional network to model cell features along a pseudo-time axis; Arrange the cells according to the pseudo-time order, let ,in For the sorted number Cell index corresponding to each location For the gene regulation sensing cell embedding of this cell; the first The output of the multi-layer causal convolution is:
[0025] in, Position for pseudo-time sorting; Index for causal convolutional layers; The kernel size; S4.4: Stack three causal convolutional layers, each followed by a gated linear unit and a residual connection; after restoring the original cell order, the cells are obtained. Temporal enhancement of cell embedding.
[0026] In some embodiments of the first aspect of this application, step S5 includes the following steps: S5.1: For each cell i, integrate the following four complementary cell feature representations, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and temporal enhancement cell embedding. S5.2: A gated fusion mechanism is used to integrate the above four types of cell features. First, the various cell features are projected onto a preset dimension, and then a splicing vector is constructed. and gate vector To obtain cell fusion characteristics ; S5.3: The fusion feature The input is a multilayer perceptron classifier with two hidden layers; the output layer produces C class scores. Cells were obtained via Softmax. Cell type probability distribution :
[0027] in, Cell i belongs to category The predicted probability; S5.4: The classifier is trained using label-smooth cross-entropy loss; for cells... and categories The smoothed target value and training loss are:
[0028]
[0029] in, C represents the number of training cells; C represents the total number of cell types. For training cell indexing; Indexed by category; The c-th component is the one-hot encoded real label; To predict probabilities; This is the label smoothing factor.
[0030] In some embodiments of the first aspect of this application, step S6 includes the following steps: S6.1: Uncertainty estimation is performed using Monte Carlo Dropout; During the inference phase, keep Dropout enabled in the S5.3 multilayer perceptron classifier for the same cell. Perform T forward propagations; For sampling sequence number, the first The first forward propagation yielded the... Class probability is denoted as ; S6.2: Calculate the average prediction probability and prediction entropy after T forward propagations:
[0031] in, Represents cells Belongs to the The average predicted probability of class T times; T is the number of Monte Carlo Dropout samples; For cell type indexing; Total number of cell types; For cells Predicted entropy; S6.3: Set an uncertainty threshold If the predicted entropy is less than or equal to the uncertainty threshold, then the category with the highest average predicted probability is taken as the cell. The final annotation: If the predicted entropy is greater than the uncertainty threshold, the specific cell type will not be output, and the cell will be marked as undetermined.
[0032] According to a second aspect of this application, a single-cell intelligent precision annotation system for regulating temporal fusion is provided, comprising: The data input and preprocessing unit receives the raw single-cell gene expression matrix, performs data preprocessing, selects highly variable genes for principal component analysis, and obtains a low-dimensional principal component embedding matrix. The regulation graph construction unit reads the regulation relationship between transcription factors and target genes based on the output results of SCENIC, completes the unified mapping from gene symbols to Ensembl identifiers, and obtains a set of directed regulatory edges; the normalized regulatory edge weight is determined for each directed regulatory edge in the set of directed regulatory edges, and a gene regulation graph is constructed. The graph attention network encoding unit uses a sparsed gene regulation graph as the topology and the gene expression values of each cell as the initial features of the nodes to build a multi-layer graph attention network to generate gene regulation sensing cell embeddings for each cell. The temporal awareness unit uses diffusion mapping to calculate the pseudo-temporal order of cells, sorts the cells, and uses a one-dimensional causal convolutional network to model cell features along the pseudo-temporal axis. After completing the temporal feature calculation, the original order of cells is restored to obtain the temporally enhanced cell embedding. A multi-scale feature fusion unit integrates four types of cell features, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and low-dimensional principal component embedding; based on a gated fusion mechanism, the four types of cell features are spliced together to obtain the fused cell features; the fused features are input into a multilayer perceptron classifier containing two hidden layers to obtain the cell type probability distribution. The uncertainty estimation unit uses Monte Carlo Dropout for uncertainty estimation, calculating the average prediction probability and prediction entropy after T forward propagations; an uncertainty threshold is set; if the prediction entropy is less than or equal to the uncertainty threshold, the class with the highest average prediction probability is selected as the cell. The final note: If the predicted entropy is greater than the uncertainty threshold, the cell is marked as undetermined.
[0033] According to a third aspect of this application, an electronic device is provided, comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described in this application.
[0034] According to a fourth aspect of this application, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this application.
[0035] Compared with the prior art, this application has the following advantages: This application constructs a gene regulation graph using transcription factor-target gene regulatory relationships. Combined with uncertainty quantification, the gene regulation graph topology is used as a structural constraint for the graph attention network. Furthermore, this application forms a complete automatic annotation process for cell types through gene regulation graph constraints, pseudo-temporal sequence, fusion of four types of cell features, and uncertainty analysis. Compared with existing technologies, this greatly improves robustness and can quantify and predict uncertainty.
[0036] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0037] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0038] Figure 1 A flowchart illustrating the overall method of Embodiment 1 of this application is shown.
[0039] Figure 2 A schematic diagram of gene regulation map construction in Embodiment 1 of this application is shown.
[0040] Figure 3 The diagram shows the graph attention network architecture of Embodiment 1 of this application.
[0041] Figure 4 The diagram shows a timing-aware architecture of Embodiment 1 of this application.
[0042] Figure 5 A schematic diagram of cell feature fusion in Embodiment 1 of this application is shown.
[0043] Figure 6 A schematic diagram of the system structure of Embodiment 2 of this application is shown.
[0044] Figure 7 A schematic diagram of the composition structure of the electronic device according to Embodiment 3 of this application is shown. Detailed Implementation
[0045] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] Example 1: A Single-Cell Intelligent Precision Annotation Method Based on Temporal Fusion Regulation This first embodiment provides a single-cell intelligent and precise annotation method for regulating temporal fusion. Please refer to... Figure 1 The single-cell intelligent and precise annotation method for regulating temporal fusion includes the following steps: S1 receives the original single-cell gene expression matrix, performs data preprocessing, selects highly variable genes for principal component analysis, and obtains a low-dimensional principal component embedding matrix.
[0047] Specifically, step S1 includes the following steps: S1.1: Receive the original single-cell gene expression matrix , where n is the number of cells and m is the number of genes.
[0048] The original single-cell gene expression matrix Quality control is performed to remove at least one of low-quality cells and rare genes; wherein, the low-quality cells include: cells with a mitochondrial gene ratio >20%, and / or cells with <200 genes detected; the rare genes include: genes expressed in fewer than 3 cells.
[0049] S1.2: Normalize the single-cell gene expression matrix after quality control.
[0050] The normalization process includes: using the SCTransform method for variance stabilization transformation to eliminate the influence of technical noise such as sequencing depth. The purpose of using SCTransform is to regress sequencing depth using a negative binomial generalized linear model, thereby reducing the impact of technical noise on subsequent screening of highly variable genes while preserving biological variation.
[0051] S1.3: Select highly variable genes (HVGs) as a feature subset.
[0052] For the normalized single-cell gene expression matrix, calculate the mean and variance of gene g in n cells;
[0053]
[0054]
[0055] in, The mean value of gene g in n cells; This represents the number of cells; Represents cells Normalized expression level of gene g after SCTransform treatment; The variance of gene g is represented in n cells; This represents the mean offset; This represents the variance offset.
[0056] Divide the range of the logarithm of the mean into multiple equally wide intervals, such as 20, and construct the logarithmic mean variable and the logarithmic variance variable as follows:
[0057] After removing empty intervals containing no genes, the remaining K intervals are sorted in ascending order of their center values, where K ≤ 20; the center value of the k-th non-empty interval is denoted as ā. k All within this interval The arithmetic mean is denoted as k .
[0058] For any value 'a' between the centers of adjacent intervals, the mean-variance trend function 'f' is used for piecewise linear interpolation according to the following formula:
[0059] when When it is not greater than the center of the first interval, Take the first interval Mean; when When it is not less than the center of the last interval, Take the last interval Mean.
[0060] Selected from highest to lowest dispersion score One gene, in this implementation method, is taken as... =3000, It can be set in the range of 2000-5000.
[0061] The method for calculating the dispersion score is as follows:
[0062] in, This represents the dispersion score.
[0063] S1.4: Perform principal component analysis (PCA) on the selected hypervariable genes, retain the top d principal components that explain 85% of the cumulative variance, and obtain the low-dimensional principal component embedding matrix. Where n is the number of cells, d is the number of principal components retained, and in this embodiment, d is limited to 30-100; the i-th row of Z This represents the low-dimensional principal component embedding of cell i.
[0064] S2. Based on the output of SCENIC, read the regulatory relationship between transcription factors and target genes, complete the unified mapping from gene symbols to Ensembl identifiers, and obtain a set of directed regulatory edges; determine the normalized regulatory edge weight for each directed regulatory edge in the set of directed regulatory edges, and construct a gene regulation graph.
[0065] For details, please refer to Figure 2 Step S2 includes the following steps: S2.1: Read the transcription factor (TF)-target gene regulatory relationships from the SCENIC analysis results of the samples to be annotated, and retain only high confidence relationships, which refer to regulatory relationships where highConfAnnot is TRUE.
[0066] The gene symbols of transcription factors and target genes are converted into Ensembl gene symbols used in the expression matrix through a mouse gene identifier mapping table; relationships that cannot be mapped or have one-to-many ambiguities are not considered and are not included in this implementation. This yields the directed regulatory edge set EGRN. These relationships are computationally predicted relationships supported by motifs and are not presented as experimental verification relationships.
[0067] It is worth mentioning that for multiple records of the same transcription factor-target gene pair, the record with the largest |CoexWeight| is retained.
[0068] S2.2: For each directed control edge in the set of directed control edges EGRN Determine the normalized control edge weights; Specifically, the calculation method for the control edge weight is as follows:
[0069] in, CoexWeight is the co-expression weight output by the SCENIC analysis results; Represents transcription factor nodes; Indicates the target gene node; Represents the directed control edge The normalized regulatory edge weights represent the strength of co-expression support for the transcription factor-target gene relationship relative to the retention relationships in this batch.
[0070] S2.3: Constructing a gene regulation map .in, The Ensembl gene node set that participates in the construction of the gene regulation map in the single-cell gene expression matrix; This is the set of directed control edges obtained in S2.1; The normalized control edge weights, .
[0071] For example, the original SCENIC results in this embodiment contain 166,488 relations, of which 51,779 relations have highConfAnnot as TRUE. After completing the unique mapping of gene identifiers, expression matrix intersection screening, deletion weight removal, and merging of duplicate transcription factor-target gene pairs, 42,912 unique high-confidence regulatory edges are obtained.
[0072] S2.4: The gene regulation map Perform sparsification.
[0073] For each gene node According to the normalized control of the side weights A maximum of K=20 regulatory edges are retained from high to low, but K can also take other values, such as 25 or 30; when gene nodes When there are fewer than K control edges, all of them are retained. After sparsification, we obtain the set E of control edges and the corresponding normalized control edge weights. The retained E is used as the topology of the multi-layer graph attention network in S3, and the corresponding normalization adjusts the edge weights. Recorded as As an edge The edge features are used in the calculation of the attention coefficient.
[0074]
[0075] S3 uses a sparsed gene regulation graph as the topology and the gene expression values of each cell as the initial features of the nodes to build a multi-layer graph attention network to generate gene regulation perception cell embeddings for each cell.
[0076] For details, please refer to Figure 3 Step S3 includes the following steps: S3.1: Construct a multi-layer graph attention network (GAT); for each cell, use the gene regulation graph thinned by S2.4. As a topology, the expression values of the cell on each gene are used as the initial features of the nodes.
[0077] Let the gene nodes in the l-th layer be... The feature vector is Then the node For neighboring nodes The unnormalized attention score is obtained after softmax normalization. :
[0078] in, Representing the Layer-learnable linear transformation matrix, ; Represents a vector of learnable attention parameters. The superscript T indicates vector transpose. Normalized control edge weights for control edges (i,j) reserved for S2.4; This indicates vector concatenation; This indicates that index j is normalized within the neighbor set N(i) of node i.
[0079] This embodiment uses the standard GAT to calculate neighborhood attention on the sparse directed control graph obtained in S2.4; normalized control edge weights are directly used as edge features in the attention score; residual connections, layer normalization, and a three-layer network are used to maintain node information at different levels and limit over-aggregation.
[0080] S3.2: A multi-head attention mechanism is adopted, with H=8 attention heads being the preferred setting. The q-th attention head uses independent parameters. and The aggregation results of each attention head are then concatenated as follows: ; Where q∈{1,…,H} is the attention head index; σ represents the nonlinear activation function; N(i) is the set of neighbors of node i; This represents concatenating the outputs of H attention heads according to their feature dimensions.
[0081] S3.3: Stack L=3 graph attention layers, with each layer having an output dimension of... , , Residual connections and layer normalization are used between each layer: The specific formulas for residual connectivity and layer normalization are as follows:
[0082] Where GATLAyer represents the forward propagation of a single-layer graph attention network, and LayerNorm represents the layer normalization operation. Indicates the first The output features of the Lth layer are calculated, and the final output dimension of the Lth layer is 64 dimensions.
[0083] S3.4: After L-layer graph attention encoding, for each cell, the gene nodes j Obtaining context-aware features Subsequently, attention pooling was performed on all gene node features of the cell to obtain the gene regulation sensing cell embedding of the cell. :
[0084] in, Representative cells Middle gene node Features at layer L; Represents cells Middle gene node Learnable pooling weights are normalized within the node set V; For cells The 64-dimensional gene regulation of sensory cell embedding.
[0085] S4 uses diffusion mapping to calculate the pseudo-temporal order of cells, sorts the cells, and uses a one-dimensional causal convolutional network to model the cell features along the pseudo-temporal axis; after completing the temporal feature calculation, the original order of cells is restored to obtain the temporal enhanced cell embedding.
[0086] For details, please refer to Figure 4 Step S4 includes the following steps: S4.1: Use diffusion mapping to calculate the pseudo-temporal ordering of cells.
[0087] Based on the low-dimensional principal component embedding matrix Z obtained in S1.4, an intercellular Gaussian kernel similarity matrix is constructed. ;
[0088] in, and These are the i-th and j-th rows of the low-dimensional principal component embedding matrix Z, respectively, representing the low-dimensional principal component embeddings of cell i and cell j. For diffusion mapping kernel bandwidth, Take the median of the squared Euclidean distances between the 15th nearest neighbors of each cell, and set a lower limit. For example, in the data of 8203 cells in this embodiment, adaptive calculation was obtained. =208.6097.
[0089] Then, the intercellular Gaussian kernel similarity matrix was analyzed. Perform eigenvalue decomposition and take the first few features. The diffusion coordinates are constructed using non-trivial eigenvectors.
[0090] S4.2: Sort cells using the first nontrivial eigenvector (DC1) of the diffusion coordinates as the initial estimate of the pseudo-time axis.
[0091] For multi-branch trajectories, branch points are detected separately, pseudo-temporal order is calculated within each branch, and cells near the branch points are involved in the local temporal calculation of connected branches to maintain the continuity of features at the branch points.
[0092] S4.3: Construct time-aware architecture by using a one-dimensional causal convolutional network to model cell features along a pseudo-time axis.
[0093] Arrange the cells according to the pseudo-time order obtained in S4.2, let ,in For the sorted number Cell index corresponding to each location This cell receives gene regulation sensing cell embedding in S3.4; The output of the multi-layer causal convolution is:
[0094] in, Position for pseudo-time sorting; Index for causal convolutional layers; For the kernel size, this implementation method =5; The location is within the convolution kernel; For the first Layer in position Learnable convolutional weights at the location; It is derived from the current location and its historical locations, and therefore does not use information about future cell locations.
[0095] S4.4: Stack three causal convolutional layers, each followed by a gated linear unit and a residual connection; after restoring the original cell order, the cells are obtained. Temporal enhancement of cell embedding .
[0096] S5 integrates four types of cell features, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and low-dimensional principal component embedding; based on a gating fusion mechanism, the four types of cell features are spliced together to obtain the cell fusion feature; the fused fusion feature is input into a multilayer perceptron classifier containing two hidden layers to obtain the cell type probability distribution.
[0097] For details, please refer to Figure 5 Step S5 includes the following steps: S5.1: For each cell i, integrate the following four complementary cellular feature representations, including: (1) Gene regulation sensing cell embedding S3.4 affects cells i The gene node features are obtained by attention pooling; (2) Pathway sensing cell embedding .
[0098] For example: based on the pathway-gene membership relationship in KEGG mice, the Entrez gene identifier is converted into the Ensembl gene identifier used in the expression matrix; pathways with fewer than 5 member genes are removed.
[0099] Let the set of member gene indices for the r-th effective pathway be . The total number of effective pathways is R. For cells... The following formulas are used to perform intra-path average pooling, linear projection, and cross-path average aggregation in sequence:
[0100]
[0101]
[0102] in, This represents the Lth layer feature of gene node j in cell i obtained in step S3; | represents the number of member genes in the r-th effective pathway; This represents the average pooling characteristic of the r-th pathway; and These represent the shared linear projection matrix and the bias vector, respectively, with an output dimension of 32. Let represent the feature of the r-th path after projection; R represents the total number of valid paths. This represents the 32-dimensional pathway of cell i to sense cell embedding.
[0103] Genes and KEGG pathways are mapped in a many-to-many manner. A gene can belong to multiple pathways, and a pathway can contain multiple genes; only genes present in the expression matrix are retained, and pathways containing fewer than 5 valid genes are removed.
[0104] This embodiment uses 301 mouse KEGG pathways, which, after Entrez-Ensembl conversion, contain 6226 genes in the expression matrix and 23666 pathway member relationships.
[0105] (3) Low-dimensional principal component embedding That is, the i-th row of the low-dimensional principal component embedding matrix Z described in S1.4; (4) Temporal enhancement of cell embedding , obtained from S4.4.
[0106] S5.2: A gated fusion mechanism is used to integrate the above four types of cell features. First, the various cell features are projected onto a preset dimension, and then a splicing vector is constructed. and gate vector To obtain cell fusion characteristics :
[0107]
[0108] in, , , and Learnable linear projection matrices representing four types of cell characteristics; and These are the learnable scalars contributing to the regulatory gene-sensing cell embedding and the temporally enhanced cell embedding, respectively. and These are the gate layer parameters; and To fuse the projection layer parameters; Gating vector The components are restricted to (0,1); ⊙ represents element-wise multiplication; For cells The fusion characteristics.
[0109] S5.3: The fusion feature The input consists of a multilayer perceptron classifier with two hidden layers of dimensions 128 and 64, using ReLU activation and a Dropout rate of 0.3; the output layer produces C class scores. Cells were obtained via Softmax. Cell type probability distribution :
[0110] in, Cell i belongs to category The predicted probability.
[0111] S5.4: The classifier is trained using label-smoothed cross-entropy loss. To avoid confusion with the kernel bandwidth εK in S4.1, the label smoothing factor is denoted as... In this embodiment, εLS=0.1. For cells... and categories The smoothed target value and training loss are:
[0112]
[0113] in, C represents the number of training cells; C represents the total number of cell types. For training cell indexing; Indexed by category; The c-th component is the one-hot encoded real label; The prediction probability defined for S5.3; This is the label smoothing factor. The actual labels come from label files that correspond one-to-one with the cell barcodes in the expression matrix. This example contains 8203 cells and 5 cell types.
[0114] S6. Monte Carlo Dropout is used for uncertainty estimation. The average prediction probability and prediction entropy of T forward propagations are calculated. An uncertainty threshold is set. If the prediction entropy is less than or equal to the uncertainty threshold, the class with the highest average prediction probability is used as the final annotation for cell i. If the prediction entropy is greater than the uncertainty threshold, the cell is marked as undetermined.
[0115] Specifically, step S6 includes the following steps: S6.1: Use Monte Carlo Dropout for uncertainty estimation.
[0116] During the inference phase, keep Dropout enabled in the S5.3 multilayer perceptron classifier for the same cell. Perform T=50 forward propagations; For sampling sequence number, the first The first forward propagation yielded the... Class probability is denoted as The probability vector is denoted as The superscript (t) in parentheses here indicates the number of samples, not the exponentiation.
[0117] S6.2: Calculate the average prediction probability and prediction entropy after T forward propagations:
[0118] in, Represents cells Belongs to the The average predicted probability of class T times; T is the number of Monte Carlo Dropout samples; For cell type indexing; Total number of cell types; For cells The predicted entropy, with a value range of , The larger the value, the more uncertain the prediction. Here, ln represents the natural logarithm to the base e, and it is agreed that 0·ln(0)=0.
[0119] S6.3: Set an uncertainty threshold If the predicted entropy is less than or equal to the uncertainty threshold, i.e. ≤τ Then the class with the highest average predicted probability is taken as the cell. The final note: If the predicted entropy is greater than the uncertainty threshold, i.e. If the value exceeds τ, the specific cell type will not be output; the cell will be marked as "unassigned," and a manual review will be requested. The uncertainty threshold is... Based on the validation set, the typical value for this implementation is 0.5.
[0120] Following steps S1 to S6 above, this application constructs a gene regulation graph using transcription factor-target gene regulatory relationships. Combined with uncertainty quantification, the gene regulation graph topology is used as a structural constraint for the graph attention network. This application further establishes a complete automated cell type annotation process through gene regulation graph constraints, pseudo-temporal sequencing, fusion of four cell feature types, and uncertainty rejection options.
[0121] It is worth mentioning that the model training in this application adopts a two-stage strategy: Phase 1 (Pre-training): Pre-training is performed on a large-scale reference dataset (such as selected labeled data from Human Cell Atlas) using the Adam optimizer with an initial learning rate of 1e-3, cosine annealing scheduling, for 50 epochs, with a batch size of 512. Phase 2 (Fine-tuning): Fine-tuning is performed on the target dataset. The parameters of the first two layers of the graph attention network are frozen, and only the last layer GAT, the temporal module, and the classifier are fine-tuned. The learning rate is reduced to 1e-4, and training is performed for 20 epochs with a batch size of 256. An early stopping strategy (patience=5) is adopted, and model selection is based on the validation set F1 score.
[0122] Data augmentation strategies include: (a) Random Gene Masking: Gene expression values are randomly set to zero with a 10% probability to simulate the dropout effect; (b) Expression perturbation: Gaussian noise N(0, 0.1^2) is added to the expression values; (c) Subgraph Sampling: Randomly sample subgraphs for training to enhance the ability to capture local regulatory patterns.
[0123] Real data input and specific implementation examples This embodiment uses real cell type labels that correspond one-to-one with the cell barcodes in the expression matrix, real SCENIC regulatory edge files, and KEGG mouse pathway member files to illustrate the feasible process of this invention from input standardization, gene regulation map construction to classification and uncertainty output.
[0124] After the expression matrix was aligned with cell barcodes, 8203 cells and 5 real cell type labels were obtained. If the same Ensembl gene label appeared repeatedly in the expression matrix, its original cell count was summed before normalization, and the duplicate label and processing rules were recorded in the standardization report.
[0125] Implementation Result 1 (Label Alignment): Pre-screening showed that all 8203 cells were barcode aligned with the actual cell type labels, covering a total of 5 cell types. This result indicates that the expression matrix and label files can form a one-to-one correspondence for real-world supervisory input at the cell level.
[0126] The original SCENIC results contained 166,488 transcription factor-target gene relationships, of which 51,779 relationships had a highConfAnnot value of TRUE. After unique gene identifier mapping, expression matrix intersection screening, missing weight removal, and merging of duplicate relationships, 42,912 unique high-confidence regulatory edges were obtained; each edge retained its normalized regulatory edge weight and its physical meaning.
[0127] Implementation Result 2 (Construction of the Regulation Graph): After high-confidence screening and unique mapping, 42,912 unique regulation edges were formed, each retaining its normalized weight and physical meaning description. This result shows that the original SCENIC relations can be transformed into a sparse directed graph with well-defined scale and traceable weights, which can serve as a true topological input for graph attention networks.
[0128] KEGG mouse pathway data, after Entrez-Ensembl mapping, resulted in 301 pathways, 6226 genes within the expression matrix, and 23666 pathway-gene membership relationships. Tags, regulatory edges, and pathway membership relationships were saved as separate tab-delimited files and aligned with the expression matrix using cell barcodes or Ensembl gene identifiers.
[0129] Implementation Result 3 (Pathway Mapping): After label transformation, 301 mouse KEGG pathways were formed, covering 6226 genes within the expression matrix and 23666 pathway-gene membership relationships. This result indicates that pathway membership relationships can be effectively linked to the expression matrix, forming a real membership set that can be used for pathway feature aggregation.
[0130] The formal input mode of the program requires the simultaneous provision of real label files, real SCENIC regulatory edge files, and real KEGG pathway member files; if any file is missing, fields are mismatched, or identifiers are misaligned, an error will be reported and the program will terminate immediately. Random labels, cluster pseudo-labels, random graphs, or simulated pathways will not be used as substitutes. The pre-check only verifies fields, row counts, uniqueness, and identifier intersections; it does not perform model training or performance evaluation.
[0131] Implementation Result 4 (Input Pre-check): The three types of files—real labels, SCENIC control edges, and KEGG pathway members—passed the pre-check in terms of field completeness, number of rows, uniqueness, and identifier intersection, and can proceed to the processing flow described in steps S1 to S6; the entire pre-check process did not use random labels, cluster pseudo-labels, random graphs, or simulated pathways.
[0132] After the input pre-detection is completed, the low-dimensional principal component embedding, gene regulation map, gene regulation sensing cell embedding, pathway sensing cell embedding, temporal enhancement cell embedding and fusion features are generated sequentially according to steps S1 to S6. The classifier outputs the type probability of each cell, the Monte Carlo Dropout module further outputs the prediction entropy, and outputs the specific type or "undetermined" label according to the threshold.
[0133] In conclusion, this embodiment successfully prepared, aligned, and pre-detected true labels, true regulatory edges, and true KEGG pathway membership relationships. These results demonstrate that these inputs can enter the processing flow described in steps S1 to S6 via the specified interface, providing a true and traceable data foundation for the subsequent output of cell type probabilities and uncertainty markers.
[0134] The above embodiments provide input files, field physical meanings, identifier conversions, actual data scale, model processing steps, main parameters, and output rules, enabling those skilled in the art to prepare inputs and implement the present invention according to the described process.
[0135] Example 2: A single-cell intelligent and precise annotation system for regulating temporal fusion This second embodiment provides a single-cell intelligent and precise annotation system for regulating temporal fusion. Please refer to... Figure 6 The single-cell intelligent precision annotation method for regulating temporal fusion includes: The data input and preprocessing unit receives the raw single-cell gene expression matrix, performs data preprocessing, selects highly variable genes for principal component analysis, and obtains a low-dimensional principal component embedding matrix. The regulation graph construction unit reads the regulation relationship between transcription factors and target genes based on the output results of SCENIC, completes the unified mapping from gene symbols to Ensembl identifiers, and obtains a set of directed regulatory edges; the normalized regulatory edge weight is determined for each directed regulatory edge in the set of directed regulatory edges, and a gene regulation graph is constructed. The graph attention network encoding unit uses a sparsed gene regulation graph as the topology and the gene expression values of each cell as the initial features of the nodes to build a multi-layer graph attention network to generate gene regulation sensing cell embeddings for each cell. The temporal awareness unit uses diffusion mapping to calculate the pseudo-temporal order of cells, sorts the cells, and uses a one-dimensional causal convolutional network to model cell features along the pseudo-temporal axis. After completing the temporal feature calculation, the original order of cells is restored to obtain the temporally enhanced cell embedding. A multi-scale feature fusion unit integrates four types of cell features, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and low-dimensional principal component embedding; based on a gated fusion mechanism, the four types of cell features are spliced together to obtain the fused cell features; the fused features are input into a multilayer perceptron classifier containing two hidden layers to obtain the cell type probability distribution. The uncertainty estimation unit uses Monte Carlo Dropout for uncertainty estimation, calculating the average prediction probability and prediction entropy after T forward propagations; an uncertainty threshold is set; if the prediction entropy is less than or equal to the uncertainty threshold, the class with the highest average prediction probability is selected as the cell. The final note: If the predicted entropy is greater than the uncertainty threshold, the cell is marked as undetermined.
[0136] The specific implementation methods of the above six functional units correspond to steps S1 to S6 of Embodiment 1, and the specific implementation methods will not be described in detail here.
[0137] Example 3: An electronic device and a readable storage medium This embodiment also provides an electronic device and a readable storage medium.
[0138] Figure 7 A schematic block diagram of an example electronic device that can be used to implement embodiments of this application 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0139] like Figure 7 As shown, the device includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM can also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0140] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0141] The computing unit can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing units include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit performs the various methods and processes described above, such as the single-cell intelligent precise annotation method for regulating timing fusion described in Embodiment 1. For example, in some embodiments, the single-cell intelligent precise annotation method for regulating timing fusion can be implemented as a computer software program tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the computing unit, one or more steps of the single-cell intelligent precise annotation method for regulating timing fusion described above can be performed. Alternatively, in other embodiments, the computing unit can be configured to perform the single-cell intelligent precise annotation method for regulating timing fusion by any other suitable means (e.g., by means of firmware).
[0142] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0143] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0144] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0146] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0147] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0148] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0149] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0150] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A single-cell intelligent and precise annotation method for regulating temporal fusion, characterized in that, Includes the following steps: S1 receives the original single-cell gene expression matrix, performs data preprocessing, selects highly variable genes for principal component analysis, and obtains a low-dimensional principal component embedding matrix. S2. Based on the output of SCENIC, read the regulatory relationship between transcription factors and target genes, complete the unified mapping from gene symbols to Ensembl identifiers, and obtain a set of directed regulatory edges; determine the normalized regulatory edge weight for each directed regulatory edge in the set of directed regulatory edges, and construct a gene regulation graph. S3 uses the gene regulation graph as the topology and the gene expression values of each cell as the initial features of the nodes to build a multi-layer graph attention network to generate gene regulation perception cell embedding for each cell. S4 uses diffusion mapping to calculate the pseudo-temporal order of cells, sorts the cells, and uses a one-dimensional causal convolutional network to model cell features along the pseudo-temporal axis. After completing the temporal feature calculation, the original cell sequence is restored to obtain the temporally enhanced cell embedding. S5 integrates four types of cellular features, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and low-dimensional principal component embedding. Based on the gating fusion mechanism, the four types of cell features are spliced together to obtain the cell fusion feature; the fusion feature is then input into a multilayer perceptron classifier containing two hidden layers to obtain the cell type probability distribution. S6. Monte Carlo Dropout is used for uncertainty estimation. The average prediction probability and prediction entropy of T forward propagations are calculated. An uncertainty threshold is set. If the prediction entropy is less than or equal to the uncertainty threshold, the class with the highest average prediction probability is used as the final annotation for cell i. If the prediction entropy is greater than the uncertainty threshold, the cell is marked as undetermined.
2. The single-cell intelligent and precise annotation method for regulating temporal fusion according to claim 1, characterized in that, Step S1 includes the following steps: S1.1: Receive the original single-cell gene expression matrix Where n is the number of cells and m is the number of genes; the original single-cell gene expression matrix Quality control measures are implemented to remove at least one of the following: low-quality cells and rare genes. S1.2: Normalize the single-cell gene expression matrix after quality control; S1.3: Select highly variable genes as a feature subset; Calculate the mean and variance of gene g in n cells; in, The mean value of gene g in n cells; This represents the number of cells; Represents cells Normalized expression level of gene g after SCTransform treatment; The variance of gene g is represented in n cells; This represents the mean offset; Represents the variance offset; Divide the range of the logarithm of the mean into multiple equally wide intervals to construct the logarithmic mean variable and the logarithmic variance variable as follows: After removing empty intervals containing no genes, the remaining K intervals are arranged in ascending order of their center values; the center value of the k-th non-empty interval is denoted as ā. k All within this interval The arithmetic mean is denoted as k ; For any value 'a' between the centers of adjacent intervals, the mean-variance trend function 'f' is used for piecewise linear interpolation according to the following formula: when When it is not greater than the center of the first interval, Take the first interval Mean; when When it is not less than the center of the last interval, Take the last interval Mean; Selected from highest to lowest dispersion score One gene; The method for calculating the dispersion score is as follows: in, This represents the dispersion score.
3. The single-cell intelligent and precise annotation method for regulating temporal fusion according to claim 1, characterized in that, Step S2 includes the following steps: S2.1: Read the transcription factor-target gene regulatory relationships from the SCENIC analysis results of the samples to be annotated, and retain only the high-confidence relationships; S2.2: For each directed control edge in the set of directed control edges EGRN Determine the normalized control edge weights; the calculation method for the control edge weights is as follows: in, CoexWeight is the co-expression weight output by the SCENIC analysis results; Represents transcription factor nodes; Indicates the target gene node; Represents the directed control edge Normalized adjustment edge weights; S2.3: Constructing a gene regulation map ;in, The Ensembl gene node set that participates in the construction of the gene regulation map in the single-cell gene expression matrix; It is a set of directed control edges; The normalized control edge weights; S2.4: The gene regulation map Perform sparsification.
4. The single-cell intelligent and precise annotation method for regulating temporal fusion according to claim 1, characterized in that, Step S3 includes the following steps: S3.1: Construct a multi-layer graph attention network; for each cell, use the gene regulation graph as the topology and the expression values of each gene in the cell as the initial features of the nodes; S3.2: Employ a multi-head attention mechanism, where the q-th attention head uses independent parameters. and The aggregation results of each attention head are then spliced together. ; Where q∈{1,…,H} is the attention head index; σ represents the nonlinear activation function; N(i) is the set of neighbors of node i; This represents concatenating the outputs of H attention heads along the feature dimension; S3.3: Stack multiple graph attention layers, with residual connections and layer normalization between each layer; S3.4: After L-layer graph attention encoding, for each cell, the gene nodes j Context-aware features are obtained; then attention pooling is performed on all gene node features of the cell to obtain the gene regulation-aware cell embedding of the cell.
5. The single-cell intelligent and precise annotation method for regulating temporal fusion according to claim 1, characterized in that, Step S4 includes the following steps: S4.1: Use diffusion mapping to calculate pseudo-temporal ordering of cells; Construct a Gaussian kernel similarity matrix between cells based on a low-dimensional principal component embedding matrix; in, and These are the i-th and j-th rows of the low-dimensional principal component embedding matrix Z, respectively, representing the low-dimensional principal component embeddings of cell i and cell j. For diffusion mapping kernel bandwidth; Then, the intercellular Gaussian kernel similarity matrix was analyzed. Perform eigenvalue decomposition and take the first few features. A non-trivial eigenvector is used to construct the diffusion coordinates; S4.2: Sort cells using the first nontrivial eigenvector of the diffusion coordinates as the initial estimate of the pseudo-time axis; S4.3: Construct time-aware architecture by using a one-dimensional causal convolutional network to model cell features along a pseudo-time axis; Arrange the cells according to the pseudo-time order, let ,in For the sorted number Cell index corresponding to each location For the gene regulation sensing cell embedding of this cell; the first The output of the layer causal convolution is: in, Position for pseudo-time sorting; Index for causal convolutional layers; The kernel size; S4.4: Stack three causal convolutional layers, each followed by a gated linear unit and a residual connection; after restoring the original cell order, the cells are obtained. Temporal enhancement of cell embedding.
6. The single-cell intelligent and precise annotation method for regulating temporal fusion according to claim 5, characterized in that, Step S5 includes the following steps: S5.1: For each cell i, integrate the following four complementary cell feature representations, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and temporal enhancement cell embedding. S5.2: A gated fusion mechanism is used to integrate the above four types of cell features. First, the various cell features are projected onto a preset dimension, and then a splicing vector is constructed. and gate vector To obtain cell fusion characteristics ; S5.3: The fusion feature The input is a multilayer perceptron classifier with two hidden layers; the output layer produces C class scores. Cells were obtained via Softmax. Cell type probability distribution : in, Cell i belongs to category The predicted probability; S5.4: The classifier is trained using label-smooth cross-entropy loss; for cells... and categories The smoothed target value and training loss are: in, C represents the number of training cells; C represents the total number of cell types. For training cell indexing; Indexed by category; The c-th component is the one-hot encoded real label; To predict probabilities; This is the label smoothing factor.
7. The single-cell intelligent and precise annotation method for regulating temporal fusion according to claim 6, characterized in that, Step S6 includes the following steps: S6.1: Uncertainty estimation is performed using Monte Carlo Dropout; During the inference phase, keep Dropout enabled in the S5.3 multilayer perceptron classifier for the same cell. Perform T forward propagations; For sampling sequence number, the first The first forward propagation yielded the... Class probability is denoted as ; S6.2: Calculate the average prediction probability and prediction entropy after T forward propagations: in, Represents cells Belongs to the The average predicted probability of class T times; T is the number of Monte Carlo Dropout samples; For cell type indexing; Total number of cell types; For cells Predicted entropy; S6.3: Set an uncertainty threshold If the predicted entropy is less than or equal to the uncertainty threshold, then the category with the highest average predicted probability is taken as the cell. The final annotation: If the predicted entropy is greater than the uncertainty threshold, the specific cell type will not be output, and the cell will be marked as undetermined.
8. A single-cell intelligent precision annotation system for regulating temporal fusion, characterized in that, include: The data input and preprocessing unit receives the raw single-cell gene expression matrix, performs data preprocessing, selects highly variable genes for principal component analysis, and obtains a low-dimensional principal component embedding matrix. The regulation graph construction unit reads the regulation relationship between transcription factors and target genes based on the output results of SCENIC, completes the unified mapping from gene symbols to Ensembl identifiers, and obtains a set of directed regulatory edges; the normalized regulatory edge weight is determined for each directed regulatory edge in the set of directed regulatory edges, and a gene regulation graph is constructed. The graph attention network encoding unit uses a sparsed gene regulation graph as the topology and the gene expression values of each cell as the initial features of the nodes to build a multi-layer graph attention network to generate gene regulation sensing cell embeddings for each cell. The temporal awareness unit uses diffusion mapping to calculate the pseudo-temporal order of cells, sorts the cells, and uses a one-dimensional causal convolutional network to model cell features along the pseudo-temporal axis. After completing the temporal feature calculation, the original cell sequence is restored to obtain the temporally enhanced cell embedding. The multi-scale feature fusion unit integrates four types of cellular features, including: gene regulation sensing cell embedding, pathway sensing cell embedding, low-dimensional principal component embedding, and low-dimensional principal component embedding. Based on the gated fusion mechanism, the four types of cell features are spliced together to obtain the fused cell features; the fused features are then input into a multilayer perceptron classifier containing two hidden layers to obtain the cell type probability distribution. The uncertainty estimation unit uses Monte Carlo Dropout for uncertainty estimation, calculating the average prediction probability and prediction entropy after T forward propagations; an uncertainty threshold is set; if the prediction entropy is less than or equal to the uncertainty threshold, the class with the highest average prediction probability is selected as the cell. The final note: If the predicted entropy is greater than the uncertainty threshold, the cell is marked as undetermined.
9. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.