arXiv is now an independent nonprofit! Learn more
License: CC BY-NC-SA 4.0
arXiv:1809.01852v3 [cs.AI] 07 Mar 2019

GAMENet: Graph Augmented MEmory Networks for Recommending Medication Combination

Junyuan Shang Affiliation:  Key Laboratory of Machine Perception, Ministry of Education, Beijing, China Affiliation:  School of EECS, Peking University, Beijing, China    Cao Xiao Affiliation:  IBM Research    Tengfei Ma Affiliation:  IBM Research    Hongyan Li Affiliation:  Key Laboratory of Machine Perception, Ministry of Education, Beijing, China Affiliation:  School of EECS, Peking University, Beijing, China    Jimeng Sun Affiliation:  Georgia Institute of Technologysjy1203@pku.edu.cn, cxiao@us.ibm.com, Tengfei.Ma1@ibm.com, lihy@cis.pku.edu.cn, jsun@cc.gatech.edu
Abstract

Recent progress in deep learning is revolutionizing the healthcare domain including providing solutions to medication recommendations, especially recommending medication combination for patients with complex health conditions. Existing approaches either do not customize based on patient health history, or ignore existing knowledge on drug-drug interactions (DDI) that might lead to adverse outcomes. To fill this gap, we propose the Graph Augmented Memory Networks (GAMENet), which integrates the drug-drug interactions knowledge graph by a memory module implemented as a graph convolutional networks, and models longitudinal patient records as the query. It is trained end-to-end to provide safe and personalized recommendation of medication combination. We demonstrate the effectiveness and safety of GAMENet by comparing with several state-of-the-art methods on real EHR data. GAMENet outperformed all baselines in all effectiveness measures, and also achieved 3.60%3.60\% DDI rate reduction from existing EHR data.

Introduction

Today abundant health data such as longitudinal electronic health records (EHR) enables researchers and doctors to build better computational models for recommending accurate diagnoses and effective treatments. Medication recommendation algorithms have been developed to assist doctors in making effective and safe medication prescriptions. A series of deep learning methods have been designed for medication recommendation. There are mainly two types of such methods: 1) Instance-based medication recommendation models that perform recommendation based only on the current encounter and do not consider the longitudinal patient history, see  [\citeauthoryearZhang et al.2017, \citeauthoryearWang et al.2017]. As a result, a patient with newly diagnosed hypertension will likely be treated the same as another patient who has suffered chronic uncontrolled hypertension. Such a limitation affects accuracy and utility of the recommendations. 2) Longitudinal medication recommendation methods such as  [\citeauthoryearChoi et al.2016b, \citeauthoryearChoi et al.2016a, \citeauthoryearLipton et al.2015, \citeauthoryearLe, Tran, and Venkatesh2018] that leverage the temporal dependencies within longitudinal patient history to predict future medication. However, to our best knowledge, none of them considers drug safety in their modeling, especially ignoring the adverse drug-drug interactions (DDI) which are harder to prevent than single drug adverse reaction. Drugs may interact when they are prescribed and taken together, thus DDIs are common among patients with complex health conditions. Preventing DDIs is important since they could lead to health deterioration or even death.

To fill the gap, we propose Graph Augmented Memory Networks (GAMENet), an end-to-end deep learning model that takes both longitudinal patient EHR data and drug knowledge base on DDIs as inputs and aims to generate effective and safe recommendation of medication combination. In particular, GAMENet consists of 1) patient queries based on representations learned by a dual recurrent neural networks (Dual-RNN), and 2) an integrative and dynamic graph augmented memory module. It builds and fuses across multiple data sources (drug usage information from EHR and DDI knowledge from drug knowledge base [\citeauthoryearTatonetti et al.2012b]) with graph convolutional networks (GCN) [\citeauthoryearKipf and Welling2017] in Memory Bank (MB). The knowledge of combined uses of medications and drug-drug interaction relations are thus integrated. It further writes patient history to dynamic memory (DM) in key-value form, which mimics case-based retrievals in clinical practice, i.e., considering similar patient representations from the DM. Information from the graph augmented memory module can be retrieved by patient representation as query to generate memory outputs. Then, memory outputs and query will be concatenated to make effective and safe recommendations. GAMENet is optimized to balance between effectiveness and safety by combining multi-label prediction loss from EHR data and DDI loss for DDI knowledge.

To summarize, our work has the following contributions:

  • We jointly model the longitudinal patient records as an EHR graph and drug knowledge base as a DDI graph in order to provide effective and safe medication recommendations. This is achieved by optimizing a combined loss that balances between multi-label prediction loss (for effectiveness) and DDI loss (for safety).

  • We propose graph augmented memory networks which embed multiple knowledge graphs using a late-fusion mechanism based GCN into the memory component and enable attention-based memory search using query generated from longitudinal patient records.

  • We demonstrate the effectiveness and safety of our model by comparing with several state-of-the-art methods on real EHR data. GAMENet outperformed all baselines in effectiveness measures, and achieved 3.60%3.60\% DDI rate reduction from existing EHR data (i.e., identify and reduce existing DDI cases compared with raw EHR data).

Related Works

Memory Augmented Neural Networks

(MANN) have shown initial successes in NLP research areas such as question answering  [\citeauthoryearWeston, Chopra, and Bordes2015, \citeauthoryearSukhbaatar et al.2015, \citeauthoryearMiller et al.2016, \citeauthoryearKumar et al.2016]. Memory Networks  [\citeauthoryearWeston, Chopra, and Bordes2015] and Differentiable Neural Computers (DNC) [\citeauthoryearGraves et al.2016] proposed to use external memory components to assist the deep neural networks in remembering and storing things. After that, various MANN based models have been proposed such as  [\citeauthoryearSukhbaatar et al.2015, \citeauthoryearKumar et al.2016, \citeauthoryearMiller et al.2016]. In healthcare, memory networks can be valuable due to their capacities in memorizing medical knowledge and patient history. DMNC [\citeauthoryearLe, Tran, and Venkatesh2018] proposed a MANN model for medication combination recommendation task using EHR data alone. In this paper, we use memory component to fuse multi-model graphs as memory bank to facilitate recommendation.

Graph Convolutional Networks (GCN)

emerged for inducing informative latent feature representations of nodes from arbitrary graphs [\citeauthoryearKipf and Welling2017, \citeauthoryearDefferrard, Bresson, and Vandergheynst2016, \citeauthoryearHamilton, Ying, and Leskovec2017, \citeauthoryearChen, Ma, and Xiao2018]. GCN models learn node embeddings in the following manner: Given each graph node initially attached with a feature vector, the embedding vector of each node are the transformed weighted sum of the feature vectors of its neighbors. All nodes are simultaneously updated to perform a layer of forward propagation. The deeper the network, the larger the local neighborhood. Thus global information is disseminated to each graph node for learning better node embeddings. GCNs haven been successfully used to model biomedical n etworks such as drug-drug interaction (DDI) graphs. For example,  [\citeauthoryearMa et al.2018] models each drug as a node and DDIs as node labels in the drug association network and extended the GCN to embed multi-view drug features and edges. [\citeauthoryearZitnik, Agrawal, and Leskovec2018] used GCN to model the drug interaction problems by constructing a large two-layer multimodal drug interaction graphs. In this paper, we use GCN to model medication as nodes and DDIs as links.

Medication Combination Recommendation

