Reactant molecule prediction method, training method, device, electronic device, and computer program

The integrated reverse reaction prediction model enhances reactant molecule prediction by reducing complexity and improving accuracy, facilitating efficient synthetic route planning for drug and material development.

JP2025500754AActive Publication Date: 2025-01-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2024532673
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-08-09
Filing Date
2023-05-26
Publication Date
2025-01-15
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

Conventional methods for predicting reactant molecules in organic chemistry are time-consuming and inefficient due to the manual extraction of reaction templates and the inability of existing models to cover all reaction types, leading to high complexity and limited predictive performance.

Method used

A reverse reaction prediction model that integrates synthesizer prediction and synthesizer completion tasks, using a feature extraction process to predict conversion paths from product molecules to reactant molecules through an editing sequence and synthesizer completion sequence, incorporating a basic graph structure to connect atoms and reduce complexity.

Benefits of technology

This approach improves generalization performance and prediction accuracy of reactant molecules, enabling more efficient synthetic route planning for drug and material development, and predicting reactions that expert researchers may not have considered.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025500754000001_ABST
    Figure 2025500754000001_ABST
Patent Text Reader

Abstract

The present invention provides a method, a training method, an apparatus and an electronic device for predicting reactant molecules related to the reverse reaction technology field in the chemical field. The method includes the steps of: performing feature extraction on a product molecule to obtain the characteristics of the product molecule; predicting a conversion path from the product molecule to a plurality of reactant molecules using a reverse reaction prediction model based on the characteristics of the product molecule; predicting synthesizers and complementary synthesizers according to the conversion path to obtain a plurality of reactant molecules corresponding to the product molecule. The method provided by the present invention can not only reduce the prediction complexity of reactant molecules and improve the generalization performance of reactant molecule prediction, but also improve the prediction performance of reactant molecules.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to a Chinese patent application filed on August 9, 2022, with application number 202210952642.6, entitled "Method for predicting reactant molecules, training method, apparatus and electronic device," the entire contents of which are incorporated herein by reference.

[0002] FIELD OF THE DISCLOSURE Embodiments of the present invention relate to the field of chemical reverse reactions, and more particularly to reactant molecular prediction methods, training methods, devices and electronics. [Background technology]

[0003] Prediction of organic chemistry retrosynthetic reactants is an important step in the development of new drugs and the production of novel materials, and aims to find a set of commercially available reactant molecules that can be used to synthesize product molecules. In traditional methods, a reaction template is matched with a reactant molecule to obtain the reactant molecule, but the reaction template needs to be manually extracted by a specialized researcher, and the process is very time-consuming, and the reaction template cannot cover all reaction types. In recent years, the development of deep learning technology has made it possible to learn potential reaction types from a huge database of organic chemical reactions. Therefore, it is particularly important to utilize deep learning technology to build a powerful reverse reaction prediction model.

[0004] Up to now, there are two types of model structures that are commonly adopted: one is a sequence translation model based on the Simplified Molecular Input Line Entry System (SMILES) sequence, which is a standard for unambiguously describing molecular structures, and the other is a graph generation model based on graphs.

[0005] Graph generation models generally divide the organic chemistry reverse reaction prediction task into two subtasks: synthesizer recognition and synthesizer complementation. Typically, one graph neural network is constructed to recognize the synthesizer, and the synthesizer of the product molecule is obtained, and one graph variation is constructed to complement the synthesizer atom by atom from the encoder. However, by constructing two independent networks used for synthesizer recognition and synthesizer complementation separately, not only does the prediction complexity increase, but good generalization performance cannot be achieved because the two subtasks have different optimization goals. Moreover, when complementing the synthesizer atom by atom, the complexity is high and the prediction performance is limited. Summary of the Invention [Problem to be solved by the invention]

[0006] The embodiments of the present invention provide a reactant molecule prediction method, a training method, an apparatus and an electronic device, 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 performance of reactant molecules. [Means for solving the problem]

[0007] In a first aspect, the present invention provides a method for predicting reactant molecules, the method comprising: performing feature extraction on the product molecules to obtain features of the product molecules; predicting a conversion pathway from the product molecule to a plurality of reactant molecules using a reverse reaction prediction model based on characteristics of the product molecule, the conversion pathway including an edit sequence and a composer complement sequence; a step of obtaining a plurality of synthons corresponding to the product molecule by editing an editing target indicated by each editing operation in accordance with a post-editing state indicated by each editing operation in the editing sequence, the editing target being an atom or a chemical bond in the product molecule; For each composer in the plurality of composers, based on at least one composer completion operation corresponding to each composer in the composer completion sequence, adding a basic graph indicated by each composer completion operation according to an interface atom indicated by each composer completion operation in the at least one composer completion operation to obtain a plurality of reactant molecules corresponding to the plurality of composers, wherein the basic graph includes a plurality of atoms or atomic edges for connecting the plurality of atoms.

[0008] In a second aspect, the present invention provides a method for training an adverse reaction prediction model, the method comprising: performing feature extraction on the product molecules to obtain features of the product molecules; predicting a conversion pathway of the product molecule into a plurality of reactant molecules using a reverse reaction prediction model based on characteristics of the product molecule; wherein the transformation path includes an edit sequence and a composer completion sequence, each edit operation in the edit sequence is used to indicate an edit target and a state after the edit, the edit target being an atom or a chemical bond in the product molecule, and for a plurality of composers of the product molecule obtained by the edit sequence, the composer completion sequence includes at least one composer completion operation corresponding to each composer in the plurality of composers, each composer completion operation in the at least one composer completion operation is used to indicate a base graph and an interface atom, the base graph including a plurality of atoms or an atomic edge for connecting the plurality of atoms; and training the inverse reaction prediction model based on the losses of the transformation path and a training path.

[0009] In a third aspect, the present invention provides a reactant molecule prediction device, the prediction device comprising: an extraction unit configured to perform feature extraction on the product molecules to obtain features of the product molecules; a prediction unit configured to predict a conversion path from the product molecule to a plurality of reactant molecules using a reverse reaction prediction model based on a characteristic of the product molecule, the conversion path including an edit sequence and a composer complement sequence; an editing unit configured to edit an editing target indicated by each editing operation in the editing sequence according to a post-editing state indicated by the editing operation to obtain a plurality of synthesizers corresponding to the product molecule, the editing target being an atom or a chemical bond in the product molecule; and an additional unit configured to, for each composer in the plurality of composers, add a basic graph indicated by each composer completion operation according to an interface atom indicated by each composer completion operation in the at least one composer completion operation corresponding to each composer in the composer completion sequence to obtain a plurality of reactant molecules corresponding to the plurality of composers, wherein the basic graph includes a plurality of atoms or atomic edges for connecting the plurality of atoms.

[0010] In a fourth aspect, the present invention provides a training device for an adverse reaction prediction model, the training device comprising: an extraction unit configured to perform feature extraction on the product molecules to obtain features of the product molecules; a prediction unit configured to predict a conversion pathway of the product molecule into a plurality of reactant molecules using a reverse reaction prediction model based on the characteristics of the product molecule, a prediction unit, wherein the transformation path includes an edit sequence and a composer completion sequence, each edit operation in the edit sequence is used to indicate an edit target and a state after the edit, the edit target being an atom or a chemical bond in the product molecule, and for a plurality of composers of the product molecule obtained from the edit sequence, the composer completion sequence includes at least one composer completion operation corresponding to each composer in the plurality of composers, each composer completion operation in the at least one composer completion operation is used to indicate a base graph and an interface atom, the base graph including a plurality of atoms or an atomic edge for connecting the plurality of atoms; A training unit configured to train the inverse reaction prediction model based on the loss of the transformation path and a training path.

[0011] In a fifth aspect, the present invention provides an electronic device, the electronic device comprising: a processor for executing computer instructions; and a computer-readable storage medium on which computer instructions are stored, the processor loading and executing the computer instructions to perform the reactant molecule prediction method according to the first aspect or the reverse reaction prediction model training method according to the second aspect.

[0012] In a sixth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon computer instructions which, when read and executed by a processor of said computing device, cause the computing device to perform the method for predicting reactant molecules according to the first aspect above or the method for training a reverse reaction prediction model according to the second aspect above.

[0013] In a seventh aspect, an embodiment of the present invention provides a computer program product or computer program, the computer program product or computer program comprising computer instructions stored on a computer readable storage medium, a processor of a computing device reading the computer instructions from the computer readable storage medium and executing the computer instructions, thereby causing the computing device to perform the method for predicting reactant molecules according to the first aspect above or the method for training a reverse reaction prediction model according to the second aspect above. Effect of the Invention

[0014] Based on the above technical solution, by introducing an inverse reaction prediction model for predicting the conversion path from the product molecule to multiple reactant molecules, it is possible to integrate the prediction task of the synthesizer and the prediction task of the synthesizer complement, that is, the inverse reaction prediction model introduced in the embodiment of the present invention can learn the potential relationship between the two subtasks of the synthesizer prediction and the complement synthesizer, thereby greatly improving the generalization performance of the model, reducing the prediction complexity of the reactant molecule, and improving the generalization performance of the reactant molecule prediction. Furthermore, by introducing a basic graph and designing the basic graph into a structure including multiple atoms or atomic edges for connecting the multiple atoms, a short and accurate conversion path can be reasonably constructed, avoiding the length of the synthesizer complement sequence being too long, reducing the prediction difficulty of the reactant molecule, improving the prediction accuracy of the reactant molecule, and improving the prediction performance of the reactant molecule.

[0015] Furthermore, by improving the predictive performance of reactant molecules, the following technical effects can be obtained.

[0016] 1. It is possible to plan synthetic routes for designed drugs or new material molecules, and improve the research efficiency of drugs or new material molecules.

[0017] 2. It can post some potential scientific disciplines and provide new scientific knowledge.

[0018] 3. It can provide more accurate synthetic route planning than professional researchers, and not only can it predict reliable reactant molecules when reaction templates are lacking, but it can also predict reaction types that professional researchers have not yet clarified, greatly improving the efficiency of developing new drugs and new materials. [Brief description of the drawings]

[0019] [Figure 1] 1 is an example of a system framework provided by an embodiment of the present invention. [Diagram 2] 1 is a schematic flowchart of a method for predicting reactant molecules provided by an embodiment of the present invention; [Diagram 3] 4 is an example of a conversion path provided by an embodiment of the present invention. [Figure 4] 4 is another schematic flowchart of the reactant molecule prediction method provided by an embodiment of the present invention; [Diagram 5] 1 is a schematic flowchart of a method for training an adverse reaction prediction model provided by an embodiment of the present invention. [Figure 6] FIG. 6 is a schematic block diagram of a reactant molecule prediction apparatus provided according to an embodiment of the present invention. [Figure 7] FIG. 7 is a schematic block diagram of an apparatus for training an adverse reaction prediction model provided by an embodiment of the present invention. [Figure 8] FIG. 8 is a schematic block diagram of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0020] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention.

[0021] The technology provided by the present invention may relate to the field of artificial intelligence (AI).

[0022] Specifically, the technology provided by the present invention relates to the technical field of predicting reverse reactions based on AI in the chemical field.

[0023] Here, 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 the knowledge to obtain optimal results. In other words, artificial intelligence is a comprehensive technology of computer science that seeks to understand the nature of intelligence and produce new intelligent machines that can react in a manner similar to human intelligence. Artificial intelligence is the study of various design principles and realization methods for intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0024] Artificial intelligence is a comprehensive field that covers a wide range of fields, including both hardware and software level technologies. The fundamental technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technologies mainly include computer vision technology, voice processing technology, natural language processing technology, and machine learning / deep learning.

[0025] With the research and progress of artificial intelligence technology, artificial intelligence technology has been researched and applied in various fields, such as commonly seen smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart medical care, smart calls, etc. We believe that with the development of technology, artificial intelligence technology will be applied in more fields and play more and more important value.

