A DDI prediction method based on drug community groups

By optimizing the message passing and aggregation functions of MPNN through multi-hop subgraph weighted random walk and spectral clustering, the problems of missing or redundant chemical substructures and insufficient distinction of node importance in existing DDI prediction methods are solved, achieving more accurate DDI prediction.

CN116486937BActive Publication Date: 2025-09-12UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310591300.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2025-09-12
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

Existing DDI prediction methods based on drug chemical substructures have the problem of unstable chemical substructure size, resulting in missing or redundant nodes, and fail to effectively distinguish differences in node importance. Local features are considered too simply and lack global feature analysis.

Method used

Multi-hop subgraph weighted random walk is used to detect drug communities. The message passing and aggregation functions of MPNN are optimized by spectral clustering algorithm. Local and global features are combined to extract drug features. Multi-layer perceptron is used to process DDI type scoring.

Benefits of technology

The accuracy and interpretability of DDI prediction are improved, and the differences in node importance can be better distinguished, and more accurate DDI prediction can be made by combining local and global features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116486937B_ABST
    Figure CN116486937B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of DDI prediction, and in particular relates to a DDI prediction method based on drug community clusters. The present invention uses multi-hop subgraph weighted random walks to detect drug community clusters to solve the problem that chemical substructures are missing or redundant and lack interpretability due to MPNN extraction of chemical substructures. The multi-hop subgraph is used to weightedly update the transition probability vector to improve the accuracy of community cluster detection, and an iterative update strategy is adopted to reduce the negative impact of poor initial expansion of community clusters. Secondly, the message passing function and message aggregation function in the MPNN are weighted and optimized to solve the problem that the importance difference of different nodes is not distinguished when the features of nodes with the same number of hops away from the central node are aggregated. Finally, the local features of the drug community cluster and the global features of the drug are obtained through two-layer MPNN processing to overcome the defect that the approximate function only considers the possibility of DDI from the local features of the chemical substructure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of DDI prediction, and in particular relates to a DDI prediction method based on drug community groups. Background Art

[0002] Drug-Drug Interaction (DDI) refers to the changes in pharmacodynamics (PD) and pharmacokinetics (PK) that occur when a drug is used simultaneously with one or more other drugs or within a certain time interval. From the perspective of the therapeutic effects produced after clinical use, the results of DDI can be classified into four categories: synergistic, antagonistic, additive, and irrelevant. The rational combination of drugs can produce synergistic effects, which can enhance drug efficacy and shorten the course of disease cure. Conversely, improper drug combination produces antagonistic effects, which can reduce drug efficacy, cause side effects, or prolong recovery time. Therefore, rapid, comprehensive, and accurate prediction of combination drugs that may lead to antagonistic effects is an important link in the drug development process.

[0003] A drug's chemical substructure determines its PD and PK properties, and ultimately its interactions. The current process for predicting drug-induced drug interactions (DDIs) based on drug chemical substructure is typically as follows: Drug molecules are represented as two-dimensional graphs using the drug's SMILES (Simplified Molecular Input Line Entry System); chemical substructures are extracted from the two-dimensional drug graphs using a message passing neural network (MPNN); and an approximate function f:Dx×Rr×Dy→[0,1] is learned based on existing DDI datasets, where Dx represents the chemical substructure characteristics of drug x, Dy represents the chemical substructure characteristics of drug y, and Rr represents the type r interaction. This function calculates the probability score of a type r interaction between x and y, given a triplet of two drugs x and y and a certain interaction type r.

[0004] When processing a two-dimensional graph, MPNN first represents node features as a superposition of the node's own information and that of its neighboring nodes based on an aggregation function. It then iteratively aggregates information across multiple hops to update node features. Finally, a readout function is used to extract features from the entire two-dimensional graph. Algorithms for predicting drug DDIs based on drug chemical substructures typically take a two-dimensional drug graph as input and use MPNN to aggregate information from all nodes within m hops (m is a preset threshold used to control the size of the chemical substructure). This approach has the following issues: the size of the chemical substructure is not fixed, and limiting the size of the chemical substructure by a threshold can lead to missing or redundant nodes in some substructures; message passing between nodes with the same number of hops from the central node does not distinguish between different node importances; and the chemical substructure extracted in this way is inherently uninterpretable. The learned approximate function only considers the possibility of DDI from the local characteristics of the chemical substructure, failing to incorporate the global characteristics of the entire drug molecule. Summary of the Invention

