A drug target intelligent recommendation method based on contrast learning
By aligning the feature spaces of drugs and target proteins using a contrastive learning method, the problem of feature inconsistency in drug-target interaction prediction is solved, thereby improving the accuracy and generalization ability of the model.
Patent Information
- Application Number
- CN202411664907.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-11-20
AI Technical Summary
Existing methods for predicting drug-target interactions suffer from inconsistent feature spatial distributions between drug molecules and target proteins after feature extraction, resulting in insufficient model accuracy and generalization.
A contrastive learning-based approach is adopted, which extracts the representation vectors of drugs and target proteins through graph neural networks and sequence encoders. The feature space is aligned by using multi-layer adaptive attention modules and contrastive learning loss, and query vector interaction and feature perturbation are combined to improve the accuracy and generalization ability of the model.
Effective alignment of the feature spaces of drugs and target proteins, ignoring noise and differences, improves the model's prediction accuracy and generalization ability.
Smart Images

Figure CN119601077B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computational biology, specifically designing an intelligent drug target recommendation method based on contrastive learning. Background Technology
[0002] Drug target interaction prediction aims to reveal potential interactions between drugs and target proteins, a crucial step in drug development. This prediction technique focuses on the interaction between specific proteins and drug compounds, providing important evidence for drug retargeting, multi-drug therapy strategy design, drug resistance analysis, and side effect assessment. Although traditional in vitro experiments can provide accurate biomedical data, their high cost, lengthy processes, and inefficiency in handling large-scale datasets limit their application. Therefore, with the rapid advancements in bioinformatics, computational biology, and drug discovery technologies, a large amount of biological experimental data is gradually accumulating in bioinformatics databases, and the focus of drug research is gradually shifting from traditional laboratory experiments to computational methods.
[0003] Currently, drug target interaction prediction methods are mainly divided into two categories: similarity-based methods and feature-based methods. Feature-based methods include two key modules: a feature extraction module and a downstream prediction module. The feature extraction module maps the target protein and drug molecule into a discriminative feature space. However, existing methods often overlook the problem that the original sequences of drug molecules and target proteins are different, leading to inconsistent feature space distributions after feature extraction. Furthermore, simply merging the feature vectors of both for interaction prediction may affect the accuracy of the model. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a drug target intelligent recommendation method based on contrastive learning, comprising:
[0005] Obtain information on the drug targets to be predicted, input it into the trained drug target recommendation model, and select drug targets with a predicted probability greater than the interaction threshold to recommend to the user.
[0006] The training process for the drug target recommendation model includes:
[0007] S1: Obtain drug target information, including the drug's SMILES sequence and the amino acid sequence of the target protein;
[0008] S2: Convert the drug's SMILES sequence into a molecular graph structure, and set an initial feature vector for each atom and chemical bond in the molecular graph based on its chemical properties; split the amino acid sequence of the target protein into overlapping ternary amino acid subsequences, and set a random vector as the initial feature vector for each subsequence;
[0009] S3: Extract the drug representation vector h using a drug encoder based on a graph neural network. d The target protein characterization vector h is extracted using a sequence-based target protein encoder. p ;
[0010] S4: Design a randomly initialized query vector h q A multi-layer adaptive attention module is used to implement the query vector h. q With drug characterization vector h d and target protein characterization vector h p The interaction was performed separately to obtain the vector H that combined the query vector and the drug characterization. d The query vector and the target protein characterization vector H interacted. p The query vector H interacts with both drug characterization and target protein characterization. q ;
[0011] S5: Use the matched drug target pairs as positive samples and utilize the interaction feature H. p and H d Calculate the contrastive learning loss, align the representation spaces of the drug and target protein, and add perturbation to the feature vector of each atom in the drug molecule diagram to improve the generalization ability of drug representation.
[0012] S6: Query Vector H q The linear layer outputs the matching probability of the drug target. The matching loss is calculated based on the known drug target matching labels and added to the contrastive learning loss as the final loss to update the model parameters, thus obtaining the trained drug target recommendation model.
[0013] The beneficial effects of this invention are:
[0014] This invention utilizes contrastive learning to calculate the contrastive loss between two separately trained drug target encoders, making the feature vectors of drug target pairs that can react closer, thereby aligning the feature spaces of drug molecules and target proteins, ignoring noise and differences specific to individual data, and retaining interaction information that is only beneficial to interaction prediction, further improving the accuracy and generalization of the model. Attached Figure Description
[0015] Figure 1 This is an overall flowchart of a drug target intelligent recommendation method based on contrastive learning according to the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Example 1: In this embodiment, the present invention provides a drug target intelligent recommendation method based on contrastive learning, such as... Figure 1 As shown, it includes:
[0018] Obtain the drug SMILES sequence and the amino acid sequence of the target protein to be predicted, input them into the trained drug target recommendation model, and select drug targets with a prediction probability greater than the interaction threshold to recommend to the user.
[0019] The training process for the drug target recommendation model includes:
[0020] S1: Obtain drug target information, including the drug's SMILES sequence and the amino acid sequence of the target protein;
[0021] S2: Convert the drug's SMILES sequence into a molecular graph structure, and set an initial feature vector for each atom and chemical bond in the molecular graph based on its chemical properties; split the amino acid sequence of the target protein into overlapping ternary amino acid subsequences, and set a random vector as the initial feature vector for each subsequence;
[0022] S3: Extract the drug representation vector h using a drug encoder based on a graph neural network. d The target protein characterization vector h is extracted using a sequence-based target protein encoder. p ;
[0023] S4: Design a learnable query vector h q The mask matrix that controls the attention mechanism is used to implement the query vector h. q With drug characterization vector h d and target protein characterization vector h p The interaction was performed separately to obtain the vector H that combined the query vector and the drug characterization. d The query vector and the target protein characterization vector H were interacted. p The query vector H interacts with both drug characterization and target protein characterization. q .
[0024] S5: Use the matched drug target pairs as positive samples and utilize the interaction feature H. p and H dCalculate the contrastive learning loss, align the representation spaces of the drug and target protein, and add perturbation to the feature vector of each atom in the drug molecule diagram to improve the generalization ability of drug representation.
[0025] S6: Query Vector H q The linear layer outputs the matching probability of the drug target. The matching loss is calculated based on the known drug target matching labels. This loss is added to the contrast loss to update the model parameters, resulting in a trained drug target recommendation model.
[0026] Drug representation vector h is extracted using a drug encoder based on a graph neural network. d The target protein characterization vector h is extracted using a sequence-based target protein encoder. p ,include:
[0027] Drug characterization vector h d The calculation formula is:
[0028] h d =concat({GnnEncoder(v):v∈D})
[0029] The calculation formula for the drug encoder GnnEncoder based on graph neural networks is as follows:
[0030]
[0031] Where D represents the set of atoms in the drug molecule, h 0 (u) represents the initial characteristic vector of atom u based on its chemical properties, N(v) represents the set of atoms adjacent to atom v, and W d The first trainable parameter matrix is represented by `concat()`, which concatenates the feature vectors. The drug characterization vector `h` is the first trainable parameter matrix. d The dimension is n×d, where n represents the number of atoms in the drug molecule and d represents the characteristic dimension of each atom;
[0032] Target protein characterization vector h p The calculation formula is:
[0033] h p =GnnEncoder(X)
[0034] The calculation formula for GnnEncoder is as follows:
[0035]
[0036] in, Here are the second and third trainable parameter matrices, b represents the trainable bias parameters, σ represents the sigmoid function, X represents the feature vector of the triplet subsequence in the initial amino acid sequence, and h represents the target protein vector. p The dimension is l×d, where l represents the length of the triplet subsequence in the amino acid sequence of the target protein. A learnable query vector h is designed. q The mask matrix that controls the attention mechanism is used to implement the query vector h. q With drug characterization vector h d and target protein characterization vector h p The distributions interact to obtain a vector H that combines the query vector and the drug representation. d The query vector and the target protein characterization vector H were interacted. p The query vector H interacts with both drug characterization and target protein characterization. q ,include:
[0037] S31: Set the randomly initialized query vector h q The dimension is n×d.
[0038] S32: Transfer the drug characterization vector h d With query vector h q The input mask strategy after concatenation is In the multi-layer adaptive attention module, the interactive feature vector H is obtained. d .
[0039] The input to the first layer adaptive attention module is: The dimension is (n+m)×d, and || represents the concatenation operation.
[0040] In this process, the calculation formula for each layer of the adaptive attention module is as follows:
[0041]
[0042] Among them, W0, W q W k W v Here are the trainable parameter matrices for the fourth, fifth, sixth, and seventh parameters, with dimensions d×d. This represents the feature vector of the drug molecule in the t-th layer. (First layer) At the last layer, T layer Where T = 6.
[0043] S33: Transform the target protein representation vector h p With query vector h q The input mask strategy after concatenation is In the multi-layer adaptive attention module, the interactive feature vector H is obtained. p .
[0044] The input to the first layer adaptive attention module is: The dimension is (m+l)×d, and || represents the concatenation operation.
[0045] In this process, the calculation formula for each layer of the adaptive attention module is as follows:
[0046]
[0047] This represents the feature vector of the target protein in layer t. (First layer) At the last layer, T layer
[0048]
[0049] S34: Combine the query vector with the drug characterization vector h. d and target protein characterization vector h p The input mask strategy after concatenation is M cross In the multi-layer adaptive attention module, the feature vector is obtained. and Extracting the portion belonging to the query vector yields the query vector H, which incorporates drug target characterization information. q .
[0050] In the eigenvector During the calculation process, the input of the first layer adaptive attention module is The dimension is (n+m)×d, and || represents the concatenation operation.
[0051] The calculation formula for each layer of the adaptive attention module is as follows:
[0052]
[0053] in This represents the drug molecule feature vector that interacts with the query vector at layer t. (First layer...) At the last layer, T layer
[0054] In the eigenvector During the calculation process, the input of the first layer adaptive attention module is The dimension is (m+l)×d, and || represents the concatenation operation.
[0055] The calculation formula for each layer of the adaptive attention module is as follows:
[0056]
[0057] in This represents the target protein feature vector that interacts with the query vector at layer t. (The first layer is...) At the last layer, T layer
[0058] mask and M cross The representation is as follows:
[0059]
[0060] Where i,j represent the elements in the i-th row and j-th column of the mask matrix, when the input data is the drug characterization vector h d and query vector h q When concatenating vectors, M self This allows h to be calculated during the attention process. d and h q Only perform correlation calculations with itself, while M cross This can make h d and h q Correlation calculations can be performed between them to obtain the interaction information between them.
[0061] Obtaining feature vectors and The representation information belonging to the query vector is given by the following formula:
[0062]
[0063] in, express The feature vectors from the nth position to the (n+m)th position of the vector. express The feature vector from the 1st position to the mth position of the vector, where α is a trainable parameter used to control... and The importance of.
[0064] Utilizing interaction features H p and H d Calculate the contrastive learning loss to align the representation spaces of the drug and target proteins, including:
[0065] S61: For each pair of input drug molecule d and target protein p, treat it as a positive sample pair;
[0066] S62: For each drug molecule d, randomly sample k constituent sets from all target protein data. For each target protein p, k constituent sets are randomly sampled from all drug molecule data. The formula for calculating the contrast loss is:
[0067]
[0068] in H represents the number of samples contained in a batch during model training. d (d) represents the representation vector of drug d, H p (p) represents the representation vector of drug p, τ is the temperature coefficient that controls the difference between positive and negative samples, and β is a trainable parameter that ranges from 0 to 1 and is used to balance the importance of drug contrast loss and target protein contrast loss.
[0069] Adding perturbations to the eigenvectors of each atom in the drug molecule diagram improves the generalization ability of drug characterization, including:
[0070] S71: Drug characterization vector h using all drug molecule data d Get the mean The dimension is n×d;
[0071] S72: Perturb each drug molecule d to obtain the representation vector h of drug molecule d. d (d) Similar, but with different fine-grained feature vectors The formula is:
[0072]
[0073] Where ||*||2 represents squaring a vector;
[0074] S73: In a training batch, the representation vector of drug molecule d and the perturbed representation vector are used as positive samples, and the loss is calculated by comparing them with other drug molecules as negative samples. The loss function formula is as follows:
[0075]
[0076] in This represents the set of drug molecules within a batch during the training process.
[0077] Query vector H q The matching probability of the drug target output after the linear layer is calculated using the following formula:
[0078]
[0079] Where σ represents the sigmoid activation function, W out These are the trainable parameters in the linear layer. This indicates the probability of a drug target match.
[0080] The matching loss is calculated based on known drug target matching labels, using the following formula:
[0081]
[0082] Where N represents the number of samples, y i Let represent the label of the i-th sample. This represents the probability that the model matches the drug target output for the i-th sample.
[0083] The final loss calculation formula is:
[0084]
[0085] The system acquires information on the drug molecules and target proteins to be predicted, inputs them into the trained model, obtains the interaction prediction probability of the drug targets, and selects drug targets with interaction probabilities greater than the interaction threshold to recommend to the user; preferentially, the interaction threshold is set to 0.65.
[0086] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A drug target intelligent recommendation method based on contrastive learning, characterized in that, include: Obtain information on the drug targets to be predicted, input it into the trained drug target recommendation model, and select drug targets with a predicted probability greater than the interaction threshold to recommend to the user. The training process for the drug target recommendation model includes: S1: Obtain drug target information, including the drug's SMILES sequence and the amino acid sequence of the target protein; S2: Convert the drug's SMILES sequence into a molecular graph structure, and set an initial feature vector for each atom and chemical bond in the molecular graph based on its chemical properties; split the amino acid sequence of the target protein into overlapping ternary amino acid subsequences, and set a random vector as the initial feature vector for each subsequence; S3: Extract the drug representation vector h using a drug encoder based on a graph neural network. d The target protein characterization vector h is extracted using a sequence-based target protein encoder. p ; Drug representation vector h is extracted using a drug encoder based on a graph neural network. d The target protein characterization vector h is extracted using a sequence-based target protein encoder. p ,include: Drug characterization vector h d The calculation formula is: h d =concat({GnnEncoder(v):v∈D}) The calculation formula for the drug encoder GnnEncoder based on graph neural networks is as follows: Where D represents the set of atoms in the drug molecule, h 0 (u) represents the initial characteristic vector of atom u based on its chemical properties, N(v) represents the set of atoms adjacent to atom v, and W d The first trainable parameter matrix is represented by `concat()`, which concatenates the feature vectors. The drug characterization vector `h` is the first trainable parameter matrix. d The dimension is n×d, where n represents the number of atoms in the drug molecule and d represents the characteristic dimension of each atom; Target protein characterization vector h p The calculation formula is: h p =GnnEncoder(X) The calculation formula for GnnEncoder is as follows: in, Here are the second and third trainable parameter matrices, b represents the trainable bias parameters, σ represents the sigmoid function, X represents the feature vector of the triplet subsequence in the initial amino acid sequence, and h represents the target protein vector. p The dimension is l×d, where l represents the length of the triplet subsequence in the amino acid sequence of the target protein; S4: Design a random initialization query vector h q A multi-layer adaptive attention module is used to implement the query vector h. q With drug characterization vector h d and target protein characterization vector h p The interaction was performed separately to obtain the vector H that combined the query vector and the drug characterization. d The query vector and the target protein characterization vector H interacted. p The query vector H interacts with both drug characterization and target protein characterization. q ,include: S41: Set the random initialization query vector h q The dimension is m×d, where m represents the query vector h. q The characteristic length, d represents h q Feature dimensions; S42: Transfer the drug characterization vector h d With query vector h q The input mask strategy after concatenation is In the multi-layer adaptive attention module, the interactive feature vector H is obtained. d ; The input to the first layer adaptive attention module is: The dimension is (n+m)×d, || represents the splicing operation, where n represents the number of atoms in the drug molecule; S43: Transform the target protein representation vector h p With query vector h q The input mask strategy after concatenation is In the multi-layer adaptive attention module, the interactive feature vector H is obtained. p ; The input to the first layer adaptive attention module is: The dimension is (m+l)×d, and || represents the concatenation operation; S44: Transfer the query vector h q and the drug characterization vector h respectively d and target protein characterization vector h p The input mask strategy after concatenation is M cross In the multi-layer adaptive attention module, the feature vector is obtained. and Extracting the portion belonging to the query vector yields the query vector H, which incorporates drug target characterization information. q ; From the feature vector and Extracting the portion belonging to the query vector yields the query vector H, which incorporates drug target characterization information. q ,include: in, express The feature vectors from the nth position to the (n+m)th position of the vector. express The eigenvectors from the first position to the m-th position of the vector, where α represents the control vector. and An important trainable parameter; S5: Use the matched drug target pairs as positive samples and utilize the interaction feature H. p and H d Calculate the contrastive learning loss, align the representation spaces of the drug and target protein, and add perturbation to the feature vector of each atom in the drug molecule diagram to improve the generalization ability of drug representation. Matched drug target pairs are used as positive samples, and the interaction feature H is utilized. p and H d Calculate the contrastive learning loss to align the representation spaces of the drug and target proteins, including: S5-11: For each pair of input drug molecule d and target protein p, treat it as a positive sample pair; S5-12: For each drug molecule d, randomly sample k constituent sets from all target protein data. For each target protein p, k constituent sets are randomly sampled from all drug molecule data. S5-13: In the set In the middle, using the interaction feature H p and H d Calculate the contrastive learning loss to align the characterization spaces of the drug and the target protein; Adding perturbations to the eigenvectors of each atom in the drug molecule diagram improves the generalization ability of drug characterization, including: S5-21: Drug characterization vector h using all drug molecule data d Get the mean The dimension is n×d; S5-22: Perturb each drug molecule d to obtain the representation vector h of drug molecule d. d (d) Similar feature vectors but with different fine-grained features S5-23: In a training batch, the drug molecule d representation vector and the perturbed feature vector... As positive samples, they are compared with other drug molecules as negative samples to calculate the contrast loss, thereby enhancing the generalization ability of drug molecule feature representation. Perturb each drug molecule d to obtain the representation vector h of drug molecule d. d (d) Similar feature vectors but with different fine-grained features include: Among them, h d (d) represents the representation vector of drug d, ||*||2 represents the square of the vector, and ε represents a trainable parameter used to control the degree of perturbation, ranging from 0 to 1. This represents the mean of the drug characterization vectors for all drug molecule data; S6: Query Vector H q The linear layer outputs the matching probability of the drug target. The matching loss is calculated based on the known drug target matching labels and added to the contrastive learning loss as the final loss to update the model parameters, thus obtaining the trained drug target recommendation model.
2. The intelligent drug target recommendation method based on contrastive learning according to claim 1, characterized in that, The masking strategy Masking strategy Masking strategy M cross ,include: Where i,j represent the elements in the i-th row and j-th column of the mask matrix; by modifying the mask in the attention calculation, different data interaction modes can be achieved: when the input data is a drug representation vector h d and query vector h q When concatenating vectors, M self This allows h to be calculated during the attention process. d and h q Only perform correlation calculations with itself, while M cross This can make h d and h q Correlation calculations can be performed between them to obtain the interaction information between them.
3. The intelligent drug target recommendation method based on contrastive learning according to claim 1, characterized in that, In the set In the middle, using the interaction feature H p and H d Calculate the contrastive learning loss, which includes: in, This represents the contrast loss for positive sample pairs. H represents the number of samples contained in a batch during model training. d (d) represents the representation vector of drug d, H p (p) represents the representation vector of the target protein p, τ represents the temperature coefficient controlling the difference between positive and negative samples, β represents a trainable parameter used to balance the importance of drug contrast loss and target protein contrast loss, with a value between 0 and 1, exp represents the exponential function, and H p (s) represents the representation vector of the target protein s, H d (t) represents the representation vector of drug t, and log represents the logarithmic function.
4. The intelligent drug target recommendation method based on contrastive learning according to claim 1, characterized in that, In a training batch, the drug molecule d representation vector and the perturbed feature vector are... As positive samples, the contrast loss is calculated with other drug molecules as negative samples, including: in, This represents the contrast loss for negative samples. Let β represent the set of drug molecules within a batch during training, β represent a trainable parameter used to assess the comparative loss importance of drug molecules, ranging from 0 to 1, exp represent the exponential function, log represent the logarithmic function, and h represent the weight of the drug molecules. d (d) represents the characterization vector of drug d, and τ represents the temperature coefficient controlling the difference between positive and negative samples. Indicates drug The perturbated eigenvectors.
Citation Information
Patent Citations
Drug-target interaction prediction method based on neighbor attention network
CN113421658A
Medical image report automatic generation method based on memory ability learning
CN116364227A