WO2024032096A1 - 反应物分子的预测方法、训练方法、装置以及电子设备 - Google Patents

反应物分子的预测方法、训练方法、装置以及电子设备 Download PDF

Info

Publication number
WO2024032096A1
WO2024032096A1 PCT/CN2023/096605 CN2023096605W WO2024032096A1 WO 2024032096 A1 WO2024032096 A1 WO 2024032096A1 CN 2023096605 W CN2023096605 W CN 2023096605W WO 2024032096 A1 WO2024032096 A1 WO 2024032096A1
Authority
WO
WIPO (PCT)
Prior art keywords
action
editing
atom
completion
atoms
Prior art date
Application number
PCT/CN2023/096605
Other languages
English (en)
French (fr)
Inventor
赵沛霖
于洋
路婵
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2024032096A1 publication Critical patent/WO2024032096A1/zh

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/30Prediction of properties of chemical compounds, compositions or mixtures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/50Molecular design, e.g. of drugs
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/70Machine learning, data mining or chemometrics
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/80Data visualisation

Definitions

  • Embodiments of the present application relate to the field of chemical reverse reactions, and more specifically, to prediction methods, training methods, devices and electronic equipment for reactant molecules.
  • Retrosynthetic reactant prediction in organic chemistry is a key step in the development of new drugs and the manufacture of new materials.
  • the purpose is to find a set of commercially available reactant molecules for the synthesis of product molecules.
  • Traditional methods use reaction templates to match reactant molecules to obtain reactant molecules.
  • the reaction templates need to be manually extracted by professional researchers. The process is very time-consuming and the reflection templates cannot cover all reaction types.
  • the development of deep learning technology has made it possible to learn potential reaction types from large databases of organic chemical reactions. Therefore, it is particularly important to use deep learning technology to build a powerful reverse reaction prediction model.
  • SMILES Simplified Molecular Input Line Entry System
  • Graph generation models generally divide the organic chemical reverse reaction prediction task into two subtasks, namely synthon identification and synthon completion.
  • synthon identification and synthon completion usually, you can identify the synthon by building a graph neural network to obtain the synthon of the product molecule, and complete the synthon atom by atom by building a graph variational autoencoder.
  • synthon identification and synthon completion respectively, it not only increases the prediction complexity, but also cannot achieve good generalization performance because the two subtasks have different optimization goals.
  • the complexity of completing synthons atom-by-atom limits the prediction performance.
  • the embodiments of the present application provide a prediction method, training method, device and electronic equipment for reactant molecules, which can not only reduce the prediction complexity of reactant molecules and improve the generalization performance of reactant molecule prediction, but also improve the prediction of reactant molecules. prediction performance.
  • this application provides a method for predicting reactant molecules, including:
  • the reverse reaction prediction model uses the reverse reaction prediction model to predict the conversion path between the product molecule and multiple reactant molecules; the conversion path includes editing sequences and synthon completion sequences;
  • the editing objects indicated by each editing action are edited to obtain multiple synthons corresponding to the product molecule, and the editing objects are atoms or atoms in the product molecule. chemical bond;
  • the interface atom of the full action indication is added to the basic diagram of each synthon to complete the action indication, and multiple reactant molecules corresponding to the multiple synthons are obtained.
  • the basic diagram includes multiple atoms or is used to connect the multiple atoms. atomic edge.
  • this application provides a training method for a reverse reaction prediction model, including:
  • the conversion path includes an editing sequence and a synthesizer completion sequence; each editing action in the editing sequence is used to indicate the editing object and the post-edited state, and the editing object is the atom or chemical bond in the product molecule; for utilizing the A plurality of synthons of the product molecule obtained by editing the sequence.
  • the synthon completion sequence includes at least one synthon completion action corresponding to each of the multiple synthons. In the at least one synthon completion action, Each synthon completion action of is used to indicate a basic graph including a plurality of atoms or atomic edges connecting the plurality of atoms and interface atoms;
  • the inverse reaction prediction model is trained.
  • this application provides a device for predicting reactant molecules, including:
  • An extraction unit is used to extract features of product molecules and obtain the characteristics of the product molecules
  • a prediction unit is used to predict a conversion path from the product molecule to multiple reactant molecules based on the characteristics of the product molecule and using a reverse reaction prediction model; the conversion path includes an editing sequence and a synthon completion sequence;
  • the editing unit is used to edit the editing object indicated by each editing action in the editing sequence according to the edited state indicated by each editing action, and obtain multiple synthons corresponding to the product molecule, and the editing object is the product.
  • Atoms or chemical bonds in a molecule
  • An adding unit configured for each of the plurality of synthesizers, based on at least one synthesizer completion action corresponding to the respective synthesizer in the synthesizer completion sequence, according to the at least one synthesizer completion action.
  • the interface atoms of each synthon completion action instruction are added to the basic diagram of each synthon completion action instruction to obtain multiple reactant molecules corresponding to the multiple synthons.
  • the basic diagram includes multiple atoms or is used for Atomic edges connecting the multiple atoms.
  • this application provides a training device for a reverse reaction prediction model, including:
  • An extraction unit is used to extract features of product molecules and obtain the characteristics of the product molecules
  • a prediction unit is used to predict the conversion path between the product molecule and multiple reactant molecules based on the characteristics of the product molecule and using a reverse reaction prediction model;
  • the conversion path includes an editing sequence and a synthesizer completion sequence; each editing action in the editing sequence is used to indicate the editing object and the post-edited state, and the editing object is the atom or chemical bond in the product molecule; for utilizing the A plurality of synthons of the product molecule obtained by editing the sequence.
  • the synthon completion sequence includes at least one synthon completion action corresponding to each of the multiple synthons. In the at least one synthon completion action, Each synthon completion action of is used to indicate a basic graph including a plurality of atoms or atomic edges connecting the plurality of atoms and interface atoms;
  • a training unit is used to train the reverse reaction prediction model based on the loss between the conversion path and the training path.
  • this application provides an electronic device, including:
  • a processor adapted to implement computer instructions
  • a computer-readable storage medium stores computer instructions, and the computer instructions are suitable for the processor to load and execute the prediction method of reactant molecules involved in the above-mentioned first aspect or the reverse reaction prediction model involved in the above-mentioned second aspect. Training methods.
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions.
  • the computer instructions When the computer instructions are read and executed by a processor of a computer device, the computer device executes the above-mentioned step.
  • the first aspect relates to the prediction method of reactant molecules or the above-mentioned second aspect involves the training method of the reverse reaction prediction model.
  • embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the prediction method of the reactant molecules involved in the first aspect or the reverse reaction involved in the second aspect. Predictive model training methods.
  • the prediction task of the synthon and the prediction task of the synthon completion can be merged Processing, that is, the reverse reaction prediction model introduced in the embodiment of the present application can learn the potential relationship between the two subtasks of synthon prediction and synthon completion, thereby greatly improving the generalization performance of the model and reducing the reaction rate of reactant molecules.
  • Prediction complexity and improves the generalization performance of reactant molecule prediction in addition, by introducing a basic graph and designing the basic graph as a structure that includes multiple atoms or atomic edges used to connect the multiple atoms, it is possible to reasonably construct short And the accurate conversion path avoids the length of the synthon completion sequence being too long, reduces the difficulty of predicting reactant molecules and improves the prediction accuracy of reactant molecules, thereby improving the prediction performance of reactant molecules.
  • Figure 1 is an example of the system framework provided by the embodiment of this application.
  • Figure 2 is a schematic flow chart of the prediction method of reactant molecules provided by the embodiment of the present application.
  • Figure 3 is an example of a conversion path provided by an embodiment of the present application.
  • Figure 4 is another schematic flow chart of the prediction method of reactant molecules provided by the embodiment of the present application.
  • Figure 5 is a schematic flow chart of the training method of the reverse reaction prediction model provided by the embodiment of the present application.
  • Figure 6 is a schematic block diagram of a predicting device for reactant molecules provided by an embodiment of the present application.
  • Figure 7 is a schematic block diagram of the training device of the reverse reaction prediction model provided by the embodiment of the present application.
  • Figure 8 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • AI Artificial Intelligence
  • the solution provided by this application may relate to the technical field of reverse reaction prediction based on AI in the field of chemistry.
  • AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
  • artificial intelligence is a comprehensive technology of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence.
  • Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
  • artificial intelligence technology is a comprehensive subject that covers a wide range of fields, including both hardware-level technology and software-level technology.
  • Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, mechatronics and other technologies.
  • Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • artificial intelligence technology has been researched and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless driving, autonomous driving, and drones. , robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
  • Embodiments of the present application may relate to computer vision (Computer Vision, CV) technology in artificial intelligence technology.
  • Computer Vision Computer Vision, CV
  • the embodiments of the present application relate to the technical field of reverse reaction prediction based on the results of CV identification in the field of chemistry.
  • Computer vision is a science that studies how to make machines "see”. Furthermore, it refers to the use of cameras to Projectors and computers replace human eyes in machine vision such as target recognition, prediction and measurement, and further perform graphics processing, making computer processing into images more suitable for human eyes to observe or transmit to instruments for detection.
  • Computer vision studies related theories and technologies trying to build artificial intelligence systems that can obtain information from images or multi-dimensional data.
  • Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content/behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and mapping Construction and other technologies also include common biometric identification technologies such as face recognition and fingerprint recognition.
  • Embodiments of this application may also relate to machine learning (Machine Learning, ML) in artificial intelligence.
  • Machine Learning Machine Learning
  • embodiments of the present application may relate to the technical field of reverse reaction prediction using machine learning prediction models.
  • ML is a multi-field interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers can simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structures to continuously improve their performance.
  • Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications cover all fields of artificial intelligence.
  • Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, teaching learning and other technologies.
  • Figure 1 is an example of a system framework 100 provided by an embodiment of the present application.
  • the system framework 100 may be an application system, and the embodiment of the present application does not limit the specific type of the application program.
  • the system framework 100 includes: a terminal 131, a terminal 132 and a server cluster 110. Both terminal 131 and terminal 132 can be connected to the server cluster 110 through a wireless or wired network 120.
  • the terminal 131 and the terminal 132 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP4 player, an MP4 player, and a laptop computer.
  • the terminal 131 and the terminal 132 have application programs installed and run.
  • the application can be an online video program, a short video program, a picture sharing program, a sound social program, an animation program, a wallpaper program, a news push program, a supply and demand information push program, an academic exchange program, a technical exchange program, a policy exchange program, including comments Mechanism-based programs, programs containing opinion publishing mechanisms, and knowledge-sharing programs.
  • Terminal 131 and terminal 132 may be terminals used by user 141 and user 142 respectively, and user accounts are logged into the applications running in terminal 131 and terminal 132.
  • the server cluster 110 includes at least one of one server, multiple servers, a cloud computing platform, and a virtualization center.
  • the server cluster 110 is used to provide background services for applications (eg, applications on terminals 131 and 132).
  • applications eg, applications on terminals 131 and 132
  • the server cluster 110 takes on the main computing work, and the terminal 131 and the terminal 132 take on the secondary computing work; or the server cluster 110 takes on the secondary computing work, and the terminals 131 and 132 take on the main computing work; or the terminal 131 and the terminal
  • a distributed computing architecture is used between 132 and the server cluster 110 for collaborative computing.
  • the calculation work involved in this application may be calculation work related to the prediction of organic chemistry retrosynthetic reactants or related auxiliary work.
  • the server cluster 110 includes: an access server 112, a web server 111 and a data server 113.
  • the access servers 112 can be deployed in different cities nearby.
  • the access servers 112 are used to receive service requests from terminals 131 and 132, and forward the service requests to the corresponding servers. deal with.
  • the web server 111 is a server used to provide web pages to the terminals 131 and 132, and embedded code is integrated into the web pages;
  • the data server 113 is used to receive data (such as business data, etc.) reported by the terminals 131 and 132.
  • Retrosynthetic reactant prediction in organic chemistry is a key step in the development of new drugs and the manufacture of new materials.
  • the purpose is to find a set of commercially available reactant molecules for the synthesis of product molecules.
  • Traditional methods use reaction templates to match reactant molecules to obtain reactant molecules.
  • the reaction templates need to be manually extracted by professional researchers. The process is very time-consuming and the reflection templates cannot cover all reaction types.
  • the development of deep learning technology has made it possible to learn potential reaction types from large databases of organic chemical reactions. Therefore, it is particularly important to use deep learning technology to build a powerful reverse reaction prediction model.
  • SMILES Simplified Molecular Input Line Entry System
  • Graph generation models generally divide the organic chemical reverse reaction prediction task into two subtasks, namely synthon identification and synthon completion.
  • synthon identification and synthon completion usually, you can identify the synthon by building a graph neural network to obtain the synthon of the product molecule, and complete the synthon atom by atom by building a graph variational autoencoder.
  • synthon identification and synthon completion respectively, it not only increases the prediction complexity, but also cannot achieve good generalization performance because the two subtasks have different optimization goals.
  • the complexity of completing synthons atom-by-atom limits the prediction performance.
  • a leaving group is an atom or functional group that is separated from a larger molecule during a chemical reaction.
  • the functional group is an atom or atomic group that determines the chemical properties of an organic compound. Common functional groups include carbon-carbon double bonds, carbon-carbon triple bonds, hydroxyl groups, carboxyl groups, ether bonds, aldehyde groups, etc.
  • two subtasks can be jointly learned through an end-to-end model, that is, the two subtasks of synthon identification and synthon completion can be integrated into an end-to-end model, and the synthon can be completed atom-by-atom or benzene ring.
  • the end-to-end model refers to a model that can be trained and optimized through a single optimization goal.
  • top-1 category accuracy refers to the top-1 category accuracy and actual results. consistent accuracy.
  • embodiments of the present application provide a prediction method, training method, device and electronic equipment for reactant molecules, which can not only reduce the prediction complexity of reactant molecules and improve the generalization performance of reactant molecule prediction, but also Improved prediction performance of reactant molecules.
  • the embodiments of this application design an end-to-end reverse reaction prediction model to jointly optimize the two subtasks of synthon prediction and synthon completion.
  • the synthon prediction task can be constructed as: predicting the ability to characterize the product molecule Edit sequence of the conversion process to a synthon
  • the completion synthon prediction task is constructed as: predicting a synthon completion sequence that can characterize the conversion process of a synthon to a reactant molecule, and constructed by the edit sequence and the synthon completion sequence Develop a conversion path that can characterize the conversion process from product molecules to reactant molecules.
  • the solutions provided by the embodiments of this application can be easily extended to more complex and diverse chemical reaction models.
  • the reverse reaction prediction model provided by the embodiments of the present application can be extended to a multi-step reverse reaction prediction task.
  • a Monte Carlo tree search algorithm can be used to extend the reverse reaction prediction model provided by the embodiments of the present application to a multi-step reverse reaction task. prediction task.
  • the embodiments of the present application can also greatly avoid the problem of limited prediction of reactant molecules caused by the extremely unbalanced sample of leaving groups by introducing basic graphs, and solve the problems when using atoms to complete synthons.
  • the problem of excessive prediction complexity can be improved, thereby improving the prediction accuracy of the reverse reaction prediction model.
  • FIG. 2 shows a schematic flow chart of a prediction method 200 for reactant molecules according to an embodiment of the present application.
  • the prediction method 200 can be executed by any electronic device with data processing capabilities.
  • the electronic device may be implemented as a server.
  • the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, and middleware. Cloud servers for basic cloud computing services such as software services, domain name services, security services, and big data and artificial intelligence platforms.
  • the servers can be connected directly or indirectly through wired or wireless communication methods. This application is not limited here. For the convenience of description, the prediction method provided by this application is explained below by taking a prediction device for reactant molecules as an example.
  • the prediction method 200 may include:
  • S210 Perform feature extraction on the product molecule to obtain the characteristics of the product molecule.
  • features of the product molecule can be extracted through Simplified Molecular Input Line Entry System (SMILES) or Graph Neural Networks (GNN). Take to obtain the characteristics of the product molecule.
  • SILES Simplified Molecular Input Line Entry System
  • NNN Graph Neural Networks
  • feature extraction can also be performed on other models or framework product molecules with type functions, which are not specifically limited in the embodiments of the present application.
  • the characteristics of the product molecule may be determined based on the characteristics of individual atoms in the product molecule.
  • a global attention pooling function can be used to calculate the characteristics of all atoms to obtain the characteristics of the product molecule.
  • the original characteristics of each atom and the original characteristics of the chemical bond between each atom and the neighbor node of each atom can be encoded to obtain the characteristics of each atom.
  • MPNN can be used to encode the original characteristics of each atom and the original characteristics of the chemical bond between each atom and the neighbor node of each atom to obtain the characteristics of each atom.
  • the original characteristics of each atom are used to characterize at least one of the following information: the type of atom (such as C, N, O, S, etc.), the degree of chemical bonding, chirality, the number of hydrogen atoms, and other information.
  • the original characteristics of the chemical bond are used to characterize at least one of the following information: chemical bond type (such as single bond, double bond, triple bond, aromatic bond, etc.), configuration, aromaticity and other information.
  • the characteristics of the product molecule may also include characteristics representing the types of chemical bonds in the product molecule.
  • the types of chemical bonds in the product molecule include, but are not limited to: single bonds, double bonds, triple bonds and no chemical bonds.
  • the characteristics of the product molecule can be embodied in the form of a vector or a matrix. Of course, they can also be replaced by information in an array or other formats, which is not specifically limited in this application.
  • the characteristics of the product molecule are illustratively described below by taking the eigenvector as an example.
  • Each atom v ⁇ V has a characteristic vector x v , which represents information such as the type of atom (such as C, N, O, S, etc.), the degree of chemical bond, chirality, and the number of hydrogen atoms.
  • each chemical bond e ⁇ E has a feature vector x v,u , which contains information such as chemical bond type (such as single bond, double bond, triple bond, aromatic bond, etc.), configuration and aromaticity.
  • a 4-dimensional one-hot vector can be defined to represent the type of chemical bonds in the molecular graph, namely single bond, double bond, triple bond and no chemical bond.
  • a one-hot vector is a vector with only one element being 1 and the remaining elements being 0. All atoms and chemical bonds have a label s ⁇ 0,1 ⁇ used to indicate whether they are editing objects involved in converting product molecules into synthons.
  • MPNN L-layer Message Passing Neural Network
  • MLP Multilayer Perceptron
  • the eigenvector h v of the atom and the eigenvector h vu of the chemical bond can be calculated by the following formula:
  • MPNN( ⁇ ) represents the message passing neural network
  • G represents the graph structure of the product molecule
  • L represents the number of layers of MPNN( ⁇ ).
  • x v represents the feature vector before encoding atom v
  • x v,u represents the feature vector before encoding the chemical bond between atom v and atom u
  • MLP bond ( ⁇ ) represents the multi-layer perceptron
  • represents the splicing operation
  • h v,u can be expressed in the form of a self-loop, that is:
  • i is the label of an atom or the label of a chemical bond.
  • the label of an atom may be an index of an atom
  • the label of a chemical bond may be an index of a chemical bond
  • a global attention pooling function can be used to extract features from all atoms.
  • Vector calculation obtains the characteristic vector h G of the product molecule. It is worth noting that it is possible to use the eigenvector of the synthon, which is the same as h G. You can also use a global attention pooling function to calculate the eigenvector of the synthon including all atoms. Characteristic vector h syn .
  • contrastive learning strategies can also be introduced, such as masking the graph structure or features of the molecular graph, that is, the reactants can be improved by expanding the feature dimension. Predictive performance of molecules.
  • S220 based on the characteristics of the product molecule, use the reverse reaction prediction model to predict the conversion path from the product molecule to multiple reactant molecules; the conversion path includes editing sequences and synthon completion sequences.
  • the editing sequence is a sequence formed by an editing action
  • the synthesizer completion sequence is a sequence formed by a synthesizer completion action.
  • the prediction task of the inverse reaction prediction model is defined as a reactant molecule generation task. That is, the prediction task of the reverse reaction prediction model is: predict a conversion path that describes the conversion path from the product molecular graph to the reactant molecular graph.
  • the conversion path is defined by editing actions for product molecules and synthon completion actions for synthons. That is, the conversion path is constructed through the (Edit) sequence formed by the editing action and the synthon completion sequence formed by the synthon completion action. Therefore, a description can be predefined for each product molecule from the product molecule graph to the reactant molecule.
  • the synthesizer completion action can also be called a basic graph adding (AddingMotif) action, that is, the synthesizer completion sequence can also be called a basic graph adding sequence.
  • the transformation path includes editing sequences and synthesizer completion sequences.
  • the editing sequence is used to describe the chemical bond and atomic changes from the product molecule to the synthon.
  • Synth completion sequence is used to describe the process of synth completion using a basic pattern (motif).
  • editing actions are introduced to represent each change from product to synthon.
  • synthon completion actions are introduced to describe the process of completing the synthon using a basic pattern (motif). Every completion operation.
  • the editing action is an action of editing atoms in the product molecule or editing chemical bonds in the process of converting the product molecule into multiple synthons of the product molecule.
  • the synth completion action is an action of adding a basic graph in the process of adding the multiple synthons to the multiple reactant molecules.
  • the editing sequence may also include an editing completion action.
  • the conversion path includes at least one editing action, an editing completion action, and at least one synthesizer completion action in sequence.
  • the editing completion action is used to connect or distinguish the at least one editing action and the at least one synthesizer completion action.
  • the edit completion action is used to trigger the reverse reaction prediction model to initiate the synthet completion task.
  • the editing completion action is innovatively introduced to connect at least one editing action to at least one synthesizer completion action, thereby constructing a conversion path.
  • the editing sequence may also include a start action.
  • the conversion path includes the start action, at least one editing action, an editing completion action, and at least one synthesizer completion sequence in sequence.
  • the start action is used to trigger the reverse reaction prediction model to initiate a synthesis sub-prediction task or to trigger the reverse reaction prediction model to initiate a reactant prediction task.
  • the editing completion action can also be used as an action in the synthesizer completion sequence, which is not specifically limited in this application.
  • reverse reaction prediction model involved in this application can be any deep learning or machine learning model used for identification, and the embodiments of this application do not limit its specific type.
  • the inverse reaction prediction model includes but is not limited to: traditional learning model, integrated learning model or deep learning model.
  • traditional learning models include but are not limited to: tree models (regression trees) or logistic regression (LR) models; integrated learning models include but are not limited to: improved models of gradient boosting algorithms (XGBoost) or random forest models ;
  • Deep learning models include but are not limited to: neural network, dynamic Bayesian Network (DBN) and stacked auto-encoder network (SAE) models.
  • DBN dynamic Bayesian Network
  • SAE stacked auto-encoder network
  • a batch size can be used to train the model.
  • the batch size is the number of samples selected for one training.
  • the value of the batch size determines the time required to complete each epoch in the deep learning training process and the smoothness of the gradient between each iteration.
  • N For a training set of size N, if the batch size sampling method in each period adopts the most conventional N samples each sampled once, and the batch size is b, then the number of iterations required in each period is N/ b, therefore, the time required to complete each epoch roughly also increases with the number of iterations.
  • the embodiment of the present application does not specifically limit the value of the batch size.
  • the appropriate batch size can be determined according to actual needs or scenarios.
  • the batch size can be used for network training.
  • Neural network is a computing model composed of multiple neuron nodes connected to each other. The connection between nodes represents the weighted value from the input signal to the output signal, which is called weight; each node performs a weighted sum of different input signals. (summation, SUM), and output through a specific activation function (f).
  • neural networks include but are not limited to: Deep Neural Network (DNN), Convolutional Neural Networks (CNN), Recurrent Neural Network (RNN), etc.
  • DNN Deep Neural Network
  • CNN Convolutional Neural Networks
  • RNN Recurrent Neural Network
  • CNN Convolutional Neural Networks
  • feedforward neural network It is a type of feedforward neural network (Feedforward Neural Networks) that includes convolutional calculations and has a deep structure. It is also one of the representative algorithms of deep learning. Because convolutional neural networks can perform shift-invariant classification, they are also called shift-invariant artificial neural networks (SIANN).
  • SIANN shift-invariant artificial neural networks
  • RNN Recurrent Neural Network
  • RNNs include structures such as Long Short-Term Memory (LSTM) and gated recurrent unit (GRU).
  • LSTM Long Short-Term Memory
  • GRU gated recurrent unit
  • S230 Edit the editing objects indicated by each editing action in the editing sequence according to the edited status of each editing action instruction, and obtain multiple synthons (Synthons) corresponding to the product molecule.
  • the editing object is the product. Atoms or chemical bonds in a molecule.
  • the editing objects indicated by each editing action are edited to obtain multiple corresponding to the product molecule. Synthon.
  • the edited state indicated by the editing action is to change the number of charges on the atom or change the number of hydrogen atoms on the atom; if the editing action indicates If the indicated editing object is a chemical bond, then the edited state indicated by the editing action is any of the following: adding a chemical bond, deleting a chemical bond, or changing the type of a chemical bond.
  • the edited state indicated by the editing action is related to the editing object indicated by the editing action.
  • the edited state indicated by the editing action includes but is not limited to the following states: adding a chemical bond, deleting a chemical bond, or changing the type of a chemical bond.
  • the real-time edited state of the editing action includes but is not limited to the following states: changing the number of charges on the atom or changing the number of hydrogen atoms.
  • the editing action is characterized by the following tags: an action tag used to indicate editing, a tag used to indicate the editing object, and a tag used to indicate the status after editing.
  • the editing action in the editing sequence can be defined as an editing triplet, that is, ( ⁇ 1, o, ⁇ ), ⁇ 1 indicates that the action predicted by the reverse reaction prediction model is the editing action, and o indicates the editing action predicted by the reverse reaction prediction model.
  • the label of the corresponding editing object, ⁇ represents the label of the edited state corresponding to the editing action predicted by the reverse reaction prediction model.
  • a certain editing triplet is ( ⁇ 1, b, none)
  • ⁇ 1 indicates that the action predicted by the reverse reaction prediction model is an editing action
  • b indicates that the editing object corresponding to the editing action is the chemical bond labeled b
  • none ( none) indicates that the edited state corresponding to the editing action is to delete the chemical bond labeled b.
  • the editing action may be defined as a tuple or a value in other formats.
  • the editing action can be defined as a tuple, it can be specifically defined as a label used to indicate the editing object and a label used to indicate the status after editing.
  • the interface atom of the sub-completion action indication is added to the basic graph (Motif) of each synthon completion action indication to obtain multiple reactant molecules corresponding to the multiple synthons.
  • the basic graph includes multiple atoms or is used for Atomic edges connecting the multiple atoms.
  • the atomic edge may represent an interaction force between two or more atoms connected by the atomic edge. This force is used to bind the atoms to which this atom's edges are connected.
  • the atomic edges are chemical bonds used to connect different atoms of the plurality of atoms.
  • the atomic edge may be a chemical bond, including but not limited to: ionic bond, covalent bond, and metallic bond.
  • a synthon is a molecular fragment obtained by breaking chemical bonds in the product molecular graph.
  • the basic graph is a subgraph of the reactant, for example, it can be a subgraph on the reactant corresponding to the synthon.
  • the reactants corresponding to the synthon may include molecules or reactants containing the synthon.
  • a basic graph can include subgraphs obtained by:
  • the ring involved in the embodiments of the present application may be a single ring, that is, there is only one ring in the molecule.
  • the rings involved in the embodiments of the present application may be cycloalkanes, and cycloalkanes may be classified based on the number of carbon atoms on the ring.
  • the number of carbon atoms in the ring is 3 to 4, it is called a small ring, when the number of carbon atoms in the ring is 5 to 6, it is called an ordinary ring, when the number of carbon atoms in the ring is 7 to 12, it is called a medium ring, and when the number of carbon atoms in the ring is 7 to 12, it is called a medium ring.
  • the number of carbon atoms is greater than 12, it is called a macrocycle.
  • the reverse reaction prediction model predicts the completion sequence of the synthon based on the first order of the plurality of synthons.
  • the traversal order is the second order.
  • at least one synthesizer completion action corresponding to each synthesizer in the synthesizer completion sequence can be determined based on the first order and the second order, and then according to the at least one synthesizer
  • the interface atom of each synthesizer completion action instruction in the completion action is added to the basic diagram of each synthesizer completion action instruction.
  • the first order and the second order may be the same or different.
  • At least one synthesizer completion corresponding to each synthesizer in the synthesizer completion sequence may be determined based on the first order, the second order, and the number of at least one synthesizer completion action corresponding to each synthesizer. action, and further add the basic graph of each synthesizer completion action instruction according to the interface atom of each synthesizer completion action instruction in the at least one synthesizer completion action.
  • the traversal order of the multiple synthesizers used when predicting the synthesizer completion sequence can be followed by the reverse reaction prediction model, and each of the multiple synthesizers can be sequentially processed.
  • the interface atom of each synthesizer completion action instruction in the preset number of synthesizer completion actions corresponding to each synthesizer the basic diagram of each synthesizer completion action instruction is added.
  • the plurality of synthesizers include synthesizer 1 and synthesizer 2
  • the first synthesizer completion action in the synthesizer completion sequence is the synthesizer completion action for synthesizer 1
  • the synthesizer completion action The remaining synthesizer completion actions in the entire sequence except the first synthesizer completion action are the synthesizer completion actions for synthesizer 2.
  • Atom add the basic diagram indicated by the first synthon completion action to obtain multiple reactant molecules corresponding to the synthon 1; further, you can add the interface atoms indicated by the remaining synthon completion actions in sequence.
  • the remaining synthons complete the basic diagram of the action instructions, and a plurality of reactant molecules corresponding to the synthon 2 are obtained.
  • the interface atom indicated by each synthesizer completion action is: when using the basic graph indicated by each synthesizer completion action to perform synth completion, the action on the basic graph indicated by each synthesizer completion action Atoms that connect nodes.
  • the interface atom indicated by the synthesizer completion action and the attachment atom for the synthesizer completion action can be used as connection nodes to obtain the Multiple reactant molecules corresponding to product molecules. It is worth noting that the interface atom indicated by the synthon completion action and the attached atom for the synthon completion action are the same atom in the reactant molecule.
  • the attached atoms involved in the embodiments of the present application include atoms selected as the editing object and atoms at both ends of the chemical bond selected as the editing object.
  • the synthesizer completion action is characterized by the following tags: an action tag indicating that synthon completion is performed, a tag indicating a base graph, and a pair indicating a tag for an interface atom.
  • a synth completion action in a synth completion sequence can be defined as a synth completion triplet, that is, ( ⁇ 3, z, q).
  • ⁇ 3 indicates that the action predicted by the reverse reaction prediction model is the synthon completion action.
  • z represents the label of the base graph indicated by the synthesizer completion action predicted by the inverse reaction prediction model.
  • q represents the label of the interface atom corresponding to the synthon completion action predicted by the reverse reaction prediction model. For example, ( ⁇ 3,z1,q1).
  • ⁇ 3 indicates that the action predicted by the reverse reaction prediction model is the synthon completion action.
  • z1 represents the label of the basic graph indicated by the synthesizer completion action predicted by the reverse reaction prediction model, that is, the basic graph labeled z1.
  • q1 represents the label of the interface atom corresponding to the synthon completion action predicted by the reverse reaction prediction model, that is, the atom labeled q1 in the basic graph labeled z1. Based on this, based on ( ⁇ 3, z1, q1), the atom labeled q1 in the basic graph labeled z1 can be used as the interface atom, and the basic graph of z1 can be used for synthon completion.
  • the synthesizer completion action may be defined as a tuple or a value in other formats.
  • the synthesizer completion action can be defined as a tuple, it can be specifically defined as a label used to indicate the basic graph and a pair used to indicate the label used for the interface atom.
  • the prediction task of the synthon and the prediction task of the synthon completion can be combined, that is, the implementation of this application
  • the reverse reaction prediction model introduced in the example can learn the potential relationship between the two subtasks of synthon prediction and synthon completion, thereby greatly improving the generalization performance of the model, reducing the prediction complexity of reactant molecules and improving reactions.
  • the generalization performance of material molecule prediction in addition, by introducing a basic graph and designing the basic graph as a structure that includes multiple atoms or atomic edges used to connect the multiple atoms, a short and accurate conversion path can be reasonably constructed. This avoids the excessive length of the synthon completion sequence, reduces the difficulty of predicting reactant molecules and improves the prediction accuracy of reactant molecules, thereby improving the prediction performance of reactant molecules.
  • this S220 may include:
  • the input feature of the t-th action is obtained, and t is an integer greater than 1; based on the input feature corresponding to the t-th action and the input feature corresponding to the t-th action Hidden features and predict the t-th action until the action predicted by the reverse reaction prediction model is a synthon completion action, and all attached atoms on the multiple synthons have been traversed and all the actions for the multiple synthons have been traversed. When all attached atoms on the basic graph are added, the conversion path is obtained; where the hidden features of the t actions are related to the actions predicted by the reverse reaction prediction model before the t-th action.
  • the attached atoms include atoms selected as the editing object and atoms at both ends of the chemical bond selected as the editing object.
  • the reverse reaction prediction model can be a Recurrent Neural Network (RNN).
  • RNN Recurrent Neural Network
  • the t-1th action can correspond to time t-1
  • the tth action can correspond to time t; also That is to say, based on the predicted action of the RNN at time t-1, the input features of the RNN at time t are obtained, and based on the input features of the RNN at time t and the hidden features of the RNN at time t, the The RNN predicts the action at time t until the action predicted by the RNN is a synth completion action and all attached atoms on the multiple synths and the basic graph added for the multiple synths have been traversed. When all atoms are attached, the transformation path is obtained.
  • RNN Recurrent Neural Network
  • multi-layer perceptrons and convolutional neural networks assume that the input is an independent unit without context. For example, the input is a picture, and the network identifies whether it is a dog or a cat. But for some serialized inputs with obvious contextual features, such as predicting the playback content of the next frame in a video, it is obvious that such output must rely on previous inputs, which means that the network must have a certain memory capability. RNN can just give the network this kind of memory ability.
  • the reverse reaction prediction model can also be other models, which is not specifically limited in this application.
  • the output feature ut can be obtained based on the input feature corresponding to the t-th action and the hidden feature corresponding to the t- th action, and then the output feature ut and The characteristics h G of the product molecules are spliced together to obtain the characteristics ⁇ t used to identify the t-th action.
  • GRU( ⁇ ) is a gated recursive unit
  • input t-1 and hidden t-1 are the input features used by GRU to predict the t-th action (i.e., the edited intermediate molecular fragment based on the t-1-th action). characteristics) and the hidden state passed down from the node used to predict the t-th action, whose initial values are the 0 vector and the characteristics of the product molecule graph respectively
  • ⁇ G ( ⁇ ) is the embedding function of the characteristics of the product molecule .
  • the reverse reaction prediction model can identify the t-th action using the following formula:
  • softmax( ⁇ ) is the classification function
  • MLP bond ( ⁇ ) represents the multi-layer perceptron
  • ⁇ t represents the feature used to identify the t-th action.
  • the output features ut and the features h G of the product molecules are spliced, that is, the features of the product molecules and the output features of the RNN are spliced together for subsequent action prediction, which can integrate global topological information. into the action prediction process, thereby improving the accuracy of action prediction.
  • the conversion path may be determined as follows:
  • the beam search method of hyperparameter k obtain the k first prediction results with the highest score from the prediction results of the t-1th action; based on the k first prediction results, determine the k corresponding to the t-th action The first input feature; further, based on each of the k first input features and the hidden feature corresponding to the t-th action, Predict the t-th action, and obtain the k second prediction results with the highest scores from the predicted prediction results according to the beam search method of hyperparameter k; based on the k second prediction results, determine the t+th k second input features corresponding to 1 action; based on each of the k second input features and the hidden features corresponding to the t+1th action, predict the t+1th action , until the action predicted by the reverse reaction prediction model is a synthon completion action, and all attached atoms on the multiple synthons and all attached atoms on the basic graph added for the multiple synthons have been traversed, Get the conversion path.
  • the prediction device predicts the t-th action based on each of the k first input features and the hidden feature corresponding to the t-th action, and obtains 2k prediction results
  • the k second prediction results with the highest scores can be obtained from the 2k prediction results, and determined as the k second input features corresponding to the t+1th action.
  • the prediction results of the t-1th action when obtaining the k first prediction results with the highest scores from the prediction results of the t-1th action, the prediction results of the t-1th action can be obtained first Sort according to the score, and then use the k prediction results with the highest score among the prediction results of the t-1th action as the k first prediction results. For example, when sorting the prediction results of the t-1th action according to the score, you can first accumulate and calculate the scores of all prediction results that have been predicted on the path where each prediction result is located, and obtain each prediction result. The corresponding cumulative sum of scores is then used as the k first prediction results among the prediction results of the t-1th action with the highest cumulative sum score.
  • Beam Search with hyperparameter k is used to select multiple alternatives for the input sequence at each time step based on conditional probabilities.
  • the number of multiple alternatives depends on a hyperparameter k called beam width.
  • beam search selects the k best alternatives with the highest probability as the most likely choices at the current moment. That is, at each moment, the best result k with the highest score is selected as the input of the next moment based on the log-likelihood scoring function.
  • this process can be described as the construction of a search tree, in which the leaf node with the highest score is expanded with its children, while other leaf nodes are deleted.
  • the input features of the t-th action are determined based on the features of the subgraph edited using the t-1th action, and based on The input features of the t-th action and the hidden features of the t-th action are used to predict the editing object and the edited state indicated by the t-th action using the reverse reaction prediction model until the reverse reaction prediction model is used to predict When the obtained action is the last editing action in the editing sequence, the editing sequence is obtained.
  • the last editing action is an editing completion action.
  • the t-1th action is the editing action
  • the input features of the t-th action are determined based on the features of the subgraph edited using the t-1th action, and based on the t-1th action
  • the reverse reaction prediction model is used to predict the editing object and the edited state indicated by the t-th action until the action predicted by the reverse reaction prediction model is When the editing completes the action, the editing sequence is obtained.
  • t is an integer greater than 1 or greater than 2.
  • the t-1th action is the first editing action
  • the t-1th action is the starting action.
  • the characteristics of the subgraph obtained by editing the t-1th action are products. Characteristics of molecules.
  • the intermediate molecule fragment processed based on the t-1th action can be decoded to obtain the intermediate molecule fragment edited based on the t-1th action.
  • Characteristics when the reverse reaction prediction model predicts the t-th action, the intermediate molecule fragment processed based on the t-1th action can be decoded to obtain the intermediate molecule fragment edited based on the t-1th action.
  • the reverse reaction prediction model may assign a score based on each chemical bond and atom. Predict the editing object corresponding to the t-th action.
  • the reverse reaction prediction model predicts that when predicting the editing object corresponding to the t-th action, each chemical bond and atom can first be assigned a score.
  • This score represents the probability that a chemical bond or atom is considered an edit object in the t-1th action; a score is then assigned to each chemical bond and atom. Predict the editing object corresponding to the t-th action.
  • the reverse reaction prediction model can assign a score to each chemical bond and atom through the following formula:
  • sigmoid( ⁇ ) is the logistic regression function
  • MLP target ( ⁇ ) represents the feature output by the multi-layer perceptron for determining the score of the i-th chemical bond or atom
  • ⁇ t represents the Identify the characteristics of the t-th action
  • ⁇ e ( ⁇ ) represents the embedding function of the characteristics of the atom or chemical bond
  • e i represents the i-th chemical bond or atom.
  • the reverse reaction prediction model predicts the edited state for the editing object corresponding to the t-th action.
  • the reverse reaction prediction model can predict the post-edited state of the editing object corresponding to the t-th action through the following formula:
  • softmax( ⁇ ) is the classification function
  • MLP type ( ⁇ ) represents the features output by the multi-layer perceptron for determining the type of chemical bond
  • ⁇ t represents Used to identify the features of the t-th action
  • ⁇ e ( ⁇ ) represents the embedding function of the features of atoms or chemical bonds
  • argmax ( ⁇ ) represents finding the atom or chemical bond with the largest score
  • the reverse reaction prediction model applies the predicted editing object corresponding to the t-th action and the edited state corresponding to the t-th action to the pre-editing intermediate molecule fragment corresponding to the t-th action.
  • obtain the edited intermediate molecule segment corresponding to the t-th action and then use MPNN( ⁇ ) to calculate the characteristics of the edited intermediate molecule segment corresponding to the t-th action.
  • MPNN( ⁇ ) to calculate the characteristics of the edited intermediate molecule segment corresponding to the t-th action
  • the editing object corresponding to the t-th action and the edited state corresponding to the t-th action are used to obtain the input feature input t corresponding to the t+1-th action.
  • the input feature input t corresponding to the t+1th action can be obtained according to the following formula:
  • ⁇ e ( ⁇ ) represents the embedding function of the characteristics of atoms or chemical bonds
  • argmax ( ⁇ ) represents finding the atom or chemical bond with the maximum score
  • ⁇ b ( ⁇ ) indicates embedding function.
  • the t-1th action is the last editing action in the editing sequence or the synthesized sub-completion action, then based on the features of the subgraph edited using the t-1th action and The characteristics of the attached atom corresponding to the t-1th action determine the input features of the t-th action, and based on the input features of the t-th action and the hidden features of the t-th action, determine the input features of the t-th action.
  • the indicated basic graph and interface atoms are predicted; until the action predicted by the reverse reaction prediction model is a synthesizer completion action, and the multiple synthons and basic graphs added for the multiple synthons have been traversed When all the attached atoms are , the completion sequence of the synthon is obtained.
  • the last editing action is an editing completion action.
  • the t-1th action is the editing completion action or the composite sub-completion action
  • the t-1th action based on the characteristics of the subgraph edited using the t-1th action and the attachment corresponding to the t-1th action Characteristics of atoms, determine the input features of the t-th action, and predict the basic graph and interface atoms indicated by the t-th action based on the input features of the t-th action and the hidden features of the t-th action;
  • the action predicted by the reverse reaction prediction model is a synthon completion action, and all attached atoms on the multiple synthons and on the basic graph added for the multiple synthons have been traversed, the synthon is obtained Complete the sequence.
  • the action predicted by the reverse reaction prediction model is the last editing action, it means that the synthesizer prediction stage ends, and at the same time, the reactant prediction process enters the synthesizer completion stage. At this point, all attached atoms are sorted according to their label order in the product molecule for synthon completion.
  • ⁇ atom ( ⁇ ) represents the embedding function of the characteristics of the attached atom
  • a t represents the attached atom corresponding to the t-th action.
  • the reverse reaction prediction model sequentially traverses all attached atoms on the synthon and all attached atoms on the added basic graph, and assigns a basic graph (motif) to each attached atom.
  • the prediction of base graphs can be viewed as a multi-classification task in a pre-stored dictionary Z. Obtain base map through base map prediction After that, the basic graph can be further determined on the interface atom corresponding to the attached atom a t
  • the reverse reaction prediction model can predict the basic graph corresponding to the t-th action according to the following formula
  • MLP motif ( ⁇ ) represents the features output by the multi-layer perceptron for predicting the basic graph corresponding to the t-th action
  • ⁇ t represents the feature used for recognition Characteristics of the tth action.
  • the reverse reaction prediction model can predict the basic graph corresponding to the t-th action according to the following formula on the interface atom corresponding to the attached atom a t
  • ⁇ t represents the features used to identify the t-th action
  • ⁇ z ( ⁇ ) represents the basic graph
  • the embedding function of the feature Represents the basic graph corresponding to the t-th action.
  • the t-1th action is the last editing action or the synthesizer completion action, and the interface atom of the basic graph corresponding to the t-1th action only includes one interface atom, then based on the use of the t-1th
  • the characteristics of the subgraph obtained by editing the t-1 action and the characteristics of the attached atoms corresponding to the t-1th action determine the input features of the t-th action.
  • ⁇ atom ( ⁇ ) represents the embedding function of the characteristics of the attached atom
  • a t represents the attached atom corresponding to the t-th action.
  • the t-1th action is the last editing action or the synthesizer completion action, and the interface atoms of the basic graph corresponding to the t-1th action only include multiple interface atoms, then based on the use of the t-th
  • the characteristics of the subgraph obtained by editing one action, the characteristics of the basic graph corresponding to the t-1th action, and the characteristics of the attached atoms corresponding to the t-1th action determine the input features of the tth action.
  • the input feature input t corresponding to the t+1th action can be determined according to the following formula:
  • ⁇ z ( ⁇ ) represents the basic graph
  • the embedding function of the feature represents the basic graph corresponding to the t-th action
  • ⁇ atom ( ⁇ ) represents the embedding function of the characteristics of the attached atom
  • a t represents the attached atom corresponding to the t-th action.
  • the conversion path can be obtained. From this, the conversion path can be applied to the product molecular graph to obtain the reactant molecular graph.
  • Figure 3 is an example of a conversion path provided by an embodiment of the present application.
  • the action predicted by the prediction model is the synthon completion action
  • a1 ⁇ a3 represents the attachment atom
  • q1 ⁇ q4 represents the interface atom
  • z1 ⁇ z3 represents the basic graph
  • b represents the editing action
  • the corresponding editing object is the chemical bond labeled b
  • None (none) indicates that the edited state corresponding to this editing action is to delete the chemical bond labeled b.
  • Attached atoms are an interface for adding basic patterns (motifs).
  • the label of the first edit action predicted is the triplet ( ⁇ 1,b,none), and then the triplet ( ⁇ 1,b,none) is used as the input
  • the predicted label of the second action is ⁇ 2; then, sort all the attached atoms according to the order of their labels in the product molecule, and input the binary pairs ( ⁇ 3,a1), ( ⁇ 3,a3), ( ⁇ 3,a3), the labels of the actions predicted in sequence are triplet ( ⁇ 3,z1,q1), triplet ( ⁇ 3,z2,q2), triplet ( ⁇ 3,z3,q4), based on this, we get
  • the conversion path can be defined as the path shown in (b) of Figure 3: triplet ( ⁇ 1, b, none), ⁇ 2, triplet ( ⁇ 3, z1, q1), triplet ( ⁇ 3, z2, q2 ), triplet ( ⁇ 3, z3, q4), thus, by applying the conversion path to the product molecule, the reactant molecule shown on the right side of Figure 3
  • the editing sequence only includes one editing action, which is defined as the triplet ( ⁇ 1, b, none).
  • the synthesizer completion sequence includes three synthesizer completion actions, which are respectively defined as triplet ( ⁇ 3, z1, q1), triplet ( ⁇ 3, z2, q2), and triplet ( ⁇ 3, z3, q4) .
  • the interface atom indicated by the synthesizer completion action and the attachment atom for the synthesizer completion action can be used as connection nodes. It is worth noting that the interface atom indicated by the synthon completion action and the attached atom for the synthon completion action are the same atom in the reactant molecule. For example, when adding z1 based on the triplet ( ⁇ 3,z1,q1), a1 and q1 are the same atom (i.e. N atom) in the reactant molecule; similarly, adding z1 based on the triplet ( ⁇ 3,z2,q2) When z2, a2 and q2 are the same atom (i.e.
  • Figure 3 is only an example of the present application and should not be understood as a limitation of the present application.
  • the conversion path may also include other numbers of editing actions or synthon completion actions, or even other numbers of synthons or reactant molecules, which are not specifically limited in the embodiments of the present application.
  • Figure 4 is another schematic flow chart of the prediction method of reactant molecules provided by the embodiment of the present application.
  • ⁇ 1 means that the action predicted by the reverse reaction prediction model is the editing action
  • ⁇ 2 means that the action predicted by the reverse reaction prediction model is the editing completion action
  • ⁇ 3 means that the action predicted by the reverse reaction prediction model is the synthesizer completion action
  • a1 ⁇ a3 means attachment.
  • Atoms, q1 to q3 represent interface atoms
  • z1 to z3 represent basic graphs
  • g represents that the editing object corresponding to the editing action is the chemical bond with the label g
  • none (none) represents that the edited state corresponding to the editing action is deleted with the label g of chemical bonds.
  • Attached atoms are an interface for adding basic patterns (motifs).
  • the label of the first edit action predicted is the triplet ( ⁇ 1,g,none), and then the triplet ( ⁇ 1,g,none) is used as the input
  • the predicted label of the second action is ⁇ 2; then, sort all the attached atoms according to the order of their labels in the product molecule, and input the binary pairs ( ⁇ 3,a1), ( ⁇ 3,a3), ( ⁇ 3,a3), the labels of the actions predicted in sequence are triplet ( ⁇ 3,z1,q1), triplet ( ⁇ 3,z2,q2), triplet ( ⁇ 3,z3,q4), based on this, we get
  • the conversion path can be defined as the path shown in (b) of Figure 3: triplet ( ⁇ 1, b, none), ⁇ 2, triplet ( ⁇ 3, z1, q1), triplet ( ⁇ 3, z2, q2 ), triplet ( ⁇ 3, z3, q4), among which, a1 ⁇ a3, q1 ⁇ q3, z1 ⁇ z3 are shown in the figure
  • the editing sequence only includes one editing action, which is defined as the triplet ( ⁇ 1, g, none).
  • the synthesizer completion sequence includes three synthesizer completion actions, which are respectively defined as triplet ( ⁇ 3, z1, q1), triplet ( ⁇ 3, z2, q2), and triplet ( ⁇ 3, z3, q4) .
  • the interface atom indicated by the synthesizer completion action and the attachment atom for the synthesizer completion action can be used as connection nodes.
  • the interface atoms indicated by the synthesizer completion action and the The attached atom of the sub-completion action is the same atom in the reactant molecule.
  • the reactant prediction process includes an editing stage and a basic diagram adding stage.
  • the editing stage describes the bond and atomic changes from the product to the synthon, that is, the prediction process of the synthon, while the basic diagram adding stage adds appropriate components to the synthon.
  • the basic diagram completes the generation of reactants.
  • the input molecular graph is first encoded by the graph neural network (GNN) to obtain the output of the GNN; then, if the t-th action is an editing action, the recurrent neural network (RNN) is based on the t-th action corresponding to The output of GNN and the hidden state output by the previous node are used for action prediction; if the t-th action is an editing completion action or a synthetic sub-completion action, RNN is based on the output of GNN corresponding to the t-th action and the attachment corresponding to the t-th action. Atoms and the hidden state output by the previous node are used for action prediction.
  • GNN graph neural network
  • RNN gradually predicts the editing sequence until the editing completion action is predicted, ends the editing phase and starts the basic graph adding phase.
  • RNN adds basic graphs in sequence until all attached atoms are traversed.
  • the interface atoms (q1, q2, and q3) in the base graph and the attached atoms (a1, a2, and a3) in the synth/intermediate represent the same atom.
  • attaching the base graph to the composition When placed on a sub/intermediate, it merges them into a single atom.
  • a1 and q1 are the same atom (i.e., S atom) in the reactant molecule; similarly, adding z1 based on the triplet ( ⁇ 3, z2, q2)
  • z2, a2 and q2 are the same atom (i.e. O atom) in the reactant molecule; after adding z2, the interface atom q3 becomes the attached atom a3.
  • the triplet ⁇ 3, z3, q4
  • the conversion path may not include a start action or an edit completion action.
  • FIG. 5 shows a schematic flowchart of a training method 300 for a reverse reaction prediction model according to an embodiment of the present application.
  • the training method 300 can be executed by any electronic device with data processing capabilities.
  • the electronic device may be implemented as a server.
  • the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, and middleware. Cloud servers for basic cloud computing services such as software services, domain name services, security services, and big data and artificial intelligence platforms.
  • the servers can be connected directly or indirectly through wired or wireless communication methods. This application is not limited here. For the convenience of description, the prediction method provided by this application is explained below by taking a training device for a prediction model of reactant molecules as an example.
  • the training method 300 may include:
  • the conversion path includes an editing sequence and a synthesizer completion sequence; each editing action in the editing sequence is used to indicate the editing object and the post-edited state, and the editing object is the atom or chemical bond in the product molecule; for utilizing the A plurality of synthons of the product molecule obtained by editing the sequence.
  • the synthon completion sequence includes at least one synthon completion action corresponding to each of the multiple synthons. In the at least one synthon completion action, Each synthon completion action of is used to indicate a basic graph including a plurality of atoms or atomic edges connecting the plurality of atoms and interface atoms;
  • the reverse reaction prediction model can learn the potential relationship between the two subtasks of synthon prediction and synthon completion. This greatly improves the generalization performance of the model, reduces the prediction complexity of reactant molecules, and improves the generalization performance of reactant molecule prediction.
  • the structure of the sub-edge can reasonably construct a short and accurate conversion path, avoid the excessive length of the synthon completion sequence, reduce the difficulty of predicting reactant molecules and improve the prediction accuracy of reactant molecules, thereby improving the reaction Predictive performance of molecules.
  • the method 300 may further include:
  • a candidate reactant molecule corresponding to the product molecule is obtained; by comparing the molecular structures of the product molecule and the candidate reactant molecule, a basic graph dictionary is obtained; based on the basic graph dictionary, the training path is obtained.
  • the candidate reactant molecules may be all reactant molecules of the product molecule. That is, the candidate reactant molecule can be used to generate all reactant molecules of the product molecule.
  • a connection tree is constructed based on the basic graph dictionary; the connection tree includes a tree structure with the plurality of synthesizers as root nodes and the basic graphs in the basic graph dictionary as child nodes; by traversing the connection tree method to determine the shortest path as the training path.
  • connection tree represents the synthesizer and the basic pattern (motif) as a hierarchical tree structure, in which the synthon serves as the root node and the basic pattern (motif) serves as the child node.
  • An edge between two nodes in a connection tree indicates that two subgraphs are directly connected in the reactant molecule graph, where a triplet of attachment atoms, motifs, and interface atoms can be used to represent each edge.
  • connection tree a tree structure (ie, connection tree) is constructed to represent the connection relationship between the synthon and the basic graph.
  • the connection tree can be used to provide an effective strategy for building training paths and reduce training complexity.
  • a depth-first search can be used to traverse the entire connection tree, and the shortest path after traversal is determined as the training path.
  • the depth-first traversal method can refer to traversing starting from a certain vertex v in the tree structure in the following way:
  • depth-first search is to search the tree as "deeply" as possible. Its basic idea is: in order to find the solution to the problem, first choose a certain possible situation to explore forward (child nodes). During the exploration process, once it is found that the original choice does not meet the requirements, go back to the parent node and try again. Select another node and continue to explore forward, repeating this process until the optimal solution is obtained. In other words, the depth-first search starts from a vertex V0 and goes all the way along a road. If it is found that the target solution cannot be reached, then return to the previous node and then start from another road and go to the end. This way, try to go as deep as possible.
  • the concept of walking is the concept of depth first.
  • the molecular fragments in the candidate reactant other than multiple synthons are determined as multiple candidate subgraphs; if the first candidate subgraph among the multiple candidate subgraphs includes the first atom and second atom, and the first atom and the second atom belong to different rings, then break the chemical bond between the first atom and the second atom to obtain multiple first subgraphs; if the multiple candidate subgraphs
  • the second candidate subgraph in the graph includes a connected third atom and a fourth atom, one of the third atom and the fourth atom belongs to a ring, and the other of the third atom and the fourth atom is greater than or equal to the preset value, then the chemical bond between the third atom and the fourth atom is broken, and multiple second subgraphs are obtained; the first candidate subgraph is removed from the multiple candidate subgraphs.
  • the candidate subgraphs other than the second candidate subgraph, the plurality of first subgraphs and the plurality of second subgraphs are determined as basic graphs in the basic graph dictionary.
  • the synthon can be reconstructed as Reactant molecular diagram.
  • the motif can be viewed as a subgraph on the reactant molecular graph. Therefore, the embodiment of this application divides the basic pattern (motif) extraction process into the following steps:
  • reactants corresponding to the synthon may include molecules or reactants containing the synthon.
  • the ring involved in the embodiments of the present application may be a single ring, that is, there is only one ring in the molecule.
  • the rings involved in the embodiments of the present application may be cycloalkanes, and cycloalkanes may be classified based on the number of carbon atoms on the ring.
  • the number of carbon atoms in the ring is 3 to 4, it is called a small ring, when the number of carbon atoms in the ring is 5 to 6, it is called an ordinary ring, when the number of carbon atoms in the ring is 7 to 12, it is called a medium ring, and when the number of carbon atoms in the ring is 7 to 12, it is called a medium ring.
  • the number of carbon atoms is greater than 12, it is called a macrocycle.
  • a dictionary Z with a preset number of basic patterns (motifs) can be extracted.
  • a dictionary Z with a basic pattern number of 210 can be extracted.
  • the method 300 may further include:
  • the difference between the label of the predicted action in the conversion path and the label of the training action in the training path, the difference between the score of the editing object corresponding to the predicted action and the score of the editing object corresponding to the training action, the difference between the predicted action The difference between the corresponding edited state and the edited state corresponding to the training action, the difference between the basic graph indicated by the predicted action and the basic graph indicated by the training action, the interface atom indicated by the predicted action and the Differences between interface atoms indicated by training actions.
  • the reverse reaction prediction is modeled as a molecule generation problem based on autoregression. That is, given a product molecule G P , for each step t, the autoregressive model obtains a new graph structure G t based on the historical graph structure.
  • the generation process of reactant molecular graphs can be defined as the following joint probability likelihood function:
  • G R represents the reactant molecule
  • N is the length of the conversion path
  • G t is the intermediate molecular fragment corresponding to the t-th action
  • G 0 G P .
  • the intermediate molecular fragment G t is not directly generated by the reverse reaction prediction model, but the reverse reaction prediction model generates new graph editing actions, editing objects (i.e. chemical bonds, atoms or basic graphs) and their edited ones based on historical actions. state (that is, a new chemical bond type or interface atom), and then apply it to the intermediate molecular fragment in the previous step to obtain a new intermediate molecular fragment.
  • editing objects i.e. chemical bonds, atoms or basic graphs
  • state that is, a new chemical bond type or interface atom
  • a cross-entropy loss can be used to optimize the difference between the label of the predicted action in the conversion path and the label of the training action in the training path, the difference between the edited state corresponding to the predicted action and the edited state corresponding to the training action, the The difference between the base graph indicated by the predicted action and the base graph indicated by the training action, the difference between the interface atom indicated by the predicted action and the interface atom indicated by the training action, using binary cross-entropy loss Optimize the difference between the score of the editing object corresponding to the predicted action and the score of the editing object corresponding to the training action.
  • the loss between this conversion path and the training path can be determined using the following formula:
  • N 1 represents the length of the editing sequence or the length of the sequence formed by the editing sequence and the editing completion action
  • N 2 represents the length of the editing sequence and the synthesizer completion sequence.
  • S320 in the training method 300 may refer to the implementation of S220 in the prediction method 200. To avoid duplication, it will not be described again here.
  • the teacher-forcing strategy can be used to train the model.
  • RNN has two training modes, namely free-running mode and teacher-forcing mode.
  • Free-running mode refers to the output of the previous state as the input of the next state.
  • the working principle of the teacher forcing mode is: at time t of the training process, use the expected output or actual output y(t) of the training data set as the input x(t+1) of the next time step, instead of using the output generated by the model h(t).
  • the hyperparameters in the reverse reaction prediction model can be adjusted, such as the number of layers of GNN and GRU.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not be used in this application.
  • the implementation of the examples does not constitute any limitations.
  • FIG. 6 is a schematic block diagram of a reactant molecule prediction device 400 provided by an embodiment of the present application.
  • the predicting device 400 of reactant molecules may include:
  • the extraction unit 410 is used to extract features of product molecules to obtain the characteristics of the product molecules;
  • the prediction unit 420 is used to predict a conversion path from the product molecule to multiple reactant molecules based on the characteristics of the product molecule and using a reverse reaction prediction model; the conversion path includes an editing sequence and a synthon completion sequence; the editing The sequence is a sequence formed by an editing action, and the synthesizer completion sequence is a sequence formed by a synthesizer completion action;
  • the editing unit 430 is configured to edit the editing objects indicated by each editing action in the editing sequence according to the edited status of each editing action indication, and obtain multiple synthons corresponding to the product molecule, and the editing object is Atoms or chemical bonds in a product molecule;
  • the adding unit 440 is configured to, for each synthesizer in the plurality of synthesizers, based on at least one synthesizer completion action corresponding to the respective synthesizer in the synthesizer completion sequence, according to the at least one synthesizer completion action
  • the interface atoms of each synthon completion action instruction in are added to the basic diagram of each synthon completion action instruction to obtain multiple reactant molecules corresponding to the multiple synthons.
  • the basic diagram includes multiple atoms or uses on the atomic edges connecting the multiple atoms.
  • the prediction unit 420 is specifically used to:
  • the input feature of the tth action is obtained, where t is an integer greater than 1;
  • the t-th action is predicted until the action predicted by the reverse reaction prediction model is a synthesizer completion action and has been traversed When all attached atoms on the multiple synthons and all attached atoms on the basic graph added for the multiple synthons are completed, the conversion path is obtained;
  • the hidden features of the t actions are the same as the actions predicted by the reverse reaction prediction model before the t-th action.
  • the prediction unit 420 is specifically used to:
  • the k first prediction results with the highest score are obtained from the prediction results of the t-1th action
  • the conversion path should be obtained, including:
  • the t-th action is predicted, and according to the beam search method of the hyperparameter k, the predicted Obtain the k second prediction results with the highest scores among the 2k prediction results;
  • the t+1th action is predicted until the action predicted by the reverse reaction prediction model is The conversion path is obtained when the synthesizer completion action is completed and all attached atoms on the multiple synthons and all attached atoms on the basic graph added for the multiple synthons have been traversed.
  • the prediction unit 420 is specifically used to:
  • the t-1th action is an editing action
  • determine the input features of the t-th action and based on the characteristics of the t-th action Input features and the hidden features of the t-th action, and use the reverse reaction prediction model to predict the editing object and the edited state indicated by the t-th action until the action predicted by the reverse reaction prediction model is the edit.
  • the optimal editing action in the sequence is performed, the editing sequence is obtained;
  • the t-1th action is the last editing action or the composite sub-completion action, then based on the characteristics of the subgraph edited using the t-1th action and the t-1th action corresponding Attach the characteristics of the atoms, determine the input characteristics of the t-th action, and predict the basic graph and interface atoms indicated by the t-th action based on the input characteristics of the t-th action and the hidden features of the t-th action. ; Until the action predicted by the reverse reaction prediction model is a synthon completion action, and all attached atoms on the multiple synthons and on the basic graph added for the multiple synthons have been traversed, the synthesis is obtained Subcompletion sequence.
  • the editing action is represented by the following tags: an action tag used to indicate editing, a tag used to indicate the editing object, and a tag used to indicate the edited state;
  • the synthesizer completion action is represented by the following tags Representations: Action tags indicating synthon completion, tags indicating base graphs, and tags indicating the atoms used for interfaces.
  • the edited state indicated by the editing action is to change the number of charges on the atom or change the number of hydrogen atoms on the atom; if the editing action indicates If the indicated editing object is a chemical bond, then the edited state indicated by the editing action is any of the following: adding a chemical bond, deleting a chemical bond, or changing the type of a chemical bond.
  • Figure 7 is a schematic block diagram of the training device 500 of the reverse reaction prediction model provided by the embodiment of the present application.
  • the training device 500 of the reverse reaction prediction model may include:
  • the extraction unit 510 is used to extract features of product molecules to obtain the characteristics of the product molecules
  • the prediction unit 520 is used to predict the conversion path between the product molecule and multiple reactant molecules based on the characteristics of the product molecule and using a reverse reaction prediction model;
  • the conversion path includes an editing sequence and a synthesizer completion sequence; each editing action in the editing sequence is used to indicate the editing object and the post-edited state, and the editing object is the atom or chemical bond in the product molecule; for utilizing the A plurality of synthons of the product molecule obtained by editing the sequence.
  • the synthon completion sequence includes at least one synthon completion action corresponding to each of the multiple synthons. In the at least one synthon completion action, Each synthon completion action of is used to indicate a basic graph including a plurality of atoms or atomic edges connecting the plurality of atoms and interface atoms;
  • the training unit 530 is used to train the reverse reaction prediction model based on the loss between the conversion path and the training path.
  • the prediction unit 520 before the prediction unit 520 is used to obtain the conversion path, it is used to:
  • the training path is obtained.
  • the prediction unit 520 is specifically used to:
  • connection tree based on the basic graph dictionary;
  • the connection tree includes a tree structure with the plurality of synthons as root nodes and the basic graphs in the basic graph dictionary as child nodes;
  • the shortest path is determined as the training path.
  • the prediction unit 520 is specifically used to:
  • the first candidate subgraph among the plurality of candidate subgraphs includes a first atom and a second atom, and the first atom and the second atom belong to different rings, disconnect the first atom and the second atom. chemical bonds between them, and multiple first subgraphs are obtained;
  • a second candidate subgraph among the plurality of candidate subgraphs includes a connected third atom and a fourth atom, one of the third atom and the fourth atom belongs to a ring, and the third atom and the fourth atom If the degree of another atom in the atom is greater than or equal to the preset value, the chemical bond between the third atom and the fourth atom is broken to obtain multiple second subgraphs;
  • the training unit 530 is used to train the inverse reaction prediction model based on the loss between the conversion path and the training path, and is also used to:
  • the difference between the label of the predicted action in the conversion path and the label of the training action in the training path, the difference between the score of the editing object corresponding to the predicted action and the score of the editing object corresponding to the training action, the difference between the predicted action The difference between the corresponding edited state and the edited state corresponding to the training action, the difference between the basic graph indicated by the predicted action and the basic graph indicated by the training action, the interface atom indicated by the predicted action and the Differences between interface atoms indicated by training actions.
  • the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be repeated here.
  • the reactant molecule prediction device 400 may correspond to the corresponding subject in executing the method 200 of the embodiment of the present application, and each unit in the prediction device 400 is respectively intended to implement the corresponding process in the method 200; similarly, the The training device 500 of the reverse reaction prediction model may correspond to the corresponding subject in executing the method 300 of the embodiment of the present application, and each unit in the training device 500 is respectively intended to implement the corresponding process in the method 300; for the sake of brevity, no further details will be given here. .
  • each unit in the prediction device 400 or the training device 500 involved in the embodiment of the present application can be separately or entirely combined into one or several other units, or some of the units can be further disassembled. It is divided into multiple units with smaller functions, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present application, the prediction device 400 or the training device 500 may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by multiple units in cooperation.
  • a general-purpose computing device including a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), etc.
  • CPU central processing unit
  • RAM random access storage medium
  • ROM read-only storage medium
  • Run a computer program capable of executing each step involved in the corresponding method to construct the prediction device 400 or the training device 500 involved in the embodiment of the present application, and implement the method of the embodiment of the present application.
  • the computer program can be recorded on, for example, a computer-readable storage medium, loaded into an electronic device through the computer-readable storage medium, and run therein to realize the implementation of the present application. Corresponding methods of the examples.
  • the units mentioned above can be implemented in the form of hardware, can also be implemented in the form of instructions in the form of software, or can be implemented in the form of a combination of software and hardware.
  • each step of the method embodiments in the embodiments of the present application can be completed by integrated logic circuits of hardware in the processor and/or instructions in the form of software.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application can be directly embodied in hardware.
  • the execution of the decoding processor is completed, or the execution is completed using a combination of hardware and software in the decoding processor.
  • the software can be located in a mature storage medium in this field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in combination with its hardware.
  • FIG. 8 is a schematic structural diagram of an electronic device 600 provided by an embodiment of the present application.
  • the electronic device 600 at least includes a processor 610 and a computer-readable storage medium 620 .
  • the processor 610 and the computer-readable storage medium 620 may be connected through a bus or other means.
  • the computer-readable storage medium 620 is used to store a computer program 621.
  • the computer program 621 includes computer instructions.
  • the processor 610 is used to execute the computer instructions stored in the computer-readable storage medium 620.
  • the processor 610 is the computing core and the control core of the electronic device 600. It is suitable for implementing one or more computer instructions. Specifically, it is suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding functions.
  • the processor 610 may also be called a central processing unit (Central Processing Unit, CPU).
  • the processor 610 may include, but is not limited to: a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the computer-readable storage medium 620 can be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; optionally, it can also be at least one located far away from the aforementioned processor 610 Computer-readable storage media.
  • the computer-readable storage medium 620 includes, but is not limited to: volatile memory and/or non-volatile memory.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the electronic device 600 may also include a transceiver 630 .
  • the processor 610 can control the transceiver 630 to communicate with other devices. Specifically, it can send information or data to other devices, or receive information or data sent by other devices.
  • Transceiver 630 may include a transmitter and a receiver.
  • the transceiver 630 may further include an antenna, and the number of antennas may be one or more.
  • bus system where in addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.
  • the electronic device 600 can be any electronic device with data processing capabilities; the first computer instructions are stored in the computer-readable storage medium 620; the computer-readable storage medium is loaded and executed by the processor 610 The first computer instructions stored in 620 are used to implement the corresponding steps in the method embodiment shown in Figure 1; in specific implementation, the first computer instructions in the computer-readable storage medium 620 are loaded by the processor 610 and execute the corresponding steps, as To avoid repetition, we will not go into details here.
  • embodiments of the present application also provide a computer-readable storage medium (Memory).
  • the computer-readable storage medium is a memory device in the electronic device 600 and is used to store programs and data.
  • computer-readable storage medium 620 may include a built-in storage medium in the electronic device 600 , and of course may also include an extended storage medium supported by the electronic device 600 .
  • the computer-readable storage medium provides storage space that stores the operating system of the electronic device 600 .
  • one or more computer instructions suitable for being loaded and executed by the processor 610 are also stored in the storage space. These computer instructions may be one or more computer programs 621 (including program codes).
  • embodiments of the present application further provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • computer program 621 the data processing device 600 may be a computer.
  • the processor 610 reads the computer instructions from the computer-readable storage medium 620, and the processor 610 executes the computer instructions, so that the computer executes the methods provided in the above various optional ways.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transmitted from a website, computer, server, or data center to Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) methods.
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless such as infrared, wireless, microwave, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Chemical & Material Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Physics & Mathematics (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Medical Informatics (AREA)
  • Pharmacology & Pharmacy (AREA)
  • Medicinal Chemistry (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Organic Low-Molecular-Weight Compounds And Preparation Thereof (AREA)

Abstract

本申请提供了一种反应物分子的预测方法、训练方法、装置以及电子设备,其涉及化学领域中的逆向反应技术领域。该方法包括:对产物分子进行特征提取,得到该产物分子的特征;基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;按照该转换路径预测合成子和补全合成子,得到与该产物分子对应的多个反应物分子。本申请提供的方法不仅能够降低反应物分子的预测复杂度并提升反应物分子预测的泛化性能,还能够提升反应物分子的预测性能。

Description

反应物分子的预测方法、训练方法、装置以及电子设备
本申请要求于2022年08月09日提交中国专利局、申请号为202210952642.6、发明名称为“反应物分子的预测方法、训练方法、装置以及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及化学的逆向反应领域,并且更具体地,涉及反应物分子的预测方法、训练方法、装置以及电子设备。
背景技术
有机化学逆合成反应物预测是新药研发和新型材料制造中的关键一步,其目的是寻找一组用于合成产物分子的且在商业上可用的反应物分子。传统的方法利用反应模板与反应物分子进行匹配来得到反应物分子,但反应模板需要由专业研究者人工提取,其过程非常耗时且反映模板无法覆盖所有的反应类型。近年来,深度学习技术的发展使得从有机化学反应大数据库中学习潜在的反应类型成为可能。因此,使用深度学习技术构建强有力的逆向反应预测模型就显得尤为重要。
截止目前,通常采用的模型结构一般有两种模型,一种是基于简化分子线性输入系统(Simplified Molecular Input Line Entry System,SMILES)序列表示的序列翻译模型,SMILES是一种用于明确描述分子结构的规范。另一种是基于图表示的图生成模型。
图生成模型一般将有机化学逆反应预测任务分为两个子任务,即合成子识别和补全合成子。通常情况下,可以通过构建一个图神经网络来识别合成子进而得到产物分子的合成子,并通过构建一个图变分自编码器逐个原子补全合成子。然而,通过构建两个独立的网络分别用于合成子识别和补全合成子,不仅增加了预测复杂度,而且由于两个子任务有着不同的优化目标,无法达到较好的泛化性能。此外,逐个原子补全合成子时,其复杂度较高进而限制了预测性能。
发明内容
本申请实施例提供了一种反应物分子的预测方法、训练方法、装置以及电子设备,不仅能够降低反应物分子的预测复杂度并提升反应物分子预测的泛化性能,还能够提升反应物分子的预测性能。
第一方面,本申请提供了一种反应物分子的预测方法,包括:
对产物分子进行特征提取,得到该产物分子的特征;
基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;该转换路径包括编辑序列和合成子补全序列;
按照该编辑序列中的各个编辑动作指示的编辑后的状态,对该各个编辑动作指示的编辑对象进行编辑,得到该产物分子对应的多个合成子,该编辑对象为该产物分子中的原子或化学键;
针对该多个合成子中的各个合成子,基于该合成子补全序列中与该各个合成子对应的至少一个合成子补全动作,按照该至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加该各个合成子补全动作指示的基本图,得到与该多个合成子对应的多个反应物分子,该基本图包括多个原子或用于连接该多个原子的原子边。
第二方面,本申请提供了一种逆向反应预测模型的训练方法,包括:
对产物分子进行特征提取,得到该产物分子的特征;
基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;
其中,该转换路径包括编辑序列和合成子补全序列;该编辑序列中的各个编辑动作用于指示编辑对象和编辑后的状态,该编辑对象为该产物分子中的原子或化学键;针对利用该编辑序列得到的该产物分子的多个合成子,该合成子补全序列包括与该多个合成子中的各个合成子对应的至少一个合成子补全动作,该至少一个合成子补全动作中的各个合成子补全动作用于指示基本图和接口原子,该基本图包括多个原子或用于连接该多个原子的原子边;
基于该转换路径和训练路径之间的损失,训练该逆向反应预测模型。
第三方面,本申请提供了一种反应物分子的预测装置,包括:
提取单元,用于对产物分子进行特征提取,得到该产物分子的特征;
预测单元,用于基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;该转换路径包括编辑序列和合成子补全序列;
编辑单元,用于按照该编辑序列中的各个编辑动作指示的编辑后的状态,对该各个编辑动作指示的编辑对象进行编辑,得到该产物分子对应的多个合成子,该编辑对象为该产物分子中的原子或化学键;
添加单元,用于针对该多个合成子中的各个合成子,基于该合成子补全序列中与该各个合成子对应的至少一个合成子补全动作,按照该至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加该各个合成子补全动作指示的基本图,得到与该多个合成子对应的多个反应物分子,该基本图包括多个原子或用于连接该多个原子的原子边。
第四方面,本申请提供了一种逆向反应预测模型的训练装置,包括:
提取单元,用于对产物分子进行特征提取,得到该产物分子的特征;
预测单元,用于基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;
其中,该转换路径包括编辑序列和合成子补全序列;该编辑序列中的各个编辑动作用于指示编辑对象和编辑后的状态,该编辑对象为该产物分子中的原子或化学键;针对利用该编辑序列得到的该产物分子的多个合成子,该合成子补全序列包括与该多个合成子中的各个合成子对应的至少一个合成子补全动作,该至少一个合成子补全动作中的各个合成子补全动作用于指示基本图和接口原子,该基本图包括多个原子或用于连接该多个原子的原子边;
训练单元,用于基于该转换路径和训练路径之间的损失,训练该逆向反应预测模型。
第五方面,本申请提供了一种电子设备,包括:
处理器,适于实现计算机指令;以及,
计算机可读存储介质,计算机可读存储介质存储有计算机指令,计算机指令适于由处理器加载并执行上述第一方面涉及的反应物分子的预测方法或上述第二方面涉及的逆向反应预测模型的训练方法。
第六方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机指令,该计算机指令被计算机设备的处理器读取并执行时,使得计算机设备执行上述第一方面涉及的反应物分子的预测方法或上述第二方面涉及的逆向反应预测模型的训练方法。
第七方面,本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述第一方面涉及的反应物分子的预测方法或上述第二方面涉及的逆向反应预测模型的训练方法。
基于以上技术方案,通过引入用于对该产物分子到多个反应物分子之间的转换路径进行预测的逆向反应预测模型,能够将合成子的预测任务和合成子补全的预测任务进行合并 处理,即本申请实施例引入的逆向反应预测模型能够学习到合成子预测和补全合成子两个子任务之间的潜在关系,从而极大地提高了模型的泛化性能,能够降低反应物分子的预测复杂度并提升反应物分子预测的泛化性能;此外,通过引入基本图,并将基本图设计为包括多个原子或用于连接该多个原子的原子边的结构,能够合理的构建简短且准确的转换路径,避免了合成子补全序列的长度过长,降低了反应物分子的预测难度以及提升反应物分子的预测准确度,进而能够提升反应物分子的预测性能。
此外,通过提升反应物分子的预测性能,还能够得到以下技术效果:
1、可以为设计的药物或新材料分子规划合成路径,提高药物或新材料分子的研究效率。
2、可以揭示一些潜在的科学规律,提供新的科学知识。
3、可以提供比专业研究者更精准的合成路线规划,不仅可以在缺乏反应模板的情况下预测出可靠的反应物分子,并且能够预测出专业研究者尚未明确的反应类型,大大提高新药物和新材料的研发效率。
附图说明
图1是本申请实施例提供的系统框架的示例。
图2是本申请实施例提供的反应物分子的预测方法的示意性流程图。
图3是本申请实施例提供的转换路径的示例。
图4是本申请实施例提供的反应物分子的预测方法的另一示意性流程图。
图5是本申请实施例提供的逆向反应预测模型的训练方法的示意性流程图。
图6是本申请实施例提供的反应物分子的预测装置的示意性框图。
图7是本申请实施例提供的逆向反应预测模型的训练装置的示意性框图。
图8是本申请实施例提供的电子设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
本申请提供的方案可涉及人工智能(Artificial Intelligence,AI)技术领域。
具体地,本申请提供的方案可涉及化学领域中基于AI进行逆向反应预测的技术领域。
其中,AI是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
应理解,人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
随着人工智能技术研究和进步,人工智能技术在多个领域展开研究和应用,例如常见的智能家居、智能穿戴设备、虚拟助理、智能音箱、智能营销、无人驾驶、自动驾驶、无人机、机器人、智能医疗、智能客服等,相信随着技术的发展,人工智能技术将在更多的领域得到应用,并发挥越来越重要的价值。
本申请实施例可涉及人工智能技术中的计算机视觉(Computer Vision,CV)技术。
具体地,本申请实施例涉及化学领域中基于CV识别的结果进行逆向反应预测的技术领域。
其中,计算机视觉是一门研究如何使机器“看”的科学,更进一步的说,就是指用摄 影机和电脑代替人眼对目标进行识别、预测和测量等机器视觉,并进一步做图形处理,使电脑处理成为更适合人眼观察或传送给仪器检测的图像。作为一个科学学科,计算机视觉研究相关的理论和技术,试图建立能够从图像或者多维数据中获取信息的人工智能系统。计算机视觉技术通常包括图像处理、图像识别、图像语义理解、图像检索、OCR、视频处理、视频语义理解、视频内容/行为识别、三维物体重建、3D技术、虚拟现实、增强现实、同步定位与地图构建等技术,还包括常见的人脸识别、指纹识别等生物特征识别技术。
本申请实施例也可以涉及人工智能中的机器学习(Machine Learning,ML)。
具体地,本申请实施例可涉及利用机器学习的预测模型进行逆向反应预测的技术领域。
其中,ML是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。
图1是本申请实施例提供的系统框架100的示例。
该系统框架100可以是一个应用程序系统,本申请实施例对该应用程序的具体类型不加以限定。该系统框架100包括:终端131、终端132和服务器集群110。终端131和终端132均可通过无线或有线网络120与服务器集群110相连。
终端131和终端132可以是智能手机、游戏主机、台式计算机、平板电脑、电子书阅读器、MP4播放器、MP4播放器和膝上型便携计算机中的至少一种。终端131和终端132安装和运行有应用程序。该应用程序可以是在线视频程序、短视频程序、图片分享程序、声音社交程序、动漫程序、壁纸程序、新闻推送程序、供求信息推送程序、学术交流程序、技术交流程序、政策交流程序、包含评论机制的程序、包含观点发布机制的程序、知识分享程序中的任意一种。终端131和终端132可以分别是用户141、用户142使用的终端,终端131和终端132中运行的应用程序内登录有用户帐号。
服务器集群110包括一台服务器、多台服务器、云计算平台和虚拟化中心中的至少一种。服务器集群110用于为应用程序(例如终端131和终端132上的应用程序)提供后台服务。可选地,服务器集群110承担主要计算工作,终端131和终端132承担次要计算工作;或者,服务器集群110承担次要计算工作,终端131和终端132承担主要计算工作;或者,终端131和终端132和服务器集群110之间采用分布式计算架构进行协同计算。例如,本申请涉及的计算工作可以是与有机化学逆合成反应物预测相关的计算工作或相关的辅助工作。
可选地,以系统框架100是网页浏览系统为例,该服务器集群110包括:接入服务器112、网页服务器111和数据服务器113。接入服务器112可以为一个或多个,接入服务器112可以就近部署在不同的城市中,接入服务器112用于接收终端131和终端132的服务请求,并将服务请求转发给相应的服务器进行处理。网页服务器111是用于向终端131和终端132提供网页的服务器,该网页中集成有埋点代码;数据服务器113是用于接收终端131和终端132上报的数据(例如业务数据等)。
有机化学逆合成反应物预测是新药研发和新型材料制造中的关键一步,其目的是寻找一组用于合成产物分子的且在商业上可用的反应物分子。传统的方法利用反应模板与反应物分子进行匹配来得到反应物分子,但反应模板需要由专业研究者人工提取,其过程非常耗时且反映模板无法覆盖所有的反应类型。近年来,深度学习技术的发展使得从有机化学反应大数据库中学习潜在的反应类型成为可能。因此,使用深度学习技术构建强有力的逆向反应预测模型就显得尤为重要。
截止目前,通常采用的模型结构一般有两种模型,一种是基于简化分子线性输入系统(Simplified Molecular Input Line Entry System,SMILES)序列表示的序列翻译模型, SMILES是一种用于明确描述分子结构的规范。另一种是基于图表示的图生成模型。
图生成模型一般将有机化学逆反应预测任务分为两个子任务,即合成子识别和补全合成子。通常情况下,可以通过构建一个图神经网络来识别合成子进而得到产物分子的合成子,并通过构建一个图变分自编码器逐个原子补全合成子。然而,通过构建两个独立的网络分别用于合成子识别和补全合成子,不仅增加了预测复杂度,而且由于两个子任务有着不同的优化目标,无法达到较好的泛化性能。此外,逐个原子补全合成子时,其复杂度较高进而限制了预测性能。
鉴于上述问题,可以考虑采用预先提取的离去基团来补全合成子,以降低补全合成子的难度,进而提升逆反应预测的性能。其中,离去基团(leaving group)在化学反应中从一较大分子中脱离的原子或官能基,官能团是决定有机化合物的化学性质的原子或原子团。常见的官能团包括碳碳双键、碳碳三键、羟基、羧基、醚键、醛基等。
但是,采用预先提取的离去基团来补全合成子,并不会提升模型的泛化性能;此外,受限于离去基团的特性,使得样本的分布极不平衡,从而限制了反应物分子的预测效果。
此外,可以通过一个端到端模型联合学习两个子任务,即将合成子识别和补全合成子两个子任务集成到一个端到端模型,并采用逐个原子或苯环来补全合成子。其中,端到端模型指可以通过单个优化目标进行训练优化的模型。
然而,端到端模型的架构虽然能够使得模型能够达到更优的泛化性能,但采用单个原子和苯环等小单元来补全合成子需要预测更长的图编辑序列,这加大了预测的难度,进而使得排名第一的类别准确率(top-1accuracy)无法达到技术发展最新水平(state of the art,sota),其中,排名第一的类别准确率指排名第一的类别与实际结果相符的准确率。
有鉴于此,本申请实施例提供了一种反应物分子的预测方法、训练方法、装置以及电子设备,不仅能够降低反应物分子的预测复杂度并提升反应物分子预测的泛化性能,还能够提升反应物分子的预测性能。具体的,本申请实施例设计了一个端到端的逆向反应预测模型,以联合优化合成子预测和补全合成子两个子任务,具体的,可以将合成子预测任务构建为:预测能够表征产物分子到合成子的转换过程的编辑序列,将补全合成子预测任务构建为:预测能够表征合成子到反应物分子的转换过程的合成子补全序列,并通过编辑序列和合成子补全序列构建出能够表征产物分子到反应物分子之间转换过程的转换路径。
值得注意的是,随着数据量的增长,本申请实施例提供的方案可以轻松扩展到更复杂以及更多样的化学反应模型。示例性地,本申请实施例提供的逆向反应预测模型可以拓展到多步逆反应预测任务,例如,可以采用蒙特卡洛树搜索算法等将本申请实施例提供的逆向反应预测模型拓展到多步逆反应预测任务。
此外,本申请实施例还通过引入基本图,能够极大地避免离去基团存在的样本极不平衡的问题导致的反应物分子的预测效果受限的问题以及解决利用原子补全合成子时存在的预测复杂度过高的问题,进而能够提高逆向反应预测模型的预测准确率。
图2示出了根据本申请实施例的反应物分子的预测方法200的示意性流程图,该预测方法200可以由任何具有数据处理能力的电子设备执行。例如,该电子设备可实施为服务器。服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、以及大数据和人工智能平台等基础云计算服务的云服务器,服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。为便于描述,下文以反应物分子的预测装置为例对本申请提供的预测方法进行说明。
如图2所示,该预测方法200可包括:
S210,对产物分子进行特征提取,得到该产物分子的特征。
示例性地,可以通过简化分子线性输入系统(Simplified Molecular Input Line Entry System,SMILES)或图神经网络(Graph Neural Networks,GNN)对产物分子进行特征提 取,得到该产物分子的特征。当然,也可以其他具有类型功能的模型或框架产物分子进行特征提取,本申请实施例对此不作具体限定。
示例性地,可以为根据该产物分子中各个原子的特征确定特征该产物分子的特征。例如,可以利用一个全局注意力池化函数,对所有的原子的特征计算得到产物分子的特征。
示例性地,可以对该各个原子的原始特征、以及该各个原子和该各个原子的邻居节点之间的化学键的原始特征进行编码,得到该各个原子的特征。例如,可以利用MPNN对该各个原子的原始特征、以及该各个原子和该各个原子的邻居节点之间的化学键的原始特征进行编码,得到该各个原子的特征。其中,该各个原子的原始特征用于表征以下信息中的至少一项:原子的类型(如C、N、O、S等)、化学键的度、手性和氢原子个数等信息。该化学键的原始特征用于表征以下信息中的至少一项:化学键类型(如单键、双键、三键和芳香键等)、构型和芳香性等信息。
示例性地,该产物分子的特征还可以包括用于表示该产物分子中的化学键的类型的特征。例如,该产物分子中的化学键的类型包括但不限于:单键、双键、三键和无化学键。
示例性地,该产物分子的特征可以体现为向量的形式,也可以体现为矩阵的形式,当然,也可以替换为数组或其他格式的信息,本申请对此不作具体限定。
下面以特征向量为例对该产物分子的特征进行示例性说明。
示例性地,可以将包含n个原子和m个化学键的分子表示为图结构G=(V,E),其中V是大小为n的原子集合,E是大小为m的化学键集合。每一个原子v∈V都有一个特征向量xv,代表原子的类型(如C、N、O、S等)、化学键的度、手性和氢原子个数等信息。同样地,每一个化学键e∈E都有一个特征向量xv,u,包含化学键类型(如单键、双键、三键和芳香键等)、构型和芳香性等信息。此外,还可以定义一个4维独热(one-hot)向量来表示分子图中化学键的类型,即单键、双键、三键和无化学键。one-hot向量为有且只有一个元素为1,其余元素都为0的向量。所有的原子和化学键都有一个标签s∈{0,1}用于表示其是否为产物分子转换为合成子时涉及的编辑对象。
示例性地,可以先使用L层的消息传递神经网络(Message Passing Neural Network,MPNN)对产物分子G中的每一个原子进行编码,得到产物分子中的每一个原子的特征向量。MPNN是可以应用于图上的监督学习框架。进一步的,可以利用多层感知机(Multilayer Perceptron,MLP)对产物分子G中的每一个化学键进行编码,得到每一个化学键的特征向量,MLP是一种前馈人工神经网络模型,MLP可以将输入的多个数据集映射到单一的输出的数据集上。
示例性地,原子的特征向量hv和化学键的特征向量hvu可以通过下式计算得到:

其中,MPNN(·)表示消息传递神经网络,G表示产物分子的图结构,L表示MPNN(·)的层数,表示MPNN(·)的第L层输出的原子v的特征向量,xv表示对原子v编码前的特征向量,xv,u表示对原子v和原子u之间的化学键进行编码前的特征向量,表示原子v的邻居节点集合,hv,u表示对原子v和原子u之间的化学键进行编码后的特征向量,MLPbond(·)表示多层感知机,||表示拼接操作,表示MPNN(·)的第L层输出的原子u的特征向量。
进一步的,为了方便后续的任务,可将hv,u表示为自环的形式,即:
更进一步的,为了简化计算,将原子和化学键表示为相同的形式,即:
其中,i是原子的标签或化学键的标签。
示例性地,原子的标签可以是原子的索引,化学键的标签可以是化学键的索引。
在获取原子的特征向量后,可以利用一个全局注意力池化函数,从所有的原子的特征 向量计算得到产物分子的特征向量hG。值得注意的是,有可能需要用到合成子的特征向量,与hG的获取方式相同,也可以利用一个全局注意力池化函数,从合成子包括所有的原子的特征向量计算得到合成子的特征向量hsyn
当然,在其他可替代实施例中,针对产物分子的编码或合成子的编码过程中,还可以引入对比学习策略,如遮蔽分子图的图结构或特征等,即可以通过扩展特征维度提升反应物分子的预测性能。
S220,基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;该转换路径包括编辑序列和合成子补全序列。
示例性地,该编辑序列为编辑动作形成的序列,该合成子补全序列为合成子补全动作形成的序列。
换言之,将逆向反应预测模型的预测任务定义为一个反应物分子生成任务。即逆向反应预测模型预测任务为:预测一个描述从产物分子图到反应物分子图转换路径的转换路径,该转换路径通过针对产物分子的编辑动作和针对合成子的合成子补全动作进行定义,即通过由编辑动作形成的(Edit)序列和由合成子补全动作形成的合成子补全序列构建转换路径,由此,可以为每一个产物分子预先定义一个描述从产物分子图到反应物分子图转换路径的转换路径。合成子补全动作也可以称为基本图添加(AddingMotif)动作,即合成子补全序列也可称为基本图添加序列。
或者说,该转换路径包含编辑序列和合成子补全序列。其中,编辑序列用于描述从产物分子到合成子的化学键和原子变化。合成子补全序列用于描述使用基本图(motif)补全合成子的过程。针对编辑序列,通过引入编辑动作来表示从产物到合成子的每一次变化,针对合成子补全序列,通过引入合成子补全动作来描述使用基本图(motif)补全合成子的过程中的每一次补全操作。
示例性地,该编辑动作为该产物分子转化为该产物分子的多个合成子的过程中的编辑该产物分子中的原子或编辑化学键的动作。
示例性地,该合成子补全动作为该多个合成子到该多个反应物分子的过程中添加基本图的动作。
示例性地,该编辑序列还可以包括编辑完成动作,例如,该转换路径依次包括至少一个编辑动作、编辑完成动作以及至少一个合成子补全动作。该编辑完成动作用于连接或区分该至少一个编辑动作和该至少一个合成子补全动作。换言之,该编辑完成动作用于触发逆向反应预测模型发起合成子补全任务。本申请实施例中,通过创新性地引入了编辑完成动作,以将至少一个编辑动作连接至至少一个合成子补全动作,进而构建出转换路径。
示例性地,该编辑序列还可以包括开始(Start)动作,例如,该转换路径依次包括该开始动作、至少一个编辑动作、编辑完成动作以及至少一个合成子补全序列。该开始动作用于触发逆向反应预测模型发起合成子预测任务或用于触发逆向反应预测模型发起反应物预测任务。
当然,在其他可替代实施例中,也可以将该编辑完成动作作为合成子补全序列中中的动作,本申请对此不作具体限定。
值得注意的是,本申请涉及的逆向反应预测模型可以是任意一种深度学习或机器学习的用于识别的模型,本申请实施例对其具体类型不作限定。
例如,该逆向反应预测模型包括但不限于:传统学习模型、集成学习模型或深度学习模型。可选的,传统学习模型包括但不限于:树模型(回归树)或逻辑回归(logistic regression,LR)模型;集成学习模型包括但不限于:梯度提升算法的改进模型(XGBoost)或随机森林模型;深度学习模型包括但不限于:神经网络、动态贝叶斯网络(Dynamic Bayesian Network,DBN)和堆栈自编码网络(stacked auto-encoder network,SAE)模型。当然,在本申请的其他实施例中,也可以使用其他机器学习类的模型。
示例性地,可采用批量大小(batch size)对模型进行训练。
其中,批量大小为一次训练所选取的样本数。批量大小的取值决定了深度学习训练过程中的完成每个时期(epoch)所需的时间和每次迭代(iteration)之间梯度的平滑程度。对于一个大小为N的训练集,如果每个时期中批量大小的采样方法采用最常规的N个样本每个都采样一次,设批量大小为b,那么每个时期所需的迭代次数为N/b,因此,完成每个时期所需的时间大致也随着迭代次数的增加而增加。批量大小的取值过小,花费时间多,同时梯度震荡严重,不利于收敛;批量大小的取值过大,不同批量大小的梯度方向没有任何变化,容易陷入局部极小值。本申请实施例对批量大小的取值不作具体限定,例如,可以根据实际需求或场景确定合适的批量大小。当然,在其他可替代实施例中,针对小样本数的数据库,不采用批量大小也是可行的,而且效果也很好。但是针对大型的数据库,一次性把所有数据输进网络,肯定会引起内存的爆炸,此时可采用批量大小进行网络的训练。
为便于更好的理解本申请实施例,对本申请相关的内容进行说明。
神经网络(Neural Network,NN)。
神经网络是一种由多个神经元节点相互连接构成的运算模型,其中节点间的连接代表从输入信号到输出信号的加权值,称为权重;每个节点对不同的输入信号进行加权求和(summation,SUM),并通过特定的激活函数(f)输出。
示例性地,神经网络包括但不限于:深度神经网络(Deep Neural Network,DNN)、卷积神经网络(Convolutional Neural Networks,CNN)以及循环神经网络(Recurrent Neural Network,RNN)等。
卷积神经网络(Convolutional Neural Networks,CNN):
是一类包含卷积计算且具有深度结构的前馈神经网络(Feedforward Neural Networks),也是深度学习(deep learning)的代表算法之一。由于卷积神经网络能够进行平移不变分类(shift-invariant classification),因此,其也被称为平移不变人工神经网络(Shift-Invariant Artificial Neural Networks,SIANN)。
循环神经网络(Recurrent Neural Network,RNN):
是一种对序列数据建模的神经网络,在自然语言处理领域,如机器翻译、语音识别等应用取得显著成绩。具体表现为,网络对过去时刻的信息进行记忆,并用于当前输出的计算中,即隐藏层之间的节点不再是无连接的而是有连接的,并且隐藏层的输入不仅包括输入层还包括上一时刻隐藏层的输出。常用的RNN包括长短期记忆网络(Long Short-Term Memory,LSTM)和门控循环单元(gated recurrent unit,GRU)等结构。
S230,按照该编辑序列中的各个编辑动作指示的编辑后的状态,对该各个编辑动作指示的编辑对象进行编辑,得到该产物分子对应的多个合成子(Synthon),该编辑对象为该产物分子中的原子或化学键。
示例性地,按照该编辑序列中编辑动作的顺序,基于该编辑序列中的各个编辑动作指示的编辑后的状态,对该各个编辑动作指示的编辑对象进行编辑,得到该产物分子对应的多个合成子(Synthon)。
在一些实施例中,若该编辑动作指示的编辑对象为原子,则该编辑动作指示的编辑后的状态为改变原子上的电荷的数量或改变原子上的氢原子的数量;若该编辑动作的指示的编辑对象为化学键,则该编辑动作指示的编辑后的状态为以下中的任一种:添加化学键、删除化学键、改变化学键的类型。
示例性地,该编辑动作指示的编辑后的状态与该编辑动作指示的编辑对象相关。
例如,若该编辑动作指示的编辑对象为化学键,则该编辑动作指示的编辑后的状态包括但不限于以下状态:化学键的添加、删除化学键或改变化学键的类型。再如,若该编辑动作指示的编辑对象为原子,则该编辑动作实时的编辑后的状态包括但不限于以下状态:改变原子上电荷的数量或改变氢原子的数量。
在一些实施例中,该编辑动作通过以下标签表征:用于指示进行编辑的动作标签、用于指示编辑对象的标签以及用于指示编辑后的状态的标签。
示例性地,编辑序列中的编辑动作可定义为编辑三元组,即(π1,o,τ),π1表示逆向反应预测模型预测的动作为编辑动作,o表示逆向反应预测模型预测的编辑动作对应的编辑对象的标签,τ表示逆向反应预测模型预测的编辑动作对应的编辑后的状态的标签。例如,假设某一个编辑三元组为(π1,b,无),其中,π1表示逆向反应预测模型预测的动作为编辑动作,b表示编辑动作对应的编辑对象为标签为b的化学键,无(none)表示该编辑动作对应的编辑后的状态为删除标签为b的化学键。
当然,在其他可替代实施例中,该编辑动作可以定义为二元组或其他格式的数值。例如,该编辑动作可以定义为二元组时,可具体定义为用于指示编辑对象的标签以及用于指示编辑后的状态的标签。
S240,针对该多个合成子中的各个合成子,基于该合成子补全序列中与该各个合成子对应的至少一个合成子补全动作,按照该至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加该各个合成子补全动作指示的基本图(Motif),得到与该多个合成子对应的多个反应物分子,该基本图包括多个原子或用于连接该多个原子的原子边。
示例性地,该原子边可以表征该原子边连接的两个或多个原子间存在相互的作用力。该作用力用于结合该原子边连接的原子。
示例性地,该原子边为用于连接该多个原子中不同原子的化学键。该原子边可以是化学键(chemical bond),其包括但不限于:离子键、共价键、金属键。
示例性地,合成子是产物分子图断开化学键后得到的分子片段。
示例性地,基本图(motif)是反应物的子图,例如可以是该合成子对应的反应物上的子图。该合成子对应的反应物可包括含有合成子的分子或反应物。
基本图(motif)可包括通过以下方式得到的子图:
1、断开合成子与其对应的反应物中存在差异的边,得到一系列子图。这些子图保留与合成子上的附着原子对应的接口原子。
2、如果在一个子图上,有两个相连的原子分别属于两个环,则断开这两个原子之间相连的化学键,从而得到两个更小的子图。
应当理解,本申请实施例涉及的环可以是单环,即分子中只有一个环。相应的,如果在一个子图上,有两个相连的原子分别属于两个单环,则断开这两个原子之间相连的化学键,从而得到两个更小的子图。此外,本申请实施例涉及的环可以是环烷烃,可以基于环上碳原子的数量对环烷烃进行分类。示例性地,环上碳原子数为3~4时称为小环,环上碳原子数为5~6时称为普通环,环上碳原子数为7~12时称为中环,环上碳原子数大于12时称为大环。
3、如果在一个子图上,两个相连的原子中有一个原子属于环,而另一个原子的度大于1,则断开这两个原子之间相连的化学键,从而得到两个更小的子图。
示例性地,该逆向反应预测模型基于该多个合成子的第一顺序,预测该合成子补全序列,针对该多个合成子中的各个合成子添加基本图时,该多个合成子的遍历顺序为第二顺序,此时,可以基于该第一顺序和该第二顺序确定该合成子补全序列中与各个合成子对应的至少一个合成子补全动作,进而按照该至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加该各个合成子补全动作指示的基本图。其中,该第一顺序和该第二顺序可以相同,也可以不同。例如,可以基于该第一顺序、该第二顺序以及该各个合成子对应的至少一个合成子补全动作的数量,确定该合成子补全序列中与各个合成子对应的至少一个合成子补全动作,进而按照该至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加该各个合成子补全动作指示的基本图。
假设第一顺序等同于第二顺序,且该第二顺序以及该各个合成子对应的至少一个合成 子补全动作的数量为预设数值,则可以按照逆向反应预测模型预测该合成子补全序列时使用的该多个合成子的遍历顺序,依次对该多个合成子中的各个合成子,按照该各个合成子对应的预设数值个合成子补全动作中的各个合成子补全动作指示的接口原子,添加该各个合成子补全动作指示的基本图。例如,假设该多个合成子包括合成子1和合成子2,且该合成子补全序列中的第一个合成子补全动作为针对合成子1的合成子补全动作,该合成子补全序列中的除第一个合成子补全动作之外剩余的合成子补全动作为针对合成子2的合成子补全动作,此时,可以按照第一个合成子补全动作指示的接口原子,添加该第一个合成子补全动作指示的基本图,得到与该合成子1对应的多个反应物分子;进一步的,可以依次按照剩余的合成子补全动作指示的接口原子,添加该剩余的合成子补全动作指示的基本图,得到与该合成子2对应的多个反应物分子。
示例性地,该各个合成子补全动作指示的接口原子为:利用该各个合成子补全动作指示的基本图进行合成子补全时,该各个合成子补全动作指示的基本图上的作为连接节点的原子。
示例性地,添加该合成子补全动作指示的基本图(Motif)时,可以将该合成子补全动作指示的接口原子和针对该合成子补全动作的附着原子作为连接节点,得到与该产物分子对应的多个反应物分子。值得注意的是,该合成子补全动作指示的接口原子和针对该合成子补全动作的附着原子,在反应物分子中为同一个原子。
示例性地,本申请实施例涉及的附着原子包括被选择为编辑对象的原子和被选择为编辑对象的化学键的两端的原子。
在一些实施例中,该合成子补全动作通过以下标签表征:用于指示进行合成子补全的动作标签、用于指示基本图的标签以及对用于指示用于接口原子的标签。
示例性地,合成子补全序列中的合成子补全动作可定义为合成子补全三元组,即(π3,z,q)。π3表示逆向反应预测模型预测的动作为合成子补全动作。z表示逆向反应预测模型预测的合成子补全动作指示的基本图的标签。q表示逆向反应预测模型预测的合成子补全动作对应的接口原子的标签。例如,(π3,z1,q1)。π3表示逆向反应预测模型预测的动作为合成子补全动作。z1表示逆向反应预测模型预测的合成子补全动作指示的基本图的标签,即标签为z1的基本图。q1表示逆向反应预测模型预测的合成子补全动作对应的接口原子的标签,即标签为z1的基本图中标签为q1的原子。基于此,基于(π3,z1,q1),可以以标签为z1的基本图中标签为q1的原子为接口原子,利用z1的基本图进行合成子补全。
当然,在其他可替代实施例中,该合成子补全动作可以定义为二元组或其他格式的数值。例如,该合成子补全动作可以定义为二元组时,可具体定义为用于指示基本图的标签以及对用于指示用于接口原子的标签。
通过引入用于对该产物分子到多个反应物分子之间的转换路径进行预测的逆向反应预测模型,能够将合成子的预测任务和合成子补全的预测任务进行合并处理,即本申请实施例引入的逆向反应预测模型能够学习到合成子预测和补全合成子两个子任务之间的潜在关系,从而极大地提高了模型的泛化性能,能够降低反应物分子的预测复杂度并提升反应物分子预测的泛化性能;此外,通过引入基本图,并将基本图设计为包括多个原子或用于连接该多个原子的原子边的结构,能够合理的构建简短且准确的转换路径,避免了合成子补全序列的长度过长,降低了反应物分子的预测难度以及提升反应物分子的预测准确度,进而能够提升反应物分子的预测性能。
此外,通过提升反应物分子的预测性能,还能够得到以下技术效果:
1、可以为设计的药物或新材料分子规划合成路径,提高药物或新材料分子的研究效率。
2、可以揭示一些潜在的科学规律,提供新的科学知识。
3、可以提供比专业研究者更精准的合成路线规划,不仅可以在缺乏反应模板的情况 下预测出可靠的反应物分子,并且能够预测出专业研究者尚未明确的反应类型,大大提高新药物和新材料的研发效率。
在一些实施例中,该S220可包括:
基于该逆向反应预测模型预测得到的第t-1个动作,得到第t个动作的输入特征,t为大于1的整数;基于该第t个动作对应的输入特征和该第t个动作对应的隐藏特征,对该第t个动作进行预测,直到该逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的所有附着原子和针对该多个合成子添加的基本图上的所有附着原子时,得到该转换路径;其中,该t个动作的隐藏特征与该逆向反应预测模型在该第t个动作之前预测的动作相关。
示例性地,该附着原子包括被选择为编辑对象的原子和被选择为编辑对象的化学键的两端的原子。
示例性地,该逆向反应预测模型可以为循环神经网络(Recurrent Neural Network,RNN),基于此,该第t-1个动作可以对应时刻t-1,该第t个动作可以对应时刻t;也即是说,基于该RNN在时刻t-1的预测得到的动作,得到该RNN在时刻t的输入特征,并基于该RNN在时刻t的输入特征和该RNN在时刻t的隐藏特征,对该RNN在时刻t的动作进行预测,直到该RNN预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的所有附着原子和针对该多个合成子添加的基本图上的所有附着原子时,得到该转换路径。
值得注意的是,多层感知器和卷积神经网络有一个特点,就是假设输入是一个独立的没有上下文联系的单位,比如输入是一张图片,网络识别是狗还是猫。但是对于一些有明显的上下文特征的序列化输入,比如预测视频中下一帧的播放内容,那么很明显这样的输出必须依赖以前的输入,也就是说网络必须拥有一定的记忆能力。而RNN刚好可以为网络赋予了这种的记忆能力。
当然,在其他可替代实施例中,该逆向反应预测模型也可以是其他模型,本申请对此不作具体限定。
示例性地,该逆向反应预测模型预测第t个动作时,可以基于该第t个动作对应的输入特征和该第t个动作对应的隐藏特征得到输出特征ut,然后将输出特征ut与产物分子的特征hG进行拼接处理,得到用于识别第t个动作的特征ψt
示例性地,可以按照以下方式获取输出特征ut和用于识别第t个动作的特征ψt
ut=GRU(inputt-1,hiddent-1),where input0=0,hidden0=σG(hG);
ψt=hG||ut
其中,GRU(·)是门控递归单元,inputt-1和hiddent-1分别是GRU用于预测第t个动作的输入特征(即基于第t-1个动作进行编辑后的中间分子片段的特征)和用于预测第t个动作的节点传递下来的隐藏状态(hidden state),其初始值分别为0向量和产物分子图的特征,σG(·)是产物分子的特征的嵌入函数。
示例性地,该逆向反应预测模型可利用以下公式识别第t个动作:
其中,softmax(·)为分类函数,MLPbond(·)表示多层感知机,ψt表示用于识别第t个动作的特征。
应当理解,本申请实施例中,将输出特征ut与产物分子的特征hG进行拼接处理,即将产物分子的特征和RNN的输出特征拼接起来用于后续的动作预测,能够将全局拓扑信息集成到动作预测过程中,进而,提升动作预测的准确度。
在一些实施例中,可以按照以下方式确定该转换路径:
按照超参数k的波束搜索方式,从该第t-1个动作的预测结果中获取评分最高的k个第一预测结果;基于该k个第一预测结果,确定第t个动作对应的k个第一输入特征;进而,基于该k个第一输入特征中的每一个第一输入特征和该第t个动作对应的隐藏特征, 对该第t个动作进行预测,并按照超参数k的波束搜索方式,从预测得到的预测结果中获取评分最高的k个第二预测结果;基于该k个第二预测结果,确定第t+1个动作对应的k个第二输入特征;基于该k个第二输入特征中的每一个第二输入特征和第t+1个动作对应的隐藏特征,对该第t+1个动作进行预测,直到该逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的所有附着原子和针对该多个合成子添加的基本图上的所有附着原子时,得到该转换路径。
示例性地,预测装置基于该k个第一输入特征中的每一个第一输入特征和该第t个动作对应的隐藏特征,对该第t个动作进行预测,并得到2k个预测结果时,可以按照超参数k的波束搜索方式,从预测得到的2k个预测结果中获取评分最高的k个第二预测结果,并将其确定为第t+1个动作对应的k个第二输入特征。
示例性地,按照超参数k的波束搜索方式,从该第t-1个动作的预测结果中获取评分最高的k个第一预测结果时,可以先对该第t-1个动作的预测结果按照评分进行排序,然后将该第t-1个动作的预测结果中评分最高的k个预测结果作为该k个第一预测结果。例如,对该第t-1个动作的预测结果按照评分进行排序时,可以先对每一个预测结果所在的路径上的已经预测得到的所有预测结果的评分进行累计和计算,得到每一个预测结果对应的评分累计和,然后将该第t-1个动作的预测结果中累计和评分最高的k个预测结果作为该k个第一预测结果。
示例性地,带超参数k的波束搜索(Beam Search)用于基于条件概率在每个时间步长为输入序列选择多个备选方案。多个备选方案的数量取决于一个称为波束宽度(Beam Width)的超参数k。在每个时刻,波束搜索选择k个具有最高概率的最佳备选方案作为当前时刻下最可能的选择。即在每一个时刻下,基于对数似然评分函数选取评分最高的k的最佳结果作为下一个时刻的输入。换句话说,这个过程可以描述为一个搜索树的构建,其中得分最高的叶节点与其子节点展开,而其他叶节点则被删除。
在一些实施例中,若该第t-1个动作为该编辑动作,则基于利用该第t-1个动作进行编辑得到的子图的特征,确定该第t个动作的输入特征,并基于该第t个动作的输入特征和该第t个动作的隐藏特征,利用该逆向反应预测模型对该第t个动作指示的编辑对象和编辑后的状态进行预测,直到利用该逆向反应预测模型预测得到的动作为该编辑序列中的最后一个编辑动作时,得到该编辑序列。
示例性地,该最后一个编辑动作为编辑完成动作。
换言之,若该第t-1个动作为该编辑动作,则基于利用该第t-1个动作进行编辑得到的子图的特征,确定该第t个动作的输入特征,并基于该第t个动作的输入特征和该第t个动作的隐藏特征,利用该逆向反应预测模型对该第t个动作指示的编辑对象和编辑后的状态进行预测,直到利用该逆向反应预测模型预测得到的动作为该编辑完成动作时,得到该编辑序列。
示例性地,t为大于1或大于2的整数。
示例性地,该第t-1个动作为第1个编辑动作时,该第t-1个动作为开始动作,此时,该第t-1个动作进行编辑得到的子图的特征为产物分子的特征。
示例性地,该逆向反应预测模型预测第t个动作时,可以对基于第t-1个动作进行处理后的中间分子片段进行解码,得到基于第t-1个动作进行编辑后的中间分子片段的特征。
示例性地,若该第t个动作为该编辑动作,则该逆向反应预测模型可基于每一个化学键和原子分配一个评分预测该第t个动作对应的编辑对象。
示例性地,若该第t个动作为该编辑动作,则该逆向反应预测模型预测在预测该第t个动作对应的编辑对象时,可以先为每一个化学键和原子分配一个评分这个评分表示化学键或者原子在该第t-1个动作中被认为是编辑对象的概率;然后基于每一个化学键和原子分配一个评分预测该第t个动作对应的编辑对象。
示例性地,该逆向反应预测模型可通过以下公式得到每一个化学键和原子分配一个评分
其中,表示第i个化学键或原子的评分,sigmoid(·)为逻辑回归函数,MLPtarget(·)表示多层感知机输出的用于确定第i个化学键或原子的评分的特征,ψt表示用于识别第t个动作的特征,σe(·)表示原子或化学键的特征的嵌入函数,ei表示第i个化学键或原子。
接着,该逆向反应预测模型为第t个动作对应的编辑对象预测编辑后的状态
示例性地,该逆向反应预测模型可以通过以下公式预测该第t个动作对应的编辑对象预测编辑后的状态
其中,表示预测得到编辑对象进行编辑后的状态,例如编辑后的化学键的类型,softmax(·)为分类函数,MLPtype(·)表示多层感知机输出的用于确定化学键类型的特征,ψt表示用于识别第t个动作的特征,σe(·)表示原子或化学键的特征的嵌入函数,argmax(·)表示寻找具有最大评分的原子或化学键,表示具有最大评分的原子或化学键的特征。
示例性地,该逆向反应预测模型将预测得到的该第t个动作对应的编辑对象和该第t个动作对应的编辑后的状态,应用到该第t个动作对应的编辑前的中间分子片段上,得到该第t个动作对应的编辑后的中间分子片段,再利用MPNN(·)来计算得到该第t个动作对应的编辑后的中间分子片段的特征然后,基于得到的该第t个动作对应的编辑后的中间分子片段的特征该第t个动作对应的编辑对象和该第t个动作对应的编辑后的状态,得到第t+1个动作对应的输入特征inputt
示例性地,可以按照以下公式得到第t+1个动作对应的输入特征inputt
其中,表示基于得到的该第t个动作对应的编辑后的中间分子片段的特征,σe(·)表示原子或化学键的特征的嵌入函数,argmax(·)表示寻找具有最大评分的原子或化学键,表示具有最大评分的原子或化学键的特征,表示第i个化学键或原子的评分,表示预测得到编辑对象进行编辑后的状态,σb(·)表示的嵌入函数。
在一些实施例中,若该第t-1个动作为该编辑序列中的最后一个编辑动作或该合成子补全动作,则基于利用第t-1个动作进行编辑得到的子图的特征和该第t-1个动作对应的附着原子的特征,确定该第t个动作的输入特征,并基于该第t个动作的输入特征和该第t个动作的隐藏特征,对该第t个动作指示的基本图和接口原子进行预测;直到该逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的和针对该多个合成子添加的基本图上的所有附着原子时,得到该合成子补全序列。
示例性地,该最后一个编辑动作为编辑完成动作。
换言之,若该第t-1个动作为编辑完成动作或该合成子补全动作,则基于利用第t-1个动作进行编辑得到的子图的特征和该第t-1个动作对应的附着原子的特征,确定该第t个动作的输入特征,并基于该第t个动作的输入特征和该第t个动作的隐藏特征,对该第t个动作指示的基本图和接口原子进行预测;直到该逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的和针对该多个合成子添加的基本图上的所有附着原子时,得到该合成子补全序列。
示例性地,若该逆向反应预测模型预测得到的动作为最后一个编辑动作,表示合成子预测阶段结束,同时反应物预测过程进入合成子补全阶段。此时,所有的附着原子按照其在产物分子中的标签顺序进行排序,以便进行合成子补全。
示例性地,若该逆向反应预测模型预测得到的动作为最后一个编辑动作,则可以按照 以下公式确定第t+1个动作对应的输入特征inputt
inputt=hsynatom(at),where at∈{a}。
其中,表示基于得到的该第t个动作对应的编辑后的中间分子片段的特征,σatom(·)表示附着原子的特征的嵌入函数,at表示第t个动作对应的附着原子。
示例性地,在合成子补全阶段,该逆向反应预测模型依次遍历合成子上所有的附着原子以及添加的基本图上的所有附着原子,并为每一个附着原子分配一个基本图(motif)。基本图的预测可以视为在预先存储的字典Z中的多分类任务。通过基本图预测得到基本图后,可以进一步确定基本图上对应于附着原子at的接口原子
示例性地,该逆向反应预测模型可以按照以下公式预测第t个动作对应的基本图
其中,表示第t个动作对应的基本图,softmax(·)为分类函数,MLPmotif(·)表示多层感知机输出的用于预测第t个动作对应的基本图的特征,ψt表示用于识别第t个动作的特征。
示例性地,该逆向反应预测模型可以按照以下公式预测第t个动作对应的基本图上对应于附着原子at的接口原子
其中,表示第t个动作对应的基本图上对应于附着原子at的接口原子,softmax(·)为分类函数,MLPinterface(·)表示多层感知机输出的用于预测的特征,ψt表示用于识别第t个动作的特征,σz(·)表示基本图的特征的嵌入函数,表示第t个动作对应的基本图。
若该第t-1个动作为该最后一个编辑动作或该合成子补全动作,且该第t-1个动作对应的基本图的接口原子仅包括一个接口原子,则基于利用第t-1个动作进行编辑得到的子图的特征和该第t-1个动作对应的附着原子的特征,确定该第t个动作的输入特征。
示例性地,如果预测得到的基本图仅包含了一个接口原子,则可以按照以下公式确定第t+1个动作对应的输入特征inputt
inputt=hsynatom(at),where at∈{a}。
其中,表示基于得到的该第t个动作对应的编辑后的中间分子片段的特征,σatom(·)表示附着原子的特征的嵌入函数,at表示第t个动作对应的附着原子。
若该第t-1个动作为该最后一个编辑动作或该合成子补全动作,且该第t-1个动作对应的基本图的接口原子仅包括多个接口原子,则基于利用第t-1个动作进行编辑得到的子图的特征、该第t-1个动作对应的基本图的特征和该第t-1个动作对应的附着原子的特征,确定该第t个动作的输入特征。
示例性地,如果预测得到的基本图仅包含了多个接口原子,则可以按照以下公式确定第t+1个动作对应的输入特征inputt
其中,表示基于得到的该第t个动作对应的编辑后的中间分子片段的特征,σz(·)表示基本图的特征的嵌入函数,表示第t个动作对应的基本图,σatom(·)表示附着原子的特征的嵌入函数,at表示第t个动作对应的附着原子。
通过以上的方案可知,该逆向反应预测模型预测得到编辑序列和合成子补全序列后,即可得到转换路径,由此,可将转换路径作用在产物分子图上得到反应物分子图。
图3是本申请实施例提供的转换路径的示例。
如图3所示,利用逆向反应预测模型对图3中的(a)的左侧示出了产物分子进行反应物预测时,可按照图3中的(c)所示的流程,得到图3的(b)所示的转换路径,进而得到图3中的(a)的右侧所示的两个反应物分子。其中,π1表示逆向反应预测模型预测的动作为编辑动作,π2表示逆向反应预测模型预测的动作为编辑完成动作,π3表示逆向反 应预测模型预测的动作为合成子补全动作,a1~a3表示附着原子,q1~q4表示接口原子,z1~z3表示基本图,b表示编辑动作对应的编辑对象为标签为b的化学键,无(none)表示该编辑动作对应的编辑后的状态为删除标签为b的化学键。附着原子是添加基本图(motif)的接口。
具体而言,逆向反应预测模型的输入为开始动作时,预测的第一个编辑动作的标签为三元组(π1,b,无),接着以三元组(π1,b,无)为输入,预测得到的第二个动作的标签为π2;然后,按照所有的附着原子按照其在产物分子中的标签顺序进行排序,依次输入二元组(π3,a1)、(π3,a3)、(π3,a3),依次预测得到的动作的标签为三元组(π3,z1,q1)、三元组(π3,z2,q2)、三元组(π3,z3,q4),基于此,得到的转换路径可定义为图3的(b)所示的路径:三元组(π1,b,无)、π2、三元组(π3,z1,q1)、三元组(π3,z2,q2)、三元组(π3,z3,q4),由此,将转换路径作用到产物分子,即可得到如图3(a)的右侧所示的反应物分子。
换言之,在图3所示的反应物预测过程中,编辑序列仅包括一个编辑动作,其定义为三元组为(π1,b,无)。合成子补全序列包括3个合成子补全动作,即分别定义为三元组(π3,z1,q1)、三元组(π3,z2,q2)、三元组(π3,z3,q4)。
值得注意的是,添加该合成子补全动作指示的基本图(Motif)时,可以将该合成子补全动作指示的接口原子和针对该合成子补全动作的附着原子作为连接节点。值得注意的是,该合成子补全动作指示的接口原子和针对该合成子补全动作的附着原子,在反应物分子中为同一个原子。例如,基于三元组(π3,z1,q1)添加z1时,a1和q1在反应物分子中为同一个原子(即N原子);类似的,基于三元组(π3,z2,q2)添加z2时,a2和q2在反应物分子中为同一个原子(即O原子);在添加z2后,接口原子q3变为附着原子a3,此时基于三元组(π3,z3,q4),添加z3时,a3和q4在反应物分子中为同一个原子(即C原子)。
应当理解,图3仅为本申请的示例,不应理解为对本申请的限制。
例如,在其他可替代实施例中,该转换路径还可以包括其他数量个编辑动作或合成子补全动作,甚至包括其他数量个合成子或反应物分子,本申请实施例对此不作具体限定。
图4是本申请实施例提供的反应物分子的预测方法的另一示意性流程图。其中,π1表示逆向反应预测模型预测的动作为编辑动作,π2表示逆向反应预测模型预测的动作为编辑完成动作,π3表示逆向反应预测模型预测的动作为合成子补全动作,a1~a3表示附着原子,q1~q3表示接口原子,z1~z3表示基本图,g表示编辑动作对应的编辑对象为标签为g的化学键,无(none)表示该编辑动作对应的编辑后的状态为删除标签为g的化学键。附着原子是添加基本图(motif)的接口。
具体而言,逆向反应预测模型的输入为开始动作时,预测的第一个编辑动作的标签为三元组(π1,g,无),接着以三元组(π1,g,无)为输入,预测得到的第二个动作的标签为π2;然后,按照所有的附着原子按照其在产物分子中的标签顺序进行排序,依次输入二元组(π3,a1)、(π3,a3)、(π3,a3),依次预测得到的动作的标签为三元组(π3,z1,q1)、三元组(π3,z2,q2)、三元组(π3,z3,q4),基于此,得到的转换路径可定义为图3的(b)所示的路径:三元组(π1,b,无)、π2、三元组(π3,z1,q1)、三元组(π3,z2,q2)、三元组(π3,z3,q4),其中,a1~a3、q1~q3、z1~z3由图所示,基于此,将转换路径作用到产物分子,即可得到最终的反应物分子。
在图4所示的反应物预测过程中,编辑序列仅包括一个编辑动作,其定义为三元组为(π1,g,无)。合成子补全序列包括3个合成子补全动作,即分别定义为三元组(π3,z1,q1)、三元组(π3,z2,q2)、三元组(π3,z3,q4)。值得注意的是,添加该合成子补全动作指示的基本图(Motif)时,可以将该合成子补全动作指示的接口原子和针对该合成子补全动作的附着原子作为连接节点。值得注意的是,该合成子补全动作指示的接口原子和针对该合成 子补全动作的附着原子,在反应物分子中为同一个原子。
换言之,反应物预测过程包括编辑阶段和基本图添加阶段,其中,编辑阶段描述了从产物到合成子的键和原子变化,即合成子的预测过程,而基本图添加阶段通过向合成子添加适当的基本图完成反应物的生成。
其中,在编辑阶段,输入的分子图先由图神经网络(GNN)编码,得到GNN的输出;接着,若第t个动作为编辑动作,则循环神经网络(RNN)基于第t个动作对应的GNN的输出以及上一个节点输出的隐藏状态进行动作预测;若第t个动作为编辑完成动作或合成子补全动作,RNN基于第t个动作对应的GNN的输出、第t个动作对应的附着原子以及上一个节点输出的隐藏状态进行动作预测。换言之,在编辑阶段,RNN逐步预测编辑序列,直到预测得到编辑完成动作,结束编辑阶段并开始基本图添加阶段。在基本图添加阶段,RNN依次添加基本图,直到所有附着原子被遍历完成。
在图4的示例中,第一个编辑动作应用于化学键S=O,新的化学键类型为none,表示删除该化学键。在合成子补全动作中,基本图中的接口原子(q1、q2以及q3)和合成子/中间体中的附着原子(a1、a2以及a3)代表同一个原子,在将基本图附着到合成子/中间体上时会将它们合并为单个原子。例如,基于三元组(π3,z1,q1)添加z1时,a1和q1在反应物分子中为同一个原子(即S原子);类似的,基于三元组(π3,z2,q2)添加z2时,a2和q2在反应物分子中为同一个原子(即O原子);在添加z2后,接口原子q3变为附着原子a3,此时基于三元组(π3,z3,q4),添加z3时,a3和q4在反应物分子中为同一个原子(即C原子)。
应当理解,图3和图4仅为本申请的示例,不应理解为对本申请的限制。
例如,在其他可替代实施例中,该转换路径可以不包括开始动作或编辑完成动作。
图5示出了根据本申请实施例的逆向反应预测模型的训练方法300的示意性流程图,该训练方法300可以由任何具有数据处理能力的电子设备执行。例如,该电子设备可实施为服务器。服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、以及大数据和人工智能平台等基础云计算服务的云服务器,服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。为便于描述,下文以反应物分子的预测模型的训练装置为例对本申请提供的预测方法进行说明。
如图5所示,该训练方法300可包括:
S310,对产物分子进行特征提取,得到该产物分子的特征;
S320,基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;
其中,该转换路径包括编辑序列和合成子补全序列;该编辑序列中的各个编辑动作用于指示编辑对象和编辑后的状态,该编辑对象为该产物分子中的原子或化学键;针对利用该编辑序列得到的该产物分子的多个合成子,该合成子补全序列包括与该多个合成子中的各个合成子对应的至少一个合成子补全动作,该至少一个合成子补全动作中的各个合成子补全动作用于指示基本图和接口原子,该基本图包括多个原子或用于连接该多个原子的原子边;
S330,基于该转换路径和训练路径之间的损失,训练该逆向反应预测模型。
基于以上技术方案,通过引入用于对该产物分子到多个反应物分子之间的转换路径,能够使得逆向反应预测模型学习到合成子预测和补全合成子两个子任务之间的潜在关系,从而极大地提高了模型的泛化性能,能够降低反应物分子的预测复杂度并提升反应物分子预测的泛化性能。
此外,通过引入基本图,并将基本图设计为包括多个原子或用于连接该多个原子的原 子边的结构,能够合理的构建简短且准确的转换路径,避免了合成子补全序列的长度过长,降低了反应物分子的预测难度以及提升反应物分子的预测准确度,进而能够提升反应物分子的预测性能。
在一些实施例中,该S320之前,该方法300还可包括:
获取该产物分子对应的候选反应物分子;通过比较该产物分子和该候选反应物分子的分子结构,获取基本图词典;基于该基本图词典,获取该训练路径。
示例性地,该候选反应物分子可以该产物分子的所有反应物分子。即该候选反应物分子可以用于生成该产物分子的所有反应物分子。
在一些实施例中,基于该基本图词典构建连接树;该连接树包括以该多个合成子为根节点以该基本图词典中的基本图为子节点的树结构;通过遍历该连接树的方式,将最短路径确定为该训练路径。
由于反应物分子可以被分解为合成子和基本图(motif),其中合成子是产物分子图断开化学键后得到的分子片段,基本图(motif)是反应物的子图,因此,通过构建连接树来维持合成子和基本图(motif)的连接关系。连接树将合成子和基本图(motif)表示为一个分层树结构,其中合成子作为根节点,基本图(motif)作为子节点。连接树中的两个节点间的边表示两个子图在反应物分子图中是直接相连的,其中附着原子、基本图(motif)和接口原子的三元组可用于表示每一个边。
本实施例中,通过构建一个树结构(即连接树)来表示合成子和基本图的连接关系,连接树可以用于提供一种用于构建训练路径的有效策略,降低训练复杂度。
示例性地,可以使用深度优先搜索来遍历整个连接树,并将遍历后的最短路径确定为该训练路径。
其中,该深度优先遍历方式可以指从树结构中某顶点v出发按照以下方式进行遍历:
1、访问顶点v;
2、依次从v的未被访问的邻接点出发,对树结构进行深度优先遍历;直至树结构中和v有路径相通的顶点都被访问;
3、若此时树结构中尚有顶点未被访问,则从一个未被访问的顶点出发,重新进行深度优先遍历,直到树结构中所有顶点均被访问过为止。
深度优先搜索所遵循的搜索策略是尽可能“深”地搜索树。它的基本思想是:为了求得问题的解,先选择某一种可能情况向前(子结点)探索,在探索过程中,一旦发现原来的选择不符合要求,就回溯至父亲结点重新选择另一结点,继续向前探索,如此反复进行,直至求得最优解。换言之,深度优先搜索是从一个顶点V0开始,沿着一条路一直走到底,如果发现不能到达目标解,那就返回到上一个节点,然后从另一条路开始走到底,这种尽量往深处走的概念即是深度优先的概念。
在一些实施例中,将该候选反应物中除多个合成子之外的分子片段,确定为多个候选子图;若该多个候选子图中的第一候选子图包括第一原子和第二原子、且该第一原子和该第二原子属于不同的环,则断开该第一原子和该第二原子之间的化学键,得到多个第一子图;若该多个候选子图中的第二候选子图包括相连的第三原子和第四原子、该第三原子和该第四原子中的一个原子属于环、且该第三原子和该第四原子中的另一个原子的度为大于或等于预设值,则断开该第三原子和该第四原子之间的化学键,得到多个第二子图;将该多个候选子图中除该第一候选子图和该第二候选子图之外的候选子图、该多个第一子图和该多个第二子图,确定为该基本图词典中的基本图。
示例性地,由于一个产物分子可以被分解为一组不完整的子图,称为合成子,因此,在将合适的基本图(motif)结合到每个附着原子之后,合成子可以被重建为反应物分子图。换句话说,基本图(motif)可以被视为反应物分子图上的子图。因此,本申请实施例将基本图(motif)提取过程划分为以下步骤:
1、断开合成子与其对应的反应物中存在差异的边,得到一系列子图。这些子图保留与合成子上的附着原子对应的接口原子。
应当理解,合成子对应的反应物可包括含有合成子的分子或反应物。
2、如果在一个子图上,有两个相连的原子分别属于两个环,则断开这两个原子之间相连的化学键,从而得到两个更小的子图。
应当理解,本申请实施例涉及的环可以是单环,即分子中只有一个环。相应的,如果在一个子图上,有两个相连的原子分别属于两个单环,则断开这两个原子之间相连的化学键,从而得到两个更小的子图。此外,本申请实施例涉及的环可以是环烷烃,可以基于环上碳原子的数量对环烷烃进行分类。示例性地,环上碳原子数为3~4时称为小环,环上碳原子数为5~6时称为普通环,环上碳原子数为7~12时称为中环,环上碳原子数大于12时称为大环。
3、如果在一个子图上,两个相连的原子中有一个原子属于环,而另一个原子的度大于1,则断开这两个原子之间相连的化学键,从而得到两个更小的子图。
最终,可以提取得到一个基本图(motif)数量为预设数量的字典Z。例如,可以提取得到一个基本图(motif)数量为210的字典Z。
在一些实施例中,该S330之前,该方法300还可包括:
基于以下信息确定该转换路径和训练路径之间的损失:
该转换路径中的预测动作的标签和训练路径中的训练动作的标签之间的差异、该预测动作对应的编辑对象的得分和该训练动作对应的编辑对象的得分之间的差异、该预测动作对应的编辑后的状态和该训练动作对应的编辑后的状态之间的差异、该预测动作指示的基本图和该训练动作指示的基本图之间的差异、该预测动作指示的接口原子和该训练动作指示的接口原子之间的差异。
本申请实施例,由于逆向反应预测模型的训练目标是给定训练路径,预测得到转换路径,因此,将逆向反应预测建模为一个基于自回归的分子生成问题。即给定一个产物分子GP,针对每一个步骤t,自回归模型基于历史的图结构来得到新的图结构Gt。当预测得到反应物分子GR时说明完成生成过程。因此,反应物分子图的生成过程可以被定义为以下的联合概率似然函数:
其中,GR表示反应物分子,N是转换路径的长度,Gt为第t个动作对应的中间分子片段,G0=GP
需要注意的是,中间分子片段Gt并不是直接由逆向反应预测模型生成,而是逆向反应预测模型根据历史动作生成新的图编辑动作、编辑对象(即化学键、原子或基本图)与其编辑后的状态(即新的化学键类型或者接口原子),再将其作用到前一步骤的中间分子片段来得到新的中间分子片段。基于此,给定历史的编辑对象、编辑后的状态和中间分子片段,似然函数可以被修改为:
示例性地,可使用交叉熵损失来优化该转换路径中的预测动作的标签和训练路径中的训练动作的标签之间的差异、该预测动作对应的编辑后的状态和该训练动作对应的编辑后的状态之间的差异、该预测动作指示的基本图和该训练动作指示的基本图之间的差异、该预测动作指示的接口原子和该训练动作指示的接口原子之间的差异,使用二值交叉熵损失优化该预测动作对应的编辑对象的得分和该训练动作对应的编辑对象的得分之间的差异。
例如,可以使用以下公式确定该转换路径和训练路径之间的损失:
其中,N1表示编辑序列的长度或表示该编辑序列和编辑完成动作形成的序列的长度, N2表示编辑序列和合成子补全序列的长度。
应当理解,训练方法300中的S320的实现方式可参考预测方法200中的S220的实现方式,为避免重复,此处不再赘述。
应当理解,以上结合附图详细描述了本申请的优选实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。
例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。
例如,为了降低收敛难度,可以采用教师强迫(teacher-forcing)策略来训练模型。
值得注意的是,RNN存在两种训练模式(mode),即自由运行模式(free-running mode)和教师强迫模式(teacher-forcing mode)。自由运行模式指上一个状态(state)的输出作为下一个状态的输入。教师强迫模式的工作原理为:在训练过程的t时刻,使用训练数据集的期望输出或实际输出y(t)作为下一时间步骤的输入x(t+1),而不是使用模型生成的输出h(t)。
再如,还可以在基于基本图字典进行预训练后,再在基准(benchmark)数据集上进行微调。
再如,逆向反应预测模型中的超参数可以进行调整,比如GNN和GRU的层数。
还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上文对本申请实施例提供的方法进行了说明,下面对本申请实施例提供的装置进行说明。
图6是本申请实施例提供的反应物分子的预测装置400的示意性框图。
如图6所示,该反应物分子的预测装置400可包括:
提取单元410,用于对产物分子进行特征提取,得到该产物分子的特征;
预测单元420,用于基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;该转换路径包括编辑序列和合成子补全序列;该编辑序列为编辑动作形成的序列,该合成子补全序列为合成子补全动作形成的序列;
编辑单元430,用于按照该编辑序列中的各个编辑动作指示的编辑后的状态,对该各个编辑动作指示的编辑对象进行编辑,得到该产物分子对应的多个合成子,该编辑对象为该产物分子中的原子或化学键;
添加单元440,用于针对该多个合成子中的各个合成子,基于该合成子补全序列中与该各个合成子对应的至少一个合成子补全动作,按照该至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加该各个合成子补全动作指示的基本图,得到与该多个合成子对应的多个反应物分子,该基本图包括多个原子或用于连接该多个原子的原子边。
在一些实施例中,该预测单元420具体用于:
基于该逆向反应预测模型预测得到的第t-1个动作,得到第t个动作的输入特征,t为大于1的整数;
基于该第t个动作对应的输入特征和该第t个动作对应的隐藏特征,对该第t个动作进行预测,直到该逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的所有附着原子和针对该多个合成子添加的基本图上的所有附着原子时,得到该转换路径;
其中,该t个动作的隐藏特征与该逆向反应预测模型在该第t个动作之前预测的动作 相关。
在一些实施例中,该预测单元420具体用于:
按照超参数k的波束搜索方式,从该第t-1个动作的预测结果中获取评分最高的k个第一预测结果;
基于该k个第一预测结果,确定第t个动作对应的k个第一输入特征;
其中,该得到该转换路径,包括:
基于该k个第一输入特征中的每一个第一输入特征和该第t个动作对应的隐藏特征,对该第t个动作进行预测,并按照超参数k的波束搜索方式,从预测得到的2k个预测结果中获取评分最高的k个第二预测结果;
基于该k个第二预测结果,确定第t+1个动作对应的k个第二输入特征;
基于该k个第二输入特征中的每一个第二输入特征和第t+1个动作对应的隐藏特征,对该第t+1个动作进行预测,直到该逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的所有附着原子和针对该多个合成子添加的基本图上的所有附着原子时,得到该转换路径。
在一些实施例中,该预测单元420具体用于:
若该第t-1个动作为该编辑动作,则基于利用该第t-1个动作进行编辑得到的子图的特征,确定该第t个动作的输入特征,并基于该第t个动作的输入特征和该第t个动作的隐藏特征,利用该逆向反应预测模型对该第t个动作指示的编辑对象和编辑后的状态进行预测,直到利用该逆向反应预测模型预测得到的动作为该编辑序列中的最优一个编辑动作时,得到该编辑序列;
若该第t-1个动作为该最后一个编辑动作或该合成子补全动作,则基于利用该第t-1个动作进行编辑得到的子图的特征和该第t-1个动作对应的附着原子的特征,确定该第t个动作的输入特征,并基于该第t个动作的输入特征和该第t个动作的隐藏特征,对该第t个动作指示的基本图和接口原子进行预测;直到该逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完该多个合成子上的和针对该多个合成子添加的基本图上的所有附着原子时,得到该合成子补全序列。
在一些实施例中,该编辑动作通过以下标签表征:用于指示进行编辑的动作标签、用于指示编辑对象的标签以及用于指示编辑后的状态的标签;该合成子补全动作通过以下标签表征:用于指示进行合成子补全的动作标签、用于指示基本图的标签以及对用于指示用于接口原子的标签。
在一些实施例中,若该编辑动作指示的编辑对象为原子,则该编辑动作指示的编辑后的状态为改变原子上的电荷的数量或改变原子上的氢原子的数量;若该编辑动作的指示的编辑对象为化学键,则该编辑动作指示的编辑后的状态为以下中的任一种:添加化学键、删除化学键、改变化学键的类型。
图7是本申请实施例提供的逆向反应预测模型的训练装置500的示意性框图。
如图7所示,该逆向反应预测模型的训练装置500可包括:
提取单元510,用于对产物分子进行特征提取,得到该产物分子的特征;
预测单元520,用于基于该产物分子的特征,利用逆向反应预测模型,预测该产物分子到多个反应物分子之间的转换路径;
其中,该转换路径包括编辑序列和合成子补全序列;该编辑序列中的各个编辑动作用于指示编辑对象和编辑后的状态,该编辑对象为该产物分子中的原子或化学键;针对利用该编辑序列得到的该产物分子的多个合成子,该合成子补全序列包括与该多个合成子中的各个合成子对应的至少一个合成子补全动作,该至少一个合成子补全动作中的各个合成子补全动作用于指示基本图和接口原子,该基本图包括多个原子或用于连接该多个原子的原子边;
训练单元530,用于基于该转换路径和训练路径之间的损失,训练该逆向反应预测模型。
在一些实施例中,该预测单元520用于得到转换路径之前,该用于:
获取该产物分子对应的候选反应物分子;
通过比较该产物分子和该候选反应物分子的分子结构,获取基本图词典;
基于该基本图词典,获取该训练路径。
在一些实施例中,该预测单元520具体用于:
基于该基本图词典构建连接树;该连接树包括以该多个合成子为根节点以该基本图词典中的基本图为子节点的树结构;
通过遍历该连接树的方式,将最短路径确定为该训练路径。
在一些实施例中,该预测单元520具体用于:
将该候选反应物中除多个合成子之外的分子片段,确定为多个候选子图;
若该多个候选子图中的第一候选子图包括第一原子和第二原子、且该第一原子和该第二原子属于不同的环,则断开该第一原子和该第二原子之间的化学键,得到多个第一子图;
若该多个候选子图中的第二候选子图包括相连的第三原子和第四原子、该第三原子和该第四原子中的一个原子属于环、且该第三原子和该第四原子中的另一个原子的度为大于或等于预设值,则断开该第三原子和该第四原子之间的化学键,得到多个第二子图;
将该多个候选子图中除该第一候选子图和该第二候选子图之外的候选子图、该多个第一子图和该多个第二子图,确定为该基本图词典中的基本图。
在一些实施例中,该训练单元530用于基于该转换路径和训练路径之间的损失,训练该逆向反应预测模型之前,还用于:
基于以下信息确定该转换路径和训练路径之间的损失:
该转换路径中的预测动作的标签和训练路径中的训练动作的标签之间的差异、该预测动作对应的编辑对象的得分和该训练动作对应的编辑对象的得分之间的差异、该预测动作对应的编辑后的状态和该训练动作对应的编辑后的状态之间的差异、该预测动作指示的基本图和该训练动作指示的基本图之间的差异、该预测动作指示的接口原子和该训练动作指示的接口原子之间的差异。
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,该反应物分子的预测装置400可以对应于执行本申请实施例的方法200中的相应主体,并且该预测装置400中的各个单元分别为了实现方法200中的相应流程;类似的,该逆向反应预测模型的训练装置500可以对应于执行本申请实施例的方法300中的相应主体,并且训练装置500中的各个单元分别为了实现方法300中的相应流程;为了简洁,在此不再赘述。
还应当理解,本申请实施例涉及的预测装置400或训练装置500中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,该预测装置400或训练装置500也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。根据本申请的另一个实施例,可以通过在包括例如中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的通用计算机的通用计算设备上运行能够执行相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造本申请实施例涉及的预测装置400或训练装置500,以及来实现本申请实施例的方法。计算机程序可以记载于例如计算机可读存储介质上,并通过计算机可读存储介质装载于电子设备中,并在其中运行,来实现本申请实 施例的相应方法。
换言之,上文涉及的单元可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过软硬件结合的形式实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件组合执行完成。可选地,软件可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。
图8是本申请实施例提供的电子设备600的示意结构图。
如图8所示,该电子设备600至少包括处理器610以及计算机可读存储介质620。其中,处理器610以及计算机可读存储介质620可通过总线或者其它方式连接。计算机可读存储介质620用于存储计算机程序621,计算机程序621包括计算机指令,处理器610用于执行计算机可读存储介质620存储的计算机指令。处理器610是电子设备600的计算核心以及控制核心,其适于实现一条或多条计算机指令,具体适于加载并执行一条或多条计算机指令从而实现相应方法流程或相应功能。
作为示例,处理器610也可称为中央处理器(Central Processing Unit,CPU)。处理器610可以包括但不限于:通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。
作为示例,计算机可读存储介质620可以是高速RAM存储器,也可以是非不稳定的存储器(Non-VolatileMemory),例如至少一个磁盘存储器;可选的,还可以是至少一个位于远离前述处理器610的计算机可读存储介质。具体而言,计算机可读存储介质620包括但不限于:易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
如图8所示,该电子设备600还可以包括收发器630。
其中,处理器610可以控制该收发器630与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。收发器630可以包括发射机和接收机。收发器630还可以进一步包括天线,天线的数量可以为一个或多个。
应当理解,该通信设备600中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。
在一种实现方式中,该电子设备600可以是任一具有数据处理能力的电子设备;该计算机可读存储介质620中存储有第一计算机指令;由处理器610加载并执行计算机可读存储介质620中存放的第一计算机指令,以实现图1所示方法实施例中的相应步骤;具体实现中,计算机可读存储介质620中的第一计算机指令由处理器610加载并执行相应步骤,为避免重复,此处不再赘述。
根据本申请的另一方面,本申请实施例还提供了一种计算机可读存储介质(Memory),计算机可读存储介质是电子设备600中的记忆设备,用于存放程序和数据。例如,计算机可读存储介质620。可以理解的是,此处的计算机可读存储介质620既可以包括电子设备600中的内置存储介质,当然也可以包括电子设备600所支持的扩展存储介质。计算机可读存储介质提供存储空间,该存储空间存储了电子设备600的操作系统。并且,在该存储空间中还存放了适于被处理器610加载并执行的一条或多条的计算机指令,这些计算机指令可以是一个或多个的计算机程序621(包括程序代码)。
根据本申请的另一方面,本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。例如,计算机程序621。此时,数据处理设备600可以是计算机,处理器610从计算机可读存储介质620读取该计算机指令,处理器610执行该计算机指令,使得该计算机执行上述各种可选方式中提供的方法。
换言之,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地运行本申请实施例的流程或实现本申请实施例的功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质进行传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元以及流程步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
最后需要说明的是,以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (17)

  1. 一种反应物分子的预测方法,其特征在于,包括:
    对产物分子进行特征提取,得到所述产物分子的特征;
    基于所述产物分子的特征,利用逆向反应预测模型,预测所述产物分子到多个反应物分子之间的转换路径,所述转换路径包括编辑序列和合成子补全序列;
    按照所述编辑序列中的各个编辑动作指示的编辑后的状态,对所述各个编辑动作指示的编辑对象进行编辑,得到所述产物分子对应的多个合成子,所述编辑对象为所述产物分子中的原子或化学键;
    针对所述多个合成子中的各个合成子,基于所述合成子补全序列中与所述各个合成子对应的至少一个合成子补全动作,按照所述至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加所述各个合成子补全动作指示的基本图,得到与所述多个合成子对应的多个反应物分子,所述基本图包括多个原子或用于连接所述多个原子的原子边。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述产物分子的特征,利用逆向反应预测模型,预测所述产物分子到多个反应物分子之间的转换路径,包括:
    基于所述逆向反应预测模型预测得到的第t-1个动作,得到第t个动作的输入特征,t为大于1的整数;
    基于所述第t个动作对应的输入特征和所述第t个动作对应的隐藏特征,对所述第t个动作进行预测,直到所述逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完所述多个合成子上的所有附着原子和针对所述多个合成子添加的基本图上的所有附着原子时,得到所述转换路径;
    其中,所述t个动作的隐藏特征与所述逆向反应预测模型在所述第t个动作之前预测的动作相关。
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述逆向反应预测模型预测得到的第t-1个动作,得到第t个动作的输入特征,包括:
    按照超参数k的波束搜索方式,从所述第t-1个动作的预测结果中获取评分最高的k个第一预测结果;
    基于所述k个第一预测结果,确定第t个动作对应的k个第一输入特征;
    其中,所述得到所述转换路径,包括:
    基于所述k个第一输入特征中的每一个第一输入特征和所述第t个动作对应的隐藏特征,对所述第t个动作进行预测,并按照超参数k的波束搜索方式,从预测得到的预测结果中获取评分最高的k个第二预测结果;
    基于所述k个第二预测结果,确定第t+1个动作对应的k个第二输入特征;
    基于所述k个第二输入特征中的每一个第二输入特征和第t+1个动作对应的隐藏特征,对所述第t+1个动作进行预测,直到所述逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完所述多个合成子上的所有附着原子和针对所述多个合成子添加的基本图上的所有附着原子时,得到所述转换路径。
  4. 根据权利要求2所述的方法,其特征在于,所述得到所述转换路径,包括:
    若所述第t-1个动作为所述编辑动作,则基于利用所述第t-1个动作进行编辑得到的子图的特征,确定所述第t个动作的输入特征;
    基于所述第t个动作的输入特征和所述第t个动作的隐藏特征,利用所述逆向反应预测模型对所述第t个动作指示的编辑对象和编辑后的状态进行预测,直到利用所述逆向反应预测模型预测得到的动作为所述编辑序列中的最后一个编辑动作时,得到所述编辑序列。
  5. 根据权利要求2所述的方法,其特征在于,所述得到所述转换路径,包括:
    若所述第t-1个动作为最后一个编辑动作或所述合成子补全动作,则基于利用所述第t-1个动作进行编辑得到的子图的特征和所述第t-1个动作对应的附着原子的特征,确定所 述第t个动作的输入特征;
    基于所述第t个动作的输入特征和所述第t个动作的隐藏特征,对所述第t个动作指示的基本图和接口原子进行预测;直到所述逆向反应预测模型预测得到的动作为合成子补全动作、且已遍历完所述多个合成子上的和针对所述多个合成子添加的基本图上的所有附着原子时,得到所述合成子补全序列。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述编辑动作通过以下标签表征:用于指示进行编辑的动作标签、用于指示编辑对象的标签以及用于指示编辑后的状态的标签;所述合成子补全动作通过以下标签表征:用于指示进行合成子补全的动作标签、用于指示基本图的标签以及对用于指示用于接口原子的标签。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,若所述编辑动作指示的编辑对象为原子,则所述编辑动作指示的编辑后的状态为改变原子上的电荷的数量或改变原子上的氢原子的数量;若所述编辑动作的指示的编辑对象为化学键,则所述编辑动作指示的编辑后的状态为以下中的任一种:添加化学键、删除化学键、改变化学键的类型。
  8. 一种逆向反应预测模型的训练方法,其特征在于,包括:
    对产物分子进行特征提取,得到所述产物分子的特征;
    基于所述产物分子的特征,利用逆向反应预测模型,预测所述产物分子到多个反应物分子之间的转换路径;
    其中,所述转换路径包括编辑序列和合成子补全序列;所述编辑序列中的各个编辑动作用于指示编辑对象和编辑后的状态,所述编辑对象为所述产物分子中的原子或化学键;针对利用所述编辑序列得到的所述产物分子的多个合成子,所述合成子补全序列包括与所述多个合成子中的各个合成子对应的至少一个合成子补全动作,所述至少一个合成子补全动作中的各个合成子补全动作用于指示基本图和接口原子,所述基本图包括多个原子或用于连接所述多个原子的原子边;
    基于所述转换路径和训练路径之间的损失,训练所述逆向反应预测模型。
  9. 根据权利要求8所述的方法,其特征在于,所述得到转换路径之前,所述方法还包括:
    获取所述产物分子对应的候选反应物分子;
    通过比较所述产物分子和所述候选反应物分子的分子结构,获取基本图词典;
    基于所述基本图词典,获取所述训练路径。
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述基本图词典,获取所述训练路径,包括:
    基于所述基本图词典构建连接树;所述连接树包括以所述多个合成子为根节点以所述基本图词典中的基本图为子节点的树结构;
    通过遍历所述连接树的方式,将最短路径确定为所述训练路径。
  11. 根据权利要求9或10所述的方法,其特征在于,所述通过比较所述产物分子和所述候选反应物分子的分子结构,获取基本图词典,包括:
    将所述候选反应物中除多个合成子之外的分子片段,确定为多个候选子图;
    若所述多个候选子图中的第一候选子图包括第一原子和第二原子、且所述第一原子和所述第二原子属于不同的环,则断开所述第一原子和所述第二原子之间的化学键,得到多个第一子图;
    若所述多个候选子图中的第二候选子图包括相连的第三原子和第四原子、所述第三原子和所述第四原子中的一个原子属于环、且所述第三原子和所述第四原子中的另一个原子的度为大于或等于预设值,则断开所述第三原子和所述第四原子之间的化学键,得到多个第二子图;
    将所述多个候选子图中除所述第一候选子图和所述第二候选子图之外的候选子图、所 述多个第一子图和所述多个第二子图,确定为所述基本图词典中的基本图。
  12. 根据权利要求8至11中任一项所述的方法,其特征在于,所述基于所述转换路径和训练路径之间的损失,训练所述逆向反应预测模型之前,所述方法还包括:
    基于以下信息确定所述转换路径和训练路径之间的损失:
    所述转换路径中的预测动作的标签和训练路径中的训练动作的标签之间的差异、所述预测动作对应的编辑对象的得分和所述训练动作对应的编辑对象的得分之间的差异、所述预测动作对应的编辑后的状态和所述训练动作对应的编辑后的状态之间的差异、所述预测动作指示的基本图和所述训练动作指示的基本图之间的差异、所述预测动作指示的接口原子和所述训练动作指示的接口原子之间的差异。
  13. 一种反应物分子的预测装置,其特征在于,包括:
    提取单元,用于对产物分子进行特征提取,得到所述产物分子的特征;
    预测单元,用于基于所述产物分子的特征,利用逆向反应预测模型,预测所述产物分子到多个反应物分子之间的转换路径;所述转换路径包括编辑序列和合成子补全序列;
    编辑单元,用于按照所述编辑序列中的各个编辑动作指示的编辑后的状态,对所述各个编辑动作指示的编辑对象进行编辑,得到所述产物分子对应的多个合成子,所述编辑对象为所述产物分子中的原子或化学键;
    添加单元,用于针对所述多个合成子中的各个合成子,基于所述合成子补全序列中与所述各个合成子对应的至少一个合成子补全动作,按照所述至少一个合成子补全动作中的各个合成子补全动作指示的接口原子,添加所述各个合成子补全动作指示的基本图,得到与所述多个合成子对应的多个反应物分子,所述基本图包括多个原子或用于连接所述多个原子的原子边。
  14. 一种逆向反应预测模型的训练装置,其特征在于,包括:
    提取单元,用于对产物分子进行特征提取,得到所述产物分子的特征;
    预测单元,用于基于所述产物分子的特征,利用逆向反应预测模型,预测所述产物分子到多个反应物分子之间的转换路径;
    其中,所述转换路径包括编辑序列和合成子补全序列;所述编辑序列中的各个编辑动作用于指示编辑对象和编辑后的状态,所述编辑对象为所述产物分子中的原子或化学键;针对利用所述编辑序列得到的所述产物分子的多个合成子,所述合成子补全序列包括与所述多个合成子中的各个合成子对应的至少一个合成子补全动作,所述至少一个合成子补全动作中的各个合成子补全动作用于指示基本图和接口原子,所述基本图包括多个原子或用于连接所述多个原子的原子边;
    训练单元,用于基于所述转换路径和训练路径之间的损失,训练所述逆向反应预测模型。
  15. 一种电子设备,其特征在于,包括:
    处理器,适于执行计算机程序;
    计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至7中任一项所述的反应物分子的预测方法或如权利要求8至12中任一项所述的逆向反应预测模型的训练方法。
  16. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至7中任一项所述的反应物分子的预测方法或如权利要求8至12中任一项所述的逆向反应预测模型的训练方法。
  17. 一种计算机程序产品,包括计算机程序/指令,其特征在于,所述计算机程序/指令被处理器执行时实现如权利要求1至7中任一项所述的反应物分子的预测方法或如权利要求8至12中任一项所述的逆向反应预测模型的训练方法。
PCT/CN2023/096605 2022-08-09 2023-05-26 反应物分子的预测方法、训练方法、装置以及电子设备 WO2024032096A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210952642.6A CN115240786A (zh) 2022-08-09 2022-08-09 反应物分子的预测方法、训练方法、装置以及电子设备
CN202210952642.6 2022-08-09

Publications (1)

Publication Number Publication Date
WO2024032096A1 true WO2024032096A1 (zh) 2024-02-15

Family

ID=83679443

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/096605 WO2024032096A1 (zh) 2022-08-09 2023-05-26 反应物分子的预测方法、训练方法、装置以及电子设备

Country Status (2)

Country Link
CN (1) CN115240786A (zh)
WO (1) WO2024032096A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117877608A (zh) * 2024-03-13 2024-04-12 烟台国工智能科技有限公司 基于经验网络的蒙特卡洛树搜索逆合成规划方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115240786A (zh) * 2022-08-09 2022-10-25 腾讯科技(深圳)有限公司 反应物分子的预测方法、训练方法、装置以及电子设备
CN116935969B (zh) * 2023-07-28 2024-03-26 宁波甬恒瑶瑶智能科技有限公司 基于深度搜索的生物逆合成预测方法、装置和电子设备
CN117133371B (zh) * 2023-10-25 2024-01-05 烟台国工智能科技有限公司 基于人工断键的无模板单步逆合成方法及系统
CN117234266B (zh) * 2023-11-13 2024-03-22 长沙矿冶研究院有限责任公司 一种三元前驱体反应釜反应逆向选择性控制方法及系统
CN117457093B (zh) * 2023-12-20 2024-03-08 烟台国工智能科技有限公司 基于数据扩增的有机反应产物逆合成方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111524557A (zh) * 2020-04-24 2020-08-11 腾讯科技(深圳)有限公司 基于人工智能的逆合成预测方法、装置、设备及存储介质
US20210225462A1 (en) * 2020-01-16 2021-07-22 Emd Millipore Corporation Method Of Synthesizing Chemical Compounds
KR20210147862A (ko) * 2020-05-29 2021-12-07 삼성전자주식회사 역합성 예측 모델의 학습 방법 및 장치
CN113782109A (zh) * 2021-09-13 2021-12-10 烟台国工智能科技有限公司 基于蒙特卡洛树的反应物推导方法及逆向合成推导方法
CN113990405A (zh) * 2021-10-19 2022-01-28 上海药明康德新药开发有限公司 试剂化合物预测模型的构建方法、化学反应试剂自动预测补全的方法与装置
KR20220022059A (ko) * 2020-07-29 2022-02-24 주식회사 아론티어 역합성 예측을 위한 하위구조 기반의 신경망 기계 번역 장치 및 이를 이용한 번역 방법
CN115240786A (zh) * 2022-08-09 2022-10-25 腾讯科技(深圳)有限公司 反应物分子的预测方法、训练方法、装置以及电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210225462A1 (en) * 2020-01-16 2021-07-22 Emd Millipore Corporation Method Of Synthesizing Chemical Compounds
CN111524557A (zh) * 2020-04-24 2020-08-11 腾讯科技(深圳)有限公司 基于人工智能的逆合成预测方法、装置、设备及存储介质
KR20210147862A (ko) * 2020-05-29 2021-12-07 삼성전자주식회사 역합성 예측 모델의 학습 방법 및 장치
KR20220022059A (ko) * 2020-07-29 2022-02-24 주식회사 아론티어 역합성 예측을 위한 하위구조 기반의 신경망 기계 번역 장치 및 이를 이용한 번역 방법
CN113782109A (zh) * 2021-09-13 2021-12-10 烟台国工智能科技有限公司 基于蒙特卡洛树的反应物推导方法及逆向合成推导方法
CN113990405A (zh) * 2021-10-19 2022-01-28 上海药明康德新药开发有限公司 试剂化合物预测模型的构建方法、化学反应试剂自动预测补全的方法与装置
CN115240786A (zh) * 2022-08-09 2022-10-25 腾讯科技(深圳)有限公司 反应物分子的预测方法、训练方法、装置以及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117877608A (zh) * 2024-03-13 2024-04-12 烟台国工智能科技有限公司 基于经验网络的蒙特卡洛树搜索逆合成规划方法及装置
CN117877608B (zh) * 2024-03-13 2024-05-28 烟台国工智能科技有限公司 基于经验网络的蒙特卡洛树搜索逆合成规划方法及装置

Also Published As

Publication number Publication date
CN115240786A (zh) 2022-10-25

Similar Documents

Publication Publication Date Title
WO2024032096A1 (zh) 反应物分子的预测方法、训练方法、装置以及电子设备
Alzubaidi et al. A survey on deep learning tools dealing with data scarcity: definitions, challenges, solutions, tips, and applications
Zhou et al. A comprehensive survey on pretrained foundation models: A history from bert to chatgpt
CN112966127B (zh) 一种基于多层语义对齐的跨模态检索方法
CN111291212B (zh) 基于图卷积神经网络的零样本草图图像检索方法和系统
WO2021164772A1 (zh) 训练跨模态检索模型的方法、跨模态检索的方法和相关装置
CN112288091A (zh) 基于多模态知识图谱的知识推理方法
CN112905801B (zh) 基于事件图谱的行程预测方法、系统、设备及存储介质
CN111737535B (zh) 一种基于元结构和图神经网络的网络表征学习方法
CN113688878B (zh) 一种基于记忆力机制和图神经网络的小样本图像分类方法
Chen et al. New ideas and trends in deep multimodal content understanding: A review
CN113780002A (zh) 基于图表示学习和深度强化学习的知识推理方法及装置
CN114564596A (zh) 一种基于图注意力机制的跨语言知识图谱链接预测方法
Chen et al. Binarized neural architecture search for efficient object recognition
CN115145551A (zh) 一种面向机器学习应用低代码开发的智能辅助系统
Menaga et al. Deep learning: a recent computing platform for multimedia information retrieval
CN116932722A (zh) 一种基于跨模态数据融合的医学视觉问答方法及系统
Furht et al. Deep learning techniques in big data analytics
Akujuobi et al. Collaborative graph walk for semi-supervised multi-label node classification
Srinivas et al. A comprehensive survey of techniques, applications, and challenges in deep learning: A revolution in machine learning
Zhang et al. Graph attention network with dynamic representation of relations for knowledge graph completion
Rani et al. Deep learning with big data: an emerging trend
CN116975350A (zh) 图文检索方法、装置、设备及存储介质
Ma et al. Multi-view clustering based on view-attention driven
Bayoudh A survey of multimodal hybrid deep learning for computer vision: Architectures, applications, trends, and challenges

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2023851324

Country of ref document: EP

Ref document number: 23 851 324.6

Country of ref document: EP

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23851324

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023851324

Country of ref document: EP

Effective date: 20240326