A self-optimizing single cell clustering method

By combining a zero-inflated negative binomial distribution denoising autoencoder, a graph attention autoencoder, and a self-optimizing model, denoising and iterative optimization are performed on single-cell RNA-seq data. This solves the problem that existing technologies fail to fully utilize inter-cell feature relationships and noise removal, and achieves more accurate single-cell clustering.

CN115661498BActive Publication Date: 2025-11-25YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211396184.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2025-11-25
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

Existing single-cell RNA-seq data clustering methods fail to fully utilize the potential feature relationships between cells and neglect noise removal, resulting in inaccurate clustering results.

Method used

A denoising autoencoder based on a zero-inflated negative binomial distribution and a graph attention autoencoder were used to denoise and reduce the dimensionality of single-cell RNA sequencing data. Principal component analysis and a self-optimizing model were combined for iterative optimization to obtain accurate clustering results.

Benefits of technology

It effectively removes noise from single-cell RNA sequencing data, accurately learns potential intercellular features, and improves the accuracy and reliability of clustering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115661498B_ABST
    Figure CN115661498B_ABST
Patent Text Reader

Abstract

The application relates to a self-optimization single-cell clustering method, and belongs to the technical field of single-cell RNA sequencing data analysis in bioinformatics. A ZINB model and a graph attention autoencoder are combined to denoise single-cell RNA sequencing data, the influence of data noise on a clustering result is reduced, data characteristic distribution is better fitted, the denoising performance of the autoencoder is improved, and the data is subjected to learning of intercellular potential features, so that an initial clustering result is obtained. Meanwhile, a self-optimization model is used to iteratively optimize the initial clustering result, so that a final clustering result is obtained, and the accuracy of the cell clustering result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of single-cell RNA sequencing data analysis technology in bioinformatics, and in particular to a self-optimizing single-cell clustering method. Background Technology

[0002] With the rapid development of sequencing technology, researchers have obtained a large amount of single-cell RNA-seq (RNA sequencing) data. Unsupervised clustering technology plays an important role in the analysis of single-cell RNA-seq data. Clustering methods for single-cell RNA-seq data can not only identify unknown cell types, but also reveal the heterogeneity and diverse complexity among cell subpopulations across tissues, developmental stages, and organisms. Through research on clustering methods for single-cell RNA-seq data, researchers can more accurately identify cell states, understand cell types, construct intercellular network structures, and gain a deeper understanding of the differentiation process of cells in major diseases. Currently, hierarchical clustering, spectral clustering, and clustering methods based on deep neural networks and GNNs (Graph Neural Networks) are widely used. However, these methods model the relationship between cells and gene expression, neglecting to fully explore the potential feature relationships between cells and remove noise. This makes it difficult for currently proposed clustering methods to fully utilize the features between data for effective clustering. Summary of the Invention

[0003] The purpose of this invention is to provide a self-optimizing single-cell clustering method that can effectively remove noise from single-cell RNA sequencing data and accurately learn the intercellular potential feature information of single-cell RN sequencing data, thereby improving the accuracy of clustering results.

[0004] To achieve the above objectives, the present invention provides the following solution:

[0005] A self-optimizing single-cell clustering method, comprising:

[0006] Obtain a single-cell RNA sequencing dataset of single-cell sequences to be classified;

[0007] The single-cell RNA sequencing dataset is input into a noise reduction autoencoder based on a zero-inflated negative binomial distribution for reconstruction and denoising to obtain a denoised single-cell RNA sequencing dataset.

[0008] Principal component analysis was used to reduce the dimensionality of the denoised single-cell RNA sequencing dataset to obtain the feature matrix of the single-cell sequences to be classified.

[0009] Based on the feature matrix, the K-nearest neighbor algorithm is used to obtain the graph adjacency matrix;

[0010] The feature matrix and the graph adjacency matrix are input together into the graph attention autoencoder to obtain the initial clustering results of the single-cell sequences to be classified.

[0011] The initial clustering results are iteratively optimized using a self-optimizing model to determine the final clustering results of the single-cell sequences to be classified.

[0012] Optionally, the training process of the denoising autoencoder based on the zero-inflated negative binomial distribution, the graph attention autoencoder, and the self-optimizing model is as follows:

[0013] Obtain multiple single-cell RNA sequencing dataset samples;

[0014] Data preprocessing was performed on each single-cell RNA sequencing dataset sample;

[0015] Construct the loss function of the denoising autoencoder based on the zero-inflated negative binomial distribution, and the total loss function of the graph attention autoencoder and the self-optimizing model;

[0016] Based on multiple preprocessed single-cell RNA sequencing datasets, the denoising autoencoder based on zero-inflated negative binomial distribution, the graph attention autoencoder, and the self-optimizing model are trained together using the loss function and the total loss function.

