Method and system for predicting drug interaction based on graph neural network and multiple attention mechanisms

By using graph neural network and multiple attention mechanisms in drug interaction prediction, the self-attention characteristics and interaction characteristics of drugs are extracted, and the problem that existing methods fail to effectively consider the importance and interaction of drug substructure is achieved, achieving higher prediction accuracy.

CN119560178AActive Publication Date: 2025-03-04HUNAN UNIV OF CHINESE MEDICINE

Patent Information

Application Number
CN202411264351.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-03-04
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

Existing drug interaction prediction methods fail to effectively consider the importance of the drug's own substructure and the degree of effect of the drug on each other, resulting in unsatisfactory prediction results.

Method used

Using a graph neural network and multiple attention mechanism method, self-attention and interaction characteristics are extracted from the SMILES sequence of the drug through self-attention mechanism encoder and interactive attention mechanism encoder, and prediction is carried out in combination with a multi-layer perception machine.

Benefits of technology

The accuracy of drug interaction prediction is improved, and by combining self-attention and interactive attention mechanisms, the interaction patterns between drugs are more accurately captured, achieving better prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119560178A_ABST
    Figure CN119560178A_ABST
Patent Text Reader

Abstract

The invention discloses a drug interaction prediction method and system based on a graph neural network and multiple attention mechanisms. The method comprises the following steps: converting an SMILES sequence of a drug pair into graph data, and obtaining an embedding matrix of the drug pair by utilizing a multi-layer GIN operation; extracting a self-attention feature matrix of the drug pair from the embedding matrix of the drug through a self-attention mechanism encoder, calculating a cosine similarity matrix of the drug pair, and obtaining a self-attention feature vector of the drug pair after leveling operation; processing the embedded matrix of the drug pair through an interactive attention mechanism encoder to obtain a feature matrix with interactive attention coefficients, performing average pooling operation on the interactive attention coefficient feature matrixes of the two drugs, and then performing standardization to obtain an interactive feature vector of the drug pair; and carrying out splicing operation on the self-attention feature vectors and the interaction feature vectors of the drug pairs, and inputting a multi-layer perceptron to predict the interaction between the drug pairs. According to the invention, the interaction between drugs can be better predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning and drug efficacy prediction, and in particular to a drug interaction prediction method and system based on graph neural network and multiple attention mechanisms. Background Art

[0002] Drug interactions refer to the interaction between two or more drugs when used at the same time, which may lead to enhanced or weakened drug efficacy or even serious adverse reactions. Such interactions may have a significant impact on patient safety and treatment outcomes. Adverse drug reactions are a common problem in medical practice. According to the World Health Organization, it is one of the important causes of hospitalization and medical complications. In some cases, drug interactions may lead to unexpected toxic reactions, which is particularly common in elderly patients who use multiple drugs to treat multiple diseases such as hypertension, diabetes or heart disease. Adverse drug effects are a major risk in the drug development process and may lead to the withdrawal of marketed drugs. Historically, many drugs have been forced to withdraw from the market due to the discovery of serious adverse reactions after listing, which not only caused huge economic losses but also affected patient trust. Therefore, developing effective methods to predict drug interactions and identify possible adverse drug reactions in advance is the key to improving drug safety and effectiveness.

[0003] In traditional prediction methods, drug interactions are directly conducted through in vitro simulation environments or animal experiments, which have disadvantages such as special experimental environment requirements, complex operations, long experimental cycles and high costs. Therefore, it is necessary to design an efficient and accurate calculation method that can provide guidance for biological experiments, making the prediction of drug interactions more efficient.

[0004] For example, the CSGNN published by Zhao et al. in "IJCAI 2021" injected a hybrid jump neighborhood aggregator into the GNN to capture high-order dependencies in the drug interaction network, and used contrastive self-supervised learning tasks as regularizers. It is a drug interaction prediction method. DeepDDS proposed by Wang et al. in "Bionformatics" in 2022 is a deep learning model based on GNN and attention mechanism for identifying synergistic drug combinations and drug interaction prediction methods. DSN-DDI proposed by Li et al. in "Bionformaitcs" in 2023 is a dual-view drug representation learning network that can simultaneously learn drug interaction prediction methods for drug substructures from single drugs and drug pairs. MIRACLE, which was disclosed by Wang et al. in "In Proceedings of the Web Conference 2021" in 2021, is a drug interaction prediction method.

[0005] Although the above methods are effective in studying drug interactions, there are still many shortcomings. On the one hand, some methods do not consider the importance of the substructures of the drugs themselves; on the other hand, some methods do not study the degree of interaction between the substructures of the drugs. This ultimately leads to unsatisfactory prediction results. Summary of the invention

