Training Method and Device for Reaction Product Prediction Model, Application Method, Device, and Computer Program

The method addresses the high cost and limitations of current reaction product prediction methods by using auxiliary networks for automatic data labeling and self-supervised learning, resulting in reduced costs and improved accuracy.

JP2025516113AActive Publication Date: 2025-05-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024559865
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-07-14
Filing Date
2023-04-20
Publication Date
2025-05-27
Estimated Expiration
2043-04-20

AI Technical Summary

Technical Problem

Current methods for predicting organic chemical reaction products rely heavily on manual labeling of data, which is costly and labor-intensive, and are limited by the need for extensive reaction templates that cannot cover all reaction types.

Method used

A method for training a reaction product prediction model using a computer device, which performs vector conversion on reaction sequences, constructs positive and negative sample sets through auxiliary networks, and identifies loss values to automatically label data without manual intervention.

Benefits of technology

This approach reduces the cost and time required for training the reaction product prediction model while improving prediction accuracy by enabling self-supervised learning and automatic data labeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025516113000001_ABST
    Figure 2025516113000001_ABST
Patent Text Reader

Abstract

Embodiments of this application disclose a method for training a reaction product prediction model, an application method, an apparatus, and a device. Related embodiments are applied to various scenarios such as artificial intelligence and are used to improve prediction accuracy while reducing model training costs. Such a method includes constructing a positive sample reactant set and a negative sample reactant set through a first auxiliary network, calculating a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set, constructing a positive sample reaction group set and a negative sample reaction group set through a second auxiliary network, calculating a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set, obtaining a predicted probability value and an atomic label of atoms in the sample reactant existing in the main product through a third auxiliary network, calculating an atomic prediction loss value, and training a reaction product prediction model based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value to obtain a target reaction product prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] [Cross - Reference to Related Applications] This application claims the benefit of priority to Chinese Patent Application No. 2022108264623, filed with the China National Intellectual Property Administration on July 14, 2022, entitled "Method for Adjusting Parameters of Reaction Product Prediction Model, Application Method, Apparatus and Device", the entire content of which is incorporated herein by reference. This application relates to the technical field of artificial intelligence, and particularly to reaction product prediction technology.

Background Art

[0002] The task of predicting organic chemical reaction products has extremely important significance in fields such as computational chemistry and pharmaceuticals.

[0003] Typical organic chemical reaction prediction methods use ordinary reaction templates to predict the possible product structures. However, there are various types of organic chemical reactions, and as chemical research and development continue to develop day by day, new reactions emerge endlessly. Therefore, reaction templates cannot cover all reaction types and become inapplicable to recently developed reaction types. With the development of deep learning technology, it is considered particularly important to utilize deep learning technology to learn potential reaction rules from organic chemical reaction data.

[0004] However, the deep learning technology based on currently available organic chemical reaction data generally has to rely on a large amount of manual labeling to realize the training of the reaction product prediction model. However, manually labeled data is generally very expensive, and as the data volume of chemical reaction data increases, more manual labeling is often required, resulting in a great deal of labor and time costs, and the problem that the cost required for the task of predicting organic chemical reaction products becomes high.

Summary of the Invention

Means for Solving the Problems

[0005] Embodiments of the present application provide a method, an apparatus, and a device for training a reaction product prediction model and an application method thereof. Thereby, automatic labeling of data in a sample reaction data set can be realized without relying on artificial labeling, so that the cost required for the reaction product prediction task can be reduced while the prediction accuracy of the reaction product by the reaction product prediction model can be improved.

[0006] According to an aspect of the embodiments of the present application, there is provided a method for training a reaction product prediction model, which is executed by a computer device, the method including the following steps: Performing vector conversion on each reaction sequence in a sample reaction data set through an encoder network of a reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector, where the sample reaction data set includes a plurality of reaction sequences, and each reaction sequence includes a sample reactant and a sample reaction product; Constructing a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through a first auxiliary network; Identifying a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set; Constructing a positive sample reaction group set and a negative sample reaction group set according to the sample reactant vector and the sample reaction product vector through a second auxiliary network; Identifying a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set; Identifying a predicted probability value and an atomic label of an atom in a sample reactant existing in a main product according to the sample reactant vector and the sample reaction product vector through a third auxiliary network; Identifying an atomic prediction loss value based on the predicted probability value and the atomic label; A method for training a reaction product prediction model is provided, including the step of training a reaction product prediction model based on a reaction prediction loss value, a reaction relationship prediction loss value, and an atom prediction loss value to obtain a target reaction product prediction model.

[0007] According to another aspect of the present application, there is provided a method for applying a reaction product prediction model executed by a computer device, including the following steps: Inputting reactants to be measured into the aforementioned target reaction product prediction model to output a predicted change probability of the adjacency matrix from the target reaction product prediction model; Identifying a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix; A method for applying a reaction product prediction model is provided, including the step of identifying a target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured.

[0008] According to another aspect of the present application, there is provided a training device for a reaction product prediction model, including an acquisition unit configured to perform vector conversion on each reaction sequence in a sample reaction data set through an encoder network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector, and further constructing a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through a first auxiliary network, and constructing a positive sample reaction group set and a negative sample reaction group set according to the sample reactant vector and the sample reaction product vector through a second auxiliary network, and identifying a predicted probability value and an atom label of the atoms in the sample reactants existing in the main product according to the sample reactant vector and the sample reaction product vector through a third auxiliary network, wherein the sample reaction data set includes a plurality of reaction sequences, and each reaction sequence includes a sample reactant and a sample reaction product; Based on the positive sample reactant set and the negative sample reactant set, identify the reaction prediction loss value, and based on the positive sample reaction group set and the negative sample reaction group set, determine the reaction relationship prediction loss value. Further, a processing unit configured to identify the atomic prediction loss value based on the prediction probability value and the atomic label, Provide a training device for a reaction product prediction model, including a specific unit configured to train a reaction product prediction model based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value to obtain a target reaction product prediction model.

[0009] According to another aspect of the present application, an application device for a reaction product prediction model, An acquisition unit configured to input the reactants to be measured into the target reaction product prediction model and output the predicted change probability of the adjacency matrix from the target reaction product prediction model, A processing unit configured to identify the predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix, Provide an application device for a reaction product prediction model, including a specific unit configured to identify the target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured.

[0010] According to another aspect of the present application, Provide a computer device including a memory for storing a program, a processor for realizing the methods according to the above aspects when the program in the memory is executed, and a bus system for connecting the memory and the processor to enable communication between the memory and the processor.

[0011] According to another aspect of the present application, provide a computer-readable storage medium storing instructions for causing a computer to execute the methods according to the above aspects when the computer-readable storage medium operates on a computer.

[0012] According to another aspect of the present application, there is provided a computer program product including a computer program which, when executed by a processor, implements the methods according to the above-described respective aspects. [Advantages of the Invention]

[0013] As is apparent from the above technical means, the embodiments of the present application have the following beneficial effects.

[0014] After obtaining the sample reactant vector and the sample reaction product vector, construct a positive sample reactant set and a negative sample reactant set through the first auxiliary network, identify a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set, and then construct a positive sample reaction group set and a negative sample reaction group set through the second auxiliary network, identify a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set, and then obtain a predicted probability value and an atomic label of whether an atom in the sample reactant exists in the main product through the third auxiliary network, identify an atomic prediction loss value based on the predicted probability value and the atomic label, and then train a reaction product prediction model based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value to obtain a target reaction product prediction model. In the above manner, through the first auxiliary network, the second auxiliary network, and the third auxiliary network capable of performing self-supervised learning, by excavating and constructing positive and negative sample sets, atomic labels, etc. from the characteristics of the data itself in the sample reaction data set, automatic labeling of the data in the sample reaction data set can be realized without relying on artificial labeling, so that the cost required for the training task of the reaction product prediction model can be reduced. In addition, since the first auxiliary network helps the reaction product prediction model better learn the distance relationship between reactants, the reaction product prediction model is enabled to have the ability to predict whether reactants can react. Since the second auxiliary network helps the reaction product prediction model better learn the distance relationship between reactants and products, the reaction product prediction model is enabled to have the ability to predict the correspondence relationship between reactants and products. Since the third auxiliary network helps the reaction product prediction model better learn the possible changes in the relationship between the bonding positions of atoms in the reactant during the reaction process, the reaction product prediction model is enabled to have the ability to predict whether an atom still exists in the main product after the reaction. Based on the supplementary learning by these auxiliary networks, the prediction accuracy of the reaction product by the reaction product prediction model can be improved. Brief Description of the Drawings

[0015]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Embodiments for Carrying Out the Invention

[0016] For convenience of understanding, first, some terms or concepts mentioned in the embodiments of the present application will be explained.

[0017] 1. Transformer A Transformer is composed of an encoder and a decoder, can use a self-attention mechanism, and does not adopt the hierarchical structures of a Recurrent Neural Network (RNN) and a Long Short-Term Memory (LSTM). Therefore, the model can perform training in parallel and can have global information.