[0017] Optionally, the data preprocessing for each single-cell RNA sequencing dataset sample specifically includes:

[0018] Hierarchical Bayesian models were used to adjust for batch effects in single-cell RNA sequencing data within the single-cell RNA sequencing dataset, integrating all single-cell RNA sequencing data into the same space.

[0019] Spatial alignment of cells of the same type but from different sources within the same space;

[0020] Valid data were screened from all spatially aligned single-cell RNA sequencing data and then standardized.

[0021] Logarithmic transformation and Z-score normalization were performed on the standardized valid data to obtain preprocessed single-cell RNA sequencing dataset samples.

[0022] Optionally, the loss function of the denoising autoencoder based on the zero-inflated negative binomial distribution, and the total loss function of the graph attention autoencoder and the self-optimizing model are constructed, specifically including:

[0023] The loss function for constructing a denoising autoencoder based on a zero-inflated negative binomial distribution is NLL. ZINB=-log(ZINB(X|μ,θ)); where, NLL ZINB Let ZINB be the loss function, ZINB be the zero-inflation negative binomial term, X be the expression matrix obtained by logarithmic transformation and Z-score normalization, μ be the mean, and θ be the dispersion.

[0024] The reconstruction loss function of the graph attention autoencoder is: In the formula, L r The reconstruction loss function of the graph attention autoencoder, The feature in the i-th row and j-th column of the feature matrix, Let m' be the feature of the i-th row and j-th column in the graph adjacency matrix, and m' be the number of rows and n' be the number of columns in the feature matrix; the feature matrix and the graph adjacency matrix have the same number of rows and columns.

[0025] The clustering loss function for constructing the self-optimizing model is: In the formula, L c Let P be the clustering loss function. ij To optimize the features in the i-th row and j-th column of the membership matrix, q ij To optimize the features in the i-th row and j-th column of the membership matrix, c is the number of rows in the membership matrix and n is the number of columns in the membership matrix;

[0026] Based on the reconstruction loss function and the clustering loss function, the total loss function is established as L = L r +γL c In the formula, L is the total loss function, and γ is the hyperparameter that balances the two loss functions.

[0027] Optionally, the step of training the denoising autoencoder based on a zero-inflated negative binomial distribution, the graph attention autoencoder, and the self-optimizing model together using the loss function and the total loss function based on multiple preprocessed single-cell RNA sequencing dataset samples specifically includes:

[0028] A preprocessed single-cell RNA sequencing dataset sample is input into a noise reduction autoencoder based on a zero-inflated negative binomial distribution for reconstruction and denoising, resulting in a denoised single-cell RNA sequencing dataset sample.

[0029] Principal component analysis was used to reduce the dimensionality of the denoised single-cell RNA sequencing dataset to obtain the feature matrix of the single-cell sequence samples.

[0030] Based on the feature matrix of single-cell sequence samples, the graph adjacency matrix of single-cell sequence samples is obtained using the K-nearest neighbor algorithm;

[0031] The feature matrix and graph adjacency matrix of the single-cell sequence samples are input together into the graph attention autoencoder to obtain the initial clustering results of the single-cell sequence samples.

[0032] The initial clustering results of single-cell sequence samples are iteratively optimized using a self-optimizing model to determine the final clustering results of this training.

[0033] The above training process was repeated sequentially using each preprocessed single-cell RNA sequencing dataset sample to obtain the trained denoising autoencoder, graph attention autoencoder, and self-optimizing model based on zero-inflated negative binomial distribution.

[0034] A test dataset with a common cell type was constructed from multiple single-cell RNA sequencing datasets;

[0035] Based on the test dataset, the trained denoising autoencoder, graph attention autoencoder, and self-optimizing model based on the zero-inflated negative binomial distribution are evaluated using standardized mutual information and adjusted RAND index.

[0036] Optionally, three independent fully connected layers are added after the last hidden layer of the noise reduction autoencoder, and the outputs of the three fully connected layers are set to represent the impulse function adjustment factor of the zero-inflated negative binomial distribution, the mean of the negative binomial distribution, and the sparsity, respectively, to obtain the noise reduction autoencoder based on the zero-inflated negative binomial distribution.

[0037] Optionally, in the graph attention autoencoder, similarity information is integrated into the attention coefficients, and the attention coefficients are calculated by transforming the distance between two cells using a Gaussian kernel, which is formally expressed as follows: In the formula, e gl Let h be the attention coefficient between cell g and cell l, W be a learnable transformation matrix, and h be the number of cells. g For new characteristics of cell g, h l The input features are for cell l.

[0038] Optionally, the clustering process by which the graph attention autoencoder model obtains the initial clustering results of the single-cell sequences to be classified is as follows:

[0039] The k-means++ algorithm is used to select multiple initial cluster centers;

