Single cell distillation discriminant clustering method and system based on asymmetric auto-encoder, electronic equipment and medium
Through the single-cell distillation discriminant clustering method based on asymmetric autoencoder, the problem of insufficient clustering accuracy and robustness in the analysis of single-cell RNA sequencing data is solved, and more efficient cell type recognition and functional feature inference are achieved, which is suitable for complex and diverse single-cell data.
Patent Information
- Application Number
- CN202411781657.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-05
AI Technical Summary
Existing single-cell RNA sequencing data analysis methods lack clustering accuracy and robustness when processing sparse, noise and high-dimensional data, especially when processing cross-domain data sets, they face the problem of inconsistent domain distribution.
A single-cell distillation discriminant clustering method based on asymmetric autoencoder is used to train an asymmetric autoencoder to perform feature extraction and clustering center calculation on the original data. The source data label information and feature distance information are used to gather similar cells and different cell clusters are far away, and the clustering center is calculated through low-dimensional representation, implicitly completing the domain alignment task.
It significantly improves the accuracy and robustness of cell clustering, and can more accurately infer complex cell composition and functional characteristics within cell tissues. It is suitable for processing complex and diverse single-cell RNA sequencing data.
Smart Images

Figure CN119724374A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of single-cell clustering, and in particular to a single-cell distillation discriminant clustering method, system, electronic device and medium based on an asymmetric autoencoder. Background Art
[0002] Single-cell RNA sequencing (scRNA-seq) technology can measure the gene expression of individual cells, providing extremely high cell difference resolution so that researchers can better study the cellular heterogeneity within tissues. In the past decade, scRNA-seq has been widely used in multiple research fields such as tumors, microorganisms, and developmental biology. Cell clustering is a key step in scRNA-seq data analysis. Cells are grouped according to their gene expression patterns to further complete the task of cell function identification and cell type annotation. However, the sparsity, batch effect, and high dimensionality of scRNA-seq data pose great challenges to cell clustering. Technical deviations lead to low RNA capture rates, extremely sparse scRNA-seq transcriptional expression profiles, and a large number of dropout events, which increase the noise and missing values in the data, thereby affecting the accuracy of cell clustering analysis. At the same time, due to the different gene expression levels measured in tissues in different batches, at different times, and by different operators, there are errors in data analysis. In addition, scRNA-seq data usually have extremely high dimensions, which makes it very complicated to extract cell type-specific information and describe the characteristic relationship between cells, further increasing the difficulty of cell clustering analysis.
[0003] In order to overcome the above challenges, researchers have proposed many traditional unsupervised clustering methods for single-cell data in the early stage. These methods mainly learn important features from the original data through dimensionality reduction technology, and then calculate the similarity or distance between cells in different ways, and use clustering methods such as K-means and Louvain to complete the clustering task. SC3 generates multiple inter-cell similarity matrices through different feature extraction methods, and then clusters each similarity matrix using different clustering methods, and obtains the final stable clustering through consensus clustering. SIMLR uses common dimensionality reduction methods to reduce the dimensionality of single-cell data, initializes the similarity matrix based on methods such as Euclidean distance and Gaussian kernel, and learns the local and global information of inter-cell relationships through alternating optimization strategies to achieve final clustering. CIDR restores the lost gene expression values through interpolation to reduce the impact of data sparsity, and then performs principal component analysis on the interpolated data, and uses hierarchical clustering to identify cell subpopulations. Although these methods can effectively reveal the diversity among cells, due to the lack of prior knowledge, the clustering results are less robust to data noise and high-dimensional sparsity, and are prone to misclassification when dealing with complex samples with strong heterogeneity.
[0004] In order to make up for the shortcomings of unsupervised methods in clustering accuracy, many research teams have introduced semi-supervised learning strategies to guide clustering by using a small amount of well-labeled cell type information. Single-cell semi-supervised clustering methods can be divided into two categories: machine learning-based and deep learning-based. Single-cell clustering methods based on machine learning usually use some known cell labels to train machine learning models, and then predict the target data based on the trained model. scmap uses multiple similarity functions to compare the gene expression patterns of target data and reference data to find the most similar cell types, thereby achieving final clustering. Seurat 3.0 uses the reciprocal nearest neighbor to build a shared network to capture the local proximity relationship between cells, and then uses the Louvain algorithm to identify cell subpopulations. This type of method can effectively improve the recognition ability of rare cell types and improve the robustness to noise. However, the reliance of this type of method on labeled data makes it susceptible to domain offset when the number of labels is insufficient or the label distribution is significantly different from the target data, resulting in a decrease in the generalization ability of the model.
[0005] With the rise of deep learning technology, researchers have combined deep representation learning with semi-supervised strategies and proposed semi-supervised deep clustering methods. This type of method uses the nonlinear mapping ability of deep neural networks to extract features, which can capture the complex expression patterns of scRNA-seq data and improve clustering performance. scDeepCluster uses an autoencoder based on the zero-inflated negative binomial distribution (ZINB) model to effectively capture the nonlinear structure in the data and achieve data denoising, and then uses deep embedding clustering to make the data points move closer to the cluster center, thereby completing the clustering task. ItClust learns the features of the data through the autoencoder and uses similarity metrics to construct a similarity matrix between cells. Finally, by combining iterative optimization and graph-based clustering strategies, it can effectively identify cell subpopulations in complex high-dimensional data (achieving high-quality cell clustering). scSemiAAE combines the ideas of semi-supervised learning and adversarial autoencoders to achieve better feature learning and clustering effects. scSemiCluster adds structural similarity regularization to the reference data to constrain the clustering results of the target data, and introduces pairwise constraints to enhance the compactness of clustering. Based on the zero-inflated negative binomial model autoencoder, scMCKC considers the association between similar cells, constructs cell-level constraints, and uses prior information to construct pairwise constraints, and uses the weighted soft K-means algorithm for final clustering. scDECL introduces a hybrid data augmentation strategy and interpolation loss to improve the diversity of the dataset and the robustness of the model, and converts prior information into enhanced pairwise constraints to guide clustering. scTPC pre-trains a denoising autoencoder based on the zero-inflated negative binomial distribution. Then, deep clustering is performed using triple constraints and pairwise constraints generated by partially labeled cells. Although these semi-supervised deep clustering methods can improve the clustering effect to a certain extent, they still face the problem of inconsistent distribution between the source domain and the target domain when dealing with cross-domain datasets. In addition, most existing methods rely on complex feature alignment strategies, while ignoring the deep mining of the internal structure of the target domain data, resulting in insufficient discrimination of the target data. Summary of the invention
[0006] The purpose of the present invention is to provide a single-cell distillation discriminant clustering method, system, electronic device and medium based on an asymmetric autoencoder, which has excellent cell clustering performance and helps to infer the complex cell composition and functional characteristics inside cell tissues.
[0007] To achieve the above object, the present invention provides a single-cell distillation discriminant clustering method based on an asymmetric autoencoder, comprising the following steps:
[0008] Step S1, training original data based on an asymmetric autoencoder; wherein the original data includes source data and target data;
[0009] Step S2, using source data label information and feature distance information to aggregate similar cells and keep different cell clusters away;
[0010] Step S3: Calculate the cluster center using the low-dimensional representation of the source data and the target data, so that the cells near the cell cluster boundary are moved closer to the cluster center, implicitly completing the domain alignment task.
[0011] Preferably, in step S1, training the original data based on the asymmetric autoencoder comprises the following steps:
[0012] Step S11: Gene expression matrix X of original data = {x1, x2, ..., x n}∈R n×m Input to the asymmetric autoencoder to estimate the three parameter matrices of the ZINB distribution, including the zero-inflated parameter matrix Π={π1,π2,...,π n}∈R n×m 、The average parameter matrix M={μ1,μ2,...,μ n}∈R n×m and the dispersion parameter matrix Θ = {θ1,θ2,...,θ n}∈R n×m ;
[0013] Among them, n represents the number of samples of all data; m represents the dimension of input data; x n represents the gene expression vector of the nth cell; π n represents the zero expansion parameter vector corresponding to the nth cell; μ n represents the mean value parameter vector corresponding to the nth cell; θ n represents the dispersion parameter vector corresponding to the nth cell;
[0014] Step S12: Set x ij represents the expression value of the jth gene in the ith cell, π ij , μ ij ,θ ij They represent the zero expansion parameter, mean value parameter and dispersion parameter corresponding to the jth gene in the i-th cell, respectively, so that it obeys the ZINB distribution:
[0015] p ZINB (x ij ; π ij ,μ ij ,θ ij )=π ij δ0(x ij )+(1-π ij ) NB (x ij ;μ ij ,θ ij );
[0016]
[0017] Among them, Γ(·) is the Gamma function; δ0(·) is the Dirac function, when x ij =0 when δ0(x ij ) takes the value of 1, when x ij ≠0 when δ0(x ij ) takes the value of 0;
[0018] Step S13, reconstructing the data loss according to the negative log-likelihood function of the ZINB distribution:
[0019]
[0020] Among them, L zinb represents the reconstruction loss based on ZINB distribution; p ZINB (x ij ) represents the ZINB distribution function;
[0021] Step S14: Calculate the reconstructed data according to the average parameter matrix M and the size factor vector s The calculation formula is as follows:
[0022]
[0023] Where s is the size factor vector corresponding to each cell, which is calculated by dividing the total gene expression of cell i by the median of the total gene expression of all cells; diag(·) represents the function of converting the vector into the diagonal elements in the square matrix;
[0024] For each sample x i , construct a positive pair and 2n-2 negative pairs
[0025]
[0026] Step S15: Calculate the contrast loss based on the constructed positive and negative pairs:
[0027]
[0028] in, represents the contrast loss constructed from the raw data of the ith cell; represents the contrast loss of the reconstructed data of the ith cell; L con represents the overall contrast loss; x a represents the gene expression vector of the ath cell; sim(·) is the cosine similarity function,
[0029] Preferably, in step S2, using source data label information and feature distance information to aggregate similar cells and keep different cell clusters away from each other comprises the following steps:
[0030] Step S21: add a classifier after the encoder in the asymmetric autoencoder, take the gene expression matrix of the source data as input, and obtain the prediction probability matrix of the reference data from the classifier Among them, n s represents the number of samples of the source data, K represents the number of cell types, Represents the predicted probability that the i-th cell in the source data belongs to the k-th cell type; the standard cross entropy function is used as the classification loss function:
[0031]
[0032] Among them, L ce represents the classification loss; represents the true label of cell i in the source data; I(·) represents the indicator function;
[0033] Step S22: Using the gene expression matrix of the source data as input, obtain the feature representation of the source data through an asymmetric autoencoder Calculate the cluster center based on the label information of the source data:
[0034]
[0035] Among them, φ k represents the cluster center of cell type k; Represents the low-dimensional feature vector of the i-th cell in the source data; Φ = {φ1, φ2, ..., φ K}∈R K×d Represents the cluster center matrix; d represents the dimension of the low-dimensional representation; the cluster center is updated in each iteration of network training, and the specific formula is as follows:
[0036]
[0037] in, Indicates the cluster center of the cell type k at the epoch iteration, represents the cluster center of cell type k at the epoch-1 iteration; represents the sample set of cell type k in the source data, α∈[0,1] represents the moving average coefficient; The low-dimensional feature vector representing the a-th cell in the source data;
[0038] Step S23: Use standard cross entropy as the loss function of distillation clustering. The specific formula is as follows:
[0039]
[0040] Where τ represents the temperature coefficient; Represents the distance vector between the low-dimensional representation of cell i in the source data and the cluster center; Represents the cluster center φ in the source data k The distance vector between it and other cluster centers.
[0041] Preferably, in step S3, the cluster center is calculated using the low-dimensional representation of the source data and the target data, so that the cells near the cell cluster boundary are moved closer to the cluster center, implicitly completing the domain alignment task, including the following steps:
[0042] Step S31: Use the source data and target data as inputs of the asymmetric autoencoder to obtain low-dimensional features of the source data. and the low-dimensional features of the target data and its corresponding pseudo-label Combined with the true label of the source data, calculate the final cluster center:
[0043]
[0044] Among them, c k represents the cluster center of cell type k in the fine-tuning stage, C = {c1, c2, ..., c K} is the clustering center of source data and target data in the feature space; n s Represents the number of cells in the source data; n t The number of cells representing the target data, n = n s +n t ; The low-dimensional feature vector representing the i-th cell in the source data; Represents the low-dimensional feature vector of the i-th cell in the target data;
[0045] Step S32: Calculate the similarity between the low-dimensional feature Z and the cluster center C using t distribution, that is, the soft clustering assignment probability:
[0046]
[0047] Where β represents the degrees of freedom of the t distribution; represents the soft cluster assignment probability distribution; represents the soft clustering probability that the i-th cell belongs to the k-th cell type; z i represents the low-dimensional feature vector of the i-th cell; c l Represents the lth cluster center; uses cells with high confidence to improve clustering quality, and defines an auxiliary probability distribution based on the distribution of soft clustering assignment probabilities:
[0048]
[0049] in, represents the soft clustering assignment probability that cell i belongs to cell type l; represents the auxiliary probability distribution, represents the auxiliary probability that cell i belongs to cell type k;
[0050] Step S33, using the standard cross entropy function as the clustering loss:
[0051]
[0052] Among them, L dec represents the clustering loss.
[0053] A single-cell distillation discriminative clustering system based on an asymmetric autoencoder, comprising:
[0054] Comparative pre-training module, used to train raw data based on asymmetric autoencoders;
[0055] The distillation discriminant clustering module is used to use the source data label information and feature distance information to aggregate similar cells and keep different cell clusters away;
[0056] The deep embedding clustering fine-tuning module is used to calculate the cluster center using the low-dimensional representation of the source data and the target data, so that the cells near the boundary of the cell cluster are closer to the cluster center, implicitly completing the domain alignment task.
[0057] A computer device comprises: a memory and a processor; the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned single-cell distillation discriminant clustering method based on asymmetric autoencoder are implemented.
[0058] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned single-cell distillation discriminant clustering method based on an asymmetric autoencoder.
[0059] Therefore, the present invention adopts the above-mentioned single-cell distillation discriminant clustering method, system, electronic device and medium based on asymmetric autoencoder, and the beneficial technical effects are as follows: This method effectively captures the complex expression pattern of single-cell data through the training of asymmetric autoencoder, and combines the label information and feature distance information of the source data to aggregate similar cells and keep different cell clusters away. At the same time, the cluster center is calculated using the low-dimensional representation of the source data and the target data, which further optimizes the boundaries of the cell clusters and implicitly completes the domain alignment task. With the combined effect of these technical features, this method performs well in cell clustering, helps to more accurately infer the complex cell composition and functional characteristics inside the cell tissue, and provides strong support for the analysis of single-cell RNA sequencing (scRNA-seq) data. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 A flowchart of a single-cell distillation discriminant clustering method based on an asymmetric autoencoder of the present invention;
[0061] Figure 2 Comparison of ACC and ARI values between the scAADC method and other methods on the simulated data set; Figure 2 (a) is the comparison of ACC values between the scAADC method and other methods on the larger_balance simulation data set; Figure 2 (b) is the comparison of ACC values between the scAADC method and other methods on the larger_imbalance simulation data set; Figure 2 (c) is the comparison of ACC values between the scAADC method and other methods on the smaller_balance simulation data set; Figure 2 (d) is the comparison of ACC values between the scAADC method and other methods on the smaller_imbalance simulation data set; Figure 2 (e) is the comparison of ARI values between the scAADC method and other methods on the larger_balance simulated data set; Figure 2 (f) is the comparison of ARI values between the scAADC method and other methods on the larger_imbalance simulation data set; Figure 2 (g) is the comparison of ARI values between the scAADC method and other methods on the smaller_balance simulation data set; Figure 2 (h) is the comparison of ARI values between the scAADC method and other methods on the smaller_imbalance simulation data set;
[0062] Figure 3 Comparison of ACC and ARI values between the scAADC method and other methods on a single data set; Figure 3 (a) is the comparison of ACC values between the scAADC method and other methods on the Adam dataset; Figure 3 (b) is the comparison of ACC values between the scAADC method and other methods on the Young dataset; Figure 3 (c) is the comparison of ARI values between scAADC method and other methods on Adam dataset; Figure 3 (d) is the comparison of ARI values between the scAADC method and other methods on the Young dataset;
[0063] Figure 4 is the comparison of ACC and ARI values between the scAADC method and other methods on cross-datasets; Figure 4 (a) is the comparison of ACC values between the scAADC method and other methods on cross-datasets; Figure 4 (b) is the comparison of ARI values between the scAADC method and other methods on cross-datasets. DETAILED DESCRIPTION
[0064] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0065] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0066] Embodiment 1
[0067] like Figure 1 As shown, it is a flow chart of a single-cell distillation discriminant clustering method (scAADC) based on an asymmetric autoencoder of the present invention, comprising the following steps:
[0068] Step S1, training original data based on an asymmetric autoencoder; wherein the original data includes source data and target data.
[0069] Step S11: Gene expression matrix X of original data = {x1, x2, ..., x n}∈R n×m Input to the asymmetric autoencoder to estimate the three parameter matrices of the ZINB distribution, including the zero-inflated parameter matrix Π={π1,π2,...,π n}∈R n×m 、The average parameter matrix M={μ1,μ2,...,μ n}∈R n×m and the dispersion parameter matrix Θ = {θ1,θ2,...,θ n}∈R n×m ;
[0070] Among them, n represents the number of samples of all data; m represents the dimension of input data; x n represents the gene expression vector of the nth cell; π n represents the zero expansion parameter vector corresponding to the nth cell; μ n represents the mean value parameter vector corresponding to the nth cell; θ n represents the dispersion parameter vector corresponding to the nth cell;
[0071] Step S12: Set x ij represents the expression value of the jth gene in the ith cell, π ij , μ ij ,θ ij They represent the zero expansion parameter, mean value parameter and dispersion parameter corresponding to the jth gene in the i-th cell, respectively, so that it obeys the ZINB distribution:
[0072] p ZINB (x ij ; π ij ,μ ij ,θ ij )=π ij δ0(x ij )+(1-π ij ) NB (x ij ;μ ij ,θ ij );
[0073]
[0074] Among them, Γ(·) is the Gamma function; δ0(·) is the Dirac function, when x ij =0 when δ0(x ij ) takes the value of 1, when x ij ≠0 when δ0(x ij ) takes the value of 0;
[0075] Step S13, reconstructing the data loss according to the negative log-likelihood function of the ZINB distribution:
[0076]
[0077] Among them, L zinb represents the reconstruction loss based on ZINB distribution; p ZINB (x ij ) represents the ZINB distribution function;
[0078] Step S14: Calculate the reconstructed data according to the average parameter matrix M and the size factor vector s The calculation formula is as follows:
[0079]
[0080] Where s is the size factor vector corresponding to each cell, which is calculated by dividing the total gene expression of cell i by the median of the total gene expression of all cells; diag(·) represents the function of converting the vector into the diagonal elements in the square matrix;
[0081] For each sample x i , construct a positive pair and 2n-2 negative pairs
[0082]
[0083] Step S15: Calculate the contrast loss based on the constructed positive and negative pairs:
[0084]
[0085] in, represents the contrast loss constructed from the raw data of the ith cell; represents the contrast loss of the reconstructed data of the ith cell; L con represents the overall contrast loss; x a represents the gene expression vector of the ath cell; sim(·) is the cosine similarity function,
[0086] Step S2: using source data label information and feature distance information to aggregate similar cells and keep different cell clusters away.
[0087] Step S21: add a classifier after the encoder in the asymmetric autoencoder, take the gene expression matrix of the source data as input, and obtain the prediction probability matrix of the reference data from the classifier Among them, n s represents the number of samples of the source data, K represents the number of cell types, Represents the predicted probability that the i-th cell in the source data belongs to the k-th cell type; the standard cross entropy function is used as the classification loss function:
[0088]
[0089] Among them, L ce represents the classification loss; represents the true label of cell i in the source data; I(·) represents the indicator function;
[0090] Step S22: Using the gene expression matrix of the source data as input, obtain the feature representation of the source data through an asymmetric autoencoder Calculate the cluster center based on the label information of the source data:
[0091]
[0092] Among them, φ k represents the cluster center of cell type k; Represents the low-dimensional feature vector of the i-th cell in the source data; Φ = {φ1, φ2, ..., φ K}∈R K×d Represents the cluster center matrix; d represents the dimension of the low-dimensional representation; the cluster center is updated in each iteration of network training, and the specific formula is as follows:
[0093]
[0094] in, represents the cluster center of cell type k in the epoch iteration, Indicates the cluster center of cell type k in the epoch-1 iteration; represents the sample set of cell type k in the source data, α∈[0,1] represents the moving average coefficient; Represents the low-dimensional feature vector of the a-th cell in the source data;
[0095] Step S23: Use standard cross entropy as the loss function of distillation clustering. The specific formula is as follows:
[0096]
[0097] Where τ represents the temperature coefficient; Represents the distance vector between the low-dimensional representation of cell i in the source data and the cluster center; Represents the cluster center φ in the source data k The distance vector between it and other cluster centers.
[0098] Step S3: Calculate the cluster center using the low-dimensional representation of the source data and the target data, so that the cells near the cell cluster boundary are moved closer to the cluster center, implicitly completing the domain alignment task.
[0099] Step S31: Use the source data and target data as inputs of the asymmetric autoencoder to obtain low-dimensional features of the source data. and the low-dimensional features of the target data and its corresponding pseudo-label Combined with the true label of the source data, calculate the final cluster center:
[0100]
[0101] Among them, c k represents the cluster center of cell type k in the fine-tuning stage, C = {c1, c2, ..., c K} is the clustering center of source data and target data in the feature space; n s Represents the number of cells in the source data; n t The number of cells representing the target data, n = n s +n t ; The low-dimensional feature vector representing the i-th cell in the source data; Represents the low-dimensional feature vector of the i-th cell in the target data;
[0102] Step S32: Calculate the similarity between the low-dimensional feature Z and the cluster center C using t distribution, that is, the soft clustering assignment probability:
[0103]
[0104] Where β represents the degrees of freedom of the t distribution; represents the soft cluster assignment probability distribution; represents the soft clustering probability that the i-th cell belongs to the k-th cell type; z i represents the low-dimensional feature vector of the i-th cell; c l Represents the lth cluster center; uses cells with high confidence to improve clustering quality, and defines an auxiliary probability distribution based on the distribution of soft clustering assignment probabilities:
[0105]
[0106] in, represents the soft clustering assignment probability that cell i belongs to cell type l; represents the auxiliary probability distribution, represents the auxiliary probability that cell i belongs to cell type k;
[0107] Step S33, using the standard cross entropy function as the clustering loss:
[0108]
[0109] in, represents the auxiliary probability that cell i belongs to cell type l; L dec represents the clustering loss.
[0110] In order to verify the effectiveness of the present invention, the performance of the present invention is tested from the perspective of cell type clustering.
[0111] 1. Dataset and evaluation indicators
[0112] (1) Simulated Dataset
[0113] The R software package Splatter was used to construct simulated data sets with different cluster numbers, cluster sizes and data sizes. Specifically, for different cluster numbers, the simulated data sets were set to include different numbers of cell types {4, 5, 6, 7}. For cluster size, two situations were considered: one is "balanced", that is, the number of samples of each cell type is the same; the other is "unbalanced", that is, the number of samples of each cell type decreases at a ratio of 0.8, that is, the number of cells of the latter cell type is 80% of the previous type. In terms of data scale setting, considering the relative sample size of the source data and the target data, two control situations were constructed: one is "large", that is, the number of cells in the source data is twice that of the target data; the other is "small", that is, the number of cells in the source data is only half of the target data. Based on the above configuration, a total of 16 types of simulated data sets were generated, and each type of simulated data set constructed 10 independent data sets by setting different random seeds. Each data set contains 6300 cells and 2500 genes, thereby ensuring the stability of the experimental results and the reliability of comparative analysis.
[0114] (2) Single dataset and cross-dataset
[0115] The detailed information of the real data used for a single dataset and across datasets is shown in Table 1.
[0116] Table 1 Single dataset and cross-dataset information table
[0117] Dataset organ Celltypenum Cellnum Zeropercent Baronhuman Pancreas 13 8569 90.62% Eng Pancreas 6 2282 86.05% Muraro Pancreas 9 2122 73.02% 10X_Tongue Tongue 3 7538 86.71% Smart-seq2_Tongue Tongue 2 1350 79.61% 10X_Spleen Spleen 5 9552 94.34% Smart-seq2_Spleen Spleen 3 1697 92.19% 10X_Trachea Trachea 5 11269 93.66% Smart-seq2_Trachea Trachea 4 1350 85.48% Adam Kidney 8 3660 92.33% Young Kidney 11 5685 94.70%
[0118] (3) Evaluation indicators
[0119] In the experiment, the adjusted Rand index (ARI) and annotation accuracy (ACC) were selected as evaluation indicators to evaluate the clustering performance of the model. The clustering performance of the algorithm is related to ARI and ACC. The higher the ARI and ACC values, the better the clustering performance of the model.
[0120] 2. Comparative analysis of experimental results
[0121] (a) Simulated data set
[0122] There are significant differences in ACC and ARI values between different methods under different types of simulated dataset settings, such as Figure 2As shown in the box plot. As the number of clusters increases, the ACC and ARI values of all methods show a downward trend, but scAADC always maintains the best performance, and the performance degradation is not obvious, indicating that this method can accurately identify the cell types of each cluster and show extremely high robustness to different numbers of cell types. scAADC can outperform other methods under unbalanced data, indicating that it can effectively learn the representative features of each cluster in complex data distribution. When the sample size of the source data is smaller than the target data, the clustering performance of scAADC can still be better than other methods, effectively extracting the representative features of each cluster and maintaining a stable clustering effect. The experimental results show that scAADC can maintain excellent performance regardless of the data scale, cluster structure balance or cluster number changes, demonstrating its stability and robustness in processing complex single-cell data.
[0123] (b) Single dataset
[0124] Comparison of ACC and ARI results of scAADC and other comparison methods (Seurat, scSemiCluster, ItClust, scmap, scSemiAAE, scMCKC, scDECL) on Adam and Young datasets with the change of the number of known labels, such as Figure 3 As shown in the line graph in . As can be seen from the figure, in the Adam dataset, as the number of known labeled samples increases, the clustering accuracy of scAADC always remains at the highest level (except when the number of labeled samples is 3), and increases slightly with the increase in the number of annotations, indicating its robustness in dealing with scarce labeled data and its ability to effectively capture potential features. In the Young dataset, we obtained similar results. The experimental results show that scAADC can better cope with the situation of scarce labeled samples and maintain stable and efficient clustering performance in the case of few-sample learning.
[0125] (c) Cross-dataset
[0126] The comparison results of ACC and ARI of eight clustering methods on six data sets are as follows: Figure 4 As shown in the histogram. As can be seen from the figure, scAADC achieves the best clustering performance on different cross-datasets, indicating that the method has good robustness on different datasets. Overall, scAADC performs well in clustering performance, especially when processing different tissue datasets, showing higher robustness and stability.
[0127] Embodiment 2
[0128] The present invention also provides a single-cell distillation discriminant clustering system based on an asymmetric autoencoder, comprising:
[0129] Comparative pre-training module, used to train raw data based on asymmetric autoencoders;
[0130] The distillation discriminant clustering module is used to use the source data label information and feature distance information to aggregate similar cells and keep different cell clusters away;
[0131] The deep embedding clustering fine-tuning module is used to calculate the cluster center using the low-dimensional representation of the source data and the target data, so that the cells near the boundary of the cell cluster are closer to the cluster center, implicitly completing the domain alignment task.
[0132] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0133] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0134] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0135] It is worth noting that the contents not elaborated in detail in the present invention are all prior art and are well known to those skilled in the art.
[0136] Therefore, the present invention adopts the above-mentioned single-cell distillation discrimination clustering method, system, electronic device and medium based on asymmetric autoencoder, which can effectively perform cluster discrimination on target domain data and significantly improve the accuracy and robustness of clustering.
[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A single-cell distillation discriminant clustering method based on an asymmetric autoencoder, characterized in that: The following steps are involved: Step S1, training original data based on an asymmetric autoencoder; wherein the original data includes source data and target data; Step S2, using source data label information and feature distance information to aggregate similar cells and keep different cell clusters away; Step S3: Calculate the cluster center using the low-dimensional representation of the source data and the target data, so that the cells near the cell cluster boundary are moved closer to the cluster center, implicitly completing the domain alignment task.
2. According to claim 1, a single-cell distillation discriminant clustering method based on an asymmetric autoencoder is characterized in that: In step S1, the original data is trained based on the asymmetric autoencoder, including the following steps: Step S11: Gene expression matrix X of original data = {x1, x2, ..., x n }∈R n×m Input to the asymmetric autoencoder to estimate the three parameter matrices of the ZINB distribution, including the zero-inflated parameter matrix Π={π1,π2,...,π n }∈R n×m 、The average parameter matrix M={μ1,μ2,...,μ n }∈R n×m and the dispersion parameter matrix Θ = {θ1,θ2,...,θ n }∈R n×m ; Among them, n represents the number of samples of all data; m represents the dimension of input data; x n represents the gene expression vector of the nth cell; π n represents the zero expansion parameter vector corresponding to the nth cell; μ n represents the mean value parameter vector corresponding to the nth cell; θ n represents the dispersion parameter vector corresponding to the nth cell; Step S12: Set x ij represents the expression value of the jth gene in the ith cell, π ij , μ ij ,θ ij They represent the zero expansion parameter, mean value parameter and dispersion parameter corresponding to the jth gene in the i-th cell, respectively, so that it obeys the ZINB distribution: p ZINB (x ij ;p ij ,m ij ,i ij )=π ij δ0(x ij )+(1-π ij )p NB (x ij ;m ij ,i ij ); Among them, Γ(·) is the Gamma function; δ0(·) is the Dirac function, when x ij =0 when δ0(x ij ) takes the value of 1, when x ij ≠0 when δ0(x ij ) takes the value of 0; Step S13, reconstructing the data loss according to the negative log-likelihood function of the ZINB distribution: Among them, L zinb represents the reconstruction loss based on ZINB distribution; p ZINB (x ij ) represents the ZINB distribution function; Step S14: Calculate the reconstructed data according to the average parameter matrix M and the size factor vector s The calculation formula is as follows: Where s is the size factor vector corresponding to each cell, which is calculated by dividing the total gene expression of cell i by the median of the total gene expression of all cells; diag(·) represents the function of converting the vector into the diagonal elements in the square matrix; For each sample x i , construct a positive pair and 2n-2 negative pairs Step S15: Calculate the contrast loss based on the constructed positive and negative pairs: in, represents the contrast loss constructed from the raw data of the ith cell; represents the contrast loss of the reconstructed data of the ith cell; L con represents the overall contrast loss; x a represents the gene expression vector of the ath cell; sim(·) is the cosine similarity function, 3. According to claim 2, a single-cell distillation discriminant clustering method based on an asymmetric autoencoder is characterized in that: In step S2, the source data label information and feature distance information are used to aggregate similar cells and separate different cell clusters, including the following steps: Step S21: add a classifier after the encoder in the asymmetric autoencoder, take the gene expression matrix of the source data as input, and obtain the prediction probability matrix of the reference data from the classifier 1≤i≤n s ,1≤k≤K, where n s represents the number of samples of the source data, K represents the number of cell types, Represents the predicted probability that the i-th cell in the source data belongs to the k-th cell type; the standard cross entropy function is used as the classification loss function: Among them, L ce represents the classification loss; represents the true label of cell i in the source data; I(·) represents the indicator function; Step S22: Using the gene expression matrix of the source data as input, obtain the feature representation of the source data through an asymmetric autoencoder Calculate the cluster center based on the label information of the source data: Among them, φ k represents the cluster center of cell type k; Represents the low-dimensional feature vector of the i-th cell in the source data; Φ = {φ1, φ2, ..., φ K }∈R K×d Represents the cluster center matrix; d represents the dimension of the low-dimensional representation; the cluster center is updated in each iteration of network training, and the specific formula is as follows: in, Indicates the cluster center of the cell type k at the epoch iteration, represents the cluster center of cell type k at the epoch-1 iteration; represents the sample set of cell type k in the source data, α∈[0,1] represents the moving average coefficient; Represents the low-dimensional feature vector of the a-th cell in the source data; Step S23: Use standard cross entropy as the loss function of distillation clustering. The specific formula is as follows: Where τ represents the temperature coefficient; Represents the distance vector between the low-dimensional representation of cell i in the source data and the cluster center; Represents the cluster center φ in the source data k The distance vector between it and other cluster centers.
4. According to claim 3, a single-cell distillation discriminant clustering method based on an asymmetric autoencoder is characterized in that: In step S3, the cluster center is calculated using the low-dimensional representation of the source data and the target data, so that the cells near the cell cluster boundary are moved closer to the cluster center, implicitly completing the domain alignment task, including the following steps: Step S31: Use the source data and target data as inputs of the asymmetric autoencoder to obtain low-dimensional features of the source data. and the low-dimensional features of the target data and its corresponding pseudo-label Combined with the true label of the source data, calculate the final cluster center: Among them, c k represents the cluster center of cell type k in the fine-tuning stage, C = {c1, c2, ..., c K } is the clustering center of source data and target data in the feature space; n s Represents the number of cells in the source data; n t The number of cells representing the target data, n = n s +n t ; The low-dimensional feature vector representing the i-th cell in the source data; Represents the low-dimensional feature vector of the i-th cell in the target data; Step S32: Calculate the similarity between the low-dimensional feature Z and the cluster center C using t distribution, that is, the soft clustering assignment probability: Where β represents the degrees of freedom of the t distribution; represents the soft cluster assignment probability distribution; represents the soft clustering probability that the i-th cell belongs to the k-th cell type; z i represents the low-dimensional feature vector of the i-th cell; c l Represents the lth cluster center; uses cells with high confidence to improve clustering quality, and defines an auxiliary probability distribution based on the distribution of soft clustering assignment probabilities: in, represents the soft clustering assignment probability that cell i belongs to cell type l; represents the auxiliary probability distribution, represents the auxiliary probability that cell i belongs to cell type k; Step S33, using the standard cross entropy function as the clustering loss: Among them, L dec represents the clustering loss.
5. A single-cell distillation discriminant clustering system based on an asymmetric autoencoder, characterized in that: include: Comparative pre-training module, used to train raw data based on asymmetric autoencoders; The distillation discriminant clustering module is used to use the source data label information and feature distance information to aggregate similar cells and keep different cell clusters away; The deep embedding clustering fine-tuning module is used to calculate the cluster center using the low-dimensional representation of the source data and the target data, so that the cells near the boundary of the cell cluster are closer to the cluster center, implicitly completing the domain alignment task.
6. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, the steps of the single-cell distillation discriminant clustering method based on an asymmetric autoencoder described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the single-cell distillation discriminant clustering method based on an asymmetric autoencoder described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Single-cell RNA sequencing clustering method based on adversarial autoencoder
CN111785329A
Single cell semi-supervised clustering model based on contrast constraint regularization
CN118471343A
A method and system for detecting cell types and their associated markers
EP4343771A1
Method for unsupervised identification of single-cell morphological profiling based on deep learning
US20240112026A1