could be categorized into instance-based and longitudinal medication recommendation methods. Instance-based methods focus on current health conditions. Among them, Leap [\citeauthoryearZhang et al.2017] formulates a multi-instance multi-label learning framework and proposes a variant of sequence-to-sequence model based on content-attention mechanism to predict combination of medicines given patient’s diagnoses. Longitudinal-based methods leverage the temporal dependencies among clinical events, see  [\citeauthoryearChoi et al.2016b, \citeauthoryearChoi et al.2016a, \citeauthoryearLipton et al.2015, \citeauthoryearLe, Tran, and Venkatesh2018, \citeauthoryearXiao, Choi, and Sun2018]. Among them, RETAIN [\citeauthoryearChoi et al.2016b] is based on a two-level neural attention model which detects influential past visits and significant clinical variables within those visits. DMNC [\citeauthoryearLe, Tran, and Venkatesh2018] highlighted the memory component to enhance the memory ability of recurrent neural networks and combined DNC with RNN encoder-decoder to predict medicines based on patient’s history records which has shown high accuracy. However, safety issue is often ignored by longitudinal-based methods. In this work, we design a memory component but target at building a structured graph augmented memory, where we not only embed DDI knowledge but also design a DDI loss to reduce DDI rate.

Method

Problem Formulation

Definition 1 (Patient Records).

In longitudinal EHR data, each patient can be represented as a sequence of multivariate observations: 𝑷(n)=[𝒙1(n),𝒙2(n),,𝒙T(n)(n)]\bm{P}^{(n)}=[\bm{x}_{1}^{(n)},\bm{x}_{2}^{(n)},\cdots,\bm{x}_{T^{(n)}}^{(n)}] where n{1,2,,N}n\in\{1,2,\ldots,N\}, NN is the total number of patients; T(n)T^{(n)} is the number of visits of the nthn^{th} patient. To reduce clutter, we will describe the algorithms for a single patient and drop the superscript (n)(n) whenever it is unambiguous. Each visit 𝒙t=[𝒄dt,𝒄pt,𝒄mt]\bm{x}_{t}=[\bm{c}_{d}^{t},\bm{c}_{p}^{t},\bm{c}_{m}^{t}] of a patient is concatenation of corresponding diagnoses codes 𝒄dt\bm{c}_{d}^{t}, procedure codes 𝒄pt\bm{c}_{p}^{t} and medications codes 𝒄mt\bm{c}_{m}^{t}. For simplicity, we use 𝒄t\bm{c}_{\ast}^{t} to indicate the unified definition for different type of medical codes. 𝒄t{0,1}|𝒞|\bm{c}_{\ast}^{t}\in\{0,1\}^{|\mathcal{C}_{\ast}|} is a multi-hot vector, where 𝒞\mathcal{C}_{\ast} denotes the medical code set and |𝒞||\mathcal{C}_{\ast}| the size of the code set.

Definition 2 (EHR&DDI Graph).

EHR graph and DDI graph can be denoted as Ge={𝒱,e}G_{e}=\{\mathcal{V},\mathcal{E}_{e}\} and Gd={𝒱,d}G_{d}=\{\mathcal{V},\mathcal{E}_{d}\} respectively, where node set 𝒱=𝒞m={cm1,cm2,,cmn}\mathcal{V}=\mathcal{C}_{m}=\{c_{m_{1}},c_{m_{2}},\cdots,c_{m_{n}}\} represents the set of medications, e\mathcal{E}_{e} is the edge set of known combination medication in EHR database and d\mathcal{E}_{d} is the edge set of known DDIs between a pair of drugs. Adjacency matrix 𝑨e,𝑨d|𝒞m|×|𝒞m|\bm{A}_{e},\bm{A}_{d}\in\mathbb{R}^{|\mathcal{C}_{m}|\times|\mathcal{C}_{m}|} are defined to clarify the construction of edge e,d\mathcal{E}_{e},\mathcal{E}_{d}. For 𝑨e\bm{A}_{e}, we firstly create a bipartite graph with drug on one side and drug combination on the other side. Then 𝑨e=𝑨b𝑨b\bm{A}_{e}=\bm{A}_{b}\bm{A}_{b}^{\intercal} where 𝑨b|𝒞m|×l\bm{A}_{b}\in\mathbb{R}^{|\mathcal{C}_{m}|\times l} is the adjacency matrix of the bipartite graph, 𝑨b[i,j]=1\bm{A}_{b}[i,j]=1 when ithi^{th} medication exists in jthj^{th} medications combination and the number of unique medications combination denotes as ll. For 𝑨d\bm{A}_{d}, only pair-wise drug-drug interactions are considered, 𝑨d[i,j]=1\bm{A}_{d}[i,j]=1 when the ithi^{th} medication has interaction with the jthj^{th} one.

Problem 1 (Medication Combination Recommendation).

Given medical codes of the current visit at time tt (excluding medication codes) 𝒄dt,𝒄pt\bm{c}_{d}^{t},\bm{c}_{p}^{t}, patient history 𝑷=[𝒙1,𝒙2,,𝒙t1]\bm{P}=[\bm{x}_{1},\bm{x}_{2},\cdots,\bm{x}_{t-1}] and EHR graph GeG_{e}, and DDI graph GdG_{d}, we want to recommend multiple medications by generating multi-label output 𝒚^t{0,1}|𝒞m|\hat{\bm{y}}_{t}\in\{0,1\}^{|\mathcal{C}_{m}|}.

Table 1: Notations used in GAMENet
Notation Description
𝑷|𝒞|×T\bm{P}\in\mathbb{R}^{|\mathcal{C}|\times T} patient records
𝒞\mathcal{C}_{\ast} medical codes set of type \ast
c,ic_{\ast,i} ithi^{th} medical code in 𝒞\mathcal{C}_{\ast} of type \ast
𝒄|𝒞|\bm{c}_{\ast}\in\mathbb{R}^{|\mathcal{C}_{\ast}|} multi-hot vector of type \ast
𝒙t|𝒞|\bm{x}_{t}\in\mathbb{R}^{|\mathcal{C}|} concatenation of medical codes 𝒄t\bm{c}_{\ast}^{t}
GG_{\ast} EHR or DDI Graph {𝒱,}\{\mathcal{V},\mathcal{E}_{\ast}\}
𝒱\mathcal{V} vertex set same as 𝒞m\mathcal{C}_{m}
\mathcal{E}_{\ast} edge set of \ast dataset
𝒆d\bm{e}_{\ast}\in\mathbb{R}^{d} medical embeddings of type \ast
𝒉d\bm{h}_{\ast}\in\mathbb{R}^{d} hidden state
𝒒td\bm{q}^{t}\in\mathbb{R}^{d} query at ttht^{th} visit
𝑨b|𝒞m|×l\bm{A}_{b}\in\mathbb{R}^{|\mathcal{C}_{m}|\times l} adjacency matrix of bipartite graph
𝑨e|𝒞m|×|𝒞m|\bm{A}_{e}\in\mathbb{R}^{|\mathcal{C}_{m}|\times|\mathcal{C}_{m}|} adjacency matrix of GeG_{e}
𝑨d|𝒞m|×|𝒞m|\bm{A}_{d}\in\mathbb{R}^{|\mathcal{C}_{m}|\times|\mathcal{C}_{m}|} adjacency matrix of GdG_{d}
𝑴b|𝒞m|×d\bm{M}_{b}\in\mathbb{R}^{|\mathcal{C}_{m}|\times d} Memory Bank (MB)
𝑴dt|t1|×(d+|𝒞m|)\bm{M}_{d}^{t}\in\mathbb{R}^{|t-1|\times(d+|\mathcal{C}_{m}|)} Dynamic Memory (DM)
𝑴d,kt|t1|×d\bm{M}_{d,k}^{t}\in\mathbb{R}^{|t-1|\times d} Keys in DM
𝑴d,vt|t1|×|𝒞m|\bm{M}_{d,v}^{t}\in\mathbb{R}^{|t-1|\times|\mathcal{C}_{m}|} Values in DM
𝒂ct|𝒞m|\bm{a}_{c}^{t}\in\mathbb{R}^{|\mathcal{C}_{m}|} content-attention weight
𝒂st|t1|\bm{a}_{s}^{t}\in\mathbb{R}^{|t-1|} temporal-attention weight
𝒂mt|𝒞m|\bm{a}_{m}^{t}\in\mathbb{R}^{|\mathcal{C}_{m}|} history medication distribution
𝒐td\bm{o}_{\ast}^{t}\in\mathbb{R}^{d} memory output
𝒚^t|𝒞m|\hat{\bm{y}}_{t}\in\mathbb{R}^{|\mathcal{C}_{m}|} multi-label predictions at ttht^{th} visit
Y^\hat{Y} recommended medication set
YY ground truth of medication set

