A compound optimization method based on deep learning to connect fragments

Through deep learning technology, combined with Transformer model and reinforcement learning method, the challenge of fragment connection in drug design is solved, achieving efficient compound optimization and novel generation.

CN114187978BActive Publication Date: 2025-02-11MINDRANK AI LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111408686.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2025-02-11
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively connect fragments in drug design, maintain the original binding pattern of the fragments, and generate new compounds with the required properties, and there are problems of low diversity and repetitive structures in the optimization process of reinforcement learning methods.

Method used

A deep learning-based method is adopted to use the Transformer model for fragment connection, and the supervision training and reward mechanism optimization are carried out through the combination of the Agent model and the Prior prior model to ensure the syntax accuracy and nature of fragment connection.

Benefits of technology

It is realized that the linker structure is optimized to generate compounds with novel and desired properties on the basis of maintaining the original binding pattern of the fragment, and the efficiency and diversity of drug design are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114187978B_ABST
    Figure CN114187978B_ABST
Patent Text Reader

Abstract

The invention discloses a compound optimization method based on deep learning connected fragments, comprising the following steps: S1: pre-training a Transformer model based on a drug discovery database, and initializing a Prior a priori model and an Agent model of the Transformer model; S2: randomly selecting a pair of fragments as source sequence input; S3: the Agent model generates new molecules in batches by sampling; S4: inputting the generated new molecules into a reward module to obtain a reward value of each new molecule, judging whether the reward value of the new molecule meets expectations, if not, executing S5; if meeting expectations, executing S6; S5: sending the source sequence and the new molecules generated by the Agent model into the Prior a priori model for supervised training to obtain the prior likelihood of the new molecule, and combining the prior likelihood and the reward value obtained in S4 to form an enhanced likelihood; obtaining a penalty matrix according to the repeatability of the new molecule, updating the network parameters of the Agent model according to the enhanced likelihood and the penalty matrix, and returning to step S3; S6: completing the adjustment of the network parameters of the Agent model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and drug design technology, and more specifically, to a compound optimization method based on deep learning connection fragments. Background Art

[0002] Fragment-based drug discovery (FBDD) is a general problem in drug discovery, involving a wide range of tasks, with the goal of designing a molecular scaffold containing two (or more) specific substructures. It has been recognized as a powerful tool for finding hit compounds in the past two decades, especially for challenging targets and new protein families. However, it remains a challenging task due to the large size of chemical space and the discontinuity of the optimization properties.

[0003] FBDD usually starts with screening low molecular weight molecules, using compounds smaller than drug-like compounds (usually <300Da) to identify low-efficiency, high-quality leads, which are then optimized into lead compounds with higher affinity and selectivity through so-called fragment growth, fragment merging or fragment connection strategies. A common approach is to use a connection strategy to connect fragments that bind to different sites through a linker. Connecting fragments is a key issue that needs to be solved to improve the efficiency of fragment ligands. However, fragment connection remains challenging because it is difficult to retain the original binding mode of the fragment after connection. Traditional techniques, such as database searching, are limited by the size of the database and some predetermined rules and examples, which limits the exploration of chemical space.

[0004] Recently, the development of deep generative models has generated a large number of promising methods to solve the structure generation problem in drug design and has been applied to de novo molecular design and lead optimization. Many generative architectures such as RNNs, autoencoders, and generative adversarial networks (GANs) have been proposed to generate desired molecules. Meanwhile, Imrie et al. reported a fragment linking technique (aka DeLinker) with a generative model that can connect fragments while keeping the relative positions of the fragments unchanged. Yang et al. further extended it to a sentence completion problem using a Transformer framework. Although these methods have shown their capabilities in accurate molecular reconstruction, they are limited in their ability to generate molecular structures with desired properties as well as in the distribution of data, which limits their ability to discover truly novel compounds. Since these property targets are of high complexity and non-differentiable, generating new and effective molecules that can directly optimize various desired physical, chemical, and biological property targets remains a challenging task.