[0018] 2. Contrastive Learning Contrastive learning is one of the self-supervised learning methods. When no labeling is performed, it is to learn the general features of the dataset by allowing the model to learn which data points are similar or different.

[0019] 3. Graph Neural Networks Graph neural networks include Graph Convolutional Networks, Graph Attention Networks, Graph Auto-encoders, Graph Generative Networks, Graph Spatial-Temporal Networks, etc. Compared with the fully connected layer (MLP), which is the most basic layer of neural networks, in addition to multiplying the feature matrix by the weight matrix, one adjacency matrix is added to graph neural networks.

[0020] 4. Auxiliary Task The auxiliary task is one of the important methods to assist the learning of the main task in reinforcement learning. In learning, when the main task has relatively rare rewards or is difficult, the auxiliary task can be used to assist in the learning of feature representations.

[0021] In the specific embodiments of the present invention, data related to a sample reaction data set, etc. is mentioned. However, when the above embodiments of the present application are applied to specific products or technologies, it is necessary to obtain the permission or consent of the user. It should also be understood that the collection, use, and handling of related data need to comply with the relevant laws and standards of the corresponding countries and regions.

[0022] It should be understood that the training method and application method of the reaction product prediction model according to the present application are applicable to various scenes including, but not limited to, artificial intelligence, cloud technology, computational chemistry, pharmaceuticals, etc. By training a powerful reaction product prediction model and optimizing the reaction product prediction task, it is applicable to scenes such as drug retrosynthesis verification, scientific law exploration, and pharmaceutical development.

[0023] The training method of the reaction product prediction model according to the present application can be applied to the reaction data control system shown in FIG. 1. Referring to FIG. 1, FIG. 1 is a schematic configuration diagram of the reaction data control system according to an embodiment of the present application. As shown in FIG. 1, the server obtains a sample reactant vector and a sample reaction product vector based on the set of sample reaction data provided by the terminal device, constructs a positive sample reactant set and a negative sample reactant set through a first auxiliary network, specifies a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set, constructs a positive sample reaction group set and a negative sample reaction group set through a second auxiliary network, specifies a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set, obtains a prediction probability value and an atomic label of the atoms in the sample reactant existing in the main product through a third auxiliary network, specifies an atomic prediction loss value based on the prediction probability value and the atomic label, and then trains a reaction product prediction model based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value to obtain a target reaction product prediction model. As described above, through the first auxiliary network, the second auxiliary network, and the third auxiliary network capable of performing self-supervised learning, by excavating and constructing positive and negative sample sets and atomic labels from the characteristics of the data itself in the sample reaction data set, it is possible to realize automatic labeling of the data in the sample reaction data set without relying on artificial labeling, so that the cost required for the training task of the reaction product prediction model can be reduced.Among them, the first auxiliary network helps the reaction product prediction model better learn the distance relationship between reactants, so that the reaction product prediction model has the ability to predict whether reactants can react. The second auxiliary network helps the reaction product prediction model better learn the distance relationship between reactants and products, so that the reaction product prediction model has the ability to predict the correspondence between reactants and products. The third auxiliary network helps the reaction product prediction model better learn the possible changes in the relationship between the bonding positions of atoms in the reactants during the reaction process, so that the reaction product prediction model has the ability to predict whether the atoms still exist in the main product after the reaction. Based on the supplementary learning by these auxiliary networks, the prediction accuracy of the reaction products by the reaction product prediction model can be improved.

[0024] Although only one type of terminal device is shown in FIG. 1, in an actual scenario, more types of terminal devices may participate in the process of handling data. The terminal devices include, but are not limited to, mobile phones, computers, smart voice dialogue devices, smart home appliances, in-vehicle terminals, etc. The specific number and types are determined by the actual scenario, but it should be understood that they are not particularly limited here. Also, although only one server is shown in FIG. 1, in an actual scenario, multiple servers may participate. Especially in the scenario of multi-model training interaction, the number of servers is determined by the actual scenario, but it is not particularly limited here.

[0025] In this embodiment, the server may be an independent physical server, or may be a server cluster or a distributed system composed of multiple physical servers. Furthermore, it may also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal device and the server can be directly or indirectly connected by a wired or wireless communication method. The terminal device and the server can be connected to form a blockchain network, but this is not limited in this specification.

[0026] Referring to the foregoing description, next, a method for training a reaction product prediction model according to the present application will be described. This method can be executed by a computer device. This computer device can be a server or a terminal device. Referring to FIG. 2, an embodiment of the method for training a reaction product prediction model according to an embodiment of the present application includes the following steps.

[0027] In step S101, through the encoder network of the reaction product prediction model, vector conversion is performed on each reaction sequence in the sample reaction data set to obtain a sample reactant vector and a sample reaction product vector. The sample reaction data set includes a plurality of reaction sequences, and each reaction sequence includes a sample reactant and a sample reaction product.

[0028] It should be understood that the sample reaction data set includes a plurality of reaction sequences. Each reaction sequence can be represented as (G r , G p ), and each reaction sequence is used to represent an organic chemical reaction data R 1 +R 2 +…→P 1 +P 2 +…, where G r represents a series of sample reactants, and Gp represents a series of products, i.e., sample reaction products.

[0029] Here, in the molecular graph G = (V, E), V represents the set of atoms, and the size of the set is the number of atoms |V| = N. Each atom υ ∈ V is associated with one atomic feature including the type of atom, charge, aromaticity, etc. E represents the set of edges, and each edge is associated with one type of bond including single bond, double bond, triple bond, aromatic bond, etc. The goal of performing organic chemical reaction prediction is to give reactants and predict products.

[0030] Furthermore, according to the atom-mapping principle in organic chemical reactions, since the atoms in the reactants and the atoms in the products are paired one-to-one, mainly the change in the connection between atoms, i.e., the change in the adjacency matrix A, occurs before and after the reaction, and no change occurs to the atoms involved. Therefore, when predicting the product (i.e., the reaction product), only by predicting its corresponding adjacency matrix, the structure of the entire product can be reproduced. The adjacency matrix used in this embodiment is different from the general adjacency matrix. Also, the change in the adjacency matrix A, i.e.,

[0031]

Number

Number

[0032]

Number

[0033] The subsequent probability distribution

[0034]

Number

[0035] Here, the reaction product prediction model can specifically be expressed as a VAE architecture that satisfies the law of conservation of electron transfer as shown in FIG. 16. Furthermore, it can be expressed as other models such as a flow-based model, maximum likelihood training, deep VAE, etc., but it is not particularly limited here.

[0036] Furthermore, when the reaction product prediction model uses a VAE architecture that satisfies the law of conservation of electron transfer energy as shown in FIG. 16, the sample reactant vector and the sample reaction product vector can be obtained by performing vector conversion on each reaction sequence in the sample reaction data set through the graph neural network (GNN) and the Transformer shown in FIG. 16.

[0037] In step S102, a positive sample reactant set and a negative sample reactant set are constructed according to the sample reactant vector through the first auxiliary network.

[0038] In this embodiment, it is assumed that a predetermined reactant used for predicting the reaction product will definitely cause a reaction during the modeling process. However, in an actual scenario, not all reactants will necessarily cause a reaction. Therefore, an accurate reaction product prediction model must have the ability to determine whether a reactant can react. Also, in the embedding space, the distance between molecules that do not react should be far, and the distance between molecules that can react should be close. Thus, this embodiment constructs an auxiliary task for predicting whether a reactant can react, that is, by constructing a positive sample reactant set and a negative sample reactant set through a first auxiliary network, it assists the reaction product prediction model in learning the distance between molecules, thereby enabling it to have the ability to determine whether a reactant can react and enhancing the generalization performance of the molecular representation. Thereby, after obtaining the sample reactant vector, the sample reactant vector is input into the first auxiliary network, and a positive sample reactant set and a negative sample reactant set are constructed through the first auxiliary network.

[0039] Specifically, for Task1 shown in FIG. 15, that is, input the sample reactant vector into the first auxiliary network, and sample the sample reactant vectors corresponding to any two sample reactants from the same reaction sequence, for example, R 11 +R 12 +R 13 →P 11 to obtain positive sample reactant combinations, such as R 11 +R 12 、R 11 +R 13 and R 12 +R 13 etc., and then the positive sample reactant combinations can be added to the positive sample reactant set positive.

[0040] Furthermore, for different reaction sequences, such as R 11 +R 12 +R 13 →P 11 and R 21 +R 22 +R 23 →P 21Sampling the sample reactant vectors corresponding to any two sample reactants from to obtain negative sample reactant combinations, for example, R 11 +R 22 、R 12 +R 23 and R 21 +R 13 and so on, negative sample reactant combinations can be added to the negative sample reactant set negative.

[0041] In step S103, based on the positive sample reactant set and the negative sample reactant set, a reaction prediction loss value is determined.

[0042] In this embodiment, the reaction prediction loss value represents the ability of the reaction product prediction model to determine whether the reactants can react, that is, the reaction prediction loss value is data representing the prediction accuracy of the reaction occurrence possibility by the reaction product prediction model. Here, the reaction occurrence possibility refers to whether the reactants input into the reaction product prediction model can react.

