Debiased, Longitudinal, and Coordinated Drug Recommendation through Multi-Visit Clinic Records
Anonymous Author(s)
AffiliationAddress email
Abstract
AI-empowered drug recommendation has become an important task in healthcareresearch areas, which offers an additional perspective to assist human doctors withmore accurate and more efficient drug prescriptions.
Generally, drug recommendation is based on patients’ diagnosis results in the electronic health records.
Weassume that there are three key factors to be addressed in drug recommendation: (1)elimination of recommendation bias due to limitations of observable information,(2) better utilization of historical health condition and (3) coordination of multipledrugs to control safety.
To this end, we propose DrugRec, a causal inferencebased drug recommendation model.
The causal graphical model can identify anddeconfound the recommendation bias with front-door adjustment.
Meanwhile,we model the multi-visit in the causal graph to characterize a patient’s historicalhealth conditions.
Finally, we model the drug-drug interactions (DDIs) as thepropositional satisfiability (SAT) problem, and solving the SAT problem can helpbetter coordinate the recommendation.
Comprehensive experiment results showthat our proposed model achieves state-of-the-art performance on the widely useddatasets MIMIC-III and MIMIC-IV, demonstrating the effectiveness and safety ofour method.
Introduction
The digitization of healthcare track records with diagnosis, procedure, and prescriptions has becomean inevitable trend rising.
Advanced AI can process large-scale electronic health records (EHRs)and biomedical knowledge graphs (BioKGs) with the massive data available.
With the continuousprogress of medical digitization, the advances in deep learning technologies for processing can assistdoctors and researchers in making accurate and efficient medical decisions [26, 18].
More specifically,the goal of the drug recommendation task is to recommend appropriate medication combinationsbased on a patient’s disease conditions.
Existing drug recommendation methods model a patientbased on his/her diagnoses and procedures in health records from actual hospital visits and thendetermine which drugs to recommend.
The information on BioKGs is also widely used in the drugrecommendation process to avoid the negative effect of drug-drug interactions (DDIs) [17, 28].
Despite the promising achievements of previous methods, we argue that three essential factorsshould be considered in a drug recommendation model.
First, general recommendation systemsoften suffer from recommendation bias issues [1] (e.g., conformity bias, exposure bias, popularitybias, selection bias, etc.), which also happens in drug recommendations but is not handled wellin previous works.
Sometimes the diagnostic information in EHRs is insufficient to describe thepatient’s health condition, leading to a recommendation bias due to the limitations of observableinformation.
Second, the patient’s historical clinic records are critical for recommending drugseffectively.
When recommending drugs, the model should consider both the current visit and previous visits, since ignoring them could lead to a lower recommendation accuracy.
Finally, the negativedrug-drug interactions (DDI) is also a critical issue in drug recommendation models.
When multipledrugs are recommended together, the system needs to control DDIs for drug safety.
Considering these key factors, we propose a novel drug recommendation causal graphical model,which is shown in Figure 1.
The patient’s potential disease information is considered as the confounder( C ).
Due to the existence of the confounder, general drug recommendation leads to recommendation bias due to ignoring the existence of the confounder.
We debias the confounding defects byidentifying the causal effect of the treatment variable symptom ( S ) on the outcome variable ( Y ).
Identifying the effect can take into account the existence of the confounder in modeling to eliminatethe recommendation bias.
Specifically, we intervene on the symptom and identify the deconfoundedcausal effect of symptom on drug prescriptions with front-door adjustment [5].
As a result, we canobtain debiased drug recommendation results by maximizing the average treatment effect (ATE) ofintervention.
Moreover, in order to extend the method to the multi-visit scenario, we propose twomodeling schemes to leverage the historical records for current drug prescribing.
Therefore, wecan successfully identify the multi-visit causal effect for more accurate recommendation.
Finally,we model the DDI problem as the propositional satisfiability (SAT) problem where the selection ofeach drug is represented as a boolean variable and the relations are represented as boolean operators.
Although the SAT is NP-complete [3, 12], we note the DDI problem can be modelled as a particularcase, i.e., 2-SAT problem, which can be solved in polynomial time [10].
Since the trivial solution(i.e.
, recommend no drugs) always exists, we propose a heuristic method to extract non-trivial 2-SATsolution that optimize the recommendation probability from the causal graph.
Our overall technical contributions in this work are summarized as follows:
• We construct a drug recommendation causal graphical model for this task and leverage the
front-door adjustment to alleviate the invisible recommendation bias.
• We propose two modeling schemes that extend the graphical model to the multi-visit scenarioto better model a patient’s historical health condition.•
We model the DDI with the 2-SAT problem to coordinate the recommendation and improvethe recommendation safety.
We also propose a heuristic method to extract non-trival solutionto 2-SAT to optimize the recommendation probability from causal graph.
We conduct extensive experiments on the widely used benchmark datasets MIMIC-III and MIMIC-IVto evaluate the recommendation quality and the DDI rate.
We significantly (p<0.01) advance thestate-of-the-art results of Jaccard score, PRAUC, and F1-score, demonstrating the effectiveness ofour method.
The significant drop in DDI Rate shows that our method better considers drug safety.
Related Work
Drug Recommendation.
Drug recommendation is a promising research area in recent years.
For example, Gong et al.
[6] construct a high-quality heterogeneous graph and decomposes themedicine recommendation into a link prediction process.
Zhang et al.
[30] decompose treatmentrecommendation task into a sequential decision-making process and adopt a multi-instance multilabel learning framework.
Shang et al.
[16] pre-train the records of single-visit patient’s records andfine-tune on the multi-visit records.
Choi et al.
[2] employ a two-level neural attention model thatdetects influential past visits and significant clinical variables.
Le et al.
[11] present a new memoryaugmented neural network model to model sequential records.
Shang et al.
[17] utilize memoryaugmented neural networks and store historical records as references for future prediction.
Yang et al.[27] first focus on the medication changes using recurrent residual learning .
Yang et al.
[28] proposea DDI-controllable drug recommendation model to leverage molecule structures and model DDIsmore effectively.
Wu et al.
[25] introduces a novel copy-or-predict mechanism to generate medicines.
We conduct a novel causal graoh for drug recommendation treating the recommendation bias as aconfounder, and make debiased recommendations by identifying the causal effect.
Causal Recommendation.
Causal inference has been widely used in machine learning basedrecommendation systems.
The confounding effect is the typical pattern for considering causalityin recommendation systems.
Wang et al.
[22] employ deconfounding techniques to learn realinterests affected by unobserved confounders.
The recommender estimates a substitute for theunobserved confounders by fitting exposure data.
Sato et al.
[15] treat the features of the user and item as confounders and reweight training samples to account for confounding.
Many existingmethods construct causal graphs and then apply causal inference techniques to mitigate confoundingbias by incorporating confounders into data generation, including item popularity [29, 23, 7], userselection [21, 22], and ranking positions [13]. We are the first to design a novel causal graph fordrug recommendation from the logic of drug prescribing of human doctors, which eliminates therecommendation bias due to limitations of observable information.
Preliminary
3.1 Problem Formulation
Longitudinal EHR data has the patient-visit hierarchical structure and the whole data for all patients can be represented as X
= { X (1) , X (2) , . .
, X ( N ) } , where N is the total number of patients.
A specific patient j can be represented as a sequence of multivariate visits: X ( j )
=[ x ( j ) 1 , x ( j ) 2 , . .
, x ( j ) T j ] , where T j is the number of visits of patient j .
For the t -th visit of patientj , x ( j ) t = [ s ( j ) t , d ( j ) t , p ( j ) t , m ( j ) t ] , where s ( j ) t ∈ { 0 , 1 } |S| , d ( j ) t ∈ { 0 , 1 } |D| , p ( j ) t ∈ { 0 , 1 } |P| andm ( j ) t ∈ { 0 , 1 } |M| are multi-hot symptoms, diagnoses, procedures, and medication vectors, respectively.
The S , D , P and M are the overall symptom, diagnosis, procedure, and medication sets,while | · | denotes the cardinality of the set.
We will omit the trivial superscript j whenever there is noambiguity in discussing different visits within the same patient.
Meanwhile, we also need to considerthe side effect relations in the DDI graph before determining the final drug combinations.
We use thesymmetric binary adjacency matrix A ∈ { 0 , 1 } |M|×|M| to represent the DDI graph, where A uv = 1if and only if the u -th and v -th drug has harmful interactions.
The objective of drug recommendation task is to predict the probabilities (cid:98) y t ∈ [0 , 1] |M| of eachdrug to recommend, given all the patient’s previous visits ( x 1 , x 2 , . . .
, x t − 1 ) , current visit inputs( s t , d t , p t ) at time t , and the DDI graph A .
3.2 Causal View of Drug Recommendation
To address the problem that observed informa- 114 tion is often incomplete and insufficient to describe the actual health condition, we propose 116 a debiased drug recommendation method basedon causal inference techniques.
As shown in 118 Figure 1, it is consistent with the logic of doctors diagnosing diseases based on symptoms and 120 prescribing drugs based on all the information.we introduce an unobservable confounder as the 122 patient’s potential disease information, whichacts directly on both symptoms ( S ) and drug 124 prescriptions ( Y ) , affecting the results of drugrecommendation.
In the causal view, the condi- 126 tional probability P ( y | s, m ) considered by general models cannot reflect the actual causal ef- 128 fect of symptoms on drug prescribing.
We intervene on the treatment variable S , and the inter- 130 vention probability P ( y | do ( s ) , m ) determinesthe effect of S on Y .
Next, the key to iden- 132 tifying the causal effect is how to remove thedo -operator
so that P ( y | do ( s ) , m ) can be calculated.
Here we treat D , P and R as mediators , which exactly satisfies the conditions of the front-door 135 criterion [5].
The front-door criterion provides a sufficient condition for identifiability when theconfounder is unobservable.
The causal effect P ( y | do ( s ) , m ) is thus identifiable with front-dooradjustment [5], which can be formulated as Equation (1).
See Appendix A for details of causal 138 analysis.
[Equation]
Denote d s and p s as symptom-affected representations of the diagnosis and procedure, respectively.
We set P ( d | s ) =
if and only if d = d s ; otherwise P ( d | s ) = 0 , and P ( p | s ) as the same.
The patientvisit representation is written as r ( s, d s , p s ) under the representations s, d s , p s , and P ( r | s, d s , p s ) =
1holds if and only if r = r ( s, d s , p s ) ; otherwise P ( r | s, d s , p s ) = 0 .
The objective of previousmethods that ignore modeling the unobserved confounder is to learn a scoring function of the formf ( r ( d, p ) , m ) or f ( r ( s, d s , p s ) , m ) .
In contrast, our scoring function f is related to the representationof each symptom s ′ .
The eventual probability is a weighted sum of the scoring functions according todifferent symptoms.
We can finally estimate (cid:98) y ∈ [0 , 1] |M| , the predicted recommendation probabilityfor each drug, by Equation (1).
Since the cardinality of the symptom set |S| is large, it is untrackableto traverse all the symptoms to calculate the above probability.
Instead, we conduct a sample set
ˆ Swith k s symptoms.
The probability P ( s ′ ) can be estimated by the frequency ˆ P ( s ′ ) for symptom s ′ inthe original EHRs.
Our method
4.1 Multi-Visit Causal Drug Recommendation
The causal graph in Figure 1 is based on a single visit of a patient.
Considering the critical impact ofa patient’s historical health condition on current drug recommendations, we extend the single-visitcausal effect to the multi-visit scenario.
We propose two modeling schemes for the multi-visit causaldrug recommendation.
The DrugRec-a aggregates all the historical visits and express them as onecausal graph, while the DrugRec-k models the impact of past k visits before the current visit.
DrugRec-a. A core issue of the previous single-visit scenario is that the causal effects of eachvisit are calculated separately without any interaction between them.
Considering that variableslike S , D , P and Y have sequential effects, the DrugRec-a method integrates all previous variablerepresentations of t − 1 visits into a single representation at time t using an aggregation function agg .
Therefore, it can be uniformly handled that the lengths of historical visits vary at different time points.
For instance, we denote the integrated symptom representation as S t − 1 = agg
([ S 1 , . . .
, S t − 1 ]) , andother integrated representations D t − 1 , P t − 1 , Y t − 1 can be derived in the same way.
Therefore, wecan compress all previous t − 1 visits into one causal graph.
Every time the model makes decisionsfor the current drug description, the connection between the historical causal graph and the currentcausal graph is crucial.
We link the two causal graphs together by adding several paths betweenthem.
Specifically, we link the paths S t − 1 → S t , D t − 1 → D t , P t − 1 → P t and Y t − 1 → Y t for laterjoint analysis.
Similar to the single-visit scenario, the multi-visit causal effect is now extended to ajoint intervention probability P
( y t , y t − 1 | do ( s t ) , do ( s t − 1 ) , m ) for the historical and current patienthealth conditions.
Historical and current diagnoses, procedures and patient visit representations canstill serve as mediators, as all pathways from treatment variables ( S t − 1 , S t ) to outcome variables( Y t − 1 , Y t ) pass through them.
Thus, the overall linked causal graph still satisfies the conditions ofthe front-door criterion.
More specifically, the causal effect P ( y t , y t − 1 | do ( s t ) , do ( s t − 1 ) , m ) can beidentifiable and formulated as
[Equation]
,r (cid:0) s t (cid:57) 1 ,d t (cid:57) 1 ,s t (cid:57) 1 ,p t (cid:57) 1 ,s t (cid:57) 1 (cid:1) ,m (cid:1) P ( s ′ t (cid:57) 1 ) · (cid:88) r t ∈R (cid:88)
d t ∈D (cid:88) p t ∈P
P (cid:0) d t | d t (cid:57) 1 ,s t (cid:1) P ( p t | p t (cid:57) 1 ,s t ) P ( r t | s t ,d t ,p t ) · (cid:88)
s ′
t ∈S
P ( y t | y t (cid:57) 1 ,s ′ t ,r t ,m ) P ( s ′ t | s ′ t (cid:57) 1 ) ≜ (cid:88) s ′ t (cid:57)
1 ∈S f (cid:0) s ′ t (cid:57) 1 ,r (cid:0) s t (cid:57) 1 ,d t (cid:57) 1 ,s t (cid:57) 1 ,p t (cid:57) 1 ,s t (cid:57) 1 (cid:1) ,m (cid:1) P ( s ′ t (cid:57) 1 ) · (cid:88) s ′ t ∈S (cid:101) f (cid:16) y t (cid:57) 1 ,s ′ t ,r (cid:16)(cid:101) s t , (cid:101) d t,s t , (cid:101) p t,s t (cid:17) ,m (cid:17) P ( s ′ t | s ′ t (cid:57) 1 ) , (2) where P ( d t | d t − 1 , s t )
= 1 ⇔ d t = g
( d t − 1 , (cid:101) s t ) ≜ (cid:101)
d t,s t ; otherwise the value is zero, and
P ( p t | p t − 1 , s t ) as the same.
An update function g is used to derive the updated symptom representation (cid:101) s t and the current symptom-affected representations (cid:101) d t,s t and (cid:101) p t,s t .
Meanwhile, the 180 eventual probability can be reduced to the product of the weighted sum of two scoring functions,indicating that the historical and current recommendation decisions are decomposable.
The sum withthe scoring function f is exactly the same as Equation (1), modeling the historical health conditionslike a single visit.
The current drug prescribing that we actually focus on is determined by another scoring function (cid:101) f .
Different from f considering a single visit, the function (cid:101) f can leverage historcalinformation since it is also related to previous recommendation results y t − 1 .
Each symptom s ′ tis sampled from the symptom sample set ˆ S through the conditional distribution P ( s ′ t | s ′ t − 1 ) .
Thecondition probability can be estimated as ˆ P ( s ′ t | s ′ t − 1 ) , the ratio of the co-occurrence frequency of s ′ tand s ′ t − 1 to the frequency of s ′ t .
We can eventually obtain the current drug recommendation results(cid:98)
y t by estimating (cid:101) f in Equation (2).
The details of network implementation for estimation is availablein Section 4.3.
DrugRec-k. We propose another solution that extends drug recommendation to multi-visitscenario.
An intuitive assumption is that for all historical visits of a patient, the more recent visithas a more significant effect on current drug prescriptions.
Therefore, DrugRec-k only modelsinformation from the past k visits to make the drug prescription of current visit more accurate.
Thisimplies the need to characterize the connections between the k historical causal graphs and thecurrent causal graph.
Taking the symptom variable as an example, for the current t -th visit, weconsider the effect of the symptom representations S t − k , S t − k +1 , · · · , S t − 1 on S t .
When k = 0 , theproblem degenerates into the single-visit scenario.
In order to model how the k historical symptomrepresentations affect the current symptom representation, we make connections between each ofthe k historical causal graphs and the current causal graph.
Specifically, the k paths S t − k
→ S t ,
S t − k +1 → S t , · · · , S t − 1 → S t are added to connect the historical representations with the currentrepresentation.
For other variables D t , P t and Y t at time t , such k paths need to be linked in thesame way.
Based on the experience in DrugRec-a, the multi-visit causal effect we consider here isthe joint intervention probability P ( y t , y t − 1 , · · · , y t − k | do ( s t ) , do ( s t − 1 ) , · · · , do ( s t − k ) , m ) .
The causal effect in the overall causal graph connected by k + 1 graphs can still beidentifiable without breaking the conditions of front-door criterion, which is given by
[Equation]
, (cid:101) d t,s t , (cid:101) p t,s t (cid:17) ,m (cid:17) P (cid:0) s ′ t | s ′ t − 1 , ··· ,s ′ t − k (cid:1) , (3) where P ( d t | d t − 1 , · · · , d t − k , s t )
= 1 ⇔ d t = g ′
( d t − 1 , · · · , d t − k , (cid:101) s t ) ≜ (cid:101)
d t,s t ; otherwise the value iszero, and P ( p t | p t − 1 , · · · , p t − k , s t ) as the same.
The updated symptom representations (cid:101) s t and currentsymptom-affected representations (cid:101)
d t,s t and (cid:101) p t,s t can be derived by an update function g ′ .
Herethe historical and current recommendation decisions are also decomposable.
The historical healthconditions are modeled like k single-visit scenarios.
While for the current visit, the scoring function(cid:101) f is based on the aggregation of previous recommendation results (cid:101)
y t − k = agg
( y t − 1 , · · · , y t − k ) ,slightly different from
DrugRec-a.
In addition, the s ′ t is sampled by the estimated conditionaldistribution ˆ P ( s ′ t | s ′ t − 1 , · · · , s ′ t − k ) , which is the ratio of the corresponding co-occurrence frequencyto the frequency of s ′ t .
The current drug recommendation results (cid:98) y t can be obtained by estimating (cid:101) fin Equation (3).
The implementation details for estimation are available in Section 4.3.
4.2 Controllable DDI with 2-SAT
Another important issue in drug recommendation is coordinating multiple drugs, which differs fromgeneral recommendation systems.
Significantly, the side effects of recommended drug combinationscan threaten patient safety.
Based on the information of paired drugs with harmful interactionsstored in the DDI graph, previous methods mainly penalize the recommendation of DDI pairs by a
DDI-related loss.
However, there is no mature solution to handle DDIs at the inference stage.
Herewe propose a method that models the DDI as propositional satisfiability (SAT) problem.
Specifically,we regard whether or not to retain a drug i in the candidate set as a boolean variable that m i .
Then
the
DDI beetween drug i and j is represented as ( ¬ m i ∨ ¬ m j ) .
The DDI SAT problem is formulated bythe conjunctions of all such clauses based on the drugs recommended by the causal graphical model.
Taking the Figure 2(d) as an example, m 1 represents to keep the first drug, while ¬ m 1 represents notto keep it, m 2 , m 3 , and m 4 as the same.
The DDIs limit the coexistence of certain drugs, which canbe formulated as ( ¬ m 1 ∨ ¬ m 2 ) ∧ ( ¬ m 2 ∨ ¬ m 4 ) ∧ ( ¬ m 3 ∨ ¬ m 4 ) .
Since every clause only has two literals, this is a 2-SAT problem that can be solved in polynomialtime.
Following [10], we first convert ¬ m i ∨¬ m j to the implicative normal form m i ⇒ ¬ m j , m j ⇒¬ m i .
Then we construct a directed graph with two nodes m i and ¬ m i for each drug i and addthe edges corresponding to the implications.
Next, we find all strongly connected components(SCCs) of this graph using Tarjan’s Algorithm [19], and then sort these SCCs in topological order.
Although we can find a solution with any topological order, finding the best order is still an NP-hardproblem.
Therefore, we propose a heuristic method that enhance the topological sorting with therecommendation probability.
When sorting the SCCs, we always select the SCC with no in-bondand the lowest probability, which is P ( m i ) for m i and 1 − P ( m i ) for ¬ m i .
This modification iscritical for our method because the trivial solution (i.e., recommend no drugs) always exists, and ourgoal is to find a solution with a more significant likelihood.
The rest step is identical with [10] thatselecting m i or ¬ m i by the one that comes later in the sorted SCCs.
Since we let the nodes withlower probability come first, we are more likely to choose the drugs with a higher probability.
[Figure]
4.3 Model Implementation
In this section, we implement the the update function and scoring function through the neural networkand introduce the training objective of our model.
The model overview of DrugRec-k is illustrated in
Figure 2.
The architecture of DrugRec-a is similar, and a few differences will be described later.
Input Representation.
For the drugs, we first obtain the SMILES 1 string of each drug in the datapreprocessing.
Next, we extract all the drug representations with the molecule pre-trained transformermodel [31] and freeze the representation matrix as ψ ( m ) .
For the diagnosis and procedure, previouswork used multi-hot embedding of ICD-9 or ICD-10 codes 2 , without guarantee that similar diagnosesand procedures will have similar representations.
Instead, we convert the ICD codes to correspondingtext descriptions in the dictionary tables and extract the symptoms from the clinical notes.
Then weemploy two-layer transformer encoders to encode the symptom, diagnosis, and procedure texts.
Wedenote the output representations of transformer encoders as s t , d t and p t at time t .
Next, for themulti-visit scenario, the implementation for the two modeling schemes is slightly different on updatenetwork and scoring network.
Update Network.
DrugRec-k employs an attention mechanism followed by subsequent Multilayer 259 Perceptrons (MLPs) as three separate update functions g s , g d and g p .
The updated representations
(cid:101) s t , (cid:101) d t,s t and (cid:101) p t,s t can be formulated as Equations (4)-(6).
The implementation detail of attention 261 mechanism can be shown in Appendix B.
[Equation]
While DrugRec-a uses an average aggregate function for the past t − 1 representations to obtain s t − 1 ,d t − 1 , p t − 1 , y t − 1 .
Then its updated representations (cid:101) s t , (cid:101) d t,s t and (cid:101) p t,s t can be derived by three newupdate functions g ′ s , g ′ d and g ′ p , as shown in Equations (7)-(9).
[Equation]
Next, we concatenate the above representations and use a two-layer MLP to obtain the current patientvisit representations as r t =
MLP ([ (cid:101) s t , (cid:101) d t,s t , (cid:101) p t,s t ]) .
Scoring Network.
For the current t -th visit, we conduct a sample set with k s symptoms according 268 to the estimation of the corresponding conditional probability mentioned in Section 4.1, denoted asˆ S t .
For each sampled symptom representation s ′ t ∈ ˆ S t , a two-layer MLP is introduced as scoringfunctions (cid:101) f .
Together with previously obtained drug representation matrix ψ ( m ) , the patient visitrepresentation r t and previous recommendation results, the final output of scoring function (cid:101) f t is given 272 by
[Equation]
where σ ( · ) represents the sigmoid function, and agg represents the average aggregation.
Therefore,the predicted recommendation probabilities ˆy t ∈ [0 , 1] |M| can be formulated as Equation (11), theweighted sum for (cid:101) f t .
[Equation]
Training Objective.
During the training process, we divide all the medications into positive andnegative cases according to ground truth in records.
Correspondingly, we can obtain (cid:98) y (+) t and (cid:98) y ( − ) t .
Based on the causal theory, we maximize the average treatment effect (ATE) between the interventionwith the observed symptoms do ( s t ) and the intervention without any symptoms do ( s 0 ) .
The ATE 280 measures the difference in average outcomes between the observed symptoms and no symptom.
Wereplace the s t with s 0 = 0 , and then recalculate the updated representations and scoring outputs by
Equations (4)-(11), resulting in (cid:98) y (+)0 .
Since the outcome variable
Y follows a Bernoulli distribution,we can estimate the ATE among the positive cases as τ t = (cid:98)
y
(+) t −
[Equation]
y (+)0 .
For all the N patients in therecords, the ATE-derived loss function can be formulated as
[Equation]
We also employ the following loss functions used in such previous works [27, 28].
We compute thebinary cross-entropy (BCE) loss L bce between prediction and ground-truth m ( j ) t .
The multi-labelhinge loss L mul is also introduced to ensure that the difference between the predicted probabilities ofpositive samples and those of a negative samples is at least 1 margin.
In order to control the safety ofthe drug combination, the occurrence of DDIs needs to be penalized by the DDI loss L ddi .
In addition to the DDI loss, we hope to improve the accuracy of drug pair recommendations for bettermultiple drug coordination.
Thus, we expand the single drug label m ( j ) t ∈ { 0 , 1 } |M| to the drug pair label (cid:101) m ( j ) t ∈ { 0 , 1 } |M| ( |M|− 1)and add the BCE loss for the drug pair L pair .
The equations of the 293 above four loss functions are available in Appendix B.
The overall training loss is then formulatedas Equation (13), where ω ate , ω mul , ω pair , ω ddi , γ are the hyper-parameters for controlling the loss 295 weight.
We also set a DDI acceptance rate γ to compare with the current DDI rate to determinewhether to include L ddi in the loss.
The training process is shown in Algorithm 1 in Appendix B.
[Equation]
[Equation]
Experiments
Data Processing.
We use the real-world EHRs obtained from publicly available MIMIC-III [9]and MIMIC-IV [8].
The DDI relations are obtained from TWOSIDES [20], and we convert thedrug coding from NDC to ATC third level for integration with MIMIC.
In addition to followingthe data processing methods of [28], we extract textual contents for the diagnosis and procedure byconverting their ICD codes to corresponding text descriptions in the dictionary tables.
We also obtainthe symptom information from clinical notes.
We further remove those patients who only had a singlevisit record or failed to extract any symptoms.
The datasets statistics are in Appendix C.
Baselines and Metrics.
Under the exactly same data splits, we compare our method with themainstream baselines.
The baselines include instance-based methods: LR, ECC [14], LEAP [30]and longitudinal-based methods: RETAIN [2], GAMENet [17], MICRON [27], SafeDrug [28],
COGNet [25] .
Following the previous works [28, 25], we measure the model with standardeffectiveness metrics: Jaccard Similarity Score (Jaccard), Precision Recall AUC (PRAUC) and F1score (F1).
DDI Rate and number of drugs are also included, lower is better.
The baseline and metricdetails are available in Appendix C.
Main Results.
Table 1 show the experimental results of all methods on MIMIC-III and MIMICIV.
Instance-based methods (LR, ECC and LEAP) perform poorly without considering historicalrecords.
RETAIN and GAMENet outperform instance-based methods on the effectiveness metrics,yet improve DDI Rate exceeding the ground-truth.
The DDI Rate of MICRON and SafeDrug is lowerthan other baselines, as they are specially designed with controllable DDI loss.
COGNet performsbest among baselines in terms of effectiveness metrics, but its number of recommended drugs istoo large, and the DDI Rate is also a bit high.
Our DrugRec outperforms all the baselines, where
DrugRec-k performs better than DrugRec-a. This means that simply compressing the representationof all previous visits cannot obtain the best performance.
The highest effectiveness metrics show thatour multi-visit causal drug recommendation can indeed make drug recommendation more accurate,and the lowest average DDI Rate indicates that our controllable DDI with 2-SAT works.
To test thesignificance and robustness of our metrics, we conduct a two-sample T-test on each metric betweenour method and each baseline.
The results in Table 1 are obtained through 10 rounds of bootstrappingsampling on the test set, and the standard deviation with p -values are reported in Appendix C. Ourmethod performs best significantly on both effectiveness metrics and DDI Rate, with all p -valuesbelow 0.01 for each metric in each baseline.
Ablation Study.
In order to verify the effectiveness of the individual components (symptominformation, causal view for drug recommendation, multi-visit causal drug recommendation andcontrollable DDI with 2-SAT ) in our model, we design different model variants for ablation analysisin Table 2.
We have the following four model variants.
(1) DrugRec (w/o sypt.) is implementedwithout applying any symptom information.
This general discriminative model is equivalent toremoving both C and S from the graph in Figure 1, and its performance is the poorest in comparison.(2) When we add the symptom information to DrugRec (w/o sypt.) and obtain DrugRec (w/o L ate ), allthe metric results are better than before.
It indicates that utilizing the necessary symptom informationwill significantly help the effectiveness of drug recommendations.
(3) DrugRec (single) modelsthe single-visit causal effect in the recommendation with the causal view of drug recommendation.
The metric results of Jaccard and F1 have improved compared to the previous model.
However,compared to the full model, DrugRec (single) performs worse on all metrics since it ignores thepatient’s historical health condition.
Overall, it demonstrates the effectiveness of the causal view fordrug recommendation and multi-visit causal drug recommendation.
(4) DrugRec (w/o sat) removethe module of controllable DDI with 2-SAT.
The DDI Rate and the number of drugs are significantly larger than all the model variants.
This confirms that our 2-SAT algorithm is indeed effective forcontrolling DDI Rate.
[Table]
[Table]
[Table]
Multi-Visit Analysis for DrugRec-k. To furtherinvestigate the impact of the different number of pastvisits for DrugRec-k, we conduct a comparative experiment with different values of k on MIMIC-III.
We consider the case where k takes values from 0 to3, and k = 0 corresponds to the single-visit scenario.
Table 3 shows the results of effectiveness metrics fordifferent k .
The model performance of DrugRec-kis optimal
when k = 2 .
All effectiveness metricsincrease as k increases from 0 to 2, and drop a littlewhen k = 3 .
Since the value of k is related to the assumption of the impact of the patient’s past healthcondition on the current drug prescribing, we analyze the above results from two perspectives.
On theone hand, it suggests that too old information recorded in the historical visits may not be instructiveor even misleading for the current prescribing.
The most useful historical information is in the lasttwo visits.
On the other hand, the average visits for all patients in MIMIC-III is 2.59, with very fewpatients having over 3 visits.
This also shows that the k should not be too high.
Conclusion
This work focuses on three essential aspects of the drug recommendation task and proposes novelmodels to enhance them.
We first design a causal graphical model for the drug recommendationtask and deconfound the effect of the invisible recommendation bias with front-door adjustment.
Tobetter model a patient’s historical health condition, we further characterize two modeling schemesthat extend the causal graph to the multi-visit scenario.
We also propose a novel 2-SAT algorithmto coordinate multiple drugs with DDIs.
Comprehensive experimental results on MIMIC-III/IVdatasets show that our method significantly outperforms all baselines on the effectiveness metrics andsuccessfully controls harmful DDI relations.
We hope this method could help improve the efficiencyand accuracy of the real-world drug prescribing process in hospital and benefit the public health aswell as well-being.
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] See Section Abstract and Introduction.
(b) Did you describe the limitations of your work?
[Yes] See Section Experiments.
(c) Did you discuss any potential negative societal impacts of your work?
[No]
(d) Have you read the ethics review guidelines and ensured that your paper conforms tothem?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes] See Section
Experiments.
(b) Did you include complete proofs of all theoretical results?
[Yes] See Section
Our
Method.
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main ex-
perimental results (either in the supplemental material or as a URL)?
[Yes] See thesupplemental material.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] See Section Experiments and the supplemental material.
(c) Did you report error bars (e.g., with respect to the random seed after running ex-
periments multiple times)?
[Yes] See Section Experiments and the supplementalmaterial.
(d) Did you include the total amount of compute and the type of resources used (e.g., typeof GPUs, internal cluster, or cloud provider)?
[Yes] See the supplemental material.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a)
If your work uses existing assets, did you cite the creators?
[Yes] .
(b) Did you mention the license of the assets?
[No] Limited by space, we don’t mentionlicense, but we got permission for the datasets.
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes]
(d) Did you discuss whether and how consent was obtained from people whose data
you’re using/curating?
[No] Limited by space, we don’t mention license, but we got permission for the datasets.
(e) Did you discuss whether the data you are using/curating contains personally identifiable
information or offensive content?
[N/A] .
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if
applicable?
[N/A] .
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A] .
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A] .