Single cell transcriptome data clustering method based on graph contrast representation learning

By adopting the method of learning based on the comparison of diagrams in the data cluster of the single -cell RNA sequencing, combining the diagram of the diagram neural network and the feed neural network, the comparative learning and attention mechanism is added to solve the high sparse and high -dimensional data clustering class The difficulty of the cluster has significantly improved the effect of the cluster.

CN119339811APending Publication Date: 2025-01-21XIDIAN UNIV

Patent Information

Application Number
CN202411413130.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing technology is difficult to cluster effectively when processing single-cell RNA sequencing data with high sparsity and high dimensionality. Traditional methods ignore common structural information between cells. Graph neural networks rely on input graph structures, and the comparison learning framework is It is difficult to find appropriate enhancement methods in high-dimensional data, resulting in poor clustering effects.

Method used

Using the method of learning based on graph comparison, by constructing the K-near neighbor cell diagram, the combination of the attention neural network and the feed neural network is used, the comparative learning framework and attention mechanism are added to optimize the learning effect of the neural network, and through the child Figure sampling and random feature shielding generate enhanced views, and calculate the comparison loss to learn cell representation.

Benefits of technology

It improved the effect of single -cell clustering, combined with deep -automatic encoder and diagram neural network, fully considers the cell characteristics and intercormed structure information, optimized the neighborhood relationship of the cell diagram and the learning effect of the convolutional neural network, significantly improved, significantly improved Polycladium NMI and ARI scores.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339811A_ABST
    Figure CN119339811A_ABST
Patent Text Reader

Abstract

The invention relates to a single-cell transcriptome data clustering method based on graph contrast representation learning, and belongs to the technical field of single-cell transcriptome data clustering. Comprising the following steps: acquiring single-cell transcription data; preprocessing the acquired single cell transcription data; obtaining a first enhanced view and a second enhanced view based on the preprocessed single cell transcription data; constructing a clustering model, wherein the clustering model comprises a first encoder, a second encoder, a first decoder and a second decoder; sequentially inputting the first enhanced view into a first encoder and a first decoder for training, and sequentially inputting the second enhanced view into a second encoder and a second decoder for training; and carrying out single cell transcriptome data clustering by using the first encoder and the first decoder of the trained clustering model. According to the method, the influence of the characteristics of the single cell transcriptome data on the clustering effect is weakened, so that a better clustering effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of single-cell transcriptome data clustering, and in particular to a single-cell transcriptome data clustering method based on graph contrast representation learning, which provides reference data for single-cell RNA sequencing (scRNA-seq) technology. Background Art

[0002] Single-cell RNA sequencing (scRNA-seq) technology allows researchers to measure gene expression at the single-cell level and reveal heterogeneity between cells, which is crucial for depicting cell lineages, identifying rare cell types, and understanding cell state transitions. Among them, clustering single cells based on scRNA-seq data is a basic step, and the clustering effect affects the accuracy and credibility of subsequent analysis. However, the data characteristics of scRNA-seq data increase the difficulty of clustering. On the one hand, due to the sensitivity and cost limitations of single-cell sequencing, the sequencing depth of each cell is usually low. At the same time, the expression levels of many genes in certain cells are extremely low, which leads to the fact that scRNA-seq data are usually highly sparse. On the other hand, scRNA-seq can measure the expression levels of thousands of genes in a single cell, so each cell is represented as a vector with thousands of dimensions in the data set. High-dimensional data consumes computing resources and makes it difficult for traditional distance metrics and dimensionality reduction methods to achieve results in lower dimensions.

[0003] Early research on scRNA-seq data mainly relied on dimensionality reduction techniques, such as using PCA, t-SNE, U-MAP and other dimensionality reduction algorithms to obtain representative cell dimensionality reduction representations, and then using traditional clustering algorithms (such as K-means algorithm, Spectral algorithm) to identify cell types for clustering. Although these methods can achieve good results on batch RNA sequencing data, it is difficult to achieve good results on highly sparse and high-dimensional scRNA-seq data.