[0026] An embodiment of the present invention may relate to computer vision (CV) technology in artificial intelligence technology.

[0027] Specifically, the embodiment of the present invention relates to a technical field of predicting reverse reactions based on the results of CV recognition in the chemical field.

[0028] Here, computer vision is the science that studies how to make machines "see", and furthermore, machine vision that uses cameras and computers instead of human eyes to perform recognition, prediction, measurement, etc. on targets, and furthermore, graphics processing to make computer processing more suitable for observing with human eyes or transmitting images to instruments for detection. As a scientific field, computer vision studies related theories and technologies and attempts to build artificial intelligence systems that can obtain information from images or multi-dimensional data. Computer vision technologies usually include technologies such as image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / action recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning and map building, and further includes traditional biometric recognition technologies such as face recognition, fingerprint recognition, etc.

[0029] The embodiment of the present invention may further relate to Machine Learning (ML) in artificial intelligence.

[0030] Specifically, the embodiments of the present invention relate to a technical field of predicting reverse reactions using a machine learning prediction model.

[0031] Here, ML is a multidisciplinary interdisciplinary field, and it relates to the multidisciplinary fields of probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory, etc. It specializes in the study of how computers can simulate or realize human learning behavior, acquire new knowledge or skills, reconstruct existing knowledge structures, and continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental path to endow computers with intelligence, and its application spans various fields of artificial intelligence. Machine learning and deep learning usually include techniques such as artificial neural networks, trust networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.

[0032] FIG. 1 is an example of a system framework 100 provided by an embodiment of the present invention.

[0033] The system framework 100 may be an application system, and the embodiment of the present invention does not limit the specific type of the application. The system framework 100 includes a terminal 131, a terminal 132, and a server cluster 110. The terminal 131 and the terminal 132 are both connected to the server cluster 110 via a wireless network or a wired network 120.

[0034] The terminal 131 and the terminal 132 may be at least one of a smartphone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP3 player, an MP4 player, and a laptop computer. An application program is installed and executed on the terminal 131 and the terminal 132. The application program may be any one of an online video program, a short video program, a photo 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 technology exchange program, a policy exchange program, a program including a comment mechanism, a program including a viewpoint presentation mechanism, and a knowledge sharing program. The terminal 131 and the terminal 132 may be terminals used by the user 141 and the user 142, respectively, and a user account is registered in the application running on the terminal 131 and the terminal 132.

[0035] 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 to applications (e.g., applications on the terminals 131 and 132). Exemplarily, the server cluster 110 is responsible for primary computing tasks, and the terminals 131 and 132 are responsible for secondary computing tasks, or the server cluster 110 is responsible for secondary computing tasks, and the terminals 131 and 132 are responsible for primary computing tasks, or the terminals 131 and 132 and the server cluster 110 use a distributed computing architecture to perform calculations cooperatively. For example, the computing tasks of the present invention may be computing tasks related to organic chemistry retrosynthetic reactant prediction or related auxiliary tasks.

[0036] Exemplarily, when the system framework 100 is a web browsing system, the server cluster 110 includes an access server 112, a web page server 111, and a data server 113. The access server 112 may be one or more, and the access server 112 is located in different nearby cities and is used to receive service requests from the terminals 131 and 132, and transfer the service requests to corresponding servers for processing. The web page server 111 is a server for providing web pages to the terminals 131 and 132, and a tracking code is integrated into the web pages, and the data server 113 is used to receive data (e.g., service data, etc.) reported from the terminals 131 and 132.

[0037] Prediction of organic chemistry retrosynthetic reactants is an important step in the development of new drugs and the production of novel materials, and aims to find a set of commercially available reactant molecules that can be used to synthesize product molecules. In traditional methods, reactant molecules are obtained by matching reaction templates with reactant molecules, but reaction templates need to be manually extracted by specialized researchers, which is a very time-consuming process, and reaction templates cannot cover all reaction types. In recent years, the development of deep learning technology makes it possible to learn potential reaction types from a huge database of organic chemical reactions. Therefore, it is very important to use deep learning technology to build a powerful retroreaction prediction model.

[0038] Up to now, the model structures commonly adopted are generally of two kinds: one is a sequence translation model based on the Simplified Molecular Input Line Entry System (SMILES) sequence, which is a standard for unambiguously describing molecular structures, and the other is a graph generation model based on graphs.

[0039] Graph generation models generally divide the organic chemistry reverse reaction prediction task into two subtasks: synthesizer recognition and synthesizer completion. Typically, one graph neural network is constructed to recognize synthesizers and obtain the synthesizer of the product molecule, and one graph variational autoencoder is constructed to complete the synthesizer atom by atom. However, constructing two independent networks used for synthesizer recognition and synthesizer completion separately not only increases the prediction complexity, but also makes it difficult to reach good generalization performance because the two subtasks have different optimization goals. Furthermore, when completing the synthesizer atom by atom, the complexity is high and the prediction performance is limited.

[0040] In view of the above problems, in order to reduce the difficulty of the complementary synthesizer and improve the performance of the reverse reaction prediction, it is considered to complement the synthesizer with a leaving group extracted in advance. Here, a leaving group is an atom or functional group that leaves a large molecule in a chemical reaction, and a 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.

[0041] However, employing pre-extracted leaving groups to complement the synthesizer cannot improve the generalization performance of the model, and is further restricted by the properties of the leaving groups, leading to highly unbalanced distribution of samples, thereby limiting the predictive effect of reactant molecules.

[0042] In addition, two subtasks can be jointly learned in one end-to-end model, i.e., the two subtasks of compositor recognition and compositor complementation are integrated into one end-to-end model, and the compositor is complemented atom by atom or by employing a benzene ring. Here, the end-to-end model refers to a model that performs training optimization according to one optimization goal.

[0043] However, while the end-to-end model architecture allows the model to achieve better generalization performance, the adoption of small units such as single atoms and benzene rings to complement the compositional elements requires predicting longer graph editing sequences, which increases the difficulty of prediction and prevents the top-1 accuracy from reaching the state of the art. Here, the top-1 accuracy refers to the accuracy with which the top-ranked category matches the actual results.

[0044] In view of this, the embodiment of the present invention provides a reactant molecule prediction method, a training method, an apparatus, and an electronic device, which can reduce the prediction complexity of reactant molecules and improve the generalization performance of reactant molecule prediction, as well as improve the prediction performance of reactant molecules. Specifically, the embodiment of the present invention designs an end-to-end reverse reaction prediction model to jointly optimize two subtasks of synthesizer prediction and complementary synthesizer, specifically, the synthesizer prediction task can be constructed to predict an edit sequence that can indicate the transformation process from a product molecule to a synthesizer, and the complementary synthesizer prediction task can be constructed to predict a synthesizer complementary sequence that can indicate the transformation process from a synthesizer to a reactant molecule, and the edit sequence and the synthesizer complementary sequence construct a transformation path that can indicate the transformation process from a product molecule to a reactant molecule.

[0045] In particular, as the amount of data increases, the technique provided by the embodiment of the present invention can be easily extended to more complex and more diverse chemical reaction models. Exemplarily, the reverse reaction prediction model provided by the embodiment of the present invention can be extended to a multi-step reverse reaction prediction task, for example, by adopting a Monte Carlo tree search algorithm or the like to extend the reverse reaction prediction model provided by the embodiment of the present invention to a multi-step reverse reaction prediction task.

[0046] Furthermore, by introducing a basic graph, the embodiment of the present invention can minimize the problem of the limited predictive effect of reactant molecules due to the problem of extremely unbalanced leaving group samples, and can solve the problem of excessively high prediction complexity when using an atomic complement synthesizer, thereby improving the prediction accuracy of the reverse reaction prediction model.

[0047] FIG. 2 is a schematic flow chart of a reactant molecule prediction method 200 provided by an embodiment of the present invention, and the prediction method 200 may be executed by any electronic device having data processing capabilities. For example, the electronic device may be implemented as a server. The server may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, and may further be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, networking services, cloud communications, middleware services, domain services, security services, and big data and artificial intelligence platforms. The servers may be directly or indirectly connected by wired or wireless communication methods, and the present invention is not limited thereto. For convenience of explanation, the following will take a reactant molecule prediction device as an example to explain the prediction method provided by the present invention.

[0048] As shown in FIG. 2, the prediction method 200 may include the following steps.

[0049] In step S210, feature extraction is performed on the product molecule to obtain the features of the product molecule.

[0050] For example, a simplified molecular input line entry system (SMILES) or a graph neural network (GNN) is used to perform feature extraction on the product molecule to obtain the features of the product molecule. Of course, feature extraction can also be performed by a model or framework product molecule having other type functions, and the embodiment of the present invention is not particularly limited thereto.

[0051] Exemplarily, the feature of the product molecule can be determined based on the feature of each atom of the product molecule, for example, a global attention pooling function can be used to calculate the features of all atoms to obtain the feature of the product molecule.

[0052] Exemplarily, the original feature of each atom and the original feature of the chemical bond between each atom and the adjacent node of each atom can be encoded to obtain the feature of each atom. For example, the original feature of each atom and the original feature of the chemical bond between each atom and the adjacent node of each atom can be encoded using MPNN to obtain the feature of each atom. Here, the original feature of each atom is used to indicate at least one of information such as the type of atom (C, N, O, S, etc.), the degree of chemical bond, chirality, and the number of hydrogen atoms. The original feature of the chemical bond is used to indicate at least one of information such as chemical bond type (single bond, double bond, triple bond, aromatic bond, etc.), arrangement, and aromaticity.

[0053] Illustratively, the characteristics of the product molecule may further include characteristics to represent the types of chemical bonds in the product molecule, including, but not limited to, single bonds, double bonds, triple bonds, and non-chemical bonds.

[0054] By way of example, the product molecule characteristics may be embodied in the form of a vector or in the form of a matrix, and of course may alternatively be embodied in an array or other form of information, although the present invention is not particularly limited thereto.

[0055] The following will exemplarily describe the features of the product molecule by taking a feature vector as an example.

[0056] For example, a molecule containing n atoms and m chemical bonds can be represented by a graph structure G = (V, E), where V is a set of atoms of size n and E is a set of chemical bonds of size m. Each atom v ∈ V is associated with a feature vector x v , which represent information such as atom type (C, N, O, S, etc.), degree of chemical bonding, chirality, and number of hydrogen atoms. Similarly, each chemical bond e∈E has a feature vector x v,u , which contains information such as chemical bond type (single bond, double bond, triple bond, aromatic bond, etc.), configuration, and aromaticity. In addition, a four-dimensional one-hot vector can be defined to represent the types of chemical bonds in the molecular graph, i.e., single bond, double bond, triple bond, and non-chemical bond. A one-hot vector is a vector in which one element is 1, and only one element is 1, and the rest are all 0. Every atom and chemical bond has a tag s∈{0,1} to indicate whether it is a relevant edit target when the product molecule is converted to a synthon.

[0057] Exemplarily, first, an L-layer message passing neural network (MPNN) can be used to encode each atom in the product molecule G, and obtain a feature vector for each atom in the product molecule. The MPNN is a monitoring learning framework applicable to graphs. Furthermore, a multilayer perceptron (MLP) can be used to encode each chemical bond in the product molecule G, and obtain a feature vector for each chemical bond. The MLP is a feed-forward artificial neural network model, and the MLP can map multiple input data sets to a single output data set.

[0058] For example, the feature vector hv and the chemical bond feature vector h v,u is calculated using the following formula:

[0059]

number

[0060] Furthermore, for the convenience of subsequent tasks, v,u is expressed in the form of a self-loop, i.e.

[0061]

number

[0062]

number

[0063] Illustratively, an atom tag may be an atom index and a chemical bond tag may be a chemical bond index.

[0064] After obtaining the feature vectors of the atoms, we use a global attention pooling function to extract the feature vectors of all the atoms into the product molecule feature vector h G Note that we may need a composite feature vector, h G The method is the same as that of obtaining the composite feature vector h syn It is also possible to calculate

