Molecular generation method and system based on recurrent adversarial neural network with embedded bidirectional long short-term memory
By constructing a molecular generation model using a recurrent adversarial neural network with embedded bidirectional long short-term memory and BiLSTM and attention mechanism, the problem of insufficient effectiveness and diversity of generated molecules in existing technologies is solved, and the generation of diverse and efficient molecules that are more in line with the laws of medicinal chemistry is achieved.
Patent Information
- Application Number
- CN202311129308.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-09-04
AI Technical Summary
Existing molecular generation models are inadequate in terms of the effectiveness, diversity, success rate, and generation of specific properties of molecules, especially in their failure to effectively utilize bidirectional contextual information.
A recurrent adversarial neural network with embedded bidirectional long short-term memory is used to construct a molecular generation model by embedding the generator and discriminator through BiLSTM and attention mechanism, respectively. This model captures sequence context information and improves the expressive power of the generator, while enhancing the discriminator's discrimination ability.
This improves the diversity, success rate, and novelty of generated molecules, making them more consistent with the principles of medicinal chemistry and possessing greater pharmaceutical potential and biological feasibility.
Smart Images

Figure CN117079745B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a cyclic generative adversarial network molecular generation method and system based on an embedded bidirectional long short-term memory. BACKGROUND
[0002] The physical and chemical properties of a molecule are determined by the structure of the molecule, and the physical and chemical properties of the molecule reflect the structure.
[0003] Due to the very large, discrete and disordered molecular space of different types of molecules, it is a very huge challenge to directly generate molecules with desired properties. With the development of artificial intelligence, the application of artificial intelligence in drug design has attracted more and more attention. Compared with traditional computer-aided molecular design, the application of artificial intelligence in drug design pays more attention to the self-learning of machines on chemical database information. It can avoid part of the trial-and-error path in compound design by extracting and learning data, and bring new structures at the same time, breaking the conventional structure barrier of drug discovery.
[0004] The generative model based on deep learning technology has important innovation and application value in the field of drug design. Generative deep learning refers to the generation of new compounds with potential biological activity by learning known drug structures and activity information. The generative model usually learns based on SMILES characters and molecular graphs, and is constructed by methods such as recurrent neural networks, reinforcement learning, variational autoencoders, generative adversarial networks and graph convolution-based models. These models not only attract widespread attention and reports, but also have innovation and practicality in drug design and discovery.
[0005] The current molecular generation model uses a single LSTM, ResNet or GAN model for molecular generation. These models only use unidirectional molecular information in molecular generation, so there is still room for improvement in the effectiveness, diversity, success rate and generation of specific properties of the generated molecules. How to introduce bidirectional context information and generate specific molecular structures will provide guidance and help for drug design and lead chemical optimization. SUMMARY
[0006] The application is to solve the problems existing in the prior art, and provides a cyclic generative adversarial network molecular generation method based on an embedded bidirectional long short-term memory.
[0007] The technical scheme adopted by the application is: a cyclic generative adversarial network molecular generation method based on an embedded bidirectional long short-term memory, characterized by comprising the following steps:
[0008] S1: Collecting molecules with effective chemical properties
[0009] Screening molecules meeting the requirements from known molecular database according to requirements, and storing the screened molecules in the effective chemical molecular database in SMILES format;
[0010] S2: Data set classification
[0011] The screened molecules are divided into two data sets according to the target properties and the target structure, and then the molecules in each data set are randomly divided into a test set and a training set;
[0012] S3: Training molecules
[0013] Setting up a molecular model, mapping the molecules in the test set and the training set represented in the form of SMILES string to the latent vector space of the JTVAE model, inputting the molecules in the training set in the form of vector, and through continuous training of the molecular model, finally making the molecular model generate molecules that retain the target structure and contain the target properties; inputting the molecules in the test set in the form of vector, and generating the final molecules;
[0014] S4: Decoding
[0015] The molecules mapped to the latent vector space of the JTVAE model are output in the form of SMILES string;
[0016] S5: Evaluate the properties of the molecules, and visualize the molecules in the form of molecular graph.
[0017] Further, in step S2,
[0018] The target properties include: solubility, drug activity, chemical reactivity;
[0019] The target structure is: the number of benzene rings, the number of aliphatic rings, the number of hydrogen bond acceptors and donors, and the desired molecular skeleton.
[0020] Further, the molecular model uses a symmetric form of a recurrent generative adversarial network, including two symmetrically arranged generators and two symmetrically arranged discriminators.
[0021] Further, BiLSTM is introduced in each generator;
[0022] The discriminator adopts a superimposed structure of one layer of Dense layer and one layer of attention mechanism, and is superimposed for three times.
[0023] Further, after the training of the molecular model is completed, the molecules are saved in the form of the latent vector space of the JTVAE model, and in the decoding, the molecules are saved in the form of SMILES string.
[0024] Further, when evaluating the molecular properties, the three indexes of Filters, Valid and Novelty are used to analyze the molecular properties.
[0025] The application further discloses a cyclic generative adversarial network molecular generation system based on embedded bidirectional long short-term memory.
[0026] The memory is used for storing executable instructions.
[0027] The processor is used for executing the executable instructions stored in the memory, and realizes the cyclic generative adversarial network molecular generation method based on embedded bidirectional long short-term memory.
[0028] The display is used for man-machine interaction, and the execution result includes a data set generated by data preprocessing, a model training result, a molecular decoding result, a molecular evaluation result and a molecular visualization result.
[0029] The application has the following beneficial effects:
[0030] The application embeds BiLSTM and attention mechanism into the generator and discriminator of the cyclic generative adversarial network respectively to form a new molecular model. The BiLSTM is embedded into the generator to capture the context information of the sequence, better model the sequence characteristics of the molecule, and improve the expression ability of the generator to the molecular structure. Meanwhile, the BiLSTM output is connected to the input after dimension reduction to improve the gradient transmission and enhance the learning ability of the model. The attention mechanism is embedded into the discriminator to help the discriminator focus on the key features, enhance the discrimination ability, and guide the generator to generate more realistic and diverse molecules. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a flowchart of the application.
[0032] Figure 2 is an evaluation diagram for analyzing the molecules by using the three indexes of Filters, Valid and Novelty.
[0033] Figure 3 is an analysis and evaluation diagram for the diversity and non-identity of the generated molecules.
[0034] Figure 4 is a molecular visualization diagram example.
[0035] Figure 5 is a molecular diagram generated by Aliphatic.
[0036] Figure 6 is a molecular diagram generated by Aromatic.
[0037] Figure 7is the molecular graph generated by Halogen.
[0038] Figure 8 is the molecular graph generated by HBA.
[0039] Figure 9 is the molecular graph generated by HBD. DETAILED DESCRIPTION
[0040] The application will be further described below with reference to the accompanying drawings.
[0041] The most important step in new drug development is to find suitable molecules, but the traditional method has a long cycle, high cost and may not get the desired results. The development of artificial intelligence technology promotes the development of drug research and development, and a series of frontier technologies of deep learning effectively improve the efficiency of drug research and development. The new generation of methods applied to drug design mainly focus on the generation of new molecules.
[0042] The application proposes a molecular generation method based on a recurrent generative adversarial network embedded with bidirectional long short-term memory, which has high generation ability and expressiveness and can explore known and unfamiliar areas of chemical space, providing a better choice for molecular generation.
[0043] The application proposes a molecular generation method based on a recurrent generative adversarial network embedded with bidirectional long short-term memory by embedding BiLSTM and attention mechanism into the generator and discriminator of the recurrent generative adversarial network respectively. Embedding BiLSTM into the generator can capture the context information of the sequence and better model the sequence features of the molecule, improving the expression ability of the generator to the molecular structure. At the same time, the BiLSTM output is connected to the input after dimension reduction, improving the gradient transmission and enhancing the learning ability of the model. Embedding the attention mechanism into the discriminator helps the discriminator focus on key features, enhances the discrimination ability, and guides the generator to generate more realistic and diverse molecules. The results show that the performance of the optimized model has been greatly improved, which improves the success rate, diversity and novelty while ensuring that the generated molecules are highly similar to the starting molecular structure. The generated molecules have higher medicinal potential and are more in line with the rules of medicinal chemistry.
[0044] The method of the application will be described in detail below.
[0045] As shown in Figure 1 , the steps of the application are:
[0046] S1: Collect molecules with effective chemical properties.
[0047] In order to screen out molecules that meet the conditions from the known molecular database and store them in the effective chemical molecular database, the following steps can be followed.
[0048] First, a known molecule database is obtained and ensured to be in SMILES format, and then the molecular skeleton and desired properties are determined according to the target molecular structure in the requirements.
[0049] S2: data preprocessing.
[0050] Each molecule in the database is evaluated and compared by designing a screening algorithm to determine whether it meets the target structure and desired properties. Finally, the molecules that meet the conditions are stored in an effective chemical molecule database for subsequent research and application.
[0051] The screened molecules are divided into two data sets according to the target properties and the target structure, one is the data set of the target structure, and the other is the data set of the properties. Finally, each type is divided into two data sets according to randomness as the classification basis, one is used as the test (i.e. test set), and the other is used as the training (i.e. training set).
[0052] S3: training molecule generates molecular model, outputs molecule in the form of latent space vector of JTVAE model.
[0053] The present application continues to use the symmetric structure of the recurrent generative adversarial network to construct a molecular model, which includes two identical generators, two discriminators, and is in a symmetric form, and BiLSTM (bidirectional long short-term memory network) is introduced in each generator. The training set is used to train the molecular model, so that the generator in the molecular model can generate molecules that can deceive the discriminator. After the molecular model is trained, the test set is input into the molecular model to generate molecules that retain the target structure and contain the target properties.
[0054] When training the molecular model, the generator G is first trained, the target structure data set X is input into the generator G, the target property data set Y is input into the discriminator D1, the generator G generates the molecule G(X) according to the input data set X, and the discriminator D1 judges the true or false of G(X) by learning the true data. After the discriminator D1 judges the true or false of G(X), an adversarial loss is formed. Then the target structure data set X is input into the discriminator D2, and G(X) generated by the generator G is input into the generator F to generate a new molecule F(G(X)), and the discriminator D2 judges whether F(G(X)) is true, that is, whether the final molecule can be generated and the target structure data set is highly similar, forming a cycle loss.
[0055] When G(X) is determined to be true in the above process, the discriminator D1 is trained, and when F(G(X)) is determined to be true, the discriminator D2 is trained. When the discriminator D1 re-determines G(X) to be false, the generator G is fed back with an adversarial loss, and when the discriminator D2 re-determines F(G(X)) to be false, the generator F is fed back with a cyclic adversarial loss. The weights and biases in the generator network are adjusted through the above two losses to make the generated G(X) and F(G(X)) more realistic. Through the continuous confrontation between the generator and the discriminator, the generated molecule is further improved, and the training is ended when the number of iterations reaches 100.
[0056] Wherein the data is processed by the generator (G, F) as follows:
[0057] The molecule mapped to the latent space vector of the JTVAE model is input into the embedding layer, and a low-latitude and more compact trainable representation can be obtained after the embedding layer. After the embedding layer, input into the BiLSTM layer, the 56x56 vector sequence output by the embedding layer is modeled in sequence. BiLSTM (Bidirectional Long Short-Term Memory Network) can better capture the context information in the sequence, which helps to extract the time sequence features of the molecule. Then input into the fully connected layer, further integrate the molecular features, facilitate the subsequent neural network layer to process information. After the fully connected layer, input into the Add layer, perform residual connection, add the data input into the embedding layer and the output of the previous fully connected layer, so that the information in the neural network can be better transmitted and flowed, so that the neural network can learn deeper molecular features. Then pass through the activation layer, so that the neural network has better nonlinear expression ability. Finally, pass through a fully connected layer, further integrate the molecular features, and output.
[0058] The present application takes the latent vector sampled from the latent space of the JTVAE model as input, extracts features and models sequences through BiLSTM. The bidirectional recurrent structure of BiLSTM helps to capture the context information of the input vector and generate more rich feature representation. Subsequently, the output of BiLSTM is dimensionally transformed through a Dense layer and connected with the original input vector to fuse the information of the latent vector and the original features, thereby enhancing the ability of the generator.
[0059] Wherein the data is processed by the discriminator as follows:
[0060] First, the real data or generated data is input into the fully connected layer (Dense layer), and the molecular features are extracted to provide better input and initialization for the subsequent process. After the output of the fully connected layer, the attention layer is entered, and the attention mechanism can better capture the important feature information of the molecule, so that the discriminator can better distinguish between real data and generated false data. Then, in turn, the fully connected layer and the attention layer are entered to further capture important features of the molecule. The authenticity is then mapped to a probability value between 0 and 1 using the activation function sigmoid. Finally, the output result of the fully connected layer with a dimension of 1 is output.
[0061] The discriminator adopts a stacked structure of one Dense layer and one attention mechanism, and a total of three times of stacking are performed. In each stacking process, the input vector is first subjected to feature extraction and dimension transformation through the Dense layer to obtain a set of low-dimensional feature representations. Then, the set of feature vectors are calculated through the attention mechanism to obtain the final representation of the feature set by weighting and summing the attention weights. Such stacking operation is repeated three times, gradually extracting and fusing features, so that the discriminator is more sensitive to distinguish the differences between generated molecules and real molecules, and improves the accuracy and effect of discrimination. The discriminator designed in this way can effectively distinguish between generated molecules and real molecules, and enhances the discrimination ability of the model.
[0062] S4: Decoding, converting the molecule from the latent space vector of the JTVAE model to SMILES form and outputting.
[0063] After the training is completed, it is saved in the form of a latent space vector of the JTVAE model, and decoded in the form of a SMILES string for easy subsequent molecular evaluation process and molecular visualization process. The decoded structure can also be viewed through the display connected to the server.
[0064] S5: Molecular property evaluation.
[0065] For example Figure 2 The molecules are analyzed by the three indicators of Filters, Valid, and Novelty to determine the effectiveness of the molecules generated by the method proposed in the application and the diversity of the generated molecules.
[0066] The novelty of the Halogen distribution is improved the most among the four different feature distributions, which means that the generated molecules have more unique physical and chemical properties. At the same time, the Aliphatic effectiveness distribution score is the highest, which means that the structure of the generated molecules is more stable and mature, and may have more extensive application and research value. In the filter evaluation, the HBD score is the highest, and the performance is the best. By filtering out molecules without HBD functional groups, the effectiveness and biological feasibility of the generated molecules can be improved. In the evaluation of molecular effectiveness, the four different distributions are obviously improved, which means that the method proposed in the present application can better learn the distribution rules of functional groups during the training process, so that the generated molecules meet the requirements of functional group distribution. Such molecules are more in line with the rules of medicinal chemistry and biological feasibility, and are more likely to be synthesized and applied in actual treatment.
[0067] Figure 3 The diversity and non-identity of the generated molecules are analyzed, and the molecules generated in the embodiment are under the feature distribution of the three functional groups of Aromatic, Halogen and HBD. The generated molecules have higher diversity and non-identity under the premise of ensuring the similarity of the structure to the original structure, which shows that the method proposed in the present application is not a simple replication of the original structure, but through the mutual opposition and bidirectional mechanism of the two groups of generators and discriminators in the generation, the randomness and creativity are increased, so that the method proposed in the present application can explore different molecular construction methods, functional group combinations and chemical reaction paths, etc. to generate more diverse molecular structures.
[0068] S6: Molecular visualization.
[0069] Finally, the visualization of the molecule can be realized in the form of a molecular graph. The visualized molecule can be observed through the display.
[0070] As Figure 4 , the visualization of the molecule is realized, the original data set is a two-aromatic ring molecule data set, and the target property is a molecule data set with higher flexibility. It can be seen from the figure that the generated molecule not only retains the structure of the original molecule data set but also contains the target property.
[0071] The present application can generate molecules with specific structural properties, such as increasing the number of aromatic rings, increasing the number of aliphatic rings, and adjusting the number of hydrogen bonds of the molecule.
[0072] Figure 5is a molecule generated by the Aliphatic CycleGAN-2L method, where the generated molecule is composed of two parts, G(X) and F(Y). G(X) is generated by inputting X into the generative model, retaining the structure of X while having the properties of Y, i.e., transforming from one aliphatic ring to two or three aliphatic rings, making the molecule have higher melting and boiling points. F(Y) and G(X) are the opposite case.
[0073] Figure 6 is a molecule generated by the Aromatic CycleGAN-2L method, where the generated molecule is composed of two parts, G(X) and F(Y). G(X) is generated by inputting X into the generative model, retaining the structure of X while having the properties of Y, i.e., transforming from two aromatic rings to one or three aromatic rings, making the molecule more stable or increasing the intermolecular interaction sites. F(Y) and G(X) are the opposite case.
[0074] Figure 7 is a molecule generated by the Halogen CycleGAN-2L method, where the generated molecule is composed of two parts, G(X) and F(Y). G(X) is generated by inputting X into the generative model, retaining the structure of X while having the properties of Y, i.e., transforming from no halogen to containing multiple halogens, increasing the reactivity of the molecule. F(Y) and G(X) are the opposite case.
[0075] Figure 8 is a molecule generated by the HBA CycleGAN-2L method, where the generated molecule is composed of two parts, G(X) and F(Y). G(X) is generated by inputting X into the generative model, retaining the structure of X while having the properties of Y, i.e., transforming from five hydrogen bond acceptors to less than five hydrogen bond acceptors, making the molecule less polar and less soluble. F(Y) and G(X) are the opposite case.
[0076] Figure 9 is a molecule generated by the HBD CycleGAN-2L method, where the generated molecule is composed of two parts, G(X) and F(Y). G(X) is generated by inputting X into the generative model, retaining the structure of X while having the properties of Y, i.e., transforming from one hydrogen bond donor to two or three hydrogen bond donors, making the molecule's hydrogen bond formation ability and properties increase. F(Y) and G(X) are the opposite case.
[0077] Table 1 is a table of the number of molecules generated by the molecular generation method based on the embedded bidirectional long short-term memory recurrent adversarial neural network. Under the five different functional group feature distributions of Aliphatic, Aromatic, Halogen, HBA, and HBD, the embodiment generates a large number of molecules that both retain the original structure and have the target property. As can be seen from the table, after training, our method can generate a very high number of molecules. This shows that the method proposed in the present application has high accuracy, excellent effect, and superior device performance.
[0078] Number of molecules generated X -> G (X) Y -> F (Y) Aliphatic 15469 2024 Aromatic 4682 5053 Halogen 10513 3211 HBD 9947 20691 HBA 7252 3631
[0079] Table 1
[0080] The above only describes the preferred embodiments of the present application, and it should be noted that those skilled in the art can make several improvements without departing from the principles of the present application, and these improvements should also be considered within the scope of protection of the present application.
Claims
1. A method for molecular generation based on a recurrent adversarial neural network with embedded bidirectional long short-term memory, characterized in that: Comprising the following steps: S1: Collecting molecules with effective chemical properties In order to screen out qualified molecules from the known molecular database and store them in the effective chemical molecular database, the following steps are taken; First, obtain the known molecular database and ensure that it is represented in SMILES format, then according to the target molecular structure in the requirements, determine the molecular skeleton and the desired properties; S2: Data set classification The screened molecules are divided into two data sets according to the target properties and the target structure, and then the molecules in each data set are randomly divided into test set and training set; S3: Training molecules Set up a molecular model, map the molecules in the test set and the training set represented in SMILES string form to the latent vector space of the JTVAE model, input the molecules in the training set in vector form, and through continuous training of the molecular model, finally make the molecular model generate molecules that retain the target structure and contain the target properties; input the molecules in the test set in vector form, and generate the final molecules; S4: Decoding The molecules mapped to the latent vector space of the JTVAE model are output in the form of SMILES string; S5: Evaluate the properties of the molecules and visualize the molecules in the form of molecular graphs; The molecular model uses the symmetric form of the recurrent generative adversarial network, including two symmetrically arranged generators and two symmetrically arranged discriminators; BiLSTM is introduced in each generator; The discriminator adopts a superimposed structure of one layer of Dense layer and one layer of attention mechanism, and a total of three superimpositions are performed.
2. The bidirectional long short-term memory embedded recurrent generative adversarial network based molecular generation method of claim 1, wherein: In step S2, The target properties include: solubility, drug activity, chemical reactivity; The target structure is: the number of benzene rings, the number of aliphatic rings, the number of hydrogen bond acceptors and donors, and the desired molecular skeleton.
3. The bidirectional long short-term memory embedded recurrent generative adversarial network based molecular generation method of claim 1, wherein: After the training of the molecular model is completed, the molecules are saved in the form of the latent vector space of the JTVAE model, and in the decoding, in the form of SMILES string.
4. The bidirectional long short-term memory embedded-based recurrent adversarial neural network molecular generation method of claim 1, wherein: When evaluating the properties of the molecules, the Filters, Valid, Novelty three indicators are used to analyze the properties of the molecules.
5. A bidirectional long short-term memory embedded recurrent generative adversarial network system for molecular generation, comprising: It includes: Memory for storing executable instructions; Processor for executing executable instructions stored in the memory to implement the embedded bidirectional long short-term memory based recurrent adversarial neural network molecular generation method of any one of claims 1 to 4; Display for human-computer interaction to view the execution results.