[0043] Specifically, after obtaining the positive sample reactant set and the negative sample reactant set, the reaction prediction loss value can be calculated using the following loss function formula (1).

[0044]

Equation

[0045]

Equation

[0046]

Equation

[0047] In step S104, through the second auxiliary network, according to the sample reactant vector and the sample reaction product vector, a set of positive sample reaction groups and a set of negative sample reaction groups are constructed.

[0048] In this embodiment, the ranking of candidate products is important information, and the reaction product prediction model can receive the probability scores for different candidate products. Therefore, this embodiment constructs an auxiliary task for predicting whether the reactants and products are correctly associated, that is, through the second auxiliary network, it helps the reaction product prediction model learn the relationship between the reactants and the reaction products, so as to have the ability to determine whether the reactants and the reaction products are correctly associated, and the generalization performance of the molecular representation can be enhanced. Thus, after obtaining the sample reactant vector and the sample reaction product vector, the sample reactant vector and the sample reaction product vector are input into the second auxiliary network, and a set of positive sample reaction groups and a set of negative sample reaction groups are constructed through the second auxiliary network.

[0049] Specifically, the sample reactant vector and the sample reaction product vector are input into the task Task2 shown in FIG. 15, that is, the second auxiliary network. For the corresponding sample reactant vectors and sample reaction product vectors of all reaction sequences, for example, in one reaction sequence R 11 +R 12 +R 13 →P 11 , if the reactant R 11 +R 12 +R 13 and the reaction product P 11 are in the correct correspondence, they can be used as the positive sample reaction group set.

[0050] Furthermore, by constructing a negative sample reaction group set by wrongly combining reactants and reaction products, the matching score between reactants and reaction products with incorrect correspondence can be made lower. For example, for R 11 +R 12 +R 13 →P 11 in one reaction sequence, if the reactant R 11 +R 12 +R 13 and the reaction product P 11 are in the correct correspondence, and for R 21 +R 22 +R 23 →P 21 in another reaction sequence, if the reactant R 21 +R 22 +R 23 and the reaction product P 21 are in the correct correspondence, by wrongly combining reactants and reaction products, negative sample reaction group sets with incorrect correspondence between reactants and reaction products, such as R 11 +R 12 +R 13 →P 21 and R 21 +R 22 +R 23 →P 11 , can be obtained.

[0051] In step S105, a reaction relationship prediction loss value is determined based on the positive sample reaction group set and the negative sample reaction group set.

[0052] In this embodiment, the reaction relationship prediction loss value represents the ability of the reaction product prediction model to determine whether the reactant and the reaction product have a correct correspondence relationship. That is, the reaction relationship prediction loss value is data representing the prediction accuracy of the reaction relationship by the reaction product prediction model. This reaction relationship refers to the correspondence relationship between the reactant and the reaction product. It should be noted that the reaction relationship prediction loss value mentioned here and the reaction prediction loss value mentioned in step S103 above are two parallel loss values. Both of them can be used to train the reaction product prediction model in subsequent steps, but there is no inevitable correlation between them, and the information they represent is different. The reaction prediction loss value represents the ability of the reaction product prediction model to determine whether a reaction can occur between reactants, and the reaction relationship prediction loss value represents the ability of the reaction product prediction model to determine whether there is a correct correspondence relationship between the reactant and the reaction product.

[0053] Specifically, after obtaining the positive sample reaction group set and the negative sample reaction group set, the reaction relationship prediction loss value can be calculated using the following loss function formula (2).

[0054]

Number

[0055]

Number

[0056]

Number

[0057]

Number

[0058] [Number] have the same architecture but different parameters, and the two networks satisfy permutation invariance. h r is the feature vector embedding corresponding to the reactant atoms, h p is the feature vector embedding corresponding to the reaction product atoms, and ε and γ are two margin hyperparameters. The first term of this loss function is used to bring closer the distances between the sample reactant vectors and the sample reaction product vectors in the same reaction sequence, i.e., the set of positive sample reaction groups, and the second term is used to keep apart the sample reactant vectors and the sample reaction product vectors in the wrongly formulated reaction sequences, i.e., the set of negative sample reaction groups. Here, it should be understood that even if the tasks are constructed online during the model training period, the sample size of the objective function can be set to B.

[0059] In step S106, through the third auxiliary network, according to the sample reactant vector and the sample reaction product vector, the predicted probability value and the atomic label of the atoms in the sample reactant existing in the main product are determined.

[0060] In this embodiment, in the reaction data of huge datasets such as the publicly available dataset USPTO-480K, by-products are always ignored, and the prediction error for reaction products is likely to increase. Therefore, in this embodiment, a third auxiliary network for predicting whether an atom exists in the main product during the modeling process can be added, and the information of some by-products can be supplemented to a certain extent, so that the prediction ability of the reaction product can be improved. Thereby, after obtaining the sample reactant vector and the sample reaction product vector, the sample reactant vector and the sample reaction product vector are input into the third auxiliary network, and the prediction probability value and the atom label of the atoms in the sample reactant existing in the main product are identified through the third auxiliary network.

[0061] Specifically, for Task3 shown in FIG. 15, that is, the sample reactant vector and the sample reaction product vector are input into the third auxiliary network, and the sample reactant is predicted through the third auxiliary network, so as to obtain the prediction probability value of the atoms in the sample reactant existing in the main product. Also, based on the sample reactant vector and the sample reaction product vector, the atoms in the sample reactant are compared with the atoms in the sample product to obtain an atom comparison result, and the atom label is identified based on the atom comparison result.

[0062] In step S107, based on the prediction probability value and the atom label, an atom prediction loss value is identified.

[0063] In this embodiment, the atom prediction loss value represents the ability of the reaction product prediction model to determine whether an atom still exists in the main product after the atom reacts.

[0064] Specifically, after obtaining the prediction probability value and the atom label, the atom prediction loss value can be calculated using the following loss function formula (3).

[0065]

Equation

[0066]

Number

[0067]

Number

[0068] In step S108, based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value, train the reaction product prediction model to obtain the target reaction product prediction model.

[0069] Specifically, when obtaining the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value, on the one hand, adopt the training method of multi-task learning, weight the target functions such as the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value and directly add them to the total target function, and then, based on the total target function value, perform parameter adjustment on the reaction product prediction model. Specifically, parameter adjustment can be performed in the iterative manner of backpropagation, and other methods can also be adopted but are not limited here, thereby obtaining the target reaction product prediction model.

[0070] On the other hand, this embodiment further adopts a pre-training strategy to pre-train the first auxiliary network, the second auxiliary network, and the third auxiliary network respectively based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value, and then transfer the pre-trained network to the reaction product prediction model, thereby obtaining the target reaction product prediction model.

[0071] In the embodiments of the present application, a method for training a reaction product prediction model is provided. As described above, through the first auxiliary network, the second auxiliary network, and the third auxiliary network capable of performing self-supervised learning, positive and negative sample sets, atomic labels, etc. are mined and constructed from the characteristics of the data itself in the sample reaction data set, so that automatic labeling of the data in the sample reaction data set can be realized without relying on artificial labeling. Therefore, the cost required for the training task of the reaction product prediction model can be reduced. Among them, the first auxiliary network helps the reaction product prediction model better learn the distance relationship between reactants, so that the reaction product prediction model has the ability to predict whether reactants can react. The second auxiliary network helps the reaction product prediction model better learn the distance relationship between reactants and products, so that the reaction product prediction model has the ability to predict the correspondence between reactants and products. The third auxiliary network helps the reaction product prediction model better learn the possible changes in the relationship between the bonding positions of atoms in the reactants during the reaction process, so that the reaction product prediction model has the ability to predict whether the atoms still exist in the main product after the reaction. Based on the auxiliary learning by these auxiliary networks, the prediction accuracy of the reaction product by the reaction product prediction model can be improved. The target reaction product prediction model obtained by training in this way can be used as an effective verification tool for drug reverse synthesis, so that the research efficiency of new drug synthesis routes can be improved. Furthermore, the target reaction product prediction model can reliably predict candidate products even when none of the existing templates can be used, and can predict new reactions to greatly improve the development efficiency of new drugs.

[0072] As an option, based on the embodiment corresponding to FIG. 2 described above, in another alternative embodiment of the training method of the reaction product prediction model according to the embodiment of the present application, as shown in FIG. 3, through the encoder network of the reaction product prediction model, for each reaction sequence in the sample reaction data set, a vector conversion is performed. Prior to step S101 of obtaining the sample reactant vector and the sample reaction product vector, this method further includes steps S301 to S302, and step S101 includes step S303.

[0073] In step S301, data augmentation processing is performed on the sample reaction data set to obtain a sample composite reaction data set.

[0074] In step S302, the sample reaction data set and the sample composite reaction data set are aggregated as an extended sample reaction data set.

[0075] In step S303, through the encoder network of the reaction product prediction model, for each reaction sequence in the extended sample reaction data set, a vector conversion is performed to obtain the sample reactant vector and the sample reaction product vector.