[0065] Of course, in other alternative embodiments, a comparative learning strategy may be introduced in the encoding of product molecules or encoding of composite molecules, such as masking the graph structure or features of the molecular graph, thereby expanding the feature dimension and improving the predictive performance of reactant molecules.

[0066] In step S220, based on the characteristics of the product molecule, a reverse reaction prediction model is used to predict a transformation path from the product molecule to a plurality of reactant molecules, where the transformation path includes an edit sequence and a composer complement sequence.

[0067] Exemplarily, the edit sequence is a sequence formed by an edit operation and the composer completion sequence is a sequence formed by a composer completion operation.

[0068] In other words, the prediction task of the reverse reaction prediction model is defined as a reactant molecule generation task. That is, the prediction task of the reverse reaction prediction model predicts a conversion path for describing a conversion path from a product molecule graph to a reactant molecule graph, and the conversion path is defined by an edit operation on the product molecule and a composer completion operation on the composer. In other words, it is constructed by an (Edit) sequence formed by an edit operation and a composer completion sequence formed by a composer completion operation. In this way, a conversion path describing a conversion path from a product molecule graph to a reactant molecule graph can be defined in advance for each product molecule. The composer completion operation is also called a basic graph addition (AddingMotif) operation, and the composer completion sequence is also called a basic graph addition sequence.

[0069] Alternatively, the transformation path includes an edit sequence and a composer completion sequence, where the edit sequence is used to describe the chemical bonds and atomic changes from the product molecule to the composer. The composer completion sequence is used to describe the process of completing the composer in the base graph (motif). For the edit sequence, an edit operation is introduced to indicate each change from the product molecule to the composer, and for the composer completion sequence, a composer completion operation is introduced to describe each completion operation in the process of completing the composer in the base graph (motif).

[0070] Exemplarily, the editing operation is an operation of editing atoms or chemical bonds in the product molecule during the process of converting the product molecule into a plurality of composite molecules of the product molecule.

[0071] Exemplarily, the composer completion operation is an operation of adding a base graph on the way from the plurality of composers to the plurality of reactant molecules.

[0072] Exemplarily, the editing sequence may further include an editing completion operation, for example, the conversion path includes at least one editing operation, an editing completion operation, and at least one composition child completion operation in sequence. The editing completion operation is used to connect or partition the at least one editing operation and the at least one composition child completion operation. In other words, the editing completion operation is used to trigger the start of a composition child completion task of a reverse reaction prediction model. In an embodiment of the present invention, a conversion path is constructed by innovatively introducing an editing completion operation to connect at least one editing operation to at least one composition child completion operation.

[0073] Exemplarily, the editing sequence may further include a Start operation, for example, the conversion path includes the Start operation, at least one Edit operation, an Edit Complete operation, and at least one Composer Completion operation, in order. The Start operation is used to trigger the start of a composer prediction task of the reverse reaction prediction model, or is used to trigger the start of a reactant molecule prediction task of the reverse reaction prediction model.

[0074] Of course, in other alternative embodiments, the edit completion action may be an action in a compositionator completion sequence, and the invention is not particularly limited thereto.

[0075] In addition, the reverse reaction prediction model according to the present invention may be any deep learning or machine learning model for recognition, and the embodiments of the present invention are not limited to a specific type.

[0076] For example, the adverse reaction prediction model may include, but is not limited to, a conventional learning model, an integrated learning model, or a deep learning model. Exemplarily, the conventional learning model may include, but is not limited to, a tree model (regression tree) or a logistic regression (LR) model, the integrated learning model may include, but is not limited to, a gradient boosting algorithm (XGBoost) or a random forest model, and the deep learning model may include, but is not limited to, a neural network, a dynamic Bayesian network (DBN), and a stacked auto-encoder network (SAE) model. Of course, in other embodiments of the present invention, other machine learning class models may be used instead.

[0077] Illustratively, a batch size can be used to train the model.

[0078] Here, the batch size is the number of samples selected in one training. The value of the batch size determines the time required to complete each epoch and the smoothness of the gradient between each iteration during deep learning training. For a training set with a size of N, the most common batch size sampling method during each epoch is adopted to sample once per ampule, and the batch size is b. Since the number of iterations required for each epoch is N / b, the time required for each epoch also increases approximately with the increase in the number of iterations. If the batch size value is too small, it takes a long time and at the same time the gradient fluctuates violently, which is unfavorable to convergence. If the batch size value is too large, the gradient direction of different batch sizes does not change and is prone to local minimum values. The embodiment of the present invention is not specifically limited to the value of the batch size. For example, an appropriate batch size can be determined according to actual needs or scenes. Of course, in other alternative embodiments, for a database with a small number of samples, the batch size does not need to be adopted and is effective. However, in the case of a large database, inputting all the data into the network at once may cause a memory explosion, so in this case, the batch size can be adopted to train the network.

[0079] In order to make the embodiments of the present invention easier to understand, the following description will be given regarding the present invention.

[0080] Neural Network (NN): A neural network is a computational model consisting of multiple interconnected neuron nodes, where the connections between the nodes represent weights from input signals to output signals, called weights, and each node performs weighted summation (SUM) on different input signals and outputs them via a specific activation function (f).

[0081] Exemplarily, neural networks include, but are not limited to, deep neural networks (DNNs), convolutional neural networks (CNNs), and recurrent neural networks (RNNs).

[0082] Convolutional Neural Networks (CNN): It is a feedforward neural network that includes convolutional calculations and has a deep structure, and is one of the representative algorithms of deep learning. Convolutional neural networks are also called shift-invariant artificial neural networks (SIANN) because they can perform shift-invariant classification.

[0083] Recurrent Neural Network (RNN): It is a neural network that models sequence data and has achieved remarkable results in the field of natural language processing, such as in machine translation and speech recognition. In a specific implementation, the network stores information from past times and uses it to calculate the current output. That is, the nodes between the hidden layers are no longer connectionless but connection-oriented, and furthermore, the input of the hidden layer includes not only the input layer but also the output of the hidden layer at the previous time. Commonly used RNNs include structures such as long short-term memory networks (LSTMs) and gated recurrent units (GRUs).

[0084] In step S230, the editing objects indicated by each editing operation in the editing sequence are edited according to the post-editing state indicated by each editing operation to obtain a plurality of synthons corresponding to the product molecule, and the editing objects are atoms or chemical bonds in the product molecule.

[0085] For example, in accordance with the order of the editing operations in the editing sequence, the editing targets indicated by each editing operation in the editing sequence are edited based on the post-editing state indicated by each editing operation in the editing sequence to obtain a plurality of synthons corresponding to the product molecules.

[0086] In some embodiments, when the editing target indicated by the editing operation is an atom, the post-edit state indicated by the editing operation is a change in the number of charges on the atom or a change in the number of hydrogen atoms on the atom.When the editing target indicated by the editing operation is a chemical bond, the post-edit state indicated by the editing operation is any one of adding a chemical bond, deleting a chemical bond, and changing the type of the chemical bond.

[0087] Exemplarily, the post-edit state indicated by the editing operation is associated with an editing target indicated by the editing operation.

[0088] For example, when the editing target indicated by the editing operation is a chemical bond, the post-editing state indicated by the editing operation includes, but is not limited to, a state of adding a chemical bond, deleting a chemical bond, or changing the type of a chemical bond. Also, when the editing target indicated by the editing operation is an atom, the post-editing state indicated by the editing operation is one of a state of changing the number of charges on an atom or a state of changing the number of hydrogen atoms.

[0089] In some embodiments, the editing operation is indicated by an operation tag for indicating the editing, a tag for indicating the edit target, and a tag for indicating the state after editing.

[0090] Exemplarily, an editing operation in an editing sequence is defined as an editing triplet, i.e., (π1,o,τ), where π1 represents the operation predicted by the reverse reaction prediction model as the editing operation, o represents the tag of the editing target corresponding to the editing operation predicted by the reverse reaction prediction model, and τ represents the tag of the post-editing state corresponding to the editing operation predicted by the reverse reaction prediction model. For example, an editing triplet is (π2,b,none), where π1 represents the operation predicted by the reverse reaction prediction model as the editing operation, b represents the editing target corresponding to the editing operation is the chemical bond of tag b, and none represents that the post-editing state corresponding to the editing operation is deleting the chemical bond of tag b.

[0091] Of course, in other alternative embodiments, the edit operation can be defined as a tuple or a number in another format. For example, when the edit operation is defined as a tuple, it can be specifically defined as a tag for indicating an edit target and a tag for indicating a state after the edit.

[0092] In step S240, for each composer in the multiple composers, based on at least one composer completion operation corresponding to each composer in the composer completion sequence, a basic graph (motif) indicated by each composer completion operation is added according to an interface atom indicated by each composer completion operation in the at least one composer completion operation to obtain multiple reactant molecules corresponding to the multiple composers, and the basic graph includes multiple atoms or atomic edges for connecting the multiple atoms.

[0093] Exemplarily, the atomic edge may represent a mutual force between two or more atoms connected to the atomic edge, the force being used to bond the atoms connected to the atomic edge.

[0094] Exemplarily, the atomic edge is used to connect chemical bonds of different atoms of the plurality of atoms, and the atomic edge may be a chemical bond, including, but not limited to, an ionic bond, a covalent bond, or a metallic bond.

[0095] Illustratively, a synthesis element is a molecular fragment obtained after a product molecular graph breaks a chemical bond.

[0096] For example, the motif may be a subgraph of the reactants, for example a subgraph on the reactants corresponding to the composition element. The reactants corresponding to the composition element may include molecules or reactants that include the composition element.

[0097] A motif may contain subgraphs obtained via the following schemes:

[0098] 1. Cut the edges where there are differences between the composite and the corresponding reactants to obtain a set of subgraphs that hold the interface atoms corresponding to the attached atoms on the composite.

[0099] 2. On one subgraph, if two connected atoms belong to two rings respectively, the chemical bond connecting these two atoms is cut, thereby obtaining two smaller subgraphs.

[0100] It should be noted that the ring according to the embodiment of the present invention may be a monocyclic ring, i.e., there is only one ring in the molecule. Correspondingly, when two connected atoms in one subgraph belong to two monocyclic rings, the connected chemical bond between the two atoms is broken, thereby obtaining two smaller subgraphs. Furthermore, the ring according to the embodiment of the present invention may be a cycloalkane, which may be classified based on the number of carbon atoms on the ring. Exemplarily, when the number of carbon atoms on the ring is 3-4, it is called a small ring, when the number of carbon atoms on the ring is 5-6, it is called a normal ring, when the number of carbon atoms on the ring is 7-12, it is called a medium ring, and when the number of carbon atoms on the ring is more than 12, it is called a large ring.

[0101] 3. On a subgraph, if one of two connected atoms belongs to a ring and the degree of the other atom is greater than 1, then the connecting chemical bond between the two atoms is broken, thereby obtaining two smaller subgraphs.

[0102] Exemplarily, the reverse reaction prediction model predicts the composite compensating sequence based on a first order of the multiple composites, and when adding a basic graph for each composite in the multiple composites, the traversal order of the multiple composites is a second order. In this case, based on the first order and the second order, at least one composite compensating operation corresponding to each composite in the composite compensating sequence is determined, and a basic graph indicated by each composite compensating operation in accordance with an interface atom indicated by each composite compensating operation in the at least one composite compensating operation can be added. Here, the first order and the second order may be the same or different. For example, based on the first order, the second order, and the number of at least one composite compensating operation corresponding to each composite, at least one composite compensating operation corresponding to each composite can be determined, and a basic graph indicated by each composite compensating operation in accordance with an interface atom indicated by each composite compensating operation in the at least one composite compensating operation can be added.