[0040] Based on multiple initial cluster centers, the standard k-means algorithm is used to perform clustering to obtain the initial clustering results of the single-cell sequences to be classified.

[0041] Optionally, the step of iteratively optimizing the initial clustering results using a self-optimizing model to determine the final clustering result of the single-cell sequences to be classified specifically includes:

[0042] The similarity between cells and cluster centers was measured using the Student's t-distribution;

[0043] Based on the aforementioned similarity, using the formula Calculate the membership matrix Q; where Z g For the embedding of cell g, U s For the embedding of cluster center s, U k Let k be the embedding of the cluster center k, and c' be the number of cell types;

[0044] The membership matrix Q is optimized using the formula. Obtain the membership matrix P; where P gs Let n' be the topology graph used as the target of Q to optimize and redistribute the relationships between cells, where n' is the number of cells.

[0045] The cluster centers and cell embeddings of the embeddings are updated based on the membership matrix Q and membership matrix P, and the formula s is used for each update. f =(b f -a f ) / max(b f -a f Calculate the silhouette coefficients until they converge to obtain the final clustering result; where s f Let a be the silhouette coefficient of cell f. f Let b be the distance from cell f to its cluster center. f Let f be the distance from cell f to other cluster centers.

[0046] Optionally, the initial clustering results are iteratively optimized using a self-optimizing model to determine the final clustering results of the single-cell sequences to be classified, and then the process further includes:

[0047] The final clustering results are visualized using the T-distribution random nearest neighbor embedding method, displaying the final clustering results on a two-dimensional coordinate system.

[0048] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0049] This invention discloses a self-optimizing single-cell clustering method that combines a ZINB model with a graph attention autoencoder to denoise single-cell RNA sequencing data. This reduces the impact of data noise on the clustering results, better fits the data feature distribution, improves the denoising performance of the autoencoder, and learns latent inter-cell features to obtain an initial clustering result. Simultaneously, a self-optimizing model is used to iteratively optimize the initial clustering result to obtain the final clustering result, thus improving the accuracy of cell clustering. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A flowchart of the self-optimizing single-cell clustering method provided in this embodiment of the invention;

[0052] Figure 2 A flowchart of model training provided for embodiments of the present invention;

[0053] Figure 3 The overall network diagram for model training provided in this embodiment of the invention;

[0054] Figure 4 The final clustering visualization diagram of the clustering method of the present invention and existing clustering methods is provided for embodiments of the present invention. Detailed Implementation

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] The purpose of this invention is to provide a self-optimizing single-cell clustering method that can effectively remove noise from single-cell RNA sequencing data and accurately learn the intercellular potential feature information of single-cell RN sequencing data, thereby improving the accuracy of clustering results.

[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] This invention provides a self-optimizing single-cell clustering method that combines ZINB autoencoders and graph attention autoencoders to achieve the learning and denoising of cell and gene expression features and inter-cell features during the clustering process of single-cell RNA sequencing (hereinafter referred to as single-cell RNA-seq) data. Finally, self-optimization is used to improve the initial clustering results, so that the originally independent clustering module and feature learning module benefit each other, resulting in a better final clustering result.

[0059] A self-optimizing single-cell clustering method, such as Figure 1As shown, the specific steps include:

[0060] Step S1: Obtain the single-cell RNA sequencing dataset of the single-cell sequences to be classified.

[0061] Step S2: Input the single-cell RNA sequencing dataset into a noise reduction autoencoder based on a zero-inflated negative binomial distribution for reconstruction and denoising to obtain a denoised single-cell RNA sequencing dataset.

[0062] Step S3: Principal component analysis is used to reduce the dimensionality of the denoised single-cell RNA sequencing dataset to obtain the feature matrix of the single-cell sequences to be classified.

[0063] Step S4: Based on the feature matrix, obtain the graph adjacency matrix using the K-nearest neighbor algorithm.

[0064] Step S5: Input the feature matrix and the graph adjacency matrix together into the graph attention autoencoder to obtain the initial clustering results of the single-cell sequences to be classified.

[0065] Step S6: Iteratively optimize the initial clustering results using a self-optimizing model to determine the final clustering results of the single-cell sequences to be classified.

[0066] Before applying the denoising autoencoder, graph attention autoencoder, and self-optimizing model based on the zero-inflated negative binomial distribution, all three are first trained, referring to... Figure 2 The training process is as follows:

[0067] 1) Adjusting for batch effects and data preprocessing:

[0068] Six publicly available real-world single-cell RNA-seq datasets downloaded from ArrayExpress and GEO databases were selected for single-cell clustering. Gene expression values ​​in these six datasets were derived from various tissues and cells, including GSE130114, GSE60361, GSE182211, GSE65525, GSE72859, and GSE86469. The raw single-cell RNA-seq data were read and batch-effect adjusted and preprocessed to avoid systematic technical biases introduced by different batch processing and measurement of sample data related to biological states. The single-cell RNA-seq datasets correspond to... Figure 3 D in M×N .

