Single cell type identification method and system and storage medium

By combining the FFT module and the improved Transformer encoding module, the single-cell type recognition model solves the problems of context information loss and noise sensitivity in single-cell type recognition by autoencoders, and achieves higher accuracy in single-cell type recognition.

CN120408409APending Publication Date: 2025-08-01HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510522068.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Existing single-cell type recognition methods suffer from poor recognition accuracy due to over-reliance on dimensionality-reduced data representation during autoencoder training, neglect of contextual information, low noise sensitivity, and limited generalization ability.

Method used

A single-cell type identification model is adopted, including an FFT module, an improved Transformer encoding module, and a classifier. It combines Fast Fourier Transform and multi-head attention mechanism, and performs preprocessing and feature extraction through linear discriminant analysis to enhance the expressive power of the original data.

Benefits of technology

It improves the accuracy and generalization ability of single-cell type recognition, better preserves the expressive information of the data, reduces training complexity, and enhances recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408409A_ABST
    Figure CN120408409A_ABST
Patent Text Reader

Abstract

The invention discloses a single cell type identification method and system and a storage medium. The method comprises the following steps: acquiring matrix data of a single cell to be identified; inputting the matrix data of the to-be-identified single cells into the trained single cell type identification model for identification to obtain a classification result of the to-be-identified single cells; a single cell type recognition model adopted by the method comprises an FFT module, an improved Transform coding module and a classifier which are connected in sequence, more comprehensive expression information can be reserved in the feature extraction and training stage, meanwhile, the modeling capacity for potential feature content of original data is enhanced, and therefore higher-precision recognition is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of single-cell type recognition, and particularly relates to a single-cell type recognition method, system and storage medium. Background Art

[0002] Cell type recognition is one of the key tasks in the fields of bioinformatics and computational biology. Its core goal is to accurately classify and functionally annotate cell populations by analyzing the gene expression profiles, surface markers, morphological features, and other biomarkers of cells, with the help of high-throughput sequencing and imaging technologies. This process not only provides an important basis for revealing cell heterogeneity, tissue function regulation mechanisms, and developmental biology laws, but also opens up new paths for disease diagnosis, drug target discovery, and regenerative medicine research. In recent years, with the breakthrough progress of single-cell RNA sequencing (scRNA-seq) technology and the automated analysis framework combined with deep learning algorithms, unprecedented opportunities have been brought to cell type recognition technology.

[0003] Currently, the mainstream cell type recognition methods usually rely on unsupervised or semi-supervised learning frameworks. Among them, autoencoders (AE) and their variants (such as variational autoencoders VAE, denoising autoencoders DAE, etc.) are widely used for dimensionality reduction and feature extraction of single-cell data. However, although these methods have improved the computational efficiency to a certain extent, there are still some problems: (1) The training of autoencoders overly depends on the data representation after dimensionality reduction, ignoring the rich context information contained in the data during the training process; (2) Technical noise is prevalent in scRNA-seq data, and autoencoders may overfit these noise signals during training rather than the true cell type features; (3) Since autoencoders usually adopt a fixed encoding-decoding structure, they may perform poorly in cross-dataset or cross-species cell type recognition tasks, especially when there are significant differences between the target data and the training data distributions.

[0004] In summary, due to problems such as loss of context information, low noise sensitivity, and limited generalization ability in the autoencoders used in current cell type recognition methods, the recognition accuracy of cell types is poor. Summary of the Invention

[0005] The purpose of the present invention is to provide a single-cell type recognition method, system and storage medium. This method performs recognition through a single-cell type recognition model to obtain the classification result of the single cell to be recognized. The single-cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence, which can improve the accuracy of single-cell type recognition.

[0006] To achieve the above purpose, the present invention is implemented by adopting the following technical solutions:

[0007] In a first aspect, the present invention provides a single-cell type recognition method, including:

[0008] Obtaining matrix data of a single cell to be recognized;

[0009] Inputting the matrix data of the single cell to be recognized into a trained single-cell type recognition model for recognition to obtain a classification result of the single cell to be recognized; wherein the single-cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence.

[0010] Optionally, before inputting the matrix data of the single cell to be recognized into the trained single-cell type recognition model, it further includes preprocessing:

[0011] Performing normalization processing on the matrix data of the single cell to be recognized to obtain normalized matrix data of the single cell;

[0012] Performing dimensionality reduction on the normalized matrix data of the single cell by using linear discriminant analysis method to obtain dimensionality-reduced matrix data;

[0013] Determining a fixed increment based on the minimum value of the elements in the dimensionality-reduced matrix data;

[0014] Performing numerical translation on the dimensionality-reduced matrix data according to the fixed increment to obtain preprocessed single-cell data.

[0015] Optionally, the FFT module includes an FFT encoding layer, a weighted gating layer, an IFFT decoding layer, a first normalization layer, a first feed-forward network layer, and a second normalization module connected in sequence;

[0016] The FFT encoding layer is used to receive the preprocessed single-cell data and perform fast Fourier transform on it to obtain single-cell frequency domain data;

[0017] The weighted gating layer is used to perform weighted adaptive adjustment on the single-cell frequency domain data to obtain weighted frequency domain data;

[0018] The IFFT decoding layer is used to perform inverse fast Fourier transform on the weighted frequency domain data to obtain single-cell time domain data;

[0019] The first normalization layer is used to receive the single-cell time domain data and perform normalization processing to obtain the output data of the first normalization layer;

[0020] The first feed-forward network layer is used to perform non-linear transformation on the output data of the first normalization layer by using the GELU activation function to obtain the output result of the first feed-forward network layer;

[0021] The second normalization layer is used to obtain the output result of the first feed-forward network layer and perform normalization processing to obtain the output data of the FFT module.

[0022] Optionally, the improved Transformer encoding module includes a multi-head attention mechanism layer, a third normalization layer, a two-dimensional attention feed-forward network layer, and a fourth normalization layer connected in sequence;

[0023] The multi-head attention mechanism layer includes multiple single-head attention mechanism layers with parallel outputs, and is used to splice the scaled dot-product attentions output by the multiple single-head attention mechanism layers to obtain the output data of the multi-head attention mechanism layer;

[0024] The third normalization layer is used to perform weighted residual connection on the input data and output data of the multi-head attention mechanism layer, and normalize the result of the weighted residual connection to obtain the output data of the third normalization layer;

[0025] The two-dimensional attention feed-forward network layer is used to extract local and global information features from the output data of the third normalization layer to obtain the output data of the two-dimensional attention feed-forward network layer;

[0026] The fourth normalization layer is used to perform weighted residual connection on the input data and output data of the two-dimensional attention feed-forward network layer, and normalize the result of the weighted residual connection to obtain the output data of the fourth normalization layer.

[0027] Optionally, the single-head attention layer is used to calculate Query, Key, and Value matrices based on the rotation position encoding matrix and the output data of the FFT module, and calculate the scaled dot-product attention according to the Query, Key, and Value matrices; the calculation formulas for the Query, Key, and Value matrices are as follows:

[0028]

[0029]

[0030] Among them, Q, K, and V respectively represent the Query, Key, and Value matrices; X represents the input matrix, which is equivalent to the output data of the FFT module; respectively represent the weight matrices of Q, K, and V; represents the rotation position encoding matrix, d is the dimension of the input matrix X, and m represents the selected position of Q, K, or V. 。

[0031] Optionally, the two-dimensional attention feed-forward network layer includes a second feed-forward network layer, a first branch and a second branch connected to the second feed-forward network layer, a third branch connected to the first branch, and a fourth branch connected to the first branch and the second branch; the first branch includes a pooling layer, a first fully connected layer, and a gated activation function layer connected in sequence, and the second branch includes a second fully connected layer and a gated activation function layer connected in sequence; the third branch includes a third fully connected layer and a Sigmoid function layer connected in sequence; the fourth branch includes a fourth fully connected layer and a Sigmoid function layer connected in sequence;

[0032] The second feed-forward network layer is used to perform a non-linear transformation on the output data of the third normalization layer using the GELU activation function to obtain the output data of the second feed-forward network layer;

[0033] The first branch is used to perform average pooling, fully connected, and gated activation operations on the output data of the second feed-forward network layer in sequence to obtain a feature representation of global information;