[0103] Assuming that the first order is equal to the second order and the number of at least one composer completion operation corresponding to each of the composers is a predetermined numerical value, a basic graph indicated by each composer completion operation can be added to each composer in the plurality of composers in order according to a traversal order of the plurality of composers used when predicting the composer completion sequence in the reverse reaction prediction model, according to an interface atom indicated by each composer completion operation in the predetermined numerical number of composer completion operations corresponding to each of the composers. For example, assuming that the plurality of composers include composer 1 and composer 2 and the first composer completion operation in the composer completion sequence is a composer completion operation for composer 1, the remaining composer completion operations other than the first composer completion operation in the composer completion sequence are composer completion operations for composer 2. In this case, a basic graph indicated by the first composer completion operation can be added according to an interface atom indicated by the first composer completion operation to obtain a plurality of reactant molecules corresponding to the composer 1. Furthermore, a basic graph indicated by the remaining composition element completion operations can be added in sequence to the interface atoms indicated by the remaining composition element completion operations to obtain a plurality of reactant molecules corresponding to the composition element 2.

[0104] For example, the interface atom indicated by each composition child completion operation is an atom that becomes a connecting node on the basic graph indicated by each composition child completion operation when composition child completion is performed using the basic graph indicated by each composition child completion operation.

[0105] For example, when adding a basic graph (motif) indicated by the composition child completion operation, a plurality of reactant molecules corresponding to the product molecule can be obtained by using an interface atom indicated by the composition child completion operation and an attached atom for the composition child completion operation as a connection node. Note that the interface atom indicated by the composition child completion operation and the attached atom for the composition child completion operation are the same atom in the reactant molecule.

[0106] Illustratively, attachment atoms according to an embodiment of the present invention include the atom selected as the object of editing and atoms at both ends of the chemical bond selected as the object of editing.

[0107] In some embodiments, the compositional element completion operation is represented by an operation tag to indicate the compositional element completion, a tag to indicate the base graph, and a tag to indicate the interface atom.

[0108] Exemplarily, a composer complement action in a composer complement sequence is defined as a composer complement triplet, i.e., (π3, z, q), where π3 indicates that the action predicted by the reverse reaction prediction model is a composer complement action. (outside 1) TIFF2025500754000005.tif8170 represents the tag of the basic graph indicated by the composition child completion action predicted by the inverse reaction prediction model. q represents the tag of the interface atom corresponding to the composition child completion action predicted by the inverse reaction prediction model. For example, (π3,z1,q1). π3 represents that the action predicted by the inverse reaction prediction model is a composition child completion action. z1 represents the tag of the basic graph indicated by the composition child completion action predicted by the inverse reaction prediction model, that is, the basic graph whose tag is z1. q1 represents the tag of the interface atom corresponding to the composition child completion action predicted by the inverse reaction prediction model, that is, the atom whose tag is q1 in the basic graph whose tag is z1. Based on this, based on (π3,z1,q1), an atom whose tag is q1 in the basic graph whose tag is z1 can be used as an interface atom, and composition child completion can be performed using the basic graph of z1.

[0109] Of course, in other alternative embodiments, the composer completion operation can be defined as a tuple or a number in other formats. For example, if the composer completion operation is defined as a tuple, it can be specifically defined as a tag to indicate the base graph and a tag to indicate the interface atom.

[0110] By introducing an inverse reaction prediction model for predicting the conversion path from the product molecule to multiple reactant molecules, it is possible to integrate the prediction task of the synthesizer and the prediction task of the synthesizer complement, that is, the inverse reaction prediction model introduced in the embodiment of the present invention can learn the potential relationship between the two subtasks of the synthesizer prediction and the complement synthesizer, thereby greatly improving the generalization performance of the model, reducing the prediction complexity of the reactant molecule, and improving the generalization performance of the reactant molecule prediction. Furthermore, by introducing a basic graph and designing the basic graph into a structure including multiple atoms or atomic edges for connecting the multiple atoms, a short and accurate conversion path can be reasonably constructed, avoiding the length of the synthesizer complement sequence being too long, reducing the prediction difficulty of the reactant molecule, improving the prediction accuracy of the reactant molecule, and improving the prediction performance of the reactant molecule.

[0111] Furthermore, by improving the predictive performance of reactant molecules, the following technical effects can be obtained.

[0112] 1. It is possible to plan synthetic routes for designed drugs or new material molecules, and improve the research efficiency of drugs or new material molecules.

[0113] 2. It can post some potential scientific disciplines and provide new scientific knowledge.

[0114] 3. It can provide more accurate synthetic route planning than professional researchers, and not only can it predict reliable reactant molecules when reaction templates are lacking, but it can also predict reaction types that professional researchers have not yet clarified, greatly improving the efficiency of developing new drugs and new materials.

[0115] In some embodiments, step S220 includes: The method includes a step of obtaining input features of a t-th motion based on the (t-1)-th motion obtained by prediction using the inverse reaction prediction model, where t is an integer greater than 1; and a step of predicting the t-th motion based on the input features corresponding to the t-th motion and hidden features corresponding to the t-th motion until the motion obtained by prediction using the inverse reaction prediction model is a composite complement motion and all attached atoms on the multiple composites and all attached atoms on a basic graph added to the multiple composites have been traversed, thereby obtaining the conversion path, wherein the hidden features of the t-th motion are associated with a motion predicted by the inverse reaction prediction model before the t-th motion.

[0116] Exemplarily, the attachment atoms include the atom selected as the editing target and atoms at both ends of the chemical bond selected as the editing target.

[0117] Exemplarily, the inverse reaction prediction model may be a recurrent neural network (RNN), based on which the (t-1)th operation may correspond to time t-1, and the tth operation may correspond to time t; that is, based on the operation obtained by the prediction of the RNN at time t-1, 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 operation of the RNN at time t is predicted until the operation predicted by the RNN is a composer complement operation, and all attached atoms on the multiple composers and all attached atoms on the basic graph added to the multiple composers have been traversed, thereby obtaining the conversion path.

[0118] Note that a feature of multi-layer sensors and convolutional neural networks is that they assume that the inputs are independent, contextless units, e.g., the input is an image and the network recognizes whether it is a dog or a cat. However, for sequential inputs with some clear contextual features, such as predicting the playback content of the next frame of a video, it is clear that such an output needs to depend on previous inputs. That is, the network needs to have a certain memory capacity, and RNNs can just give the network such memory capacity.

[0119] Of course, in other alternative embodiments, the reverse reaction prediction model may be other models, and the present invention is not particularly limited thereto.

[0120] For example, when the reverse reaction prediction model predicts a t-th action, an output feature u is generated based on the input feature corresponding to the t-th action and the hidden feature corresponding to the t-th action. t Then, the output feature u t and the characteristics of the product molecule h G and the feature Ψ for recognizing the t-th action. t can be obtained.

[0121] Exemplarily, the output feature u t and the feature Ψ for recognizing the t-th action t can be obtained.

[0122]

number

[0123] For example, the reverse reaction prediction model can recognize the t-th action by the following equation:

[0124]

number

[0125] In the embodiment of the present invention, the output feature u t and the characteristics of the product molecule h G By stitching together the product molecule features and the RNN output features for subsequent motion prediction, global topology information can be integrated into the motion prediction process, thereby improving the accuracy of motion prediction.

[0126] In some embodiments, the conversion path can be determined in the following manner.

[0127] According to a beam search method of hyperparameter k, k first prediction results with the highest scores are obtained from the prediction results of the (t-1)th motion, and k first input features corresponding to the tth motion are determined based on the k first prediction results. The tth motion is predicted based on each first input feature in the k first input features and a hidden feature corresponding to the tth motion. According to a beam search method of hyperparameter k, k second prediction results with the highest scores are obtained from the prediction results obtained by prediction, and k second input features corresponding to the (t+1)th motion are determined based on the k second prediction results. The (t+1)th motion is predicted based on each second input feature in the k second input features and a hidden feature corresponding to the (t+1)th motion until the motion obtained by the prediction using the reverse reaction prediction model is a composite complement motion and all attached atoms on the multiple composites and all attached atoms on the basic graph added to the multiple composites have been traversed, thereby obtaining the conversion path.

[0128] For example, when the prediction device predicts the t-th action based on each first input feature in the k first input features and a hidden feature corresponding to the t-th action, and obtains 2k prediction results, it can obtain the k second prediction results with the highest scores from the 2k predicted prediction results according to a beam search method of hyperparameter k, and determine them as the k second input features corresponding to the (t+1)-numbered action.

[0129] For example, when obtaining the k first prediction results with the highest scores from the prediction results of the (t-1)th operation according to the beam search method of the hyper parameter k, the prediction results of the (t-1)th operation are first sorted in order of score, and then the k prediction results with the highest scores among the prediction results of the (t-1)th operation can be set as the k first prediction results. For example, when sorting the prediction results of the (t-1)th operation in order of score, first, a cumulative sum is calculated for the scores of all prediction results already predicted on the path on which each prediction result exists, and a score cumulative sum corresponding to each prediction result is obtained, and then, among the prediction results of the (t-1)th operation, the k prediction results with the highest scores in the cumulative sum can be set as the k first prediction results.

[0130] Exemplarily, Beam Search with hyperparameter k is used to select multiple alternatives for an input sequence at each time step based on conditional probability. The number of multiple alternatives depends on the hyperparameter k, called Beam Width. At each time step, Beam Search selects the k most probable optimal alternatives as the most likely choices at the current time step. That is, at each time step, it selects the k best results with the highest scores based on the log-likelihood score function to be the input for the next time step. In other words, this process can be described as the construction of a search tree, where the leaf node with the highest score is expanded with its subnodes, while other leaf nodes are removed.

[0131] In some embodiments, when the (t-1)th action is the edit action, input features of the tth action are determined based on features of the subgraph obtained by editing using the (t-1)th action, and based on the input features of the tth action and the hidden features of the tth action, the inverse reaction prediction model is used to predict the editing target and the post-edit state indicated by the tth action until the action obtained by prediction using the inverse reaction prediction model is the last edit action in the edit sequence, thereby obtaining the edit sequence.

[0132] Exemplarily, the last editing operation is an editing completion operation.

[0133] In other words, if the (t-1)th action is the edit action, the input features of the t-th action are determined based on the features of the subgraph obtained by editing using the (t-1)th action, and the edit target and the post-edit state indicated by the t-th action are predicted using the inverse reaction prediction model based on the input features of the t-th action and the hidden features of the t-th action until the action obtained by prediction using the inverse reaction prediction model is the edited completed action, thereby obtaining the edit sequence.

[0134] Illustratively, t is an integer greater than 1 or greater than 2.

[0135] For example, if the (t-1)th operation is the first edit operation, the (t-1)th operation is the start operation, and in this case, the feature of the subgraph obtained by editing the (t-1)th operation is the feature of the product molecule.

[0136] For example, when the inverse reaction prediction model predicts the tth action, the intermediate molecular fragment processed based on the (t-1)th action can be decoded to obtain the features of the intermediate molecular fragment edited based on the (t-1)th action.

[0137] Exemplarily, when the t-th operation is the editing operation, the reverse reaction prediction model calculates a score s based on each chemical bond and each atom. i ^ , and the editing target corresponding to the t-th action can be predicted.

[0138] For example, when the t-th operation is the editing operation, the reverse reaction prediction model first assigns a score s to each chemical bond and each atom when predicting an editing target corresponding to the t-th operation. i ^, which represents the probability that a chemical bond or atom is considered as an edit target in the (t-1)th operation, and then a score s is assigned based on each chemical bond and each atom. i ^ and predicts the editing target corresponding to the t-th action.

[0139] For example, the reverse reaction prediction model assigns a score s to each chemical bond and each atom according to the following formula: i ^ can be sought.

[0140]

number

[0141] Next, the reverse reaction prediction model is used to determine the edited state r for the edit target corresponding to the t-th action. b ^ Predict.