[0069] The steps for adjusting batch effects and preprocessing single-cell RNA-seq data include: First, using a hierarchical Bayesian model to adjust for batch effects in single-cell data and address inaccuracies caused by measurement sensitivity. Next, aligning cells of the same type from different sources in the single-cell space involves constructing a test dataset with common cell types and downsampling the dominant cell types in partially overlapping datasets to combine them. Then, quality control is performed on the single-cell data, filtering for mitochondria, low-quality cells, and hypervariable genes, followed by standardization of the filtered data. Finally, logarithmic transformation and Z-score normalization are applied to the data.

[0070] Hierarchical Bayesian models integrate datasets from different batches, expanding the number of single-cell datasets. This invention uses the Python-based single-cell gene expression analysis package SCANPY to effectively screen and filter the raw single-cell RNA-seq data, removing data with poor sequencing quality. The processed data is then logarithmically transformed and Z-score normalized to facilitate subsequent network learning and better fit the feature distributions among the data. The results after data preprocessing are as follows: Figure 3 X in m×n .

[0071] 2) Data reconstruction and denoising:

[0072] The single-cell RNA-seq data, after preprocessing with logarithmic transformation and Z-score normalization, is input into the ZINB deep count autoencoder cell feature denoising module. The autoencoder, combined with the DCA (deep count autoencoder) scalable denoising algorithm, denoises the processed single-cell RNA-seq data. The zero-inflated negative binomial distribution (ZINB distribution) is used to reconstruct the data. The reconstructed data can better preserve the original characteristics of the organism, which is conducive to better subsequent clustering.

[0073] The ZINB deep counting autoencoder (a denoising autoencoder based on a zero-inflated negative binomial distribution) cell feature denoising module uses a combination of a zero-inflated negative binomial distribution and a DCA denoising algorithm to denoise and reconstruct single-cell RNA-seq data. DCA fully considers the excessive dispersion and sparsity of single-cell data distribution. To better capture single-cell data, this invention adds three independent fully connected layers after the last hidden layer of the decoder. The three outputs learn the impulse function adjustment factor (data loss rate), the mean of the negative binomial distribution, and the sparsity (dispersion) of the zero-inflated negative binomial distribution, respectively. Finally, the denoising matrix generated by replacing the original count values ​​with the mean of the negative binomial components predicted by the output layer is represented by the likelihood function of the ZINB distribution as the loss function of this model.

[0074] The single-cell RNA-seq data to be analyzed is denoted by X. The decoding and encoding stages of the autoencoder correspond to each other, reconstructing the encoded data. The input dimension of the autoencoder is consistent with the dimension of the single-cell RNA-seq data used for training. Both the encoder and decoder have a four-layer network architecture. Recent research progress on single-cell data indicates that single-cell data most closely approximates the negative binomial distribution (NB), expressed by the formula: Because the dispersion of single-cell data is usually highly distorted, with variance exceeding the mean, it is unsuitable to approximate it using the Poisson distribution. Furthermore, the variance of single-cell data changes with the mean. In addition, single-cell data contains many zero values. These zero values ​​in gene expression data may originate from genes not expressed during biological processes or from data loss due to operational techniques during sequencing. To better capture structural information between cells and between cells and genes, a zero-inflation factor is added to the negative binomial (NB) distribution model; essentially, an impulse function is added at the zero point. This is achieved by using the ZINB distribution to model and train single-cell RNA-seq data, expressed as ZINB(x; π, μ, θ) = πδ(x) + (1-π)NB(x; μ, θ). This invention uses the matrix form of these parameters to calculate the loss function, defining the matrix calculation form of π, μ, and θ as follows: E = RELU(XW E B = RELU(EW) B D = RELU(BW) D ), Π = sigmoid(DW π ), Θ=exp(DW θ ), where Π, M, and Θ represent the matrix forms of π, μ, and θ, respectively. The denoising matrix X is generated by replacing the original count values ​​with the mean of the negative binomial components M predicted by the output layer, which is the final output of this method. The autoencoder based on the ZINB model connects three independent fully connected layers to the last layer of the decoder to evaluate the three parameters of ZINB: probability of data loss, mean, and dispersion. Combined with the DCA scalable denoising algorithm, the data is denoised. This invention expresses the loss function of the ZINB denoising module as the negative likelihood distribution of ZINB: NLL ZINB = -log(ZINB(X|μ,θ)),

