Molecular property prediction method based on metric small sample learning method
Through the combination of prototype network framework, low-rank representation and Sinkhorn K-means algorithm, the accuracy problem of traditional molecular property prediction methods in the case of limited data is solved, more accurate molecular property prediction is achieved, and the efficiency of drug design and discovery is improved. efficiency.
Patent Information
- Application Number
- CN202410969130.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-07-19
AI Technical Summary
Traditional molecular property prediction methods are difficult to provide accurate prediction results when faced with large-scale and diverse molecular data, especially when data are limited, accuracy is a key challenge.
Using a method based on the prototype network framework, combined with pre-training, low-rank representation and contrastive learning of graph data, data dimensionality reduction is performed through SVD decomposition and QR decomposition, and the extended Sinkhorn K-means algorithm is used for cluster analysis to capture data points Similarities and structural characteristics to its neighbors.
It improves the accuracy and performance of molecular property prediction, can handle feature learning and clustering tasks of graph data more effectively, provides more accurate molecular property prediction, and provides strong support for drug design and discovery.
Smart Images

Figure CN118506902B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a molecular property prediction method based on a metric small sample learning method. Background Art
[0002] Molecular property prediction is a key task in computer-aided drug discovery and is of great significance for drug screening and drug design. Currently, there are problems of high complexity and data noise in molecular property prediction in drug development. Traditional molecular property prediction methods are difficult to provide accurate prediction results when faced with large-scale and diverse molecular data, thus hindering the progress of drug development. In the field of molecular property prediction, especially when data is limited, accuracy has always been a key challenge. Summary of the invention
[0003] The present invention proposes a molecular property prediction method based on a metric small sample learning method to solve the above problems.
[0004] The technical solution of the present invention is achieved in this way:
[0005] The molecular property prediction method based on the metric small sample learning method includes the following steps:
[0006] S1, the prototype network framework is selected to build the model framework;
[0007] S2, using the prototype network framework combined with graph methods to learn the general features of graph data;
[0008] S3. Use low-rank representation to reduce the dimension of the data and obtain the subspace and the embedded representation after dimension reduction;
[0009] S4, using contrastive learning to capture the similarities between a data point and its neighbors and other data points;
[0010] S5. Use the extended Sinkhorn K-means algorithm to incorporate labeled data into the algorithm and perform cluster analysis on the data.
[0011] Optionally, in step S3, the model needs to perform subspace learning, where subspace learning includes SVD decomposition and QR decomposition. The formula of SVD decomposition is as follows:
[0012] ;
[0013] Where A is the matrix to be decomposed / original matrix, U is a unitary matrix of size m×m, also a left singular matrix, V is a unitary matrix of size n×n, also a right singular matrix, Σ is a diagonal matrix containing singular values, size m×n, U and V are two orthogonal matrices, each row or column of which is called a left singular vector and a right singular vector, respectively, and T represents the transpose of the matrix;
[0014] The formula for QR decomposition is as follows:
[0015] ;
[0016] Where Q is an m×n orthogonal matrix whose column vectors are mutually orthogonal and of unit length, satisfying ; That is, the product of the transpose of Q and Q is equal to the identity matrix I, and R is an n×n upper triangular matrix, that is, except for the elements on the main diagonal and above, all other elements are zero.
[0017] Through the above technical solution, SVD decomposition is a common matrix decomposition method that can decompose a matrix into the product of three matrices, namely the left singular matrix, the singular value matrix and the right singular matrix. Singular value decomposition is a generalization of eigendecomposition on any matrix. Its purpose is to extract the most important features of a matrix. It has a wide range of applications in dimensionality reduction, data compression, recommendation systems, etc. QR decomposition is to simplify the process of matrix operations and problem solving. This is a commonly used matrix decomposition method that can decompose a matrix into the product of an orthogonal matrix and an upper triangular matrix.
[0018] Optionally, in step S3, the specific steps of low-rank representation are as follows:
[0019] A1. Perform QR decomposition on the original data and reduce the dimension of the input matrix to a triangular matrix R, which contains the main structural information of the data;
[0020] A2. Perform SVD decomposition on the triangular matrix R to obtain the left singular matrix U;
[0021] A3. Based on U, we find the similarity matrix S. By calculating the product of the left singular matrix U and its transpose, we get the similarity matrix W, that is: ;
[0022] Among them, S is the similarity matrix, U is the left singular matrix, and T represents the transpose of the matrix;
[0023] A4. Set the diagonal elements of the similarity matrix S to zero;
[0024] A5. In order to make the sum of the similarity weights of each data point equal to 1, the similarity matrix S is normalized;
[0025] A6. Construct a dissimilarity matrix S1 based on the similarity matrix S. The dissimilarity matrix S1 is an all-1 matrix with the same shape as the similarity matrix S. For an N-way K-shot C-query problem, the calculation formula of the dissimilarity matrix S1 is as follows:
[0026] ;
[0027] Where e is a vector of all 1s, E is the identity matrix, N is the number of categories, K is the number of samples in each category, C is the number of samples in the query set, and T represents the transpose of the matrix;
[0028] Through the above technical solutions, low-rank representation is a data representation method that aims to reveal the intrinsic structure and pattern of data by using low-rank matrices. The core idea of the low-rank representation method is to represent the original data as a linear combination of low-rank matrices, thereby extracting the potential information and shared features of the data. SVD decomposition can reduce the original data to a low-dimensional space by taking the column vectors corresponding to the first k singular values, while retaining the main structure and information of the data.
[0029] Optionally, in step S3, the steps of data dimensionality reduction are as follows:
[0030] B1. By maximizing the similarity of similar features and minimizing the dissimilarity of dissimilar features, we learn the projection P of the feature in the subspace, that is:
[0031] ;
[0032] Where F is the molecular feature, S1 is the dissimilarity matrix, S is the similarity matrix, and T represents the transpose of the matrix;
[0033] B2. Perform eigenvalue decomposition on P, extract its eigenvectors and retain the eigenvectors corresponding to the first k largest eigenvalues. Multiply the original data matrix with these eigenvectors to map the data F to a new coordinate space, namely:
[0034] ;
[0035] Where V is the first k largest eigenvectors, and F1 is the feature map of the data in the new coordinate space.
[0036] Optionally, in step S5, the extended Sinkhorn K-means algorithm refers to clustering data based on the Sinkhorn K-means algorithm, which is an improvement on the K-means algorithm by introducing the optimal transmission matrix and Sinkhorn for iteration. First, K cluster centers are initialized, and then the relationship between the cluster centers and data points is continuously updated through iteration.
[0037] The optional, extended Sinkhorn K-means algorithm performs cluster analysis as follows:
[0038] C1. Initialize the class center. By referring to the prototype network, average the embeddings of all samples in the support set to obtain the prototype representation of each category, that is, the initial class center vector;
[0039] C2. Calculate the probability transfer matrix P based on the distance M between each data point and the cluster center, and use the Sinkhorn algorithm for iterative optimization to obtain a stable matrix;
[0040] C3. According to the probability transfer matrix P, the probability of each compound point belonging to each category is calculated to obtain a probability matrix;
[0041] C4. Calculate the new class center and update the class center. Multiply the probability transfer matrix with the embedding after data dimensionality reduction to obtain the weighted sum of samples in each category, and then divide it by the total number of samples to get the estimated value of the class center. ;
[0042] The difference between the calculated estimate and the original class center is used as the update amount of the class center, using the learning rate Adjust the update amount and add the adjusted updated value to the original class center On the top, complete the update of the class center, namely:
[0043] ;
[0044] C5. Repeat the above steps until the cluster center no longer changes significantly or the maximum number of iterations is reached.
[0045] Optionally, in step C2, the Sinkhorn algorithm performs iterative optimization to obtain a stable matrix, and the specific steps are as follows:
[0046] D1. Use the value of the Gaussian kernel function as the initial value of the probability transfer matrix and perform a normalization operation on it, namely:
[0047] ;
[0048] Where P is the probability transfer matrix, which includes both the data in the support set with labels and the data in the query set without labels. is the embedding of sample i, It is the center of class j, represents the Euclidean distance from each molecule to the cluster center, It is the bandwidth parameter of the Gaussian kernel function, which controls the range of data mapping and the influence of data points on the decision boundary;
[0049] D2. Gradually approximate the probability transfer matrix P through iterative updating. In each iteration, first calculate the current row weight vector and multiply it with the probability transfer matrix P to achieve row scaling. Then, according to the known label value, set the data of the previous support set to 0 or 1 at the corresponding position to constrain the known category. Similarly, perform the same operation in the column direction, and gradually adjust the element values of the transfer matrix P through multiplication and constraint operations to make it approach the optimal solution.
[0050] D3. By comparing the maximum absolute value of the difference between the result of summing the transmission matrix P in the second dimension in each iteration and the result of the previous iteration with a preset threshold, it is determined whether the current transmission matrix is close enough to the optimal solution. If the maximum absolute value of the difference is greater than the threshold, it means that there is still a large difference between the current transmission matrix and the result of the previous iteration, and it is necessary to continue iterative adjustment. If the maximum absolute value of the difference is less than or equal to the threshold, it is considered that the current transmission matrix is close enough to the optimal solution, and the iteration process can be terminated.
[0051] Through the above technical solution, the above Sinkhorn algorithm iteratively optimizes the optimal transmission matrix and obtains a stable transmission matrix.
[0052] Optionally, in step S2, the prototype network framework is combined with the graph method through node-level and graph-level pre-training, so that the model captures local and global information of the graph.
[0053] After adopting the above technical solution, the beneficial effects of the present invention are:
[0054] The present invention adopts a prototype network framework, combined with advanced pre-training techniques (prototype network framework combined with graphs) and low-rank representation to improve the prediction of molecular properties. The prototype network framework combined with graphs extracts common features of molecules, including local and global information, to cope with molecular complexity. Subsequently, high-dimensional molecular data is mapped to a more compact representation space through low-rank representation, which helps to improve the prediction performance. At the same time, contrastive learning is introduced to maintain the structural features of the data after dimensionality reduction to further improve the prediction accuracy. Finally, with the help of the extended Sinkhorn K-means algorithm, the labeled data is integrated into the prediction model to achieve more accurate prediction of molecular properties.
[0055] The prototype network framework is designed to solve the problem of feature learning and clustering of graph data. The prototype network framework, combined with the graph method, can fully capture the local and global features of the graph through node-level and graph-level pre-training. The low-rank representation technology reduces the dimension of the data to obtain a more compact subspace and embedded representation after dimension reduction, which is helpful for data visualization and understanding. In order to maintain the structural characteristics of the data after dimension reduction, contrastive learning is used to emphasize the similarity relationship between the data point and its neighbors and other data points. The extended Sinkhorn K-means algorithm integrates the labeled data into the clustering process to more accurately cluster the data. In this process, the class center is initialized using the mean of the support set, and the transmission matrix is continuously optimized by calculating the distance between the data point and the class center to obtain a stable transmission matrix. Using this transmission matrix, the compound can be accurately assigned to the category to which it belongs, providing strong support for the effective classification of data. The combination of these methods enables the present invention to achieve remarkable results in the feature learning and clustering tasks of graph data. The molecular property prediction method in the present invention can more accurately predict the properties of molecules, providing strong support for drug design and discovery. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0057] Figure 1 This is a graph showing the performance trend of the model as the dimension of the blood-brain barrier permeability dataset increases;
[0058] Figure 2 This is a graph showing the performance trend of the model as the dimension of the ClinTox dataset increases;
[0059] Figure 3 It is a graph showing the trend of model performance changes as the dimension of the β-secretase inhibitory activity dataset increases;
[0060] Figure 4 This is a graph showing the performance of the model as the dimension of the human immunodeficiency virus dataset increases.
[0061] Figure 5 This is a graph showing the performance trend of the model as the number of samples in the blood-brain barrier permeability support set increases;
[0062] Figure 6 It is a graph showing the trend of model performance changes as the number of samples in the ClinTox support set increases;
[0063] Figure 7 It is a graph showing the trend of model performance changes as the number of samples in the β-secretase inhibitory activity support set increases;
[0064] Figure 8 It is a graph showing the trend of model performance changes as the number of samples in the human immunodeficiency virus support set increases;
[0065] Fig. 9 It is the trend chart of model performance change as the number of samples in the toxicity Tox21 support set increases;
[0066] Fig.10 This is a graph showing the performance trend of the model as the amount of data in the blood-brain barrier permeability query set increases;
[0067] Fig.11 This is a graph showing the performance trend of the model as the amount of data in the ClinTox query set increases;
[0068] Fig.12 It is a graph showing the trend of model performance changes as the amount of data in the β-secretase inhibitory activity query set increases;
[0069] Fig.13 This is a graph showing the changing trend of model performance as the amount of data in the human immunodeficiency virus query set increases. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] The embodiments of the present application disclose a method for predicting molecular properties based on a metric small sample learning method.
[0072] Example: According to Figures 1 to 13 As shown in the figure, the molecular property prediction method based on the metric small sample learning method includes the following parts:
[0073] 1. Methods
[0074] 1.1 Model construction
[0075] The present invention adopts a prototype network framework. First, the general features of graph data are learned by combining the prototype network framework with the graph method. The prototype network framework combined with the graph is a pre-training strategy based on a graph neural network, which captures the local and global information of the graph through pre-training at the node level and the graph level. Next, the data is reduced in dimension using a low-rank representation to obtain a subspace and an embedded representation after dimensionality reduction. Contrastive learning is then used to capture the similarity between the data point and its neighbors and other data points to ensure that the data still maintains a certain spatial structure after dimensionality reduction. Finally, an extended Sinkhorn K-means algorithm is used to incorporate labeled data into the algorithm to perform cluster analysis of the data. In this process, the mean of the molecular representations of different categories in the support set is used as the initial class center, and the optimal transmission matrix is calculated with the help of the distance between the data point and the class center, and is continuously optimized to obtain a stable transmission matrix. Using this transmission matrix, the category to which the compound belongs can be accurately determined.
[0076] 1.2 Subspace Learning
[0077] The model first learns a subspace that improves the ability of feature discrimination.
[0078] Singular value decomposition (SVD) is a common matrix decomposition method that can decompose a matrix into the product of three matrices, namely the left singular matrix, the singular value matrix, and the right singular matrix. Singular value decomposition is a generalization of eigendecomposition on any matrix. Its purpose is to extract the most important features of a matrix. It is widely used in dimensionality reduction, data compression, recommendation systems, etc. Its formula is:
[0079] ;
[0080] Among them, A is the matrix to be decomposed / original matrix; U is a unitary matrix of size m×m, which is also a left singular matrix and can be used for data compression and dimensionality reduction; V is a unitary matrix of size n×n, which is also a right singular matrix and can be used for data recovery and reconstruction; Σ is a diagonal matrix containing singular values, which is m×n in size. U and V are two orthogonal matrices, each row or column of which is called a left singular vector and a right singular vector, respectively, and T represents the transpose of the matrix.
[0081] In order to simplify the process of matrix operations and problem solving, QR decomposition is used. This is a commonly used matrix decomposition method that can decompose a matrix into the product of an orthogonal matrix and an upper triangular matrix. Given an m×n matrix A, QR decomposition decomposes A into the product of two matrices:
[0082] ;
[0083] Where Q is an m×n orthogonal matrix whose column vectors are mutually orthogonal and of unit length, satisfying
[0084] ;
[0085] That is, the product of the transpose of Q and Q is equal to the identity matrix I. R is an n×n upper triangular matrix, that is, except for the elements on the main diagonal and above, all other elements are zero.
[0086] The Q matrix is composed of unit orthogonal vectors, which contains the orthogonal basis of the original matrix in the column space. Each vector represents the structure and characteristics of the original data in the column direction. The R matrix records the modulus of the original matrix in each column direction and the orthogonal relationship with other columns, that is, the structural characteristics of the original data in the column direction.
[0087] Low rank representation (LRR for short) is a data representation method that aims to reveal the intrinsic structure and pattern of data by using low rank matrices. The core idea of the LRR method is to represent the original data as a linear combination of low rank matrices, thereby extracting the potential information and shared features of the data. The specific steps of the present invention are as follows:
[0088] (1) Perform QR decomposition on the original data. This step is to speed up the SVD calculation and reduce the input matrix to a triangular matrix R, which contains the main structural information of the data.
[0089] (2) Perform SVD decomposition on the triangular matrix R to obtain the left singular matrix U. The column vectors of the U matrix represent the structure and characteristics of the original data in the column space and are the orthogonal basis of the original matrix in the column direction. These column vectors are arranged in descending order according to the singular value, indicating that the importance of the eigenvectors decreases one by one. Therefore, by taking the column vectors corresponding to the first k singular values, the original data can be reduced to a low-dimensional space while retaining the main structure and information of the data.
[0090] (3) Based on U, we can find the similarity matrix S. By calculating the product of the left singular matrix U and its transpose, we can get the similarity matrix W. That is:
[0091] ;
[0092] Where S is the similarity matrix, U is the left singular matrix, and T represents the transpose of the matrix. Specifically, the torch.matmul() function is used to calculate the product of U and its transpose, and the torch.abs() function is used to take the absolute value to obtain a symmetric matrix. This similarity matrix describes the degree of similarity between data points.
[0093] (4) The diagonal elements of the similarity matrix S are set to zero. This is because the similarity between a data point and itself is 1. Setting the diagonal elements to zero can prevent its own similarity from affecting the dimensionality reduction result.
[0094] (5) In order to make the sum of the similarity weights of each data point equal to 1, the similarity matrix S is normalized.
[0095] (6) Construct the dissimilarity matrix S1 based on the similarity matrix S. The dissimilarity matrix S1 is used to describe the dissimilarity between data points. It is the complement of the similarity matrix S, which represents the part of the similarity weight between data points with a value of 0. First, initialize an all-1 matrix S1 with the same shape as the similarity matrix S. In order to avoid the influence of the similarity between the data point and itself on the dimensionality reduction result, the diagonal elements of S1 are set to 0. At the same time, in order to ensure that the sum of the similarity weights of each data point is 1, S1 is normalized. For an N-way K-shot C-query problem, the calculation of the dissimilarity matrix S1 follows the following formula:
[0096] ;
[0097] Where e is the all-1 vector, E is the identity matrix, N is the number of categories, K is the number of samples in each category, C is the number of query set samples, and T represents the transpose of the matrix.
[0098] So far, we have obtained the similarity matrix S used to describe the shared features of the data and the dissimilarity matrix S1 used to describe the differences in the data. Next, we calculate the projection of the features in the subspace through S and S1, and map the original features of the molecules to the new coordinate space to achieve data dimensionality reduction. The specific process is as follows:
[0099] (1) By maximizing the similarity of similar features and minimizing the dissimilarity of dissimilar features, the projection P of the feature in the subspace can be learned, that is:
[0100] ;
[0101] Where F is the molecular feature, S1 and S are the dissimilarity matrix and similarity matrix respectively, and T represents the transpose of the matrix.
[0102] (2) Perform eigenvalue decomposition on P, extract its eigenvectors and retain the eigenvectors corresponding to the first k largest eigenvalues. Then, multiply the original data matrix with these eigenvectors to map the data F to a new coordinate space, namely:
[0103] ;
[0104] Where V is the top-k feature vectors, and F1 is the feature map of the data in the new coordinate space. This process achieves data dimensionality reduction and feature vector extraction.
[0105] 1.3 Clustering
[0106] The data is clustered based on the Sinkhorn K-means algorithm. It is an improvement on the K-means algorithm. It achieves better clustering effect by introducing the optimal transmission matrix and Sinkhorn iteration. It is mainly used to solve small sample learning problems.
[0107] K-means algorithm is a commonly used clustering algorithm, which is used to divide a data set into K clusters, each with similar characteristics. Its main idea is to assign data points to the nearest cluster center in an iterative manner and update the location of the cluster center to minimize the distance between the data point and the cluster center to which it belongs. The algorithm steps are:
[0108] (1) Select the number of clusters K: Determine the number K of clusters into which the dataset is to be divided.
[0109] (2) Initialize cluster centers: K samples can be randomly selected from the data set as initial cluster centers, or initialized by other methods.
[0110] (3) Assign samples to the nearest cluster center: For each sample, calculate the distance between it and each cluster center, and assign the sample to the cluster to which the nearest cluster center belongs.
[0111] (4) Update cluster centers: For each cluster, calculate the mean of all samples in the cluster and use the mean as the new cluster center.
[0112] (5) Repeat steps (3) and (4) until the stopping condition is met. The stopping condition can be that the maximum number of iterations is reached, the change in the cluster center is less than the set threshold, or a pre-defined performance indicator is reached.
[0113] (6) Get the final clustering result: When the algorithm stops, each sample will belong to the cluster to which its closest cluster center belongs. The final clustering result is the set of these clusters.
[0114] The Sinkhorn algorithm is an iterative optimization algorithm for solving the optimal transport problem. The optimal transport problem refers to finding the best mapping solution between two given probability distributions so that the total transportation cost is minimized. The main goal of the algorithm is to calculate a transfer matrix, which can represent the best mapping from one probability distribution to another, also known as the optimal transfer matrix or weight matrix. The Sinkhorn algorithm gradually approaches the optimal transport solution by iteratively updating the transfer matrix. It optimizes the transfer matrix during the update process to minimize the distance or similarity between the source distribution and the target distribution by scaling rows and columns, constraining known categories, and other operations. The key idea of this algorithm is to iteratively update the transfer matrix P so that it gradually approaches the optimal solution. It is widely used in computer vision, natural language processing and other fields.
[0115] The present invention improves the sinkhorn k-means algorithm: when calculating the optimal transmission matrix, the sinkhorn k-means algorithm only needs to use unlabeled data, while the present invention not only uses the unlabeled data in the query set, but also uses the labeled data in the support set, so the clustering process of the present invention is semi-supervised.
[0116] By utilizing labeled data and unlabeled data, the method of the present invention can better utilize limited labeled information to guide the clustering process. When calculating the optimal transmission matrix, the present invention not only considers the similarity between the unlabeled data and the labeled data in the support set, but also fully utilizes the association between the unlabeled data and the labeled data in the query set. Through this semi-supervised approach, the method of the present invention can better utilize the potential information of the data, thereby more accurately inferring the category to which the data in the query set belongs.
[0117] In the present invention, K cluster centers are first initialized. Then, the relationship between the cluster centers and the data points is continuously updated in an iterative manner. The specific steps are as follows:
[0118] (1) First, initialize the class center and refer to the prototype network
[0119] The embeddings of all samples in the support set are averaged to obtain the prototype representation of each category, which is the initial class center vector.
[0120] (2) According to the distance between each data point and the cluster center (M in this paper), the probability transfer matrix (optimal transfer matrix) (P in this paper) is calculated, and the Sinkhorn algorithm is used for iterative optimization to obtain a stable matrix. Specifically:
[0121] First, the value of the Gaussian kernel function is used as the initial value of the probability transfer matrix and normalized, that is:
[0122] ;
[0123] Where P is the probability transfer matrix (optimal transfer matrix), which includes both the data in the support set with labels and the data in the query set without labels. is the embedding of sample i, It is the center of class j, represents the Euclidean distance from each molecule to the cluster center, It is the bandwidth parameter of the Gaussian kernel function, which controls the range of data mapping and the influence of data points on the decision boundary.
[0124] The optimal transfer matrix P is gradually approached by iterative updating. In each iteration, the current row weight vector is first calculated and multiplied with the probability transfer matrix P to achieve row scaling. Then, according to the known label value, the data of the previous support set is set to 0 or 1 at the corresponding position to constrain the known category. Similarly, the same operation is performed in the column direction, and the element values of the transfer matrix P are gradually adjusted through multiplication and constraint operations to make it approach the optimal solution.
[0125] By comparing the maximum absolute value of the difference between the result of summing the transmission matrix P in the second dimension in each iteration and the result of the previous iteration with a preset threshold, it is determined whether the current transmission matrix is close enough to the optimal solution. If the maximum absolute value of the difference is greater than the threshold, it means that there is still a large difference between the current transmission matrix and the result of the previous iteration, and it is necessary to continue iterative adjustment. On the contrary, if the maximum absolute value of the difference is less than or equal to the threshold, it can be considered that the current transmission matrix is close enough to the optimal solution and the iteration process can be ended. This comparison method can be used to monitor the convergence of the transmission matrix during the iteration process, that is, to determine whether the current iteration has reached the optimal transmission matrix. The smaller the difference, the smaller the change of the transmission matrix during the iteration process, and the closer it is to the optimal solution. Therefore, by setting the threshold, the convergence and accuracy of the iteration process can be controlled to obtain the optimal transmission matrix.
[0126] (3) According to the probability transfer matrix, the probability of each compound point belonging to each category is calculated to obtain the probability matrix.
[0127] The position with the highest probability in each sample in the transmission matrix P (i.e., probability transfer matrix P) is set to 1 to indicate the category to which the sample belongs, and the remaining positions are set to 0.
[0128] (4) Calculate the new class center and update the class center
[0129] Multiply the optimal transfer matrix by the embedding after data dimensionality reduction to obtain the weighted sum of samples in each category, and then divide it by the total number of samples to get the estimated value of the class center .
[0130] The difference between the calculated estimate and the original class center is used as the update amount of the class center, using the learning rate Adjust (scale) the update amount and add the adjusted (updated) value to the original class center On the top, complete the update of the class center, namely:
[0131] ;
[0132] (5) Repeat the above steps until the cluster center no longer changes significantly or the maximum number of iterations is reached.
[0133] 2. Dataset
[0134] In order to evaluate the performance of the model in different property prediction tasks, the present invention uses five publicly available benchmark datasets, namely the blood-brain barrier permeability dataset (BBBP for short), the toxicity dataset ClinTox, the β-secretase inhibitory activity dataset, the human immunodeficiency virus dataset (HIV for short) and the toxicity dataset Tox21, which are described as follows:
[0135] (1) BBBP: The BBBP dataset is a public dataset used to predict the permeability of compounds across the blood-brain barrier. The blood-brain barrier is a biological barrier located between the central nervous system and the peripheral circulatory system that blocks most drugs, hormones, and neurotransmitters and protects the brain by inhibiting the entry of chemicals in the blood. Therefore, the permeability of compounds across the blood-brain barrier is of great significance for drug discovery and design. BBBP is a binary dataset containing more than 2,000 compounds with different structures and chemical properties. Each compound is labeled as permeable ("1") or impermeable ("0") based on experimental measurements or simulation predictions. This dataset is widely used in the fields of drug discovery and computer-aided drug design.
[0136] (2) ClinTox: The ClinTox dataset is a public dataset for predicting drug toxicity. It is widely used in drug development and computer-aided drug design. The dataset was released by Williams et al. in 2017 and contains more than 1,000 small molecule drugs, natural products, and bioactive molecules. Each compound is labeled as toxic ("1") or non-toxic ("0").
[0137] (3) Bace: The BACE dataset is a dataset used to predict the inhibitory activity of drug molecules on β-secretase. 0 and 1 represent the classification labels of the compound's inhibitory activity on the enzyme, where "0" indicates that the compound has a weak or non-existent inhibitory effect on the enzyme, while "0" indicates that the compound has a strong inhibitory effect on the enzyme. The dataset contains more than 1,000 compounds, and each compound has been measured for its inhibitory activity on β-secretase, expressed in the negative logarithm of the half-inhibitory concentration (IC50). A lower IC50 value indicates that the compound has a stronger inhibitory effect on the enzyme.
[0138] (4) HIV: The human immunodeficiency virus dataset comes from the Drug Treatment Program (DTP) HIV antiviral screening, which tested more than 40,000 compounds for their ability to inhibit HIV replication.
[0139] 3. Experimental part
[0140] 3.1 Experimental Setup
[0141] 3.1.1 Baseline Model
[0142] In order to verify the effectiveness of the model, we conducted a comparative experiment with six baseline models that are currently recognized to have good results. The following is a detailed introduction to these six baseline models:
[0143] (1) Meta-MGNN: A MAML-based small sample learning method, which is an optimization-based small sample learning method. First, a pre-trained graph neural network prototype network framework is used in conjunction with graph learning to embed the molecular representation, and then meta-learning is further used to learn the initialization parameters of the model, which can quickly adapt to new molecular properties with a small amount of data samples.
[0144] (2) FS-GNNTR: The model takes a molecular graph as input and models the context in the local space of graph embedding while retaining the global information of the deep representation. A dual-module meta-learning framework is used to iteratively update the model parameters in the few-shot learning task.
[0145] (3) FS-GNNConv: A few-shot learning strategy across graph neural networks and convolutional neural networks, and a dual-module meta-learning framework that can leverage the rich information of graph embeddings for learning from task-transferable knowledge.
[0146] (4) Relation Guide: The model first trains a property-aware graph neural network with molecules with common properties, extracts molecular representations from these molecules, constructs a property-aware matrix, and then uses the Spearman correlation coefficient to calculate the relationship between the properties and the property-aware matrix. In this process, a meta-learning strategy is used to learn common prediction knowledge from meta-trained property categories.
[0147] (5) HSL-RG: This is a relational graph-based hierarchical structure learning method that uses a task-adaptive meta-learning method to explore the structural semantics of molecules from both global and local perspectives. First, a relational graph is constructed using a graph kernel to transfer molecular structural information from neighboring molecules for global exploration; then, a self-supervised learning signal based on structural optimization is designed to learn a constant representation of the molecule in a local range.
[0148] (6) PAR: PAR is an attribute-aware small molecule property prediction relationship network. It uses an attribute-aware embedding function to convert the general molecular embedding into a substructure-aware space related to the target attribute, and then uses an adaptive relationship graph learning module to jointly estimate the molecular relationship graph. At the same time, a meta-learning strategy is used to selectively update parameters in the task.
[0149] 3.1.2 Model parameter setting
[0150] In the present invention, in order to prevent overfitting, the number of iterations is set to 40. Except when testing certain performance of the model, the dimension reduction dimension is set to 40, the number of samples in the support set is set to 5, and the number of samples in the query set is set to 10.
[0151] 3.2 Impact of Dimensionality Reduction on the Model
[0152] In order to explore the impact of the dimension of dimensionality reduction on the model performance, the present invention sets the dimensions to 5, 10, 15, 20, 30, 40, 50, and 60 respectively and conducts performance tests. The specific results are as follows Figure 1-Figure 4 And as shown in Table 1.
[0153] Table 1 The impact of dimension reduction on the model
[0154]
[0155] exist Figure 1-Figure 4 From Table 1, we can draw the following conclusions:
[0156] (1) In the early stage, when the dimension is between 5 and 10, the model performance improves rapidly. As the dimension increases further, the performance improvement rate slows down, and finally reaches a peak and no longer increases with the increase of dimension.
[0157] (2) Among the BBBP, ClinTox, Bace, and HIV datasets, ClinTox performs best when the dimension is 30, while the remaining datasets perform best when the dimension is 40.
[0158] Therefore, in order to maintain the best model performance while reducing the subsequent calculation amount, the dimension will be set to 40 in subsequent experiments to achieve a balance between model performance and computational efficiency.
[0159] 3.3 The impact of the number of support set samples on the model
[0160] In previous experiments, the number of training set samples has been set to 5. In order to explore how the small sample learning method proposed in the invention can benefit from more training data, the present invention tests the influence of the number of samples in the support set on the model performance. The number of training set samples is 1, 2, 3, 4, 5 and 10 respectively. The specific results are shown in Tables 2 and 3.
[0161] Table 2 The impact of the number of support sets on the model in Tox21
[0162]
[0163] Table 3 The impact of the number of support sets on the model
[0164]
[0165] from Figure 5-Figure 9 It can be seen that in various property prediction data sets such as toxicity and blood-brain barrier permeability, the performance of the model increases with the increase in the amount of data in the support set, and the growth rate mostly conforms to the trend of first fast and then slow. Among them, Tox21 includes 12 tasks, see Table 3 for details. When the number of samples in the support set is 1, ROC_AUC exceeds 80, which has exceeded the performance of many current models; and when the number of samples in the support set increases to 10, ROC_AUC exceeds 90, and the performance is improved by about 10%.
[0166] This is because in the clustering process, the labeled data in the support set is not only used to calculate the initial class center. In the stage of calculating the optimal transfer matrix, the algorithm also considers the similarity and correlation between the labeled data in the support set and the unlabeled data in the query set to perform semi-supervised training to fully utilize the potential information of the data.
[0167] 3.4 The impact of the number of query set samples on the model
[0168] Since all unlabeled data in the semi-supervised learning stage comes from the query set, the number of samples in the query set will affect the performance of the model. In order to test the impact of the number of samples in the query set on the model performance, the number of samples was set to 1 to 10 for testing on the BBBP, ClinTox, Bace and HIV datasets. The specific results are shown in Table 4 and Figure 10-13 shown.
[0169] Table 4 The impact of the number of query sets on the model
[0170]
[0171] like Figure 10-13 As shown in the figure, on all tasks, the performance of the model improves as the number of samples in the query set increases. When the number of query sets increases from 1 to 2, the performance of all tasks is significantly improved, indicating that adding an additional query instance can significantly improve the generalization ability of the model. As the number of query sets increases further, the performance improvement gradually slows down, which may be because the model has learned enough information from the limited data. Nevertheless, the overall trend shows that increasing the number of query sets still helps to improve the performance of the model, especially on some tasks (such as ClinTox and HIV), even when the number of query sets reaches 10, the performance continues to improve.
[0172] Therefore, the experimental results show that the model can effectively utilize the information in unlabeled data and can achieve better performance by using more unlabeled data. However, it should be noted that increasing the number of query sets may lead to an increase in computational costs, so a trade-off needs to be made between performance improvement and computing resources. The number of query set samples in other experiments is set to 5.
[0173] 3.5 Comparison with Baseline Model Results
[0174] In order to test the performance of the model, the model of the present invention is compared with some current models with better results, including the optimization-based small sample learning method and the metric-based small sample learning method, and the results are shown in Table 5. Among them, Pos, Neg and All respectively indicate that the model is trained with positive samples, negative samples and all samples.
[0175] Table 5 Overall performance of baseline models
[0176]
[0177] Among all the models, the model proposed in this paper achieved the best performance when the number of query sets was 5 and 10, which shows that Few-SK can effectively use limited data to train an accurate model. When the number of query sets is 5, the ROC-AUC value of Few-SK is 4.13% higher than that of the second-best model PAR; when the number of query sets is 10, the ROC-AUC value of Few-SK is 4.92% higher than that of the second-best model HSL-RG, far exceeding the performance of the current optimal model.
[0178] Overall, the metric-based small sample learning method is better than the optimization-based small sample learning method. This may be because the metric-based small sample learning method pays more attention to the similarity between samples, which is crucial for small sample learning; in contrast, the optimization-based small sample learning method usually designs and optimizes the loss function to enable the model to achieve better generalization ability on new tasks.
[0179] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. Molecular property prediction method based on metric small sample learning method, It is characterized in that The following steps are involved: S1, the prototype network framework is selected to build the model framework; S2, using the prototype network framework combined with graph methods to learn the common features of molecular graphs; S3. Use low-rank representation to reduce the dimension of the data and obtain the subspace and the embedded representation after dimension reduction; S4, using contrastive learning to capture the similarities between a data point and its neighbors and other data points; S5. The extended Sinkhorn K-means algorithm was used to incorporate labeled data into the algorithm for cluster analysis of the data. The labeled data were five publicly available benchmark datasets, namely, the blood-brain barrier permeability dataset, the toxicity dataset ClinTox, the β-secretase inhibitory activity dataset, the human immunodeficiency virus dataset, and the toxicity dataset Tox21. In step S3, the model needs to perform subspace learning, where subspace learning includes SVD decomposition and QR decomposition. The formula of SVD decomposition is as follows: ; Where A is the matrix to be decomposed / original matrix, U is a unitary matrix of size m×m, also a left singular matrix, V is a unitary matrix of size n×n, also a right singular matrix, Σ is a diagonal matrix containing singular values, size m×n, U and V are two orthogonal matrices, each row or column of which is called a left singular vector and a right singular vector, respectively, and T represents the transpose of the matrix; The formula for QR decomposition is as follows: ; Where Q is an m×n orthogonal matrix whose column vectors are mutually orthogonal and of unit length, satisfying ; That is, the product of the transpose of Q and Q is equal to the identity matrix I, and R is an n×n upper triangular matrix, that is, except for the elements on the main diagonal and above, all other elements are zero; In step S3, the specific steps of low-rank representation are as follows: A1. Perform QR decomposition on the original data and reduce the dimension of the input matrix to a triangular matrix R, which contains the main structural information of the data; A2. Perform SVD decomposition on the triangular matrix R to obtain the left singular matrix U; A3. Based on U, we find the similarity matrix S. By calculating the product of the left singular matrix U and its transpose, we get the similarity matrix W, that is: ; Among them, S is the similarity matrix, U is the left singular matrix, and T represents the transpose of the matrix; A4. Set the diagonal elements of the similarity matrix S to zero; A5. In order to make the sum of the similarity weights of each data point equal to 1, the similarity matrix S is normalized; A6. Construct a dissimilarity matrix S1 based on the similarity matrix S. The dissimilarity matrix S1 is an all-1 matrix with the same shape as the similarity matrix S. For an N-way K-shot C-query problem, the calculation formula of the dissimilarity matrix S1 is as follows: ; Where e is a vector of all 1s, E is the identity matrix, N is the number of categories, K is the number of samples in each category, C is the number of samples in the query set, and T represents the transpose of the matrix; In step S3, the steps of data dimensionality reduction are as follows: B1. By maximizing the similarity of similar features and minimizing the dissimilarity of dissimilar features, we learn the projection P of the feature in the subspace, that is: ; Where F is the molecular feature, S1 is the dissimilarity matrix, S is the similarity matrix, and T represents the transpose of the matrix; B2. Perform eigenvalue decomposition on P, extract its eigenvectors and retain the eigenvectors corresponding to the first k largest eigenvalues. Multiply the original data matrix with these eigenvectors to map the data F to a new coordinate space, namely: ; Where V is the largest eigenvector of the first k, and F1 is the feature map of the data in the new coordinate space; In step S5, the extended Sinkhorn K-means algorithm refers to clustering data based on the Sinkhorn K-means algorithm, which is an improvement on the K-means algorithm. By introducing the optimal transmission matrix and Sinkhorn for iteration, K cluster centers are first initialized, and then the relationship between the cluster centers and data points is continuously updated in an iterative manner; The steps of cluster analysis using the extended Sinkhorn K-means algorithm are as follows: C1. Initialize the class center. By referring to the prototype network, average the embeddings of all samples in the support set to obtain the prototype representation of each category, that is, the initial class center vector; C2. Calculate the probability transfer matrix P based on the distance M between each data point and the cluster center, and use the Sinkhorn algorithm for iterative optimization to obtain a stable matrix; C3. According to the probability transfer matrix P, the probability of each compound point belonging to each category is calculated to obtain a probability matrix; C4. Calculate the new class center and update the class center. Multiply the probability transfer matrix with the embedding after data dimensionality reduction to obtain the weighted sum of samples in each category, and then divide it by the total number of samples to get the estimated value of the class center. ; The difference between the calculated estimate and the original class center is used as the update amount of the class center, using the learning rate Adjust the update amount and add the adjusted updated value to the original class center On the top, complete the update of the class center, namely: ; C5. Repeat the above steps until the cluster center no longer changes significantly or the maximum number of iterations is reached.
2. The molecular property prediction method based on the metric small sample learning method according to claim 1, It is characterized in that In step C2, the Sinkhorn algorithm performs iterative optimization to obtain a stable matrix. The specific steps are as follows: D1. Use the value of the Gaussian kernel function as the initial value of the probability transfer matrix and perform a normalization operation on it, namely: ; Where P is the probability transfer matrix, which includes both the data in the support set with labels and the data in the query set without labels. is the embedding of sample i, It is the center of class j. represents the Euclidean distance from each molecule to the cluster center, It is the bandwidth parameter of the Gaussian kernel function, which controls the range of data mapping and the influence of data points on the decision boundary; D2, gradually approximate the probability transfer matrix P through iterative updating. In each iteration, first calculate the current row weight vector and multiply it with the probability transfer matrix P to achieve row scaling. Then, according to the known label value, set the data of the previous support set to 0 or 1 at the corresponding position to constrain the known category. Similarly, perform the same operation in the column direction, and gradually adjust the element values of the transfer matrix P through multiplication and constraint operations to make it approach the optimal solution. D3. By comparing the maximum absolute value of the difference between the result of summing the transmission matrix P in the second dimension in each iteration and the result of the previous iteration with a preset threshold, it is determined whether the current transmission matrix is already the optimal solution. If the maximum absolute value of the difference is greater than the threshold, it means that there is still a difference between the current transmission matrix and the result of the previous iteration, and it is necessary to continue iterative adjustment. If the maximum absolute value of the difference is less than or equal to the threshold, it is considered that the current transmission matrix is already the optimal solution and the iteration process can be terminated.
3. The molecular property prediction method based on the metric small sample learning method according to claim 1, It is characterized in that In step S2, the prototype network framework is combined with the graph method through node-level and graph-level pre-training, so that the model captures the local and global information of the graph.
Citation Information
Patent Citations
High-dimensional data semi-supervised classification method
CN113033641A
Image non-negative matrix factorization clustering method based on neurodynamics
CN115471689A
Image clustering method based on projection distance regularization low-rank representation
CN117095191A
Clustering model training method and device, equipment and storage medium
CN118194070A
Concept decomposition using clustering
US6560597B1
