Descriptor-free quantitative structure-activity relationship classification model construction method based on lstm

CN115240792BActive Publication Date: 2026-09-11SHANGHAI MARITIME UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210920160.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-02
Publication Date
2026-09-11
Estimated Expiration
2042-08-02

AI Technical Summary

Technical Problem

但是,在机器学习中,特征描述符和测试集的选择是非常繁琐费劲的,且特征选择与合适的机器学习方法相结合是相当困难和不确定的

Benefits of technology

[0021] Beneficial effects: By adopting the LSTM-based descriptor-free structure-property relationship classification model construction method proposed in this invention, the problem that most existing QSAR works heavily rely on descriptors can be effectively solved, and the problem of constructing different molecular descriptors for different task requirements can be effectively solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115240792B_ABST
    Figure CN115240792B_ABST
Patent Text Reader

Abstract

The application provides an LSTM-based descriptor-free quantitative structure-activity relationship classification model construction method, including the following steps: S1, constructing a training sample: collecting a compound molecular activity dataset, calculating the SMILES string of the molecular structure of each compound by using the SMILES coding mode; performing word segmentation processing on each SMILES string, and then performing one-hot coding on the word segmentation result, and then converting the one-hot coding into a Word embedding word matrix; adding artificial labels to the Word embedding word matrix to distinguish active compounds and inactive compounds, and obtaining a training sample; S2, constructing an LSTM network model as a descriptor-free quantitative structure-activity relationship classification model; S3, training the LSTM network model through the training sample until the convergence condition is met. The application can directly construct and use a QSAR model from the SMILES linear text of a compound, without calculating any molecular descriptors, and can quickly and accurately predict the molecular activity of the compound.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of compound molecular activity prediction technology, specifically to a method for constructing a descriptorless quantitative structure-activity relationship classification model based on LSTM. Background Technology

[0002] Compared to traditional animal testing methods, which require significant economic and time costs, using computational models to directly predict the biological activity and other properties of new compounds is a promising strategy for achieving a more efficient drug discovery process. Quantitative structure-activity relationship (QSAR) primarily uses mathematical models to describe the relationship between molecular structure and a specific biological activity of a molecule. It is a computer modeling technique based on bioinformatics and has wide applications in new drug discovery and design, the toxicity of nanomaterials, and the prediction of compound toxicity.

[0003] While QSAR has opened new avenues for drug development, most researchers currently model QSAR models primarily using the physicochemical and biological properties of compounds as feature descriptors. These descriptors are currently mainly determined experimentally or calculated using software, and their selection largely depends on the researcher's experience, which can lead to bias. Furthermore, the industry commonly uses feature selection algorithms to construct test subsets to improve model quality and accelerate the modeling process. However, in machine learning, the selection of feature descriptors and test sets is extremely cumbersome and laborious, and combining feature selection with suitable machine learning methods is quite difficult and uncertain. As the above analysis shows, the current industry-used quantitative structure-activity relationship (QSAR) models based on feature descriptors for compound molecular activity analysis suffer from technical drawbacks such as complex computational processes and low accuracy.

[0004] [1]Wang W,Kim MT,Sedykh A,et al.Developing Enhanced Blood-BrainBarrierPermeability Models:Integrating External Bio-Assay Data in QSARModeling[J].PharmRes,2015,32(9):3055-65.

[0005] [2]Neves BJ,Braga RC,Melo-Filho CC,et al.QSAR-Based VirtualScreening:Advancesand Applications in Drug Discovery[J].Frontiers inPharmacology,2018,9:1275.

[0006] [3]Eklund M,Norinder U,Boyer S,et al.Choosing Feature Selection andLearning Algorithms in QSAR[J].Journal of Chemical Information and Modeling,2014,54(3):837-843. Summary of the Invention

[0007] Objective of the Invention: This invention aims to address the shortcomings of existing technologies by proposing a descriptor-free quantitative structure-activity relationship (QSAR) classification model construction method based on LSTM. Using the method described in this invention, QSAR models can be directly constructed and used from the linear text of compound SMILES without calculating any molecular descriptors. This eliminates some of the difficulties associated with traditional descriptor-based QSAR modeling, enabling rapid and accurate prediction of compound molecular activity.

