MiRNA-drug association relationship prediction method and system based on self-attention mechanism and comparative learning

By adopting self-attention mechanism and contrast learning methods in miRNA-drug association prediction, the problem of insufficient information utilization is solved and the prediction accuracy is significantly improved.

CN119541648APending Publication Date: 2025-02-28HUNAN UNIV OF CHINESE MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411263277.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art has insufficient information utilization in miRNA-drug association prediction, resulting in low prediction accuracy.

Method used

Using a method based on self-attention mechanism and contrast learning, the miRNA-drug association map is constructed by obtaining characteristic vectors from the drug molecular structure diagram and miRNA sequence, and encoding it using a GCN model with self-attention mechanism, and then comparatively learning is performed by positive and negative samples to calculate the score of the miRNA-drug association pair.

Benefits of technology

The various similar data of miRNA and drugs are fully utilized, and the information between neighbor node information and positive and negative samples are taken into account, effectively improving the accuracy of miRNA-drug association prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119541648A_ABST
    Figure CN119541648A_ABST
Patent Text Reader

Abstract

The invention discloses a miRNA-drug association relationship prediction method and system based on a self-attention mechanism and comparative learning, and the method comprises the steps: obtaining a first feature vector from a drug molecular structure diagram, obtaining a second feature vector from a miRNA sequence, and respectively taking the first feature vector and the second feature vector as initial input features of a drug and miRNA; constructing a miRNA-drug association diagram based on the miRNA-drug association relationship and the initial input features, and covering a part of paths in the association diagram by adopting a random walk method to obtain a mask diagram; inputting the mask pattern into a GCN model with a self-attention mechanism for coding, and performing comparative learning through a positive sample and a negative sample; the positive sample is a miRNA-drug association edge, the negative sample is a miRNA-drug unknown association edge, and all known and unknown miRNA-drug association relation pairs are decoded by using a decoder so as to reconstruct a miRNA-drug association diagram; and calculating the score of the miRNA-drug association relationship pair, and predicting the miRNA-drug association. According to the invention, the accuracy of miRNA-drug association prediction is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning, and in particular to a method and system for predicting miRNA-drug association relationship based on self-attention mechanism and contrastive learning. Background Art

[0002] MicroRNAs (miRNAs) are a class of small, non-coding RNA molecules that play a key role in the regulation of gene expression. miRNAs can affect the metabolic rate of drugs by regulating the expression of drug-metabolizing enzymes, thereby affecting the efficacy and toxic side effects of drugs. Drugs can regulate gene expression by affecting the expression level of miRNAs, thereby affecting cell function and biological processes. Studying the interaction between miRNA and drugs is of great significance for understanding the pathogenesis of diseases, the mechanism of action of drugs, and the discovery and development of drugs. The study of miRNA-drug prediction aims to use machine learning and bioinformatics methods to mine the potential interactions between miRNA and drugs from a large amount of experimental data, and provide new ideas and methods for disease treatment and drug discovery.

[0003] For example, in 2021, Xu et al. combined various networks, including miRNA-drug and miRNA-disease, to predict potential miRNA-drug associations. Deepthi and Jereesh merged miRNA and drug similarity data, used CNN to obtain node representations, and applied support vector machines to identify unknown miRNA-drug associations. In 2022, Guan et al. used convolutional neural networks (CNNs) to obtain miRNA and drug features, as well as the topological features of the miRNA-drug network. These features are then integrated and a multi-layer perceptron (MLP) is used to predict unknown miRNA-drug associations. In 2023, Wei et al. used a multi-view comparative learning model GCFMCL based on graph collaborative filtering to predict the sensitivity relationship between miRNA and drugs.

[0004] Although the above methods are effective in studying miRNA-drug association, there are still many shortcomings. On the one hand, some methods do not make full use of useful information for miRNA-drug prediction and do not comprehensively consider various similarity data; on the other hand, some methods fail to aggregate neighbor node information well when learning miRNA and drug embedding features, resulting in unsatisfactory prediction results. Summary of the invention

