Reaction product prediction model training method and apparatus, application method and apparatus, and device

Through the reaction product prediction model training method executed on computer equipment, the multi-layer network is used to automatically label data, which solves the high cost problem caused by manual label dependence in the existing technology and improves the accuracy and coverage of organic chemical reaction product prediction.

WO2024011983A9PCT designated stage expired Publication Date: 2024-09-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/089401
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-07-14
Filing Date
2023-04-20
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

In the existing technology, deep learning technology based on organic chemical reaction data relies on a large number of manual labels, which makes the task of predicting organic chemical reaction products expensive and difficult to cover emerging reaction types.

Method used

The reaction product prediction model training method executed by computer equipment uses the encoding network, the first auxiliary network, the second auxiliary network and the third auxiliary network to automatically label data from the sample reaction data set and construct positive and negative sample sets and atomic labels, Reduce costs and improve forecast accuracy.

Benefits of technology

It realizes automatic labeling of reaction product prediction models, reduces training costs, and improves prediction accuracy. It can predict reaction products without relying on manual labeling, and is suitable for emerging reaction types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023089401_12092024_PF_FP_ABST
    Figure CN2023089401_12092024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a reaction product prediction model training method and apparatus, an application method and apparatus, and a device. The related embodiments can be applied to scenes such as artificial intelligence, and are used for reducing the model training cost and improving the prediction precision. The method comprises: constructing a positive sample reactant set and a negative sample reactant set by means of a first auxiliary network, and calculating a reaction predicted loss value on the basis of 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 by means of a second auxiliary network, and calculating a reaction relationship predicted loss value on the basis of the positive sample reaction group set and the negative sample reaction group set; by means of a third auxiliary network, acquiring a predicted probability value of atoms in a sample reactant existing in a main product, and an atomic label; calculating an atom predicted loss value; and training a reaction product prediction model on the basis of the reaction predicted loss value, the reaction relationship predicted loss value and the atom predicted loss value to obtain a target reaction product prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Training method, application method, device and equipment for reaction product prediction model

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 14, 2022, with application number 2022108264623 and application name “Reaction product prediction model parameter adjustment method, application method, device and equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of artificial intelligence technology, and in particular to reaction product prediction technology. Background Art

[0003] The task of predicting organic chemical reaction products is of great significance to fields such as computational chemistry and pharmaceuticals.

[0004] Traditional organic chemistry reaction prediction methods rely on common reaction templates to predict possible product structures. However, given the vast variety of organic chemical reactions, and the continuous emergence of new reactions as chemical research becomes increasingly sophisticated, reaction templates struggle to cover all reaction types and are therefore unsuitable for emerging reactions. With the development of deep learning technology, using deep learning to learn underlying reaction patterns from organic chemical reaction data has become increasingly important.

[0005] However, the current deep learning technology based on organic chemical reaction data usually relies on a large amount of manual labels to train the reaction product prediction model. Manually labeled data is often very expensive, and as the amount of chemical reaction data increases, more manual annotations are often required to support it, which will consume a lot of manpower and time costs, resulting in high costs for organic chemical reaction product prediction tasks.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a training method, application method, device and equipment for a reaction product prediction model, which can realize automatic labeling of data in a sample reaction data set without relying on manual labeling, thereby reducing the cost of the reaction product prediction task and improving the prediction accuracy of the reaction product prediction model for the reaction product.

[0008] In one aspect, an embodiment of the present application provides a method for training a reaction product prediction model, which is executed by a computer device and includes:

[0009] Performing vector conversion on each reaction array in the sample reaction data set through an encoding 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 multiple reaction arrays, and each reaction array includes a sample reactant and a sample reaction product;

[0010] Constructing a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through the first auxiliary network;

[0011] Determining a reaction prediction loss value based on a positive sample reactant set and a negative sample reactant set;

[0012] 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;

[0013] Determining a reaction relationship prediction loss value based on a positive sample reaction group set and a negative sample reaction group set;

[0014] Determining, by a third auxiliary network, predicted probabilities and atomic labels of atoms in the sample reactants that exist in the main products based on the sample reactant vectors and the sample reaction product vectors;

[0015] Determine an atomic prediction loss value based on the prediction probability value and the atomic label;

[0016] The reaction product prediction model is trained based on 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.

[0017] Another aspect of the present application provides an application method of a reaction product prediction model, which is executed by a computer device and includes:

[0018] Inputting the reactant to be tested into the target reaction product prediction model, and outputting the predicted change probability of the adjacency matrix through the target reaction product prediction model;

[0019] Determining a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix;

[0020] The target reaction product is determined based on the predicted change in the adjacency matrix and the adjacency matrix of the reactant to be tested.

[0021] Another aspect of the present application provides a training device for a reaction product prediction model, comprising:

[0022] an acquisition unit configured to perform vector conversion on each reaction array in the sample reaction data set through an encoding 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 reaction arrays, each reaction array including a sample reactant and a sample reaction product;

[0023] The acquisition unit is further used to construct a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through the first auxiliary network;

[0024] a processing unit, configured to determine a reaction prediction loss value based on a positive sample reactant set and a negative sample reactant set;

[0025] an acquisition unit, configured to 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 a second auxiliary network;

[0026] The processing unit is further configured to determine a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set;

[0027] an acquisition unit, configured to determine, through a third auxiliary network, a predicted probability value of an atom in the sample reactant existing in the main product and an atom label based on the sample reactant vector and the sample reaction product vector;

[0028] The processing unit is further configured to determine an atom prediction loss value based on the prediction probability value and the atom label;

[0029] The determination unit is used 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.

[0030] On the other hand, the present application provides an application device of a reaction product prediction model, comprising:

[0031] An acquisition unit is used to input the reactant to be tested into the target reaction product prediction model, and output the predicted change probability of the adjacency matrix through the target reaction product prediction model;

[0032] a processing unit, configured to determine a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix;

[0033] The determination unit is used to determine the target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactant to be tested.

[0034] Another aspect of the present application provides a computer device, comprising: a memory, a processor, and a bus system;

[0035] Wherein, the memory is used to store programs;

[0036] The processor is used to implement the above-mentioned methods when executing the program in the memory;

[0037] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

[0038] Another aspect of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.

[0039] On the other hand, the present application provides a computer program product, including a computer program, which implements the above-mentioned methods when executed by a processor.

[0040] It can be seen from the above technical solutions that the embodiments of the present application have the following beneficial effects:

[0041] After obtaining the sample reactant vector and the sample reaction product vector, a positive sample reactant set and a negative sample reactant set are constructed through the first auxiliary network, and a reaction prediction loss value is determined based on the positive sample reactant set and the negative sample reactant set. Furthermore, a positive sample reaction group set and a negative sample reaction group set are constructed through the second auxiliary network, and a reaction relationship prediction loss value is determined based on the positive sample reaction group set and the negative sample reaction group set. Furthermore, a predicted probability value and an atomic label of the atoms in the sample reactants existing in the main product are obtained through the third auxiliary network, and an atom prediction loss value is determined based on the predicted probability value and the atomic label. Then, a reaction product prediction model can be trained 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. Through the above method, based on the first auxiliary network, the second auxiliary network and the third auxiliary network with self-supervision properties, the positive and negative sample sets and atomic labels are mined and constructed from the data characteristics of the sample reaction data set to realize automatic labeling of the data of the sample reaction data set without relying on manual labeling, thereby reducing the cost of the training task of the reaction product prediction model. In addition, the first auxiliary network can help the reaction product prediction model to better learn the distance relationship between the reactants, so that the reaction product prediction model has the ability to predict whether the reactants can react. The second auxiliary network can help the reaction product prediction model to better learn the distance relationship between the reactants and the products, so that the reaction product prediction model has the ability to predict the corresponding relationship between the reactants and the products. The third auxiliary network can help the reaction product prediction model to better learn the changes in the bond relationship between the atoms of the reactants during the reaction process, so that the reaction product prediction model has the ability to predict whether the atoms are still in the main product after the reaction. The auxiliary learning based on these auxiliary networks can improve the prediction accuracy of the reaction product prediction model for the reaction products. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] FIG1 is a schematic diagram of the architecture of a reaction data control system according to an embodiment of the present application;

[0043] FIG2 is a flow chart of an embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0044] FIG3 is a flow chart of another embodiment of the training method of the reaction product prediction model in the embodiment of the present application;

[0045] FIG4 is a flow chart of another embodiment of the method for training a reaction product prediction model in an embodiment of the present application;

[0046] FIG5 is a flow chart of another embodiment of the method for training a reaction product prediction model in an embodiment of the present application;

