Drug interaction prediction method based on multilayer attention and elastic message passing

Through a multi-layer attention mechanism and elastic message delivery graph neural network, combined with the 3D position coding of molecular centroids and the Transformer attention mechanism, the problems of insufficient fusion of characteristic information and the impact of network attacks in drug interaction prediction in the existing technology are solved, and the problem of insufficient fusion of characteristic information and the impact of network attacks is realized. Highly accurate drug interaction predictions.

CN119314698AInactive Publication Date: 2025-01-14CHONGQING MEDICAL UNIVERSITY

Patent Information

Application Number
CN202411373374.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing drug interaction prediction methods ignore the relationship between 3D structures and atoms in drug molecules, resulting in insufficient fusion of feature information, affecting prediction accuracy and robustness, and failing to effectively defend against cyber attacks, resulting in data Quality decline and risk of overfitting.

Method used

Using a multi-layer attention mechanism and elastic message delivery graph neural network, the molecular characteristics of the drug are learned through 3D position encoding based on molecular center of mass, combined with the Transformer attention mechanism and elastic graph neural network, the internal and external feature information of the drug molecule is mined, and supervised learning is carried out. and contrast loss learning enhances the robustness of the model.

Benefits of technology

It significantly improves the accuracy and robustness of drug interaction prediction. The model reaches more than 98% in ACC, AUC, AP, and F1 indicators, surpassing the most advanced methods and effectively defends against cyber attacks, enhancing the stability of the model. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314698A_ABST
    Figure CN119314698A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of drug interaction prediction, and discloses a drug interaction prediction method based on multilayer attention and elastic message passing, which comprises the following steps: firstly, extracting graph structure information of drug molecules from a 3D structure of the drug molecules, including associated features of atoms and chemical bonds; on the atomic feature level, learning updating and denoising of different atom and chemical bond features in drug molecules are achieved by using an elastic graph neural network and fusing the attention mechanism of Transform and combining a 3D position coding method based on the molecular mass center; on the molecular feature level, the attention mechanism is further utilized, and through supervised learning, comparative learning and structured learning, the potential interaction relationship of different drug molecules is mined, and potential network attacks are detected and defended; and interaction prediction of any two drug molecules i and j is realized. The results of four indexes of ACC, AUC, AP and F1 all reach 98% or above, and the method exceeds the most advanced method at present.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drug action prediction, and in particular to a drug interaction prediction method based on multi-layer attention and elastic message transmission. Background Art

[0002] Drug-drug interaction (DDI) is a term used to describe the synergistic or antagonistic effects that occur when two or more drugs are mixed and the performance of some drugs is affected by other drugs. The side effects of drugs caused by DDI may reduce the efficacy of the drug, induce adverse reactions, and even affect the patient's health. Due to the shortcomings of traditional experimental-based methods for DDI prediction, such as high cost and long detection cycle, computer-assisted calculation methods have been increasingly widely used in recent years. By using computer-assisted calculation methods to learn from existing drug interaction data to establish models and realize DDI prediction, the efficiency of DDI prediction tasks can be greatly improved. Therefore, the study of computer-assisted DDI prediction methods has important theoretical and application value.

[0003] The DDI prediction task mainly includes quantifying the drug molecular formula and extracting its features, as well as selecting an appropriate model to predict DDI. Unlike general structured data, drug molecules have a definite molecular structure and its biochemical properties. Therefore, the key to solving the DDI prediction problem is to learn the drug molecular structure and its characteristic information and establish a prediction model. At present, there are a large number of research results related to the DDI prediction task, and the methods involved can be summarized as methods based on traditional machine learning and methods based on deep learning.

[0004] Thus, DDI prediction can be achieved. This type of method can improve the accuracy of DDI prediction by making full use of the biochemical characteristic information associated with drugs, but it also has the following defects: 1. The existing DDI prediction method directly uses the one-dimensional linearized sequence of SMILES to represent the structure of the drug, ignoring the 3D structure of different atoms in the drug molecule, and the 3D structure is crucial for understanding the physicochemical properties of the drug, the interaction with the target protein, and the specific interaction pattern between drugs. 2. Since the DDI prediction task involves multiple drug molecules, and different drug molecules have different atomic information, the existing methods fail to deeply explore the correlation between different atoms in the drug molecules and different drug molecules, resulting in the failure to fully integrate the characteristic information at different levels of atoms and molecules, thereby affecting the accuracy of DDI prediction. 3. When using graph neural networks to characterize and calculate drug atoms and molecules, the existing methods ignore the influence of noise and network attacks, resulting in reduced data quality, feature contamination, graph structure interference and overfitting risks, thereby affecting the prediction accuracy and robustness of the model.