[0008] Technical Solution: To achieve the above objectives, this invention proposes a method for constructing a descriptorless quantitative structure-activity relationship classification model based on LSTM. This method includes the following steps:

[0009] S1. Constructing training samples: Collect a dataset of compound molecular activity, and calculate the SMILES string of each compound molecular structure using the SMILES encoding method; perform word segmentation on each SMILES string, first perform one-hot encoding on the segmentation results, and then convert the one-hot encoding into a word embedding matrix; add manual labels to the word embedding matrix to distinguish between active and inactive compounds, and obtain training samples;

[0010] S2. Construct an LSTM network model as a descriptorless quantitative structure-activity relationship classification model;

[0011] S3. Train the LSTM network model using the training samples until the convergence condition is met.

[0012] Optionally, in step S1, the SMILES string is segmented using the jieba word segmentation library.

[0013] Optionally, in step S1, the one-hot encoding is converted into the Word embedding matrix using the word2vec word embedding model.

[0014] Optionally, in step S1, an artificial marker 1 is added to the Word embedding matrix of the active compound, and an artificial marker 0 is added to the Word embedding matrix of the inactive compound.

[0015] Optionally, the training steps of the LSTM network model include:

[0016] S31. The word embedding matrix is ​​directly used as the input feature of the LSTM network model, and a calculation loop is executed with a step size equal to the length of the corresponding SMILES string to map the molecules to the output activity of the LSTM network model.

[0017] S32. The output value of each neuron is fed back to the corresponding probability interval through the Softmax function of the LSTM network model, generating a probability value as the output, and then the node with the highest probability is selected as the output result of each point.

[0018] S33. The parameters of the LSTM network model are corrected using the mean squared error loss function, the expression of which is:

[0019]

[0020] In the formula, loss represents the mean squared error loss value. Let y represent the output probability value of the i-th training sample. i Let represent the actual value of the i-th training sample, and n represent the number of samples.

[0021] Beneficial effects: By adopting the LSTM-based descriptor-free structure-property relationship classification model construction method proposed in this invention, the problem that most existing QSAR works heavily rely on descriptors can be effectively solved, and the problem of constructing different molecular descriptors for different task requirements can be effectively solved. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating the method for constructing a descriptorless quantitative structure-activity relationship classification model based on LSTM in the embodiments.

[0023] Figure 2This is a schematic diagram illustrating the principle of converting one-hot encoding into a word embedding matrix in the embodiment.

[0024] Figure 3 This is a diagram of the LSTM model structure involved in the embodiment;

[0025] Figure 4 This is a schematic diagram illustrating the training process of the LSTM model involved in the embodiment;

[0026] Figure 5 This is a schematic diagram of the Dropout process of the LSTM model involved in the embodiment;

[0027] Figure 6 The test results of the KNN model, SVM model, RF model and LSTM model trained in this embodiment on the Cannabinoid CB1 receptor dataset are shown.

[0028] Figure 7 The test results of the KNN model, SVM model, RF model and LSTM model trained in this embodiment on the HERG dataset are shown.

[0029] Figure 8 The results are the test results of the KNN model, SVM model, RF model and LSTM model trained in this embodiment on the Cannabinoid CB2 receptor dataset. Detailed Implementation

[0030] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments. However, it should be understood that the present invention can be implemented in various forms. The exemplary and non-limiting embodiments shown in the drawings and described below are not intended to limit the invention to the specific embodiments illustrated.

[0031] It should be understood that, where technically feasible, the technical features listed below for different embodiments can be combined with each other to form other embodiments within the scope of this invention. Furthermore, the specific examples and embodiments described in this invention are non-limiting, and corresponding modifications can be made to the structures, steps, and order described above without departing from the protection scope of this invention.

[0032] This invention aims to address the problem of predicting the molecular activity of compounds by providing a descriptor-free quantitative structure-activity relationship classification model based on LSTM. This method can effectively solve the problem that most existing QSAR works heavily rely on descriptors, thereby improving the efficiency and performance of QSAR modeling.