[0034] The second branch is used to perform fully connected and gated activation operations on the output data of the second feed-forward network layer in sequence to obtain a feature representation of local information;

[0035] The third branch is used to perform a fully connected operation on the feature representation of global information and extract attention features using the Sigmoid function to obtain the output data of the third branch;

[0036] The fourth branch is used to receive the concatenation result of the feature representation of global information and the feature representation of local information, perform a fully connected operation on the concatenation result, and extract attention features using the Sigmoid function to obtain the output data of the fourth branch;

[0037] Multiply the output data of the third branch and the fourth branch to obtain an output result F1, and perform a weighted residual link on the output result F1 and the output data of the second feed-forward network layer to obtain the output data of the two-dimensional attention feed-forward network layer.

[0038] Optionally, the training method of the single-cell type recognition model includes:

[0039] Obtain a matrix dataset of single cells;

[0040] Preprocess the matrix dataset of single cells to obtain a preprocessed matrix dataset of single cells;

[0041] Input the preprocessed matrix dataset of single cells into the FFT module for training to obtain the optimal parameters of the FFT module;

[0042] Determine the trained FFT module based on the optimal parameters of the FFT module;

[0043] Input the matrix dataset of single cells into the trained FFT module to generate a training set;

[0044] Input the training set into the improved Transformer encoding module for training to obtain the optimal parameters of the improved Transformer encoding module;

[0045] Based on the optimal parameters of the improved Transformer encoding module, determine the trained improved Transformer encoding module;

[0046] Input the training set into the trained single cell type recognition model to obtain a classified training set;

[0047] Input the classified training set into the classifier for training to obtain the optimal parameters of the classifier, and determine the trained classifier based on the optimal parameters of the classifier;

[0048] According to the trained FFT module, the trained improved Transformer encoding module, and the trained classifier, obtain the trained single cell type recognition model.

[0049] In a second aspect, the present invention provides a single cell type recognition system, including:

[0050] A data acquisition module for acquiring the matrix data of the single cell to be recognized;

[0051] A recognition module for inputting the matrix data of the single cell to be recognized into the trained single cell type recognition model for recognition to obtain the classification result of the single cell to be recognized; wherein the single cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence.

[0052] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed, it implements the single cell type recognition method described in the first aspect.

[0053] Compared with the prior art, the beneficial effects achieved by the present invention:

[0054] The present invention provides a single cell type recognition method, system, and storage medium. This method inputs the matrix data of the single cell to be recognized into the trained single cell type recognition model for recognition to obtain the classification result of the single cell to be recognized; the single cell type recognition model adopted by this method includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence, which can retain more comprehensive expression information during the feature extraction and training stages, and at the same time strengthen the modeling ability of the potential feature content of the original data, thereby achieving higher-precision recognition.

[0055] The present invention provides a single-cell type recognition method, system, and storage medium. In the preprocessing process of this method, linear discriminant analysis is used to reduce the dimension of the original data. Compared with the existing preprocessing method of directly extracting highly variable genes, it can simultaneously pay attention to the characteristic information of both highly variable genes and non-highly variable genes in the input single-cell data.

[0056] The present invention provides a single-cell type recognition method, system, and storage medium. This method uses an FFT module to perform preliminary feature extraction and training on the input data, and can learn the potential features of single-cell data from the perspective of the frequency domain space, making the later recognition more accurate.

[0057] The present invention provides a single-cell type recognition method, system, and storage medium. This method is based on a Transformer encoding module, and relative position encoding and kernel function approximation calculation operations are added to the original multi-head attention mechanism layer. It can take into account the relative position encoding information of the data when the model calculates the attention weights, and effectively improve the training effect of the model while reducing the time complexity of training.

[0058] The original feed-forward network layer is improved to a two-dimensional attention feed-forward network layer, and a feed-forward layer enhanced based on global information and local information is added, so as to be able to further process the data from different angles and enhance the expression ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 The figure shows a schematic flowchart of a single-cell type recognition method in an embodiment of the present invention;

[0060] Figure 2 The figure shows a schematic structural diagram of a single-cell type recognition model in an embodiment of the present invention;

