Single cell sequencing data recovery method based on compressed sensing
By applying a combination of compression perception and Ivy algorithm in single-cell RNA sequencing data, the sparsity problem in the data caused by Dropout phenomenon is solved, and the accuracy and efficiency of data recovery is significantly improved, providing a more reliable tool for biological analysis.
Patent Information
- Application Number
- CN202411844172.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-15
- Publication Date
- 2025-03-25
AI Technical Summary
The sparseness problems caused by Dropout in single-cell RNA sequencing data lead to a decrease in the completeness and accuracy of the data, affecting the reliability of biological analysis.
Combining compression perception theory and Ivy algorithm, a random observation matrix is constructed and the sparse coefficient matrix and transformation matrix are optimized to improve the accuracy and efficiency of data recovery.
Significantly improves the missing value recovery of gene expression matrix and improves data integrity, providing more reliable tools for complex biological analysis.
Smart Images

Figure CN119694405A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of bioinformatics, and in particular to a method for recovering single-cell sequencing data based on compressed sensing. Background Art
[0002] In recent years, single-cell RNA sequencing (scRNA-seq) technology has become an important tool for studying cellular heterogeneity and gene expression regulation. Compared with traditional omics methods, scRNA-seq can detect gene expression levels at single-cell resolution, thereby capturing intercellular heterogeneity. However, the high resolution of scRNA-seq technology also brings about the problem of sparse and missing data, which is usually manifested as a large number of zero values in the gene expression matrix.
[0003] This zero-value phenomenon is partly due to biological phenomena, that is, some genes are not expressed in the corresponding cells, and partly due to technical reasons, low-expression genes are not detected, which is called Dropout events. Dropout events are caused by low sequencing depth or unsuccessful reverse transcription of some genes. This is a typical feature of single-cell sequencing technology and one of the main challenges in scRNA-seq data processing. The occurrence of Dropout events significantly reduces the integrity and accuracy of sequencing data and affects the reliability of downstream biological analysis results.
[0004] In response to the above problems, there are currently a variety of methods that attempt to recover Dropout events in scRNA-seq data. These methods can be roughly divided into the following categories: model-based methods, matrix decomposition-based methods, deep learning-based methods, and sparse representation-based methods. For example, the matrix decomposition method recovers missing values by constructing a low-rank relationship model between genes and cells, but its adaptability to complex data sets is poor; the deep learning method uses neural networks to learn gene expression patterns, which can improve the reconstruction effect to a certain extent, but the computational complexity is high and it is sensitive to high-dimensional sparse data; the sparse representation method constructs a sparse basis and uses the sparse characteristics of the observed values for recovery, which has high efficiency and accuracy, but in practical applications it is often limited by the influence of model initialization or parameter selection.
[0005] In recent years, compressed sensing (CS) technology has been widely used in signal processing, image processing and other fields. Its core idea is to use the sparsity of the signal to restore the original signal through a reconstruction algorithm at a sampling rate lower than the Nyquist sampling theorem. For the dropout problem in single-cell RNA sequencing (scRNA-seq) data, compressed sensing provides an effective solution for the recovery of missing values.
[0006] Although the compressed sensing method performs well in signal recovery, it also has some limitations: high computational complexity, low processing efficiency in high-dimensional data (such as scRNA-seq data), and the optimization process is prone to fall into local optimal solutions, resulting in reduced reconstruction accuracy. In order to overcome the limitations of existing methods, the present invention proposes a single-cell sequencing data recovery method based on compressed sensing, which optimizes the compressed sensing sparse reconstruction process in combination with the Ivy algorithm, and fully utilizes the advantages of the Ivy algorithm in global search, dynamic adaptive parameter adjustment and parallel computing to overcome the shortcomings of traditional methods. Focus on solving the sparsity problem caused by the Dropout phenomenon in single-cell RNA sequencing data, further improve the reliability and applicability of reconstruction, and provide an efficient and accurate solution for the analysis of high-dimensional sparse data. Summary of the invention
[0007] In order to solve the Dropout event in the single-cell sequencing data mentioned in the background technology, the present invention combines the compressed sensing theory with the characteristics of single-cell RNA sequencing data, and proposes an innovative scRNA-seq data recovery framework based on sparse representation and sparse optimization methods. By constructing a random observation matrix and combining the optimization of the sparse coefficient matrix and the transformation matrix with the Ivy algorithm, the accuracy and efficiency of data recovery are improved. The experimental results of the present invention show that this method has significant advantages in recovering missing values and improving data integrity of the gene expression matrix, providing a more reliable tool for complex biological analysis of scRNA-seq data.
[0008] The technical solution adopted by the present invention comprises the following steps:
[0009] Step 1: Download single-cell RNA sequencing data from the public database GEO, select data sets that meet the sparsity requirements of compressed sensing theory, and construct a cell-gene expression matrix;
[0010] Step 2: Preprocess the expression matrix, remove low-quality cells and genes, and normalize;
[0011] Step 3: Construct a transformation matrix and use compressed sensing theory for sparse representation;
[0012] Step 4: construct an observation matrix and perform compression measurement;
[0013] Step 5: Use the observed data to recover data;
[0014] Step 6: Use the Ivy algorithm to optimize the compressed sensing process.
[0015] In step 1 of the present invention, the data set is downloaded from the GEO public database and screened to meet the high sparsity data set. The data set is in .txt format and organized into a two-dimensional matrix stored in .csv format, a matrix composed of multiple genes and cells, in which a row represents the expression level of a gene in all cells, and a column represents the expression level of all genes in a cell.
[0016] The pre-processing in step 2 of the present invention includes: eliminating low-quality cells and normalizing;
[0017] Eliminating low-quality cells is to screen and remove genes and cells with low expression levels, that is, to exclude those nuclear genes below the set threshold from the cell-gene matrix. If there is a cell with an expression value less than 200, filter out this cell and delete this column from the expression matrix; if there is a gene with an expression value less than 3, filter out this gene and delete this row from the expression matrix;
[0018] Normalize the gene expression values and convert the data into a zero-mean unit variance distribution to reduce the impact of sequencing depth differences on the data, so that gene expression levels can be compared between genes in different cells;
[0019] The original expression matrix Perform logarithmic normalization to obtain the normalized data matrix , as shown below:
[0020]
[0021] in Indicates The gene in The expression value on cells, Indicates The gene in Normalized expression values per cell.
[0022] The sparse representation of step 3 of the present invention includes:
[0023] After preprocessing, the expression data matrix Transpose and assign the transposed matrix to , as the preprocessed expression matrix, for the next step of sparse representation;
[0024] Construct the transformation matrix using the least absolute shrinkage and selection operator Lasso , through the transformation matrix to express the matrix Converted into a sparse representation, and then through this conversion process, revealing which gene features are most important for recovering data, namely:
[0025]
[0026] in:
[0027] , the expression matrix after preprocessing, g represents the number of cells, and n represents the number of genes;
[0028] , transformation matrix, used to represent the expression matrix as a sparse representation;
[0029] , a sparse coefficient matrix, assuming yes - sparse, meaning each row has only non-zero elements, that is ;
[0030] The optimization goal is defined for the sparse representation process to minimize the reconstruction error while ensuring data sparsity. Specifically, the optimization goal is expressed as:
[0031]
[0032] in:
[0033] Represents the error term between the expression matrix X and the sparse representation, that is, the sparse representation process is optimized by minimizing the error and improving the reconstruction quality;
[0034] is a regularization term used to control the transformation matrix The sparsity of It is a hyperparameter used to balance the weight between error and sparsity;
[0035] Constraints:
[0036] : The elements in the transformation matrix are guaranteed to be non-negative;
[0037] ,: Transformation matrix Each column vector in is normalized to unit norm, which ensures feature consistency;
[0038] : Sparse coefficient matrix Each row vector of has - Sparsity, that is, each row vector has at most non-zero elements.
[0039] The compression measurement in step 4 of the present invention includes:
[0040] By introducing the observation matrix, the expression matrix Mapped to a low-dimensional space, where a random Gaussian matrix is selected as the observation matrix , because it satisfies the irrelevance and constraint isometric form RIP;
[0041] Through the observation matrix Compress the sparse representation to obtain the measured value , while using as little measurement data as possible and retaining as much key information as possible, the form of compressed measurement is as follows:
[0042]
[0043] in:
[0044] , the measurement data matrix after compression measurement contains the low-dimensional representation of each gene expression matrix, m represents the measurement dimension, that is, the dimension of the compressed low-dimensional space, n represents the number of genes, that is, the number of columns in the high-dimensional expression matrix, and satisfies , that is, the dimension of the observed data is much smaller than the dimension of the original data;
[0045] ,Observation matrix, uses a random Gaussian matrix to map data from high-dimensional space to low-dimensional space; , transformation matrix, used to represent the expression matrix as a sparse representation;
[0046] , a sparse coefficient matrix, assuming yes - sparse, meaning each row has only non-zero elements, that is .
[0047] The data recovery in step 5 of the present invention includes:
[0048] The goal of the data recovery phase is to find a sparse high-dimensional matrix , so that the measurement matrix It can be expressed as a linear combination of the observation matrix and the original data. The data recovery problem can be formalized as an optimization problem with constraints, namely:
[0049]
[0050] in:
[0051] , represents the sparse coefficient matrix of The norm, that is, the sum of the absolute values of all elements in the matrix, is minimized The norm is to ensure that the solution As sparse as possible;
[0052] The compressed sensing problem is transformed into a known observation matrix and the transformation matrix Under the premise of , we can use prior knowledge to solve the sparse coefficient matrix ,Right now:
[0053]
[0054] Orthogonal matching pursuit (OMP) is used as the sparse representation recovery algorithm to restore the original data by gradually selecting the information that best reflects the data characteristics.
[0055] The optimization process in step 6 of the present invention includes:
[0056] The Ivy Algorithm is introduced for sparse representation and recovery tasks in compressed sensing. Its global optimization capability is used to gradually optimize the sparse coefficient matrix, ultimately achieving efficient reconstruction of complex biological data.
[0057] Optimizing sparse coefficient matrices using the ivy algorithm in sparse representation , when updating each generation, the individual with the smallest fitness is selected as the optimal solution according to the fitness value and the individual is updated. The specific update formula is as follows:
[0058]
[0059] in:
[0060] : No. A sparse coefficient matrix;
[0061] : The sparse coefficient matrix of the optimal solution, usually the individual with the smallest fitness in the current population;
[0062] : indicates growth factor;
[0063] : Random expansion factor, introducing random perturbations to enhance the diversity of exploration;
[0064] : Gaussian noise increases the randomness of the search and avoids falling into the local optimal solution;
[0065] The optimization goal of the sparse representation stage is to optimize the sparse coefficient matrix , using as few non-zero elements as possible to represent the expression matrix , thereby extracting the most critical features of the data. The optimization goal of this stage can be expressed as:
[0066]
[0067] in:
[0068] is the preprocessed expression matrix, i.e., the data to be recovered;
[0069] is the transformation matrix, which is consistent with the transformation matrix before optimization;
[0070] is the optimized sparse coefficient matrix;
[0071] is the optimized sparse coefficient matrix norm, indicating sparsity;
[0072] is a regularization parameter used to control sparsity;
[0073] The goal of data recovery phase optimization is to Recover the sparse high-dimensional expression matrix from , while ensuring sparsity and consistency, the optimization goal of this stage can be expressed as:
[0074]
[0075] in:
[0076] is the observation matrix;
[0077] It is a sparse matrix that is optimized again in the data recovery phase;
[0078] is the measurement matrix after optimizing compressed sensing;
[0079] is a sparse coefficient matrix norm, indicating sparsity;
[0080] is a regularization parameter used to control sparsity;
[0081] According to the above update formula and optimization objectives, the new sparse coefficient matrix can be solved , combined with the known transformation matrix, we can solve the sparse high-dimensional expression matrix , that is, the expression matrix after compressed sensing restoration is obtained:
[0082]
[0083] The restored expression matrix is calculated by the above formula ,at this time It is the data restored from the coefficient representation, which not only retains the sparsity of the expression matrix to be restored, but also highly approximates the original expression matrix. .
[0084] The beneficial effects of the present invention are:
[0085] The present invention combines the theory of compressed sensing with the characteristics of single-cell RNA sequencing data, and proposes an innovative scRNA-seq data recovery framework based on sparse representation and sparse optimization methods. By constructing a random observation matrix and combining the optimization of the sparse coefficient matrix and the transformation matrix with the Ivy algorithm, the accuracy of data recovery is significantly improved. The experimental results of the present invention show that this method has significant advantages in recovering missing values of gene expression matrices and improving data integrity, providing a more reliable tool for complex biological analysis of scRNA-seq data.
[0086] The present invention can effectively improve the integrity and reliability of single-cell sequencing data, and is suitable for gene expression analysis, biological feature mining and medical research at the single-cell level, providing a new tool for precision medicine research. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 It is a framework diagram of the present invention;
[0088] Figure 2 This is the principle diagram of compressed sensing;
[0089] Figure 3 This is the restoration effect diagram before optimizing compressed sensing;
[0090] Figure 4 This is the recovery effect after the Ivy algorithm optimizes compressed sensing. DETAILED DESCRIPTION
[0091] A method for recovering single-cell sequencing data based on compressed sensing, with an overall flow chart as shown in the attached figure. Figure 1 As shown, the following steps are included:
[0092] Step 1: Download single-cell RNA sequencing data from the public database GEO, select data sets that meet the sparsity requirements of compressed sensing theory, and construct a cell-gene expression matrix;
[0093] The data sets selected in this invention are all obtained from the public database GEO, and the website for obtaining them is: https: / / www.ncbi.nlm.nih.gov / geo / ;
[0094] This paper screened three datasets that meet high sparsity in the GEO database, namely GSE123358, GSE124989, and GSE147326;
[0095] The data sets downloaded from the GEO database are all in .txt form, and these files contain information such as gene expression data and sample annotations. In order to process data more intuitively and conveniently, it is necessary to organize the data into a tabular form. The present invention organizes the data into a two-dimensional matrix stored in the form of .csv. Wherein the row represents genes, and the column represents cells. The meaning of each row is the expression of a gene in the corresponding cell, and the meaning of each column is the expression of a cell in the corresponding gene. Through the above operation, the expression matrix of cell-gene construction has been completed, and the specific situation of the expression matrix is shown in Table 1.
[0096] Table 1 GEO database
[0097] Dataset ID Number of genes Cell number GSE123358 48162 21 GSE124989 59838 121 GSE147326 16521 3510
[0098] Step 2: Preprocess the expression matrix, remove low-quality cells and genes, and normalize;
[0099] To ensure the accuracy and feasibility of subsequent analysis, the expression matrix of single-cell RNA sequencing data needs to be pre-processed. This process mainly includes two key steps: quality control and normalization.
[0100] In the quality control link, the core task is to eliminate abnormal and noisy data. In terms of quality control, the present invention focuses on screening and removing genes and cells with low expression levels, that is, excluding cells and genes whose expression values are lower than the set threshold from the cell-gene matrix. Specifically, the present invention sets the normal expression threshold of cells to 200 and the normal expression threshold of genes to 3;
[0101] The expression matrix reveals the actual expression status of genes in each cell. However, due to differences in gene length and changes in sequencing depth, the relative expression of genes in different cells varies. Therefore, the expression matrix must be normalized to eliminate these effects. The normalization of the present invention is performed using a logarithmic normalization method. Let the original expression data matrix be Z, where Indicates The gene in The expression values on each cell are normalized by natural logarithm to obtain the normalized data matrix ,in Indicates The gene in The normalized expression value on each cell is calculated as:
[0102]
[0103] The normalized data matrix obtained using the above formula is , which not only retains the gene expression value of 0 in the original expression, but also performs nonlinear compression on genes with higher expression values, and retains the overall data structure while reducing the influence of high outliers. In addition, the data obtained by logarithmic normalization can effectively reduce the skewed distribution of the data, making the data closer to normal distribution, which is convenient for subsequent analysis. The data after the above preprocessing is shown in Table 2:
[0104] Table 2 Preprocessed data
[0105] Dataset ID Raw data Preprocessed data GSE123358 48162*21 17554*21 GSE124989 59838*121 18243*121 GSE147326 16521*3510 16393*3327
[0106] Step 3: Construct a transformation matrix and use compressed sensing theory for sparse representation;
[0107] Compressed sensing technology was originally applied to signal processing, aiming to effectively encode and store the information of high-dimensional expression data in low-dimensional space, and then recover the original high-dimensional signal from the low-dimensional composite measurement data through compressed sensing. The present invention innovatively applies compressed sensing technology to the gene expression data recovery process, which mainly includes converting the gene expression data into sparse representation through the transformation matrix, compressing and measuring the sparse representation through the observation matrix, and recovering the data through the algorithm. This process is shown in the attached figure. Figure 2 shown.
[0108] For the expression data matrix obtained after preprocessing , where R represents a two-dimensional matrix, n represents the number of genes, and g represents the number of cells. Since the number of genes is much larger than the number of cells (i.e. ), in order to adapt to the following compressed sensing process, it is necessary to transpose the expression data matrix obtained after preprocessing. The transposed matrix , and assign the transposed matrix to ,at this time Represents the preprocessed expression matrix for subsequent analysis and processing, namely:
[0109]
[0110] The premise of compressed sensing for each single-cell sequencing data is that the data is sparse in a certain transformation domain, which means that the gene expression information of each cell can be represented by a small number of important features. Compressed sensing recovers high-dimensional data by identifying the intrinsic relationship in high-dimensional data, that is, the latent structure. However, due to the expression matrix Not all relationships are active or meaningful, so matrix decomposition is needed to find out which relationships are important. Specifically, the Lasso (least absolute shrinkage and selection operator) algorithm is used to perform Lasso regression on the expression of each gene. The goal is to find a sparse matrix so that the expression pattern of each cell can be represented by a linear combination of a small number of genes. This sparse matrix is the transformation matrix . By transforming the matrix, the expression matrix Converted into a sparse representation, and then through this conversion process, revealing which gene features are most important for recovering data, namely:
[0111]
[0112] in:
[0113] , the expression matrix after preprocessing, g represents the number of cells, and n represents the number of genes;
[0114] , transformation matrix, used to represent the expression matrix as a sparse representation;
[0115] , a sparse coefficient matrix, assuming yes - sparse, meaning each row has only non-zero elements, that is ;
[0116] After completing the sparse representation, we need to optimize it to ensure that we can recover the original high-dimensional data from the low-dimensional representation. In this process, the goal is to find a suitable sparse representation so that the data matrix can retain key information while minimizing redundancy, which not only helps data compression, but also improves the accuracy of subsequent data recovery;
[0117] Therefore, the optimization goal of sparse representation can be defined as: ensuring the sparsity and reconstruction accuracy of sparse coefficients by minimizing the loss function. Specifically:
[0118] Sparsity constraint: ensure that the non-zero elements in the sparse coefficient matrix are as few as possible to ensure the simplicity and effectiveness of the data;
[0119] Reconstruction accuracy: Based on the sparsity constraint, ensure that the sparse representation can better reconstruct the original data and minimize the reconstruction error;
[0120] Through these optimization goals, the low-dimensional representation of data is further optimized based on the sparse representation, and a solid foundation is laid for the subsequent compression measurement and data recovery steps. The optimization goals of the above sparse representation are described as follows:
[0121]
[0122] in:
[0123] It represents the error term between the expression matrix X and the sparse representation, that is, it is hoped to optimize the sparse representation process and improve the reconstruction quality by minimizing the error;
[0124] is a regularization term used to control the transformation matrix The sparsity of It is a hyperparameter used to balance the weight between error and sparsity;
[0125] Constraints:
[0126] : The elements in the transformation matrix are guaranteed to be non-negative;
[0127] ,: Transformation matrix Each column vector in is normalized to unit norm, which ensures feature consistency;
[0128] : Sparse coefficient matrix Each row vector of has - Sparsity, that is, each row vector has at most non-zero elements;
[0129] Step 4: construct an observation matrix and perform compression measurement;
[0130] After obtaining the sparse representation, the next step is the compressed measurement phase. In this phase, the observation matrix , the sparse representation is processed by dimensionality reduction to reduce the amount of data storage and transmission. The core of this step is to map high-dimensional data into a low-dimensional space while retaining as much key information as possible. The key to achieving compressed measurement is to select a suitable measurement matrix, which will determine whether the original data can be accurately reconstructed later. In order to ensure the effectiveness of the measurement matrix, two important conditions need to be met:
[0131] (1) Irrelevance: The measurement matrix and the sparse coefficient matrix should have low coherence, which means that the inner product between the measurement matrix and the sparse coefficient matrix should be as small as possible, so as to ensure that when mapping under the measurement matrix, the key information of the sparse representation can be effectively retained without causing information loss due to excessive coherence. This low coherence can effectively avoid mutual interference between the sparse coefficient matrix and the measurement matrix, thereby improving the accuracy of data recovery.
[0132] (2) Constrained isometry form (RIP): The ideal measurement matrix should satisfy the restricted isometry property (RIP). The core idea of RIP is to keep the geometric characteristics of the expression matrix in the low-dimensional projection space unchanged after compression. Specifically, after the sparse coefficient matrix is mapped to the low-dimensional space by the measurement matrix, the RIP principle ensures that the distance between two points is close to the corresponding distance in the original high-dimensional space. This is crucial for the subsequent accurate reconstruction of the original data because it effectively avoids the loss or distortion of features.
[0133] In summary, the information on the high-dimensional expression matrix is captured and saved in the low-dimensional space, and then applied to restore the high-dimensional space from the low-dimensional composite measurement data. Through this process, the measurement matrix after compressed measurement is obtained , m represents the measurement dimension, i.e. the dimension of the compressed low-dimensional space, and n represents the number of genes, i.e. the number of columns in the high-dimensional expression matrix. The measurement value obtained by compressing the sparse representation. In order to achieve efficient data compression and accurate reconstruction, the present invention selects a random Gaussian matrix as the observation matrix, using as little measurement data as possible to retain as much key information as possible. The form of compressed measurement is as follows:
[0134]
[0135] in:
[0136] , the measurement data matrix after compression measurement contains the low-dimensional representation of each gene expression matrix, m represents the measurement dimension, that is, the dimension of the compressed low-dimensional space, n represents the number of genes, that is, the number of columns in the high-dimensional expression matrix, and satisfies , that is, the dimension of the observed data is much smaller than the dimension of the original data;
[0137] ,Observation matrix,The present invention uses a random Gaussian matrix to map data from high-dimensional space to low-dimensional space; , transformation matrix, used to represent the expression matrix as a sparse representation;
[0138] , a sparse coefficient matrix, assuming yes - sparse, meaning each row has only non-zero elements, that is ;
[0139] Step 5: Use the observed data to recover data;
[0140] In the previous stage, a measurement data matrix has been obtained through compression measurement ,in , that is, the dimension of the measured data is much smaller than the dimension of the original data. The goal of the data recovery phase is to find a sparse high-dimensional expression matrix , while retaining the expression matrix to be restored While keeping the sparsity of , it should be as similar to this matrix as possible;
[0141] From a mathematical point of view, the compressed sensing problem is transformed into a known observation matrix and the transformation matrix Under the premise of , we can use the optimization problem to solve the sparse coefficient matrix , since the observation matrix is used in the compression measurement ,The data recovery problem can first be formalized as an optimization problem with constraints, namely:
[0142]
[0143] in:
[0144] , represents the sparse coefficient matrix of The norm, that is, the sum of the absolute values of all elements in the matrix, is minimized The norm is to ensure that the solution As sparse as possible;
[0145] Constraints , which ensures the consistency between the reconstructed data and the observed data, which means that the reconstructed measurement value after the compressed measurement should be consistent with the original measurement data. As close as possible.
[0146] In the above optimization problem, by minimizing the sparse coefficient norm, ensuring that only a small number of important features are retained in data recovery, while noise and redundant features are effectively suppressed. This allows the new sparse coefficient matrix to be solved , combined with the known transformation matrix, we can solve the sparse high-dimensional expression matrix , that is, the expression matrix after compressed sensing restoration is obtained:
[0147]
[0148] The restored expression matrix is calculated by the above formula ,at this time It is the data restored from the coefficient representation, which not only retains the sparsity of the expression matrix to be restored, but also highly approximates the original expression matrix. .
[0149] Specifically, the present invention uses OMP (Orthogonal Matching Pursuit) as a sparse representation recovery algorithm. The algorithm can effectively recover the original data from the compressed measurement data under the sparse representation framework. The core idea of OMP is to recover the original data by gradually selecting the information that best reflects the data characteristics, retaining important information and removing unnecessary noise.
[0150] Step 6: Use the Ivy algorithm to optimize the compressed sensing process;
[0151] In view of the technical problems of traditional compressed sensing algorithms, such as being easily limited to local optimal solutions and having high computational complexity, the present invention intends to use the Ivy algorithm to optimize the sparse reconstruction process of compressed sensing.
[0152] The Ivy Algorithm is inspired by the growth pattern of ivy plants, simulating their orderly and coordinated growth process and spatial diffusion evolution. The algorithm models the growth rate of plants through differential equations, and uses the information of neighboring ivy plants to adjust its own growth direction. It imitates the plants' selection of optimal neighbors for self-optimization, improving the ability of global search and local exploration. The unique advantage of IVY is that it maintains population diversity, while having a simple and flexible structure, easy to modify and expand, and easy to optimize performance and adapt to different application needs;
[0153] In the Ivy League algorithm, individuals exist in the form of groups, and gradually find the global optimal solution through information exchange and interaction. Individuals decide how to update their positions based on their distance and fitness from other individuals;
[0154] The core idea of the Ivy algorithm is:
[0155] Each individual moves closer to the optimal neighbor and improves its own position according to the fitness and position of its neighbors.
[0156] In order to prevent falling into the local optimal solution, the algorithm allows individuals to have a certain degree of randomness to enhance the global nature of the search;
[0157] The individual update process of the Ivy algorithm optimizes the search process by updating the individual positions. Individual in the The position of the iteration is , the update formula is as follows:
[0158]
[0159] in:
[0160] : No. The positions of individuals (i.e., candidate solutions);
[0161] : The location of the optimal neighbor, usually the individual with the smallest fitness;
[0162] : Growth factor, which controls the growth rate of individuals toward the optimal neighbor;
[0163] : Random expansion factor, introducing random perturbations to enhance the diversity of exploration;
[0164] : Gaussian noise increases the randomness of the search and avoids falling into the local optimal solution;
[0165] Each individual updates its position by interacting with its neighbors, and the growth factor Determines the speed at which individuals approach their neighbors, and the random expansion factor The diversity of the algorithm is increased, making the exploration more extensive and comprehensive. The introduction of Gaussian noise prevents individuals from relying solely on the optimal neighbor when searching, and also avoids premature convergence;
[0166] Growth Factors Controls the speed at which individuals move toward their optimal neighbors. As iterations proceed, the growth factor is dynamically adjusted based on the distance between individuals. When an individual is closer to its optimal neighbor, the update speed slows down; when an individual is farther from its optimal neighbor, the update speed speeds up, making the process of exploring the optimal neighbor more extensive and comprehensive. The growth factor dynamic adjustment formula is as follows:
[0167]
[0168] in:
[0169] : Initial growth factor, controlling the initial speed of the individual moving toward the optimal neighbor;
[0170] : Attenuation factor, controlling the response strength of the distance to the growth factor. Larger means that the individual's movement is more responsive to distance; smaller This means that individuals are less responsive to changes in distance and are more inclined to fine-grained searches;
[0171] :individual and individuals The Euclidean distance between is defined as: ;
[0172] Growth factors according to distance Dynamic adjustment. As the distance between an individual and its optimal neighbor increases, the growth factor decays, meaning that the individual's update step becomes smaller. This allows for a more refined search process when approaching the optimal neighbor. ,The Ivy algorithm can balance exploration and exploitation, avoiding the search process being too rough or too limited;
[0173] Fitness evaluation is one of the core steps of the Ivy League algorithm. The fitness value of each individual indicates how close it is to the optimal neighbor. Individuals with smaller fitness will attract other individuals and push the entire population toward the optimal solution. The fitness evaluation formula is as follows:
[0174]
[0175] in:
[0176] : No. The fitness value of each individual measures the distance between the individual and the optimal neighbor;
[0177] : The best neighbor, that is, the global optimal solution;
[0178] The fitness value of an individual is measured by its distance from the global optimal solution. The smaller the fitness value, the closer the individual is to the optimal solution. Individuals with poor fitness will be attracted by better individuals and gradually optimize their positions.
[0179] In the present invention, the Ivy algorithm is applied to the sparse representation and data recovery tasks of compressed sensing, and its global optimization capability is used to gradually optimize the sparse coefficient matrix, ultimately achieving efficient reconstruction of complex biological data;
[0180] In compressed sensing, the goal is to recover sparse data from a small amount of observation data, and the Ivy algorithm can be used to optimize the sparse representation and data recovery stages of the compressed sensing process;
[0181] Ivy League Algorithm through Growth Factors , attenuation factor and the random expansion factor Balance global search and local development to find the optimal solution, and refer to this update process to update the sparse coefficient matrix , when updating each generation, the individual with the smallest fitness is selected as the optimal solution according to the fitness value and the individual is updated. The specific update formula is as follows:
[0182]
[0183]
[0184] in:
[0185] : No. A sparse coefficient matrix;
[0186] : The sparse coefficient matrix of the optimal solution, usually the individual with the smallest fitness in the current population;
[0187] : represent growth factor and attenuation factor respectively;
[0188] : Random expansion factor, introducing random perturbations to enhance the diversity of exploration;
[0189] : Gaussian noise increases the randomness of the search and avoids falling into the local optimal solution;
[0190] :individual and individuals The Euclidean distance between
[0191] Optimization results obtained in the sparse representation stage It is an approximate solution based on the trade-off optimization between sparsity constraint and reconstruction error, namely:
[0192]
[0193] In the sparse representation stage, the role of the Ivy algorithm is to optimize the sparse coefficient matrix , making it more consistent with the sparsity constraint and reducing the representation error. Its optimization goal is to make the transformation matrix and the sparse coefficient matrix Better fit to the original expression matrix , that is, by optimizing the sparse coefficient matrix , using as few non-zero elements as possible to represent the expression matrix , thereby extracting the most critical features of the data. The optimization goal of this stage can be expressed as:
[0194]
[0195] in:
[0196] is the preprocessed expression matrix, i.e., the data to be recovered;
[0197] is the transformation matrix, which is consistent with the transformation matrix before optimization;
[0198] is the optimized sparse coefficient matrix;
[0199] is the measurement matrix in compressed sensing;
[0200] is the optimized sparse coefficient matrix norm, indicating sparsity;
[0201] is a regularization parameter used to control sparsity;
[0202] Part I Represents the error between the sparse representation and the original data, using Norm (Euclidean distance) minimization error, part 2 is the sparsity regularization term, representing the sparse coefficient matrix of norm, by using the regularization parameter Controlling sparsity, The larger the value, the more sparse the optimization algorithm will be, and vice versa. The value will add more non-zero elements to the reconstructed matrix;
[0203] After the optimized sparse representation, the compression measurement phase is entered. The compression measurement is consistent with that before optimization, that is:
[0204]
[0205] in:
[0206] is the measurement matrix obtained after optimization;
[0207] Represent the observation matrix and transformation matrix respectively, which are consistent with those before optimization;
[0208] is the sparse coefficient matrix obtained after optimizing the sparse representation stage;
[0209] In the data recovery phase, the role of the Ivy algorithm is to further optimize the , so that the reconstructed sparse coefficient matrix can be as close to the real data as possible. The update of the sparse matrix is consistent with the sparse representation stage, that is:
[0210]
[0211]
[0212] in:
[0213] : No. A sparse coefficient matrix;
[0214] : The sparse coefficient matrix of the optimal solution, usually the individual with the smallest fitness in the current population;
[0215] : represent growth factor and attenuation factor respectively;
[0216] : Random expansion factor, introducing random perturbations to enhance the diversity of exploration;
[0217] : Gaussian noise increases the randomness of the search and avoids falling into the local optimal solution;
[0218] :individual and individuals The Euclidean distance between
[0219] The goal of data recovery phase optimization is to Recover the sparse high-dimensional expression matrix from , while ensuring sparsity and consistency. The optimization goal of this stage can be expressed as:
[0220]
[0221] in:
[0222] is the observation matrix;
[0223] It is a sparse matrix that is optimized again in the data recovery phase;
[0224] is the measurement matrix after optimizing compressed sensing;
[0225] is a sparse coefficient matrix norm, indicating sparsity;
[0226] is a regularization parameter used to control sparsity;
[0227] Part I Indicates the error between the recovered data and the original data, using Norm (Euclidean distance) minimization error, part 2 is the sparsity regularization term, representing the sparse coefficient matrix of norm;
[0228] According to the above update formula and optimization objectives, the new sparse coefficient matrix can be solved , combined with the known transformation matrix, we can solve the sparse high-dimensional expression matrix , that is, the expression matrix after compressed sensing restoration is obtained:
[0229]
[0230] The restored expression matrix is calculated by the above formula ,at this time It is the data restored from the coefficient representation, which not only retains the sparsity of the expression matrix to be restored, but also highly approximates the original expression matrix. .
[0231] In summary, the Ivy algorithm is used to optimize the sparse coefficient matrix in both the sparse representation and data recovery stages, and the optimization process is dynamically adjusted through growth factors and random expansion factors to find the optimal sparse representation and recovery results.
[0232] Next, the restoration effect is further evaluated and the final restored expression matrix is saved to illustrate the effect of the present invention.
[0233] After completing data recovery, the recovery results need to be evaluated to verify the recovery results of the model. The evaluation of the recovery results mainly includes error evaluation and similarity evaluation.
[0234] From the above, we can see that represents the expression matrix to be restored, represents the expression matrix after compressed sensing recovery before optimization, Represents the expression matrix restored after the Ivy algorithm optimizes compressed sensing. The following evaluation of the restoration effect is mainly aimed at and as well as and Error evaluation and similarity evaluation are performed between them. and The relationship between can be used to obtain the restoration effect before optimizing compressed sensing. The smaller the error and the higher the similarity, the better the restoration effect. and The relationship between , we can get the recovery effect after the Ivy algorithm optimizes compressed sensing. And by comparing and as well as and The relationship between them can be further optimized.
[0235] (1) Error assessment
[0236] In this paper, in order to comprehensively evaluate the recovery effect, two common error indicators are used: mean absolute error (MAE) and mean square error (MSE) to quantify the performance of the optimized compressed sensing method in the recovery of breast cancer single-cell RNA sequencing data. By comparing the MAE and MSE values under different recovery methods, we can clearly understand the advantages of the optimized algorithm in error control.
[0237] The mean square error is a common indicator for measuring the difference between the reconstructed data and the original data. It represents the average of the squared difference between the original data and the reconstructed data. The smaller the MSE, the better the reconstruction effect. The formula is:
[0238]
[0239] in: The original data is values, is the first values, is the total number of data points;
[0240] The mean absolute error calculates the average of the absolute differences between the original data and the reconstructed data. Unlike MSE, MAE is more intuitive because it is not affected by extreme errors (no square term). MAE is similar to MSE. The smaller the MAE, the smaller the reconstruction error, which means the better the reconstruction effect. The formula is:
[0241]
[0242] (2) Similarity evaluation
[0243] In order to further verify the effect of the optimized compressed sensing method in breast cancer single-cell RNA sequencing data recovery, the present invention also performs similarity evaluation through Pearson correlation coefficient and cosine similarity. These two indicators can quantify the similarity between the recovered data and the original data, helping us evaluate the consistency between the recovered data and the real data.
[0244] The Pearson correlation coefficient measures the linear correlation between the original data and the reconstructed data. Its value is between [−1,1], where 1 indicates a complete positive correlation, -1 indicates a complete negative correlation, and 0 indicates no linear correlation. That is, the closer the value is to 1, the stronger the linear correlation between the two, and the better the recovery effect. The formula is:
[0245]
[0246] in: and is the original data and the reconstructed data values, and is the mean of the original and reconstructed data.
[0247] Cosine similarity is used to measure the directional similarity of two vectors. It evaluates the similarity by calculating the cosine value of the angle between the original data and the reconstructed data. The value range is [0,1], where 1 indicates complete similarity and 0 indicates complete dissimilarity. That is, the closer the CS value is to 1, the higher the directional consistency between the restored data and the original data, and the better the restoration effect. The formula is:
[0248]
[0249] in: and is the i-th value of the original data and the reconstructed data.
[0250] Finally, the reconstructed gene expression data were saved to a .csv file for subsequent analysis.
[0251] According to statistics, the compressed sensing reconstruction results before optimization are shown in Table 3. First, by analyzing the indicators before optimizing compressed sensing, we can see the error and similarity performance before and after reconstruction. Next, by further comparing the changes in indicators before and after optimization, we can more clearly evaluate the specific effect of the Ivy algorithm on compressed sensing optimization.
[0252] Table 3 Evaluation of recovery methods
[0253] GSE123358_Before optimization GSE123358_After optimization GSE124989_Before optimization GSE124989_After optimization GSE147326_Before optimization GSE147326_After optimization MAE 18.0082 15.8666 17.9732 15.1814 1.1523 0.8489 MSE 2.6836 2.5446 2.6811 2.5004 0.4062 0.3792 PCC 0.7569 0.774 0.7299 0.7776 0.8143 0.8182 CS 0.8439 0.8586 0.815 0.8644 0.8391 0.8423
[0254] According to Table 1 and the attached Figure 3 , 4 , we conducted error and similarity analysis on the data before and after optimization, and evaluated the effects of the compressed sensing method and the optimized Ivy algorithm. The following is a specific analysis based on various indicators (MAE, MSE, PCC, CS):
[0255] (1) Error analysis
[0256] From the perspective of the mean absolute error (MAE) indicator, the indicator before optimization is compared with the MAE value before and after optimization. It can be seen that on the three data sets, the MAE value after optimization is reduced compared with that before optimization. For example, on the GSE123358 data set, the MAE before optimization was 18.01, and it dropped to 15.87 after optimization; on the GSE124989 data set, it was 17.97 before optimization and 15.18 after optimization; on the GSE147326 data set, it was 1.15 before optimization and dropped to 0.85 after optimization. After optimization, the error between the restored data and the original data is generally small, indicating that the restoration effect has been significantly improved after the optimization of the Ivy algorithm.
[0257] From the perspective of mean square error (MSE) indicators, the optimized MSE values also show a certain decrease on all data sets. On the GSE123358 data set, it was 2.68 before optimization and dropped to 2.54 after optimization; on the GSE124989 data set, it was 2.68 before optimization and 2.50 after optimization; on the GSE147326 data set, it was 0.41 before optimization and 0.38 after optimization. Although the change in MSE is relatively small, overall, the recovery effect of the optimized recovery data has improved.
[0258] (2) Similarity analysis
[0259] The PCC value reflects the linear correlation between the restored data and the original data. On the GSE123358 dataset, the PCC before optimization was 0.76, and it slightly increased to 0.77 after optimization; on the GSE124989 dataset, the PCC before optimization was 0.73, and after optimization it was 0.78, showing a better consistency in the trend between the restored data and the original data after optimization; on the GSE147326 dataset, the PCC before optimization was 0.81, and after optimization it was 0.82, showing a slight improvement. This shows that after the Ivy algorithm is optimized, the linear correlation between the reconstructed data and the original data of most datasets has been enhanced.
[0260] In terms of CS, the changes before and after optimization are more significant. The CS of the GSE123358 dataset after optimization is 0.86, higher than 0.84 before optimization; the CS of the GSE124989 dataset after optimization is 0.86, higher than 0.82 before optimization, showing better data structure preservation; on the GSE147326 dataset, the CS values before and after optimization remain basically unchanged, both 0.84. Overall, the CS value after optimization is higher than that before optimization, indicating that the optimization of the Ivy algorithm helps to improve the similarity between the restored data and the original data in high-dimensional space.
[0261] (3) Comprehensive evaluation
[0262] Taking the above analysis results into consideration, we can make a specific evaluation of the recovery effect of each data set:
[0263] GSE123358 dataset: The PCC and CS values after optimization are slightly improved, and the results after optimization are significantly better than those before optimization in terms of error indicators (MAE and MSE), which shows that the method proposed in this invention significantly reduces the recovery error. Although the similarity index changes slightly, the data recovery accuracy after optimization is significantly improved, the deviation is reduced, and the reliability and accuracy of the recovery effect are improved.
[0264] GSE124989 dataset: On this dataset, the PCC and CS values after optimization have been improved, especially in the CS indicator, which has been improved from 0.82 to 0.87, indicating that the ability to maintain the structure of the restored data has been significantly enhanced after optimization. At the same time, the MAE and MSE values have also decreased to a certain extent, indicating that the error has also been effectively reduced. Therefore, the optimization effect of the GSE124989 dataset has been significantly improved in terms of error and similarity.
[0265] GSE147326 dataset: For this dataset, PCC and CS change little and remain at a high level. However, the MAE and MSE values after optimization are significantly reduced, especially in MAE, which drops from 1.15 to 0.85, indicating that the error has been effectively reduced. Overall, although the improvement in similarity is limited, the significant reduction in error indicates that the optimized restoration effect is more accurate.
[0266] Although different data sets differ in structure, sparsity, etc., which leads to different recovery effects of various data sets. But overall, the optimized compressed sensing recovery effect is significantly better than the unoptimized case. Through a comprehensive analysis of error and similarity indicators, we found that the recovery accuracy of most data sets has been significantly improved after optimization, especially in reducing recovery errors (such as MAE and MSE), which effectively reduces the deviation in the recovery process. At the same time, although different data sets have different improvements in similarity indicators (such as PCC and CS), the overall recovery quality has been improved. In general, the method proposed in the present invention can provide more accurate and reliable data recovery results in the recovery tasks of different data sets, effectively address the sparsity problem of data, and provide a powerful solution for single-cell sequencing data recovery.
Claims
1. A method for recovering single-cell sequencing data based on compressed sensing, characterized in that: The following steps are involved: Step 1: Download single-cell RNA sequencing data from the public database GEO, select data sets that meet the sparsity requirements of compressed sensing theory, and construct a cell-gene expression matrix; Step 2: Preprocess the expression matrix, remove low-quality cells and genes, and normalize; Step 3: Construct a transformation matrix and use compressed sensing theory for sparse representation; Step 4: construct an observation matrix and perform compression measurement; Step 5: Use the observed data to recover data; Step 6: Use the Ivy algorithm to optimize the compressed sensing process.
2. According to claim 1, a method for recovering single-cell sequencing data based on compressed sensing is characterized in that: In step 1, the data set is downloaded from the GEO public database and screened to meet the high sparsity data set. The data set is in .txt format and organized into a two-dimensional matrix stored in .csv format, a matrix composed of multiple genes and cells, in which a row represents the expression level of a gene in all cells and a column represents the expression level of all genes in a cell.
3. According to the method for recovering single-cell sequencing data based on compressed sensing in claim 1, it is characterized in that: The preprocessing in step 2 includes: eliminating low-quality cells and normalizing; Eliminating low-quality cells is to screen and remove genes and cells with low expression levels, that is, to exclude those nuclear genes below the set threshold from the cell-gene matrix. If there is a cell with an expression value less than 200, filter out this cell and delete this column from the expression matrix; if there is a gene with an expression value less than 3, filter out this gene and delete this row from the expression matrix; Normalize the gene expression values and convert the data into a zero-mean unit variance distribution to reduce the impact of sequencing depth differences on the data, so that gene expression levels can be compared between genes in different cells; The original expression matrix Perform logarithmic normalization to obtain the normalized data matrix , as shown below: in Indicates The gene in The expression value on cells, Indicates The gene in Normalized expression values per cell.
4. The method for recovering single-cell sequencing data based on compressed sensing according to claim 3, characterized in that: The step 3 sparse representation includes: After preprocessing, the expression data matrix Transpose and assign the transposed matrix to , as the preprocessed expression matrix, for the next step of sparse representation; Construct the transformation matrix using the least absolute shrinkage and selection operator Lasso , through the transformation matrix to express the matrix Converted into a sparse representation, and then through this conversion process, revealing which gene features are most important for recovering data, namely: in: , the expression matrix after preprocessing, g represents the number of cells, and n represents the number of genes; , transformation matrix, used to represent the expression matrix as a sparse representation; , a sparse coefficient matrix, assuming yes - sparse, meaning each row has only non-zero elements, that is ; The optimization goal is defined for the sparse representation process to minimize the reconstruction error while ensuring data sparsity. Specifically, the optimization goal is expressed as: in: Represents the error term between the expression matrix X and the sparse representation, that is, the sparse representation process is optimized by minimizing the error and improving the reconstruction quality; is a regularization term used to control the transformation matrix The sparsity of It is a hyperparameter used to balance the weight between error and sparsity; Constraints: : The elements in the transformation matrix are guaranteed to be non-negative; ,: Transformation matrix Each column vector in is normalized to unit norm, which ensures feature consistency; : Sparse coefficient matrix Each row vector of has - Sparsity, that is, each row vector has at most non-zero elements.
5. The method for recovering single-cell sequencing data based on compressed sensing according to claim 4, characterized in that: The compression measurement in step 4 includes: By introducing the observation matrix, the expression matrix Mapped to a low-dimensional space, where a random Gaussian matrix is selected as the observation matrix , because it satisfies the irrelevance and constraint isometric form RIP; Through the observation matrix Compress the sparse representation to obtain the measured value , while using as little measurement data as possible and retaining as much key information as possible, the form of compressed measurement is as follows: in: , the measurement data matrix after compression measurement contains the low-dimensional representation of each gene expression matrix, m represents the measurement dimension, that is, the dimension of the compressed low-dimensional space, n represents the number of genes, that is, the number of columns in the high-dimensional expression matrix, and satisfies , that is, the dimension of the observed data is much smaller than the dimension of the original data; , the observation matrix uses a random Gaussian matrix to map data from high-dimensional space to low-dimensional space; , transformation matrix, used to represent the expression matrix as a sparse representation; , a sparse coefficient matrix, assuming yes - sparse, meaning each row has only non-zero elements, that is .
6. The method for recovering single-cell sequencing data based on compressed sensing according to claim 5, characterized in that: The data recovery in step 5 includes: The goal of the data recovery phase is to find a sparse high-dimensional matrix , so that the measurement matrix It can be expressed as a linear combination of the observation matrix and the original data. The data recovery problem can be formalized as an optimization problem with constraints, namely: in: , represents the sparse coefficient matrix of The norm, that is, the sum of the absolute values of all elements in the matrix, is minimized The norm is to ensure that the solution As sparse as possible; The compressed sensing problem is transformed into a known observation matrix and the transformation matrix Under the premise of , we can use prior knowledge to solve the sparse coefficient matrix ,Right now: Orthogonal matching pursuit (OMP) is used as the sparse representation recovery algorithm to restore the original data by gradually selecting the information that best reflects the data characteristics.
7. The method for recovering single-cell sequencing data based on compressed sensing according to claim 6, characterized in that: The optimization process in step 6 includes: The Ivy Algorithm is introduced for sparse representation and recovery tasks in compressed sensing. Its global optimization capability is used to gradually optimize the sparse coefficient matrix, ultimately achieving efficient reconstruction of complex biological data. Optimizing sparse coefficient matrices using the ivy algorithm in sparse representation , when updating each generation, the individual with the smallest fitness is selected as the optimal solution according to the fitness value and the individual is updated. The specific update formula is as follows: in: : No. A sparse coefficient matrix; : The sparse coefficient matrix of the optimal solution, usually the individual with the smallest fitness in the current population; : indicates growth factor; : Random expansion factor, introducing random perturbations to enhance the diversity of exploration; : Gaussian noise increases the randomness of the search and avoids falling into the local optimal solution; The optimization goal of the sparse representation stage is to optimize the sparse coefficient matrix , using as few non-zero elements as possible to represent the expression matrix , thereby extracting the most critical features of the data. The optimization goal of this stage can be expressed as: in: is the preprocessed expression matrix, i.e., the data to be recovered; is the transformation matrix, which is consistent with the transformation matrix before optimization; is the optimized sparse coefficient matrix; is the optimized sparse coefficient matrix norm, indicating sparsity; is a regularization parameter used to control sparsity; The goal of data recovery phase optimization is to Recover the sparse high-dimensional expression matrix from , while ensuring sparsity and consistency, the optimization goal of this stage can be expressed as: in: is the observation matrix; It is a sparse matrix that is optimized again in the data recovery phase; is the measurement matrix after optimizing compressed sensing; is a sparse coefficient matrix norm, indicating sparsity; is a regularization parameter used to control sparsity; According to the above update formula and optimization objectives, the new sparse coefficient matrix can be solved , combined with the known transformation matrix, we can solve the sparse high-dimensional expression matrix , that is, the expression matrix after compressed sensing restoration is obtained: The restored expression matrix is calculated by the above formula ,at this time It is the data restored from the coefficient representation, which not only retains the sparsity of the expression matrix to be restored, but also highly approximates the original expression matrix. .