A Single-Cell Dimensionality Reduction Method and Device Based on Graph Adaptive Aggregation Autoencoder
By using a graph-adaptive aggregation autoencoder-based method, the problems of accuracy and computational overhead in dimensionality reduction of single-cell RNA sequencing data are solved, achieving efficient and accurate dimensionality reduction and clustering, which is suitable for large-scale datasets.
Patent Information
- Application Number
- CN202211058861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Existing methods for dimensionality reduction of single-cell RNA sequencing data are not accurate enough when dealing with high-dimensional data with high missing rates, especially when facing the problem of false zero counting, which leads to inaccurate clustering and visualization results. In addition, existing methods have high computational costs and are difficult to handle large-scale datasets.
We employ a graph adaptive aggregation autoencoder-based approach, which combines data preprocessing, graph construction, neighborhood selection, adaptive aggregation, and graph convolution operations with graph neural networks to reduce dimensionality, eliminate invalid information, optimize neighbor aggregation, reduce information redundancy, and minimize computational overhead.
It improves the accuracy of dimensionality reduction for single-cell RNA sequencing data, reduces the impact of false zero counts, reduces computational overhead, achieves rapid and effective dimensionality reduction and clustering, and enhances data interpretability.
Smart Images

Figure CN115472228B_ABST
Abstract
Description
[0001] Technical Field
[0002] The present invention relates to the technical field of data mining, and in particular, to a single-cell dimensionality reduction method and device based on a graph adaptive aggregation autoencoder. Background Art
[0003] In recent years, single-cell RNA sequencing (scRNA-seq) technology has developed rapidly, and the research of single-cell transcriptomics has undergone great changes. On the one hand, cells are an independent unit, and in-depth research at the single-cell level can help people understand the laws of life changes and development trends. On the other hand, the scale of current single-cell RNA sequencing (scRNA-seq) data is getting larger and larger, which makes it more difficult for researchers to analyze single-cell RNA sequencing (scRNA-seq) data. The larger the dimension of the data set, the more accurate methods are needed to accurately extract the effective information in the data.
[0004] Converting high-dimensional data into low-dimensional embeddings while retaining the topological structure of the original data as much as possible is the main problem in the research of dimensionality reduction methods. In single-cell RNA sequencing (scRNA-seq) data, the high missing rate makes dimensionality reduction very difficult. Although sequencing technology has improved in recent years, due to amplification bias, cell cycle effects, library size differences, especially the low capture efficiency of mRNA (only about 10% of the actually existing mRNA molecules can be captured, and the content of mRNA is generally only about 10 picograms, so low-expressed genes are difficult to detect in scRNA-seq), resulting in incorrect zero-count observations, which are defined as missing events. Zero counts consist of "false" zero counts and "true" zero counts, where true counts represent the lack of gene expression in a specific cell, and false zero counts are dropout events. A large number of false zero counts will lead to inaccurate clustering and visualization results. Therefore, dimensionality reduction is an indispensable part of single-cell downstream analysis.
[0005] The various challenges of scRNA-seq data also present new opportunities. The high dimensionality and high missingness of scRNA-seq data have inspired researchers to develop novel methods to address the high noise and dimensionality of these datasets. To address the high dimensionality of scRNA-seq data, researchers have proposed numerous dimensionality reduction methods. t-SNE is a nonlinear dimensionality reduction method with low computational overhead. It is also excellent for visualizing well-separated clusters, and the reduced data maintains a high similarity to the original data. However, the accuracy of t-SNE for local dimensionality reduction still needs improvement. VASC models the dropout phenomenon and uses deep neural networks to discover complex nonlinear patterns in the data and reduce noise, thereby achieving reliable data dimensionality reduction and visualization. Cellvgae researchers developed a variational graph autoencoder architecture with a graph attention layer, applying graph neural networks to unsupervised exploration of scRNA-seq data. The graph attention layer directly operates on the connections between cells, focusing on dimensionality reduction and clustering. However, its high computational overhead limits its application to dimensionality reduction of large datasets, requiring advanced hardware support. Summary of the invention
[0006] The purpose of the present invention is to address at least one of the deficiencies of the prior art and to provide a single-cell dimensionality reduction method and device based on a graph adaptive aggregated autoencoder.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] Specifically, a single-cell dimensionality reduction method based on graph-adaptive aggregated autoencoder is proposed, which includes the following:
[0009] Step 110: obtaining an scRNA-seq dataset as a target dataset, performing data preprocessing on the target dataset to remove invalid information therein, and obtaining a first dataset, i.e., a gene expression matrix;
[0010] Step 120: compose the first data set using the HNSW algorithm, calculate the similarity between the data in the first data set using the cosine similarity algorithm to obtain a similarity matrix, and calculate an adjacency matrix based on the similarity matrix;
[0011] Step 130: Perform neighborhood selection on the first data set based on the adjacency matrix to determine whether the neighbor set of the first data set conforms to a normal distribution, remove neighbor nodes that do not conform to the distribution, and use a box plot of similarity values to filter out abnormal neighbor nodes to obtain a second data set;
[0012] Step 140: Aggregate the second dataset to obtain a third dataset, and set a threshold z. The threshold z is used to control whether the central node performs downward aggregation. When the threshold z ≥ the first threshold, second-order aggregation is performed. When the first threshold > z > the second threshold, first-order aggregation is performed. When z ≤ the second threshold, the loop is exited;
[0013] Step 150: Input the third dataset and the adjacency matrix into the graph autoencoder. In the encoding stage, perform graph convolution operations on the third dataset and the adjacency matrix to obtain latent variables. In the decoding stage, perform matrix multiplication operations, and finally continuously reduce the loss in the encoding stage and the decoding stage to obtain the finally dimension-reduced features and updated latent variables;
[0014] Step 160: Output the updated latent variables of the graph autoencoder.
[0015] Furthermore, specifically, the process of data preprocessing in step 110 includes the following:
[0016] Remove columns with single values. The threshold for columns with single values is set to 1, that is, if the values in a certain column are all the same, remove that column; Remove columns with excessive 0-value features. The zero-value ratio is set to 0.4. If the zero values in a certain column exceed 40%, it is judged as an invalid feature and that column is removed;
[0017] Perform binning processing. The number of bins is an empirical value. Divide all the data in the target dataset into 20 sub-intervals (i.e., bins) according to the attribute values. The attribute values in the same bin are the same as those in the sample. Calculate the information entropy of each data in the target dataset using information entropy. p(x) is the information entropy. When the information entropy value is less than 0.3, remove the data in that column. The information entropy formula is as follows:
[0018] H(X) = ∑ x∈X p(x)·logp(x);
[0019] Smooth the abnormal data. The average expression level of a single data in the target dataset is calculated as μ, and the variance expression level of a single data in the target dataset is calculated as σ. If the expression level of a single data exceeds the range of [μ - 4σ, μ + 4σ], smooth it to the boundary value of this interval.
[0020] Normalize using the maximum and minimum values. The expression level of a single data is normalized to [0, 1]. x min and x max are the minimum and maximum values of a certain row respectively. Then the normalization formula is:
[0021]
[0022] Furthermore, specifically, the process in step 120 includes the following:
[0023] Step 121: Construct a graph for the first data set using the HNSW algorithm, calculate the similarity between the data in the first data set using the cosine similarity algorithm to obtain a similarity matrix, set the number of neighbors to 4, and return to obtain a similarity matrix;
[0024] Step 122: Calculate its adjacency matrix according to the similarity matrix, set the weight between adjacent nodes to 1, and set the weight between non - adjacent nodes to 0.
[0025] Further, specifically, the step 140 includes the following process
[0026] Define a compatible class. For the neighborhood node set r(u) = {v1, v2, v3,... vk}, calculate the cosine similarity Sim(vi, vj) between nodes. Set a threshold δ. For node vi, when the similarity Sim(vi, vj) between other nodes in the neighborhood node set and node vi is > δ, then form its compatible class [vi];
[0027] Define the neighborhood similarity. Define the neighborhood similarity Sim H (r(u)) through the information entropy of the neighbor node set. r(u) is the neighborhood node set, and [vi] is the compatible class node. Combine the information entropy with the neighborhood nodes and compatible class nodes to obtain the neighborhood similarity as a condition for judging aggregation. The calculation formula of the neighborhood similarity Sim H (r(u)) is as follows
[0028]
[0029] Define the similarity Sim s (u, v) between the neighborhood nodes of the shared neighbors and the central node. Where r(u) is the neighborhood node set and r(v) is the compatible class node set. Obtain the similarity Sim s (u, v) between the neighborhood nodes of the shared neighbors and the central node by finding the proportion of the common nodes of the neighborhood nodes and the compatible class nodes in the total nodes. Its calculation formula is as follows
[0030]
[0031] Combine the neighborhood similarity Sim H (r(u)) and the similarity Sim s (u, v) between the neighborhood nodes of the shared neighbors and the central node. Take the similarity measure Sim(u, v) between the neighborhood node v and the central node u as the condition for controlling aggregation. Define the calculation formula of Sim(u, v) as follows:
[0032] Sim(u, v) = αSim s (u, v)+βSimH (r(u)), α + β = 1
[0033] Where α and β are two parameters whose sum is 1;
[0034] During aggregation, it is assumed that nodes that are extremely similar do not need to aggregate more information, while similar nodes need to aggregate the information of their multi-layer neighbors to extract effective features. According to this assumption, a threshold z is set, and this threshold z is used to control whether the central node aggregates downward. When the threshold z ≥ the first threshold, second-order aggregation is performed; when the first threshold > z > the second threshold, first-order aggregation is performed; when z ≤ the second threshold, the loop is exited.
[0035] Furthermore, the step 150 includes,
[0036] During the encoding stage, performing graph convolution operations on the third dataset and the adjacency matrix includes,
[0037] Inputting the adjacency matrix and the third dataset into the encoding layer for encoding to obtain node embedding vectors, i.e., latent variable Z. The learning rate is set to 0.0001, the activation function is relu, and the dimension of the output latent variable is 800;
[0038] During the decoding stage,
[0039] Performing matrix multiplication operation on the latent variable Z to obtain a new matrix through matrix inner product multiplication.
[0040] Furthermore, specifically, the first threshold is 0.8 and the second threshold is 0.3.
[0041] The present invention also proposes a single-cell dimensionality reduction device based on a graph adaptive aggregation autoencoder, including the following:
[0042] A data acquisition module, configured to acquire the scRNA-seq dataset as the target dataset;
[0043] A preprocessing module, configured to perform data preprocessing on the target dataset to remove invalid information therein, obtaining a first dataset, i.e., a gene expression matrix;
[0044] A graph construction module, configured to construct a graph for the first dataset through the hnsw algorithm, calculate the similarity between the data in the first dataset through the cosine similarity algorithm to obtain a similarity matrix, and calculate an adjacency matrix based on the similarity matrix;
[0045] An adaptive aggregation module, configured to perform neighborhood selection on the first dataset based on the adjacency matrix, determine whether the neighbor set of the first dataset conforms to a normal distribution, remove neighbor nodes that do not conform to the distribution, and use a box plot of similarity values to filter out abnormal neighbor nodes, obtaining a second dataset
[0046] Aggregate the second data set to obtain a third data set, and set a threshold z. The threshold z is used to control whether the central node performs downward aggregation. When the threshold z ≥ the first threshold, second-order aggregation is performed. When the first threshold > z > the second threshold, first-order aggregation is performed. When z ≤ the second threshold, the loop is exited;
[0047] A graph autoencoder is used to process the third data set and the adjacency matrix. In the encoding stage, graph convolution operations are performed on the third data set and the adjacency matrix to obtain latent variables. In the decoding stage, matrix multiplication operations are performed. Finally, the losses in the encoding stage and the decoding stage are continuously reduced to obtain the finally dimension-reduced features, and the updated latent variables are obtained and output;
[0048] Among them, the adaptive aggregation module and the graph autoencoder together constitute a graph neural network framework, and the data processed by the data acquisition module, the preprocessing module, and the graph construction module is the input data of the graph neural network framework.
[0049] The present invention also proposes a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the single-cell dimension reduction method based on the graph adaptive aggregation autoencoder are implemented.
[0050] The beneficial effects of the present invention are as follows:
[0051] A single-cell dimension reduction method based on a graph adaptive aggregation autoencoder provided by the present invention,
[0052] 1. In terms of model selection, the present invention innovatively adopts a graph neural network model, and uses the adaptive aggregation module and graph convolution to accurately obtain effective information, thereby avoiding the problem of inaccurate dimension reduction in single-cell transcriptome sequencing.
[0053] 2. The graph neural network model has its unique calculation method. The weight matrix calculated through data preprocessing can well display the hidden relationship between samples, thereby well solving the problem of poor interpretability of traditional methods. During the calculation process of the weight matrix, the number of neighbors can be selected by oneself, so as to reasonably adjust the weight matrix, and the influence of information redundancy can be effectively reduced.
[0054] 3. In the process of the graph autoencoder, first perform the adaptive aggregation module to effectively aggregate and optimize the neighbors of the central node, and then continuously reduce the losses in the encoding stage and the decoding stage to obtain the finally dimension-reduced features, effectively reducing the influence of invalid information.
[0055] 4. Small time overhead. In the encoding stage of the graph autoencoder, graph convolution operations are used, and in the decoding stage, matrix multiplication operations are performed. Therefore, it does not require a large computational overhead, resulting in a faster training speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] By describing the embodiments shown in the accompanying drawings in detail, the above and other features of the present disclosure will become more apparent. The same reference numerals in the drawings of the present disclosure represent the same or similar output voltages. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:
[0057] Figure 1 The figure shows a flowchart of a single-cell dimensionality reduction method based on a graph adaptive aggregation autoencoder of the present invention;
[0058] Figure 2 It is a pretreatment flowchart of a single-cell dimensionality reduction method based on a graph adaptive aggregation autoencoder of the present invention
[0059] Figure 3 It is a flowchart of graph construction of a single-cell dimensionality reduction method based on a graph adaptive aggregation autoencoder of the present invention
[0060] Figure 4 It is a processing procedure diagram of an adaptive aggregation module of a single-cell dimensionality reduction method based on a graph adaptive aggregation autoencoder of the present invention
[0061] Figure 5 It is a framework diagram of a graph neural network model of a single-cell dimensionality reduction method based on a graph adaptive aggregation autoencoder of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0062] The following will clearly and completely describe the concept, specific structure, and technical effects generated by the present invention in combination with the embodiments and the drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The same reference numerals used throughout the drawings indicate the same or similar parts.
[0063] Referring to Figure 1 , Embodiment 1, the present invention proposes a single-cell dimensionality reduction method based on a graph adaptive aggregation autoencoder, including the following:
[0064] Step 110: Obtain the scRNA-seq dataset as the target dataset, and perform data preprocessing on the target dataset to remove the invalid information therein, obtaining a first dataset, that is, a gene expression matrix;
[0065] Step 120: Construct a graph for the first data set using the HNSW algorithm, calculate the similarity between the data in the first data set using the cosine similarity algorithm to obtain a similarity matrix, and calculate an adjacency matrix based on the similarity matrix;
[0066] Step 130: Perform neighborhood selection on the first data set based on the adjacency matrix, determine whether the neighbor set of the first data set conforms to a normal distribution, remove neighbor nodes that do not conform to the distribution, and use a box plot of similarity values to filter out abnormal neighbor nodes to obtain a second data set. The purpose of this step is to facilitate accurate selection of neighbors. We remove neighbor nodes that do not meet the conditions to reduce the impact of dissimilar neighbors on our subsequent aggregation of information;
[0067] Step 140: Aggregate the second data set to obtain a third data set, set a threshold z. The threshold z is used to control whether the central node aggregates downward. When the threshold z ≥ the first threshold, perform second-order aggregation. When the first threshold > z > the second threshold, perform first-order aggregation. When z ≤ the second threshold, jump out of the loop, thereby reducing the impact of information redundancy caused by the model aggregating too much neighbor information;
[0068] Step 150: Input the third data set and the adjacency matrix into the graph autoencoder. In the encoding stage, perform graph convolution operations on the third data set and the adjacency matrix. In the decoding stage, perform matrix multiplication operations. Finally, continuously reduce the loss between the encoding stage and the decoding stage to obtain the finally dimension-reduced features and the updated latent variables. During the graph convolution process in the graph autoencoding decoding stage, the third data set accurately aggregates information between nodes according to the values of the adjacency matrix;
[0069] Step 160: Output the updated latent variables of the graph autoencoder.
[0070] Refer to Figure 2 , as a preferred embodiment of the present invention, specifically, the process of data preprocessing in step 110 includes the following:
[0071] Remove columns with single values. The threshold for columns with single values is set to 1, that is, if the values in a certain column are all the same, remove that column. That is to say, if the values in this column are all the same, we remove that column, which can effectively ensure that the feature columns we obtain are valid; remove feature columns with too many 0 values. The zero value ratio is set to 0.4. If the zero values in a certain column exceed 40%, it is judged as an invalid feature and that column is removed. Effectively reducing the missing rate is beneficial for our downstream analysis;
[0072] Perform binning. Binning can reduce the influence of different gene expression levels. The number of bins is an empirical value. Divide all the data in the target dataset into 20 sub-intervals (i.e., bins) according to the attribute values. The attribute values in the same bin are the same as those in the sample. Calculate the information entropy of each data in the target dataset using the information entropy formula. Let p(x) be the information entropy. When the information entropy value is less than 0.3, remove the data in this column. The information entropy formula is as follows:
[0073] H(X) = ∑ x∈X p(x)·logp(x);
[0074] Perform smoothing on the abnormal data. Calculate the average expression level of a single data in the target dataset data as μ, and calculate the variance expression level of the single data in the target dataset data as σ. If the expression level of the single data exceeds the range of [μ - 4σ, μ + 4σ], smooth it to the boundary value of this interval.
[0075] Use the maximum - minimum normalization method to normalize the expression level of a single data to [0, 1]. Let x min and x max be the minimum and maximum values of a certain row respectively. Then the normalization formula is:
[0076]
[0077] Refer to Figure 3 , as a preferred embodiment of the present invention. Specifically, the process in step 120 includes the following:
[0078] Step 121: Construct a graph for the first dataset through the hnsw algorithm, calculate the similarity between the data in the first dataset through the cosine similarity algorithm to obtain a similarity matrix, set the number of neighbors to 4, and return to obtain a similarity matrix;
[0079] Step 122: Calculate its adjacency matrix according to the similarity matrix, set the weight between adjacent nodes to 1, and set the weight between non - adjacent nodes to 0.
[0080] Refer to Figure 4 , as a preferred embodiment of the present invention. Specifically, step 140 includes the following process:
[0081] Define the compatible class. For the neighborhood node set r(u) = {v1, v2, v3,... vk}, calculate the cosine similarity Sim(vi, vj) between nodes. Set a threshold δ. For node vi, when the similarity Sim(vi, vj) between other nodes in the neighborhood node set and node vi is > δ, then form its compatible class [vi]. The definition of the compatible class is to calculate the neighborhood similarity, that is, the similarity between the neighborhood nodes sharing the nearest neighbors and the central node;
[0082] Define the neighborhood similarity. Define the neighborhood similarity Sim of node u through the information entropy of the neighbor node set H (r(u)). r(u) is the neighborhood node set, and [vi] is the compatible class node. By combining the information entropy with the neighborhood nodes and compatible class nodes, the neighborhood similarity is obtained as a condition for judging aggregation. The calculation formula of the neighborhood similarity Sim H (r(u)) is as follows,
[0083]
[0084] Define the similarity Sim s (u, v) between the neighborhood nodes of the shared neighbor and the central node, where r(u) is the neighborhood node set and r(v) is the compatible class node set. By finding the proportion of the common nodes of the neighborhood nodes and the compatible class nodes in the total nodes, the similarity Sim s (u, v) between the neighborhood nodes of the shared neighbor and the central node is obtained. The calculation formula is as follows,
[0085]
[0086] Combine the neighborhood similarity Sim H (r(u)) and the similarity Sim s (u, v) between the neighborhood nodes of the shared neighbor and the central node. Take the similarity measure Sim(u, v) between the neighborhood node v and the central node u as the condition for controlling aggregation. Define the calculation formula of Sim(u, v) as follows:
[0087] Sim(u, v) = αSim s (u, v) + βSim H (r(u)), α + β = 1
[0088] Where α and β are two parameters whose sum is 1;
[0089] To better aggregate neighbor information, we give an aggregation function and four definitions to help us determine how many orders of neighbor information the central node needs to aggregate. When aggregating, assume that nodes with extremely high similarity do not need to aggregate more information because too much information will increase the computational overhead, while similar nodes need to aggregate their multi-layer neighbor information to extract effective features. According to the above assumption, set a threshold z. The threshold z is used to control whether the central node aggregates downward. When the threshold z ≥ the first threshold, second-order aggregation is performed. When the first threshold > z > the second threshold, first-order aggregation is performed. When z ≤ the second threshold, the loop is exited.
[0090] As a preferred embodiment of the present invention, specifically, the step 150 includes,
[0091] During the encoding stage, the graph convolution operation on the third dataset and the adjacency matrix includes
[0092] Input the adjacency matrix and the third dataset into the encoding layer for encoding to obtain the node embedding vector, i.e., the latent variable Z. The learning rate is set to 0.0001, the activation function is relu, and the dimension of the output latent variable is 800;
[0093] During the decoding stage,
[0094] Perform matrix multiplication operation on the latent variable Z to obtain a new matrix through matrix inner product multiplication.
[0095] As a preferred embodiment of the present invention, specifically, the first threshold is 0.8 and the second threshold is 0.3.
[0096] The present invention also proposes a single-cell dimensionality reduction device based on a graph adaptive aggregation autoencoder, including the following:
[0097] A data acquisition module for acquiring the scRNA-seq dataset as the target dataset;
[0098] A preprocessing module for preprocessing the target dataset to remove invalid information therein to obtain the first dataset, i.e., the gene expression matrix;
[0099] A graph construction module for constructing a graph for the first dataset through the hnsw algorithm, calculating the similarity between the data in the first dataset through the cosine similarity algorithm to obtain a similarity matrix, and calculating an adjacency matrix based on the similarity matrix;
[0100] An adaptive aggregation module for performing neighborhood selection on the first dataset based on the adjacency matrix, determining whether the neighbor set of the first dataset conforms to a normal distribution, removing neighbor nodes that do not conform to the distribution, and using a box plot of similarity values to filter out abnormal neighbor nodes to obtain the second dataset,
[0101] Aggregate the second dataset to obtain the third dataset, and set a threshold z. The threshold z is used to control whether the central node aggregates downward. When the threshold z ≥ the first threshold, perform second-order aggregation. When the first threshold > z > the second threshold, perform first-order aggregation. When z ≤ the second threshold, jump out of the loop;
[0102] A graph autoencoder for processing the third dataset and the adjacency matrix. During the encoding stage, perform graph convolution operation on the third dataset and the adjacency matrix to obtain latent variables. During the decoding stage, perform matrix multiplication operation, and finally continuously reduce the loss in the encoding stage and the decoding stage to obtain the finally dimension-reduced features, and obtain and output the updated latent variables;
[0103] Reference Figure 5 , where the adaptive aggregation module and the graph autoencoder together constitute a graph neural network framework, and the data processed by the data acquisition module, the preprocessing module, and the graph construction module is the input data of the graph neural network framework. The operation process of the graph neural network is as follows,
[0104] Step 1: To ensure the accurate transmission of input data and the original data information, aggregate the data through the adaptive module.
[0105] Step 2: Perform graph convolution operations in the encoding stage. Input the adjacency matrix and gene expression matrix calculated by the adaptive module into the encoding layer. The learning rate is set to 0.0001, the activation function is relu, and the output latent variable dimension is 800.
[0106] Step 3: In the decoding stage, use matrix inner product multiplication operation. Matrix inner product multiplication is to multiply two matrices, and the elements in the same position are multiplied to obtain a new matrix. Then continuously reduce the loss between the encoding stage and the decoding stage to obtain the finally dimension-reduced features for downstream analysis.
[0107] The present invention also proposes a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the single-cell dimension reduction method based on graph adaptive aggregation autoencoder.
[0108] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this embodiment.
[0109] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0110] When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0111] Although the description of the present invention has been quite detailed and several of the described embodiments have been described in particular, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but rather should be regarded as providing a broad interpretation of these claims in light of the prior art by reference to the appended claims, thereby effectively covering the intended scope of the present invention. In addition, the present invention has been described above with embodiments foreseeable by the inventor for the purpose of providing a useful description, and non-substantive modifications to the present invention that are not currently foreseeable may still represent equivalent modifications of the present invention.
[0112] As described above, these are only the preferred embodiments of the present invention. The present invention is not limited to the above-described embodiments. As long as the same means are used to achieve the technical effects of the present invention, they should fall within the protection scope of the present invention. Within the protection scope of the present invention, various different modifications and variations can be made to its technical solutions and / or embodiments.
Claims
1. A single-cell dimensionality reduction method based on a graph adaptive aggregation autoencoder, characterized in that, These include: Step 110: obtaining an scRNA-seq dataset as a target dataset, performing data preprocessing on the target dataset to remove invalid information therein, and obtaining a first dataset, i.e., a gene expression matrix; Step 120: compose the first data set using the HNSW algorithm, calculate the similarity between the data in the first data set using the cosine similarity algorithm to obtain a similarity matrix, and calculate an adjacency matrix based on the similarity matrix; Step 130: Perform neighborhood selection on the first data set based on the adjacency matrix to determine whether the neighbor set of the first data set conforms to a normal distribution, remove neighbor nodes that do not conform to the distribution, and use a box plot of similarity values to filter out abnormal neighbor nodes to obtain a second data set; Step 140: Aggregate the second data set to obtain a third data set, set a threshold z, and control whether the central node aggregates downward. When the threshold z ≥ the first threshold, perform second-order aggregation. When the first threshold > z > the second threshold, perform first-order aggregation. When z ≤ the second threshold, exit the loop. Step 150: Input the third data set and the adjacency matrix into a graph autoencoder. In the encoding phase, a graph convolution operation is performed on the third data set and the adjacency matrix to obtain latent variables. In the decoding phase, a matrix multiplication operation is performed. Finally, the loss in the encoding and decoding phases is continuously reduced to obtain the final dimensionality-reduced features to obtain the updated latent variables. Step 160: Output the updated latent variables of the graph autoencoder.
2. The single-cell dimensionality reduction method based on graph adaptive aggregation autoencoder according to claim 1, characterized in that, Specifically, the data preprocessing process in step 110 includes the following: Remove single-value columns. The threshold of single-value columns is set to 1. That is, if the values of a column are all the same, the column is removed. Remove columns with too many zero-value features. The zero-value ratio is set to 0.
4. If the zero value of a column exceeds 40%, it is judged as an invalid feature and removed. Perform binning, where the number of bins is an empirical value. All target dataset data are divided into 20 subintervals, i.e., boxes, according to the attribute values. The attribute values in the same box are the same as those in the sample. The information entropy of each target dataset data is calculated using information entropy. p(x) is the information entropy. When the information entropy value of a column of data is less than 0.3, the column of data is removed. The information entropy formula is as follows: H(X) = ∑ x∈X p(x)·log p(x); Smoothing of abnormal data: the average expression of a single data in the target data set is calculated as μ, and the variance expression of a single data in the target data set is calculated as σ. If the expression level of a single data exceeds the range of [μ-4σ, μ+4σ], it will be smoothed to the boundary value of the interval; Normalize with the maximum and minimum values, and the expression level of a single data is normalized to [0, 1], x min and x max are the minimum and maximum values of a certain row respectively, then the normalization formula is 3. A single-cell dimensionality reduction method based on a graph adaptive autoencoder according to claim 1, characterized in that, Specifically, the process in step 120 includes the following: Step 121: compose the first data set using the HNSW algorithm, calculate the similarity between the data in the first data set using the cosine similarity algorithm to obtain a similarity matrix, set the number of neighbors to 4, and return a similarity matrix; Step 122: Calculate the adjacency matrix based on the similarity matrix, reset the weights between adjacent nodes to 1, and reset the weights between non-adjacent nodes to 0.
4. A single-cell dimensionality reduction method based on a graph adaptive autoencoder according to claim 1, characterized in that Specifically, step 140 includes the following process: Define the compatible class. For the neighborhood node set r(u) = {v1, v2, v3,... vk}, calculate the cosine similarity Sim(vi, vj) between nodes. Set a threshold δ. For node vi, when the similarity Sim(vi, vj) between other nodes in the neighborhood node set and node vi is > δ, then form its compatible class [vi]. Define the neighborhood similarity. The neighborhood similarity Sim H (r(u)) of node u is defined by the information entropy of the neighbor node set. Here, r(u) is the neighborhood node set and [vi] is the compatible class node. By combining the information entropy with the neighborhood nodes and compatible class nodes, the neighborhood similarity is obtained as a condition for judging aggregation. The calculation formula of the neighborhood similarity Sim H (r(u)) is as follows Define the similarity Sim between the neighborhood nodes of the shared neighbor and the central node s (u, v), where r(u) is the set of neighborhood nodes and r(v) is the set of compatible class nodes. By finding the proportion of the common nodes between the neighborhood nodes and the compatible class nodes in the total nodes, the similarity Sim between the neighborhood nodes of the shared neighbor and the central node is obtained s (u, v), and its calculation formula is as follows Combined with neighborhood similarity Sim H (r(u)) and the similarity Sim s (u, v) of the neighborhood nodes sharing the nearest neighbor with the central node, the similarity measure Sim(u, v) between the neighborhood node v and the central node u is used as the condition for controlling aggregation, and the calculation formula of Sim(u, v) is defined as follows: Sim(u, v) = αSim s (u, v) + βSim H (r(u)), α + β = 1 Where α and β are two parameters whose sum is 1. During aggregation, assume that nodes with extremely high similarity do not need to aggregate more information, while similar nodes need to aggregate their multi-layer neighbor information to extract effective features. According to this assumption, set a threshold z. The threshold z is used to control whether the central node aggregates downward. When the threshold z ≥ the first threshold, perform second-order aggregation. When the first threshold > z > the second threshold, perform first-order aggregation. When z ≤ the second threshold, break out of the loop.
5. A single-cell dimensionality reduction method based on a graph adaptive autoencoder according to claim 1, wherein, Specifically, the step 150 includes The step 150 includes During the encoding stage, the graph convolution operation on the third data set and the adjacency matrix includes Input the adjacency matrix and the third data set into the encoding layer for encoding to obtain the node embedding vector, i.e., the latent variable Z. Set the learning rate to 0.0001, the activation function is relu, and the output latent variable dimension is 800. During the decoding stage The matrix multiplication operation performs an inner product matrix multiplication on the latent variable Z to obtain a new matrix.
6. The single-cell dimensionality reduction method based on graph adaptive aggregation autoencoder according to claim 4, characterized in that Specifically, the first threshold is 0.8, and the second threshold is 0.
3.
7. A single-cell dimensionality reduction device based on a graph adaptive aggregation autoencoder, characterized in that, Including the following A data acquisition module for acquiring the scRNA-seq data set as the target data set. A preprocessing module for preprocessing the target data set to remove the invalid information therein to obtain the first data set, i.e., the gene expression matrix. A graph construction module for constructing a graph for the first data set through the hnsw algorithm, calculating the similarity between the data in the first data set through the cosine similarity algorithm to obtain a similarity matrix, and calculating the adjacency matrix based on the similarity matrix. An adaptive aggregation module for performing neighborhood selection on the first data set based on the adjacency matrix, determining whether the neighbor set of the first data set conforms to the normal distribution, removing the neighbor nodes that do not conform to the distribution, and using the box plot of the similarity values to filter out the abnormal neighbor nodes to obtain the second data set. Aggregate the second data set to obtain the third data set. Set a threshold z. The threshold z is used to control whether the central node aggregates downward. When the threshold z ≥ the first threshold, perform second-order aggregation. When the first threshold > z > the second threshold, perform first-order aggregation. When z ≤ the second threshold, break out of the loop. A graph autoencoder for processing the third data set and the adjacency matrix. During the encoding stage, perform a graph convolution operation on the third data set and the adjacency matrix to obtain a latent variable. During the decoding stage, perform a matrix multiplication operation. Finally, continuously reduce the loss in the encoding stage and the decoding stage to obtain the finally dimension-reduced features, and obtain and output the updated latent variable. The adaptive aggregation module and the graph autoencoder together constitute the graph neural network framework, and the data processed by the data acquisition module, the preprocessing module, and the graph construction module is the input data of the graph neural network framework.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.