[0061] Figure 3 The figure shows a schematic structural diagram of an FFT module in an embodiment of the present invention;

[0062] Figure 4 The figure shows a schematic structural diagram of an improved Transformer encoding module in an embodiment of the present invention;

[0063] Figure 5 The figure shows a schematic diagram of the single-head attention output process in the multi-head attention mechanism layer in an embodiment of the present invention;

[0064] Figure 6 The figure shows a schematic structural diagram of a two-dimensional attention feed-forward network layer in an embodiment of the present invention;

[0065] Figure 7 The figure shows a schematic flowchart of the training process of a single-cell type recognition model in an embodiment of the present invention;

[0066] Figure 8 The figure shows a schematic diagram of the cell number information in the experimental dataset in an embodiment of the present invention;

[0067] Figure 9 The figure shows a schematic diagram of the gene number information in the experimental dataset in an embodiment of the present invention;

[0068] Figure 10 The figure shows a schematic diagram of the cell type number information in the experimental dataset in an embodiment of the present invention;

[0069] Figure 11 The figure shows an experimental comparison diagram of AE and the recognition model for human bladder cells in an embodiment of the present invention;

[0070] Figure 12 The figure shows an experimental comparison diagram of AE and the recognition model for human kidney cells in an embodiment of the present invention;

[0071] Figure 13 The figure shows an experimental comparison diagram of AE and the recognition model for human fetal pancreatic cells in an embodiment of the present invention;

[0072] Figure 14 The figure shows an experimental comparison diagram of AE and the recognition model for mouse bladder cells in an embodiment of the present invention;

[0073] Figure 15 The figure shows an experimental comparison diagram of AE and the recognition model for mouse visceral cells in an embodiment of the present invention;

[0074] Figure 16 The figure shows an experimental comparison diagram of AE and the recognition model for mouse spleen cells in an embodiment of the present invention. Detailed implementation manners

[0075] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the protection scope of the present invention.

[0076] Embodiment 1

[0077] As Figure 1 shown, an embodiment of the present invention introduces a single cell type recognition method, including the following steps:

[0078] S1: Obtain the matrix data of the single cell to be recognized;

[0079] S2: Input the matrix data of the single cell to be recognized into the trained single cell type recognition model for recognition to obtain the classification result of the single cell to be recognized; wherein the single cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence.

[0080] Specifically, the structure of the single cell type recognition model is as Figure 2 shown;

[0081] A single cell type recognition method provided in this embodiment uses a single cell type recognition model for recognition, wherein the single cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence, which improves the recognition accuracy and has better generalization ability.

[0082] In this embodiment, before inputting the matrix data of the single cell to be recognized into the trained single cell type recognition model in step S2, preprocessing is further included, and the steps are as follows:

[0083] S21: Standardize the matrix data of the single cell to be recognized to obtain the standardized matrix data of the single cell;

[0084] S22: Use the Linear Discriminant Analysis (LDA) method to reduce the dimension of the standardized matrix data of the single cell to obtain the matrix data after dimension reduction;

[0085] S23: To meet the requirement of non-negativity of the input data for the subsequent model, determine a fixed increment based on the minimum value of the elements in the matrix data after dimension reduction;

[0086] S24: Perform numerical translation on the matrix data after dimension reduction according to the fixed increment, that is, perform numerical translation by adding the fixed increment to each element in the matrix data after dimension reduction to obtain the preprocessed single cell data.

[0087] In this embodiment, the FFT module in the single cell type recognition model includes an FFT encoding layer, a weighted gating layer, an IFFT decoding layer, a first normalization layer, a first feedforward network layer, and a second normalization module connected in sequence;

[0088] The FFT encoding layer is used to receive the preprocessed single cell data and perform a fast Fourier transform on it to obtain the single cell frequency domain data;

[0089] The weighted gating layer is used to perform weighted adaptive adjustment on the single cell frequency domain data to obtain the weighted frequency domain data;

[0090] The IFFT decoding layer is used to perform an inverse fast Fourier transform on the weighted frequency domain data to obtain the single cell time domain data;