[0006] The purpose of the present invention is to provide a drug interaction prediction method and system based on graph neural network and multiple attention mechanism, so as to solve the technical problem that the existing research on drug interaction does not consider the importance of the substructures of the drugs themselves and the degree of effect of the drugs on each other's substructures, resulting in unsatisfactory prediction results.

[0007] To achieve the above object, the present invention provides a drug interaction prediction method based on graph neural network and multiple attention mechanism, comprising the following steps:

[0008] The SMILES sequence of drug pairs is converted into graph data, and the embedding matrix of drugs is obtained by multi-layer GIN operation;

[0009] The self-attention feature matrix of drug pairs is extracted from the drug embedding matrix through the self-attention mechanism encoder (GSAT), the cosine similarity matrix of drug pairs is calculated, and the self-attention feature vector of drug pairs is obtained after flattening operation;

[0010] The embedding matrix of the drug pair is processed through the interactive attention mechanism encoder (GIAT) to obtain the feature matrix with interactive attention coefficients. The interactive attention coefficient feature matrix is ​​averaged and then normalized to obtain the interactive feature vector of the drug pair.

[0011] The self-attention feature vector and interaction feature vector of the drug pair are concatenated and input into the multi-layer perceptron to predict the interaction between the drug pairs.

[0012] As a further improvement of the method of the present invention:

[0013] Preferably, before using the multi-layer GIN operation, the node dimension of the drug is converted to 60 using a Linear layer.

[0014] Preferably, the multi-layer GIN operation includes: using GIN to aggregate the information of the neighbor nodes of the drug atoms through the multi-layer GIN to obtain the embedding matrix of the drug pair The calculation method is:

[0015] The GNN aggregates neighbor node features as follows:

[0016]

[0017] The specific calculation method of GIN is as follows. The way to aggregate the features of layer l+1 is:

[0018]

[0019] The formula for GIN update feature method is as follows:

[0020]

[0021] FC (k) (h) = hW (k) +b (k)

[0022] in, is the updated hidden state of node ν at layer l+1; is a function that accepts the current hidden state and the aggregated message; is the hidden state of node ν in layer l; is a function that aggregates messages from the neighborhood; is the neighbor set of node ν; represents a pair consisting of the hidden state of node ν and its neighbor node u at layer l; represents the application of a multi-layer perceptron (MLP) to the input h; Represents the activation functions of each layer in MLP; represents the calculation result of the fully connected layer (Fully Connected Layer) on the input h at the kth layer; h represents the input vector; represents the weight matrix of the kth layer; Bias vector for the kth layer.

[0023] Preferably, the self-attention feature matrix of the drug pair is extracted from the embedding matrix of the drug through the self-attention mechanism encoder, including: obtaining the key and value of a single drug, calculating the self-attention score between the drug's own substructures using the Transformer method, and the embedding matrix of the drug pair Get the self-attention feature matrix:

[0024] For individual drugs, first use W K and W V For input Transform to get the key (K) and value (V) matrices, use the to_dense_batch function to process the keys and values, convert them into dense batch format, and generate masks to handle the different sizes of different batches. The processing method is:

[0025] Q=Q 0 W Q ,K=K0 W K ,V=V 0 W V

[0026] To calculate the attention score, we use the dot product of the query (Q) and the key (K) and adjust the score using the softmax function. The calculation method is:

[0027]

[0028] Multiply the obtained attention coefficient matrix A by the original feature matrix X to obtain the self-attention feature matrix;

[0029] The ReLU function is used for nonlinear transformation, and the calculation process is as follows:

[0030] O = ReLU((Q+AV)W 0 )

[0031] Where Q, K, and V represent query, key, and value, respectively; d represents the embedding dimension; the function ReLU() represents the rectified linear unit activation function; W Q , W K , W V and W 0 Represents the learnable weights.

[0032] Preferably, the cosine similarity matrix of the drug pair is calculated, and the self-attention feature vector of the drug pair is obtained after flattening operation. The calculation formula is as follows:

[0033]

[0034] H1=flatten(S ij )

[0035] Among them, when the feature embedding matrix of the drug pair is x 1 and x 2 When the feature embedding matrix x 1 and x 2 ,in is the representative vector of the ith drug 1, is the jth representative vector of drug 2, H1 is the self-attention feature vector of the drug pair, S ij is the cosine similarity matrix of drug pairs.

[0036] Preferably, the embedding matrix of the drug pair is processed by an interactive attention mechanism encoder to obtain a feature matrix with interactive attention coefficients, including:

[0037] Get the keys and values ​​of the two drug matrices, calculate the interactive attention score between one drug and another drug substructure, multiply it by the original feature matrix X of the drug, and get the interactive attention coefficient feature matrix:

[0038] The feature embedding matrix x of drug pairs 1 and x 2 Through different weight matrices W K and W V is converted into key (K) and value (V) vectors, calculated as:

[0039] K 1 =W K (x 1 ),V 1 =W V (x 1 )

[0040] K 2 =W K (x 2 ),V 2 =W V (x 2 )

[0041] Use the to_dense_batch function to process the K and V of the two drugs, convert them into dense batch format, and generate masks to handle the different sizes of different batches. Use to calculate the interaction attention score, use the dot product of the query (Q) and the key (K), and apply the softmax function to adjust the score. The calculation method for a specific drug pair is:

[0042]

[0043] The obtained interactive attention coefficient feature matrix is ​​multiplied element by element with the embedding matrix of the drug pair. The process can be summarized as follows: The calculation method is:

[0044] O 1 =ReLU(W O ((Q 1 +A 1 V 2 ))),O 2 =ReLU(W O ((Q 2 +A 2 V 1 )))

[0045] The obtained interactive attention coefficient feature matrix O 1 and O 2 .

[0046] Preferably, the feature matrices of the two drugs are averaged and pooled and then normalized to obtain the interactive feature vector of the drug pair, including the following steps:

[0047] The interactive attention coefficient feature matrix O obtained by the interactive attention mechanism 1 and O 2 , respectively, perform average pooling operations and then perform standardization operations. First, calculate the mean μ1 and μ2. The calculation formula is as follows:

[0048] μ 1 =mean(O 1 ,1),μ 2 =mean(O 2 ,1)

[0049] Calculate the mean and standard deviation of each drug pair: mean1, std1, mean2 and std2. The calculation formula is as follows:

[0050] mean1=mean(μ 1 ,1,keepdim=True),std1=std(μ 1 ,1,keepdim=True)

[0051] mean2=mean(μ 2 ,1,keepdim=True),std2=std(μ 2 ,1,keepdim=True)

[0052] Finally, after standardization, the interaction feature vectors inter1 and inter2 of the drug pair are obtained, and the calculation formula is as follows:

[0053]

[0054] Among them, inter1 and inter2 represent the interaction vectors of different drugs; mean1 and mean2 represent μ 1 and μ 2 The average value; std1 and std2 represent μ 1 and μ 2 The standard deviation of .

[0055] Preferably, the self-attention feature vector and the interaction feature vector of the drug pair are concatenated and input into a multi-layer perceptron to predict the interaction between the drug pairs. The calculation method is as follows:

[0056] y=MLP([inter 1 ||inter 2 ||H1])

[0057] Among them, H1 is the self-attention feature vector of the drug pair, and inter1 and inter2 are the interaction feature vectors of the drug pair.

[0058] Preferably, the multilayer perceptron uses the cross entropy loss function as the loss function of the model:

[0059]

[0060] Among them, y i is the output of the i-th drug pair; y′ i ∈{0,1} is the label of the i-th drug pair; σ(·) is the sigmoid function, and n is the number of drug pairs.

[0061] As a general technical concept, the present invention also provides a drug interaction prediction system based on graph neural network and multiple attention mechanisms, including:

[0062] The GNN encoder module is used to convert the SMILES sequence of drug pairs into graph data and obtain the embedding matrix of drug pairs using multi-layer GIN operations;

[0063] The self-attention mechanism encoder is used to extract the self-attention feature matrix of the drug pair from the drug embedding matrix, calculate the cosine similarity matrix of the drug pair, and obtain the self-attention feature vector of the drug pair after flattening operation;

[0064] The interactive attention mechanism encoder is used to process the embedding matrix of the drug pair, obtain the feature matrix with interactive attention coefficient, perform average pooling operation on the interactive attention coefficient feature matrix of the two drugs respectively, and then normalize them to obtain the interactive feature vector of the drug pair;

[0065] The splicing prediction module splices the self-attention feature vector and interaction feature vector of the drug pair and inputs them into the multi-layer perceptron to predict the interaction between the drug pairs.

[0066] The present invention has the following beneficial effects:

[0067] The present invention's drug interaction prediction method and system based on graph neural network and multiple attention mechanisms applies Transformer to drug interaction prediction, improves the accuracy relative to the traditional method using GNN architecture, uses self-attention and cross-attention mechanisms, and in the drug interaction prediction task, distributes attention to a partial area around the sampling point rather than the whole, thereby improving the efficiency of model training. Simply using the self-attention mechanism or the inter-crossattention mechanism has some shortcomings in the drug interaction prediction task. The present invention combines the two, uses the self-attention mechanism encoder (GSAT) and the cross-attention mechanism encoder (GIAT) to obtain drug features, which are used to better predict the interaction between drugs, thereby achieving a better prediction effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0069] Figure 1 It is a flowchart of a drug interaction prediction method based on graph neural network and multiple attention mechanisms according to a preferred embodiment of the present invention;

[0070] Figure 2 It is a schematic diagram of the structure of a drug interaction prediction device based on graph neural network and multiple attention mechanism according to a preferred embodiment of the present invention;

[0071] Figure 3 It is a structural schematic diagram of a self-attention mechanism encoder (GSAT) based on a graph neural network and a multi-attention mechanism drug interaction prediction method according to a preferred embodiment of the present invention;

[0072] Figure 4 It is a structural diagram of the interactive attention mechanism encoder (GIAT) of the drug interaction prediction method based on graph neural network and multiple attention mechanisms in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0073] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.

[0074] See also Figure 1 The drug interaction prediction method based on graph neural network and multiple attention mechanism of the embodiment of the present invention comprises the following steps:

[0075] S1: Convert the SMILES sequence of drug pairs into graph data (RDKit is used in the implementation), and use multi-layer GIN operation to obtain the embedding matrix of the drug. In the implementation, before using the multi-layer GIN operation, the node dimension of the drug is first converted to 60 using the Linear layer.

[0076] During implementation, the multi-layer GIN operation includes: using GIN to aggregate the information of the neighbor nodes of the drug atoms through the multi-layer GIN to obtain the embedding matrix of the drug pair The calculation method is:

[0077] The GNN aggregates neighbor node features as follows:

[0078]

[0079] The specific calculation method of GIN is as follows. The way to aggregate the features of layer l+1 is:

[0080]

[0081] The formula for GIN update feature method is as follows:

[0082] MLP(h)=f (K) (f (K-1) (…f (1) (h)…))

[0083] f (k) (h) = ReLU(BN (k) (FC (k) (h)))

[0084] FC (k) (h) = hW (k) +b (k)

[0085] in, is the updated hidden state of node ν at layer l+1; is a function that accepts the current hidden state and the aggregated message; is the hidden state of node ν in layer l; is a function that aggregates messages from the neighborhood; is the neighbor set of node ν; represents a pair consisting of the hidden state of node ν and its neighbor node u at layer l; represents the application of a multi-layer perceptron (MLP) to the input h; Represents the activation functions of each layer in MLP; represents the calculation result of the fully connected layer (Fully Connected Layer) on the input h at the kth layer; h represents the input vector; represents the weight matrix of the kth layer; Bias vector for the kth layer.

[0086] S2A: The self-attention feature matrix of drug pairs is extracted from the drug embedding matrix through the self-attention mechanism encoder (GSAT), the cosine similarity matrix of drug pairs is calculated, and the self-attention feature vector of drug pairs is obtained after flattening operation.

[0087] During implementation, the self-attention feature matrix of drug pairs is extracted from the drug embedding matrix through the self-attention mechanism encoder, including: obtaining the key and value of a single drug, using the Transformer method to calculate the self-attention score between the drug's own substructures, and the embedding matrix of drug pairs. Get the self-attention feature matrix:

[0088] For individual drugs, first use W K and W V For input Transform to get the key (K) and value (V) matrices, use the to_dense_batch function to process the keys and values, convert them into dense batch format, and generate masks to handle the different sizes of different batches. The processing method is:

[0089] Q=Q 0 W Q ,K=K 0 W K ,V=V 0 W V

[0090] The attention score is calculated using the dot product of the query (Q) and the key (K), and the score is adjusted using the softmax function to better predict the interactions between drugs. The calculation method is:

[0091]

[0092] Multiply the obtained attention coefficient matrix A by the original feature matrix X to obtain the self-attention feature matrix;

[0093] The ReLU function is used for nonlinear transformation, and the calculation process is as follows:

[0094] O = ReLU((Q+AV)W 0 )

[0095] Where Q, K, and V represent query, key, and value, respectively; d represents the embedding dimension; the function ReLU() represents the rectified linear unit activation function; W Q , W K , W V and W 0 Represents the learnable weights.

[0096] During implementation, the cosine similarity matrix of the drug pair is calculated, and the self-attention feature vector of the drug pair is obtained after flattening to better predict drug interactions. The calculation formula is as follows:

[0097]

[0098] H1=flatten(S ij )