[0075] An autoencoder based on the ZINB model can be viewed as a low-pass filter for scRNA-seq data. Compared to other low-pass filtering methods, ZINB better preserves the information of non-zero values ​​in the count matrix data with a lower loss rate and is more accurate in fitting inter-cell features, resulting in better clustering results. This is because ZINB divides the data into zero and non-zero values ​​during processing, ensuring that the large number of zero values ​​in the count matrix does not affect the fitting process of non-zero values. DCA denoising methods are highly robust and fast, eliminating technical differences in the data and capturing the cell population structure in the real dataset, improving downstream analysis and further promoting clustering results.

[0076] Correspondence between data reconstruction and denoising results Figure 3 Denoising data X in m×n .

[0077] 3) Data dimensionality reduction and graph attention autoencoder clustering:

[0078] The data reconstructed by the denoising autoencoder has the same dimensionality as the original data, which is still high-dimensional. High-dimensional data brings great difficulties to the identification of cell types. Principal component analysis (PCA) is used to reduce the dimensionality of the sample data. After obtaining low-dimensional denoised single-cell data, graph attention autoencoder is used to learn the potential features between cells and obtain simple clustering results to determine the cell type.

[0079] In step 3), principal component analysis (PCA) is used to perform initial dimensionality reduction on the reconstructed data, resulting in a new feature matrix (corresponding to...). Figure 3 In ), and use the K-nearest neighbor algorithm to obtain the graph adjacency matrix (corresponding to) of the dimensionality-reduced data. Figure 3 A in n×n Then, the dimensionality-reduced feature matrix and adjacency matrix are mapped together into the low-dimensional latent feature space of the graph attention autoencoder, and the topological information is also embedded into the latent feature space of the cells, so that the learned features can be better clustered.

[0080] First, the reconstructed single-cell RNA-seq data conforms to the model. Where D represents the decoder, W represents the weight matrix of the encoder and decoder, and μ represents the mean. Since the dimensionality of the reconstructed data is the same as that of the preprocessed data, Principal Component Analysis (PCA) is used to initialize and reduce the dimensionality of the reconstructed data. Then, the initially reduced matrix and the adjacency matrix A are mapped together into the low-dimensional latent feature space of the graph attention autoencoder, and the importance between cells is measured by the attention coefficients. Given a cell topology graph, the graph attention layer learns the features between cells by aggregating the features of its neighboring cells with different weights. Since the weights are automatically assigned based on the features of the cell and its neighbors, the latent feature relationships between cells can be naturally captured, so that the learned features can be better clustered. Specifically, the function of the graph attention layer can be described as follows: Furthermore, to measure the importance of one cell to another, this invention integrates similarity information into the attention coefficient. The attention coefficient is calculated by transforming the distance between two cells using a Gaussian kernel. This approach considers both the importance between cells and sufficient learning of features, as well as the relationship between data and clusters and the influence of the distribution of training data on clustering. The formula is expressed as follows: The attention coefficient is normalized using the softmax function to ensure comparability when comparing different cells, as expressed by the formula: Furthermore, multi-head attention is employed to stabilize the feature learning process. G independent attention modules are used to jointly learn the features. The first three layers and the last layer of the autoencoder are aggregated using concatenation and averaging functions, respectively. This can be described as follows: Throughout the process, to better constrain the learning process, the feature matrix X reconstructed by the graph attention autoencoder is... 1′ (correspond Figure 3 In ) and the input feature matrix X 1 The reconstruction loss is calculated using MAE: correspond Figure 3 The MAE loss in the graph attention autoencoder network is used to capture the potential feature relationships between cells. Finally, the learned features can be clustered well and cell types can be determined by training the graph attention autoencoder network.

[0081] In the clustering initialization process using the graph attention autoencoder model, k-means++ is employed to address the centroid initialization problem. This involves first randomly selecting a centroid U1 among the data points; then, for each data point X that has not yet been selected, calculating... That is, the distance between X and the nearest center already selected; then, a new data point is randomly selected as the new center using a weighted probability distribution, where the probability of selecting point X is proportional to the distance between X and the nearest center. The steps above are repeated proportionally until k cluster centers are selected (i.e., j = k). After selecting K initial centers, the standard k-means algorithm is used for clustering.

[0082] 4) Self-optimizing clustering and data visualization:

[0083] After pre-training with a graph attention autoencoder, an iterative and self-optimizing clustering method is used, allowing the two independent modules, clustering and feature learning, to benefit each other. This improves the final clustering results and more accurately identifies cell types, which are then identified as potential cell subtypes. The final clustering results are visualized using a T-distribution random nearest neighbor embedding method, and analyzed in conjunction with data from existing cell and related cell databases. This enables researchers to discover new cell types, study cell differentiation and developmental trajectories, and improve their understanding of human diseases.

