A small sample molecular property prediction method based on hybrid relational network
Through the mixed relationship network method, a property-aware two-dimensional molecular relationship map and molecular distribution relationship map are constructed, combined with knowledge of the field of chemistry and real label information, molecular characterization is optimized, and the problem of inaccurate relationship construction in the prediction of molecular properties in small samples is solved, and the accuracy of molecular properties is improved.
Patent Information
- Application Number
- CN202310353609.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-03-30
AI Technical Summary
In the small sample molecular properties prediction task, it is difficult for the prior art to accurately construct the relationship between molecules based on a certain property, resulting in the model missing the real relevant information when polymerizing similar molecular information, affecting the accuracy of molecular properties prediction.
Using the hybrid relationship network method, through graph neural network and type prototype learning, a property-aware two-dimensional molecular relationship diagram and molecular distribution relationship diagram are constructed, combined with knowledge of the chemical field and real label information, a hybrid prior relationship diagram is constructed, and molecular characterization and label propagation are optimized.
The accuracy of molecular properties prediction is improved, and by fusing information from multiple relationship diagrams, molecular characterization is optimized to achieve more accurate molecular properties prediction.
Smart Images

Figure CN116580782B_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to a method for predicting properties of small sample molecules, and in particular to a method for predicting properties of small sample molecules based on a hybrid relationship network. Background Art
[0002] Drug discovery is an important biomedical task that aims to find new potential compounds with desired properties, such as better absorption, distribution, metabolism, and excretion (ADME) in the human body, low toxicity, and pharmacological activity. It is recorded that it takes at least 10 years on average to discover a new drug, with a clinical success rate of approximately 10%. To speed up this process, many works use deep learning methods to establish the relationship between molecular structure and specific properties. Molecular property prediction models typically consist of two components: a molecular encoder, which encodes the molecular structure into a fixed-length molecular representation; and a predictor, which estimates the activity of a certain property of the molecule based on the molecular representation. Researchers can then use the predictive model to more efficiently discover potential molecules in virtual screening.
[0003] However, molecular property prediction is essentially a small-sample problem. Because the potential chemical space of molecules is huge, the number of molecules sharing the same properties is extremely small. After a series of chemical wet experiments, most candidate molecules are screened out because they do not have the expected target properties, and ultimately only a small number of molecules are retained after screening. Currently, in the field of small-sample learning, most work introduces graph structure learning methods to solve the problem of scarce labeled molecular data. However, they all ignore the fact that molecules with the same properties but different chemical structures will exhibit stronger or weaker activities. Therefore, the similarity between molecules based on a certain property is a probability value, not a logical value (0 / 1). If the relationship between molecules based on a certain property is simply modeled as a logical relationship, the model will not be able to accurately construct molecular relationships. When aggregating information between similar molecules, some false related information will be aggregated, and some real related information will be missed.
[0004] Therefore, in the task of predicting molecular properties with small samples, how to accurately construct the relationship between molecules based on a certain property to optimize molecular representation and achieve label propagation is a technical problem that needs to be solved urgently. Summary of the Invention
[0005] In order to address the deficiencies of the prior art, the present invention provides a method for predicting molecular properties of small samples based on a hybrid relational network.
[0006] Molecular properties are strong or weak, so based on a certain property, the relationship between molecules should be a probability value, not a logical value (0 / 1). The present invention starts from this point to model the relationship between molecules based on a certain property. First, in each task, the present invention uses graph neural network and prototype learning method to learn a molecular representation of property perception. At the same time, molecules are regarded as nodes, and the molecular representation vector of property perception is regarded as node features. Each molecular instance in the task is used as a node, and the weight of the edge between two nodes is the similarity between the molecular representation of two property perceptions to construct a two-dimensional molecular relationship graph of property perception. In addition, a molecular distribution relationship graph is learned using the relationship between molecules and other molecules in the data set. Similarly, molecules are regarded as nodes, and the molecular distribution representation vector is regarded as node features. Each molecular instance in the task is used as a node, and the weight of the edge between two nodes is the similarity between the molecular distribution representation vectors to construct a molecular distribution relationship graph. Then a two-dimensional molecular relationship graph and a molecular distribution relationship graph are used to build a hybrid relationship network module to fuse the unique molecular relationships in different relationship graphs. The present invention uses real data labels and molecular topological fingerprint knowledge based on chemical field knowledge to form a hybrid priori relationship graph module to constrain model optimization, thereby realizing label propagation and better realizing molecular property prediction.
[0007] The purpose of the present invention is achieved through the following technical solutions:
[0008] A small sample molecular property prediction method based on a mixed relationship network, the steps of which are as follows:
[0009] S1: Split the molecular SMILES and the corresponding label data into N samples according to the predefined small sample molecular property prediction task. t Molecular property prediction tasks Each task is a 2-way K-shot classification task, which includes a support set and a query set. The task can be divided into training tasks and testing tasks. The training task is used to learn the initialization parameters of the model, and the testing task is used to test the performance of the model.
[0010] S2: For each task, we first use the RDKit tool and the graph neural network GIN to use SMILES and label information to generate three relationship graph structures representing different relationships between molecular instances: a two-dimensional molecular relationship graph based on property perception, a molecular distribution relationship graph, and a hybrid prior relationship graph. We then construct a hybrid relationship network model and a hybrid prior relationship graph. We then learn the hybrid relationship network model under the constraints of the hybrid prior relationship graph, ultimately obtaining a semantically rich molecular representation vector for molecular property prediction, achieving effective label propagation.
[0011] S3: Finally, the molecular representation vectors in the optimized two-dimensional molecular relationship graph in S2 and the molecular distribution representation vectors in the molecular distribution relationship graph are spliced together and input into the classifier to predict the properties of the molecules. The prediction loss is calculated as the loss of the instance classification task and the parameters of the hybrid relationship network model are optimized to improve the accuracy of molecular property prediction;
[0012] S4: Under the meta-learning framework, the meta-network repeats the above S1 to S3 steps on the training task to perform meta-learning training, allowing the hybrid relational network model to learn "prior knowledge", that is, the parameters initialized by the hybrid relational network model. The initialized meta-network is then applied to the test task, and the support set in the test task is used to fine-tune the parameters of the meta-network. Finally, the fine-tuned hybrid relational network model is tested on the query set in the test task; the hybrid relational network model that passes the test is used to perform actual molecular property prediction.
[0013] Preferably, the specific implementation method of S2 is as follows:
[0014] S21: First, use the RDKit tool to convert each molecule's SMILES into a two-dimensional molecular graph structure. Use GIN and a prototype-like learning network as the original encoder model to obtain a universal molecular representation vector based on the two-dimensional graph structure through GIN. Then, in the prototype-like learning network, the universal molecular representation vector and the prototype are concatenated and the property-aware molecular representation vector is obtained through the attention mechanism. Each molecule is regarded as a node, the property-aware molecular representation vector is regarded as the node feature, and the weight of the edge between two nodes is the similarity between the two molecular representation vectors. A property-aware two-dimensional molecular relationship graph is constructed.
[0015] S22: Then, using the existing instance label information in the support set of each task, the relationship between each molecular instance in the task and all molecular instances in the support set is modeled to obtain the label distribution of the molecular instance, which is used as the distribution representation vector of the molecular instance. Each molecular instance in the task is used as a node, and the weight of the edge between two nodes is the similarity of the label distribution of the two molecular instances. A molecular distribution relationship graph corresponding to each task is constructed;
[0016] S23: Then, use the RDKit tool to obtain the molecular topological fingerprint based on chemical domain knowledge of each molecule in the task as the molecular fingerprint representation, use each molecular instance in the task as a node, and the weight of the edge between two nodes is the similarity between the two molecular topological fingerprints to construct a molecular fingerprint relationship graph; use the existing molecular property labels as molecular representation vectors, use each molecular instance in the task as a node, and the weight of the edge between two nodes is the similarity between the two molecular property labels to construct a true label relationship graph; then, the similarity matrix of the molecular fingerprint relationship graph and the true label relationship graph is summed and averaged, so as to achieve mutual information fusion and finally form a hybrid prior relationship graph;
[0017] S24: After obtaining the two-dimensional molecular relationship graph and the molecular distribution relationship graph, the two relationship graphs are used to construct a hybrid relationship network model; first, the property-perceived molecular representation vectors in the two-dimensional molecular relationship graph are used to calculate a similarity matrix, where each value in the similarity matrix represents the similarity between two property-perceived molecular representation vectors; then the similarity matrix is used to aggregate and update the molecular distribution representation vectors in the molecular distribution relationship graph; the updated molecular distribution representation vectors are used to calculate a similarity matrix representing the similarity between molecular distributions; then the similarity matrix is used to aggregate and update the two-dimensional molecular relationship graph; the two-dimensional molecular relationship graph and the molecular distribution relationship graph are updated in a cyclic manner to obtain optimized two-dimensional molecular relationship graph and molecular distribution relationship graph;
[0018] S25: After obtaining the optimized two-dimensional molecular relationship graph and molecular distribution relationship graph, the corresponding similarity matrices are calculated respectively; then, the similarity matrix of the mixed prior relationship graph is calculated, and the similarity matrix of the two-dimensional molecular relationship graph and the similarity matrix of the mixed prior relationship graph are used to construct a regularization term to constrain the mixed relationship network model to learn a correct and effective molecular relationship graph, thereby improving the prediction performance of the mixed relationship network model.
[0019] Preferably, in the S2, the RDKit tool converts SMILES into a two-dimensional molecular graph, and then uses the graph neural network GIN as the basic encoder to encode the two-dimensional molecular graph to obtain a universal molecular representation vector. The universal molecular representation vector of each property label category is averaged to obtain the class prototype, and then the universal molecular representation vector and the class prototype are spliced together to obtain the property-aware molecular representation vector through the attention mechanism; each molecule in the task is taken as a node and the property-aware molecular representation vector is taken as the node feature to construct a two-dimensional molecular relationship graph, where the property-aware molecular representation vector is recorded as The similarity between molecular representation vectors is denoted as The molecular label distribution is used to construct a molecular distribution relationship diagram, where the molecular label distribution is recorded as The similarity between molecular label distributions is denoted as The molecular topological fingerprint obtained by processing the molecular SMILES with the topological fingerprint generation function in the RDKit tool is used as the molecular representation vector to construct a molecular fingerprint relationship diagram based on chemical field knowledge, where the molecular topological fingerprint is recorded as The similarity between molecular topological fingerprints is recorded as The relationship between the true molecular labels is used to construct a true label relationship graph, where the true molecular labels are recorded as The similarity between the true molecular labels is recorded as
[0020] Preferably, in S21, the two-dimensional molecular relationship diagram is constructed as follows:
[0021] The input molecular SMILES data x is processed by RDKit tool τ,i Process it and convert it into a two-dimensional molecular graph. Use the basic encoder GIN to encode the two-dimensional molecular graph and use it as the molecular representation vector g τ,i , and then the molecular representation vector g corresponding to each property label category in the support set τ,i The class prototype of each type of property label is obtained by adding and averaging The calculation formula is as follows:
[0022]
[0023] Among them, the sample set with property label category c in the τth task is And y τ,i =c}, indicating the category of molecular property labels, c = 0 or 1, τ indicates the τth task, x τ,i is the SMILES of the molecule instance, y τ,i is the binary classification label corresponding to the property to be predicted of the molecular instance;
[0024] Then, each molecular representation vector is concatenated with all class prototypes, and the property-aware molecular representation vector m is obtained through the attention mechanism. τ,i :
[0025]
[0026] in, g τ,i represents the molecular characterization vector, represents the class prototype of all molecules with label category 0, represents the class prototype of all molecules with label category 1, d g represents the dimension of the molecular representation vector;
[0027] Then, a multilayer perceptron is used to compress the property-aware molecular representation vector:
[0028]
[0029] Among them, W τ,r are the parameters of the multi-layer perceptron MLP;
[0030] Consider each molecule in the task as a node, and the compressed property-aware molecular representation vector s τ,i Node features considered as initial To construct a two-dimensional molecular relationship graph, the entire two-dimensional molecular relationship graph is a fully connected graph. The weight of each edge represents the similarity between the two nodes corresponding to the edge. The edge weight calculation formula in the first round of loop is as follows:
[0031]
[0032] in, are the parameters of the multi-layer perceptron MLP, and are the node features of the i-th node and the j-th node in the l-th cycle, is the similarity matrix, yes The element with coordinates (i, j) represents the similarity between the i-th node and the j-th node; the similarity matrix is obtained Then, Each row of values is normalized to 0-1.
[0033] Preferably, in S22, the molecular distribution relationship graph is constructed by introducing distribution learning, specifically: first, the property labels of all molecular instances are encoded, and the encoding rules of the molecular instances in the support set and the query set are different; the distribution of the molecular instances in the support set is modeled by the relationship between the molecule and all molecular instances in the support set, if the property labels between two molecular instances are the same, the corresponding position is set to 1; if the property labels between two molecular instances are different, the corresponding position is set to 0; the molecular instances in the query set are all initialized to an initial value because their property labels are unknown, and this initial value is an average value related to the number of molecular instances in the support set; all molecules in the task are regarded as nodes in the molecular distribution relationship graph, and the node features of the molecular instances in the molecular distribution relationship graph are initialized as follows:
[0034]
[0035] Among them, the initial node feature of the i-th node in the τ-th task is K represents the number of molecular instances in a property label category, || represents the splicing operation, y τ,i and yτ,j Represent the property labels of the i-th node and the j-th node respectively; δ(·) is the Kronecker function, when y τ,i =y τ,j , the output result is 1, otherwise the output result is 0;
[0036] Then, according to the initialized node features To calculate the similarity matrix of the molecular distribution relationship diagram The calculation formula is as follows:
[0037]
[0038] in, are the learnable parameters of the multilayer perceptron MLP; yes The element with coordinates (i, j) in the middle represents the similarity of label distribution between the i-th node and the j-th node; Afterwards, The values in each row are normalized to 0-1; the node characteristics of the molecular distribution relationship diagram are calculated and similarity matrix Then, a molecular distribution relationship diagram is constructed based on this.
[0039] Preferably, in said S23, the molecular fingerprint used to construct the molecular fingerprint relationship graph is a molecular topological fingerprint, which is all molecular fragments on the path from one molecule to a set number of keys, and then a hash calculation is performed on each path to generate a fingerprint; the molecular topological fingerprint is used to represent the molecular characterization vector based on chemical field knowledge, and then the Tanimoto coefficient solution formula is used to calculate the relationship between molecules based on chemical field knowledge, and the calculation formula is as follows:
[0040]
[0041] in, Similarity matrix representing molecular fingerprint relationship graph The element with coordinates (i, j) represents the similarity of the molecular topological fingerprint between the i-th node and the j-th node, and a and b represent the molecular topological fingerprint of the i-th node respectively. and the molecular topological fingerprint of the jth node The number of bits with a value of 1, c represents two molecular topological fingerprints and The number of bits at the same position in the task that are simultaneously 1; each molecule in the task is taken as a node, the molecular topological fingerprint is the node feature, and the Tanimoto coefficient is the weight of the edge between nodes, thereby constructing a molecular fingerprint relationship graph;
[0042] The real label relationship diagram shows the real logical relationship between molecules. The same property label between two molecules is 1, and the different property labels are 0.
[0043] By fusing the molecular fingerprint relationship graph and the true label relationship graph, a hybrid prior relationship graph is obtained to constrain the optimization of the hybrid relationship network model; the fusion process of the molecular fingerprint relationship graph and the true label relationship graph is as follows:
[0044]
[0045] in, is the similarity matrix of the mixed prior relationship graph, yes The element with coordinates (i, j) in the is the similarity matrix of the molecular fingerprint relationship graph The element with coordinates (i, j) in the is the similarity matrix of the true label relationship graph The element with coordinate (i, j) in the .
[0046] Preferably, in the hybrid relationship network of S4, the similarity matrix in the two-dimensional molecular relationship graph is used to update the node features in the molecular distribution relationship graph. The update formula for the first round is as follows:
[0047]
[0048] in, is a learnable parameter;
[0049] Node features in the updated molecular distribution relationship graph Then, use the node features of the updated molecular distribution relationship graph To calculate the similarity matrix of the updated molecular distribution relationship graph The calculation formula is as follows:
[0050]
[0051] in, are the learnable parameters of the multi-layer perceptron MLP;
[0052] Then, the Softmax function is applied to For each row above, normalize the value of each row to a value between 0 and 1;
[0053] Then, the similarity matrix of the updated molecular distribution relationship diagram is obtained On the basis, use To update the node features of the two-dimensional molecular relationship graph The calculation formula is as follows:
[0054]
[0055] in, is a learnable parameter;
[0056] In the updated two-dimensional molecular relationship graph, the node representation is obtained Then, use it to update the similarity matrix of the two-dimensional molecular relationship graph
[0057]
[0058] in, are learnable parameters in the multilayer perceptron MLP;
[0059] Then, the Softmax function is applied to For each row above, normalize the value of each row to a value between 0 and 1;
[0060] The hybrid relationship network model is designed as a two-layer model. The update order of the first layer in the entire hybrid relationship network model is as follows: l is initially 0.
[0061] As a preference, the enhanced molecular representation vectors in the two relationship graphs are spliced together, and the calculation formula is as follows:
[0062]
[0063] After obtaining the molecular representation vector After that, it is input into the classifier to predict the molecular property category. The formula is as follows:
[0064]
[0065] Among them, W c is a learnable parameter;
[0066] Then, based on the molecular property categories output by the classifier and the actual molecular property category labels, the prediction loss is calculated as the loss of the instance classification task, and the parameters of the hybrid relational network model are optimized through the optimizer to improve the accuracy of molecular property prediction.
[0067] Preferably, the prediction loss adopts cross entropy loss, and a hybrid prior relationship graph is used to constrain the learning of the similarity matrix of the two-dimensional molecular relationship graph. The calculation formula is as follows:
[0068]
[0069] The total loss of the mixed relational network model training is:
[0070]
[0071] Here, λ is a learnable parameter.
[0072] Preferably, the meta-learning framework adopts MAML.
[0073] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0074] Compared to existing technologies, this invention utilizes a dual-graph relational network framework to fuse information from a two-dimensional molecular relational graph and a molecular distribution relational graph, effectively learning a hybrid knowledge-guided molecular representation for molecular property prediction. Furthermore, this invention leverages existing chemical knowledge and real-world label information to construct a hybrid prior relational graph to constrain the learning of the hybrid relational network model and the optimization of the molecular representation, thereby improving the accuracy of molecular property prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 A schematic diagram of the steps of a small sample molecular property prediction method based on a hybrid relationship network;
[0076] Figure 2 A framework diagram of a two-dimensional molecular relationship diagram of the present invention;
[0077] Figure 3 A framework diagram of the molecular distribution relationship diagram of the present invention;
[0078] Figure 4 It is a framework diagram of the hybrid prior relationship diagram of the present invention;
[0079] Figure 5 This is a hybrid relationship network framework diagram of the present invention. DETAILED DESCRIPTION
[0080] The present invention will be further described and illustrated below with reference to the accompanying drawings and specific embodiments.
[0081] like Figure 1 As shown, in a preferred embodiment of the present invention, a method for predicting molecular properties of a small sample based on a hybrid relationship network is provided, wherein the molecular property to be predicted may be a certain toxicity, pharmacological activity, etc. of the molecule. The specific steps of the prediction method are shown in S1 to S4:
[0082] S1: Split the molecular SMILES and the corresponding label data into N samples according to the predefined small sample molecular property prediction task. t Molecular property prediction tasks (hereinafter referred to as tasks), each task is a 2-way K-shot classification task, which includes a support set and a query set; tasks can be divided into training tasks and testing tasks. The training task is used to learn the initialization parameters of the model, and the testing task is used to test the performance of the model.
[0083] In the embodiment of the present invention, the above-mentioned 2-way K-shot mainly adopts 2-way 1-shot and 2-way 10-shot.
[0084] S2: For each task, we first use the RDKit tool and the graph neural network GIN to utilize SMILES and label information to generate three relationship graph structures representing different relationships between molecular instances: a two-dimensional molecular relationship graph based on property perception, a molecular distribution relationship graph, and a hybrid prior relationship graph. We then build a hybrid relationship network model and a hybrid prior relationship graph. Then, we learn the hybrid relationship network model under the constraints of the hybrid prior relationship graph, and finally obtain a molecular representation vector with rich semantics for molecular property prediction, thereby achieving effective label propagation.
[0085] In an embodiment of the present invention, the specific implementation method of the above step S2 is as follows:
[0086] S21: First, use the RDKit tool to convert each molecule's SMILES into a two-dimensional molecular graph structure. Use GIN and a prototype-like learning network as the original encoder model to obtain a universal molecular representation vector based on the two-dimensional graph structure through GIN. Then, in the prototype-like learning network, the universal molecular representation vector and the prototype are concatenated and the property-aware molecular representation vector is obtained through the attention mechanism. Each molecule is regarded as a node, the property-aware molecular representation vector is regarded as the node feature, and the weight of the edge between two nodes is the similarity between the two molecular representation vectors. A property-aware two-dimensional molecular relationship graph is constructed.
[0087] S22: Then, using the existing instance label information in the support set of each task, the relationship between each molecular instance in the task and all molecular instances in the support set is modeled to obtain the label distribution of the molecular instance, which is used as the distribution representation vector of the molecular instance (hereinafter referred to as the molecular distribution representation vector). Each molecular instance in the task is used as a node, and the weight of the edge between two nodes is the similarity of the label distribution of the two molecular instances. A molecular distribution relationship graph corresponding to each task is constructed;
[0088] S23: Then, use the RDKit tool to obtain the molecular topological fingerprint based on chemical domain knowledge of each molecule in the task as the molecular fingerprint representation, use each molecular instance in the task as a node, and the weight of the edge between two nodes is the similarity between the two molecular topological fingerprints to construct a molecular fingerprint relationship graph; use the existing molecular property labels as molecular representation vectors, use each molecular instance in the task as a node, and the weight of the edge between two nodes is the similarity between the two molecular property labels to construct a true label relationship graph; then, the similarity matrix of the molecular fingerprint relationship graph and the true label relationship graph is summed and averaged, so as to achieve mutual information fusion and finally form a hybrid prior relationship graph;
[0089] S24: After obtaining the two-dimensional molecular relationship graph and the molecular distribution relationship graph, the two relationship graphs are used to construct a hybrid relationship network model; first, the property-perceived molecular representation vectors in the two-dimensional molecular relationship graph are used to calculate a similarity matrix, where each value in the similarity matrix represents the similarity between two property-perceived molecular representation vectors; then the similarity matrix is used to aggregate and update the molecular distribution representation vectors in the molecular distribution relationship graph; the updated molecular distribution representation vectors are used to calculate a similarity matrix representing the similarity between the molecular distributions; then the similarity matrix is used to aggregate and update the two-dimensional molecular relationship graph; the two-dimensional molecular relationship graph and the molecular distribution relationship graph are cyclically updated in this manner (in an embodiment of the present invention, two rounds of cyclic updates may be performed) to obtain optimized two-dimensional molecular relationship graph and molecular distribution relationship graph;
[0090] S25: After obtaining the optimized two-dimensional molecular relationship graph and molecular distribution relationship graph, the corresponding similarity matrices are calculated respectively; then, the similarity matrix of the mixed prior relationship graph is calculated, and the similarity matrix of the two-dimensional molecular relationship graph and the similarity matrix of the mixed prior relationship graph are used to construct a regularization term to constrain the mixed relationship network model to learn a correct and effective molecular relationship graph, thereby improving the prediction performance of the mixed relationship network model.
[0091] In an embodiment of the present invention, in each task of S2 above, the RDKit tool converts SMILES into a two-dimensional molecular graph, and then uses the graph neural network GIN as the basic encoder to encode the two-dimensional molecular graph to obtain a universal molecular representation vector. For each property label category, the universal molecular representation vector of the molecule of that category is averaged to obtain a class prototype, and then the universal molecular representation vector and the class prototype are spliced together to obtain a property-aware molecular representation vector through an attention mechanism; each molecule in the task is taken as a node and the property-aware molecular representation vector is taken as the node feature to construct a two-dimensional molecular relationship graph, where the property-aware molecular representation vector is recorded as The similarity between molecular representation vectors is denoted as The molecular label distribution is used to construct a molecular distribution relationship diagram, where the molecular label distribution is recorded as The similarity between molecular label distributions is denoted as The molecular topological fingerprint obtained by processing the molecular SMILES with the topological fingerprint generation function in the RDKit tool is used as the molecular representation vector to construct a molecular fingerprint relationship diagram based on chemical field knowledge, where the molecular topological fingerprint is recorded as The similarity between molecular topological fingerprints is recorded as The relationship between the true molecular labels is used to construct a true label relationship graph, where the true molecular labels are recorded as The similarity between the true molecular labels is recorded as
[0092] In an embodiment of the present invention, in the above S21, the two-dimensional molecular relationship diagram is constructed as follows:
[0093] The input molecular SMILES data x is processed by RDKit tool τ,i Process it and convert it into a two-dimensional molecular graph. Use the basic encoder GIN to encode the two-dimensional molecular graph and use it as the molecular representation vector g τ,i , and then the molecular representation vector g corresponding to each property label category in the support set τ,i The class prototype of each type of property label is obtained by adding and averaging The calculation formula is as follows:
[0094]
[0095] Among them, the sample set with property label category c in the τth task is And y τ,i =c}, indicating the category of molecular property labels, c = 0 or 1, τ indicates the τth task, x τ,i is the SMILES of the ith molecule instance, y τ,i is the binary label corresponding to the predicted property of the ith molecule instance, representing the specified molecular property and the unspecified molecular property. For example, taking the molecular property as toxicity, y τ,i Contains two types of labels, representing toxicity and non-toxicity.
[0096] Then, each molecular representation vector is concatenated with all class prototypes, and the property-aware molecular representation vector m is obtained through the attention mechanism. τ,i :
[0097]
[0098] in, g τ,irepresents the molecular characterization vector, Represents the class prototype of all molecules with property label category 0, Represents the class prototype of all molecules with property label category 1, d g represents the dimension of the molecular representation vector;
[0099] Then, a multilayer perceptron is used to compress the property-aware molecular representation vector:
[0100]
[0101] Among them, W τ,r are the parameters of the multi-layer perceptron MLP;
[0102] Consider each molecule in the task as a node, and the compressed property-aware molecular representation vector s τ,i Node features considered as initial To construct a two-dimensional molecular relationship graph, the entire two-dimensional molecular relationship graph is a fully connected graph. The weight of each edge represents the similarity between the two nodes corresponding to the edge. The edge weight calculation formula in the first round of loop is as follows:
[0103]
[0104] in, are the parameters of the multi-layer perceptron MLP, and are the node features of the i-th node and the j-th node in the l-th cycle respectively; is the similarity matrix, yes The element with coordinates (i, j) represents the similarity between the i-th node and the j-th node; the similarity matrix is obtained Then, Each row of values is normalized to 0-1.
[0105] In an embodiment of the present invention, in the above S22, the molecular distribution relationship graph is constructed by introducing distribution learning, specifically: first, the property labels of all molecular instances are encoded, and the encoding rules of the molecular instances in the support set and the query set are different; the distribution of the molecular instances in the support set is achieved by modeling the relationship between the molecule and all molecular instances in the support set. If the property labels between two molecular instances are the same, the corresponding position is set to 1; if the property labels between two molecular instances are different, the corresponding position is set to 0; because the property labels of the molecular instances in the query set are unknown, all of them are initialized to an initial value, which is an average value related to the number of molecular instances in the support set (i.e., the inverse of the number of molecular instances in the support set); all molecules in the task are regarded as nodes in the molecular distribution relationship graph, and the node features of the molecular instances in the molecular distribution relationship graph are initialized as follows:
[0106]
[0107] Among them, the initial node feature of the i-th node in the τ-th task is K represents the number of molecular instances in a property label category, || represents the splicing operation, y τ,i and y τ,j Represent the property labels of the i-th node and the j-th node respectively; δ(·) is the Kronecker function, when y τ,i =y τ,j , the output result is 1, otherwise the output result is 0;
[0108] Then, according to the initialized node features To calculate the similarity matrix of the molecular distribution relationship diagram The calculation formula is as follows:
[0109]
[0110] in, are the learnable parameters of the multilayer perceptron MLP; yes The element with coordinates (i, j) in the middle represents the similarity of label distribution between the i-th node and the j-th node; Afterwards, The values in each row are normalized to 0-1; the node characteristics and similarity matrix of the molecular distribution relationship diagram are calculated. Then, a molecular distribution relationship diagram is constructed based on this.
[0111] In an embodiment of the present invention, in the above S23, the molecular fingerprint used to construct the molecular fingerprint relationship graph is a molecular topological fingerprint, which is all molecular fragments on the path from a molecule to a set number of keys, and then a hash calculation is performed on each path to generate a fingerprint; the molecular topological fingerprint is used to represent the molecular characterization vector based on chemical field knowledge, and then the Tanimoto coefficient solution formula is used to calculate the relationship between molecules based on chemical field knowledge. The calculation formula is as follows:
[0112]
[0113] in, Similarity matrix representing molecular fingerprint relationship graph The element with coordinates (i, j) represents the similarity of the molecular topological fingerprint between the i-th node and the j-th node, and a and b represent the molecular topological fingerprint of the i-th node respectively. and the molecular topological fingerprint of the jth node The number of bits with a value of 1, c represents two molecular topological fingerprints and The number of bits at the same position in the task that are simultaneously 1; each molecule in the task is taken as a node, the molecular topological fingerprint is the node feature, and the Tanimoto coefficient is the weight of the edge between nodes, thereby constructing a molecular fingerprint relationship graph;
[0114] The real label relationship diagram shows the real logical relationship between molecules. The same property label between two molecules is 1, and the different property labels are 0.
[0115] By fusing the molecular fingerprint relationship graph and the true label relationship graph, a hybrid prior relationship graph is obtained to constrain the optimization of the hybrid relationship network model; the fusion process of the molecular fingerprint relationship graph and the true label relationship graph is as follows:
[0116]
[0117] in, is the similarity matrix of the mixed prior relationship graph, yes The element with coordinates (i, j) in the is the similarity matrix of the molecular fingerprint relationship graph The element with coordinates (i, j) in the is the similarity matrix of the true label relationship graph The element with coordinate (i, j) in the .
[0118] S3: Finally, the molecular representation vectors in the optimized two-dimensional molecular relationship graph in S24 and the molecular distribution representation vectors in the molecular distribution relationship graph are spliced together and input into the classifier to predict the properties of the molecules. The prediction loss is calculated as the loss of the instance classification task and the parameters of the hybrid relationship network model are optimized to improve the accuracy of molecular property prediction.
[0119] In an embodiment of the present invention, the enhanced molecular representation vectors in the two relationship graphs are spliced together in S3, and the calculation formula is as follows:
[0120]
[0121] After obtaining the molecular representation vector After that, it is input into the classifier to predict the molecular property category. The formula is as follows:
[0122]
[0123] Among them, W c is a learnable parameter;
[0124] Then, based on the molecular property categories output by the classifier and the actual molecular property category labels, the prediction loss is calculated as the loss of the instance classification task, and the parameters of the hybrid relational network model are optimized through the optimizer to improve the accuracy of molecular property prediction.
[0125] In the embodiment of the present invention, the upper classifier adopts a multi-layer perceptron, which is mainly composed of a Linear layer, a Dropout layer and a Softmax layer.
[0126] In an embodiment of the present invention, the above prediction loss adopts cross entropy loss, and a hybrid prior relationship graph is used to constrain the learning of the similarity matrix of the two-dimensional molecular relationship graph. The calculation formula is as follows:
[0127]
[0128] The total loss of the mixed relational network model training is:
[0129]
[0130] Here, λ is a learnable parameter.
[0131] S4: Under the meta-learning framework, the meta-network repeats the above S1 to S3 steps on the training task to perform meta-learning training, allowing the hybrid relational network model to learn "prior knowledge", that is, the parameters initialized by the hybrid relational network model. The initialized meta-network is then applied to the test task, and the support set in the test task is used to fine-tune the parameters of the meta-network. Finally, the fine-tuned hybrid relational network model is used to test the query set in the test task; the hybrid relational network model that passes the test is used to perform actual molecular property prediction.
[0132] In an embodiment of the present invention, in the hybrid relationship network of step S4, the similarity matrix in the two-dimensional molecular relationship graph is used to update the node features in the molecular distribution relationship graph. The update formula for the first round is as follows:
[0133]
[0134] in, is a learnable parameter;
[0135] Node features in the updated molecular distribution relationship graph Then, use the node features of the updated molecular distribution relationship graph To calculate the similarity matrix of the updated molecular distribution relationship graph The calculation formula is as follows:
[0136]
[0137] in, are the learnable parameters of the multi-layer perceptron MLP;
[0138] Then, the Softmax function is applied to For each row above, normalize the value of each row to a value between 0 and 1;
[0139] Then, the similarity matrix of the updated molecular distribution relationship diagram is obtained On the basis, use To update the node features of the two-dimensional molecular relationship graph The calculation formula is as follows:
[0140]
[0141] in, is a learnable parameter;
[0142] In the updated two-dimensional molecular relationship graph, the node representation is obtained Then, use it to update the similarity matrix of the two-dimensional molecular relationship graph
[0143]
[0144] in, are learnable parameters in the multilayer perceptron MLP;
[0145] Then, the Softmax function is applied to For each row above, normalize the values in each row to a value between 0 and 1.
[0146] In an embodiment of the present invention, the hybrid relationship network model is designed as a two-layer model. The molecular relationship graph and the molecular distribution graph based on property perception exchange adjacency matrices to cyclically update each other's node features. Therefore, the update order of the first layer in the entire hybrid relationship network model is as follows: l is initially 0. It should be noted that here It represents the node characteristics of all nodes in the two-dimensional molecular relationship graph and the node characteristics of all nodes in the molecular distribution relationship graph.
[0147] In an embodiment of the present invention, the MAML framework is selected as the metamodel framework.
[0148] The small sample molecular property prediction method based on the hybrid relationship network described in S1 to S4 above is applied to a specific embodiment to demonstrate the technical effects that can be achieved.
[0149] Example
[0150] Molecules are typically composed of atoms and chemical bonds. Intuitively, many current studies treat atoms in molecules as nodes and chemical bonds as edges between nodes to model the two-dimensional topological structure of molecules. Currently, popular graph neural networks are used to capture effective molecular information and learn molecular representations. However, molecular property prediction tasks are strictly speaking small-sample tasks because the number of molecules with known labels is extremely small. Table 1 shows a 2-way 2-shot molecular property prediction task. In this task, the dataset contains two positive samples and two negative samples in the support set, and one sample in the query set. Feature optimization and label propagation are achieved by establishing a relationship between the molecular data in the support and query sets.
[0151] Table 1 2-way 2-shot sample data
[0152]
[0153] like Figure 1 As shown, this embodiment follows the small sample molecular property prediction method process based on the hybrid relationship network described in S1 to S4 above, uses a 2-way 2-shot molecular property prediction task, by constructing a two-dimensional molecular relationship graph and a molecular distribution relationship graph based on the present embodiment, and updating its own node features by exchanging each other's similarity matrices to achieve mutual fusion of relationship information. In addition, by fusing the molecular fingerprint relationship graph of the present embodiment and the true label relationship graph, a hybrid prior relationship graph in the present embodiment can be obtained to constrain the optimization of the model. The specific implementation process of the small sample molecular property prediction method based on the hybrid relationship network in this embodiment is the same as the step framework of S1 to S4 above. The following mainly describes the implementation process and technical effects of the framework in this embodiment.
[0154] Regarding the construction of the two-dimensional molecular relationship diagram based on property perception in this embodiment, Figure 2 shown.
[0155] Regarding the construction of the molecular distribution relationship diagram in this embodiment, Figure 3 As shown, the molecular distribution relationship diagram in this embodiment is constructed by introducing distribution learning. and similarity matrix Then, the molecular distribution relationship diagram in this embodiment is constructed based on this.
[0156] For the mixed prior relationship diagram in this embodiment, such as Figure 4As shown in Figure 1, this embodiment uses a topological fingerprint to represent molecular representation vectors based on chemical domain knowledge. The Tanimoto coefficient solution is then used to calculate the relationships between molecules based on chemical domain knowledge. A molecular fingerprint relationship graph is constructed using molecules as nodes, molecular fingerprints as node features, and Tanimoto coefficients as edge weights between nodes.
[0157] The true label relationship graph represents the true logical relationship between molecules, where the same properties are 1 and different properties are 0. By fusing the topology-based molecular fingerprint relationship graph with the true label relationship graph, a hybrid prior relationship graph can be obtained to constrain model optimization.
[0158] For the construction of hybrid relationship graph network model Figure 5 In the hybrid relationship network model HKGSR, the similarity matrix in the two-dimensional molecular relationship graph is used. To update the node features in the two-dimensional molecular distribution map Node features in the updated molecular distribution relationship graph Then, use the node features of the updated molecular distribution relationship graph To calculate the similarity matrix of the updated molecular distribution relationship graph Then we get the similarity matrix of the updated molecular distribution relationship diagram Then, use it to update the node features of the two-dimensional molecular relationship graph In the updated two-dimensional molecular relationship graph, the node representation is obtained Then, use it to calculate the similarity matrix of the two-dimensional molecular relationship graph
[0159] In this embodiment, the hybrid relationship network is designed as a two-layer network. The update sequence of the entire hybrid network HKGSR is as follows: l refers to the l-th layer and is initially 0.
[0160] Finally, the enhanced molecular representation vectors from the two relationship graphs are concatenated and fed into a classifier to predict the molecular properties. The prediction loss is then calculated as the loss for the instance classification task. The model parameters are then optimized based on this loss to improve the accuracy of molecular property prediction. The cross-entropy loss can be used as the loss for the prediction classification task.
[0161] This example is a training task in a meta-learning task, which allows the model to learn "prior knowledge", that is, the model initialization parameters, and then apply the initialized parameters to the test task. This example uses the MAML meta-learning framework.
[0162] The above method is applied to specific datasets below. The main embodiments use 2-way 1-shot and 2-way 10-shot examples on the Tox21, Muv, Sider and ToxCast datasets respectively. The specific implementation steps are as described above, and the following mainly demonstrates their effects.
[0163] This example evaluates HKGSR and Pre-HKGSR in the experiment. Pre-HKGSR uses the pre-trained model of Pre GNN.
[0164] Table 2 Experimental results of 2-way 1-shot and 2-way 10-shot
[0165]
[0166] Table 2 shows the performance of HKGSR on small-shot molecular property prediction tasks, namely the Tox21, Muv, Sider, and ToxCast datasets. Compared to the previous SOTA:PAR baseline, HKGSR achieves improvements of 2.4% and 2% on the Tox21 dataset (10-shot and 1-shot tasks, respectively), 3.96% and 5% on the Muv dataset (10-shot and 1-shot tasks, respectively), 17.01% and 13.08% on the Sider dataset (10-shot and 1-shot tasks, respectively), and 5.65% and 6.58% on the ToxCast dataset (10-shot and 1-shot tasks, respectively) for models trained from scratch. This demonstrates that hybrid knowledge-guided molecular relationship modeling is crucial for achieving small-shot molecular property prediction in models trained from scratch. Among pre-trained models, Pre-HKGSR achieved improvements of 0.16% and 0.87% on the 10-shot and 1-shot tasks on the Tox21 dataset, respectively, compared to the previous SODA:Pre-PAR baselines; 6.72% and 8.8% on the 10-shot and 1-shot tasks on the Muv dataset, respectively; 11.62% and 17.48% on the 10-shot and 1-shot tasks on the Sider dataset, respectively; and 5.14% and 6.33% on the 10-shot and 1-shot tasks on the ToxCast dataset, respectively. This demonstrates that while pre-training injects some prior knowledge into the model, the knowledge captured by the model is still incomplete. Experimental results show that under the constraints of mixed prior knowledge, the model's performance is further improved.
[0167] Table 3 Results of ablation experiments
[0168]
[0169] In addition, this embodiment conducts an ablation study on the three molecular relationship graphs of HKGSR. D represents the molecular distribution relationship graph, R represents the two-dimensional molecular relationship graph, and P represents the hybrid prior relationship graph. First, in the hybrid relationship network module, the molecular distribution graph is directly used to capture the relationship between molecules. As can be seen in the experiment, the model does not converge, which confirms that the molecular distribution relationship graph only plays an auxiliary role in HKGSR, rather than a leading role. However, directly using the two-dimensional molecular relationship graph to capture the relationship between molecules, it can be seen from the experimental data that the two-dimensional molecular relationship graph can effectively capture the relationship between molecules, and the two-dimensional molecular relationship graph dominates the entire HKGSR model. Superimposing the molecular distribution relationship graph on the basis of the two-dimensional molecular relationship graph, it can be seen from the experimental data that there is a certain improvement effect. After superimposing the constraints of the hybrid prior relationship graph on this basis, the performance of the entire model is further improved.
[0170] This example proposes HKGSR, which integrates knowledge from two-dimensional molecular relationship graphs and molecular distribution relationship graphs by constructing a hybrid relationship network module. Furthermore, a hybrid prior relationship graph is designed to constrain the two-dimensional molecular relationship graph. Ultimately, this method optimizes molecular feature vectors and propagates labels, effectively improving the performance of small-sample molecular property prediction tasks. Furthermore, a comprehensive set of experiments confirms its effectiveness in small-sample molecular property prediction tasks.
[0171] The above embodiment is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Persons skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, any technical solution obtained by equivalent substitution or equivalent transformation falls within the scope of protection of the present invention.
Claims
1. A method for predicting molecular properties of small samples based on a hybrid relational network, characterized in that: Here are the steps: S1: Split the molecular SMILES and the corresponding label data into N samples according to the predefined small sample molecular property prediction task. t Molecular property prediction tasks Each task is a 2-way K-shot classification task, which includes a support set and a query set. The task can be divided into training tasks and testing tasks. The training task is used to learn the initialization parameters of the model, and the testing task is used to test the performance of the model. S2: For each task, we first use the RDKit tool and the graph neural network (GIN) to utilize SMILES and label information to generate three relationship graph structures representing different relationships between molecular instances: a two-dimensional molecular relationship graph based on property perception, a molecular distribution relationship graph, and a hybrid prior relationship graph. We then construct a hybrid relationship network model, which is then learned under the constraints of the hybrid prior relationship graph. Ultimately, we obtain a semantically rich molecular representation vector for molecular property prediction, enabling effective label propagation. S3: Finally, the molecular representation vectors in the optimized two-dimensional molecular relationship graph in S2 and the molecular distribution representation vectors in the molecular distribution relationship graph are spliced together and input into the classifier to predict the properties of the molecules. The prediction loss is calculated as the loss of the instance classification task and the parameters of the hybrid relationship network model are optimized to improve the accuracy of molecular property prediction; S4: Under the meta-learning framework, the meta-network repeats the above S1 to S3 steps on the training task to perform meta-learning training, allowing the hybrid relational network model to learn "prior knowledge", that is, the parameters initialized by the hybrid relational network model. The initialized meta-network is then applied to the test task, and the support set in the test task is used to fine-tune the parameters of the meta-network. Finally, the fine-tuned hybrid relational network model is used to test the query set in the test task; the hybrid relational network model that passes the test is used to perform actual molecular property prediction.
2. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 1, wherein: The specific implementation method of S2 is as follows: S21: First, use the RDKit tool to convert each molecule's SMILES into a two-dimensional molecular graph structure. Use GIN and a class prototype learning network as the original encoder model to obtain a universal molecular representation vector based on the two-dimensional graph structure through GIN. Then, in the class prototype learning network, the universal molecular representation vector and the class prototype are concatenated and the property-aware molecular representation vector is obtained through the attention mechanism. Each molecule is regarded as a node, the property-aware molecular representation vector is regarded as the node feature, and the weight of the edge between two nodes is the similarity between the two molecular representation vectors. A property-aware two-dimensional molecular relationship graph is constructed. S22: Then, using the existing instance label information in the support set of each task, the relationship between each molecular instance in the task and all molecular instances in the support set is modeled to obtain the label distribution of the molecular instance, which is used as the distribution representation vector of the molecular instance. Each molecular instance in the task is used as a node, and the weight of the edge between two nodes is the similarity of the label distribution of the two molecular instances. A molecular distribution relationship graph corresponding to each task is constructed; S23: Next, use the RDKit tool to obtain the molecular topological fingerprint of each molecule in the task based on chemical domain knowledge as the molecular fingerprint representation. Each molecular instance in the task is used as a node, and the weight of the edge between two nodes is the similarity of the two molecular topological fingerprints to construct a molecular fingerprint relationship graph; Use existing molecular property labels as molecular representation vectors, take each molecular instance in the task as a node, and the weight of the edge between two nodes is the similarity between the two molecular property labels to construct a true label relationship graph; Then, the similarity matrices of the molecular fingerprint relationship graph and the true label relationship graph are summed and averaged element by element, thereby realizing the mutual fusion of information and finally forming a hybrid prior relationship graph; S24: After obtaining the two-dimensional molecular relationship graph and the molecular distribution relationship graph, the two relationship graphs are used to construct a hybrid relationship network model; first, the property-perceived molecular representation vectors in the two-dimensional molecular relationship graph are used to calculate a similarity matrix, where each value in the similarity matrix represents the similarity between two property-perceived molecular representation vectors; then the similarity matrix is used to aggregate and update the molecular distribution representation vectors in the molecular distribution relationship graph; the updated molecular distribution representation vectors are used to calculate a similarity matrix representing the similarity between molecular distributions; then the similarity matrix is used to aggregate and update the two-dimensional molecular relationship graph; the two-dimensional molecular relationship graph and the molecular distribution relationship graph are updated in a cyclic manner to obtain optimized two-dimensional molecular relationship graph and molecular distribution relationship graph; S25: After obtaining the optimized two-dimensional molecular relationship graph and molecular distribution relationship graph, the corresponding similarity matrices are calculated respectively; then, the similarity matrix of the mixed prior relationship graph is calculated, and the similarity matrix of the two-dimensional molecular relationship graph and the similarity matrix of the mixed prior relationship graph are used to construct a regularization term to constrain the mixed relationship network model to learn a correct and effective molecular relationship graph, thereby improving the prediction performance of the mixed relationship network model.
3. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 2, wherein: In the S2, the RDKit tool converts SMILES into a two-dimensional molecular graph, and then uses the graph neural network GIN as the basic encoder to encode the two-dimensional molecular graph to obtain a universal molecular representation vector. The universal molecular representation vector of each property label category is averaged to obtain the class prototype, and then the universal molecular representation vector and the class prototype are spliced together to obtain the property-aware molecular representation vector through the attention mechanism; each molecule in the task is taken as a node and the property-aware molecular representation vector is taken as the node feature to construct a two-dimensional molecular relationship graph, where the property-aware molecular representation vector is recorded as The similarity between molecular representation vectors is denoted as The molecular label distribution is used to construct a molecular distribution relationship diagram, where the molecular label distribution is recorded as The similarity between molecular label distributions is denoted as The molecular topological fingerprint obtained by processing the molecular SMILES with the topological fingerprint generation function in the RDKit tool is used as the molecular representation vector to construct a molecular fingerprint relationship diagram based on chemical field knowledge, where the molecular topological fingerprint is recorded as The similarity between molecular topological fingerprints is recorded as The relationship between the true molecular labels is used to construct a true label relationship graph, where the true molecular labels are recorded as The similarity between the true molecular labels is recorded as 4. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 3, wherein: In S21, the two-dimensional molecular relationship diagram is constructed as follows: The input molecular SMILES data x is processed by RDKit tool τ,i Process it and convert it into a two-dimensional molecular graph. Use the basic encoder GIN to encode the two-dimensional molecular graph and use it as the molecular representation vector g τ,i , and then the molecular representation vector g corresponding to each property label category in the support set τ,i The class prototype of each type of property label is obtained by adding and averaging The calculation formula is as follows: Among them, the sample set with property label category c in the τth task is And y τ,i =c}, indicating the category of molecular property labels, c = 0 or 1, τ indicates the τth task, x τ,i is the SMILES of the molecule instance, y τ,i is the binary classification label corresponding to the property to be predicted of the molecular instance; Then, each molecular representation vector is concatenated with all class prototypes, and the property-aware molecular representation vector m is obtained through the attention mechanism. τ,i : in, g τ,i represents the molecular characterization vector, represents the class prototype of all molecules with label category 0, represents the class prototype of all molecules with label category 1, d g represents the dimension of the molecular representation vector; Then, a multilayer perceptron is used to compress the property-aware molecular representation vector: Among them, W τ,r are the parameters of the multi-layer perceptron MLP; Consider each molecule in the task as a node, and the compressed property-aware molecular representation vector s τ,i Node features considered as initial To construct a two-dimensional molecular relationship graph, the entire two-dimensional molecular relationship graph is a fully connected graph. The weight of each edge represents the similarity between the two nodes corresponding to the edge. The edge weight calculation formula in the first round of loop is as follows: Among them, W τ,rA are the parameters of the multi-layer perceptron MLP, and are the node features of the i-th node and the j-th node in the l-th cycle, is the similarity matrix, yes The element with coordinates (i, j) represents the similarity between the i-th node and the j-th node; the similarity matrix is obtained Then, Each row of values is normalized to 0-1.
5. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 4, characterized in that: In S22, the molecular distribution relationship graph is constructed by introducing distribution learning, specifically: first, the property labels of all molecular instances are encoded, and the encoding rules of the molecular instances in the support set and the query set are different; the distribution of the molecular instances in the support set is modeled by the relationship between the molecule and all molecular instances in the support set. If the property labels between two molecular instances are the same, the corresponding position is set to 1; if the property labels between two molecular instances are different, the corresponding position is set to 0; since the property labels of the molecular instances in the query set are unknown, all of them are initialized to an initial value, which is an average value related to the number of molecular instances in the support set; all molecules in the task are regarded as nodes in the molecular distribution relationship graph, and the node features of the molecular instances in the molecular distribution relationship graph are initialized as follows: Among them, the initial node feature of the i-th node in the τ-th task is K represents the number of molecular instances in a property label category, || represents the splicing operation, y τ,i and y τ,j Represent the property labels of the i-th node and the j-th node respectively; δ(·) is the Kronecker function, when y τ,i =y τ,j , the output result is 1, otherwise the output result is 0; Then, according to the initialized node features To calculate the similarity matrix of the molecular distribution relationship diagram The calculation formula is as follows: Among them, W τ,l,dA are the learnable parameters of the multilayer perceptron MLP; yes The element with coordinates (i, j) in the middle represents the similarity of label distribution between the i-th node and the j-th node; Afterwards, The values in each row are normalized to 0-1; the node characteristics of the molecular distribution relationship diagram are calculated and similarity matrix Then, a molecular distribution relationship diagram is constructed based on this.
6. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 5, characterized in that: In S23, the molecular fingerprint used to construct the molecular fingerprint relationship graph is a molecular topological fingerprint, which is all molecular fragments on the path from a molecule to a set number of keys, and then a hash calculation is performed on each path to generate a fingerprint; the molecular topological fingerprint is used to represent the molecular characterization vector based on chemical field knowledge, and then the Tanimoto coefficient solution formula is used to calculate the relationship between molecules based on chemical field knowledge. The calculation formula is as follows: in, Similarity matrix representing molecular fingerprint relationship graph The element with coordinates (i, j) represents the similarity of the molecular topological fingerprint between the i-th node and the j-th node, and a and b represent the molecular topological fingerprint of the i-th node respectively. and the molecular topological fingerprint of the jth node The number of bits with a value of 1, c represents two molecular topological fingerprints and The number of bits at the same position in the task that are simultaneously 1; each molecule in the task is taken as a node, the molecular topological fingerprint is the node feature, and the Tanimoto coefficient is the weight of the edge between nodes, thereby constructing a molecular fingerprint relationship graph; The real label relationship diagram shows the real logical relationship between molecules. The same property label between two molecules is 1, and the different property labels are 0. By fusing the molecular fingerprint relationship graph and the true label relationship graph, a hybrid prior relationship graph is obtained to constrain the optimization of the hybrid relationship network model; the fusion process of the molecular fingerprint relationship graph and the true label relationship graph is as follows: in, is the similarity matrix of the mixed prior relationship graph, yes The element with coordinates (i, j) in the is the similarity matrix of the molecular fingerprint relationship graph The element with coordinates (i, j) in the is the similarity matrix of the true label relationship graph The element with coordinate (i, j) in the .
7. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 6, wherein: In the hybrid relationship network of S4, the similarity matrix in the two-dimensional molecular relationship graph is used to update the node features in the molecular distribution relationship graph. The update formula for the first round is as follows: in, is a learnable parameter; Node features in the updated molecular distribution relationship graph Then, use the node features of the updated molecular distribution relationship graph To calculate the similarity matrix of the updated molecular distribution relationship graph The calculation formula is as follows: in, are the learnable parameters of the multi-layer perceptron MLP; Then, the Softmax function is applied to For each row above, normalize the value of each row to a value between 0 and 1; Then, the similarity matrix of the updated molecular distribution relationship diagram is obtained On the basis, use To update the node features of the two-dimensional molecular relationship graph The calculation formula is as follows: in, is a learnable parameter; In the updated two-dimensional molecular relationship graph, the node representation is obtained Then, use it to update the similarity matrix of the two-dimensional molecular relationship graph in, are learnable parameters in the multilayer perceptron MLP; Then, the Softmax function is applied to For each row above, normalize the value of each row to a value between 0 and 1; The hybrid relationship network model is designed as a two-layer model. The update order of the first layer in the entire hybrid relationship network model is as follows: l is initially 0.
8. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 7, wherein: The enhanced molecular representation vectors in the two relationship graphs are spliced together, and the calculation formula is as follows: After obtaining the molecular representation vector After that, it is input into the classifier to predict the molecular property category. The formula is as follows: Among them, W c is a learnable parameter; Then, based on the molecular property categories output by the classifier and the actual molecular property category labels, the prediction loss is calculated as the loss of the instance classification task, and the parameters of the hybrid relational network model are optimized through the optimizer to improve the accuracy of molecular property prediction.
9. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 8, wherein: The prediction loss adopts cross entropy loss, and uses a hybrid prior relationship graph to constrain the learning of the similarity matrix of the two-dimensional molecular relationship graph. The calculation formula is as follows: The total loss of the mixed relational network model training is: Here, λ is a learnable parameter.
10. The method for predicting molecular properties of small samples based on a hybrid relationship network according to claim 1, wherein: The meta-learning framework adopts MAML.
Citation Information
Patent Citations
Drug virtual screening method based on adaptive meta-learning
CN115101145A
Molecular graph representation learning method based on contrastive learning
US20230052865A1