[0099] Among them, when the feature embedding matrix of the drug pair is x 1 and x 2 When the feature embedding matrix x 1 and x 2 ,in is the representative vector of the ith drug 1, is the jth representative vector of drug 2, H1 is the self-attention feature vector of the drug pair, S ij is the cosine similarity matrix of drug pairs.

[0100] S2B: See Figure 3 , the embedding matrix of the drug pair is processed by the interactive attention mechanism encoder (GIAT) to obtain the feature matrix with interactive attention coefficients. The feature matrices of the two drugs are averaged and pooled respectively and then normalized to obtain the interactive feature vector of the drug pair.

[0101] During implementation, the embedding matrix of the drug pair is processed through the interactive attention mechanism encoder to obtain a feature matrix with interactive attention coefficients, including:

[0102] Get the keys and values ​​of the two drug matrices, calculate the interactive attention score between one drug and another drug substructure, multiply it by the original feature matrix X of the drug, and get the interactive attention coefficient feature matrix:

[0103] The feature embedding matrix x of drug pairs 1 and x 2 Through different weight matrices W K and W V is converted into key (K) and value (V) vectors, calculated as:

[0104] K 1 =W K (x 1 ),V1 =W V (x 1 )

[0105] K 2 =W K (x 2 ),V 2 =W V (x 2 )

[0106] Use the to_dense_batch function to process the K and V of the two drugs, convert them into dense batch format, and generate masks to handle the different sizes of different batches. Use to calculate the inter-crossattention score, use the dot product of the query (Q) and the key (K), and apply the softmax function to adjust the score. The calculation method for a specific drug pair is:

[0107]

[0108] The obtained interactive attention coefficient feature matrix is ​​multiplied element by element with the embedding matrix of the drug pair. The process can be summarized as follows: The calculation method is:

[0109] O 1 =ReLU(W O ((Q 1 +A 1 V 2 ))),O 2 =ReLU(W O ((Q 2 +A 2 V 1 )))

[0110] The obtained interactive attention coefficient feature matrix O 1 and O 2 .

[0111] During implementation, the feature matrices of the two drugs are averaged and pooled and then normalized to obtain the interaction feature vector of the drug pair, including the following steps:

[0112] The interactive attention coefficient feature matrix O obtained by the interactive attention mechanism 1 and O 2 , respectively, perform average pooling operations and then perform standardization operations. First, calculate the mean μ1 and μ2. The calculation formula is as follows:

[0113] μ 1 =mean(O 1 ,1),μ 2 =mean(O2 ,1)

[0114] Calculate the mean and standard deviation of each drug pair: mean1, std1, mean2 and std2. The calculation formula is as follows:

[0115] mean1=mean(μ 1 ,1,keepdim=True),std1=std(μ 1 ,1,keepdim=True)

[0116] mean2=mean(μ 2 ,1,keepdim=True),std2=std(μ 2 ,1,keepdim=True)

[0117] Finally, after standardization, the interaction feature vectors inter1 and inter2 of the drug pair are obtained, and the calculation formula is as follows:

[0118]

[0119] Among them, inter1 and inter2 represent the interaction vectors of different drugs; mean1 and mean2 represent μ 1 and μ 2 The average value; std1 and std2 represent μ 1 and μ 2 The standard deviation of .

[0120] S3: See Figure 4 , the self-attention feature vector and interaction feature vector of the drug pair are concatenated and input into the multi-layer perceptron to predict the interaction between drug pairs.

[0121] During implementation, the self-attention feature vector and interaction feature vector of the drug pair are concatenated and input into the multi-layer perceptron to predict the interaction between the drug pairs. The calculation method is as follows:

[0122] y=MLP([inter 1 ||inter 2 ||H1])

[0123] Among them, H1 is the self-attention feature vector of the drug pair, and inter1 and inter2 are the interaction feature vectors of the drug pair.

[0124] When implemented, the multilayer perceptron uses the cross entropy loss function as the loss function of the model:

[0125]

[0126] Among them, y i is the output of the i-th drug pair; y′ i ∈{0,1} is the label of the i-th drug pair; σ(·) is the sigmoid function, and n is the number of drug pairs.

[0127] By using a multi-layer perceptron, we can better learn the interaction patterns between drugs, thereby better predicting the interactions between drugs.

[0128] See also Figure 2 , an embodiment of the present invention further provides a drug interaction prediction system based on graph neural network and multiple attention mechanism, comprising:

[0129] The GNN encoder module is used to convert the SMILES sequence of drug pairs into graph data and obtain the embedding matrix of drug pairs using multi-layer GIN operations;