[0047] FIG6 is a flow chart of another embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0048] FIG7 is a flow chart of another embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0049] FIG8 is a flow chart of another embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0050] FIG9 is a flow chart of another embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0051] FIG10 is a flow chart of another embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0052] FIG11 is a flow chart of another embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0053] FIG12 is a flow chart of another embodiment of a method for training a reaction product prediction model in an embodiment of the present application;

[0054] FIG13 is a flow chart of an embodiment of a method for applying a reaction product prediction model in an embodiment of the present application;

[0055] FIG14 is a flow chart of another embodiment of the method for applying the reaction product prediction model in the embodiment of the present application;

[0056] FIG15 is a schematic diagram of an auxiliary network of the training method of the reaction product prediction model in an embodiment of the present application;

[0057] FIG16 is a schematic diagram of a reaction product prediction model principle framework of a reaction product prediction model training method in an embodiment of the present application;

[0058] FIG17 is a schematic diagram of an embodiment of a training device for a reaction product prediction model in an embodiment of the present application;

[0059] FIG18 is a schematic diagram of an embodiment of an application device of a reaction product prediction model in an embodiment of the present application;

[0060] FIG19 is a schematic diagram of an embodiment of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0061] To facilitate understanding, some terms or concepts involved in the embodiments of this application are first explained.

[0062] 1. Transformer

[0063] The converter consists of an encoder and a decoder. It can use the self-attention mechanism and does not adopt the sequential structure of recurrent neural networks (RNN) and long short-term memory networks (LSTM). This allows the model to be trained in parallel and has global information.

[0064] 2. Contrastive Learning

[0065] Contrastive learning is a self-supervised learning method used to learn general characteristics of a dataset without labels by having the model learn which data points are similar or different.

[0066] 3. Graph Neural Networks

[0067] Graph neural networks include graph convolutional networks, graph attention networks, graph auto-encoders, graph generative networks, and graph spatial-temporal networks. Compared with the most basic network structure of neural networks, the fully connected layer (MLP), which multiplies the feature matrix by the weight matrix, graph neural networks have an additional adjacency matrix.

[0068] 4. Auxiliary Task

[0069] Auxiliary tasks are an important method used in reinforcement learning to help the main task learn. During the learning of the main task, due to the sparseness of rewards and the difficulty of the task, auxiliary tasks can be used to help learn feature representations.

[0070] It is understandable that in the specific implementation of this application, related data such as sample reaction data sets are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0071] It should be understood that the training method and application method of the reaction product prediction model provided in this application can be applied to various scenarios, including but not limited to artificial intelligence, cloud technology, computational chemistry, pharmaceuticals, etc., and can be used to optimize the reaction product prediction task by training a powerful reaction product prediction model, so as to be applied to scenarios such as drug retrosynthesis verification, scientific law mining, pharmaceutical research and development, etc.

[0072] The training method of the reaction product prediction model proposed in the present application can be applied to the reaction data control system shown in Figure 1. Please refer to Figure 1. Figure 1 is an architectural schematic diagram of the reaction data control system in an embodiment of the present application. As shown in Figure 1, the server obtains a sample reactant vector and a sample reaction product vector based on the sample reaction data set provided by the terminal device, and constructs a positive sample reactant set and a negative sample reactant set through the first auxiliary network, and determines the reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set. In addition, a positive sample reaction group set and a negative sample reaction group set are constructed through the second auxiliary network, and a reaction relationship prediction loss value is determined based on the positive sample reaction group set and the negative sample reaction group set. In addition, the predicted probability value and atomic label of the atoms in the sample reactants existing in the main product are obtained through the third auxiliary network, and the atom prediction loss value is determined based on the predicted probability value and the atomic label. Then, the reaction product prediction model can be trained based on 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. Through the above method, based on the first auxiliary network, the second auxiliary network and the third auxiliary network with self-supervision properties, positive and negative sample sets and atomic labels can be mined and constructed from the data characteristics of the sample reaction data set to achieve automatic labeling of the data of the sample reaction data set without relying on manual labeling, thereby reducing the cost of the training task of the reaction product prediction model. Among them, the first auxiliary network can help the reaction product prediction model to better learn the distance relationship between reactants, so that the reaction product prediction model has the ability to predict whether the reactants can react. The second auxiliary network can help the reaction product prediction model to better learn the distance relationship between reactants and products, so that the reaction product prediction model has the ability to predict the corresponding relationship between reactants and products. The third auxiliary network can help the reaction product prediction model to better learn the changes in the bond relationship between atoms in the reactants during the reaction process, so that the reaction product prediction model has the ability to predict whether the atom exists in the main product after the reaction. The auxiliary learning based on these auxiliary networks can improve the prediction accuracy of the reaction product prediction model for the reaction product.

[0073] It is understandable that Figure 1 shows only one type of terminal device. In actual scenarios, more types of terminal devices may participate in the data processing process. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, car terminals, etc. The specific number and type depend on the actual scenario and are not limited here. In addition, Figure 1 shows only one server, but in actual scenarios, multiple servers may also participate, especially in the scenario of multi-model training interaction. The number of servers depends on the actual scenario and is not limited here.

[0074] In this embodiment, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication. Terminal devices and servers can be connected to form a blockchain network, which is not limited in this application.

[0075] In combination with the above introduction, the training method of the reaction product prediction model in the present application will be introduced below. The method can be executed by a computer device, which can be a server or a terminal device. Please refer to Figure 2. An embodiment of the training method of the reaction product prediction model in the embodiment of the present application includes:

[0076] In step S101, each reaction array in the sample reaction data set is vector-converted by the encoding network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector. The sample reaction data set includes multiple reaction arrays, and each reaction array includes a sample reactant and a sample reaction product.

[0077] It can be understood that the sample reaction data set includes multiple reaction arrays, each of which can be expressed as (G r ,G p ), each reaction array is used to represent an organic chemical reaction data R1+R2+…→P1+P2+…, G r Represents a series of sample reactants, G p Represents a series of products, i.e., sample reaction products.

[0078] In the molecular graph G = (V, E), V represents the set of atoms, whose size is the number of atoms |V| = N. Each atom v∈V is associated with an atomic characteristic, including atomic type, charge, aromaticity, and so on. E represents the set of edges, each of which is associated with a bond type, including single, double, triple, and aromatic bonds. The goal of organic chemical reaction prediction is to predict the products given the reactants.

[0079] Furthermore, due to the atom-mapping principle in organic chemical reactions, the atoms in the reactants and the atoms in the products correspond one to one, so the changes before and after the reaction are mainly the changes in the connections between the atoms, that is, the changes in the adjacency matrix A, and the atoms involved have not changed. Therefore, to predict the product (i.e., the reaction product), it is only necessary to predict its corresponding adjacency matrix to restore the structure of the entire product. The adjacency matrix used in this embodiment is different from the ordinary adjacency matrix. And since it is easier to predict the change in the adjacency matrix A, i.e., ΔA, than to directly predict the A of the product, this embodiment can transform the organic chemical reaction product prediction problem into a modeling probability distribution P(ΔA|G r ).

[0080] In order to better model the probability distribution P(ΔA|G r ), first obtain a sample reaction data set, and input the sample reaction data set into a reaction product prediction model, and perform vector conversion on each reaction array in the sample reaction data set through the encoding network of the reaction product prediction model to obtain the sample reactant vector and the sample reaction product vector corresponding to each reaction array, that is, the sample reactant vector corresponding to the sample reactant in each reaction array and the sample reaction product vector corresponding to the sample reaction product.

[0081] The reaction product prediction model can be specifically expressed as a VAE architecture that satisfies the conservation of electron transfer as shown in FIG16 , or can be expressed as other models, such as a flow-based model, maximum likelihood training, deep VAE, etc., which are not specifically limited here.

[0082] Furthermore, if the reaction product prediction model uses a VAE architecture that satisfies the conservation of electron transfer as shown in FIG16 , each reaction array in the sample reaction data set can be vectorized through the graph neural network GNN and transformer as shown in FIG16 to obtain a sample reactant vector and a sample reaction product vector.

[0083] 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;

[0084] In this embodiment, since the prediction of reaction products in the modeling process assumes that a given reactant can definitely react, but in actual scenarios, not all reactants will react, therefore, a correct reaction product prediction model should have the ability to distinguish whether the reactant can react. Since in the embedding space, molecules that cannot react should be far apart, and molecules that can react should be close to each other, this embodiment constructs an auxiliary task for predicting whether the reactant can react, namely the first auxiliary network, to construct a set of positive sample reactants and a set of negative sample reactants to help the reaction product prediction model learn the distance between molecules, thereby learning the ability to distinguish whether the reactant can react, thereby enhancing the generalization ability of the molecular representation. Thus, after obtaining the sample reactant vector, the sample reactant vector is input into the first auxiliary network, and the positive sample reactant set and the negative sample reactant set are obtained through the first auxiliary network.