[0005] In response to the above problems, the present invention proposes a DDI prediction method based on drug community groups. First, multi-hop subgraph weighted random walks are used to extract drug community groups to solve the problem that chemical substructures are missing or redundant and lack interpretability when MPNN is used to extract chemical substructures. Secondly, the transition probability calculated by multi-hop subgraph weighted random walks and the multi-hop subgraph transition probability fusion weights are used to perform weighted optimization on the message passing function and message aggregation function in MPNN to solve the problem that the importance of different nodes is not distinguished when the features of nodes with the same number of hops from the central node are aggregated. Finally, the local features of drug community groups and the global features of drugs are obtained through MPNN processing after two improved aggregation functions to overcome the defect that the approximate function only considers the possibility of DDI from the local feature of chemical substructure.

[0006] The technical solution of the present invention is:

[0007] A drug community group-based DDI prediction method comprises the following steps:

[0008] S1. Based on the SMILES of the drug molecule, use the RDKit tool to generate a two-dimensional undirected graph G = (V, E) corresponding to the drug molecule, where V is the node set, E is the edge set, and N = |V| represents the total number of nodes;

[0009] S2. Detect drug communities using random walks on multi-hop subgraphs. Specifically:

[0010] Initialize π seeds according to the following rules to form the initial seed set S = {s1, s2, ..., s π}:

[0011] Arrange all nodes in descending order of node degree, and prioritize nodes with high degrees as seeds;

[0012] If a seed contains more than 1 node, the nodes in the seed must meet the following requirements:

[0013] Jaccard(N(i),N(j))>Φ

[0014] Where N(i) represents the set of neighbor nodes of the i-th node in the graph G, Jaccard(N(i), N(j)) is the function for calculating the Jaccard similarity between two sets N(i) and N(j), and Φ is the similarity threshold;

[0015] Taking conductivity as the fitness function of the drug community, for each seed s in the initial seed set S i , first from s i The nodes in the graph G start to calculate the transition probability vector consistently, and then regard the transition probability vector of each node in the graph G as a point in the vector space, and use the spectral clustering algorithm to cluster these vectors into different community groups, which are used as the vectors generated by the seed s. i The expanded drug community clusters are expanded from various seeds in turn to obtain various drug community clusters, and finally all the π drug community clusters generated by π seeds are obtained. C={c1,c2,...,c π}; The definition of conductivity is that the conductivity Ψ(c) of community c in graph G is:

[0016]

[0017]

[0018] Where L(c) represents the total number of external links of nodes in the community, M represents the number of edges in the graph G, d(u) represents the degree of node u, and the lower the conductivity Ψ(c) of community c, the higher the cohesion of the community.

[0019] The calculation method of the transition probability vector is to first calculate the transition probability vector after the m(k) drug community groups are expanded in the k-hop neighbor subgraph of the starting node u using the following formula:

[0020]

[0021] Among them, I u is a vector whose uth element is 1 and the rest are 0, α k ∈(0,1) is the attenuation parameter, is the k-hop neighbor subgraph at node u On the left, take u as the starting node and expand to the m(k)th drug community group. The random walk dynamic transfer matrix is:

[0022]

[0023] in, is the k-hop neighbor subgraph of node u The adjacency matrix of is the adjacency matrix A (k) The degree matrix of The weighted matrix after expansion to the m(k)th drug community group:

[0024]

[0025] Among them, μ1>0, 0<μ2<μ3<1, n(v i ) represents the i-th node v i Number of subordinate drug community groups, Representing a subgraph The jump weight between the i-th node and the j-th node in is:

[0026]

[0027] Among them, link k (i,j) represents a subgraph The number of links between the i-th node and the j-th node in the original graph G through k-1 nodes, N k (i) represents a subgraph The set of neighbor nodes of the i-th node;

[0028] Finally, the transition probability vector of the starting node u is obtained as:

[0029]

[0030] Among them, ω i is the probability fusion weight, satisfying ω1>ω2>...>ω k >0 and ω1+ω2+...+ω k =1, i=1,2,...,k;

[0031] Then, the transition probability vector of each node in the graph G is regarded as a point in the vector space, and the spectral clustering algorithm is used to cluster these vectors into different community groups (the spectral clustering algorithm treats the data points as vectors, then performs spectral decomposition on these vectors, and finally clusters these vectors). The input of the spectral clustering algorithm is:

[0032] P=[p(u1),p(u2),...,p(u N )] T

[0033] Among them, P represents the matrix composed of the transition probability vectors of all nodes in the graph G, and each row of the matrix represents the transition probability vector of a node; u1,u2,...,u N where is the node in the graph G; N is the total number of nodes in the graph G; and T represents the transposition operation. Using the spectral clustering algorithm, these nodes are divided into different communities, thereby achieving the goal of community discovery.

[0034] Finally, the community groups with high similarity are merged:

[0035] c i =c i ∪c j stJaccard(c i ,c j )>θ

[0036] Among them, c i represents the node set of the ith community group, θ is the similarity threshold, and through fusion processing, n drug community groups C = {c1, c2, ..., c n}, where 0 <n≤π;

[0037] When the multi-hop subgraph random walk completes the extraction of drug community clusters for the first time, all community clusters are sorted in ascending order of conductivity, and only the first a community clusters are retained. The rest of the community clusters are all dissolved, and a new round of multi-hop subgraph random walk is carried out again with the retained a community clusters as the guide. After t iterations, the final drug community cluster C = {c1, c2, ..., c s}, where s is the final number of drug community groups;

[0038] S3. Use the first MPNN module to extract local features of drug communities:

[0039] The message passing function is weightedly optimized using the transition probability vector p(u) of each node u:

[0040]

[0041] in, is the information vector transmitted from node v to node u, is the information vector of node u on the (l-1)th layer, is the information vector of node v on the (l-1)th layer, e vu Is the attribute value indicating whether there is an edge between node v and node u. If there is an edge, then e vu =1, otherwise e vu =0, p(u) v represents the probability of node u transferring to node v,

[0042] Use probability fusion weights to perform weighted optimization on the aggregation function:

[0043]

[0044] in, is the sum of features transmitted to node u by its l-hop neighbor nodes, N(u) is the set of neighbor nodes of node u, ω l The fusion weight representing the transfer probability of the l-th hop subgraph is weighted when aggregating the features transferred by all l-hop nodes, l = 1, 2, ..., k;

[0045] For each community group i The constructed two-dimensional graph uses the MPNN after optimizing the message passing function and message aggregation function to perform message passing, message aggregation and node representation update in the following way to extract graph features:

[0046]

[0047]

[0048]

[0049]

[0050] Among them, the input of the MPNN module is the initial features of each node in the graph Initial features Initialized by graph G embedding, Massage(·) is a message passing function used to transmit the feature information of neighbor nodes of node u; Aggregation(·) is an aggregation function used to aggregate the feature information transmitted by all neighbor nodes of node u; Update(·) is an update function used to update the feature information of node u; Read(·) is a readout function used to extract the feature vector of the entire drug community cluster subgraph, and finally obtain the drug community cluster c i The eigenvector h i , i=1,2,...,s, this feature corresponds to the local feature of the drug community, T represents the transposition operation;

[0051] S4. Use the second MPNN module to extract the global characteristics of the drug:

[0052] Each community cluster is regarded as a node, and the node feature is the community cluster feature. Based on the original link relationship between the community clusters, the community cluster subgraph G' is constructed. Then, the same method as in S3 is used to use MPNN for message passing, message aggregation and node representation update to extract the feature h of the community cluster subgraph G', which corresponds to the global feature of the drug.

[0053] Finally, the drug feature matrix is ​​composed of local features and global features of the drug, which is expressed as H = [h1,h2,...,h s ,h] T , where h i Community Group for Drugs i The characteristic vector of , where i ranges from 1 to s, and h is the characteristic vector of the community group graph.

[0054] S5, DDI prediction:

[0055] Given drug x and drug y, after processing from S1 to S4, their drug feature matrices are expressed as H x and H y , first perform a linear transformation on the feature matrix:

[0056]

[0057]

[0058] Among them, W x and W y is the learnable transformation matrix, and Represent the characteristics of drug x and drug y after linear transformation; for a given DDI type r, calculate the triplet Established rating:

[0059]

[0060] Among them, σ is the sigmoid function; ε is the weight for adjusting the importance difference between local and global features of the drug; d x and d y Represent the number of community groups of drug x and drug y respectively; represents the i-th row vector in the characteristic matrix of drug x after linear transformation, corresponding to the characteristic vector of the i-th community group of drug x, and The last row vector in the feature matrix of drug x after linear transformation corresponds to the feature vector of the community cluster subgraph of drug x; M r is the learnable representation matrix of the r-th interaction, which is restricted to a diagonal matrix. At initialization, M r The rth diagonal element in is set to 1, and the rest of the diagonal elements are set to 0; ij ∈[0,1] is the community cross-interaction weight between the i-th community of drug x and the j-th community of drug y, which is obtained by the following processing:

[0061]

[0062] Where softmax(·) is the softmax function and MLP(·) stands for multi-layer perceptron processing.

[0063] When the triple If the corresponding scoring function value is greater than the preset threshold, it indicates that the combination of drug x and drug y will lead to type r interaction, otherwise it indicates that no interaction will occur.

[0064] The beneficial effects of the present invention are:

[0065] Compared with the existing technology, the method proposed in the present invention uses multi-hop subgraph weighted random walk to detect drug communities, which uses multi-hop subgraph weighted update transition probability vectors to improve the accuracy of community detection.

[0066] In addition, the iterative update strategy proposed in the present invention reduces the negative impact of poorly initially expanded community clusters by retaining well-structured community clusters, releasing poorly structured community clusters, and using the retained community clusters to guide subsequent community cluster expansion, so as to further obtain more accurate DDI prediction results.

[0067] Then, the method proposed in the present invention uses the transition probability calculated by the weighted random walk of the multi-hop subgraph and the fusion weight of the multi-hop subgraph transition probability to perform weighted optimization on the message passing function and message aggregation function in the MPNN, which plays a role in distinguishing the importance differences of different nodes under the same hop number and the importance differences of nodes under different hop numbers.

[0068] Finally, the present invention uses two optimized MPNNs to obtain the local and global characteristics of drugs respectively, which can not only view the interactions from the perspective of community groups, but also effectively take the global information of drugs into consideration, and obtain better DDI prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 It is the overall flow chart of the present invention.

[0070] Figure 2 It is a flowchart for extracting drug communities using weighted random walks in multi-hop subgraphs. DETAILED DESCRIPTION

[0071] The present invention is described in detail below with reference to the accompanying drawings.

[0072] The present invention first represents drug molecules in the form of a two-dimensional graph based on the SMILES of drug molecules; secondly, it uses multi-hop subgraph weighted random walk to extract drug communities; thirdly, it uses the transition probability calculated by multi-hop subgraph weighted random walk to perform weighted optimization on the message transfer function and message aggregation function in MPNN; then, it uses the first MPNN module to process the communities contained in the drug to obtain the characteristics of each community in the drug, and then uses the second MPNN module to process to obtain the global characteristics of the drug; finally, it calculates the probability score of this type of interaction between the two drugs. The overall process is as follows: Figure 1 The specific steps are as follows:

[0073] 1. Convert drug molecules into two-dimensional images based on drug SMILES

[0074] Based on the SMILES of drug molecules, the RDKit tool is used to generate a two-dimensional undirected graph G = (V, E) corresponding to the drug molecules, where V is the node set, E is the edge set, and N = |V| represents the total number of nodes.

[0075] 2. Detecting drug communities using multi-hop subgraph random walks

[0076] The multi-hop subgraph random walk mainly includes four parts: seeding, expansion rule definition, seed expansion and iterative update. Its core idea is to use the expanded drug community information to guide the subsequent expansion of drug community groups. Figure 2 shown.

[0077] (1) Seeding. The initial seed is a key component of drug community cluster detection. A seed can contain only a single node or multiple nodes at the same time. For a seed containing multiple nodes, the nodes it contains should have high node degrees and neighbor similarities to ensure that the nodes in the seed belong to the same community cluster. Initialize π seeds according to the following rules (π should be large enough to ensure that it is larger than the possible number of communities) to form the initial seed set S = {s1, s2, ..., s π}:

[0078] ① Arrange all nodes in descending order of node degree, and prioritize nodes with high degrees as seeds;

[0079] ② If the number of nodes contained in a seed is greater than 1, the nodes in the seed should satisfy:

[0080] Jaccard(N(i),N(j))>Φ

[0081] Where N(i) represents the set of neighbor nodes of the i-th node in the graph G, Jaccard(,) is the function for calculating the Jaccard similarity between two sets, and Φ is the similarity threshold.

[0082] (2) Extended rule definition (dynamic transition matrix of multi-hop subgraph random walk). The elements in the adjacency matrix A of the two-dimensional undirected graph G corresponding to the drug molecules are expressed as follows:

[0083]

[0084] Among them, v i Represents the i-th node. Then, the nodes in the graph G are embedded according to the interaction type to obtain the initial features of each node in the graph G, which serve as the input of the subsequent MPNN module.

[0085] When m(1) drug communities have been expanded, based on the adjacency matrix A, the random walk dynamic transition matrix P after expansion to the m(1)th drug community is constructed. m(1) :

[0086]

[0087] Among them, D is the degree matrix of the adjacency matrix A, Q m(1) is the weighted matrix after expanding to the m(1)th drug community group, and ° represents the Hadamard product. m(1) The elements in can be expressed as:

[0088]

[0089] Among them, μ1>0, 0<μ2<μ3<1, n(v i ) represents the i-th node v i The number of subordinate drug communities. Weighted matrix Q m (1) The significance of is: maintain the probability of the walker continuing to explore new nodes (nodes that have not been traversed), increase the probability of the walker leaving the current drug community cluster to explore new nodes by μ1, reduce the probability of the walker returning to the explored drug community cluster from the newly explored node by μ2, and reduce the probability of the walker entering another explored drug community cluster from one explored drug community cluster by μ3. The role of the weighted matrix is ​​to use the information of the expanded drug community cluster to guide the expansion of subsequent drug community clusters.