[0005] The purpose of the present invention is to provide a method and system for predicting miRNA-drug association relationship based on self-attention mechanism and contrastive learning, so as to solve the technical problem that the prior art miRNA-drug prediction does not make sufficient use of information, resulting in low prediction accuracy.

[0006] To achieve the above object, the present invention provides a method for predicting miRNA-drug association relationship based on self-attention mechanism and contrastive learning, comprising the following steps:

[0007] Obtaining a first feature vector from the drug molecular structure diagram, obtaining a second feature vector from the miRNA sequence, and using the first feature vector and the second feature vector as initial input features of the drug and miRNA, respectively;

[0008] Based on the miRNA-drug association relationship and the initial input features, a miRNA-drug association graph is constructed, and a random walk method is used to mask some paths in the association graph to obtain a mask graph;

[0009] The mask image is input into the GCN (graph convolution) model with self-attention mechanism for encoding, and then compared with positive and negative samples for learning; the positive samples are miRNA-drug association edges, and the negative samples are miRNA-drug unknown association edges. All known and unknown miRNA-drug association pairs are decoded using a decoder to reconstruct the miRNA-drug association graph;

[0010] Finally, the scores of miRNA-drug association pairs were calculated to predict miRNA-drug association.

[0011] As a further improvement of the method of the present invention:

[0012] Preferably, the GIN method is used to obtain the first feature vector from the drug molecular structure diagram; and the k-mer method is used to obtain the second feature vector from the miRNA sequence.

[0013] Preferably, a random walk method is used to mask part of the paths in the association graph to obtain a mask graph, comprising the following steps:

[0014] Based on the Bernoulli distribution, some nodes on the miRNA-drug association graph are selected as starting nodes, and the selected nodes are represented by a set as follows:

[0015] R~Bernoulli(p)

[0016] Where R represents the starting node set sampled from the graph according to the Bernoulli distribution, and p represents the sampling rate between 0 and 1;

[0017] The paths are obtained based on these starting nodes, and then the random walk method is used for masking to mask the existing miRNA-drug association edges. The detailed calculation strategy of masking is as follows:

[0018] ε mask = RandomWalk(R,l walk)

[0019] Among them, ε mask represents the masking rule in the random process, l walk represents the path length of a random walk.

[0020] Preferably, the self-attention mechanism in the GCN model with self-attention mechanism includes: linear transformation, calculating the dot product score between the query and the key, normalizing it to the attention weight by the softmax function, and concatenating the outputs of the multi-head attention:

[0021] Through linear transformations fc_query, fc_key and fc_value, the input nodes are mapped to the space of query, key and value, and the attention value of each node to other nodes is learned; given the input feature matrix, through three linear transformations W Q ,W K and W V Mapping it to the space of queries Q, keys K, and values ​​V is as follows:

[0022] Q=X·W Q ,K=X·W K ,V=X·W V

[0023] where · represents matrix multiplication;

[0024] Compute the dot product scores between the query and the key:

[0025]

[0026] in, is the dimension of the query or key;

[0027] The dot product scores are normalized by the softmax function to obtain the attention weights, and the values ​​are weighted and summed using the attention weights to obtain the output of the attention mechanism.

[0028] Preferably, the GCN model with self-attention mechanism includes a dropout layer, a convolution layer, a pooling layer, an activation function and a self-attention layer;

[0029] Inputting the mask map into the GCN model with self-attention mechanism for encoding includes: adding and averaging the representations of neighboring nodes, performing a linear transformation based on the weight matrix, and then performing a nonlinear transformation using an activation function. Its propagation between layers is:

[0030]

[0031] Among them, σ represents the activation function, H (l+1) represents the feature matrix of the l+1th layer node, H(l) represents the feature matrix of the l-th layer node, W (l) represents the learnable weight matrix of the l-th layer node; specifically, H 0 =X represents the initial feature matrix of the input miRNA or drug node; represents the self-loop of the adjacency matrix, express The degree matrix of .

[0032] Preferably, comparative learning is performed using positive samples and negative samples, including the following steps:

[0033] Get the size of the batch data, that is, the number of positive and negative samples, and divide the model output of positive and negative samples by the temperature parameter;

[0034] The similarity between positive samples and the similarity between negative samples are calculated by exponential function;