[0005] On the other hand, some works have attempted to solve these problems by defining molecular design as a reinforcement learning problem. Reinforcement learning can update the parameters of the model to achieve the desired properties or hard constraints through the design of environmental dynamics and reward functions, and allows active exploration of the molecular space beyond the samples in the dataset. It is currently used for de novo molecular design in drug optimization, but has not been used for fragment-based optimization. At the same time, the ligands generated by reinforcement learning methods tend to have relatively low diversity, sometimes even leading to repeated structures when optimizing towards the desired properties.

[0006] Therefore, the difficulty in combining the two lies in the following: First, the existing models for drug optimization cannot be directly used for fragment connection. It is necessary to use the seq2seq model to realize the generation of fragments to compounds, and in the process of fragment connection optimization, it is necessary to keep the original binding mode of the fragments unchanged and only optimize the linkers. Secondly, the reinforcement learning training process is unstable. When reinforcement learning is used for fragment connection problems, the network parameter transfer and training methods need to be adjusted accordingly. Finally, the problem of low diversity of molecules generated by reinforcement learning when optimizing towards the desired properties is particularly evident in the fragment connection problem. Summary of the invention

[0007] In order to solve the above problems in the prior art, the present invention provides a compound optimization method based on deep learning connection fragments.

[0008] In order to achieve the above-mentioned purpose of the present invention, the technical scheme adopted is as follows:

[0009] A compound optimization method based on deep learning connection fragments, the method comprising the following steps:

[0010] S1: Pre-train the Transformer model based on the drug discovery database, and initialize the Prior model and Agent model with the trained Transformer model;

[0011] S2: randomly select a pair of segments as source sequence input;

[0012] S3: The Agent model generates new molecules in batches through sampling;

[0013] S4: Input the generated new molecules into the reward module to obtain the reward value of each new molecule, and judge whether the reward value of the new molecule meets the expectation. If it does not meet the expectation, execute S5; if it meets the expectation, execute S6;

[0014] S5: Send the source sequence and the new molecule generated by the Agent model to the Prior model for supervised training to obtain the prior likelihood of the new molecule, and combine the prior likelihood and the reward value obtained in S4 to form an enhanced likelihood; obtain a penalty matrix based on the repeatability of the new molecule, update the network parameters of the Agent model based on the enhanced likelihood and penalty matrix, and return to step S3;

[0015] S6: Complete the adjustment of the network parameters of the Agent model to discover ideal compounds with novel structures by modifying the structure of the linker starting from known active compounds.

[0016] Preferably, the Transformer model comprises a plurality of encoder-decoder modules; each encoder comprises a multi-head self-attention sublayer and a first feedforward neural network sublayer;

[0017] The multi-head attention sublayer is provided with a plurality of dot product attention functions working in parallel, which are used to focus on information from different subspaces at different positions;

[0018] The first feedforward neural network sublayer adopts a ReLU activation function; the multi-head attention sublayer is connected to the first feedforward neural network sublayer through a normalization layer and a residual network;

[0019] Each decoder includes a second feedforward neural network sublayer and two attention sublayers; the second feedforward neural network sublayer uses a ReLU activation function; the attention sublayer uses a mask module to mask future tokens that should not be paid attention to;

[0020] The multi-head attention sublayer and the attention sublayer in the encoder-decoder module are used to help the decoder focus on the key parts in the source sequence and capture the relationship between the encoder and the decoder.

[0021] Furthermore, the multi-head attention sublayer adopts all keys Calculate the dot product of the query (Q) and introduce a scaling factor d k To prevent the dot product result from being too large, the softmax function is then used to obtain the weight of the value (V), and the corresponding formula is as follows:

[0022]