[0091] The first normalization layer is used to receive single-cell time-domain data and perform normalization processing to obtain the output data of the first normalization layer;

[0092] The first feed-forward network layer is used to perform a non-linear transformation on the output data of the first normalization layer by using the GELU activation function to obtain the output result of the first feed-forward network layer;

[0093] The second normalization layer is used for the output result of the first feed-forward network layer and performs normalization processing to obtain the output data of the FFT module.

[0094] As Figure 3 shown, the preprocessed single-cell data is first encoded by fast Fourier transform (FFT), and then decoded by inverse fast Fourier transform (IFFT). The middle hidden layer, i.e., the weighted gated layer, uses randomly initialized parameters as the trainable parameters of this module. The data decoded by the inverse fast Fourier transform (IFFT), i.e., the single-cell time-domain data, is successively passed through the first normalization, further activation by the feed-forward network, and the second normalization to obtain the output data of the FFT module; where the feed-forward network layer here uses the GELU activation function as the activation part of the linear transformation layer. This function can effectively retain feature information when processing frequency-domain space data and ensure a stable gradient during training, while using ReLU will cause information loss. Therefore, it is more suitable for processing single-cell data compared with commonly used activation functions such as ReLU;

[0095] In this embodiment, the improved Transformer encoding module in the single-cell type recognition model includes a multi-head attention mechanism layer, a third normalization layer, a two-dimensional attention feed-forward network layer, and a fourth normalization layer connected in sequence;

[0096] The multi-head attention mechanism layer includes multiple single-head attention mechanism layers with parallel outputs, and is used to splice the scaled dot-product attentions output by the multiple single-head attention mechanism layers to obtain the output data of the multi-head attention mechanism layer;

[0097] The third normalization layer is used to perform weighted residual connection on the input data and output data of the multi-head attention mechanism layer, and normalize the result of the weighted residual connection to obtain the output data of the third normalization layer;

[0098] The two-dimensional attention feed-forward network layer is used to extract local and global information features from the output data of the third normalization layer to obtain the output data of the two-dimensional attention feed-forward network layer;

[0099] The fourth normalization layer is used to perform weighted residual connection on the input data and output data of the two-dimensional attention feed-forward network layer, and normalize the result of the weighted residual connection to obtain the output data of the fourth normalization layer.

[0100] Specifically, as Figure 4 shown, the output data of the input FFT module is further trained through the multi-head attention mechanism layer and the two-dimensional attention feed-forward module respectively. Among them, learnable training parameters are used to implement the original residual operation function, and a normalization operation is added at an appropriate position.

[0101] Specifically, the schematic diagram of the single-head attention output process in the multi-head attention mechanism layer is as Figure 5 shown.

[0102] The single-head attention layer is used to calculate the Query, Key, and Value matrices based on the rotation position encoding matrix and the output data of the FFT module, and calculate the scaled dot-product attention according to the Query, Key, and Value matrices;

[0103] Specifically, the rotation position encoding matrix and Q, K are multiplied in the part of calculating the attention score, so that the model accommodates relative position information during the training process, thereby improving performance; thus, the calculation formulas for the Query, Key, and Value matrices are as follows:

[0104]

[0105]

[0106] Among them, Q, K, and V represent the Query, Key, and Value matrices respectively; X represents the input matrix, which is equivalent to the output data of the FFT module; represent the weight matrices of Q, K, and V respectively; represents the rotation position encoding matrix, d is the dimension of the input matrix X, and m represents the position of the selected Q, K, or V. .

[0107] After multiplying with the rotation position encoding matrix, the original SoftMax operation is implemented using the kernel function approximation parameter operation, thereby reducing the training complexity;

[0108] The approximation parameter operation can be expressed as:

[0109]

[0110]

[0111] Among them, is when x represents Q The value of when x represents K ; x can be substituted into either the Query or Key matrix; p is a positive constant; W is the product of x and a random orthogonal matrix, and c is the dimension of matrix W. Here, the random orthogonal matrix can reduce the dimension of the original input while preserving the corresponding features.

[0112] Based on the above steps, the calculation process of single-head attention can be expressed by the following formula:

[0113]

[0114] where represents single-head attention.