[0084] The initial clustering results are improved using a self-optimizing model to obtain better clustering and more accurate cell type identification. The specific steps include: first, using the Student's t-distribution to measure the similarity between cells and cluster centers (initialized by k-means); the membership matrix Q between cells can be calculated as follows: Then, based on the Q matrix, a more optimized membership matrix P is constructed, defined as follows: Membership matrix P ij The objective term Q is used to optimize and redistribute the topological graph of relationships between cells. After redistribution, the squared term makes the membership distribution between cells more explicit. The embedded cluster centers and cell embeddings are updated based on Q and P to obtain better clustering results. On one hand, to better describe the clustering, the embedding of the cluster centers is updated using a weighted average of all cell features within each cluster, with Q as the weight, and is formulaically expressed as: correspond Figure 3 Middle U d×c , l i This refers to the cluster label of cell i during the iterative clustering process. On the other hand, to supervise the learning of latent features between cells and enhance the underlying clustering structure, Q (corresponding to...) is used... Figure 3 China Q c×n ) and P (corresponding to Figure 3 China P c×n The KL divergence between the clusters is calculated as the clustering loss, and the formula is as follows: correspond Figure 3 The KL loss is used in the training process; finally, during training, this invention calculates contour coefficients based on latent feature learning to monitor the clustering performance, and the contour coefficients s of cell i are used. i For: s i =(b i -ai ) / max(b i -a i The latent features of cells and cluster centers will be iteratively fine-tuned until the silhouette coefficients converge, obtaining the final clustering results and cell type determination. The total loss function is expressed as: L = L r +γL c Finally, the T-distributed random nearest neighbor embedding method is used to visualize the final clustering results, displaying them on a two-dimensional coordinate system.

[0085] The clustering performance evaluation metrics used in this invention mainly include Normalized Mutual Information and Adjusted Rand Index. The higher the values ​​of these two metrics, the better the clustering performance of the method.

[0086] After the above training process, we obtain a trained denoising autoencoder, graph attention autoencoder, and self-optimizing model based on a zero-inflated negative binomial distribution. The trained model is then used to cluster the single-cell sequences to be classified, i.e., steps S1 to S6.

[0087] In step S5, the clustering process of obtaining the initial clustering results of the single-cell sequences to be classified by the graph attention autoencoder model is as follows: multiple initial cluster centers are selected using the k-means++ algorithm; based on the multiple initial cluster centers, clustering is performed using the standard k-means algorithm to obtain the initial clustering results of the single-cell sequences to be classified.

[0088] Step S6 uses a self-optimizing model to iteratively optimize the initial clustering results to determine the final clustering results of the single-cell sequences to be classified. Specifically, this includes: using a Student's t-distribution to measure the similarity between cells and cluster centers; and based on the similarity, using the formula... Calculate the membership matrix Q; where Z g For the embedding of cell g, U s For the embedding of cluster center s, U k Let c' be the embedding of the cluster center k, and c' be the number of cell types; optimize the membership matrix Q using the formula Obtain the membership matrix P; where P gs Let n' be the number of cells, and let n' be the target of Q used to optimize and redistribute the topological graph of relationships between cells. The cluster centers and cell embeddings are updated based on the membership matrix Q and membership matrix P, and at each update, formula s is used. f =(b f -a f ) / max(b f -af Calculate the silhouette coefficients until they converge to obtain the final clustering result; where s f Let a be the silhouette coefficient of cell f. f Let b be the distance from cell f to its cluster center. f Let f be the distance from cell f to other cluster centers.

[0089] After determining the final clustering result of the single-cell sequence to be classified in step S6, the method further includes: visualizing the final clustering result using the T-distribution random nearest neighbor embedding method, so that the final clustering result is displayed on a two-dimensional coordinate.

[0090] Figure 4 The graph shows a comparison of the clustering results of the self-optimizing single-cell clustering method (scZDGAC) of the present invention with existing clustering methods (scGAE, SCV1, Seurat, SC3, scZiDesk, scDRHA, DESC, scGNN, scDeepCluster and scGAC). It can be seen that the self-optimizing single-cell clustering method of the present invention yields better clustering results.

[0091] The ZINB autoencoder model is an unsupervised deep learning method that not only effectively reduces the dimensionality of input data but also better preserves the non-zero data information in single-cell RNA-seq data with lower loss rate and greater accuracy in fitting inter-cell features. The DCA denoising method is highly robust and fast, eliminating technical differences in the data and capturing the cell population structure in the real dataset, thus improving downstream analysis and better promoting clustering results.

[0092] Single-cell RNA-seq data is not only high-dimensional, but also contains a lot of noise and batch effects. This noise usually manifests as sparse single-cell data, a large number of zero values, on the one hand from some genes that are not expressed, and on the other hand from the failure to detect the expression values ​​of genes due to defects in sequencing and other technologies. Furthermore, batch effects can also occur due to data from different platforms, data from different periods on the same platform, data from the same sample with different reagents, and data from the same sample at different times.

