Method, device and medium for predicting drug pair interaction relationship
By acquiring and processing the target text, the fusion entity representation of drug pairs is solved, and a more accurate and comprehensive prediction of drug interaction relationships is achieved.
Patent Information
- Application Number
- CN202210263559.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-03-17
AI Technical Summary
The prediction accuracy of the interaction relationship of each drug pair in the document in the prior art is low, and semantic information about more complete interactions between drug pairs cannot be mined from biomedical-related texts.
By obtaining the target text, the comprehensive entity representation of each drug is determined, the comprehensive entity representation of the fusion drug pair is generated, and the interaction relationship of the drug pair is predicted based on this.
Improves the accuracy of drug-to-relationship prediction and allows more comprehensive description of drug-to-relationship semantic information in the document.
Smart Images

Figure CN114678141B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of biomedicine technology, and in particular, relates to a method, device and medium for predicting the interaction relationship between drug pairs. Background Art
[0002] Drug-Drug Interaction (DDI) prediction is an important research field in pharmacovigilance and plays a vital role in drug virtual screening, patient treatment plans, treatment effects, and patient safety research.
[0003] At present, all DDI predictions are based on sentence-level relationships. First, the abstract of each scientific article or the text describing the drug is divided into multiple sentences, and each sentence contains several drugs. Therefore, existing work inputs each drug pair into a specific network for processing and predicts the interaction relationship between each drug pair.
[0004] However, the above DDI prediction methods all process drug pairs at the sentence level, while in practice, the interaction relationship between a drug pair is often determined by multiple sentences. Therefore, in the prior art, the prediction accuracy of the interaction relationship of each drug pair in the document is low. Summary of the invention
[0005] The embodiments of the present application provide a method, device and storage medium for predicting the interaction relationship of drug pairs, which can solve the problem of low prediction accuracy of the interaction relationship of each drug pair in a document.
[0006] In a first aspect, the present invention provides a method for predicting the interaction relationship between drug pairs, the method comprising:
[0007] Obtain a target text; the target text includes multiple drugs, and each drug appears at least once in the target text;
[0008] Determine the comprehensive entity representation corresponding to each drug respectively, where the comprehensive entity representation is used to describe the semantic information of the corresponding drug at each position in the target text;
[0009] For any drug pair among the multiple drugs, determining a fusion entity representation of the drug pair according to the comprehensive entity representations of the two drugs in the drug pair;
[0010] Predict the interaction relationship of drug pairs based on their fusion entity representation.
[0011] In a second aspect, an embodiment of the present application provides a device for predicting the interaction relationship of a drug pair, the device comprising:
[0012] An acquisition module is used to acquire a target text; the target text includes multiple drugs, and each drug appears at least once in the target text;
[0013] A comprehensive entity representation determination module is used to determine the comprehensive entity representation corresponding to each drug, where the comprehensive entity representation is used to describe the semantic information of the corresponding drug at each position in the target text;
[0014] a fusion entity representation determination module, used for determining, for any drug pair among the multiple drugs, a fusion entity representation of the drug pair according to the comprehensive entity representations of the two drugs in the drug pair;
[0015] The prediction module is used to predict the interaction relationship of drug pairs based on the fusion entity representation of the drug pairs.
[0016] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect described above when executing the computer program.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method of the first aspect described above is implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method of the first aspect.
[0019] Compared with the prior art, the embodiment of the present application has the following beneficial effects: by obtaining the corresponding comprehensive entity representation of each drug in the target text, the terminal device can use a comprehensive entity representation to comprehensively describe the semantic information of the corresponding drug at each position in the target text. Afterwards, for each target drug pair, the terminal device can fuse the comprehensive entity representation of each drug to generate a fused entity representation of the drug pair. Furthermore, the terminal device can accurately predict the interaction relationship between drug pairs based on the fused entity representation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1A schematic diagram of an implementation method for generating a sentence-level embodiment provided in an embodiment of the present application;
[0022] Figure 2 This is a flowchart of a method for predicting the interaction relationship of a drug pair provided in one embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of an implementation method of generating a comprehensive entity representation in a method for predicting a drug pair interaction relationship provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of a model structure for generating a comprehensive entity representation of a drug provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of a process for predicting the interaction relationship of drug pairs using a drug relationship prediction model provided in one embodiment of the present application;
[0026] Figure 6 This is a schematic diagram of an implementation method for generating a training set in a method for predicting a drug pair interaction relationship provided in an embodiment of the present application;
[0027] Figure 7 This is a schematic diagram of an implementation method for determining a relationship label in a method for predicting a drug pair interaction relationship provided in another embodiment of the present application;
[0028] Figure 8 It is a schematic diagram of the structure of a device for predicting the interaction relationship of a drug pair provided in one embodiment of the present application;
[0029] Fig. 9 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0031] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0032] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0033] The method for predicting the drug pair interaction relationship provided in the embodiment of the present application can be applied to terminal devices such as tablet computers, wearable devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.
[0034] As described in the background technology, all current DDI predictions are based on sentence-level relationships. When training a sentence-level drug relationship prediction model, a large amount of data sets are usually required. Specifically, after obtaining the data set, the abstract of each scientific article in the data set or part of the text describing the drug is saved as a document in an independent XML file. At this time, each XML file is composed of at least one or more sentences. Each sentence contains several drugs and the relationship labels between each two drugs.
[0035] Therefore, existing work converts each sentence into several instances (each instance is called an instance, focusing on only two drugs). For details, see Figure 1 ), Figure 1 A schematic diagram of an implementation method for generating a sentence-level embodiment provided for an embodiment of the present application. Specifically, assuming there is a sentence (Sentence) containing three non-repetitive drugs (Drug1, Drug2, Drug3), the terminal device needs to convert it into three instances (Instance_A, Instance_B, Instance_C), each instance only focuses on one drug pair (e1 and e2).
[0036] Based on this, we can determine that the number of instances of a sentence generation is determined by the number of drugs contained in the sentence (permutations and combinations, for example, when a sentence contains 4 drugs, it needs to be converted into C 24=6 instances). This means that the number of instances that need to be processed based on sentence-level training of the drug relationship prediction model is several times the number of sentences contained in the original text. Therefore, the sentence-level drug relationship prediction model requires a larger memory space during training, and the network training takes longer. In this embodiment, the same drug in a text is described using a comprehensive entity representation, and a drug pair corresponds to a fusion entity representation. That is, it is different from the sentence-level training of the drug relationship prediction model, in which the text is divided into multiple sentences, and the drugs and drug pairs in each sentence are represented by vectors respectively. In this way, the terminal device can greatly reduce the memory space required for model training.
[0037] In addition, since the sentence-level drug relationship prediction model only focuses on two drugs in a sentence during training, the prediction process is also based only on the semantic information between two drugs in the sentence. However, in practice, the relationship between a drug is often determined by multiple sentences. Therefore, the existing prediction methods for drug pair interaction relationships still have the problem of being unable to mine more complete semantic information about the interaction between drug pairs from biomedical-related texts.
[0038] Based on this, in order to solve the problem of being unable to mine more complete semantic information of the interaction between drug pairs from biomedical related texts, in this embodiment, the terminal device processes the target text in the following manner S101-S104, thereby generating semantic information that can be used to describe the interaction between the two drugs in the target text, so as to improve the accuracy of the prediction of the drug interaction relationship.
[0039] The following is an exemplary description of a method for predicting the interaction relationship of a drug pair provided in the present application in conjunction with specific embodiments.
[0040] See also Figure 2 , Figure 2 The flowchart of a method for predicting the interaction relationship between drug pairs provided in an embodiment of the present application is shown. The method comprises the following steps:
[0041] S201. The terminal device obtains a target text; the target text includes a plurality of drugs, and each drug appears at least once in the target text.
[0042] In one embodiment, the target text is usually a text related to the pharmaceutical field, including but not limited to texts in the form of journals, papers, etc. The target text may be a text in Chinese, English or other languages, without limitation.
[0043] In one embodiment, in order to predict the interaction between drug pairs, the target text must include at least two or more drugs, otherwise, the interaction relationship between the two drugs cannot be predicted from the target text.
[0044] It is understandable that any drug in the target text may appear multiple times at different positions in the target text. Therefore, in this embodiment, there is no restriction on the time at which the target drug appears.
[0045] In one embodiment, the terminal device may specifically obtain the target text through the following steps, which are described in detail as follows:
[0046] The terminal device obtains an initial text, which includes multiple drugs, and each drug appears at least once in the initial text; if there is a drug name using a drug shared suffix in the initial text, the drug name is expanded to obtain a target text.
[0047] In one embodiment, the above-mentioned initial text is unprocessed text, which can be text crawled from the Internet by the terminal device based on the name of the drug, or it can be text pre-stored in the terminal device. In this embodiment, the path for the terminal device to obtain the target text is not limited.
[0048] In one embodiment, the entity name is the drug name of the drug. The drug shared suffix is: when the drug names of multiple drugs have the same partial name, abbreviations may appear in the initial text, so that multiple drugs share a suffix. The shared suffix is the same partial name.
[0049] Exemplarily, the entity names of the two drugs may be: 1) diagnostic monoclonal antibodies; 2) therapeutic monoclonal antibodies. The initial text containing the two drugs may be "…when treated with other diagnostic or therapeutic monoclonal antibodies." That is, the two drug names share "monoclonal antibodies" as a shared suffix. In this case, the terminal device needs to expand the above sentence in the initial text to obtain the target text. That is, the above sentence is changed to: "…when treated with other diagnostic monoclonal antibodies or therapeutic monoclonal antibodies".
[0050] S202: The terminal device determines the comprehensive entity representation corresponding to each drug respectively, where the comprehensive entity representation is used to describe the semantic information of the corresponding drug at each position in the target text.
[0051] In one embodiment, the above-mentioned comprehensive entity represents the semantic information used to comprehensively describe the corresponding drug at various positions in the target text. Specifically, when a drug appears in multiple positions in the target text, if only the sentence containing the drug at one of the positions is processed to obtain the semantic information used to represent the drug in the sentence, then when the subsequent drug pair interaction relationship prediction is finally performed based on the semantic information, the prediction accuracy may be inaccurate. That is, the method of extracting the semantic information of the drug is only obtained after processing a sentence containing the drug in the target text, and the semantic information cannot replace the semantic information corresponding to the drug at other positions in the target text.
[0052] Based on this, in this embodiment, the terminal device can participate in subsequent processing through the comprehensive entity representation corresponding to the drug, thereby improving the prediction accuracy of the interaction relationship between the drug pairs.
[0053] In a specific embodiment, referring to Figure 3 In S202, the terminal device can be implemented specifically through the following sub-steps S301-S303, which are described in detail as follows:
[0054] S301. For any drug, the terminal device determines multiple locations of the drug in the target text respectively.
[0055] S302: The terminal device generates a text sequence corresponding to each position according to the multiple positions.
[0056] S303: The terminal device performs vector processing on the text sequence corresponding to each position to obtain a comprehensive entity representation.
[0057] In one embodiment, the above-mentioned position is the position information of the drug in the target text. Among them, the text sequence is a sequence generated based on the position. Specifically, the terminal device can determine the position information of the drug in the target text according to the entity name of the drug. In addition, the terminal device can use "[" and "]" to identify the starting position and the ending position of each appearance of the drug, so as to mark the position of the drug. Among them, for the case where a drug has multiple position information (that is, the drug appears in the target text multiple times), the order information corresponding to each position can also be assigned according to the order in which the drugs appear in the target text.
[0058] Exemplarily, the terminal device may express the text sequence of the medicine in the following manner:
[0059] X={x1,x2,…x n}, X represents the text sequence of the entire target text, x n represents the nth character in the target text, and n also represents the total number of characters in the target text. Assume that for a given drug Drug-α, it consists of k characters and appears 2 times, then its text sequence can be: P1 = {x i , x i+1 , …x i+k-1}, P2={x j , x j+1 , …x j+k-1}. Where 1 and 2 in P1 and P2 represent the order in which the drugs appear in the target text. i represents the i-th character in the target text when the drug first appears; since the drug name consists of k characters, x i+k-1 That is, the end position of the drug in the text after the first appearance. It can be understood that if the drug appears multiple times, there will be multiple corresponding text sequences.
[0060] In one embodiment, performing vector processing on a text sequence is to represent the text sequence in a manner that can be recognized by a terminal device.
[0061] Specifically, the terminal device can respectively perform vector representation on the text sequence corresponding to each position, and obtain multiple text vectors; each text vector is used to describe the semantic information of the drug at the corresponding position; each text vector is vector-integrated to generate a comprehensive entity representation of the drug.
[0062] Among them, the terminal device performs vector representation on each text sequence, which can be specifically generated by processing through a model. For example, the text sequence is vectorized through BioBERT (named entity recognition model) to obtain a comprehensive entity representation. Exemplarily, the text vectors generated after BioBERT processes the above two text sequences P1 and P2 can be: DrugP1 = {vp1_1, vp1_2, ... vp1_k}, DrugP2 = {vp2_1, vp2_2, ... vp2_k}. Among them, DrugP1 is represented as the text vector corresponding to the P1 text sequence; vp1-k is represented as the vector corresponding to the kth character in the P1 text sequence.
[0063] It is understandable that at this time, each text vector can only describe the semantic information of the drug at the corresponding position in the target text. Based on this, in order to obtain a comprehensive entity representation of the drug, the terminal device also needs to integrate multiple text vectors of the drug. Specifically, the terminal device can integrate the text vectors through the following formulas 1 and 2:
[0064]
[0065]
[0066] Among them, Drug e1 It represents the integrated vector obtained after the integration of the first text vector; that is, for DrugP1, each vector in DrugP1 is summed up and then its average value is calculated. Then, each integrated vector corresponding to the drug is averaged again to generate the comprehensive entity representation of the drug Drug a .
[0067] For details, please refer to Figure 4 , Figure 4 A schematic diagram of a model structure for generating a comprehensive entity representation of a drug provided in an embodiment of the present application. Figure 4 The Drug-α at the bottom of the list indicates the name of the drug; {x i , ..., x i+k-1} represents the text sequence of Drug-α, and then the BioBERT model is used for vector representation processing to generate a text vector (Drug in the figure e1 and Drug e2 ). After that, the text vector is processed by the above formula 1 and formula 2 to generate the top-level Drug a That is, a comprehensive entity representation is generated. It should be noted that in this process, the terminal device obtains the final comprehensive entity representation by integrating all parts of a single drug and integrating all single text vectors of the same drug.
[0068] S203: For any drug pair among the multiple drugs, the terminal device determines a fused entity representation of the drug pair according to the comprehensive entity representations of the two drugs in the drug pair.
[0069] In one embodiment, the above-mentioned integrated entity representation of a single drug is used to describe the semantic information of the corresponding drug at each position in the target text. Therefore, it can be considered that the above-mentioned fusion entity representation is used to describe the semantic information of the interaction between two drugs in the target text.
[0070] Among them, the terminal device can process the comprehensive entity representation through the following formula 3 to obtain the fusion
[0071] Entity representation: H1 = W1*tanh(Drug α )]+b1,H2=W2[tanh(Drug β )]+b2 (3)
[0072] Among them, H1 and H2 respectively represent the target vectors obtained after processing the comprehensive entity representation, W1 and W2 represent known parameter matrices, b1 and b2 represent known offset terms; tanh represents the hyperbolic tangent processing of the comprehensive entity representation.
[0073] After obtaining H1 and H2, the terminal device may concatenate H1 and H2, and then input them into Formula 4 again to obtain a fused entity representation.
[0074] H0=W3[concat(H1,H2)]+b3 (4)
[0075] Among them, H0 is the fusion entity representation of the drug pair, W3 represents the known parameter matrix, b3 is the known offset term; concat represents the concatenation of multiple string functions (i.e., concatenating H1 and H2).
[0076] It should be noted that the above formula is only a calculation formula for drugs that appear twice in the target text. When the number of appearances is multiple, the formula should also be adaptively modified accordingly.
[0077] S204: The terminal device predicts the interaction relationship between the drug pairs according to the fusion entity representation of the drug pairs.
[0078] In one embodiment, the above S203 has explained that the fused entity representation can be used to describe the semantic information of the interaction between two drugs in the target text. Based on this, when the terminal device predicts the interaction relationship between drug pairs based on the fused entity representation, its prediction accuracy will be higher.
[0079] Specifically, the terminal device can predict the interaction relationship between drug pairs by the following formula 5:
[0080] Type=softmax(H0) (5)
[0081] Among them, softmax represents a classification function, which is used to process H0 and output the probability value of the drug pair belonging to each interaction relationship. After that, the maximum value of the probability value corresponds to the interaction relationship and is determined as the final predicted interaction relationship of the drug pair.
[0082] In this embodiment, by obtaining the corresponding comprehensive entity representation of each drug in the target text, the terminal device can use a comprehensive entity representation to comprehensively describe the semantic information of the corresponding drug at each position in the target text. Afterwards, for each target drug pair, the terminal device can fuse the comprehensive entity representation of each drug to generate a fused entity representation of the drug pair. Furthermore, the terminal device can accurately predict the interaction relationship between the drug pairs based on the fused entity representation.
[0083] In one embodiment, the above S202-S204 can all be processed by the drug relationship prediction model in the terminal device. That is, after executing S201, the terminal device can input the acquired target text into the drug relationship prediction model to predict the interaction relationship of each drug pair among multiple drugs.
[0084] Specifically, the drug relationship prediction model may include a first activation layer, a second activation layer, a first fully connected layer, and a second fully connected layer. Among them, the first activation layer is used to perform the tanh function processing in formula 3 on the comprehensive entity representation. The first fully connected layer is used to perform W1[]+b1 or W2[]+b2 processing in formula 3 on the vector processed by the tanh function to obtain the target vector. Afterwards, the terminal device can splice the target vectors of the two drugs and input them to the second activation layer for processing. At this time, the second activation layer is used to perform the concat function processing in formula 4 on the spliced target vector, and input the vector processed by the concat function into W3[]+b3 for processing to obtain the fused entity representation.
[0085] It should be noted that the above example only illustrates that the drug relationship prediction model processes the comprehensive entity representation of the two drugs in the drug pair to generate the model structure of the fusion entity representation of the drug pair. That is, it only illustrates the model structure for processing S203. Among them, the drug relationship prediction model should also include the model structure for executing S202 and S204 processes, which are not explained one by one in this embodiment.
[0086] In a specific embodiment, please refer to Figure 5 , Figure 5A schematic diagram of a process for predicting the interaction relationship between drug pairs using a drug relationship prediction model provided in an embodiment of the present application. Among them, data processing is specifically to convert the sentence-level DDI2013 data set (sentence-level DDI Extraction 2013) into the document set DDI2013 data set (document-level DDI Extraction 2013). Afterwards, the key information loading process is performed on the document set DDI2013 data set. Specifically, the establishment of a text sequence (Article seq) is performed for each text in the data set, which includes but is not limited to the establishment of a text sequence for the entire text, and the establishment of a text sequence for each drug; determine drug pairs (Pairs) and generate drug information (Drug info). Afterwards, for the determined drug pairs, document entity embedding processing (Document-entity Embedding) is performed on each drug in the drug pair. Specifically, a comprehensive entity representation is performed for each drug (Drug) (i.e., Drug emb is generated). Afterwards, tanh+fully-connected processing is performed on the comprehensive entity representation of the drug. That is, the comprehensive entity representation is input into the first activation layer and the first fully connected layer in turn and processed to obtain the target vector (H1 and H2) of each drug. After that, the two target vectors are concatenated and the concatenated target vector is input into the second activation layer and the second fully connected layer to obtain the fused entity representation (H0). Finally, the fused entity representation is input into the Sofmax layer for classification prediction to obtain the interaction relationship (Type) of the drug pair.
[0087] In one embodiment, the drug relationship prediction model is a pre-trained model. Exemplarily, the drug relationship prediction model can be a model such as BERT, SciBERT, and BioBERT. In this embodiment, the drug relationship prediction model can specifically be BioBERT.
[0088] In one embodiment, the sentence-level drug relationship prediction model still exists in the above-mentioned process, which requires a larger memory space and takes longer time to train the network. Figure 6 Specifically, the terminal device can process the original data set through the following steps S601-S604 to reduce the data volume of the original data set and improve the efficiency of network training, as described in detail below:
[0089] S601: A terminal device obtains an original data set, where the original data set includes a plurality of original texts.
[0090] S602: The terminal device counts the number of drugs contained in each original text.
[0091] S603: The terminal device screens the original text containing at least two drugs in the original data set to obtain an original data subset.
[0092] S604: The terminal device performs label processing on each original text in the original data subset to obtain a training set.
[0093] In one embodiment, the method of obtaining the original text may be similar to the method of obtaining the initial text, and no further description is given for comparison. It should be noted that if the original data set is directly used for model training, a lot of training time will be consumed.
[0094] It is understandable that there may be texts in the original text that do not contain two drugs. Such original texts cannot be used directly for training. Based on this, the terminal device can count the number of drugs contained in each original text respectively. After that, the original texts that only include one drug are deleted, and preprocessing is performed on the original texts that are not deleted.
[0095] In one embodiment, the preprocessing at least includes expanding the drugs using the drug shared suffix. The above processing has been explained in the above S201 and will not be described again. It should be added that the preprocessing also includes but is not limited to: lowercase English characters in the original text, remove punctuation marks, and convert all numbers in the original text to "NUM" instead, which is not limited to this.
[0096] It can be understood that the original text after the above preprocessing is the text that can be used to train the drug relationship prediction model, thereby reducing the redundancy of training data.
[0097] In one embodiment, labeling the original text specifically includes labeling each drug pair that appears at each position in the original text to participate in model training.
[0098] However, based on the above description of the sentence-level drug relationship prediction model in the prior art, it can be seen that when a document is divided into multiple sentences, there may be multiple sentences containing the same drug pair. However, the corresponding relationship labels of the same drug pair may be different when they are in different positions in the document. This means that the same drug pair corresponds to different semantic information in the document. If the relationship label of the first drug pair or a certain drug pair is used to participate in the model training, the prediction accuracy of the drug relationship prediction model finally generated will also be reduced. If different relationship labels are used for each identical drug pair in a document, it will cause confusion in the relationship labels in the data set.
[0099] Based on this, in this embodiment, refer to Figure 7The terminal device can also process the label relationship of each drug pair in the original text in the following manner S701-S702, so that the same drug pair can also use the optimal relationship label, thereby solving the problem of relationship label confusion:
[0100] S701. The terminal device obtains each drug pair contained in the original text, and relationship labels between various drug pairs.
[0101] S702: If there is a drug pair with multiple relationship tags, the terminal device determines a relationship tag with a higher priority among the multiple relationship tags as the relationship tag of the drug pair according to a preset tag priority.
[0102] In one embodiment, the above relationship tags are used to represent the action relationship between drug pairs and are used to participate in the iterative process in the drug relationship prediction model. During the training process, the relationship tags of each drug pair are usually pre-labeled by staff, so the terminal device can directly obtain each drug pair contained in the original text and the relationship tags between each drug pair.
[0103] It should be noted that if the same drug pair appears in different positions in the original text, its context and semantics may be different, so the corresponding relationship tags may also be different. In this embodiment, because the drug pair is a fusion entity representation generated based on the comprehensive entity representation of two drugs. That is, when the drug pair has multiple relationship tags, only one relationship tag should be used to correspond to the drug pair for model training.
[0104] In one embodiment, the above tag priority is a preset priority. Exemplarily, the above tags can be: False, Int, Advise, Effect, Mechanism. Its priority can be: False <Int<Advise<Effect<Mechanism
[0105] Among them, as shown above, the label Mechanism has the highest priority, that is, it contains more pharmacokinetic information between the two drugs; the label Effect indicates that there is a certain degree of reaction between the two drugs, but the degree is not as high as Mechanism; the label Advise indicates that there is an interaction between the two drugs, but the degree is not as high as Effect; the label Int indicates that the interaction between the two drugs is low, and the degree is not as high as Advise; the label False indicates that there is no drug interaction between the two drugs.
[0106] In this embodiment, when a drug pair has multiple relationship tags, the multiple relationship tags can be converted into a single relationship tag through the tag priority rules as shown above, so that the converted single relationship tag can better represent the interaction relationship between the drug pair in the original text.
[0107] In one embodiment, the prediction method of drug pair interaction relationship in the present application is a document-level prediction method, which has the following advantages compared with the sentence-level prediction method of drug pair interaction relationship:
[0108] In practical applications, the prediction of drug pair interaction relationships at the sentence level must convert a sentence into multiple instances containing only two drug entities. In contrast, the prediction of drug pair interaction relationships at the document level can target multiple drug entities at the same time. Therefore, the prediction of drug pair interaction relationships at the document level can simplify the operation of data preprocessing and reduce the text input into the drug relationship prediction model. In order to more intuitively reflect this advantage, the number of sentences recorded in the prediction methods of drug pair interaction relationships at the sentence level in recent years (need to be input into the drug relationship prediction model) is collected and compared with the number of sentences contained in this article. See Table 1 below for details:
[0109] Table 1. Number of sentences in different methods
[0110]
[0111]
[0112] As can be seen from Table 1, the original DDI Extraction 2013 contains the highest number of texts. After preprocessing, there are 27792 sentences in the training set, 5716 sentences in the test set, and a total of 33508 sentences. In this embodiment, the number after preprocessing is the smallest: there are 3784 sentences in the training set, 790 sentences in the test set, and a total of 4574 sentences.
[0113] (2) Comparison of different BERT models: In text processing, there are three commonly used BERT pre-trained models, namely BERT, SciBERT and BioBERT. In order to observe the effects of the three pre-trained models in the prediction of document-level drug pair interaction relationships, BioBERT in this method was replaced by BERT and SciBERT. However, in actual experiments, it was found that the proposed method would not work properly after using BERT or SciBERT instead of BioBERT. Specifically: the drug blinding is not done in the document-level drug pair interaction prediction method, and most drugs are composed of complex drug nouns. Among the three pre-trained models, only BioBERT is trained on a large-scale biomedical corpus, so only BioBERT can accurately express the entity representation of complex drugs. In order to further obtain the representation effect of the three pre-trained models, we adopted the method of extracting sentence-level drug pair interaction relationships on the DDI corpus. The other experimental settings are exactly the same, so as to analyze which pre-trained model can better express the text data of drug pair interaction relationships. See Table 2 below for details.
[0114] Table 2. Results of using different BERT models
[0115] Pre-trained models Macro-P(%) macro-R(%) macro-F1(%) BERT 78.78 73.27 75.92 SciBERT 81.71 74.80 78.10 BioBERT 85.89 73.46 79.19
[0116] As shown in Table 2, the method using BERT has the lowest performance, with macro-P (macro-average precision, a model evaluation metric) reaching 78.78%, macro-R (macro-average recall, another model evaluation metric) reaching 73.27%, and macro-F1 (macro-average harmonic mean, another model evaluation metric) reaching 75.92%. The results of the SciBERT method are moderate, with the highest macro-R reaching 74.80%. This is because SciBERT is trained on a large-scale scientific literature corpus, so the performance is greatly improved compared to BERT. The best results were obtained using the BioBERT method, with macro-P reaching 85.89% and macro-F1 reaching 79.19%. This shows that BioBERT trained on a biomedical corpus can more accurately express the text data of drug-pair interaction relationships.
[0117] (3) Performance of document-level drug embedding: In order to verify the above actual performance, an experiment can be designed to compare the effects of not using document-level drug embedding and using document-level drug embedding. Specifically, the former is marked as Without DEE (for each drug, embedding is performed only at the first appearance) and compared with the method using DEE proposed in this embodiment.
[0118] Table 3. Effects of using DEE and not using DEE
[0119] method macro-P(%) macro-R(%) macro-F1(%) Without DEE 60.07 56.32 58.43 Use DEE 65.60 59.71 62.51
[0120] As shown in Table 3, without the use of the DEE method, macro-P reached 60.07%, macro-R reached 56.32%, and macro-F1 reached 58.43%. With the DEE method, macro-P reached 65.60%, macro-R reached 59.71%, and macro-F1 reached 62.51%, which were 5.53%, 3.39%, and 4.08% higher than those without the DEE, respectively. The reason is that without the use of DEE, the contextual semantic information of the same drug at different positions in the document is not considered. Therefore, this method can obtain a complete comprehensive entity representation of the drug in the document by using the document-level drug embedding to obtain more accurate prediction results.
[0121] (4) Comparison of different neural network model structures: This embodiment performs special preprocessing on the DDI Extraction 2013 dataset for the first time and realizes the prediction of drug-pair interaction relationships at the document level. Currently, there is no work on document-level DDI datasets. In order to verify the effectiveness of the proposed method, it is compared with methods using CNN and BiLSTM (the two most commonly used neural network models). These two methods also use document-level drug embedding, but after obtaining the comprehensive entity representation of the drug, different neural network model structures are used. However, in actual applications, it was found that the method using only the BiLSTM network model did not work. Therefore, the terminal device changed it to a method combining CNN and BiLSTM neural network models, and expressed it as "CNN+BiLSTM".
[0122] Table 4. Results of using different neural network model structures
[0123]
[0124] As can be seen from Table 4, although macro-P reaches 66.98% in the neural network model structure of CNN+BiLSTM, which is the highest among the three methods, macro-R only reaches 50.19% and macro-F1 only reaches 57.38%, so the overall performance of the network structure is the lowest. The macro-P of the CNN method reaches 56.75%, macro-R reaches 59.97%, and macro-F1 reaches 58.32%. The overall performance of CNN is slightly higher than that of CNN+BiLSTM. However, when using the structure of the drug relationship prediction model in this application, macro-P is only 1.38% lower than CNN+BiLSTM, and macro-R is 0.26% lower than CNN. Macro-P and macro-R are almost the highest, so the overall performance is the best. The reason is that the input is a comprehensive entity representation of two drugs, not a complete sentence. Therefore, the neural network model structure suitable for sentence level cannot achieve the same performance in the document level neural network model structure (especially in BiLSTM).
[0125] In summary, in this embodiment, the document-level drug pair interaction relationship prediction method is adopted. Compared with the sentence-level drug pair interaction relationship prediction method adopted in the prior art, the amount of data input into the drug relationship prediction model can be greatly reduced, and drugs in multiple different positions can be comprehensively and accurately semantically expressed, so that the drug relationship prediction model can extract the real semantic information of the drug in the document and improve the model prediction accuracy.
[0126] See also Figure 8 , Figure 8 : is a block diagram of a device for predicting drug pair interaction relationships provided in an embodiment of the present application. The device for predicting drug pair interaction relationships in this embodiment includes modules for executing Figure 2 , Figure 3 , Figure 6 and Figure 7 For details, please refer to the steps in the corresponding embodiment. Figure 2 , Figure 3 , Figure 6 and Figure 7 as well as Figure 2 , Figure 3 , Figure 6 and Figure 7 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 8 The prediction device 800 for drug pair interaction relationship may include: an acquisition module 810, a comprehensive entity representation determination module 820, a fusion entity representation determination module 830 and a prediction module 840, wherein:
[0127] The acquisition module 810 is used to acquire a target text; the target text includes multiple drugs, and each drug appears at least once in the target text.
[0128] The comprehensive entity representation determination module 820 is used to determine the comprehensive entity representation corresponding to each drug respectively, and the comprehensive entity representation is used to describe the semantic information of the corresponding drug at each position in the target text.
[0129] The fused entity representation determination module 830 is used to determine the fused entity representation of the drug pair according to the comprehensive entity representations of the two drugs in the drug pair for any drug pair among the multiple drugs.
[0130] The prediction module 840 is used to predict the interaction relationship of the drug pair according to the fusion entity representation of the drug pair.
[0131] In one embodiment, the acquisition module 810 is further used to:
[0132] An initial text is obtained, which includes multiple drugs, and each drug appears at least once in the initial text; if there are drug names using drug shared suffixes in the initial text, the drug names are expanded to obtain a target text.
[0133] In one embodiment, the composite entity representation determination module 820 is further configured to:
[0134] For any drug, multiple positions of the drug in the target text are determined respectively; based on the multiple positions, a text sequence corresponding to each position is generated respectively; vector processing is performed on the text sequence corresponding to each position to obtain a comprehensive entity representation.
[0135] In one embodiment, the composite entity representation determination module 820 is further configured to:
[0136] The text sequence corresponding to each position is represented by a vector, and multiple text vectors are obtained accordingly; each text vector is used to describe the semantic information of the drug at the corresponding position; each text vector is integrated to generate a comprehensive entity representation of the drug.
[0137] In one embodiment, the drug pair interaction relationship prediction device 800 further includes:
[0138] The input module is used to input the target text into the pre-trained drug relationship prediction model for processing to obtain the interaction relationship of each drug pair among multiple drugs.
[0139] In one embodiment, the drug relationship prediction model includes a first activation layer, a second activation layer, a first fully connected layer, and a second fully connected layer; the fusion entity representation determination module 830 is further used to:
[0140] The comprehensive entity representations of the two drugs are sequentially input into the first activation layer and the first fully connected layer to obtain the target vectors corresponding to the two drugs respectively; the two target vectors are concatenated, and the concatenated target vectors are sequentially input into the second activation layer and the second fully connected layer to obtain the fused entity representation.
[0141] In one embodiment, the drug relationship prediction model is obtained by training based on a training set; the drug pair interaction relationship prediction device 800 further includes the following modules to obtain the training set:
[0142] The original data set acquisition module is used to acquire the original data set, which includes multiple original texts.
[0143] The statistics module is used to count the number of drugs contained in each original text.
[0144] The screening module is used to screen the original texts containing at least two drugs in the original data set to obtain the original data subset.
[0145] The label processing module is used to perform label processing on each original text in the original data subset to obtain a training set.
[0146] In one embodiment, the tag processing module is further configured to:
[0147] Each drug pair contained in the original text and the relationship labels between the various drug pairs are obtained; if there are drug pairs with multiple relationship labels, the relationship label with a higher priority among the multiple relationship labels is determined as the relationship label of the drug pair according to the preset label priority.
[0148] When it is understood that Figure 8 In the structural block diagram of the drug pair interaction prediction device shown in FIG. Figure 2 , Figure 3 , Figure 6 and Figure 7 The steps in the corresponding embodiments, and for Figure 2 , Figure 3 , Figure 6 and Figure 7 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figure 2 , Figure 3 , Figure 6 and Figure 7 as well as Figure 2 , Figure 3 , Figure 6 and Figure 7 The relevant descriptions in the corresponding embodiments are not repeated here.
[0149] Fig. 91 is a block diagram of a terminal device provided by an embodiment of the present application. Fig. 9 As shown, the terminal device 900 of this embodiment includes: a processor 910, a memory 920, and a computer program 930 stored in the memory 920 and executable on the processor 910, such as a program of a method for predicting a drug pair interaction relationship. When the processor 910 executes the computer program 930, the steps of each embodiment of the method for predicting a drug pair interaction relationship are implemented, such as Figure 1 Alternatively, the processor 910 implements the above when executing the computer program 930 Figure 8 The functions of each module in the corresponding embodiment are, for example, Figure 8 For details on the functions of modules 810 to 840 shown in FIG. Figure 8 Related description in the corresponding embodiment.
[0150] Exemplarily, the computer program 930 may be divided into one or more modules, one or more modules are stored in the memory 920, and are executed by the processor 910 to implement the method for predicting the interaction relationship of drug pairs provided in the embodiment of the present application. One or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 930 in the terminal device 900. For example, the computer program 930 may implement the method for predicting the interaction relationship of drug pairs provided in the embodiment of the present application.
[0151] The terminal device 900 may include, but is not limited to, a processor 910 and a memory 920. Those skilled in the art will appreciate that Fig. 9 It is only an example of the terminal device 900 and does not constitute a limitation of the terminal device 900. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0152] The processor 910 may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0153] The memory 920 may be an internal storage unit of the terminal device 900, such as a hard disk or memory of the terminal device 900. The memory 920 may also be an external storage device of the terminal device 900, such as a plug-in hard disk, a smart memory card, a flash memory card, etc. equipped on the terminal device 900. Further, the memory 920 may also include both an internal storage unit of the terminal device 900 and an external storage device.
[0154] An embodiment of the present application provides a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for predicting the interaction relationship between drug pairs as described in the above-mentioned embodiments is implemented.
[0155] The embodiment of the present application provides a computer program product. When the computer program product is executed on a terminal device, the terminal device executes the method for predicting the interaction relationship between drug pairs in the above-mentioned embodiments.
[0156] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for predicting drug pair interaction relationships, characterized in that: The method comprises: Acquire a target text; the target text includes a plurality of drugs, each drug appears at least once in the target text; wherein acquiring the target text includes: Acquire an initial text, wherein the initial text includes the multiple drugs, and each drug appears at least once in the initial text; If there are drug names using drug shared suffixes in the initial text, the drug names are expanded to obtain the target text; wherein the drug shared suffix is: when the names of multiple drugs have the same partial names, abbreviations may appear in the initial text, so that multiple drugs share a suffix; the shared suffix is the same partial name; Determine the comprehensive entity representation corresponding to each drug respectively, wherein the comprehensive entity representation is used to describe the semantic information of the corresponding drug at each position in the target text; wherein the step of determining the comprehensive entity representation corresponding to each drug respectively includes: For any of the drugs, multiple positions of the drug in the target text are determined respectively; wherein the positions are position information of the drug in the target text; According to the multiple positions, a text sequence corresponding to each position is generated respectively; X = {x1, x2, ...x n }, X represents the text sequence of the target text as a whole, x i represents the i-th character in the target text, and n represents the total number of characters in the target text; assuming that for a given drug Drug-α, it consists of k characters and appears 2 times, then its text sequences are: P1 = {x i , x i+1 , …x i+k-1 }, P2={x j , x j+1 , …x j+k-1 }; where 1 and 2 in P1 and P2 represent the order in which the drugs appear in the target text; x i represents the i-th character in the target text when the drug first appears; since the drug name consists of k characters, x i+k-1 This is the end position of the drug in the text after the first appearance. If the drug appears multiple times, there will be multiple corresponding text sequences. Performing vector processing on the text sequence corresponding to each position to obtain the comprehensive entity table includes: The text sequence corresponding to each position is represented by vectors respectively, and a plurality of text vectors are obtained accordingly; each text vector is used to describe the semantic information of the drug at the corresponding position; wherein the terminal device represents each text sequence by vectors: the text sequence is processed by BioBERT to obtain a comprehensive entity representation; the text vectors generated after BioBERT processes the two text sequences P1 and P2 are: DrugP1={vp1_1,vp1_2,…vp1_k}, DrugP2={vp2_1,vp2_2,…vp2_k}; wherein DrugP1 is represented as the text vector corresponding to the P1 text sequence; vp1-k is represented as the vector corresponding to the kth character in the P1 text sequence; Each of the text vectors is vector-integrated to generate a comprehensive entity representation of the drug, including: The text vectors are integrated using the following formulas 1 and 2: Among them, Drug e1 It represents the integrated vector obtained after the integration of the first text vector; that is, for DrugP1, each vector in DrugP1 is summed up and its average value is calculated. At this time, the average value is the integrated vector; then, each integrated vector corresponding to the drug is averaged again to generate the comprehensive entity representation of the drug Drug a ; For any drug pair among the multiple drugs, determining a fusion entity representation of the drug pair according to the integrated entity representations of the two drugs in the drug pair includes: The comprehensive entity representation of a single drug is used to describe the semantic information of the corresponding drug at each position in the target text; the fusion entity representation is used to describe the semantic information of the interaction between two drugs in the target text; The terminal device processes the comprehensive entity representation through the following formula 3 to obtain the fused entity representation: H1=W1[tanh(Drug α )]+b1,H2=W2[tanh(Drug β )]+b2 (3) Wherein, H1 and H2 represent the target vectors obtained after processing the integrated entity representation, W1 and W2 represent known parameter matrices, b1 and b2 represent known offset terms; tanh represents the hyperbolic tangent processing of the integrated entity representation; After obtaining H1 and H2, the terminal device concatenates H1 and H2, and then inputs them into Formula 4 again to obtain the fused entity representation; H0=W3[concat(H1,H2)]+b3 (4) Among them, H0 is the fusion entity representation of the drug pair, W3 is the known parameter matrix, b3 is the known offset term; concat is a function to concatenate multiple strings, that is, to concatenate H1 and H2; The interaction relationship of the drug pair is predicted according to the fusion entity representation of the drug pair.
2. The method according to claim 1, characterized in that The comprehensive entity representation corresponding to each drug is determined respectively, and the comprehensive entity representation is used to describe the semantic information of the corresponding drug at each position in the target text; for any drug pair among the multiple drugs, a fused entity representation of the drug pair is determined according to the comprehensive entity representations of the two drugs in the drug pair; Predicting the interaction relationship of the drug pair according to the fusion entity representation of the drug pair includes: The target text is input into a pre-trained drug relationship prediction model for processing to obtain the interaction relationship of each drug pair among the multiple drugs.
3. The method according to claim 2, characterized in that The drug relationship prediction model includes a first activation layer, a second activation layer, a first fully connected layer, and a second fully connected layer; and determining the fusion entity representation of the drug pair according to the comprehensive entity representations of the two drugs in the drug pair includes: Inputting the comprehensive entity representations of the two drugs into the first activation layer and the first fully connected layer in sequence to obtain target vectors corresponding to the two drugs respectively; The two target vectors are concatenated, and the concatenated target vector is sequentially input into the second activation layer and the second fully connected layer to obtain the fused entity representation.
4. The method according to claim 2, characterized in that: The drug relationship prediction model is obtained by training based on a training set, and the training set is obtained in the following manner: Acquire an original data set, wherein the original data set includes a plurality of original texts; Counting the number of drugs contained in each of the original texts; Screening the original texts containing at least two drugs in the original data set to obtain an original data subset; Label processing is performed on each of the original texts in the original data subset to obtain the training set.
5. The method according to claim 4, characterized in that The step of performing label processing on each of the original texts in the original data subset to obtain the training set includes: Obtain each drug pair contained in the original text and relationship labels between various drug pairs; If there is a drug pair with multiple relationship tags, then according to a preset tag priority, a relationship tag with a high priority among the multiple relationship tags is determined as the relationship tag of the drug pair.
6. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Information processing method and device and computer readable storage medium
CN111241298A
Drug entity pair interaction relationship detection model construction method and detection method
CN112860816A