Prediction method and apparatus, readable storage medium and electronic device
By establishing a molecular graph and using a graph neural network model to determine substructure properties, the problem of uninterpretable molecular property prediction results in the existing technology is solved, and the credibility and interpretability of the prediction results are improved.
Patent Information
- Application Number
- PCT/CN2024/079019
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-14
- Filing Date
- 2024-02-28
- Publication Date
- 2024-10-17
AI Technical Summary
Existing molecular property prediction models cannot explain the causes of molecular properties, resulting in low credibility of prediction results.
By establishing a molecular graph, the graph neural network model is used to determine the substructure in the molecule, and predict the molecular properties based on the properties of the substructure, providing interpretable and high-confidence prediction results.
It improves the credibility of molecular property prediction, explains the causes of molecular properties through the properties of substructures, and enhances the interpretability of prediction results.
Smart Images

Figure CN2024079019_17102024_PF_FP_ABST
Abstract
Description
Prediction method, device, readable storage medium and electronic device Technical Field
[0001] The present disclosure relates to the field of chemistry, and in particular to a prediction method, device, readable storage medium, and electronic device. Background Art
[0002] With the development of computer technology and the need for in-depth business integration, in the fields of medicine and chemistry, predicting molecular properties through models and screening compounds based on the predicted molecular properties has become one of the common application scenarios of deep learning in the medical and chemical fields.
[0003] Currently, when predicting molecular properties, it is usually necessary to obtain the molecular structure of the molecule to be predicted, and then input the molecular structure into a pre-trained prediction model to obtain the molecular properties output by the prediction model as the predicted molecular properties of the molecule to be predicted.
[0004] However, in general, the prediction model can only determine the molecular properties of the molecule to be predicted, but cannot provide the reasons why the molecule to be predicted has its corresponding molecular properties, which leads to low credibility of the predicted molecular properties.
[0005] Summary of the Invention
[0006] The present disclosure provides a prediction method, device, readable storage medium, and electronic device.
[0007] This disclosure adopts the following technical solutions:
[0008] The present disclosure provides a prediction method, comprising:
[0009] According to the obtained atoms contained in the molecule to be predicted and the chemical bonds between the atoms, a molecular graph is established with the atoms as nodes and the chemical bonds as edges;
[0010] Inputting the molecular graph into a pre-trained graph neural network model to obtain several specified subgraphs of the molecular graph output by the graph neural network model, wherein the specified subgraphs correspond to substructures contained in the molecular structure of the molecule to be predicted;
[0011] For each designated subgraph, determining a designated feature of the designated subgraph, and determining a fusion feature based on the designated feature and the representation features corresponding to each pre-stored designated property;
[0012] Inputting the fusion features into a classification model to obtain a target classification result output by the classification model, wherein the target classification result is used to characterize a specified property of a substructure corresponding to the specified subgraph;
[0013] The molecular properties of the molecule to be predicted are predicted according to the target classification results corresponding to the designated subgraphs.
[0014] Optionally, the molecular graph is input into a pre-trained graph neural network model to obtain several specified subgraphs of the molecular graph output by the graph neural network model, specifically including:
[0015] Inputting the molecular graph into a pre-trained graph neural network model, obtaining the confidence corresponding to each chemical bond in the molecule to be predicted output by the graph neural network model, wherein the confidence is used to represent the probability that the edge corresponding to the chemical bond belongs to a specified subgraph;
[0016] The designated edges belonging to the designated subgraph are determined according to the confidence levels, and the designated subgraph is determined according to the designated edges and the nodes connected to the designated edges.
[0017] Optionally, the molecular graph is input into a pre-trained graph neural network model to obtain the confidence corresponding to each chemical bond in the molecule to be predicted output by the graph neural network model, specifically including:
[0018] Determine the node features corresponding to each node in the molecular graph;
[0019] For each chemical bond contained in the molecule to be predicted, determining the bond characteristics of the chemical bond according to the node characteristics of the nodes connected to the edge corresponding to the chemical bond;
[0020] The bond feature is input into a pre-trained graph neural network model to obtain the confidence of the chemical bond output by the graph neural network model.
[0021] Optionally, determining the node features corresponding to each node in the molecular graph specifically includes:
[0022] Performing feature extraction on each node and each edge contained in the molecular graph to determine the initial features corresponding to each node and the initial features corresponding to each edge;
[0023] For each node in the molecular graph, the neighbor nodes of the node are determined, and the node features of the node are determined according to the initial features of the node, the initial features of the neighbor nodes, and the initial features of the edges between the neighbor nodes and the node.
[0024] Optionally, determining the fusion feature according to the designated feature and the pre-stored characterization features corresponding to each designated property, specifically includes:
[0025] For each designated property, determining, based on the similarity between the designated feature and the characterizing feature of the designated property, and the characterizing feature of the designated property, an enhanced feature of the designated property corresponding to the designated subgraph;
[0026] The designated feature and the enhanced features of each designated property corresponding to the designated subgraph are fused to obtain the fused feature.
[0027] Optionally, predicting the molecular properties of the molecule to be predicted according to the target classification results corresponding to each designated subgraph specifically includes:
[0028] According to the molecular graph and the designated subgraphs, determining other substructures in the molecular structure of the molecule to be predicted except for the substructures corresponding to the designated subgraphs as specific substructures;
[0029] Determining a specific subgraph corresponding to the specific substructure, and determining specific features of the specific subgraph;
[0030] Inputting the specific feature into the classification model to obtain a specific classification result output by the classification model;
[0031] The molecular properties of the molecule to be predicted are predicted according to the specific classification results and the target classification results corresponding to the designated subgraphs.
[0032] Optionally, the graph neural network model and the classification model are trained in the following manner:
[0033] For each sample molecule labeled with a specified property, a sample molecule graph is established with each atom as a node and the chemical bonds between the atoms, as a training sample, based on the atoms contained in the sample molecule and the chemical bonds between the atoms, and the specified property is used as the label of the training sample;
[0034] Input each training sample into the graph neural network model to be trained, and obtain a sample-specified subgraph corresponding to each training sample output by the graph neural network model to be trained;
[0035] Determine the sample features corresponding to the designated subgraphs of each sample, and determine the characterization features of each designated property based on the sample features and the labels corresponding to the training samples;
[0036] Determining fusion features corresponding to each training sample according to the characteristics of each sample and the characterization features of each specified property;
[0037] Inputting each fusion feature into the classification model to be trained to obtain the sample classification result output by the classification model to be trained;
[0038] Determining the sample properties corresponding to each training sample according to the sample classification results of the sample designated subgraphs corresponding to each training sample;
[0039] The graph neural network model and the classification model are trained according to the sample properties and labels corresponding to the training samples.
[0040] The present disclosure provides a prediction device, comprising:
[0041] A first determination module is configured to establish, based on the obtained atoms contained in the molecule to be predicted and the chemical bonds between the atoms, a molecular graph with the atoms as nodes and the chemical bonds as edges;
[0042] A second determination module is configured to input the molecular graph into a pre-trained graph neural network model to obtain a plurality of specified subgraphs of the molecular graph output by the graph neural network model, wherein the specified subgraphs correspond to substructures contained in the molecular structure of the molecule to be predicted;
[0043] A fusion module is used to determine, for each specified subgraph, a specified feature of the specified subgraph, and determine a fusion feature based on the specified feature and the representation features corresponding to the pre-stored specified properties;
[0044] A classification module, configured to input the fusion features into a classification model to obtain a target classification result output by the classification model, wherein the target classification result is used to characterize a specified property of the substructure corresponding to the specified subgraph;
[0045] The prediction module is used to predict the molecular properties of the molecule to be predicted based on the target classification results corresponding to each designated subgraph.
[0046] The present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the prediction method is implemented.
[0047] The present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned prediction method when executing the program. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0049] FIG1 is a schematic diagram of a flow chart of a prediction method provided by the present disclosure;
[0050] FIG2 is a schematic diagram of a molecular graph provided by the present disclosure;
[0051] FIG3 is a schematic diagram of a flow chart of a prediction method provided by the present disclosure;
[0052] FIG4 is a schematic diagram of the structure of the prediction device provided by the present disclosure;
[0053] FIG5 is a schematic diagram of an electronic device corresponding to FIG1 provided by the present disclosure. DETAILED DESCRIPTION
[0054] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present disclosure.
[0055] In related technologies, the molecular structure of the molecule to be predicted is directly input into a prediction model, which then outputs the molecular properties of the molecule to be predicted. However, the prediction model cannot explain these molecular properties. In other words, the prediction model cannot explain why the molecule to be predicted has the corresponding molecular properties. This results in low reliability of the molecular properties of the molecule to be predicted based on the current model.
[0056] The present application provides a prediction method that, based on the molecular structure of the molecule to be predicted, determines the designated subgraph corresponding to the substructure of the molecule to be predicted through a graph neural network model, and then predicts the molecular properties of the molecule to be predicted based on the designated properties of the designated subgraph. It can be seen that the prediction method in the present application can predict the molecular properties of the molecule to be predicted based on the properties of the substructure contained in the molecular structure of the molecule to be predicted. In other words, the molecule to be predicted has its corresponding molecular properties because the molecule to be predicted contains a substructure with designated properties. Obviously, the prediction method provides explainability for the molecule to be predicted to have its corresponding molecular properties, ensuring the credibility of the prediction results.
[0057] In the prediction method provided in the embodiments of the present disclosure, the graph neural network model and classification model involved may be pre-trained. The execution process of the prediction method may be performed by an electronic device for identifying the molecular properties of the molecule to be predicted, such as a server. The electronic device that performs the training process of the graph neural network model and classification model may be the same as or different from the electronic device that performs the prediction method, and the present disclosure does not impose any restrictions on this.
[0058] The technical solutions provided by various embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0059] FIG1 is a flow chart of the prediction method provided by the present disclosure, which specifically includes the following steps S100 to S108 .
[0060] S100: Based on the obtained atoms contained in the molecule to be predicted and the chemical bonds between the atoms, a molecular graph is established with atoms as nodes and chemical bonds as edges.
[0061] The prediction method disclosed herein can determine a specified subgraph using a graph neural network model. Typically, graph neural network models are used to process graph structures, which can accurately represent the molecular structure of the molecule to be predicted. Based on this, a molecular graph can be determined based on the molecular structure of the molecule to be predicted.
[0062] Specifically, for each molecule, the molecule contains atoms, and chemical bonds exist between the atoms, wherein the chemical bonds include ionic bonds and covalent bonds.
[0063] The following description uses a server as an example execution entity. The server can determine the molecule to be predicted. The molecule to be predicted can be included in a prediction request received by the server, or in a prediction task generated for the molecule to be predicted based on preset prediction conditions. The server can then parse the received prediction request or generated prediction task to determine the molecule to be predicted included in the prediction request or prediction task.
[0064] Next, the server may determine each atom contained in the molecule to be predicted and the chemical bonds between the atoms according to the molecular structure of the molecule to be predicted.
[0065] Finally, the server can determine each node in the molecular graph based on the determined atoms, and then for each chemical bond, determine the edges between the nodes in the molecular graph based on the nodes connected by the chemical bond. In this way, a molecular graph with atoms as nodes and chemical bonds as edges is constructed. The constructed molecular graph contains nodes corresponding to each atom and edges between each node. Among them, the edges between nodes in the molecular graph are used to represent the chemical bonds between the two nodes connected to the edge in the molecular graph. Take Figure 2 as an example.
[0066] Figure 2 is a schematic diagram of a molecular graph provided by the present disclosure. The figure uses a methanol molecule as an example. The server can determine the atoms contained in the methanol molecule: C, H, and O, and the corresponding chemical bonds between each atom. Then, for each atom, the node corresponding to the atom is determined. For each chemical bond, the edges between the nodes in the molecular graph are determined based on the nodes connected by the chemical bond.
[0067] S102: Input the molecular graph into a pre-trained graph neural network model to obtain several specified subgraphs of the molecular graph output by the graph neural network model, where the specified subgraphs correspond to substructures contained in the molecular structure of the molecule to be predicted.
[0068] In one or more embodiments provided in the present application, as described above, the server can determine the specified subgraph corresponding to the substructure contained in the molecular structure of the molecule to be predicted through a graph neural network model, so as to facilitate the subsequent prediction of the specified properties of the molecule to be predicted based on the specified properties of the specified subgraph.
[0069] Specifically, the server is provided with a pre-trained graph neural network model. The graph neural network model is used to determine a specified subgraph contained in a molecular graph corresponding to the molecule to be predicted. The specified subgraph corresponds to a substructure contained in the molecular structure of the molecule to be predicted. The specified subgraph is a subgraph corresponding to a substructure used to characterize the molecular properties of the molecule to be predicted.
[0070] Taking the NaOH molecule as an example, the substructure corresponding to its designated subgraph may be OH. Based on the designated properties of OH, the properties of the NaOH molecule can be predicted. Therefore, OH can be used as a substructure for characterizing the molecular properties of the NaOH molecule. The designated subgraph corresponding to OH can be the subgraph corresponding to the substructure for characterizing the molecular properties of the NaOH molecule.
[0071] Then, the server can input the molecular graph determined in step S100 into a pre-trained graph neural network model to obtain a plurality of specified subgraphs contained in the molecular graph output by the graph neural network model. Each specified subgraph corresponds to a substructure contained in the molecular structure of the molecule to be predicted.
[0072] S104: For each designated subgraph, a designated feature of the designated subgraph is determined, and a fusion feature is determined according to the designated feature and pre-stored representation features corresponding to each designated property.
[0073] In one or more embodiments provided in the present application, after determining the designated subgraph, the server can predict the molecular properties corresponding to the molecule to be predicted based on the designated properties of the substructure corresponding to the designated subgraph. In this process, if the designated features corresponding to the designated subgraph are directly classified to determine the designated properties of the substructure corresponding to the designated subgraph, it may be impossible to explain why the substructure has the designated properties. Therefore, the server can fuse the characterization features corresponding to the pre-stored designated properties and the designated features of the designated subgraph to obtain a fusion result, and determine the designated properties of the substructure corresponding to the designated subgraph based on the fusion result.
[0074] Specifically, the server pre-stores characterization vectors (i.e., characterization features) corresponding to each specified property. The specified property may be toxic, non-toxic, or water-soluble, slightly soluble, or insoluble. The specific type corresponding to the specified property can be set as needed, and this disclosure does not impose any restrictions on this.
[0075] At the same time, for each specified property, the corresponding characterization vector can be used to characterize the specified property. That is, the more similar the specified feature of a specified subgraph is to the characterization vector of the specified property, the higher the probability that the substructure corresponding to the specified subgraph has the specified property. The atoms contained in the specified subgraph and the chemical bonds between the atoms determine the specified feature corresponding to the specified subgraph.
[0076] Finally, the server may splice the pre-stored representation vectors corresponding to the respective specified properties with the specified features corresponding to the specified subgraph, and use the splicing result as the fusion feature.
[0077] S106: Inputting the fusion features into a classification model to obtain a target classification result output by the classification model, wherein the target classification result is used to characterize a specified property of the substructure corresponding to the specified subgraph.
[0078] In one or more embodiments provided in the present application, after determining the fusion feature, the server may classify the fusion feature through a classification model to determine the specified property of the substructure corresponding to the specified subgraph.
[0079] Specifically, a classification model is pre-set in the server, and the classification model is used to determine the specified properties of the substructure corresponding to the specified subgraph.
[0080] The server can then use the fused features as input to a pre-trained classification model, and obtain the target classification result corresponding to the specified subgraph output by the classification model. The target classification result is the specified property of the substructure corresponding to the specified subgraph. For example, if the specified property is toxic or non-toxic, the target classification result can be that the substructure corresponding to the specified subgraph is toxic, or that the substructure corresponding to the specified subgraph is non-toxic.
[0081] Of course, the target classification result can also be the probability that the substructure corresponding to the specified subgraph has each specified property. Similarly, taking the specified properties of toxicity and non-toxicity as an example, the target classification result can be that the probability of the substructure corresponding to the specified subgraph being toxic is 20%, the probability of being non-toxic is 80%, and so on. The specific form of the target classification result can be set as needed, and this disclosure does not impose any restrictions on this.
[0082] S108: Predicting the molecular properties of the molecule to be predicted according to the target classification results corresponding to the designated subgraphs.
[0083] In one or more embodiments provided herein, the prediction method is required to predict the molecular property of the molecule to be predicted based on a specified property of a specified subgraph. The molecular property can be the specified property of the molecule to be predicted or the probability that the molecule to be predicted has the specified property.
[0084] Specifically, for each designated subgraph, the server may determine a target classification result corresponding to the designated subgraph.
[0085] Then, for each specified property, the server may determine the number of specified subgraphs having the specified property as the specified number, and determine whether the specified number exceeds a preset ratio (eg, one-half) of the number of specified subgraphs included in the molecule to be predicted.
[0086] If so, the server may determine that the molecule to be predicted has the specified property.
[0087] If not, the server may determine that the molecule to be predicted does not have the specified property.
[0088] Furthermore, if a molecule contains a toxic substructure, the molecule is likely to be toxic. However, if the molecule contains three designated subgraphs, and only one of them corresponds to a toxic substructure, then the determined molecular properties of the predicted molecule may not include the designated property of "toxicity." To avoid this, the server can determine, for each designated property, whether the designated subgraphs of the predicted molecule contain a designated subgraph with that property.
[0089] If so, the server may determine that the molecule to be predicted has the specified property.
[0090] If not, the server may determine that the molecule to be predicted does not have the specified property.
[0091] Of course, the server may also determine, for each designated property, the probability that the molecule to be predicted has the designated property according to the probability that each designated subgraph contained in the molecule to be predicted has the designated property.
[0092] The server can then determine the molecular properties of the molecule to be predicted based on the determined specified properties of the molecule to be predicted, or the probabilities of the molecule to be predicted having each specified property. The server can directly use the probabilities of the molecule to be predicted having each specified property as the molecular properties of the molecule to be predicted, or it can use the specified properties whose probabilities exceed a predetermined specific probability as the molecular properties of the molecule to be predicted. The specific method for determining the molecular properties of the molecule to be predicted based on the target classification results corresponding to each specified subgraph can be configured as needed and is not limited in this disclosure.
[0093] Based on the prediction method shown in Figure 1, a graph neural network model is used to determine the designated subgraph corresponding to the substructure of the molecule to be predicted based on its molecular structure. The molecular properties of the molecule to be predicted are then predicted based on the designated properties of the designated subgraph. It can be seen that the molecule to be predicted possesses its designated molecular properties because it contains substructures with designated properties. Clearly, this prediction method provides explainability for the molecule to be predicted, ensuring the credibility of the prediction results.
[0094] Furthermore, for molecules, the chemical bonds they possess can generally affect the corresponding physical properties of the molecules. The prediction method provided in this application aims to determine a designated subgraph of a substructure that can be used to characterize the molecular properties of the molecule to be predicted, and then predict the molecular properties of the molecule to be predicted based on the designated properties of the designated subgraph. Based on the same idea, if the chemical bonds that can be used to characterize the molecular properties of the molecule to be predicted are determined, and then a designated subgraph is determined based on the determined chemical bonds, then the molecular properties of the molecule to be predicted can be determined based on the target classification results of the substructure corresponding to the designated subgraph.
[0095] Specifically, the server can use the molecular graph determined in step S100 as input to a pre-trained graph neural network model, and obtain the confidence scores corresponding to each chemical bond in the molecule to be predicted, as output by the graph neural network model. The graph neural network is used to determine a specific subgraph contained in the molecular graph corresponding to the molecule to be predicted. For each chemical bond, the confidence score corresponding to the chemical bond is used to represent the probability that the edge corresponding to the chemical bond belongs to the specified subgraph.
[0096] Then, the server may determine the designated edges belonging to the designated subgraph according to the determined confidence levels.
[0097] Finally, the server may determine a designated subgraph according to the determined designated edges and the nodes connecting the designated edges.
[0098] Furthermore, for each chemical bond, the properties of the bond can be characterized based on the properties of the atoms connecting the bond. Therefore, when determining the confidence level for each chemical bond, the server can also determine the bond characteristics corresponding to each chemical bond, and then determine the confidence level for the bond based on the bond characteristics.
[0099] Specifically, the server may determine the node features corresponding to each node in the molecular graph.
[0100] Therefore, for each chemical bond contained in the molecule to be predicted, the server may determine the two nodes connected by the edge corresponding to the chemical bond, and perform feature extraction on the two nodes respectively to determine the node features of the two nodes.
[0101] Then, the server may concatenate the node features of the two nodes as the bond features of the chemical bond.
[0102] Finally, the server can input the bond feature into a pre-trained graph neural network model to obtain the confidence of the chemical bond output by the graph neural network model.
[0103] Of course, the server can also extract features of the chemical bond, determine the initial features corresponding to the chemical bond, and then fuse the initial features corresponding to the chemical bond with the node features of the two nodes, and use the fusion result as the bond feature of the chemical bond.
[0104] Furthermore, in the present disclosure, for each atom in the molecular graph, the properties corresponding to that atom are affected not only by the atom itself but also by the other atoms connected to it. Therefore, when determining the node characteristics of the nodes corresponding to each atom, the characteristics of the node's neighboring nodes can also be used to determine the node characteristics.
[0105] Specifically, for each node and each edge included in the molecular graph, the server may perform feature extraction on the node and the edge to determine the initial features of the node and the initial features of the edge.
[0106] Then, for each node in the molecular graph, the server may determine the neighbor nodes of the node.
[0107] Finally, the server may determine the node characteristics of the node based on the initial characteristics of the node, the initial characteristics of the neighboring node, and the initial characteristics of the edge between the neighboring node and the node.
[0108] Of course, it should be noted that the server can also use the determined node features of the node as the initial features of the node, and continue to determine the node features of the node based on the initial features of the node and the initial features of its neighboring nodes based on the re-determined initial features of the node. This achieves the purpose of transferring the properties of each atom in the molecular graph along each chemical bond, further ensuring the accuracy of the confidence level of the chemical bond determined based on the node features of the node.
[0109] Furthermore, in this application, the purpose of determining the fusion feature is to determine the specified property of the specified feature based on the similarity between the specified feature and the pre-stored characterization features corresponding to each specified property. For each specified property, if the specified feature is enhanced based on the similarity between the characterization feature corresponding to the specified property and the specified feature, the accuracy of the target classification result determined based on the enhanced result will be higher. Based on this, the server can enhance the specified feature based on the characterization feature of the specified property.
[0110] Specifically, the server may determine, for each specified property, the enhanced feature of the specified subgraph corresponding to the specified property based on the similarity between the characterizing feature of the specified property and the specified feature of the specified subgraph, as well as the characterizing feature of the specified property.
[0111] After determining that each of the specified properties corresponds to the enhanced features of the specified subgraph, the server can fuse the specified features with the enhanced features of the specified subgraph to obtain a fused feature. Subsequently, a target classification result for the specified subgraph can be obtained based on the fused feature.
[0112] For each specified property, the characterizing feature of the specified property can be determined in the following manner:
[0113] For each specified property, the sample molecule graph corresponding to each sample molecule of the specified property is input into a pre-trained graph neural network model to obtain the specified subgraphs corresponding to each sample molecule of the specified property output by the graph neural network model, and then the characterization features of the specified property are determined based on the specified features corresponding to each specified subgraph.
[0114] Of course, the server can also select any sample molecule from the sample molecules corresponding to the specified property, input the molecular graph of the sample molecule into the pre-trained graph neural network model, obtain the specified subgraph corresponding to the sample molecule output by the graph neural network model, and then use the specified features of the specified subgraph as the characterization features of the specified property.
[0115] How to determine the characterization features corresponding to each specified property can be set according to needs, and this disclosure does not impose any restrictions on this.
[0116] Furthermore, for the molecule to be predicted, in addition to the substructures corresponding to the specified subgraphs, the molecular structure of the molecule to be predicted also contains other substructures, and the properties of these other substructures may also affect the properties of the molecule to be predicted. Therefore, the server may also use these other substructures as specific substructures and determine the properties of the molecule to be predicted based on these specific substructures.
[0117] Specifically, the server may determine, based on the molecular graph and the designated graphs, other substructures in the molecular structure of the molecule to be predicted except for the substructures corresponding to the designated subgraphs, as specific substructures.
[0118] Then, the server may determine the specific subgraph corresponding to the specific substructure and determine the specific features of the specific subgraph.
[0119] Then, the server may input the specific feature into the classification model to obtain a specific classification result output by the classification model.
[0120] Finally, the server can predict the molecular properties of the molecule to be predicted based on the specific classification result and the target classification results corresponding to each designated subgraph, as shown in Figure 3.
[0121] FIG3 is a flow chart of the prediction method provided by the present disclosure, wherein the server can input the molecular graph of the molecule to be predicted as input into the graph neural network model to obtain the specified subgraph and the specific subgraph output by the graph neural network model. The server can then fuse the specified features of the specified subgraph with the preset representation features of each specified property to obtain a fused feature, and then input the fused feature and the specific subgraph into the classification model respectively to obtain the target classification result corresponding to the fused feature output by the classification model, and the specific classification result corresponding to the specific subgraph. Finally, the server can determine the prediction result based on the specific classification result and the target classification result, which is the molecular property of the molecule to be predicted.
[0122] In addition, the graph neural network model and the classification model in this disclosure can be trained in the following manner:
[0123] Specifically, the server may obtain several sample molecules labeled with specified properties. For each sample molecule labeled with the specified properties, the server may create a sample molecule graph with atoms as nodes and chemical bonds as edges, based on the atoms contained in the sample molecule and the chemical bonds between the atoms, as a training sample. The server may also use the specified properties as labels for the training sample.
[0124] Secondly, the server can input each training sample into the graph neural network model to be trained, and obtain the sample-specified subgraph corresponding to each training sample output by the graph neural network model.
[0125] Next, the server may determine the sample features corresponding to the designated subgraphs of each sample, and determine the characterization features of each designated property according to the sample features and the labels corresponding to the training samples.
[0126] Then, the server can determine the fusion features corresponding to each training sample according to the features of each sample and the characterization features of each specified property.
[0127] Afterwards, the server can input each fusion feature into the classification model to be trained to obtain the sample classification result output by the classification model.
[0128] Therefore, the server may determine the sample properties corresponding to each training sample according to the sample classification results of the sample designated subgraphs corresponding to each training sample.
[0129] Finally, the server can determine the loss based on the sample properties and labels corresponding to each training sample, and train the graph neural network model and the classification model with the goal of minimizing the loss.
[0130] Furthermore, the graph neural network in the present disclosure can also be trained in the following way:
[0131] Specifically, the server can obtain several sample molecules that have been labeled with specified properties. For each sample molecule labeled with specified properties, based on the atoms contained in the sample molecule and the chemical bonds between the atoms, a sample molecule graph is established with atoms as nodes and chemical bonds as edges as training samples.
[0132] Secondly, the server may determine, for each training sample, a designated subgraph included in the training sample as a target sample subgraph of the training sample.
[0133] Then, the server can input each training sample into the graph neural network model to be trained, and obtain the sample specified subgraph corresponding to each training sample output by the graph neural network model.
[0134] Finally, the server can determine the loss of the graph neural network model based on the sample designated subgraph and the target sample subgraph corresponding to each training sample, and adjust the model parameters of the graph neural network model with the minimum loss as the optimization goal.
[0135] Based on the same idea, the present disclosure also provides a prediction device, as shown in FIG4 .
[0136] FIG4 is a prediction device provided by the present disclosure, wherein:
[0137] The first determination module 200 is configured to establish a molecular graph with atoms as nodes and chemical bonds as edges based on the obtained atoms contained in the molecule to be predicted and the chemical bonds between the atoms.
[0138] The second determination module 202 is used to input the molecular graph into a pre-trained graph neural network model to obtain several specified subgraphs of the molecular graph output by the graph neural network model, where the specified subgraphs correspond to substructures contained in the molecular structure of the molecule to be predicted.
[0139] The fusion module 204 is configured to determine, for each designated subgraph, a designated feature of the designated subgraph, and determine a fusion feature based on the designated feature and pre-stored representation features corresponding to each designated property.
[0140] The classification module 206 is used to input the fusion features into a classification model to obtain a target classification result output by the classification model, where the target classification result is used to characterize the specified properties of the substructure corresponding to the specified subgraph.
[0141] The prediction module 208 is configured to predict the molecular properties of the molecule to be predicted based on the target classification results corresponding to the designated subgraphs.
[0142] Optionally, the first determination module 200 is used to input the molecular graph into a pre-trained graph neural network model to obtain the confidence corresponding to each chemical bond in the molecule to be predicted output by the graph neural network model, and the confidence is used to characterize the probability that the edge corresponding to the chemical bond belongs to a specified subgraph. According to each confidence, each specified edge belonging to the specified subgraph is determined, and the specified subgraph is determined based on each specified edge and the nodes connecting the each specified edge.
[0143] Optionally, the first determination module 200 is used to determine the node features corresponding to each node in the molecular graph, and for each chemical bond contained in the molecule to be predicted, determine the bond features of the chemical bond based on the node features of the nodes connected by the edges corresponding to the chemical bond, and input the bond features into a pre-trained graph neural network model to obtain the confidence of the chemical bond output by the graph neural network model.
[0144] Optionally, the first determination module 200 is used to extract features from each node and each edge contained in the molecular graph, determine the initial features corresponding to each node and the initial features corresponding to each edge, determine the neighbor nodes of each node in the molecular graph, and determine the node features of the node based on the initial features of the node, the initial features of the neighbor nodes, and the initial features of the edges between the neighbor nodes and the node.
[0145] Optionally, the fusion module 204 is used to determine, for each specified property, the enhanced feature of the specified property corresponding to the specified sub-graph based on the similarity between the specified feature and the characterization feature of the specified property, as well as the characterization feature of the specified property, and fuse the specified feature and the enhanced features of the specified sub-graph corresponding to each specified property to obtain a fused feature.
[0146] Optionally, the prediction module 208 is used to determine, based on the molecular graph and each designated subgraph, other substructures in the molecular structure of the molecule to be predicted except for the substructures corresponding to each designated subgraph as specific substructures, determine the specific subgraph corresponding to the specific substructure, and determine specific features of the specific subgraph, input the specific features into the classification model to obtain a specific classification result output by the classification model, and predict the molecular properties of the molecule to be predicted based on the specific classification result and the target classification results corresponding to each designated subgraph.
[0147] The device further comprises:
[0148] The training module 210 is used to train the graph neural network model and the classification model in the following manner: for each sample molecule that has been labeled with a specified property, a sample molecular graph with atoms as nodes and chemical bonds as edges is established as a training sample based on the atoms contained in the sample molecule and the chemical bonds between the atoms, and the specified property is used as the label of the training sample. Each training sample is input into the graph neural network model to be trained to obtain a sample specified subgraph corresponding to each training sample output by the graph neural network model, determine the sample features corresponding to each sample specified subgraph, and determine the characterization features of each specified property based on each sample feature and the label corresponding to each training sample. Based on each sample feature and the characterization features of each specified property, determine the fusion features corresponding to each training sample. Input each fusion feature into the classification model to be trained to obtain a sample classification result output by the classification model. Based on the sample classification result of the sample specified subgraph corresponding to each training sample, determine the sample properties corresponding to each training sample. Based on the sample properties corresponding to each training sample and their labeling, the graph neural network model and the classification model are trained.
[0149] The present disclosure also provides a computer-readable storage medium, which stores a computer program. The computer program can be used to execute the prediction method provided in FIG. 1 .
[0150] The present disclosure also provides a schematic structural diagram of an electronic device as shown in FIG5 . As shown in FIG5 , at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the prediction method described in FIG1 above. Of course, in addition to software implementation, the present disclosure does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0151] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0152] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the means for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as both a software module implementing the method and a structure within the hardware component.
[0153] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0154] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0155] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0156] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable lesion detection device to produce a machine, so that the instructions executed by the processor of the computer or other programmable lesion detection device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0157] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable lesion detection device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0158] These computer program instructions may also be loaded onto a computer or other programmable lesion detection device so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0159] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0160] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0161] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0162] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0163] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0164] The present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present disclosure may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0165] The various embodiments of this disclosure are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so their description is relatively simple. For relevant portions, refer to the description of the method embodiments.
[0166] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.
Claims
1. A prediction method, characterized in that: The method comprises: According to the obtained atoms contained in the molecule to be predicted and the chemical bonds between the atoms, a molecular graph is established with the atoms as nodes and the chemical bonds as edges; Inputting the molecular graph into a pre-trained graph neural network model to obtain a plurality of specified subgraphs of the molecular graph output by the graph neural network model, wherein the specified subgraphs correspond to substructures contained in the molecular structure of the molecule to be predicted; For each designated sub-graph, a designated feature of the designated sub-graph is determined, and a fusion feature is determined according to the designated feature and the representation features corresponding to the pre-stored designated properties; Inputting the fusion feature into a classification model to obtain a target classification result output by the classification model, wherein the target classification result is used to characterize a specified property of a substructure corresponding to the specified subgraph; The molecular properties of the molecules to be predicted are predicted according to the target classification results corresponding to the designated subgraphs.
2. The method according to claim 1, characterized in that The molecular graph is input into a pre-trained graph neural network model to obtain several specified subgraphs of the molecular graph output by the graph neural network model, specifically including: Inputting the molecular graph into a pre-trained graph neural network model, obtaining the confidence corresponding to each chemical bond in the molecule to be predicted output by the graph neural network model, wherein the confidence is used to characterize the probability that the edge corresponding to each chemical bond belongs to a specified subgraph; According to the confidences, the designated edges belonging to the designated subgraph are determined, and according to the designated edges and the nodes connected by the designated edges, the designated subgraph is determined.
3. The method according to claim 2, characterized in that Inputting the molecular graph into a pre-trained graph neural network model to obtain the confidence corresponding to each chemical bond in the molecule to be predicted output by the graph neural network model, specifically includes: Determine the node features corresponding to each node in the molecular graph; For each chemical bond contained in the molecule to be predicted, determining the bond feature of the chemical bond according to the node features of the nodes connected by the edge corresponding to the chemical bond; The bond feature is input into the pre-trained graph neural network model to obtain the confidence of the chemical bond output by the graph neural network model.
4. The method according to claim 3, characterized in that Determining the node features corresponding to each node in the molecular graph specifically includes: Extracting features from each node and each edge in the molecular graph to determine initial features corresponding to each node and initial features corresponding to each edge; For each node in the molecular graph, the neighbor nodes of the node are determined, and the node features of the node are determined according to the initial features of the node, the initial features of the neighbor nodes, and the initial features of the edges between the neighbor nodes and the node.
5. The method according to claim 1, characterized in that Determining the fusion feature according to the designated feature and the representation features corresponding to the pre-stored designated properties, specifically includes: For each designated property, determining, according to the similarity between the designated feature and the characterizing feature of the designated property, and the characterizing feature of the designated property, an enhanced feature of the designated property corresponding to the designated subgraph; The designated feature and the enhanced features of each designated property corresponding to the designated sub-graph are fused to obtain the fused feature.
6. The method according to claim 1, characterized in that According to the target classification results corresponding to each designated subgraph, the molecular properties of the molecule to be predicted are predicted, specifically including: According to the molecular graph and the designated subgraphs, determining other substructures in the molecular structure of the molecule to be predicted except for the substructures corresponding to the designated subgraphs as specific substructures; Determining a specific subgraph corresponding to the specific substructure, and determining specific features of the specific subgraph; Inputting the specific feature into the classification model to obtain a specific classification result output by the classification model; The molecular properties of the molecule to be predicted are predicted according to the specific classification results and the target classification results respectively corresponding to the designated subgraphs.
7. The method according to claim 1, characterized in that The graph neural network model and the classification model are trained in the following manner: For each sample molecule that has been labeled with a specified property, a sample molecule graph is established with each atom as a node and each chemical bond as an edge according to each atom contained in the sample molecule and each chemical bond between the atoms, as a training sample, and the specified property is used as a label for the training sample; Input each training sample into the graph neural network model to be trained, and obtain a number of sample-specified subgraphs corresponding to each training sample output by the graph neural network model to be trained; Determine the sample features corresponding to the designated subgraphs of each sample, and determine the characterization features of each designated property according to the sample features and the labels corresponding to the training samples; Determine, according to the features of each sample and the characterization features of each specified property, the fusion features corresponding to each training sample; Inputting each fusion feature into the classification model to be trained to obtain a sample classification result output by the classification model to be trained; Determine the sample properties corresponding to each training sample according to the sample classification results of the sample designated subgraphs corresponding to each training sample; The graph neural network model and the classification model are trained according to the sample properties and annotations corresponding to each training sample.
8. A prediction device, characterized in that: The device comprises: A first determination module is used to establish a molecular graph with each atom as a node and each chemical bond as an edge according to each atom contained in the acquired molecule to be predicted and each chemical bond between the atoms; A second determination module is used to input the molecular graph into a pre-trained graph neural network model to obtain a plurality of specified subgraphs of the molecular graph output by the graph neural network model, wherein the specified subgraphs correspond to substructures contained in the molecular structure of the molecule to be predicted; A fusion module, used for determining, for each specified sub-graph, a specified feature of the specified sub-graph, and determining a fusion feature according to the specified feature and the representation features corresponding to the pre-stored specified properties; A classification module, used for inputting the fusion feature into a classification model to obtain a target classification result output by the classification model, wherein the target classification result is used to characterize a specified property of a substructure corresponding to the specified subgraph; The prediction module is used to predict the molecular properties of the molecule to be predicted according to the target classification results corresponding to each designated subgraph.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Drug small molecule property prediction method, device and equipment based on graph neural network
CN113707236A
Drug molecule property prediction and classification method and system
CN114530211A
Molecular property prediction method and device, storage medium and electronic equipment
CN114842920A
Molecular property prediction model based on multi-scale map convolution
CN115019899A
Graph neural network-based interpretable molecular property prediction method and system
CN115798629A
Cited By
Gas molecule insulation strength prediction method and device based on graph attention neural network, terminal equipment and storage medium
CN119626349A
