A molecular property prediction method based on a chemical element knowledge graph and a functional group prompt
By constructing a chemical element knowledge graph and using functional group prompts, molecular graph representation is enhanced and model knowledge is evoked. This solves the problems of the inapplicability of graph enhancement methods and pre-training discrepancies in molecular property prediction, and achieves higher accuracy in molecular property prediction.
Patent Information
- Application Number
- CN202211175637.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-09-26
AI Technical Summary
In molecular property prediction, existing technologies are not suitable for graph enhancement methods and fail to fully explore atomic relationships in molecular graphs. The pre-training and downstream tasks differ greatly, and there is a lack of effective prompting mechanisms, resulting in insufficient accuracy in molecular property prediction.
We construct a knowledge graph of chemical elements, enhance molecular graphs through comparative learning, and utilize functional group cues to evoke model knowledge during the fine-tuning stage. By combining the knowledge graph with a self-attention mechanism, we improve the accuracy of molecular property prediction.
It provides a description of the relationship between chemical elements and functional groups, and molecular enhancement maps that go beyond structural relationships, bridging the gap between pre-training and downstream tasks, and improving the accuracy of molecular property prediction.
Smart Images

Figure CN115762657B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of molecular property prediction, specifically relating to a method for predicting molecular properties based on chemical element knowledge graphs and functional group hints. Background Technology
[0002] Molecular property prediction has become a core task in computational chemistry and drug discovery. The chemical properties worthy of study span multiple molecular scales, from microscopic electronic properties to macroscopic effects on the human body. Taking drug discovery as an example, the complete process includes drug development, clinical trials, regulatory review, and market approval. However, the entire process is extremely time-consuming and expensive, and the success rate of clinical trials for candidate compounds is extremely low. Therefore, researchers face the pressure of effectively selecting promising drug candidates from a large number of compounds.
[0003] With the help of artificial intelligence, deep learning models can predict the success rate and therapeutic potential of compounds in clinical trials, and can even directly assess whether a compound can be approved for market, significantly accelerating this process.
[0004] Thanks to the increasing availability of chemical data, numerous studies have begun pre-training encoders on large-scale unlabeled molecular data, then fine-tuning the pre-trained encoder model using a limited number of labeled molecules for molecular property prediction tasks. As a lightweight pre-training modality, graph contrastive learning offers lower computational costs and simpler pre-training tasks, making it a popular approach in compositional molecular research.
[0005] However, the structure and semantics of graphs vary greatly across different domains. The unique characteristics of molecular graphs render graph enhancement methods in contrastive learning unsuitable, as deleting or adding chemical bonds or atoms can drastically alter the identity and properties of a molecule.
[0006] Furthermore, the relationships between atoms of the same element type in the molecular diagram have not been fully explored.
[0007] Another issue is the significant difference between the contrast task during pre-training and the downstream molecular property prediction task. This necessitates providing the pre-trained model with a cue to recall the knowledge it learned during pre-training that is relevant to the downstream task. Cue-based fine-tuning, as an emerging paradigm, has achieved excellent performance on many natural language processing tasks. From manually designing cue templates to using learnable prefixes as cues, cueing techniques for pre-trained language models have continuously evolved, but their application in graph learning remains largely unexplored.
[0008] Therefore, there is an urgent need to design a new method for predicting molecular properties to solve the above-mentioned problems in existing technologies. Summary of the Invention
[0009] In view of the above, the purpose of this invention is to provide a molecular property prediction method based on chemical element knowledge graph and functional group hints. By integrating the elemental knowledge and functional group knowledge of the chemical element knowledge graph into the pre-training and fine-tuning stages of molecular representation learning, the accuracy of molecular property prediction is improved.
[0010] To achieve the above-mentioned objectives, this embodiment provides a method for predicting molecular properties based on chemical element knowledge graphs and functional group hints, comprising the following steps:
[0011] Knowledge graph construction phase: Collect chemical knowledge including chemical elements and their chemical properties, functional groups and their chemical properties, and construct a chemical element knowledge graph based on the chemical knowledge;
[0012] Pre-training phase: The original molecular graph is enhanced based on the chemical element knowledge in the chemical element knowledge graph. By establishing connections between chemical elements, the connections between atoms with the same chemical element are strengthened to obtain the enhanced molecular graph. The graph encoder is pre-trained based on the original molecular graph and the enhanced molecular graph through comparative learning.
[0013] Fine-tuning stage: Functional group hints are constructed based on functional group knowledge in the chemical element knowledge graph and added to the input molecular graph. The pre-trained graph encoder and nonlinear predictor are then fine-tuned using the input molecular graph with added functional group hints. The fine-tuned graph encoder and nonlinear predictor together form a molecular property prediction model.
[0014] Application phase: Predicting molecular properties using molecular property prediction models.
[0015] Preferably, the chemical knowledge graph constructed based on chemical knowledge depicts the hierarchical relationships, instance relationships, data attributes, and object attributes between chemical elements and functional groups, specifically including the following four different types of triples:
[0016] The first type is the class hierarchy triple (subclass, is subclass, parent class), where the head entity is the subclass and the tail entity is the parent class, which describes the containment relationship between the parent class and the subclass.
[0017] The second type is the instance relation triple (instance, is instance, class), where the head entity is the instance and the tail entity is the class, indicating that the instance is an individual within the class;
[0018] The third type is the data attribute triple (instance, relation, chemical attribute), where the head entity is the instance, and the tail entity is numerical or textual data that records the chemical attribute of the instance.
[0019] The fourth type is the object attribute triple (instance, relation, instance), where the head entity and the tail entity are both instances, describing the relationship between the instances;
[0020] An instance is an instance of a chemical element or a functional group, and a class represents a type of chemical element or a type of functional group.
[0021] Preferably, the enhancement of the original molecular graph guided by chemical elements in the chemical element knowledge graph includes:
[0022] First, the chemical elements that make up the original molecular graph are determined, and chemical element entities and object attributes between chemical element entities are found in the chemical element knowledge graph. Thus, an element subgraph describing the relationships between chemical elements is constructed. In the element subgraph, nodes are chemical elements, and edges are object attributes between chemical element entities. When there are multiple object attributes between two chemical element entities, only one edge is added between the corresponding two chemical element nodes in the element subgraph to summarize them.
[0023] Then, the chemical element nodes in the element subgraph are connected to the corresponding atomic nodes of the chemical element category in the original molecular graph to obtain the molecular enhancement graph corresponding to the original molecular graph.
[0024] Preferably, the step of pre-training the graph encoder based on the original molecular map and the enhanced molecular map through contrastive learning includes:
[0025] A training batch consists of 2N molecular images, including N original molecular images. and the corresponding N molecular enhancement maps The original molecular diagram G i With corresponding molecular enhancement diagram Constitute positive sample pairs The original molecular diagram G i It is a negative sample pair with 2N-1 molecular maps in the same batch, i.e. (G i G j ) j≠i and All of them constitute negative sample pairs, where i and j represent graph indices and N represents the number of molecular graphs;
[0026] Molecular representations of N original molecular graphs and N enhanced molecular graphs are obtained by encoding using a graph encoder. and And and By mapping to the same latent representation space through the mapping head, embedding vectors are obtained. and
[0027] Based on the embedding vector in the representation space and A contrastive loss is constructed by maximizing the consistency between positive sample pairs and minimizing the consistency between negative sample pairs, and this contrastive loss is used to optimize the parameters of the graph encoder.
[0028] Preferably, the graph encoder is a graph coding model built based on graph neural networks, including message passing neural networks, directed message passing neural networks, and communication message passing neural networks;
[0029] The mapping head includes a two-layer perceptron, which is used to map the molecular representations of the original molecular map and the molecular enhancement map to the same latent representation space to calculate the contrast loss.
[0030] Preferably, the step of constructing functional group hints based on functional group knowledge in the chemical element knowledge graph and adding the functional group hints to the input molecular graph includes:
[0031] First, determine the functional groups contained in the input molecular graph, find the corresponding functional group entities in the chemical element knowledge graph, and obtain the functional group entity vectors using the knowledge graph embedding model.
[0032] Then, a virtual functional group vector is constructed, and the attention information between the virtual functional group vector and the functional group entity vector is calculated using a self-attention mechanism. The virtual functional group vector considering the attention information is then used as the functional group cue vector.
[0033] Finally, the atomic vectors of the input molecular graph are obtained using a knowledge graph embedding model, and functional group cue vectors are added to each atomic vector of the input molecular graph to update the atomic vectors of the input molecular graph.
[0034] Preferably, the knowledge graph embedding model includes the OWL ontology embedding model, the relation rotation knowledge graph embedding model, and the flipped entity embedding model.
[0035] Preferably, determining the functional cue vector based on the attention mechanism includes:
[0036] First, the query Q, key K, and value vector V are obtained by mapping all functional group vectors X, which are composed of virtual functional group vectors and functional group entity vectors, through three mapping matrices.
[0037] Then, based on the self-attention information obtained by multiplying the attention between the query and the key by the value vector, the faculty clique vector X′ considering the attention information is:
[0038]
[0039] Finally, the vector corresponding to the virtual functional group is extracted from the functional group vector X′ as the functional group cue vector.
[0040] Preferably, the step of adding functional group cue vectors to each atom vector of the input molecular graph to update the atom vectors of the input molecular graph includes:
[0041] For any atom v in the input molecular diagram, the functional group hint vector x is... prompt Add to atomic vector x v :
[0042] x v ′=x v +α·x prompt
[0043] Where α is a learnable scale variable, x v ′ represents the new atom representation of atom v.
[0044] Preferably, the predicted molecular properties include electrochemical properties, electronic spectra and excited state energies, thermodynamic properties, water solubility, water and free energy, inhibition, permeability, toxicity, and adverse reactions;
[0045] When using a molecular property prediction model to predict molecular properties, the following steps are included:
[0046] Based on the functional group knowledge in the chemical element knowledge graph, construct functional group hints for the input molecular graph to be predicted, and add the functional group hints to the input molecular graph;
[0047] Input the molecular diagram with added functional group hints into the molecular property prediction model, and output the predicted molecular properties after calculation.
[0048] Compared with the prior art, the beneficial effects of the present invention include at least the following:
[0049] (1) The constructed chemical element knowledge graph provides an overall view of chemical elements, describing the class hierarchy, instance relationship, data attributes and object attributes of chemical elements and functional groups.
[0050] (2) In the comparative learning pre-training stage, unlike existing graph enhancement methods that may destroy the chemical meaning of molecules, this invention uses a chemical element knowledge graph to guide the original molecular graph to perform graph enhancement, thereby uncovering various relationships between chemical elements and the connections between atoms with the same chemical element type but not directly connected by chemical bonds. The resulting molecular enhancement graph does not violate the chemical semantics of molecules and establishes deep relationships between atoms that go beyond structure.
[0051] (3) This invention utilizes functional group cues to bridge the gap between the pre-training comparison task and the downstream molecular property prediction task. Functional groups are sets of atoms bound together in a specific pattern, which to some extent determine the properties of the molecules they compose. Therefore, in the fine-tuning stage, functional group cues extracted from the functional group knowledge in the chemical element knowledge graph are used to evoke the functional group-related knowledge learned by the model in the pre-training stage, thereby improving the accuracy of molecular property prediction. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 A flowchart illustrating the molecular property prediction method based on chemical element knowledge graphs and functional group hints provided in this embodiment of the invention;
[0054] Figure 2 This is a schematic diagram of a chemical element knowledge graph provided for an embodiment of the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of this invention.
[0056] Figure 1 This is a flowchart of a molecular property prediction method based on chemical element knowledge graphs and functional group hints provided in an embodiment of the present invention. Figure 1 As shown in the embodiment, the molecular property prediction method based on chemical element knowledge graphs and functional group hints includes the following steps:
[0057] Step 1, Knowledge Graph Construction Stage: Collect chemical knowledge including chemical elements and their chemical properties, functional groups and their chemical properties, and construct a chemical element knowledge graph based on the chemical knowledge.
[0058] In this embodiment, all chemical elements and representative functional groups, along with their chemical properties, are collected from the periodic table and Wikipedia. The chemical elements and functional groups are then categorized by system. Using this collected chemical knowledge, a chemical element knowledge graph is constructed to depict the hierarchical relationships, instance relationships, data attributes, and object attributes between chemical elements and functional groups. Specifically, this includes the following four different types of triples:
[0059] The first type is the class hierarchy triple (subclass, is subclass, parentclass), where the head entity is the subclass and the tail entity is the parent class, depicting the containment relationship between the parent and subclasses. The second type is the instance relation triple (instance, is instance, class), where the head entity is the instance and the tail entity is the class, indicating that the instance is an individual within the class. The third type is the data attribute triple (instance, relation, chemical attribute), where the head entity is the instance and the tail entity is numeric or textual data, recording the chemical attribute of the instance. The fourth type is the object attribute triple (instance, relation, instance), where both the head and tail entities are instances, describing the relationship between instances; the instance is a chemical element instance or functional group instance, and the class represents the chemical element type or functional group type.
[0060] Figure 2 This is a schematic diagram of a chemical element knowledge graph provided in an embodiment of the present invention. Figure 2 As shown, the construction process of the chemical element knowledge graph is as follows:
[0061] First, we organize and classify the collected knowledge of chemical elements and functional groups, extracting hierarchical relationships as the backbone of the chemical element knowledge graph. For example, ternary groups (active nonmetals, are subclasses, nonmetals) and ternary groups (esters, are subclasses, oxygen-containing functional groups) respectively indicate that active nonmetals are subclasses of nonmetals, and esters are subclasses of oxygen-containing functional groups.
[0062] Next, based on the class hierarchy, corresponding instances are assigned to each class. For example, the ternary group (carbon, is an instance, reactive nonmetal) and the ternary group (carboxyl group, is an instance, carboxylic acid) represent instances of the chemical element carbon (reactive nonmetal) and the functional group carboxyl group (carboxylic acid), respectively.
[0063] Then, based on the collected list of chemical attributes, corresponding chemical attributes are added to each instance through data attributes. For example, the ternary set (carbon, atomic number, 6) and the ternary set (carboxyl group, bond type, double bond) respectively indicate that the atomic number of the chemical element carbon is 6 and the side type of the functional group carboxyl group contains a double bond.
[0064] Finally, relationships between instances are established using object properties. For example, the ternary pair (carbon, second period, oxygen) and the ternary pair (oxygen, composition, carboxyl group) respectively indicate that the chemical elements carbon and oxygen are both located in the second period, and that the chemical element oxygen is a constituent element of the functional group carboxyl group.
[0065] Step 2, Pre-training stage: Based on the chemical element knowledge in the chemical element knowledge graph, the original molecular graph is enhanced to obtain the molecular enhanced graph; based on the original molecular graph and the molecular enhanced graph, the graph encoder is pre-trained through comparative learning.
[0066] In this embodiment, the enhancement of the original molecular diagram is guided by chemical elements in the chemical element knowledge graph. This is achieved by establishing connections between chemical elements and strengthening the relationships between atoms of the same chemical element type. Specifically, this includes:
[0067] First, the chemical elements that make up the original molecular graph are determined, and chemical element entities and object attributes between chemical element entities are found in the chemical element knowledge graph. Thus, an element subgraph describing the relationships between chemical elements is constructed. In the element subgraph, nodes are chemical elements and edges are object attributes between chemical element entities. It is worth noting that when there are multiple object attributes between two chemical element entities, only one edge is added between the corresponding two chemical element nodes in the element subgraph to summarize them.
[0068] Then, the chemical element nodes in the element subgraph are connected to the corresponding atomic nodes of the chemical element category in the original molecular graph to obtain the molecular enhancement graph corresponding to the original molecular graph.
[0069] In this embodiment, a graph encoder is pre-trained using a contrastive learning approach based on the original molecular map and the enhanced molecular map, including:
[0070] A training batch consists of 2N molecular images, including N original molecular images. and the corresponding N molecular enhancement maps The original molecular diagram G i With corresponding molecular enhancement diagram Constitute positive sample pairs The original molecular diagram G i It is a negative sample pair with 2N-1 molecular maps in the same batch (G i G j ) j≠i and Where i and j represent graph indices, and N represents the number of molecular graphs;
[0071] Molecular representations of N original molecular graphs and N enhanced molecular graphs are calculated using a graph encoder. and And and By mapping to the same latent representation space through the mapping head, embedding vectors are obtained. and
[0072] Based on the embedding vector in the representation space and A contrastive loss is constructed by maximizing the consistency between positive sample pairs and minimizing the consistency between negative sample pairs, and this contrastive loss is used to optimize the parameters of the graph encoder.
[0073] Specifically, the comparative loss is:
[0074]
[0075] in, Let be the indicator function, which is equal to 1 when k≠i and 0 otherwise. Let represent the temperature hyperparameter, z be the embedding representation of the graph in the latent representation space, and sim() represent the similarity. The contrastive loss is used to optimize the parameters of the graph encoder.
[0076] In this embodiment, the graph encoder is a graph coding model built based on graph neural networks, including a message-passing neural network (MPNN), a directed message-passing neural network (DMPNN), and a communicative message-passing neural network (CMPNN). Preferably, a CMPNN can be selected to obtain the graph representation of the molecular graph and its corresponding molecular enhancement graph. The mapping head includes a two-layer perceptron, which is used to map the molecular representations of the original molecular graph and the molecular enhancement graph to the same latent representation space to calculate the contrastive loss.
[0077] It should be noted that the original molecular graph is a large-scale unlabeled molecular data. The graph encoder is pre-trained using contrastive learning on the large-scale unlabeled molecular data, which makes the graph encoder more universal when calculating the representation vector.
[0078] Step 3, Fine-tuning stage: Construct functional group hints based on functional group knowledge in the chemical element knowledge graph, and add these hints to the input molecular graph. Use the input molecular graph with added functional group hints to fine-tune the pre-trained graph encoder and nonlinear predictor. The fine-tuned graph encoder and nonlinear predictor together form a molecular property prediction model.
[0079] In this embodiment, a functional group hint is constructed based on functional group knowledge in the chemical element knowledge graph, and the functional group hint is added to the input molecular graph, including:
[0080] (a) Determine the functional groups contained in the input molecular graph, find the functional group entities in the chemical element knowledge graph, and obtain the functional group entity vectors using the knowledge graph embedding model.
[0081] (b) Constructing a virtual functional group vector, calculating the attention information between the virtual functional group vector and the functional group entity vector using a self-attention mechanism, and using the virtual functional group vector considering the attention information as the functional group cue vector, specifically including:
[0082] First, connect the virtual functional group vector x0 with the functional group entity vectors x0, x1, x2, ..., x m The vector X = {x0, x1, x2, ..., x} is composed of all functional groups. m The query Q, key K, and value vector V are obtained through mapping using three mapping matrices.
[0083] Q = XW Q K = XW K V = XW V
[0084] Then, based on the self-attention information obtained by multiplying the attention between query Q and key K by the value vector V, the functional clique vector X′ considering the attention information is:
[0085]
[0086] Finally, the vector corresponding to the virtual functional group is extracted from the functional group vector X′ as the functional group cue vector x. prompt =X′[:,0].
[0087] (c) Obtain the atomic vectors of the input molecular graph using a knowledge graph embedding model, and add functional group cue vectors to each atomic vector of the input molecular graph to update the atomic vectors of the input molecular graph, specifically including:
[0088] For any atom v in the input molecular diagram, the functional group hint vector x is... prompt Add to atomic vector x v :
[0089] x v ′=x v +α·x prompt
[0090] Where α is a learnable scale variable, x v ′ represents the new atom representation of atom v. Adding...
[0091] In the embodiments, the knowledge graph embedding models for obtaining the atomic vectors and functional group entity vectors of the input molecular graph include the OWL Ontologies Embedding model (OWL2Vec*), the Knowledge Graph Embedding by Relational Rotation in Complex Space (RotatE), and the Translating Embeddings for Modeling Multi-relationalData (TransE).
[0092] When fine-tuning a pre-trained graph encoder and nonlinear predictor using an input molecular graph with added functional group hints, the input molecular graph with functional group hint vectors is input to the pre-trained graph encoder. After calculation, the molecular representation of the molecular graph is obtained, and this molecular representation is input to the nonlinear predictor to calculate and output the predicted molecular properties. The predicted molecular properties and the molecular property labels of the input molecular graph are used to construct a supervised loss function to optimize the parameters of the pre-trained graph encoder and nonlinear predictor, thus achieving fine-tuning. After fine-tuning, the fine-tuned graph encoder and nonlinear predictor form a molecular property prediction model.
[0093] It should be noted that the input molecular graph is downstream small-scale labeled molecular data. In the fine-tuning stage, functional group cues are constructed using functional group knowledge in the chemical element knowledge graph to stimulate the model to recall the functional group-related knowledge it learned in the pre-training stage. At the same time, the graph encoder and nonlinear predictor are fine-tuned using small-scale labeled molecular data to make the constructed molecular property prediction model more suitable for downstream specific molecular property prediction tasks.
[0094] Step 4, Application Stage: Predict molecular properties using molecular property prediction models.
[0095] In this embodiment, when using a molecular property prediction model to predict molecular properties, the following steps are included:
[0096] Based on the functional group knowledge in the chemical element knowledge graph, functional group hints are constructed for the input molecular graph to be predicted, and these hints are added to the input molecular graph. The input molecular graph with added functional group hints is then input into the molecular property prediction model, and the predicted molecular properties are output after calculation.
[0097] The molecular property prediction method based on chemical element knowledge graphs and functional group hints provided in the above embodiments is divided into four levels according to the molecular scale, from fine-grained to coarse-grained: quantum chemistry describes the most microscopic electrochemical properties; physical chemistry analyzes the chemical behavior principles and laws of materials from a physics perspective; biophysics uses physical methods to study biological phenomena; and physiology focuses on macroscopic life systems. The corresponding molecular properties include: electrochemical properties, electronic spectra and excited-state energies, thermodynamic properties, water solubility, water and free energy, inhibition, permeability, toxicity, and adverse reactions.
[0098] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting molecular properties based on chemical element knowledge graphs and functional group cues, characterized in that, Includes the following steps: Knowledge graph construction phase: Collect chemical knowledge including chemical elements and their chemical properties, functional groups and their chemical properties, and construct a chemical element knowledge graph based on the chemical knowledge; Pre-training phase: The original molecular graph is enhanced based on the chemical element knowledge in the chemical element knowledge graph. By establishing connections between chemical elements, the connections between atoms with the same chemical element are strengthened to obtain the enhanced molecular graph. The graph encoder is pre-trained based on the original molecular graph and the enhanced molecular graph through comparative learning. The enhancement of the original molecular graph based on chemical elements in the chemical element knowledge graph includes: First, determining the constituent chemical elements of the original molecular graph and finding chemical element entities and object attributes between them in the chemical element knowledge graph. This constructs an element subgraph describing the relationships between chemical elements. In the element subgraph, nodes are chemical elements, and edges are object attributes between chemical element entities. When two chemical element entities have multiple object attributes, only one edge is added between the corresponding two chemical element nodes in the element subgraph to summarize them. Then, the chemical element nodes in the element subgraph are connected to the corresponding atomic nodes of the chemical element category in the original molecular graph to obtain the molecular enhancement graph corresponding to the original molecular graph. Fine-tuning stage: Functional group hints are constructed based on functional group knowledge in the chemical element knowledge graph and added to the input molecular graph. The pre-trained graph encoder and nonlinear predictor are then fine-tuned using the input molecular graph with added functional group hints. The fine-tuned graph encoder and nonlinear predictor together form a molecular property prediction model. The process involves constructing functional group hints based on functional group knowledge in the chemical element knowledge graph and adding these hints to the input molecular graph. This includes: first, identifying the functional groups contained in the input molecular graph and finding the corresponding functional group entities in the chemical element knowledge graph; then, obtaining functional group entity vectors using a knowledge graph embedding model; next, constructing virtual functional group vectors; calculating the attention information between the virtual functional group vectors and the functional group entity vectors using a self-attention mechanism; and finally, using the knowledge graph embedding model to obtain the atomic vectors of the input molecular graph, and adding the functional group hint vectors to each atomic vector of the input molecular graph to update the atomic vectors of the input molecular graph. Application phase: Predicting molecular properties using molecular property prediction models.
2. The molecular property prediction method based on chemical element knowledge graphs and functional group hints according to claim 1, characterized in that, The chemical knowledge graph, constructed based on chemical knowledge, depicts the hierarchical relationships, instance relationships, data attributes, and object attributes of chemical elements and functional groups, specifically including the following four different types of triples: The first type is the class hierarchy triple (subclass, is subclass, parent class), where the head entity is the subclass and the tail entity is the parent class, which describes the containment relationship between the parent class and the subclass. The second type is the instance relation triple (instance, is instance, class), where the head entity is the instance and the tail entity is the class, indicating that the instance is an individual within the class; The third type is the data attribute triple (instance, relation, chemical attribute), where the head entity is the instance, the tail entity is numerical or textual data, and the chemical attribute of the instance is recorded. The fourth type is the object attribute triple (instance, relation, instance), where both the head entity and the tail entity are instances, describing the relationship between the instances; An instance is an instance of a chemical element or a functional group, and a class represents a type of chemical element or a type of functional group.
3. The molecular property prediction method based on chemical element knowledge graphs and functional group hints according to claim 1, characterized in that, The pre-training of the graph encoder based on the original molecular map and the enhanced molecular map through contrastive learning includes: A training batch consists of 2N molecular images, including N original molecular images. and the corresponding N molecular enhancement maps The original molecular diagram With corresponding molecular enhancement diagram Constitute positive sample pairs The original molecular diagram It is a negative sample pair with 2N-1 molecular maps in the same batch, i.e. and All of them constitute negative sample pairs, among which, and j This represents the graph index, where N represents the number of molecular graphs; Molecular representations of N original molecular graphs and N enhanced molecular graphs are obtained by encoding using a graph encoder. and and will and By mapping to the same latent representation space through the mapping head, embedding vectors are obtained. and ; Based on the embedding vector in the representation space and A contrastive loss is constructed by maximizing the consistency between positive sample pairs and minimizing the consistency between negative sample pairs, and this contrastive loss is used to optimize the parameters of the graph encoder.
4. The molecular property prediction method based on chemical element knowledge graphs and functional group hints according to claim 1, characterized in that, The graph encoder is a graph coding model built on graph neural networks, including message passing neural networks, directed message passing neural networks, and communication message passing neural networks; The mapping head includes a two-layer perceptron, which is used to map the molecular representations of the original molecular map and the molecular enhancement map to the same latent representation space to calculate the contrast loss.
5. The molecular property prediction method based on chemical element knowledge graphs and functional group hints according to claim 1, characterized in that, The knowledge graph embedding models include the OWL ontology embedding model, the relational rotation knowledge graph embedding model, and the flipped entity embedding model.
6. The molecular property prediction method based on chemical element knowledge graphs and functional group hints according to claim 1, characterized in that, The functional cue vector is determined based on the attention mechanism, including: First, combine the virtual functional group vector with the functional group entity vector to form all functional group vectors. The query is obtained by mapping using three mapping matrices. ,key Sum value vector ; Then, based on the self-attention information obtained by multiplying the attention between the query and the key by the value vector, the functional clique vector considering the attention information is... for: Finally, from the functional group vector The vector corresponding to the virtual functional group is extracted and used as the functional group cue vector.
7. The method for predicting molecular properties based on chemical element knowledge graphs and functional group hints according to claim 1, characterized in that, The step of adding functional group cue vectors to each atom vector of the input molecular graph to update the atom vectors of the input molecular graph includes: For any atom in the input molecular diagram Functional group cue vector Add to atomic vector : in, For learnable scale variables, For atoms The new atomic representation.
8. The method for predicting molecular properties based on chemical element knowledge graphs and functional group hints according to claim 1, characterized in that, The predicted molecular properties include electrochemical properties, electronic spectra and excited state energies, thermodynamic properties, water solubility, water and free energy, inhibition, permeability, toxicity, and adverse reactions; When using a molecular property prediction model to predict molecular properties, the following steps are included: Based on the functional group knowledge in the chemical element knowledge graph, construct functional group hints for the input molecular graph to be predicted, and add the functional group hints to the input molecular graph; Input the molecular diagram with added functional group hints into the molecular property prediction model, and output the predicted molecular properties after calculation.
Citation Information
Patent Citations
Drug molecular structure prediction method and device, equipment and storage medium
CN113436689A
Molecular regulation relationship prediction method and system based on knowledge graph
CN114154758A