[0076] In this embodiment, a general reaction product prediction model can predict simple chemical reactions involving one reactant or two or three reactants, etc., but it is difficult to predict more reactants or complex chemical reactions. In view of this, in this embodiment, during the modeling process, data augmentation is performed on the sample reaction data set to obtain a sample composite reaction data set, and the sample reaction data set and the sample composite reaction data set are aggregated as an extended sample reaction data set. Then, the extended sample reaction data set is input into the reaction product prediction model, and vector conversion is performed on each reaction sequence in the extended sample reaction data set through the encoder network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector. Thereby, not only can the sample reaction data set be expanded, but also the complexity of the sample reaction data set can be enhanced to a certain extent, which helps the reaction product prediction model master the ability to predict complex chemical reactions, and thus can improve the prediction accuracy of the reaction product to a certain extent.

[0077] Specifically, as shown in Task4 shown in FIG. 15, when performing data augmentation processing on the sample reaction data set, specifically, two reaction sequences are randomly selected from the sample reaction data set, and the sample reactants in the two selected reaction sequences are combined to obtain a sample composite reactant, and the sample reaction products in the two selected reaction sequences are combined to obtain a sample composite reaction product. Then, a composite reaction sequence is obtained based on the sample composite reactant and the sample composite reaction product, and a sample composite reaction data set may be constructed based on the composite reaction sequence, or other augmentation methods may be adopted, but it is not particularly limited here. For example, the reactant R 11 +R 12 +R 13 →P 11 in 11 +R 12 +R 13 and the reaction product P 11 are replaced with the R 21 +R 22 +R 23 →P21 Reactant R in 21 +R 22 +R 23 and reaction product P 21 By combining with, one composite reaction sequence, for example R 11 +R 12 +R 13 +R 21 +R 22 +R 23 →P 11 +P 21 can be obtained.

[0078] Furthermore, by aggregating the acquired sample reaction data set and the sample composite reaction data set as an extended sample reaction data set, it facilitates training a reaction product prediction model using the extended sample reaction data set later, and helps the reaction product prediction model master the ability to predict complex chemical reactions. That is, input the extended sample reaction data set into the reaction product prediction model, perform vector transformation on each reaction sequence in the extended sample reaction data set through the encoder network of the reaction product prediction model to obtain the sample reactant vector and the sample reaction product vector. Then, by combining the first auxiliary network, the second auxiliary network, and the third auxiliary network described above with the sample reactant vector and the sample reaction product vector, the reaction product prediction model can be trained.

[0079] Optionally, based on the embodiment corresponding to FIG. 2 or FIG. 3 described above, in another alternative embodiment of the training method of the reaction product prediction model according to the embodiment of the present application, as shown in FIG. 4, step S102 of constructing a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through the first auxiliary network includes the following steps.

[0080] In step S401, sample reactant vectors corresponding to any two sample reactants from the same reaction sequence are sampled as a positive sample reactant combination, and the positive sample reactant combination is added to the positive sample reactant set.

[0081] In step S402, sample reactant vectors corresponding to any two sample reactants from different reaction arrays are sampled to form a negative sample reactant combination, and the negative sample reactant combination is added to the negative sample reactant set.

[0082] Specifically, in the embedding space, since the distance between molecules where no reaction occurs should be far, and the distance between molecules where a reaction can occur should be close, after obtaining the sample reactant vectors corresponding to each reaction array, chemical reaction data, for example,

[0083]

Number

[0084]

Number

[0085]

Number

[0086]

Number

[0087]

Number

[0088] Furthermore, as shown in FIG. 15, for the convenience of display, in this embodiment, reaction data B of one batch size is given to construct two spaces. Among them, one is the positive sample space, that is, the set of positive sample reactants, and the other is the negative sample space, that is, the set of negative sample reactants. The task Task1 shown in FIG. 15, that is, input the sample reactant vector into the first auxiliary network, and the set of positive sample reactants

[0089] [Number] is constructed based on predetermined reaction data in the chemical data B, that is, sample reactant vectors corresponding to any two sample reactants from the same reaction sequence are sampled and combined. Assuming that there are R reactants in each reaction, R(R - 1) combinations of positive sample reactant combinations can be obtained. The set of negative sample reactants

[0090] [Number] is obtained by combining two sample reactants from different reaction sequences, that is, sample reactant vectors corresponding to any two sample reactants from different reaction sequences are sampled and combined.

[0091] For example, as shown in FIG. 15, for the same reaction sequence, such as R 11 +R 12 +R 13 →P 11 sample the sample reactant vectors corresponding to any two sample reactants to obtain positive sample reactant combinations, such as R 11 +R 12 、R 11 +R 13 and R 12 +R 13 etc., and they can be aggregated into the positive sample reactant set positive.

[0092] Furthermore, for different reaction sequences, such as R 11+R 12 +R 13 →P 11 and R 21 +R 22 +R 23 →P 21 Sample any two sample reactant vectors from, for example, R 11 +R 22 , R 12 +R 23 and R 21 +R 13 etc., to aggregate into the negative sample reactant set negative.

[0093] In this way, by constructing the positive sample reactant set and the negative sample reactant set as described above, the first auxiliary network can better assist the reaction product prediction model in learning the distance relationship between reactants. Therefore, the reaction product prediction model can more accurately predict whether the reactants can react.

[0094] Optionally, based on the embodiments corresponding to FIG. 2 or FIG. 3 described above, in another alternative embodiment of the training method of the reaction product prediction model according to the embodiments of the present application, as shown in FIG. 5, through the second auxiliary network, according to the sample reactant vector and the sample reaction product vector, step S104 of constructing the positive sample reaction group set and the negative sample reaction group set includes the following steps.

[0095] In step S501, the corresponding sample reactant vectors and sample reaction product vectors of all reaction sequences are used as the positive sample reaction group set.

[0096] In step S502, the corresponding sample reactant vectors and sample reaction product vectors of different reaction sequences are combined to obtain the negative sample reaction group set.

[0097] Specifically, a batch size of chemical reaction data B = {R 1 →P 1 , R 2 →P2 , …} is given, and a reactant given from within the batch, for example R 1 and the reaction product P 1 The combination with is used as the positive sample reaction group, that is, R 1 → P 1 By doing so, the chemical reaction data B can be made into a set of positive sample reaction groups. Specifically, for the task Task2 shown in FIG. 15, that is, the second auxiliary network, the sample reactant vector and the sample reaction product vector are input. For the corresponding sample reactant vectors and sample reaction product vectors of all reaction sequences, for example, in one reaction sequence R 11 + R 12 + R 13 → P 11 For, if the reactant R 11 + R 12 + R 13 and the reaction product P 11 are in the correct correspondence, it can be made into one positive sample reaction group in the set of positive sample reaction groups.

[0098] Further, the set of negative sample reaction groups is constructed by wrongly combining the combinations of reactants and reaction products in the chemical reaction data B = {R 1 → P 1 , R 2 → P 2 , …}. By wrongly combining the sample reactant vector and the sample reaction product vector to obtain a negative sample reaction group, the matching score between the reactant and the reaction product with the wrong correspondence can be made lower. For example, as shown in FIG. 15, for R 11 + R 12 + R 13 → P 11 in one reaction sequence, if the reactant R 11 + R 12 + R 13 and the reaction product P 11 are in the correct correspondence, and for R 21 + R 22 + R 23 → P 21 in another reaction sequence, for the reactant R 21 + R22 +R 23 and the reaction product P 21 When they have a correct correspondence relationship, by mistakenly mixing the reactants and the reaction product, R 11 +R 12 +R 13 →P 21 or R 21 +R 22 +R 23 →P 11 etc., a negative sample reaction group with an incorrect correspondence relationship between the reactants and the reaction product can be obtained.

[0099] In this way, by constructing the positive sample reaction group set and the negative sample reaction group set as described above, the second auxiliary network can better assist the reaction product prediction model in learning the distance relationship between the reactants and the products. Therefore, the reaction product prediction model can more accurately predict the correspondence relationship between the reactants and the products.

[0100] Optionally, based on the embodiments corresponding to FIG. 2 or FIG. 3 described above, in another alternative embodiment of the training method of the reaction product prediction model according to the embodiments of the present application, as shown in FIG. 6, through the third auxiliary network, according to the sample reactant vector and the sample reaction product vector, the step S106 of specifying the prediction probability value and the atomic label of the atoms in the sample reactant existing in the main product includes the following steps.

[0101] In step S601, predict the sample reactant through the third auxiliary network to obtain the prediction probability value of the atoms in the sample reactant existing in the main product.

[0102] In step S602, compare the atoms in the sample reactant and the sample product based on the sample reactant vector and the sample reaction product vector to obtain an atomic comparison result.

[0103] In step S603, specify the atomic label based on the atomic comparison result.

