Drug target prediction method based on 3D structure and multi-level attention mechanism
Through the drug target prediction method combining 3D structure and multi-level attention mechanism, the problems of insufficient consideration of target protein structure and data imbalance in the existing technology are solved, and more efficient and accurate drug target prediction is achieved, which improves the accuracy of drug development.
Patent Information
- Application Number
- CN202510036630.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The existing drug target prediction methods lack consideration of the essential structure of the target protein, resulting in insufficient interpretability of the model and unbalanced distribution of the target data, resulting in large errors in the prediction results.
The drug target prediction method based on 3D structure and multi-level attention mechanism is adopted, and the characteristics of drugs and target proteins are extracted through graph convolution networks and convolutional neural networks, combined with multi-level attention modules to fuse multi-layer features, and cross-attention alignment features are used to predict drug target interactions.
It improves the accuracy and reliability of drug target prediction, enhances the ability to understand the complex interactions between drugs and targets, reduces the risk of overfitting, and provides more accurate guidance on drug development.
Smart Images

Figure CN119889426B_ABST
Abstract
Description
Technical Field
[0001] The present invention provides a drug target prediction method based on 3D structure and multi-level attention mechanism, belonging to the technical field of drug target prediction. Background Art
[0002] The process of drug discovery and development is costly and time-intensive. Bringing a drug to market usually requires a large amount of R&D funds and time, and verifying the drug's therapeutic effects and potential side effects also takes a long time. As a result, most drugs currently in the clinical trial stage are put on the market before they are approved.
[0003] Identification of drug-target protein interactions plays a vital role in drug development, because whether a drug can bind to the target protein directly determines its therapeutic effect and potential side effects. By predicting the interaction between drug molecules and target proteins, the efficiency of candidate drug screening can be greatly improved, helping to identify new targets and promote personalized treatment. However, traditional experimental methods such as high-throughput screening and in vitro experiments are time-consuming and costly, and can only cover a limited combination of compounds and targets, which is difficult to meet the needs of modern drug development. To address these problems, in recent years, more and more studies have begun to combine computer-aided prediction, using machine learning and deep learning technologies to analyze large-scale molecular structure data and biological information to achieve efficient and accurate prediction of drug-target interactions. These methods not only accelerate the process of drug development, but also provide new ideas for drug repurposing and multi-target therapy.
[0004] However, the current drug target prediction methods still have the following defects in their application:
[0005] (1) Most of the target data used in existing prediction models are input in the form of amino acid sequences, which lacks consideration of the intrinsic structure of the target protein, resulting in insufficient interpretability of the model;
[0006] (2) The existing drug target data are unevenly distributed. Some targets have a larger number of active compound samples, while other targets have a smaller number of samples. The model has a bias and may learn only based on the simple chemical properties of the drug, resulting in large errors in the analysis and prediction results. Summary of the Invention
[0007] In order to overcome the deficiencies in the prior art, the present invention aims to provide a drug target prediction method based on 3D structure and multi-level attention mechanism.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: a drug target prediction method based on 3D structure and multi-level attention mechanism, including the following prediction steps:
[0009] Step S1: Collect data information about the interaction signatures between drugs, target sequences, and drug-target proteins, and collect corresponding target PDB files according to the PDB_ID in the public dataset for structural feature encoding;
[0010] Step S2: Process and extract the SMILES string features of the drug:
[0011] In the dataset loading part, a function is used to convert the SMILES string into a molecular graph, define the atomic and bond features of the drug, and return a graph structure containing node and edge features;
[0012] The returned graph structure is encoded and the constructed graph structure is encoded through a graph convolutional network. The graph convolutional network updates the representation of each node by aggregating the features of neighboring nodes. After adjusting the feature shape of the node, the graph embedding features are sent to the corresponding module.
[0013] Step S3: Use convolutional neural network to learn the digitized protein amino acid sequence, complete the feature encoding of the target on the sequence through multi-layer convolution and pooling operations, and extract the target sequence feature data P s ;
[0014] Step S4: Read the PDB file and model it into a pocket graph, perform feature calculation on the pocket graph, generate the final protein structure representation code, and extract the structural feature data P of the target protein by modeling the PDB file. p ;
[0015] Step S5: The feature data obtained in steps S3 and S4 are sent to the multi-level attention module respectively, and the multi-level protein feature matrix is fused through the multi-level feature fusion step, and the fused features are aligned using the cross-attention feature;
[0016] Step S6: Predict drug-target interactions. Through step S5, fully interact with drug-target features at different levels and perform maximum pooling to obtain f as the input for subsequent predictions. After passing through the fully connected layer, the classification probability space is mapped to output the final interaction prediction probability p.
[0017] Step S7: Input the data into the model for forward propagation, define the loss function required for training as cross entropy loss, and calculate the loss function;
[0018] Step S8: Backpropagate the loss function calculated in step S7 back to the model, calculate the corresponding gradient, and store the gradient information for subsequent optimization;
[0019] Step S9: Use the Adam optimizer to optimize the parameters of the prediction model, and use the optimized prediction model to predict the drug target.
[0020] The data information in step S1 includes the drug SMILES sequence required for training the model, the amino acid sequence of the target protein, and the interaction truth label selected from the public data sets BindingDB and DrugBank;
[0021] The collecting of the corresponding target PDB files is specifically performed by downloading the corresponding PDB files from the PDBID tags in the public data sets BindingDB and DrugBank for representing the target structural features.
[0022] The specific method for processing and extracting the SMILES string features of the drug in step S2 is:
[0023] The collected drug target data were divided into training set, validation set, and test set in a ratio of 7:1:2, and screened using a preset code;
[0024] The molecular graph is constructed by SMILES string, the expression is:
[0025] G=(v,ε);
[0026] Where v and ε represent the vertex set and edge set respectively;
[0027] Then, a graph convolutional network model is established to extract the molecular graph features of the drug. The specific steps are as follows:
[0028] Map the input features to the corresponding dimensions, perform graph convolution on the graph and node features, and aggregate neighbor nodes to update the representation of each node. The expression is:
[0029]
[0030] in: represents the adjacency matrix corresponding to the undirected graph G with additive self-connection, A and I represent the two adjacency matrices corresponding to the undirected graph G and the identity matrix, respectively. W (k) represents the trainable weights of the kth layer of GCN and the activation function is ReLU, Represents the output of the kth layer;
[0031] The updated node features are dimensionally adjusted to generate the final representation D of the drug.
[0032] In step S3, the target sequence feature data P is extracted s The specific method is:
[0033] Step S31: Encode the protein amino acid sequence into a numerical feature matrix, define the input amino acid sequence length as L, the amino acid feature dimension as d, and the input sequence matrix as X = [x1, x2, ..., x L ], the amino acid sequence is initialized as a learnable feature matrix, expressed as:
[0034] X∈R L×d ;
[0035] Where L is the sequence length, d is the feature dimension of each amino acid;
[0036] Step S32: The convolution operation extracts local features through multiple convolution kernels, performs convolution operation on the input sequence matrix X, and obtains the output feature map H (j) , the expression is:
[0037] H(j)=ReLU(X*W (j) +b (j) );
[0038] Among them, * represents a one-dimensional convolution operation, b (j) is the bias term of the jth convolution kernel, H (j) is the output feature map of the jth convolution kernel;
[0039] After pooling and feature splicing and flattening, the feature data P is obtained s , sent to the multi-level attention module in step S5 for fine-grained interactive learning.
[0040] In step S4, the structural feature data P of the target protein is extracted. p The specific method is:
[0041] Step S41: In the graph construction phase, the node feature h of the protein is i Using one_hot encoding, the expression is:
[0042]
[0043] Among them, r i represents the type of the i-th residue in the protein, and N is the number of residues in the protein;
[0044] The edge adding rule is defined as follows: if the Euclidean distance d between nodes i and j ij If the following conditions are met, add an edge between them, the condition is:
[0045] d ij ≤cutoff, where d ij =||p i -p j ||;
[0046] Among them, p i , p j are the spatial coordinates of residues i and j respectively, and cutoff is the distance threshold for adding edges, which is set to
[0047] The protein graph is constructed by node features and edge features;
[0048] Step S42: Encode the node features through multiple layers of graph convolution layers, where the mathematical expression of graph convolution is:
[0049]
[0050] Among them, h i (l) is the feature of node i in layer l, W(l) is the weight matrix of layer l, N(i) is the set of neighbors of node i, and σ is the ReLU activation function;
[0051] All node features are aggregated through pooling operations to obtain the global features of the graph as feature data P p , mapped to a feature dimension that matches the feature encoding on the sequence in step S3.
[0052] The specific method of step S5 is:
[0053] Introduce the weight factor α and transform the target sequence feature data P s and the structural characteristics data of the target protein P p After splicing, the final protein representation P is obtained, which is expressed as:
[0054] P=α·P s +(1-α)·P p .
[0055] The method for establishing the multi-level attention module used in step S5 is:
[0056] Step S51: Perform multi-level feature fusion:
[0057] The expression for defining the feature matrix of each layer of the encoder output is:
[0058] P l ∈R m×d ;
[0059] Where m is the length of the protein sequence and d is the feature dimension;
[0060] The outputs of all layers are stacked to form a fusion feature matrix, which is expressed as:
[0061] P catg =[P0, P1, ..., P n ]∈Rn·m×d ;
[0062] Among them, P cat Contains different levels of protein features;
[0063] Then the fusion matrix F l ∈R l×1 Perform cross-layer feature fusion to form a multi-level fusion protein feature matrix Among them, the protein feature matrix P′ l The calculation formula is:
[0064]
[0065] Where F is a learnable diagonal matrix, each diagonal element is F l And l=0,…,n;
[0066] According to the multi-level cross-attention mechanism of layer l, the query matrix Q, key matrix K, and value matrix V are calculated respectively. The calculation formula is:
[0067]
[0068] Among them, D l is the drug feature matrix passed through the graph convolution module in step S2, P' l is a fused multi-level protein feature matrix;
[0069] Step S52: A variant of the multi-head attention mechanism is used for feature alignment:
[0070] Two additional linear projections are introduced to enhance the representation ability of attention, expressed as:
[0071]
[0072] in, are two additional linear projections, h k are the query matrix and key matrix, and the number of attention heads, h v Represents the number of attention heads in the value matrix.
[0073] The specific calculation method of the interaction prediction probability p in step S6 is:
[0074] The calculation formula for the predicted interaction probability p is:
[0075] p = Sigmoid(Wf+b);
[0076] Among them, W is a learnable weight parameter, and an interaction probability threshold is defined as τ. If p>τ is satisfied, it means that there is an interaction between the drug and the target, which means that the drug and the target protein are successfully bound. If it is not satisfied, it means that there is no significant interaction between the drug and the target.
[0077] The specific method for calculating the loss function in step S7 is:
[0078] Input the data into the model for forward propagation to obtain the predicted label By minimizing the cross entropy classification loss To obtain the optimal solution of the model, the expression is:
[0079]
[0080] Among them, y is the true value label, is the predicted label.
[0081] The specific method of step S9 is:
[0082] Step S91: Initialization parameters: define the weight of the initial network as θ0, the learning rate γ as 0.0001, the first-order momentum as m0=0, the second-order momentum as v0=0, the decay rate β1 of the first-order momentum estimate as 0.9, the decay rate β2 of the second-order momentum estimate as 0.999, and the minimum constant ∈ to avoid the denominator being zero as 10 -8 ;
[0083] Step S92: Calculate the gradient: At the tth iteration, calculate the loss function About the current parameter θ t The gradient of is calculated as:
[0084]
[0085] Step S93: Update the first-order momentum, i.e., the exponential moving average of the gradient. The calculation formula is:
[0086] m t =β1m t-1 +(1-β1)g t ;
[0087] Step S94: Update the second-order momentum, i.e., the exponential moving average of the squared gradient. The calculation formula is:
[0088] v t =β2v t-1 +(1-β2)g t 2 ;
[0089] Step S95: Since m0=0 and v0=0 at the initial time, the value will be biased towards 0, and deviation correction is required. The correction calculation formula used is:
[0090]
[0091]
[0092] Step S96: Update the parameters using the first-order and second-order momentum corrected in step S95. The calculation formula is:
[0093]
[0094] The gradient is normalized to unit variance Adaptively adjust the learning rate according to the size of the gradient.
[0095] The beneficial effects of the present invention compared to the prior art are as follows: the present invention proposes a method for predicting drug targets by integrating protein 3D structure analysis with a multi-level attention mechanism. The multi-level attention mechanism adopted has the advantage of capturing multi-level features and can fuse multimodal information of protein structure and drug molecules. By introducing protein 3D structure information, it can fully utilize key features such as its spatial conformation, active sites and intermolecular forces, further enhance the model's ability to understand protein functional properties and drug binding areas, and combine with hierarchical feature learning strategies to effectively mine the complex interactions between drugs and targets; the present invention encourages the model to focus on hierarchical interaction features, reduce hidden biases, reduce the risk of overfitting, and enhance robustness performance in different data domains, thereby improving the accuracy and reliability of predictions and providing more comprehensive and precise guidance for drug development. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] The present invention will be further described below with reference to the accompanying drawings:
[0097] Figure 1 Flow chart of the steps of the drug target prediction method of the present invention;
[0098] Figure 2 Flowchart of the steps of the drug target prediction method in an embodiment of the present invention. DETAILED DESCRIPTION
[0099] like Figure 1As shown, the present invention provides a drug target prediction method based on protein 3D structure and multi-level attention mechanism. The method predicts drug targets by extracting drug molecules, protein sequences and structural features and the relationship between them. The features of drug molecules are generally obtained by model encoding SMILES strings. SMILES strings are a method of representing drugs. They represent the chemical structure of molecules as a set of simple strings and are widely used because of their simplicity, flexibility and support for standardization. The sequence features of proteins are mainly encoded by amino acid sequences, which are used to describe which amino acids a protein consists of and in what order. This sequence is a linear representation that provides primary structure information of proteins. The structural features of proteins are obtained from their PDB (Protein Data Bank) files. PDB files are usually stored in text form and cover a variety of key information of proteins. They can accurately describe the three-dimensional structure of molecules. The encoding features of drugs and proteins are fused through a multi-level attention module. The complex interactions between drugs and targets are fully learned. Then, they enter the multi-layer perceptron mapping module to output the final prediction results for the drug development stage.
[0100] The present invention mainly includes the following drug target prediction steps:
[0101] First, relevant data such as drug, target sequence, and interaction labels between drug-target proteins are collected. The relevant data includes drug SMILES sequences required for model training, target protein amino acid sequences, and interaction ground truth labels, which are selected from public datasets such as BindingDB and DrugBank.
[0102] The corresponding target PDB files are collected according to the PDB_ID in the public dataset for structural feature encoding; among them, the target PDB files are collected by downloading the corresponding PDB files through the PDBID tags in the two public datasets for the representation of target structural features.
[0103] Then process and extract the drug SMILES string features:
[0104] During the dataset loading process, a function is used to convert the SMILES string into a molecular graph. The atomic and bond features of the drug are defined, and a graph structure containing node and edge features is returned. This returned graph is then encoded. The constructed graph is then encoded using a graph convolutional network. Specifically, the graph convolutional network updates the representation of each node by aggregating features from neighboring nodes. The node's feature shape is then adjusted to embed the graph features into other modules.
[0105] Extract the sequence features and structural features of protein amino acids respectively:
[0106] Among them, the method for extracting protein sequence features is: using One-Hot encoding to convert the protein sequence from text form to numerical form, representing each amino acid as a vector of fixed length; constructing a convolutional layer to capture the inherent features in the sequence, extracting complex pattern features, and after pooling and fully connected layers, outputting the embedded representation of the protein sequence.
[0107] Extracting protein structural features requires combining the PDB file of the target protein and converting it into the corresponding pocket graph for learning. The specific method is: input the PDB file path of the protein, the distance threshold of the added edge between the residues (the Euclidean distance between the residues, the unit is is a unit of measurement that describes the distances between atoms and molecules);
[0108] Use the Python library to load the PDB file, extract the main chain atomic coordinates of the residues, create a DGL (a library for building and operating graph neural networks) graph, and add node, edge, and position encoding features. The generated DGL graph is passed through a graph convolution layer to extract the features of each node in the graph. A linear transformation of the hidden features of the nodes in the graph is added to provide a higher-level feature representation for subsequent operations. The output is an embedded vector of a specific length, which is then fused in the following steps.
[0109] By constructing a graph neural network model, the protein PDB file is encoded to generate a graph structure G containing residue features and spatial relationships. Specifically, the PDB file is used to parse residue information, construct node features hi and edges eij between residues, and gradually extract high-dimensional feature representations of the nodes through graph convolutional network (GCN) layers. The model consists of multiple layers of graph convolutional networks, each of which updates node features, capturing nonlinear relationships through activation functions, and using global pooling operations to aggregate node information to generate a global embedding hG of the graph.
[0110] By introducing the weight factor α to adjust the contribution of the two to the final feature, the target sequence feature data P s and the structural characteristics data of the target protein P p The protein’s sequence feature data and structural feature data are spliced and fused to obtain the final protein encoding. Specifically, the obtained sequence features and structural features are transmitted to the multi-level attention module respectively. The multi-layer protein feature matrix is fused through the multi-level feature fusion step, and the fused features are aligned using the cross-attention features.
[0111] The above-mentioned multi-level attention module is mainly used to fully interact with drugs and targets. In the existing methods, in the process of fusing drug and target features, most of them use the self-attention mechanism to learn the potential complex associations between drugs and targets. Although the computational complexity is low, this will bring some problems. Traditional self-attention usually only interacts at the feature layer, ignoring the feature information between different network layers, and has limited expression ability for long sequences. In addition, when the data has structural complexity, such as long target protein sequences, it tends to use dominant features and ignore more detailed information. The multi-level attention mechanism provided by the present invention has more advantages. The mechanism mainly includes:
[0112] Multi-layer feature fusion: The feature outputs P0, P1, ..., P of each layer in the protein encoder are combined n Aggregate into fusion feature matrix P cat ,By fusing protein features, drug features are derived,interacting with relevant features, thus capturing,multi-level interaction features, leading to a more comprehensive,understanding of drug-target interactions.
[0113] Feature alignment: Through the multi-head attention mechanism, protein features and drug features are combined to capture the multi-level interactions between them.
[0114] Finally, the prediction label is output based on the drug-target interaction prediction. Drug-target interaction prediction is achieved through a multi-layer perceptron, which is specifically composed of multi-level global interaction features, which are max-pooled and then enter the fully connected layer to be mapped to the classification probability space and output the prediction result.
[0115] Input the data into the model for forward propagation and define the loss function required for training as cross entropy loss. Specifically, after inputting the data into the model for forward propagation, the optimal solution of the model is obtained by minimizing the cross entropy loss.
[0116] Backpropagate the loss back to the model, calculate the gradient to update the parameters, specifically calculate the gradient of the loss function with respect to the model parameters, and store the gradient information in the parameter attributes of the model;
[0117] The Adam optimizer is used to update the model parameters, and a more efficient optimization process is achieved by dynamically adjusting the learning rate of each parameter.
[0118] like Figure 2 As shown, in an embodiment of the present invention, in order to predict drug-target interactions, the following prediction method is specifically adopted:
[0119] Step S1: Collect data information about drugs, targets and interactions;
[0120] The data used in this paper are collected from the public data sets DrugBank and BindingDB. The data information index specifically includes drug SMILES, target amino acid sequence, interaction label, PDBID and corresponding PDB file, with a data volume of approximately 70,000.
[0121] Step S2: Process the SMILES string of the drug, define the characterization method of atoms and bonds, and construct the graph structure;
[0122] First, the collected drug target data is divided into training set, validation set and test set according to the ratio of 7:1:2. In the specific processing process, the code is used to screen. If the data is missing, the drug target pair is discarded to ensure the normal operation of the program and eliminate the impact on the learning of the model. The molecular graph G = (v, ε) is constructed using the SMILES string, where v and ε represent the vertex set (i.e., atoms) and the edge set (i.e., chemical bonds), respectively. Since the size of each molecule is different, we introduced virtual nodes and self-loop edges in the learning of the model to enable the model to better handle different molecular sizes and avoid training instability due to inconsistent number of nodes. In addition, the marker bit of the virtual node is designed to facilitate the model to distinguish between actual nodes and filled virtual nodes, thereby reducing the interference of noise to a certain extent;
[0123] Next, we build a graph convolutional network to extract the molecular graph features of the drug. First, we map the input features to a specific dimension for easy processing. Then, we input the graph and node features into the graph convolution operation and aggregate neighboring nodes to update the representation of each node. The expression is:
[0124]
[0125] in: represents the adjacency matrix corresponding to the undirected graph G with additive self-connection, where A and I represent the two adjacency matrices corresponding to G and the identity matrix, respectively. W (k) represents the trainable weights of the kth layer of GCN and the activation function is ReLU, Represents the output of the kth layer. The node features after update are dimensionally adjusted to generate the final representation D of the drug.
[0126] Step S3: Extraction of target sequence features: Use a convolutional neural network to learn the digitized amino acid sequence, and complete the feature encoding of the target in the sequence through multiple layers of convolution and pooling operations. The specific method is as follows:
[0127] Step S31: First, encode the protein amino acid sequence into a numerical feature matrix. Assume that the input amino acid sequence length is L, the amino acid feature dimension is d, and the input sequence is X = [x1, x2, ..., xL ]Then the amino acid sequence can be initialized as a learnable feature matrix, expressed as:
[0128] X∈R L×d ;
[0129] Where L is the sequence length, d is the feature dimension of each amino acid;
[0130] Step S32: The convolution operation extracts local features through multiple convolution kernels, performs convolution operation on the input sequence matrix X, and obtains the output feature map H (j) , the expression is:
[0131] H (j) =ReLU(X*W (j) +b (j) );
[0132] Among them, * represents a one-dimensional convolution operation, b (j) is the bias term of the jth convolution kernel, H (j) is the output feature map of the jth convolution kernel;
[0133] After pooling and feature splicing and flattening, the feature data P is obtained s , and jointly enter the multi-level attention module for fine-grained interactive learning.
[0134] Step S4: For the structural feature data P of the target protein p The extraction mainly involves modeling the PDB file, specifically reading the PDB file to model the pocket graph, performing feature calculation on the pocket graph, and generating the final protein structure representation. The specific method is:
[0135] Step S41: In the graph construction phase, the node feature h of the protein i Using one_hot encoding we get the expression:
[0136]
[0137] Among them, r i represents the type of the i-th residue in the protein, and N is the number of residues in the protein;
[0138] The specific edge adding rule is: if the Euclidean distance d between nodes i and j ij If the following conditions are met, add an edge between them, the expression is:
[0139] d ij ≤cutoff, where d ij =||p i -p j ||;
[0140] Among them, p i , p j are the spatial coordinates of residues i and j respectively, and cutoff is the distance threshold for adding edges. The smaller the threshold, the finer the granularity of modeling. In this invention, the threshold is set to Node features and edge features constitute the protein graph;
[0141] Step S42: Encode the node features through multiple layers of graph convolution. The mathematical expression of graph convolution is:
[0142]
[0143] Among them, h i (l) is the feature of node i in layer l, W(l) is the weight matrix of layer l, and N(i) is the set of neighbors of node i. σ is the ReLU activation function. All node features are summarized through pooling operation to obtain the global feature P of the graph. p , mapped to the feature dimension that matches the encoding in step S3.
[0144] Step S5: The feature data obtained in steps S3 and S4 are sent to the multi-level attention module respectively, and the multi-level protein feature matrix is fused through the multi-level feature fusion step, and the fused features are aligned using the cross-attention feature;
[0145] Specifically, by introducing the weight factor α, the target sequence feature data P s and the structural characteristics data of the target protein P p After splicing, the final protein representation P is obtained, which is expressed as:
[0146] P=α·P s +(1-α)·P p .
[0147] The establishment method of the above multi-level attention module is:
[0148] Step S51: Multi-level feature fusion:
[0149] The encoder outputs the feature matrix P of each layer l ∈R m×d , where m is the length of the protein sequence and d is the feature dimension. The outputs of all layers are stacked to form a fused feature matrix, which is expressed as:
[0150] P cat =[P0, P1, ..., P n ]∈R n·m×d ;
[0151] Here P catContains protein features at different levels, then, the fusion matrix F l ∈R l×1 Cross-layer feature fusion is performed to form a multi-level fusion protein feature matrix In general, P′ l The calculation formula is:
[0152]
[0153] Here F is a learnable diagonal matrix, each diagonal element of which is F l And l = 0,…,n, then the expressions of the query matrix Q, key matrix K, and value matrix V of the multi-level cross-attention mechanism of the lth layer are:
[0154]
[0155] Among them D l is the drug feature matrix of step S2 through the graph convolution module, P′ l is a fused multi-level protein feature matrix;
[0156] Step S52: In order to enhance the feature extraction capability of the attention heads in the multi-level attention, a variant of the multi-head attention mechanism is used for feature alignment. Specifically, the present invention introduces two additional linear projections to enhance the representation capability of attention, allowing information to flow between different attention heads and improving the overall performance of the model. The expression is:
[0157]
[0158] Among them, the parameters Q, K, and V are obtained from step S51. are two additional linear projections, h k are the query matrix and key matrix, and the number of attention heads, h v represents the number of attention heads of the value matrix, and they can be of different sizes.
[0159] Step S6: Predict drug-target interactions. Through step S5, fully interact with drug-target features at different levels and perform maximum pooling to obtain f as the input for subsequent predictions. After passing through the fully connected layer, the classification probability space is mapped to output the final interaction prediction probability p, which is expressed as:
[0160] p = Sigmoid(Wf+b);
[0161] Among them, W is a learnable weight parameter. Given an interaction probability threshold of τ, if p>τ, it means that there is an interaction between the drug and the target, which may represent a successful binding of the drug to the target protein. Otherwise, it means that there is no significant interaction between the drug and the target.
[0162] Step S7: Input the data into the model for forward propagation to obtain the predicted label By minimizing the cross entropy classification loss To obtain the optimal solution of the model, the expression is:
[0163]
[0164] Among them, y is the true value label, is the predicted label.
[0165] Step S8: Loss back propagation. The loss calculated in step S7 is back propagated back to the model, the corresponding gradient is calculated, and the gradient information is stored for subsequent optimization.
[0166] Step S9: Use the Adam optimizer to optimize parameters. The core is to use the mean of the gradient and the mean square of the gradient to dynamically adjust learning to make the gradient update more robust. The specific method is as follows:
[0167] Step S91: Initialize parameters:
[0168] Initialize the network weight to θ0, the learning rate γ to 0.0001, the first-order momentum to m0 = 0, the second-order momentum to v0 = 0, the decay rate β1 of the first-order momentum estimate to 0.9, the decay rate β2 of the second-order momentum estimate to 0.999, and the minimum constant ∈ to avoid the denominator to be zero is 10 -8 .
[0169] Step S92: Calculate the gradient:
[0170] At the tth iteration, the loss function is calculated About the current parameter θ t The gradient of is calculated as:
[0171]
[0172] Step S93: Update the first-order momentum, i.e., the exponential moving average of the gradient. The calculation formula is:
[0173] m t =β1m t-1 +(1-β1)g t ;
[0174] Step S94: Update the second-order momentum, i.e., the exponential moving average of the squared gradient. The calculation formula is:
[0175] v t =β2v t-1 +(1-β2)g t 2 ;
[0176] Step S95: Deviation correction:
[0177] Since m0=0 and v0=0 at the initial time, the value will be biased towards 0, so a correction formula is introduced for processing:
[0178]
[0179]
[0180] Step S96: Parameter update:
[0181] The first-order and second-order momentum corrected in step S95 are used to update the parameters. The expressions are:
[0182]
[0183] The gradient is normalized to unit variance Adaptively adjust the learning rate according to the size of the gradient.
[0184] The advantage of using the Adam optimizer in the present invention is that it can dynamically adjust the learning rate, has strong robustness when dealing with complex optimization problems, and can achieve smooth and efficient updates.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A drug target prediction method based on 3D structure and multi-level attention mechanism, characterized by: The prediction steps include the following: Step S1: Collect data information about the interaction signatures between drugs, target sequences, and drug-target proteins, and collect corresponding target PDB files according to the PDB_ID in the public dataset for structural feature encoding; Step S2: Process and extract the SMILES string features of the drug: In the dataset loading part, a function is used to convert the SMILES string into a molecular graph, define the atomic and bond features of the drug, and return a graph structure containing node and edge features; The returned graph structure is encoded and the constructed graph structure is encoded through a graph convolutional network. The graph convolutional network updates the representation of each node by aggregating the features of neighboring nodes. After adjusting the feature shape of the node, the graph embedding features are sent to the corresponding module. Step S3: Use convolutional neural network to learn the digitized protein amino acid sequence, complete the feature encoding of the target on the sequence through multi-layer convolution and pooling operations, and extract the target sequence feature data P s ; Step S4: Read the PDB file and model it into a pocket graph, perform feature calculation on the pocket graph, generate the final protein structure representation code, and extract the structural feature data P of the target protein by modeling the PDB file. p ; Step S5: The feature data obtained in steps S3 and S4 are sent to the multi-level attention module respectively, and the multi-level protein feature matrix is fused through the multi-level feature fusion step, and the fused features are aligned using the cross-attention feature; Step S6: Predict drug-target interactions. Through step S5, fully interact with drug-target features at different levels and perform maximum pooling to obtain f as the input for subsequent predictions. After passing through the fully connected layer, the classification probability space is mapped to output the final interaction prediction probability p. Step S7: Input the data into the model for forward propagation, define the loss function required for training as cross entropy loss, and calculate the loss function; Step S8: Backpropagate the loss function calculated in step S7 back to the model, calculate the corresponding gradient, and store the gradient information for subsequent optimization; Step S9: Use the Adam optimizer to optimize the parameters of the prediction model, and use the optimized prediction model to predict the drug target.
2. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: The data information in step S1 includes the drug SMILES sequence required for training the model, the amino acid sequence of the target protein, and the interaction truth label selected from the public data sets BindingDB and DrugBank; The collecting of the corresponding target PDB files is specifically performed by downloading the corresponding PDB files from the PDBID tags in the public data sets BindingDB and DrugBank for representing the target structural features.
3. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: The specific method for processing and extracting the SMILES string features of the drug in step S2 is: The collected drug target data were divided into training set, validation set, and test set in a ratio of 7:1:2, and screened using a preset code; The molecular graph is constructed by SMILES string, the expression is: G=(v,ε); Where v and ε represent the vertex set and edge set respectively; Then, a graph convolutional network model is established to extract the molecular graph features of the drug. The specific steps are as follows: Map the input features to the corresponding dimensions, perform graph convolution on the graph and node features, and aggregate neighbor nodes to update the representation of each node. The expression is: in: represents the adjacency matrix corresponding to the undirected graph G with additive self-connection, A and I represent the two adjacency matrices corresponding to the undirected graph G and the identity matrix, respectively. W ( k ) represents the trainable weights of the kth layer of GCN and the activation function is ReLU, Represents the output of the kth layer; The updated node features are dimensionally adjusted to generate the final representation D of the drug.
4. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: In step S3, the target sequence feature data P is extracted s The specific method is: Step S31: Encode the protein amino acid sequence into a numerical feature matrix, define the input amino acid sequence length as L, the amino acid feature dimension as d, and the input sequence matrix as X = [x1, x2, ..., x L ], the amino acid sequence is initialized as a learnable feature matrix, expressed as: X∈R L×d ; Where L is the sequence length, d is the feature dimension of each amino acid; Step S32: The convolution operation extracts local features through multiple convolution kernels, performs convolution operation on the input sequence matrix X, and obtains the output feature map H (j) , the expression is: H (j) =ReLU(X*W (j) +b (j) ); Among them, * represents a one-dimensional convolution operation, b (j) is the bias term of the jth convolution kernel, H (j) is the output feature map of the jth convolution kernel; After pooling and feature splicing and flattening, the feature data P is obtained s , sent to the multi-level attention module in step S5 for fine-grained interactive learning.
5. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: In step S4, the structural feature data P of the target protein is extracted. p The specific method is: Step S41: In the graph construction phase, the node feature h of the protein is i Using one_hot encoding, the expression is: Among them, r i represents the type of the i-th residue in the protein, and N is the number of residues in the protein; The edge adding rule is defined as follows: if the Euclidean distance d between nodes i and j ij If the following conditions are met, add an edge between them, the condition is: d ij ≤cutoff, where d ij =||p i -p j ||; Among them, p i , p j are the spatial coordinates of residues i and j respectively, and cutoff is the distance threshold for adding edges, which is set to The protein graph is constructed by node features and edge features; Step S42: Encode the node features through multiple layers of graph convolution layers, where the mathematical expression of graph convolution is: Among them, h i (l) is the feature of node i in layer l, W(l) is the weight matrix of layer l, N(i) is the set of neighbors of node i, and σ is the ReLU activation function; All node features are aggregated through pooling operations to obtain the global features of the graph as feature data P p , mapped to a feature dimension that matches the feature encoding on the sequence in step S3.
6. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: The specific method of step S5 is: Introduce the weight factor α and transform the target sequence feature data P s and the structural characteristics data of the target protein P p After splicing, the final protein representation P is obtained, which is expressed as: P9α·P s +(1-a)·P p 。 。 7. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: The method for establishing the multi-level attention module used in step S5 is: Step S51: Perform multi-level feature fusion: The expression for defining the feature matrix of each layer of the encoder output is: P l ∈R m×d ; in m is the length of the protein sequence, and d is the feature dimension; The outputs of all layers are stacked to form a fusion feature matrix, which is expressed as: P cat =[P0,P1,...,P n ]∈R n·m×d ; Among them, P cat Contains different levels of protein features; Then the fusion matrix F l ∈R l×1 Perform cross-layer feature fusion to form a multi-level fusion protein feature matrix Among them, the protein feature matrix P′ l The calculation formula is: Where F is a learnable diagonal matrix, each diagonal element is F l And l=0,…,n; According to the multi-level cross-attention mechanism of layer l, the query matrix Q, key matrix K, and value matrix V are calculated respectively. The calculation formula is: Among them, D l is the drug feature matrix of step S2 through the graph convolution module, P′ l is a fused multi-level protein feature matrix; Step S52: A variant of the multi-head attention mechanism is used for feature alignment: Two additional linear projections are introduced to enhance the representation ability of attention, expressed as: in, are two additional linear projections, h k are the query matrix and key matrix, and the number of attention heads, h v Represents the number of attention heads in the value matrix.
8. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: The specific calculation method of the interaction prediction probability p in step S6 is: The calculation formula for the predicted interaction probability p is: p = Sigmoid(Wf+b); Among them, W is a learnable weight parameter, and an interaction probability threshold is defined as τ. If p>τ is satisfied, it means that there is an interaction between the drug and the target, which means that the drug and the target protein are successfully bound. If it is not satisfied, it means that there is no significant interaction between the drug and the target.
9. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: The specific method for calculating the loss function in step S7 is: Input the data into the model for forward propagation to obtain the predicted label By minimizing the cross entropy classification loss To obtain the optimal solution of the model, the expression is: Among them, y is the true value label, is the predicted label.
10. The drug target prediction method based on 3D structure and multi-level attention mechanism according to claim 1, characterized in that: The specific method of step S9 is: Step S91: Initialization parameters: define the weight of the initial network as θ0, the learning rate γ as 0.0001, the first-order momentum as m0=0, the second-order momentum as v0=0, the decay rate β1 of the first-order momentum estimate as 0.9, the decay rate β2 of the second-order momentum estimate as 0.999, and the minimum constant ∈ to avoid the denominator being zero as 10 -8 ; Step S92: Calculate the gradient: At the tth iteration, calculate the loss function About the current parameter θ t The gradient of is calculated as: Step S93: Update the first-order momentum, i.e., the exponential moving average of the gradient. The calculation formula is: m t =β1m t-1 +(1-β1)g t ; Step S94: Update the second-order momentum, i.e., the exponential moving average of the squared gradient. The calculation formula is: v t =β2v t-1 +(1-β2)g t 2 ; Step S95: Since m0=0 and v0=0 at the initial time, the value will be biased towards 0, and deviation correction is required. The correction calculation formula used is: Step S96: Update the parameters using the first-order and second-order momentum corrected in step S95. The calculation formula is: The gradient is normalized to unit variance Adaptively adjust the learning rate according to the size of the gradient.
Citation Information
Patent Citations
Transform and graph neural network-combined drug target interaction prediction method
CN116417093A
Drug target binding affinity prediction method and system
CN117594116A