[0005] To address the above defects, a drug interaction prediction method based on multi-layer attention and elastic message passing is needed. Summary of the invention

[0006] The purpose of the present invention is to provide a drug interaction prediction method based on multi-layer attention and elastic message passing. The present invention proposes a drug interaction prediction method based on a multi-layer attention mechanism and an elastic message passing graph neural network. First, an atomic feature network based on an attention mechanism and a message passing neural network is established, and the features of different atoms and their associated chemical bonds are learned by using a 3D position encoding based on the molecular centroid, and a drug molecule feature representation based on a graph structure is constructed. Secondly, a molecular feature network based on an attention mechanism is designed, and the interaction information between different drug molecules is learned by using a multi-head attention mechanism, and the vector representation of each drug molecule is updated using the learned drug molecule relationship. Thirdly, a detection and defense strategy for network attacks is combined with supervision and contrast loss learning to optimize the model and enhance the robustness of the model while achieving DDI prediction. Finally, the effectiveness of MLAM-EMPGNN is evaluated using two real data sets. The experimental results clearly show that the results of the model of this method in the four indicators of ACC, AUC, AP, and F1 all reach more than 98%, surpassing the current state-of-the-art methods.

[0007] The present invention is implemented in this way. The present invention provides a drug interaction prediction method based on multi-layer attention and elastic message transmission, which is specifically performed in the following steps:

[0008] S1: Extract the graph structure information of the drug molecule from the 3D structure of the drug molecule, including the features associated with atoms and chemical bonds, which is specifically performed in the following steps:

[0009] S1.1: For a drug molecule with n atoms, the molecule is represented as a directed graph G = (X, E); X, E are the initial features of atoms and chemical bonds respectively obtained through the RDKit chemical information library.

[0010] X is composed of n atoms in the drug molecule, Indicates the feature embedding information of atomic node i, including information such as the hybridization mode, formal charge, and number of connections of the atom obtained through RDKit. E represents the chemical bonds associated between atoms, including the type of chemical bonds, whether they are aromatic bonds, whether they form a ring, and other feature information. Represents the edge feature embedding information from atomic node i to node j. n , f e Represent the characteristic dimensions of nodes and edges respectively. Topological connection matrix ADJ∈R n×n It consists of the shortest path between two atoms. A 3D position encoding method based on the molecular center of mass.

[0011] S1.2: Introduce the 3D geometric structure of the drug and encode it based on the 3D position of the center of mass of the drug molecule; set the original feature of each atom to a∈R 1×3×n It is represented by a three-dimensional matrix; R represents a real number set, n represents the vector dimension, and the vector dimension is a hyperparameter that determines the final dimension of the drug feature vector; the node feature matrix of the drug is represented by A (k) ∈R N×3×n , N represents the total number of atomic nodes, and the atoms in the drug are initialized as shown in formula (1)

[0012] α=(x,y,z)·a,α∈R 1×3×n Formula (1)

[0013] Where (x, y, z) represents the three-dimensional coordinates of the atom, · represents the corresponding product of the three-dimensional coordinates and the three vectors in the atomic feature to generate a three-dimensional representation of the same size;

[0014] S1.3: Calculate the three-dimensional coordinates v of n atoms in a molecule i = the mean value v of (i = 1, 2, 3, ..., n), obtain the coordinates s0 of the molecular mass center, and calculate the Euclidean distance d between each atom and the molecular mass center i , and then according to the distance d between n atoms and the molecular mass center s0 i Sort from near to far to get the atomic index from near to far from the molecular center of mass;

[0015] S1.4: Use the atomic index sequence as the position code of n atoms, and obtain the position code pos of n atoms through word embedding i ; Atomic features h(x) encoded based on the 3D position of the molecular center of mass i ) and edge features h(e uv ) as shown in formula (2)-(3); Calculate the attention scores of the interactions between different atoms and chemical bonds in the drug molecule, and perform message passing based on the graph structure to continuously learn and update the features of nodes and edges, thereby obtaining the feature representation of the drug molecule;

[0016] h(x i )=x i +pos i Formula (2)

[0017] h(e uv )=e uv +h(x u ) formula (3).

[0018] S2: At the atomic feature level, by utilizing the elastic graph neural network and the attention mechanism of the fusion transformer, combined with the 3D position encoding method based on the molecular centroid, the learning, updating and denoising of different atomic and chemical bond features in drug molecules are achieved;

[0019] Please follow the steps below:

[0020] S2.1: Based on the elastic graph neural network, the attention mechanism is introduced to adaptively adjust the information transmission weight between nodes during message transmission, as shown in formula (4);

[0021]

[0022] Where Q, V∈R n×d ,K∈R n×n×d , is a learnable weight parameter;