[0104] In this embodiment, predicting whether atoms exist in the main product and predicting the reaction center are two non-equivalent tasks. Among them, by predicting the reaction center, one can only predict which bonds will break, and cannot know which of the two atoms connected by the bond exists in the by-product. Therefore, the third auxiliary network for predicting whether atoms exist in the main product can enable the reaction product prediction model to learn the relative importance of atoms in the reaction. Thereby, through the third auxiliary network, a sample reactant can be predicted, and a prediction probability value of whether the atoms in the sample reactant exist in the main product can be obtained. Also, based on the sample reactant vector and the sample reaction product vector, the atoms of the sample reactant and the atoms in the sample product can be compared to obtain the corresponding atom comparison result. Then, based on the atom comparison result, the atom label can be identified.

[0105] Specifically, when predicting a sample reactant through the third auxiliary network and obtaining a prediction probability value of whether the atoms in the sample reactant exist in the main product, specifically, since the task of predicting whether an atom exists in the main product can be used as a masking matrix for hiding by-product information with existing information, the reaction product prediction model can focus only on the information of the main product. However, in reality, this masking matrix is also the content to be predicted by the reaction product prediction model.

[0106] Furthermore, the method for obtaining the atom label ground-truth label is specifically to compare the atoms of the sample reactant and the atoms in the sample product based on the sample reactant vector and the sample reaction product vector. Then, the atoms discarded from the reactant compared to the reaction product can be marked as 0, and the atoms still existing in the reaction product can be marked as 1. Other labeling methods can also be adopted, but it is not particularly limited here.

[0107] In this way, as described above, the third auxiliary network can better assist the reaction product prediction model in learning the possible changes in the relationship of the bonding positions between atoms in the reactants during the reaction process. Therefore, the reaction product prediction model can predict whether the atoms still exist in the main product after the reaction.

[0108] Optionally, based on the embodiments corresponding to FIG. 2 or FIG. 3 described above, in another alternative embodiment of the training method of the reaction product prediction model according to the embodiments of the present application, as shown in FIG. 7, through the encoder network of the reaction product prediction model, for each reaction sequence in the sample reaction data set, the step S101 of performing vector conversion to obtain a sample reactant vector and a sample reaction product vector includes the following steps.

[0109] In step S701, for each reaction sequence, the information inside each molecule of the sample reactant therein is interacted between atoms to obtain sample reactant interaction information.

[0110] In step S702, based on the sample reactant interaction information, different sample reactants are interacted to obtain a sample reactant vector.

[0111] In step S703, for each reaction sequence, the information inside each molecule of the sample reaction product therein is interacted between atoms to obtain sample reaction product interaction information.

[0112] In step S704, based on the sample reaction product interaction information, different sample reactants are interacted to obtain a sample reaction product vector.

[0113] Specifically, when the reaction product prediction model uses a VAE architecture that satisfies the law of conservation of electron transfer energy as shown in FIG. 16, in this embodiment, the encoder network that performs vector conversion on each reaction sequence in the sample reaction data set may be a combination of a graph neural network (GNN) and a Transformer.

[0114] Here, the Transformer is composed of an encoder and a decoder, and can use a self-attention mechanism. Since it does not adopt the hierarchical structures of a recurrent neural network (RNN) and a long short-term memory network (LSTM), the model can be trained in parallel and can have global information.

[0115] Here, the graph neural network (GNN) includes a graph convolutional network, a graph attention network, a graph autoencoder, a graph generation network, a spatio-temporal graph network, etc. Compared with the fully connected layer (MLP), which is the most basic layer of the neural network, in addition to multiplying the feature matrix by the weight matrix, the graph neural network has one additional adjacency matrix.

[0116] Thus, using the following formula (4), the information within each molecule can be made to interact between atoms through the GNN. That is, for each reaction sequence, the information within each molecule of the sample reactants therein is made to interact between atoms to obtain sample reactant interaction information. Then, the information is made to interact between different reactants through the Transformer, that is, interact between different sample reactants based on the sample reactant interaction information to obtain a sample reactant vector.

[0117]

Equation

[0118] Similarly, using the following formula (5), the information within each molecule can be interacted between atoms through a GNN. That is, for each reaction sequence, the information within each molecule of the sample reaction product therein is interacted between atoms to obtain sample reaction product interaction information. Then, information is interacted between different reaction products through a Transformer, that is, interacted between different sample reaction products based on the sample reaction product interaction information to obtain a sample reaction product vector.

[0119]

Number

[0120] In this way, by obtaining the sample reactant vector and the sample reaction product vector as described above, it can be ensured that the obtained sample reactant vector and sample reaction product vector more accurately reflect the characteristics of the corresponding sample reactant and sample reaction product. Furthermore, later, the first auxiliary network, the second auxiliary network, and the third auxiliary network can be assisted to better learn the related capabilities based on this sample reactant vector and sample reaction product vector, so that the performance of the reaction product prediction model to be trained can be improved.

[0121] Optionally, based on the embodiment corresponding to FIG. 3 described above, in another alternative embodiment of the training method of the reaction product prediction model according to the embodiment of the present application, as shown in FIG. 8, the step S301 of performing data augmentation processing on the sample reaction data set to obtain a sample composite reaction data set includes the following steps.

[0122] In step S801, two reaction arrays are randomly selected from the sample reaction data set.

[0123] In step S802, the sample reactants in the two selected reaction arrays are combined to obtain a sample composite reactant.

[0124] In step S803, the sample reaction products in the two selected reaction arrays are combined to obtain a sample composite reaction product.

[0125] In step S804, a composite reaction array is obtained based on the sample composite reactant and the sample composite reaction product, and a sample composite reaction data set is constructed based on the composite reaction array.

[0126] In this embodiment, when performing data augmentation processing on the sample reaction data set, two reaction arrays are randomly selected from the sample reaction data set, and the sample reactants in the two selected reaction arrays are combined to obtain a sample composite reactant. Also, the sample reaction products in the two selected reaction arrays are combined to obtain a sample composite reaction product. Then, a composite reaction array is obtained based on the sample composite reactant and the sample composite reaction product, and a sample composite reaction data set may be constructed based on this. Even when combined in such a data augmentation method, a completely accurate chemical reaction cannot be obtained. For example, the reaction does not occur between A and B, E and F among the new reactant combinations, but may occur between A and E, B and F. Also, other combination methods may be used. Or, even if A and B, E and F react, they are only intermediate products, and there is also a possibility that the reaction will proceed further to obtain the final product. That is, the new reactions obtained by the data augmentation method of random combination are not necessarily accurate, but still can enhance the generalization performance of the reaction product prediction model. And there are always incorrect reaction data in the commonly used USPTO-480K data (for example, the given ground-truth product is an intermediate product instead of the final product). Therefore, the inaccurate new reaction combinations obtained by the above-mentioned data augmentation method do not affect the prediction accuracy of the reaction product prediction model much. Thus, the sample composite reaction data set obtained by data augmentation and the original sample reaction data set are aggregated to obtain an extended sample reaction data set, which can be applied to the subsequent parameter adjustment of the reaction product prediction model, thereby enhancing the robustness and generalization performance of the reaction product prediction model, having strong scalability for a larger data set, and being able to perform supervised learning tasks without relying on manual labeling.

[0127] Specifically, as shown in Task4 shown in FIG. 15, the R in one reaction array 11 +R 12 +R 13 →P 11 In the reaction where the reactant R 11 +R 12 +R13 and reaction product P 11 with R in another reaction sequence 21 +R 22 +R 23 →P 21 reactant R in 21 +R 22 +R 23 and reaction product P 21 By combining with, a single composite reaction sequence, for example R 11 +R 12 +R 13 +R 21 +R 22 +R 23 →P 11 +P 21 can be obtained.

[0128] Optionally, based on the embodiment corresponding to FIG. 2 described above, in another alternative embodiment of the method for training a reaction product prediction model according to the embodiment of the present application, as shown in FIG. 9, based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value, the step S108 of training a reaction product prediction model to obtain a target reaction product prediction model includes the following steps.

[0129] In step S901, obtain a reconstruction loss value and a divergence loss value.

[0130] In step S902, based on the reconstruction loss value, the divergence loss value, the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value, train a reaction product prediction model to obtain a target reaction product prediction model.

[0131] Specifically, when the reaction product prediction model uses a VAE architecture that satisfies the law of conservation of electron transfer energy as shown in FIG. 16, this embodiment can adopt a training method of multi-task learning, and based on the VAE architecture, a reconstruction loss value and a divergence loss value can be obtained.

[0132] Furthermore, based on the total objective function formula (6) shown below, objective functions such as the reconstruction loss value, divergence loss value, reaction prediction loss value, reaction relationship prediction loss value, and atomic prediction loss value are weighted and directly added to the total objective function to obtain the total objective function value in this way.

[0133]

Number

[0134]

Number

[0135]

Number

[0136]

Number

[0137] Furthermore, when adjusting the parameters of the reaction product prediction model based on the total objective function value, specifically, the parameter adjustment can be performed in an iterative manner of backpropagation, and other methods can also be adopted but are not particularly limited here, thereby obtaining the target reaction product prediction model.

[0138] In this way, by training the reaction product prediction model based on the above-described reconstruction loss value, divergence loss value, reaction prediction loss value, reaction relationship prediction loss value, and atomic prediction loss value, it contributes to endowing the reaction product prediction model to be trained with better performance and also contributes to improving the training efficiency of the reaction product prediction model.