[0085] Specifically, the sample reactant vector is input into the task Task1 (the first auxiliary network) as shown in FIG15 , and the sample reactant vector is input into the task Task1 (the first auxiliary network) as shown in FIG15 . 11 +R 12 +R 13 →P 11 The sample reactant vector corresponding to any two sample reactants is sampled as the positive sample reactant combination, such as R 11 +R 12 、R 11 +R 13 and R 12 +R 13 Etc., so that the positive sample reactant combination can be added to the positive sample reactant set positive;

[0086] Furthermore, different reaction groups such as R 11 +R 12 +R 13 →P 11 and R 21 +R 22 +R 23 →P 21 The sample reactant vector corresponding to any two sample reactants is sampled as a negative sample reactant combination, such as R 11 +R 22 、R 12 +R 23 and R 21 +R 13Etc., thereby adding the negative sample reactant combination to the negative sample reactant set negative.

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

[0088] In this embodiment, the reaction prediction loss value is used to represent the ability of the reaction product prediction model to distinguish whether the reactants can react, that is, the reaction prediction loss value is data used to represent the prediction accuracy of the reaction product prediction model for the possibility of reaction occurrence. The possibility of reaction occurrence refers to whether the reactants input into the reaction product prediction model can react.

[0089] 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):

[0090] Among them, D pos represents the positive sample reactant set, D neg represents the negative sample reactant set, (i, j) is used to represent the positive sample reactant combination or negative sample reactant combination sampled from the corresponding sample reactant set, ε and γ are two margin hyperparameters, h i and h j are the sample reactant vector embeddings of sample reactants i and j respectively. It can be understood that the first term of the above loss function formula (1) can be used to reduce the embedding distance between positive sample molecules, and the second term can be used to increase the embedding distance between negative sample molecules.

[0091] In step S104, 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 through the second auxiliary network;

[0092] In this embodiment, since the ranking of candidate products is important information that allows the reaction product prediction model to receive probability scores for different candidate products, this embodiment constructs an auxiliary task for predicting whether reactants and products are correctly matched, namely a second auxiliary network, to help the reaction product prediction model learn the relationship between reactants and reaction products, thereby learning the ability to distinguish whether reactants and reaction products are correctly matched, thereby enhancing the generalization ability of molecular representation. Therefore, 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 the second auxiliary network is used to construct a set of positive sample reaction groups and a set of negative sample reaction groups.

[0093] Specifically, the sample reactant vector and the sample reaction product vector are input into the task Task2 (the second auxiliary network) as shown in FIG15 , and the sample reactant vector and the sample reaction product vector corresponding to all reaction arrays are input into the task Task2 (the second auxiliary network) as shown in FIG15 . For example, the sample reactant vector and the sample reaction product vector corresponding to a group of reaction arrays R 11 +R 12 +R 13 →P 11 , reactant R 11 +R 12 +R 13 With the reaction product P 11 If the correspondence is correct, it can be used as the positive sample reaction group set.

[0094] Furthermore, a negative sample reaction group set can be constructed by mismatching reactants and reaction products, so that the matching scores between reactants and reaction products with incorrect correspondences are lower. For example, in a set of reaction groups, R 11 +R 12 +R 13 →P 11 , reactant R 11 +R 12 +R 13 With the reaction product P 11 Is the correct correspondence, and another set of reaction arrays R 21 +R 22 +R 23 →P 21 , reactant R 21 +R 22 +R 23 With the reaction product P 21 This is the correct correspondence. By mismatching the reactants and reaction products, we can get R 11 +R 12 +R 13 →P 21 and R 21 +R 22 +R 23 →P 11 A set of negative sample reaction groups with incorrect correspondence between reactants and reaction products.

[0095] 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;

[0096] In this embodiment, the reaction relationship prediction loss value is used to indicate the ability of the reaction product prediction model to distinguish whether the reactants and reaction products are in a correct corresponding relationship, that is, the reaction relationship prediction loss value is data used to indicate the prediction accuracy of the reaction product prediction model for the reaction relationship, and the reaction relationship refers to the corresponding relationship between the reactants and the reaction products. It should be noted that the reaction relationship prediction loss value here and the reaction prediction loss value mentioned in step 103 above are two parallel loss values, both of which can be used to train the reaction product prediction model in subsequent steps, but there is no necessary connection between the two, and the information represented by the two is different. The reaction prediction loss value is used to indicate the ability of the reaction product prediction model to identify whether a reaction can occur between the reactants, and the reaction relationship prediction loss value is used to indicate the ability of the reaction product prediction model to identify whether there is a correct corresponding relationship between the reactants and the reaction products.

[0097] Specifically, after obtaining the positive sample reaction group set and the negative sample reaction group set, the following loss function formula (2) can be used to calculate the reaction relationship prediction loss value:

[0098] Among them, G θ is the reactant network, is the reaction product network, G θ and They have the same architecture but different parameters, and both networks satisfy permutation invariance. r is the eigenvector embedding corresponding to the reactant atom, h p is the feature vector embedding corresponding to the reaction product atom, and ε and γ are two margin hyperparameters. The first term of this loss function is used to bring the sample reactant vectors and sample reaction product vectors closer together within the same reaction array, i.e., the positive sample reaction set. The second term pushes the sample reactant vectors and sample reaction product vectors further apart within the mismatched reaction array, i.e., the negative sample reaction set. It is understood that since model training can be an online construction task, the sample size of the objective function can be set to B.

[0099] In step S106, the third auxiliary network is used to determine the predicted probability value and the atomic label of the atom in the sample reactant in the main product according to the sample reactant vector and the sample reaction product vector;

[0100] In this embodiment, because reaction data in massive datasets, such as the publicly available USPTO-480K dataset, often overlooks byproducts, which can easily increase prediction errors for reaction products, this embodiment can add a third auxiliary network to the modeling process to predict whether atoms are in the main product. This can, to a certain extent, supplement information about some byproducts, thereby improving the prediction ability of reaction products. 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 third auxiliary network, which determines the predicted probability value and atom label of the atoms in the sample reactant in the main product.

[0101] Specifically, the sample reactant vector and the sample reaction product vector are input into the task Task3, i.e., the third auxiliary network, as shown in FIG15 . The sample reactant is predicted by the third auxiliary network to obtain the predicted probability value of the atoms in the sample reactant existing in the main product. At the same time, 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 the atomic comparison result, and the atomic label is determined based on the atomic comparison result.

[0102] In step S107, the atomic prediction loss value is determined based on the prediction probability value and the atomic label;

[0103] In this embodiment, the atom prediction loss value is used to indicate the ability of the reaction product prediction model to distinguish whether an atom is still in the main product after the reaction.

[0104] Specifically, after obtaining the predicted probability value and atomic label, the atomic prediction loss value can be calculated using the following loss function formula (3):

[0105] Among them, y j ∈{0,1} represents the atomic label of atom j, indicating whether the atom is in the main product after the reaction. j ∈[0,1] represents the predicted probability value of the model based on the atom embedding.

[0106] In step S108 , the reaction product prediction model is trained 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.

[0107] Specifically, when the reaction prediction loss value, reaction relationship prediction loss value and atom prediction loss value are obtained, on the one hand, a multi-task learning training method can be adopted to directly add the objective functions such as the reaction prediction loss value, reaction relationship prediction loss value and atom prediction loss value into the total objective function in a weighted manner. Then, the parameters of the reaction product prediction model are adjusted based on the total objective function value. Specifically, the parameter adjustment can be performed by the iterative method of back propagation, and other methods can also be used, which are not specifically limited here, to obtain the target reaction product prediction model.

[0108] On the other hand, this embodiment can also adopt a pre-training strategy to pre-train the first auxiliary network, the second auxiliary network, and the third auxiliary network based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atom prediction loss value, respectively, and then migrate the pre-trained network to the reaction product prediction model to obtain the target reaction product prediction model.

[0109] In an embodiment of the present application, a training method for a reaction product prediction model is provided. Through the above-mentioned method, based on the first auxiliary network, the second auxiliary network and the third auxiliary network with self-supervision properties, positive and negative sample sets and atomic labels can be mined and constructed from the data characteristics of the sample reaction data set to achieve automatic labeling of the data of the sample reaction data set without relying on manual labeling, thereby reducing the cost of the training task of the reaction product prediction model. Among them, the first auxiliary network can help 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 the reactants can react. The second auxiliary network can help 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 corresponding relationship between reactants and products. The third auxiliary network can help the reaction product prediction model better learn the changes in the bond relationship between the atoms of the reactants during the reaction process, so that the reaction product prediction model has the ability to predict whether the atom exists in the main product after the reaction. The auxiliary learning based on these auxiliary networks can improve the prediction accuracy of the reaction product prediction model for the reaction product. The target reaction product prediction model trained in this way can serve as an effective verification tool for drug retrosynthesis, improving the research efficiency of new drug synthesis pathways. In addition, the target reaction product prediction model can also predict reliable candidate products when no known templates can be used, and can predict new reactions, thereby greatly improving the research and development efficiency of new drugs.