[0093] In the process of deep clustering of single-cell RNA-seq data, this invention designs a self-optimizing single-cell clustering method that combines the ZINB model with a graph attention autoencoder. This method combines autoencoders, principal component analysis, graph attention autoencoders, self-optimizing improved clustering, and T-distribution random nearest neighbor embedding to solve the challenges encountered in single-cell RNA data clustering, such as feature learning, batch effects, dimensionality reduction, data integration, clustering, and data visualization. Furthermore, it rapidly denoises by introducing a zero-inflated negative binomial distribution and combining it with the DCA scalable denoising method, while also eliminating technical differences in the data and capturing the cell population structure in real datasets. This method can be applied to datasets of millions of cells, improving biological discovery.

[0094] This invention combines the ZINB model with a graph attention autoencoder to denoise single-cell RNA-seq data, reducing the impact of data noise on clustering results, better fitting the data feature distribution, improving the denoising performance of the autoencoder, and learning latent features to execute the k-means clustering algorithm to obtain a simple clustering result. Simultaneously, a self-optimizing model is used to iteratively optimize the initial simple clustering result to obtain a better clustering result. Finally, the T-distribution random nearest neighbor embedding method is used to visualize the clustering results. This not only identifies cell subtypes and integrates datasets from different batches, but also expands the number of single-cell datasets, enabling researchers to make more discoveries about cell types and study more complex cell differentiation and developmental trajectories.

[0095] The present invention has the following advantages:

[0096] 1. Reduce the impact of batch effects in single-cell RNA-seq data on the final clustering results;

[0097] 2. Reduce the impact of high dimensionality, high sparsity, and high noise in single-cell RNA-seq data on clustering results;

[0098] 3. In the process of clustering single-cell RNA-seq data, it can effectively learn the characteristic relationships between cells and gene expression, as well as between cells, and has a strong data representation learning ability;

[0099] 4. It can effectively integrate single-cell data from multiple different sources with batch effects, and the model can fit the feature distributions between the data well after training.

[0100] 5. It has good data visualization capabilities after clustering.

[0101] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0102] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A self-optimizing single-cell clustering method, characterized in that, include: Obtain a single-cell RNA sequencing dataset of single-cell sequences to be classified; The single-cell RNA sequencing dataset is input into a denoising autoencoder based on a zero-inflated negative binomial distribution for reconstruction and denoising to obtain a denoised single-cell RNA sequencing dataset. Three independent fully connected layers are added after the last hidden layer of the denoising autoencoder, and the outputs of the three fully connected layers are set to represent the impulse function adjustment factor of the zero-inflated negative binomial distribution, the mean of the negative binomial distribution, and the sparsity, respectively, to obtain the denoising autoencoder based on the zero-inflated negative binomial distribution. Principal component analysis was used to reduce the dimensionality of the denoised single-cell RNA sequencing dataset to obtain the feature matrix of the single-cell sequences to be classified. Based on the feature matrix, the K-nearest neighbor algorithm is used to obtain the graph adjacency matrix; The feature matrix and the graph adjacency matrix are input together into the graph attention autoencoder to obtain the initial clustering results of the single-cell sequences to be classified. In the graph attention autoencoder, similarity information is integrated into the attention coefficients, and the attention coefficients are calculated by transforming the distance between two cells using a Gaussian kernel, which is formally expressed as follows: In the formula, e gl For cells g and cells l Attention coefficient between them W As a learnable transformation matrix, h g For cells g New features h l For cells l Input features; The initial clustering results are iteratively optimized using a self-optimizing model to determine the final clustering results of the single-cell sequences to be classified, specifically including: The similarity between cells and cluster centers was measured using the Student's t-distribution; Based on the aforementioned similarity, using the formula Calculate the membership matrix In the formula, Z g For cells g Embedded, U s Cluster center s Embedded, U k Cluster center Embedded, c' The number of cell types; membership matrix Optimize using formulas Obtain the membership matrix In the formula, P gs For being used as The goal is to optimize and redistribute the topological graph of relationships between cells. n' For cell number; Based on the membership matrix and membership matrix Update the cluster centers and cell embeddings of the embeddings, and use the formula on each update. Calculate the silhouette coefficients until they converge to obtain the final clustering result; where, For cells f The profile coefficient, For cells f Distance to the cluster center For cells f Distance to other cluster centers.

2. The self-optimizing single-cell clustering method according to claim 1, characterized in that, The training process of the denoising autoencoder based on the zero-inflated negative binomial distribution, the graph attention autoencoder, and the self-optimizing model is as follows: Obtain multiple single-cell RNA sequencing dataset samples; Data preprocessing was performed on each single-cell RNA sequencing dataset sample; Construct the loss function of the denoising autoencoder based on the zero-inflated negative binomial distribution, and the total loss function of the graph attention autoencoder and the self-optimizing model; Based on multiple preprocessed single-cell RNA sequencing datasets, the denoising autoencoder based on zero-inflated negative binomial distribution, the graph attention autoencoder, and the self-optimizing model are trained together using the loss function and the total loss function.