The GAMENet

Figure 1: The GAMENet: At current ttht^{th} visit, the multi-hot input 𝒄dt,𝒄pt\bm{c}_{d}^{t},\bm{c}_{p}^{t} are input into Embedding Networks to generate embedding 𝒆dt,𝒆pt\bm{e}_{d}^{t},\bm{e}_{p}^{t} using Eq. 1. Then Dual-RNN generates current hidden states 𝒉dt,𝒉pt\bm{h}_{d}^{t},\bm{h}_{p}^{t} by accepting both embeddings from Embeddings Network and longitudinal hidden state 𝒉t1\bm{h}^{t-1} of RNN denoted by return arrow described in Eq. 2. We use concatenated 𝒉dt,𝒉pt\bm{h}_{d}^{t},\bm{h}_{p}^{t} as query 𝒒t\bm{q}^{t} (a.k.a. patient representation) in Eq. 3 to output 𝒐bt\bm{o}_{b}^{t} by reading from Memory Bank (MB) 𝑴b\bm{M}_{b} in Eq. 7 generated from late-fusion based multiple knowledge graph in Eq.45. Meantime, the Dynamic Memory (DM) stores key-value form history information along time by Eq. 6 and can be used to generate 𝒐dt\bm{o}_{d}^{t} in Eq. 7. Finally, query and memory outputs are concatenated in Eq. 8 to make recommendation. In training phase, combined loss Eq. 10 is optimized to find optimal model parameters.

As illustrated in Fig. 1, GAMENet includes the following components: a medical embedding module, a patient representation module, and a graph augmented memory module. Next we will first introduce these modules and then provide details of training and inference of GAMENet.

Medical Embeddings Module

As mentioned before, a visit 𝒙t\bm{x}_{t} consists of [𝒄dt,𝒄pt,𝒄mt][\bm{c}_{d}^{t},\bm{c}_{p}^{t},\bm{c}_{m}^{t}] where each of 𝒄t\bm{c}_{\ast}^{t} is a multi-hot vector at the ttht^{th} visit. The multi-hot vector 𝒄t\bm{c}_{\ast}^{t} is binary encoded showing the existence of each medical codes recorded at the ttht^{th} visit. Like [\citeauthoryearChoi et al.2016b] used a linear embedding of the input vector, we derive medical embeddings for 𝒄dt,𝒄pt\bm{c}_{d}^{t},\bm{c}_{p}^{t} separately at the ttht^{th} visit as follows:

𝒆t=𝑾,e𝒄t\bm{e}_{\ast}^{t}=\bm{W}_{\ast,e}\bm{c}_{\ast}^{t} (1)

where 𝑾,e|𝒞|×d\bm{W}_{\ast,e}\in\mathbb{R}^{|\mathcal{C}_{\ast}|\times d} is the embedding matrix to learn. Thus a visit 𝒙t\bm{x}_{t} is transformed to 𝒙^t=[𝒆dt,𝒆pt,𝒄mt]\hat{\bm{x}}_{t}=[\bm{e}_{d}^{t},\bm{e}_{p}^{t},\bm{c}_{m}^{t}].

Patient Representation Module

To enable personalized medication recommendation which is tailored using patient EHR data, we design a Dual-RNN to learn patient representations from multimodal EHR data where each RNN encodes only one type of medical codes. The reason is that it is quite possible for a clinical visit to have missing modality (e.g. only diagnosis modality without procedure). Because of that, we model diagnosis and procedure modalities separately using two RNNs. Formally, for each input vector in transformed clinical history [𝒙1^,𝒙^2,,𝒙^t][\hat{\bm{x}_{1}},\hat{\bm{x}}_{2},\cdots,\hat{\bm{x}}_{t}], we retrieve 𝒆m,𝒆p\bm{e}_{m},\bm{e}_{p} and utilize RNN to encode visit-level diagnosis and procedure embeddings respectively as follows:

𝒉dt\displaystyle\bm{h}_{d}^{t} =RNNd(𝒆d1,𝒆d2,,𝒆dt)\displaystyle=RNN_{d}(\bm{e}_{d}^{1},\bm{e}_{d}^{2},\cdots,\bm{e}_{d}^{t}) (2)
𝒉pt\displaystyle\bm{h}_{p}^{t} =RNNp(𝒆p1,𝒆p2,,𝒆pt)\displaystyle=RNN_{p}(\bm{e}_{p}^{1},\bm{e}_{p}^{2},\cdots,\bm{e}_{p}^{t})

Thus, the RNNs accept all patient history visit medical embeddings {𝒆t}(tt)\{\bm{e}_{\ast}^{t^{\prime}}\}(t^{\prime}\leq t) to produce hidden states 𝒉t\bm{h}_{\ast}^{t} for further generating query (a.k.a. patient representation) in Eq. 3.

Graph Augmented Memory Module