[0110] Optionally, based on the embodiment corresponding to FIG. 2 above, in another optional embodiment of the training method of the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 3 , before step S101 performs vector conversion on each reaction array in the sample reaction data set through the encoding network of the reaction product prediction model to obtain the sample reactant vector and the sample reaction product vector, the method further includes: steps S301 to S302; step S101 includes: step S303;

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

[0112] In step S302, the sample reaction data set and the sample composite reaction data set are aggregated into an extended sample reaction data set;

[0113] In step S303, each reaction array in the extended sample reaction data set is vector-converted by the encoding network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector.

[0114] In this embodiment, although the general reaction product prediction model can predict simple chemical reactions such as one reactant or two or three reactants, it is difficult to predict more reactants or complex chemical reactions. Based on this, this embodiment performs data augmentation on the sample reaction data set during the modeling process to obtain a sample composite reaction data set, and aggregates the sample reaction data set and the sample composite reaction data set into an extended sample reaction data set. Then, the extended sample reaction data set is input into the reaction product prediction model, and each reaction array in the extended sample reaction data set is vector-converted through the encoding network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector. This not only expands the sample reaction data set, but also enhances the complexity of the sample reaction data set to a certain extent, so as to help the reaction product prediction model learn the ability to predict complex chemical reactions, thereby improving the accuracy of predicting reaction products to a certain extent.

[0115] Specifically, as shown in Task 4 in FIG15 , data augmentation processing is performed on the sample reaction data set. Specifically, two reaction arrays can be randomly selected from the sample reaction data set, and the sample reactants in the two selected reaction arrays are combined to obtain sample composite reactants. The sample reaction products in the two selected reaction arrays are combined to obtain sample composite reaction products. Then, based on the sample composite reactants and the sample composite reaction products, a composite reaction array is obtained. The sample composite reaction data set is constructed based on the composite reaction array. Other augmentation methods can also be used, which are not specifically limited here. For example, R in a set of reaction arrays is combined. 11 +R 12 +R 13 →P 11 The reactant R 11 +R 12 +R 13 and the reaction product P 11 , with another set of reaction arrays in R 21 +R 22 +R 23 →P 21 The reactant R 21 +R 22 +R 23 With the reaction product P 21 By combining, we can get a composite reaction array such as R 11 +R 12 +R 13 +R 21 +R 22 +R 23 →P 11 +P 21 .

[0116] Furthermore, the acquired sample reaction data set and the sample composite reaction data set are summarized into an extended sample reaction data set to facilitate the subsequent use of the extended sample reaction data set to train the reaction product prediction model, and help the reaction product prediction model learn the ability to predict complex chemical reactions, that is, the extended sample reaction data set is input into the reaction product prediction model, and each reaction array in the extended sample reaction data set is vector-converted through the encoding network of the reaction product prediction model to obtain the sample reactant vector and the sample reaction product vector, so that the reaction product prediction model can be subsequently trained based on the sample reactant vector and the sample reaction product vector in combination with the above-mentioned first auxiliary network, second auxiliary network and third auxiliary network.

[0117] Alternatively, based on the embodiment corresponding to FIG. 2 or FIG. 3 , in another optional embodiment of the training method for the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 4 , step S102 constructs a positive sample reactant set and a negative sample reactant set based on the sample reactant vectors through the first auxiliary network, including:

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

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

[0120] Specifically, since in the embedding space, molecules that cannot react should be far apart, and molecules that can react should be close to each other, after obtaining the sample reactant vector corresponding to each reaction array, according to the chemical reaction data, for example in, as well as etc. are used to represent sample reactants, as well as Etc. are used to represent sample reaction products, and reactant combination data are constructed by combining reactants in pairs.

[0121] Furthermore, as shown in FIG15 , for convenience of representation, this embodiment is given a batch of reaction data B and constructs two spaces, one of which is a positive sample space, i.e., a set of positive sample reactants, and the other is a negative sample space, i.e., a set of negative sample reactants. The sample reactant vector is input into the task Task1, i.e., the first auxiliary network, as shown in FIG15 , and the positive sample reactant set D is subjected to the task Task2. pos It is constructed based on the reaction data given in the chemical data B, that is, the sample reactant vectors corresponding to any two sample reactants are sampled from the same reaction array and combined. Assuming that each reaction has R reactants, then R(R-1) positive sample reactant combinations can be obtained. Negative sample reactant set D neg It can be obtained by combining two sample reactants from different reaction arrays, that is, sampling the sample reactant vectors corresponding to any two sample reactants from different reaction arrays and combining them.

[0122] For example, as shown in Figure 15, from the same reaction array such as R 11 +R 12 +R 13 →P 11The sample reactant vector corresponding to any two sample reactants is sampled as the positive sample reactant combination, such as R 11 +R 12 、R 11 +R 13 and R 12 +R 13 Etc., which can be summarized into the positive sample reactant set positive;

[0123] Furthermore, different reaction groups such as R 11 +R 12 +R 13 →P 11 and R 21 +R 22 +R 23 →P 21 Sampling any two sample reactant vectors in , as negative sample reactant combination, such as R 11 +R 22 、R 12 +R 23 and R 21 +R 13 Etc., and thus summarized into the negative sample reactant set negative.

[0124] In this way, by constructing the positive sample reactant set and the negative sample reactant set in the above manner, the first auxiliary network can better help the reaction product prediction model learn the distance relationship between the reactants, so that the reaction product prediction model can more accurately predict whether the reactants can react.

[0125] Alternatively, based on the embodiment corresponding to FIG. 2 or FIG. 3 , in another optional embodiment of the training method for the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 5 , step S104 constructs a positive sample reaction group set and a negative sample reaction group set based on the sample reactant vector and the sample reaction product vector through a second auxiliary network, including:

[0126] In step S501, the sample reactant vectors and sample reaction product vectors corresponding to all reaction arrays are taken as a positive sample reaction group set;

[0127] In step S502 , the sample reactant vectors and sample reaction product vectors corresponding to different reaction groups are matched to obtain a negative sample reaction group set.

[0128] Specifically, a batch of chemical reaction data B = {R1→P1, R2→P2, ...} can be given, and the combination of the given reactant R1 and the reaction product P1 in the batch can be used as the positive sample reaction group, i.e., R1→P1. Specifically, the chemical reaction data B can be used as the positive sample reaction group set. Specifically, the sample reactant vector and the sample reaction product vector are input into the task Task2, i.e., the second auxiliary network, as shown in FIG15 , and the sample reactant vector and the sample reaction product vector corresponding to all reaction arrays are obtained. For example, R1 in a reaction array 11 +R 12 +R 13 →P 11 , reactant R 11 +R 12 +R 13 With the reaction product P 11 If the correspondence is correct, it can be used as a positive sample reaction group in the positive sample reaction group set.

[0129] Furthermore, the negative sample reaction group set is constructed by mismatching the reactants and reaction products in the chemical reaction data B = {R1→P1, R2→P2, ...}, and mismatching the sample reactant vector and the sample reaction product vector to obtain the negative sample reaction group, so that the matching score between the reactants and reaction products with the wrong relationship is lower. For example, as shown in FIG15 , a set of reaction groups R 11 +R 12 +R 13 →P 11 , reactant R 11 +R 12 +R 13 With the reaction product P 11 Is the correct correspondence, and another set of reaction arrays R 21 +R 22 +R 23 →P 21 , reactant R 21 +R 22 +R 23 With the reaction product P 21 This is the correct correspondence. By mismatching the reactants and reaction products, we can get R 11 +R 12 +R 13 →P 21 and R 21 +R 22 +R 23 →P 11 Negative sample reaction groups with incorrect correspondence between reactants and reaction products.

[0130] In this way, by constructing a set of positive sample reaction groups and a set of negative sample reaction groups in the above manner, the second auxiliary network can better help the reaction product prediction model learn the distance relationship between reactants and products, so that the reaction product prediction model can more accurately predict the correspondence between reactants and products.

[0131] Alternatively, based on the embodiment corresponding to FIG. 2 or FIG. 3 , in another optional embodiment of the training method for the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 6 , step S106 determines, by a third auxiliary network, a predicted probability value and an atom label of an atom in the sample reactant present in the main product based on the sample reactant vector and the sample reaction product vector, including:

[0132] In step S601, the sample reactant is predicted by the third auxiliary network to obtain a predicted probability value of the atoms in the sample reactant existing in the main product;

[0133] In step S602, based on the sample reactant vector and the sample reaction product vector, atoms in the sample reactant and the sample product are aligned to obtain an atomic alignment result;

[0134] In step S603 , atom labels are determined based on the atom alignment results.

[0135] In this embodiment, since predicting whether an atom is in the main product and predicting the reaction center are two inequivalent tasks, wherein predicting the reaction center can only know which bonds will break, but cannot know which of the two atoms connected by the bond will appear in the by-product, the third auxiliary network used to predict whether an atom is in the main product can allow the reaction product prediction model to learn the relative importance of atoms in the reaction. Thus, the sample reactant can be predicted through the third auxiliary network to obtain the predicted probability value of the atom in the sample reactant existing in the main product. At the same time, 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 are compared to obtain the corresponding atomic comparison results. Then, the atomic labels can be determined based on the atomic comparison results.

[0136] Specifically, the sample reactants are predicted through the third auxiliary network to obtain the predicted probability value of the atoms in the sample reactants existing in the main product. Specifically, the task of predicting whether the atoms are in the main product can be regarded as known information and used as a masking matrix to cover the by-product information, so that the reaction product prediction model can only focus on the information of the main product. In fact, the masking matrix is ​​also the content that the reaction product prediction model should predict.

[0137] Furthermore, the ground-truth atomic label can be obtained by comparing the atoms in the sample reactant with the atoms in the sample product based on the sample reactant vector and the sample reaction product vector. Then, the atoms lost in the reactant compared with the reaction product can be marked as 0, while the atoms still in the reaction product can be marked as 1. Other labeling methods can also be used, which are not specifically limited here.

[0138] In this way, through the above method, the third auxiliary network can better help the reaction product prediction model learn the changes in the bond relationship between the atoms of the reactants during the reaction process, so that the reaction product prediction model can more accurately predict whether the atoms will exist in the main product after the reaction.

[0139] Alternatively, based on the embodiment corresponding to FIG. 2 or FIG. 3 , in another optional embodiment of the training method for the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 7 , step S101 performs vector conversion on each reaction array in the sample reaction data set through the encoding network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector, including:

[0140] In step S701, for each reaction array, information within each molecule of the sample reactant is interacted between atoms to obtain sample reactant interaction information;

[0141] In step S702, interactions are performed between different sample reactants based on the sample reactant interaction information to obtain a sample reactant vector;

[0142] In step S703, for each reaction array, information within each molecule of the sample reaction product is interacted between atoms to obtain sample reaction product interaction information;

[0143] In step S704 , interactions are performed between different sample reactants based on the sample reaction product interaction information to obtain a sample reaction product vector.

[0144] Specifically, when the reaction product prediction model uses the VAE architecture of electron transfer conservation as shown in Figure 16, the encoding network for vector conversion of each reaction array in the sample reaction data set in this embodiment can be composed of a graph neural network GNN and a transformer.

[0145] Among them, Transformer is composed of an encoding part encoder and a decoding part decoder. It can use the self-attention mechanism and does not adopt the sequential structure of the recurrent neural network RNN ​​and the long short-term memory network LSTM, so that the model can be trained in parallel and can have global information.

[0146] Among them, graph neural networks (GNNs) include graph convolutional networks, graph attention networks, graph autoencoders, graph generative networks, graph spatiotemporal networks, etc. Compared with the most basic network structure of neural networks, the fully connected layer (MLP), which multiplies the feature matrix by the weight matrix, the graph neural network has an additional adjacency matrix.

[0147] Therefore, the following formula (4) can be used to first use GNN to allow the information within each molecule to interact between atoms, that is, for each reaction array, the information within each molecule of the sample reactant is interacted between atoms to obtain the sample reactant interaction information. Then, the information is allowed to interact between different reactants through Transformer, that is, based on the sample reactant interaction information, different sample reactants interact to obtain the sample reactant vector: h R =Transformer(GNN(G R )) (4);

[0148] Among them, h R Used to represent the sample reactant vector, G R Used to represent sample reactants.

[0149] Similarly, the following formula (5) can be used to first use GNN to allow the information within each molecule to interact between atoms, that is, for each reaction array, the information within each molecule of the sample reaction product is interacted between atoms to obtain the sample reaction product interaction information. Then, the information is allowed to interact between different reaction products through Transformer, that is, based on the sample reaction product interaction information, different sample reaction products interact to obtain the sample reaction product vector: h P =Transformer(GNN(G P )) (5);

[0150] Among them, h P Used to represent the sample reaction product vector, G P Used to represent sample reaction products.

[0151] In this way, obtaining the sample reactant vector and the sample reaction product vector in the above manner can ensure that the obtained sample reactant vector and the sample reaction product vector can more accurately reflect the characteristics of the corresponding sample reactants and sample reaction products, thereby helping the subsequent first auxiliary network, the second auxiliary network and the third auxiliary network to better learn relevant capabilities based on the sample reactant vector and the sample reaction product vector, thereby improving the performance of the trained reaction product prediction model.

[0152] Optionally, based on the embodiment corresponding to FIG. 3 above, in another optional embodiment of the training method for the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 8 , step S301 performs data augmentation processing on the sample reaction data set to obtain a sample composite reaction data set, including:

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

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

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

[0156] In step S804 , a composite reaction array is obtained based on the sample composite reactants and the sample composite reaction products, and a sample composite reaction data set is constructed based on the composite reaction array.

[0157] In this embodiment, data augmentation processing is performed on the sample reaction data set. Two reaction arrays may be 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. At the same time, the sample reaction products in the two selected reaction arrays are combined to obtain a sample composite reaction product. Then, based on the sample composite reactants and the sample composite reaction products, a composite reaction array is obtained, and the sample composite reaction data set is constructed accordingly. Although this data augmentation method cannot combine to obtain a completely accurate chemical reaction, for example, the reaction between the new reactant combinations may no longer be A and B, E and F, but may be A and E, B and F, or other combinations. Or, even if it is still A and B, E and F that react, it may only be an intermediate product, which can be further reflected. The final product should be obtained, that is, the new reaction obtained by the random combination data augmentation method is not necessarily accurate, but it can still enhance the generalization ability of the reaction product prediction model. In addition, there are often erroneous reaction data in the commonly used USPTO-480K data (for example, the ground-truth product gives the intermediate product instead of the final product). Therefore, the inaccurate new reaction combination obtained by the above data augmentation method has little effect on the prediction accuracy of the reaction product prediction model. Therefore, the sample composite reaction data set obtained after data augmentation can be aggregated with the original sample reaction data set to expand the expanded sample reaction data set, and applied to the subsequent reaction product prediction model parameter adjustment to enhance the robustness and generalization performance of the reaction product prediction model. It also has strong scalability for larger data sets and can perform supervision tasks that do not rely on manual labeling.

[0158] Specifically, as shown in Task 4 in FIG15 , a set of R 11 +R 12 +R 13 →P 11 The reactant R 11 +R 12 +R 13 and the reaction product P 11 , with another set of reaction arrays in R 21 +R 22 +R 23 →P 21 The reactant R 21 +R 22 +R 23 With the reaction product P 21 By combining, we can get a composite reaction array such as R 11 +R 12 +R 13 +R 21 +R 22 +R 23 →P 11 +P 21 .

[0159] Optionally, based on the embodiment corresponding to FIG. 2 above, in another optional embodiment of the training method of the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 9 , step S108 trains 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, including:

[0160] In step S901, the reconstruction loss value and the divergence loss value are obtained;

[0161] In step S902 , the reaction product prediction model is trained 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 a target reaction product prediction model.

[0162] Specifically, when the reaction product prediction model uses the VAE architecture of electron transfer conservation as shown in Figure 16, this embodiment can adopt a multi-task learning training method, and can obtain the reconstruction loss value and the divergence loss value based on the VAE architecture.

[0163] Furthermore, based on the total objective function formula (6) shown below, the reconstruction loss, divergence loss, reaction prediction loss, reaction relationship prediction loss, and atom prediction loss can be directly added to the total objective function in a weighted manner to obtain the total objective function value: L total =Lreconstruct +αL KL +βL A +λL B B+θL C (6);

[0164] Among them, L total Represents the total objective function value, L reconstruct Represents the reconstruction loss value, L KL represents the divergence loss value, L A Represents the reaction prediction loss value, L B Represents the reaction relationship prediction loss value and L C represents the atomic prediction loss value, α, β, λ, and θ are weight parameters set according to actual application requirements and are not specifically limited here.

