Single-cell omics data embedding representation extraction method based on graph contrast neural network
Through the cluster-guided graph comparison learning framework and self-expression calculation module, the problem of global similarity and co-expression patterns being ignored in single-cell data is solved, improving the accuracy and clustering performance of single-cell embedding representations, and reducing false Effects of negative samples.
Patent Information
- Application Number
- CN202411104581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-13
AI Technical Summary
Existing single-cell deep embedding representation extraction methods have shortcomings in processing single-cell data with high dimensionality, sparseness, and noise, especially ignoring the global similarity and co-expression patterns between cells, resulting in inaccurate and false graph structure construction. Negative sample problems affect model performance.
Using cluster-guided graph comparison learning framework, combined with self-expression calculation module, the graph structure is adjusted by symmetrically normalized Laplace matrix and parameter non-shared twin encoder with Gaussian noise, and clustering information and self-expression are used. Matrix improves contrast learning and enhances the quality of embedded representations.
Effectively utilize clustering information and self-expression matrix to improve the accuracy and classification discrimination ability of single-cell embedding representation, enhance the performance of comparison learning, reduce the impact of false negative samples, and improve the accuracy and stability of single-cell clustering .
Smart Images

Figure CN119049560A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the cross-technical field of bioinformatics and machine learning, and specifically relates to a method for extracting embedded representations of single-cell omics data based on a graph contrast neural network. Background Art
[0002] Single-cell clustering plays a vital role in downstream analysis of single-cell data by classifying cells based on their expression patterns, thus providing a deeper understanding of the complexity and function of individual cells. Single-cell deep embedding representation models have been widely used in single-cell clustering tasks because they can simultaneously acquire feature representations and perform clustering. However, due to the high dimensionality, sparsity, and noise characteristics of single-cell data, as well as the lack of cell type labels in single-cell data, the task of extracting single-cell deep embedding representations remains challenging.
[0003] In order to meet the above challenges, in recent years, most of the autoencoders based on zero-inflated negative binomial distribution have been used to model and extract features from the original single-cell expression data. Since the zero-inflated negative binomial distribution can better capture the zero-inflated and sparsity characteristics of the data, it can provide a more accurate probability distribution fit for single-cell data. Many subsequent models have also adopted the architecture of the autoencoder based on zero-inflated negative binomial distribution. However, these methods only rely on the original gene expression, but ignore the relationship between cells.
[0004] In order to better integrate gene expression information with the relationship information between cells, some methods use graph neural networks for feature extraction. However, models based on graph neural networks rely heavily on the constructed k-nearest neighbor graph, which focuses on the local similarity between cells. Specifically, the target cell is only connected to its k nearest neighbors, while ignoring the relationship between the remaining similar cells. In order to fully reveal the co-expression pattern, global similarity must be considered. Global similarity considers the relationship between all similar cells and provides a more comprehensive understanding of cell co-expression. Among them, the co-expression pattern is a basic feature of cells. Since specific genes have the same expression in different cells, cells that share co-expression patterns tend to cluster together to form different subpopulations. In addition, the noise and sparsity in single-cell data can lead to inaccurate or incomplete construction of graph structures in graph learning, which can also lead to the accumulation of errors in the iterative graph learning process of the model.
[0005] Another major challenge in analyzing single-cell data is that it is costly to obtain accurate labels for cells, since labeling unknown cells often requires extensive biological knowledge, which even experienced researchers may find challenging. Therefore, unsupervised learning methods are often applied to unlabeled data. Recently, contrastive learning has become a promising solution to learn knowledge from unlabeled data by autonomously mining self-supervisory signals. Although some studies have attempted to incorporate contrastive learning into deep embedding representation extraction methods for single-cell data to improve model performance, they have ignored the structural information of cell interactions.
[0006] In summary, a natural idea is to combine contrastive learning with graph neural networks to analyze single-cell data, and recently proposed graph contrastive learning-based models have successfully verified the effectiveness of this idea. Although these graph contrastive learning-based models address some of the shortcomings of deep embedding representation extraction methods, they often ignore co-expression patterns in single-cell data and fail to consider key clustering information. Specifically, previous graph contrastive learning-based models may treat certain cells in the same subpopulation as negative samples. This may cause false negative samples to be pushed away in the subsequent contrastive learning process, thereby weakening the ability of the model. Therefore, it is necessary to explicitly utilize clustering information to capture the co-expression patterns between cells. In addition, although existing graph contrastive learning-based embedding representation extraction methods have achieved good performance, they still face the problems of inaccurate graph structure construction and potential false negative samples, making the extraction of single-cell embedding representations difficult. Summary of the invention
[0007] To overcome the shortcomings of the prior art, the present invention provides a clustering-guided graph contrast learning framework for single-cell embedding representation extraction tasks. In addition, in order to utilize the global similarity of cell data, a self-expression calculation module is introduced. At the same time, the present invention also improves the graph structure in graph contrast learning, specifically, using the similarity matrix learned in the self-expression calculation module to adjust the graph structure in graph contrast learning to enhance the performance of graph contrast learning.
[0008] The single-cell omics data embedding representation extraction method based on graph contrast neural network of the present invention comprises the following steps:
[0009] 1) Collect gene expression data obtained from single-cell sequencing from different platforms;
[0010] 2) Preprocessing the single-cell gene expression matrix includes the following steps:
[0011] 2.1 Filter cells to retain only cells that show expression counts in at least one cell and in at least one gene;
[0012] 2.2 Each gene expression value is logarithmized, that is, X = log(X + 1). Logarithmization is to deal with zero values or low expression values in expression counts, which helps to reduce unnecessary deviations and make the data more suitable for subsequent statistical analysis and modeling;
[0013] 2.3 Screening N highly variable genes, the default value of N is 2000;
[0014] 3) Constructing a cell map for the preprocessed single-cell data, including the following steps:
[0015] 3.1 Use the KNN algorithm to construct a cell graph A. Each node in the graph represents a cell, and the edge represents the relationship between cells. Specifically, if cell A is one of the first k nearest neighbors of cell B, then there is an edge between cell A and cell B.
[0016] 4) Symmetrically normalizing the obtained adjacency matrix, including the following steps:
[0017] 4.1 Defining the degree matrix Represents the degree of each node in the graph;
[0018] 4.2 Pass Symmetric normalized graph Laplacian matrix, where I is the identity matrix;
[0019] 4.3 Using the symmetric normalized Laplacian matrix to define the widely used Laplacian filter Represents a smoothed feature matrix that better exploits the topological structure and local information of the graph;
[0020] 5) Constructing a parameter-unshared twin encoder with Gaussian noise for the symmetric normalized adjacency matrix to extract meaningful feature representations from the data, including the following steps:
[0021] 5.1 In order to prevent the two encoders from generating the same parameters in the subsequent iterative optimization process of contrastive learning, that is, to produce shortcut solutions, Gaussian noise is introduced into the input of Encoder1 In Chinese, that is: in: Represents Gaussian noise with a mean of 0 and a variance of 1. The input of Encoder2
[0022] 5.2 pairs and Use two non-shared twin encoders with Gaussian noise parameters, expressed as:
[0023] and
[0024] Among them: Encoder1 and Encoder2 are MLPs of one layer respectively;
[0025] 6) To improve the quality of positive and negative samples in subsequent comparative learning, set confidence scores and select reliable samples for subsequent learning, including the following steps:
[0026] 6.1 First, the two embeddings Z obtained in step 5) v1 and Z v2 Using the formula to integrate;
[0027] 6.2 Further obtain valuable samples and set the confidence score CONF i :
[0028] Among them: CEN p is the cluster center obtained by k-means clustering of embedding Z;
[0029] 6.3 Based on the obtained confidence score CONF i Sort the embeddings Z and select the τth embedding as the threshold, ignoring samples with scores below this threshold;
[0030] 7) Setting up a clustering-guided contrastive learning mechanism to mitigate the negative impact of false negative samples in contrastive learning and obtain more reliable feature representations, including the following steps:
[0031] 7.1 Denote the embedding selected in step 6.3 as and Based on the k-means clustering in step 6.2, H v1 and H v2 Divided into K disjoint clusters, represented as and
[0032] 7.2 and The samples in the same cluster are considered as positive sample pairs;
[0033] 7.3 In order to alleviate the false negative problem in negative sample pairs, we first calculate and The average value of the samples corresponding to each cluster in is used to obtain the center of the corresponding cluster;
[0034] 7.4 Treat the cluster centers corresponding to different clusters as negative samples;
[0035] 8) Based on step 7), positive samples and negative samples are defined, and a joint optimization goal is set to improve the quality of positive and negative samples in contrastive learning, including the following steps:
[0036] 8.1 Joint Optimization Objective: Positive Sample Loss L pos and negative sample loss L neg Composition, L pos is the mean squared error loss between positive sample embeddings, expressed as:
[0037]
[0038] L neg is the cosine similarity between different cluster centers, which is specifically expressed as:
[0039]
[0040] The joint optimization objective is expressed as: L con =L pos +L neg ;
[0041] 9) Use a decoder optimization model based on the ZINB distribution to effectively model and capture background noise and high variability in single-cell data, including the following steps:
[0042] 9.1 For the last layer of the decoder, three fully connected layers are used to estimate the parameters of the ZINB distribution, which are expressed as:
[0043]
[0044]
[0045] Where: W μ , W π and W θ represents the learnable weights, and the single-cell data are modeled using the ZINB distribution as follows:
[0046]
[0047] The decoder loss function based on the ZINB distribution is calculated as the negative logarithm of the ZINB distribution, expressed as:
[0048] L ZINB = -log(ZINB(X|π,μ,θ));
[0049] 10) Using MSE operation to alleviate over-modeling of zero-inflated components and enhance reconstruction results of genes with lower non-zero expression levels, including the following steps:
[0050] 10.1 Input the embedding Z learned in step 6) into the decoder, expressed as:
[0051]
[0052] 10.2 Use the MSE operation to compare the reconstructed mean μ obtained in step 9) with the original gene expression matrix, that is:
[0053]
[0054] 11) Introduce an additional self-expressive computational layer to further reveal internal structures and deeper relationships in single-cell data, including the following steps:
[0055] 11.1 Represent the expression of the current cell by utilizing other cells of the same type, where the similarity is close to 1 only between cells belonging to the same category, as follows:
[0056] Z = ZC;
[0057] in: Represents the self-expression matrix, and the optimization objective of this part is defined as:
[0058]
[0059] Where: ||C||2 represents the L2 regularization constraint on C;
[0060] 12) In each iteration, the present invention uses the self-expression matrix to adjust the original adjacency matrix. The final learned self-expression matrix is the feature extraction result of the model and can be used for downstream clustering tasks.
[0061] The beneficial effects of the present invention are as follows: first, the present invention uses a ZINB-based encoder-decoder architecture as its basis, and incorporates clustering-guided contrastive learning into the decoder part, so that it can more effectively use clustering information to explore the co-expression pattern of cells, and at the same time can enhance the classification and discrimination ability of the learned embedded representation. In addition, a self-expression module is designed, which can assist in the in-depth study of the intrinsic relationship existing in the single-cell data, and the learned self-expression matrix improves the quality of the cell map required in contrastive learning, and by clustering the self-expression matrix, the single-cell clustering performance of the present invention is further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 Flowchart of the method for extracting embedding representations of single-cell omics data based on graph contrast neural networks;
[0063] Figure 2 The following are visualization diagrams of the t-SNE dimensionality reduction results of the embedding representations learned in the mouse diaphragm dataset using the present invention and the existing sota method, respectively, where Raw is the original single-cell transcriptome data distribution, Ours is the result of clustering the single-cell transcriptome data using the present invention, and the remaining methods are the existing sota methods;
[0064] Figure 3 It is a similarity heat map of the self-expression matrix learned by the self-expression module in the present invention. DETAILED DESCRIPTION
[0065] The present invention is described below with reference to the accompanying drawings.
[0066] like Figure 1 As shown, this embodiment takes the single-cell transcriptome dataset of mouse diaphragm obtained by Smart-seq2 sequencing as an example. The dataset contains 870 cells, 23,341 genes, and 5 cell categories.
[0067] Step S1, collect labeled single-cell transcriptome data from currently published papers, and preprocess the original single-cell data. The main steps include first filtering cells, retaining only cells that show expression counts in at least one cell and at least one gene, and then logarithmizing each gene expression value, that is, X=log(X+1). Logarithmization is to deal with zero values or low expression values in expression counts, which helps to reduce unnecessary deviations and make the data more suitable for subsequent statistical analysis and modeling. Finally, N highly variable genes are screened, and the default value of N is 2000 to obtain preprocessed data suitable for model input;
[0068] Step S2, constructing a single-cell adjacency graph for the preprocessed single-cell data, mainly using the KNN algorithm to construct a cell graph A, where each node represents a cell and the edge represents the relationship between cells. Specifically, if cell A is one of the first k nearest neighbors of cell B, then there is an edge between cell A and cell B;
[0069] Step S3, symmetric normalization of the adjacency matrix corresponding to the obtained single-cell adjacency graph is performed. The main steps are to first define the degree matrix Represents the degree of each node in the graph; then through Symmetric normalized graph Laplacian matrix, where I is the identity matrix; finally, the symmetric normalized Laplacian matrix is used to define the widely used Laplacian filter Represents a smoothed feature matrix that better exploits the topological structure and local information of the graph;
[0070] Step S4, constructing a parameter-unshared twin encoder with Gaussian noise for the symmetric normalized adjacency matrix to extract meaningful feature representations from the data, including the following steps: First, in order to prevent the two encoders from generating the same parameters in the subsequent iterative optimization process of contrastive learning, that is, generating shortcut solutions, Gaussian noise is introduced into the input of encoder 1 In Chinese, that is: in: represents Gaussian noise with mean 0 and variance 1. The input of encoder 2 is Then and Use two non-shared twin encoders with Gaussian noise parameters, expressed as: and Among them: Encoder 1 and Encoder 2 are MLPs of one layer respectively;
[0071] Step S5, in order to improve the quality of positive and negative samples in subsequent comparative learning, set the confidence score and select reliable samples for subsequent learning, which mainly includes the following steps: First, the two embeddings Z obtained in step S4 are v1 and Z v2 Using the formula Integration is performed; then valuable samples are further obtained and the confidence score CONF is set i : Among them: CEN p is the cluster center obtained by k-means clustering of the embedding Z; finally, according to the confidence score CONF i Sort the embeddings Z and select the τth embedding as the threshold, ignoring samples with scores lower than the threshold for sample screening;
[0072] Step S6, setting up a clustering-based contrastive learning mechanism to mitigate the negative impact of false negative samples in contrastive learning and obtain more reliable feature representation, includes the following steps: Representing the embedding selected in step S5 as and Based on the K-means clustering in step S5, H v1 and H v2 Divided into K disjoint clusters, represented as and Then and The samples in the same cluster are regarded as positive sample pairs; finally, in order to alleviate the false negative problem in negative sample pairs, we calculate and The average value of the samples corresponding to each cluster in is used to obtain the center of the corresponding cluster, and the cluster centers corresponding to different clusters are regarded as negative samples;
[0073] Step S7, based on the definition of positive samples and negative samples in step S6, sets a joint optimization target to improve the quality of positive and negative samples in contrastive learning, including the following steps: First, the joint optimization target is composed of the positive sample loss L pos and negative sample loss L neg Composition, L pos is the mean squared error loss between positive sample embeddings, expressed as: Lneg is the cosine similarity between different cluster centers, which is specifically expressed as: The joint optimization objective is expressed as: L con =L pos +L neg ;
[0074] Step S8, designing a ZINB module, using a decoder optimization model based on the ZINB distribution to effectively model and capture background noise and high variability in single-cell data, including the following steps: First, for the last layer of the decoder, three fully connected layers are used to estimate the parameters of the ZINB distribution, which are expressed as: Where: W μ , W π and W θ represents the learnable weights, and the single-cell data are modeled using the ZINB distribution as follows:
[0075] The decoder loss function based on the ZINB distribution is calculated as the negative logarithm of the ZINB distribution, denoted as: L ZINB = -log(ZINB(X|π,μ,θ));
[0076] Step S9, using MSE operation to alleviate over-modeling of zero-expanded components and enhance the reconstruction results of genes with lower non-zero expression levels, includes the following steps: First, the embedding Z learned in step S5 is input into the decoder, expressed as: The reconstructed mean μ obtained in step S8 is then compared with the original gene expression matrix using the MSE operation, i.e.
[0077] Step S10, introducing an additional self-expression computation layer to further reveal the internal structure and deeper relationships in the single-cell data, includes the following steps: first, the expression of the current cell is represented by utilizing other cells of the same type, where the similarity is close to 1 only between cells belonging to the same category, the specific process is: Z = ZC; where: Represents the self-expression matrix, and the optimization objective of this part is defined as:
[0078] stdiag(C)=0; where ||C||2 represents the L2 regularization constraint on C;
[0079] Step S11, the present invention uses the self-expression matrix to adjust the original adjacency matrix in each iteration, and the self-expression matrix finally learned is the feature extraction result of the model, which can be used for downstream clustering tasks.
[0080] The technical effects of the present invention are described below in conjunction with simulation experiments.
[0081] Simulation conditions
[0082] Computer hardware: NVIDIA GeForce RTX 3090, 24G video memory;
[0083] Computer software: Python3.8 integrated development software.
[0084] Simulation content
[0085] Comparative experiments were conducted using the present invention and the existing eight methods scTAG, scGNN, scGAE, scDEFR, scNAME, contrastive-sc (con-sc), scCCL and scGCL. The present invention compared and analyzed our method and other baselines on 10 widely used single-cell sequencing datasets. These datasets were collected from 12 different platforms. They cover a wide range of species, including mice and humans, and cover various organs such as the brain, lungs and kidneys. The normalized mutual information NMI and the adjusted Rand index ARI were used as evaluation indicators to evaluate the clustering results of each method. The results are shown in Tables 1 and 2, respectively:
[0086] Table 1
[0087]
[0088] Table 2
[0089]
[0090]
[0091] As can be seen from Table 1, the present invention has better results than other methods on ten single-cell data sets. The accuracy of the present invention in single-cell clustering is demonstrated on sequencing data based on fluorescence in situ hybridization, and it has good generalization on different sequencing platforms.
Claims
1. A method for extracting embedded representations of single-cell omics data based on graph contrast neural networks, characterized in that: The following steps are involved: 1) Collect gene expression data obtained from single-cell sequencing from different platforms; 2) Preprocessing the single-cell gene expression matrix includes the following steps: 2.1 Filter cells to retain only cells that show expression counts in at least one cell and in at least one gene; 2.2 Each gene expression value is logarithmized, that is, X = log(X + 1). Logarithmization is to deal with zero values or low expression values in expression counts, which helps to reduce unnecessary deviations and make the data more suitable for subsequent statistical analysis and modeling; 2.3 Screening N highly variable genes, the default value of N is 2000; 3) Constructing a cell map for the preprocessed single-cell data, including the following steps: 3.1 Use the KNN algorithm to construct a cell graph A. Each node in the graph represents a cell, and the edge represents the relationship between cells. Specifically, if cell A is one of the first k nearest neighbors of cell B, then there is an edge between cell A and cell B. 4) Symmetric normalization of the obtained adjacency matrix includes the following steps: 4.1 Defining the degree matrix Represents the degree of each node in the graph; 4.2 Pass Symmetric normalized graph Laplacian matrix, where I is the identity matrix; 4.3 Using the symmetric normalized Laplacian matrix to define the widely used Laplacian filter Represents a smoothed feature matrix that better exploits the topological structure and local information of the graph; 5) Constructing a parameter-unshared twin encoder with Gaussian noise for the symmetric normalized adjacency matrix to extract meaningful feature representations from the data, including the following steps: 5.1 In order to prevent the two encoders from generating the same parameters in the subsequent iterative optimization process of contrastive learning, that is, to produce a shortcut solution, Gaussian noise is introduced into the input of Encoder1 In Chinese, that is: in: Represents Gaussian noise with a mean of 0 and a variance of 1. The input of Encoder2 5.2 pairs and Use two non-shared twin encoders with Gaussian noise parameters, expressed as: and Among them: Encoder1 and Encoder2 are MLPs of one layer respectively; 6) To improve the quality of positive and negative samples in subsequent comparative learning, set confidence scores and select reliable samples for subsequent learning, including the following steps: 6.1 First, the two embeddings Z obtained in step 5) v1 and Z v2 Using the formula to integrate; 6.2 Further obtain valuable samples and set the confidence score CONF i : Among them: CEN p is the cluster center obtained by k-means clustering of embedding Z; 6.3 Based on the obtained confidence score CONF i Sort the embeddings Z and select the τth embedding as the threshold, ignoring samples with scores below this threshold; 7) Setting up a clustering-guided contrastive learning mechanism to mitigate the negative impact of false negative samples in contrastive learning and obtain more reliable feature representations, including the following steps: 7.1 Denote the embedding selected in step 6.3 as and Based on the k-means clustering in step 6.2, H v1 and H v2 Divided into K disjoint clusters, represented as and 7.2 and The samples in the same cluster are considered as positive sample pairs; 7.3 In order to alleviate the false negative problem in negative sample pairs, we first calculate and The average value of the samples corresponding to each cluster in is used to obtain the center of the corresponding cluster; 7.4 Treat the cluster centers corresponding to different clusters as negative samples; 8) Based on step 7), positive samples and negative samples are defined, and a joint optimization goal is set to improve the quality of positive and negative samples in contrastive learning, including the following steps: 8.1 Joint Optimization Objective: Positive Sample Loss L pos and negative sample loss L neg Composition, L pos is the mean squared error loss between positive sample embeddings, expressed as: L neg is the cosine similarity between different cluster centers, which is specifically expressed as: The joint optimization objective is expressed as: L con =L pos +L neg ; 9) Use a decoder optimization model based on the ZINB distribution to effectively model and capture background noise and high variability in single-cell data, including the following steps: 9.1 For the last layer of the decoder, three fully connected layers are used to estimate the parameters of the ZINB distribution, which are expressed as: Where: W μ , W π and W θ represents the learnable weights, and the single-cell data are modeled using the ZINB distribution as follows: The decoder loss function based on the ZINB distribution is calculated as the negative logarithm of the ZINB distribution, expressed as: L ZINB =-log(ZINB(X|π,μ,θ)); 10) Using MSE operation to alleviate over-modeling of zero-inflated components and enhance reconstruction results of genes with lower non-zero expression levels, including the following steps: 10.1 Input the embedding Z learned in step 6) into the decoder, expressed as: 10.2 Use the MSE operation to compare the reconstructed mean μ obtained in step 9) with the original gene expression matrix, that is: 11) Introduce an additional self-expressive computational layer to further reveal internal structures and deeper relationships in single-cell data, including the following steps: 11.1 Represent the expression of the current cell by utilizing other cells of the same type, where the similarity is close to 1 only between cells belonging to the same category, as follows: Z=ZC; in: Represents the self-expression matrix, and the optimization objective of this part is defined as: Where: ||C||2 represents the L2 regularization constraint on C; 12) In each iteration, the present invention uses the self-expression matrix to adjust the original adjacency matrix. The final learned self-expression matrix is the feature extraction result of the model and can be used for downstream clustering tasks.
Citation Information
Patent Citations
Single-cell RNA-seq data clustering method based on dual self-supervision
CN114022693A
Cited By
Single-cell multi-omics data clustering framework based on deep collaborative contrast learning
CN119626348A
A method for constructing a clustering framework for single-cell multi-omics data
CN119626348B
Single-cell RNA sequencing data feature selection method and system based on deletion pattern
CN119724351A