[0004] In recent years, some studies have tried to address the high-dimensional characteristics of scRNA-seq data through autoencoder networks. An autoencoder is an unsupervised learning neural network that aims to learn an effective representation of data. It consists of two parts: an encoder and a decoder. The encoder maps the input data to a low-dimensional latent space representation in order to remove redundant information and capture the key features of the data. The decoder reconstructs the original data from this low-dimensional representation. By minimizing the error between the input data and the reconstructed data, the network can gradually optimize the representation. Representative technical solutions of this technical idea are as follows: 1. The unsupervised deep embedding (DEC) method for cluster analysis learns the mapping of data from data space to low-dimensional feature space through neural networks, and repeatedly optimizes the clustering target therein; 2. The single-cell RNA sequence data denoising (DCA) method using deep count autoencoders uses a negative binomial noise model with or without zero inflation on the basis of DEC to consider the count distribution, overdispersion and sparsity of the data, and captures nonlinear gene-gene dependencies; 3. The single-cell RNA-seq data clustering (scDeepCluster) method based on deep learning methods introduces a fine-tuning strategy to optimize the clustering results. During the optimization process, the accuracy of data reconstruction and the convenience of feature representation for clustering division are considered; 4. The self-training deep soft K-means clustering (scziDesk) method for single-cell RNA sequence data combines deep learning technology with denoising autoencoder technology to characterize scRNA-seq data, and proposes a soft self-training K-means algorithm to cluster cell groups in the learned latent space.

[0005] Some other studies construct the relationship features between cells by constructing a cell-cell graph, and use a graph neural network (GNN) on the graph to aggregate cell information. Each node in the graph neural network receives information from neighboring nodes, summarizes this information through a certain aggregation function, and then updates the node's own feature representation through an update function. Representative technical solutions of this technical idea are as follows: 1. The single-cell graph neural network (scGNN) method formulates and aggregates the relationship between cells through a graph neural network, integrates three iterative multimodal autoencoders, and uses a left-truncated mixed Gaussian model to model heterogeneous gene expression patterns; 2. The single-cell graph convolutional network (GraphSCC) method first calculates the structural relationship between cells through a graph convolutional network, and then obtains the dimensionality reduction representation of the cells through a graph convolutional network and a denoising autoencoder network, and optimizes the clustering results through a dual self-supervision module; 3. The deep fusion clustering network (DFCN) method proposes a module based on interdependent learning structure and attribute information fusion (SAIF) to merge autoencoders and graph autoencoders to improve the clustering effect; 4. The single-cell graph autoencoder (scGAE) method constructs a cell graph and uses a multi-task-oriented graph autoencoder to simultaneously retain the topological structure information and feature information in scRNA-seq data.

[0006] Contrastive learning is an unsupervised learning method that trains models by comparing the similarities and differences between samples. Its core idea is to bring similar pairs of samples closer together and push dissimilar pairs of samples farther apart to learn more discriminative feature representations. Because the contrastive learning framework aims to learn cell representations by comparing the similarities between positive and negative pairs of instances in the representation space, the resulting cell representations are more tolerant to noise, while the reconstruction-based method only relies on reconstructing the input matrix and has weak tolerance to noise. Therefore, compared with the reconstruction-based contrastive learning method, the contrastive learning framework is more suitable for analyzing scRNA-seq data with high sparsity. The representative technical solutions for clustering research using the contrastive learning framework are as follows: 1. The self-supervised contrastive clustering (contrastive-sc) method of scRNA-seq data adopts an instance-based contrastive learning method, in which the positive pairs are anchor cells after randomly masking genes, and the negative pairs are all other cells for contrastive learning. 2. The scRNA-seq data clustering method based on graph prototype contrastive learning (scGPCL) combines contrastive learning with graph convolutional neural networks, uses subgraph sampling and random feature masking methods to generate enhanced views of the generated cell-gene bipartite graph, and simultaneously calculates the instance contrast loss and prototype contrast loss for the sampled anchor cells to learn cell representation.

[0007] For various technologies that use autoencoder networks for dimensionality reduction, they mainly focus on extracting the features of single cells. In the process of training the network, the common structural information between cells is ignored, and the implicit information of scRNA-seq data is not fully mined.