[0090] Relative to the starting node u, the transition probability vector after expanding m(1) drug communities is:

[0091]

[0092] Among them, I u is a vector whose uth element is 1 and the rest are 0, and α1∈(0,1) is the attenuation parameter; Represents the dynamic transition matrix of the random walk after expanding m(1) drug communities with u as the starting node.

[0093] For each node u(u∈V) in the graph G, construct a two-hop neighbor subgraph with it as the starting node Then in the subgraph Perform random walks according to the same rules above, and obtain the transition probability vector after expanding m(2) drug communities in the two-hop neighbor subgraph of node u:

[0094]

[0095] Among them, α2∈(0,1) is the attenuation parameter, is the two-hop neighbor subgraph at node u On the left, taking u as the starting node and expanding to the m(2)th drug community group, the random walk dynamic transfer matrix can be expressed as:

[0096]

[0097] in, is the two-hop neighbor subgraph of node u The adjacency matrix of is the adjacency matrix The degree matrix of is the weighted matrix after expanding to the m(2)th drug community group. The elements in It can be expressed as:

[0098]

[0099] in, Representing a subgraph The jump weight between the i-th node and the j-th node in can be expressed as:

[0100]

[0101] Among them, link2(i,j) represents the subgraph The number of links between the i-th node and the j-th node in the original graph G through a node link, N2(i) represents the subgraph The set of neighbor nodes of the i-th node in .

[0102] Similarly, and so on, we get the k-hop neighbor subgraph of each node u (u∈V) The transition probability vector after expanding m(k) drug communities is:

[0103]

[0104] Among them, I u is a vector whose uth element is 1 and the rest are 0, is the attenuation parameter. is the k-hop neighbor subgraph at node u On the left, taking u as the starting node and expanding to the m(k)th drug community group, the random walk dynamic transfer matrix can be expressed as:

[0105]

[0106] in, is the k-hop neighbor subgraph of node u The adjacency matrix of is the adjacency matrix The degree matrix of is the weighted matrix after expanding to the m(k)th drug community group. The elements in It can be expressed as:

[0107]

[0108] in, Representing a subgraph The jump weight between the i-th node and the j-th node in can be expressed as:

[0109]

[0110] Among them, link k (i,j) represents a subgraph The number of links between the i-th node and the j-th node in the original graph G through k-1 nodes, N k (i) represents a subgraph The set of neighbor nodes of the i-th node in .

[0111] Finally, the transition probability vector of the starting node u (u∈V) is:

[0112]

[0113] Among them, ω i (i=1,2,...,k) is the probability fusion weight, satisfying ω1>ω2>...>ω k >0 and ω1+ω2+...+ω k =1.

[0114] (3) Seed expansion. Define the conductivity Ψ(c) of community c in graph G:

[0115]

[0116]

[0117] Where L(c) represents the total number of external links of nodes within the community, M represents the number of edges in the graph G, and d(u) represents the degree of node u. The lower the conductivity Ψ(c) of a community c, the higher the cohesion of the community c, indicating a better community structure.

[0118] Taking conductivity as the fitness function of the drug community, for each seed s in the initial seed set S i , first from s i The nodes in the graph G start to calculate the transition probability vector in unison. Then, the transition probability vector of each node in the graph G is regarded as a point in the vector space, and the spectral clustering algorithm is used to cluster these vectors into different community groups (the spectral clustering algorithm treats the data points as vectors, then performs spectral decomposition on these vectors, and finally clusters these vectors). The input of the spectral clustering algorithm is:

[0119] P=[p(u1),p(u2),...,p(u N )] T