[0023] Furthermore, in step S3, new molecules are generated in batches by sampling, as follows: for a given source sequence X=(x1, ..., x n ), which is processed by the encoder into a latent vector representation Given The output of the decoder is normalized using a softmax function to produce a probability distribution for sampling tokens, and then the output sequence Y = y1, ..., y is generated each time. m A token is generated until a token with a terminator is generated; in the tth step of each model training, y is generated t The probability of this token depends on and Y <t =y1,...,y t-1 .

[0024] Furthermore, in step S5, the source sequence and the new molecule generated by the Agent model are input into the Prior model for supervised training to obtain the prior likelihood of the new molecule, as follows: First, the encoder converts the source sequence X = (x1, ..., x n ) is processed into a latent vector representation L = (l1, ..., l n ); Given L and the new molecule Y generated by the Agent model = (y1, ..., y m ), the decoder samples and generates sentences in sequence Each token of n ) represents the generated SMILES, and the product of the action probabilities represents the likelihood of the sequence generated by the Prior model, in the form of:

[0025]

[0026] Where, t = 1, ..., n; π represents the update agent strategy.

[0027] Furthermore, the Agent model is an instantiated copy of the Prior model; therefore, the initialized Prior model and the Agent model are the same; the Agent model is used to generate molecules that are active against a certain biological target.

[0028] Furthermore, we can enhance the likelihood Expressed as a combination of the prior likelihood and the reward obtained:

[0029]

[0030] Where σ is a scalar coefficient and S(A)∈[0,1] is a scoring function;

[0031] The goal of the agent model is to learn a strategy π that maximizes the expected return by minimizing the loss function J(Θ) = -G; J(Θ) represents the loss of the agent model under a certain set of network parameters Θ;

[0032]

[0033] Formula (5) represents the possibility of the current agent in a series of actions A and enhance the possibility The square difference.

[0034] Furthermore, the sampling method includes one of beam search and polynomial sampling.

[0035] Furthermore, update the network parameters of the Agent model as follows:

[0036] First, for the initialized Agent model, keep its encoder network fixed;

[0037] Secondly, on the basis of enhancing the likelihood, additional penalties are added to encourage the Agent model to sample more diverse molecules. Specifically, new molecules are input into the penalty module, and a penalty matrix is ​​constructed according to the repetitiveness of the new molecules to assign weights to each generated molecule.

[0038] Finally, the decoder network parameters in the Agent model are updated according to the enhanced likelihood and penalty matrix.

[0039] Furthermore, the scoring function is a trained random forest regression model or a molecular indicator calculation expression using the RDkit library, which uses the SMILES molecular sequence representation as input, and finally its output is used as a reward function for generating molecules.

[0040] The beneficial effects of the present invention are as follows:

[0041] The compound optimization method described in the present invention includes two stages: pre-training to ensure the correctness of the syntactic pattern of the fragments and fine-tuning of the model network parameters to ensure the desired properties. First, the Transformer model is pre-trained on a drug discovery database to allow the Transformer model to learn the syntactic pattern of connecting fragments to ensure the correctness of the fragment connection grammar, that is, inputting fragment R0 and outputting complete molecules containing fragment R0 at both ends. Then, the encoder network of the pre-trained Agent model is kept fixed. Next, a pair of fragments R0 are selected as the initial input, and a group of new molecules containing R0 fragments at both ends are sampled through the decoder. The generated molecules are sent to the scoring function module to obtain the reward value of each candidate, and then the Agent model decoder network parameters are adjusted for multiple rounds according to the enhanced likelihood composed of the prior likelihood and reward value of the Prior model to achieve the desired reward value. Thus, starting from known active compounds, ideal compounds with novel structures are discovered by modifying the structure of the linker. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 are SMILES examples of source and target sequences.

[0043] Figure 2 is a flow chart of the compound optimization method described in Example 1. DETAILED DESCRIPTION

[0044] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0045] Example 1