[0130] The self-attention mechanism encoder is used to extract the self-attention feature matrix of the drug pair from the drug embedding matrix, calculate the cosine similarity matrix of the drug pair, and obtain the self-attention feature vector of the drug pair after flattening operation;

[0131] The interactive attention mechanism encoder is used to process the embedding matrix of the drug pair, obtain the feature matrix with interactive attention coefficient, perform average pooling operation on the interactive attention coefficient feature matrix of the two drugs respectively, and then normalize them to obtain the interactive feature vector of the drug pair;

[0132] The splicing prediction module splices the self-attention feature vector and interaction feature vector of the drug pair and inputs them into the multi-layer perceptron to predict the interaction between the drug pairs.

[0133] Effect verification:

[0134] Table 1 shows the experimental results of MSDAFL and other baseline methods on multiple datasets. In the comparative experiments, ten state-of-the-art methods are compared: MR-GNN, GCN-BMP, EPGCN-DS, DeepDruga, SSI-DDI, CSGNN, DeepDDS, DSN-DDI and HTCL. Among them: Mr-GNNXu et al. (2019) adopts a multi-resolution architecture to capture the local features of each graph and extracts the interaction features between pairs of graphs. GCN-BMP Chen et al. (2020) uses GNN for DDI prediction by using an end-to-end graph representation learning framework. EPGCN-DS Sun et al. (2020) uses an encoder with an expressive GCN layer and a decoder that outputs DDI probabilities to detect DDI from molecular structures. DeepDrug Cao et al. (2020) uses residual graph convolutional networks (RGCNs) and convolutional networks (CNNs) to improve the accuracy of DDI prediction. Miracle, Wang et al. (2021) provide a multi-view framework to simultaneously capture the molecular structure and drug-drug interactions (DDIs) between molecules. SSI-DDI Nyamabo et al. (2021) deconstruct the DDI prediction task between two drugs to determine the pairwise interactions between their respective substructures. CSGNN Zhao et al. (2021) incorporate a hybrid hop-neighborhood aggregator into a GNN to capture high-order dependencies in the DDI network and utilize a contrastive self-supervised learning task as a regularizer. DeepDDS Wang et al. (2022) is a deep learning model that uses GNNs and an attention mechanism to identify synergistic drug combinations. DSN-DDI Li et al. (2023) is a two-view drug representation learning network designed to simultaneously learn the substructure of drugs from individual drugs and drug pairs. HTCL-DDI Zhang et al. (2023) is a hierarchical three-view contrastive learning framework for predicting drug-drug interactions.

[0135] To evaluate the scalability and robustness of MSDAFL, the proposed model was tested on three public datasets of different sizes and densities. The size of the dataset is determined by the number of drugs included. The observed DDIs were taken as positive samples, and the non-existent DDIs were randomly sampled to generate negative samples. A stratified split was performed to divide all drug pairs into training, validation, and test sets in a ratio of 6:2:2. Experiments were performed on three random folds. As shown in Supplementary Table 1, the statistics of the preprocessed datasets are as follows: The Zhang DDI dataset Zhang et al. (2017) is small in size, consisting of 544 drugs and 45,720 pairs of DDIs. The ChCh-Miner dataset Ma et al. (2018) is medium in size, consisting of 997 drugs and 21,486 pairs of DDIs. The DeepDDI dataset Gilmer et al. (2017) is large in size, consisting of 1,704 drugs and 191,870 pairs of DDIs.

[0136] Table 1 Experimental results of MSDAFL and other baseline methods on multiple datasets

[0137]

[0138] As can be seen from Table 1, the MSDAFL of the present invention consistently shows superior performance on multiple evaluation metrics and datasets. In the Zhang DDI dataset, HTCL-DDI achieves excellent results in AP and F1 metrics by exploiting different view relationships and integrating multi-view features for DDI prediction. On the ChCh-Miner and DeepDDI datasets, MSDAL shows significant improvements over HTCL. For example, on DeepDDI, MSDAFL improves AUROC by about 5% and ACC by about 6%. SSI-DDI deconstructs the DDI prediction task between drug pairs to identify pairwise interactions between their respective substructures.

[0139] In summary, the drug interaction prediction method and system based on graph neural network and multiple attention mechanisms of the present invention applies Transformer to drug interaction prediction, improves the accuracy relative to the traditional method using GNN architecture, uses self-attention and inter-crossattention mechanisms, and distributes attention to partial areas around the sampling points rather than the whole in the drug interaction prediction task, thereby improving the efficiency of model training. Simply using the self-attention mechanism or the inter-cross attention mechanism has some shortcomings in the drug interaction prediction task. The present invention combines the two, uses the self-attention mechanism encoder (GSAT) and the inter-attention mechanism encoder (GIAT) to obtain drug features, which are used to better predict the interaction between drugs, thereby achieving a better prediction effect.