[0008] Various technologies that aggregate cell information and predict node attributes and relationships by constructing a cell-cell graph and applying graph neural networks (GNN) on the graph are overly dependent on the input graph structure. If the adjacency relationship or topological structure of the graph is unreasonable, the learning effect of the model may be poor, which in turn affects the clustering effect.

[0009] For various techniques using the contrastive learning framework, contrastive learning relies on data augmentation to generate positive sample pairs, but for high-dimensional data such as scRNA-seq data, it is difficult to find appropriate augmentation methods. Inappropriate augmentation methods may cause confusion in the feature space, thereby affecting the quality of clustering. Summary of the invention

[0010] The technical problems to be solved by the present invention are:

[0011] In order to avoid the shortcomings of the prior art, the present invention provides a single-cell transcriptome data clustering method based on graph contrast representation learning, aiming to weaken the influence of the above features of scRNA-seq data on the clustering effect, so as to achieve better clustering effect.

[0012] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0013] A single cell transcriptome data clustering method based on graph contrast representation learning, characterized by comprising:

[0014] Obtain single-cell transcriptional data;

[0015] Preprocess the acquired single-cell transcription data;

[0016] Acquire a first enhanced view and a second enhanced view based on the preprocessed single-cell transcription data;

[0017] Constructing a clustering model, wherein the clustering model includes a first encoder, a second encoder, a first decoder, and a second decoder;

[0018] Inputting the first enhanced view into the first encoder and the first decoder in sequence for training, and inputting the second enhanced view into the second encoder and the second decoder in sequence for training;

[0019] The first encoder and the first decoder of the trained clustering model are used to cluster the single-cell transcriptome data.

[0020] A further technical solution of the present invention: the step of obtaining single cell transcription data comprises:

[0021] Single-cell RNA sequencing technology is used to measure the gene expression levels of single cells in the target tissue to generate single-cell transcriptome data.

[0022] A further technical solution of the present invention: the preprocessing of the acquired single-cell transcription data comprises:

[0023] Remove invalid cells with no gene expression, and eliminate genes with a total expression level lower than 1 in all cells;

[0024] Low-quality cells with mitochondrial gene expression accounting for more than 5% were excluded, and genes with expression variability in the top 20% were extracted from the filtered data set;

[0025] Calculate the gene library size l per cell i , as the total reads per cell, and dividing the library size by its median to obtain the size factor s per cell i ;

[0026] Divide the number of reads for each cell by its size factor s i , and log(x+1) transformation is performed to obtain the normalized gene expression matrix X, where x is the cell.

[0027] A further technical solution of the present invention: the acquisition of the first enhanced view and the second enhanced view based on the preprocessed single-cell transcription data comprises:

[0028] The gene expression similarity ρ between any two cells x and y is calculated by the Pearson correlation coefficient xy ;

[0029] According to the gene expression matrix X and similarity ρ xv , construct K-nearest neighbor cell graph G=(V, E);

[0030] Using the constructed K-nearest neighbor cell graph G=(V, E), two enhanced views G1=(V1, E1) and G2=(V2, E2) are generated through two data augmentation methods: subgraph sampling and random feature masking.

[0031] A further technical solution of the present invention: the first encoder and the second encoder are both graph attention neural networks GAT; the first decoder and the second decoder are both feedforward neural networks FNN.

[0032] A further technical solution of the present invention: the first enhanced view is sequentially input into the first encoder and the first decoder for training; the second enhanced view is sequentially input into the second encoder and the second decoder for training; comprises:

[0033] The pre-training stage includes:

[0034] Input the first enhanced view into the first encoder to obtain the gene features of the first enhanced view, and input the second enhanced view into the second encoder to obtain the gene features of the second encoder; the gene features of the first enhanced view and the gene features of the second encoder are combined into a positive cell node, and the gene features of the second encoder and the gene features of the first enhanced view are combined into a negative cell node; respectively calculate the contrast loss of the positive cell node and the negative cell node, and calculate the total contrast loss based on the contrast loss of the positive cell node and the contrast loss of the negative cell node;

[0035] The first enhanced view is sequentially input into the first encoder and the first decoder to calculate the first ZINB loss, and the second enhanced view is sequentially input into the second encoder and the second decoder to calculate the second ZINB loss; an average ZINB loss is calculated based on the first ZINB loss and the second ZINB loss;