[0139] Optionally, based on the embodiment corresponding to FIG. 9 described above, in another alternative embodiment of the training method of the reaction product prediction model according to the embodiment of the present application, as shown in FIG. 10, the step S901 of obtaining the reconstruction loss value and the divergence loss value includes the following steps.

[0140] In step S1001, the attention mechanism is used to process the sample reactant vector and the sample reaction product vector to obtain the first hidden vector.

[0141] In step S1002, based on the first hidden vector and the sample reactant vector, the second hidden vector is obtained.

[0142] In step S1003, through the decoder network of the reaction product prediction model, according to the second hidden vector, the sample prediction change probability of the adjacency matrix is specified.

[0143] In step S1004, based on the sample prediction change probability, the sample predicted reaction product adjacency matrix is specified.

[0144] In step S1005, based on the reaction product adjacency matrix of the sample reaction product and the sample predicted reaction product adjacency matrix, the loss is calculated to obtain the reconstruction loss value and the divergence loss value.

[0145] Specifically, as shown in FIG. 16, an attention mechanism can be applied to the sample reactant vector and the sample reaction product vector, that is, reactant embedding and product embedding can be introduced into a single layer of cross attention mechanism. Here, in order to obtain the parameter vectors μ and logσ of the Gaussian distribution, cross attention can be directly realized through the Transformer Decoder based on the following formulas (7), (8) and (9), and the reparameterization technique can be used to obtain the first hidden vector that conforms to the Gaussian distribution.

[0146]

Number

[0147]

Number

[0148]

Number

[0149]

Number

[0150] Furthermore, when obtaining the second hidden vector based on the first hidden vector and the sample reactant vector, specifically, based on the following formula (10), the first hidden vector and the sample reactant vector are added and introduced into the Transformer layer, so as to obtain a new hidden vector, that is, the second hidden vector h L can be obtained.

[0151]

Number

[0152]

Number

[0153]

Number

[0154]

Number

[0155]

Number

[0156]

Number

[0157] Furthermore, when calculating the sample predicted reaction product adjacency matrix based on the sample predicted change probability, specifically, the sample predicted change amount of the adjacency matrix is calculated based on the sample predicted change probability, and the sample predicted reaction product adjacency matrix is calculated based on the sample predicted change amount of the adjacency matrix and the adjacency matrix of the sample reactants. Then, the cross-entropy loss is calculated based on the reaction product adjacency matrix of the sample reaction products and the sample predicted reaction product adjacency matrix, and thus the reconstruction loss value and the divergence loss value can be obtained.

[0158] Note that each numerical value in the adjacency matrix according to this embodiment is not only 0 or 1 (0 indicates no connection between the corresponding atom pairs, and 1 indicates a connection between the corresponding atom pairs), but also one of the four numerical values 0, 1, 2, and 3, representing no connection, connection by a single bond, connection by a double bond, and connection by a triple bond, respectively. The connection by an aromatic bond is represented by 1, and the atoms to be connected are denoted as aromatic atoms so as to be distinguished from the connection by a single bond.

[0159] Optionally, based on the embodiment corresponding to FIG. 10 described above, in another alternative embodiment of the method for training the reaction product prediction model according to the embodiment of the present application, as shown in FIG. 11, the step S1004 of specifying the sample predicted reaction product adjacency matrix based on the sample predicted change probability includes the following steps.

[0160] In step S1101, the sample predicted change amount of the adjacency matrix is calculated based on the sample predicted change probability.

[0161] In step S1102, the sample predicted reaction product adjacency matrix is calculated based on the sample predicted change amount of the adjacency matrix and the adjacency matrix of the sample reactants.

[0162] Specifically, after obtaining the sample predicted change probability, the following formula (13) is used to calculate the sample predicted change amount of the adjacency matrix based on the sample predicted change probability, that is, the probability matrix of the electron increase between each pair of atoms

[0163]

Mathematics

[0164]

Mathematics

[0165]

Mathematics

[0166]

Mathematics

[0167] Furthermore, using the following formula (14), based on the predicted sample change amount of the adjacency matrix and the adjacency matrix of the sample reactant, calculate the predicted sample reaction product adjacency matrix.

[0168]

Mathematics

[0169]

Mathematics

[0170]

Mathematics

[0171] Furthermore, since the adjacency matrix must be symmetric, the predicted sample reaction product adjacency matrix can be symmetrized using the following formula (15).

[0172]

Number

[0173] In step S1201, parameter adjustment is performed on the first auxiliary network based on the reaction prediction loss value to obtain a first sub-model.

[0174] In step S1202, parameter adjustment is performed on the second auxiliary network based on the reaction relationship prediction loss value to obtain a second sub-model.

[0175] In step S1203, parameter adjustment is performed on the third auxiliary network based on the atom prediction loss value to obtain a third sub-model.

[0176] In step S1204, the first sub-model, the second sub-model, and the third sub-model are transitioned to a reaction product prediction model to obtain a target reaction product prediction model.

[0177] Specifically, this embodiment further adopts a pre-training strategy to pre-train a first auxiliary network, a second auxiliary network, and a third auxiliary network based on a reaction prediction loss value, a reaction relationship prediction loss value, and an atom prediction loss value respectively. That is, by adjusting the parameters of the first auxiliary network based on the reaction prediction loss value, a first sub-model is obtained; by adjusting the parameters of the second auxiliary network based on the reaction relationship prediction loss value, a second sub-model is obtained; and by adjusting the parameters of the third auxiliary network based on the atom prediction loss value, a third sub-model is obtained. Then, the first sub-model, the second sub-model, and the third sub-model are transitioned to a reaction product prediction model. Specifically, the backbone networks of the first sub-model, the second sub-model, and the third sub-model are transitioned to the reaction product prediction model. Then, after the layer that outputs the embedding from the backbone network, a decoder network layer for predicting the reaction product is arranged, and thus a target reaction product prediction model can also be obtained.

[0178] In this way, based on the pre-training strategy, the first auxiliary network, the second auxiliary network, and the third auxiliary network are pre-trained respectively, and by transitioning the trained first auxiliary network, second auxiliary network, and third auxiliary network to the reaction product prediction model, the training efficiency of the reaction product prediction model can be effectively improved, and it also contributes to the performance improvement of this reaction product prediction model.

[0179] Next, a method for applying the reaction product prediction model according to this application will be described. This method can be executed by a computer device, and this computer device can be a server or a terminal device. Referring to FIG. 13, an embodiment of the method for applying the reaction product prediction model according to the embodiment of this application includes the following steps.

[0180] In step S1301, the reactants to be measured are input into the target reaction product prediction model, and the predicted change probability of the adjacency matrix is output from the target reaction product prediction model.

[0181] In step S1302, based on the predicted change probability of the adjacency matrix, the predicted change amount of the adjacency matrix is specified.

[0182] In step S1303, based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured, the target reaction product is specified.

[0183] In this embodiment, after obtaining the reactants to be measured, the reactants to be measured are input into the target reaction product prediction model, and the predicted change probability of the adjacency matrix is output from the target reaction product prediction model. Based on the predicted change probability of the adjacency matrix, the predicted change amount of the adjacency matrix can be calculated. Then, based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured, the target reaction product can be specified. The obtained target reaction product can be applied to scenes such as scientific pharmaceutical manufacturing and drug verification.

[0184] As an effective verification tool for drug retrosynthesis, the target reaction product prediction model can improve the research efficiency of new drug synthesis routes. The target reaction product prediction model can reveal some underlying scientific laws and provide new scientific knowledge. The target reaction product prediction model can provide more accurate predictions than experts. Even when none of the existing templates can be used, candidate products can be reliably predicted, and new reactions can be predicted. Therefore, it should be understood that it can greatly improve the development efficiency of new drugs, etc.

[0185] Specifically, the reactants to be measured are input into the target reaction product prediction model, and the predicted change probability of the adjacency matrix is output from the target reaction product prediction model, that is, the probability matrix of electron increase between each pair of atoms

[0186]

Number

[0187]

Number

[0188]

Number

[0189] As an option, based on the embodiment corresponding to FIG. 13 described above, in another alternative embodiment of the method for applying the reaction product prediction model according to the embodiment of the present application, as shown in FIG. 14, the step S1303 of identifying the target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured includes the following steps.

[0190] In step S1401, based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured, a predicted reaction product adjacency matrix is calculated.

[0191] In step S1402, a symmetrization process is performed on the predicted reaction product adjacency matrix to obtain a target reaction product adjacency matrix.

[0192] In step S1403, based on the target reaction product adjacency matrix, the target reaction product is identified.

[0193] Specifically, using the aforementioned formula (14), a predicted reaction product adjacency matrix can be calculated based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured. In the formula,

[0194]

Number

[0195]

Number

[0196] Furthermore, since the adjacency matrix must be symmetric, the predicted reaction product adjacency matrix can be symmetrized using the above-described formula (15) to obtain the target reaction product adjacency matrix. Then, based on the target reaction product adjacency matrix

[0197]

Number