[0115] In this embodiment, as Figure 6 shown, the two-dimensional attention feed-forward network layer in the Transformer encoding module includes a second feed-forward network layer, a first branch and a second branch connected to the second feed-forward network layer, a third branch connected to the first branch, and a fourth branch connected to the first and second branches; the first branch includes a pooling layer, a first fully connected layer, and a gated activation function layer connected in sequence, the second branch includes a second fully connected layer and a gated activation function layer connected in sequence; the third branch includes a third fully connected layer and a Sigmoid function layer connected in sequence; the fourth branch includes a fourth fully connected layer and a Sigmoid function layer connected in sequence;

[0116] The second feed-forward network layer is used to perform a non-linear transformation on the output data of the third normalization layer using the GELU activation function to obtain the output data of the second feed-forward network layer;

[0117] The first branch is used to perform average pooling, full connection, and gated activation operations on the output data of the second feed-forward network layer in sequence to obtain a feature representation of global information;

[0118] The second branch is used to perform full connection and gated activation operations on the output data of the second feed-forward network layer in sequence to obtain a feature representation of local information;

[0119] The third branch is used to perform a full connection operation on the feature representation of global information and extract attention features using the Sigmoid function to obtain the output data of the third branch;

[0120] The fourth branch is used to receive the concatenation result of the feature representation of global information and the feature representation of local information, perform a full connection operation on the concatenation result, and extract attention features using the Sigmoid function to obtain the output data of the fourth branch;

[0121] Multiply the output data of the third branch and the fourth branch to obtain the output result F1, and perform a weighted residual link on the output result F1 and the output data of the second feedforward network layer to obtain the output data of the two-dimensional attention feedforward network layer.

[0122] Specifically, the gated activation function layers in the first branch and the second branch both use GELU as the gating function to activate;

[0123] In this embodiment, as Figure 7 shown, the specific steps of the training method of the single-cell type recognition model are as follows:

[0124] S01: Obtain the matrix dataset of single cells;

[0125] S02: Preprocess the matrix dataset of single cells to obtain the preprocessed matrix dataset of single cells;

[0126] S03: Input the preprocessed matrix dataset of single cells into the FFT module for training to obtain the optimal parameters of the FFT module;

[0127] S04: Determine the trained FFT module based on the optimal parameters of the FFT module;

[0128] S05: Input the matrix dataset of single cells into the trained FFT module to generate a training set;

[0129] S06: Input the training set into the improved Transformer encoding module for training to obtain the optimal parameters of the improved Transformer encoding module;

[0130] S07: Determine the trained improved Transformer encoding module based on the optimal parameters of the improved Transformer encoding module;

[0131] S08: Input the training set into the trained single-cell type recognition model to obtain a classification training set;

[0132] S09: Input the classification training set into the classifier for training to obtain the optimal parameters of the classifier, and determine the trained classifier based on the optimal parameters of the classifier;

[0133] S010: Obtain the trained single-cell type recognition model according to the trained FFT module, the trained improved Transformer encoding module, and the trained classifier.

[0134] Specifically, the classifier mentioned in the present invention is a classifier based on a fully connected layer, and this classifier can map the features output by the module into specific class labels.

[0135] Specifically, for the training method of the single-cell type recognition model, the optimal parameters of the entire single-cell type recognition model are obtained by first training the FFT module and then training the improved Transformer encoding module, so as to obtain the trained single-cell type recognition model. In step S01, a matrix data set of single cells is obtained through mainstream single-cell data platforms and single-cell-specific databases, such as GEO (Gene Expression Omnibus), Tabula Muris, Human CellAtlas, etc.

[0136] Example 2

[0137] Based on the single-cell type recognition method mentioned in Example 1, in this example, the recognition method of the present invention is compared with the existing autoencoder (AE) algorithm, and the performance of the method of the present invention in various performance indicators is analyzed as follows:

[0138] The present invention selects six groups of human and mouse tissue data sets. For these six data sets, cell types with a proportion lower than 2‰ of the total number of cells are removed, and experimental data sets of human bladder, human kidney, human fetal pancreas, mouse bladder, mouse kidney, and mouse pancreas are obtained respectively. Among them, the cell number information, gene number information, and cell category number information in the experimental data set are as shown in Figure 8 、 9 、10;