[0165] Furthermore, the reaction product prediction model can be parameter-adjusted based on the total objective function value. Specifically, the parameter adjustment can be performed by iterative backpropagation or other methods, which are not specifically limited here, to obtain the target reaction product prediction model.

[0166] In this way, training the reaction product prediction model based on the above-mentioned reconstruction loss value, divergence loss value, reaction prediction loss value, reaction relationship prediction loss value and atom prediction loss value helps to make the trained reaction product prediction model have better performance, and at the same time helps to improve the training efficiency of the reaction product prediction model.

[0167] Optionally, based on the embodiment corresponding to FIG. 9 above, in another optional embodiment of the training method of the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 10 , step S901 obtains the reconstruction loss value and the divergence loss value, including:

[0168] In step S1001, the attention mechanism is used to process the sample reactant vector and the sample reaction product vector to obtain a first latent vector;

[0169] In step S1002, a second latent vector is calculated based on the first latent vector and the sample reactant vector;

[0170] In step S1003, the sample prediction change probability of the adjacency matrix is ​​determined according to the second latent vector through the decoding network of the reaction product prediction model;

[0171] In step S1004, based on the sample prediction change probability, the sample prediction reaction product adjacency matrix is ​​determined;

[0172] In step S1005 , loss calculation is performed based on the reaction product adjacency matrix of the sample reaction product and the sample prediction reaction product adjacency matrix to obtain a reconstruction loss value and a divergence loss value.

[0173] Specifically, as shown in Figure 16, an attention mechanism is used for the sample reactant vector and the sample reaction product vector, that is, the reactant embedding and the product embedding can be passed through a cross attention mechanism. The cross attention can be directly implemented through the transformer decoder based on the following equations (7), (8) and (9) to obtain the parameter vectors μ and logσ of the Gaussian distribution. At the same time, the first latent vector that conforms to the Gaussian distribution is obtained through the reparameterization technique: z =Mean(TransformerDecoder(h R ,h P )) (7); μ=W μ ReLU(h z )+b μ (8); logσ=W σ ReLU(h z )+b σ (9);

[0174] Among them, h z represents the first latent vector, W μ 、b μ 、W σ 、b σ Represents model parameters.

[0175] Furthermore, the second latent vector is calculated based on the first latent vector and the sample reactant vector. Specifically, the first latent vector and the sample reactant vector are added based on the following formula (10) and passed through a layer of Transformer to obtain a new latent vector, that is, the second latent vector h L : h L =Transformer(h R +h z ) (10);

[0176] Furthermore, as shown in FIG16 , the second latent vector is input into the decoding network of the reaction product prediction model, and the second latent vector h is converted into LDecoding, where the decoding network decoder is mainly composed of two separate self-attention mechanisms. One self-attention mechanism outputs an attention matrix as the probability of an increase in the shared electron between two atoms, and the other self-attention mechanism outputs an attention matrix as the probability of a decrease in the shared electron between two atoms. Since the transfer of electrons is conserved, the weight matrix characteristics of the self-attention mechanism are used to model this property. The specific decoding operation includes the following formulas (11) and (12) to obtain the sample prediction change probability of the adjacency matrix: W +d =SelfAttention(h L ) (11); W -d =SelfAttention(h L ) (12);

[0177] Among them, W +d Represents a sample prediction change probability, that is, the probability matrix of the increase of electrons between each pair of atoms, W -d Represents the probability of another sample prediction change, that is, the probability matrix of the reduction of electrons between each pair of atoms.

[0178] Furthermore, the sample prediction reaction product adjacency matrix is ​​calculated based on the sample prediction change probability. Specifically, the sample prediction change amount of the adjacency matrix is ​​calculated based on the sample prediction change probability, and the sample prediction reaction product adjacency matrix is ​​calculated based on the sample prediction change amount of the adjacency matrix and the adjacency matrix of the sample reactant. Then, the cross entropy loss is calculated based on the reaction product adjacency matrix of the sample reaction product and the sample prediction reaction product adjacency matrix to obtain the reconstruction loss value and the divergence loss value.

[0179] It should be noted that each numerical value in the adjacency matrix in the present embodiment is not just 0 or 1 (0 represents no connection between the corresponding atom pairs, and 1 represents connection between the corresponding atom pairs), but 0, 1, 2, 3 four numerical values, representing no connection, single bond connection, double bond connection and triple bond connection respectively. Aromatic bond connection is represented as 1, and the connected atoms are marked as aromatic atoms to distinguish them from single bond connections.

[0180] Optionally, based on the embodiment corresponding to FIG. 10 above, in another optional embodiment of the training method for the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 11 , step S1004 determines the sample prediction reaction product adjacency matrix based on the sample prediction change probability, including:

[0181] In step S1101, the sample prediction change amount of the adjacency matrix is ​​calculated based on the sample prediction change probability;

[0182] In step S1102 , a sample predicted reaction product adjacency matrix is ​​calculated based on the sample predicted variation of the adjacency matrix and the adjacency matrix of the sample reactants.

[0183] Specifically, after obtaining the sample prediction change probability, the following formula (13) can be used to calculate the sample prediction change amount of the adjacency matrix based on the sample prediction change probability, that is, the probability matrix W based on the increase of electrons between each pair of atoms +d The probability matrix W of electron reduction between each pair of atoms -d Subtract and multiply by 4 to get the predicted sample change ΔA between each pair of atoms: ΔA=(W +d -W -d )×4 (13);

[0184] Among them, 4 represents the maximum change between each pair of atoms.

[0185] Furthermore, the following formula (14) is used to calculate the sample predicted reaction product adjacency matrix based on the sample predicted change of the adjacency matrix and the adjacency matrix of the sample reactants: P =A R +ΔA (14);

[0186] Among them, A P Represents the sample prediction reaction product adjacency matrix, A R Represents the adjacency matrix of sample reactants.

[0187] Furthermore, the adjacency matrix must be symmetric, so the adjacency matrix of the sample prediction reaction product can be symmetric using the following formula (15):

[0188] Optionally, based on the embodiment corresponding to FIG. 2 above, in another optional embodiment of the reaction product prediction model parameter adjustment method provided in the embodiment of the present application, as shown in FIG. 12 , step S108 trains 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, including:

[0189] In step S1201, parameters of the first auxiliary network are adjusted based on the reaction prediction loss value to obtain a first sub-model;

[0190] In step S1202, the parameters of the second auxiliary network are adjusted based on the reaction relationship prediction loss value to obtain a second sub-model;

[0191] In step S1203, the parameters of the third auxiliary network are adjusted based on the atomic prediction loss value to obtain a third sub-model;

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

[0193] Specifically, this embodiment can also adopt a pre-training strategy to pre-train the first auxiliary network, the second auxiliary network, and the third auxiliary network based on the reaction prediction loss value, the reaction relationship prediction loss value, and the atom prediction loss value, that is, the parameters of the first auxiliary network are adjusted based on the reaction prediction loss value to obtain the first sub-model, and the parameters of the second auxiliary network are adjusted based on the reaction relationship prediction loss value to obtain the second sub-model, and the parameters of the third auxiliary network are adjusted based on the atom prediction loss value to obtain the third sub-model. Then, the first sub-model, the second sub-model, and the third sub-model are migrated to the reaction product prediction model. Specifically, the skeleton networks of the first sub-model, the second sub-model, and the third sub-model are migrated to the reaction product prediction model, and then the decoder network layer of the reaction product prediction is connected to the output embedding layer of the skeleton network to obtain the target reaction product prediction model.

[0194] 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 the trained first auxiliary network, the second auxiliary network, and the third auxiliary network are migrated to the reaction product prediction model, which can effectively improve the training efficiency of the reaction product prediction model and also help to improve the performance of the reaction product prediction model.

[0195] The following describes an application method of the reaction product prediction model in the present application. The method can be executed by a computer device, which can be a server or a terminal device. Referring to FIG13 , an embodiment of the application method of the reaction product prediction model in the present application includes:

[0196] In step S1301, the reactant to be tested is input into the target reaction product prediction model, and the target reaction product prediction model outputs the predicted change probability of the adjacency matrix;

[0197] In step S1302, the predicted change amount of the adjacency matrix is ​​determined based on the predicted change probability of the adjacency matrix;

[0198] In step S1303 , the target reaction product is determined based on the predicted change in the adjacency matrix and the adjacency matrix of the reactant to be tested.

[0199] In this embodiment, after obtaining the reactant to be tested, the reactant to be tested can be input into the target reaction product prediction model, and the predicted change probability of the adjacency matrix can be output by the target reaction product prediction model, and the predicted change amount of the adjacency matrix can be calculated based on the predicted change probability of the adjacency matrix. Then, the target reaction product can be determined based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactant to be tested, so that the obtained target reaction product can be subsequently applied to scenarios such as scientific pharmaceutical manufacturing or drug verification.