[0198] Next, the training apparatus for the reaction product prediction model according to the present application will be described in detail. Referring to FIG. 17, FIG. 17 is a schematic diagram of an embodiment of the training apparatus for the reaction product prediction model according to an embodiment of the present application. The training apparatus 20 for the reaction product prediction model performs vector conversion on each reaction sequence in the sample reaction data set through the encoder network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector. Further, through the first auxiliary network, a positive sample reactant set and a negative sample reactant set are constructed according to the sample reactant vector, and through the second auxiliary network, a positive sample reaction group set and a negative sample reaction group set are constructed according to the sample reactant vector and the sample reaction product vector. An acquisition unit 201 configured to determine a predicted probability value and an atomic label of the presence of an atom in the sample reactant in the main product according to the sample reactant vector and the sample reaction product vector, where the sample reaction data set includes a plurality of reaction sequences, and each reaction sequence includes a sample reactant and a sample reaction product, the acquisition unit 201, and a processing unit 202 configured to determine a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set, determine a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set, and further determine an atom prediction loss value based on the predicted probability value and the atomic label; A specific unit 203 configured to train a reaction product prediction model based on a reaction prediction loss value, a reaction relationship prediction loss value, and an atom prediction loss value to obtain a target reaction product prediction model.

[0199] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training device for the reaction product prediction model according to the embodiment of the present application, The processing unit 202 is further configured to perform data augmentation processing on the sample reaction data set to obtain a sample composite reaction data set. The processing unit 202 is further configured to aggregate the sample reaction data set and the sample composite reaction data set as an extended sample reaction data set. Specifically, the acquisition unit 201 is configured to perform vector conversion on each reaction sequence in the extended sample reaction data set through the encoder network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector.

[0200] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training device for the reaction product prediction model according to the embodiment of the present application, the acquisition unit 201 specifically Samples the sample reactant vectors corresponding to any two sample reactants from the same reaction sequence as a positive sample reactant combination, and is configured to add the positive sample reactant combination to the positive sample reactant set. Samples the sample reactant vectors corresponding to any two sample reactants from different reaction sequences as a negative sample reactant combination, and is configured to add the negative sample reactant combination to the negative sample reactant set.

[0201] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training device for the reaction product prediction model according to the embodiment of the present application, the acquisition unit 201 specifically All corresponding sample reactant vectors and sample reaction product vectors of all reaction arrays are configured to form a positive sample reaction group set, The corresponding sample reactant vectors and sample reaction product vectors of different reaction arrays are combined to obtain a negative sample reaction group set.

[0202] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training device for the reaction product prediction model according to the embodiment of the present application, the acquisition unit 201 specifically Predict the sample reactants through a third auxiliary network to obtain the predicted probability value of the atoms in the sample reactants existing in the main product, Based on the sample reactant vector and the sample reaction product vector, compare the atoms in the sample reactant and the sample product to obtain an atomic comparison result. Based on the atomic comparison result, it is configured to identify atomic labels.

[0203] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training device for the reaction product prediction model according to the embodiment of the present application, the acquisition unit 201 specifically For each reaction array, the information inside each molecule of the sample reactants therein is interacted between atoms to obtain sample reactant interaction information. Based on the sample reactant interaction information, different sample reactants are interacted to obtain a sample reactant vector. For each reaction array, the information inside each molecule of the sample reaction products therein is interacted between atoms to obtain sample reaction product interaction information. Based on the sample reaction product interaction information, different sample reaction products are interacted to obtain a sample reaction product vector.

[0204] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training apparatus for the reaction product prediction model according to the embodiment of the present application, the processing unit 202 is specifically configured to, randomly select two reaction arrays from the sample reaction data set, combine the sample reactants in the two selected reaction arrays to obtain a sample composite reactant, combine the sample reaction products in the two selected reaction arrays to obtain a sample composite reaction product, obtain a composite reaction array based on the sample composite reactant and the sample composite reaction product, and construct a sample composite reaction data set based on the composite reaction array.

[0205] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training apparatus for the reaction product prediction model according to the embodiment of the present application, the specific unit 203 is specifically configured to, obtain a reconstruction loss value and a divergence loss value, train a reaction product prediction model based on the reconstruction loss value, the divergence loss value, the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value to obtain a target reaction product prediction model.

[0206] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training apparatus for the reaction product prediction model according to the embodiment of the present application, the specific unit 203 is specifically configured to, process the sample reactant vector and the sample reaction product vector using an attention mechanism to obtain a first hidden vector, obtain a second hidden vector based on the first hidden vector and the sample reactant vector, specify the sample prediction change probability of the adjacency matrix according to the second hidden vector through the decoder network of the reaction product prediction model, specify a sample predicted reaction product adjacency matrix based on the sample prediction change probability, Based on the reaction product adjacency matrix of the sample reaction product and the sample predicted reaction product adjacency matrix, a loss is calculated to obtain a reconstruction loss value and a divergence loss value.

[0207] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training device for the reaction product prediction model according to the embodiment of the present application, the specific unit 203 is specifically configured to calculate the sample prediction change amount of the adjacency matrix based on the sample prediction change probability, configured to calculate the sample predicted reaction product adjacency matrix based on the sample prediction change amount of the adjacency matrix and the adjacency matrix of the sample reactants.

[0208] Optionally, based on the embodiment corresponding to FIG. 17 described above, in another embodiment of the training device for the reaction product prediction model according to the embodiment of the present application, the specific unit 203 is specifically configured to adjust the parameters of the first auxiliary network based on the reaction prediction loss value to obtain the first sub-model, configured to adjust the parameters of the second auxiliary network based on the reaction relationship prediction loss value to obtain the second sub-model, configured to adjust the parameters of the third auxiliary network based on the atom prediction loss value to obtain the third sub-model, configured to transition the first sub-model, the second sub-model and the third sub-model to the reaction product prediction model to obtain the target reaction product prediction model.

[0209] Next, the application device of the reaction product prediction model in the present application will be described in detail. Referring to FIG. 18, FIG. 18 is a schematic diagram of an embodiment of the application device of the reaction product prediction model according to the embodiment of the present application. The application device 30 of the reaction product prediction model includes the following units: An acquisition unit 301 configured to input reactants to be measured into a target reaction product prediction model and output a predicted change probability of an adjacency matrix from the target reaction product prediction model, where the target reaction product prediction model here is trained by the reaction product prediction model training device shown in FIG. 17, the acquisition unit 301, A processing unit 302 configured to identify a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix, And a specifying unit 303 configured to specify a target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured.

[0210] Optionally, based on the embodiment corresponding to FIG. 18 described above, in another embodiment of the reaction product prediction model application device according to the embodiment of the present application, the specifying unit 303 is specifically Configured to calculate a predicted reaction product adjacency matrix based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured, Perform a symmetrization process on the predicted reaction product adjacency matrix to obtain a target reaction product adjacency matrix, And configured to specify a target reaction product based on the target reaction product adjacency matrix.

[0211] According to another aspect of the present application, a schematic diagram of another computer device is provided. As shown in FIG. 19, FIG. 19 is a schematic configuration diagram of a computer device according to an embodiment of the present application. This computer device 300 can have relatively large differences due to different configurations or performances, and can include one or more central processing units (CPUs) 310 (for example, one or more processors), a memory 320, and one or more storage media 330 (for example, one or more mass storage devices) for storing application programs 331 or data 332. Here, the memory 320 and the storage media 330 may be temporary storage or persistent storage. The program stored in the storage media 330 can include one or more modules (not shown) including a series of instruction operations in the computer device 300. Further, the central processing unit 310 is arranged to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the computer device 300.

[0212] The computer device 300 can also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 333 such as Windows Server TM , Mac OS X TM , Unix TM , Linux (registered trademark) TM , FreeBSD TM and the like.

[0213] The computer device 300 described above can also be used to execute the steps in the corresponding embodiments of FIGS. 2 to 13 and the steps in the corresponding embodiments of FIG. 14.

[0214] According to another aspect of the present application, there is provided a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the steps of the methods in the embodiments shown in FIGS. 2 to 13 and the steps of the method in the embodiment shown in FIG. 14 are realized.

[0215] According to another aspect of the present application, there is provided a computer program product including a computer program. When the computer program is executed by a processor, the steps of the methods in the embodiments shown in FIGS. 2 to 13 and the steps of the method in the embodiment shown in FIG. 14 are realized.

[0216] As can be clearly understood by those skilled in the art, for the convenience and brevity of the description, the specific operation processes of the systems, devices, and units described above may refer to the corresponding processes in the method embodiments described above. Here, further description is omitted.

[0217] In some embodiments according to the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are merely exemplary. For example, the division of the above units is only a logical function division, and may be in another division method when actually implemented. For example, a plurality of units or components may be combined or integrated into another system, some features may be ignored or not executed. Furthermore, the mutual coupling, or direct coupling, or communication connection shown or considered may be through some interfaces, and the indirect coupling or communication connection between devices or units may be in an electrical, mechanical, or other form.

[0218] The units described above as individual components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or may be distributed among multiple network units. Depending on the actual needs, some or all of these units can be selected to achieve the objectives of the technical approach of this embodiment.

