Attention-enhancing drug recommendation model algorithm based on graph fused with clinical signs
Through the algorithm of enhancing attention by integrating the graph of clinical signs, the drug recommendation model of drug recommendation in the existing technology is solved, and a more accurate and safe drug recommendation effect is achieved.
Patent Information
- Application Number
- CN202411755968.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
AI Technical Summary
Existing drug recommendation algorithms ignore patients' clinical signs and drug interaction (DDI) knowledge, resulting in limitations and safety issues in drug recommendation results.
A graph-enhanced attention drug recommendation model algorithm that integrates clinical signs is used to deeply explore drug use data and patient clinical signs in electronic medical records through deep learning models, and a graph neural network and attention mechanism are used to integrate drug combination knowledge and DDI knowledge into the patient characterization process to improve the accuracy and safety of drug recommendations.
The accuracy and safety of drug recommendations are improved, and by comprehensively considering the patient's longitudinal medical history, clinical signs and DDI knowledge, a more objective and accurate drug combination prediction is achieved, reducing the risk of adverse reactions between drugs.
Smart Images

Figure CN119694486A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of drug recommendation, and in particular relates to a graph-enhanced attention drug recommendation model algorithm integrating clinical signs. Background Art
[0002] With the accumulation and growth of medical data from different medical processes such as Electronic Health Records (EHRs) and electronic health records, how to deeply mine these data has gradually become a research hotspot; among them, how to use drugs scientifically and rationally is an important means of clinical diagnosis and treatment and an important research direction for clinical decision support; in various studies involving drug recommendation, accurately obtaining the changing patterns of patients' health status to construct patient representation vectors is a key issue for drug recommendation; in the actual diagnosis and treatment process, doctors usually judge patients' illness and adjust patients' medication plans based on their clinical signs; studies have shown that clinical signs of hospitalized patients can objectively reflect patients' health status and can assist doctors in diagnosis and prescription; however, existing studies often rely on doctors' experience when mining medication plans in electronic medical records, and only use doctors' diagnosis results and surgery codes to represent patients, ignoring information such as clinical signs that can reflect patients' health status. Therefore, it is necessary to mine the relationship between medication information, patients' own medical history and clinical signs from massive electronic medical record data, and integrate drug-drug interactions (Drug-Drug interactions). It is an important topic in the research of clinical decision support to improve the knowledge of drug interactions (DDI) and make drug recommendations through scientific means, which can assist doctors in formulating medication plans more safely and reasonably.
[0003] Traditional drug recommendation algorithms, such as those based on collaborative filtering and improved models, only consider the information interaction between patients and drugs, ignoring the physiological characteristics of patients such as clinical signs, and the drug recommendation results have great limitations. In recent years, researchers have incorporated deep learning methods into drug recommendation, which has greatly made up for the shortcomings of traditional recommendation algorithms. Recommendation algorithms and improved models based on recurrent neural networks (RNN) and graph neural networks (GNN) incorporate patients' historical medical information and prior DDI knowledge into the drug recommendation process, greatly improving the accuracy and safety of drug recommendations. At the same time, in the drug recommendation process, it is first necessary to characterize the patient's health status, organize and embed complex health data into a low-dimensional space, and then predict drug combinations. Recently, methods based on patient representation learning strategies have gradually become the mainstream research direction. These methods are mainly divided into recommendations based on drug instances and recommendations based on patient longitudinal medical history. The recommendation method based on drug instances only considers the patient's current medical situation for drug recommendation, ignoring the significant impact of the patient's longitudinal medical history on the patient's current diagnosis. The Leap model proposed by Zhang et al. regards drug recommendation as Sequence generation problem, using reinforcement learning to correct the drug recommendation process, but it ignores the patient's longitudinal medical history, which will affect the accuracy of medication; the recommendation model based on the patient's longitudinal medical history considers the patient's own time dependence in recommending drugs, which improves the accuracy of drug recommendations; the DMNC model proposed by Venkatesh et al. uses the time dependence in the patient's longitudinal medical history to predict future drug treatment plans, uses a memory to store the interactive information between data from different angles, and uses it to update its own data, thereby improving the performance of drug recommendations; the RETAIN method proposed by Choi et al. uses reverse temporal attention and captures time dependence based on a recurrent neural network to provide sequential predictions of drug combinations; although this type of method improves the accuracy of recommended medications, it ignores DDI, which can lead to medication safety issues.
[0004] In recent years, the emergence and rapid development of graph neural networks have provided new research ideas for the medical field, such as predicting drug interactions and drug recommendations. Yang et al. introduced the molecular structure of drugs into the drug recommendation process, and recommended safe drug combinations to patients by modeling drug-drug interactions. The GAMENet model proposed by Shang et al. uses graph neural networks to model drugs and uses storage units to learn patients' longitudinal medical histories, which greatly improves the accuracy and safety of drug recommendations. Zheng et al. use patient medical records and domain knowledge to construct graphs to improve the safety of combined drug use. Later, some studies introduced sequence generation and reinforcement learning based on this work, which further improved the drug recommendation effect. However, these methods are not very effective in considering patient performance. When predicting the symptoms, the important basis of clinical signs of patients is ignored. Clinical signs of patients can often reflect the health status of patients more objectively, accurately and in real time, and are more in line with the doctor's diagnostic process; the drug recommendation model proposed by Li Pengfei et al. successfully predicted the drug efficacy combination by deeply mining the clinical signs and medical processes of patients, indicating that the physical sign status of patients should be used as an important reference indicator for drug recommendation; the drug recommendation model proposed by Cheng Quan et al. uses the heterogeneous graph formed by abnormal physical signs of patients and drugs for modeling, proving that there is an implicit knowledge association between abnormal physical signs of patients and drugs, which can effectively represent the health status of patients and provide a basis for integrating clinical signs of patients to enhance the characteristic expression of patients from the input level; the above-mentioned drug recommendation algorithm based on graph neural network still has the following problems:
[0005] Characterizing patients only based on their diagnosis and surgical results, ignoring their vital signs data;
[0006] Ignoring existing knowledge of DDIs that may lead to adverse reactions;
[0007] Without effectively combining patient vital signs, longitudinal medical history, and DDI, medical entity information in electronic medical records cannot be integrated from multiple perspectives. Summary of the invention
[0008] The purpose of the present invention is to provide a graph-enhanced attention drug recommendation model algorithm that integrates clinical signs. By deeply mining the medication data information and patient clinical signs in electronic medical records, and using a deep learning model to predict drug combinations, the accuracy and safety of medication recommendations in the process of clinical disease diagnosis and treatment can be improved.
[0009] To achieve the above object, the present invention provides the following technical solution: a graph-enhanced attention-enhanced drug recommendation model algorithm integrating clinical signs, comprising the following steps:
[0010] Characterize patients based on complete medical information, and use gated neural networks to capture the changing patterns of patients' health status contained in EHRs;
[0011] In the patient characterization process, drug combination knowledge and DDI knowledge are effectively utilized through GNN and integrated into the patient characterization process;
[0012] The two-stage attention module reads the patient medication information that incorporates DDI knowledge and has patient similarities and historical medical records, and transforms drug recommendations into a multi-label prediction task.
[0013] As a preferred technical solution of the present invention, the model uses three embedding matrices and The input multi-hot vector After linear embedding, it is transformed into the feature vector of the patient's corresponding diagnosis, surgery, and clinical signs The process can be expressed as formula (2):
[0014]
[0015] Where dim is the dimension of the feature vector As the input of GRU at the current moment, the patient characteristics are updated according to formula (3), thereby obtaining The temporal relationship of GRU output hidden state After concatenation and linear transformation, the health representation vector q of the patient i who was admitted to the hospital for the tth time is finally obtained: t , which can be described by formula (4);
[0016]
[0017] in, They represent the hidden states of the patient’s previous t-1 hospital admissions, f represents the conversion function, and is a fully connected neural network with a single hidden layer.
[0018] As a preferred technical solution of the present invention, it also includes a graph enhanced attention module, which includes a graph enhanced storage module and a two-stage attention reading module.
[0019] As a preferred technical solution of the present invention, the graph enhanced storage module: with the help of the graph neural network's ability to capture neighbor node information of graph structured data, regards drugs as nodes, constructs EHR graphs and DDI graphs respectively, and captures the combined medication relationships based on prior DDI knowledge in patient medication records.
[0020] As a preferred technical solution of the present invention, the two-stage attention reading module is described as follows:
[0021] In the first stage, the model reads data based on conventional attention;
[0022] In the second stage, the model uses the self-attention mechanism to obtain similar historical patient representations with time attention, and retrieves M in the query library Q from the time level through the attention weight. q The interactive information of the patient is finally obtained, including the reading results of similar historical patients embedded with laboratory test results.
[0023] As a preferred technical solution of the present invention, the model is based on conventional attention reading data, and the corresponding content is as follows:
[0024] First, the model is based on the patient health representation vector q t and query library M q The interaction information between the prior knowledge of drug combinations and drug interactions stored in the attention weights is calculated The calculation process is shown in formula (10);
[0025] Then, the model uses attention weights Read patient data embedded with medication information from the repository to query and store the read results of patients with similar medication information As shown in formula (11);
[0026]
[0027] As a preferred technical solution of the present invention, the model adopts an end-to-end training method, and the model is trained and adjusted by three loss functions. During the training stage, the model simultaneously learns the embedding matrix W in GRU d , W p , W l , and the weight parameter matrix W in GCN ehr , W DDI parameters, and balances the accuracy and safety of drug recommendation results by comprehensively considering three loss functions.
[0028] As a preferred technical solution of the present invention, the three loss functions are: multi-label prediction loss, drug interaction loss and combination loss.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] The model of the present invention has better performance than the comparative model in the prediction of combined drugs, and has achieved relatively good Jaccard index, F1-Score, PR-AUC and DDI rate, providing a new idea for clinical decision-making and drug recommendation based on graph neural network.
[0031] The present invention uses the patient's corresponding laboratory test data to encode and use as model input in view of individual differences in patients, which can more objectively reflect the patient's health status;
[0032] When the present invention considers DDI knowledge, subsequent work can consider using ATC4 level codes covering more types of drugs for further analysis, and can consider drug antagonism and synergy respectively, so as to further improve the accuracy and safety of drug recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 G of the present invention ehr Figure construction process diagram;
[0034] Figure 2 This is a framework diagram of a graph-enhanced attention medication recommendation model that integrates clinical signs of patients according to the present invention;
[0035] Figure 3 This is a comparison result diagram of the evaluation indicators under different self-attention encoding layers of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] See also Figure 1-Figure 3 The present invention provides a graph-enhanced attention drug recommendation model algorithm integrating clinical signs, comprising the following steps: first, characterizing patients according to complete medical information (diagnosis, surgery and patient signs), which can not only learn the doctor's diagnostic experience from the diagnosis and surgery results, but also relatively objectively obtain and characterize the patient's health status. At the same time, the gated neural network (GRU) can effectively capture the changing rules of the patient's health status contained in EHRs; then, in the patient characterization process, the drug combination knowledge and DDI knowledge are effectively utilized through GNN and integrated into the patient characterization process; the patient's medication information that incorporates DDI knowledge and has patient similarities and historical medical records is read through a two-stage attention module, and the drug recommendation is converted into a multi-label prediction task, in order to improve the accuracy and safety of drug recommendations.
[0038] Research Methods
[0039] Problem definition and graph construction
[0040] Problem definition: In the longitudinal medical history records of patients' electronic medical records, the case data of each patient can be represented as a sequence Xi of multivariate observations. Where i∈{1,2,…,N} represents a patient, N represents the total number of patients, and T represents the total number of times the i-th patient is admitted to the hospital; then, the t-th admission record of patient i can be expressed as in is a multi-hot vector representation, which represents the disease diagnosis result, surgical treatment plan, clinical signs of the patient and the medicine prescribed by the doctor for the tth visit of patient i. * represents the size of the case data, and represents the set S of disease diagnosis results. d , the set of surgical treatment options S p , a collection of clinical signs of patients S l A collection of medications prescribed by a doctor m .
[0041] In the drug recommendation task, the present invention aims to predict the disease diagnosis result, surgical treatment plan, clinical signs and medical history of patient i at the current visit time t of patient i. As well as the constructed EHR graph and DDI graph, generate multi-label output to predict drug combinations make The drug prescription is as close as possible to the one prescribed by the doctor, while the DDI between drugs is minimized as much as possible to improve the safety of medication. The constructed EHR graph and DDI graph are described in detail in the graph construction section.
[0042] Graph construction: When constructing the graph, the EHR graph and the DDI graph can be represented as undirected graphs G respectively. ehr =(V,E ehr ) and G ddi =(V,E ddi ), where node V = S m represents the drug set, the edge set Eehr is represented as the known drug combinations, and Gehr is defined as a bipartite graph, see Figure 1 As shown; the edge set Eddi is represented as the known drug interactions, Addi is the adjacency matrix of the graph Gddi, expressed by formula (1)
[0043]
[0044] The framework of the invention model of the present invention is as follows:
[0045] The present invention aims to utilize the patient diagnosis, surgery, clinical signs of the patient, drug interaction knowledge in combination medication, and longitudinal medical history information in the electronic medical record to improve the accuracy and safety of drug recommendations through a graph-enhanced attention module. The overall framework of the drug recommendation model of the present invention is shown in Figure 2 .
[0046] Patient medical record encoding and representation module: The purpose of encoding and representing electronic medical records is to obtain the health status representation vector of each patient's hospitalization, and use this vector as the basis for the subsequent graph enhanced attention module and the final drug recommendation; in the past, the drug recommendation method based on longitudinal medical history only used the diagnosis and surgery information of each patient's hospitalization as the basis when encoding and representing the patient's health status, which may introduce the doctor's experience based on a priori to represent the patient's health status; however, the patient's clinical signs can often reflect the patient's health status more objectively, accurately and in real time, and at the same time, it is more in line with the doctor's diagnostic process. The work proposed by Cheng Quan et al. also confirmed that there is an invisible knowledge association between the patient's abnormal signs and the drug, which helps to guide the patient's drug recommendation; in view of this, the present invention introduces the patient's clinical signs results when encoding and representing the patient representation vector to enhance the patient's representation and enrich the patient's feature representation, so that the model learns a more effective patient representation from training; first, the model uses three embedding matrices respectively and The input multi-hot vector After linear embedding, it is transformed into the feature vector of the patient's corresponding diagnosis, surgery, and clinical signs The process can be expressed as formula (2):
[0047]
[0048] Where dim is the dimension of the feature vector As the input of GRU at the current moment, the patient characteristics are updated according to formula (3), thereby obtaining The temporal relationship of GRU output hidden state After concatenation and linear transformation, the health representation vector q of the patient i who was admitted to the hospital for the tth time is finally obtained: t , which can be described by formula (4):
[0049]
[0050] in, They represent the hidden states of the patient’s previous t-1 hospital admissions, f represents the conversion function, and is a fully connected neural network with a single hidden layer.
[0051] Graph-enhanced attention module: The graph-enhanced attention module is mainly composed of a graph-enhanced storage module and a two-stage attention reading module. For the graph-enhanced storage module, the ability of graph neural networks to capture neighbor node information of graph structure data is used to regard drugs as nodes. EHR graphs and DDI graphs are constructed to capture the combination medication relationship based on prior DDI knowledge in the patient medication records. According to the definition of graph convolution (GCN), the adjacency matrix defined by the EHR graph and the DDI graph can be expressed as formula (5) and formula (6). Two layers of GCN are used to learn the combination medication embedding representation embedded with DDI knowledge. The node features finally obtained are the representation vectors of drugs. The calculation process is shown in formulas (7) and (8).
[0052]
[0053] in, is a diagonal matrix, I is the identity matrix; is the embedding learning matrix of EHR graph and DDI graph, each of which contains S m dim-dimensional vector; W1,W2∈R dim×dim is the weight parameter matrix of the hidden layer; the dimensions of the node embedding vectors of the EHR graph and DDI graph obtained are Finally, the patient information that integrates the knowledge of different drug graphs will be stored in the query library Q. At the same time, α is used to control the fusion ratio of the EHR graph and the DDI graph, and then there is formula (9):
[0054] M q =Z ehr +αZ DDI (9)
[0055] Among them, the query library M q is a The storage matrix of
[0056] Next, the two-stage attention reading module is described as follows: In the first stage, the model reads data based on conventional attention; first, the model is based on the patient health representation vector q t and query library M q The interaction information between the prior knowledge of drug combinations and drug interactions stored in the attention weights is calculated The calculation process is shown in formula (10). Then, the model uses the attention weight Read patient data embedded with medication information from the repository to query and store the read results of patients with similar medication information As shown in formula (11),
[0057]
[0058] In the second stage, the model uses the self-attention mechanism
[28] to obtain similar historical patient representations with temporal attention; and retrieves M from the query library Q from the temporal level through the attention weight. q The interactive information of the patient is finally obtained, including the embedded reading results of similar historical patients such as laboratory test results. In general, the attention function in the self-attention mechanism can be defined as mapping a query Q and a set of key-value pairs {k, v} to an output o; for each position t, we denote the attention weight as q t and the key vector for every other position in the sequence Where r is the size of the mask, and then the attention weights and value vectors are used The weighted combination of is used to obtain the output o; the final output o is passed through a feedforward neural network to obtain the vector representation of t. Mathematically, the self-attention calculation can be expressed as formula (12):
[0059]
[0060] Where Q, K, V are matrices consisting of query, key vector and value vector respectively, d is the dimension of the key vector, the purpose is to avoid small gradients caused by too large a median dot product; since the present invention only uses self-attention, Q, K, V all correspond to the input embedding of the sequence with position encoding; implicitly, self-attention creates a graph structure for the sequence, in which the edges represent time dependencies; in the present invention, we define the key vector as similar patient records in the patient history record, which can be expressed as formula (13), and define the value vector as the historical medication information represented by a multi-hot vector, as shown in formula (14),
[0061]
[0062] The self-attention output weight vector with historical medication distribution can be calculated by formula (12): And retrieve M in the query library Q from the time level through attention weight q The interactive information of the patient is finally obtained, and the reading results of similar historical patients including the patient's clinical signs and historical medication information are obtained. It can be expressed as formula (15):
[0063]
[0064] Finally, the patient health representation vector q t , multiple attention read output After splicing, multi-label predictions are generated for drug recommendation. The process can be expressed by formula (16):
[0065]
[0066] in, represents the matching value of drug recommendation, σ(·) represents the sigmoid function, when the matching value score When it is greater than the set threshold parameter β, the final drug recommendation combination is obtained
[0067] Training and loss function
[0068] The model of the present invention adopts an end-to-end training method, and the model is trained and adjusted by three loss functions; during the training stage, the model simultaneously learns the embedding matrix W in GRU d , W p , W l , and the weight parameter matrix W in GCN ehr , W DDI The accuracy and safety of drug recommendation results are balanced by comprehensively considering three loss functions: multi-label prediction loss, drug interaction loss, and combination loss, which will be described in detail below.
[0069] Multi-label prediction loss L bm
[0070] The multi-label prediction loss of the present invention uses two common multi-label loss functions, one is the binary cross entropy loss L bce , one is the multi-label edge loss L multi , L bce It can be expressed by formula (17), L multi It can be expressed by formula (18):
[0071]
[0072] in, is the actual prescribed drug combination for the i-th patient, is the predicted drug matching value of the ith patient, T represents the total number of visits of the patient, |S m | represents the set of drugs prescribed by the doctor for patient i, represents the patient's true drug combination at the tth visit; multi-label marginal loss L multi It ensures that the predicted probability of the true label is at least 1 greater than that of other labels; finally, the multi-label prediction loss L bm The binary cross entropy loss L is adjusted by the hyperparameter η bce and the multi-label margin loss L multi , expressed by formula (19):
[0073] L bm =ηL bce +(1-η)L multi (19)
[0074] Drug interaction loss L ddi
[0075] The present invention uses prior knowledge of drug interactions and constructs a drug interaction matrix A after confirmation by domain experts. ddi [i,j] = 1, indicating that there is an antagonistic effect between drug i and drug j, and the drug interaction loss is L ddi That is, add and average all elements of the loss matrix, which can be expressed as formula (20):
[0076]
[0077] Combination loss
[0078] During training, both incorrectly predicted drugs and correctly predicted drugs may increase the DDI rate; therefore, we must ensure that we reduce DDI while achieving a high prediction accuracy, and we need to control L bm and L ddi The simulated annealing algorithm used in GameNet is used to control the combination loss, which helps the model find the best parameter combination, thereby proving the effectiveness and security of the model. In order to compare with existing methods, we set the threshold β = 0.05, which is consistent with the parameter setting of the comparison method.
[0079] Experimental results and analysis and discussion
[0080] The experiment of the present invention was verified on the real public clinical medical data set MIMIC-III, which was jointly released by the Massachusetts Institute of Technology, Beth Israel Deacon Medical Center and Philips Healthcare, and is a recognized data set in drug recommendation research. Data integration processing and analysis were completed based on Python 3.8, and patient medication map construction was completed using PyG. Data set division and overall model construction were all implemented based on the PyTorch framework.
[0081] The specific parameters of the drug recommendation model experiment of the present invention are set as follows: the model divides the original data set into a training set, a validation set, and a test set in a ratio of 2 / 3:1 / 6:1 / 6, Adam is used as a model optimizer, the learning rate is 0.0002, an L2 regularization term is added to prevent the model from overfitting, and its value is set to 5e-4, and the number of training iterations epoch is 60 times.
[0082] Data source and preprocessing
[0083] MIMIC-III v1.4 collected clinical data of more than 40,000 patients during hospitalization, and recorded the health status and changes of patients from different perspectives; the data included patients' vital signs, laboratory tests, doctor's orders, operation codes, diagnosis codes, hospitalization time, and doctor's orders. Due to the complexity of data in electronic medical records, in order to ensure the availability of historical health records, only the clinical data of 6,338 patients who had multiple visits and laboratory test results were retained during data preprocessing. The present invention extracted the Top-40 severe DDI types from the TWOSIDES data set, and converted the drug codes from NDC to ATC3 level codes to facilitate comparison with existing models. The statistical information of the data set is shown in Table 1.
[0084] Table 1 Data statistics
[0085]
[0086] Comparison Models
[0087] In order to illustrate the superiority of the model of the present invention, the model of the present invention is compared with the following baseline models:
[0088] Nearest: Simply recommend the same combination of medications used during the last visit;
[0089] LR: uses logistic regression with L2 regularization and regards drug recommendation as a multi-label output task. It is an instance-based recommendation model.
[0090] RETAIN: Provides sequential prediction of drug combinations based on a two-level neural attention model, using historical medical records to detect influential historical visit data to improve drug recommendation performance;
[0091] LEAP: an example-based joint drug recommendation model;
[0092] DMNC: Drug combination prediction model based on memory-augmented neural network of differentiable neural computer;
[0093] GAMENet: learns and encodes EHR and DDI knowledge through GCN, sets up dynamic memory to store historical medical treatment and medication information, and reads data through the attention mechanism to make drug recommendations;
[0094] MedSim: It uses two attention mechanisms to learn structured time series data to represent patients and calculates the similarity of patient visits to enrich patient representations, thereby treating drug recommendations as a multi-label learning problem to improve drug recommendation performance;
[0095] Model evaluation metrics
[0096] In order to better illustrate the accuracy and safety of drug prediction by the method of the present invention and compare it with the above-mentioned comparative model, the present invention uses Jaccard index, F1-Score, precision-recall area under the curve (PR-AUC) and DDI rate as evaluation indicators to evaluate the model. The calculation method of the indicators is given by formula (21-24):
[0097]
[0098]
[0099] Among them, in formulas (21) and (22) and Represent the actual prescribed drugs and predicted drugs respectively. In formulas (21-23), i represents the i-th patient, N represents the total number of patients in the test set, and Ti represents the total number of visits of patient i. In formula (23), k represents the ranking in the retrieved drug sequence. In formula (24), Tk represents the total number of visits of the k-th patient, N represents the total number of patients in the test set, i and j represent two drugs respectively, and the drug pair (m i ,m j ) indicates that the recommended drug set satisfies the edge set Eddi in the DDI graph at the same time;
[0100] Results and Discussion
[0101] Performance comparison and analysis discussion
[0102] The model of the present invention is compared with the models mentioned in the comparison model, and the results are shown in Table 2. It can be seen from Table 2 that compared with other comparison models, the indicators of the model of the present invention are significantly improved, and its Jaccard index, F1-Score, PR-AUC and DDI rate are 0.5172, 0.7661, 0.6731 and 0.0703 respectively. Specifically, the early methods Nearest and LR show lower Jaccard index and higher DDI rate (except Leap model) in all comparison models. The reason may be that the model simply recommends drugs and does not pay attention to the importance of historical medical information for drug recommendation. Recently, for deep learning-based methods, The performance of the instance-based Leap model is lower than that of the longitudinal medical history-based time models such as RETARN, DMNC, GAMENET, and MedSim, which confirms the importance of time information in the patient's medical history. At the same time, the Leap, RETARN, and DMNC models have a high or even close DDI rate to the basic DDI rate in the EHR data (the actual DDI rate of the MIMIC-III data set is 0.0891 after calculation), which means that without prior DDI knowledge as a guide, it is difficult for the model to learn from clinical data and remove existing DDIs. However, this is precisely an indispensable part of the safety of combined medication for patients in clinical practice. For the recent method GAM ENET and MedSim both comprehensively consider the patient's longitudinal medical history information and DDI, so they have achieved higher Jaccard index, F1-Score and PR-AUC values and lower DDI rates; however, none of the above models consider that the patient's laboratory test is the most objective and direct reflection of the patient's true health status. Relying solely on the doctor's diagnosis results and surgical information to characterize the patient may be more integrated with the doctor's experience, resulting in suboptimal patient representation; therefore, the model of the present invention not only comprehensively considers the patient's longitudinal medical history and known DDI knowledge, but also considers the use of patient laboratory tests to enrich the patient's representation, and more objectively and real-timely expresses the patient's every condition from the model input level. Health status of a doctor in one visit; It can also be seen from the experimental results that, in terms of recommendation effectiveness, the model of the present invention improves by 0.64%, 3.7% and 1.26% in Jaccard similarity, PR-AUC and F1-Score respectively compared with the new method MedSim, further confirming that the use of patient clinical signs can effectively characterize patients, which is conducive to the self-attention module to accurately capture the patient's historical health history and historical medication information; In terms of recommendation safety, the present invention uses conventional attention to learn prior DDI knowledge, effectively controls the DDI rate in real prescriptions, and the DDI rate is 0.53% lower than that of MedSim, indicating that the model of the present invention has achieved a better balance between recommendation safety and accuracy.
[0103] Table 2 Comparison results of evaluation indicators of different prediction models
[0104]
[0105] Analysis of self-attention encoding layer selection
[0106] The present invention evaluates the impact of different self-attention coding layers on the model results, and through statistical analysis, it is found that among 6338 patients, there are 4266 patients who visited the hospital twice, 1169 patients who visited the hospital three times, 445 patients who visited the hospital four times, 408 patients who visited the hospital 5-10 times, and only 50 patients who visited the hospital more than 10 times; therefore, the present invention conducts self-attention coding layer (1-10 layers) change experiments on 2 visits, 3 visits, more than 4 visits, and multiple visits of all patients, respectively, to verify whether the self-attention coding layer obtains the patient's historical visit information; in order to more intuitively illustrate the impact of different self-attention coding layers on the model's drug recommendation results for different numbers of visits, the result graphs of different evaluation indicators under different self-attention coding layers are drawn for the above-mentioned evaluation indicators, see Figure 3 , from the results, we can see that: (1) no matter how many times the patient visits the doctor, the self-attention encoding layer can capture the patient's historical medical information, and the overall impact of the self-attention encoding layer on the model results shows a trend of first increasing and then decreasing; overall, when the number of layers is 5, the overall drug recommendation result of the patient is the best, and the highest index value is achieved. The reason may be that when the number of encoding layers is small, the model cannot effectively read the valid information in the patient's historical medical records, resulting in unsatisfactory drug recommendation results; when the number of encoding layers is too large, unnecessary noise information may be introduced, which has a negative impact on the output of the model; (2) when the number of self-attention encoding layers is certain, from Figure 3 It can be seen that as the number of visits increases, the Jaccard index and PR-AUC show an upward trend. This may be because the self-attention mechanism is more sensitive to the medical history. The more visits, the more accurate the recommended drugs will be. The DDI rate shows an increasing trend with the increase in the number of visits. The reason may be that when the complexity of the patient's disease increases (the number of visits increases), the corresponding number of medications increases, resulting in an increase in the DDI rate. However, when all medical histories are considered, a lower DDI rate is achieved. This may be because the combination loss is an effective balance between accuracy and DDI rate, so that the model can obtain more accurate recommendation results while suppressing the increase in DDI rate, thereby recommending effective and safe drug combinations.
[0107] Ablation experiment analysis
[0108] In order to evaluate the necessity of each component of the model of the present invention, the model was disassembled into variants with different components removed; each disassembly would remove one component of the model and retain the remaining components; the corresponding function of a single component removed would also disappear and would not be able to play a role in the drug recommendation process; the different variants after disassembly are as follows: (1) No-Labevents: after removing the coding results of laboratory tests, only the coding of the diagnosis results and the surgical results is integrated; (2) No-DDI: it means removing the DDI graph and vector representation part in the model; (3) No-self-attention: it means removing the self-attention mechanism in the model to read the patient history record and medication module, and only using the dynamic memory component to read the data; the results of the ablation experiment are shown in Table 3. The experimental results show that the model of the present invention achieves the best drug recommendation effect, and its Jaccard index, F1-Score, PR-AUC and DDI rate are 0.5172, 0.7661 and 0.0363, respectively. .6731 and 0.0703, which proves the necessity of each component of the model for drug recommendation; specifically, No-Labevents lacks the embedding of patients' clinical signs, the Jaccard index decreases significantly, and the DDI rate increases significantly, which shows that ignoring the patient's own sign data has a great impact on the patient's characterization, leading to more possibilities of wrong medication recommendations; No-self-attention removes the reading of patients' historical medication information by the self-attention mechanism, and the performance obtained is also poor, with a significant decrease in Jaccard and F1-Score, indicating that the self-attention mechanism has a significant impact on the reading results of patients' historical medication information; No-DDI module removes DDI, and although the model's Jaccard index, F1-Score, and PR-AUC only decrease slightly, the DDI rate increases significantly, indicating that a complete DDI can effectively reduce the interaction between drugs and improve medication safety.
[0109] Table 3 Comparison results of evaluation indicators of different prediction models
[0110] Model Name Jaccard PR-AUC F1-score DDI No-Labevents 0.5001 0.7547 0.6573 0.0763 No-DDI 0.5163 0.7612 0.6715 0.0787 No-self-attention 0.5023 0.7538 0.6529 0.0732 Thispaper 0.5172 0.7661 0.6731 0.0703
[0111] Case matching analysis
[0112] In order to further demonstrate the effectiveness and safety of the model of the present invention, two hospital visit records of a patient were selected from the MIMIC-III dataset. The model of the present invention, LEAP, RETAIN, DMNC, and GAMENet were used to predict the drug combination based on the patient's historical medical record data, and compared with the actual doctor's prescriptions. The comparison results are shown in Table 4.
[0113] Table 4 Case matching analysis and comparison
[0114]
[0115]
[0116] Among them, "correct" means that the drug predicted by the model is consistent with the doctor's prescription, "wrong" means that the predicted drug is a drug that has not appeared in the doctor's prescription, and "missing" means that the drug appears in the doctor's prescription but is not predicted by the model. From the experimental results, it can be seen that, in comparison, the model of the present invention can accurately predict the correct drug in the prescription for two visits, while LEAP and GAMENet have a higher probability of wrong prediction. Although the RETAIN model has a lower error rate, the total number of recommended drugs is also less. It should be pointed out that when the patient visited the doctor for the second time, all models None of them recommend M01A (non-steroidal anti-inflammatory drugs and anti-rheumatic drugs) that appear in the doctor's prescription. Analysis shows that the combined use of M01A with any of C07A (β-receptor blockers), N02A (opioid alkaloids) and A12B (potassium) will produce an antagonistic effect. Regardless of the patient's first or second visit, LEAP and GAMENet models both recommend A07A (intestinal anti-infective drugs), which will antagonize with multiple correctly recommended drugs, while RETAIN and the present invention model do not recommend it, indicating that the models have learned prior DDI knowledge.
[0117] Although the embodiments of the present invention have been shown and described, as detailed above, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A graph-enhanced attention-based drug recommendation model algorithm integrating clinical signs, characterized by: The steps include: Characterize patients based on complete medical information, and use gated neural networks to capture the changing patterns of patients' health status contained in EHRs; In the patient characterization process, drug combination knowledge and DDI knowledge are effectively utilized through GNN and integrated into the patient characterization process; The two-stage attention module reads the patient medication information that incorporates DDI knowledge and has patient similarities and historical medical records, and transforms drug recommendations into a multi-label prediction task.
2. The graph-enhanced attention-based drug recommendation model algorithm integrating clinical signs according to claim 1, characterized in that: The model uses three embedding matrices and The input multi-hot vector After linear embedding, it is transformed into the feature vector of the patient's corresponding diagnosis, surgery, and clinical signs The process can be expressed as formula (2): Where dim is the dimension of the feature vector As the input of GRU at the current moment, the patient characteristics are updated according to formula (3), thereby obtaining The temporal relationship of GRU output hidden state After concatenation and linear transformation, the health representation vector q of the patient i who was admitted to the hospital for the tth time is finally obtained: t , which can be described by formula (4); in, They represent the hidden states of the patient’s previous t-1 hospital admissions, f represents the conversion function, and is a fully connected neural network with a single hidden layer.
3. The graph-enhanced attention-based drug recommendation model algorithm integrating clinical signs according to claim 1, characterized in that: It also includes a graph enhancement attention module, which includes a graph enhancement storage module and a two-stage attention-based reading module.
4. The graph-enhanced attention-based drug recommendation model algorithm integrating clinical signs according to claim 3, characterized in that: The graph-enhanced storage module uses the graph neural network's ability to capture neighbor node information of graph structured data, regards drugs as nodes, constructs EHR graphs and DDI graphs respectively, and captures the combined medication relationships based on prior DDI knowledge in patient medication records.
5. The graph-enhanced attention-enhanced drug recommendation model algorithm integrating clinical signs according to claim 3, characterized in that: The two-stage attention reading module is described as follows: In the first stage, the model reads data based on conventional attention; In the second stage, the model uses the self-attention mechanism to obtain similar historical patient representations with time attention, and retrieves M in the query library Q from the time level through the attention weight. q The interactive information of the patient is finally obtained, including the reading results of similar historical patients embedded with laboratory test results.
6. The graph-enhanced attention-based drug recommendation model algorithm integrating clinical signs according to claim 1, characterized in that: The model reads data based on regular attention, and the corresponding content is as follows: First, the model is based on the patient health representation vector q t and query library M q The interaction information between the prior knowledge of drug combinations and drug interactions stored in the attention weights is calculated The calculation process is shown in formula (10); Then, the model uses attention weights Read patient data embedded with medication information from the repository to query and store the read results of patients with similar medication information As shown in formula (11); 7. The graph-enhanced attention-based drug recommendation model algorithm integrating clinical signs according to claim 1, characterized in that: The model adopts an end-to-end training method, and the model is trained and adjusted by three loss functions. During the training phase, the model also learns the embedding matrix W in GRU d , W p , W l , and the weight parameter matrix W in GCN ehr , W DDI parameters, and balances the accuracy and safety of drug recommendation results by comprehensively considering three loss functions.
8. The graph-enhanced attention-based drug recommendation model algorithm integrating clinical signs according to claim 7, characterized in that: The three loss functions are: multi-label prediction loss, drug interaction loss and combination loss.
Citation Information
Patent Citations
Drug recommendation method and system based on historical drugs and dual-granularity fusion network
CN118506965A
Drug combination recommendation method and system based on comparative learning and label attention
CN118522403A
Cited By
Personalized drug recommendation system for rheumatoid arthritis based on graph embedding hierarchical structure
CN119889571A
Personalized Drug Recommendation System for Rheumatoid Arthritis Based on Graph Embedding Hierarchical Structure
CN119889571B