[0046] A compound optimization method based on deep learning connection fragments. Before introducing the method described in this embodiment, the task is first defined as Figure 1 As shown in Figure 1, this process can be viewed as an end-to-end sentence completion process, where the input is a pair of segments and the output is the entire molecule. In the prior art, the reactants are generally used as source sequences and the reaction products are used as target sequences. In this embodiment, a pair of segments is defined as the source sequence and the entire molecule is defined as the target sequence. The example of sequence expression is as follows: Figure 1 As shown in Figure 2. A training example is described as “[*]c1ccccc1.[*]C1CCOCC1>>c1ccc(CNCC2CCOCC2)cc1”, where “[*]c1ccccc1.[*]C1CCOCC1” is the source sequence and “c1ccc(CNCC2CCOCC2)cc1” is the target sequence. The reinforcement learning network model is named DRlinker, and its basic architecture is a typical Transformer model.

[0047] like Figure 2 As shown, the compound optimization method comprises the following steps:

[0048] S1: Pre-train the Transformer model based on the drug discovery database (ChEMBL database), and initialize the Prior model and Agent model with the trained Transformer model; then use the generated SMILES enhanced likelihood to fine-tune the Agent model, and perform a final test on the Agent. The pre-training described in this embodiment refers to training the transformer model with the ChEMBL dataset, copying two identical models, one called the Prior model and the other called the Agent model. That is, the pre-trained transformer model is used to initialize the Prior and Agent models.

[0049] S2: randomly select a pair of segments as source sequence input;

[0050] S3: The Agent model generates new molecules in batches through sampling;

[0051] S4: Input the generated new molecules into the reward module to obtain the reward value of each new molecule, and judge whether the reward value of the new molecule meets the expectation. If not, execute S5; if it meets the expectation, execute S6;

[0052] S5: Send the source sequence and the new molecule generated by the Agent model to the Prior model for supervised training to obtain the prior likelihood of the new molecule, and combine the prior likelihood and the reward value obtained in step S4 to form an enhanced likelihood; obtain a penalty matrix based on the repeatability of the new molecule, update the network parameters of the Agent model based on the enhanced likelihood and penalty matrix, and return to step S3;

[0053] S6: Complete the adjustment of the network parameters of the Agent model to discover ideal compounds with novel structures by modifying the structure of the linker starting from known active compounds.

[0054] In a specific embodiment, the Transformer model includes multiple encoder-decoder modules; each encoder includes a multi-head self-attention sublayer (Multi-Head Self-Attention) and a first feed-forward neural network sublayer (FFN, Feed Forword);

[0055] The multi-head attention sublayer is provided with several scaled dot-product attention functions working in parallel to focus on information from different subspaces at different positions;

[0056] The first feedforward neural network sublayer adopts a ReLU activation function; the multi-head attention sublayer is connected to the first feedforward neural network sublayer through a normalization layer and a residual network;

[0057] Each decoder includes a second feedforward neural network sublayer and two attention sublayers; the second feedforward neural network sublayer uses a ReLU activation function; the attention sublayer uses a mask module to mask future tokens that should not be paid attention to;

[0058] The multi-head attention sublayer and the attention sublayer in the encoder-decoder module are used to help the decoder focus on the key parts in the source sequence and capture the relationship between the encoder and the decoder.

[0059] In a specific embodiment, the multi-head attention sublayer uses all keys Calculate the dot product of the query (Q) and introduce a scaling factor d k To prevent the dot product result from being too large, the softmax function is then used to obtain the weight of the value (v), and the corresponding formula is as follows:

[0060]

[0061] In a specific embodiment, step S3, batch generation of new molecules by sampling, is as follows: for a given source sequence X=(x1, ..., x n ), which is processed by the encoder into a latent vector representation L = (l1, ..., l n ); given The output of the decoder is normalized using a softmax function to produce a probability distribution for sampling tokens, and then the output sequence Y = y1, ..., y is generated each time. m A token is generated until a token with the end character "< / s>" is generated. In the tth step of each model training, y is generated t The probability of this token depends on L and Y <t =y1,...,y t-1 .