[0023] S2.2: Further explore the graph structure information, regard each molecule as a directed graph, and divide the edges into two types: inbound edges and outbound edges. Use the Q, K, V matrices obtained by formula (4) to calculate the corresponding message passing score matrix M i and M o , as shown in formula (5);

[0024]

[0025] Among them, M i , M o ∈R n×n , einsum is the Einstein summation convention, Q i ,K i ,Q o ,K o They represent the matrices corresponding to the incoming and outgoing edges respectively, and the final message delivery score matrix M is as shown in formula (6);

[0026] M=softmax(M o +M i -diag{M o Formula (6)

[0027] Among them, M∈R n×n , softmax normalizes the numerical vector into a probability distribution, diag{M o} means only keep the matrix M o The diagonal elements of

[0028] S2.3: In order to effectively deal with the noise problem of non-smooth signals, a structured learning method based on elastic graph neural network is used to combine elastic graph neural network with norm to denoise, and transform the denoising problem into an equivalent saddle point problem; based on The elastic graph signal estimator of the norm is as shown in formula (7);

[0029]

[0030] in, is the d-dimensional input signal of n nodes; the first term Expressed as edge-centered form, the second term The difference is penalized by quadratic method, as shown in equation (8)-(9);

[0031]

[0032] Among them, formula (8) is a The penalty term of the norm is to penalize the absolute difference between the connected nodes in the graph, which can increase The row sparsity of the feature vector is improved and similar sparsity patterns are enforced across feature dimensions, thus helping the model better capture the potential relationships between nodes.

[0033]

[0034] Among them, the last one is the fidelity term that ensures the similarity of the result to the input signal.

[0035] Furthermore, based on the elastic message passing method, the original problem of facing interference from multiple different noises is transformed into an equivalent saddle point problem, as shown in Equation (10);

[0036]

[0037] Specifically, this saddle point problem is solved by an iterative algorithm. First, a prediction step is performed. By performing gradient descent on the original variable, the predicted update value is as shown in formula (11);

[0038]

[0039] Perform a proximal dual ascent iteration; iterate on the dual variable, as in equation (12);

[0040]

[0041] Updated by another gradient descent step to generate the next iteration of F, as shown in equation (13);

[0042]

[0043] A specific proximal operator is used to handle non-smoothness, as shown in equation (14);

[0044]

[0045] After a single layer of message passing, the update formula of node and edge features is as shown in formula (15);

[0046]

[0047] Among them, matmul represents matrix multiplication, ⊙ represents the multiplication of the corresponding elements of two matrices, and the average pooling method is used to generate the molecule output by the atomic feature network, as shown in formula (16);

[0048]

[0049] Among them, Fa is the matrix composed of all molecular features, Fa i is the characteristic representation of the i-th molecule, K i represents the maximum number of atoms in the ith molecule, h(X m ) k Represents the characteristics of the kth atom in the mth molecule after the above network update.

[0050] S3: At the molecular feature level, we further utilize the attention mechanism and use supervised learning, contrastive learning, and structured learning to mine the potential interactions between different drug molecules and detect and defend against potential network attacks.

[0051] By designing a multi-head attention module to learn the interaction information between different drug molecules, and using the learned drug molecule relationship to update the vector representation of each drug molecule, the DDI prediction result is finally obtained through feature learning of different drug molecules. The specific steps are as follows:

[0052] S3.1: By performing a linear transformation on the drug molecule feature representation Fa output by the atomic feature network, the Q', K', V' matrices are obtained, and the multi-head attention is calculated, as shown in Equation (17)-Equation (18);

[0053]

[0054] MultiHead=concat(head1,head2,head3) Formula (18)

[0055] Among them, Q'∈R n′×d′ ,K'∈R n′×d′ , V'∈R n′×d′ , n' represents the number of molecules, and contect represents the splicing operation;

[0056] S3.2: Use dense connection structure between linear layers in the multi-layer perceptron network to calculate the final output: drug molecule feature representation Fm, as shown in equations (19)-(20);

[0057]

[0058] Among them, x0 is the output of the multi-head attention layer, x l Represents the calculation formula of each densely connected layer, layer l Represents the lth linear layer, DenseMLP N Represents an MLP network with N layers of dense connections; as shown in formula (21);

[0059] S ij =E i ⊙E j

[0060] Among them, E = Fm.

[0061] Given a pair of drug molecules i and j, S is calculated by formula (21): ij , and then pass it through an MLP and sigmoid function to get the final link prediction result p ij .

[0062] Further, in step S3, for the network attack during DDI prediction, the following steps are specifically performed:

[0063] First, we use the elastic message passing framework to learn the node representation of the attack graph and calculate the signal difference on each edge of the graph, as shown in Equation (22);

[0064]

[0065] Among them, D ij Represents node x i and x j The signal difference between the two nodes represents the difference in the signal between the two nodes. A larger difference indicates that the edge between the two nodes is under attack or has some abnormality.

[0066] Filter out the edges that may be attacked, set a threshold τ, and all edges with a signal difference greater than τ will be regarded as abnormal edges and deleted from the graph; as shown in formula (23);

[0067]

[0068] Then carry out structured learning, as shown in formula (24);

[0069] H (l+1) =σ(AH (l) W (l) ) Formula (24)

[0070] Where A is the adjacency matrix of the graph, H (l) represents the node features of the lth layer, σ(· is the activation function, in the new graph structure Next, the feature propagation update is as shown in formula (25);

[0071]

[0072] Among them, A new is the adjacency matrix of the new graph, and the new weights W are optimized through a structured learning process new , loss function is used to enable the network to better capture the real feature relationship under the new graph structure as shown in formula (26);

[0073]

[0074] Among them, f(v i ; W new ) represents the predicted value of node i under the new weight, and y i is its true label, L is the loss function, and the weight W is updated by combining the gradient descent algorithm new . Reduce the interference caused by the attacked edges, thereby enhancing the robustness of the model.

[0075] In the loss function, add the regularization constraint function L based on self-distillation un And the unsupervised loss function L based on contrastive learning c ; As formula (27);

[0076] L=L label +αL c +βL un Formula (27)

[0077] Among them, α and β are the weight coefficients of the corresponding loss;

[0078] L label Indicates that the error loss of the model is measured using the binary cross entropy loss function, as shown in formula (28);

[0079]

[0080] Among them, Tr represents the sample pair set of the training set, y ij represents the true label of the sample pair (i, j), r ij and p ij Respectively represent the prediction results output by the atomic feature network and the molecular feature network;

[0081] Using KL divergence to un It is expressed as formula (29);

[0082] Lun =∑ (i,j)∈D\Tr KL(p ij ||r ij ) Formula (29)

[0083] Among them, KL(p ij ||r ij ) represents the KL divergence between two probability distributions, which is used to measure the distribution difference between the two distributions. D\Tr represents the set of sample pairs other than the training set.

[0084] For each drug molecule, its output feature in the molecular feature network is selected as the anchor point, and the output features of its first-order neighbors and non-first-order neighbors in the atomic feature network are used as positive samples and negative samples respectively. Through contrast loss learning, the anchor point is made close to its positive sample and distinguished from its negative sample, as shown in formula (30);

[0085]

[0086] Among them, C(i) and They represent the first-order neighbor set and non-first-order neighbor set of node i respectively. Φ and φ define the parameters of the atomic feature network and the molecular feature network respectively. A mutual information estimator is defined;

[0087] Use JS divergence to optimize the lower bound of mutual information by minimizing the contrast loss function L c , so that the mutual information is maximized, as shown in formula (31);

[0088]

[0089] S4: Realize the interaction prediction between any two drug molecules i and j.

[0090] Further, the present invention provides a drug interaction prediction system based on multi-layer attention and elastic message passing, including a 3D position encoding module of the molecular centroid, used in conjunction with an attention mechanism and an elastic message passing atomic feature network module, used to extract the graph structure information of the drug molecule from the 3D structure of the drug molecule, including features associated with atoms and chemical bonds;

[0091] The molecular feature network module of the multi-head attention mechanism is used to combine the 3D position encoding method based on the molecular centroid to achieve learning, updating and denoising of different atomic and chemical bond features in drug molecules;

[0092] The DDI prediction result module is used to use the attention mechanism and through supervised learning, contrastive learning and structured learning, to mine the potential interaction relationship between different drug molecules, detect and defend against potential network attacks, and realize the interaction prediction between any two drug molecules i and j;

[0093] Model training optimization module, used for model training optimization and model update.

[0094] Furthermore, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, the method described in any one of the above items is implemented.

[0095] Compared with the prior art, the present invention has the following beneficial effects:

[0096] 1. By designing an atomic feature network and a molecular feature network based on the attention mechanism, the feature information of different atoms and chemical bonds within a molecule and between different molecules is learned from two different levels, and combined with the 3D position encoding based on the molecular centroid proposed in this paper, the efficiency of drug molecule encoding is improved. At the same time, this method uses the elastic message passing method to enhance the robustness of the graph neural network. It can help the network better capture the feature relationship in the graph while effectively detecting and defending against potential network attacks, thereby improving the accuracy of DDI prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It is understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0098] Figure 1 is a flow chart of the method of the present invention;

[0099] Figure 2 It is a system structure diagram of the present invention;

[0100] Figure 3 It is a graph of different ablation experiment results on Datasets1 of the present invention;

[0101] Figure 4 It is a graph of different ablation experiment results on Datasets2 of the present invention;

[0102] Figure 5 It is a diagram showing the influence of different α and β values ​​on the model performance on Datasets1 and Datasets2 of the present invention;

[0103] Figure 6 It is the influence diagram of different τ values ​​on the model performance on Datasets1 of the present invention;

[0104] Figure 7 It is a diagram showing the influence of different τ values ​​on the model performance on Datasets2 of the present invention. DETAILED DESCRIPTION

[0105] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but is only for selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0106] See also Figure 1-Figure 7 The present invention provides a drug interaction prediction method based on multi-layer attention and elastic message passing,

[0107] In this embodiment, two commonly used DDI datasets, ZhangDDI and ChCh-Miner, are selected for comparative experiments, ablation experiments and parameter experiments. ZhangDDI contains 548 drugs and 48,548 sets of drug interaction relationship data, and ChCh-Miner contains 1,514 drugs and 48,514 sets of drug interaction relationship data. In the present invention, these two datasets are named Datasets1 and Datasets2, respectively. Four different indicators are used to evaluate the model of this method, including ACC (Accuracy), AUC (Area Under the Curve), AP (Average Precision) and F1 score (F1-score);

[0108] For Datasets1 and Datasets2, all data samples are divided into training set and test set in a ratio of 4:1, and 1 / 4 of the samples in the training set are randomly selected as the validation set. When 10 rounds of continuous training and the best accuracy of the model on the validation set does not change, the model stops training. All experimental results are obtained through statistical analysis of 5 independent experiments. In the atomic feature network, the atomic feature dimension is set to 120, and the chemical bond feature dimension is set to 20. In the molecular feature network, the number of attention heads is set to 3. The coefficients and in the objective function are set to 1 and 0.8 respectively. The experiment is based on Pytorch1.6.0.

[0109] In this example, the method of the present invention is first compared with 8 existing DDI prediction methods. These 8 baseline methods are currently the most advanced graph-based deep learning DDI prediction methods. These methods are further divided into two categories, namely, DDI prediction methods based on molecular feature networks and DDI prediction methods based on substructure features; the comparison results are shown in Table 1;

[0110] Table 1 Data comparison between this method and 8 baseline methods

[0111]

[0112] From Table 1, we can observe that compared with the eight baseline methods, the ACC, AUC, AP, and F1 results of this method on Datasets1 are improved to 98.61%, 98.35%, 99.24%, and 99.16%, while on Datasets2, the corresponding results are improved to 98.27%, 98.62%, 98.96%, and 99.04%. These four indicators are better than the current state-of-the-art methods.

[0113] In this embodiment, Figure 3-Figure 4 ; The ablation experiment of multi-layer attention mechanism, the ablation experiment of 3D position encoding, the ablation experiment of anti-interference mechanism and the ablation experiment of loss function were carried out on two data sets at the same time. The ablation experiment of the present invention verifies the effect of the model from different angles; MLAM-EMPGNN represents the experimental results of the model without ablation experiment. Figure 3 Represents the experimental results of the ablation experiment in Datasets1, where the size of the fan-shaped area represents the maximum value of the experimental results under different training batches. Figure 4 It shows the experimental results of ablation experiment under different training batches in Datasets2, and the horizontal axis shows the training batch of the model. Figure 2-Figure 3 It can be seen that the position encoding method of the present invention can significantly improve the performance of the model and make the model have more stable performance.

[0114] In this embodiment, in the ablation experiment of the anti-interference mechanism, Figure 2-Figure 3 , elastic graph signal estimator, detection and defense strategy ablation experiments, and joint ablation experiments of elastic graph signal estimator and detection and defense strategy were conducted on two datasets. R-DS and R-DADS represent the ablation experiments of elastic graph signal estimator and detection and defense strategy respectively, and R-EMP represents the joint ablation experiment of elastic graph signal estimator and detection and defense strategy. It can be observed from the figure that the structured learning method based on elastic graph neural network proposed in this method applies norm, which can effectively remove noise from graph signals. By applying the elastic message passing mechanism, the model can effectively detect and identify the non-smoothness problem in the graph signal processing process. Furthermore, the detection and defense strategy is applied to filter out non-smooth signals, and this method performs a deeper structural learning on graph data. This strategy not only optimizes the structural representation ability of the graph, but also significantly enhances the overall performance of the model and its robustness against abnormal interference.

[0115] In this embodiment, in the ablation experiment of the loss function, as shown in Table 2, the comparative experimental results of the influence of different loss functions on the model performance. It can be seen that for both Datasets1 and Datasets2, when there is no regularization constraint term based on self-distillation or loss term based on contrastive learning, the model performance is reduced to a certain extent, that is, these two loss functions are indispensable for improving the performance of the model. For the two positive and negative sample sampling methods, the experimental results show that the sampling method selected by the present invention is better; the method adopted by the present invention achieves the best results and is relatively more stable. This is because infoNCE optimizes the lower bound of mutual information through self-normalized importance sampling, which requires relatively more negative samples. The JSD method adopted by the present invention is relatively insensitive to the number of negative samples, and the performance is relatively more stable. It can be seen that different contrastive learning loss functions have a certain impact on model performance, and the contrastive learning loss function adopted by the present invention is more advantageous.

[0116] Table 2 Comparison of the impact of loss function on model performance

[0117]

[0118] In Table 2, T1 represents the removal of the self-distillation constraint term, T2 represents the removal of the contrastive learning loss term, T3 represents the infoNCE contrastive loss term, and T4 represents the contrastive loss term of different sampling methods.

[0119] In this embodiment, different parameters will directly affect the performance of the model. The present invention selects to perform sensitivity analysis on the parameters α and β in the loss function and the threshold τ in the detection and defense strategy. To analyze the sensitivity of the three parameters, the value range of α is {0.2, 0.4, 0.6, 0.8, 1}, the value range of β is {0.2, 0.4, 0.6, 0.8, 1}, and the value range of τ is {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}. When analyzing the sensitivity of α, β and τ are fixed and the value is 0.8; when analyzing the sensitivity of β, α and τ are fixed and the value is 1. Figure 5It is the experimental result of parameters α and β on two data sets. It can be observed that on the two data sets, the values ​​of different parameters α and β have relatively little effect on the results of the method of the present invention on the indicators AUROC and AUPRC, but have relatively greater effect on the results on the F1 indicator. Figure 6 and Figure 7 It can be observed that different values ​​of parameter τ have a great impact on the indicators AUC, ACC, AP and F1 of the method of the present invention. Comprehensive sensitivity analysis of parameters α, β and τ on model performance shows that when α and β are 0.4 and 0.8 respectively, and τ is 0.6, the method of the present invention can achieve the best experimental results.

[0120] In this embodiment, the present invention provides a drug interaction prediction system based on multi-layer attention and elastic message passing, including a 3D position encoding module of a molecular centroid, and an atomic feature network module for extracting graph structure information of drug molecules from their 3D structures, including features associated with atoms and chemical bonds;

[0121] The molecular feature network module of the multi-head attention mechanism is used to combine the 3D position encoding method based on the molecular centroid to achieve learning, updating and denoising of different atomic and chemical bond features in drug molecules;

[0122] The DDI prediction result module is used to use the attention mechanism and through supervised learning, contrastive learning and structured learning, to mine the potential interaction relationship between different drug molecules, detect and defend against potential network attacks, and realize the interaction prediction between any two drug molecules i and j;

[0123] Model training optimization module, used for model training optimization and model update.

[0124] In this embodiment, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, the method described in any one of the above is implemented.

[0125] 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 has 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 multi-layer attention and elastic message passing, characterized by: Please follow the steps below: S1: Extracting the graph structure information of drug molecules from their 3D structures, including the features associated with atoms and chemical bonds; S2: At the atomic feature level, by utilizing the elastic graph neural network and the attention mechanism of the fusion transformer, combined with the 3D position encoding method based on the molecular centroid, the learning, updating and denoising of different atomic and chemical bond features in drug molecules are achieved; S3: At the molecular feature level, we further utilize the attention mechanism and use supervised learning, contrastive learning, and structured learning to mine the potential interactions between different drug molecules and detect and defend against potential network attacks. S4: Realize the interaction prediction between any two drug molecules i and j.

2. The drug interaction prediction method based on multi-layer attention and elastic message passing according to claim 1, characterized in that: In step S1, the following steps are specifically performed: S1.1: For a drug molecule with n atoms, the molecule is represented as a directed graph G = (X, E); S1.2: Introduce the 3D geometric structure of the drug and encode it based on the 3D position of the center of mass of the drug molecule; set the original feature of each atom to a∈R 1×3×n It is represented by a three-dimensional matrix; the node feature matrix of the drug is represented by A (k) ∈R N×3×n , N represents the total number of atomic nodes, and the atoms in the drug are initialized as shown in formula (1) α = (x, y, z) · a, α ∈ R 1×3×n Equation (1) Where (x, y, z) represents the three-dimensional coordinates of the atom, · represents the corresponding product of the three-dimensional coordinates and the three vectors in the atomic feature to generate a three-dimensional representation of the same size; S1.3: Calculate the three-dimensional coordinates v of n atoms in a molecule i = the mean value v of (i = 1, 2, 3, ..., n), obtain the coordinates s0 of the molecular mass center, and calculate the Euclidean distance d between each atom and the molecular mass center i , and then according to the distance d between n atoms and the molecular mass center s0 i Sort from near to far to get the atomic index from near to far from the molecular center of mass; S1.4: Use the atomic index sequence as the position code of n atoms, and obtain the position code pos of n atoms through word embedding i ; Atomic features h(x) encoded based on the 3D position of the molecular center of mass i ) and edge features h(e uv ) as shown in formula (2)-(3); Calculate the attention scores of the interactions between different atoms and chemical bonds in the drug molecule, and perform message passing based on the graph structure to continuously learn and update the features of nodes and edges, thereby obtaining the feature representation of the drug molecule; h(x i )=x i +pos i Formula (2) h(e uv )=e uv +h(x u ) formula (3).