[0142] For example, the reverse reaction prediction model predicts a predicted edited state r of the edit target corresponding to the t-th action by the following formula: b ^ can be predicted.

[0143]

number

[0144]

number

[0145] For example, the reverse reaction prediction model applies the predicted editing target corresponding to the t-th motion and the edited state corresponding to the t-th motion to the unedited intermediate molecular fragment corresponding to the t-th motion to obtain the edited intermediate molecular fragment corresponding to the t-th motion, and then calculates MPNM(·) to obtain the feature h of the edited intermediate molecular fragment corresponding to the t-th motion. t syn Next, the edited intermediate molecular fragment feature h corresponding to the t-th operation is obtained. t syn Based on the editing target corresponding to the t-th motion and the edited state corresponding to the t-th motion, an input feature input corresponding to the (t+1)-numbered motion is calculated. t Request.

[0146] For example, the input feature input corresponding to the (t+1)th action is calculated according to the following formula: t can be obtained.

[0147]

number

[0148]

number

[0149] In some embodiments, when the (t-1)th operation is the last edit operation in the edit sequence or the composite child completion operation, input features of the tth operation are determined based on features of a subgraph obtained by editing using the base (t-1)th operation and features of attached atoms corresponding to the (t-1)th operation, and based on the input features of the tth operation and the hidden features of the tth operation, the base graph and interface atoms indicated by the tth operation are predicted until the operation obtained by prediction using the reverse reaction prediction model is a composite child completion operation and all attached atoms on the multiple composites and all attached atoms on the base graph added to the multiple composites have been traversed, thereby obtaining the composite child completion sequence.

[0150] Exemplarily, the last editing operation is an editing completion operation.

[0151] In other words, if the (t-1)th operation is an edit completion operation or the composition child completion operation, the input features of the tth operation are determined based on the features of the subgraph obtained by editing using the (t-1)th operation and the features of the attached atoms corresponding to the (t-1)th operation, and based on the input features of the tth operation and the hidden features of the tth operation, the basic graph and interface atoms indicated by the tth operation are predicted until the operation obtained by prediction using the reverse reaction prediction model is a composition child completion operation and all attached atoms on the multiple composition children and all attached atoms on the basic graph added to the multiple composition children have been traversed, thereby obtaining the composition child completion sequence.

[0152] For example, when the operation predicted by the reverse reaction prediction model is the last editing operation, the synthesis prediction step is terminated and the reactant prediction process enters the synthesis completion step. In this case, all the attached atoms are sorted in the order of the tags of the product molecules for synthesis completion.

[0153] For example, when the motion predicted by the reverse reaction prediction model is the last editing motion, the input feature input corresponding to the (t+1)-numbered motion is calculated according to the following formula: t can be determined.

[0154]

number

[0155] For example, in the synthesis element completion step, the reverse reaction prediction model sequentially traverses all the attached atoms on the synthesis element and all the attached atoms on the added base graph, and assigns a base graph (motif) to each attached atom. Prediction of the base graph can be viewed as a multi-classification task in a pre-stored dictionary Z. Prediction based on the base graph to obtain the base graph z ^ After obtaining, we further consider the basic graph z ^ The attached atom a on t The corresponding interface atom q ^ can be determined.

[0156] Exemplarily, the reverse reaction prediction model is a basic graph z corresponding to the t-th action according to the following formula: ^ can be predicted.

[0157]

number

[0158] Exemplarily, the reverse reaction prediction model is a basic graph z corresponding to the t-th action according to the following formula: ^ The attached atom a on t The interface atom q corresponding to ^ can be predicted.

[0159]

number

[0160] If the (t-1)th operation is the last edit operation or the composer completion operation and contains only one interface atom of the base graph corresponding to the (t-1)th operation, the input features of the tth operation are determined based on the features of the subgraph obtained by editing using the (t-1)th operation and the features of the attached atom corresponding to the (t-1)th operation.

[0161] Exemplarily, the predicted base graph (Outside 3) If TIFF2025500754000017.tif8170 contains only one interface atom, the input feature input corresponding to the (t+1)th operation is calculated according to the following formula: t can be determined.

[0162]

number

[0163] If the (t-1)th operation is the last edit operation or the composer completion operation, and the interface atom of the base graph corresponding to the (t-1)th operation includes only multiple interface atoms, the input features of the tth operation are determined based on the features of the subgraph obtained by editing using the (t-1)th operation, the features of the base graph corresponding to the (t-1)th operation, and the features of the attached atoms corresponding to the (t-1)th operation.

[0164] Exemplarily, the predicted base graph (outside 4) If TIFF2025500754000019.tif9170 contains only multiple interface atoms, the input feature input corresponding to the (t+1)th operation is calculated according to the following formula: t can be determined.

[0165]

number

[0166] As can be seen from the above technology, when an edit sequence and a composite complement sequence are obtained by prediction of the reverse reaction prediction model, a transformation path can be obtained, and then the transformation path can be applied to a product molecular graph to obtain a reactant molecular graph.

[0167] FIG. 3 is an example of a conversion path provided by an embodiment of the present invention.

[0168] As shown in FIG. 3, when reactant prediction is performed on the product molecule shown on the left side of FIG. 3(a) using the inverse reaction prediction model, the conversion path shown in FIG. 3(b) can be obtained according to the flow shown in FIG. 3(c), and two reactant molecules shown on the right side of FIG. 3(a) can be obtained. Here, π1 represents the operation predicted by the inverse reaction prediction model is an edit operation, π2 represents the operation predicted by the inverse reaction prediction model is an edit completion operation, π3 represents the operation predicted by the inverse reaction prediction model is a composition child complement operation, a1 to a3 represent attached atoms, q1 to q4 represent interface atoms, z1 to z3 represent basic graphs, b represents the editing target corresponding to the editing operation is the chemical bond of tag b, and none (none) represents the state after editing corresponding to the editing operation to delete the chemical bond of tag b. The attached atoms are interfaces that add basic graphs (motifs).

[0169] Specifically, when the input of the reverse reaction prediction model is a start operation, the tag of the predicted first editing operation is triplet (π1, b, none), then the triplet (π1, b, none) is input, and the tag of the predicted second operation is π2, then all the attached atoms are sorted in the tag order in the product molecule, and the tuples (π3, a1), (π3, a2), and (π3, a2) are input in order, and the tags of the predicted operations in order are triplet (π3, z1, q1), triplet (π3, z2, q2), and triplet (π3, z3, q4). Based on this, the obtained conversion path is defined as the path shown in (b) of Figure 3: triplet (π1, b, none), π2, triplet (π3, z1, q1), triplet (π3, z2, q2), and triplet (π3, z3, q4). This allows a conversion pathway to be induced in the product molecule to give the reactant molecule shown on the right side of Figure 3(a).

[0170] In other words, in the reactant prediction process shown in Fig. 3, the edit sequence contains only one edit operation, which is defined as the triplet (π2, b, none). The composer complement sequence contains three composer complement operations, namely, the triplet (π3, z1, q1), the triplet (π3, z2, q2), and the triplet (π3, z3, q4), respectively.

[0171] In addition, when adding a basic graph (motif) indicated by the composition child completion operation, the interface atom indicated by the composition child completion operation and the attached atom for the composition child completion operation can be used as connection nodes. In addition, the interface atom indicated by the composition child completion operation and the attached atom for the composition child completion operation are the same atom in the reactant molecule. For example, when z1 is added based on the triplet (π3, z1, q1), a1 and q1 are the same atom in the reactant molecule (i.e., N atom); similarly, when z2 is added based on the triplet (π3, z2, q2), a2 and q2 are the same atom in the reactant molecule (i.e., O atom); after adding z2, the interface atom q3 is changed to the attached atom a3; in this case, when z3 is added based on the triplet (π3, z3, q4), a3 and q4 are the same atom in the reactant molecule (i.e., C atom).

[0172] It should be noted that FIG. 3 is merely an example of the present invention and should not be understood as a limitation of the present invention.

[0173] For example, in other alternative embodiments, the transformation path may further include other numbers of editing operations or composition element completion operations, and thus may include other numbers of composition element or reactant molecules, and embodiments of the present invention are not particularly limited thereto.

[0174] 4 is another schematic flowchart of a method for predicting reactant molecules provided by an embodiment of the present invention. Here, π1 represents the operation predicted by the inverse reaction prediction model is an edit operation, π2 represents the operation predicted by the inverse reaction prediction model is an edit completion operation, π3 represents the operation predicted by the inverse reaction prediction model is a composition child complement operation, a1 to a3 represent attached atoms, q1 to q3 represent interface atoms, z1 to z3 represent basic graphs, g represents the edit target corresponding to the edit operation is the chemical bond of tag g, and none (none) represents the state after editing corresponding to the edit operation is deleting the chemical bond of tag g. The attached atoms are interfaces to which a basic graph (motif) is added.

[0175] Specifically, when the input of the reverse reaction prediction model is a start operation, the tag of the predicted first editing operation is triplet (π1, g, none), then the triplet (π1, g, none) is input, and the tag of the predicted second operation is π2, then all the attached atoms are sorted in the tag order in the product molecule, and the tuples (π3, a1), (π3, a2), and (π3, a3) are input in order, and the tags of the predicted operations in order are triplet (π3, z1, q1), triplet (π3, z2, q2), and triplet (π3, z3, q4). Based on this, the obtained conversion path is defined as the path shown in Figure 4: triplet (π1, g, none), π2, triplet (π3, z1, q1), triplet (π3, z2, q2), and triplet (π3, z3, q4). Here, a1 to a3, q1 to q3, and z1 to z3 are as shown in the figure, and based on this, a conversion pathway can be applied to the product molecule to obtain the final reactant molecule.

[0176] In the reactant prediction process shown in FIG. 4, the edit sequence includes only one edit operation, which is defined as a triplet (π1, g, none). The composition child completion sequence includes three composition child completion operations, namely, the triplet (π3, z1, q1), the triplet (π3, z2, q2), and the triplet (π3, z3, q4), respectively. When adding a basic graph (motif) indicated by the composition child completion operation, the interface atom indicated by the composition child completion operation and the attached atom for the composition child completion operation can be used as a connection node. The interface atom indicated by the composition child completion operation and the attached atom for the composition child completion operation are the same atom in the reactant molecule.

[0177] In other words, the reactant prediction process includes an editing step and a basic graph adding step, where the editing step describes the bond and atom changes from the product to the composite, i.e., the composite prediction process, while the basic graph adding step completes the generation of the reactants by adding appropriate basic graphs to the composite.

[0178] Here, in the editing phase, the input molecular graph is first encoded by a graph neural network (GNN) to obtain the output of the GNN; then, if the t-th action is an editing action, a recurrent neural network (RNN) performs action prediction based on the output of the GNN corresponding to the t-th action and the hidden state output by the previous node; if the t-th action is an editing completion action or a composition complement action, the RNN performs action prediction based on the output of the GNN corresponding to the t-th action, the attached atom corresponding to the t-th action, and the hidden state output by the previous node. In other words, in the editing phase, the RNN predicts the editing sequence step by step until it predicts and obtains the editing completion action, then ends the editing phase and starts the basic graph addition phase. In the basic graph addition phase, the RNN adds the basic graph in order until all the attached atoms are traversed.

[0179] In the example of FIG. 4, the first edit operation is applied to the chemical bond S=O, and the new chemical bond type is none, which represents deleting the chemical bond. In the compositionator completion operation, the interface atoms (q1, q2, and q3) in the base graph and the attached atoms (a1, a2, and a3) in the compositionator / intermediate represent the same atom, and when attaching the base graph to the compositionator / intermediate, they are combined to a single atom. For example, when adding z1 based on triplet (π3,z1,q1), a1 and q1 are the same atom in the reactant molecule (i.e., S atom). Similarly, when adding z2 based on triplet (π3,z2,q2), a2 and q2 are the same atom in the reactant molecule (i.e., O atom). After adding z2, the interface atom q3 is changed to the attached atom a3, in this case, when adding z3 based on triplet (π3,z3,q4), a3 and q4 are the same atom in the reactant molecule (i.e., C atom).