[0062] During the training process, the Agent model makes the target sequence M t =(t1, ..., t k ) and the output sequence Y have the smallest cross entropy loss:

[0063]

[0064] Where M represents the target sequence; i = 1, ..., m

[0065] In a specific embodiment, this embodiment frames the problem of generating a SMILES representation of a molecule with specific desired properties through a Transformer model as a partially observable Markov decision process, in which the Agent model must decide which token to select next given the currently predicted state of tokens. This embodiment uses a trained Transformer model to initialize the Prior prior model, and uses the probability distribution learned by the Transformer model as the initial prior strategy of the Prior prior model. The Agent model is an instantiated copy of the Prior prior model; therefore, the initialized Prior prior model and the Agent model are the same; at the same time, the task here is staged; in step S5, the source sequence and the new molecule generated by the Agent model are input into the Prior prior model for supervised training to obtain the prior likelihood of the new molecule, as follows:

[0066] First, the encoder transforms the source sequence X = (x1, ..., x n ) is processed into a latent vector representation Given and the new molecule Y generated by the Agent model = (y1, ..., y m ), the decoder samples and generates sentences in sequence Each token of is sampled until the end token is sampled; in this process, the action sequence set A=(a1,a2,...,a n ) represents the generated SMILES, and the product of the action probabilities represents the likelihood of the sequence generated by the Prior model, in the form of:

[0067]

[0068] Where, t = 1, ..., n; π represents the update agent strategy.

[0069] Whenever the Agent model generates a complete sequence A final reward will be obtained. Let S(A)∈[0,1] be a scoring function that scores the rationality of the sequence generated using any method. The S(A) is a sentence-level reward. So the goal now is to update the Agent strategy π to increase the expected score of the generated molecule. However, we hope that our new strategy can build on the previous old strategy that has learned the distribution of SMILES grammar and ChEMBL database molecular structures. Therefore, the likelihood will be enhanced Expressed as a combination of the prior likelihood and the reward obtained:

[0070]

[0071] Where σ is a scalar coefficient and S(A)∈[0,1] is a scoring function;

[0072] The goal of the agent model is to learn a strategy π that maximizes the expected return by minimizing the loss function J(Θ) = -G; J(Θ) represents the loss of the agent model under a certain set of network parameters Θ;

[0073]

[0074] Formula (5) represents the possibility of the current agent in a series of actions A and enhance the possibility The squared difference of In fact, it is the likelihood score. Both the sampling of the Agent model and the supervised training of the Prior model have likelihood scores, but the way they are generated is different. Using the square difference to amplify the deviation from the initial Prior model and keep the deviation within a certain range is also a method. Using the absolute value is equivalent to amplifying the change and controlling the deviation within a smaller range, so it is preferred to use the square difference with better effect.

[0075] In a specific embodiment, the network parameters of the Agent model are updated as follows:

[0076] First, for the initialized Agent model, keep its encoder network fixed;

[0077] Secondly, when a pair of fragments R0 is selected as the initial input, a set of new molecules {Y1, Y2, ..., Y n}, and send the generated molecules to the scoring function module to obtain the reward values ​​of each {R1, R2, ..., R n}, the reward value and the prior likelihood are combined into an enhanced likelihood. On the basis of the enhanced likelihood, an additional penalty is added to encourage the Agent model to sample more diverse molecules. Specifically, the new molecules are input into the penalty module, and the penalty matrix is ​​constructed according to the repetitiveness of the new molecules to assign weights to each generated molecule;

[0078] Finally, the decoder network parameters in the Agent model are updated according to the enhanced likelihood and penalty matrix, and the expected reward value is achieved through multiple rounds of adjustment and update. Thus, starting from known active compounds, novel ideal compounds are discovered by modifying the structure of the linker.