3. The drug interaction prediction method based on multi-layer attention and elastic message passing according to claim 2, characterized in that: In step S1.1, X and E are the initial features of atoms and chemical bonds respectively obtained through the RDKit chemical information library.

4. The drug interaction prediction method based on multi-layer attention and elastic message passing according to claim 1, characterized in that: In step S2, the following steps are specifically performed: S2.1: Based on the elastic graph neural network, the attention mechanism is introduced to adaptively adjust the information transmission weight between nodes during message transmission, as shown in formula (4); Where Q, V∈R n×d ,K∈R n×n×d ,W Q , is a learnable weight parameter; S2.2: Further explore the graph structure information, regard each molecule as a directed graph, and divide the edges into two types: inbound edges and outbound edges. Use the Q, K, V matrices obtained by formula (4) to calculate the corresponding message passing score matrix M i and M o , as shown in formula (5); Among them, M i , M o ∈R n×n , einsum is the Einstein summation convention, Q i ,K i ,Q o ,K o They represent the matrices corresponding to the incoming and outgoing edges respectively, and the final message delivery score matrix M is as shown in formula (6); M=softmax(M o +M i -diag{M o Formula (6) Where M∈R n×n , softmax normalizes the numerical vector into a probability distribution, diag{M o } means only keep the matrix M o The diagonal elements of S2.3: Structured learning method based on elastic graph neural network, using elastic graph neural network combined with l 21 Norm for denoising, based on l 21 The elastic graph signal estimator of the norm is as shown in formula (7); in, is the d-dimensional input signal of n nodes; the first term Expressed as edge-centered form, the second term The difference is penalized by quadratic method, as shown in equation (8)-(9); Among them, the last one is the fidelity term that ensures the similarity of the result to the input signal.

5. The drug interaction prediction method based on multi-layer attention and elastic message passing according to claim 4, characterized in that: Based on the elastic message passing method, the original problem of facing interference from multiple different noises is transformed into an equivalent saddle point problem, as shown in Equation (10); Specifically, this saddle point problem is solved by an iterative algorithm. First, a prediction step is performed. By performing gradient descent on the original variable, the predicted update value is as shown in formula (11); Perform one proximal dual ascent iteration; Iteration on the dual variable, as in equation (12); Updated by another gradient descent step to generate the next iteration of F, as shown in equation (13); A specific proximal operator is used to handle non-smoothness, as shown in equation (14); After a single layer of message passing, the update formula of node and edge features is as shown in formula (15); Among them, matmul represents matrix multiplication, ⊙ represents the multiplication of the corresponding elements of two matrices, and the average pooling method is used to generate the molecule output by the atomic feature network, as shown in formula (16); Among them, Fa is the matrix composed of all molecular features, Fa i is the characteristic representation of the i-th molecule, K i represents the maximum number of atoms in the ith molecule, h(X m ) k Represents the characteristics of the kth atom in the mth molecule after the above network update.

6. The drug interaction prediction method based on multi-layer attention and elastic message passing according to claim 1, characterized in that: In step S3, the interaction information between different drug molecules is learned by designing a multi-head attention module, and the learned drug molecule relationship is used to update the vector representation of each drug molecule. Finally, the DDI prediction result is obtained through feature learning of different drug molecules. The specific steps are as follows: S3.1: By performing a linear transformation on the drug molecule feature representation Fa output by the atomic feature network, the Q', K', V' matrices are obtained, and the multi-head attention is calculated, as shown in Equation (17)-Equation (18); MultiHead=concat(head1,head2,head3) Formula (18) Among them, Q'∈R n’×d’ ,K'∈R n’×d’ , V'∈R n’×d’ , n' represents the number of molecules, and contect represents the splicing operation; S3.2: Use dense connection structure between linear layers in the multi-layer perceptron network to calculate the final output: drug molecule feature representation Fm, as shown in equations (19)-(20); Among them, x0 is the output of the multi-head attention layer, x l Represents the calculation formula of each densely connected layer, layer l Represents the lth linear layer, DenseMLP N Represents an MLP network with N layers of dense connections; as shown in formula (21); S ij =E i ⊙E j Where, E = Fm; Given a pair of drug molecules i and j, S is calculated by formula (21): ij , and then pass it through an MLP and sigmoid function to get the final link prediction result p ij .

7. The drug interaction prediction method based on multi-layer attention and elastic message passing according to claim 1, characterized in that: In step S3, for the network attack during DDI prediction, the following steps are specifically performed: First, we use the elastic message passing framework to learn the node representation of the attack graph and calculate the signal difference on each edge of the graph, as shown in Equation (22); Among them, D ij Represents node x i and x j The signal difference between the two nodes represents the difference in the signal between the two nodes. A larger difference indicates that the edge between the two nodes is under attack or has some abnormality. Filter out the edges that may be attacked, set a threshold τ, and all edges with a signal difference greater than τ will be regarded as abnormal edges and deleted from the graph; as shown in formula (23); Then carry out structured learning, as shown in formula (24); H (l+1) =σ(AH (l) W (l) ) expression(24) Where A is the adjacency matrix of the graph, H (l) represents the node features of the lth layer, σ(·) is the activation function, and in the new graph structure Next, the feature propagation update is as shown in formula (25); Among them, A new is the adjacency matrix of the new graph, and the new weights W are optimized through a structured learning process new , loss function is used to enable the network to better capture the real feature relationship under the new graph structure as shown in formula (26); Among them, f(v i ; W new ) represents the predicted value of node i under the new weight, and y i is its true label, L is the loss function, and the weight W is updated by combining the gradient descent algorithm new .

8. The drug interaction prediction method based on multi-layer attention and elastic message passing according to claim 7, characterized in that: In the loss function, add the regularization constraint function L based on self-distillation un And the unsupervised loss function L based on contrastive learning c ; As formula (27); L=L label +αL c +βL un expression(27) Among them, α and β are the weight coefficients of the corresponding loss; L label Indicates that the error loss of the model is measured using the binary cross entropy loss function, as shown in formula (28); L label = ∑ (i,j)∈Tr (BCE(r ij , y ij ) + BCE(p ij , y ij )) Equation (28) Among them, Tr represents the sample pair set of the training set, y ij represents the true label of sample pair (i, j), r ij and p ij Respectively represent the prediction results output by the atomic feature network and the molecular feature network; Using KL divergence to un It is expressed as formula (29); L un =∑ (i,j)∈D\Tr KL(p ij ||r ij ) Formula (29) Among them, KL(p ij ||r ij ) represents the KL divergence between two probability distributions, which is used to measure the distribution difference between the two distributions. D\Tr represents the set of sample pairs other than the training set. For each drug molecule, its output feature in the molecular feature network is selected as the anchor point, and the output features of its first-order neighbors and non-first-order neighbors in the atomic feature network are used as positive samples and negative samples respectively. Through contrast loss learning, the anchor point is made close to its positive sample and distinguished from its negative sample, as shown in formula (30); Among them, C(i) and They represent the first-order neighbor set and non-first-order neighbor set of node i, Φ and φ define the parameters of the atomic feature network and the molecular feature network, respectively. A mutual information estimator is defined; Use JS divergence to optimize the lower bound of mutual information by minimizing the contrast loss function L c , so that the mutual information is maximized, as shown in formula (31); 9. A drug interaction prediction system based on multi-layer attention and elastic message passing, characterized in that: Includes a 3D position encoding module for molecular centroids, used for; The attention mechanism and elastic message passing atomic feature network module are used to extract the graph structure information of drug molecules from their 3D structures, including features associated with atoms and chemical bonds; The molecular feature network module of the multi-head attention mechanism is used to combine the 3D position encoding method based on the molecular centroid to achieve learning, updating and denoising of different atomic and chemical bond features in drug molecules; The DDI prediction result module is used to use the attention mechanism and through supervised learning, contrastive learning and structured learning, to mine the potential interaction relationship between different drug molecules, detect and defend against potential network attacks, and realize the interaction prediction between any two drug molecules i and j; Model training optimization module, used for model training optimization and model update.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the main controller, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Drug-drug interaction prediction method

    CN115762627A

  • System and method for molecular property prediction using edge-conditioned graph attention neural network

    EP4163919A1

  • Predicting drug-drug interactions and specific adverse events

    US20170177803A1

Cited By

  • Task-specific drug molecule activity cliff prediction method

    CN120072105A

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

    CN120072354A

  • Drug combination risk prediction method and device based on multi-source feature fusion and comparative learning, equipment and medium

    CN120260732A

  • Drug interaction prediction method and system based on atom and chemical bond structure

    CN121096483A