[0035] The loss value is calculated using the contrast loss function, that is, the negative log-likelihood loss is calculated. The formula is as follows:

[0036]

[0037] Where N is the size of the batch data, indicating the number of positive and negative samples; s pos is the value of the model output of the positive sample divided by the temperature parameter; s neg is the value of the model output of the negative sample divided by the temperature parameter; the goal of the contrast loss function is to maximize the similarity s between positive samples pos And minimize the similarity s between negative samples neg ;

[0038] Compare the predicted scores with the true labels and use the BCE loss function to calculate the loss value. The formula is as follows:

[0039] Edge loss =(y-1)*log(1-p)-y*log(p)

[0040] Where y represents the true label of the miRNA-drug association pair, and p represents the score of the predicted miRNA-drug association pair;

[0041] Finally, the BCE loss and the contrastive loss are added to get the total loss.

[0042] Preferably, calculating the score of the miRNA-drug association pair comprises the following steps:

[0043] Based on the node features obtained by the GCN encoder, the Hadamard product of the miRNA-drug association relationship pair is calculated;

[0044] The Hadamard product is input into the MLP, and the activation function is used to calculate the score of the miRNA-drug association pair. The calculation formula is as follows:

[0045]

[0046] Among them, z m Represents the feature vector of miRNA, z d The characteristic vector of the drug, h(z m , z d ) represents the calculated score of the Hadamard product of the miRNA-drug association pair, and the score is in the range of [0,1], indicating the strength of the miRNA-drug association.

[0047] Preferably, the decoder comprises a dropout layer, a multi-layer perceptron and an activation function; the multi-layer perceptron comprises an input layer, a hidden layer and an output layer.

[0048] As a general technical concept, the present invention also provides a method and system for predicting miRNA-drug association relationship based on self-attention mechanism and contrastive learning, including a feature acquisition module, a network construction module, a feature learning module, and an association prediction module;

[0049] A feature acquisition module, used to acquire a first feature vector from a drug molecular structure diagram, and acquire a second feature vector from a miRNA sequence, and use the first feature vector and the second feature vector as initial input features of the drug and miRNA, respectively;

[0050] A network construction module is used to construct a miRNA-drug association graph based on the miRNA-drug association relationship and the initial input features, and to obtain a mask graph by masking part of the paths in the association graph using a random walk method;

[0051] A feature learning module is used to input the mask map into a GCN model with a self-attention mechanism for encoding, and then perform comparative learning through positive and negative samples; the positive samples are miRNA-drug association edges, and the negative samples are miRNA-drug unknown association edges. All known and unknown miRNA-drug association relationship pairs are decoded using a decoder to reconstruct the miRNA-drug association graph;

[0052] The association prediction module is used to calculate the score of miRNA-drug association relationship pairs and predict miRNA-drug association.

[0053] The present invention has the following beneficial effects:

[0054] The miRNA-drug association prediction method and system based on self-attention mechanism and contrastive learning of the present invention fully utilizes various similar data of miRNA and drugs, and fully considers the information of neighbor nodes and the information between positive and negative samples, effectively improving the accuracy of miRNA-drug association prediction.

[0055] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0057] Figure 1 It is a flow chart of a method for predicting miRNA-drug association relationship based on self-attention mechanism and contrastive learning according to a preferred embodiment of the present invention;

[0058] Figure 2 It is a structural schematic diagram of a miRNA-drug association prediction system based on self-attention mechanism and contrastive learning in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0059] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.

[0060] Example 1

[0061] Figure 1 It is a flow chart of the miRNA-drug association prediction method based on self-attention mechanism and contrastive learning in this embodiment. In this embodiment, the drug chemical structure data is obtained from the PubChem database (https: / / pubchem.ncbi.nlm.nih.gov), and the miRNA-drug association and miRNA nucleotide sequence are obtained from the ncDR (http: / / www.jianglab.cn / ncDR / ) database. And a miRNA-drug association network drug construction is constructed based on the association and the initial characteristics of miRNA and drug.

[0062] See also Figure 1 The miRNA-drug association prediction method based on self-attention mechanism and contrastive learning in the embodiment of the present invention comprises the following steps:

[0063] S1: Obtain the first eigenvector from the drug molecular structure diagram (GIN method is used in this embodiment), obtain the second eigenvector from the miRNA sequence (k-mer method is used in this embodiment), and use the first eigenvector and the second eigenvector as the initial input features of the drug and miRNA, respectively.

[0064] S2: Based on the miRNA-drug association relationship and the initial input features, a miRNA-drug association graph is constructed, and a random walk method is used to mask some paths in the association graph to obtain a mask graph, so as to enhance the learning ability of node features in subsequent graphs and improve the robustness of the model.

[0065] During implementation, a random walk method may be used to mask part of the paths in the association graph to obtain a mask graph, including the following steps:

[0066] Based on the Bernoulli distribution, some nodes on the miRNA-drug association graph are selected as starting nodes, and the selected nodes are represented by a set as follows:

[0067] R~Bernoulli(p)

[0068] Where R represents the starting node set sampled from the graph according to the Bernoulli distribution, and p represents the sampling rate between 0 and 1;

[0069] The paths are obtained based on these starting nodes, and then the random walk method is used for masking to mask the existing miRNA-drug association edges. The detailed calculation strategy of masking is as follows:

[0070] εmask=RandomWalk(R,lwalk)

[0071] Among them, ε mask represents the masking rule in such a random process, l walk represents the path length of a random walk.

[0072] S3: The mask map is input into the GCN model with self-attention mechanism for encoding, and then compared with positive and negative samples for learning to improve the effectiveness of extracting node features; the positive sample is the miRNA-drug association edge, and the negative sample is the miRNA-drug unknown association edge. All known and unknown miRNA-drug association pairs are decoded using a decoder to reconstruct the miRNA-drug association graph.

[0073] When implemented, the self-attention mechanism in the GCN model with self-attention mechanism includes: linear transformation, computing the dot product score between the query and the key, normalizing it into attention weights with a softmax function, and concatenating the outputs of the multi-head attention:

[0074] Through linear transformations fc_query, fc_key, and fc_value, the input nodes are mapped to the space of query, key, and value, and the attention value of each node to other nodes is learned to better associate the representations between each node; given the input feature matrix, through three linear transformations W Q ,W K and W V Mapping it to the space of queries Q, keys K, and values ​​V is as follows:

[0075] Q=X·W Q ,K=X·W K ,V=X·W V

[0076] where · represents matrix multiplication;

[0077] Compute the dot product scores between the query and the key:

[0078]

[0079] in, is the dimension of the query or key;

[0080] The dot product scores are normalized by the softmax function to obtain the attention weights, and the values ​​are weighted and summed using the attention weights to obtain the output of the attention mechanism. By normalizing the scores, training can be performed more stably.

[0081] When implemented, the GCN model with self-attention mechanism (GCN encoder) includes a dropout layer, a convolution layer, a pooling layer, an activation function, and a self-attention layer;

[0082] Inputting the mask map into the GCN model with self-attention mechanism for encoding includes: adding and averaging the representations of neighboring nodes, performing a linear transformation based on the weight matrix, and then performing a nonlinear transformation using an activation function. Its propagation between layers is:

[0083]

[0084] Among them, σ represents the activation function, H (l+1) represents the feature matrix of the l+1th layer node, H (l) represents the feature matrix of the l-th layer node, W (l) represents the learnable weight matrix of the l-th layer node; specifically, H 0 =X represents the initial feature matrix of the input miRNA or drug node; represents the self-loop of the adjacency matrix, express The degree matrix of .

[0085] When implemented, comparative learning through positive and negative samples may include the following steps:

[0086] Get the batch size, i.e. the number of positive and negative samples, and divide the model output of positive and negative samples by the temperature parameter; the temperature parameter is used in classification problems to adjust the smoothness of the model output, helping us better understand the uncertainty of the model.

[0087] The similarity between positive samples and the similarity between negative samples are calculated by exponential function;

[0088] The loss value is calculated using the contrast loss function, that is, the negative log-likelihood loss is calculated. The formula is as follows:

[0089]