[0139] Based on the six groups of experimental data sets, 80% of the cell data is selected as the training set, and 20% is selected as the test set for the comparison experiment between the method of the present invention and AE. At the same time, the comparison results of various indicators are obtained by taking the average value through multiple experiments. The final results are as shown in Figure 11 、 12 、13, 14, 15, 16;

[0140] It can be seen that the ACC (accuracy), Precision (precision), MCC (Matthews Correlation Coefficient), F1 (F1 score), and Recall (recall rate) of the method of the present invention are all higher than those of the autoencoder AE. Therefore, the single-cell type recognition method combining deep learning and fast Fourier transform technology proposed by the present invention can effectively achieve the accurate recognition of single-cell data types and make up for the defects in the common single-cell data type recognition process by improving the algorithm.

[0141] Example 3

[0142] This example provides a single-cell type recognition system, including:

[0143] A data acquisition module, used to acquire the matrix data of the single cell to be recognized;

[0144] A preprocessing module for preprocessing the matrix data of the single cell to be recognized to obtain preprocessed single cell data;

[0145] An identification module for inputting the matrix data of the single cell to be recognized into a trained single cell type recognition model for recognition to obtain the classification result of the single cell to be recognized; wherein the single cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence.

[0146] Example 4

[0147] This embodiment provides a computer-readable storage medium storing a computer program, and when the computer program is executed, it implements the single cell type recognition method described in Claim Example 1.

[0148] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified function in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0150] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified function in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0151] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative rather than restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit of the present invention and the scope protected by the claims. All of these fall within the protection scope of the present invention.

Claims

1. A single cell type recognition method, characterized in that Including: Obtain the matrix data of the single cell to be recognized; Input the matrix data of the single cell to be recognized into the trained single cell type recognition model for recognition, and obtain the classification result of the single cell to be recognized; Wherein the single cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence.

2. The single cell type identification method according to claim 1, characterized in that Before inputting the matrix data of the single cell to be recognized into the trained single cell type recognition model, it further includes preprocessing: Perform standardization processing on the matrix data of the single cell to be recognized to obtain the standardized matrix data of the single cell; Use the linear discriminant analysis method to reduce the dimension of the standardized matrix data of the single cell to obtain the matrix data after dimension reduction; Determine a fixed increment based on the minimum value of the elements in the matrix data after dimension reduction; Perform numerical translation on the matrix data after dimension reduction according to the fixed increment to obtain the preprocessed single cell data.

3. The single cell type identification method according to claim 2, characterized in that The FFT module includes an FFT encoding layer, a weighted gating layer, an IFFT decoding layer, a first normalization layer, a first feed-forward network layer, and a second normalization module connected in sequence; The FFT encoding layer is used to receive the preprocessed single cell data and perform a fast Fourier transform on it to obtain the single cell frequency domain data; The weighted gating layer is used to perform weighted adaptive adjustment on the single cell frequency domain data to obtain the weighted frequency domain data; The IFFT decoding layer is used to perform an inverse fast Fourier transform on the weighted frequency domain data to obtain the single cell time domain data; The first normalization layer is used to receive the single cell time domain data and perform normalization processing to obtain the output data of the first normalization layer; The first feed-forward network layer is used to perform a non-linear transformation on the output data of the first normalization layer using the GELU activation function to obtain the output result of the first feed-forward network layer; The second normalization layer is used for the output result of the first feed-forward network layer and performs normalization processing to obtain the output data of the FFT module.

4. The single-cell type identification method according to claim 3, characterized in that The improved Transformer encoding module includes a multi-head attention mechanism layer, a third normalization layer, a two-dimensional attention feed-forward network layer, and a fourth normalization layer connected in sequence; The multi-head attention mechanism layer includes multiple single-head attention mechanism layers with parallel outputs, and is used to splice the scaled dot product attentions output by the multiple single-head attention mechanism layers to obtain the output data of the multi-head attention mechanism layer; The third normalization layer is used to perform weighted residual connection on the input data and output data of the multi-head attention mechanism layer, and normalize the result of the weighted residual connection to obtain the output data of the third normalization layer; The two-dimensional attention feed-forward network layer is used to extract local and global information features from the output data of the third normalization layer to obtain the output data of the two-dimensional attention feed-forward network layer; The fourth normalization layer is used to perform weighted residual connection on the input data and output data of the two-dimensional attention feed-forward network layer, and normalize the result of the weighted residual connection to obtain the output data of the fourth normalization layer.