[0140] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A drug interaction prediction method based on graph neural network and multiple attention mechanism, characterized in that: The following steps are involved: The SMILES sequence of drug pairs is converted into graph data, and the embedding matrix of drug pairs is obtained by multi-layer GIN operation; The self-attention feature matrix of the drug pair is extracted from the drug embedding matrix through the self-attention mechanism encoder, the cosine similarity matrix of the drug pair is calculated, and the self-attention feature vector of the drug pair is obtained after flattening operation; The embedding matrix of the drug pair is processed by the interactive attention mechanism encoder to obtain a feature matrix with interactive attention coefficients. The interactive attention coefficient feature matrices of the two drugs are averaged and pooled and then normalized to obtain the interactive feature vector of the drug pair. The self-attention feature vector and interaction feature vector of the drug pair are concatenated and input into the multi-layer perceptron to predict the interaction between the drug pairs.

2. The prediction method according to claim 1, characterized in that: Before using the multi-layer GIN operation, the node dimension of the drug is converted to 60 using the Linear layer.

3. The prediction method according to claim 1 or 2, characterized in that: The multi-layer GIN operation includes: using GIN to aggregate the information of the neighbor nodes of the drug atoms through the multi-layer GIN to obtain the embedding matrix of the drug pair The calculation method is: The GNN aggregates neighbor node features as follows: The specific calculation method of GIN is as follows. The way to aggregate the features of layer l+1 is: The formula for GIN update feature method is as follows: MLP(h)=f (K) (f (K-1) (...f (1) (h)...)) f (k) (h)=ReLU(BN (k) (FC (k) (h))) FC (k) (h)=hW (k) +b (k) in, is the updated hidden state of node ν at layer l+1; γ (l+1) is a function that accepts the current hidden state and the aggregated message; is the hidden state of node ν in layer l; φ (l+1) is a function that aggregates messages from the neighborhood; N(v) is the set of neighbors of node ν; represents a pair consisting of the hidden state of node ν and its neighbor node u at layer l; MLP(h) represents the application of a multilayer perceptron (MLP) to the input h; f (X-1) (…f (1) (h)…) represents the activation functions of each layer in MLP; FC (k) (h) represents the calculation result of the fully connected layer (Fully Connected Layer) on the input h at the kth layer; h represents the input vector; W (k) represents the weight matrix of the kth layer; b (k) Bias vector for the kth layer.

4. The prediction method according to claim 3, characterized in that: The method extracts the self-attention feature matrix of the drug pair from the drug embedding matrix by the self-attention mechanism encoder, including: obtaining the key and value of a single drug, calculating the self-attention score between the drug's own substructures using the Transformer method, and multiplying it by the embedding matrix of the drug pair Get the self-attention feature matrix: For individual drugs, first use W K and W V For input Transform to get the key (K) and value (V) matrices, use the to_dense_batch function to process the keys and values, convert them into dense batch format, and generate masks to handle the different sizes of different batches. The processing method is: Q=Q0W Q ,K=K0W K ,V=V0W V To calculate the attention score, we use the dot product of the query (Q) and the key (K) and adjust the score using the softmax function. The calculation method is: Multiply the obtained attention coefficient matrix A by the original feature matrix X to obtain the self-attention feature matrix; The ReLU function is used for nonlinear transformation, and the calculation process is as follows: O = ReLU((Q+AV)W0) Where Q, K, and V represent query, key, and value, respectively; d represents the embedding dimension; the function ReLU() represents the rectified linear unit activation function; W Q , W K , W V and W0 represent the learnable weights.

5. The prediction method according to claim 4, characterized in that: Calculate the cosine similarity matrix of the drug pair, and obtain the self-attention feature vector of the drug pair after flattening. The calculation formula is as follows: H1=flatten(S ij ) Among them, when the feature embedding matrices of the drug pair are x1 and x2 respectively, for the feature embedding matrices x1 and x2, is the representative vector of the i-th drug 1, is the jth representative vector of drug 2, H1 is the self-attention feature vector of the drug pair, S ij is the cosine similarity matrix of drug pairs.