[0079] like Figure 2 As shown, the training transfers the probability distribution from the probability distribution of the Prior model to the probability distribution adjusted by the rationality function of the structure. The process of adjusting the network parameters of the Agent model in this embodiment is a policy-based reinforcement learning process, and this policy-based reinforcement learning can explicitly learn the optimal random strategy.

[0080] In a specific embodiment, in the process of updating the network parameters of the Agent model, the scoring function is fixed, and the goal of the Agent model is to generate new molecules with desired properties. The scoring function is a trained random forest regression model or a molecular indicator calculation expression using the RDkit library, which uses the molecular sequence representation of SMILES as input, and finally its output is used as a reward function for generating molecules. This embodiment selects the tyrosine protein kinase JAK3 as the target, hoping to generate new molecules with good activity against the kinase. In order to be able to quickly and accurately analyze whether the generated molecules are active on JAK3, this embodiment constructs a random forest (RF, Random Forest) regression model in Scikit-learn with molecular fingerprints as the molecular representation as a prediction model for JAK3 activity. The five-fold cross-validation R of the random forest regression model on the internal test set is as follows: 2 The result is 0.72 (pChEMBL value). The probability output of the trained random forest regression model is used as the reward function for molecule generation. In a specific embodiment, the sampling method includes one of beam search and polynomial sampling. The beam search is a breadth-first search method, that is, a "beam" result of a top-K size of scoring candidates (prefix hypothesis sentences) is maintained in each generation step. Then, for each candidate sentence in the beam, the K most likely words are appended to produce a pool of K×K new candidates. From this pool, select the top-K translation results with the highest probability, and then continue the beam search process.

[0081] The multinomial sampling method generates words one by one by performing multinomial sampling on the output distribution of the Agent model. When the candidate sentence has the "end of sentence" (< / s>) marker, both sampling strategies will terminate the expansion of the candidate sentence. The beam search strategy generates more accurate Polynomial sampling focuses more on exploring more diverse candidate sequences.

[0082] Based on the compound optimization method described above, this example uses a series of 2D and 3D metrics to evaluate the generated molecules:

[0083] Validity refers to the percentage of chemically valid molecules generated with the initial fragment pairs.

[0084] Novelty is the percentage of chemically valid molecules generated that have novel linkers (not present in the training set).

[0085] Uniqueness is the number of unique structures generated.

[0086] Recovery refers to the percentage of the test set of compounds that produce their corresponding target molecules (ground truth).

[0087] Bioactivity improvement refers to the average improvement in bioactivity between the molecules generated by the Prior model and the Agent model, and its calculation formula is

[0088]

[0089]

[0090] ·SC RDKit molecule refers to the 3D similarity, calculated by scoring the X-ray binding conformations generated by the generated molecule with the target molecule using a combined shape and color similarity score (SC). This score is a real number in the range [0, 1], with a score above 0.6 indicating a good match and above 0.9 indicating an almost perfect match. For each molecule, the best similarity score among all docked conformers is taken as the SC RDKit In the current study, SMILES were converted into three-dimensional conformations and docked using Schrodinger software. The SC score of each conformation was calculated using RDkit.

[0091] The data set used in this embodiment comes from the work of Yang et al. [YANG Y, ZHENG S, SU S, et al. SyntaLinker: automatic fragment linking with deep conditional transformer neural networks [J]. 2020, 11 (31): 8312-22], which is derived from the ChEMBL database (https: / / www.ebi.ac.uk / chembl / ). The matching molecule pairs (MMPs) cutting algorithm is used to construct the data set. Finally, the two terminal fragments and the original compound are used as fragment molecule triplets (FMT) for model training, and all chemical structures in FMTs are converted to normalized SMILES format using RDKit.