[0036] The first optimization function is determined based on the total contrast loss and the average ZINB loss, and the clustering model parameters are adjusted using the Adam optimizer;

[0037] The fine-tuning stage includes:

[0038] The clustering loss is calculated based on the first encoder using KL divergence, the third ZINB loss is calculated based on the first decoder, the second optimization function is determined based on the clustering loss and the third ZINB loss, and the clustering model parameters are further optimized using the Adam optimizer.

[0039] A further technical solution of the present invention: the step of inputting the first enhanced view into the first encoder to obtain the gene features of the first enhanced view comprises:

[0040] Calculate the similarity coefficient between any two genes in the first enhanced view;

[0041] The similarity coefficient is normalized to obtain the attention coefficient;

[0042] Based on the attention coefficient, the gene features of the first enhanced view are aggregated through a multi-head attention mechanism.

[0043] A further technical solution of the present invention: the step of inputting the second enhanced view into the second encoder to obtain the gene features of the second enhanced view comprises:

[0044] Calculate the similarity coefficient between any two genes in the second enhanced view;

[0045] The similarity coefficient is normalized to obtain the attention coefficient;

[0046] Based on the attention coefficient, the gene features of the second enhanced view are aggregated through a multi-head attention mechanism.

[0047] A further technical solution of the present invention is as follows: the first optimization function is determined based on the total contrast loss and the average ZINB loss, specifically:

[0048]

[0049] Among them, λ1 is the parameter that controls the proportion of instance contrast loss, L Con is the total contrast loss, is the average ZINB loss.

[0050] A further technical solution of the present invention: the second optimization function is determined based on the clustering loss and the third ZINB loss, specifically:

[0051]

[0052] Among them, λ2 is a hyperparameter used to control the weight of clustering loss, L Cluster is the clustering loss, For the third ZINB loss.

[0053] The beneficial effects of the present invention are:

[0054] The present invention provides a single-cell transcriptome data clustering method based on graph contrast representation learning, which optimizes the way of constructing cell graphs, combines the contrast learning framework in the graph neural network and adds the attention mechanism to optimize the learning effect of the graph neural network, thereby improving the single-cell clustering effect based on scRNA-seq data. The details are as follows:

[0055] 1. Combining deep autoencoders and graph neural networks fully considers the characteristics of individual cells and the common structural information between cells, improving the clustering effect.

[0056] 2. When constructing the K-nearest neighbor cell graph, the Pearson correlation coefficient is used instead of the traditional Euclidean similarity and cosine similarity to calculate the distance between cell nodes, which optimizes the adjacency relationship of the cell graph and thus optimizes the learning effect of the graph neural network.

[0057] 3. Integrate the attention mechanism into the graph convolutional neural network and expand multiple single attention mechanisms to multi-head attention mechanisms to achieve more targeted aggregation of neighbor nodes.

[0058] 4. Use two data augmentation methods, sub-graph sampling and random feature masking, to generate two enhanced views to calculate the contrast loss. By minimizing the contrast loss, the positive sample pairs are brought closer in the cell representation space and the negative sample pairs are pushed away to learn the cell representation.

[0059] 5. In the pre-training stage of the neural network model, the contrastive learning loss and ZINB loss are combined, and the distribution of cells and the similarity between samples are optimized at the same time, resulting in better parameter optimization results. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.

[0061] Figure 1 Flow chart of the method of the present invention.

[0062] Figure 2 Architectural diagram of the method implemented by the present invention.

[0063] Figure 3 Visualization of cell clusters in dimensionality-reduced representation. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0065] The present invention provides a single-cell transcriptome data clustering method based on graph contrast representation learning, comprising:

[0066] First, the single-cell transcriptome data is preprocessed and a cell map is constructed, and then trained using an unsupervised deep embedding clustering algorithm. In the pre-training stage, the present invention uses an autoencoder combined with a zero-inflated negative binomial distribution (ZINB) model as a basic framework to build a clustering model, learns the relationship weight information between cells through a graph attention neural network, uses contrastive learning to close the distance between anchor cells, and obtains an overall loss by combining the ZINB loss calculated according to the autoencoder result and the contrast loss calculated by contrastive learning, and uses Adam optimizer to optimize weight parameters. In the fine-tuning stage, the present invention uses Kullback-Leibler (KL) divergence to calculate clustering loss, combines clustering loss and ZINB loss to calculate overall loss, and uses Adam optimizer to further optimize weights. Finally, the single-cell clustering results are obtained by a trained clustering model.