3. The self-optimizing single-cell clustering method according to claim 2, characterized in that, The data preprocessing for each single-cell RNA sequencing dataset sample specifically includes: Hierarchical Bayesian models were used to adjust for batch effects in single-cell RNA sequencing data within the single-cell RNA sequencing dataset, integrating all single-cell RNA sequencing data into the same space. Spatial alignment of cells of the same type but from different sources within the same space; Valid data were screened from all spatially aligned single-cell RNA sequencing data and then standardized. Logarithmic transformation and Z-score normalization were performed on the standardized valid data to obtain preprocessed single-cell RNA sequencing dataset samples.

4. The self-optimizing single-cell clustering method according to claim 2, characterized in that, The loss function of the denoising autoencoder based on the zero-inflated negative binomial distribution, and the total loss function of the graph attention autoencoder and the self-optimizing model are constructed, specifically including: The loss function for constructing a denoising autoencoder based on a zero-inflated negative binomial distribution is as follows: In the formula, NLL ZINB For loss function, ZINB It is a zero-inflation negative binomial term. X The expression matrix is ​​obtained through logarithmic transformation and Z-score normalization. μ This is the average value. θ The degree of dispersion; The reconstruction loss function of the graph attention autoencoder is: In the formula, L r The reconstruction loss function of the graph attention autoencoder, The first in the characteristic matrix i line, number j Column characteristics, The first element in the graph adjacency matrix i line, number j Column characteristics, m ' represents the row number of the characteristic matrix. n' The number of columns in the characteristic matrix; the characteristic matrix and the graph adjacency matrix have the same number of rows and columns; The clustering loss function for constructing the self-optimizing model is: In the formula, L c For clustering loss function, P ij To optimize the membership matrix, the first... i line, number j Column characteristics, q ij To optimize the membership matrix of the first generation i line, number j The column characteristics, where c is the number of rows in the membership matrix. n is the number of columns in the membership matrix; Based on the reconstruction loss function and the clustering loss function, the total loss function is established as follows: In the formula, L Let γ be the total loss function, and γ be the hyperparameter balancing the two loss functions.

5. The self-optimizing single-cell clustering method according to claim 2, characterized in that, The process of training the denoising autoencoder based on a zero-inflated negative binomial distribution, the graph attention autoencoder, and the self-optimizing model together using the loss function and the total loss function based on multiple preprocessed single-cell RNA sequencing datasets specifically includes: A preprocessed single-cell RNA sequencing dataset sample is input into a noise reduction autoencoder based on a zero-inflated negative binomial distribution for reconstruction and denoising, resulting in a denoised single-cell RNA sequencing dataset sample. Principal component analysis was used to reduce the dimensionality of the denoised single-cell RNA sequencing dataset to obtain the feature matrix of the single-cell sequence samples. Based on the feature matrix of single-cell sequence samples, the graph adjacency matrix of single-cell sequence samples is obtained using the K-nearest neighbor algorithm; The feature matrix and graph adjacency matrix of the single-cell sequence samples are input together into the graph attention autoencoder to obtain the initial clustering results of the single-cell sequence samples. The initial clustering results of single-cell sequence samples are iteratively optimized using a self-optimizing model to determine the final clustering results of this training. The above training process was repeated sequentially using each preprocessed single-cell RNA sequencing dataset sample to obtain the trained denoising autoencoder, graph attention autoencoder, and self-optimizing model based on zero-inflated negative binomial distribution. A test dataset with a common cell type was constructed from multiple single-cell RNA sequencing datasets; Based on the test dataset, the trained denoising autoencoder, graph attention autoencoder, and self-optimizing model based on the zero-inflated negative binomial distribution are evaluated using standardized mutual information and adjusted RAND index.

6. The self-optimizing single-cell clustering method according to claim 1, characterized in that, The clustering process by which the graph attention autoencoder model obtains the initial clustering results of the single-cell sequences to be classified is as follows: The k-means++ algorithm is used to select multiple initial cluster centers; Based on multiple initial cluster centers, the standard k-means algorithm is used to perform clustering to obtain the initial clustering results of the single-cell sequences to be classified.

7. The self-optimizing single-cell clustering method according to claim 1, characterized in that, The initial clustering results are iteratively optimized using a self-optimizing model to determine the final clustering results of the single-cell sequences to be classified. This process then includes: The final clustering results are visualized using the T-distribution random nearest neighbor embedding method, displaying the final clustering results on a two-dimensional coordinate system.