[0092] The ChEMBL dataset was further divided into three groups for training, validation, and testing, with a ratio of 8:1:1. When dividing the ChEMBL set into three groups, a random sampling strategy was adopted to ensure that the distribution of linker lengths was similar in the three sets. In addition, the DRlinker method was validated in some case studies to demonstrate the ability of scaffold hopping. It is worth mentioning that the ground truth compounds in these examples were not included in the training set of our DRlinker model.

[0093] Next, experiments were performed to demonstrate the effectiveness of the method described in this example in fragment ligation and molecular optimization to obtain desired properties.

[0094] (1) Initializing the performance of the Prior model

[0095] In addition to satisfying the chemical syntactic constraints for fragment connection, the model should also be able to capture key features of molecular properties and structure. To this end, we use the SyntaLinker model of Yang et al. [YANG Y, ZHENG S, SU S, et al. SyntaLinker: automatic fragment linking with deep conditional transformer neural networks [J]. 2020, 11 (31): 8312-22] as our pre-trained model. As shown in Table 1, the model achieves more than 95% effectiveness, 90% novelty of the linker, and recovers more than 80% of the original molecules under the ChEMBL test set, which use Beam Search to generate the top 10 candidate molecules for each pair of starting fragments to verify the performance.

[0096] Table 1

[0097]

[0098] Initial training results show that the pre-trained model can learn to identify the connector part of the structure, generate connectors accordingly, and the model is well generalized to create new connectors. At the same time, the results show that the constrained model seems to be better in terms of recovery, novelty, and effectiveness than the model without any constraints, which is probably because the prior knowledge about the length of the connector is defined in the constrained model.

[0099] (2) Activity-guided molecule generation

[0100] The second example is about more complex optimization of molecular properties, perhaps the most interesting and relevant one in drug discovery, by optimizing the agent to produce molecular structures with desired biological activity. This can be seen as a form of inverse QSAR, in which the agent model is used to implicitly map high predicted activity probabilities to molecular structures. Here JAK3 was chosen as the biological target. We perform molecular optimization under specific constraints, with the goal of finding the molecule that contains both starting fragments with the greatest improvement compared to the molecules generated by the Prior. A molecule with a low activity score for all molecules generated by the Prior model was selected from the ChEMBL test set as the starting molecule for this experiment, and the training step was set to 5k to train an agent model as one experiment. The same experiment was repeated for 24 molecules randomly selected from the ChEMBL test set. In this task, the reward design is as follows:

[0101]

[0102] 50 candidates were generated for each agent model. The success rate (percentage of molecules satisfying valid constraints) is reported in Table 2 as effectiveness, along with the average improvement in activity of generated molecules.

[0103] Table 2

[0104]

[0105] Table 2 Mean and standard deviation of JAK3 activity improvement of generated molecules under different training strategies in constrained optimization tasks. “beam” refers to “beam search” and “multinomial” refers to “polynomial sampling”. The success rate refers to the percentage of generated molecules that meet the Validity condition.

[0106] From Table 2, we can also find that the sampling is done by the beam search strategy. The average score improvement of is worse than that of polynomial sampling. Therefore, we speculate that exploration is more important than exploitation in reward calculation. Polynomial sampling brings more data diversity to the training of Transformer model, while the sentences generated by beam search are usually very similar.