5. The single-cell type recognition method according to claim 4, characterized in that The single-head attention layer is used to calculate the Query, Key, and Value matrices based on the rotation position encoding matrix and the output data of the FFT module, and calculate the scaled dot-product attention according to the Query, Key, and Value matrices; the calculation formulas for the Query, Key, and Value matrices are as follows: ; ; Among them, Q, K, and V represent the Query, Key, and Value matrices respectively; X represents the input matrix, which is equivalent to the output data of the FFT module; represent the weight matrices of Q, K, and V respectively; represents the rotation position encoding matrix, d is the dimension of the input matrix X, and m represents the position of the selected Q, K, or V, .

6. The single-cell type identification method according to claim 5, wherein The two-dimensional attention feed-forward network layer includes a second feed-forward network layer, a first branch and a second branch connected to the second feed-forward network layer, a third branch connected to the first branch, and a fourth branch connected to the first branch and the second branch; the first branch includes a pooling layer, a first fully connected layer, and a gated activation function layer connected in sequence, and the second branch includes a second fully connected layer and a gated activation function layer connected in sequence; the third branch includes a third fully connected layer and a Sigmoid function layer connected in sequence; the fourth branch includes a fourth fully connected layer and a Sigmoid function layer connected in sequence; The second feed-forward network layer is used to perform a non-linear transformation on the output data of the third normalization layer using the GELU activation function to obtain the output data of the second feed-forward network layer; The first branch is used to perform average pooling, full connection, and gated activation operations on the output data of the second feed-forward network layer in sequence to obtain a feature representation of global information; The second branch is used to perform full connection and gated activation operations on the output data of the second feed-forward network layer in sequence to obtain a feature representation of local information; The third branch is used to perform a full connection operation on the feature representation of global information and extract attention features using the Sigmoid function to obtain the output data of the third branch; The fourth branch is used to receive the concatenation result of the feature representation of global information and the feature representation of local information, perform a full connection operation on the concatenation result, and extract attention features using the Sigmoid function to obtain the output data of the fourth branch; Multiply the output data of the third branch and the fourth branch to obtain an output result F1, and perform a weighted residual link on the output result F1 and the output data of the second feed-forward network layer to obtain the output data of the two-dimensional attention feed-forward network layer.

7. The single cell type recognition method according to claim 5, characterized in that, The training method of the single-cell type recognition model includes: Obtain the matrix dataset of single cells; Preprocess the matrix dataset of single cells to obtain the preprocessed matrix dataset of single cells; Input the preprocessed matrix dataset of single cells into the FFT module for training to obtain the optimal parameters of the FFT module; Determine the trained FFT module based on the optimal parameters of the FFT module; Input the matrix dataset of single cells into the trained FFT module to generate a training set; Input the training set into the improved Transformer encoding module for training to obtain the optimal parameters of the improved Transformer encoding module; Determine the trained improved Transformer encoding module based on the optimal parameters of the improved Transformer encoding module; Input the training set into the trained single-cell type recognition model to obtain a classification training set; Input the classified training set into the classifier for training to obtain the optimal parameters of the classifier, and determine the trained classifier based on the optimal parameters of the classifier; According to the trained FFT module, the trained improved Transformer encoding module, and the trained classifier, obtain the trained single-cell type recognition model.

8. A single cell type recognition system, characterized in that, It includes: A data acquisition module for acquiring the matrix data of the single cell to be recognized; A recognition module for inputting the matrix data of the single cell to be recognized into the trained single-cell type recognition model for recognition to obtain the classification result of the single cell to be recognized; wherein the single-cell type recognition model includes an FFT module, an improved Transformer encoding module, and a classifier connected in sequence.

9. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed, it implements the single-cell type recognition method according to any one of claims 1-7.