[0200] It is understandable that the target reaction product prediction model can serve as an effective verification tool for drug retrosynthesis, improving the research efficiency of new drug synthesis pathways; the target reaction product prediction model can reveal some hidden scientific laws and provide new scientific knowledge; the target reaction product prediction model can provide more accurate predictions than experts, not only can it predict reliable candidate products when all known templates cannot be used, but it can also predict new reactions to greatly improve the research and development efficiency of new drugs.

[0201] Specifically, the reactant to be tested is input into the target reaction product prediction model, and the target reaction product prediction model outputs the predicted change probability of the adjacency matrix, that is, the probability matrix W based on the increase of electrons between each pair of atoms. +d And the probability matrix W of electron reduction between each pair of atoms -d , then, the above formula (13) can be used to calculate the predicted change ΔA of the adjacency matrix.

[0202] Alternatively, based on the embodiment corresponding to FIG. 13 above, in another optional embodiment of the application method of the reaction product prediction model provided in the embodiment of the present application, as shown in FIG. 14 , step S1303 determines the target reaction product based on the predicted change in the adjacency matrix and the adjacency matrix of the reactant to be tested, including:

[0203] In step S1401, based on the predicted change in the adjacency matrix and the adjacency matrix of the reactant to be tested, a predicted reaction product adjacency matrix is ​​calculated;

[0204] In step S1402, the predicted reaction product adjacency matrix is ​​symmetrized to obtain the target reaction product adjacency matrix;

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

[0206] Specifically, the above formula (14) can be used to calculate the predicted reaction product adjacency matrix based on the predicted change of the adjacency matrix and the adjacency matrix of the reactant to be tested, where A P Represents the predicted reaction product adjacency matrix, A R Represents the adjacency matrix of the reactants to be tested.

[0207] Furthermore, since the adjacency matrix must be symmetric, the above formula (15) can be used to symmetrize the predicted reaction product adjacency matrix to obtain the target reaction product adjacency matrix. Then, based on the target reaction product adjacency matrix A P , and calculate the target reaction product.

[0208] The following describes in detail the training device for the reaction product prediction model in the present application. Please refer to FIG17 , which is a schematic diagram of an embodiment of the training device for the reaction product prediction model in the embodiment of the present application. The training device 20 for the reaction product prediction model includes:

[0209] An acquisition unit 201 is configured to perform vector conversion on each reaction array in a sample reaction data set using an encoding network of a reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector, wherein the sample reaction data set includes multiple reaction arrays, each reaction array including a sample reactant and a sample reaction product;

[0210] The acquisition unit 201 is further configured to construct a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through the first auxiliary network;

[0211] A processing unit 202 is configured to determine a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set;

[0212] The acquisition unit 201 is further configured to 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 a second auxiliary network;

[0213] The processing unit 202 is further configured to determine a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set;

[0214] The acquisition unit 201 is further configured to determine, through a third auxiliary network, a predicted probability value and an atom label of an atom in the sample reactant that exists in the main product based on the sample reactant vector and the sample reaction product vector;

[0215] The processing unit 202 is further configured to determine an atom prediction loss value based on the prediction probability value and the atom label;

[0216] The determination unit 203 is configured to train a 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.

[0217] Optionally, based on the embodiment corresponding to FIG. 17 above, in another embodiment of the training device for the reaction product prediction model provided in the embodiment of the present application,

[0218] 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;

[0219] The processing unit 202 is further configured to aggregate the sample reaction data set and the sample composite reaction data set into an extended sample reaction data set;

[0220] The acquisition unit 201 may be specifically configured to perform vector conversion on each reaction array in the extended sample reaction data set through the encoding network of the reaction product prediction model to obtain a sample reactant vector and a sample reaction product vector.

[0221] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the acquisition unit 201 may be specifically configured to:

[0222] 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;

[0223] Sample reactant vectors corresponding to any two sample reactants are sampled from different reaction arrays as a negative sample reactant combination, and the negative sample reactant combination is added to the negative sample reactant set.

[0224] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the acquisition unit 201 may be specifically configured to:

[0225] The sample reactant vectors and sample reaction product vectors corresponding to all reaction arrays are regarded as the positive sample reaction group set;

[0226] The sample reactant vectors and sample reaction product vectors corresponding to different reaction arrays are matched to obtain a negative sample reaction group set.

[0227] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the acquisition unit 201 may be specifically configured to:

[0228] The sample reactants are predicted by the third auxiliary network to obtain the predicted probability values ​​of the atoms in the sample reactants existing in the main product;

[0229] Based on the sample reactant vector and the sample reaction product vector, atoms in the sample reactant and the sample product are compared to obtain an atomic comparison result;

[0230] Atom labels are determined based on the atomic alignment results.

[0231] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the acquisition unit 201 may be specifically configured to:

[0232] For each reaction array, the information inside each molecule of the sample reactant is interacted between atoms to obtain the sample reactant interaction information;

[0233] Interactions are performed between different sample reactants based on the sample reactant interaction information to obtain a sample reactant vector;

[0234] For each reaction array, the information within each molecule of the sample reaction product is interacted between atoms to obtain the sample reaction product interaction information;

[0235] Based on the sample reaction product interaction information, interactions are performed between different sample reactants to obtain a sample reaction product vector.

[0236] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the processing unit 202 may be specifically configured to:

[0237] Randomly select two response arrays from the sample response data set;

[0238] Combining the sample reactants in the two selected reaction arrays to obtain a sample composite reactant;

[0239] combining the sample reaction products in the two selected reaction arrays to obtain a sample composite reaction product;

[0240] A composite reaction array is obtained based on the sample composite reactants and the sample composite reaction products, and a sample composite reaction data set is constructed based on the composite reaction array.

[0241] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the determining unit 203 may be specifically configured to:

[0242] Get the reconstruction loss value and the divergence loss value;

[0243] Based on the reconstruction loss value, divergence loss value, reaction prediction loss value, reaction relationship prediction loss value and atom prediction loss value, the reaction product prediction model is trained to obtain the target reaction product prediction model.

[0244] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the determining unit 203 may be specifically configured to:

[0245] Use the attention mechanism to process the sample reactant vector and the sample reaction product vector to obtain the first latent vector;

[0246] A second latent vector is calculated based on the first latent vector and the sample reactant vector;

[0247] Through the decoding network of the reaction product prediction model, the sample prediction change probability of the adjacency matrix is ​​determined according to the second latent vector;

[0248] Based on the sample prediction change probability, determining the sample prediction reaction product adjacency matrix;

[0249] The loss is calculated based on the reaction product adjacency matrix of the sample reaction product and the sample prediction reaction product adjacency matrix to obtain the reconstruction loss value and the divergence loss value.

[0250] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the determining unit 203 may be specifically configured to:

[0251] Calculate the sample prediction change of the adjacency matrix based on the sample prediction change probability;

[0252] Based on the sample prediction change of the adjacency matrix and the adjacency matrix of the sample reactants, the sample prediction reaction product adjacency matrix is ​​calculated.

[0253] Optionally, based on the embodiment corresponding to FIG. 17 , in another embodiment of the training device for the reaction product prediction model provided by the embodiment of the present application, the determining unit 203 may be specifically configured to:

[0254] Adjust the parameters of the first auxiliary network based on the reaction prediction loss value to obtain the first sub-model;

[0255] Adjust the parameters of the second auxiliary network based on the reaction relationship prediction loss value to obtain the second sub-model;

[0256] Adjust the parameters of the third auxiliary network based on the atomic prediction loss value to obtain the third sub-model;

[0257] The first sub-model, the second sub-model and the third sub-model are migrated to the reaction product prediction model to obtain the target reaction product prediction model.

[0258] The following describes in detail the application device of the reaction product prediction model in the present application. Please refer to FIG18 , which is a schematic diagram of an embodiment of the application device of the reaction product prediction model in the present application. The application device 30 of the reaction product prediction model includes:

[0259] An acquisition unit 301 is configured to input a test reactant into a target reaction product prediction model, and output a predicted change probability of an adjacency matrix through the target reaction product prediction model; the target reaction product prediction model is trained using the reaction product prediction model training device shown in FIG17 ;

[0260] The processing unit 302 is configured to determine a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix;

[0261] The determination unit 303 is configured to determine the target reaction product based on the predicted change of the adjacency matrix and the adjacency matrix of the reactant to be tested.

[0262] Optionally, based on the embodiment corresponding to FIG. 18 , in another embodiment of the application device of the reaction product prediction model provided in the embodiment of the present application, the determining unit 303 may be specifically configured to:

[0263] Calculating a predicted reaction product adjacency matrix based on the predicted change in the adjacency matrix and the adjacency matrix of the reactant to be tested;

