A neural network-based drug performance prediction method and system
By constructing a dual-path molecular characterization architecture and a three-stage training strategy, the shortcomings of existing drug molecule property prediction tools in predicting complex molecular structures and multi-task scenarios are addressed, achieving efficient and reliable prediction of drug candidate molecules and improving the accuracy and credibility of drug screening.
Patent Information
- Application Number
- CN202610547318.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-23
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2046-04-23
AI Technical Summary
Existing drug molecule property prediction tools are insufficient in characterization when faced with complex molecular structures. Multi-task prediction lacks a targeted feature extraction mechanism, and the prediction results lack reliable confidence assessment, which affects the accuracy of drug screening decisions.
A neural network-based drug performance prediction method is adopted. By constructing a dual-path molecular characterization architecture, a task residual bond-level attention mechanism, gated feature fusion, and a three-stage training strategy, it captures local chemical group information and long-range interaction information between all atoms of the molecule, and provides joint prediction and confidence interval assessment of various in vivo properties.
It improves the characterization capabilities of complex molecular structures, enhances the accuracy and reliability of multi-task predictions, provides more comprehensive information support for the early stages of drug discovery, and reduces the probability of clinical trial failure.
Smart Images

Figure CN122091272B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drug performance prediction technology, and in particular to a drug performance prediction method and system based on neural networks. Background Technology
[0002] Drug discovery is a long-term, costly, and high-risk systematic project, typically requiring over a decade and billions of dollars in investment from initial screening of candidate compounds to final market launch. In the early stages of drug discovery, systematically evaluating key in vivo properties of candidate compounds, such as absorption, distribution, metabolism, excretion, and toxicity, is a core step in determining their drug potential. While traditional experimental methods are accurate and reliable, they suffer from low throughput and long cycles, making them unsuitable for the rapid screening of tens of thousands of candidate molecules required in modern drug discovery. With the deep integration of artificial intelligence and computational chemistry, machine learning-based computational prediction methods are gradually becoming important tools for early drug screening. By learning from known compound data, they enable rapid computational evaluation of the in vivo properties and safety endpoints of candidate molecules, effectively supporting early decision-making in drug development.
[0003] With the introduction of deep learning technology, the accuracy of computational prediction of in vivo properties of drug molecules has been continuously improved. In particular, molecular characterization methods based on graph neural networks can directly learn the interaction information of atoms and chemical bonds from molecular graph structures, avoiding the loss of structural information in traditional molecular fingerprinting. However, existing prediction tools still face significant limitations in practical applications: on the one hand, existing methods usually use a uniform architecture to extract features from candidate molecules. For non-classical skeletons such as complex macrocyclic compounds and covalently bonded fragments, it is difficult to simultaneously and effectively capture the key local group information and global topological information in their molecular structures, resulting in insufficient accuracy in predicting the in vivo properties of such compounds; on the other hand, existing tools lack systematic coverage of multiple toxicity endpoints, making it difficult to comprehensively identify the potential safety risks of candidate molecules in the early discovery stage, increasing the probability of failure in subsequent clinical trials.
[0004] Patent application WO2023168810A1 discloses a method for predicting the properties of drug molecules. This method converts drug molecules into four modal representations: molecular sequence, molecular graph, molecular image, and molecular fingerprint. It extracts feature vectors for each modality using language models, graph neural networks, convolutional neural networks, and deep neural networks, respectively. Then, it integrates these multimodal features using an attention mechanism, ultimately outputting the predicted molecular properties through a prediction model. This approach enhances the richness of molecular feature expression to some extent through the complementarity of multimodal information. However, this method can only output a single-point prediction value for each candidate molecule. Researchers cannot determine the reliability of the prediction results based on this alone. When facing candidate molecules with entirely new chemical skeletons, the reliability of the prediction results is difficult to guarantee, affecting its application value in practical drug screening decisions. Summary of the Invention
[0005] In view of this, the present invention provides a drug performance prediction method and system based on neural networks to solve the technical problems of insufficient ability of existing drug molecule property prediction tools to characterize complex molecular structures, lack of targeted feature extraction mechanisms in multi-task prediction, and lack of reliable confidence assessment of prediction results. The technical solution of this invention is implemented as follows: On the one hand, the present invention provides a drug performance prediction method based on neural networks, comprising the following steps: S1. Obtain the SMILES string of the drug molecule, convert the SMILES string into a molecular graph using cheminformatics processing, and encode the atomic nodes and chemical bond edges in the molecular graph to obtain molecular graph features; decompose the molecular graph using the BRICS substructure decomposition method to obtain local subgraph features. S2. A drug performance prediction model is constructed based on molecular graph features and local subgraph features. The drug performance prediction model includes a local feature extraction branch, a global feature extraction branch, a feature fusion unit, and an integrated prediction unit. The local feature extraction branch is used to extract local molecular feature vectors based on local subgraph features, the global feature extraction branch is used to extract global molecular feature vectors based on molecular graph features, the feature fusion unit fuses the local molecular feature vectors and the global molecular feature vectors, and the integrated prediction unit outputs the drug performance prediction results based on the fused features. S3. The drug performance prediction model is trained using a phased training strategy, which includes pre-training, multi-task joint fine-tuning, and task optimization. After the model training is completed, the trained drug performance prediction model is calibrated based on the calibration set to obtain the calibrated drug performance prediction model. S4. The SMILES string of the drug molecule to be tested is used to construct a molecular graph and decompose local subgraphs according to the method in S1. The graph is then input into the calibrated drug performance prediction model to obtain the drug performance prediction results of the drug molecule to be tested.
[0006] Based on the above technical solutions, preferably, in step S1, the molecular graph features include atomic feature vectors constructed based on atomic nodes and bond feature vectors constructed based on chemical bond edges; Atomic node features include at least one of atomic type, atomic number, formal charge, hybridization type, number of connected hydrogen atoms, aromaticity and chirality markings; chemical bond edge features include at least one of bond type, conjugation, ring structure markings and stereochemical information; local subgraph features include atomic feature vectors and bond feature vectors of each local subgraph obtained based on BRICS break site decomposition, wherein the BRICS break sites cover at least one of pharmacophore structure, metabolic site and toxicity warning structure.
[0007] Based on the above technical solutions, preferably, in step S2, obtaining the molecular local feature vector based on local subgraph feature extraction specifically includes: For each local subgraph, the atomic feature vector is mapped to the node hidden vector through a linear embedding layer, and then a graph isomorphic network is used to aggregate multi-layer neighborhood information. After neighborhood aggregation is completed, node-level attention pooling is performed on the node representations in each local subgraph to obtain the subgraph representation vector; subgraph-level attention weighted aggregation is performed on all subgraph representation vectors to obtain the molecular local feature vector.
[0008] Based on the above technical solutions, preferably, in step S2, obtaining the global feature vector of the molecule based on molecular graph feature extraction specifically includes: Atomic feature vectors are mapped to node hidden vectors through a linear embedding layer; a fully connected molecular graph is constructed using the hidden vectors of each atomic node as input; a multi-head self-attention mechanism is used to model the long-distance interactions between all atomic nodes; bond feature vectors are introduced into the attention score calculation; and the multi-head self-attention score is corrected by a bond-level attention correction scalar. After stacking multiple global attention layers, the average readout of all atomic representations is performed to obtain the global feature vector of the molecule.
[0009] Based on the above technical solutions, preferably, the key-level attention correction scalar is calculated by superimposing the global shared components and residual components of the key feature vector and weighting the residual key projection vector, specifically as follows: ; in, The global shared key projection vector; Let be the residual key projection vector for the drug performance prediction task t, initialized as an all-zero vector; The key feature vector; The residual intensity coefficient for the drug performance prediction task t is calculated as follows: ; in, For the learnable scalar parameters of the drug performance prediction task t; For the Sigmoid function; The number of effective training samples for drug performance prediction task t; For data volume balancing hyperparameters; when atomic pairs When there are no chemical bonds between them, Take a vector of all zeros, at this time .
[0010] Based on the above technical solutions, preferably, in step S2, the process by which the feature fusion unit fuses local and global features includes: The molecular global feature vector, molecular local feature vector, and their element-wise product are concatenated and input into the gating network corresponding to the drug performance prediction task t to calculate the gating vector. The molecular global feature vector and molecular local feature vector are weighted and superimposed with the gating vector to obtain a fusion representation vector that carries both global topological information and local chemical group information. The above fusion process is performed independently for each of the T drug property prediction tasks to obtain the fusion representation vector corresponding to each task.
[0011] Based on the above technical solutions, preferably, the calculation method for the gating vector and the fused representation vector is as follows: ; ; in, This is the gate vector; This represents the global molecular feature vector for drug performance prediction task t. These are local eigenvectors of the molecule; For the drug performance prediction task t, the learnable gating weight matrix is used. This is the bias vector corresponding to the drug performance prediction task t; This indicates that the three vectors are concatenated along the feature dimension; This is element-wise multiplication; For the Sigmoid function; It is a vector of all ones; d represents the fused representation vector, and d is the unified hidden dimension.
[0012] Based on the above technical solution, preferably, in S2, the integrated prediction unit includes multiple independent sub-prediction models. Each sub-prediction model receives the fusion representation vector corresponding to each drug performance prediction task and outputs the predicted value of each drug performance prediction task through the corresponding task prediction head. The multiple sub-prediction models differ in at least one of the following: the number of global attention layers, the number of graph isomorphic network layers, the hidden dimension, whether bond-level attention correction is introduced, and whether molecular fingerprints are fused. They are trained using different parameter initialization and data batch sampling order. The integrated prediction unit statistically aggregates the predicted values of each drug performance prediction task output by the multiple sub-prediction models to obtain the integrated prediction mean and integrated prediction standard deviation of each drug performance prediction task.
[0013] Based on the above technical solutions, preferably, in S3, the phased training strategy includes: The local feature extraction branch and the global feature extraction branch of the drug performance prediction model were pre-trained on an unlabeled molecular dataset. The pre-training adopted four parallel self-supervised tasks: masked atom prediction, context prediction, basic physicochemical property prediction and contrastive learning. Using the pre-trained parameters as initial parameters, joint fine-tuning is performed on multiple drug performance prediction tasks on a dataset with drug performance annotations. The multiple drug performance prediction tasks include pharmacokinetic tasks and toxicity tasks. During the joint fine-tuning process, the loss of each drug performance prediction task is summed using dynamic weights. Starting with the jointly fine-tuned parameters, task optimization is performed on each toxicity endpoint in the toxicity task. During task optimization, the bottom parameters of the molecular encoder are frozen, and only the top encoder parameters, the prediction head parameters of the corresponding toxicity endpoint, and the residual bond projection vector of the corresponding toxicity endpoint are updated. FocalLoss is used for training on toxicity endpoints with class imbalance.
[0014] Based on the above technical solutions, preferably, in S3, the calibration process of the trained drug performance prediction model based on the calibration set specifically includes: After the phased training is completed, all parameters of the drug performance prediction model are frozen. The frozen drug performance prediction model is applied to an independent calibration set that has not participated in the training. For each sample in the calibration set, the normalized non-consistency score is calculated based on the true label value, the predicted mean and the predicted standard deviation for each drug performance prediction task. The offline calibration quantile is determined according to the preset significance level corresponding to each drug performance prediction task. When the drug molecules to be tested are a batch of molecules that have reached a preset quantity threshold, the characteristics of the calibration set molecules and the current batch of molecules are extracted respectively, and a binary classifier is trained based on the characteristics to estimate the density ratio between the current batch of molecules and the calibration set molecules. Then, the density ratio is used as the importance weight to perform weighted correction on the offline calibration quantile to obtain the calibration quantile corresponding to the current batch of molecules. When the number of drug molecules to be tested is lower than the preset number threshold, the offline calibration quantile is directly invoked, and a confidence interval for the drug molecules to be tested is generated based on the corresponding calibration quantile.
[0015] In addition, the present invention also provides a drug performance prediction system based on a neural network, the system being used to implement the drug performance prediction method described above, comprising: The molecular information processing module is used to acquire the drug molecule to be tested and convert the SMILES string of the drug molecule to be tested into molecular graph features and local subgraph features; A drug performance prediction model is used to receive the molecular graph features and local subgraph features, and to predict drug performance based on the molecular graph features and local subgraph features. The drug performance prediction model includes a local feature extraction branch, a global feature extraction branch, a feature fusion unit, and an integrated prediction unit. The results output module is used to output the predicted drug performance results of the drug molecules to be tested.
[0016] The present invention has the following advantages over the prior art: (1) This invention achieves joint prediction of multiple in vivo properties of drug candidate molecules by constructing a dual-path molecular characterization architecture, a task residual bond-level attention mechanism, gated feature fusion, a three-stage training strategy, and confidence interval calibration based on conformal prediction. At the same time, it provides a confidence interval with limited sample statistical coverage for each prediction result, which can improve the shortcomings of existing tools in complex molecular structure characterization, multi-task bond-level feature adaptive extraction, and prediction reliability quantification to a certain extent, and provide more comprehensive information support for screening decisions in the early stage of drug discovery.
[0017] (2) This invention employs a dual-path encoding architecture that combines a local GIN network with a fully connected multi-head self-attention network to capture local chemical group information and remote interaction information between all atoms in a molecule. Traditional message passing networks are limited by neighborhood aggregation with a finite number of hops, and their ability to model cross-segment atomic interactions (such as intramolecular hydrogen bonds) in structurally complex molecules such as macrocyclic compounds and peptide drugs is insufficient. The fully connected attention path of this invention allows any pair of atoms to directly exchange information, complementing the subgraph-level fine representation of the GIN local path, which helps to improve the accuracy of in vivo property prediction for such complex molecules.
[0018] (3) This invention introduces a task residual decoupling bond-level attention correction mechanism in the calculation of global attention scores. It decomposes the bond feature mapping into a globally shared component and a task-specific residual component, and modulates it through a residual intensity coefficient linked to the amount of task data. Different property endpoints have fundamentally different attention requirements for chemical bond types. A single unified bond encoding strategy is difficult to take into account the specificity of the bond-level mechanism of each endpoint. This mechanism enables the model to assign differentiated weights to the relevant chemical bond types for each property endpoint during the encoding stage. At the same time, the learning of general bond rules is preserved through the joint update of shared components, which helps to reduce overfitting on data-scarce toxicity tasks.
[0019] (4) This invention designs a gated fusion unit that inputs three types of information (global vector, local vector, and their element-wise product) into a task-specific gated network, and weights the two types of features with independent mixing coefficients for each dimension. Different endpoints have different degrees of dependence on global topology and local group information. Fixed-weight feature splicing or mean fusion cannot reflect this difference between tasks. By introducing the cross term of the two types of features, the gated network enables the fusion weight to perceive the relative intensity relationship between the global and local features of the current molecule, and achieves task-adaptive adjustment of the fusion ratio without introducing a large number of additional parameters. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of the drug performance prediction method based on neural networks of the present invention; Figure 2 This is a flowchart of the local feature extraction branch processing of the present invention; Figure 3 This is a flowchart of the three-stage training strategy of the present invention; Figure 4 This is a flowchart of the conformal prediction calibration and output process of the present invention; Figure 5 This is a diagram illustrating the overall architecture of the drug performance prediction model of the present invention. Detailed Implementation
[0022] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0023] like Figure 1 As shown, this invention provides a drug performance prediction method based on neural networks, comprising the following steps: S1. Obtain the SMILES string of the drug molecule, convert the SMILES string into a molecular graph using cheminformatics processing, and encode the atomic nodes and chemical bond edges in the molecular graph to obtain molecular graph features; decompose the molecular graph using the BRICS substructure decomposition method to obtain local subgraph features. S2. A drug performance prediction model is constructed based on molecular graph features and local subgraph features. The drug performance prediction model includes a local feature extraction branch, a global feature extraction branch, a feature fusion unit, and an integrated prediction unit. The local feature extraction branch is used to extract local molecular feature vectors based on local subgraph features, the global feature extraction branch is used to extract global molecular feature vectors based on molecular graph features, the feature fusion unit fuses the local molecular feature vectors and the global molecular feature vectors, and the integrated prediction unit outputs the drug performance prediction results based on the fused features. S3. A phased training strategy is adopted to train the drug performance prediction model. The phased training strategy includes pre-training, multi-task joint fine-tuning and task optimization. After the model training is completed, the calibrated drug performance prediction model is calibrated based on the calibration set to obtain the calibrated drug performance prediction model. S4. The SMILES string of the drug molecule to be tested is used to construct a molecular graph and decompose local subgraphs according to the method in S1. The graph is then input into the calibrated drug performance prediction model to obtain the drug performance prediction results of the drug molecule to be tested.
[0024] In one embodiment of the present invention, step S1 includes: In step S1, the molecular graph features include atomic feature vectors constructed based on atomic nodes and bond feature vectors constructed based on chemical bond edges; the atomic node features include at least one of atomic type, atomic number, formal charge, hybridization type, number of connected hydrogen atoms, aromaticity and chirality markings; the chemical bond edge features include at least one of bond type, conjugation, ring structure markings and stereochemical information; the local subgraph features include atomic feature vectors and bond feature vectors of each local subgraph obtained based on BRICS break site decomposition, wherein the BRICS break sites cover at least one of pharmacophore structure, metabolic site and toxicity warning structure.
[0025] Specifically, the SMILES string was parsed using the RDKit cheminformatics toolkit, converting the molecules into graph structures. ,in For a set of atomic nodes, The total number of atoms in the molecule. This is the set of chemical bond edges. For each atomic node... Construct atomic feature vectors , The dimensions representing atomic characteristics include: atomic type (one-hot encoding of the element symbol), atomic number, formal charge, and hybridization type. , , (one-hot encoding), number of hydrogen atoms connected, whether it is in an aromatic ring (Boolean value), chiral label ( (one-hot encoding). For each chemical bond edge Construct key feature vectors , Dimensions representing bond characteristics include: bond type (one-hot encoding of single, double, triple, and aromatic bonds), whether it is a conjugated bond (Boolean value), whether it is in a ring structure (Boolean value), and stereochemical information. (one-hot encoding).
[0026] The BRICS (Brazilian Chemical Related Substructure Breaking) algorithm breaks down molecular diagrams according to specific chemical breaking rules. Decompose into P substructure fragments to obtain a set of subgraphs. ,in Each subgraph preserves the atoms and bonds within a segment, as well as the connection edges between that segment and adjacent segments. Different subgraphs are allowed to overlap at the atomic level, meaning that the same atom v can belong to multiple subgraphs simultaneously. To accurately characterize the structural context of functional groups in real chemical environments, the BRICS algorithm identifies breakpoints covering pharmacophore structures (hydrogen bond donors and acceptors, hydrophobic centers, aromatic rings), cytochrome P450 metabolic sites, and toxicity warning structures. Each sub-graph after decomposition carries a feature vector of the corresponding atom in S1. and bond eigenvectors This is then passed to the subsequent local feature extraction branch.
[0027] In one embodiment of the present invention, such as Figure 2 As shown, step S2 includes: In step S2, the local feature extraction branch obtains the molecular local feature vector based on the local subgraph feature extraction. Specifically, it includes: for each local subgraph, mapping the atomic feature vector to the node hidden vector through a linear embedding layer, and then using a graph isomorphic network to perform multi-layer neighborhood information aggregation; after the neighborhood aggregation is completed, attention pooling is performed on the node representation in each local subgraph to obtain the subgraph representation vector; attention weighted aggregation is performed on all subgraph representation vectors to obtain the molecular local feature vector.
[0028] Specifically, for each subgraph First, the atomic feature vectors The learnable linear embedding layer is projected onto the initial node hidden vector: ; in To embed the weight matrix, Let be the bias vector, and d be the uniform hidden dimension. Then, the subgraph... The Graph Isomorphism Network (GIN) is applied, consisting of two layers. The node update rule for the k-th layer is as follows: ; in Let v be the hidden representation of the k-th layer node v; For node v in the subgraph The set of neighboring nodes in; is a learnable scalar parameter of the k-th layer, used to distinguish the contribution of a node itself and its neighbors to the aggregation result; For the k-th layer, there is a multilayer perceptron with the structure "linear layer - batch normalization - GELU activation - linear layer", and both the input and output dimensions are d.
[0029] After the two-layer GIN update is completed, the subgraph is... Attention pooling is performed on all nodes within the graph to obtain a subgraph-level representation vector: ; in, For subgraph The set of atomic nodes in For nodes Attention weights For nodes The hidden representation vector updated after the second layer of GIN; Attention weight Calculated by a separate attention MLP: ; in A single-layer perceptron with output scalars is used to evaluate the contribution weight of each node to the semantics of the subgraph. For subgraph A fixed-dimensional representation vector.
[0030] Representation vectors for all P subgraphs Attention-weighted aggregation is used to calculate the local feature vector of the molecule: ; ; in, For sub-image segments Normalized contribution weights A single-layer perceptron with output scalars is used to evaluate the contribution weights of each fragment to the overall local features of the molecule. Contribute weights to the normalization of fragment p; This represents the local feature vector of the molecule after weighted aggregation. This aggregation operation is independent of the number of fragments P and is applicable to molecules of different sizes, while also incorporating attention weights. The differentiated contribution information of each segment was preserved.
[0031] In step S2, the global feature extraction branch obtains the molecular global feature vector based on molecular graph feature extraction. Specifically, it includes: mapping the atomic feature vectors to node hidden vectors through a linear embedding layer; constructing a fully connected molecular graph with the hidden vectors of each atomic node as input; modeling the long-distance interactions between all atomic nodes using a multi-head self-attention mechanism; introducing the bond feature vectors into the attention score calculation; and correcting the multi-head self-attention score through a bond-level attention correction scalar; and after stacking multiple global attention layers, performing mean readings on the representations of all atoms to obtain the molecular global feature vector.
[0032] Specifically, the node embedding initialization phase and the local feature extraction branch share the same linear embedding layer parameters. Projecting atomic feature vectors into initial node hidden vectors Sharing embedding layer parameters enables the gradient updates of the two networks on the same atomic feature projection to be coordinated during training. This helps the embedding layer learn a universal atomic representation that is beneficial to both information propagation modes, while reducing parameter redundancy and the risk of overfitting. The global attention layer constructs a fully connected molecular graph, allowing direct information exchange between any two atoms in the molecule, overcoming the limitation of traditional message passing networks that can only aggregate a limited number of hop neighbors. The global attention layer uses H attention heads, each with a dimension of [missing information]. .
[0033] The key-level attention correction scalar is calculated by weighting the key feature vector with the globally shared key projection vector and the residual key projection vector, specifically: ; in The globally shared bond projection vector is updated synchronously during joint training across all T tasks to learn general chemical bond rules. Key feature dimension; The residual key projection vector for drug performance prediction task t is initialized as an all-zero vector and updated only by the training samples of drug performance prediction task t, learning the key-level attention preferences specific to this task. For atomic pairs The bond feature vector; when the atom pair When there are no chemical bonds between them, Take a vector of all zeros, at this time ; The residual intensity coefficient for the drug performance prediction task t is calculated as follows: ; in For the learnable scalar parameters of the drug performance prediction task t; For the Sigmoid function; The number of effective training samples for drug performance prediction task t; This is a hyperparameter for balancing data volume. In one embodiment of the present invention, Initialize to -3, so that the training phase is smooth. The entire system initially degenerates into pure shared-key encoding during training to ensure training stability, and gradually differentiates into task-specific key preferences as gradients are updated. The data volume modulation factor is This automatically suppresses residual terms in data-scarce tasks to avoid overfitting, while fully activating task-specific key-level preferences in data-sufficient tasks.
[0034] Drug performance prediction task t Atom pairs in layer global attention The scaling dot product attention weights are: ; Where t is the task index. This is the layer index for the global attention layer. For atoms In the The query vector of the layer, For atoms In the Layer key vector, Atom pairs for drug performance prediction task t Task-specific attention bias scalar For each dimension of attention head, To normalize all atoms j in the molecule; Query vector: ; Key vector: ; Value vector: ; For the first The layer query transformation matrix is a learnable parameter; For the first The layer bond transformation matrix is a learnable parameter. For the first The layer transformation matrix is a learnable parameter. For atoms In the Hidden representations of layers.
[0035] After each of the H attention heads independently calculates its attention weight, the atom In the drug performance prediction task t, the first The global update representation below the layer is: ; in For the h-th attention head in the drug performance prediction task t, the Atom pairs in the layer The attention weights are shared by all heads, with each head sharing the same key-level attention correction scalar. ; For the first Layer output projection matrix; H is the number of attention heads; Let h be the value vector of the attention head. N represents the total number of atoms in the molecule; right side Residual connections are applied. The multi-head attention output is followed by a feedforward network (two-layer linear transformation, 4d intermediate dimension, GELU activation), and residual connections and layer normalization are applied again. Three to four layers of the above global attention layers are stacked, and finally, the mean readout of all atomic representations is performed to obtain the global feature vector of the molecule. ; in Let L be the global feature vector of the molecule in the drug performance prediction task t, and L be the total number of stacked global attention layers.
[0036] By modeling the fully connected molecular graph using a global attention layer, direct information exchange between any pair of atoms is possible, effectively overcoming the expression bottleneck of traditional message passing networks that can only aggregate a limited number of hop neighbors. The task residual bond-level attention correction mechanism explicitly models the task-specific attention requirements of different property endpoints for chemical bond types during the encoding stage, and uses residual intensity coefficients... By incorporating task data volume into modulation, both the generalizability of shared-bond patterns and the precision of task-specific bond preferences are balanced.
[0037] In step S2, the process of fusing local and global features by the feature fusion unit includes: concatenating the molecular global feature vector, the molecular local feature vector, and their element-wise product in three ways, inputting them into the gating network corresponding to the drug performance prediction task t, and calculating the gating vector; weighting and superimposing the molecular global feature vector and the molecular local feature vector with the gating vector to obtain a fusion representation vector that carries both global topological information and local chemical group information; and independently performing the above fusion process on each of the T drug property prediction tasks to obtain the fusion representation vector corresponding to each task.
[0038] The gating vector and the fused representation vector are calculated as follows: ; ; in Let be the gate vector for the drug performance prediction task t; This represents the global molecular feature vector for drug performance prediction task t. These are local eigenvectors of the molecule; For the drug performance prediction task t, the learnable gating weight matrix is used. For the drug performance prediction task t; This indicates that the three vectors are concatenated along the feature dimension; This is element-wise multiplication (Hadamard product). The sigmoid function makes the gate vector... Each dimension independently controls the mixing ratio of global and local features in that dimension; It is a vector of all ones; Let be the fused representation vector, and d be the unified hidden dimension. The above fusion process is performed independently on each of the T drug property prediction tasks, yielding the fused representation vector for each task.
[0039] The three information streams (global vector, local vector, and their element-wise product) are concatenated and input into the gating network, enabling the gating network to simultaneously perceive the absolute strength of each of the two features and their interrelationship. This allows the network to adaptively determine the fusion weights of global topological information and local chemical group information for different prediction tasks.
[0040] In step S2, the integrated prediction unit includes multiple independent sub-prediction models. Each sub-prediction model receives the fusion representation vector corresponding to each drug performance prediction task and outputs the predicted value of each drug performance prediction task through the corresponding task prediction head. The multiple sub-prediction models differ in at least one of the following: the number of global attention layers, the number of graph isomorphic network layers, the hidden dimension, whether bond-level attention correction is introduced, and whether molecular fingerprints are fused. They are trained using different parameter initialization and data batch sampling order. The integrated prediction unit statistically aggregates the predicted values of each drug performance prediction task output by the multiple sub-prediction models to obtain the integrated prediction mean and integrated prediction standard deviation of each drug performance prediction task.
[0041] Specifically, the ensemble prediction unit comprises M architecturally differentiated member models. Each member model employs a complete dual-path attention encoding-fusion architecture, with the architectural differences manifested in the number of layers (global attention layer). GIN layer The model employs several techniques: a variant of a graph neural network with hidden dimensions; a variant that replaces all global attention layers with standard Transformer layers (without using bond-level correction scalars); a hybrid model that integrates traditional molecular fingerprints—compressing the ECFP fingerprint vector to dimension d via a two-layer fully connected network and then concatenating it with the graph-level representation extracted by the graph neural network, inputting it into the prediction heads for each task, capturing chemical similarity information based on substructure hashing, thus complementing the pure graph neural network members; and a graph neural network based on the Kolmogorov-Arnold network (KA-GNN), which replaces the fixed activation function with a learnable B-spline activation function to enhance the fitting ability to complex nonlinear molecular structure-property relationships. Each member model also employs different random initialization seeds, data batch sampling order, and learning rate scheduling strategies to maximize the diversity of ensemble predictions.
[0042] For molecule x under drug performance prediction task t, the ensemble prediction mean and prediction standard deviation are defined as follows: ; ; Where M is the total number of integrated members; The m-th ensemble member's prediction output for molecule x on drug performance prediction task t; The integrated forecast mean is used as the final point forecast output; To integrate the prediction standard deviation, reflecting the degree of prediction discrepancy among member models, it is used for calculating the normalized inconsistency score in the subsequent conformal calibration stage.
[0043] In one embodiment of the present invention, such as Figure 3 As shown, step S3 includes: In step S3, the phased training strategy includes: pre-training the local feature extraction branch and global feature extraction branch of the drug performance prediction model on an unlabeled molecular dataset. The pre-training adopts four parallel self-supervised tasks: masked atom prediction, context prediction, basic physicochemical property prediction, and contrastive learning. Using the pre-trained parameters as initial parameters, the model performs joint fine-tuning on a dataset with labeled drug performance. The multiple drug performance prediction tasks include pharmacokinetic tasks and toxicity tasks. During the joint fine-tuning process, the loss of each drug performance prediction task is summed using dynamic weights. Starting from the parameters after joint fine-tuning, the model performs task optimization for each toxicity endpoint in the toxicity task. During task optimization, the bottom parameters of the molecular encoder are frozen, and only the top encoder parameters, the prediction head parameters of the corresponding toxicity endpoint, and the residual bond projection vector of the corresponding toxicity endpoint are updated. Focal Loss is used for training for toxicity endpoints with class imbalance.
[0044] Specifically, the pre-training phase involves self-supervised pre-training of the dual-channel encoder on unlabeled molecules collected from public databases. This allows the encoder to establish a general molecular characterization capability covering a broad chemical space before encountering any labeled data. The pre-training design includes four parallel self-supervised tasks, with the total loss being the weighted sum of the losses from each task: ; in For masked atom prediction loss, For context prediction loss, Based on the prediction of loss using basic physicochemical properties To compare learning loss.
[0045] Masked Atom Prediction Task: Randomly mask 15% of the atomic nodes in the input molecular graph, replacing the feature vectors of the masked nodes with all-zero vectors. The encoder is required to reconstruct the type and features of the masked atoms using the context information of the unmasked atoms. The loss function is multi-class cross-entropy. ; in C represents the set of hidden atomic nodes; C is the total number of atomic types. The true label for atom v belonging to category c; This represents the model's predicted probability that atom v belongs to category c.
[0046] Context prediction task: Two sub-images are randomly selected from the same molecule as a positive sample pair, and one sub-image is selected from each of different molecules to form a negative sample pair. The model is required to determine whether the two sub-images originate from the same molecule. The loss function is binary cross-entropy. ; in The total number of sample pairs; The true label of the kth sample pair (1 for same molecule, 0 for different molecule); This represents the model's predicted probability that the k-th sample pair has the same source. This represents the total number of sample pairs.
[0047] Basic physicochemical property prediction task: Using basic physicochemical properties that can be directly calculated by RDKit, such as molecular weight (MW), octanol-water partition coefficient (LogP), number of hydrogen bond donors, number of hydrogen bond acceptors, and polar surface area (TPSA), as weak supervision signals, the encoder is required to simultaneously regress these properties, with the loss function being the mean squared error. ; in K represents the number of molecules in the current batch; K represents the total number of basic physicochemical properties. Calculate the truth value of the k-th fundamental physicochemical property for the n-th molecule using RDKit; This is the model's predicted value for the k-th fundamental physicochemical property of the n-th molecule.
[0048] Contrastive learning task: Apply two independent random data augmentations to the same molecule (including randomly deleting non-critical edges with a probability of 0.1 and randomly perturbing atomic feature vectors with a probability of 0.1) to generate two chemically equivalent views. Employ InfoNCE loss (a self-supervised contrastive loss based on noise contrast estimation) to maximize the representational similarity between the two views of the same molecule, while minimizing the representational similarity between different molecules within the batch. ; Where B is the batch size; The L2-normalized representation vector is the output of the first enhanced view of the b-th molecule after passing through the encoder and the projection head; These are the L2-normalized representation vectors output from the second enhanced view of the b-th molecule after passing through the encoder and the projection head; Cosine similarity; This is for temperature hyperparameters. The Adam optimizer is used during the pre-training phase, with a learning rate of... Batch size 256, training for 20 epochs.
[0049] In the multi-task joint fine-tuning phase, the encoder is initialized with pre-trained weights. On labeled molecules collected from public datasets, the encoder and all T task prediction heads are jointly fine-tuned. Each drug performance prediction task t independently maintains a 2-3 layer MLP prediction head. Mean squared error loss is used for regression tasks, and binary cross-entropy loss is used for classification tasks. To balance the differences in data volume between tasks and the differences in current validation performance, dynamic weights are used for the loss of drug performance prediction task t. ; ; in The single-task loss for drug performance prediction task t; The dynamic loss weights for the drug performance prediction task t; The effective number of training samples for drug performance prediction task t The largest sample size across all tasks. ; The normalized performance metric for the drug performance prediction task t on the validation set (for regression tasks, take...). (Classification tasks take AUROC values). This is the data volume difference balance coefficient; This is a balancing factor for current performance differences, ensuring that tasks with scarce data and currently poor performance receive higher gradient weights during joint training. This prevents tasks with abundant data from dominating the optimization direction and suppressing the learning of scarce tasks. The Adam optimizer is used in this stage, with a learning rate of [missing information]. Batch size 128, training for 50 epochs, dynamically updated every 5 epochs based on validation set performance. .
[0050] The task tuning phase starts with the jointly fine-tuned parameters and performs independent fine-tuning for each toxicity endpoint in the toxicity task. In this phase, the bottom three layers of the encoder parameters are frozen, and only the top layer encoder parameters, the prediction head parameters corresponding to that endpoint, and the residual key projection vector for that endpoint are updated. To prevent overfitting in small sample scenarios, Focal Loss is used instead of standard cross-entropy loss for toxic endpoints with class imbalance (such as hERG cardiotoxicity, where the positive sample rate is approximately 30%). ; in This represents the number of samples in the current batch. For the model to determine the true class of the nth sample The predicted probability; For category The balanced weights are the normalized values of the reciprocal of the number of samples in each category; To focus on parameters and reduce the contribution of easily separable samples to the gradient, the model is encouraged to concentrate on difficult samples. For sparse toxicity tasks with fewer than 1000 samples (such as respiratory toxicity and ototoxicity), SMILES enumeration data augmentation is additionally employed. RDKit's random atom numbering function generates 3 to 5 chemically equivalent SMILES strings for each molecule, but with different atom traversal orders, effectively expanding the diversity of training samples at the data level. The AdamW optimizer (with weight decay coefficient) is used in this stage. Learning rate The batch size was 64, the training lasted 30 epochs, and the learning rate scheduling adopted a linear warmup (for the first 5 epochs) plus cosine annealing strategy, with a gradient pruning threshold of 1.0. The above process was applied sequentially to the toxicity endpoints of hERG cardiotoxicity, hepatotoxicity, neurotoxicity, nephrotoxicity, AMES genotoxicity, skin sensitization, respiratory toxicity, and ototoxicity.
[0051] The three-stage training strategy is designed to gradually narrow the coverage of the supervision signal: the pre-training stage establishes a general molecular representation on a large number of unlabeled molecules; the joint fine-tuning stage performs collaborative optimization of shared parameters and task parameters across the entire task; and the task optimization stage performs fine-tuning on a small number of top-level parameters only for rare toxicity endpoints. This effectively reduces the risk of overfitting on small-sample toxicity tasks. At the same time, by reusing the fully optimized underlying representations from the pre-training and joint fine-tuning stages, the overall consistency of predictions for different toxicity endpoints is ensured.
[0052] like Figure 4As shown, in step S3, the calibration process of the trained drug performance prediction model based on the calibration set specifically includes: freezing all parameters of the drug performance prediction model after phased training; applying the frozen drug performance prediction model to an independent calibration set that did not participate in the training; for each sample in the calibration set, calculating a normalized inconsistency score based on the true label value, predicted mean, and predicted standard deviation for each drug performance prediction task, and determining the offline calibration quantile according to the preset significance level corresponding to each drug performance prediction task; when the drug molecules to be tested are a batch of molecules that have reached a preset quantity threshold, extracting the representations of the molecules in the calibration set and the current batch of molecules respectively, and training a binary classifier based on the representations to estimate the density ratio between the current batch of molecules and the molecules in the calibration set, and then using the density ratio as an importance weight to perform weighted correction on the offline calibration quantile to obtain the calibration quantile corresponding to the current batch of molecules; when the number of drug molecules to be tested is lower than the preset quantity threshold, directly calling the offline calibration quantile, and generating a confidence interval for the drug molecules to be tested based on the corresponding calibration quantile.
[0053] Specifically, after the phased training is completed, all model parameters (including encoder parameters) Shared key mapping vector Residual key mapping vectors for each task Gating matrix The prediction head parameters for each task are completely frozen. Using an independent calibration set that the model has never encountered before, the calibration statistics required for conformal prediction (a prediction interval construction framework based on inconsistency measures that can provide statistical coverage guarantees under finite sample conditions) are computed offline.
[0054] The normalized nonconformity score means that the prediction error is normalized using the prediction standard deviation, eliminating heteroscedasticity of prediction error magnitudes between different chemical structures, and making the nonconformity scores of samples distributed in different chemical spatial regions statistically comparable. ) and each drug performance prediction task t ( The normalized non-consistent score is calculated as follows: ; in To determine the true label value of the i-th sample in the calibration set on the drug performance prediction task t; and These represent the predicted mean and standard deviation of the frozen ensemble model for this sample, respectively.
[0055] For the drug performance prediction task t, according to the preset significance level Calculate offline calibration quantiles: ; in The total number of samples in the calibration set; Preset significance level for drug performance prediction task t: For safety-critical tasks such as hERG toxicity and hepatotoxicity, the significance level is set as follows: (99% confidence level), typical pharmacokinetic parameters are taken as follows: (90% confidence level), early screening indicators are taken ; This is an indicator function.
[0056] When the number of drug molecules to be tested Reaching the preset quantity threshold At this point, an additional density ratio estimation and joint weighted conformal calibration process is added to correct for the chemical spatial covariate shift (a phenomenon where test data and training / calibration data exhibit systematic differences in input feature distribution) between the test batch and the calibration set. Molecules in the calibration set are labeled as category 0, and molecules in the current test batch are labeled as category 1, using a fully frozen pre-trained encoder. Extract molecular characteristics and train a lightweight binary classification MLP head in this characteristic space. It only requires 100 to 200 gradient updates to converge each time. This is based on the Bayesian density ratio equation. Calculate the importance weight of the i-th sample in the calibration set: ; in For the frozen pre-trained GNN encoder; For lightweight binary classification MLP heads, parameters Retrain for each batch prediction request; A threshold is set for numerical stability to prevent the weight denominator from approaching zero; This serves as an upper bound for the weights to prevent weight explosion for samples with extreme distributions.
[0057] Then, normalized importance weights and joint weighted calibration quantiles are calculated. This is applied to the drug performance prediction task t and the j-th molecule in the current test batch. The normalized importance weights are: ; In the denominator The term is the normalization guarantee term required by the weighted conformal prediction theorem, ensuring This is a necessary condition for the finite sample margin coverage guarantee to hold. The joint weighted calibration quantile of the drug performance prediction task t in the current batch prediction scenario is: ; in, For calibration set number The true label value of each sample on the drug performance prediction task t; For the frozen ensemble model on the calibration set The predicted mean of each sample on the drug performance prediction task t; For the frozen ensemble model on the calibration set The prediction standard deviation of each sample on the drug performance prediction task t is used as the normalized denominator to eliminate heteroscedasticity. Density ratio weighting Shared across all T tasks, only one training of the binary classification MLP head is needed to simultaneously correct the calibration quantiles of all endpoints. At that time, the system directly calls the offline calibration quantile. .
[0058] Based on the single-molecule scenario ( ) or batch scenarios ( Determine the effective calibration quantiles Constructing test molecules Final prediction confidence interval on drug performance prediction task t: ; in To integrate the model for testing molecules The predicted mean on the drug performance prediction task t; To integrate the model for testing molecules The standard deviation of prediction on the drug performance prediction task t; To effectively calibrate quantiles, the single-molecule scenario is taken as follows: In batch scenarios, retrieve Confidence interval width With integrated coefficient of variation Jointly determine a five-level confidence score: the confidence interval width is less than 0.2 log units and The predictions are marked with the highest confidence level (level 5); the width is between 0.2 and 0.5 log units or Predictions with a confidence level between 5% and 15% are labeled as Level 4; widths exceeding 2.0 log units or... The prediction is marked with the lowest confidence level (Level 1), and the system also marks it with a "Recommended experimental verification" warning. The final output is a structured prediction report, which includes the point prediction value, confidence interval, and confidence level for each property endpoint, as well as a summary of the risk level and recommended verification priority for safety-critical endpoints such as hERG toxicity and hepatotoxicity.
[0059] Existing tools estimate the uncertainty of model output variance, and their confidence interval width only reflects the prediction discrepancies within the model, without providing coverage guarantees in a frequency sense. In contrast, this approach constructs confidence intervals based on normalized non-consistent scores, which provides marginal coverage guarantees for the true labels of test molecules under limited sample conditions. In batch mode, density ratio weighted correction is further used to cover chemical spatial covariate offset scenarios, so that the actual coverage of the confidence interval on novel skeletal molecules is maintained near the nominal level.
[0060] In one embodiment of the present invention, step S4 includes: constructing a molecular graph and decomposing local subgraphs of the SMILES string of the drug molecule to be tested according to the method in step S1, to obtain atomic feature vectors, bond feature vectors, and a set of local subgraphs respectively; the local feature extraction branch extracts local representations through a graph isomorphism network and attention pooling. The global feature extraction branch extracts global representations for each drug performance prediction task t using a multi-head self-attention mechanism that carries a key-level attention correction scalar. Subsequently, the fusion molecular vectors of each task are obtained through the gated fusion unit. The ensemble prediction unit performs parallel inference using M member models and calculates the ensemble prediction mean for each task. With the standard deviation of the integrated forecast Finally, it depends on whether the number of molecules reaches the batch threshold. Each task constructs a confidence interval by calling either the offline calibration quantile or the batch weighted calibration quantile, and outputs a structured drug performance prediction result that includes the predicted point value, the confidence interval, and the confidence level.
[0061] In one embodiment of the present invention, such as Figure 5 As shown, a drug performance prediction system based on neural networks is also provided. The system is used to implement the drug performance prediction method described above. The system includes a molecular information processing module, a drug performance prediction model, and a result output module.
[0062] The molecular information processing module is used to obtain the SMILES string of the drug molecule to be tested, parse it into a molecular graph, construct atomic feature vectors for each atomic node and bond feature vectors for each chemical bond edge, and call the BRICS algorithm to perform substructure decomposition on the molecular graph to obtain a set of subgraphs. The molecular graph features and local subgraph features are then output to the drug performance prediction model.
[0063] The drug performance prediction model comprises a local feature extraction branch, a global feature extraction branch, a feature fusion unit, and an ensemble prediction unit, used to output drug performance prediction results based on the two types of features mentioned above. The local feature extraction branch performs neighborhood aggregation on each subgraph using a graph isomorphism network, and outputs molecular local feature vectors through node-level and fragment-level attention pooling. The global feature extraction branch constructs a fully connected molecular graph and models the long-range interactions between arbitrary atom pairs using a multi-head self-attention mechanism carrying bond-level attention correction scalars, outputting molecular global feature vectors for each prediction task. The feature fusion unit concatenates the two feature paths and their element-wise product for each task, calculates a gating vector through a gating network, and then weights and superimposes the two feature paths using the gating vector to output a fused representation vector. The ensemble prediction unit contains M sub-prediction models with differentiated architectures, statistically aggregates the outputs of each sub-model, and calculates the ensemble prediction mean and standard deviation for each task. The drug performance prediction model undergoes three training phases before deployment: pre-training, multi-task joint fine-tuning, and toxicity endpoint task optimization. After training, the calibration quantiles for each task are calculated offline on an independent calibration set using a conformal calibration framework. When a batch of test molecules reaches a certain quantity threshold, a lightweight binary classifier is trained based on the molecular characterization of the frozen encoder to estimate the density ratio. The calibration quantiles are then weighted and corrected with importance weights to obtain the calibration quantiles in the batch scenario, compensating for the chemical spatial covariate offset between the test batch and the calibration set.
[0064] The results output module is used to construct the prediction confidence interval for each task based on the effective calibration quantile and the integrated prediction standard deviation. It then calculates a five-level confidence score by combining the confidence interval width and the integrated coefficient of variation, and outputs a structured prediction report containing the predicted values of each property endpoint, confidence interval, confidence level, and a summary of the safety-critical endpoint risk.
[0065] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting drug performance based on neural networks, characterized in that, Includes the following steps: S1. Obtain the SMILES string of the drug molecule, convert the SMILES string into a molecular graph using cheminformatics processing, and encode the atomic nodes and chemical bond edges in the molecular graph to obtain molecular graph features; decompose the molecular graph using the BRICS substructure decomposition method to obtain local subgraph features. Each subgraph retains the atoms and bonds inside the fragment, as well as the connection edges between the fragment and adjacent fragments. Different subgraphs are allowed to overlap at the atomic level. S2. A drug performance prediction model is constructed based on molecular graph features and local subgraph features. The drug performance prediction model includes a local feature extraction branch, a global feature extraction branch, a feature fusion unit, and an integrated prediction unit. The local feature extraction branch is used to extract local molecular feature vectors based on local subgraph features, the global feature extraction branch is used to extract global molecular feature vectors based on molecular graph features, the feature fusion unit fuses the local molecular feature vectors and the global molecular feature vectors, and the integrated prediction unit outputs the drug performance prediction results based on the fused features. S3. The drug performance prediction model is trained using a phased training strategy, which includes pre-training, multi-task joint fine-tuning, and task optimization. After the model training is completed, the trained drug performance prediction model is calibrated based on the calibration set to obtain the calibrated drug performance prediction model. S4. The SMILES string of the drug molecule to be tested is used to construct a molecular graph and decompose local subgraphs according to the method in S1. The graph is then input into the calibrated drug performance prediction model to obtain the drug performance prediction results of the drug molecule to be tested. In step S1, the molecular graph features include atomic feature vectors constructed based on atomic nodes and bond feature vectors constructed based on chemical bond edges; Atomic node features include at least one of atomic type, atomic number, formal charge, hybridization type, number of connected hydrogen atoms, aromaticity and chirality marking; chemical bond edge features include at least one of bond type, conjugation, ring structure marking and stereochemical information; local subgraph features include atomic feature vectors and bond feature vectors of each local subgraph obtained based on BRICS break site decomposition, wherein the BRICS break sites cover at least one of pharmacophore structure, metabolic site and toxicity warning structure; In step S2, obtaining the molecular global feature vector based on molecular graph feature extraction specifically includes: a node embedding initialization stage, where the local feature extraction branch and the global feature extraction branch share the same linear embedding layer, mapping the atomic feature vectors to node hidden vectors through the linear embedding layer; constructing a fully connected molecular graph using the hidden vectors of each atomic node as input, modeling the long-distance interactions between all atomic nodes using a multi-head self-attention mechanism, introducing the bond feature vector into the attention score calculation, and correcting the multi-head self-attention score through a bond-level attention correction scalar, wherein the bond-level attention correction scalar is calculated by weighted combination of the bond feature vector and the residual bond projection vector; after stacking multiple global attention layers, the mean of all atomic representations is read out to obtain the molecular global feature vector; The feature fusion unit's process of fusing local and global features includes: concatenating the molecular global feature vector, the molecular local feature vector, and their element-wise product in three ways, inputting them into the gating network corresponding to the drug performance prediction task t, and calculating the gating vector; weighting and superimposing the molecular global feature vector and the molecular local feature vector with the gating vector to obtain a fusion representation vector that simultaneously carries global topological information and local chemical group information; and independently performing the above fusion process for each of the T drug property prediction tasks to obtain the fusion representation vector corresponding to each task. In step S2, obtaining the molecular local feature vector based on local subgraph feature extraction specifically includes: For each local subgraph, the atomic feature vector is mapped to the node hidden vector through a linear embedding layer, and then a graph isomorphic network is used to aggregate multi-layer neighborhood information. After neighborhood aggregation is completed, node-level attention pooling is performed on the node representations in each local subgraph to obtain the subgraph representation vector; subgraph-level attention weighted aggregation is performed on all subgraph representation vectors to obtain the molecular local feature vector.
2. The drug performance prediction method based on neural networks as described in claim 1, characterized in that, The key-level attention correction scalar is calculated by superimposing the global shared components and residual components of the key feature vector and then weighting the residual key projection vector, specifically: ; in, The projection vector of the global shared key; Let be the residual key projection vector of the drug performance prediction task t, initialized as an all-zero vector. The key feature vector; The residual intensity coefficient for the drug performance prediction task t is calculated as follows: ; in, For the learnable scalar parameters of the drug performance prediction task t; For the Sigmoid function; The number of effective training samples for drug performance prediction task t; For data volume balancing hyperparameters; when atomic pairs When there are no chemical bonds between them, Take a vector of all zeros, at this time .
3. The drug performance prediction method based on neural networks as described in claim 1, characterized in that, The gating vector and the fused representation vector are calculated as follows: ; ; in, This is the gate vector; This represents the global molecular feature vector for drug performance prediction task t. These are local eigenvectors of the molecule; For the drug performance prediction task t, the learnable gating weight matrix is used. This is the bias vector corresponding to the drug performance prediction task t; This indicates that the three vectors are concatenated along the feature dimension; This is element-wise multiplication; For the Sigmoid function; It is a vector of all ones; d represents the fused representation vector, and d is the unified hidden dimension.
4. The drug performance prediction method based on neural networks as described in claim 1, characterized in that, In S2, the integrated prediction unit includes multiple independent sub-prediction models. Each sub-prediction model receives the fusion representation vector corresponding to each drug performance prediction task and outputs the predicted value of each drug performance prediction task through the corresponding task prediction head. The multiple sub-prediction models differ in at least one of the following: the number of global attention layers, the number of graph isomorphic network layers, the hidden dimension, whether bond-level attention correction is introduced, and whether molecular fingerprints are fused. They are trained using different parameter initialization and data batch sampling order. The integrated prediction unit statistically aggregates the predicted values of each drug performance prediction task output by the multiple sub-prediction models to obtain the integrated prediction mean and integrated prediction standard deviation of each drug performance prediction task.
5. The drug performance prediction method based on neural networks as described in claim 1, characterized in that, In S3, the phased training strategy includes: The local feature extraction branch and the global feature extraction branch of the drug performance prediction model were pre-trained on an unlabeled molecular dataset. The pre-training adopted four parallel self-supervised tasks: masked atom prediction, context prediction, basic physicochemical property prediction and contrastive learning. Using the pre-trained parameters as initial parameters, joint fine-tuning is performed on multiple drug performance prediction tasks on a dataset with drug performance annotations. The multiple drug performance prediction tasks include pharmacokinetic tasks and toxicity tasks. During the joint fine-tuning process, the loss of each drug performance prediction task is summed using dynamic weights. Starting with the jointly fine-tuned parameters, task optimization is performed on each toxicity endpoint in the toxicity task. During task optimization, the bottom parameters of the molecular encoder are frozen, and only the top encoder parameters, the prediction head parameters of the corresponding toxicity endpoint, and the residual bond projection vector of the corresponding toxicity endpoint are updated. Focal Loss is used for training on toxicity endpoints with class imbalance.
6. The drug performance prediction method based on neural networks as described in claim 5, characterized in that, In S3, the calibration process for the trained drug performance prediction model based on the calibration set specifically includes: After the phased training is completed, all parameters of the drug performance prediction model are frozen. The frozen drug performance prediction model is applied to an independent calibration set that has not participated in the training. For each sample in the calibration set, the normalized non-consistency score is calculated based on the true label value, the predicted mean and the predicted standard deviation for each drug performance prediction task. The offline calibration quantile is determined according to the preset significance level corresponding to each drug performance prediction task. When the drug molecules to be tested are a batch of molecules that have reached a preset quantity threshold, the characteristics of the calibration set molecules and the current batch of molecules are extracted respectively, and a binary classifier is trained based on the characteristics to estimate the density ratio between the current batch of molecules and the calibration set molecules. Then, the density ratio is used as the importance weight to perform weighted correction on the offline calibration quantile to obtain the calibration quantile corresponding to the current batch of molecules. When the number of drug molecules to be tested is lower than the preset number threshold, the offline calibration quantile is directly invoked, and a confidence interval for the drug molecules to be tested is generated based on the corresponding calibration quantile.
7. A drug performance prediction system based on neural networks, characterized in that, The system is used to implement the drug performance prediction method as described in any one of claims 1 to 6, comprising: The molecular information processing module is used to acquire the drug molecule to be tested and convert the SMILES string of the drug molecule to be tested into molecular graph features and local subgraph features; A drug performance prediction model is used to receive the molecular graph features and local subgraph features, and to predict drug performance based on the molecular graph features and local subgraph features. The drug performance prediction model includes a local feature extraction branch, a global feature extraction branch, a feature fusion unit, and an integrated prediction unit. The results output module is used to output the predicted drug performance results of the drug molecules to be tested.
Citation Information
Patent Citations
Method and apparatus for predicting properties of drug molecule, storage medium, and computer device
WO2023168810A1
Method for predicting drug-drug interaction based on hierarchical graph neural network model
CN118866233A