[0180] It should be noted that FIG. 3 and FIG. 4 are merely examples of the present invention and should not be understood as limitations of the present invention.

[0181] For example, in other alternative embodiments, the transformation path may not include a begin action or an edit complete action.

[0182] FIG. 5 is a schematic flow chart of a method 300 for training a reverse reaction prediction model provided by an embodiment of the present invention, and the training method 300 can be executed by any electronic device having data processing capabilities. For example, the electronic device can be implemented as a server. The server may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, and may further be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, networking services, cloud communications, middleware services, domain services, security services, and big data and artificial intelligence platforms, and the servers may be directly or indirectly connected by wired or wireless communication methods, and the present invention is not limited thereto. For convenience of explanation, the following text will explain the prediction method provided by the present invention by taking a training device for a predictive model of reactant molecules as an example.

[0183] As shown in FIG. 5, the training method 300 includes: In step S310, feature extraction is performed on the product molecules to obtain the features of the product molecules.

[0184] In step S320, a reverse reaction prediction model is used to predict the conversion pathway of the product molecule into a plurality of reactant molecules based on the characteristics of the product molecule.

[0185] Here, the transformation path includes an edit sequence and a composer completion sequence, each edit operation in the edit sequence is used to indicate an edit target and a state after editing, the edit target is an atom or a chemical bond in the product molecule, and for a plurality of composers of the product molecule obtained by the edit sequence, the composer completion sequence includes at least one composer completion operation corresponding to each composer in the plurality of composers, each composer completion operation in the at least one composer completion operation is used to indicate a base graph and an interface atom, and the base graph includes a plurality of atoms or an atomic edge for connecting the plurality of atoms.

[0186] In step S330, the inverse reaction prediction model is trained based on the loss between the conversion path and the training path.

[0187] Based on the above technical solutions, by introducing the conversion pathway from the product molecule to multiple reactant molecules, the inverse reaction prediction model can learn the latent relationship between the two sub-tasks of synthesizer prediction and complementary synthesizer, thereby greatly improving the generalization performance of the model, reducing the prediction complexity of reactant molecules, and improving the generalization performance of reactant molecule prediction.

[0188] Furthermore, by introducing a basic graph and designing the basic graph into a structure including multiple atoms or atomic edges for connecting the multiple atoms, a short and accurate conversion path can be rationally constructed, the length of the composition complement sequence can be avoided from being too long, the difficulty of predicting reactant molecules can be reduced, the accuracy of predicting reactant molecules can be improved, and the prediction performance of reactant molecules can be improved.

[0189] In some embodiments, prior to step S320, the method 300 further comprises: The method may further include the steps of obtaining a candidate reactant molecule corresponding to the product molecule, obtaining a base graph dictionary by comparing the molecular structures of the product molecule and the candidate reactant molecule, and obtaining the training pathway based on the base graph dictionary.

[0190] Exemplarily, the candidate reactant molecule may be all of the reactant molecules of the product molecule, i.e., the candidate reactant molecule can be used to generate all of the reactant molecules of the product molecule.

[0191] In some embodiments, a connection tree is constructed based on the base graph dictionary, the connection tree includes a tree structure with the multiple composites as root nodes and base graphs in the base graph dictionary as subnodes, and the shortest path is determined as the training path by traversing the connection tree.

[0192] The reactant molecules are decomposed into composites and base graphs (motifs), where the composites are molecular fragments with chemical bonds cut in the product molecule graph, and the base graphs (motifs) are subgraphs of the reactants. Thus, the connection relationship between the composites and the base graphs (motifs) is maintained by constructing a connection tree. The connection tree represents the composites and the base graphs (motifs) as a hierarchical tree structure, where the composites are the root nodes and the base graphs (motifs) are the subnodes. An edge between two nodes in the connection tree represents that the two subgraphs are directly connected in the reactant molecule graph, where a triplet of attached atoms, base graphs (motifs) and interface atoms can be used to represent each edge.

[0193] In this embodiment, a tree structure (i.e., a connection tree) is constructed to represent the connection relationship between the compositor and the base graph, and the connection tree can provide an effective strategy for constructing training paths and reduce the complexity of training.

[0194] Illustratively, a Depth First Search can be used to traverse the entire connection tree and the shortest path after the traversal can be determined as the training path.

[0195] Here, the depth-first traversal method can refer to starting from a vertex v in the tree structure and traversing according to the following method:

[0196] 1. Visit vertex v.

[0197] 2. Starting with v's unvisited neighbors, perform a depth-first traversal of the tree structure until all vertices in the tree structure that are connected to v by paths have been visited.

[0198] 3. At this point, if there are still unvisited vertices in the tree structure, start from the unvisited vertices and perform a depth-first traversal again until all vertices have been visited in the tree structure.

[0199] Depth-first search follows a search strategy that searches the tree as "deep" as possible. The basic idea is that to find a solution to a problem, first select a possible situation and proceed forward (subnodes), and if during the search it appears that the original selection does not meet the requirements, go back to the parent node and select another node and continue searching forward, repeating this way until the optimal solution is found. In other words, depth-first search starts from vertex V0, goes to the end along a path, and if it finds that the goal solution cannot be reached, it goes back to the previous node, then goes to the end along another path, and so on. This concept of going as deep as possible is the concept of depth-first.

[0200] In some embodiments, a plurality of molecular fragments other than the composite atom in the candidate reactant molecule are determined as a plurality of candidate subgraphs, a first candidate subgraph in the plurality of candidate subgraphs includes a first atom and a second atom, and if the first atom and the second atom belong to different rings, a chemical bond between the first atom and the second atom is cut to obtain a plurality of first subgraphs, a second candidate subgraph in the plurality of candidate subgraphs includes a third atom and a fourth atom connected together, and if one atom in the third atom and the fourth atom belongs to a ring, and a degree of another atom in the third atom and the fourth atom is greater than or equal to a predetermined value, a chemical bond between the third atom and the fourth atom is cut to obtain a plurality of second subgraphs, and candidate subgraphs other than the first candidate subgraph and the second candidate subgraph in the plurality of candidate subgraphs, the plurality of first subgraphs and the plurality of second subgraphs are determined as base graphs in the base graph dictionary.

[0201] For example, one product molecule is decomposed into a set of incomplete subgraphs, called composites, so that the composites can be reconstructed into a reactant molecule graph after attaching an appropriate base motif to each attached atom. In other words, the base motif can be regarded as a subgraph on the reactant molecule graph. Therefore, in the embodiment of the present invention, the extraction process of the base motif is divided into the following steps:

[0202] 1. Cut the edges where there are differences between the composite and the corresponding reactants to obtain a set of subgraphs that hold the interface atoms corresponding to the attached atoms on the composite.

[0203] It should be noted that a reactant corresponding to a synthon may include a molecule or reactant that includes the synthon.

[0204] 2. In one subgraph, if two connected atoms belong to two rings respectively, cut the connecting chemical bond between the two atoms, thereby obtaining two smaller subgraphs.

[0205] It should be noted that the ring according to the embodiment of the present invention may be a monocyclic ring, i.e., there is only one ring in the molecule. Correspondingly, when two connected atoms in one subgraph belong to two monocyclic rings, the connected chemical bond between the two atoms is broken, thereby obtaining two smaller subgraphs. Furthermore, the ring according to the embodiment of the present invention may be a cycloalkane, which may be classified based on the number of carbon atoms on the ring. Exemplarily, when the number of carbon atoms on the ring is 3-4, it is called a small ring, when the number of carbon atoms on the ring is 5-6, it is called a normal ring, when the number of carbon atoms on the ring is 7-12, it is called a medium ring, and when the number of carbon atoms on the ring is more than 12, it is called a large ring.

[0206] 3. On a subgraph, if one atom of two connected atoms belongs to a ring and the degree of the other atom is greater than 1, then the connecting chemical bond between these two atoms is broken, thereby obtaining two smaller subgraphs.

[0207] Finally, a dictionary with a given number of basic motifs is created. (outside 5) For example, a dictionary with 210 basic motifs can be extracted. (outside 6) TIFF2025500754000022.tif8170 can be extracted.

[0208] In some embodiments, prior to step S330, the method 300 further comprises: The loss between the transformation path and the training path is The method may further include a step of determining the difference between the tag of the predicted action in the transformation path and the tag 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 edited state corresponding to the predicted action 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, and the difference between the interface atom indicated by the predicted action and the interface atom indicated by the training action.

[0209] In an embodiment of the present invention, since the training goal of the reverse reaction prediction model is to predict the conversion pathway given a training pathway, the reverse reaction prediction is modeled as a molecular generation problem based on autoregression. That is, for one product molecule G P Then, for each step t, the autoregressive model generates a new graph structure G based on the historical graph structure. t The reactant molecule G R We explain that the generation process is completed when it is predicted that . Therefore, the generation process of the reactant molecular graph can be defined as the joint probability likelihood function

[0210]

number

[0211] In addition, the intermediate molecule fragment G tis not directly generated by the reverse reaction prediction model, but the reverse reaction prediction model generates a new graph editing operation, an editing target (i.e., a chemical bond, an atom, or a basic graph) and its post-edit state (i.e., a new chemical bond type or an interface atom) based on the history operation, and applies it to the intermediate molecular fragment of the previous step to obtain a new intermediate molecular fragment. Based on this, when the editing target, post-edit state, and intermediate molecular fragment of the history are given, the likelihood function can be changed to the following:

[0212]

number

[0213] For example, the following formula can be used to determine the loss of the transformation path and the training path:

[0214]

number

[0215] It should be noted that the implementation manner of step S320 in the training method 300 can refer to the implementation manner of step S220 in the prediction method 200, and the description thereof will be omitted here to avoid duplication.

[0216] It should be noted that preferred embodiments of the present invention will be described with reference to the accompanying drawings. However, the present invention is not limited to the specific details of the above embodiments. Various simple modifications can be made to the technical solutions of the present invention within the scope of the technical concept of the present invention, and all of these simple modifications are included in the protection scope of the present invention.

[0217] For example, each specific technical feature described in the above specific embodiment can be combined in any suitable manner as long as it is not contradictory, and in order to avoid unnecessary repetition, the present invention will omit further description of various possible combination manners. In addition, for example, any combination between various different embodiments of the present invention is possible, and as long as it is not contrary to the idea of ​​the present invention, it should be considered as the contents disclosed in the present invention.

[0218] For example, a teacher-forcing strategy can be adopted to train the model to reduce the convergence difficulty.

[0219] In addition, RNN has two training modes: free-running mode and teacher-forcing mode. Free-running mode refers to using the output of the previous state as the input of the next state. The working principle of teacher-forcing mode is that at time t in the training process, the desired output or actual output y(t) of the training dataset is used as the input x(t+1) for the next time step, instead of the model-generated output h(t).

[0220] It is also possible to pre-train on a base graph dictionary, for example, and then fine-tune on a benchmark dataset.

[0221] In addition, for example, hyperparameters in the inverse reaction prediction model can be adjusted, such as the number of layers of the GNN and GRU.

[0222] In addition, in various embodiments of the method of the present invention, the size of the sequence number of each of the above processes does not mean the order of execution, and the execution order of each process is determined by its function and inherent logic, and does not limit the implementation process of the embodiments of the present invention in any way.

[0223] The above describes a method provided by an embodiment of the present invention, and the following describes an apparatus provided by an embodiment of the present invention.

[0224] FIG. 6 is a schematic block diagram of a reactant molecule prediction apparatus 400 provided according to an embodiment of the present invention.

