Molecular toxicity prediction method based on toxicity prior information guiding pre-training
Patent Information
- Application Number
- CN202611520904.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0008]本发明旨在提供一种基于毒性先验信息引导预训练的分子毒性预测方法,以改善现有分子毒性预测方法对下游毒性标注数据依赖较强、预训练过程对毒性相关化学信息利用不足,以及多视图分子表示融合时未充分考虑三维构象质量差异的问题
[0024]与现有技术相比,本发明具有以下优势:将结构警示和理化属性区间构成的毒性相关化学先验特征向量作为预训练监督目标,使分子毒性预测模型在下游微调前学习与毒性相关的化学结构和理化属性模式。联合利用MACCS分子指纹、二维原子级分子图、BRICS片段图和三维构象几何数据,构建多视图分子表示。以二维分子图表示为基础,通过门控机制调节一维分子指纹表示和三维构象表示的贡献,并结合构象质量特征控制三维构象表示的影响,有助于降低无效构象对融合表示的不利影响。采用预训练后进行下游微调的方式,可将所获得的分子表示用于不同毒性终点的分类或回归预测。
Smart Images

Figure CN123017258A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computational toxicology technology, specifically relating to a molecular toxicity prediction method based on pre-training guided by prior toxicity information. Background Technology
[0002] Molecular toxicity prediction is a crucial task in computational toxicology and drug safety evaluation, primarily predicting the toxic properties or potential toxic risks of compounds based on their molecular structure. In drug discovery and development, unexpected toxicity of candidate compounds can lead to research and development halts or increased costs; therefore, identifying compounds with potential toxic risks early in the research process is of practical significance. Traditional toxicity assessments mainly rely on in vivo animal experiments and in vitro cell experiments, providing direct biological evidence, but they typically suffer from long experimental cycles, high costs, ethical restrictions, and difficulty in adapting to large-scale candidate compound screening. Therefore, computer-aided molecular toxicity prediction methods are gradually becoming a research focus.
[0003] Currently, molecular toxicity prediction mainly employs machine learning methods based on artificially designed molecular features and deep learning methods based on molecular structure representations. Traditional machine learning methods typically first calculate molecular descriptors or molecular fingerprints, then use models such as support vector machines, random forests, decision trees, k-nearest neighbors, or extreme gradient boosting (XGBoost) for classification or regression prediction. These methods have been used for median lethal dose (LD50), drug-induced liver injury, mutagenicity, and other toxicity endpoints. For example, a model combining extended connection fingerprints (ECFP4) and molecular descriptors has been used to predict the inhibitory risk of compounds on hERG potassium ion channels; other studies have combined molecular descriptors and molecular fingerprints to classify and predict the toxicity of small molecules. The toxicity prediction platform ProTox 3.0 combines molecular similarity, toxicity-related structural fragments, and machine learning models to provide predictions for multiple toxicity endpoints. While these methods can make predictions using pre-designed molecular features, model performance may be limited by feature selection and feature representation capabilities, making it difficult to fully capture complex molecular structural patterns.
[0004] With the development of molecular graph representation learning, deep learning methods have begun to learn features directly from molecular structures. For example, the Attentive Fingerprint Model (FP) utilizes graph attention mechanisms to learn molecular graph representations relevant to the prediction task; the Directed Message Passing Neural Network (D-MPNN) uses atomic and chemical bond information for message passing and has been applied to toxicity prediction on datasets such as ClinTox and Tox21. However, existing deep learning research typically models individual toxicity endpoints. When the number of toxicity labels is limited or the prediction task changes, the model may struggle to obtain stable molecular representations applicable to different toxicity endpoints.
[0005] To leverage large-scale unlabeled molecular data, existing research employs self-supervised pre-training to learn molecular representations. For example, the self-supervised pre-trained molecular graph representation model (GROVER) is pre-trained using node and subgraph prediction tasks within molecular graphs; the Molecular Contrast Learning Representation Framework (MolCLR) utilizes graph contrast learning to obtain molecular representations; and the self-supervised conformation-aware graph embedding framework (SCAGE) combines chemical priors, 2D topological information, and 3D geometric information for multi-task pre-training. However, these pre-training tasks primarily focus on learning general molecular structures or chemical information. For molecular toxicity prediction, toxic effects may be related to specific structural warnings, toxicity-related substructures, and physicochemical properties. Learning only general molecular features may be insufficient for the model to focus on learning structural patterns related to toxicity risk during the pre-training phase.
[0006] Molecules can also be represented using different forms of structural information. One-dimensional molecular fingerprints can characterize the structural features of molecules; two-dimensional atomic-level molecular maps can represent the connections between atoms and chemical bonds. Furthermore, the Breaking of Retrosynthetically Interesting Chemical Substructures (BRICS) method breaks molecules into fragments according to predefined chemical bond-breaking rules, and the resulting fragment-level structural representation is called a BRICS fragment map; three-dimensional conformational geometry data can provide the spatial arrangement and geometric relationships of atoms. These representations are complementary, but the generation and optimization results of three-dimensional conformations may vary depending on the molecular structure, and their effectiveness and geometric quality may also differ. If a fixed method is used to fuse one-dimensional molecular fingerprints, two-dimensional molecular maps, and three-dimensional conformational representations, it may be impossible to adjust the influence of three-dimensional information on the final representation according to the conformational quality of different molecules.
[0007] In summary, existing molecular toxicity prediction methods still suffer from the following problems: First, the models are limited by downstream labeled data, making it difficult to fully utilize unlabeled molecular data to learn transferable toxicity-related representations; second, existing molecular pre-training tasks do not adequately utilize toxicity-related structural warnings and physicochemical properties; and third, when jointly utilizing one-dimensional molecular fingerprints, two-dimensional atomic-level molecular diagrams, and three-dimensional conformational geometry data, insufficient consideration is given to the complementarity of information from different views and the differences in three-dimensional conformational quality. Therefore, how to utilize toxicity-related chemical information for molecular pre-training and adjust its contribution to multi-view molecular representation based on three-dimensional conformational quality is a problem that needs to be solved in the field of molecular toxicity prediction. Summary of the Invention
[0008] The present invention aims to provide a molecular toxicity prediction method based on prior toxicity information-guided pre-training, in order to improve the problems of existing molecular toxicity prediction methods, such as strong dependence on downstream toxicity labeling data, insufficient utilization of toxicity-related chemical information in the pre-training process, and insufficient consideration of three-dimensional conformational quality differences when fusing multi-view molecular representations.
[0009] The objective of this invention is achieved through the following technical solution: a molecular toxicity prediction method based on prior toxicity information-guided pre-training, comprising the following steps: Step 1: Obtain unlabeled molecular datasets and labeled toxicity datasets, perform validity checks, normalization and repetitive structure processing on molecular structures, and convert the molecular structures into molecular representation data required for subsequent encoding; Step 2: Construct MACCS molecular fingerprint, two-dimensional atomic-level molecular map, and BRICS fragment map based on the molecular structure, and generate three-dimensional conformational geometry data; where BRICS is an abbreviation for Breaking of Retrosynthetically Interesting Chemical Substructures, which is a method of fragmenting molecules according to preset chemical bond breaking rules; the fragment-level structural representation obtained in this way is called BRICS fragment map; Step 3: Construct a multi-view molecular encoder to encode the MACCS molecular fingerprint, two-dimensional atomic-level molecular diagram and BRICS fragment diagram, and three-dimensional conformational geometry data respectively, to obtain a one-dimensional molecular fingerprint representation, a two-dimensional molecular diagram representation, and a three-dimensional conformational representation. Based on the two-dimensional molecular diagram representation, an adaptive gating fusion mechanism is used to adjust the contributions of the one-dimensional molecular fingerprint representation and the three-dimensional conformational representation to the unified molecular representation. Among them, the gating adjustment of the three-dimensional conformational representation is combined with the conformational quality feature vector. When the three-dimensional conformation is invalid, the contribution of the three-dimensional conformational representation to the unified molecular representation is reduced or suppressed. Step 4: Construct a toxicity-related chemical prior feature vector; using SMARTS (Small Target Specification) substructure matching rules, identify preset toxicity-related structural warnings from the molecular structure and encode the matching results into a structural warning vector; perform interval encoding on the molecular physicochemical descriptors to obtain physicochemical property interval vectors; concatenate the structural warning vectors with the physicochemical property interval vectors to form a toxicity-related chemical prior feature vector; the toxicity-related chemical prior feature vector is constructed based on the molecular structure and physicochemical descriptors and does not depend on downstream toxicity labels; Step 5: Perform multi-task joint pre-training on the multi-view molecular encoder on the unlabeled molecular dataset; the pre-training tasks include toxicity-related chemical prior feature vector prediction task, molecular fingerprint prediction task, two-dimensional topological statistical prediction task, and three-dimensional bond angle statistical prediction task. Step 6: Transfer the pre-trained multi-view molecular encoder to the labeled toxicity dataset for fine-tuning to obtain the molecular toxicity prediction model; input the multi-view molecular data of the molecule to be predicted into the molecular toxicity prediction model, and output the prediction results of one or more toxicity endpoints.
[0010] Furthermore, in step 2, MACCS molecular fingerprint, two-dimensional atomic-level molecular map and BRICS fragment map are constructed based on the molecular structure, and three-dimensional conformational geometric data are generated; MACCS molecular fingerprint is a molecular structure fingerprint that encodes molecular structure features into binary feature bits; BRICS (retrosynthetic related chemical substructure fragmentation method) is a method for fragmenting molecules according to preset chemical rules.
[0011] Further, the multi-view molecular encoder in step 3 includes a one-dimensional molecular fingerprint encoder, a two-dimensional molecular graph encoder, and a three-dimensional conformation encoder; the one-dimensional molecular fingerprint encoder is used to map the MACCS molecular fingerprint into a one-dimensional molecular fingerprint representation; the two-dimensional molecular graph encoder is used to extract features and jointly characterize the two-dimensional atomic-level molecular graph and the BRICS fragment graph to obtain a two-dimensional molecular graph representation; the three-dimensional conformation encoder is used to extract the spatial geometric features of the molecule based on the three-dimensional conformation geometric data to obtain a three-dimensional conformation representation; the one-dimensional molecular fingerprint encoder, the two-dimensional molecular graph encoder, and the three-dimensional conformation encoder correspond to one-dimensional, two-dimensional, and three-dimensional molecular views, respectively; the MACCS molecular fingerprint is input into the one-dimensional molecular fingerprint encoder to obtain a one-dimensional molecular fingerprint representation. Input the two-dimensional atomic-level molecular diagram and the BRICS fragment diagram into the two-dimensional molecular diagram encoder to obtain the two-dimensional molecular diagram representation. Input the 3D conformation geometry data into the 3D conformation encoder to obtain the 3D conformation representation. The subscripts 1D, 2D, and 3D represent one-dimensional, two-dimensional, and three-dimensional dimensions, respectively.
[0012] The adaptive gating fusion in step 3 specifically involves: representing it using a two-dimensional molecular graph. Based on this, calculate the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector: ; ; The corresponding view representations are weighted element-wise based on the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector, and then fused to obtain a unified molecular representation: ;
[0013] in, and These represent the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector, respectively. Represents the conformational quality feature vector; This indicates the validity of the conformation; it is set to 1 when the conformation is valid and 0 when it is invalid. Represents a unified molecule representation; , and These represent a one-dimensional gated network, a three-dimensional gated network, and a multi-view fusion network, respectively, all implemented using a multi-layer perceptron (MLP). A multi-layer perceptron consists of one or more fully connected layers and activation functions to introduce nonlinear transformations, which is existing technology. Calculate the one-dimensional fingerprint gating coefficient vector based on the two-dimensional molecular graph representation and the one-dimensional molecular fingerprint representation; Calculate the three-dimensional conformation gating coefficient vector based on the two-dimensional molecular diagram representation, the three-dimensional conformation representation, and the conformational quality eigenvector; Fusion of the gated weighted multi-view representations; The sigmoid activation function is used to represent the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector. These are mapped to a value between 0 and 1 using the sigmoid activation function to adjust the contribution of each dimension of the feature in the corresponding view representation. When the conformation is invalid, The three-dimensional configuration gating coefficient vector is zero; Represents the modified linear unit activation function; symbol Indicates vector concatenation; symbol The symbol (plus sign) indicates element-wise multiplication of vectors; the symbol (plus sign) indicates vector addition.
[0014] Furthermore, the conformational quality feature vector in step 3 includes conformational validity markers, dimensionless conformational energy features, atomic number features, average radial distance, standard deviation of radial distance, and average bond length, expressed as: ; in, This represents the conformational quality feature vector; Marker for conformational validity; The dimensionless characteristic of the conformational energy is obtained by numerical truncation and hyperbolic tangent mapping. The specific truncation range and transformation parameters can be set according to implementation needs. For the number of atoms in the molecule Atom number characteristics obtained after logarithmic transformation and scaling and These represent the mean and standard deviation of the distance from each atom to the geometric center of the molecule, respectively. The average length of the covalent bond space; superscript This indicates the vector transpose; the conformational energy is calculated using the MMFF molecular force field method, where MMFF stands for Merck molecular force field method.
[0015] For including A molecule with __ atoms, its three-dimensional conformational coordinate matrix is denoted as ___. When the coordinate matrix is missing or the dimension is not zero If the number of atoms in the coordinate matrix is inconsistent with the number of atomic nodes in the two-dimensional atomic-level molecular diagram, or if the matrix contains non-finite values, the three-dimensional conformation will be deemed invalid. ;otherwise .when At that time, the three-dimensional conformation representation and conformation quality feature vector are set to zero, and the three-dimensional conformation gating coefficient vector is set to 0.
[0016] Furthermore, in step 4, the toxicity-related chemical prior feature vector is obtained by concatenating the structural warning vector and the physicochemical property interval vector: ; in, This represents the toxicity-related chemical prior feature vector; This is a structural warning vector, and each dimension takes a value of 0 or 1 depending on whether the corresponding structural warning matches. The physicochemical property interval vector is defined as follows: the structural warning vector is encoded based on whether the molecule contains corresponding toxicity-related structural warnings; the physicochemical property interval vector is encoded based on the interval to which the molecule's physicochemical descriptor belongs; the structural warning vector is obtained through SMARTS substructure matching rules, and the structural warnings include aromatic amines, nitro groups, aldehyde groups, epoxides, aziridines, acyl halides, isocyanates, hydrazine-like structures, α,β-unsaturated carbonyl structures, and quinone-like structures; the physicochemical property interval vector is encoded based on the logarithm of the octanol / water partition coefficient (LogP), topological polar surface area (TPSA), molecular weight, number of aromatic rings, and number of halogen atoms; where LogP represents the logarithm of the octanol / water partition coefficient, and TPSA represents the topological polar surface area.
[0017] Furthermore, in step 5, the molecular fingerprint prediction task predicts the MACCS molecular fingerprint based on the two-dimensional molecular graph representation and the gated weighted three-dimensional conformational representation, without using the one-dimensional molecular fingerprint representation as input during the prediction process; firstly, the structural fusion representation is obtained according to the following formula: ; The structural fusion representation is then input into the molecular fingerprint prediction network to obtain the predicted MACCS molecular fingerprint: ; The toxicity-related chemical prior eigenvector prediction task, the two-dimensional topological statistical prediction task, and the three-dimensional bond angle statistical prediction task all use a unified molecular representation as input:
[0018] in For structural fusion representation; This is the predicted value for molecular fingerprints; These are prior predictions of toxicity-related chemicals; These are two-dimensional topological statistical predictions; These are statistical predictions of three-dimensional bond angles; and These represent the structural fusion network and the molecular fingerprint prediction network, respectively. , and These represent a toxicity-related chemical prior feature vector prediction network, a two-dimensional topological statistical prediction network, and a three-dimensional bond angle statistical prediction network, respectively; all are implemented using a multilayer perceptron, which consists of one or more fully connected layers and an activation function for introducing nonlinear transformations, and belongs to the prior art.
[0019] The prediction objectives of the two-dimensional topological statistics include the normalized mean shortest path distance, the maximum value of all shortest path distances (standard nomenclature is the diameter of the graph), and the standard deviation of the shortest path distance; the prediction objectives of the three-dimensional bond angle statistics include the normalized mean and standard deviation of the bond angles; the molecular fingerprint prediction task and the toxicity-related chemical prior feature vector prediction task use binary cross-entropy loss; the two-dimensional topological statistics prediction task and the three-dimensional bond angle statistics prediction task use smoothed L1 loss after standard deviation normalization.
[0020] The weighted loss of the four pre-training tasks is expressed as follows: ; in, The weighted loss is calculated from four pre-training tasks: molecular fingerprint prediction, toxicity-related chemical prior feature vector prediction, two-dimensional topological statistical prediction, and three-dimensional bond angle statistical prediction. The loss of the molecular fingerprint prediction task, The loss for the toxicity-related chemical prior feature vector prediction task is... The loss of the two-dimensional topological statistical prediction task is... The loss of the three-dimensional bond angle statistical prediction task, for The corresponding weighting coefficients, for The corresponding weighting coefficients, for The corresponding weighting coefficients, for The corresponding weighting coefficients.
[0021] When contrastive learning is enabled, pre-training also includes contrastive learning tasks between molecular representations and BRICS fragment representations, as well as between molecular representations and 3D conformational representations. Contrastive learning improves the model's representational ability by bringing the representations of related molecular views closer together and moving the representations of unrelated molecular views further apart. Molecules with invalid 3D conformations are not included in the calculation of the 3D conformational contrastive loss. In this case, the total pre-training loss is expressed as: When contrastive learning is enabled, pre-training also includes contrastive learning tasks between molecular representations and BRICS fragment representations, as well as between molecular representations and 3D conformational representations. Contrastive learning improves the model's representational ability by bringing the representations of related molecular views closer together and moving the representations of unrelated molecular views further apart. Molecules with invalid 3D conformations are not included in the calculation of the 3D conformational contrastive loss. In this case, the total pre-training loss is expressed as: ; in, This represents the total pre-training loss. The contrast loss between molecular representation and BRICS fragment representation; This represents the contrast loss between molecular representation and three-dimensional conformational representation; The contrastive loss weight coefficients vary with the training rounds; For training rounds; The contrast loss weighting coefficient between molecules and their three-dimensional conformations.
[0022] Contrastive learning is a self-supervised learning method that learns high-quality representations by bringing positive samples closer and pushing negative samples further away. When calculating the contrast loss between molecules and their three-dimensional conformations, only molecules with valid conformations are included in the calculation. The specific values and adjustment methods of each loss weight coefficient are given in the examples.
[0023] Furthermore, in step 6, the pre-trained multi-view molecular encoder is fine-tuned according to the type of downstream toxicity prediction task, and a corresponding molecular toxicity prediction model is trained based on the labeled toxicity dataset; wherein, the downstream toxicity prediction task includes classification task and regression task; for the molecule to be predicted, a unified molecular representation is obtained according to the aforementioned molecular structure processing and multi-view representation generation process, and the unified molecular representation is input into the fine-tuned molecular toxicity prediction model to obtain the prediction result of the corresponding toxicity endpoint.
[0024] Compared with existing technologies, this invention has the following advantages: It uses the toxicity-related chemical prior feature vector, composed of structural warnings and physicochemical property ranges, as a pre-training supervision target, enabling the molecular toxicity prediction model to learn toxicity-related chemical structures and physicochemical property patterns before downstream fine-tuning. It jointly utilizes MACCS molecular fingerprints, two-dimensional atomic-level molecular diagrams, BRICS fragment diagrams, and three-dimensional conformational geometry data to construct a multi-view molecular representation. Based on the two-dimensional molecular diagram representation, it adjusts the contributions of one-dimensional molecular fingerprint representation and three-dimensional conformational representation through a gating mechanism, and combines conformational quality features to control the influence of three-dimensional conformational representation, helping to reduce the adverse effects of invalid conformations on the fused representation. By employing a pre-training followed by downstream fine-tuning approach, the obtained molecular representation can be used for classification or regression prediction of different toxicity endpoints. Attached Figure Description
[0025] Figure 1 This is a flowchart of the molecular toxicity prediction method based on prior toxicity information-guided pre-training provided by the present invention; Figure 2 This is a schematic diagram of the multi-view molecular encoder and adaptive fusion network architecture of the molecular toxicity prediction method based on toxicity prior information-guided pre-training provided by the present invention. Figure 3 This is a schematic diagram of the pre-training and downstream fine-tuning process of the molecular toxicity prediction method based on prior toxicity information-guided pre-training provided in this embodiment of the invention. Figure 4 This is a schematic diagram of a multi-task pre-training task for a molecular toxicity prediction method based on prior toxicity information-guided pre-training, provided in an embodiment of the present invention. Figure 5 This is a schematic diagram of the toxicity-related chemical prior feature vector of the molecular toxicity prediction method based on toxicity prior information-guided pre-training provided in the embodiments of the present invention. Figure 6 This is a comparison of experimental results of multi-view fusion strategies for molecular toxicity prediction methods based on prior toxicity information-guided pre-training provided in this embodiment of the invention. Figure 7 This is an experimental result diagram of ablation based on a three-dimensional gating regulation mechanism with conformational quality characteristics provided in an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, this invention is not limited to the following embodiments, and specific implementation methods can be determined according to the technical solutions of this invention and actual circumstances. To avoid obscuring the essence of this invention, well-known methods, processes, and procedures are not described in detail. It should be noted that in this invention, SMILES uses ASCII strings to represent a specific molecule's connection method (atoms and bonds); SMARTS adds wildcards to SMILES to describe a class of substructure patterns. Both SMILES and SMARTS are existing technologies. BRICS fragment diagrams are structural representations obtained by fragment decomposing molecules using the BRICS algorithm, and MACCS molecular fingerprints are binary fingerprints describing molecular structures. Both BRICS fragment diagrams and MACCS molecular fingerprints are existing technologies.
[0027] This embodiment provides a molecular toxicity prediction method based on pre-training guided by prior toxicity information. The overall process is as follows: Figure 1 As shown, the network architecture is as follows Figure 2 As shown, the two-stage training process is as follows: Figure 3 As shown, the pre-training task is as follows: Figure 4 As shown, this method sequentially constructs molecular multi-view data, toxicity-related chemical prior feature vectors, and a multi-view molecular encoder. It is pre-trained on an unlabeled molecular dataset, and then the pre-trained multi-view molecular encoder is transferred to a labeled toxicity dataset for fine-tuning before being used for toxicity prediction of the molecule to be tested. Specifically, it includes the following steps: Step 1: Obtain molecular data: The pre-training molecular data in this embodiment comes from the Distributed Structure-Searchable Toxicity (DSSTox) database maintained by the U.S. Environmental Protection Agency (EPA). After validating, screening, normalizing, and removing duplicate structures from the molecular structures in the database, 250,000 molecules were randomly sampled and retained as unlabeled molecular data for pre-training.
[0028] To evaluate the applicability of the method provided by this invention in different toxicity prediction tasks, this embodiment uses three types of data sources, namely the MoleculeNet molecular property benchmark dataset, the TOXRIC database, and the ToxTree database related to toxicity prediction software, totaling 12 publicly available datasets for validation, covering multi-endpoint classification, single-endpoint classification, and regression tasks. The datasets used include the MoleculeNet benchmark dataset (Tox21), the Toxicology Prediction Dataset (ToxCast), the ClinTox dataset, and the SIDER dataset (ClinTox). The TOXRIC database includes datasets on carcinogenicity, mutagenicity, respiratory toxicity, eye irritation, eye corrosion, hepatotoxicity, and the median lethal dose (LD50). Additionally, the hERG potassium channel inhibitory activity dataset (hERG pIC50) from the ToxTree database is also used. Here, pIC50 represents the negative logarithmic value of the median inhibitory concentration.
[0029] For the datasets described above, downstream prediction layers and training objectives are set according to their task types: classification tasks output the class probabilities of one or more toxic endpoints, while regression tasks output corresponding continuous predicted values. Each dataset is divided into training, validation, and test sets according to its corresponding training configuration; model selection, early stopping, and classification threshold determination use only the training or validation set, while the test set is used for final performance evaluation.
[0030] Step 2: Constructing molecular multi-view data: For the molecular structure obtained and normalized in step 1, one-dimensional molecular fingerprints, two-dimensional molecular diagrams, and three-dimensional conformational geometric data are constructed as inputs for the subsequent multi-view molecular encoder. Details are as follows.
[0031] First, a MACCS molecular fingerprint (Molecular ACCess System) is generated based on the molecular structure. The molecular structure features are encoded into a 167-dimensional binary vector, which serves as the input for the one-dimensional molecular fingerprint representation.
[0032] Furthermore, a two-dimensional atomic-level molecular graph is constructed, using atoms in the molecule as graph nodes and covalent bonds between atoms as graph edges, and atomic features and chemical bond features are extracted separately. In this embodiment, the atomic features are 46-dimensional and the chemical bond features are 10-dimensional. Atomic features include atom type, degree, formal charge, hybridization mode, aromaticity, number of hydrogen atoms, chirality information, pharmacophore label, and skeleton label; chemical bond features include bond type, conjugation, ring properties, and stereochemical information. Further, the molecule is fragmented according to the BRICS (Brochure-Based Molecular Fragmentation) rules, a BRICS fragment graph is constructed, and the affiliation relationships between atoms and fragments, as well as the connections between fragments, are recorded.
[0033] Furthermore, multiple candidate 3D conformations are generated for the molecule, and energy optimization is performed to select the conformation with the lowest energy. In this embodiment, RDKit (a cheminformatics toolkit) is used to generate 10 candidate conformations, which are then optimized using MMFF (Merck molecular force field method). The random seed for conformation generation is 42. The 3D atomic coordinates corresponding to the 2D atomic-level molecular diagram are extracted from the selected conformations, and the interatomic spatial distance, 3D global geometric descriptor, and 3D bond angle statistics are calculated based on the atomic coordinates to form the 3D conformation geometric data. Among them, the 3D global geometric descriptor is used to describe the overall spatial shape of the molecule; the 3D bond angle statistics serve as the prediction target for subsequent pre-training tasks.
[0034] Each molecule generates a corresponding MACCS molecular fingerprint, a two-dimensional atomic-level molecular map, a BRICS fragment map, and three-dimensional conformational geometric data for subsequent encoding, fusion, and pre-training.
[0035] Step 3: Construct a multi-view molecular encoder and fuse molecular representations. Input the MACCS molecular fingerprint, 2D atomic-level molecular graph, BRICS fragment graph, and 3D conformational geometry data obtained in Step 2 into the multi-view molecular encoder. Extract the 1D molecular fingerprint representation, 2D molecular graph representation, and 3D conformational representation respectively, and obtain a unified molecular representation through an adaptive gating mechanism. The network structure is as follows: Figure 2 As shown.
[0036] Step 301: Extract the one-dimensional molecular fingerprint representation. The 167-dimensional binary vector MACCS molecular fingerprint is input into a one-dimensional molecular fingerprint encoder. After linear transformation, ReLU activation function, and Dropout (random deactivation) processing, a one-dimensional molecular fingerprint representation is obtained. In this embodiment, the model's hidden dimension is 256.
[0037] Step 302: Extract the 2D molecular graph representation. The 2D atomic-level molecular graph is input into the 2D molecular graph encoder. Multi-level message passing is performed on atomic nodes and their adjacent nodes, and global summation pooling is applied to the node representations to obtain the atomic-level molecular representation. The BRICS fragment graph is input into the fragment graph encoder to obtain the representations of each fragment. Then, the weight coefficients of the fragment representations relative to the overall molecular representation are calculated using a graph attention mechanism to obtain the fragment-level molecular representation. The atomic-level molecular representation and the fragment-level molecular representation are fused to obtain the 2D molecular graph representation. .
[0038] Step 303: Extract the 3D conformational representation. Based on the atomic 3D coordinates obtained in Step 2, calculate the centralized coordinates, radial distance, and average spatial distance of each atom and its adjacent covalent bonds to form the atomic geometric input. Calculate the bond length based on the coordinates of the atoms at both ends of the covalent bonds and expand them using radial basis functions to form the edge geometric input. Feed the atomic and edge geometric inputs into the 3D conformational encoder, perform geometric message passing along the covalent bond connections in the 2D atomic-level molecular diagram, and obtain the 3D conformational representation through global pooling. .
[0039] Step 304: Calculate conformational quality features. Based on the three-dimensional conformation and its geometric data selected in Step 2, construct a six-dimensional conformational quality feature vector, which includes conformational validity markers, conformational energy features, atomic number features, mean radial distance, standard deviation of radial distance, and mean bond length. ; in, This represents the conformational quality feature vector; The value is set to 1 for valid conformation and 0 for invalid conformation; the constant 1 in the formula is the first feature term of the vector. The molecular force field energy represents the conformation obtained through MMFF optimization. This indicates that the value is restricted to the upper and lower bounds given below. Represents the hyperbolic tangent function; Represents the natural logarithm; The number of atoms in a molecule; and These represent the mean and standard deviation of the distance from each atom to the geometric center of the molecule, respectively. Indicates the average length of the covalent bond space; superscript This represents the vector transpose. The numerical truncation limits and transformation coefficients in this formula are the parameters used in this embodiment.
[0040] When three-dimensional coordinates are missing or the coordinate matrix dimensions are not [value missing] If the number of coordinates is inconsistent with the number of atomic nodes in the two-dimensional molecular diagram, or if there are non-finite values in the coordinates, the conformation is deemed invalid. And set the three-dimensional configuration representation and configuration quality feature vector to zero.
[0041] Step 305: Adaptive Gated Fusion. Based on the two-dimensional molecular representation, calculate the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector respectively: ; ; ; in, and These are the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector, respectively. To standardize the representation of molecules; Use the Sigmoid activation function; , and These are respectively one-dimensional gated networks, three-dimensional gated networks, and fused networks; symbols This represents vector concatenation. Because the 3D conformational gating coefficients include conformational validity markers... When the conformation is invalid This suppresses the influence of invalid three-dimensional information on the unified molecular representation.
[0042] Step 4: Construct a toxicity-related chemical prior feature vector. Based on the molecular structure and its physicochemical descriptors obtained in Step 2, construct a toxicity-related chemical prior feature vector as the prediction target for subsequent pre-training tasks. This toxicity-related chemical prior feature vector is obtained by concatenating the structural warning vector and the physicochemical property interval vector. Its construction process is as follows: Figure 5 As shown.
[0043] Step 401: Construct a toxicity structure warning vector. SMARTS (a query language for describing and matching molecular substructures) rules are used to match molecular structures, with 10 binary feature bits set, corresponding to: Aromatic amines: matching primary or secondary amine nitrogen atoms bonded to aromatic atoms that are not amide nitrogen atoms; Nitro: Matches nitro groups in neutral or charge-separated forms; Aldehyde group: An aldehyde carbonyl group with a hydrogen atom and a carbon atom connected together; Epoxy three-membered ring: a three-membered ring consisting of one oxygen atom and two carbon atoms; Aziridine three-membered ring: a three-membered ring consisting of one nitrogen atom and two carbon atoms; Acyl halides: structures that match the carbonyl carbon bonded to fluorine, chlorine, bromine, or iodine atoms; Isocyanates: Match the N=C=O structure; Hydrazine-like structure: a structure that matches two nitrogen atoms directly bonded together; Unsaturated carbonyl group: matches the structure where the acyclic carbon-carbon double bond is attached to the carbonyl group; Quinone-like six-membered ring structure: Matching six-membered ring structures containing two carbonyl groups and having corresponding alternating bond patterns.
[0044] In this structure warning vector, N, O, C, F, Cl, Br, and I represent nitrogen, oxygen, carbon, fluorine, chlorine, bromine, and iodine atoms, respectively; "primary amine" and "secondary amine" indicate that the nitrogen atom is attached to one or two non-hydrogen substituents; and "acyclic" indicates that the corresponding carbon atom does not belong to a ring structure. Substructure matching is performed for each type of structure warning; if a match is found, the corresponding feature bit is set to 1, otherwise it is set to 0, thus obtaining a 10-dimensional structure warning vector.
[0045] Step 402: Construct a physicochemical property interval vector. Calculate the logarithm of the n-octanol / water partition coefficient (LogP), topological polar surface area (TPSA), molecular weight, number of aromatic rings, and number of halogen atoms of the molecule, and perform binary encoding according to preset intervals to obtain a 14-dimensional physicochemical property interval vector. The interval settings in this embodiment are as follows: LogP: less than 1, 1 to less than 3, not less than 3; TPSA: less than 40, 40 to less than 90, not less than 90 square angstroms; Molecular weight: less than 200, 200 to less than 400, not less than 400 Daltons Number of aromatic rings: 0, 1, or not less than 2; Number of halogen atoms: The range is not less than 1 and not less than 2.
[0046] The first four terms (LogP, TPSA, molecular weight, and number of aromatic rings) each have three characteristic bits; the number of halogen atoms has two characteristic bits, indicating whether the number is not less than 1 and not less than 2, respectively. Therefore, the physicochemical property interval vector has a total of 14 dimensions. The unit of TPSA is square angstroms, the unit of molecular weight is Daltons, and the units of the number of aromatic rings and the number of halogen atoms are individuals.
[0047] By concatenating the toxicity structure warning vector and the physicochemical property interval vector, a 24-dimensional toxicity-related chemical prior feature vector is obtained: ; in, This represents the toxicity-related chemical prior feature vector; This is a 10-dimensional toxicity-related structure warning vector; It is a 14-dimensional interval vector of physical and chemical properties; This indicates vector concatenation; It represents a vector space consisting of 24 feature bits that take values of 0 or 1.
[0048] The aforementioned feature vectors are constructed solely based on molecular structure and physicochemical descriptors, without relying on downstream toxicity tags, and serve as the supervisory targets for the toxicity-related chemical prior prediction task in step 5. In this embodiment, the SMARTS substructure patterns and physicochemical property interval boundaries are specifically set; without departing from the technical concept of this invention, the structural warning category or interval settings can be adjusted according to the target toxicity prediction task.
[0049] Step 5: Perform multi-task pre-training guided by toxicity prior information. Use the unified molecular representation obtained in Step 3 as input to the pre-trained model, and the molecular features constructed in Steps 2 and 4 as targets for the corresponding prediction tasks. Pre-train the multi-view molecular encoder on an unlabeled molecular dataset. The pre-training tasks are as follows: Figure 4 As shown, the tasks include molecular fingerprint prediction, toxicity-related chemical prior feature vector prediction, two-dimensional topological statistical prediction, and three-dimensional bond angle statistical prediction.
[0050] Specifically, the molecular fingerprint prediction task predicts the 167-dimensional binary vector MACCS molecular fingerprint based on the unified molecular representation; the toxicity-related chemical prior prediction task predicts the 24-dimensional toxicity-related chemical prior feature vector obtained in step 4 based on the unified molecular representation; the two-dimensional topological statistical prediction task predicts the normalized mean shortest path distance, the maximum value among all shortest path distances, and the standard deviation of the shortest path distance of the molecular graph; and the three-dimensional bond angle statistical prediction task predicts the normalized bond angle mean and standard deviation of the three-dimensional conformation.
[0051] Each task calculates the loss between the predicted and target values. The molecular fingerprint prediction task and the toxicity-related chemical prior feature vector prediction task use a binary cross-entropy loss with logistic values; the two-dimensional topological statistical prediction task and the three-dimensional bond angle statistical prediction task use a smoothed L1 loss normalized to standard deviation. The losses from the four tasks are weighted and summed. ; in, The weighted loss is calculated from four pre-training tasks: molecular fingerprint prediction, toxicity-related chemical prior feature vector prediction, two-dimensional topological statistical prediction, and three-dimensional bond angle statistical prediction. The loss of the molecular fingerprint prediction task, The loss for the toxicity-related chemical prior feature vector prediction task is... The loss of the two-dimensional topological statistical prediction task is... The loss of the three-dimensional bond angle statistical prediction task, for The corresponding weighting coefficients, for The corresponding weighting coefficients, for The corresponding weighting coefficients, for The corresponding weighting coefficients. In this embodiment, the four weighting coefficients are 0.2, 0.5, 0.2, and 0.1, respectively.
[0052] When contrastive learning is enabled, pre-training also includes contrastive learning tasks between molecular representations and BRICS fragment representations, as well as between molecular representations and 3D conformational representations. Contrastive learning improves the model's representational ability by bringing representations of related molecular views closer together and moving representations of unrelated molecular views further apart; molecules with invalid 3D conformations are not included in the calculation of the 3D conformational contrastive loss. In this case, the total pre-training loss is expressed as: ; in, This represents the total pre-training loss. The contrast loss between molecular representation and BRICS fragment representation; This represents the contrast loss between molecular representation and three-dimensional conformational representation; The contrastive loss weight coefficients vary with the training rounds; For training rounds; This represents the contrast loss weighting coefficient between molecules and their three-dimensional conformations. In this embodiment, The comparison learning temperature parameter is 0.1.
[0053] This embodiment uses the Adam (Adaptive Moment Estimation) optimizer to update model parameters, with a batch size of 32, a maximum training epoch of 200, an initial learning rate of 0.001, a weight decay coefficient of 0.0001, and a dropout rate of 0.3. Early stopping is performed based on the validation set loss; training stops when the validation set loss fails to improve for 50 consecutive epochs, and the model parameters with the best validation performance are saved for fine-tuning in the downstream toxicity task in step 6.
[0054] The loss weight coefficients, contrastive learning switch, and training parameters for the four pre-training tasks are the settings used in this embodiment; other parameter settings that can achieve the same pre-training objective can also be used.
[0055] Step 6: Perform downstream fine-tuning and toxicity prediction. Transfer the pre-trained multi-view molecular encoder to the labeled toxicity dataset, fine-tune the molecular toxicity prediction model using the training set, and obtain the molecular toxicity prediction model. Then input the multi-view representation of the molecule to be tested into the molecular toxicity prediction model and output the prediction results of one or more toxicity endpoints.
[0056] Specifically, it includes the following sub-steps: Step 601: Downstream Fine-tuning. The labeled toxicity dataset is divided into training, validation, and test sets. Molecules in the training set are used to construct multi-view molecular data and generate a unified molecular representation, following steps 2 to 4. This representation is then input into the pre-trained model. A prediction layer adapted to the downstream task type is connected after the pre-trained model, and the prediction loss is calculated using the valid labels to update the model parameters. Classification loss is used for classification tasks, and regression loss is used for regression tasks. For missing labels, the loss for the corresponding sample at the corresponding toxicity endpoint is not calculated. Model parameters are selected based on the validation set performance to obtain the fine-tuned molecular toxicity prediction model.
[0057] Taking Tox21 (the Project 21 dataset for toxicity prediction) as an example, it contains 12 toxicity endpoints. The model outputs class scores for negative and positive classes for each endpoint, resulting in 24 scores in the output layer. This embodiment uses a batch size of 64, a maximum training epoch of 100, an initial learning rate of 0.0005, a weight decay coefficient of 0.0001, and a dropout rate of 0.2, and employs the Adam (Adaptive Moment Estimation) optimizer for parameter updates. Training stops when the validation set metrics fail to improve for 20 consecutive epochs, and the model parameters that best perform on the validation set are retained. The above values represent the training settings for this embodiment.
[0058] Step 602: Toxicity Prediction. Obtain the SMILES (Simplified Molecular Linear Input Normalization) string of the molecule to be tested. Following the same structure normalization, feature generation, and 3D conformation processing procedures as in the training phase, construct its MACCS molecular fingerprint, 2D atomic-level molecular map, BRICS fragment map, and 3D conformational geometry data. Input each view into the fine-tuned molecular toxicity prediction model to obtain a unified molecular representation and corresponding toxicity prediction results.
[0059] For classification tasks, the molecular toxicity prediction model outputs the category score or positive probability for each toxicity endpoint and determines the predicted category based on the corresponding classification threshold. For regression tasks, the molecular toxicity prediction model outputs the predicted value of the corresponding toxicity index. When the three-dimensional conformation of the analyte molecule is invalid, the three-dimensional conformation quality feature vector is set to zero, and the contribution of the conformation to the unified molecular representation is suppressed by three-dimensional gating, while the prediction is still completed using valid one-dimensional and two-dimensional molecular representations. The output is the prediction result of the analyte molecule on one or more toxicity endpoints.
[0060] Example 2 Ablation experiment: To analyze the impact of each component of this invention on toxicity prediction results, this embodiment compares a multi-view fusion strategy, a three-dimensional gating regulation mechanism based on conformational quality features, and a toxicity-related chemical prior feature vector prediction task, while maintaining consistency in data partitioning, evaluation procedures, and corresponding training settings. The control experiments for each group only changed the fusion strategy or model components under investigation. The area under the receiver operating characteristic curve (ROC-AUC) was used as the evaluation metric for the classification task; a higher value indicates better classification performance.
[0061] Comparison of multi-view fusion strategies. On five classification datasets—Tox21, ClinTox, Hepatotoxicity, Mutagenicity, and Eye irritation—direct splicing, static weight coefficient fusion, and adaptive gating fusion were compared. Direct splicing combines representations of different molecular views; static weight coefficient fusion combines different view representations according to preset fixed weight coefficients; and adaptive gating fusion, based on two-dimensional molecular graph representations, adjusts the contributions of one-dimensional molecular fingerprint representation and three-dimensional conformational representation through gating coefficients. Experimental results are as follows: Figure 6 As shown, the average ROC-AUC of the three fusion strategies on the five datasets mentioned above are 0.8243, 0.8249, and 0.8280, respectively. The average value of adaptive gating fusion is higher than that of direct splicing and static weight coefficient fusion, indicating that dynamically adjusting the contributions of one-dimensional molecular fingerprint representation and three-dimensional conformation representation according to molecular representation helps to improve the toxicity classification performance after multi-view fusion.
[0062] Ablation based on 3D gating modulation mechanism using conformational quality features. To analyze conformational quality features and their effect on 3D conformational gating modulation, a comparison was made between the complete model, the model with conformational quality features removed, and the model with conformational quality gating modulation removed. The model with conformational quality features removed does not use conformational quality features in 3D conformational gating calculations; the model with conformational quality gating modulation removed retains the 3D conformational representation but does not adjust its fusion contribution based on conformational quality. Experimental results are as follows: Figure 7 As shown, the complete model of this invention has an average ROC-AUC of 0.825 on five datasets, which is higher than the two ablation models mentioned above. Looking at individual datasets, the complete model performs better or is close to the ablation model on Tox21, ClinTox, Mutagenicity, and Eye irritation; on Hepatotoxicity, the model removing conformational quality features slightly outperforms the complete model. These results indicate that the three-dimensional gating regulation mechanism based on conformational quality features generally helps the model utilize three-dimensional conformational information.
[0063] The toxicity-related chemical prior feature vector prediction task was ablated. To analyze the impact of this pre-training task on downstream toxicity prediction, the method of this invention was compared with methods that remove the toxicity-related chemical prior feature vector prediction task. Both methods used the same remaining model structure and training settings, differing only in whether or not the toxicity-related chemical prior feature vector was used as the prediction target during the pre-training phase. Experimental results are shown in Table 1.
[0064] Table 1 ; Compared to methods that remove this pre-training task, the method of this invention achieves a higher average ROC-AUC on four out of five datasets, with more significant differences on ClinTox and Mutagenicity; however, the average ROC-AUC of the method of this invention is slightly lower on Eye irritation. These results indicate that the toxicity-related chemical prior feature vector prediction task has a positive effect on downstream prediction on most of the tested datasets.
[0065] Analysis of ablation test results: In summary, the adaptive gating fusion achieved a higher average ROC-AUC across the five datasets than direct splicing and static weight coefficient fusion. Conformation quality features and their gating mechanism facilitated the utilization of 3D conformation information in the overall test. Furthermore, the toxicity-related chemical prior feature vector prediction task achieved a high average ROC-AUC on four of the five tested datasets. These results provide experimental support for the technical design of this invention in three aspects: multi-view fusion, 3D conformation quality processing, and toxicity-related pre-training supervision.
[0066] Comparative experiment: To evaluate the performance of the method of this invention on different toxicity prediction tasks, the method of this invention was compared with five molecular representation learning baseline models. The comparison models include: Attentive FP, which models atoms and their neighborhood features through graph attention mechanism; Hierarchical Graph Neural Network (HiGNN), which jointly models molecular graphs and fragment structures; GROVER, a graph representation self-supervised molecular pre-training model, which learns molecular graph representations through self-supervised pre-training; SCAGE, a conformation-aware graph embedding model, which integrates molecular structure and geometric information through pre-training; and MolMVC, a molecular multi-view contrastive learning model, which jointly learns representations of different molecular views.
[0067] The experiment utilized 12 publicly available toxicity datasets, including the Molecular Properties Benchmark Dataset (MoleculeNet) comprising the 21st Century Toxicology Detection Dataset (Tox21), the Chemical In Vitro High-Throughput Toxicity Screening Dataset (ToxCast), the Clinical Toxicity Dataset (ClinTox), and the Drug Side Effects Database Dataset (SIDER); the Toxicology Resource Information Center (TOXRIC) database, including Carcinogenicity, Mutagenicity, Respiratory Toxicity, Eye Irritation, Eye Corrosion, Hepatotoxicity, and Median Lethal Dose (LD50) datasets; and the hERG potassium channel inhibitory activity dataset (hERGpIC50) from the ToxTree toxicity prediction software database. Here, pIC50 represents the negative logarithmic value of the median inhibitory concentration.
[0068] Each baseline model and the method of this invention employed the same data partitioning and evaluation process on each dataset. Each model underwent independent experiments using five random seeds, and the mean and standard deviation of the experimental results were calculated. For classification tasks, the area under the receiver operating characteristic curve (ROC-AUC) was used as the evaluation metric, with a higher value indicating better classification performance. For regression tasks, the root mean square error (RMSE) was used as the evaluation metric, with a lower value indicating smaller prediction error. The experimental results are shown in Table 2.
[0069] Table 2
[0070] The experimental results are shown in the table. The method of this invention achieved optimal results on 10 out of 12 datasets, and suboptimal results on the remaining two classification datasets. Among the 10 classification tasks, the highest ROC-AUC was achieved on eight datasets: carcinogenicity, mutagenicity, respiratory toxicity, Tox21, ToxCast, SIDER, eye irritation, and ocular corrosion. Particularly on the mutagenicity, eye irritation, and ocular corrosion datasets, the ROC-AUC reached 0.898, 0.967, and 0.991, respectively, indicating that the model has good discriminative ability against positive and negative samples in these datasets. On the ClinTox dataset, the ROC-AUC of the method of this invention was 0.878, slightly lower than SCAGE's 0.879; on the Hepatotoxicity dataset, the ROC-AUC of the method of this invention was 0.748, lower than SCAGE's 0.816, but higher than other baseline models. These results indicate that the highest classification performance was not achieved on these two datasets, and that model performance differed across different toxicity endpoints. In the two regression tasks, the RMSE of the method of this invention on the LD50 and hERG pIC50 datasets were 0.752 and 0.796, respectively, both the lowest values in the table, indicating that under the data processing and evaluation conditions adopted in this embodiment, the prediction error of the corresponding continuous toxicity index is small. Overall, the results in the table above show that the method of this invention has good applicability in the various classification and regression tasks tested.
[0071] The combined results of ablation and comparative experiments show that the method of this invention achieves optimal results in 10 out of 12 downstream toxicity datasets and suboptimal results in 2, indicating that the method has good applicability in the toxicity classification and regression tasks involved in this embodiment. The comparison results of fusion strategies show that the area under the receiver operating characteristic curve (ROC-AUC) of adaptive gating fusion on five representative classification datasets is 0.8280, which is higher than that of direct splicing and static weight coefficient fusion. The conformational quality ablation results support the design of three-dimensional conformational representations using conformational quality information; the toxicity-related chemical prior prediction task achieves high ROC-AUC in four out of the five compared datasets. In summary, the molecular toxicity prediction method based on toxicity prior information-guided pre-training provided by this invention utilizes toxicity-related chemical prior features for multi-task pre-training on unlabeled molecular data, and combines one-dimensional molecular fingerprint representation, two-dimensional molecular graph representation, and three-dimensional conformation representation for adaptive gating fusion. Furthermore, it adjusts the contribution of the three-dimensional conformation representation according to the conformation quality, thereby helping to alleviate the problems of existing methods such as strong dependence on downstream toxicity labeling data, insufficient utilization of toxicity-related chemical information during pre-training, and insufficient consideration of differences in three-dimensional conformation quality.
[0072] The above embodiments are used to illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Any adjustments or equivalent substitutions made by those skilled in the art to the specific parameters, model configurations, or datasets in the embodiments without departing from the technical concept of the present invention should be subject to the scope of protection defined in the claims.
Claims
1. A molecular toxicity prediction method based on pre-training guided by prior toxicity information, characterized in that, Includes the following steps: Step 1: Obtain unlabeled molecular datasets and labeled toxicity datasets, perform validity checks, normalization and repetitive structure processing on molecular structures, and convert the molecular structures into molecular representation data required for subsequent encoding; Step 2: Construct MACCS molecular fingerprint, two-dimensional atomic-level molecular map and BRICS fragment map based on molecular structure, and generate three-dimensional conformational geometry data; Step 3: Construct a multi-view molecular encoder to encode the MACCS molecular fingerprint, two-dimensional atomic-level molecular diagram and BRICS fragment diagram, and three-dimensional conformational geometry data respectively, to obtain a one-dimensional molecular fingerprint representation, a two-dimensional molecular diagram representation, and a three-dimensional conformational representation. Based on the two-dimensional molecular diagram representation, an adaptive gating fusion mechanism is used to adjust the contributions of the one-dimensional molecular fingerprint representation and the three-dimensional conformational representation to the unified molecular representation. Among them, the gating adjustment of the three-dimensional conformational representation is combined with the conformational quality feature vector. When the three-dimensional conformation is invalid, the contribution of the three-dimensional conformational representation to the unified molecular representation is reduced or suppressed. Step 4: Construct a toxicity-related chemical prior feature vector; using SMARTS substructure matching rules, identify preset toxicity-related structural warnings from the molecular structure and encode the matching results into a structural warning vector; perform interval encoding on the molecular physicochemical descriptors to obtain physicochemical property interval vectors; concatenate the structural warning vectors with the physicochemical property interval vectors to form a toxicity-related chemical prior feature vector; the toxicity-related chemical prior feature vector is constructed based on the molecular structure and physicochemical descriptors and does not depend on downstream toxicity labels; Step 5: Perform multi-task joint pre-training on the multi-view molecular encoder on the unlabeled molecular dataset; the pre-training tasks include toxicity-related chemical prior feature vector prediction task, molecular fingerprint prediction task, two-dimensional topological statistical prediction task, and three-dimensional bond angle statistical prediction task. Step 6: Transfer the pre-trained multi-view molecular encoder to the labeled toxicity dataset for fine-tuning to obtain the molecular toxicity prediction model; input the multi-view molecular data of the molecule to be predicted into the molecular toxicity prediction model, and output the prediction results of one or more toxicity endpoints.
2. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 1, characterized in that, The multi-view molecular encoder in step 3 includes a one-dimensional molecular fingerprint encoder, a two-dimensional molecular graph encoder, and a three-dimensional conformation encoder. The one-dimensional molecular fingerprint encoder maps the MACCS molecular fingerprint to a one-dimensional molecular fingerprint representation. The two-dimensional molecular graph encoder extracts features and performs joint characterization on the two-dimensional atomic-level molecular graph and BRICS fragment graph to obtain a two-dimensional molecular graph representation. The three-dimensional conformation encoder extracts the spatial geometric features of the molecule based on the three-dimensional conformation geometric data to obtain a three-dimensional conformation representation. The MACCS molecular fingerprint is input into the one-dimensional molecular fingerprint encoder to obtain a one-dimensional molecular fingerprint representation. Input the two-dimensional atomic-level molecular diagram and the BRICS fragment diagram into the two-dimensional molecular diagram encoder to obtain the two-dimensional molecular diagram representation. Input the 3D conformation geometry data into the 3D conformation encoder to obtain the 3D conformation representation. .
3. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 2, characterized in that, The adaptive gating fusion in step 3 specifically involves: representing it using a two-dimensional molecular graph. Based on this, calculate the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector: ; ; The corresponding view representations are weighted element-wise based on the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector, and then fused to obtain a unified molecular representation: ; in, and These represent the one-dimensional fingerprint gating coefficient vector and the three-dimensional conformation gating coefficient vector, respectively. Represents the conformational quality feature vector; This indicates the validity of the conformation; it is set to 1 when the conformation is valid and 0 when it is invalid. Represents a unified molecule representation; , and These represent a one-dimensional gated network, a three-dimensional gated network, and a multi-view fusion network, respectively, all implemented using a multilayer perceptron. This represents the Sigmoid activation function; Represents the modified linear unit activation function; symbol Indicates vector concatenation; symbol This represents element-wise multiplication of vectors.
4. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 3, characterized in that, The conformational quality feature vector includes conformational validity marker, dimensionless conformational energy feature, atomic number feature, mean radial distance, standard deviation of radial distance, and mean bond length; the conformational energy is calculated using the MMFF molecular force field method and the dimensionless conformational energy feature is obtained by numerical truncation and hyperbolic tangent mapping. The atomic number characteristic is obtained by performing a logarithmic transformation and scaling on the number of atoms in the molecule.
5. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 1, characterized in that, In step 4, the structural warning vector is obtained through SMARTS substructure matching rules. The structural warnings include aromatic amines, nitro groups, aldehyde groups, epoxides, aziridines, acyl halides, isocyanates, hydrazine-like structures, α,β-unsaturated carbonyl structures, and quinone-like structures. The physicochemical property interval vector is encoded based on the logarithm of the octanol / water partition coefficient (LogP), the topological polar surface area (TPSA), molecular weight, the number of aromatic rings, and the number of halogen atoms. The toxicity-related chemical prior feature vector is obtained by concatenating the structural warning vector and the physicochemical property interval vector, and is expressed as follows: ; in, To define the toxicity-related chemical prior eigenvectors; This is a structural warning vector, and each dimension takes a value of 0 or 1 depending on whether the corresponding structural warning matches. It is a vector of physical and chemical properties.
6. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 1, characterized in that, In step 5, the molecular fingerprint prediction task predicts the MACCS molecular fingerprint based on a two-dimensional molecular graph representation and a gated weighted three-dimensional conformational representation, without using the one-dimensional fingerprint representation as input during the prediction process; firstly, the structural fusion representation is obtained according to the following formula: ; The structural fusion representation is then input into the molecular fingerprint prediction network to obtain the predicted MACCS molecular fingerprint: ; in For structural fusion representation; This is the predicted value for molecular fingerprints; Represented as a two-dimensional molecular diagram; A three-dimensional configuration gating coefficient vector; It is a three-dimensional representation; Represents the modified linear unit activation function; symbol Indicates vector concatenation; symbol This represents element-wise multiplication of vectors; and The structures fusion network and the molecular fingerprint prediction network are represented respectively, both implemented using a multilayer perceptron.
7. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 1, characterized in that, The toxicity-related chemical prior eigenvector prediction task, the two-dimensional topological statistical prediction task, and the three-dimensional bond angle statistical prediction task all use a unified molecular representation as input: ; in For structural fusion representation; This is the predicted value for molecular fingerprints; These are prior predictions of toxicity-related chemicals; These are two-dimensional topological statistical predictions; These are statistical predictions of three-dimensional bond angles; , and These represent the toxicity-related chemical prior eigenvector prediction network, the two-dimensional topological statistical prediction network, and the three-dimensional bond angle statistical prediction network, respectively.
8. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 1, characterized in that, The prediction objectives of the two-dimensional topological statistics include the normalized average shortest path distance, the maximum value of all shortest path distances, and the standard deviation of the shortest path distance; the prediction objectives of the three-dimensional bond angle statistics include the normalized mean and standard deviation of the bond angles; the molecular fingerprint prediction task and the toxicity-related chemical prior feature vector prediction task use binary cross-entropy loss; the two-dimensional topological statistics prediction task and the three-dimensional bond angle statistics prediction task use smoothed L1 loss after standard deviation normalization; the weighted loss of the four pre-training tasks is determined according to the following formula: ; in, The weighted loss is calculated from four pre-training tasks: molecular fingerprint prediction, toxicity-related chemical prior feature vector prediction, two-dimensional topological statistical prediction, and three-dimensional bond angle statistical prediction. The loss of the molecular fingerprint prediction task, The loss for the toxicity-related chemical prior feature vector prediction task is... The loss of the two-dimensional topological statistical prediction task is... The loss of the three-dimensional bond angle statistical prediction task, for The corresponding weighting coefficients, for The corresponding weighting coefficients, for The corresponding weighting coefficients, for The corresponding weighting coefficients.
9. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 8, characterized in that, When contrastive learning is enabled, pre-training also includes contrastive learning tasks between molecular representation and BRICS fragment representation, as well as contrastive learning tasks between molecular representation and 3D conformational representation; molecules with invalid 3D conformations are not included in the calculation of 3D conformational contrastive loss; the total pre-training loss is then expressed as: ; in, This represents the total pre-training loss. The contrast loss between molecular representation and BRICS fragment representation; This represents the contrast loss between molecular representation and three-dimensional conformational representation; The contrastive loss weight coefficients vary with the training rounds; For training rounds; The contrast loss weighting coefficient between molecules and their three-dimensional conformations.
10. The molecular toxicity prediction method based on prior toxicity information-guided pre-training according to claim 1, characterized in that, In step 6, the pre-trained multi-view molecular encoder is fine-tuned according to the type of downstream toxicity prediction task, and a corresponding molecular toxicity prediction model is trained based on the labeled toxicity dataset. The downstream toxicity prediction task includes classification and regression tasks. For classification tasks, the molecular toxicity prediction model outputs the category score or positive probability of each toxicity endpoint and determines the prediction category according to the corresponding classification threshold. For regression tasks, the molecular toxicity prediction model outputs the predicted value of the corresponding toxicity index.