[0264] Symmetrical processing is performed on the adjacency matrix of the predicted reaction products to obtain the adjacency matrix of the target reaction products;

[0265] The target reaction product is determined based on the target reaction product adjacency matrix.

[0266] On the other hand, the present application provides another schematic diagram of a computer device, as shown in Figure 19. Figure 19 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 310 (for example, one or more processors) and memory 320, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 331 or data 332. Among them, the memory 320 and the storage medium 330 can be temporary storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), each module may include a series of instruction operations in the computer device 300. Furthermore, the central processing unit 310 can be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 300.

[0267] The computer device 300 may further include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 333, such as Windows Server 2003 or Windows Server 2003R. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.

[0268] The computer device 300 is further configured to execute the steps in the embodiments corresponding to FIG. 2 to FIG. 13 , and the steps in the embodiment corresponding to FIG. 14 .

[0269] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method described in the embodiments shown in Figures 2 to 13 and the steps in the method described in the embodiment shown in Figure 14.

[0270] Another aspect of the present application provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps in the method described in the embodiments shown in Figures 2 to 13 and the steps in the method described in the embodiment shown in Figure 14.

[0271] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0272] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0273] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0274] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0275] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can 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 the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Claims

1. A method for training a reaction product prediction model, performed by a computer device, comprising: Performing vector conversion on each reaction array in the sample reaction data set through the encoding 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 arrays, each of which 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; Determining 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; Determine a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set; Determining, by a third auxiliary network, a predicted probability value and an atom label of the atom in the sample reactant existing in the main product according to the sample reactant vector and the sample reaction product vector; Determine an atom prediction loss value based on the prediction probability value and the atom label; The reaction product prediction model is trained 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.

2. The method according to claim 1, wherein before performing vector conversion on each reaction array in the sample reaction data set through the encoding network of the reaction product prediction model to obtain the sample reactant vector and the sample reaction product vector, the method further comprises: 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 into an extended sample reaction data set; The encoding network of the reaction product prediction model is used to perform vector conversion on each reaction array in the sample reaction data set to obtain a sample reactant vector and a sample reaction product vector, including: Each reaction array in the extended sample reaction data set is vector-converted through the encoding network of the reaction product prediction model to obtain the sample reactant vector and the sample reaction product vector.

3. The method according to any one of claims 1 or 2, wherein constructing a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through the first auxiliary network comprises: 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 sample reactant vectors corresponding to any two sample reactants are sampled from different reaction arrays as a negative sample reactant combination, and the negative sample reactant combination is added to the negative sample reactant set.

4. The method according to any one of claims 1 to 3, wherein 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 comprises: The sample reactant vectors and the sample reaction product vectors corresponding to all reaction arrays are used as the positive sample reaction group set; The sample reactant vectors and the sample reaction product vectors corresponding to different reaction arrays are matched to obtain the negative sample reaction group set.

5. The method according to any one of claims 1 to 4, wherein determining, by a third auxiliary network, the predicted probability value and the atomic label of the atom in the sample reactant existing in the main product according to the sample reactant vector and the sample reaction product vector comprises: Predicting the sample reactant by using the third auxiliary network to obtain a 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, aligning atoms in the sample reactant and the sample product to obtain an atomic alignment result; The atom labels are determined based on the atom alignment results.

6. The method according to any one of claims 1 to 5, wherein the encoding network of the reaction product prediction model is used to perform vector conversion on each reaction array in the sample reaction data set to obtain a sample reactant vector and a sample reaction product vector, comprising: For each of the reaction arrays, information inside each molecule of the sample reactant is interacted between atoms to obtain sample reactant interaction information; Performing interaction between different sample reactants based on the sample reactant interaction information to obtain the sample reactant vector; For each of the reaction arrays, information inside each molecule of the sample reaction product is interacted between atoms to obtain sample reaction product interaction information; Based on the sample reaction product interaction information, interactions are performed between different sample reactants to obtain the sample reaction product vector.

7. The method according to claim 2, wherein the step of performing data augmentation processing on the sample reaction data set to obtain the sample composite reaction data set comprises: Randomly selecting two reaction arrays from the sample reaction data set; Combining the sample reactants selected from the two reaction arrays to obtain a sample composite reactant; Combining the sample reaction products selected from the two reaction arrays to obtain a sample composite reaction product; A composite reaction array is obtained based on the sample composite reactant and the sample composite reaction product, and the sample composite reaction data set is constructed based on the composite reaction array.

8. The method according to any one of claims 1 to 6, wherein the reaction product prediction model is trained 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, comprising: Get the reconstruction loss value and the divergence loss value; 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, the reaction product prediction model is trained to obtain the target reaction product prediction model.

9. According to the method of claim 8, the obtaining of the reconstruction loss value and the divergence loss value comprises: Using an attention mechanism to process the sample reactant vector and the sample reaction product vector to obtain a first latent vector; Calculate a second latent vector based on the first latent vector and the sample reactant vector; Determining, by a decoding network of the reaction product prediction model, a sample prediction change probability of an adjacency matrix according to the second latent vector; Determining a sample prediction reaction product adjacency matrix based on the sample prediction change probability; Loss calculation is performed based on a reaction product adjacency matrix of the sample reaction product and an adjacency matrix of the sample prediction reaction product to obtain the reconstruction loss value and the divergence loss value.

10. The method according to claim 9, wherein determining a sample prediction reaction product adjacency matrix based on the sample prediction change probability comprises: Calculating the sample prediction change amount of the adjacency matrix based on the sample prediction change probability; The sample predicted reaction product adjacency matrix is ​​calculated based on the sample predicted variation of the adjacency matrix and the adjacency matrix of the sample reactants.

11. The method according to any one of claims 1 to 10, wherein the reaction product prediction model is trained 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, comprising: Adjusting parameters of the first auxiliary network based on the reaction prediction loss value to obtain a first sub-model; Adjusting parameters of the second auxiliary network based on the reaction relationship prediction loss value to obtain a second sub-model; Adjusting parameters of the third auxiliary network based on the atomic prediction loss value to obtain a third sub-model; The first sub-model, the second sub-model and the third sub-model are migrated to the reaction product prediction model to obtain the target reaction product prediction model.

12. A method for applying a reaction product prediction model, executed by a computer device, comprising: Inputting the reactant to be tested into the target reaction product prediction model according to any one of claims 1 to 11, and outputting the predicted change probability of the adjacency matrix through the target reaction product prediction model; Determining a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix; The target reaction product is determined based on the predicted change of the adjacency matrix and the adjacency matrix of the reactant to be tested.

13. The method according to claim 12, wherein the step of determining the target reaction product based on the predicted change of the adjacency matrix and the adjacency matrix of the reactant to be tested comprises: Calculating a predicted reaction product adjacency matrix based on the predicted change in the adjacency matrix and the adjacency matrix of the reactant to be tested; Symmetrically processing the predicted reaction product adjacency matrix to obtain a target reaction product adjacency matrix; The target reaction product is determined based on the target reaction product adjacency matrix.

14. A training device for a reaction product prediction model, comprising: An acquisition unit is used to perform vector conversion on each reaction array in the sample reaction data set through an encoding network of a 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 arrays, and each of the reaction arrays includes a sample reactant and a sample reaction product; The acquisition unit is further used to construct a positive sample reactant set and a negative sample reactant set according to the sample reactant vector through a first auxiliary network; A processing unit, configured to determine a reaction prediction loss value based on the positive sample reactant set and the negative sample reactant set; The acquisition unit is used to 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 a second auxiliary network; The processing unit is further used to determine a reaction relationship prediction loss value based on the positive sample reaction group set and the negative sample reaction group set; The acquisition unit is used to determine the predicted probability value and the atomic label of the atom in the sample reactant existing in the main product according to the sample reactant vector and the sample reaction product vector through a third auxiliary network; The processing unit is further used to determine an atom prediction loss value based on the prediction probability value and the atom label; A determination unit is used 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.

15. An application device for a reaction product prediction model, comprising: An acquisition unit, used for inputting the reactant to be tested into a target reaction product prediction model, and outputting the predicted change probability of the adjacency matrix through the target reaction product prediction model; A processing unit, configured to determine a predicted change amount of the adjacency matrix based on the predicted change probability of the adjacency matrix; A determination unit is used to determine a target reaction product based on the predicted change amount of the adjacency matrix and the adjacency matrix of the reactant to be tested.

16. A computer device, comprising a memory, a processor and a bus system, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 11 and the steps of the method according to any one of claims 12 to 13 when executing the computer program; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

17. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 11, and implements the steps of the method according to any one of claims 12 to 13.

18. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 11, and the computer program implements the steps of the method according to any one of claims 12 to 13.