[0225] As shown in FIG. 6, the reactant molecule prediction device 400 includes: an extraction unit 410 configured to perform feature extraction on the product molecules to obtain features of said product molecules; a prediction unit 420 configured to predict a conversion path from the product molecule to a plurality of reactant molecules using a reverse reaction prediction model based on features of the product molecule, the conversion path including an edit sequence and a composer complement sequence, the edit sequence being a sequence formed by an edit operation, and the composer complement sequence being a sequence formed by a composer complement operation; an editing unit 430 configured to edit an editing target indicated by each editing operation in the editing sequence according to a post-edit state indicated by the editing operation to obtain a plurality of synthons corresponding to the product molecule, the editing target being an atom or a chemical bond in the product molecule; and an adding unit 440 configured to, for each composer in the plurality of composers, based on at least one composer completion operation corresponding to each of the composers in the composer completion sequence, add a basic graph indicated by each composer completion operation according to an interface atom indicated by each composer completion operation in the at least one composer completion operation to obtain a plurality of reactant molecules corresponding to the plurality of composers, wherein the basic graph includes a plurality of atoms or atomic edges for connecting the plurality of atoms.

[0226] In some embodiments, the prediction unit 420 may specifically: Obtaining an input feature of a t-th operation based on the (t-1)-th operation predicted by the reverse reaction prediction model, where t is an integer greater than 1; The method is configured to predict the t-th operation based on the input features corresponding to the t-th operation and the hidden features corresponding to the t-th operation, until the operation obtained by prediction using the inverse reaction prediction model is a composite complement operation and all attached atoms on the multiple composites and all attached atoms on the basic graph added to the multiple composites have been traversed, thereby predicting the t-th operation and obtaining the conversion path.

[0227] Here, the hidden features of the t-th action are associated with actions that the reverse reaction prediction model predicted prior to the t-th action.

[0228] In some embodiments, the prediction unit 420 may specifically: Obtain k first prediction results with the highest scores from the prediction results of the (t-1)th motion according to a beam search method of a hyperparameter k; determining k first input features corresponding to a t-th motion based on the k first prediction results; wherein obtaining the conversion path comprises: Predict the t-th action based on each first input feature in the k first input features and a hidden feature corresponding to the t-th action, and obtain k second prediction results with the highest scores from the predicted 2k prediction results according to a beam search method of a hyperparameter k; determining k second input features corresponding to a (t+1)-numbered action based on the k second prediction results; The method includes predicting the (t+1)-numbered action based on each second input feature among the k second input features and a hidden feature corresponding to the (t+1)-numbered action until the action obtained by prediction using the inverse reaction prediction model is a composite complement action and all attached atoms on the multiple composites and all attached atoms on a basic graph added to the multiple composites have been traversed, thereby obtaining the conversion path.

[0229] In some embodiments, the prediction unit 420 may specifically: When the (t-1)th motion is the edit motion, input features of the t-th motion are determined based on features of a subgraph obtained by editing with the (t-1)th motion, and an edit target and a state after editing indicated by the t-th motion are predicted using the reverse reaction prediction model based on the input features of the t-th motion and hidden features of the t-th motion until the motion obtained by prediction using the reverse reaction prediction model is the last edit motion in the edit sequence, thereby obtaining the edit sequence; If the (t-1)th operation is the last editing operation or the composite child completion operation, the input features of the tth operation are determined based on the features of the subgraph obtained by editing by the (t-1)th operation and the features of the attached atoms corresponding to the (t-1)th operation, and based on the input features of the tth operation and the hidden features of the tth operation, the operation obtained by prediction using the reverse reaction prediction model is a composite child completion operation, and the basic graph and interface atoms indicated by the tth operation are predicted until all attached atoms on the multiple composites and all attached atoms on the basic graph added to the multiple composites have been traversed, thereby obtaining the composite child completion sequence.

[0230] In some embodiments, the edit operation is represented by an operation tag for indicating the edit, a tag for indicating the edit target, and a tag for indicating the state after the edit, and the composition child completion operation is represented by an operation tag for indicating the composition child completion, a tag for indicating a base graph, and a tag for indicating an interface atom.

[0231] In some embodiments, when the editing target indicated by the editing operation is an atom, the post-editing state indicated by the editing operation is changing the number of charges on the atom or changing the number of hydrogen atoms on the atom, and when the editing target indicated by the editing operation is a chemical bond, the post-editing state indicated by the editing operation is any one of adding a chemical bond, deleting a chemical bond, or changing the type of chemical bond.

[0232] FIG. 7 is a schematic block diagram of an apparatus 500 for training an adverse reaction prediction model provided by an embodiment of the present invention.

[0233] As shown in FIG. 7, the training device 500 for the reverse reaction prediction model includes: an extraction unit 510 configured to perform feature extraction on the product molecules to obtain features of said product molecules; a prediction unit 520 configured to predict a conversion pathway of the product molecule into a plurality of reactant molecules using a reverse reaction prediction model based on the characteristics of the product molecule, a prediction unit 520, wherein the transformation path includes an edit sequence and a composer completion sequence, each edit operation in the edit sequence is used to indicate an edit target and a state after the edit, the edit target being an atom or a chemical bond in the product molecule, and for a plurality of composers of the product molecule obtained from the edit sequence, the composer completion sequence includes at least one composer completion operation corresponding to each composer in the plurality of composers, each composer completion operation in the at least one composer completion operation is used to indicate a base graph and an interface atom, the base graph includes a plurality of atoms or an atomic edge for connecting the plurality of atoms; and a training unit 530 configured to train the inverse reaction prediction model based on the loss of the transformation path and a training path.

[0234] In some embodiments, before the prediction unit 520 obtains the transform path, the device: obtaining a candidate reactant molecule corresponding to said product molecule; obtaining a base graph dictionary by comparing the molecular structures of the product molecules and the candidate reactant molecules; The training path is obtained based on the base graph dictionary.

[0235] In some embodiments, the prediction unit 520 may specifically: constructing a connection tree based on the base graph dictionary, the connection tree including a tree structure having the plurality of composites as root nodes and the base graphs in the base graph dictionary as subnodes; The method is configured to traverse the connection tree to determine the shortest path as the training path.

[0236] In some embodiments, the prediction unit 520 may specifically: determining a plurality of candidate subgraphs of molecular fragments other than the plurality of synthons in the candidate reactant molecules; When a first candidate subgraph in 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, a chemical bond between the first atom and the second atom is cut to obtain a plurality of first subgraphs; When a second candidate subgraph in the plurality of candidate subgraphs includes a third atom and a fourth atom connected together, and one atom among the third atom and the fourth atom belongs to a ring and a degree of another atom among the third atom and the fourth atom is greater than or equal to a predetermined value, breaking a chemical bond between the third atom and the fourth atom to obtain a plurality of second subgraphs; The method is configured to determine candidate subgraphs other than the first candidate subgraph and the second candidate subgraph among the plurality of candidate subgraphs, the plurality of first subgraphs and the plurality of second subgraphs, as base graphs in the base graph dictionary.

[0237] In some embodiments, the training unit 530 may further perform the following steps before training the inverse reaction prediction model based on the loss between the transformation path and the training path: The loss between the transformation path and the training path is The prediction path is configured to be determined based on information on the difference between the tag of the predicted action in the conversion path and the tag 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 edited state corresponding to the predicted action 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, and the difference between the interface atom indicated by the predicted action and the interface atom indicated by the training action.

[0238] It should be noted that the device embodiment and the method embodiment can correspond to each other, and a detailed description can be referred to the method embodiment. In order to avoid duplication, the description is omitted here. Specifically, the reactant molecule prediction device 400 corresponds to a corresponding entity that executes the method 200 according to the embodiment of the present invention, and each unit in the prediction device 400 is configured to execute the corresponding flow in the method 200, respectively; similarly, the reverse reaction prediction model training device 500 corresponds to a corresponding entity that executes the method 300 according to the embodiment of the present invention, and each unit in the training device 500 is configured to execute the corresponding flow in the method 300, and for the sake of brevity, the description is not repeated here.

[0239] In addition, each unit in the prediction device 400 or the training device 500 according to the embodiment of the present invention may be integrated into one or more separate units, or some (some) units may be further divided into a plurality of functionally smaller units, thereby realizing the same operation without impairing the realization of the technical effect of the embodiment of the present invention. The above units are divided based on logical functions, and in actual applications, the function of one unit may be realized by multiple units, or the function of multiple units may be realized by one unit. In another embodiment of the present invention, the prediction device 400 or the training device 500 may include other units, and in actual applications, these functions may be realized by other units in cooperation, or may be realized by multiple units in cooperation. According to another embodiment of the present invention, a prediction device 400 or a training device 500 according to the embodiment of the present invention can be configured and the method of the embodiment of the present invention can be realized by executing a computer program (including program code) capable of executing each step related to the corresponding method on a general-purpose computing device of 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. The computer program is, for example, written in a computer-readable storage medium, and the corresponding method of the embodiment of the present invention can be realized by loading the computer-readable storage medium into an electronic device and executing it therein.

[0240] In other words, the above units can be realized in the form of hardware, or in the form of instructions in the form of software, or in the form of a combination of software and hardware. Specifically, each step of the method embodiment in the embodiment of the present invention may be realized by an integrated logic circuit of hardware in a processor and / or an instruction in the form of software, and the steps of the method disclosed in the embodiment of the present invention may be embodied in a hardware coding processor and executed directly, or may be implemented as a combination of hardware and software execution in a coding processor. Exemplarily, the software can be stored in a storage medium familiar to those in the art, such as a random memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically rewritable programmable memory, a register, etc. The storage medium is arranged in a memory, and the processor reads the information in the memory and combines it with the hardware to realize the steps in the above method embodiment.

[0241] FIG. 8 is a schematic structural diagram of an electronic device 600 provided according to an embodiment of the present invention.

[0242] As shown in Fig. 8, the electronic device 600 includes at least a processor 610 and a computer-readable storage medium 620. Here, the processor 610 and the computer-readable storage medium 620 may be connected by a bus or other form. The computer-readable storage medium 620 is configured to store a computer program 621, the computer program 621 includes computer instructions, and the processor 610 is configured to execute the computer instructions stored in the computer-readable storage medium 620. The processor 610 is a calculation core and a control core of the electronic device 600, and is configured to realize one or more computer instructions, specifically, to realize a corresponding method flow or a corresponding function by loading and executing one or more computer instructions.

[0243] As an example, the processor 610 may be referred to as a Central Processing Unit (CPU), which may include, but is not limited to, a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like.

[0244] As an example, the computer-readable storage medium 620 may be a high-speed RAM memory, a non-volatile memory such as at least one disk memory, or at least one computer-readable storage medium remote from the processor 610, for example. Specifically, the computer-readable storage medium 620 includes, but is not limited to, a volatile memory and / or a non-volatile memory. Here, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synch link DRAM (SLDRAM), and direct memory bus random access memory (DR RAM).

[0245] As shown in FIG. 8, the electronic device 600 may further include a transceiver 630 .

[0246] Here, the processor 610 can control the transceiver 630 to communicate with other devices, specifically, to transmit information or data to other devices or receive information or data transmitted by other devices. The transceiver 630 can include a transmitter and a receiver. The transceiver 630 can further include an antenna, and the number of antennas can be one or more.

[0247] The components in the electronic device 600 are connected via a bus system, which in addition to a data bus, further includes a power bus, a control bus, and a status signal bus.

[0248] In one implementation, the electronic device 600 may be an electronic device with data processing capability, a first computer instruction is stored in the computer-readable storage medium 620, and the first computer instruction stored in the computer-readable storage medium 620 is loaded and executed by the processor 610 to realize the corresponding steps in the method embodiment shown in Fig. 1. In a specific implementation, the first computer instruction in the computer-readable storage medium 620 is loaded by the processor 610 to execute the corresponding steps, which will not be described here to avoid duplication.