[0090] Where N is the size of the batch data, indicating the number of positive and negative samples; s pos is the value of the model output of the positive sample divided by the temperature parameter; s neg is the value of the model output of the negative sample divided by the temperature parameter; the goal of the contrast loss function is to maximize the similarity s between positive samples pos And minimize the similarity s between negative samples neg ;

[0091] Compare the predicted score with the true label (the output of the model is a probability value p, which indicates the probability that the sample belongs to the positive class. The true label y is 0 or 1, indicating the true category of the sample. In the binary classification problem, the comparison is made by calculating the difference between the predicted score and the true label. Based on this difference, the prediction performance of the model can be measured and the model parameters can be adjusted accordingly), and the BCE loss function is used to calculate the loss value. The formula is as follows:

[0092] Edge loss =(y-1)*log(1-p)-y*log(p)

[0093] Wherein, y represents the true label of the miRNA-drug association pair (a label represents a known association pair, and label y=1 indicates that there is a known association between the miRNA and the drug. Label y=0 indicates that there is no known association between the miRNA and the drug. This embodiment is obtained from the ncDR database (http: / / www.jianglab.cn / ncDR / )), and p represents the score of the predicted miRNA-drug association pair;

[0094] Finally, the BCE loss and the contrastive loss are added to get the total loss.

[0095] In implementation, the decoder may include a dropout layer, a multi-layer perceptron, and an activation function; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer.

[0096] S4: Finally, the Hadamard product was used to calculate the score of the miRNA-drug association pair and predict the miRNA-drug association.

[0097] When implemented, the scores of miRNA-drug association pairs are calculated, including the following steps:

[0098] Based on the node features obtained by the GCN encoder, the Hadamard product of the miRNA-drug association relationship pair is calculated;

[0099] The Hadamard product is input into the MLP (the multilayer perceptron used in this embodiment is a simple multilayer perceptron structure constructed with 3 linear layers, an activation function, and dropout.), and the activation function is used to calculate the score of the miRNA-drug association relationship pair. The calculation formula is as follows:

[0100]

[0101] Among them, z m Represents the feature vector of miRNA, z d The characteristic vector of the drug, h(z m , z d ) represents the calculated score of the Hadamard product of the miRNA-drug association pair, and the score is in the range of [0,1], indicating the strength of the miRNA-drug association.

[0102] Example 2

[0103] See also Figure 2 An embodiment of the present invention provides a prediction system for miRNA-drug association relationship based on self-attention mechanism and contrastive learning, including a feature acquisition module, a network construction module, a feature learning module, and an association prediction module.

[0104] The feature acquisition module is used to obtain feature vectors from the drug molecular structure diagram using GIN, and to obtain feature vectors from the miRNA sequence using the k-mer method, which are used as initial input features of the drug and miRNA molecules, respectively. The construction method used by the feature acquisition module can be referred to in Example 1, and will not be described in detail here.

[0105] The network construction module is used to construct a miRNA-drug association graph based on the miRNA-drug association relationship and the initial features, and to mask part of the path using a random walk method to obtain a mask graph, so as to enhance the learning ability of node features in subsequent graphs and improve the robustness of the model. The construction method used by the network construction module can be referred to Example 1, which will not be described in detail here.

[0106] The feature learning module is used to input the mask map into the GCN model with a self-attention mechanism for encoding, and then compare and learn through positive samples (miRNA-drug association edges) and negative samples (miRNA-drug unknown association edges) to improve the effectiveness of extracting node features. All known and unknown miRNA-drug association pairs are decoded using a decoder to reconstruct the miRNA-drug association graph. The construction method adopted by the feature learning module can refer to Example 1, which will not be repeated here.

[0107] The association prediction module is used to calculate the score of the miRNA-drug association relationship pair through Hadamard product and predict the association relationship between miRNA and drug. The construction method adopted by the association prediction module can be referred to Example 1, which will not be described in detail here.

[0108] Effect verification:

[0109] In order to evaluate the performance of the model, the present invention uses two comprehensive indicators, AUC and AUPR. The prediction accuracy of the miRNA-drug association prediction method is evaluated as follows:

[0110] First, the dataset was randomly divided into training and test sets, with 80% of the data used as the training set and 20% of the data used as the test set; the same number of negative miRNA-drug association pairs as the experimentally confirmed positive samples were randomly generated; finally, in order to prevent the bias caused by random segmentation of the dataset, the total number of model training was 10 times, with 1000 trainings each time and the average value of all evaluation indicators calculated. The experimental results are shown in Table 1:

[0111] Table 1: Experimental results of RAC-GAE of the present invention and other methods under ncDR

[0112]

[0113] As can be seen from Table 1, the miRNA-drug association prediction method of the present invention achieved an AUC of 98.96±0.03% and an AUPR of 98.81±0.02%. All indicators of the RAC-GAE model of the present invention are superior to those of the GCFMCL model.

[0114] The prediction accuracy of the miRNA-drug association prediction method was further evaluated using the case validation method. The specific method is as follows:

[0115] First, the known miRNA-drug associations in the ncDR dataset were used as the training set, and all miRNA-drug association pairs containing the investigated drugs were used as the test set; then, the training set was used to train the model and predict the candidate miRNAs for the investigated drugs; finally, the top 20 predicted miRNAs were screened (for the purpose of this study, the top 20 miRNAs with the highest resistance scores to the two drugs were selected), and these predicted miRNAs were verified based on the ncDR database and relevant literature.

[0116] Through case verification, the association evaluation results with the drug Verapamil in the ncDR database are shown in Table 2, and the association with the drug Doxorubicin (Adriamycin) is shown in Table 3:

[0117] Table 2: Top 20 miRNAs predicted to be associated with Verapamil under ncDR

[0118]

[0119] As can be seen from Tables 2 and 3, the top 20 miRNAs predicted by RAC-GAE have been confirmed in the ncDR database. The experimental results show that among the top 20 miRNAs predicted by the verapamil and doxorubicin (ADB) resistance models, 17 and 19 miRNAs, respectively, have been verified in the actual database ncDR.

