An artificial intelligence-based disease-drug-gene triple prediction method and system
By employing a collaborative design of location-aware graph encoding and multi-view comparative learning, the accuracy and robustness issues of disease drug gene triplet prediction in biomedical knowledge graphs are addressed, the ability to identify rare motifs is improved, and more efficient triplet motif prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
- Filing Date
- 2026-03-20
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for predicting disease-drug-gene triplet relationships in biomedical knowledge graphs suffer from problems such as insufficient prediction accuracy, poor model robustness, difficulty in modeling long-range dependencies, low accuracy in rare motif identification, and insufficient feature extraction.
A collaborative design of location-aware graph coding, multi-branch feature extraction, and multi-view comparative learning is adopted. By fusing global topology and node location information through Laplacian location coding, graph convolutional coding, and Transformer layers, combined with multi-branch feature extraction and multi-view comparative learning, the prediction accuracy and robustness of the model are improved.
It improves the accuracy of disease drug gene triplet prediction, enhances the ability to identify rare motifs, improves the robustness of the model and the ability to model complex topological structures, and solves the problems of contextual information redundancy and class imbalance in traditional methods.
Smart Images

Figure CN121884960B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of biomedical knowledge graphs, specifically to an artificial intelligence-based method and system for predicting disease drug gene triples. Background Technology
[0002] In biomedical knowledge graphs (BKGs), the relationships between diseases, drugs, and genes (or proteins) are high-frequency edge types, aiding in the understanding of complex biological processes. The structural patterns formed between these three entities are called triplet motifs, and the pairwise relationships between them contain rich pharmacological mechanisms. Triplet prediction characterizes the structural relationship patterns between the three entities of disease, drug, and gene. Based on edge connections, triplets can be classified into seven motif types. These relationship patterns help understand drug action mechanisms, disease pathogenesis, and their interrelationships, playing a crucial role in discovering new pharmacological mechanisms, drug retargeting, and precision medicine. Furthermore, the absence of relationships in triplets may represent biological blockages, which are equally important for medical research. For example, a drug may treat a disease but not act on a specific gene, or a gene may be associated with a disease but not regulated by a specific drug.
[0003] In traditional biomedical research, exploring the relationships between disease-causing genes typically requires large-scale experimental validation, such as drug screening and gene knockout experiments. In recent years, the rapid development of biomedical knowledge graphs (BKGs) has enabled the integration of multi-source heterogeneous data while preserving complex relationships between entities. However, the high cost and time-consuming nature of such experimental validation limit its application in larger-scale drug discovery. In contrast, computational prediction models built upon existing knowledge graph data are more efficient, and the graphs contain rich topological and semantic information, which remains largely untapped. Therefore, mining triple motifs from knowledge graphs is a convenient and feasible approach.
[0004] Since triplet relationships cannot be inferred through simple combination rules, researchers have proposed several graph neural network methods to predict triplet relationships. N2V-MLP extracts long-distance dependency features of nodes using Node2Vec and inputs them into an MLP for prediction; TriSAGE utilizes the neighborhood sampling aggregation mechanism of GraphSAGE to learn node embeddings of a triangular structure; MCHNN proposes a multi-view hypergraph contrastive learning method to extract robust node features to address the sparse triplet problem; TriMoGCL further proposes a graph contrastive learning method that uses a GCN+ contrastive learning mechanism to effectively extract node features and graph structure information to predict the motif category in triplets.
[0005] Although numerous methods have been developed to predict complex relationships between triples, further improvements are needed in prediction accuracy and model robustness. Firstly, traditional graph neural networks struggle to effectively model long-range dependencies and are poorly suited for large-diameter graphs or sparsely connected triples. Secondly, their robustness is insufficient, making them susceptible to the redundancy of contextual information in dense networks. Thirdly, triple motifs suffer from class imbalance, resulting in low accuracy in identifying rare motifs. Fourthly, the feature extraction process fails to fully integrate global topology and local interaction information, leading to room for improvement in prediction accuracy. Summary of the Invention
[0006] The purpose of this invention is to provide an artificial intelligence-based method for predicting disease drug gene triples. Through the collaborative design of location-aware graph encoding, multi-branch feature extraction, and multi-view comparative learning, it achieves more efficient and accurate triple motif prediction, while improving model robustness and the ability to identify rare motifs.
[0007] To achieve the above objectives, the present invention employs the following technical solution:
[0008] An artificial intelligence-based method for predicting disease drug gene triples includes the following steps:
[0009] S1. Data Preprocessing: Obtain a biomedical knowledge graph dataset containing diseases, drugs, and genes. Extract three types of association edges between the three entities: disease-drug, gene-disease, and drug-gene, to construct a set of triples. Divide the set of triples into modalities of a preset type. Use an edge uniqueness sampling strategy to process the set of triples to ensure that each edge appears in only one triple. Then divide the dataset according to the needs of multi-class and binary classification tasks. Construct initial feature nodes for diseases, drugs, and genes respectively. Align the node features of different dimensions to obtain a node feature matrix of a unified dimension.
[0010] S2, Position-aware graph encoding: The node feature matrix of the unified dimension and the edge index of the knowledge graph are input into the position-aware graph encoding module. Through the synergistic effect of Laplacian position encoding, graph convolutional encoding and Transformer layer, an enhanced node representation that integrates global topology and node position information is obtained.
[0011] S3. Multi-branch feature extraction: Based on the enhanced node representation, the multi-branch feature extraction module generates graph-level representation, motif embedding and its classification logic, and triplet representation from three parallel perspectives. The triplet features are obtained by fusing global context information and local interaction information.
[0012] S4. Multi-view comparison learning: Generate an enhanced image for comparison through graph enhancement operations, and perform multi-dimensional comparison learning between the enhanced image and the original image view;
[0013] S5. Classification Prediction and Model Optimization: Input the disease drug gene triplet features into the classifier and output the motif type prediction result of the triplet; optimize the model parameters based on the joint loss function, which at least integrates classification loss and contrastive learning loss.
[0014] Furthermore, the construction of the initial feature matrix in step S1 includes: for disease entities, calculating the similarity matrix between diseases based on the directed acyclic graph of MESH to obtain disease features; for drug entities, obtaining drug features based on molecular structure description information through a pre-trained molecular feature extraction model; for gene entities, obtaining gene features based on genomic sequence information through a pre-trained genomic feature extraction model; and finally, zero-padding is performed on the short-dimensional features to align them to the maximum dimension, resulting in a unified initial feature matrix.
[0015] Furthermore, the Laplace position encoding implementation steps in step S2 include:
[0016] The Laplacian matrix is calculated based on the edge information. The Laplacian matrix is then decomposed to obtain the eigenvalue diagonal matrix and the corresponding eigenvector matrix. The eigenvectors corresponding to the first k smallest non-zero eigenvalues are selected as the original position codes. After L2 normalization and linear mapping, they are concatenated with the initial feature matrix to obtain the enhanced features. The enhanced features are then batch normalized.
[0017] Furthermore, the graph convolutional encoding in step S2 adopts a graph convolutional network (GCN), which aggregates the 1-hop and 2-hop neighborhood information of nodes through two layers of convolutional operations; the long-range dependency capture unit is a Transformer unit, which calculates the long-range association weights between nodes through a multi-head attention mechanism and aggregates the node association information at any distance.
[0018] Further, in step S3, the multi-branch includes:
[0019] Global attention pooling branch: The importance score of each node is calculated through two layers of MLP, and after softmax normalization, the node features are weighted and summed to generate a graph-level representation that encodes global semantic information;
[0020] Motif-aware encoding branch: The node representation is enhanced by two layers of MLP processing to obtain the motif-assisted embedding, which is then input into a linear classifier for node-level pseudo-label prediction. The pseudo-label is an identifier for whether a node appears in a positive sample triplet.
[0021] Triple pooling branch: The features of the three entities in the triple are concatenated by node pooling and global context features are extracted by MLP. The entity pair difference vector is calculated by edge pooling and local interaction features are extracted by mapping function. The global context features and local interaction features are concatenated and linearly transformed to obtain triple features.
[0022] Further, in step S4, the graph augmentation operation involves randomly discarding some edges in the knowledge graph, and the multi-dimensional contrastive learning includes at least one of the following:
[0023] Node-level contrastive learning: L2 normalization and cosine similarity calculation are performed on the representations of the same node in the original image and the augmented image to construct a symmetrical node contrastive loss, including contrastive losses in two directions: querying the augmented image view from the original image view and querying the original image view from the augmented image view.
[0024] Class prototype contrastive learning: Calculate the prototype representation of each motif category, construct the class prototype contrastive loss to ensure that the prototype of the same category remains consistent under different views and that prototypes of different categories can be distinguished from each other, and obtain the total class prototype contrastive loss by weighted summation of all categories;
[0025] Graph-subgraph contrast learning: (1) For multi-class classification tasks, compare the global graph-level representation with the triple representation in the batch: first, perform L2 normalization on the representation, then calculate the graph-subgraph contrast loss for each triple in the batch, and then average all triples in the batch to obtain the total graph-subgraph contrast loss; (2) For binary classification tasks, compare the graph-level representation of the original graph with the graph-level representation of the augmented graph: first, perform L2 normalization on the two graph-level representations, and then calculate the graph-subgraph contrast loss.
[0026] Further, in step S5, the classifier is a single-layer linear transformation, and the output of the classifier is normalized by softmax to obtain the probability distribution of the phantom category; the joint loss function calculates the prediction loss of the main task through cross-entropy loss; for multi-class tasks, the joint loss function includes the classification loss of the original image and the augmented image, the weighted class prototype comparison loss, and the graph-subgraph comparison loss; for binary classification tasks, the joint loss function includes the classification loss of the original image and the augmented image, the node comparison loss, the graph-subgraph comparison loss, and the phantom classification auxiliary loss.
[0027] Furthermore, the preset type of phantom in step S1 includes 7 phantom types: triangle pattern, star pattern and unilateral pattern. The star pattern includes disease-centered star pattern, drug-centered star pattern and gene-centered star pattern. The unilateral pattern includes drug-disease, gene-disease and drug-gene unilateral association.
[0028] The division of the dataset according to task requirements includes: for multi-class classification tasks, the triples of each modality are divided into training set, validation set and test set according to the proportion; for binary classification tasks, the triples of each modality are used as positive samples and the triples of the other 6 modalities are used as negative samples for leave-one-out cross-validation.
[0029] Furthermore, in step S5, the Adam optimizer is configured and the evaluation metrics are selected and calculated. For multi-class classification tasks, four metrics are used: Micro-F1, Macro-AUC, Macro-F1, and Accuracy. For binary classification tasks, five metrics are used: AUC, AUPR, Precision, Recall, and F1-score. Each of the seven motif types is validated and evaluated on a class-by-class basis.
[0030] An artificial intelligence-based disease drug gene triplet prediction system includes:
[0031] Data preprocessing module: used to construct, sample, partition, and align datasets;
[0032] Location-aware graph encoding module: used to output enhanced node representations;
[0033] Multi-branch feature extraction module: used to extract graph-level representations, motif-assisted embeddings, and triplet features;
[0034] Multi-perspective comparative learning module: used to achieve multi-dimensional comparative learning;
[0035] Classification prediction module: Used to output prediction results and optimize the model.
[0036] The advantages of this invention are:
[0037] By using Laplacian positional encoding, the model can perceive the structural position of nodes in the graph, which makes up for the deficiency of traditional GNNs in not being able to distinguish nodes with similar structures but different positions. This provides rich prior information on position for subsequent feature learning and improves the model's ability to model complex topological structures.
[0038] GCN Layered convolution can only aggregate Skipping neighbor information is insufficient for capturing long-range dependencies in large-diameter graphs or sparsely connected triples. TransformerConv's self-attention mechanism, combined with Laplacian positional encoding, enables each node to directly attend to any node in the graph, effectively modeling long-range dependencies and improving prediction capabilities.
[0039] The global pooling module generates a graph-level representation through attention-weighted aggregation, which encodes the global semantic information of the entire graph. In graph-subgraph contrastive learning, this representation is used as an anchor point to guide triplet feature learning to maintain consistency with the global topology, thereby enhancing the model's understanding of the overall structural patterns.
[0040] Motif-driven multiple contrastive learning forces the model to learn feature representations that are insensitive to graph structure perturbations by comparing the original and augmented graphs. This effectively solves the problem of contextual information redundancy in dense networks. At the same time, the symmetric contrastive loss (bidirectional optimization) further enhances the discriminativeness and consistency of the features.
[0041] Weighted prototypal contrastive learning specifically addresses the motif class imbalance problem in MC tasks. By assigning higher weights to rare motifs, the model pays more attention to prototype learning of rare classes during training, avoiding the problem of the model being biased towards the majority class and significantly improving the recognition accuracy of rare motifs (such as triangle patterns).
[0042] The motif-aware auxiliary classifier provides additional supervision signals through node-level auxiliary tasks, guiding the model to learn which nodes are more likely to participate in positive sample triples. This multi-task learning mechanism forms a synergistic optimization with the triple classification of the main task, enhancing the discriminativeness of node representations and further improving the overall prediction performance. Attached Figure Description
[0043] Figure 1 This is a flowchart of the disease drug gene triplet prediction method of the present invention;
[0044] Figure 2 This is a flowchart of the position-aware map encoder of the present invention;
[0045] Figure 3 This is a flowchart of the multi-branch feature extraction module of the present invention;
[0046] Figure 4 This is a flowchart of the phantom-driven contrast learning module of the present invention;
[0047] Figure 5 This is a flowchart of the gene dimension encoding process of the present invention. Detailed Implementation
[0048] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0049] This embodiment evaluates and validates an AI-based disease drug-gene triplet prediction method on two publicly available biomedical knowledge graph datasets: (i) Drug Repurposing Knowledge Graph (DRKG), which contains 2157 disease nodes, 2908 drug nodes, and 9809 gene nodes; and (ii) Multi-scale interactome (MS) network, which contains 694 disease nodes, 1272 drug nodes, and 4519 gene nodes.
[0050] S1. Filter and sample the dataset. For each dataset, extract three types of edges from the knowledge graph: disease-drug, gene-disease, and drug-gene, and construct a set of triples. Following the partitioning method in TriMoGCL, the triples are divided into 7 motif types according to structural patterns: triangle pattern. (Triangle), Star Pattern (Disease-star) (Drug-star) (Gene-star), unilateral mode (Drug-Disease) (Gene-Disease) (Drug-Gene). A random sampling strategy is used to avoid edge duplication, ensuring that each edge appears in only one triplet, and 10 independent samples are taken and the average is taken to evaluate the robustness of the model.
[0051] S2. Dataset Partitioning. For multi-class classification (MC) tasks, the triples for each motif are proportionally divided into training, validation, and test sets. For binary classification (BC) tasks, for each motif... The triples of the three motifs were used as positive samples, and the triples of the other six motifs were used as negative samples for leave-one-out cross-validation.
[0052] S3. Initial Node Feature Construction. For disease nodes, a disease similarity matrix is calculated based on a directed acyclic graph (DAG) of MESH as the initial feature. ,in For the number of disease nodes, For the feature dimension, a molecular graph is constructed based on the SMILES string. A pre-trained GIN model is used to extract atomic features, followed by average pooling to obtain the drug features. For gene nodes, chromatin sequences are extracted from NCBI based on Gene ID, and the genome trajectory is predicted using an Enformer pre-trained model. After dimensionality reduction via PCA, gene features are obtained through a convolutional autoencoder. Since the three types of nodes have different feature dimensions, we zero-padded the shorter features to align them to the maximum dimension. This yields a unified node feature matrix. ,in .
[0053] S4. Establish a disease drug gene triplet prediction model, which includes three main modules: a location-aware graph encoder (LapPE+GCN+Transformer), a multi-branch feature extraction module, and a phantom-driven contrastive learning module. First, the node feature matrix... and edge index The input position-aware graph encoder, through the synergistic effect of Laplacian position coding, graph convolutional coding, and Transformer layers, yields an enhanced node representation that integrates global topology and node position information. Then, a multi-branch feature extraction module is used to generate graph-level representations from three parallel perspectives. , phantom embedding and its classification logic Triples represent Next, graph augmentation and multiple contrastive learning are performed through a motif-driven contrastive learning module to enhance feature robustness. Finally, motif type prediction and model parameter optimization for triples are performed through classification prediction and model optimization. A flowchart is shown below. Figure 1 As shown.
[0054] S5. We first process the preprocessed node feature data. The input is fed into the model, where it undergoes multi-stage processing including Laplacian position encoding, feature concatenation and normalization, graph convolutional encoder, and Transformer layers. This process gradually transforms the initial node features into enhanced nodes that fuse global topological features and node structural location information. .
[0055] S51, such as Figure 2 As shown, firstly based on the edge information Calculate the symmetric normalized Laplace matrix: .in It is the identity matrix. For degree matrix, Let be the adjacency matrix. Then, perform eigenvalue decomposition on the Laplacian matrix: .in It is an eigenvalue diagonal matrix. This is the corresponding eigenvector matrix. (Select the first...) The eigenvectors corresponding to the smallest non-zero eigenvalues (excluding the first all-zero eigenvalue) are used as the original positional encoding. , where the default .
[0056] S52. Perform row-by-row L2 normalization on the obtained original position codes to obtain... : By mapping the normalized positional encoding to the hidden dimension space through a learnable linear layer, we obtain... .in , Encode the embedding dimension for the location (default 16). Initialize the node features. With the mapped position encoding Enhanced features are obtained by splicing. : Finally, batch normalization is performed on the enhanced features to obtain... : .
[0057] S53, Enhanced features after batch normalization The image is fed into the first layer of graph convolution operation, and then passed through the first layer of GCN convolution to obtain... .in To add a self-loop to the adjacency matrix, This is the corresponding degree matrix. For learnable weight matrix, This is a hidden dimension (default 256). This step aggregates the 1-hop neighbor information of each node through 1-hop neighborhood aggregation to obtain the node embedding of the first layer. .
[0058] S54, Output to the first layer Dropout is used to prevent overfitting, and results are obtained based on different task types. , The regularized features are fed into the second GCN convolution layer, and the result is obtained through the second graph convolution operation. ,in This is the weight matrix for the second layer. This step aggregates the 2-hop neighbor information of each node through 2-hop neighborhood aggregation, obtaining the output node embedding of the GCN encoder. .
[0059] S55, then the node representation output by GCN. Feed it into the Transformer layer to capture long-range dependencies between nodes. For each multi-head attention head... (default First, calculate the query, key, and value matrix: , , ,in , The dimension for each attention head. Then for each node. and its neighboring nodes Calculate the attention coefficient Finally, by aggregating the neighbor information, we obtain the first... The output of each attention head .
[0060] S55. Repeat step S55 for multi-head attention calculation, and concatenate the outputs of all attention heads to obtain... Then, the output of the Transformer is connected via residual join. With GCN output Add them together to get the final node representation. This output It integrates node structure location information provided by Laplacian positional encoding, global topological features provided by GCN, and long-range dependencies provided by Transformer, providing rich input for subsequent multi-branch feature extraction modules.
[0061] S56, Multi-branch Feature Extraction Module. Node representations output from the position-aware map encoder. Starting from this point, the algorithm extracts graph-level representations for contrastive learning, motif embeddings and classification logic for auxiliary tasks, and triplet representations for the main task through three parallel branches.
[0062] S61, such as Figure 3 As shown, a graph-level representation is first extracted using a global attention pooling mechanism. Then, an importance score for each node is calculated using a two-layer MLP. ,in , Then, the importance scores are normalized using softmax to obtain the attention weights. : Next, the graph-level representation is obtained by weighting and summing the features of all nodes using attention weights. This level of representation The global information of the entire graph is encoded and will be used in the graph-subgraph contrastive learning task in the contrastive learning module.
[0063] S62. Auxiliary classification task is performed using a phantom perception encoder. This is achieved through a two-layer MLP processing node representation. Obtaining the embedding of the model ,in Then embed the mold. The data is fed into a linear classifier to predict the probability that each node belongs to a positive motif. : ,in , Number of categories (MC tasks) BC mission For the BC task, define node-level pseudo-labels: if a node If it appears at any position in a positive sample triple, then ,otherwise The auxiliary classifier is trained using cross-entropy loss. .
[0064] S63. For a given triplet We utilize triple pooling to extract representation features from both global and local perspectives. First, we extract the global context through node pooling. Then, we directly concatenate the features of the three nodes to obtain... Then, global contextual features are extracted using a multilayer perceptron network, which contains three linear layers and two ReLU activations: .in , , For MC quests, For BC tasks, .
[0065] Then, edge pooling is performed to extract local interaction features. First, the difference vector between the three node pairs is calculated: , , Then define the shared edge feature mapping function. The function contains two linear transformations:
[0066] .
[0067] in , Apply this mapping to each difference vector and use ReLU activation: , , Next, the features of the three sides are spliced together to obtain... Then, local interaction features are extracted from the concatenated edge features through two layers of MLP processing. ,in , For MC quests, For BC tasks, .
[0068] S64. Perform feature fusion. Pool the node features. and edge pooling features spliced together If the concatenated dimension is the same as the target dimension If there is inconsistency, dimensional matching is performed through linear transformation to obtain the final triplet features. : Among them, for MC tasks For BC tasks The characteristics of this triplet It integrates global contextual information and local interaction information, providing rich feature representations for the main task of classification prediction.
[0069] S7. Motif-driven contrastive learning module. To address the issues of redundant contextual information and insufficient learning of sparse samples in dense networks, three contrastive learning branches are designed: node contrastive learning (BC task only), class prototype contrastive learning (MC task only), and graph-subgraph contrastive learning (used in both MC and BC tasks).
[0070] S71, such as Figure 4 As shown, graph augmentation is first performed to generate a comparison view. Edges are randomly dropped in each training batch to generate the augmented graph. Let the batch size be... (Under implementation) (equal to the batch size), from the edge set of the original graph Random selection Remove the edges to obtain the edge set of the enhanced graph: ,in For random selection The set of edges, This fixed-edge-count discarding strategy is equivalent to proportional discarding. Perform side sampling, where This represents the total number of edges in the original graph. Then, the augmented graph is encoded using the same position-aware graph encoder. After the complete processing flow of the position-aware graph encoder, the node representation of the augmented graph is obtained. The corresponding triplet representation and the graph-level representation of augmented graphs. .
[0071] S72. For the BC task, perform node-level comparative learning. For nodes... Its representation in the original image and the enhanced image are respectively and First, L2 normalization is applied to the features, and then cosine similarity is calculated: Then, a symmetrical node contrast loss is constructed. For each node, the contrast loss is calculated in both directions: .
[0072] The first item is querying the enhanced view from the original view:
[0073] ,
[0074] The second option is to query the original view from the enhanced view:
[0075] ,
[0076] Among them, temperature parameter This symmetric contrast loss enhances the robustness and discriminativeness of node representations by optimizing bidirectionally between the two views, ensuring that the representation of the same node remains consistent across different views while distinguishing it from the representations of other nodes within the batch (from both views).
[0077] S73. For the MC task, perform class prototype contrastive learning to enhance the distinguishability between different motif categories. First, calculate the prototype representation for each motif category. For each category... The prototypes of the original and enhanced images are as follows: ,in For category The set of triples. Then, a class prototype contrastive loss is constructed to ensure that prototypes of the same class remain consistent in both views, while being distinguishable from prototypes of other classes: The total class prototype contrast loss is obtained by summing the results for all categories: Among them, temperature parameters To address the problem of class imbalance (few rare motif samples), we introduce a weighting mechanism for different motif types. We define the motif weight vector as follows: These correspond to seven different phantom types. In the current batch In the middle, calculate the batch average weight: ,in For triples The category labels. The weighted class prototype comparison loss is: .
[0078] S74. For both the MC and BC tasks, we introduce graph-subgraph contrastive learning to enhance the model's understanding of global and local relationships. However, the contrastive objects differ between the two tasks. For the MC task, we use a global graph-level representation. Representation of triples within a batch Let's compare them. First, we perform L2 normalization on the representation: Then for each triplet in the batch Calculate its graph-subgraph contrast loss: The overall plot-subplot contrast loss is obtained by averaging all triples within the batch. Among them, temperature parameters This loss ensures consistency between the graph-level representation and the subgraph representation by maximizing the similarity between the graph-level representation and the representation of each triple, while normalizing across all triples within the batch. For the BC task, we use the graph-level representation of the original graph... Graph-level representation of augmented graphs Let's compare them. First, we perform L2 normalization on the two graph-level representations: Then calculate the graph-subgraph contrast loss: Among them, temperature parameters (MC quest) or (BC task). This loss ensures consistency between graph-level representation and subgraph representation, preventing the model from focusing excessively on local details while ignoring global structural constraints.
[0079] S8. After the above process, the obtained feature representation is fed into the classifier for classification prediction, such as... Figure 5 As shown.
[0080] S81. First, a classifier is designed to predict the type of triplet motif. The classifier represents the triplet. Mapped to the motif category space. For the MC task, the classifier is a single-layer linear transformation: ,in , For the BC task, the classifier is also a single-layer linear transformation: ,in , Then, the classifier output is softmax normalized to obtain the probability distribution of the motif categories. .
[0081] S82. Next, we design a joint loss function to uniformly optimize all modules. First, we use cross-entropy loss to calculate the prediction loss of the main task. ,in For triples One-hot labels. For multi-class classification (MC) tasks, since two views (original and augmented) are used for classification, the total loss function includes the classification loss for both views, the weighted class prototype contrast loss, and the graph-subgraph contrast loss:
[0082] ,
[0083] in Control the weights in the weighted prototype comparison learning. Weights for control chart-subgraph contrast learning This represents the average weight of the phantoms in the current batch.
[0084] For a binary classification task (BC), the total loss function includes the classification loss for the two views, the node contrast loss, the graph-subgraph contrast loss, and the motif classification auxiliary loss:
[0085] ,
[0086] in , , .
[0087] S83. Finally, the Adam optimizer is configured, and evaluation metrics are selected and calculated. For the MC task, four metrics—Micro-F1, Macro-AUC, Macro-F1, and Accuracy—are used to evaluate the model's overall performance across all motif categories and its class balance. For the BC task, five metrics—AUC, AUPR, Precision, Recall, and F1-score—are used to perform class-by-class validation and evaluation for each of the seven motif types, comprehensively evaluating the model's performance on binary classification tasks.
[0088] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A disease drug gene triplet prediction method based on artificial intelligence, characterized in that, Includes the following steps: S1. Data Preprocessing: Obtain a biomedical knowledge graph dataset containing diseases, drugs, and genes. Extract three types of association edges between entities: disease-drug, gene-disease, and drug-gene, to construct a set of triples. Divide the set of triples into modules of a preset type. Use an edge uniqueness sampling strategy to process the set of triples to ensure that each edge appears in only one triple. Then divide the dataset according to the needs of multi-classification and binary classification tasks. Construct initial feature nodes for diseases, drugs, and genes respectively. Align the node features of different dimensions to obtain a node feature matrix of a unified dimension. S2, Position-aware graph encoding: The node feature matrix of the unified dimension and the edge index of the knowledge graph are input into the position-aware graph encoding module. Through the synergistic effect of Laplacian position encoding, graph convolutional encoding and Transformer layer, an enhanced node representation that integrates global topology and node position information is obtained. The Laplace position encoding implementation steps include: The Laplacian matrix is calculated based on the edge information. The Laplacian matrix is then decomposed to obtain the eigenvalue diagonal matrix and the corresponding eigenvector matrix. The eigenvectors corresponding to the first k smallest non-zero eigenvalues are selected as the original position codes. After L2 normalization and linear mapping, they are concatenated with the initial feature matrix to obtain the enhanced features. The enhanced features are then batch normalized. The graph convolutional coding adopts a graph convolutional network (GCN), which aggregates the 1-hop and 2-hop neighborhood information of nodes through two layers of convolutional operations; the long-range dependency capture unit is a Transformer unit, which calculates the long-range association weights between nodes through a multi-head attention mechanism and aggregates the association information of nodes at any distance. S3. Multi-branch feature extraction: Based on the enhanced node representation, the multi-branch feature extraction module generates graph-level representation, motif embedding and its classification logic, and triplet representation from three parallel perspectives. The triplet features are obtained by fusing global context information and local interaction information. S4. Multi-view comparison learning: Generate an enhanced image for comparison through graph enhancement operations, and perform multi-dimensional comparison learning between the enhanced image and the original image view; S5. Classification Prediction and Model Optimization: Input the disease drug gene triplet features into the classifier and output the motif type prediction result of the triplet; optimize the model parameters based on the joint loss function, which at least integrates classification loss and contrastive learning loss.
2. The disease drug gene triplet prediction method based on artificial intelligence according to claim 1, characterized in that, The construction of the initial feature matrix in step S1 includes: for disease entities, calculating the similarity matrix between diseases based on the directed acyclic graph of MESH to obtain disease features; for drug entities, obtaining drug features based on molecular structure description information through a pre-trained molecular feature extraction model; for gene entities, obtaining gene features based on genomic sequence information through a pre-trained genomic feature extraction model; and finally, zero-padding is performed on the short-dimensional features to align them to the maximum dimension, resulting in a unified initial feature matrix.
3. The disease drug gene triplet prediction method based on artificial intelligence according to claim 1, characterized in that, In step S3, the multi-branch includes: Global attention pooling branch: The importance score of each node is calculated through two layers of MLP, and after softmax normalization, the node features are weighted and summed to generate a graph-level representation that encodes global semantic information; Motif-aware encoding branch: The node representation is enhanced by two layers of MLP processing to obtain the motif-assisted embedding, which is then input into a linear classifier for node-level pseudo-label prediction. The pseudo-label is an identifier for whether a node appears in a positive sample triplet. Triple pooling branch: The features of the three entities in the triple are concatenated by node pooling and global context features are extracted by MLP. The entity pair difference vector is calculated by edge pooling and local interaction features are extracted by mapping function. The global context features and local interaction features are concatenated and linearly transformed to obtain triple features.
4. The disease drug gene triplet prediction method based on artificial intelligence according to claim 1, characterized in that, In step S4, the graph augmentation operation involves randomly discarding some edges in the knowledge graph, and the multi-dimensional contrastive learning includes at least one of the following: Node-level contrastive learning: L2 normalization and cosine similarity calculation are performed on the representations of the same node in the original image and the augmented image to construct a symmetrical node contrastive loss, including contrastive losses in two directions: querying the augmented image view from the original image view and querying the original image view from the augmented image view. Class prototype contrastive learning: Calculate the prototype representation of each motif category, construct the class prototype contrastive loss to ensure that the prototype of the same category remains consistent under different views and that prototypes of different categories can be distinguished from each other, and obtain the total class prototype contrastive loss by weighted summation of all categories; Graph-subgraph contrast learning: (1) For multi-class classification tasks, compare the global graph-level representation with the triple representation in the batch: first, perform L2 normalization on the representation, then calculate the graph-subgraph contrast loss for each triple in the batch, and then average all triples in the batch to obtain the total graph-subgraph contrast loss; (2) For binary classification tasks, compare the graph-level representation of the original graph with the graph-level representation of the augmented graph: first, perform L2 normalization on the two graph-level representations, and then calculate the graph-subgraph contrast loss.
5. The disease drug gene triplet prediction method based on artificial intelligence according to claim 1, characterized in that, In step S5, the classifier is a single-layer linear transformation, and the output of the classifier is normalized by softmax to obtain the probability distribution of the phantom category. The joint loss function calculates the prediction loss of the main task through cross-entropy loss. For multi-class tasks, the joint loss function includes the classification loss of the original image and the augmented image, the weighted class prototype comparison loss, and the graph-subgraph comparison loss. For binary classification tasks, the joint loss function includes the classification loss of the original image and the augmented image, the node comparison loss, the graph-subgraph comparison loss, and the phantom classification auxiliary loss.
6. The disease drug gene triplet prediction method based on artificial intelligence according to claim 1, characterized in that, The preset type of phantoms mentioned in step S1 includes 7 phantom types: triangle pattern, star pattern and unilateral pattern. The star pattern includes disease-centered star pattern, drug-centered star pattern and gene-centered star pattern. The unilateral pattern includes drug-disease, gene-disease and drug-gene unilateral association. The division of the dataset according to task requirements includes: for multi-class classification tasks, the triples of each modality are divided into training set, validation set and test set according to the proportion; for binary classification tasks, the triples of each modality are used as positive samples and the triples of the other 6 modalities are used as negative samples for leave-one-out cross-validation.
7. The disease drug gene triplet prediction method based on artificial intelligence according to claim 1, characterized in that, In step S5, the Adam optimizer is configured and the evaluation metrics are selected and calculated. For multi-class tasks, four metrics are used: Micro-F1, Macro-AUC, Macro-F1 and Accuracy. For binary tasks, five metrics are used: AUC, AUPR, Precision, Recall and F1-score. Each of the seven motif types is validated and evaluated on a class-by-class basis.
8. A disease drug gene triplet prediction system based on artificial intelligence, characterized in that, For performing the method according to any one of claims 1-7, comprising: Data preprocessing module: used to construct, sample, partition, and align datasets; Location-aware graph encoding module: used to output enhanced node representations; Multi-branch feature extraction module: used to extract graph-level representations, motif-assisted embeddings, and triplet features; Multi-perspective comparative learning module: used to achieve multi-dimensional comparative learning; Classification prediction module: Used to output prediction results and optimize the model.