To leverage drug knowledge, we construct a graph augmented memory module that not only embeds and stores the EHR graph and the DDI graph as facts in Memory Bank (MB), but also inserts patient history to Dynamic Memory (DM) key-value form to fully capture the information from different views. Inspired by  [\citeauthoryearWeston, Chopra, and Bordes2015], four memory components I, G, O, R are proposed which mimics the architecture of modern computer in some way:

  • I: Input memory representation converts inputs into query for memory reading. Here we can use hidden states from Dual-RNN to generate query as follows:

    𝒒t=f([𝒉dt,𝒉pt])\displaystyle\bm{q}^{t}=f([\bm{h}_{d}^{t},\bm{h}_{p}^{t}]) (3)

    where we concatenate hidden diagnosis state 𝒉dt\bm{h}_{d}^{t} and procedure state 𝒉𝒑t\bm{h_{p}}^{t} as the input patient health state. f()f(\cdot) is the transform function which projects hidden states to query and is implemented as single hidden layer fully connected neural network.

  • G: Generalization is the process of generating and updating the memory representation. We design the memory module by storing graph augmented memory representation as facts in Memory Bank (MB) and insert patient history to Dynamic Memory (DM) as key-value pairs to fully capture the information from different view.

    For Memory Bank (MB) 𝑴b\bm{M}_{b}, two adjacency matrices 𝑨e,𝑨d\bm{A}_{e},\bm{A}_{d} are used. Following the GCN procedure  [\citeauthoryearKipf and Welling2017], each 𝑨\bm{A}_{\ast} is preprocessed as follows:

    𝑨~=𝑫~12(𝑨+𝑰)𝑫~12\displaystyle\tilde{\bm{A}}_{\ast}=\tilde{\bm{D}}^{-\frac{1}{2}}(\bm{A}_{\ast}+\bm{I})\tilde{\bm{D}}^{-\frac{1}{2}} (4)

    where 𝑫~\tilde{\bm{D}} is a diagonal matrix such that 𝑫~ii=j𝑨ij\tilde{\bm{D}}_{ii}=\sum_{j}\bm{A}_{ij} and 𝑰\bm{I} are identity matrices.

    Then we applied a two-layer GCN on each graph to learn improved embeddings on drug combination usage and DDIs respectively. The output 𝑴b\bm{M}_{b} is generated as a weighted sum of the two graph embeddings.

    𝒁1\displaystyle\bm{Z}_{1} =𝑨~etanh(𝑨~e𝑾e1)𝑾1\displaystyle=\tilde{\bm{A}}_{e}\text{tanh}(\tilde{\bm{A}}_{e}\bm{W}_{e1})\bm{W}_{1} (5)
    𝒁2\displaystyle\bm{Z}_{2} =𝑨~dtanh(𝑨~d𝑾e2)𝑾2\displaystyle=\tilde{\bm{A}}_{d}\text{tanh}(\tilde{\bm{A}}_{d}\bm{W}_{e2})\bm{W}_{2}
    𝑴b\displaystyle\bm{M}_{b} =𝒁1β𝒁2\displaystyle=\bm{Z}_{1}-\beta\bm{Z}_{2}

    where 𝑾e1\bm{W}_{e1}, 𝑾e2|𝒞m|×d\bm{W}_{e2}\in\mathbb{R}^{|\mathcal{C}_{m}|\times d} are medication embeddings from EHR graph and DDI graph (each contains |𝒞m||\mathcal{C}_{m}| number of d-dimensional vectors), 𝑾1\bm{W}_{1}, 𝑾2d×d\bm{W}_{2}\in\mathbb{R}^{d\times d} are hidden weight parameter matrices. All 𝑾\bm{W}_{\ast} are updated during training phase. Then, graph node embeddings 𝒁1\bm{Z}_{1}, 𝒁2|𝒞m|×d\bm{Z}_{2}\in\mathbb{R}^{|\mathcal{C}_{m}|\times d} are generated using GCN. Finally we combine different node embeddings as Memory Bank 𝑴b|𝒞m|×d\bm{M}_{b}\in\mathbb{R}^{|\mathcal{C}_{m}|\times d} where β\beta is a weighting variable to fuse different knowledge graphs.

    For Dynamic Memory (DM) 𝑴dt\bm{M}_{d}^{t}, the combined patient {𝒒t}(t<t)\{\bm{q}^{t^{\prime}}\}(t^{\prime}<t) (the keys) associated with corresponding multi-hot medication vector {𝒄mt}\{\bm{c}_{m}^{t^{\prime}}\} (the values) are inserted into DM as key-value pairs. This kind of design provides a way to locate most similar patient representation over time and retrieve the proper weighted medications set. Specifically, we can incrementally insert key-value pair after each visit step and treat 𝑴dt\bm{M}_{d}^{t} as a vectorized indexable dictionary as follows:

    𝑴dt={𝒒t:𝒄mt}1t1\bm{M}_{d}^{t}=\{\bm{q}^{t^{\prime}}\colon\bm{c}_{m}^{t^{\prime}}\}_{1}^{t-1} (6)

    where 𝑴dt\bm{M}_{d}^{t} is empty when t=1t=1. For clarity, we use 𝑴d,kt=[𝒒1;𝒒2;;𝒒t1]|t1|×d\bm{M}_{d,k}^{t}=[\bm{q}^{1};\bm{q}^{2};\cdots;\bm{q}^{t-1}]\in\mathbb{R}^{|t-1|\times d} to denote the key vectors and 𝑴d,vt=[𝒄m1;𝒄m2;;𝒄mt1]|t1|×|𝒞m|\bm{M}_{d,v}^{t}=[\bm{c}_{m}^{1};\bm{c}_{m}^{2};\cdots;\bm{c}_{m}^{t-1}]\in\mathbb{R}^{|t-1|\times|\mathcal{C}_{m}|} to denote the value vectors at ttht^{th} visit.

  • O: Output memory representation produces outputs 𝒐bt\bm{o}_{b}^{t} and 𝒐dt\bm{o}_{d}^{t} given the patient representation 𝒒t\bm{q}^{t} (the query) and the current memory state 𝑴b,𝑴dt\bm{M}_{b},\bm{M}_{d}^{t}. Here, we apply attention based reading procedure to retrieve most relevant information with respect to query 𝒒t\bm{q}^{t} as outputs 𝒐bt,𝒐dt\bm{o}_{b}^{t},\bm{o}_{d}^{t} as follows:

    𝒐bt\displaystyle\bm{o}_{b}^{t} =𝑴bSoftmax(𝑴b𝒒t)𝒂ct\displaystyle=\bm{M}_{b}^{\intercal}\overbrace{\text{Softmax}(\bm{M}_{b}\bm{q}^{t})}^{\bm{a}_{c}^{t}} (7)
    𝒐dt\displaystyle\bm{o}_{d}^{t} =𝑴b(𝑴d,vt)Softmax(𝑴d,kt𝒒t)𝒂st𝒂mt\displaystyle=\bm{M}_{b}^{\intercal}\overbrace{({\bm{M}_{d,v}^{t}})^{\intercal}\underbrace{\text{Softmax}(\bm{M}_{d,k}^{t}\bm{q}^{t})}_{\bm{a}_{s}^{t}}}^{\bm{a}_{m}^{t}}

    where 𝒐btd\bm{o}_{b}^{t}\in\mathbb{R}^{d} is directly retrieved using content-attention 𝒂ct\bm{a}_{c}^{t} based on similarity between patient representation (query) and facts in 𝑴b\bm{M}_{b}.

    For 𝒐dtd\bm{o}_{d}^{t}\in\mathbb{R}^{d}, it firstly considers similar patient representation from patient history records 𝑴d,kt\bm{M}_{d,k}^{t} with temporal-attention 𝒂st\bm{a}_{s}^{t}. Then 𝒂st\bm{a}_{s}^{t} is utilized to generate history medication distribution 𝒂mt\bm{a}_{m}^{t} by weighted sum of history multi-hot medication in 𝑴d,vt\bm{M}_{d,v}^{t}. Finally, we can get 𝒐dt\bm{o}_{d}^{t} by further retrieved information from 𝑴b\bm{M}_{b} using 𝒂mt\bm{a}_{m}^{t} from temporal aspect.

    In addition, the attention based reading procedure makes the model differentiable so that it can be updated end-to-end using back propagation.

  • R: Response is the final step to utilize patient representation and memory output to predict the multi-label medication as follows:

    𝒚^t=σ([𝒒t,𝒐bt,𝒐dt])\displaystyle\hat{\bm{y}}_{t}=\sigma([\bm{q}^{t},\bm{o}_{b}^{t},\bm{o}_{d}^{t}]) (8)

    where σ\sigma is the sigmoid function.