[0107] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A compound optimization method based on deep learning connection fragments, characterized in that: The method comprises the following steps: S1: Pre-train the Transformer model based on the drug discovery database, and initialize the Prior model and Agent model with the trained Transformer model; The Transformer model includes multiple encoder-decoder modules; each encoder includes a multi-head attention sublayer and a first feedforward neural network sublayer; The multi-head attention sublayer is provided with a plurality of dot product attention functions working in parallel, which are used to focus on information from different subspaces at different positions; The first feedforward neural network sublayer adopts a ReLU activation function; The multi-head attention sublayer is connected to the first feedforward neural network sublayer through a normalization layer and a residual network; Each decoder includes a second feed-forward neural network sublayer and two attention sublayers; The second feedforward neural network sublayer adopts a ReLU activation function; the attention sublayer uses a mask module to shield future tokens that should not be paid attention to; The multi-head attention sublayer and the attention sublayer in the encoder-decoder module are used to help the decoder focus on the key parts of the source sequence and capture the relationship between the encoder and the decoder; S2: randomly select a pair of segments as source sequence input; S3: The Agent model generates new molecules in batches by sampling, as follows: For a given source sequence Processed by the encoder into a latent vector representation Given The output of the decoder is normalized with a softmax function to generate a probability distribution for sampling tokens, and then a new molecule Y=y1,…,y is generated each time. m A token is generated until a token with a terminator is generated; In each step of Agent model training, y is generated t The probability of this token depends on and Y <t =y1,…,y t-1 ; The sampling method includes one of beam search and polynomial sampling; S4: Input the generated new molecules into the reward module to obtain the reward value of each new molecule, and judge whether the reward value of the new molecule meets the expectation. If it does not meet the expectation, execute S5; if it meets the expectation, execute S6; S5: Send the source sequence and the new molecule generated by the Agent model to the Prior model for supervised training to obtain the prior likelihood of the new molecule, and combine the prior likelihood and the reward value obtained in S4 to form an enhanced likelihood; obtain a penalty matrix based on the repeatability of the new molecule, update the network parameters of the Agent model based on the enhanced likelihood and penalty matrix, and return to step S3; Among them, the likelihood will be enhanced Expressed as a combination of the prior likelihood and the reward obtained: Where σ is a scalar coefficient and S(A)∈[0,1] is a scoring function; The goal of the agent model is to learn a strategy π that maximizes the expected return by minimizing the loss function J(Θ) = -G; J(Θ) represents the loss of the agent model under a certain set of network parameters Θ; Formula (5) represents the possibility of the current agent in a series of actions A and enhance the possibility The square difference of Update the network parameters of the Agent model as follows: First, for the initialized Agent model, keep its encoder network fixed; Secondly, on the basis of enhancing the likelihood, additional penalties are added to encourage the Agent model to sample more diverse molecules. Specifically, new molecules are input into the penalty module, and a penalty matrix is ​​constructed according to the repetitiveness of the new molecules to assign weights to each generated molecule. Finally, the decoder network parameters in the Agent model are updated according to the enhanced likelihood and penalty matrix; S6: Complete the adjustment of the network parameters of the Agent model to discover ideal compounds with novel structures by modifying the structure of the linker starting from known active compounds.

2. The compound optimization method based on deep learning connection fragments according to claim 1, characterized in that: The multi-head attention sublayer uses all keys Calculation query The dot product of k To prevent the dot product result from being too large, the softmax function is then used to obtain the value The corresponding formula is as follows:

3. The compound optimization method based on deep learning connection fragments according to claim 2, characterized in that: Step S5, the source sequence and the new molecule generated by the Agent model are input into the Prior model for supervised training to obtain the prior likelihood of the new molecule, as follows: First, the encoder converts the source sequence Processed into a latent vector representation Given and the new molecule Y generated by the Agent model = (y1,…,y m ), the decoder samples and generates sentences in sequence Each token of represents the generated SMILES, and the product of the action probabilities represents the prior likelihood of the Prior model generating new molecules, in the form of: Where, t=1,…,n; π represents the update agent strategy.

4. The compound optimization method based on deep learning connection fragments according to claim 3, characterized in that: The Agent model is an instantiated copy of the Prior model; Therefore, the initialized Prior model and Agent model are the same; the Agent model is used to generate molecules active against a certain biological target.

5. The compound optimization method based on deep learning connection fragments according to claim 4, characterized in that: The scoring function is a trained random forest regression model or a molecular indicator calculation expression using the RDkit library, which uses the SMILES molecular sequence representation as input, and finally its output is used as a reward function for generating molecules.

Citation Information

Patent Citations

  • Drug molecule generation method based on adversarial imitation learning

    CN112820361A