[0067] The specific implementation steps of the present invention are as follows:

[0068] (1) Single-cell RNA sequencing (scRNA-seq) is used to measure the gene expression levels of single cells in the target tissue and generate single-cell transcriptome data.

[0069] (2) Preprocessing of single-cell transcriptome scRNA-seq data:

[0070] (2a) Remove invalid cells with no gene expression and eliminate genes whose total expression level in all cells is less than 1.

[0071] (2b) Low-quality cells with mitochondrial gene expression accounting for more than 5% were excluded, and genes with expression variability in the top 20% were extracted from the filtered data set for subsequent analysis.

[0072] (2c) Calculate the gene library size l for each cell i , as the total reads per cell, and dividing the library size by its median to obtain the size factor s per cell i .

[0073] (2d) Divide the number of reads for each cell by its size factor s i , and perform log(x+1) transformation to obtain the normalized gene expression matrix X.

[0074] (3) Construct a K-nearest neighbor cell graph based on the normalized gene expression matrix X, and generate enhanced views G1 and G2 using subgraph sampling and random feature masking;

[0075] (3a) Calculate the gene expression similarity ρx between any two cells x and y using the Pearson correlation coefficient y :

[0076]

[0077] Where X and Y represent the gene expression vectors of cell x and cell y, respectively, Cov(X, Y) represents the covariance of X and Y vectors, σ X and σ Y Represents the standard deviation of the X and Y vectors respectively.

[0078] (3b) According to the preprocessed gene expression matrix X and similarity ρ xv , construct a K-nearest neighbor cell graph G=(V, E), where V is the set of cell nodes and E is the set of edges between cell nodes.

[0079] (3c) Using the constructed K-nearest neighbor cell graph G = (V, E), two data augmentation methods, subgraph sampling and random feature masking, are used to generate two enhanced views G1 = (V1, E1) and G2 = (V2, E2).

[0080] (4) Use graph convolutional networks to explore the topological structure of the K-nearest neighbor cell graph and aggregate information from multiple layers of neighborhoods by stacking multiple graph convolutional layers. The calculation of the k-th graph convolutional layer can be expressed by the following formula:

[0081]

[0082] Here, W is the learnable weight matrix, and is the normalized adjacency matrix, calculated as in, It means adding self-connection to the adjacency matrix, that is, adding the unit matrix I to the original adjacency matrix A. is the corresponding degree matrix. Function σ represents the activation function. (k) represents the input matrix of the kth layer. When k is equal to 0, H (k) That is the initial preprocessing expression matrix X.

[0083] (5) An attention model is added to the graph convolution layer to promote the aggregation of neighbor nodes. The specific process is as follows:

[0084] (5a) The similarity coefficient e between any two nodes i and j is calculated by the following formula ij :

[0085]

[0086] Here, W′ is a weight matrix shared in a single attention mechanism, and Represent the gene expression profiles of node i and node j respectively.

[0087] (5b) LeakeyRelu is used as the activation function, and the similarity coefficients between different nodes are normalized by the softmax function to calculate the attention coefficient α of node j to node i. ij :

[0088]

[0089] (5c) By extending the single attention mechanism to a multi-head attention mechanism and combining the attention coefficients by calculating the average, the stability of the learning process is enhanced. The feature of node i after the multi-head attention mechanism aggregation is calculated using the following formula

[0090]

[0091] Among them, σ() is the activation function and K is the number of heads in multi-head attention.

[0092] (6) Calculate the overall instance contrast loss L based on the two enhanced views G1 and G2 Con :

[0093] (6a) Calculate each cell node The contrast loss

[0094]

[0095] in, The function calculates the cosine similarity between two vectors, and τ is a temperature hyperparameter. They are the gene features obtained by the encoder of enhanced views G1 and G2 respectively.