6. The prediction method according to claim 5, characterized in that: The embedding matrix of the drug pair is processed through the interactive attention mechanism encoder to obtain a feature matrix with interactive attention coefficients, including: Get the keys and values ​​of the two drug matrices, calculate the interactive attention score between one drug and another drug substructure, multiply it by the original feature matrix X of the drug, and get the interactive attention coefficient feature matrix: The feature embedding matrices x1 and x2 of the drug pair are obtained by different weight matrices W K and W V is converted into key (K) and value (V) vectors, calculated as: K1=W K (x1),V1=W V (x1) <h2 style=";text-align:left;direction:ltr">K2=W<h2 style=";text-align:left;direction:ltr"> K <h2 style=";text-align:left;direction:ltr"> (x2),V2=W<h2 style=";text-align:left;direction:ltr"> V <h2 style=";text-align:left;direction:ltr"> (x2) Use the to_dense_batch function to process the K and V of the two drugs, convert them into dense batch format, and generate masks to handle the different sizes of different batches. Use to calculate the interaction attention score, use the dot product of the query (Q) and the key (K), and apply the softmax function to adjust the score. The calculation method for a specific drug pair is: The obtained interactive attention coefficient feature matrix is ​​multiplied element by element with the embedding matrix of the drug pair. The process can be summarized as follows: The calculation method is: <h2 style=";text-align:left;direction:ltr">O1 = ReLU(W)<h2 style=";text-align:left;direction:ltr"> O <h2 style=";text-align:left;direction:ltr"> ((Q1+A1V2)),O2=ReLU(W<h2 style=";text-align:left;direction:ltr"> O <h2 style=";text-align:left;direction:ltr"> ((Q2+A2V1))) The obtained interaction attention coefficient feature matrices O1 and O2.

7. The prediction method according to claim 6, characterized in that: The feature matrices of the two drugs are averaged and pooled and then normalized to obtain the interaction feature vector of the drug pair, including the following steps: The interactive attention coefficient feature matrices O1 and O2 obtained by the interactive attention mechanism are subjected to average pooling operations and then standardized. First, the mean μ1 and μ2 are calculated. The calculation formula is as follows: μ1=mean(O1,1),μ2=mean(O2,1) Calculate the mean and standard deviation of each drug pair: mean1, std1, mean2 and std2. The calculation formula is as follows: mean1=mean(μ1,1,keepdim=True),std1=std(μ1,1,keepdim=True) mean2=mean(μ2,1,keepdim=True),std2=std(μ2,1,keepdim=True) Finally, after standardization, the interaction feature vectors inter1 and inter2 of the drug pair are obtained, and the calculation formula is as follows: Among them, inter1 and inter2 represent the interaction vectors of different drugs; mean1 and mean2 represent the mean values ​​of μ1 and μ2 respectively; std1 and std2 represent the standard deviations of μ1 and μ2 respectively.

8. The prediction method according to claim 7, characterized in that: The self-attention feature vector and interaction feature vector of the drug pair are concatenated and input into the multi-layer perceptron to predict the interaction between the drug pairs. The calculation method is as follows: y=MLP([inter1||inter2||H1]) Among them, H1 is the self-attention feature vector of the drug pair, and inter1 and inter2 are the interaction feature vectors of the drug pair.

9. The prediction method according to claim 8, characterized in that: The multilayer perceptron uses the cross entropy loss function as the loss function of the model: Among them, y i is the output of the i-th drug pair; y′ i ∈{0,1} is the label of the i-th drug pair; σ(·) is the sigmoid function, and n is the number of drug pairs.

10. A drug interaction prediction system based on graph neural network and multiple attention mechanisms, characterized in that: include: The GNN encoder module is used to convert the SMILES sequence of drug pairs into graph data and obtain the embedding matrix of drug pairs using multi-layer GIN operations; The self-attention mechanism encoder is used to extract the self-attention feature matrix of the drug pair from the drug embedding matrix, calculate the cosine similarity matrix of the drug pair, and obtain the self-attention feature vector of the drug pair after flattening operation; The interactive attention mechanism encoder is used to process the embedding matrix of the drug pair, obtain the feature matrix with interactive attention coefficient, perform average pooling operation on the interactive attention coefficient feature matrix of the two drugs respectively, and then normalize them to obtain the interactive feature vector of the drug pair; The splicing prediction module splices the self-attention feature vector and interaction feature vector of the drug pair and inputs them into the multi-layer perceptron to predict the interaction between the drug pairs.

Citation Information

Patent Citations

  • Deep learning drug interaction prediction method and device, medium and equipment

    CN114530258A

  • TransGAT-based drug-target interaction prediction method

    CN116312808A

  • Transform attention mechanism and 2D-3D feature cross fusion-based drug response prediction model

    CN117912590A

Cited By

  • Drug interaction prediction method based on interaction enhancement graph self-attention mechanism

    CN120072354A