Processing method and apparatus for stacked integrated model for molecular attribute prediction
Through a two-level stacked integrated model, multiple base learners and meta-learners are used for molecular attribute prediction, which achieves effective processing of multi-scale molecular representations, improves prediction accuracy and generalization ability, and solves the problem of single structure of the QSAR model. and the problem of insufficient molecular characterization.
Patent Information
- Application Number
- PCT/CN2023/130061
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-12
- Filing Date
- 2023-11-07
- Publication Date
- 2024-10-17
AI Technical Summary
The existing QSAR model has a single structure, a single molecular representation scale, and lacks support for 3D molecular conformation, resulting in insufficient prediction accuracy and generalization ability.
A two-level stacked ensemble model is adopted. The first level introduces multiple parallel base learners to predict multi-scale molecular representations and scores them. The second level introduces meta-learners to refine the prediction results, and obtains the final result through average calculation.
It improves the generalization ability and prediction accuracy of the model, and solves the problems of a single model structure and a single molecular representation scale.
Smart Images

Figure CN2023130061_17102024_PF_FP_ABST
Abstract
Description
Processing method and device for stacked integrated model for molecular property prediction
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 12, 2023, with application number 202310389668.9 and invention name “Processing method and device of stacked integrated model for molecular property prediction”. Technical Field
[0002] The present invention relates to the field of data processing technology, and in particular to a processing method and device for a stacked integrated model for molecular property prediction. Background Art
[0003] QSAR (Quantitative structure–activity relationship) is an important component of drug discovery, environmental toxicology, and chemical risk assessment. In QSAR analysis, a group of compounds with known molecular properties are used to develop a statistical model that correlates the compound's molecular structure with its properties. This model is then used to predict the corresponding molecular properties based on the molecular structure. In practice, we have found that such models often have the following shortcomings: 1) The model structure is simple, and the implementation of such models is either based on a simple machine learning model or a single neural network model; 2) The molecular representation scale of the model input is single, either a one-dimensional molecular sequence similar to the SMILES format, a molecular descriptor and / or molecular fingerprint with one-dimensional feature data, or a 2D molecular graph with two-dimensional feature data, and lacks support for 3D molecular conformations.
[0004] Summary of the Invention
[0005] The purpose of the present invention is to provide a processing method, device, electronic device and computer-readable storage medium for a stacked integrated model for molecular property prediction based on the defects of the prior art. A two-level stacked integrated model framework is constructed based on the integrated model theory. In the first level, multiple parallel base learners (machine learning models, neural network models or pre-trained models) are introduced to realize the molecular property prediction ability of multi-scale molecular characterization (molecular fingerprints, molecular descriptors, 1D molecular sequences, 2D molecular graphs, 3D molecular conformations) and score the prediction results of each base learner in the first level. In the second level, multiple parallel meta-learners (machine learning models) are introduced to realize further refinement of the rough prediction results of the first level output and obtain the final molecular property prediction results by averaging all the refined prediction results; and before applying the integrated model, the model is trained in an integrated training mode. The present invention can solve the problems of single model structure and single molecular characterization scale in the conventional scheme, and the generalization ability and prediction accuracy of the model can be further improved by the integrated model prediction mode of stacking models in parallel and serially advancing two-level models of the present invention.
[0006] To achieve the above objectives, a first aspect of an embodiment of the present invention provides a method for processing a stacked integrated model for molecular property prediction, the method comprising:
[0007] The integration model constructed based on the two-level stacking mechanism is recorded as the corresponding first integration model;
[0008] Performing model training on the first integrated model based on a preset original data set;
[0009] If the model training is successful, molecular property prediction processing is performed based on the first integrated model.
[0010] Preferably, the first integrated model includes a data preprocessing module, a molecular multimodal representation processing module, a first-level stacked base learner processing module and a second-level stacked meta-learner processing module; the molecular multimodal representation processing module includes a molecular fingerprint processing unit, a molecular descriptor processing unit, a one-dimensional molecular sequence processing unit, a two-dimensional molecular graph processing unit and a three-dimensional molecular conformation processing unit; the first-level stacked base learner processing module includes a multimodal fusion unit, a plurality of parallel stacked base learners and an evaluation unit; the second-level stacked meta-learner processing module includes a first-level prediction screening unit, a plurality of parallel stacked meta-learners and a second-level prediction averaging unit;
[0011] The input ends of the molecular fingerprint processing unit, the molecular descriptor processing unit, the one-dimensional molecular sequence processing unit, the two-dimensional molecular graph processing unit, and the three-dimensional molecular conformation processing unit are respectively connected to the data preprocessing module, and the output ends are respectively connected to the multimodal fusion unit; multiple output ends of the multimodal fusion unit are respectively connected to the input end of each of the base learners; the output end of each of the base learners is connected to the input end of the evaluation unit; the output end of the evaluation unit is connected to the input end of the first-level prediction and screening unit; multiple output ends of the first-level prediction and screening unit are connected to the input end of each of the meta learners; the output end of each of the meta learners is connected to the input end of the second-level prediction averaging unit; the output end of the second-level prediction averaging unit is the model output end of the first integrated model;
[0012] The base learner is a first-level molecular property prediction model implemented based on a machine learning model, a neural network model or a pre-trained model, with a fused feature tensor that integrates multimodal molecular features as input, wherein the machine learning model includes a GBDT model, an extraTree model, an LR model, an MLP neural network and an SVM model, and the pre-trained model includes a BERT model, a graph neural network model, an SE(3) equivariant neural network model and a Uni-Mol model; the meta-learner is a second-level molecular property prediction model implemented based on a machine learning model, with a primary screening molecular property tensor as input; wherein the machine learning model includes a GBDT model, an extraTree model, an LR model, an MLP neural network and an SVM model.
[0013] Preferably, the performing model training on the first integrated model based on a preset original data set specifically includes:
[0014] The original data set is input into the data preprocessing module for molecular data anomaly detection processing and label data normalization processing to obtain a corresponding preprocessed data set; the original data set has a plurality of first original data; the first original data includes a first molecular data in a SMILES format and a corresponding first molecular attribute label, the first molecular attribute label includes a plurality of molecular attribute types and their corresponding attribute values; the preprocessed data set includes a plurality of first preprocessed data; the first preprocessed data includes a second molecular data in a SMILES format and a corresponding second molecular attribute label, the second molecular attribute label includes a plurality of molecular attribute types and their corresponding attribute values;
[0015] Inputting the preprocessed data set into the molecular multimodal characterization processing module for multimodal molecular characterization recognition processing to generate a corresponding first data set; the first data set includes a plurality of first molecular characterization data; the first molecular characterization data includes a molecular fingerprint feature tensor, a molecular descriptor feature tensor, a one-dimensional molecular feature tensor, a two-dimensional molecular graph feature tensor, a three-dimensional molecular conformation feature tensor and a third molecular attribute label;
[0016] Inputting the first data set into the first-level stacked base learner processing module for first-level model training to obtain a corresponding first output data set; the first output data set includes a plurality of first-base learner output data; the first-base learner output data includes a plurality of first batch output data; the first batch output data includes a first prediction-label pair set and a first cross-validation score; the first prediction-label pair set includes a plurality of first prediction-label pairs; the first prediction-label pair includes a first attribute prediction tensor and the fourth molecular attribute label;
[0017] The first output data set is input into the secondary stacked meta-learner processing module for secondary model training.
[0018] Furthermore, the raw data set is input into the data preprocessing module to perform molecular data anomaly detection processing and label data normalization processing to obtain a corresponding preprocessed data set, specifically including:
[0019] Inputting the original data set into the data preprocessing module;
[0020] The data preprocessing module performs abnormal data identification on all the first raw data according to the 3 sigma principle, and marks the first raw data that are not identified as abnormal data as normal raw data; and extracts the first molecular attribute labels of all the normal raw data to form a corresponding normal label set;
[0021] The data preprocessing module extracts all attribute values of any molecular attribute type in the normal label set to form a corresponding first value sequence; and calculates the skewness of the first value sequence to obtain a corresponding first skewness; and when the first skewness is less than or equal to a set threshold, normalizes the first value sequence based on a standard Gaussian transform to obtain a corresponding normalized value sequence; and when the first skewness is greater than the set threshold, identifies whether the minimum value of the first value sequence is greater than 0. If so, normalizes the first value sequence based on a Box-Cox transform to obtain the corresponding normalized value sequence; otherwise, normalizes the first value sequence based on a Yeo-Johnson transform to obtain the corresponding normalized value sequence; and replaces the corresponding attribute values in the normal label set with the normalized attribute values of the obtained normalized value sequence;
[0022] The data preprocessing module uses each of the first molecular attribute labels in the normal label set that has completed the normalized attribute value replacement as the corresponding second molecular attribute label, and uses the first molecular data of the normal original data corresponding to each of the second molecular attribute labels as the corresponding second molecular data, and each of the second molecular data and the corresponding second molecular attribute label constitutes the corresponding first preprocessed data; and all the obtained first preprocessed data constitute the corresponding preprocessed data set.
[0023] Furthermore, the step of inputting the preprocessed data set into the molecular multimodal characterization processing module to perform multimodal molecular characterization recognition processing to generate a corresponding first data set specifically includes:
[0024] Inputting the preprocessed data set into the molecular multimodal characterization processing module;
[0025] The molecular fingerprint processing unit of the molecular multimodal characterization processing module performs molecular fingerprint feature extraction processing on the second molecular data of each of the first preprocessed data according to a preset fingerprint format to generate the corresponding molecular fingerprint feature tensor; the preset fingerprint format includes Morgan fingerprint format, ECFP fingerprint format, MACCS fingerprint format, RDKit fingerprint format and Topological fingerprint format;
[0026] The molecular descriptor processing unit of the molecular multimodal characterization processing module performs multi-class descriptor feature extraction processing on the second molecular data of each of the first preprocessed data according to a preset descriptor type set to generate the corresponding molecular descriptor feature tensor; the descriptor type set includes multiple molecular descriptor types;
[0027] The one-dimensional molecular sequence processing unit of the molecular multimodal characterization processing module performs one-dimensional feature extraction processing on the second molecular data of each of the first preprocessed data using a preset one-dimensional feature extraction model to generate the corresponding one-dimensional molecular feature tensor; the one-dimensional feature extraction model includes a Transformer model, a BERT-like model, and a K-BERT model;
[0028] The two-dimensional molecular graph processing unit of the molecular multimodal characterization processing module uses a preset two-dimensional feature extraction model to perform two-dimensional molecular graph feature extraction processing on the second molecular data of each first preprocessed data to generate the corresponding two-dimensional molecular graph feature tensor; the two-dimensional feature extraction model includes a GROVER model, a MOLCLR model, a KPGT model, and a HIGNN model;
[0029] The three-dimensional molecular conformation processing unit of the molecular multimodal characterization processing module uses a preset three-dimensional feature extraction model to perform three-dimensional molecular conformation feature extraction processing on the second molecular data of each first preprocessed data to generate the corresponding three-dimensional molecular conformation feature tensor; the three-dimensional feature extraction model includes an EGNN model, an SE(3) equivariant neural network and a Uni-Mol model;
[0030] and the molecular multimodal characterization processing module uses the second molecular attribute label of each first preprocessed data as the corresponding third molecular attribute label;
[0031] The molecular multimodal characterization processing module combines the molecular fingerprint feature tensor, the molecular descriptor feature tensor, the one-dimensional molecular feature tensor, the two-dimensional molecular graph feature tensor, the three-dimensional molecular conformation feature tensor and the third molecular attribute label corresponding to each of the first preprocessed data into the corresponding first molecular characterization data; and all the obtained first molecular characterization data form the corresponding first data set.
[0032] Furthermore, inputting the first data set into the first-level stacked base learner processing module for first-level model training to obtain a corresponding first output data set specifically includes:
[0033] Inputting the first data set into the first-level stacked base learner processing module;
[0034] The multimodal fusion unit of the first-level stacked base learner processing module creates a corresponding training data set for each base learner and records it as a first learner data set; and uses any one of the first molecular characterization data of the first data set as the corresponding current molecular characterization data; and extracts the molecular fingerprint feature tensor, the molecular descriptor feature tensor, the one-dimensional molecular feature tensor, the two-dimensional molecular graph feature tensor, and the three-dimensional molecular conformation feature tensor in the current molecular characterization data to form a corresponding current feature tensor sequence, and extracts the third molecular attribute label of the current molecular characterization data as the corresponding fourth molecular attribute label; and traverses each first correspondence record of the preset first correspondence table reflecting the correspondence between the fusion tensor and the base learner, and uses the currently traversed first correspondence record as the corresponding current record during the traversal, and extracts the first fusion tensor feature range field and the first base learner identification field of the current record as the corresponding current feature range and current base learner identification, and extracts the base learner that matches the current base learner identification. The device is used as the corresponding current base learner, and multimodal feature fusion is performed on one or more feature tensors in the current feature tensor sequence that match the current feature range to obtain a corresponding first molecular fusion feature tensor, and the first molecular fusion feature tensor and the corresponding fourth molecular attribute label form the corresponding first learner data, and a correspondence is established between the first learner data and the current base learner identifier; and at the end of the traversal, each of the obtained first learner data is stored in the first learner data set corresponding to each; the first correspondence table includes a plurality of first correspondence records; the first correspondence record includes the first fusion tensor feature range field and the first base learner identifier field; the first fusion tensor feature range field includes fingerprint feature type, descriptor feature type, one-dimensional feature type, two-dimensional feature type and three-dimensional feature type; the first learner data set corresponds to the base learner one-to-one; the first learner data set includes a plurality of first learner data; the first learner data includes the first molecular fusion feature tensor and the fourth molecular attribute label;
[0035] The first-level stacked base learner processing module divides each of the first learner data sets into two data sets according to a preset ratio: a first training data set and a first validation data set; and the first training data set is equally divided into multiple data subsets recorded as corresponding single-batch training data subsets; and based on each of the single-batch training data subsets, the corresponding base learners are trained batch by batch; and in each batch model training, Focal Loss+GHM is used. loss as the model training loss function; and at the end of each batch of model training, the base learner is used to perform molecular attribute prediction processing on each of the first molecular fusion feature tensors of the first verification data set to generate the corresponding first attribute prediction tensor, and each of the first attribute prediction tensors and the corresponding fourth molecular attribute label constitutes the corresponding first prediction-label pair, and all the obtained first prediction-label pairs constitute the corresponding first prediction-label pair set, and the evaluation unit performs cross-validation scoring on the first prediction-label pair set to obtain the corresponding first cross-validation score, and the first prediction-label pair set and the first cross-validation score constitute the corresponding first batch output data; and at the end of all batch model training, all the obtained first batch output data constitute the corresponding first base learner output data; and the first base learner output data corresponding to all the base learners constitute the corresponding first output data set.
[0036] Furthermore, inputting the first output data set into the secondary stacked meta-learner processing module for secondary model training specifically includes:
[0037] Inputting the first output data set into the secondary stacked meta-learner processing module;
[0038] The first-level prediction screening unit of the second-level stacked meta-learner processing module screens out all the first prediction-label pairs in the first output data set corresponding to the first cross-validation score that is higher than a preset score threshold to form a corresponding second data set; and performs model training on each of the meta-learners based on the second data set in a KFold training method; and in the model training, uses Focal Loss+GHM loss as the model training loss function.
[0039] Preferably, the molecular property prediction process based on the first integrated model specifically includes:
[0040] Get the molecular data in SMILES format input by the user as the corresponding current molecular data;
[0041] Inputting the current molecular data into the data preprocessing module, and performing abnormal data identification on the current molecular data by the data preprocessing module according to the 3 sigma principle to obtain a corresponding first identification result; the first identification result includes abnormal data and non-abnormal data;
[0042] When the first recognition result is non-abnormal data, the current molecular data is input into the molecular multimodal characterization processing module, and the molecular fingerprint processing unit performs molecular fingerprint feature extraction processing on the current molecular data according to a preset fingerprint format to generate a corresponding first molecular fingerprint feature tensor; and the molecular descriptor processing unit performs multi-class descriptor feature extraction processing on the current molecular data according to a preset descriptor type set to generate a corresponding first molecular descriptor feature tensor; and the one-dimensional molecular sequence processing unit uses a preset one-dimensional feature extraction model to perform one-dimensional feature extraction processing on the current molecular data to generate a corresponding first one-dimensional molecular feature tensor; and the two-dimensional molecular graph processing unit uses a preset two-dimensional feature extraction model to perform two-dimensional molecular graph feature extraction processing on the current molecular data to generate a first two-dimensional molecular graph feature tensor; and the three-dimensional molecular conformation processing unit uses a preset three-dimensional feature extraction model to perform three-dimensional molecular graph feature extraction processing on the current molecular data The method comprises the following steps: generating a first three-dimensional molecular conformation feature tensor; and forming corresponding second molecular characterization data by the first molecular fingerprint feature tensor, the first molecular descriptor feature tensor, the first one-dimensional molecular feature tensor, the first two-dimensional molecular graph feature tensor, the first three-dimensional molecular conformation feature tensor and the first third molecular attribute label; the preset fingerprint format comprises a Morgan fingerprint format, an ECFP fingerprint format, a MACCS fingerprint format, an RDKit fingerprint format and a Topological fingerprint format; the descriptor type set comprises a plurality of molecular descriptor types; the one-dimensional feature extraction model comprises a Transformer model, a BERT-like model and a K-BERT model; the two-dimensional feature extraction model comprises a GROVER model, a MOLCLR model, a KPGT model and a HIGNN model; the three-dimensional feature extraction model comprises an EGNN model, an SE(3) equivariant neural network and a Uni-Mol model;
[0043] The second molecular characterization data is input into the multimodal fusion unit of the first-level stacked base learner processing module, and the multimodal fusion unit traverses each first correspondence record of the preset first correspondence table reflecting the correspondence between the fusion tensor and the base learner; and when traversing, the first correspondence record currently traversed is used as the corresponding current record; and the first fusion tensor feature range field and the first base learner identification field of the current record are extracted as the corresponding current feature range and current base learner identification; and the base learner matching the current base learner identification is used as the corresponding current base learner; and multimodal feature fusion is performed on one or more feature tensors matching the current feature range in the second molecular characterization data to obtain the corresponding first base learner. Two molecular fusion feature tensors, and establish a correspondence between the second molecular fusion feature tensor and the current base learner identifier; and at the end of the traversal, each of the obtained second molecular fusion feature tensors is input into the corresponding base learner for molecular attribute prediction processing to obtain a corresponding second attribute prediction tensor; and the evaluation unit cross-validates and scores each of the second attribute prediction tensors to obtain a corresponding second cross-validation score; the first correspondence table includes a plurality of first correspondence records; the first correspondence record includes the first fusion tensor feature range field and the first base learner identifier field; the first fusion tensor feature range field includes fingerprint feature type, descriptor feature type, one-dimensional feature type, two-dimensional feature type and three-dimensional feature type;
[0044] The first-level stacked base learner processing module combines each second cross-validation score and the corresponding second attribute prediction tensor into corresponding second output data; and all the obtained second output data form a corresponding second output data set;
[0045] The second output data set is input into the second-level stacked meta-learner processing module, and the first-level prediction screening unit screens out the second attribute prediction tensors corresponding to the second cross-validation scores that are higher than a preset score threshold in the second output data set to form a corresponding first tensor sequence; and each of the meta-learners performs molecular attribute prediction processing on each of the second attribute prediction tensors in the first tensor sequence to obtain a corresponding third attribute prediction tensor; and all the obtained third attribute prediction tensors form a corresponding second tensor sequence;
[0046] The second tensor sequence is input into the secondary prediction averaging unit of the secondary stacked meta-learner processing module, and the secondary prediction averaging unit calculates the mean of all the third attribute prediction tensors of the second tensor sequence according to the molecular attribute type dimension to obtain the corresponding fourth attribute prediction tensor; and outputs the fourth attribute prediction tensor as the model prediction result of the first integrated model.
[0047] A second aspect of an embodiment of the present invention provides a device for implementing the processing method of the stacked integrated model for molecular property prediction described in the first aspect, the device comprising: a model construction module, a model training module, and a model application module;
[0048] The model building module is used to build an integrated model based on a two-level stacking mechanism, which is recorded as the corresponding first integrated model;
[0049] The model training module is used to perform model training on the first integrated model based on a preset original data set;
[0050] The model application module is used to perform molecular property prediction processing based on the first integrated model after the model training is successful.
[0051] A third aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0052] The processor is configured to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps described in the first aspect above;
[0053] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0054] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a computer, the computer executes the instructions of the method described in the first aspect above.
[0055] The embodiment of the present invention provides a processing method, device, electronic device and computer-readable storage medium for a stacked integrated model for molecular property prediction. Based on the integrated model theory, a two-level stacked integrated model framework is constructed. In the first level, multiple parallel base learners (machine learning models, neural network models or pre-trained models) are introduced to realize the molecular property prediction ability of multi-scale molecular representation (molecular fingerprint, molecular descriptor, 1D molecular sequence, 2D molecular graph, 3D molecular conformation) and score the prediction results of each base learner in the first level. In the second level, multiple parallel meta-learners (machine learning models) are introduced to realize further refinement of the rough prediction results of the first level output and obtain the final molecular property prediction results by averaging all the refined prediction results; and before applying the integrated model, the model is trained in an integrated training mode. The present invention solves the problems of single model structure and single molecular representation scale in conventional schemes, and further improves the generalization ability and prediction accuracy of the model through the integrated model prediction mode of stacking models in parallel at all levels and serially advancing two-level models of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] FIG1 is a schematic diagram of a processing method of a stacked integrated model for molecular property prediction provided in Example 1 of the present invention;
[0057] FIG2 is a model structure diagram of a first integrated model provided in Example 1 of the present invention;
[0058] FIG3 is a module structure diagram of a processing device for a stacked integrated model for molecular property prediction provided by a second embodiment of the present invention;
[0059] FIG4 is a schematic structural diagram of an electronic device provided in a third embodiment of the present invention. DETAILED DESCRIPTION
[0060] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described herein are merely some, rather than all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0061] Embodiment 1 of the present invention provides a method for processing a stacked integrated model for molecular property prediction. FIG1 is a schematic diagram of a method for processing a stacked integrated model for molecular property prediction provided by embodiment 1 of the present invention. The method mainly includes the following steps:
[0062] Step 1: construct an integrated model based on a two-level stacking mechanism, which is recorded as the corresponding first integrated model;
[0063] 2 is a model structure diagram of the first integrated model provided in Example 1 of the present invention, the first integrated model includes a data preprocessing module, a molecular multimodal representation processing module, a first-level stacked base learner processing module and a second-level stacked meta-learner processing module; the molecular multimodal representation processing module includes a molecular fingerprint processing unit, a molecular descriptor processing unit, a one-dimensional molecular sequence processing unit, a two-dimensional molecular graph processing unit and a three-dimensional molecular conformation processing unit; the first-level stacked base learner processing module includes a multimodal fusion unit, a plurality of parallel stacked base learners and an evaluation unit; the second-level stacked meta-learner processing module includes a first-level prediction screening unit, a plurality of parallel stacked meta-learners and a second-level prediction averaging unit;
[0064] The input ends of the molecular fingerprint processing unit, the molecular descriptor processing unit, the one-dimensional molecular sequence processing unit, the two-dimensional molecular graph processing unit, and the three-dimensional molecular conformation processing unit are respectively connected to the data preprocessing module, and the output ends are respectively connected to the multimodal fusion unit; multiple output ends of the multimodal fusion unit are respectively connected to the input ends of each base learner; the output end of each base learner is connected to the input end of the evaluation unit; the output end of the evaluation unit is connected to the input end of the first-level prediction and screening unit; multiple output ends of the first-level prediction and screening unit are connected to the input ends of each meta learner; the output end of each meta learner is connected to the input end of the second-level prediction averaging unit; the output end of the second-level prediction averaging unit is the model output end of the first integrated model;
[0065] The base learner is a first-level molecular property prediction model implemented based on a machine learning model, a neural network model or a pre-trained model, which takes a fusion feature tensor that integrates multimodal molecular features as input, wherein the machine learning model and the neural network model at least include a gradient boosting decision tree (GBDT) model, an extra tree model, a logistic regression (LR) model, a multilayer perceptron (MLP) neural network and a support vector machine (SVM) model, and the pre-trained model at least includes a BERT (Bidirectional Encoder Representation from Transformers) model, a graph neural network (GNN) model, an SE(3) equivariant neural network model and a Uni-Mol model;
[0066] The meta-learner is a secondary molecular property prediction model based on a machine learning model that takes the primary screening molecular property tensor as input; among them, the machine learning model includes the GBDT model, extraTree model, LR model, MLP neural network and SVM model.
[0067] Step 2: Perform model training on the first integrated model based on a preset original data set;
[0068] Specifically comprising: step 21, inputting the original data set into the data preprocessing module to perform molecular data anomaly detection processing and label data normalization processing to obtain a corresponding preprocessed data set;
[0069] The original data set includes a plurality of first original data; the first original data includes a first molecule data in a SMILES format and a corresponding first molecule attribute tag, the first molecule attribute tag includes a plurality of molecule attribute types and their corresponding attribute values; the preprocessed data set includes a plurality of first preprocessed data; the first preprocessed data includes a second molecule data in a SMILES format and a corresponding second molecule attribute tag, the second molecule attribute tag includes a plurality of molecule attribute types and their corresponding attribute values;
[0070] Specifically comprising: step 211, inputting the original data set into the data preprocessing module;
[0071] In step 212, the data preprocessing module identifies abnormal data for all first raw data according to the 3 Sigma principle, and marks the first raw data that are not identified as abnormal data as normal raw data; and extracts the first molecular attribute labels of all normal raw data to form a corresponding normal label set;
[0072] Here, the 3 Sigma principle is a processing method for identifying abnormal data based on the normal distribution relationship of the data. For details, please refer to the relevant technical implementation literature, and I will not go into details here.
[0073] In step 213, the data preprocessing module extracts all attribute values of any molecular attribute type in the normal label set to form a corresponding first value sequence; calculates the skewness of the first value sequence to obtain a corresponding first skewness; and when the first skewness is less than or equal to a set threshold, normalizes the first value sequence based on a standard Gaussian transform to obtain a corresponding normalized value sequence; and when the first skewness is greater than the set threshold, determines whether the minimum value of the first value sequence is greater than 0. If so, the first value sequence is normalized based on a Box-Cox transform to obtain a corresponding normalized value sequence; otherwise, the first value sequence is normalized based on a Yeo-Johnson transform to obtain a corresponding normalized value sequence; and replaces the corresponding attribute values in the normal label set with the normalized attribute values of the obtained normalized value sequence.
[0074] Here, the attribute value sequence of the molecule attribute type can be understood through the following example:
[0075] For example, a normal label set consists of three first molecular attribute labels: label 1 {attribute 1 = value 11, attribute 2 = value 12, attribute 3 = value 13}, label 2 {attribute 1 = value 21, attribute 2 = value 22, attribute 3 = value 23}, label 3 {attribute 1 = value 31, attribute 2 = value 32, attribute 3 = value 33}; then, the first value sequence of molecular attribute type = attribute 1 is {value 11, value 21, value 31};
[0076] The skewness in the step is a conventional metric parameter in statistics used to evaluate the skewness of the sample distribution;
[0077] In step 214, the data preprocessing module uses each first molecule attribute label in the normal label set that has undergone normalized attribute value replacement as a corresponding second molecule attribute label, and uses the first molecule data of the normal original data corresponding to each second molecule attribute label as the corresponding second molecule data, and each second molecule data and the corresponding second molecule attribute label form a corresponding first preprocessed data set; and all the obtained first preprocessed data form a corresponding preprocessed data set;
[0078] Here, the preprocessed dataset is actually the dataset obtained by removing abnormal data from the original dataset and normalizing the attribute labels. This preprocessing method is intended to improve the accuracy of model training.
[0079] Step 22: input the preprocessed data set into the molecular multimodal characterization processing module to perform multimodal molecular characterization recognition processing to generate a corresponding first data set;
[0080] The first data set includes a plurality of first molecular characterization data; the first molecular characterization data includes a molecular fingerprint feature tensor, a molecular descriptor feature tensor, a one-dimensional molecular feature tensor, a two-dimensional molecular graph feature tensor, a three-dimensional molecular conformation feature tensor, and a third molecular attribute label;
[0081] Specifically comprising: step 221, inputting the preprocessed data set into the molecular multimodal characterization processing module;
[0082] In step 222, the molecular fingerprint processing unit of the molecular multimodal characterization processing module performs molecular fingerprint feature extraction processing on the second molecular data of each first preprocessed data according to a preset fingerprint format to generate a corresponding molecular fingerprint feature tensor;
[0083] Among them, the preset fingerprint formats include Morgan fingerprint format, ECFP fingerprint format, MACCS fingerprint format, RDKit fingerprint format and Topological fingerprint format;
[0084] In step 223, the molecular descriptor processing unit of the molecular multimodal characterization processing module performs multi-class descriptor feature extraction processing on the second molecular data of each first preprocessed data according to a preset descriptor type set to generate a corresponding molecular descriptor feature tensor;
[0085] Wherein, the descriptor type set includes a plurality of molecular descriptor types;
[0086] Here, the descriptor type set of the embodiment of the present invention includes at least 200 types of molecular descriptors, common ones include structural descriptors, topological descriptors, connectivity descriptors, physicochemical descriptors, etc.
[0087] In step 224, the one-dimensional molecular sequence processing unit of the molecular multimodal characterization processing module uses a preset one-dimensional feature extraction model to perform one-dimensional feature extraction processing on the second molecular data of each first preprocessed data to generate a corresponding one-dimensional molecular feature tensor;
[0088] Among them, one-dimensional feature extraction models include Transformer model, BERT-like model and K-BERT model;
[0089] Here, the model for one-dimensional feature extraction in the embodiment of the present invention has a unified feature, namely, a model that can analyze the weight relationship between each character of the input SMILES format molecular data, that is, a molecular sequence composed of a string, and the context. The Transformer model, BERT-like model, and K-BERT model are all such models. It should be noted that before training the integrated model, the above-mentioned one-dimensional feature extraction model needs to be trained separately. In this way, there is no need to jointly train them when training the integrated network, which can reduce the overall training difficulty.
[0090] In step 225, the two-dimensional molecular graph processing unit of the molecular multimodal characterization processing module uses a preset two-dimensional feature extraction model to perform two-dimensional molecular graph feature extraction processing on the second molecular data of each first preprocessed data to generate a corresponding two-dimensional molecular graph feature tensor;
[0091] Among them, the two-dimensional feature extraction models include the GROVER model, MOLCLR model, KPGT model and HIGNN model;
[0092] Here, the GROVER model can use node-level and edge-level contextual attribute prediction tasks, as well as self-supervised graph-level motif prediction tasks, to learn rich molecular structure and semantic information from a large amount of unlabeled molecular data; the MOLCLR model can compare positive and negative pairs of molecular graphs and adopt atom masking, bond deletion and subgraph removal enhancement strategies; the KPGT model can guide the prediction of randomly masked nodes based on a knowledge-oriented pre-training strategy and combined with additional knowledge of molecules; the HIGNN model is a hierarchical information graph neural network framework that aims to predict the characteristics of molecules by using molecular graphs and fragment information; it should be noted that before training the integrated model, the above-mentioned two-dimensional feature extraction model needs to be trained separately, so that it does not need to be jointly trained when training the integrated network, which can reduce the overall training difficulty;
[0093] In step 226, the three-dimensional molecular conformation processing unit of the molecular multimodal characterization processing module uses a preset three-dimensional feature extraction model to perform three-dimensional molecular conformation feature extraction processing on the second molecular data of each first preprocessed data to generate a corresponding three-dimensional molecular conformation feature tensor;
[0094] Among them, the three-dimensional feature extraction models include the EGNN model, SE(3) equivariant neural network and Uni-Mol model;
[0095] Here, the EGNN model, SE(3) equivariant neural network and Uni-Mol model are all neural network models that can extract features of the 3D conformation of molecules based on 3D structures. It should be noted that before training the integrated model, the above three-dimensional feature extraction models need to be trained separately, so that there is no need to jointly train them when training the integrated network. This process can reduce the overall training difficulty.
[0096] Step 227 , the molecular multimodal characterization processing module uses the second molecular attribute label of each first pre-processed data as the corresponding third molecular attribute label;
[0097] In step 228, the molecular multimodal characterization processing module combines the molecular fingerprint feature tensor, the molecular descriptor feature tensor, the one-dimensional molecular feature tensor, the two-dimensional molecular graph feature tensor, the three-dimensional molecular conformation feature tensor, and the third molecular attribute label corresponding to each first pre-processed data into corresponding first molecular characterization data; and all the obtained first molecular characterization data form a corresponding first data set;
[0098] Step 23: input the first data set into a first-level stacked base learner processing module for first-level model training to obtain a corresponding first output data set;
[0099] Wherein, the first output data set includes a plurality of first base learner output data; the first base learner output data includes a plurality of first batch output data; the first batch output data includes a first prediction-label pair set and a first cross-validation score; the first prediction-label pair set includes a plurality of first prediction-label pairs; the first prediction-label pair includes a first attribute prediction tensor and a fourth molecular attribute label;
[0100] Specifically comprising: step 231, inputting the first data set into the first-level stacked base learner processing module;
[0101] Step 232, and the multimodal fusion unit of the first-level stacked base learner processing module creates a corresponding training data set for each base learner and records it as the first learner data set; and any first molecular characterization data of the first data set is used as the corresponding current molecular characterization data; and the molecular fingerprint feature tensor, molecular descriptor feature tensor, one-dimensional molecular feature tensor, two-dimensional molecular graph feature tensor, and three-dimensional molecular conformation feature tensor in the current molecular characterization data are extracted to form the corresponding current feature tensor sequence, and the third molecular attribute label of the current molecular characterization data is extracted as the corresponding fourth molecular attribute label; and each first correspondence record of the preset first correspondence table reflecting the correspondence between the fusion tensor and the base learner is traversed, and the current traversal is taken as the corresponding fourth molecular attribute label during the traversal. The first corresponding relationship record of the past is taken as the corresponding current record, and the first fusion tensor feature range field and the first base learner identification field of the current record are extracted as the corresponding current feature range and current base learner identification, and the base learner matching the current base learner identification is taken as the corresponding current base learner, and one or more feature tensors matching the current feature range in the current feature tensor sequence are subjected to multimodal feature fusion to obtain the corresponding first molecular fusion feature tensor, and the first molecular fusion feature tensor and the corresponding fourth molecular attribute label form the corresponding first learner data, and establish a corresponding relationship between the first learner data and the current base learner identification; and at the end of the traversal, the obtained various first learner data are stored in their respective corresponding first learner data sets;
[0102] The first correspondence table includes a plurality of first correspondence records; the first correspondence record includes a first fusion tensor feature range field and a first base learner identification field; the first fusion tensor feature range field includes a fingerprint feature type, a descriptor feature type, a one-dimensional feature type, a two-dimensional feature type, and a three-dimensional feature type; the first learner data set corresponds one-to-one to the base learner; the first learner data set includes a plurality of first learner data; the first learner data includes a first molecular fusion feature tensor and a fourth molecular attribute label;
[0103] Here, each first correspondence record actually corresponds to a base learner, and the feature range stored in the first fusion tensor feature range field refers to the input feature fusion range of the corresponding base learner. For example, if the feature range has only one fingerprint feature type, descriptor feature type, one-dimensional feature type, two-dimensional feature type or three-dimensional feature type, it means that the corresponding base learner only takes a single molecular fingerprint feature, molecular descriptor feature, one-dimensional molecular feature, two-dimensional molecular graph feature or three-dimensional molecular conformation feature as input. If the feature range includes fingerprint feature type, descriptor feature type, one-dimensional feature type and two-dimensional feature type, it means that the corresponding base learner takes a fusion feature as input, and the fusion feature combines four features: molecular fingerprint feature, molecular descriptor feature, one-dimensional molecular feature and two-dimensional molecular graph feature. The multimodal fusion unit can automatically perform data fusion according to the input feature requirements of each base learner through the first correspondence table without the need for additional manual processing or external intervention mechanism.
[0104] Step 233, the first stacked base learner processing module divides each first learner data set into two data sets according to a preset ratio: a first training data set and a first validation data set; and divides the first training data set into multiple data subsets recorded as corresponding single batch training data subsets; and performs batch model training on the corresponding base learner based on each single batch training data subset; and in each batch model training, Focal Loss+GHM is used. loss is used as the model training loss function; and at the end of each batch of model training, the base learner is used to perform molecular attribute prediction processing on each first molecular fusion feature tensor of the first verification data set to generate a corresponding first attribute prediction tensor, and each first attribute prediction tensor and the corresponding fourth molecular attribute label are composed of a corresponding first prediction-label pair, and all the obtained first prediction-label pairs are composed of a corresponding first prediction-label pair set, and the evaluation unit performs cross-validation scoring on the first prediction-label pair set to obtain a corresponding first cross-validation score, and the first prediction-label pair set and the first cross-validation score are composed of the corresponding first batch output data; and at the end of all batch model training, all the obtained first batch output data are composed of the corresponding first base learner output data; and the first base learner output data corresponding to all base learners are composed of the corresponding first output data set;
[0105] Here, in the embodiment of the present invention, Focal Loss + GHM loss is used as the model training loss function by default in each batch of model training; however, it is also possible to use only Focal Loss as the model training loss function in the first few batches of training, and then use Focal Loss + GHM loss as the model training loss function in subsequent batches. Such adjustment can speed up the model training speed; in addition, other loss functions can be selected for training according to the classification processing type of the base learner, such as regression calculation type, single classification type, multi-classification type, etc., and pre-set data balance rules;
[0106] In addition, when training each base learner, an independent computing resource is pre-allocated to each base learner for training; all base learners can perform synchronous computing based on their own independent computing resources; independent computing resources include independent GPU resources and independent CPU resources of computing devices; computing devices include computers, servers, cloud servers, and high-performance computing clusters; here, when performing independent computing resource allocation and parallel task planning, the embodiment of the present invention can achieve resource isolation for parallel tasks based on a container and image processing mechanism similar to dflow;
[0107] Step 24: input the first output data set into the secondary stacked meta-learner processing module for secondary model training;
[0108] Specifically comprising: step 241, inputting the first output data set into the secondary stacked meta-learner processing module;
[0109] In step 242, the first-level prediction screening unit of the second-level stacked meta-learner processing module screens out all first prediction-label pairs in the first output dataset corresponding to the first cross-validation score that is higher than the preset score threshold to form a corresponding second dataset; and performs model training on each meta-learner based on the second dataset using the KFold training method; and uses Focal Loss + GHM loss as the model training loss function during the model training;
[0110] Here, because the various models of the two-level stacked meta-learner processing module are conventional machine learning models with approximate linear structures, and their model training methods are also relatively common, they will not be elaborated on here. In addition, the KFold training method is also a commonly used training method for two-level integrated models, which can be obtained by consulting public technical literature and will not be further elaborated on here.
[0111] It should be noted that when training each meta-learner, an independent computing resource is pre-allocated to each meta-learner for training, enabling all meta-learners to perform synchronous computations based on their own independent computing resources. Independent computing resources include independent GPU resources and independent CPU resources of computing devices, including computers, servers, cloud servers, and high-performance computing clusters. Here, when performing independent computing resource allocation and parallel task planning, embodiments of the present invention can achieve resource isolation for parallel tasks based on a container and image processing mechanism similar to dflow.
[0112] Step 3: If the model training is successful, molecular property prediction processing is performed based on the first integrated model;
[0113] Specifically, the process includes: step 31, obtaining the molecular data in the SMILES format input by the user as the corresponding current molecular data;
[0114] Step 32: input the current molecular data into a data preprocessing module, and the data preprocessing module performs abnormal data identification on the current molecular data according to the 3 sigma principle to obtain a corresponding first identification result;
[0115] The first recognition result includes abnormal data and non-abnormal data;
[0116] Step 33: When the first recognition result is non-abnormal data, the current molecular data is input into the molecular multimodal characterization processing module, and the molecular fingerprint processing unit performs molecular fingerprint feature extraction processing on the current molecular data according to the preset fingerprint format to generate the corresponding first molecular fingerprint feature tensor; and the molecular descriptor processing unit performs multi-class descriptor feature extraction processing on the current molecular data according to the preset descriptor type set to generate the corresponding first molecular descriptor feature tensor; and the one-dimensional molecular sequence processing unit performs one-dimensional feature extraction processing on the current molecular data using the preset one-dimensional feature extraction model to generate the corresponding first one-dimensional molecular feature tensor. The two-dimensional molecular graph processing unit uses a preset two-dimensional feature extraction model to perform a two-dimensional molecular graph feature extraction process on the current molecular data to generate a first two-dimensional molecular graph feature tensor; the three-dimensional molecular conformation processing unit uses a preset three-dimensional feature extraction model to perform a three-dimensional molecular graph feature extraction process on the current molecular data to generate a first three-dimensional molecular conformation feature tensor; and the first molecular fingerprint feature tensor, the first molecular descriptor feature tensor, the first one-dimensional molecular feature tensor, the first two-dimensional molecular graph feature tensor, the first three-dimensional molecular conformation feature tensor and the first and third molecular attribute labels form the corresponding second molecular characterization data;
[0117] Among them, the preset fingerprint formats include Morgan fingerprint format, ECFP fingerprint format, MACCS fingerprint format, RDKit fingerprint format and Topological fingerprint format; the descriptor type set includes multiple molecular descriptor types; the one-dimensional feature extraction models include Transformer model, BERT-like model and K-BERT model; the two-dimensional feature extraction models include GROVER model, MOLCLR model, KPGT model and HIGNN model; the three-dimensional feature extraction models include EGNN model, SE(3) equivariant neural network and Uni-Mol model;
[0118] Step 34: input the second molecular representation data into the multimodal fusion unit of the first-level stacked base learner processing module, and the multimodal fusion unit traverses each first correspondence record of the preset first correspondence table reflecting the correspondence between the fusion tensor and the base learner; and during the traversal, the currently traversed first correspondence record is used as the corresponding current record; the first fusion tensor feature range field and the first base learner identifier field of the current record are extracted as the corresponding current feature range and the current base learner identifier; and the base learner matching the current base learner identifier is used as the corresponding current base learner; and multimodal feature fusion is performed on one or more feature tensors matching the current feature range in the second molecular representation data to obtain a corresponding second molecular fusion feature tensor, and a correspondence is established between the second molecular fusion feature tensor and the current base learner identifier; and at the end of the traversal, each obtained second molecular fusion feature tensor is input into its corresponding base learner for molecular attribute prediction processing to obtain a corresponding second attribute prediction tensor; and the evaluation unit cross-validates and scores each second attribute prediction tensor to obtain a corresponding second cross-validation score;
[0119] The first correspondence table includes a plurality of first correspondence records; the first correspondence record includes a first fusion tensor feature range field and a first base learner identification field; the first fusion tensor feature range field includes a fingerprint feature type, a descriptor feature type, a one-dimensional feature type, a two-dimensional feature type, and a three-dimensional feature type;
[0120] Here, when applying to each base learner, an independent computing resource can be pre-allocated to each base learner for prediction; so that all base learners can perform synchronous calculations based on their own independent computing resources; independent computing resources include independent GPU resources and independent CPU resources of computing devices; computing devices include computers, servers, cloud servers, and high-performance computing clusters; Here, when performing independent computing resource allocation and parallel task planning, the embodiment of the present invention can achieve resource isolation for parallel tasks based on a container and image processing mechanism similar to dflow;
[0121] Step 35, the first-level stacked base learner processing module combines each second cross-validation score and the corresponding second attribute prediction tensor into corresponding second output data; and all the obtained second output data are combined into a corresponding second output data set;
[0122] Step 36: Input the second output data set into the secondary stacked meta-learner processing module, and the primary prediction screening unit screens out the second attribute prediction tensors corresponding to the second cross-validation scores that are higher than the preset score threshold in the second output data set to form a corresponding first tensor sequence; and each meta-learner performs molecular attribute prediction processing on each second attribute prediction tensor in the first tensor sequence to obtain a corresponding third attribute prediction tensor; and all the obtained third attribute prediction tensors form a corresponding second tensor sequence;
[0123] Here, when applying each meta-learner, an independent computing resource can be pre-allocated to each meta-learner for prediction; this allows all base learners to perform synchronous computations based on their own independent computing resources; independent computing resources include independent GPU resources and independent CPU resources of computing devices; computing devices include computers, servers, cloud servers, and high-performance computing clusters; here, when performing independent computing resource allocation and parallel task planning, embodiments of the present invention can achieve resource isolation for parallel tasks based on a container and image processing mechanism similar to dflow;
[0124] Step 37: Input the second tensor sequence into the secondary prediction averaging unit of the secondary stacked meta-learner processing module, and the secondary prediction averaging unit calculates the mean of all third attribute prediction tensors of the second tensor sequence according to the molecular attribute type dimension to obtain the corresponding fourth attribute prediction tensor; and outputs the fourth attribute prediction tensor as the model prediction result of the first integrated model.
[0125] Figure 3 is a block diagram of a processing device for a stacked integrated model for molecular property prediction, provided in Example 2 of the present invention. This device is a terminal device or server that implements the aforementioned method embodiment, or can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiment. For example, this device can be a device or chip system of the aforementioned terminal device or server. As shown in Figure 3, the device includes: a model construction module 201, a model training module 202, and a model application module 203.
[0126] The model building module 201 is used to build an integrated model based on a two-level stacking mechanism, which is recorded as the corresponding first integrated model.
[0127] The model training module 202 is used to perform model training on the first integrated model based on a preset original data set.
[0128] The model application module 203 is used to perform molecular property prediction processing based on the first integrated model after the model training is successful.
[0129] An embodiment of the present invention provides a processing device for a stacked integrated model for molecular property prediction, which can execute the method steps in the above method embodiment. Its implementation principles and technical effects are similar and will not be repeated here.
[0130] It should be noted that the division of the modules of the above devices is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity or physically separated. Furthermore, these modules can all be implemented in the form of software called by a processing element; or all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the model building module can be a separate processing element, or it can be integrated into a chip of the above device. In addition, it can be stored in the form of program code in the memory of the above device, and called by a processing element of the above device to perform the functions of the above-mentioned module. The implementation of other modules is similar. In addition, these modules can all or partly be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed by hardware integrated logic circuits in the processor element or instructions in the form of software.
[0131] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0132] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the above method embodiments are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) means. The above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The above-mentioned available medium can be a magnetic medium (such as a floppy disk, hard disk, tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0133] Figure 4 is a schematic diagram of the structure of an electronic device provided in the third embodiment of the present invention. The electronic device can be a terminal device or server that implements the method of the aforementioned embodiment, or it can be a terminal device or server that implements the method of the aforementioned embodiment connected to the aforementioned terminal device or server. As shown in Figure 4, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver 303's transceiver action. Various instructions can be stored in the memory 302 to perform various processing functions and implement the processing steps described in the aforementioned embodiment method. Preferably, the electronic device involved in the embodiment of the present invention also includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The above-mentioned communication port 306 is used for connection and communication between the electronic device and other peripherals.
[0134] The system bus 305 mentioned in FIG4 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory (Non-Volatile Memory), such as at least one disk storage.
[0135] The above-mentioned processors can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0136] It should be noted that an embodiment of the present invention further provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the methods and processing procedures provided in the above embodiments.
[0137] An embodiment of the present invention further provides a chip for executing instructions, which is used to execute the processing steps described in the above method embodiment.
[0138] The embodiment of the present invention provides a processing method, device, electronic device and computer-readable storage medium for a stacked integrated model for molecular property prediction. Based on the integrated model theory, a two-level stacked integrated model framework is constructed. In the first level, multiple parallel base learners (machine learning models, neural network models or pre-trained models) are introduced to realize the molecular property prediction ability of multi-scale molecular representation (molecular fingerprint, molecular descriptor, 1D molecular sequence, 2D molecular graph, 3D molecular conformation) and score the prediction results of each base learner in the first level. In the second level, multiple parallel meta-learners (machine learning models) are introduced to realize further refinement of the rough prediction results of the first level output and obtain the final molecular property prediction results by averaging all the refined prediction results; and before applying the integrated model, the model is trained in an integrated training mode. The present invention solves the problems of single model structure and single molecular representation scale in conventional schemes, and further improves the generalization ability and prediction accuracy of the model through the integrated model prediction mode of stacking models in parallel at all levels and serially advancing two-level models of the present invention.
[0139] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0140] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0141] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A processing method for stacked integrated models for molecular property prediction, characterized in that: The method comprises: The integrated model constructed based on the two-level stacking mechanism is recorded as the corresponding first integrated model; Performing model training on the first integrated model based on a preset original data set; If the model training is successful, molecular property prediction processing is performed based on the first integrated model.
2. The method for processing a stacked integrated model for molecular property prediction according to claim 1, characterized in that: The first integrated model includes a data preprocessing module, a molecular multimodal representation processing module, a first-level stacked base learner processing module and a second-level stacked meta-learner processing module; the molecular multimodal representation processing module includes a molecular fingerprint processing unit, a molecular descriptor processing unit, a one-dimensional molecular sequence processing unit, a two-dimensional molecular graph processing unit and a three-dimensional molecular conformation processing unit; The first-level stacked base learner processing module includes a multimodal fusion unit, a plurality of parallel stacked base learners and an evaluation unit; the second-level stacked meta learner processing module includes a first-level prediction screening unit, a plurality of parallel stacked meta learners and a second-level prediction averaging unit; The input ends of the molecular fingerprint processing unit, the molecular descriptor processing unit, the one-dimensional molecular sequence processing unit, the two-dimensional molecular graph processing unit and the three-dimensional molecular conformation processing unit are respectively connected to the data preprocessing module, and the output ends are respectively connected to the multimodal fusion unit; the multiple output ends of the multimodal fusion unit are respectively connected to the input ends of each of the base learners; the output end of each of the base learners is connected to the input end of the evaluation unit; the output end of the evaluation unit is connected to the input end of the primary prediction and screening unit; the multiple output ends of the primary prediction and screening unit are connected to the input ends of each of the meta learners; the output end of each of the meta learners is connected to the input end of the secondary prediction averaging unit; the output end of the secondary prediction averaging unit is the model output end of the first integrated model; The base learner is a primary molecular property prediction model implemented based on a machine learning model, a neural network model or a pre-trained model, which takes a fused feature tensor that fuses multimodal molecular features as input, Among them, the machine learning models include GBDT model, extraTree model, LR model, MLP neural network and SVM model, and the pre-trained models include BERT model, graph neural network model, SE(3) equivariant neural network model and Uni-Mol model; the meta-learner is a secondary molecular property prediction model based on the machine learning model and takes the initial screening molecular property tensor as input; among them, the machine learning models include GBDT model, extraTree model, LR model, MLP neural network and SVM model.
3. The processing method of the stacked integrated model for molecular property prediction according to claim 2, characterized in that: The performing model training on the first integrated model based on the preset original data set specifically includes: The original data set is input into the data preprocessing module for molecular data anomaly detection processing and label data normalization processing to obtain a corresponding preprocessed data set; the original data set has a plurality of first original data; the first original data includes a first molecular data in a SMILES format and a corresponding first molecular attribute label, the first molecular attribute label includes a plurality of molecular attribute types and their corresponding attribute values; the preprocessed data set includes a plurality of first preprocessed data; the first preprocessed data includes a second molecular data in a SMILES format and a corresponding second molecular attribute label, the second molecular attribute label includes a plurality of molecular attribute types and their corresponding attribute values; Inputting the preprocessed data set into the molecular multimodal characterization processing module for multimodal molecular characterization recognition processing to generate a corresponding first data set; the first data set includes a plurality of first molecular characterization data; the first molecular characterization data includes a molecular fingerprint feature tensor, a molecular descriptor feature tensor, a one-dimensional molecular feature tensor, a two-dimensional molecular graph feature tensor, a three-dimensional molecular conformation feature tensor and a third molecular attribute label; The first data set is input into the first-level stacked base learner processing module for first-level model training to obtain a corresponding first output data set; the first output data set includes a plurality of first-base learner output data; the first-base learner output data includes a plurality of first batch output data; the first batch output data includes a first prediction-label pair set and a first cross-validation score; the first prediction-label pair set includes a plurality of first prediction-label pairs; the first prediction-label pair includes a first attribute prediction tensor and the fourth molecular attribute label; The first output data set is input into the secondary stacked meta-learner processing module for secondary model training.
4. The method for processing a stacked integrated model for molecular property prediction according to claim 3, characterized in that: The inputting the original data set into the data preprocessing module to perform molecular data anomaly detection processing and label data normalization processing to obtain a corresponding preprocessed data set specifically includes: Inputting the original data set into the data preprocessing module; The data preprocessing module identifies abnormal data for all the first raw data according to the 3 Sigma principle, and marks the first raw data that are not identified as abnormal data as normal raw data; and extracts the first molecular attribute labels of all the normal raw data to form a corresponding normal label set; The data preprocessing module extracts all attribute values of any molecular attribute type in the normal label set to form a corresponding first value sequence; and calculates the skewness of the first value sequence to obtain the corresponding first skewness; and when the first skewness is less than or equal to a set threshold, the first value sequence is normalized based on a standard Gaussian transform to obtain a corresponding normalized value sequence; and when the first skewness is greater than the set threshold, it is identified whether the minimum value of the first value sequence is greater than 0, and if so, the first value sequence is normalized based on a Box-Cox transform to obtain the corresponding normalized value sequence; otherwise, the first value sequence is normalized based on a Yeo-Johnson transform to obtain the corresponding normalized value sequence; and the corresponding attribute values in the normal label set are replaced by the normalized attribute values of the obtained normalized value sequence; The data preprocessing module uses each of the first molecular attribute labels in the normal label set that have completed the normalized attribute value replacement as the corresponding second molecular attribute label, and uses the first molecular data of the normal original data corresponding to each of the second molecular attribute labels as the corresponding second molecular data, and each of the second molecular data and the corresponding second molecular attribute label constitute the corresponding first preprocessed data; and all the obtained first preprocessed data constitute the corresponding preprocessed data set.
5. The method for processing a stacked integrated model for molecular property prediction according to claim 3, characterized in that: The step of inputting the preprocessed data set into the molecular multimodal characterization processing module for multimodal molecular characterization recognition processing to generate a corresponding first data set specifically includes: Inputting the preprocessed data set into the molecular multimodal characterization processing module; The molecular fingerprint processing unit of the molecular multimodal characterization processing module performs molecular fingerprint feature extraction processing on the second molecular data of each of the first preprocessed data according to a preset fingerprint format to generate the corresponding molecular fingerprint feature tensor; the preset fingerprint format includes Morgan fingerprint format, ECFP fingerprint format, MACCS fingerprint format, RDKit fingerprint format and Topological fingerprint format; The molecular descriptor processing unit of the molecular multimodal characterization processing module performs multi-class descriptor feature extraction processing on the second molecular data of each of the first preprocessed data according to a preset descriptor type set to generate the corresponding molecular descriptor feature tensor; the descriptor type set includes multiple molecular descriptor types; The one-dimensional molecular sequence processing unit of the molecular multimodal characterization processing module uses a preset one-dimensional feature extraction model to perform one-dimensional feature extraction processing on the second molecular data of each of the first preprocessed data to generate the corresponding one-dimensional molecular feature tensor; the one-dimensional feature extraction model includes a Transformer model, a BERT-like model, and a K-BERT model; The two-dimensional molecular graph processing unit of the molecular multimodal characterization processing module uses a preset two-dimensional feature extraction model to perform two-dimensional molecular graph feature extraction processing on the second molecular data of each of the first preprocessed data to generate the corresponding two-dimensional molecular graph feature tensor; the two-dimensional feature extraction model includes a GROVER model, a MOLCLR model, a KPGT model and a HIGNN model; The three-dimensional molecular conformation processing unit of the molecular multimodal characterization processing module uses a preset three-dimensional feature extraction model to perform three-dimensional molecular conformation feature extraction processing on the second molecular data of each of the first preprocessed data to generate the corresponding three-dimensional molecular conformation feature tensor; the three-dimensional feature extraction model includes an EGNN model, an SE(3) equivariant neural network and a Uni-Mol model; The molecular multimodal characterization processing module converts the first preprocessed data into The second molecular attribute label serves as the corresponding third molecular attribute label; The molecular multimodal characterization processing module combines the molecular fingerprint feature tensor, the molecular descriptor feature tensor, the one-dimensional molecular feature tensor, the two-dimensional molecular graph feature tensor, the three-dimensional molecular conformation feature tensor and the third molecular attribute label corresponding to each of the first preprocessed data into the corresponding first molecular characterization data; and all the obtained first molecular characterization data form the corresponding first data set.
6. The method for processing a stacked integrated model for molecular property prediction according to claim 3, characterized in that: The step of inputting the first data set into the first-level stacked base learner processing module for first-level model training to obtain a corresponding first output data set specifically includes: Inputting the first data set into the first-level stacked base learner processing module; The multimodal fusion unit of the first-level stacked base learner processing module creates a corresponding training data set for each base learner and records it as a first learner data set; and uses any of the first molecular characterization data of the first data set as the corresponding current molecular characterization data; and extracts the molecular fingerprint feature tensor, the molecular descriptor feature tensor, the one-dimensional molecular feature tensor, the two-dimensional molecular graph feature tensor, and the three-dimensional molecular conformation feature tensor in the current molecular characterization data to form a corresponding current feature tensor sequence, and extracts the third molecular attribute label of the current molecular characterization data as the corresponding fourth molecular attribute label; and performs a first corresponding relationship table for each first corresponding relationship reflecting the corresponding relationship between the fusion tensor and the base learner. The system records are traversed, and during the traversal, the first corresponding relationship record currently traversed is used as the corresponding current record, and the first fusion tensor feature range field and the first base learner identification field of the current record are extracted as the corresponding current feature range and the current base learner identification, and the base learner matching the current base learner identification is used as the corresponding current base learner, and one or more feature tensors matching the current feature range in the current feature tensor sequence are subjected to multimodal feature fusion to obtain the corresponding first molecular fusion feature tensor, and the first molecular fusion feature tensor and the corresponding fourth molecular attribute label form the corresponding first learner data, and a corresponding relationship is established between the first learner data and the current base learner identification; and in the traversal result, When the first learner data is bundled, each of the obtained first learner data is stored in the first learner data set corresponding to each other; the first correspondence table includes a plurality of the first correspondence records; the first correspondence record includes the first fusion tensor feature range field and the first base learner identification field; the first fusion tensor feature range field includes fingerprint feature type, descriptor feature type, one-dimensional feature type, two-dimensional feature type and three-dimensional feature type; the first learner data set corresponds to the base learner one by one; the first learner data set includes a plurality of the first learner data; the first learner data includes the first molecule fusion feature tensor and the fourth molecule attribute label; The first-level stacked base learner processing module divides each of the first learner data sets into two data sets according to a preset ratio: a first training data set and a first validation data set; and divides the first training data set into multiple data subsets recorded as corresponding single-batch training data subsets; and performs batch model training on the corresponding base learners based on each of the single-batch training data subsets; and in each batch model training, Focal Loss+GHM is used. loss as the model training loss function; and at the end of each batch of model training, the base learner is used to perform molecular attribute prediction processing on each of the first molecular fusion feature tensors of the first verification data set to generate the corresponding first attribute prediction tensor, and each of the first attribute prediction tensors and the corresponding fourth molecular attribute label constitute the corresponding first prediction-label pair, and all the obtained first prediction-label pairs constitute the corresponding first prediction-label pair set, and the evaluation unit cross-validates and scores the first prediction-label pair set to obtain the corresponding first cross-validation score, and the first prediction-label pair set and the first cross-validation score constitute the corresponding first batch output data; and at the end of all batches of model training, all the obtained first batch output data constitute the corresponding first base learner output data; and the first base learner output data corresponding to all the base learners constitute the corresponding first output data set.
7. The method for processing a stacked integrated model for molecular property prediction according to claim 3, characterized in that: The step of inputting the first output data set into the secondary stacked meta-learner processing module for secondary model training specifically includes: Inputting the first output data set into the secondary stacked meta-learner processing module; The first-level prediction screening unit of the second-level stacked meta-learner processing module screens out all the first prediction-label pairs in the first prediction-label pair set corresponding to the first cross-validation score that is higher than a preset score threshold in the first output data set to form a corresponding second data set; and performs model training on each of the meta-learners according to the second data set in a KFold training manner; and in the model training, Focal Loss+GHM loss is used as the model training loss function.
8. The method for processing a stacked integrated model for molecular property prediction according to claim 2, characterized in that: The molecular property prediction process based on the first integrated model specifically includes: Obtain the molecular data in SMILES format input by the user as the corresponding current molecular data; Inputting the current molecular data into the data preprocessing module, and the data preprocessing module performs abnormal data identification on the current molecular data according to the 3 sigma principle to obtain a corresponding first identification result; the first identification result includes abnormal data and non-abnormal data; When the first recognition result is non-abnormal data, the current molecular data is input into the molecular multimodal characterization processing module, and the molecular fingerprint processing unit performs molecular fingerprint feature extraction processing on the current molecular data according to a preset fingerprint format to generate a corresponding first molecular fingerprint feature tensor; and the molecular descriptor processing unit performs multi-class descriptor feature extraction processing on the current molecular data according to a preset descriptor type set to generate a corresponding first molecular descriptor feature tensor; and the one-dimensional molecular sequence processing unit performs one-dimensional feature extraction processing on the current molecular data using a preset one-dimensional feature extraction model to generate a corresponding first one-dimensional molecular feature tensor; and the two-dimensional molecular map The processing unit uses a preset two-dimensional feature extraction model to perform a two-dimensional molecular graph feature extraction process on the current molecular data to generate a first two-dimensional molecular graph feature tensor; and the three-dimensional molecular conformation processing unit uses a preset three-dimensional feature extraction model to perform a three-dimensional molecular graph feature extraction process on the current molecular data to generate a first three-dimensional molecular conformation feature tensor; and the first molecular fingerprint feature tensor, the first molecular descriptor feature tensor, the first one-dimensional molecular feature tensor, the first two-dimensional molecular graph feature tensor, the first three-dimensional molecular conformation feature tensor and the first third molecular attribute label form the corresponding second molecular characterization data; the preset fingerprint format includes Morgan fingerprint format The descriptor type set includes a plurality of molecular descriptor types; the one-dimensional feature extraction model includes a Transformer model, a BERT-like model and a K-BERT model; the two-dimensional feature extraction model includes a GROVER model, a MOLCLR model, a KPGT model and a HIGNN model; the three-dimensional feature extraction model includes an EGNN model, a SE(3) equivariant neural network and a Uni-Mol model; The second molecular characterization data is input into the multimodal fusion unit of the first-level stacked base learner processing module, and the multimodal fusion unit traverses each first correspondence record of the preset first correspondence table reflecting the correspondence between the fusion tensor and the base learner; and when traversing, the first correspondence record currently traversed is used as the corresponding current record; and the first fusion tensor feature range field and the first base learner identification field of the current record are extracted as the corresponding current feature range and the current base learner identification; and the base learner matching the current base learner identification is used as the corresponding current base learner; and multimodal feature fusion is performed on one or more feature tensors matching the current feature range in the second molecular characterization data to obtain the corresponding first base learner. Two molecular fusion feature tensors, and establish a corresponding relationship between the second molecular fusion feature tensor and the current base learner identifier; and at the end of the traversal, each of the second molecular fusion feature tensors obtained is input into the corresponding base learner for molecular attribute prediction processing to obtain the corresponding second attribute prediction tensor; and the evaluation unit cross-validates and scores each of the second attribute prediction tensors to obtain the corresponding second cross-validation score; the first correspondence table includes multiple first correspondence records; the first correspondence record includes the first fusion tensor feature range field and the first base learner identifier field; the first fusion tensor feature range field includes fingerprint feature type, descriptor feature type, one-dimensional feature type, two-dimensional feature type and three-dimensional feature type; The first-level stacked base learner processing module combines each of the second cross-validation scores and the corresponding second attribute prediction tensor into corresponding second output data; and all the obtained second output data form a corresponding second output data set; The second output data set is input into the second-level stacked meta-learner processing module, and the first-level prediction screening unit selects the second cross-links in the second output data set that are higher than a preset score threshold. The second attribute prediction tensors corresponding to the cross-validation score are selected to form a corresponding first tensor sequence; and each of the meta-learners performs molecular attribute prediction processing on each of the second attribute prediction tensors of the first tensor sequence to obtain a corresponding third attribute prediction tensor; and all the obtained third attribute prediction tensors form a corresponding second tensor sequence; The second tensor sequence is input into the secondary prediction averaging unit of the secondary stacked meta-learner processing module, and the secondary prediction averaging unit calculates the mean of all the third attribute prediction tensors of the second tensor sequence according to the molecular attribute type dimension to obtain the corresponding fourth attribute prediction tensor; and outputs the fourth attribute prediction tensor as the model prediction result of the first integrated model.
9. A device for executing the processing method of the stacked integrated model for molecular property prediction according to any one of claims 1 to 8, characterized in that: The device comprises: a model building module, a model training module and a model application module; The model building module is used to build an integrated model based on a two-level stacking mechanism, which is recorded as the corresponding first integrated model; The model training module is used to perform model training on the first integrated model based on a preset original data set; The model application module is used to perform molecular property prediction processing based on the first integrated model after the model training is successful.
10. An electronic device, characterized in that: include: memory, processors, and transceivers; The processor is used to couple with the memory, read and execute instructions in the memory, so as to implement the method according to any one of claims 1 to 8; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is enabled to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Drug and target interaction prediction method and device, equipment and storage medium
CN113160894A
Drug molecule property prediction method, device and equipment based on comparative learning
CN114386694A
Processing method and device of stacked integrated model for molecular attribute prediction
CN116343950A
Techniques for generating machine learning trained models
US20220044149A1
Cited By
Processing method and device for atomic scale reaction site prediction
CN119741995A
A processing method and device for atomic reaction site prediction
CN119741995B
Raman spectrum-based beef producing area tracing method and device and electronic equipment
CN120177460A
Multi-modal chemical reaction yield prediction method based on adaptive data screening
CN120783883A
Sugarcane sugar prediction method, device and equipment based on multi-model fusion and dynamic feature engineering and medium
CN121278654A