[0096] (6b) The total contrast loss L is calculated according to the following formula Con :

[0097]

[0098] This calculation method ensures the balance of losses between positive pairs and negative pairs, enhancing the model's discrimination ability.

[0099] (7) Calculate the reconstruction loss based on the zero-inflated negative binomial (ZINB) distribution:

[0100] (7a) Calculate the mean μ, dispersion θ and zero inflation factor π for the ZINB distribution and express them in matrix form M, θ and I∏:

[0101] M=S×exp(DW μ ), Θ=exp(DW θ ), I∏=sigmoid(DW π )

[0102] Here S represents the cell's gene library size matrix, D is the output matrix, and W μ , W θ and W π are the trainable weight matrices used to calculate the parameters of the ZINB distribution.

[0103] (7b) Calculate the reconstruction loss l ZINB (I∏, M, Θ):

[0104]

[0105] HereX Raw is the original gene expression matrix that has not been normalized or standardized.

[0106] (7c) The reconstruction losses obtained by the two decoders are combined to obtain the final reconstruction loss based on the ZINB distribution in the pre-training stage.

[0107]

[0108] Here, I∏,M,Θ represents the parameters estimated after learning of the enhanced view G1, and I∏′,M′,Θ′ represents the parameters estimated after learning of the enhanced view G2.

[0109] (8) Calculate the final optimization function in the pre-training phase The Adam optimizer is used to update the clustering model parameters, where λ1 is a parameter that controls the proportion of instance contrast loss.

[0110] (9) In the fine-tuning stage, the clustering loss is calculated, the clustering function is optimized, and the clustering model parameters are updated:

[0111] (9a) applying the K-means algorithm to determine the cluster center c of all cell representations after dimension reduction;

[0112] (9b) Create a soft clustering matrix Q to express the probability that each cell belongs to each cluster, qi k Represents the probability that the i-th cell belongs to the k-th cluster:

[0113]

[0114] Among them, c k is the kth cluster center, and α represents the degrees of freedom of the t-distribution.

[0115] (9c) Square the elements of the soft clustering matrix Q and normalize them by the clustering frequency to generate each element in the adjusted target distribution matrix P:

[0116]

[0117] Here This is designed to prevent degenerate solutions (i.e. situations where some clusters are not assigned any data points).

[0118] (9d) The Kullback-Leibler (KL) divergence between the target distribution matrix P and the soft clustering matrix Q is calculated as the clustering loss L by the following formula: Cluster :

[0119]

[0120] (9e) In the fine-tuning stage, determine the final optimization objective function Then use the Adam optimizer according to L Fine Update the parameters. λ2 is a hyperparameter used to control the weight of clustering loss.

[0121] The schematic diagram of the architecture of the method of the present invention is as follows: Figure 2 As shown, the present invention combines the graph attention neural network GAT, the feedforward neural network FNN and the ZINB-based deep autoencoder to learn the fusion latent representation of cells, combines the contrast loss and ZINB loss to adjust the clustering model parameters in the pre-training stage, and combines the clustering loss and ZINB loss in the fine-tuning stage to further optimize the clustering model parameters and improve the clustering performance.

[0122] The following is a detailed description of the effects of this application in conjunction with simulation:

[0123] 1. The present invention achieves better clustering effect

[0124] The purpose of the present invention is to improve the clustering performance of single cell clustering. The clustering effect is often measured by two indicators: normalized mutual information (NMI) and adjusted Rand index (ARI). The higher the two indicators, the better the clustering effect.

[0125] The NMI calculation formula is as follows:

[0126]

[0127] Among them, S is the true label set, C is the model clustering label set, is the mutual information calculation formula, and are the information entropy of the true label data distribution and the model clustering label distribution respectively.

[0128] The ARI calculation formula is as follows:

[0129]

[0130] Among them, RI represents the Rand coefficient, E(RI) represents the expected value of the binary RI value, and max(RI) represents the maximum value of the binary E(RI) value. The calculation formula of the Rand coefficient RI is as follows:

[0131]

[0132] Among them, TP represents the number of sample pairs that are assigned to the same cluster and originally belong to the same category, TN represents the number of sample pairs that are assigned to different clusters and originally belong to different categories, and N represents the total number of samples. It represents the number of combinations of two samples from N samples.