Training and Inference

In the training phase, we need to find the optimal parameters including embedding matrix 𝑾e1,𝑾e2,𝑾,e\bm{W}_{e1},\bm{W}_{e2},\bm{W}_{\ast,e}, weight parameter matrix 𝑾1,𝑾2\bm{W}_{1},\bm{W}_{2} in GCN, hidden weight in f(),RNNf(\cdot),\text{RNN} as auxiliary model parameter θ\theta. We introduce the combined loss in order to find an optimal balance between recommendation accuracy and safety. At the end of the part, training algorithm will be given.

Multi-label Prediction Loss (MLL) Since the medication combination recommendation can be seen as sequential multi-label prediction, we combine two commonly used multi-label loss functions, namely, the binary cross entropy loss bce\mathcal{L}_{bce} and the multi-label margin loss multi\mathcal{L}_{multi}. We use multi\mathcal{L}_{multi} since it optimizes to make the predicted probability of ground truth labels has at least 1 margin larger than others. Thus, threshold value in Equation. 11 is easier to be fixed.

bce=tTi𝒚itlogσ(𝒚^it)+(1𝒚it)log(1σ(𝒚^it))\displaystyle\mathcal{L}_{bce}=-\sum_{t}^{T}\sum_{i}\bm{y}_{i}^{t}\log\sigma(\hat{\bm{y}}_{i}^{t})+(1-\bm{y}_{i}^{t})\log(1-\sigma(\hat{\bm{y}}_{i}^{t}))
multi=tTi|𝒞m|j|Y^t|max(0,1(𝒚^t[Y^jt]𝒚^t[i]))L\displaystyle\mathcal{L}_{multi}=\sum_{t}^{T}\sum_{i}^{|\mathcal{C}_{m}|}\sum_{j}^{|\hat{Y}^{t}|}\frac{\max(0,1-(\hat{\bm{y}}_{t}[\hat{Y}_{j}^{t}]-\hat{\bm{y}}_{t}[i]))}{L}
p=π[0]Lbce+π[1]Lmulti\displaystyle\mathcal{L}_{p}=\pi[0]L_{bce}+\pi[1]L_{multi} (9)

where 𝒚^[i],𝒚^it\hat{\bm{y}}[i],\hat{\bm{y}}_{i}^{t} means the value at ithi^{th} coordinate at ttht^{th} visit, 𝒚^t[Y^jt]\hat{\bm{y}}^{t}[\hat{Y}_{j}^{t}] means jthj^{th} predicted label indexed by predicted label set Y^t\hat{Y}^{t} at ttht^{th} visit and 𝝅[]\bm{\pi}[\cdot] are the mixture weights (π[0],π[1]0\pi[0],\pi[1]\geq 0, π[0]+π[1]=1\pi[0]+\pi[1]=1).

DDI Loss (DDI) is designed to control DDIs in the recommendation.

DDI=tTi,j(𝑨d(𝒚^t𝒚^t))[i,j]\displaystyle\mathcal{L}_{DDI}=\sum_{t}^{T}\sum_{i,j}(\bm{A}_{d}\odot(\hat{\bm{y}}_{t}^{\intercal}\hat{\bm{y}}_{t}))[i,j]

where every element in 𝒚^t𝒚^tN×N\hat{\bm{y}}_{t}^{\intercal}\hat{\bm{y}}_{t}\in\mathbb{R}^{N\times N} gives the pair-wise probability of predicted result. \odot is the element-wise product. Intuitively, for two memory representation ii,jj, if ii jj combined to induce a DDI, then 𝑨d[i,j]=1\bm{A}_{d}[i,j]=1. Thus large pair-wise DDI probability will yield large DDI\mathcal{L}_{DDI}.

Combined Loss functions When training, the accuracy and DDI Rate often increase together. The reason is that drug-drug interactions also exist in real EHR data (ground truth medication set YY). Thus both the incorrectly predicted medications and correctly predicted medications may increase the DDI Rate. To achieve the accurate model with low DDI Rate ss we need to find the balance between MLL and DDI. Inspired by Simulated Annealing [\citeauthoryearKirkpatrick, Gelatt, and Vecchi1983], we can transform between NRL and MLL with a certain probability as follows:

={pif ssDDI,with prob. p=exp(ssTemp)if s>sp,with prob. p=1exp(ssTemp)if s>s\displaystyle\mathcal{L}=\begin{cases}\mathcal{L}_{p}&if\text{ }s^{\prime}\leq s\\ \mathcal{L}_{DDI},\text{with prob. }p=\exp(-\frac{s^{\prime}-s}{Temp})&if\text{ }s^{\prime}>s\\ \mathcal{L}_{p},\text{with prob. }p=1-\exp(-\frac{s^{\prime}-s}{Temp})&if\text{ }s^{\prime}>s\end{cases} (10)

on one hand, there will be high probability to use DDI\mathcal{L}_{DDI} when the DDI Rate ss^{\prime} of recommended medication set calculated in this step is larger than the expected DDI Rate ss. On the other hand, decay rate ϵ\epsilon applied on temperature TempϵTempTemp\leftarrow\epsilon Temp makes pp low when model becomes stable along training time. Current DDI Rate ss^{\prime} can be calculated using DDI Rate Equation (see Metrics in Experiments section below) without sum across all test samples. The idea to use combined loss like simulated annealing form helps the model find best combination of parameters to demonstrate effectiveness and safety in the meantime. In inference phase, thank to MLL, if the correctly predicted labels have at least 1 margin larger than others we can fix threshold value as 0.5. Then, the predicted label set corresponds to:

Y^t={𝒚^tj|𝒚^tj>0.5,1j||𝒞m||}.\displaystyle\hat{Y}_{t}=\{\hat{\bm{y}}_{t}^{j}|\hat{\bm{y}}_{t}^{j}>0.5,1\leq j\leq||\mathcal{C}_{m}||\}. (11)

The training algorithm is detailed as follows.

Algorithm 1 Training GAMENet
0:  Training set 𝑹\bm{R}, training epoches NN, mixture weight 𝝅\bm{\pi} in Eq. 9, expected DDI Rate ss, initial temperature TempTemp and weight decay ϵ\epsilon in Eq. 10;
 Calculate adjacency matrix 𝑨\bm{A}_{\ast};
 Using uniform distribution to initialize auxiliary model parameters θU(1,1)\theta\sim U(-1,1);
 Obtain Memory Bank 𝑴b\bm{M}_{b} using Eq. 45;
for i=1i=1 to N|𝑹|N\ast|\bm{R}| do
  Sample a patient 𝑷=[𝒙1,𝒙2,,𝒙Ti]\bm{P}=[\bm{x}_{1},\bm{x}_{2},\cdots,\bm{x}_{T_{i}}] from 𝑹\bm{R};
  Reset Dynamic Memory 𝑴d\bm{M}_{d};
  for t=1t=1 to TiT_{i} do
   Obtain medical embeddings 𝒆dt,𝒆pt\bm{e}_{d}^{t},\bm{e}_{p}^{t} in Eq. 1;
   Obtain Dual-RNN 𝒉dt,𝒉dt\bm{h}_{d}^{t},\bm{h}_{d}^{t} in Eq. 2;
   Generate patient representation 𝒒t\bm{q}^{t} in Eq. 3;
   Read from 𝑴b\bm{M}_{b} and 𝑴dt\bm{M}_{d}^{t} using attention weight 𝒂ct,𝒂st,𝒂mt\bm{a}_{c}^{t},\bm{a}_{s}^{t},\bm{a}_{m}^{t} and generate memory outputs 𝒐bt,𝒐dt\bm{o}_{b}^{t},\bm{o}_{d}^{t} in Eq. 7;
   Calculate medication prediction 𝒚t^\hat{\bm{y}_{t}} using Eq. 8;
   Generate 𝑴dt+1\bm{M}_{d}^{t+1} by inserting (𝒒t,𝒄mt)(\bm{q}^{t},\bm{c}_{m}^{t}) into 𝑴dt\bm{M}_{d}^{t} in Eq. 6;
  end for
  Evaluate and obtain DDI Rate ss^{\prime} of current patient;
  Update θ\theta by optimizing loss in Eq. 10 and decay TempϵTempTemp\leftarrow\epsilon Temp;
end for

Experiments

Experimental Setup

We evaluate GAMENet 11 1 https://github.com/sjy1203/GAMENet model by comparing against other baselines on recommendation accuracy and successful avoidance of DDI. All methods are implemented in PyTorch [\citeauthoryearPaszke et al.2017] and trained on an Ubuntu 16.04 with 8GB memory and Nvidia 1080 GPU.

Data Source

We used EHR data from MIMIC-III [\citeauthoryearJohnson et al.2016]. Here we select a cohort where patients have more than one visit. In practice, if we use all the drug codes in an EMR record, the medication set can be very large, each day in hospital, the doctor can prescribe several types of medications for the patient. Hence, we choose the set of medications prescribed by doctors during the first 24-hour as the first 24-hour is often the most critical time for patients to obtain correct treatment quickly. In addition, we used DDI knowledge from TWOSIDES dataset [\citeauthoryearTatonetti et al.2012a]. In this work, we keep the Top-40 severity DDI types and transform the drug coding from NDC to ATC Third Level for integrating with MIMIC-III. The statistics of the datasets are summarized in Table 2.

Table 2: Statistics of the Data
# patients 6,350
# clinical events 15,016
# diagnosis 1,958
# procedure 1,426
# medication 145
avg # of visits 2.36
avg # of diagnosis 10.51
avg # of procedure 3.84
avg # of medication 8.80
# medication in DDI knowledge base 123
# DDI types in knowledge base 40

Baselines

We consider the following baseline algorithms.

  • Nearest will simply recommend the same combination medications at previous visit for current visit (i.e., Y^t=Yt1\hat{Y}_{t}=Y_{t-1})

  • Logistic Regression (LR) is a logistic regression with L2 regularization. Here we represent the input data by sum of one-hot vector. Binary relevance technique  [\citeauthoryearLuaces et al.2012] is used to handle multi-label output.

  • Leap [\citeauthoryearZhang et al.2017] is an instance-based medication combination recommendation method.

  • RETAIN [\citeauthoryearChoi et al.2016b] can provide sequential prediction of medication combination based on a two-level neural attention model that detects influential past visits and significant clinical variables within those visits.

  • DMNC [\citeauthoryearLe, Tran, and Venkatesh2018] is a recent work of medication combination prediction via memory augmented neural network based on differentiable neural computers (DNC) [\citeauthoryearGraves et al.2016].

Metrics

To measure the prediction accuracy, we used Jaccard Similarity Score (Jaccard), Average F1 (F1) and Precision Recall AUC (PRAUC). Jaccard is defined as the size of the intersection divided by the size of the union of ground truth medications Yt(k)Y_{t}^{(k)} and predicted medications Y^t(k)\hat{Y}_{t}^{(k)}.

Jaccard=1kNtTk1kNtTk|Yt(k)Y^t(k)||Yt(k)Y^t(k)|\displaystyle\text{Jaccard}=\frac{1}{\sum_{k}^{N}\sum_{t}^{T_{k}}1}\sum_{k}^{N}\sum_{t}^{T_{k}}\frac{|Y_{t}^{(k)}\cap\hat{Y}_{t}^{(k)}|}{|Y_{t}^{(k)}\cup\hat{Y}_{t}^{(k)}|}

where NN is the number of patients in test set and TkT_{k} is the number of visits of the kthk^{th} patient. Average Precision (Avg-P) and Average Recall (Avg-R), and F1 are defined as:

Avg-Pt(k)\displaystyle\text{Avg-P}_{t}^{(k)} =|Yt(k)Y^t(k)||Yt(k)|,Avg-Rt(k)=|Yt(k)Y^t(k)||Y^t(k)|\displaystyle=\frac{|Y_{t}^{(k)}\cap\hat{Y}_{t}^{(k)}|}{|Y_{t}^{(k)}|},\ \text{Avg-R}_{t}^{(k)}=\frac{|Y_{t}^{(k)}\cap\hat{Y}_{t}^{(k)}|}{|\hat{Y}_{t}^{(k)}|}
F1=\displaystyle\text{F1}= 1kNtTk1kNtTk2×Avg-Pt(k)×Avg-Rt(k)Avg-Pt(k)+Avg-Rt(k)\displaystyle\frac{1}{\sum_{k}^{N}\sum_{t}^{T_{k}}1}\sum_{k}^{N}\sum_{t}^{T_{k}}\frac{2\times\text{Avg-P}_{t}^{(k)}\times\text{Avg-R}_{t}^{(k)}}{\text{Avg-P}_{t}^{(k)}+\text{Avg-R}_{t}^{(k)}}

where tt means the ttht^{th} visit and kk means the kthk^{th} patient in test dataset.

To measure medication safety, we define DDI Rate as percentage of medication recommendation that contain DDIs.

DDI Rate=kNtTki,j|{(ci,cj)Y^t(k)|(ci,cj)d}|kNtTki,j1\displaystyle\text{DDI Rate}=\frac{\sum_{k}^{N}\sum_{t}^{T_{k}}\sum_{i,j}|\{(c_{i},c_{j})\in\hat{Y}_{t}^{(k)}|(c_{i},c_{j})\in\mathcal{E}_{d}\}|}{\sum_{k}^{N}\sum_{t}^{T_{k}}\sum_{i,j}1}

where the set will count each medication pair (ci,cj)(c_{i},c_{j}) in recommendation set Y^\hat{Y} if the pair belongs to edge set d\mathcal{E}_{d} of the DDI graph. Here NN is the size of test dataset and TkT_{k} is the number of visits of the kthk^{th} patient.

The relative DDI Rate (\triangle DDI Rate %) is defined as the percentage of DDI rate change compared to DDI rate in EHR test dataset given DDI rate of the algorithm:

 DDI Rate %=DDI Rate - DDI Rate (EHR)DDI Rate (EHR)\triangle\text{ DDI Rate \%}=\frac{\text{DDI Rate - DDI Rate (EHR)}}{\text{DDI Rate (EHR)}}

Evaluation Strategies

We randomly divide the dataset into training, validation and testing set in a 2/3:1/6:1/62/3:1/6:1/6 ratio. For LR, we use the grid search technique over typical range of hyper-parameter to search the best hyperparameter values which result in L2 norm penalty with weight as 1.1. For our methods, the hyperparameters are adjusted on evaluation set which result in expected DDI Rate ss as 0.05, initial temperature TempTemp as 0.5, weight decay ϵ\epsilon as 0.85 and mixture weights 𝝅=[0.9,0.1]\bm{\pi}=[0.9,0.1]. For all deep learning based methods, we choose a gated recurrent unit (GRU) [\citeauthoryearCho et al.2014] as the implementation of RNN and utilize dropout [\citeauthoryearSrivastava et al.2014] with probability of an element to be zeroed as 0.4 on the output of embeddings. The embedding size and hidden layer size for GRU is set as 64 and 64 respectively, word and memory size for DMNC model is 64 and 16 which is the same as [\citeauthoryearLe, Tran, and Venkatesh2018]. Training is done through Adam [\citeauthoryearKingma and Ba2014] at learning rate 0.0002. We fix the best model on evaluation set within 40 epochs and report the performance in test set.

Results

Table 3: Performance Comparison of Different Methods. Note that the base DDI rate in EHR test data is 0.0777.
Methods DDI Rate \triangle DDI Rate % Jaccard PR-AUC F1 Avg # of Med. # of parameters
Nearest 0.0791 + 1.80%+\ 1.80\% 0.3911 0.3805 0.5465 14.77 -
LR 0.0786 + 1.16%+\ 1.16\% 0.4075 0.6716 0.5658 11.42 -
Leap 0.0532 - 31.53% 0.3844 0.5501 0.5410 14.42 436,884
RETAIN 0.0797 + 2.57%+\ 2.57\% 0.4168 0.6620 0.5781 16.68 289,490
DMNC 0.0949 + 22.14%+\ 22.14\% 0.4343 0.6856 0.5934 20.00 527,979
GAMENet (w/o DDI) 0.0853 + 9.78%+\ 9.78\% 0.4484 0.6878 0.6059 15.13 452,434
GAMENet 0.0749 - 3.60% 0.4509 0.6904 0.6081 14.02 452,434
Table 4: Example Recommended Medications for a Patient with Two Visits. Here “unseen” indicates the medications predicted but are not in ground truth, while “missed” refers to the medications that are in the ground truth but are not predicted.
Diagnosis Methods Recommended Medication Combination
1st Visit: Malignant neoplasm of brain Hyperlipidmia Gout Ground Truth N02B, A01A, A02B, A06A, B05C, A12C, C07A, C02D, N02A, B01A, C10A, J01D, N03A, A04A, H04A
Nearest 0 correct + 15 missed
LR 3 correct (N02B, A01A, A06A) + 12 missed
Leap 8 correct (N02B, A02B, A06A, A12C, C07A, B01A, C10A, A04A) + 7 missed
RETAIN 0 correct + 15 missed
DMNC 12 correct (N02B, A01A, A02B, A06A, B05C, A12C, C07A, C02D, N02A, B01A, C10A, N03A) + 6 unseen + 3 missed
GAMENet 11 correct (N02B, A01A, A02B, A06A, B05C, A12C, C07A, C02D, B01A, N03A, A04A) + 4 missed
2nd Visit: Malignant neoplasm of brain Cerebral Edema Hypercholesterolemia Gout Ground Truth N02B, A01A, A02B, A06A, B05C, A12C, C07A, C02D, N02A, B01A, J01D, N03A, N05A, A04A
Nearest 13 correct (N02B, A01A, A02B, A06A, B05C, A12C, C07A, C02D, N02A, B01A, J01D, N03A, A04A) + 2 unseen + 1 missed
LR 3 correct (N02B, A01A, A06A) + 11 missed
Leap 7 correct (N02B, A01A, A02B, A06A, B05C, A12C, B01A) + 2 unseen + 7 missed
RETAIN 10 correct (N02B, A01A, A02B, A06A, B05C, A12C, C07A, N02A, B01A, N03A) + 5 unseen + 4 missed
DMNC 12 correct (N02B, A01A, A02B, A06A, B05C, A12C, C07A, C02D, N02A, B01A, N03A, A04A) + 7 unseen + 2 missed
GAMENet 13 correct (N02B, A01A, A02B, A06A, B05C, A12C, C07A, C02D, N02A, B01A, J01D, N03A, A04A) + 1 unseen + 1 missed

Table 3 compares the performance on accuracy and safety issue. Results show GAMENet has the highest score among all baselines with respect to Jaccard, PR-AUC, and F1.

As for the baseline models, Nearest and LR achieved about 4% lower score compared to GAMENet in terms of Jaccard and F1. The Nearest method also gives us the clue that the visit is highly important for the medications combination recommendation task. For both methods, the DDI rates are very close to the base DDI rate in the EHR data. This implies without knowledge guidance that it will be hard to remove DDIs that already exist in clinical practice. For deep learning baselines, instance-based method Leap achieved lower performance than those temporal models such as RETAIN and DMNC, which confirmed the important of temporal information in patient past EHRs.

On the other hand, for longitudinal methods such as RETAIN and DMNC, they both achieve higher scores on Jaccard, PRAUC, and F1 compared with others. DMNC however recommends a large bunch of medication combination set which may be one reason that lead to high DDI Rate.

For our methods, we compare the GAMENet and its variant GAMENet (w/o DDI). Without DDI knowledge, GAMENet (w/o DDI) is also better than other methods which shows the overall framework does work. With DDI knowledge, both the performance and DDI rate are improved. The result is statistically significant using two-tailed t-test after ten runs of these two methods.

Case Study

We choose a patient from test dataset based on the consideration of demonstrating the model effect on harder cases: there are diagnoses and medications change among visits. As shown in Table. 4, the patient has 3 diagnoses for the 1st1^{st} visit and two extra diagnoses Cerabral Edema, Hypercholesterolemia for the 2nd2^{nd} visit. The ground truth medications prescribed by doctors and recommended medications by different methods are listed in the table. Overall, GAMENet performs the best with 11 correct, 13 correct medications for two visit respectively, only missed 4 and 1 medications and wrongly predict 1 (unseen) medication for 2nd2^{nd} visit. For Nearest and RETAIN methods, they lack the ability to recommend medication combination for 1st1^{st} visit. DMNC tries to recommend more medications which result in more wrongly predicted medications than other methods. To mention that, all methods except LR and GAMENet will recommend the combination of N02B (Analgesics and Antipyretics) and C10A (Lipid-modifying Agents), which can lead to harmful side effect such as Myoma. This harmful combination also existed in ground truth of the patient’s at 1st1^{st} visit. For the 2nd2^{nd} visit, C10A is removed from ground truth medications set, which may indicate doctors also try to correct their decision. Another pair of medications A01A (Stomatological Preparations) and N03A (Antiepileptic Drugs) exists in the ground truth of both visits. Their combined use could cause allergic bronchitis. Most methods including Nearest, RETAIN, DMNC recommend them. GAMENet also recommends them due to the trade off between effectiveness and safety.

Conclusion

In this work, we presented GAMENet, an end-to-end deep learning model that aims to generate effective and safe recommendations of medication combinations via memory networks whose memory bank is augmented by integrated drug usage and DDI graphs as well as dynamic memory based on patient history. Experimental results on real-world EHR showed that GAMENet outperformed all baselines in effectiveness measures, and achieved 3.60%3.60\% DDI rate reduction from existing EHR data. As we noticed the trade-off between effectiveness and safety measures, a possibly rewarding avenue of future research is to simultaneous recommend medication replacements that share the same indications of the harmful drugs but will not induce adverse DDIs.

Acknowledgment

This work was supported by Peking University Medicine Seed Fund for Interdisciplinary Research, the National Science Foundation, award IIS-1418511 and CCF-1533768, the National Institute of Health award 1R01MD011682-01 and R56HL138415. We would also like to thank Tianyi Tong, Shenda Hong and Yao Wang for helpful discussions.

References

  • [\citeauthoryearChen, Ma, and Xiao2018] Chen, J.; Ma, T.; and Xiao, C. 2018. FastGCN: Fast learning with graph convolutional networks via importance sampling. In International Conference on Learning Representations.
  • [\citeauthoryearCho et al.2014] Cho, K.; Van Merriënboer, B.; Bahdanau, D.; and Bengio, Y. 2014. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259.
  • [\citeauthoryearChoi et al.2016a] Choi, E.; Bahadori, M. T.; Schuetz, A.; Stewart, W. F.; and Sun, J. 2016a. Doctor ai: Predicting clinical events via recurrent neural networks. In Machine Learning for Healthcare Conference, 301–318.
  • [\citeauthoryearChoi et al.2016b] Choi, E.; Bahadori, M. T.; Sun, J.; Kulas, J.; Schuetz, A.; and Stewart, W. 2016b. Retain: An interpretable predictive model for healthcare using reverse time attention mechanism. In Advances in Neural Information Processing Systems, 3504–3512.
  • [\citeauthoryearDefferrard, Bresson, and Vandergheynst2016] Defferrard, M.; Bresson, X.; and Vandergheynst, P. 2016. Convolutional neural networks on graphs with fast localized spectral filtering. CoRR abs/1606.09375.
  • [\citeauthoryearGraves et al.2016] Graves, A.; Wayne, G.; Reynolds, M.; Harley, T.; Danihelka, I.; Grabska-Barwińska, A.; Colmenarejo, S. G.; Grefenstette, E.; Ramalho, T.; Agapiou, J.; et al. 2016. Hybrid computing using a neural network with dynamic external memory. Nature 538(7626):471.
  • [\citeauthoryearHamilton, Ying, and Leskovec2017] Hamilton, W. L.; Ying, R.; and Leskovec, J. 2017. Inductive representation learning on large graphs. CoRR abs/1706.02216.
  • [\citeauthoryearJohnson et al.2016] Johnson, A. E.; Pollard, T. J.; Shen, L.; Li-wei, H. L.; Feng, M.; Ghassemi, M.; Moody, B.; Szolovits, P.; Celi, L. A.; and Mark, R. G. 2016. Mimic-iii, a freely accessible critical care database. Scientific data 3:160035.
  • [\citeauthoryearKingma and Ba2014] Kingma, D. P., and Ba, J. 2014. Adam: A method for stochastic optimization. CoRR abs/1412.6980.
  • [\citeauthoryearKipf and Welling2017] Kipf, T. N., and Welling, M. 2017. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations.
  • [\citeauthoryearKirkpatrick, Gelatt, and Vecchi1983] Kirkpatrick, S.; Gelatt, C. D.; and Vecchi, M. P. 1983. Optimization by simulated annealing. science 220(4598):671–680.
  • [\citeauthoryearKumar et al.2016] Kumar, A.; Irsoy, O.; Ondruska, P.; Iyyer, M.; Bradbury, J.; Gulrajani, I.; Zhong, V.; Paulus, R.; and Socher, R. 2016. Ask me anything: Dynamic memory networks for natural language processing. In International Conference on Machine Learning, 1378–1387.
  • [\citeauthoryearLe, Tran, and Venkatesh2018] Le, H.; Tran, T.; and Venkatesh, S. 2018. Dual memory neural computer for asynchronous two-view sequential learning. In Proceedings of the 24rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 1637–1645. ACM.
  • [\citeauthoryearLipton et al.2015] Lipton, Z. C.; Kale, D. C.; Elkan, C.; and Wetzel, R. 2015. Learning to diagnose with lstm recurrent neural networks. arXiv preprint arXiv:1511.03677.
  • [\citeauthoryearLuaces et al.2012] Luaces, O.; Díez, J.; Barranquero, J.; del Coz, J. J.; and Bahamonde, A. 2012. Binary relevance efficacy for multilabel classification. Progress in Artificial Intelligence 1(4):303–313.
  • [\citeauthoryearMa et al.2018] Ma, T.; Xiao, C.; Zhou, J.; and Wang, F. 2018. Drug similarity integration through attentive multi-view graph auto-encoders. CoRR abs/1804.10850.
  • [\citeauthoryearMiller et al.2016] Miller, A.; Fisch, A.; Dodge, J.; Karimi, A.-H.; Bordes, A.; and Weston, J. 2016. Key-value memory networks for directly reading documents. In Empirical Methods in Natural Language Processing, 1400–1409.
  • [\citeauthoryearPaszke et al.2017] Paszke, A.; Gross, S.; Chintala, S.; Chanan, G.; Yang, E.; DeVito, Z.; Lin, Z.; Desmaison, A.; Antiga, L.; and Lerer, A. 2017. Automatic differentiation in pytorch.
  • [\citeauthoryearSrivastava et al.2014] Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; and Salakhutdinov, R. 2014. Dropout: a simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research 15(1):1929–1958.
  • [\citeauthoryearSukhbaatar et al.2015] Sukhbaatar, S.; Weston, J.; Fergus, R.; et al. 2015. End-to-end memory networks. In Advances in neural information processing systems, 2440–2448.
  • [\citeauthoryearTatonetti et al.2012a] Tatonetti, N.; Patrick, P.; Daneshjou, R.; and Altman, R. 2012a. Data-driven prediction of drug effects and interactions. Science translational medicine 4(125):125ra31–125ra31.
  • [\citeauthoryearTatonetti et al.2012b] Tatonetti, N.; Ye, P.; Daneshjou, R.; and Altman, R. 2012b. Data-driven prediction of drug effects and interactions. Science Translational Medicine 4(125).
  • [\citeauthoryearWang et al.2017] Wang, M.; Liu, M.; Liu, J.; Wang, S.; Long, G.; and Qian, B. 2017. Safe medicine recommendation via medical knowledge graph embedding. arXiv preprint arXiv:1710.05980.
  • [\citeauthoryearWeston, Chopra, and Bordes2015] Weston, J.; Chopra, S.; and Bordes, A. 2015. Memory networks. In International Conference on Learning Representations.
  • [\citeauthoryearXiao, Choi, and Sun2018] Xiao, C.; Choi, E.; and Sun, J. 2018. Opportunities and challenges in developing deep learning models using electronic health records data: a systematic review. Journal of the American Medical Informatics Association.
  • [\citeauthoryearZhang et al.2017] Zhang, Y.; Chen, R.; Tang, J.; Stewart, W. F.; and Sun, J. 2017. Leap: Learning to prescribe effective and safe treatment combinations for multimorbidity. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 1315–1324. ACM.
  • [\citeauthoryearZitnik, Agrawal, and Leskovec2018] Zitnik, M.; Agrawal, M.; and Leskovec, J. 2018. Modeling polypharmacy side effects with graph convolutional networks. Bioinformatics 34(13):457–466.