Drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion
Through node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion, the problem of feature distribution imbalance in drug-microorganism association prediction is solved, and more accurate association prediction is achieved.
Patent Information
- Application Number
- CN202411947802.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Existing drug-microbe association prediction methods face feature distribution imbalance when processing multi-view features, making it difficult to effectively capture the complex association relationships between microorganisms and drug nodes.
A method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion is adopted. By constructing a knowledge graph and integrating entity feature representations using the Transformer model, a recursive gated meta-path semantic feature learning strategy is designed to enhance the consistency of node features and construct a drug-microorganism association model.
It effectively captures the complex association relationship between microorganisms and drug nodes, improves the accuracy of association prediction, solves the problem of feature distribution imbalance in traditional methods, and improves prediction performance.
Smart Images

Figure CN119851767B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of biological information, and particularly relates to a drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion. BACKGROUND
[0002] In recent years, deep neural network learning has made significant breakthroughs in computer vision, natural language processing and speech recognition. At the same time, in the key fields of text processing, recommendation system and financial stock price prediction, the natural language processing technology based on graph learning has shown excellent performance. First, the graph learning method allows simultaneous modeling of multiple types of relationships (such as semantic relationships), while traditional NLP methods usually only process a single type of feature, resulting in information loss. Second, the graph learning method can link scattered information through the global graph structure to form a more complete semantic representation. Finally, graph learning can obtain information from neighbor nodes through the message passing mechanism, alleviating the problem of sparse data, while the performance of traditional methods may be poor in the sparse data scenario.
[0003] At present, the method based on graph learning has been widely studied and applied in the association prediction model. However, these graph learning models generally only model the association between nodes through simple adjacency relationships, and it is difficult to capture complex relationships. In order to capture the complex relationship between nodes, researchers try to introduce a knowledge graph to capture the complex relationship between entities by establishing a knowledge graph to improve the accuracy of the association prediction model. Combined with the knowledge graph, the graph attention network (GAT) gives different weights to different neighbors to aggregate neighbor information, and is widely used in various tasks, but GAT ignores the heterogeneity of entities and the relationship between similarity and association between entities. In order to learn the context relationship between different meta-paths, the GCN network is widely used. However, this method cannot realize the long-term and high-order spatial interaction of the context between meta-paths. By introducing multi-view feature learning, the model can extract attribute information and semantic characteristics of nodes from different levels. However, the model fails to effectively balance the features under multiple perspectives, resulting in feature redundancy and information duplication.
[0004] Therefore, there is an urgent need to develop a drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion, which can aggregate the heterogeneity of entities, the complex relationship between entities and the tail entity information in the knowledge graph, as well as the context relationship between different meta-paths in space, and enhance the feature consistency of the knowledge graph perspective and the meta-path perspective, so as to effectively capture the complex association relationship between microorganisms and drug nodes and improve the accuracy of association prediction. SUMMARY
[0005] Based on the above background, the present application provides a drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion, to solve the technical problems that the current drug and microorganism association prediction method faces in dealing with multi-view features, such as feature distribution imbalance and inability to effectively capture the complex association between microorganism and drug nodes.
[0006] The present application provides a drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion, comprising:
[0007] According to the data source, a knowledge graph is constructed, and the entities of the knowledge graph are divided into drugs and microorganisms according to categories, and the feature representation of each entity is obtained according to the category feature vector and the attribute vector of each entity;
[0008] The first network model based on the Transformer model is used to integrate the multi-class contact between the feature representations of each entity, and the entity feature representation of the drug and microorganism entities is obtained;
[0009] According to the data source, a plurality of meta-paths are constructed with drugs and microorganisms as nodes, and the context contact and adjacent semantics between the plurality of meta-paths are encoded by the second network model with a recursive gate meta-path semantic feature learning strategy, to obtain the semantic representation of the nodes;
[0010] The entity feature representation of the drug and microorganism entities and the semantic representation of the nodes are input into the third network model sensitive to the node category, to enhance the consistency of the node features, and obtain a drug-microorganism association model;
[0011] The drug and microorganism to be predicted are input into the drug-microorganism association model to complete the association prediction.
[0012] Further, the feature representation of each entity is obtained according to the category feature vector and the attribute vector of each entity, comprising:
[0013] According to the similarity matrix of drugs and drugs, the similarity matrix of microorganisms and microorganisms, and the association matrix of microorganisms and drugs, the corresponding tail entity of each entity and the relationship embedding between the head entity of any entity and the corresponding tail entity are obtained;
[0014] The attribute vector, category feature vector, attribute vector of the corresponding tail entity, and relationship embedding between each entity and the corresponding tail entity of each entity of the knowledge graph constitute the feature representation of each entity of the knowledge graph.
[0015] Further, an entity category sensitive first network model based on a Transformer model is used to integrate the multi-class connections between the feature representations of each entity, and obtain the entity feature representations of the drug and microorganism entities, including:
[0016] The attribute vector and the category feature vector of each entity are spliced to obtain the attribute embedding of each entity.
[0017] The attribute vector of each tail entity and the category feature vector of the corresponding entity are spliced to obtain the attribute embedding of each tail entity.
[0018] According to the attribute embedding of each entity and the relationship embedding, a query vector of the first network model is determined.
[0019] According to the attribute embedding of each tail entity, a key vector of the first network model is obtained.
[0020] According to the query vector, the key vector and the attribute embedding value vector of each tail entity, an entity feature representation of the first network model is obtained.
[0021] According to the first loss function, the first network model is trained, and the entity feature representation of each entity is obtained by using the trained first network model.
[0022] Further, the first loss function L co is calculated as follows:
[0023]
[0024] Wherein, λ is a parameter for balancing the cross-entropy loss and the TransE loss, represents a training set of triplets, y (h,r,y) represents a triplet label, p (h,r,t) represents a predicted value of a triplet, f (h,r,t) represents an l2 norm of a triplet.
[0025] Further, according to the data source, a second network model with a recursive gating meta-path semantic feature learning strategy is used to encode the context connections between multiple meta-paths and diverse adjacency semantics, and learn the semantic representation of nodes, including:
[0026] A plurality of meta-paths are constructed, including a drug-centered meta-path and a microorganism-centered meta-path; wherein the drug-centered meta-path includes: a meta-path expressing the similarity semantics of the biological layer of indirectly connected drugs Expressing a plurality of microorganisms that are biologically associated with each other and another drug The microorganism-based meta-path includes: a meta-path expressing the similarity semantics of the biological layer between two microorganisms The meta-path expressing the similarity semantics of the biological layer between indirectly connected microorganisms Expressing a plurality of drugs that are biologically associated with each other and another microorganism
[0027] According to the data source, the neighbor information of the plurality of meta-paths is aggregated to obtain the biological semantic representation of the corresponding meta-path respectively;
[0028] The biological semantic representation of the meta-path is input into the second network model, and the semantic representation matrix is learned.
[0029] Further, the entity feature representation of the drug and microorganism entity and the semantic representation of the node are input into the third network model sensitive to the node category, the consistency of the node feature is enhanced, and a drug-microorganism association model is obtained, including:
[0030] The entity feature representation of each entity and the semantic representation of the node are input into the third network model;
[0031] An adaptive node category sensitive second loss function is calculated by the third network model;
[0032] According to the second loss function, the entity feature representation of each entity and the semantic representation matrix are iteratively updated by the third network model respectively until a preset iteration number is reached, and a drug-microorganism association model with enhanced node feature consistency is obtained.
[0033] Further, the second loss function is represented by a formula as follows:
[0034]
[0035] Wherein, N drug And N micr The number of drugs and microorganisms, sim(·) is a cosine similarity function, τ represents a temperature parameter, And Randomly generated and normalized learnable parameters, The entity feature representation and the semantic representation matrix of the entity respectively.
[0036] The application also provides a drug and microorganism association prediction system based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion, comprising:
[0037] The knowledge graph construction module is configured to construct a knowledge graph according to a data source, entities of the knowledge graph are classified into drugs and microorganisms according to category feature vectors and attribute vectors of each entity to obtain feature representations of the entities;
[0038] The feature enhancement module is configured to utilize an entity category sensitive first network model constructed based on a Transformer model to integrate multi-category connections between the feature representations of the entities to obtain entity feature representations of the drug and microorganism entities.
[0039] The meta-path construction module is configured to construct a plurality of meta-paths with drugs and microorganisms as nodes according to the data source, and encode context connections and adjacency semantics between the plurality of meta-paths by a second network model with a recursive gating meta-path semantic feature learning strategy to obtain semantic representations of the nodes.
[0040] The contrast learning module is configured to input the entity feature representations of the drugs and microorganisms and the semantic representations of the nodes into a node category sensitive third network model to enhance consistency of node features to obtain a drug-microorganism association model.
[0041] The association prediction module is configured to input drugs and microorganisms of an association relationship to be predicted into the drug-microorganism association model to complete association prediction.
[0042] The application further provides an electronic device comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the node category sensitive knowledge graph learning and drug-microorganism association prediction method based on gated enhanced meta-path semantic fusion.
[0043] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the node category sensitive knowledge graph learning and drug-microorganism association prediction method based on gated enhanced meta-path semantic fusion.
[0044] Compared with the prior art, the application has the following advantages and beneficial effects:
[0045] 1. The application constructs a knowledge graph comprising drug entities and microorganism entities, which contains the similarity relationship between microorganisms and drugs and the fact that microorganisms participate in the drug process. The knowledge graph can clearly represent entities, concepts and their relationships, and can capture complex connections through the similarity relationship and association relationship between entities, thereby enhancing the understanding ability of the model.
[0046] 2、The application integrates the multiple types of connections between the head and tail entities through an entity class sensitive knowledge graph Transformer (ECST model), which considers the entity heterogeneity and the close connection between the head entity features and the multiple types of tail entity features.
[0047] 3、Multiple meta-paths are established, which reflect the biological characteristics that microorganisms are more likely to be associated with drugs. A meta-path specific semantic feature learning strategy is designed to enable the encoding and integration of diverse adjacency semantics. The multiple meta-paths have contextual connections, and the connections between multiple meta-paths are integrated through a meta-path semantic feature learning strategy with a recurrent gate (GUMP model).
[0048] 4、A node class sensitive learning strategy (CSCL model) is used to enhance the consistency between the multi-angle features of the target drug (microorganism) node.
[0049] In the process of microorganism-drug association prediction task, the application makes full use of the heterogeneity and diversity of entities from the perspective of knowledge graph, and can effectively capture the complex association relationship between microorganism and drug nodes. In addition, it starts from the perspective of meta-path, excavates the contextual connection between multiple meta-paths, and constructs a more comprehensive semantic representation. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 The flowchart of the drug and microorganism association prediction method based on node class sensitive knowledge graph learning and gate enhanced meta-path semantic fusion provided by the application is provided.
[0051] Figure 2 The graphical data flow diagram provided by the application is provided.
[0052] Figure 3 The data processing diagram of the drug and microorganism association prediction method provided by the application is provided.
[0053] Figure 4 The structure diagram of the drug and microorganism association prediction system based on node class sensitive knowledge graph learning and gate enhanced meta-path semantic fusion provided by the application is provided.
[0054] Figure 5 The structure diagram of the electronic device provided by the application is provided. DETAILED DESCRIPTION
[0055] The preferred embodiments of the application will be specifically described below in combination with the drawings, wherein the drawings constitute a part of the application, and are used to illustrate the principles of the embodiments of the application, and are not used to limit the scope of the application.
[0056] The application provides a drug and microorganism association prediction method based on node category-sensitive knowledge graph learning and gate-enhanced meta-path semantic fusion.
[0057] Please refer to Figure 1 The embodiment provides a drug and microorganism association prediction method based on node category-sensitive knowledge graph learning and gate-enhanced meta-path semantic fusion, which comprises the following steps:
[0058] Step S101: constructing a knowledge graph according to a data source, entities of the knowledge graph are classified into drugs and microorganisms according to category feature vectors and attribute vectors of the entities, and feature representations of the entities are obtained according to the category feature vectors and the attribute vectors of the entities;
[0059] Step S102: using a first network model based on a Transformer model to integrate multi-category connections between the feature representations of the entities, and obtaining entity feature representations of drug and microorganism entities;
[0060] Step S103: constructing a plurality of meta-paths with drugs and microorganisms as nodes according to the data source, using a second network model with a recursive gate meta-path semantic feature learning strategy to encode context connections and adjacency semantics between the plurality of meta-paths, and obtaining semantic representations of the nodes;
[0061] Step S104: inputting the entity feature representations of the drugs and the microorganisms and the semantic representations of the nodes into a third network model sensitive to node categories, enhancing consistency of node features, and obtaining a drug-microorganism association model;
[0062] Step S105: inputting drugs and microorganisms of an association relationship to be predicted into the drug-microorganism association model to complete association prediction.
[0063] The method of the embodiment fully utilizes the heterogeneity and diversity of entities in the perspective of a knowledge graph in the process of a microorganism-drug association prediction task, can effectively capture complex association relationships between microorganism and drug nodes, and further mines context connections between a plurality of meta-paths from the perspective of the meta-paths, and constructs more comprehensive semantic representations. Compared with previous methods, the application particularly focuses on integrating entity features from the perspective of a knowledge graph and node semantic features from the perspective of meta-paths, and ensures consistency of the two through a contrast learning strategy. The construction of the consistency not only can improve accuracy of association prediction, but also can effectively solve the problem of unbalanced feature distribution in processing multi-perspective features in traditional methods.
[0064] As a preferred embodiment, in step S101, the feature representations of the entities are obtained according to the category feature vectors and the attribute vectors of the entities, and the method comprises the following steps:
[0065] According to the drug and drug similarity matrix, the microorganism and microorganism similarity matrix, and the microorganism and drug association matrix, the tail entity corresponding to each entity is obtained, and the relationship embedding between the head entity of any entity and the corresponding tail entity is obtained.
[0066] The attribute vector of each entity, the category feature vector, the attribute vector of the corresponding tail entity, and the relationship embedding between each entity and the corresponding tail entity constitute the feature representation of each entity of the knowledge graph.
[0067] As a preferred embodiment, in step S102, an entity category sensitive first network model constructed based on a Transformer model is used to integrate the multi-class contact between the feature representations of each entity, and the entity feature representation of the drug and microorganism entity is obtained, including:
[0068] The attribute vector and the category feature vector of each entity are spliced to obtain the attribute embedding of each entity.
[0069] The attribute vector of each tail entity and the category feature vector of the corresponding entity are spliced to obtain the attribute embedding of each tail entity.
[0070] According to the attribute embedding of each entity and the relationship embedding, the query vector of the first network model is determined.
[0071] According to the attribute embedding of each tail entity, the key vector of the first network model is obtained.
[0072] According to the query vector, the key vector, and the attribute embedding value vector of each tail entity, the entity feature vector of the first network model is obtained.
[0073] According to the first loss function, the first network model is trained, and the entity feature representation of each entity is obtained by using the trained first network model.
[0074] The detailed process of establishing a knowledge graph composed of microorganism and drug entities and learning the features of each entity by an entity category sensitive first network model constructed based on a Transformer model will be described below through a specific embodiment.
[0075] First, the knowledge graph is constructed according to the data source. Here, the data source refers to prior data provided by various experimental records, literature, databases, etc. for studying the association of drugs and microorganisms, the similarity of drug chemical substructures, the similarity of microorganisms, etc.
[0076] The constructed knowledge graph contains two entities, microorganisms and drugs, and the attributes between the two types of entities are heterogeneous. However, previous methods did not fully utilize the information of entity types. But in reality, there is a close relationship between the attributes of a drug or microorganism entity and its tail entity, so we designed an entity category sensitive Transformer (i.e., the first network model, hereinafter referred to as ECST) to encode these relationships.
[0077] Take the drug entity d i as an example to describe the updating process of the relationship characteristics of the entity. The adjacency matrix of the microorganism-drug node is B,
[0078]
[0079] where I drug (or I micr ) represents the drug (or microorganism) similarity matrix, A drug-micr represents the microorganism-drug association matrix, A T represents the transpose of A, represents the i-th row of I drug , which contains the comprehensive similarity of drug d i with all drugs, records whether there is an association between drug d i and microorganism. represents the i-th row of B, which is composed of and , the N i most similar drugs to d i and all M i microorganisms associated with them form φ k tail entities, φ k = M i +N i .
[0080] According to the entity and the corresponding tail entity, we get a set of triples:
[0081]
[0082] where r j represents the similarity or association relationship between drug entity d i and tail entity t j .
[0083] Considering the heterogeneity of d i , we connect the type feature vector of d i to its attribute vector to form the entity di Attribute embedding
[0084]
[0085] Among them, || represents splicing, X and They are the entity attribute matrix and entity type feature matrix respectively. and is randomly initialized and is learnable during training, N e and N t They represent the dimensions of the attribute vector and the type vector respectively.
[0086] Similarly, the tail entity t j Attribute embedding By connecting j The attribute vector and type feature vector get,
[0087]
[0088] in, and is a learnable vector.
[0089] Through the above processing, we obtain the feature representation of each entity in the knowledge graph, including the attribute vector of each entity, the category feature vector, the attribute vector of the corresponding tail entity, and the relationship embedding between each entity and the corresponding tail entity.
[0090] The first network model, ECST, is based on the Transformer model. In this model, the Q, K, and V vectors are core components of the self-attention mechanism, which calculates the relationship and importance between each position in the sequence. The Q, K, and V vectors are linked to the model's loss function through self-attention and backpropagation. Specifically, the Q, K, and V vectors influence the self-attention calculations, which in turn influence the model's output and the final loss function.
[0091] We will entity d i The attribute vector and t j Relational embedding Fusion to form a query vector
[0092]
[0093] in, is the dimension of the query vector, WQ is the weight matrix, is randomly initialized, it is a learnable vector, N e Dimension representing the relationship embedding.
[0094] key vector By embedding the attributes of the tail entity Performing linear transformation, we get
[0095]
[0096] Among them, W K represents the weight matrix.
[0097] Through the above and The product of the transposes forms the tail entity t j Right i The attention score is α j , then φ k Attention score of the tail entity
[0098] φ k The feature matrix of the tail entity is obtained by stacking up and down After linear transformation, we get the value matrix
[0099]
[0100] Among them, W V is the weight matrix.
[0101] Will Normalize and multiply by V to form d i The enhanced feature vector of
[0102]
[0103] Furthermore, in order to improve the expressive power of the ECST model, due to the d i The original attribute vector Contains more details, so and is formed by residual connection
[0104]
[0105] Similarly, we can obtain the relationship representation of all drug and microbial entities and form the entity feature matrix X kg , which is the entity feature representation of the entity.
[0106] As a preferred embodiment, the first loss function L co The calculation formula is:
[0107]
[0108] Wherein, Ω represents the training set of triplets, λ represents the parameter for balancing cross-entropy loss and TransE loss, λ is generally set to 0.1, y (h,r,t) represents the triplet label, p (h,r,t) represents the predicted value of the triplet, f (h,r,t) represents the l2 norm of the triplet.
[0109] On the other hand, there is similarity and association between drugs and microorganisms, and these semantics can reflect the biological meaning of drug and microorganism nodes. As a preferred embodiment, in step S103, according to the data source, the context connection between multiple meta-paths and the diverse adjacency semantics are encoded by the second network model with a recursive gating meta-path semantic feature learning strategy, and the semantic representation of the node is learned, including:
[0110] A plurality of meta-paths are constructed, including drug-centered meta-paths and microorganism-centered meta-paths; wherein the drug-centered meta-paths include: The meta-path expressing the similarity semantics of indirectly connected drugs at the biological level The meta-path expressing a plurality of microorganisms that are biologically associated with any drug and another drug The microorganism-centered meta-paths include: The meta-path expressing the similarity semantics of indirectly connected microorganisms at the biological level The meta-path expressing a plurality of drugs that are biologically associated with any microorganism and another microorganism
[0111] According to the data source, the neighbor information of the plurality of meta-paths is aggregated to obtain the biological semantic representation of the corresponding meta-path respectively;
[0112] The biological semantic representation of the meta-path is input into the second network model, and the semantic representation matrix is learned.
[0113] The biological semantic learning process of the second network model with a recursive gating meta-path semantic feature learning strategy (GUMP model) for the meta-path And The biological semantic learning process is similar, as a specific embodiment, we take the meta-path For example, describe the drug d i The learning process of biological semantic representation.
[0114] For meta paths In terms of any drug d i The node d it can reach j The node neighbor set is Target drug i Similarity vector between its second-order drug neighbors It can be expressed as:
[0115]
[0116] Among them, N drug is the amount of drug, Contains the similarity of all first-order drug neighbors. Based on meta-path Aggregating the meta-path neighbors of all second-order drugs, we obtain the semantic representation under this meta-path
[0117]
[0118] Among them, B drug The first N of B drug OK, is the drug feature matrix, N micr Indicates the number of microorganisms.
[0119] In order to get d i For more representative feature vectors, we target the metapath Establish its unique fully connected neural network. is input into the neural network to learn d i Low-dimensional representation of
[0120]
[0121] in, and are weight matrix and bias vector respectively, N ph Represents the dimension of the feature space.
[0122] Will and as well as and As the input of the second network model, in order to fuse d i Three biological semantic representations of and It is stacked in the spatial dimension and its channel number is increased to 2C by 1×1 convolution.
[0123] Z is divided into C / 4, C / 4, C / 2 and C at the channel level, respectively and We encode the context association by recursive gated convolution and The gated convolution is recursively performed to form d i The feature vector of d
[0124]
[0125] wherein, and are the weight matrix and bias vector, respectively. After the context association enhancement of the three meta-path, the semantic representation vector of d i is,
[0126]
[0127] wherein, W c and b c are the weight matrix and bias vector, respectively.
[0128] Similar to the semantic representation learning process of d i , we can obtain the semantic representation matrix P se of all drug and microorganism nodes.
[0129] As a preferred embodiment, the entity feature representation of the drug and microorganism entities and the semantic representation of the nodes are input into a node class-sensitive third network model (CSCL model) to enhance the consistency of the node features, and a drug-microorganism association model is obtained, comprising:
[0130] The entity feature representation of each entity and the semantic representation of the nodes are input into the third network model;
[0131] An adaptive node class-sensitive second loss function is calculated by the third network model;
[0132] According to the second loss function, the entity feature representation of each entity and the semantic representation matrix are iteratively updated by the third network model in reverse propagation, until a preset number of iterations is reached, and a drug-microorganism association model with enhanced node feature consistency is obtained.
[0133] As a preferred embodiment, the second loss function is represented by the formula:
[0134]
[0135] wherein N drug and N micr are the number of drugs and microorganisms, respectively, sim(·) is the cosine similarity function, and τ represents the temperature parameter, and are randomly generated and normalized learnable parameters, denote the entity feature representation and semantic representation matrix of the entity, respectively.
[0136] As shown in Figure 2 , a complete schematic flow of the method of the present application is shown. Figure 2
[0137] In order to more clearly illustrate the complete processing flow of the present application, the actual computer implementation process is shown below in combination with Figure 3 , and the specific steps are as follows:
[0138] S1, input the original data and the first, second and third network models f ECST , f GUMP , and f CSCL ;
[0139] S2, build a knowledge graph, including head entity d i , relation r j , and tail entity t j , and simultaneously obtain N i most similar drugs to d i and all M i microorganisms associated therewith to form φ k tail entities, φ k = N i + M i ;
[0140] S3, initialize the feature vector, including entity original embedding relation embedding , and entity category embedding
[0141] S4, start training according to the given number of iterations T, initialize the initial value t = 0, and the original embedding
[0142] S5, take the head entity original embedding relation embedding , and φ k tail entity original embedding , as well as the entity category embedding as the input of the machine learning model f ECST , calculate the first loss function L co , and then perform back propagation to update the feature vector of the target head entity wherein represents the target head entity d at the training round t i ;
[0143] S6, after T rounds of training, the loop is ended to obtain the target head entity feature Similarly, the feature matrix X of all head entities is obtained kg ;
[0144] S7, a plurality of meta-paths are constructed, including a drug-centered and a microorganism-centered
[0145] S8, the original data containing the drug similarity matrix D, the microorganism similarity matrix M and the drug-microorganism association matrix A are taken as inputs, and the neighbor information is aggregated according to the constructed plurality of meta-paths to obtain the biological semantic representation corresponding to the meta-path, including and and and wherein i = 1, 2, …, N drug and j = 1, 2, …, N micr ;
[0146] S9, taking and and and as the input of machine learning f GUMP , the semantic representation matrix P se is learned;
[0147] S10, taking the entity feature matrix X kg and the semantic representation matrix P se as the input of machine learning f CSCL , a second loss function L sensitive to adaptive node categories is calculated cl , and then back propagation is performed to update the entity feature matrix X kg and the semantic representation matrix P se respectively;
[0148] S11, after T rounds of training, the entity feature matrix X kg and the semantic representation matrix P se are returned respectively.
[0149] The method not only learns the entity features and node semantics of drugs and microorganisms from the perspectives of knowledge graph and meta-path, but also balances the feature information from multiple perspectives through the node category sensitive contrast learning strategy.
[0150] To verify the actual effect of the present application, as shown in Table 1, first, by means of ablation experiments, a data set composed of 1373 drugs is used to calculate the AUC and AUPR values on the data set to evaluate the performance of the model in the drug prediction task.
[0151] The ablation experiment can help us systematically evaluate the role of each component or module in the model. ECST, GUMP and CSCL in Table 1 represent the first, second and third network models in the above scheme respectively. From the experimental results in Table 1, it can be seen that ECST contributes the most to the performance improvement of the model, because the entity class sensitive Transformer model designed by us can effectively integrate the dependencies between multiple types of entity attributes.
[0152] Table 1 Comparison of ablation experiment results
[0153]
[0154] Table 2 shows the comparison of the correlation model (hereinafter referred to as KNDM) proposed by the present application with five advanced drug-microorganism correlation prediction methods, including GCNMD, EGATMDA, GSAMDA, SCSMDA, GACNNMDA, NGMDA, MFLP and DHDMP.
[0155] Table 2 Comparison of prediction results of KNDM and other models
[0156]
[0157] It can be seen that KNDM achieves the best average AUC (AUC = 0.969), which is 6.6%, 2.9%, 6.7%, 5.3%, 12.6%, 2.5%, 2.3% and 1.0% higher than GCNMDA, EGATMDA, GACNNMDA, GSAMDA, SCSMDA, NGMDA, MFLP and DHDMP respectively. KNDM achieves the highest average AUPR of 86.9%, which is 4.6% higher than the second best DHDMP, 67.3% better than the worst GACNNMDA, and 55.4%, 56.2%, 62.2%, 52.9%, 14.1% and 10.2% higher than GCNMDA, EGATMDA, GSAMDA, SCSMDA, NGMDA and MFLP respectively.
[0158] The experimental results show that the improvement of the prediction performance of KNDM is mainly because the semantic relationship of the meta-path context is encoded and the close relationship between entity features is integrated and the consistency of the features under multiple perspectives is enhanced.
[0159] Further, the Wilcoxon test results of KNDM and other models are compared, and the AUCs and AUPRs of 1373 drugs are compared. The experimental results are shown in Table 3. As can be seen from Table 3, the performance of KNDM is significantly higher than that of the compared methods because the p-value is less than 0.05.
[0160] Table 3 Comparison of Wilcoxon test results
[0161]
[0162] Compared with traditional association prediction methods, the present application can further demonstrate the application of our strategy in screening potential drug-related microbial candidates through case studies of curcumin, green tea polyphenols and ciprofloxacin. This strategy makes full use of the heterogeneity and diversity of entities under the knowledge graph perspective, as well as the contextual connections between multiple meta-paths under the meta-path perspective. In addition, previous methods do not integrate the consistency of entity features from the knowledge graph perspective and node semantic features from the meta-path perspective.
[0163] As Figure 4 shown, the embodiment of the present application also provides a drug and microorganism association prediction system 400 based on node category-sensitive knowledge graph learning and gate-enhanced meta-path semantic fusion, comprising:
[0164] A knowledge graph construction module 401 is configured to construct a knowledge graph according to a data source, wherein the entities of the knowledge graph are classified into drugs and microorganisms according to category, and the feature representation of each entity is obtained according to the category feature vector and the attribute vector of each entity;
[0165] A feature enhancement module 402 is configured to integrate the multi-class connections between the feature representations of each entity by using a first network model based on a Transformer model, and obtain the entity feature representation of the drug and microorganism entities;
[0166] A meta-path construction module 403 is configured to construct a plurality of meta-paths with drugs and microorganisms as nodes according to the data source, and encode the contextual connections and adjacency semantics between the plurality of meta-paths by using a second network model with a recursive gate meta-path semantic feature learning strategy, to obtain the semantic representation of the nodes;
[0167] A contrast learning module 404 is configured to input the entity feature representation of the drug and microorganism entities and the semantic representation of the nodes into a third network model sensitive to node categories, to enhance the consistency of node features, and obtain a drug-microorganism association model;
[0168] The association prediction module 405 is used to input the drugs and microorganisms whose association relationships are to be predicted into the drug-microorganism association model to complete the association prediction.
[0169] like Figure 5 As shown above, the present invention also provides a method for drug-microbe association prediction based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion. The electronic device 500 can be a computing device such as a mobile terminal, desktop computer, notebook, PDA, or server. The electronic device includes a processor 501, a memory 502, and a display 503.
[0170] In some embodiments, the memory 502 may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 502 may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped with the computer device. Furthermore, the memory 502 may include both an internal storage unit of the computer device and an external storage device. The memory 502 is used to store application software installed in the computer device and various types of data, such as program code installed in the computer device. The memory 502 may also be used to temporarily store data that has been output or is about to be output. In one embodiment, a drug and microorganism association prediction method program 504 based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion is stored on the memory 502. The drug and microorganism association prediction method program 504 based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion can be executed by the processor 501, thereby realizing a drug and microorganism association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion according to each embodiment of the present invention.
[0171] In some embodiments, the processor 501 can be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run the program code or process data stored in the memory 502, such as executing a drug and microorganism association prediction method program based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion.
[0172] The display 503 can be, in some embodiments, an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, and the like. The display 503 is used to display information of the computer device and to display a visualized user interface. The components 501-503 of the computer device communicate with each other through a system bus.
[0173] The embodiment also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion.
[0174] The computer readable storage medium and the computer device provided by the above embodiment of the application can be implemented by referring to the content described in detail in the drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion, and have similar beneficial effects to the drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion, which will not be described here.
[0175] In summary, the drug and microorganism association prediction method based on node category sensitive knowledge graph learning and gate enhanced meta-path semantic fusion provided by the application firstly establishes a knowledge graph composed of microorganism and drug entities, secondly designs an entity category sensitive Transformer (ECST) to learn the features of each entity, thirdly designs a meta-path semantic feature learning model (GUMP) with a recursive gate, learns the biological semantics specific to the meta-path through a meta-path specific semantic feature learning strategy, and learns the context relationship between the features learned for the target drug (or microorganism) node and the multiple meta-paths. Finally, a node category sensitive contrast learning strategy (CSCL) is designed to adaptively enhance the consistency of entity features and semantic features.
[0176] By integrating the entity features from the perspective of the knowledge graph and the node semantic features from the perspective of the meta-path, and using the contrast learning strategy to ensure the consistency of the two, the consistency is constructed, which not only improves the accuracy of the association prediction, but also effectively solves the problem of feature distribution imbalance faced by traditional methods when processing multi-perspective features.
[0177] The above merely describes preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A drug-microbe association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion, characterized by: include: A knowledge graph is constructed based on a data source, wherein entities in the knowledge graph are classified into drugs and microorganisms by category, and a feature representation of each entity is obtained based on the category feature vector and attribute vector of each entity; wherein the feature representation of each entity is obtained based on the category feature vector and attribute vector of each entity, including: obtaining the tail entity corresponding to each entity and the relationship embedding between the head entity and the corresponding tail entity of any entity based on a similarity matrix between drugs, a similarity matrix between microorganisms, and an association matrix between microorganisms and drugs; the attribute vector of each entity, the category feature vector, the attribute vector of the corresponding tail entity, and the relationship embedding between each entity and the corresponding tail entity constitute the feature representation of each entity in the knowledge graph; Using the entity category-sensitive first network model built based on the Transformer model, we integrated the multi-category connections between the feature representations of each entity to obtain the entity feature representations of drug and microbial entities. According to the data source, multiple meta-paths are constructed with drugs and microorganisms as nodes respectively, and the contextual connections and adjacency semantics between the multiple meta-paths are encoded through a second network model with a recursive gating meta-path semantic feature learning strategy to obtain the semantic representation of the nodes; according to the data source, the contextual connections and diverse adjacency semantics between the multiple meta-paths are encoded through a second network model with a recursive gating meta-path semantic feature learning strategy to learn the semantic representation of the nodes, including: constructing multiple meta-paths, the meta-paths including meta-paths with drugs as the core and meta-paths with microorganisms as the core; wherein the meta-path with drugs as the core includes: meta-paths that express the biological similarity semantics between two drugs , a meta-path that expresses the semantic similarity of indirectly connected drugs at the biological level , metapathways expressing multiple microorganisms that are biologically co-associated with either drug ; The meta-path with microorganisms as the core includes: meta-paths that express the semantic similarity between two microorganisms at the biological level , a metapath that expresses the similarity semantics of indirectly connected microorganisms at the biological level , metapathways expressing multiple drugs that are biologically related to any microorganism and another microorganism ; According to the data source, aggregating the neighbor information of the plurality of meta-paths to obtain biological semantic representations of the corresponding meta-paths; inputting the biological semantic representations of the meta-paths into the second network model to learn and obtain a semantic representation matrix; Inputting the entity feature representations of the drug and microorganism entities and the semantic representations of the nodes into a node category-sensitive third network model to enhance the consistency of node features and obtain a drug-microorganism association model; The drug and microorganism whose association relationship is to be predicted are input into the drug-microorganism association model to complete the association prediction.
2. The drug-microbe association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion according to claim 1 is characterized in that: Using the entity category-sensitive first network model built based on the Transformer model, we integrated the multi-category connections between the feature representations of each entity to obtain the entity feature representations of drug and microbial entities, including: Concatenate the attribute vectors and category feature vectors of each entity to obtain attribute embeddings of each entity; Concatenate the attribute vector of each tail entity and the category feature vector of the corresponding entity to obtain the attribute embedding of each tail entity; Determining a query vector of the first network model based on the attribute embeddings of the entities and the relationship embeddings; Obtaining a key vector of the first network model according to the attribute embedding of each tail entity; Obtaining an entity feature representation value vector of the first network model according to the query vector, the key vector, and the attribute embedding value vector of each tail entity; The first network model is trained according to a first loss function, and the entity feature representation of each entity is obtained using the trained first network model.
3. The drug-microbe association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion according to claim 2 is characterized in that: The first loss function The calculation formula is: in, is a parameter used to balance the cross entropy loss and TransE loss, representing the set of training set triplets, represents a triplet label, represents the predicted value of the triple, Represents a triple norm.
4. The drug-microbe association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion according to claim 1 is characterized in that: The entity feature representations of the drug and microorganism entities and the semantic representations of the nodes are input into a node category-sensitive third network model to enhance the consistency of node features, thereby obtaining a drug-microorganism association model, including: Inputting the entity feature representation of each entity and the semantic representation of the node into the third network model; Calculating an adaptive node category-sensitive second loss function through the third network model; According to the second loss function, the entity feature representation and semantic representation matrix of each entity are iteratively updated by back propagation of the third network model until a preset number of iterations is reached, thereby obtaining a drug-microorganism association model with enhanced node feature consistency.
5. The drug-microbe association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion according to claim 4 is characterized in that: The second loss function is expressed as follows: in, and are the number of drugs and microorganisms, is the cosine similarity function, represents the temperature parameter, and are randomly generated and normalized learnable parameters, Represent the entity feature representation and semantic representation matrix of the entity respectively.
6. A drug and microbial association prediction system based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion, characterized by: include: A knowledge graph construction module is used to construct a knowledge graph based on a data source, wherein the entities of the knowledge graph are classified into drugs and microorganisms by category, and a feature representation of each entity is obtained based on the category feature vector and attribute vector of each entity; wherein the feature representation of each entity is obtained based on the category feature vector and attribute vector of each entity, including: obtaining the tail entity corresponding to each entity and the relationship embedding between the head entity and the corresponding tail entity of any entity based on the similarity matrix between drugs and drugs, the similarity matrix between microorganisms and microorganisms, and the association matrix between microorganisms and drugs; the attribute vector of each entity, the category feature vector, the attribute vector of the corresponding tail entity, and the relationship embedding between each entity and the corresponding tail entity constitute the feature representation of each entity in the knowledge graph; The feature enhancement module is used to integrate the multi-category connections between the feature representations of each entity using the entity category-sensitive first network model built based on the Transformer model to obtain the entity feature representations of drug and microbial entities; A meta-path construction module is used to construct multiple meta-paths with drugs and microorganisms as nodes according to the data source, and encode the contextual connections and adjacency semantics between the multiple meta-paths through a second network model with a recursive gating meta-path semantic feature learning strategy to obtain the semantic representation of the nodes; according to the data source, the second network model with a recursive gating meta-path semantic feature learning strategy is used to encode the contextual connections and diverse adjacency semantics between the multiple meta-paths and learn the semantic representation of the nodes, including: constructing multiple meta-paths, the meta-paths including meta-paths with drugs as the core and meta-paths with microorganisms as the core; wherein the meta-path with drugs as the core includes: meta-paths that express the biological similarity semantics between two drugs , a meta-path that expresses the semantic similarity of indirectly connected drugs at the biological level , metapathways expressing multiple microorganisms that are biologically co-associated with either drug ; The meta-path with microorganisms as the core includes: meta-paths that express the semantic similarity between two microorganisms at the biological level , a metapath that expresses the similarity semantics of indirectly connected microorganisms at the biological level , metapathways expressing multiple drugs that are biologically related to any microorganism and another microorganism ; According to the data source, aggregating the neighbor information of the plurality of meta-paths to obtain biological semantic representations of the corresponding meta-paths; inputting the biological semantic representations of the meta-paths into the second network model to learn and obtain a semantic representation matrix; a contrastive learning module, configured to input the entity feature representations of the drug and microorganism entities and the semantic representations of the nodes into a node category-sensitive third network model to enhance the consistency of node features and obtain a drug-microorganism association model; The association prediction module is used to input the drugs and microorganisms whose association relationships are to be predicted into the drug-microorganism association model to complete the association prediction.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored on the memory, and when the computer program is executed by the processor, a drug and microorganism association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion as described in any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the drug and microorganism association prediction method based on node category-sensitive knowledge graph learning and gated enhanced meta-path semantic fusion as described in any one of claims 1-5.