[0133] The performance of the present invention is compared with two benchmark methods and nine advanced methods on 12 data sets, where the bold values ​​represent the best clustering effect on the corresponding data sets. The results are shown in Table 1:

[0134] Table 1 Comparison of clustering effects of the present invention and 11 clustering methods on 12 data sets

[0135]

[0136] From the results in Table 1, it can be seen that the present invention achieved the best NMI and ARI scores in 9 out of 12 data sets and other 11 classic clustering techniques, and achieved an NMI score of 0.9769 and an ARI score of 0.9906 on the Bladder (10X) data set, respectively. The present invention has a significant advantage in clustering effect.

[0137] The Limb_Muslce (Smart-seq2) dataset is used to generate potential dimension reduction representation data using the present invention and eight advanced technologies, and the generated data are clustered and visualized using the t-SNE algorithm. The results are as follows: Figure 3 As shown (wherein scZGCL is the abbreviation of "a single-cell RNA sequence clustering based on ZINB distribution and contrastive learning" of the present invention). Figure 3 It can be seen that the present invention can clearly separate each cell cluster, and this visualization result also shows that the present invention can accurately achieve single-cell clustering.

[0138] 2. The sensitivity of the present invention is low

[0139] Hyperparameters are parameters in the model that cannot be automatically learned and need to be adjusted by the user. If the effect of the model decreases significantly with the change of hyperparameters, it is considered that the model is sensitive to hyperparameters and has low applicability. A sensitivity analysis was performed on the important hyperparameters τ, λ1, and λ2 in the present invention. The results are shown in Table 2, where the values ​​are the average values ​​of the performance of the present invention on 12 data sets under different parameter values:

[0140] Table 2 Sensitivity analysis results of the present invention

[0141]

[0142] As can be seen from the figure, when the hyperparameters of the present invention are adjusted within a larger range, the clustering effect of the present invention on 12 data sets decreases less. τ affects the sensitivity of contrastive learning in capturing the similarity of positive and negative samples in the present invention, λ1 controls the weight of contrast loss in the pre-training stage, and λ2 affects the weight of clustering loss in the fine-tuning stage. These three hyperparameters are the biggest factors affecting the performance of the present invention. The low sensitivity of the present invention to these hyperparameters illustrates the reliability of the present invention.

[0143] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.

Claims

1. A single-cell transcriptome data clustering method based on graph contrast representation learning, characterized in that: include: Obtain single-cell transcriptional data; Preprocess the acquired single-cell transcription data; Acquire a first enhanced view and a second enhanced view based on the preprocessed single-cell transcription data; Constructing a clustering model, wherein the clustering model includes a first encoder, a second encoder, a first decoder, and a second decoder; Inputting the first enhanced view into the first encoder and the first decoder in sequence for training, and inputting the second enhanced view into the second encoder and the second decoder in sequence for training; The first encoder and the first decoder of the trained clustering model are used to cluster the single-cell transcriptome data.

2. According to claim 1, a single cell transcriptome data clustering method based on graph contrast representation learning is characterized in that: The obtaining of single cell transcription data comprises: Single-cell RNA sequencing technology is used to measure the gene expression levels of single cells in the target tissue to generate single-cell transcriptome data.

3. According to claim 1, a single cell transcriptome data clustering method based on graph contrast representation learning is characterized in that: The preprocessing of the acquired single cell transcription data includes: Remove invalid cells with no gene expression, and eliminate genes with a total expression level lower than 1 in all cells; Low-quality cells with mitochondrial gene expression accounting for more than 5% were excluded, and genes with expression variability in the top 20% were extracted from the filtered data set; Calculate the gene library size l per cell i , as the total reads per cell, and dividing the library size by its median to obtain the size factor s per cell i ; Divide the number of reads for each cell by its size factor s i , and log(x+1) transformation is performed to obtain the normalized gene expression matrix X, where x is the cell.