[0219] Furthermore, each functional unit according to each embodiment of this application may be integrated into one processing unit, each unit may exist physically independently, or two or more units may be integrated into one unit. The integrated units described above may be realized in the form of hardware or in the form of software functional units.

[0220] When the integrated unit is realized in the form of a software functional unit and is sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the essence of the technical approach of this application, or the part that can contribute to the prior art, or all or part of this technical approach can be expressed in the form of a software product. This computer software product is stored in a storage medium and contains several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The storage media described above include various media that can store program codes, such as USB disks, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for training a reaction product prediction model executed by a computer device, comprising: Performing vector transformation on each reaction sequence in a sample reaction data set through an encoder network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector, wherein the sample reaction data set includes a plurality of the reaction sequences, and each reaction sequence includes a sample reactant and a sample reaction product; Constructing a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through a first auxiliary network; Identifying a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set; Constructing a positive sample reaction group set and a negative sample reaction group set according to the sample reactant vector and the sample reaction product vector through a second auxiliary network; Identifying a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set; Identifying a predicted probability value and an atomic label that atoms in the sample reactant are present in the main product according to the sample reactant vector and the sample reaction product vector through a third auxiliary network; Identifying an atomic prediction loss value based on the predicted probability value and the atomic label; Training the reaction product prediction model based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value to obtain a target reaction product prediction model. A method for training a reaction product prediction model.

2. Prior to the step of performing vector transformation on each reaction sequence in a sample reaction data set through an encoder network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector, the training method further includes: Performing data augmentation processing on the sample reaction data set to obtain a sample composite reaction data set; Aggregating the sample reaction data set and the sample composite reaction data set as an extended sample reaction data set. The step of performing vector transformation on each reaction array in the sample reaction data set through the encoder network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector is as follows: The training method according to claim 1, including the step of performing vector transformation on each reaction array in the extended sample reaction data set through the encoder network of the reaction product prediction model to obtain the sample reactant vector and the sample reaction product vector.

3. The step of constructing a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through the first auxiliary network is as follows: Sampling the sample reactant vectors corresponding to any two sample reactants from the same reaction array as a positive sample reactant combination, and adding the positive sample reactant combination to the positive sample reactant set; The training method according to claim 1 or 2, including sampling the sample reactant vectors corresponding to any two sample reactants from different reaction arrays as a negative sample reactant combination, and adding the negative sample reactant combination to the negative sample reactant set.

4. The step of constructing a positive sample reaction group set and a negative sample reaction group set according to the sample reactant vector and the sample reaction product vector through the second auxiliary network is as follows: Taking the sample reactant vectors and the sample reaction product vectors corresponding to all reaction arrays as the positive sample reaction group set; The training method according to claim 1 or 2, including combining the sample reactant vectors and the sample reaction product vectors corresponding to different reaction arrays to obtain the negative sample reaction group set.

5. The step of specifying the predicted probability value and atom label of the atoms in the sample reactant existing in the main product according to the sample reactant vector and the sample reaction product vector through the third auxiliary network is as follows: Predicting the sample reactant through the third auxiliary network to obtain the predicted probability value of the atoms in the sample reactant existing in the main product. Based on the sample reactant vector and the sample reaction product vector, comparing the atoms in the sample reactant and the sample product to obtain an atomic comparison result; Based on the atomic comparison result, identifying the atomic label, the training method according to claim 1 or 2.

6. For each reaction sequence in the sample reaction data set through the encoder network of the reaction product prediction model, performing vector conversion to obtain a sample reactant vector and a sample reaction product vector, the step is: For each reaction sequence, making the information inside each molecule of the sample reactant therein interact between atoms to obtain sample reactant interaction information; Based on the sample reactant interaction information, making the different sample reactants interact with each other to obtain the sample reactant vector; For each reaction sequence, making the information inside each molecule of the sample reaction product therein interact between atoms to obtain sample reaction product interaction information; Based on the sample reaction product interaction information, making the different sample reactants interact with each other to obtain the sample reaction product vector, the training method according to claim 1 or 2.

7. For the sample reaction data set, performing data augmentation processing to obtain a sample composite reaction data set, the step is: Randomly selecting two reaction sequences from the sample reaction data set; Combining the sample reactants in the two selected reaction sequences to obtain a sample composite reactant; Combining the sample reaction products in the two selected reaction sequences to obtain a sample composite reaction product; Based on the sample composite reactant and the sample composite reaction product, obtaining a composite reaction sequence, and constructing the sample composite reaction data set based on the composite reaction sequence, the training method according to claim 2.

8. Based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atomic prediction loss value, training the reaction product prediction model to obtain a target reaction product prediction model, the step is: Obtaining a reconstruction loss value and a divergence loss value; Training the reaction product prediction model based on the reconstruction loss value, the divergence loss value, the reaction prediction loss value, the reaction relationship prediction loss value, and the atom prediction loss value to obtain the target reaction product prediction model; and the training method according to claim 1 or 2.

9. The step of obtaining the reconstruction loss value and the divergence loss value includes: Processing the sample reactant vector and the sample reaction product vector using an attention mechanism to obtain a first hidden vector; Determining a second hidden vector based on the first hidden vector and the sample reactant vector; Identifying the sample prediction change probability of the adjacency matrix according to the second hidden vector through the decoder network of the reaction product prediction model; Identifying a sample predicted reaction product adjacency matrix based on the sample prediction change probability; Calculating a loss based on the reaction product adjacency matrix of the sample reaction product and the sample predicted reaction product adjacency matrix to obtain the reconstruction loss value and the divergence loss value; and the training method according to claim 8.

10. The step of identifying a sample predicted reaction product adjacency matrix based on the sample prediction change probability includes: Calculating the sample prediction change amount of the adjacency matrix based on the sample prediction change probability; Calculating the sample predicted reaction product adjacency matrix based on the sample prediction change amount of the adjacency matrix and the adjacency matrix of the sample reactant; and the training method according to claim 9.

11. The step of training the reaction product prediction model based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atom prediction loss value to obtain a target reaction product prediction model includes: Adjusting the parameters of the first auxiliary network based on the reaction prediction loss value to obtain a first sub-model; Adjusting the parameters of the second auxiliary network based on the reaction relationship prediction loss value to obtain a second sub-model; Adjusting the parameters of the third auxiliary network based on the atom prediction loss value to obtain a third sub-model; Transitioning the first sub-model, the second sub-model, and the third sub-model to the reaction product prediction model to obtain the target reaction product prediction model; and the training method according to claim 1 or 2, including this step.

12. A method for applying a reaction product prediction model executed by a computer device, comprising: Inputting the reactants to be measured into the target reaction product prediction model obtained by the training method according to claim 1 or 2, and outputting the predicted change probability of the adjacency matrix from the target reaction product prediction model; Identifying the predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix; Identifying the target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured; and a method for applying a reaction product prediction model, including this step.

13. The step of identifying the target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured includes: Calculating a predicted reaction product adjacency matrix based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured; Performing a symmetrization process on the predicted reaction product adjacency matrix to obtain a target reaction product adjacency matrix; Identifying the target reaction product based on the target reaction product adjacency matrix; and the application method according to claim 12, including this step.

14. A training device for a reaction product prediction model, comprising: Through the encoder network of the reaction product prediction model, perform vector conversion on each reaction sequence in the sample reaction data set to obtain a sample reactant vector and a sample reaction product vector. Further, through the first auxiliary network, construct a positive sample reactant set and a negative sample reactant set according to the sample reactant vector. Through the second auxiliary network, construct a positive sample reaction group set and a negative sample reaction group set according to the sample reactant vector and the sample reaction product vector. Through the third auxiliary network, it is configured to identify the predicted probability value and atomic label of the atoms in the sample reactants existing in the main product according to the sample reactant vector and the sample reaction product vector. An acquisition unit, wherein the sample reaction data set includes a plurality of the reaction sequences, and each reaction sequence includes a sample reactant and a sample reaction product. The acquisition unit and A processing unit configured to identify a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set, identify a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set, and further identify an atom prediction loss value based on the prediction probability value and the atom label; A specifying unit configured to train the reaction product prediction model based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atom prediction loss value to obtain a target reaction product prediction model, the training apparatus comprising the specifying unit.

15. An acquisition unit configured to input reactants to be measured into a target reaction product prediction model and output a predicted change probability of an adjacency matrix from the target reaction product prediction model; A processing unit configured to identify a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix; An identifying unit configured to identify a target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactants to be measured, the apparatus for applying a reaction product prediction model comprising the identifying unit.

16. A memory storing a computer program; A processor that, when the computer program is executed, realizes the training method according to claim 1 or 2; A computer device comprising a bus system for connecting the memory and the processor to enable communication between the memory and the processor.

17. A computer program that, when executed by a processor, realizes the training method according to claim 1 or 2.

Citation Information

Patent Citations

  • Deep learning-based inverse synthesis prediction method and device, medium and equipment

    CN114220496A

  • System and method for automated retrosynthesis

    US20220188657A1