[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A miRNA-drug association prediction method based on self-attention mechanism and contrastive learning, characterized in that: The following steps are involved: Obtaining a first feature vector from the drug molecular structure diagram, obtaining a second feature vector from the miRNA sequence, and using the first feature vector and the second feature vector as initial input features of the drug and miRNA, respectively; Based on the miRNA-drug association relationship and the initial input features, a miRNA-drug association graph is constructed, and a random walk method is used to mask part of the paths in the association graph to obtain a mask graph; The mask image is input into the GCN model with self-attention mechanism for encoding, and then compared with positive samples and negative samples for learning; the positive samples are miRNA-drug association edges, and the negative samples are miRNA-drug unknown association edges. All known and unknown miRNA-drug association pairs are decoded by a decoder to reconstruct the miRNA-drug association graph; Finally, the scores of miRNA-drug association pairs were calculated to predict miRNA-drug association.

2. The prediction method according to claim 1, characterized in that: The first feature vector is obtained from the drug molecular structure diagram using the GIN method; the second feature vector is obtained from the miRNA sequence using the k-mer method.

3. The prediction method according to claim 1, characterized in that: The random walk method is used to cover part of the paths in the association graph to obtain a mask graph, including the following steps: Based on the Bernoulli distribution, some nodes on the miRNA-drug association graph are selected as starting nodes, and the selected nodes are represented by a set as follows: R~Bernoulli(p) Where R represents the starting node set sampled from the graph according to the Bernoulli distribution, and p represents the sampling rate between 0 and 1; The paths are obtained based on these starting nodes, and then the random walk method is used for masking to mask the existing miRNA-drug association edges. The detailed calculation strategy of masking is as follows: εmask=RandomWalk(R,lwalk) Among them, ε mask represents the masking rule in the random process, l walk represents the path length of a random walk.

4. The prediction method according to claim 1, characterized in that: The self-attention mechanism in the GCN model with self-attention mechanism includes: linear transformation, calculating the dot product score between the query and the key, normalizing it to the attention weight by the softmax function, and concatenating the outputs of the multi-head attention: Through linear transformations fc_query, fc_key and fc_value, the input nodes are mapped to the space of query, key and value, and the attention value of each node to other nodes is learned; given the input feature matrix, through three linear transformations W Q ,W K and W V Mapping it to the space of queries Q, keys K, and values ​​V is as follows: Q=X·W Q ,K=X·W K ,V=X·W V where · represents matrix multiplication; Compute the dot product scores between the query and the key: in, is the dimension of the query or key; The dot product scores are normalized by the softmax function to obtain the attention weights, and the values ​​are weighted and summed using the attention weights to obtain the output of the attention mechanism.

5. The prediction method according to claim 4, characterized in that: The GCN model with self-attention mechanism includes a dropout layer, a convolution layer, a pooling layer, an activation function, and a self-attention layer; Inputting the mask map into the GCN model with self-attention mechanism for encoding includes: adding and averaging the representations of neighboring nodes, performing a linear transformation based on the weight matrix, and then performing a nonlinear transformation using an activation function. Its propagation between layers is: Among them, σ represents the activation function, H (l+1) represents the feature matrix of the l+1th layer node, H (l) Represents the feature matrix of the l-th layer node, W (l) represents the learnable weight matrix of the l-th layer node; specifically, H 0 =X represents the initial feature matrix of the input miRNA or drug node; represents the self-loop of the adjacency matrix, express The degree matrix of .

6. The prediction method according to claim 1, characterized in that: The comparative learning by positive samples and negative samples includes the following steps: Get the size of the batch data, that is, the number of positive and negative samples, and divide the model output of positive and negative samples by the temperature parameter; The similarity between positive samples and the similarity between negative samples are calculated by exponential function; The loss value is calculated using the contrast loss function, that is, the negative log-likelihood loss is calculated. The formula is as follows: Where N is the size of the batch data, indicating the number of positive and negative samples; s pos is the value of the model output of the positive sample divided by the temperature parameter; s neg is the value of the model output of the negative sample divided by the temperature parameter; the goal of the contrast loss function is to maximize the similarity s between positive samples pos And minimize the similarity s between negative samples neg ; Compare the predicted scores with the true labels and use the BCE loss function to calculate the loss value. The formula is as follows: Edge loss =(y-1)*log(1-p)-y*log(p) Where y represents the true label of the miRNA-drug association pair, and p represents the score of the predicted miRNA-drug association pair; Finally, the BCE loss and the contrastive loss are added to get the total loss.

7. The prediction method according to claim 1, characterized in that: The calculation of the score of the miRNA-drug association relationship pair comprises the following steps: Based on the node features obtained by the GCN encoder, the Hadamard product of the miRNA-drug association relationship pair is calculated; The Hadamard product is input into the MLP, and the activation function is used to calculate the score of the miRNA-drug association pair. The calculation formula is as follows: Among them, z m Represents the feature vector of miRNA, z d The characteristic vector of the drug, h(z m , z d ) represents the calculated score of the Hadamard product of the miRNA-drug association pair, and the score is in the range of [0,1], indicating the strength of the miRNA-drug association.

8. The prediction method according to claim 1, characterized in that: The decoder includes a dropout layer, a multi-layer perceptron and an activation function; the multi-layer perceptron includes an input layer, a hidden layer and an output layer.

9. A miRNA-drug association prediction system based on self-attention mechanism and contrastive learning, characterized in that: include: Feature acquisition module, network construction module, feature learning module, and association prediction module; A feature acquisition module, used to acquire a first feature vector from a drug molecular structure diagram, and acquire a second feature vector from a miRNA sequence, and use the first feature vector and the second feature vector as initial input features of the drug and miRNA, respectively; A network construction module is used to construct a miRNA-drug association graph based on the miRNA-drug association relationship and the initial input features, and to obtain a mask graph by masking part of the paths in the association graph using a random walk method; A feature learning module is used to input the mask map into a GCN model with a self-attention mechanism for encoding, and then perform comparative learning through positive and negative samples; the positive samples are miRNA-drug association edges, and the negative samples are miRNA-drug unknown association edges. All known and unknown miRNA-drug association relationship pairs are decoded using a decoder to reconstruct the miRNA-drug association graph; The association prediction module is used to calculate the score of miRNA-drug association relationship pairs and predict miRNA-drug association.