[0033] like Figure 1The diagram shows a flowchart of the method for constructing a descriptorless quantitative structure-activity relationship classification model based on LSTM according to the present invention. The process specifically includes two parts: the construction of training samples and the descriptorless quantitative structure-activity relationship classification model. The specific contents of these two parts will be described in detail below.

[0034] (I) Construction of training samples

[0035] Constructing training samples: After obtaining the molecular activity dataset through relevant methods, active compounds were selected and labeled as 1, while inactive compounds were labeled as 0. The unique representation of the compound molecular structure SMILES was calculated using the RDKit package in Python 3.7, i.e., the SMILES string. Each SMILES string was then segmented using the jieba word segmentation library, followed by one-hot encoding. Finally, word embedding methods such as word2vec were used to transform each word into a one-hot word vector and then into a word embedding matrix. The transformation process is as follows: Figure 2 As shown. At this point, the molecular structure of each compound has been converted into a labeled word embedding matrix, which is the training sample.

[0036] (II) Training the Long Short-Term Memory Network Model (LSTM)

[0037] First, build an LSTM model, the structure of which is as follows: Figure 3 As shown. Then, the model is trained using the constructed training samples. The specific training process is as follows. Figure 4 As shown:

[0038] (1) The word embedding matrix is ​​directly used as the input feature of the LSTM model, and the computation loop is executed with the same number of steps as the length of the input SMILES encoding to map the molecules to the output activity.

[0039] (2) The output value of each neuron is fed back into a certain probability interval through the Softmax function, generating a probability value as the output. Then, the node with the highest probability is selected as the output result of each point.

[0040] (3) The calculation formula is as follows: The model is corrected using the mean square error loss function.

[0041]

[0042] In the formula, loss represents the mean squared error loss value. The smaller the loss value, the better the model classification performance. Let y represent the output probability value of the i-th training sample. i Let represent the actual value of the i-th training sample, and n represent the number of samples.

[0043] (4) Continuously train the LSMT model until the loss reaches the preset convergence condition.

[0044] In the training process described above, we used a 9:1 ratio to divide the training set and the hyperparameter tuning set. The training set was used to train the LSTM neural network model, and the hyperparameter tuning set was used to adjust the hyperparameters. Adjusting the values ​​of various hyperparameters is crucial for successfully training the LSTM network and determining the network structure. The main hyperparameters are the learning rate, the number of hidden neurons in the LSTM, the batch size, the number of training epochs, and the dropout rate. A combination of systematic search and experimentation was used to determine the appropriate values ​​of the hyperparameters. The number of hidden neurons varied to 64, 128, 256, and 512, and the batch size varied to 28, 64, 128, 256, 512, and 1024. The number of training epochs was determined by observing when the prediction accuracy stopped improving during training. In this embodiment, we used Dropout for regularization to prevent overfitting. The dropout rate is part of a regularization technique to prevent overfitting. Its value was gradually increased from zero (i.e., 0, 0.1, 0.2, 0.3, etc.) and the process was stopped when the prediction accuracy of the training and validation sets was approximately the same. The specific process is as follows: Figure 5 As shown, in the training process of a deep learning network, the Dropout neural network temporarily discards neural network units from the original network with a certain probability.

[0045] Simultaneously, 10-fold cross-validation was performed: 10% of the compounds were removed from the molecular activity dataset, the remaining 90% were used as the training set for model construction, and the excluded 10% of compounds were used as the test set. This process was repeated 10 times.

[0046] To verify the effectiveness of the LSTM model, this embodiment inputs a test set after the LSTM model is trained and calculates four evaluation metrics for the binary classification model (molecular activity: active / inactive): precision, recall, accuracy, and F-function.