[0120] Among them, P represents the matrix composed of the transition probability vectors of all nodes in the graph G, and each row of the matrix represents the transition probability vector of a node; u1,u2,...,u N are the nodes in the graph G; N is the total number of nodes in the graph G; T represents the transposition operation. i Community Group i , tag community group c i All nodes in the , indicating that they belong to at least one existing community group. Each drug community group is expanded by various seeds in turn, and the π drug community groups generated by all π seeds are obtained C={c1,c2,...,c π Then, the communities with high similarity are merged:

[0121] c i =c i ∪c j stJaccard(c i ,c j )>θ

[0122] Among them, c i represents the node set of the ith community group, θ is the similarity threshold. Through fusion processing, we get n drug community groups C = {c1, c2, ..., c n}, where 0 <n≤π。

[0123] (4) Iterative update. After the multi-hop subgraph random walk first completes the extraction of the drug community clusters, all the community clusters are sorted in ascending order of conductivity, and only the first a (0 < a ≤ n) community clusters are retained. The remaining community clusters are all dissolved, and a new round of multi-hop subgraph random walk is carried out guided by the retained a community clusters. After iterating t times in this way, the final drug community clusters C = {c1, c2,..., c s}, where s is the number of the final drug community clusters.

[0124] III. Extracting the local features of drug community clusters using the first MPNN module

[0125] First, the message passing function of MPNN is optimized by weighting. Specifically, the message passing function of the original MPNN can be expressed as:

[0126]

[0127] where, is the information vector transmitted from node v to node u, is the feature vector of node u on the l-th layer; e vu is the attribute value indicating whether there is an edge between node v and node u. If there is an edge, then e vu = 1, otherwise e vu = 0.

[0128] In step II, the transition probability vector p(u) of each node u (u ∈ V) has been calculated. This vector indicates the transition probability of node u to all other nodes in the graph. The higher the transition probability of a certain node v (v ∈ V), the higher the possibility that node u and node v belong to the same drug community cluster, which also indicates that node v is more important to node u than other nodes. Therefore, the present invention proposes to use the transition probability vector p(u) of each node u (u ∈ V) to optimize the message passing function by weighting:

[0129]

[0130] where, p(u) v represents the probability of node u transferring to node v. In this way, the features transmitted from node v to node u will be weighted by the transition probability to distinguish the importance differences of different nodes at the same hop count.

[0131] Secondly, the message aggregation function of MPNN is optimized by weighting. Specifically, the message aggregation function of the original MPNN can be expressed as:

[0132]

[0133] where, N(u) is the set of neighbor nodes of node u; Represents the sum of features transmitted to node u by its l-hop neighbor nodes. Node u collects information from its neighbor nodes to update its own features. Since the messages transmitted by nodes with different hop counts also have different importance, the higher the hop count, the lower the importance should be. Therefore, consider using the probability fusion weight ω in step 2 i (i=1,2,...,k, satisfying ω1>ω2>...>ω k >0 and ω1+ω2+...+ω k =1) to perform weighted optimization on the aggregate function:

[0134]

[0135] Among them, ω l The fusion weight representing the l-th hop subgraph transition probability is weighted when aggregating the features transmitted by all l-hop nodes to distinguish the importance of nodes with different hop numbers, l = 1, 2, ..., k.

[0136] For each community group i The two-dimensional graph composed of (i=1,2,...,s) is extracted by using the MPNN after optimizing the message passing function and message aggregation function to perform message passing, message aggregation and node representation update in the following way:

[0137]

[0138]

[0139]

[0140]

[0141] in, Initialize the graph G embedded in step 1; T represents the transposition operation. Massage(·) is a message passing function used to transmit the feature information of the neighbor nodes of node u; Aggregation(·) is an aggregation function used to aggregate the feature information transmitted by all neighbor nodes of node u; Update(·) is an update function used to update the feature information of node u; Read(·) is a readout function used to extract the feature vector of the entire drug community cluster subgraph. Finally, the drug community cluster c is obtained. i The eigenvector h i (i=1,2,...,s), which corresponds to the local characteristics of the drug community.

[0142] 4. Extracting drug global features using the second MPNN module

[0143] In step 3, the feature vectors of each community cluster in a drug have been extracted. Now each community cluster is regarded as a node, and the characteristics of the node are the characteristics of the community cluster. Based on the original link relationship between the community clusters, a community cluster subgraph G' is constructed. Then, the same method as in step 3 is used to use MPNN for message passing, message aggregation and node representation update to extract the feature h of the community cluster subgraph G', which corresponds to the global feature of the drug.

[0144] Finally, the drug feature matrix is ​​composed of local features and global features of the drug, which can be expressed as H = [h1,h2,...,h s ,h] T , where h i (i=1,2,...,s) is the drug community group c i The eigenvector of , h is the eigenvector of the community group graph.

[0145] 5. DDI Prediction

[0146] Given drug x and drug y, the drug feature matrices obtained by steps 1 to 4 are represented as H x and H y , first perform a linear transformation on the feature matrix:

[0147]

[0148]

[0149] Among them, W x and W y is the learnable transformation matrix, and Represent the characteristics of drug x and drug y after linear transformation. For a given DDI type r, calculate the triplet Established rating:

[0150]

[0151] Among them, σ is the sigmoid function; ε is the weight for adjusting the importance difference between local and global features of the drug; d x and d y Represent the number of community groups of drug x and drug y respectively; represents the i-th row vector in the characteristic matrix of drug x after linear transformation, corresponding to the characteristic vector of the i-th community group of drug x, and The last row vector in the feature matrix of drug x after linear transformation corresponds to the feature vector of the community cluster subgraph of drug x; M r is the learnable representation matrix of the r-th interaction, which is restricted to a diagonal matrix. At initialization, M rThe rth diagonal element in is set to 1, and the rest of the diagonal elements are set to 0; ij ∈[0,1] is the community cross-interaction weight between the i-th community of drug x and the j-th community of drug y, which is obtained by the following processing:

[0152]

[0153] Here, softmax(·) is the softmax function and MLP(·) stands for multi-layer perceptron processing.

[0154] When the triple If the corresponding scoring function value is greater than the preset threshold, it indicates that the combination of drug x and drug y will lead to type r interaction, otherwise it indicates that it will not lead to type r interaction.

[0155] The present invention first uses multi-hop subgraph weighted random walk to detect drug community clusters to solve the problem that chemical substructures are missing or redundant and lack interpretability due to MPNN extraction of chemical substructures. Multi-hop subgraph weighted update of transition probability vectors is used to improve the accuracy of community cluster detection, and an iterative update strategy is adopted to reduce the negative impact of poor initial expansion of community clusters. Secondly, the message transfer function and message aggregation function in MPNN are weightedly optimized using the transition probability calculated by multi-hop subgraph weighted random walk and the multi-hop subgraph transition probability fusion weight to solve the problem that the importance difference of different nodes is not distinguished when the features of nodes with the same number of hops away from the central node are aggregated. Finally, the local features of drug community clusters and the global features of drugs are obtained respectively through two optimized MPNN processes to overcome the defect that the approximate function only considers the possibility of DDI from the local features of the chemical substructure.

Claims

1. A DDI prediction method based on drug community groups, characterized in that: The following steps are involved: S1. Based on the SMILES of drug molecules, use the RDKit tool to generate a two-dimensional undirected graph G = (V, E) corresponding to the drug molecules, where V is the node set, E is the edge set, and N = |V| represents the total number of nodes; S2. Detect drug communities using random walks on multi-hop subgraphs. Specifically, by seeding, the transition probability vector is calculated consistently starting from the nodes in each seed. The transition probability vector of each node in the graph G is regarded as a point in the vector space. These vectors are clustered into different communities using a spectral clustering algorithm, thereby obtaining the drug community clusters extended from each seed. The calculation method of the transition probability vector is: First, calculate the transition probability vector after m(k) drug communities are expanded in the k-hop neighbor subgraph of the starting node u using the following formula: , Among them, I u is a vector whose uth element is 1 and the rest are 0, α k ∈(0, 1) is the attenuation parameter, is the k-hop neighbor subgraph at node u On the left, take u as the starting node and expand to the m(k)th drug community group. The random walk dynamic transfer matrix is: , in, is the k-hop neighbor subgraph of node u The adjacency matrix of is the adjacency matrix A (k) The degree matrix of The weighted matrix after expansion to the m(k)th drug community group: , Among them, μ1> 0, 0< μ2< μ3< 1, n(v i ) represents the i-th node v i The number of subordinate drug communities, λu,k ij represents the subgraph The jump weight between the i-th node and the j-th node in is: , Among them, link k (i, j) represents a subgraph The number of links between the i-th node and the j-th node in the original graph G through k-1 nodes, N k (i) represents a subgraph The set of neighbor nodes of the i-th node; Finally, the transition probability vector of the starting node u is obtained as: , Among them, ω l is the probability fusion weight, satisfying ω1> ω2> ...> ω k > 0 and ω1+ ω2+ ...+ ω k =1, l= 1, 2, ..., k; The two drug community clusters whose similarity is greater than the threshold are merged to obtain n drug community clusters C={c1, c2, ..., c n }, where 0 < n ≤ π, π is the set number of seeds; the obtained n drug community clusters are sorted in ascending order of conductivity, only the first a community clusters are retained, and the rest are all dissolved. A new round of multi-hop subgraph random walk is carried out again with the retained a community clusters as guidance. After t iterations, the final drug community cluster C={c1, c2, ..., c s }, where s is the final number of drug community clusters; the conductivity is the fitness function of the drug community cluster: , , Where L(c) represents the total number of external links of nodes in the community, M represents the number of edges in the graph G, d(u) represents the degree of node u, and the lower the conductivity Ψ(c) of community c, the higher the cohesion of the community. S3. Use the first MPNN module to extract local features of drug communities: The message passing function is weightedly optimized using the transition probability vector p(u) of each node u: , in, is the information vector transmitted from node v to node u, is the information vector of node u on the (l-1)th layer, is the information vector of node v on the (l-1)th layer, Is the attribute value indicating whether there is an edge between node v and node u. If there is an edge, then ,otherwise , p(u) v represents the probability of node u transferring to node v; Use probability fusion weights to perform weighted optimization on the aggregation function: , in, is the sum of features transmitted to node u by its l-hop neighbor nodes, is the set of neighbor nodes of node u, The fusion weight representing the transfer probability of the l-th hop subgraph is weighted when aggregating the features transferred by all l-hop nodes; For each community group i The constructed two-dimensional graph uses the MPNN after optimizing the message passing function and message aggregation function to perform message passing, message aggregation and node representation update in the following way to extract graph features: , , , , Among them, the input of the MPNN module is the initial features of each node in the graph , initial features Initialized by graph G embedding, Massage(∙) is a message passing function used to transmit the feature information of neighbor nodes of node u; Aggregation(∙) is an aggregation function used to aggregate the feature information transmitted by all neighbor nodes of node u; Update(∙) is an update function used to update the feature information of node u; Read(∙) is a readout function used to extract the feature vector of the entire drug community cluster subgraph, and finally obtain the drug community cluster c i The eigenvector h i , i = 1, 2, ..., s, this feature corresponds to the local feature of the drug community, T represents the transposition operation; S4. Use the second MPNN module to extract the global characteristics of the drug: Each community cluster is regarded as a node, and the node feature is the community cluster feature. Based on the original link relationship between the community clusters, the community cluster subgraph G' is constructed. Then, the same method as in S3 is used to use MPNN for message passing, message aggregation and node representation update to extract the feature h of the community cluster subgraph G', which corresponds to the global feature of the drug. Finally, the drug feature matrix is ​​composed of local features and global features of the drug, which is expressed as H = [h1, h2, ...,h s , h] T , where h i Community Group for Drugs i The characteristic vector of , where i ranges from 1 to s, and h is the characteristic vector of the community group graph; S5, DDI prediction: Given drug x and drug y, after processing from S1 to S4, their drug feature matrices are expressed as H x and H y , first perform a linear transformation on the feature matrix: , , Among them, W x and W y is the learnable transformation matrix, and Represent the characteristics of drug x and drug y after linear transformation respectively; for a given DDI type r, calculate the triplet ( , r, ) established score: , Among them, σ is the sigmoid function; ε is the weight for adjusting the importance difference between local and global features of the drug; d x and d y Represent the number of community groups of drug x and drug y respectively; represents the i-th row vector in the characteristic matrix of drug x after linear transformation, corresponding to the characteristic vector of the i-th community group of drug x, and The last row vector in the feature matrix of drug x after linear transformation corresponds to the feature vector of the community cluster subgraph of drug x; M r is the learnable representation matrix of the r-th interaction, which is restricted to a diagonal matrix. At initialization, M r The rth diagonal element in is set to 1, and the rest of the diagonal elements are set to 0; ij ∈[0, 1] is the community cross-interaction weight between the i-th community of drug x and the j-th community of drug y, which is obtained by the following processing: , Among them, softmax(∙) is the softmax function, MLP(∙) stands for multi-layer perceptron processing; When the triple ( , r, ) is greater than the preset threshold, it indicates that the combination of drug x and drug y will lead to type r interaction, otherwise it indicates that no interaction will occur.

2. The DDI prediction method based on drug community clusters according to claim 1, characterized in that: The seed initialization method in S2 is to set the initialization rule as follows: Arrange all nodes in descending order of node degree, and prioritize nodes with high degrees as seeds; If a seed contains more than 1 node, the nodes in the seed must meet the following requirements: , Among them, N(i) represents the set of neighbor nodes of the i-th node in the graph G, is a function for calculating the Jaccard similarity between two sets N(i) and N(j), Φ is the similarity threshold; Initialize π seeds according to the initialization rules to form the initial seed set S={s1, s2, ..., s π }.

3. The DDI prediction method based on drug community clusters according to claim 1, characterized in that: The spectral clustering algorithm described in S2 is to treat the data points as vectors, then perform spectral decomposition on these vectors, and finally cluster these vectors. The input of the spectral clustering algorithm is: , Where P represents the matrix composed of the transition probability vectors of all nodes in the graph G, and each row of the matrix represents the transition probability vector of a node; are the nodes in graph G; N is the total number of nodes in graph G; T represents the transpose operation.

4. The DDI prediction method based on drug community clusters according to claim 1, characterized in that: The method for fusing two drug community clusters whose similarity is greater than a threshold in the obtained drug community clusters in S2 is: , Among them, c i represents the node set of the i-th community group, and θ is the similarity threshold.