4. A single cell transcriptome data clustering method based on graph contrast representation learning according to claim 3, characterized in that: The method of acquiring the first enhanced view and the second enhanced view based on the preprocessed single-cell transcription data comprises: The gene expression similarity ρ between any two cells x and y is calculated by the Pearson correlation coefficient xy ; According to the gene expression matrix X and similarity ρ xy , construct K-nearest neighbor cell graph G=(V,E); Using the constructed K-nearest neighbor cell graph G=(V,E), two enhanced views G1=(V1,E1) and G2=(V2,E2) are generated through two data augmentation methods: subgraph sampling and random feature masking.

5. According to claim 1, a single cell transcriptome data clustering method based on graph contrast representation learning is characterized in that: The first encoder and the second encoder are both graph attention neural networks GAT; the first decoder and the second decoder are both feedforward neural networks FNN.

6. A single cell transcriptome data clustering method based on graph contrast representation learning according to claim 5, characterized in that: The first enhanced view is sequentially input into the first encoder and the first decoder for training; The second enhanced view is sequentially input into the second encoder and the second decoder for training; comprising: The pre-training stage includes: Input the first enhanced view into the first encoder to obtain the gene features of the first enhanced view, and input the second enhanced view into the second encoder to obtain the gene features of the second encoder; the gene features of the first enhanced view and the gene features of the second encoder are combined into a positive cell node, and the gene features of the second encoder and the gene features of the first enhanced view are combined into a negative cell node; respectively calculate the contrast loss of the positive cell node and the negative cell node, and calculate the total contrast loss based on the contrast loss of the positive cell node and the contrast loss of the negative cell node; The first enhanced view is sequentially input into the first encoder and the first decoder to calculate the first ZINB loss, and the second enhanced view is sequentially input into the second encoder and the second decoder to calculate the second ZINB loss; an average ZINB loss is calculated based on the first ZINB loss and the second ZINB loss; Determine the first optimization function based on the total contrast loss and the average ZINB loss, and use the Adam optimizer to adjust the clustering model parameters; The fine-tuning stage includes: The clustering loss is calculated based on the first encoder using KL divergence, the third ZINB loss is calculated based on the first decoder, the second optimization function is determined based on the clustering loss and the third ZINB loss, and the clustering model parameters are further optimized using the Adam optimizer.

7. A single cell transcriptome data clustering method based on graph contrast representation learning according to claim 6, characterized in that: The step of inputting the first enhanced view into the first encoder to obtain the gene features of the first enhanced view includes: Calculate the similarity coefficient between any two genes in the first enhanced view; The similarity coefficient is normalized to obtain the attention coefficient; Based on the attention coefficient, the gene features of the first enhanced view are aggregated through a multi-head attention mechanism.

8. A single cell transcriptome data clustering method based on graph contrast representation learning according to claim 6, characterized in that: The step of inputting the second enhanced view into a second encoder to obtain the gene features of the second enhanced view includes: Calculate the similarity coefficient between any two genes in the second enhanced view; The similarity coefficient is normalized to obtain the attention coefficient; Based on the attention coefficient, the gene features of the second enhanced view are aggregated through a multi-head attention mechanism.

9. A single cell transcriptome data clustering method based on graph contrast representation learning according to claim 6, characterized in that: The first optimization function is determined based on the total contrast loss and the average ZINB loss, specifically: Among them, λ1 is the parameter that controls the proportion of instance contrast loss, L Con is the total contrast loss, is the average ZINB loss.

10. A single cell transcriptome data clustering method based on graph contrast representation learning according to claim 6, characterized in that: The second optimization function is determined based on the clustering loss and the third ZINB loss, specifically: Among them, λ2 is a hyperparameter used to control the weight of clustering loss, L Cluster is the clustering loss, For the third ZINB loss.

Citation Information

Patent Citations

  • Cancer driver gene prediction device based on graph attention network and multi-omics fusion

    CN115171779A

  • Gene regulatory network prediction method based on multi-view attention network

    CN116913390A

  • Single-cell RNA (Ribonucleic Acid) sequencing data clustering method

    CN118675623A

Cited By

  • Method and system for inferring gene regulatory network

    CN120708700A

  • Method for inferring gene regulatory network and inferring system thereof

    CN120708700B

  • Single cell data depth clustering method and device based on double auto-encoders, and medium

    CN120877877A