[0047] We selected three human protein activity datasets: the Cannabinoid CB1 receptor dataset, the Cannabinoid CB2 receptor dataset, and the HERG dataset. The word embedding matrix of each compound's molecular structure from these three datasets was input into an LSTM model for testing. For comparative experiments, six 2D descriptors from the same dataset were selected as input features for training three major classification models: KNN, SVM, and RF. These six 2D descriptors were: molecular weight (MolWt), number of hydrogen bond donors (NumHDonors), number of hydrogen bond acceptors (NumHAcceptors), number of rotatable bonds (NumRotatable-Bonds), lipophilicity (MolLogP), and topological polar surface area (TPSA). Finally, the test results were compared. Figure 6 The test results of the KNN model, SVM model, RF model, and the LSTM model trained in this embodiment on the Cannabinoid CB1 receptor dataset are presented. Figure 7 The test results of the KNN model, SVM model, RF model, and the LSTM model trained in this embodiment on the HERG dataset are presented. Figure 8 The test results of the KNN model, SVM model, RF model, and the LSTM model trained in this embodiment on the Cannabinoid CB2 receptor dataset are presented. Figure 6 , Figure 7 , Figure 8 In the figure, the vertical axis represents Acc precision, P precision, R recall, and F function.

[0048] Depend on Figure 6 , Figure 7 , Figure 8 As can be seen, the LSTM model constructed in this embodiment exhibits better performance than the combination of traditional descriptors and machine learning.

[0049] In neural networks, the accuracy of prediction results largely depends on feature selection, and while existing descriptors each encode different information, no single representation can be universally effective across all tasks. Therefore, using SMILES strings representing molecular structures replaces the complex feature selection process. These SMILES strings, as expressions of molecular structures, represent the chemical characteristics of compounds by converting the three-dimensional chemical structure of the molecule into a string output. This method preserves all molecular information in a more concise and accurate way, offering uniqueness, saving space, and accelerating information retrieval. It avoids prediction bias caused by inappropriate molecular descriptor selection and significantly reduces the time cost of feature engineering. Furthermore, this embodiment utilizes the deep learning capabilities of Long Short-Term Memory networks to directly learn concise and expressive features from the SMILES strings of molecular structures, eliminating the need for additional engineering and expert coding, thus avoiding the traditional process of manually discovering and creating descriptors.

[0050] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0051] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A method for analyzing the activity of a compound, characterized by, Including the following steps: S1. Constructing training samples: Collect a dataset of compound molecular activity, and calculate the SMILES string of each compound molecular structure using the SMILES encoding method; perform word segmentation on each SMILES string, first perform one-hot encoding on the segmentation results, and then convert the one-hot encoding into a word embedding matrix; add manual labels to the word embedding matrix to distinguish between active and inactive compounds, and obtain training samples; S2. Construct an LSTM network model as a descriptorless quantitative structure-activity relationship classification model; S3. Train the LSTM network model using the training samples until the convergence condition is met; The trained LSTM network model is used to receive the word embedding matrix converted from the SMILES string of the molecular structure of the compound to be analyzed, and output the results of the molecular activity analysis of the compound.

2. The method according to claim 1, characterized in that, In step S1, the SMILES string is segmented using the jieba word segmentation library.

3. The method according to claim 1 or 2, characterized in that, In step S1, the one-hot encoding is converted into the Word embedding matrix using the word2vec word embedding model.

4. The method according to claim 3, characterized in that, In step S1, an artificial marker 1 is added to the Word embedding matrix of the active compound, and an artificial marker 0 is added to the Word embedding matrix of the inactive compound.

5. The method according to claim 1, characterized in that, The training steps for the LSTM network model include: S31. The word embedding matrix is ​​directly used as the input feature of the LSTM network model, and a calculation loop is executed with a step size equal to the length of the corresponding SMILES string to map the molecules to the output activity of the LSTM network model. S32. The output value of each neuron is fed back to the corresponding probability interval through the Softmax function of the LSTM network model, generating a probability value as the output, and then the node with the highest probability is selected as the output result of each point. S33. The parameters of the LSTM network model are corrected using the mean squared error loss function, the expression of which is: , In the formula: Let i be the output probability value of the i-th sample. Let be the actual value of the i-th sample, and n be the sample value. The smaller the value of the loss function, the better the model classification effect.

Citation Information

Patent Citations

  • Drug small molecule activity prediction method based on bidirectional long-short memory model

    CN111640471A