Drug combination risk prediction method, device, equipment and medium based on multi-source feature fusion and contrastive learning
Through the method of multi-source feature fusion and comparative learning, the ternary message passing mechanism and graph convolutional network are used to extract drug features. Combined with Morgan molecular fingerprint similarity, the accuracy of grade prediction and data imbalance problems in drug combination risk assessment are solved, and accurate prediction of risk level and deep mining of feature associations are achieved.
Patent Information
- Application Number
- CN202510740403.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-05
AI Technical Summary
Existing drug combination risk prediction methods cannot accurately assess the risk level, have difficulty dealing with data distribution imbalance and insufficient feature semantic alignment, and cannot effectively quantify drug combination risks.
A method based on multi-source feature fusion and contrastive learning is adopted. The drug molecular graph features are extracted through the molecular graph neural network with a ternary message passing mechanism. Combined with the graph convolutional network and Morgan molecular fingerprint similarity features, the contrastive learning mechanism is used to mine feature associations and differences, perform feature fusion and alignment, and finally use the classification model to determine the risk level of drug combinations.
It achieves accurate prediction of drug combination risk levels, effectively handles data imbalance, and improves the deep mining of feature associations and the generalization ability of the model.
Smart Images

Figure CN120260732B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drug combination prediction, and in particular to a drug combination risk prediction method, device, equipment and medium based on multi-source feature fusion and comparative learning. Background Art
[0002] Drug combination therapy is an important treatment for complex diseases in modern medicine. It achieves synergistic effects and reduces the dosage of single drugs through the combination of multiple drugs. However, its application is severely restricted by the risk of drug interactions. Accurately assessing the risk level of drug combinations is crucial for clinical drug safety. However, traditional prediction methods can only determine whether there are interactions between drugs and cannot quantify the difference in risk levels, making it difficult to meet the clinical needs for precise risk grading assessment. Although existing clinical guidelines have attached importance to the risk assessment of combination medications, there is a lack of effective technical means to achieve quantitative prediction of risk levels.
[0003] In the field of deep learning, existing drug interaction prediction methods are mainly divided into chemical structure methods and graph representation learning methods. Chemical structure methods are based on the molecular similarity hypothesis and use deep neural networks to mine similarities between molecular structures to predict interaction types. However, they rely on manual feature engineering and have difficulty modeling complex network relationships. Graph representation learning methods model drugs or associated entities as graph structures and use graph neural networks to capture complex relationships between drugs. However, existing models are mostly limited to binary classification and cannot effectively handle risk level prediction tasks. They also lack effective solutions to problems such as imbalanced data distribution and insufficient semantic alignment of features.
[0004] Existing technologies have three main flaws: First, the prediction paradigm is limited to a binary classification framework, making it impossible to achieve multi-level assessment of risk levels. Second, rare drug interaction events lead to a serious imbalance in data distribution. Traditional methods tend to overfit the majority categories and ignore the tail categories, resulting in insufficient recall for rare events. Finally, existing models often use simple feature splicing or weighted averaging strategies, lacking in-depth mining of semantic alignment of different features and associations between multi-source features, making it difficult to comprehensively assess drug combination risks. These problems restrict the clinical application value of drug combination risk level prediction technology. Summary of the Invention
[0005] The present invention provides a drug combination risk prediction method, device, equipment and medium based on multi-source feature fusion and comparative learning to improve at least one of the above technical problems.
[0006] In a first aspect, the present invention provides a drug combination risk prediction method based on multi-source feature fusion and comparative learning, which comprises steps S1 to S8.
[0007] S1. Obtain drug dataset.
[0008] S2. Obtain a feature map based on the drug dataset.
[0009] S3. Based on the feature graph, adaptive feature extraction of the molecular graph structure is performed through a molecular graph neural network based on a ternary message passing mechanism to obtain the molecular graph features of the drug. The molecular graph features are defined as structural features. .
[0010] S4. Input the molecular graph features generated by TrimNet into the multi-layer cascade graph convolutional network to extract high-order topological features in the drug network and obtain relationship features. .
[0011] S5. Calculate similarity features based on the drug dataset using Morgan molecular fingerprints and Tanimoto coefficients , and extract interactive embedding features .
[0012] S6. Based on the structural features and the similarity features, the potential associations and differences between the features are mined through a comparative learning mechanism to obtain structural comparative learning features. and similarity comparison learning features .
[0013] S7, performing feature fusion and feature alignment on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain a fusion feature .
[0014] S8. Based on the fusion features, use a classification model to determine the risk level of the drug combination and obtain the drug combination risk.
[0015] As a further solution of the present invention, based on the feature graph, adaptive feature extraction of the molecular graph structure is performed by a molecular graph neural network based on a ternary message passing mechanism to obtain the molecular graph features of the drug, specifically including:
[0016] The molecular graph neural network based on the ternary message passing mechanism performs the following steps in the message passing phase:
[0017] According to the feature graph, node pairs and their connecting edges are projected into a unified feature space through a triplet attention network, and the interaction strength is calculated through nonlinear transformation. Where, is the interaction strength, represents the LeakyReLU activation function, U is the learnable weight vector, Indicates transposition, and For two different trainable parameter matrices, and Represents the time step Time Node and nodes The hidden state of is a node and nodes The edge features between Represents vector concatenation.
[0018] According to the interaction strength, the attention distribution is generated by normalization. Where, For attention distribution, is an exponential function with the natural constant e as the base, For nodes The neighborhood set of For nodes and nodes Interaction intensity.
[0019] Through the node The hidden state and edge characteristics Weighted sum to get node Aggregate messages. Where, Representation node Aggregate messages, is the attention coefficient, and For two different trainable weight matrices, For nodes The hidden state of Represents the Hadamard product.
[0020] According to the aggregated messages, a multi-head attention mechanism is used to generate multiple groups of messages in parallel and splice them to obtain multi-dimensional features. Where, For multidimensional features, Represents vector concatenation, It is The attention coefficient calculated by the attention head, is the number of attention heads, is the first weight matrix of the input linear transformation, is the second weight matrix for the linear transformation of the input.
[0021] Using gated recurrent units as node update functions, the previously extracted messages are fused with the current integrated features to achieve temporal feature integration, and layer normalization is introduced to alleviate gradient anomalies. The node representation is gradually optimized in iterations, and high-order features are output. Where, is a high-order feature, LN represents layer normalization, GRU represents gated recurrent unit, is the feature of the current integration.
[0022] The molecular graph neural network based on the ternary message passing mechanism performs the following steps in the readout phase:
[0023] Use LSTM to update the hidden state. Where, For hidden state, Represents LSTM network, Represents the aggregated features of the previous time step.
[0024] According to the hidden state, the attention weight of the node is calculated. Where, is the attention weight, is the softmax activation function, is a high-order feature.
[0025] According to the attention weights, node features are aggregated. Where, is the node feature after aggregation, is the total number of nodes.
[0026] After aggregating node features, After iterations, the molecular graph features of the drug are finally obtained. Where, The molecular graph features of the drug, For the The hidden state of the iteration.
[0027] The molecular graph features are defined as structural features.
[0028] As a further solution of the present invention, the molecular graph features generated by TrimNet are input into a multi-layer cascaded graph convolutional network to extract high-order topological features in the drug network and obtain relationship features, specifically including:
[0029] The molecular graph features generated by TrimNet are input into a two-layer cascaded graph convolutional network to extract relational features. The extraction model of relational features is: Where, is the output of the first layer of graph convolutional network, is the output of the second-layer graph convolutional network, For relationship characteristics, Residual connection, Represents the first layer of graph convolution operation, Represents the second-layer graph convolution operation, The initial graph representation of TrimNet output, is the edge index set and AttnWeight represents the attention mechanism.
[0030] As a further solution of the present invention, the steps of single-layer graph convolution are as follows:
[0031] The molecular graph features of the drug are used as initial features to perform graph convolution. Where, is the feature after convolution, For graph convolution, is the convolutional layer, For the initial features, is the edge index set, is the degree matrix, Adjacency matrix with self-loops, is the trainable parameter matrix.
[0032] The convolutional features are processed through batch normalization, ReLU activation and residual connection. Where, For output features, For random dropout, is the ReLU activation function, For batch normalization, is the dimension projection function.
[0033] According to the processed features, the node attention weights are calculated through a shallow perception network. Where, is the node attention weight, is the tanh activation function, is the attention parameter matrix.
[0034] As a further solution of the present invention, based on the drug dataset, similarity features are calculated based on Morgan molecular fingerprints and Tanimoto coefficients, and interactive embedding features are extracted, specifically including:
[0035] A Morgan molecular fingerprint of the drug combination is obtained according to the drug dataset.
[0036] Based on the Morgan molecular fingerprint of the drug combination, the similarity between the two drug molecular fingerprints is calculated to obtain a similarity feature. Where, For similarity, and Represent the fingerprint vectors of two drug molecules respectively.
[0037] The identity matrix is introduced as structured prior information, and the identity matrix is mapped to the target embedding space through a linear projection layer to generate a set of orthogonal basis vectors. Where, are orthogonal basis vectors, is the identity matrix, Represents a linear projection layer, Represents real numbers, is the total number of nodes, is the embedding space dimension of the projection.
[0038] The similarity features are projected into the target embedding space, and then weighted mixed with the orthogonal basis vectors to obtain a mixed embedding matrix. Where, Generate new similarity features for projection into embedding space, is the mixed embedding matrix, is a learnable weight parameter.
[0039] For drug combinations and , extract the mixed embedding vector corresponding to the drug combination from the mixed embedding matrix index and Where, and Respectively represent drugs and medications The mixed embedding vector of and are the mixed embedding matrices of the two drug sets respectively.
[0040] According to the mixed embedding vector and ,The synergistic effect of drug pairs is captured by Hadamard product, and L2 normalization operation is applied to obtain the interaction embedding features. Where, Embedding features for interaction, represents the L2 normalization operation, represents the Hadamard product, represents the L2 norm.
[0041] As a further solution of the present invention, based on the structural features and the similarity features, potential associations and differences between the features are mined through a comparative learning mechanism to obtain structural comparative learning features and similarity comparative learning features, specifically including:
[0042] Given the original model parameters of the heterogeneous graph transformer, calculate the gradient sign direction of its corresponding loss function. The calculation model of the gradient sign direction is: Where, is the gradient sign direction, is the symbolic function, represents the gradient direction, represents the gradient, are the original model parameters, is the corresponding loss function.
[0043] A loss weight factor is introduced to dynamically adjust the noise intensity according to the current loss value. Where, is the loss weight factor, is the current loss value, is the smoothing factor.
[0044] The GNN layer parameters of the model are perturbed according to the loss weight factor, and the parameters after perturbation are: Where, Represents the GNN layer parameters after perturbation, is a learnable weight parameter used to balance the contribution of gradient direction and Gaussian noise, is the gradient sign direction, is random noise that follows a Gaussian distribution.
[0045] The heterogeneous graph transformer and its perturbed version are used as a dual encoder for encoding to obtain the original view and the perturbed view. Where, and Represents the original view generated by the structural features and similarity features input to the heterogeneous graph transformer, and They represent the perturbed views generated by the perturbed heterogeneous graph transformer, ( ) is the original encoder, ( ) is the encoder after applying the mixed perturbation, As shown in the figure.
[0046] The representations of the original and perturbed views are mapped to the latent space through a nonlinear projection head. Where, is the potential feature representation obtained by the nonlinear transformation of the structural features of the original view through MLP, is the potential feature representation obtained by the nonlinear transformation of the similarity feature of the original view through MLP, is the potential feature representation obtained by the nonlinear transformation of the structural features of the perturbed view through MLP, is the potential feature representation obtained by the nonlinear transformation of the perturbed view similarity feature after MLP, Represents a nonlinear projection head, is the nonlinear projection head corresponding to the original encoder, is the nonlinear projection head corresponding to the perturbed encoder, For multi-layer perceptron, and are two different learnable parameter matrices.
[0047] According to the latent feature representation mapped to the latent space, structure contrast learning features and similarity contrast learning features are obtained. Where, Learning features for structural comparison, Learning features for similarity comparison, is average pooling.
[0048] As a further solution of the present invention, feature fusion and feature alignment are performed on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain fused features, specifically including:
[0049] Combine structural features with relationship features to obtain new drug structural features . Where, For the structural characteristics of drugs, For the features after splicing, Represents vector concatenation, is the feature after residual projection, and are two different learnable parameters, ReLU activation function, For structural characteristics, For relationship characteristics, is the nonlinear bias vector.
[0050] The structure contrast learning features and similarity contrast learning features are integrated by dual-path fusion to obtain contrast learning features. .
[0051] Structural features , contrastive learning features and the previous interaction embedding features Perform feature alignment and obtain alignment features. Where, Represents alignment features, FFN is a two-layer feedforward network, For normalization operation, is the attention weight matrix, is the Softmax activation function, Indicates transposition, For query, For key, For value, is the hidden layer dimension, They are The projection matrix.
[0052] According to the alignment features, a learnable affine transformation is introduced to dynamically adjust the fusion features to obtain the final output fusion features. Where, and are different trainable recalibration parameters respectively.
[0053] As a further embodiment of the present invention, the drug dataset comprises SMILES sequences of drug combinations.
[0054] In the second aspect, the present invention provides a drug combination risk prediction device based on multi-source feature fusion and comparative learning, which includes a data set acquisition module, a feature graph construction module, a structural feature extraction module, a relationship feature extraction module, an interactive embedding feature extraction module, a comparative learning module, a feature fusion module and a risk prediction module.
[0055] The dataset acquisition module is used to obtain the drug dataset.
[0056] The feature map construction module is used to obtain a feature map based on the drug dataset.
[0057] The structural feature extraction module is used to extract the molecular graph structure adaptively based on the feature graph through the molecular graph neural network based on the ternary message passing mechanism to obtain the molecular graph features of the drug. The molecular graph features are defined as structural features. .
[0058] The relationship feature extraction module is used to input the molecular graph features generated by TrimNet into the multi-layer cascade graph convolutional network to extract high-order topological features in the drug network and obtain relationship features. .
[0059] An interactive embedding feature extraction module for calculating similarity features based on the Morgan molecular fingerprint and Tanimoto coefficient according to the drug dataset , and extract interactive embedding features .
[0060] The contrastive learning module is used to mine the potential associations and differences between features based on the structural features and the similarity features through the contrastive learning mechanism to obtain structural contrastive learning features. and similarity comparison learning features .
[0061] A feature fusion module is used to perform feature fusion and feature alignment on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain fused features. .
[0062] The risk prediction module is used to determine the risk level of the drug combination based on the fusion features and use a classification model to obtain the drug combination risk.
[0063] In a third aspect, the present invention provides a device for predicting drug combination risk based on multi-source feature fusion and contrastive learning, comprising a processor, a memory, and a computer program stored in the memory. The computer program can be executed by the processor to implement the drug combination risk prediction method based on multi-source feature fusion and contrastive learning as described in any paragraph of the first aspect.
[0064] In a fourth aspect, the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a drug combination risk prediction method based on multi-source feature fusion and comparative learning as described in any paragraph of the first aspect.
[0065] By adopting the above technical solution, the present invention can achieve the following technical effects:
[0066] The drug combination risk prediction method based on multi-source feature fusion and contrastive learning in the embodiment of the present invention can accurately predict the risk level, effectively handle data imbalance, deeply mine feature associations, and has good generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the specific implementation methods of the present invention. It should be understood that the following drawings only show certain specific implementation methods of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0068] Figure 1 It is a flowchart of the drug combination risk prediction method.
[0069] Figure 2 It is a logical block diagram of the drug combination risk prediction method. DETAILED DESCRIPTION
[0070] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0071] Example 1, please refer to Figures 1 to 2 A first embodiment of the present invention provides a drug combination risk prediction method based on multi-source feature fusion and contrastive learning. This method can be performed by a drug combination risk prediction device based on multi-source feature fusion and contrastive learning (hereinafter referred to as the drug combination risk prediction device). Specifically, steps S1 to S8 are implemented by one or more processors in the drug combination risk prediction device.
[0072] S1. Obtain a drug dataset. The drug dataset includes a SMILES sequence of drug combinations. The SMILES sequence converts the atomic and chemical bond information in a molecule into a string using specific characters and rules.
[0073] S2. Obtain a feature map based on the drug dataset.
[0074] Specifically, the SMILES sequence was preprocessed using the RDKit tool to generate a feature graph with node features, edge features, and an adjacency matrix. RDKit is an open-source toolkit for cheminformatics. It uses machine learning methods to generate compound descriptors, generate Morgan molecular fingerprints, calculate compound structural similarity, and display 2D and 3D molecules based on 2D and 3D molecular manipulation.
[0075] S3. Based on the feature graph, adaptive feature extraction of the molecular graph structure is performed through a molecular graph neural network based on a ternary message passing mechanism to obtain the molecular graph features of the drug, i.e., structural features. .
[0076] This embodiment uses a molecular graph neural network (TrimNet) based on a ternary message passing mechanism to perform refined representation learning of drug molecules, capturing atomic-level features that are crucial for risk level prediction, and performing structure and relationship extraction.
[0077] Specifically, the graph structure after the drug combination is processed is input into the TrimNet model. The TrimNet model is built based on the ternary message passing mechanism, and realizes adaptive feature extraction of molecular graph structure through atom-chemical bond-atom triple interaction modeling. In TrimNet, the atoms of a single drug are used as nodes, and the chemical bonds between atoms are used as edges. Characterization learning is performed on the atoms and chemical bonds of a single drug, and finally the molecular graph features of different drugs, namely structural features, are obtained. .
[0078] As a variant of the message-passing neural network, TrimNet dynamically weights the contributions of adjacent atoms and chemical bonds through a multi-head attention mechanism during the message-passing phase. During the readout phase, a sequential aggregation strategy based on a long short-term memory (LSTM) network is employed. This design enables the model to directly learn the characteristic representations of key atomic groups from the raw molecular graph, providing highly discriminative structural representations for downstream risk level prediction.
[0079] Based on the above embodiment, in an optional embodiment of the present invention, step S3 specifically includes steps S31 to S39.
[0080] S31. According to the feature graph, the node pairs and their connecting edges are projected into a unified feature space through a triple attention network, and the interaction strength is calculated through a nonlinear transformation.
[0081] .
[0082] Where, For nodes and nodes Interaction intensity, represents the LeakyReLU activation function, U is the learnable weight vector, Indicates transposition, and For two different trainable parameter matrices, and Represents the time step Time Node and nodes The hidden state of is a node and nodes The edge features between Represents vector concatenation. The LeakyReLU activation function is a nonlinear activation function that allows negative values to be passed through a small slope.
[0083] Specifically, in the message passing phase, TrimNet generates attention weights between nodes by fusing the interaction features of atoms and bonds. As shown in the calculation model of interaction strength above, at time step , given node features and edge features , the triplet attention network first transforms the node pair and its connecting edges Projected into a unified feature space, and the interaction strength is calculated through nonlinear transformation.
[0084] S32. Generate attention distribution through normalization according to the interaction strength.
[0085] .
[0086] Where, For attention distribution, is an exponential function with the natural constant e as the base, For nodes and nodes Interaction intensity, For nodes The neighborhood set of For nodes and nodes Interaction intensity.
[0087] S33, through the node The hidden state and edge characteristics Weighted sum to get node Aggregate messages.
[0088] .
[0089] Where, Representation node Aggregate messages, is the attention coefficient, and For two different trainable weight matrices, For nodes The hidden state of represents the Hadamard product, is a node and nodes The edge features between .
[0090] S34. Based on the aggregated messages, a multi-head attention mechanism is used to generate multiple groups of messages in parallel and splice them together to obtain multi-dimensional features and enhance the robustness of the model.
[0091] .
[0092] Where, For multidimensional features, Represents vector concatenation, It is The attention coefficient calculated by the attention head, is the number of attention heads, is the first weight matrix of the input linear transformation, is the second weight matrix of the input linear transformation, For nodes The hidden state of represents the Hadamard product, is a node and nodes The edge features between For nodes The neighborhood set of .
[0093] S35, using gated recurrent units as node update functions, fuses previously extracted messages with current integrated features to achieve temporal feature integration, and introduces layer normalization to alleviate gradient anomalies. The node representation is gradually optimized in iterations, and high-order features are output.
[0094] .
[0095] Where, is a high-order feature, LN represents layer normalization, GRU represents gated recurrent unit, For the currently integrated features, It is a multidimensional feature.
[0096] Specifically, the gated recurrent unit (GRU) is used as the node update function in the node update operation to fuse the previously extracted messages with the current integrated features to achieve temporal feature integration.
[0097] In the readout phase, TrimNet is based on the final updated node features , using the Set2Set network as the readout function to dynamically aggregate global node features and generate graph-level embedding representations. Specifically, Set2Set aggregates node features according to different attention weights and concatenates the aggregated features with previous messages.
[0098] S36. Use LSTM to update the hidden state.
[0099] .
[0100] Where, For hidden state, Represents LSTM network, Represents the aggregated features of the previous time step.
[0101] S37. Calculate the attention weight of the node according to the hidden state.
[0102] .
[0103] Where, is the attention weight, is the softmax activation function, is a high-order feature, It is a hidden state.
[0104] S38. Aggregate node features according to the attention weights.
[0105] .
[0106] Where, is the node feature after aggregation, is the total number of nodes, is the attention weight, is a high-order feature.
[0107] S39, after aggregating node features, After iterations, the molecular graph features of the drug, i.e., the structural features, are finally obtained. .
[0108] .
[0109] In the formula, in the formula, The molecular graph features of the drug, For the The hidden state of the iteration, is the node feature after aggregation.
[0110] S4. Input the molecular graph features generated by TrimNet into the multi-layer cascade graph convolutional network to extract high-order topological features in the drug network and obtain relationship features. Specifically, the molecular graph features generated by TrimNet On this basis, it is input into a multi-layer cascaded graph convolutional network as the initial features of the drug nodes in the network to further extract high-order topological features in the drug network.
[0111] In graph convolutional networks, graph representation Defined as , where A represents the adjacency matrix of drug nodes, X represents the molecular graph feature set generated by TrimNet, which serves as the initial node feature matrix, V represents the set of nodes in the network, and E represents the set of edges between nodes. By combining a multi-layer cascaded graph convolutional network with a residual structure and an attention mechanism, we can enhance the feature representation of key atomic clusters while preventing overfitting.
[0112] The embodiment of the present invention uses a two-layer cascaded graph convolutional network for extraction. The overall feature extraction process is as follows: Figure 2 As shown in part a of .
[0113] The extraction model of relational features is:
[0114] .
[0115] Where, is the output of the first layer of graph convolutional network, is the output of the second-layer graph convolutional network, For relationship characteristics, Residual connection, Represents the first layer of graph convolution operation, Represents the second-layer graph convolution operation, The initial graph representation of TrimNet output, AttnWeight represents the attention mechanism, It is a set of edge indexes, which is dynamically constructed through pre-processed edge indexes (including multiple types of edges).
[0116] Specifically, for the input node feature matrix and edge index collection , drugs are represented as nodes, the risk level of drug combinations is represented as edges, and the molecular graph features generated by TrimNet are used as the initial features of its nodes Perform graph convolution. The single-layer graph convolution step includes steps S41 to S43.
[0117] S41. Perform graph convolution using the molecular graph features of the drug as initial features.
[0118] .
[0119] Where, is the feature after convolution, For graph convolution, is the convolutional layer, For the initial features, is the edge index set, is the degree matrix, Adjacency matrix with self-loops, is the trainable parameter matrix.
[0120] S42. The convolutional features are processed through batch normalization, ReLU activation and residual connection to alleviate the degradation problem of deep networks.
[0121] .
[0122] Where, For the processed features, For random dropout, is the ReLU activation function, For batch normalization, is the dimension projection function, is the feature after convolution, is the initial feature.
[0123] S43. Based on the processed features, the node attention weights are calculated through the shallow perception network to enhance the contribution of key features.
[0124] .
[0125] Where, is the node attention weight, is the tanh activation function, is the attention parameter matrix, is the softmax activation function, The processed features.
[0126] S5. According to the drug dataset, based on the Morgan molecular fingerprint and Tanimoto coefficient, obtain interactive embedding features .
[0127] In the field of pharmaceutical research, drugs with similar chemical structures often exhibit similar activities. The underlying mechanism of this phenomenon is that similar chemical structures encourage drugs to bind to the same or similar biological targets in the body, thereby triggering similar physiological responses. When two or more structurally similar drugs are used simultaneously, they are very likely to compete for the same metabolic enzymes or transporters. Given this, in models that predict drug interactions, by deeply analyzing large amounts of similar drug interaction data, the model can learn the risk patterns presented by different drug combinations, thereby more accurately assessing the risk level of new drug combinations.
[0128] Based on the above embodiment, in an optional embodiment of the present invention, the drug similarity calculation method is based on Morgan molecular fingerprint and Tanimoto coefficient. Then step S5 specifically includes steps S51 to S56.
[0129] S51. Obtain a Morgan molecular fingerprint of the drug combination according to the drug dataset.
[0130] Specifically, the drug combination The SMILES sequences were converted into Morgan molecular fingerprints using the RDKit tool. Morgan molecular fingerprints are fixed-length bit vectors (consisting of 0s and 1s), where each position corresponds to the presence or absence of a specific chemical structure feature.
[0131] S52, calculating the similarity between the two drug molecular fingerprints based on the Morgan molecular fingerprint of the drug combination, and obtaining similarity features .
[0132] .
[0133] Where, For similarity, and Represent the fingerprint vectors of two drug molecules respectively. represents the number of bits that are the same as 1 in the two vectors, Indicates the number of bits in both vectors that have at least one 1.
[0134] Specifically, Tanimoto is used to calculate the similarity between two molecular fingerprints. The value of the similarity ranges from 0 to 1. The closer the value is to 1, the higher the similarity between the two molecules. By calculating the similarity of the molecular fingerprints of all drug molecules pairwise, a similarity feature is finally obtained. The rows and columns of the matrix correspond to different drug molecules, and each element in the matrix represents the similarity score between the corresponding two molecules.
[0135] S53. The unit matrix is introduced as structured prior information, and the unit matrix is mapped to the target embedding space through a linear projection layer to generate a set of orthogonal basis vectors.
[0136] After acquiring the similarity features of the drugs, to further improve the robustness of the model, the present embodiment introduces the identity matrix as structured prior information. Using the identity matrix for learning can provide the model with prior knowledge, allowing it to learn the underlying semantics and relationships between drugs.
[0137] Specifically, each row of the identity matrix can be viewed as a one-hot encoded vector, representing an idealized, independent representation of each drug in chemical space. By projecting the identity matrix into the target embedding space via a linear projection layer, the model learns an independent representation for each drug. This operation generates a set of orthogonal basis vectors, each corresponding to an independent representation of a drug. This independent representation can be combined with the input drug similarity features to enhance the model's ability to capture drug characteristics.
[0138] .
[0139] Where, are orthogonal basis vectors, is the identity matrix, Represents a linear projection layer, Represents real numbers, is the total number of nodes (i.e., the number of drugs), is the embedding space dimension of the projection.
[0140] S54: Project the similarity feature into the target embedding space, and then perform weighted mixing with the orthogonal basis vectors to obtain a mixed embedding matrix.
[0141] .
[0142] Where, Generate new similarity features for projection into embedding space, is the mixed embedding matrix, is a learnable weight parameter, For similarity characteristics, Represents a linear projection layer, are orthogonal basis vectors.
[0143] In this embodiment, the input similarity feature Projected into the same embedding space, with learnable weight parameters The unit matrix basis vectors and similarity features are weightedly mixed, and the generalization ability of the model is effectively enhanced by dynamically adjusting the contribution of the prior basis vectors and similarity features. By orthogonal basis vectors and similarity features Obtained after adaptive weighted mixing.
[0144] S55. For drug combinations and , extract the mixed embedding vector corresponding to the drug combination from the mixed embedding matrix index and .
[0145] .
[0146] Where, and Represents drugs and medications The mixed embedding vector of and are the mixed embedding matrices of the two drug sets respectively.
[0147] S56, according to the mixed embedding vector and , the synergistic effect of drug pairs is captured by Hadamard product, and L2 normalization operation is applied to alleviate the impact of feature scale differences on downstream tasks to obtain interactive embedding features .
[0148] .
[0149] Where, Embedding features for interaction, represents the L2 normalization operation, represents the Hadamard product, represents the L2 norm. and Represents drugs and medications The L2 norm is the square root of the sum of the squares of the vector elements and is used to measure the size of the vector. Used to indicate medicine With drugs Interactive embedding features.
[0150] The embodiment of the present invention achieves robust representation learning of drug interaction embedding by fusing the prior structure and the similarity characteristics of drugs. The hybrid weighted mechanism effectively improves the model's ability to capture sparse interaction patterns while retaining the topological properties of the chemical space.
[0151] The overall drug interaction embedding extraction is as follows Figure 2 The model is shown in part b of .
[0152] .
[0153] Where, To finally obtain the interactive embedding features, represents the interactive embedding function, and Indicates drug With drugs 、 and Respectively represent drugs With drugs similarity characteristics, For random dropout, represents the L2 normalization operation, For drugs The mixed embedding matrix, For drugs The mixed embedding matrix, For drugs or medication The mixed embedding matrix, is a learnable weight parameter, is the identity matrix, Indicates drug or medication Linear projection layer, For drugs or medication similarity characteristics, is the replacement symbol, replaced by or .
[0154] It is a learnable weight parameter used to dynamically adjust the contribution of the prior basis vector and similarity features.
[0155] S6. Based on the structural features and the similarity features, the potential associations and differences between the features are mined through a comparative learning mechanism to obtain structural comparative learning features. and similarity comparison learning features .
[0156] After extracting drug interaction embeddings, this embodiment of the present invention introduces a contrastive learning mechanism to further enhance the discriminative capabilities of drug molecular representations. Contrastive learning, a key self-supervised learning method, is commonly used in traditional graph contrastive learning to learn more effective feature representations by bringing positive pairs closer together and pushing negative pairs further apart in feature space.
[0157] However, this method is highly dependent on the initial features of the nodes. When the initial features of the nodes are insufficiently discriminative or missing, it becomes difficult to effectively mine key features, which negatively impacts the quality of the molecular representation. Furthermore, when dealing with heterogeneous graphs, due to the complex and diverse semantics of their nodes and edges, traditional methods struggle to effectively integrate information.
[0158] To solve the above problems, an embodiment of the present invention adopts the non-enhancement graph contrast learning method proposed by MRGCDDI. This method uses the SimGRACE framework and uses the Heterogeneous Graph Transformer (HGT) and its perturbation version as a dual encoder to extract two related views for comparison.
[0159] Based on the above embodiments, an optional embodiment of the present invention further designs a perturbation method, proposing an Adaptive Gradient-Noise Hybrid Perturbation (AGNHP) strategy. AGNHP can guide the perturbation direction by the gradient direction while maintaining the semantic integrity of the original graph data. It also dynamically adjusts the noise weight based on the current training loss, thereby improving the effectiveness and robustness of contrastive learning. AGNHP includes steps S61 to S66.
[0160] S61. Given the original model parameters of the heterogeneous graph converter, calculate the gradient sign direction of the corresponding loss function. The calculation model of the gradient sign direction is:
[0161] .
[0162] Where, is the gradient sign direction, is the symbolic function, represents the gradient direction, represents the gradient, are the original model parameters, is the corresponding loss function.
[0163] Convert the gradient direction to ternary , effectively avoiding the impact of gradient magnitude differences. To improve perturbation adaptability, stronger perturbations are applied in the early stages of training (when the loss is large) to explore the feature space, while the perturbations are weakened in the later stages (when the loss is small) to ensure stable convergence.
[0164] S62. Introduce a loss weight factor to dynamically adjust the noise intensity according to the current loss value.
[0165] .
[0166] Where, is the loss weight factor, is the current loss value, is the smoothing factor.
[0167] S63. Perturb the model GNN layer parameters according to the loss weight factor. The parameters after perturbation are:
[0168] .
[0169] Where, Represents the GNN layer parameters after perturbation, are the original model parameters, is the loss weight factor, is a learnable weight parameter used to balance the contribution of gradient direction and Gaussian noise, is the gradient sign direction, is random noise that follows a Gaussian distribution.
[0170] S64. Use the heterogeneous graph transformer and its perturbed version as a dual encoder for encoding to obtain the original view and the perturbed view.
[0171] .
[0172] Where, and Represents the original view generated by the structural features and similarity features input to the heterogeneous graph transformer, and They represent the perturbed views generated by the perturbed heterogeneous graph transformer, ( ) is the original encoder, ( ) is the encoder after applying the mixed perturbation, For the diagram, Represents the GNN layer parameters after perturbation, are the original model parameters.
[0173] S65. Map the representations of the original view and the perturbed view to the latent space through a nonlinear projection head.
[0174] .
[0175] Where, is the potential feature representation obtained by the nonlinear transformation of the structural features of the original view through MLP, is the potential feature representation obtained by the nonlinear transformation of the original view similarity feature through MLP ( and Set as positive sample), is the potential feature representation obtained by the nonlinear transformation of the structural features of the perturbed view through MLP, is the potential feature representation obtained by the nonlinear transformation of the perturbed view similarity feature after MLP ( and set as negative samples), represents the nonlinear projection head (i.e., MLP after two layers of nonlinear transformation), is the nonlinear projection head corresponding to the original encoder, is the nonlinear projection head corresponding to the perturbed encoder, For multi-layer perceptron, is the ReLU activation function, and are two different learnable parameter matrices.
[0176] S66. Obtain structure contrast learning features and similarity contrast learning features based on the potential feature representation mapped to the latent space.
[0177] .
[0178] Where, Learning features for structural comparison, Learning features for similarity comparison, is average pooling.
[0179] S7. Perform feature fusion and feature alignment on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain fused features.
[0180] When building drug research models, effectively integrating features extracted from different modules is a key issue in improving model performance. To address this issue, embodiments of the present invention propose a Hierarchical Feature Fusion Module (HFFM). This module employs a progressive fusion strategy, combined with residual connections and an attention mechanism, to efficiently fuse structural and relational features, interactive embedding features, and contrastive learning features. This enables the model to more comprehensively and accurately capture feature information related to the risk level of drug combinations.
[0181] Based on the above embodiment, in an optional embodiment of the present invention, step S7 specifically includes steps S71 to S74.
[0182] S71. Combine structural features with relationship features to obtain new drug structural features .
[0183] .
[0184] Where, For the structural characteristics of drugs, For the features after splicing, Represents vector concatenation, is the feature after residual projection, and are two different learnable parameters, ReLU activation function, For structural characteristics, For relationship characteristics, is the nonlinear bias vector.
[0185] Fusion of structural and relational features: TrimNet structural features, as the fundamental structural representation of drug molecules, contain rich atomic and chemical bond information. The deep relational features extracted by the graph convolutional network, on the other hand, focus on revealing the interactions between drug molecules. Combining structural and relational features provides a more comprehensive information foundation for subsequent fusion operations, achieved through dual-path fusion with residual connections.
[0186] This fusion method can not only fully integrate the advantages of the two features, but also retain the key information of the original features through residual connections, effectively avoiding the information loss problem that may occur during the fusion process, thereby obtaining new drug structure features and providing more representative input for subsequent feature processing.
[0187] S72. Use a dual-path fusion method to fuse the structure contrast learning feature and the similarity contrast learning feature to obtain a contrast learning feature.
[0188] Specifically, the structural features of TrimNet Similarity Features Input into contrastive learning, through the unique mechanism of contrastive learning, it can dig out the potential correlation and difference between features, and then obtain structural contrastive learning features and similarity comparison learning features Then, the same dual-path fusion method as step S71 is used to make the two contrast learning features complement each other, further enhance the feature expression ability, and obtain the contrast learning feature. This fusion method can make full use of the features learned by contrastive learning, improve the model's ability to discriminate drug molecular features, and provide more discriminative feature representations for subsequent attention fusion.
[0189] S73, structural features , contrastive learning features and the previous interaction embedding features Perform feature alignment and obtain alignment features.
[0190] .
[0191] Where, Represents alignment features, FFN is a two-layer feedforward network, For normalization operation, is the attention weight matrix, is the Softmax activation function, Indicates transposition, For query, For key, For value, is the hidden layer dimension, They are The projection matrix.
[0192] In order to achieve semantic alignment and association fusion between multi-source features, the embodiment of the present invention designs an improved multi-head attention mechanism for attention fusion, and enhances the ability of collaborative representation through multi-source feature interaction modeling. , contrastive learning features and the previous interaction embedding features Perform feature alignment. In this way, features from different sources can be aligned at the semantic level.
[0193] S74. Introduce learnable affine transformation to dynamically adjust the fusion features and obtain the final output fusion features .
[0194] .
[0195] Where, and are different trainable recalibration parameters respectively.
[0196] Specifically, the dynamic adjustment of fused features using a learnable affine transformation further enhances their expressive power. By preserving the original feature information through residual connections and leveraging attention to achieve semantic alignment between features, the resulting fused features effectively capture the associated characteristics of drug combination risk levels, providing a more accurate feature representation for subsequent risk level prediction, thereby improving the model's performance in drug combination risk assessment tasks.
[0197] S8. Based on the fusion features, use a classification model to determine the risk level of the drug combination and obtain the drug combination risk.
[0198] After completing the hierarchical feature fusion, the model needs to convert the fused features into a prediction of the risk level of the drug combination. The embodiment of the present invention achieves this key task through the multi-layer perceptron MLP. Given a drug pair ( ) fusion features and First, features are concatenated to form a new vector containing drug combination information. This concatenated feature vector is then fed into a three-layer fully connected network for prediction. Each layer of the fully connected network applies a linear transformation to the input using a weight matrix and introduces a nonlinear transformation using an activation function. This gradually extracts features and ultimately outputs a prediction of the drug combination risk level.
[0199] .
[0200] Where, for and Features after splicing, For multi-layer perceptron, is the Softmax activation function, For the prediction results.
[0201] Through the above series of model optimization and training strategies, the embodiment of the present invention constructs an efficient, accurate and well-generalized drug combination risk level prediction model, which can effectively cope with complex situations in practical applications and provide reliable support for drug development and clinical use.
[0202] The drug combination risk prediction method based on multi-source feature fusion and contrastive learning in the embodiment of the present invention can accurately predict the risk level, effectively handle data imbalance, deeply mine feature associations, and has good generalization ability.
[0203] Accurately predict risk levels: Through a multi-source feature fusion architecture, multiple features are integrated and a multi-level feature representation space is constructed, improving the ability to predict risk levels. Experiments on multiple datasets show that MSFCL significantly outperforms baseline models in various evaluation indicators. For example, in the risk level prediction task on the DDInter dataset, the average improvement in Accuracy is 9.84%, and the average improvement in Macro-F1 is 14.97%.
[0204] Effectively handle data imbalance: The AGNHP strategy in the adaptive contrastive learning mechanism enhances feature discriminability while preserving data semantics, improves the model's ability to distinguish minority class features, and alleviates the problem of data distribution imbalance.
[0205] Deeply explore feature associations: The hierarchical feature fusion module uses residual connections and attention mechanisms to achieve progressive fusion of multi-source features, effectively exploring the association patterns of risk levels, enabling the model to more comprehensively and accurately capture feature information related to drug combination risk levels.
[0206] Good generalization ability: In the multi-classification tasks of DrugBank and MDF-SA-DDI datasets, MSFCL also demonstrated excellent generalization ability, proving that the method can stably and accurately predict the risk level of drug combinations on different datasets.
[0207] Example 2: The present invention provides a drug combination risk prediction device based on multi-source feature fusion and comparative learning, which includes a data set acquisition module, a feature graph construction module, a structural feature extraction module, a relationship feature extraction module, an interactive embedding feature extraction module, a comparative learning module, a feature fusion module and a risk prediction module.
[0208] The dataset acquisition module is used to obtain the drug dataset.
[0209] The feature map construction module is used to obtain a feature map based on the drug dataset.
[0210] The structural feature extraction module is used to extract the molecular graph structure adaptively based on the feature graph through the molecular graph neural network based on the ternary message passing mechanism to obtain the molecular graph features of the drug. The molecular graph features are defined as structural features. .
[0211] The relationship feature extraction module is used to input the molecular graph features generated by TrimNet into the multi-layer cascade graph convolutional network to extract high-order topological features in the drug network and obtain relationship features. .
[0212] An interactive embedding feature extraction module for calculating similarity features based on the Morgan molecular fingerprint and Tanimoto coefficient according to the drug dataset , and extract interactive embedding features .
[0213] The contrastive learning module is used to mine the potential associations and differences between features based on the structural features and the similarity features through the contrastive learning mechanism to obtain structural contrastive learning features. and similarity comparison learning features .
[0214] A feature fusion module is used to perform feature fusion and feature alignment on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain fused features. .
[0215] The risk prediction module is used to determine the risk level of the drug combination based on the fusion features and use a classification model to obtain the drug combination risk.
[0216] In a third embodiment, the present invention provides a device for predicting drug combination risk based on multi-source feature fusion and contrastive learning, comprising a processor, a memory, and a computer program stored in the memory. The computer program can be executed by the processor to implement the drug combination risk prediction method based on multi-source feature fusion and contrastive learning as described in any of the sections of the first embodiment.
[0217] Embodiment 4. The present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a drug combination risk prediction method based on multi-source feature fusion and comparative learning as described in any paragraph of Embodiment 1.
[0218] Obviously, the embodiments described above are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0219] In the several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or actions, or can be implemented using a combination of dedicated hardware and computer instructions.
[0220] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0221] If the functions are implemented as software modules and sold or used as standalone products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for causing a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, removable hard drives, read-only memories, random access memories, magnetic disks, or optical disks. It should be noted that, as used herein, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. Without further limitation, the phrase "comprises a..." does not preclude the presence of other identical elements in the process, method, article, or device comprising the elements.
[0222] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "an", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0223] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0224] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0225] The references to "first" and "second" in the embodiments merely distinguish similar objects and do not represent a specific ordering of the objects. It is understood that the specific order or precedence of "first" and "second" can be interchanged where appropriate. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.
[0226] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A drug combination risk prediction method based on multi-source feature fusion and contrastive learning, characterized in that: Include: Obtain drug datasets; Acquire a feature map according to the drug dataset; According to the feature graph, adaptive feature extraction of the molecular graph structure is performed through a molecular graph neural network based on a ternary message passing mechanism to obtain molecular graph features of the drug; Define the molecular graph features as structural features ; The molecular graph features generated by TrimNet are input into a multi-layer cascade graph convolutional network to extract high-order topological features in the drug network and obtain relationship features. ; Based on the drug dataset, similarity features are calculated based on Morgan molecular fingerprints and Tanimoto coefficients , and extract interactive embedding features ; According to the structural features and the similarity features, the potential associations and differences between the features are mined through a comparative learning mechanism to obtain structural comparative learning features. and similarity comparison learning features ; Perform feature fusion and feature alignment on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain fused features ; According to the fusion features, a classification model is used to determine the risk level of the drug combination to obtain the drug combination risk; According to the feature graph, adaptive feature extraction of the molecular graph structure is performed through a molecular graph neural network based on a ternary message passing mechanism to obtain the molecular graph features of the drug, specifically including: The molecular graph neural network based on the ternary message passing mechanism performs the following steps in the message passing phase: According to the feature graph, the node pairs and their connecting edges are projected into a unified feature space through a triple attention network, and the interaction strength is calculated through a nonlinear transformation; Where, is the interaction strength, represents the LeakyReLU activation function, U is the learnable weight vector, Indicates transposition, and For two different trainable parameter matrices, and Represents the time step Time Node and nodes The hidden state of is a node and nodes The edge features between Represents vector concatenation; Generate an attention distribution by normalization according to the interaction strength; Where, For attention distribution, is an exponential function with the natural constant e as the base, For nodes The neighborhood set of For nodes and nodes Interaction intensity; Through the node The hidden state and edge characteristics Weighted sum to get node Aggregate news; Where, Representation node Aggregate messages, is the attention coefficient, and For two different trainable weight matrices, For nodes The hidden state of represents the Hadamard product; Based on the aggregated messages, a multi-head attention mechanism is used to generate multiple groups of messages in parallel and splice them together to obtain multi-dimensional features; Where, For multidimensional features, Represents vector concatenation, It is The attention coefficient calculated by the attention head, is the number of attention heads, is the first weight matrix of the input linear transformation, is the second weight matrix of the input linear transformation; Using gated recurrent units as node update functions, the previously extracted messages are fused with the current integrated features to achieve temporal feature integration, and layer normalization is introduced to alleviate gradient anomalies. The iterations gradually optimize the node representation and output high-order features; Where, is a high-order feature, LN represents layer normalization, GRU represents gated recurrent unit, is the feature of the current integration; The molecular graph neural network based on the ternary message passing mechanism performs the following steps in the readout phase: Use LSTM to update hidden state; Where, For hidden state, Represents LSTM network, represents the aggregated features of the previous time step; Calculate the attention weight of the node based on the hidden state; Where, is the attention weight, is the softmax activation function, is a high-order feature; Aggregating node features according to the attention weights; Where, is the node feature after aggregation, is the total number of nodes; After aggregating node features, After iterations, the molecular graph features of the drug are finally obtained; Where, The molecular graph features of the drug, For the The hidden state of the iteration; The molecular graph features are defined as structural features.
2. The drug combination risk prediction method based on multi-source feature fusion and contrastive learning according to claim 1, characterized in that: The molecular graph features generated by TrimNet are input into a multi-layer cascaded graph convolutional network to extract high-order topological features in the drug network and obtain relational features, including: The molecular graph features generated by TrimNet are input into a two-layer cascaded graph convolutional network to extract relational features. The extraction model of relational features is: Where, is the output of the first layer of graph convolutional network, is the output of the second-layer graph convolutional network, For relationship characteristics, Residual connection, Represents the first layer of graph convolution operation, Represents the second-layer graph convolution operation, The initial graph representation of TrimNet output, is the edge index set, AttnWeight represents the attention mechanism; The steps of single-layer graph convolution are as follows: Using the molecular graph features of the drug as initial features, graph convolution is performed; Where, is the feature after convolution, For graph convolution, is the convolutional layer, For the initial features, is the edge index set, is the degree matrix, Adjacency matrix with self-loops, is the trainable parameter matrix; The convolutional features are processed through batch normalization, ReLU activation and residual connection; Where, For output features, For random dropout, is the ReLU activation function, For batch normalization, is the dimension projection function; According to the processed features, the node attention weight is calculated through the shallow perception network; Where, is the node attention weight, is the tanh activation function, is the attention parameter matrix.
3. The drug combination risk prediction method based on multi-source feature fusion and contrastive learning according to claim 1, characterized in that: Based on the drug dataset, similarity features are calculated based on Morgan molecular fingerprints and Tanimoto coefficients, and interactive embedding features are extracted, including: Obtaining a Morgan molecular fingerprint of a drug combination according to the drug dataset; Calculating the similarity between two drug molecular fingerprints based on the Morgan molecular fingerprints of the drug combination to obtain a similarity feature; Where, For similarity, and Represent the fingerprint vectors of two drug molecules respectively; The identity matrix is introduced as structured prior information, and the identity matrix is mapped to the target embedding space through a linear projection layer to generate a set of orthogonal basis vectors; Where, are orthogonal basis vectors, is the identity matrix, Represents a linear projection layer, Represents real numbers, is the total number of nodes, is the embedding space dimension of the projection; Projecting the similarity feature into the target embedding space, and then weighted mixing it with the orthogonal basis vector to obtain a mixed embedding matrix; Where, Generate new similarity features for projection into embedding space, is the mixed embedding matrix, is a learnable weight parameter; For drug combinations and , extract the mixed embedding vector corresponding to the drug combination from the mixed embedding matrix index and ; Where, and Respectively represent drugs and medications The mixed embedding vector of and are the mixed embedding matrices of the two drug sets respectively; According to the mixed embedding vector and , the synergistic effect of drug pairs is captured by Hadamard product, and L2 normalization operation is applied to obtain the interaction embedding features; Where, Embedding features for interaction, represents the L2 normalization operation, represents the Hadamard product, represents the L2 norm.
4. The drug combination risk prediction method based on multi-source feature fusion and contrastive learning according to claim 1, characterized in that: Based on the structural features and the similarity features, potential associations and differences between the features are mined through a comparative learning mechanism to obtain structural comparative learning features and similarity comparative learning features, specifically including: Given the original model parameters of the heterogeneous graph transformer, calculate the gradient sign direction of its corresponding loss function; the calculation model of the gradient sign direction is: Where, is the gradient sign direction, is the symbolic function, represents the gradient direction, represents the gradient, are the original model parameters, is the corresponding loss function; Introducing a loss weight factor to dynamically adjust the noise intensity according to the current loss value; Where, is the loss weight factor, is the current loss value, is the smoothing factor; The GNN layer parameters of the model are perturbed according to the loss weight factor, and the parameters after perturbation are: Where, Represents the GNN layer parameters after perturbation, is a learnable weight parameter used to balance the contribution of gradient direction and Gaussian noise, is the gradient sign direction, is random noise obeying Gaussian distribution; Use the heterogeneous graph transformer and its perturbed version as a dual encoder to encode and obtain the original view and the perturbed view; Where, and Represents the original view generated by the structural features and similarity features input to the heterogeneous graph transformer, and They represent the perturbed views generated by the perturbed heterogeneous graph transformer, ( ) is the original encoder, ( ) is the encoder after applying the mixed perturbation, For the diagram representation; The representations of the original view and the perturbed view are mapped to the latent space through a nonlinear projection head; Where, is the potential feature representation obtained by the nonlinear transformation of the structural features of the original view through MLP, is the potential feature representation obtained by the nonlinear transformation of the similarity feature of the original view through MLP, is the potential feature representation obtained by the nonlinear transformation of the structural features of the perturbed view through MLP, is the potential feature representation obtained by the nonlinear transformation of the perturbed view similarity feature after MLP, Represents a nonlinear projection head, is the nonlinear projection head corresponding to the original encoder, is the nonlinear projection head corresponding to the perturbed encoder, For multi-layer perceptron, and are two different learnable parameter matrices; According to the latent feature representation mapped to the latent space, the structure contrast learning feature and the similarity contrast learning feature are obtained; Where, Learning features for structural comparison, Learning features for similarity comparison, is average pooling.
5. The method for drug combination risk prediction based on multi-source feature fusion and contrastive learning according to claim 1, characterized in that: Performing feature fusion and feature alignment on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain fused features, specifically includes: Combine structural features with relationship features to obtain new drug structural features ; Where, For the structural characteristics of drugs, For the features after splicing, Represents vector concatenation, is the feature after residual projection, and are two different learnable parameters, ReLU activation function, For structural characteristics, For relationship characteristics, is the nonlinear bias vector; The structure contrast learning features and similarity contrast learning features are integrated by dual-path fusion to obtain contrast learning features. ; Structural features , contrastive learning features and the previous interaction embedding features Perform feature alignment and obtain alignment features; Where, Represents alignment features, FFN is a two-layer feedforward network, For normalization operation, is the attention weight matrix, is the Softmax activation function, Indicates transposition, For query, For key, For value, is the hidden layer dimension, They are The projection matrix; According to the alignment features, a learnable affine transformation is introduced to dynamically adjust the fusion features to obtain the final output fusion features. ; Where, and are different trainable recalibration parameters respectively.
6. The method for drug combination risk prediction based on multi-source feature fusion and contrastive learning according to claim 1, characterized in that: The drug dataset contains SMILES sequences of drug combinations.
7. A drug combination risk prediction device based on multi-source feature fusion and contrastive learning, characterized in that: It is suitable for executing a drug combination risk prediction method based on multi-source feature fusion and comparative learning as described in any one of claims 1 to 6; The drug combination risk prediction device comprises: A data set acquisition module, used to acquire drug data sets; A feature map construction module, configured to obtain a feature map based on the drug dataset; The structural feature extraction module is used to perform adaptive feature extraction of the molecular graph structure based on the feature graph through a molecular graph neural network based on a ternary message passing mechanism to obtain the molecular graph features of the drug; the molecular graph features are defined as structural features. ; The relationship feature extraction module is used to input the molecular graph features generated by TrimNet into the multi-layer cascade graph convolutional network to extract high-order topological features in the drug network and obtain relationship features. ; An interactive embedding feature extraction module for calculating similarity features based on the Morgan molecular fingerprint and Tanimoto coefficient according to the drug dataset , and extract interactive embedding features ; The contrastive learning module is used to mine the potential associations and differences between features based on the structural features and the similarity features through the contrastive learning mechanism to obtain structural contrastive learning features. and similarity comparison learning features ; A feature fusion module is used to perform feature fusion and feature alignment on the structural features, the relationship features, the structural contrast learning features, the similarity contrast learning features, and the interactive embedding features to obtain fused features. ; The risk prediction module is used to determine the risk level of the drug combination based on the fusion features and use a classification model to obtain the drug combination risk.
8. A drug combination risk prediction device based on multi-source feature fusion and contrastive learning, characterized in that: It comprises a processor, a memory, and a computer program stored in the memory; the computer program can be executed by the processor to implement a drug combination risk prediction method based on multi-source feature fusion and comparative learning as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a drug combination risk prediction method based on multi-source feature fusion and comparative learning as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-relation comparative learning drug interaction prediction method, system, medium and equipment
CN118173198A