[0249] In another aspect of the present invention, the embodiment of the present invention further provides a computer-readable storage medium (Memory) which is a storage device in the electronic device 600 for storing programs and data. For example, the computer-readable storage medium 620. Note that the computer-readable storage medium 620 here may include a built-in storage medium in the electronic device 600, and of course, may include an extended storage medium supported by the electronic device 600. The computer-readable storage medium provides a storage space for storing the operating system of the electronic device 600. Furthermore, the storage space further stores one or more computer instructions to be loaded and executed by the processor 610, and these computer instructions may be one or more computer programs 621 (including program codes).

[0250] In another aspect of the present invention, an embodiment of the present invention further provides a computer program product or computer program including computer instructions, said computer instructions being stored in a computer readable storage medium, such as a computer program 621. In this case, the electronic device 600 may be a computer, and a processor 610 reads said computer instructions from the computer readable storage medium 620, and the processor 610 executes said computer instructions to cause the computer to perform the methods provided in the various optional manners above.

[0251] In other words, when implemented using software, it can be fully or partially implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into a computer and executed, the flow of the embodiment of the present invention is fully or partially executed, or the function of the embodiment of the present invention is realized. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or can be transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, radio, microwave, etc.) method.

[0252] Those skilled in the art can combine the units and flow steps of each example described in the embodiments disclosed herein to realize electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented by hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods for each specific application to realize the described functions, but such realization should not be considered as going beyond the scope of the present invention.

[0253] Finally, the above content is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, and within the technical scope of the present invention disclosed, modifications or replacements are easily conceivable to those skilled in the art, which are to be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be in accordance with the scope of protection of the claims.

Claims

1. 1. A method for predicting reactant molecules, the method comprising: performing feature extraction on the product molecules to obtain features of the product molecules; predicting a conversion pathway from the product molecule to a plurality of reactant molecules using a reverse reaction prediction model based on characteristics of the product molecule, the conversion pathway including an edit sequence and a composer complement sequence; a step of obtaining a plurality of synthons corresponding to the product molecule by editing an editing target indicated by each editing operation in accordance with a post-editing state indicated by each editing operation in the editing sequence, the editing target being an atom or a chemical bond in the product molecule; for each composer in the plurality of composers, based on at least one composer completion operation corresponding to each composer in the composer completion sequence, adding a base graph indicated by each composer completion operation according to an interface atom indicated by each composer completion operation in the at least one composer completion operation to obtain a plurality of reactant molecules corresponding to the plurality of composers, wherein the base graph includes a plurality of atoms or atomic edges for connecting the plurality of atoms; A method for predicting reactant molecules comprising:

2. predicting a conversion pathway of the product molecule into a plurality of reactant molecules using a reverse reaction prediction model based on characteristics of the product molecule, A step of obtaining an input feature of a t-th motion based on a (t-1)-th motion obtained by prediction using the reverse reaction prediction model, where t is an integer greater than 1; and predicting the t-th motion based on the input feature corresponding to the t-th motion and the hidden feature corresponding to the t-th motion until the motion obtained by the prediction using the reverse reaction prediction model is a composite complement motion and all attached atoms on the multiple composites and all attached atoms on a basic graph added to the multiple composites have been traversed, thereby obtaining the conversion path; The hidden feature of the t-th action is associated with an action predicted by the reverse reaction prediction model prior to the t-th action. The method for predicting reactant molecules according to claim 1 .

3. The step of obtaining input features of a t-th motion based on a (t-1)-th motion obtained by prediction using the reverse reaction prediction model includes: Obtaining k first prediction results having the highest scores from the prediction results of the (t-1)th motion according to a beam search method of a hyperparameter k; determining k first input features corresponding to the t-th motion based on the k first prediction results; The step of obtaining the transformation path includes: predicting the t-th motion based on each first input feature in the k first input features and a hidden feature corresponding to the t-th motion, and acquiring k second prediction results with the highest scores from the prediction results obtained according to a beam search method of a hyperparameter k; determining k second input features corresponding to the (t+1)th motion based on the k second prediction results; and predicting the (t+1)-numbered motion based on each second input feature in the k number of second input features and a hidden feature corresponding to the (t+1)-numbered motion until the motion obtained by prediction using the reverse reaction prediction model is a composite complement motion, and all attached atoms on the multiple composites and all attached atoms on a basic graph added to the multiple composites have been traversed, thereby obtaining the conversion path. The method for predicting reactant molecules according to claim 2 .

4. The step of obtaining the transformation path includes: If the (t-1)th operation is the edit operation, determining input features of the tth operation based on features of a subgraph obtained by editing the (t-1)th operation; and predicting an edit target and a state after editing indicated by the t-th motion using the reverse reaction prediction model based on the input features of the t-th motion and the hidden features of the t-th motion until the motion obtained by prediction using the reverse reaction prediction model is the last edit motion in the edit sequence, thereby obtaining the edit sequence. The method for predicting reactant molecules according to claim 2 .

5. The step of obtaining the transformation path includes: If the (t-1)th operation is the last edit operation or the composer completion operation, determining input features of the t-th operation based on features of a subgraph obtained by editing the (t-1)th operation and features of attached atoms corresponding to the (t-1)th operation; and predicting a base graph and an interface atom indicated by the t-th operation based on the input feature of the t-th operation and the hidden feature of the t-th operation, until an operation obtained by prediction using the reverse reaction prediction model is a composite-composite operation and all attached atoms on the multiple composites and all attached atoms on a base graph added to the multiple composites have been traversed, thereby obtaining the composite-composite-composite sequence. The method for predicting reactant molecules according to claim 2 .

6. The edit operation is represented by an operation tag for instructing an edit, a tag for instructing an edit target, and a tag for instructing a state after the edit, and the composition child completion operation is represented by an operation tag for instructing a composition child completion, a tag for instructing a base graph, and a tag for instructing an interface atom. The method for predicting reactant molecules according to claim 1 .

7. When the editing target indicated by the editing operation is an atom, the state after the editing indicated by the editing operation is a change in the number of charges on the atom or a change in the number of hydrogen atoms on the atom, and when the editing target indicated by the editing operation is a chemical bond, the state after the editing indicated by the editing operation is any one of adding a chemical bond, deleting a chemical bond, and changing the type of the chemical bond. The method for predicting reactant molecules according to claim 1 .

8. A method for training an adverse reaction prediction model, executed by an electronic device, comprising: performing feature extraction on the product molecules to obtain features of the product molecules; predicting a conversion pathway from the product molecule to a plurality of reactant molecules using a reverse reaction prediction model based on the characteristics of the product molecule, and obtaining the conversion pathway; the transformation path includes an edit sequence and a composer completion sequence, each edit operation in the edit sequence is used to indicate an edit target and a state after the edit, the edit target being an atom or a chemical bond in the product molecule, for a plurality of composers of the product molecule obtained by the edit sequence, the composer completion sequence includes at least one composer completion operation corresponding to each composer in the plurality of composers, each composer completion operation in the at least one composer completion operation is used to indicate a base graph and an interface atom, the base graph includes a plurality of atoms or an atomic edge for connecting the plurality of atoms; and training the inverse reaction prediction model based on losses between the conversion path and a training path.

9. Prior to the step of obtaining the transformation path, the training method comprises: obtaining a candidate reactant molecule corresponding to the product molecule; obtaining a base graph dictionary by comparing the molecular structures of the product molecules and the candidate reactant molecules; obtaining the training path based on the base graph dictionary; The method for training an adverse reaction prediction model according to claim 8, further comprising:

10. The step of obtaining the training path based on the base graph dictionary includes: constructing a connection tree based on the base graph dictionary, the connection tree having a tree structure with the plurality of composites as root nodes and base graphs in the base graph dictionary as subnodes; and determining a shortest path as the training path by traversing the connection tree. The method for training an adverse reaction prediction model according to claim 9.

11. The step of obtaining a base graph dictionary by comparing the molecular structures of the product molecules and the candidate reactant molecules includes: determining a plurality of non-composite molecular fragments of the candidate reactant molecule as a plurality of candidate subgraphs; if a first candidate subgraph in 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, breaking a chemical bond between the first atom and the second atom to obtain a plurality of first subgraphs; when a second candidate subgraph in the plurality of candidate subgraphs includes a third atom and a fourth atom connected to each other, one of the third atom and the fourth atom belongs to a ring, and the degree of the other of the third atom and the fourth atom is equal to or greater than a predetermined value, cutting a chemical bond between the third atom and the fourth atom to obtain a plurality of second subgraphs; determining candidate subgraphs, other than the first candidate subgraph and the second candidate subgraph, the first subgraphs and the second subgraphs, as base graphs in the base graph dictionary; The method for training an adverse reaction prediction model according to claim 9.

12. In the step of training the inverse reaction prediction model based on the loss between the conversion path and the training path, The loss between the transformation path and the training path is is determined based on information on a difference between a tag of a predicted action in the conversion path and a tag of a training action in a training path, a difference between a score of an editing object corresponding to the predicted action and a score of an editing object corresponding to the training action, a difference between an edited state corresponding to the predicted action and an edited state corresponding to the training action, a difference between a basic graph indicated by the predicted action and a basic graph indicated by the training action, and a difference between an interface atom indicated by the predicted action and an interface atom indicated by the training action. The method for training an adverse reaction prediction model according to claim 8.

13. A reactant molecule prediction device, comprising: an extraction unit configured to perform feature extraction on the product molecules to obtain features of the product molecules; a prediction unit configured to predict a conversion path from the product molecule to a plurality of reactant molecules using a reverse reaction prediction model based on a characteristic of the product molecule, the conversion path including an edit sequence and a composer complement sequence; an editing unit configured to edit an editing target indicated by each editing operation in the editing sequence according to a post-editing state indicated by the editing operation to obtain a plurality of synthesizers corresponding to the product molecule, the editing target being an atom or a chemical bond in the product molecule; and an additional unit configured to, for each composer in the plurality of composers, add a basic graph indicated by each composer completion operation according to an interface atom indicated by each composer completion operation in the at least one composer completion operation corresponding to each composer in the composer completion sequence to obtain a plurality of reactant molecules corresponding to the plurality of composers, wherein the basic graph includes a plurality of atoms or atomic edges for connecting the plurality of atoms.

14. A training device for an adverse reaction prediction model, comprising: an extraction unit configured to perform feature extraction on the product molecules to obtain features of the product molecules; a prediction unit configured to predict a conversion pathway of the product molecule into a plurality of reactant molecules using a reverse reaction prediction model based on the characteristics of the product molecule, a prediction unit, the transformation path including an edit sequence and a composer completion sequence, each edit operation in the edit sequence being used to indicate an edit target and a state after the edit, the edit target being an atom or a chemical bond in the product molecule, for a plurality of composers of the product molecule obtained by the edit sequence, the composer completion sequence including at least one composer completion operation corresponding to each composer in the plurality of composers, each composer completion operation in the at least one composer completion operation being used to indicate a base graph and an interface atom, the base graph including a plurality of atoms or an atomic edge for connecting the plurality of atoms; and a training unit configured to train the inverse reaction prediction model based on losses between the conversion path and a training path.

15. a processor for executing a computer program; and a computer-readable storage medium storing a computer program that, when executed by the processor, causes the processor to execute the reactant molecule prediction method according to any one of claims 1 to 7 or the reverse reaction prediction model training method according to any one of claims 8 to 12.

16. A computer program that causes a computer to execute the method for predicting reactant molecules according to any one of claims 1 to 7, or the method for training a reverse reaction prediction model according to any one of claims 8 to 12.

Citation Information

Patent Citations

  • Artificial intelligence-based retrosynthesis prediction method and device, equipment and storage medium

    CN111524557A

  • Reactant derivation method and reverse synthesis derivation method based on Monte Carlo tree

    CN113782109A

  • Method for constructing reagent compound prediction model, and method and device for automatically predicting and complementing chemical reaction reagents

    CN113990405A

  • Method for estimation of reaction heat and apparatus therefor

    JP2006265126A

  • Computational generation of chemical synthetic routes and methods

    JP2021513177A