L EARNING "W HAT - IF " E XPLANATIONS FOR S EQUENTIAL D ECISION -M AKING
A BSTRACT
Building interpretable parameterizations of real-world decision-making on the basis of demonstrated behavior—i.e. trajectories of observations and actions made by an expert maximizing some unknown reward function—is essential for introspecting and auditing policies in different institutions.
In this paper, we propose learning explanations of expert decisions by modeling their reward function in terms of preferences with respect to “what if” outcomes:
Given the current history of observations, what would happen if we took a particular action ?
To learn these costbeneﬁt tradeoffs associated with the expert’s actions, we integrate counterfactual reasoning into batch inverse reinforcement learning.
This offers a principled way of deﬁning reward functions and explaining expert behavior, and also satisﬁes the constraints of real-world decision-making—where active experimentation is often impossible (e.g. in healthcare).
Additionally, by estimating the effects of different actions, counterfactuals readily tackle the off-policy nature of policy evaluation in the batch setting, and can naturally accommodate settings where the expert policies depend on histories of observations rather than just current states.
Through illustrative experiments in both real and simulated medical environments, we highlight the effectiveness of our batch, counterfactual inverse reinforcement learning approach in recovering accurate and interpretable descriptions of behavior.
I NTRODUCTION
Consider the problem of explaining sequential decision-making on the basis of demonstrated behavior.
In healthcare, an important goal lies in being able to obtain an interpretable parameterization of the experts’ behavior (e.g in terms of how they assign treatments) such that we can quantify and inspect policies in different institutions and uncover the trade-offs and preferences associated with expert actions (James & Hammond, 2000; Westert et al., 2018; Van Parys & Skinner, 2016; Jarrett & van der Schaar, 2020).
Moreover, modeling the reward function of different clinical practitioners can be revealing as to their tendencies to treat various diseases more/less aggressively (Rysavy et al., 2015), which —in combination with patient outcomes—has the potential to inform and update clinical guidelines.
In many settings, such as medicine, decision-makers can be modeled as reasoning about "what-if" patient outcomes: Given the available information about the patient, what would happen if we took a particular action?
(Djulbegovic et al., 2018; McGrath, 2009).
As treatments often affect several patient covariates, by having both beneﬁts and side-effects, decision-makers often make choices based on their preferences over these counterfactual outcomes.
Thus, in our case, an interpretable explanation of a policy is one where the reward signal for (sequential) actions is parameterized on the basis of preferences over (sequential) counterfactuals (i.e. "what-if" patient outcomes).
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
] <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit>
Action (Treatment)
No Action ( No Treatment)
Counterfactuals
History h t <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit>
Counterfactuals Z <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> w z <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit>
[Table]
P r e f e r e n ce m a
gn
it ud e
E [ U t +1 [ ] | h t ] <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_
[Table]
sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> w u <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit>
Consider the evolution of tumour volume ( U ) and side effects ( Z ) under a binary action.
E [ U t +1 [ a t ] | h t ] and E [ Z t +1 [ a t ] | h t ] are the counterfactuals for the patient features under action a t given history h t of prior actions and covariates.
Parameterizing the reward as the weighted sum of these counterfactuals: R ( h t , a t ) =
w u E [ U t +1 [ a t ] | h t ] + w z E
[ Z t +1 [ a t ] | h t ] , naturally allows us to model the preferences of experts: e.g. ﬁnding that | w u | > | w z | indicates that the expert is treating more aggressively, by placing more weight on reducing tumour volume than on minimizing side effects.
Given the observations and actions made by an expert, inverse reinforcement learning (IRL) offers a principled way for modeling their behavior by recovering the (unknown) reward function being maximized (Ng et al., 2000; Abbeel & Ng, 2004; Choi & Kim, 2011).
Standard solutions operate by iterating on candidate reward functions, solving the associated (forward) reinforcement learning problem at each step.
In many real-world problems, however, we are speciﬁcally interested in the challenge of ofﬂine learning—that is, where further experimentation is not possible—such as in medicine.
In this batch setting, we only have access to trajectories sampled from the expert policy in the form of an observational dataset—such as in electronic health records.
Batch IRL.
By their nature, classic IRL algorithms require interactive access to the environment, or full knowledge of the environment’s dynamics (Ng et al., 2000; Abbeel & Ng, 2004; Choi & Kim, 2011).
While batch IRL solutions have been proposed by way of off-policy evaluation (Klein et al., 2011; 2012; Lee et al., 2019), they suffer from two disadvantages.
First, they are limited by the assumption that state dynamics are fully-observable and Markovian.
This is hardly true in medicine: treatment assignments generally depend on how patient covariates have evolved over time (Futoma et al., 2020).
Second, rewards are often parameterized as uninterpretable representations of neural network hidden states and consequently cannot be used to explain sequential decision making.
"What-if" Explanations.
To address these shortcomings and to obtain a parameterizable interpretation of the expert’s behavior, we propose explicitly incorporating counterfactual reasoning into batch IRL.
In particular, we focus on “what if” explanations for modeling decision-making, while simultaneously accounting for the partially-observable nature of patient histories.
Under the max-margin apprenticeship framework (Abbeel & Ng, 2004; Klein et al., 2011; Lee et al., 2019), we learn a parameterized reward function R ( h t , a t ) that is deﬁned as a weighted sum over potential outcomes (Rubin, 2005) for taking action a t given history h t .
As highlighted in Figure 1, consider the decision making process of assigning a binary action given the tumour volume ( U ) and side effects ( Z ).
Let E [ U t +1 [ a t ] | h t ] and E [ Z t +1 [ a t ] | h t ] be the counterfactual outcomes for the two covariates when action a t is taken given the history h t of covariates and previous actions.
We deﬁne the reward as the weighted sum of these counterfactuals:
R ( h t , a t ) =
w u E [ U t +1 [ a t ] | h t ] + w z E
[ Z t +1 [ a t ] | h t ] , to take into account the effect of actions and to directly model the preferences of the expert.
The ideal scenario is when both the tumour volume and the side effects are zero, so the reward weights of a doctor aiming for this are both negative.
However, recovering that | w u | > | w z | , it means that the doctor is treating more aggressively, as they are focusing more on reducing the tumour volume rather than on the side effects of treatments.
Alternatively, | w u | < | w z | indicates that the side effects are more important and the expert is treating less aggressively.
Our motivation for using counterfactuals to deﬁne the reward comes from the idea that rational decision making considers the potential effects of actions (Djulbegovic et al., 2018).
Contributions.
Exploring the synergy between counterfactual reasoning and batch IRL for understanding sequential decision making confers multiple advantages.
First, it offers a principled approach for parameterizing reward functions in terms of preferences over what-if patient outcomes, which enables us to explain the cost-beneﬁt tradeoffs associated with an expert’s actions.
Second, by estimating the effects of different actions, counterfactuals readily tackle the off-policy nature of
[Table]
policy evaluation in the batch setting.
Furthermore, we demonstrate that not only does this alleviate the cold-start problem typical of conventional batch IRL solutions, but also accommodates settings where the usual assumption of full observability fails to hold.
Through experiments in both real and simulated medical environments, we illustrate the effectiveness of our batch, counterfactual inverse reinforcement learning approach in recovering accurate and interpretable descriptions of behavior.
R ELATED WORKS
In our work, the aim is to explain decision-making by recovering the preferences of experts with respect to the effects of their actions, denoted by the counterfactual outcomes.
This goal is fundamentally different from the goal of IRL methods which generally aim to match the performance of experts.
We operate under the standard max-margin apprenticeship framework (Ng et al., 2000; Abbeel & Ng, 2004), which searches for a reward function that minimizes the margin between feature expectations of the expert and candidate policies.
However, our approach to recovering and understanding decision policies is uniquely characterized by incorporating counterfactuals to obtain explainable reward functions.
To tackle the challenges posed by real-world decision making, our method also operates in an ofﬂine and model-free manner, and accommodates partially-observable environments.
Explainability .
By using basis functions (Klein et al., 2012) or hidden layers of a deep network (Lee et al., 2019) to deﬁne the feature map, the learned rewards of either approach are inherently uninterpretable, and cannot be used to explain differences in expert behavior.
An alternative approach for recovering the expert policy (without reward functions) is imitation learning (Hussein et al., 2017;
Osa et al., 2018; Torabi et al., 2019; Jarrett et al., 2020).
However, these methods do not allow us to fully model the decision-making process of experts and to uncover the trade-offs behind their actions.
Batch Learning .
Klein et al.
(2011) propose an off-policy evaluation method based on least squares temporal difference (LSTD- Q ) (Lagoudakis & Parr, 2003) for estimating feature expectations, and
Klein et al.
(2012) use a linear score-based classiﬁer to directly approximate the Q -function ofﬂine.
However, both methods require the constraining assumptions that rewards are direct, linear functions of fully-observable states—assumptions we cannot afford to make in realistic settings such as medicine.
Lee et al.
(2019) propose a deep successor feature network (DSFN) based on Q -learning to estimate feature expectations.
But their approach similarly assumes fully-observable states, and additionally suffers from the “cold-start” problem where off- policy evaluations are heavily biased unless the initial candidate policy is (already) close to the expert.
Partial Observability .
No existing batch IRL method accommodates modeling expert policies that depend on patient histories.
While Choi & Kim (2011) and Makino & Takeuchi (2012) extend the apprenticeship learning paradigm to partially observable environments by considering policies on beliefs over states, both need to interact with the environment (or a perfect simulator) during learning.
To the best of our knowledge, we are the ﬁrst to propose explaining sequential decisions through counterfactual reasoning and to tackle the batch IRL problem in partially-observable environments.
Our use of the estimated counterfactuals yields inherently interpretable rewards and simultaneously addresses the cold-start problem in Lee et al.
Table 1 highlights the main differences between our method and the relevant related works.
See Appendix A for additional related works.
P ROBLEM FORMULATION
Preliminaries.
At timestep t , let
random variable
X t ∈
X denote the observed patient features and let
A t ∈ A denote the action (e.g. treatment) taken, where A is a ﬁnite set of actions.
Let x t and a t denote realizations of these random variables.
Let h
[Equation]
be a realization of the history H t ∈ H of patient observations and actions until timestep t .
A stationary stochastic policy represents a mapping: π : H×A → [0 , 1] , where π ( a | h ) indicates the probability of choosing action
a ∈ A given history h ∈ H and (cid:80) a ∈A π ( a | h ) = 1 .
Taking action a t under history h t results in observing x t +1 and obtaining h t
+1 .
The reward function is R : H×A → R where R ( h, a ) represents the reward for taking action a ∈
A given history h ∈ H .
The value function of a policy π , V :
H → R is deﬁned as: V π ( h ) =
E [ (cid:80) ∞ t =
γ t R ( H t , A t ) | π, H
= h ] , where γ ∈ [0 , 1) is the discount factor and A t ∼ π ( · | H t ) for t ≥ 0 .
The action-value function Q :
H ×
A → R of a policy is deﬁned as Q π ( h, a ) =
E [ (cid:80) ∞ t =
γ t R ( H t , A t ) | π, H
= h, A
= a ] where A t ∼ π ( · | H t ) for t ≥ 0 .
A higher Q -value indicates that action a will yield better long term returns if taken for history h .
We assume we know the discount factor γ which indicates the importance of future rewards for the current history and action pair.
Batch IRL.
Let D =
{ ζ i } Ni =1 be a batch observational dataset consisting of N patient trajectories: ζ i =
( x i 0 , a i 0 , . . .
x iT i − 1 , a iT i − 1 , x iT i ) .
The trajectory ζ i for patient i consists of covariates x it and actions a it observed for T i timesteps.
For simplicity, we drop the superscript i unless explicitly needed.
The actions a t ∈ D are assigned according to some expert policy π E such that a t ∼ π E ( · | h t ) .
We work in the apprenticeship learning set-up (Abbeel & Ng, 2004) and we consider a linear reward function R ( h t , a t ) =
w · φ ( h t , a t ) , where the weights w ∈ R d satisfy (cid:107) w (cid:107) 1 ≤ 1 .
The feature map φ :
H ×
A → R d also satisﬁes (cid:107) φ ( · ) (cid:107) 2 ≤ 1 such that the reward is bounded.
We assume that the expert policy π E is attempting to optimize, without necessarily succeeding, some unknown reward function R ∗ ( h t , a t ) =
w ∗ · φ ( h t , a t ) , where w ∗ are the ‘true’ reward weights.
Given
R ( h t , a t ) , the value of policy π can be re-written as: E [ V π ( H 0 )]
=
E [ (cid:80) ∞ t =
γ t w · φ ( H t , A t ) | π ] = w · E [ (cid:80) ∞ t =
γ t φ ( H t , A t ) | π ] , where the expectation is taken with respect to the sequence of histories and action pairs ( H t , A t ) t ≥ 0 obtained by acting according to π .
The feature expectation of policy π , deﬁned as the expected discounted cumulative feature vector obtained when choosing actions according to policy π is µ π =
E
[ (cid:80) ∞ t =
γ t φ ( H t , A t ) | π ] ∈ R d such that: E [ V π ( H 0 )] =
w · µ π .
Our aim is to recover the expert weights w ∗ as well as ﬁnd a policy π that is close to the policy of the expert π E .
We take the max-margin IRL approach and we measure the similarity between the feature expectations of the expert’s policy and the feature expectations of a candidate policy using (cid:107) µ π E − µ π (cid:107) 2 .
In this batch IRL setting, we do not have knowledge of transition dynamics and we cannot sample more trajectories from the environment.
Note that in this context, we are the ﬁrst to model expert policies that depend on patient histories and not just current observations.
Counterfactual reasoning.
To explain the expert’s behaviour in terms of their trade-off associated with "what if" outcomes, we use counterfactual reasoning to deﬁne the feature map φ ( h t , a t ) part of the reward R ( h t , a t )
= w · φ ( h t , a t ) .
We adopt the potential outcomes framework (Neyman, 1923; Rubin, 1978; Robins & Hernán, 2008).
Let Y [ a ] be the potential outcome, either factual or counterfactual, for treatment a ∈ A .
Using the dataset D we learn feature map φ ( h t , a t ) such that:
[Equation]
where E [ Y t +1 [ a t ] | h t ] is the potential outcome for taking action a t at time t given the history h t .
For the factual action a t , assigned under policy π ( · | h t ) , the factual outcome is x t +1 and this is the same as the potential outcome
E [ Y t +1 [ a t ] | h t ] .
The potential outcomes for the other actions a t ∈
A are the counterfactual ones and they allow us to understand what would happen to the patient if they receive a different treatment a t .
To identify the potential outcomes from the batch data we make the standard assumptions of consistency, positivity and no hidden confounders as described in Appendix
B. No hidden confounders means that we observe all variables affecting the action assignment and potential outcomes.
Overlap means that at each timestep, every action has a non-zero probability and can be satisﬁed in this setting by having a stochastic expert policy.
These assumptions are standard across methods for estimating counterfactual outcome (Robins et al., 2000; Schulam & Saria, 2017;
Bica et al., 2020a).
Note that these assumptions are needed to be able to reliably perform causal inference using observational data.
However, they do not constrain the batch IRL set-up.
Estimating the potential outcomes from batch data poses additional challenges that need to be considered.
The fact that the expert follows policies that consider the history of patient observations when deciding new actions, gives rise to time-dependent confounding bias.
Standard supervised learning methods for learning E
[ Y t +1 [ a t ] | h t ] from D will be biased by the expert policy used in the observational dataset and will not be able to correctly estimate the counterfactual outcomes under alternative policies (Schulam & Saria, 2017).
Methods for adjusting for the confounding bias involve using either inverse probability of treatment weighting (Robins et al., 2000; Lim et al., 2018) or building balancing representations (Bica et al., 2020a).
Refer to Appendix B for more details.
In the sequel, we consider the model for estimating counterfactuals as a black box such that the feature map φ ( h t , a t ) represents the effect of taking action a t for history h t .
The reward is then:
[Equation]
Deﬁning the reward function using counterfactuals gives an interpretable parameterization of doctor behavior: It allows us to interpret their behavior with respect to the importance weights implicitly assigned to the effects of their actions.
This enables describing the relative trade-offs in treatment decisions.
Note that we are not assuming that the experts themselves actually compute these quantities (nor that they explicitly adopt the same causal inference assumptions); rather, we are simply providing a way to understand how decision-makers are effectively behaving (i.e. in terms of counterfactuals).
B ATCH INVERSE REINFORCEMENT LEARNING USING COUNTERFACTUALS
Max-margin IRL (Abbeel & Ng, 2004) starts with an initial random policy π and iteratively performs the following three steps to recover the expert policy and its reward weighs: (1) estimate feature expectations µ π of candidate policy π , (2) compute new reward weights w and (3) ﬁnd new candidate policy π that is optimal for reward function R ( h t , a t )
= w · φ ( h t , a t ) .
This approach ﬁnds a policy ˜ π that satisﬁes (cid:107) µ π e − µ ˜ π (cid:107) 2 < (cid:15) such that ˜ π has an expected value function close the expert policy.
[Equation]
null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> ⇡ <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> w <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit> <latexit sha1_base64="(null)">(null)</latexit>
[Figure]
<
[Figure]
The expert feature expectations can be estimated empirically from the dataset D using:
[Equation]
In the batch setting, we cannot estimate the feature expectations of candidate policies by taking the sample mean of on-policy roll-outs: µ ˜ π
(cid:54) =
1 N (cid:80) Ni =1 (cid:80) T
i t =
γ t φ ( h it , π ( h it )) .
To address this offpolicy nature of estimating feature expectations, we introduce a new method that leverages the estimated counterfactuals.
We also make use of the counterfactuals to learn optimal policies for different reward weights.
Figure 2 illustrates how we integrate "what if" reasoning into batch IRL.
4. C OUNTERFACTUAL µ − LEARNING
Similar to the approach proposed by Klein et al.
; Lee et al.
(2019), we consider a history-action feature expectation deﬁned as follows µ π ( h, a ) =
E [ (cid:80) ∞ t =
γ t φ ( H t , A t ) | π, H
= h, A
= a ] , where the ﬁrst action a can be chosen randomly and for t ≥ 1 , A t ∼ π ( · | H t ) .
This can be re-written as:
[Equation]
where h (cid:48) is the next history.
Notice the analogy between µ π ( h, a ) and the action-value function:
[Equation]
7) that allows us to use temporal difference learning to estimate feature expectations (Sutton et al., 1998).
Existing methods for estimating feature expectations fall into two extremes: (1) model-based (online)
IRL approaches learn a model of the world and then use the model as a simulator to obtain on-policy roll-outs (Abbeel & Ng, 2004) and (2) batch IRL approaches use Q-learning (or alternative methods)
[Table]
D
[Table] [Table]
: for
[Table]
1 to n do
[Table] [Table]
Orthogonally project µ π E onto line through
[Table]
[Table]
11: if t < (cid:15) then break 12: end for 13:
K = arg min k : µ πk ∈ ∆ (cid:107) µ π E − µ π k || 2 , ˜ R ( h, a ) =
w K · φ ( h, a ) 14: Output : ˜ R , ∆ , Π for off-policy evaluation (Lee et al., 2019), and can only be used to evaluate policies similar to the expert policy and require warm start.
In our case, the counterfactual model allows us to compute h (cid:48)
= ( h, a, E [ Y ( a ) | h ]) for any h ∈ D and any arbitrary action a .
Thus, we propose counterfactual µ -learning, a novel method for estimating feature expectations that uses these counterfactuals as part of temporal difference learning with 1 -step bootstrapping.
This approach falls in-between (1) and (2) and allows us to estimate feature expectations for any candidate policy π in the batch IRL setting.
The counterfactual µ -learning algorithm learns the µ -values for policy π iteratively by updating the current estimates of the µ -values with the feature map plus the µ -values obtained by following policy π in the new counterfactual history h (cid:48)
= ( h, a, E
[ Y [ a ] | h ]) :
[Equation]
where α is the learning rate.
We use a recurrent network with parameters θ to approximate ˆ µ π ( h, a | θ ) and we train it by minimizing the sequence of loss functions
L i which changes for every iteration i :
[Equation]
where the action a can be chosen randomly from A and y i
=
φ ( h, a )+ γ E a
[Equation]
∼ π ( ·| h
[Equation]
) [ˆ µ π ( h
[Equation]
, a (cid:48)
| θ i − 1 )] is the target for iteration i .
The parameters for the previous iteration θ i − 1 are held ﬁxed when optimiz-
ing
L i ( θ i ) .
Refer to Appendix C for full details of the counterfactual µ -learning algorithm.
The feature expectations for the policy π are given by ˆ µ π
[Equation]
µ π ( H 0 , A 0 )] , which can be estimated empirically from the observational dataset D using ˆ µ π = 1 N (cid:80) Ni =1 (cid:80) a ∈A ˆ µ π ( h i 0 , a ) π ( a | h i 0 ) .
4. F INDING OPTIMAL POLICY FOR GIVEN REWARD WEIGHTS
During each iteration of max-margin IRL, we obtain a candidate policy to evaluate by ﬁnding the optimal policy for a given vector of reward weights.
We use deep recurrent Q -learning (Hausknecht &
Stone, 2015), a model-free approach for learning Q -values for reward function R ( h, a ) = w · φ ( h, a ) .
The counterfactuals are used to compute φ ( h, a ) , and to estimate the next history for the temporal difference updates.
See Appendix D for details.
After estimating the Q − values, Q ( h, a ) for history h and action a , a new candidate policy is obtained using: π ( a | h ) =
1 a =argmax a (cid:48) Q ( h,a (cid:48) ) .
4. C OUNTERFACTUAL INVERSE REINFORCEMENT LEARNING ALGORITHM (CIRL)
Algorithm 1 describes our proposed counterfactual inverse reinforcement learning (CIRL) method for the batch setting.
CIRL is based on the projection algorithm proposed by Abbeel & Ng (2004) and iteratively updates the reward weights to minimize the margin between the expert’s feature expectations and the feature expectations of intermediate policies.
CIRL uses our proposed counterfactual µ − learning algorithm for estimating the feature expectations of intermediate policies in an off-policy manner that is suitable for the batch setting.
Compared to the algorithm for batch IRL proposed by
Lee et al.
(2019) that requires the initial policy π 0 to already be similar to the expert policy, CIRL works for any initial policy π that is optimal for the randomly initialized reward weights w 0 .
Similarly to Choi & Kim (2011), the CIRL algorithm returns the reward function ˜ R ( h, a ) that results in a policy with feature expectations closest to the ones of the expert policy.
We show experimentally that the reward that yields the closest feature expectations will be similar to the true underlying reward function of the expert.
CIRL returns the set of policies tried Π and their feature expectations ∆ , which allows us to compute a mixing policy that would yield similar performance to the expert policy (Abbeel & Ng, 2004).
Let ˜ µ be the closest point to µ π E in the convex closure of ∆ = { µ π 0 , µ π 1 . . .
µ π k } , which can be computed by solving the quadratic programming problem:
[Equation]
From the termination criteria of Algorithm 1, µ π E is separated from the points µ π i by a margin of at most (cid:15) .
Thus, the solution ˜ µ will satisfy (cid:107) µ π E − ˜ µ (cid:107) 2 ≤ (cid:15) .
To obtain a policy that is close to the performance of the expert policy, we mix together the policies Π
= { π 0 , . . .
π k } returned by Algorithm 1, where the probability of selecting π i is λ i .
E XPERIMENTS
We evaluate the ability of CIRL to recover the preferences of experts over the "what if" outcomes of actions.
These preferences are denoted by the magnitude of the recovered reward weights.
Since we do not have access to the underlying reward weights of experts in real data, we ﬁrst validate the method in a simulated environment.
To show the applicability of CIRL in healthcare, we also perform a case study on an ICU dataset from the MIMIC III database (Johnson et al., 2016).
Benchmarks.
For our proposed CIRL method, we uses the Counterfactual Recurrent Network, a state-of-the art model for estimating counterfactual outcomes in a temporal setting (Bica et al., 2020a).
Note that other models for this task are also applicable (Lim et al., 2018).
Refer to Appendix F for details.
We benchmark CIRL against MB-IRL: model-based IRL—i.e. inverse reinforcement learning with model-based policy evaluation (e.g. Yin et al.
; Nagabandi et al.
Kaiser et al.
; Buesing et al.
We consider two versions of this benchmark: MB( h )-IRL which uses the patient history and MB( x )-IRL which only uses the current observations to deﬁne the policy.
For both MB( x )-IRL and MB( h )-IRL we deﬁne the reward as a weighted sum of counterfactual outcomes, but these methods use instead standard supervised methods to estimate the next history h (cid:48) needed for the counterfactual µ -learning algorithm.
These benchmarks are aimed to highlight the need of handling the bias from the time-dependent confounders and using a suitable counterfactual model, but also the importance of handling the patient history.
We also compare against the deep successor feature networks (DSFN) proposed by Lee et al.
(2019), which currently represents the state-of-the-art Batch IRL for the MDP setting.
To show that their approach for estimating feature expectations in the batch setting is suboptimal, we extend their method to also incorporate histories in the DSFN( h ) benchmark.
Implementation details of the benchmarks can be found in Appendix G.
E XTRACTING DIFFERENT TYPES OF EXPERT BEHAVIOUR
Simulated environment.
We propose an environment that uses a general data simulation involving p -order auto-regressive processes.
To analyze different types of expert behaviour (e.g. treating more/less aggressively) we simulate data for patient features representing disease progression ( x ), e.g. tumour volume and side effects ( z ) and action ( a ) indicating the binary application of treatment.
For time t , we model the evolution of patient covariates according to the treatments as follows:
[Equation]
where p = 5 and (cid:15) ∼ N (0 , 0 .
1 2 ) , η ∼ N (0 , 0 .
1 2 ) are noise terms.
The initial values for the features are sampled as follows: x 0 ∼ N (30 , 5) and z 0 ∼ N (2 , 1) .
We set x max = 50 and z max = 15 .
The trajectory of the patient terminates when either x t = 0 , x t ≥ x max , z t ≥ z max or t ≥ 20 .
The tumour volume x t , denoting the disease progression, decreases when we give treatment and increases otherwise.
Conversely, the side effects z t , increase when we give treatment and decrease otherwise.
We deﬁne a linear reward for taking action a t given history h t
=
( x 0: t , z 0: t , a 0: t − 1 ) as follows:
[Equation]
where w = [ w 1 , w 2 ] , || w || 1 ≤ 1 and x t +1 and z t +1 are simulated according to equations 11 to take into account the effect of action a t for history h t .
The features are normalized to [0 , 1] .
The best scenario for a patient is when both the side effects and tumour volume are zero and a doctor attempting to achieve this will have negative reward weights.
However, different settings of the reward weights will result in different expert behaviours.
For instance, for w 1 = − 0 . 7 and w 2 = − 0 .
3 , the expert policy will focus more on the disease progression and will consequently treat more aggressively, while this behaviour will be reversed for reward weights set to w 1 = − 0 .
3 and w 2 = − 0 .
We used deep recurrent Q − learning (Hausknecht & Stone, 2015) to ﬁnd a stochastic expert policy that optimizes the reward function for different settings of the weights.
The batch dataset D consists of 10000 trajectories sampled from the expert policy.
Refer to Appendix E for more details.
[Figure]
We ﬁrst evaluate the benchmarks on their ability to recover the weights of the reward function optimized by the expert for the experimental setting with γ = 0 . 99 , w 1 = − 0 .
3 and w 2 = − 0 .
Note that DSFN does not provide interpretable reward weights, and thus cannot be used for understanding the trade-offs in the expert behavior.
We train each benchmark 10 times and we plot in Figure 3 the reward weights obtained for the different iterations.
We show that our proposed CIRL method performs best at recovering the preferences of the expert, which in this case is to treat less aggressively.
While the
MB ( h ) -IRL method also recovers the correct trade-offs in the expert behavior, the computed weights have a much higher variance.
Conversely, the MB ( x ) -IRL method, which does not consider the patient history fails to recover the underlying weights of the expert policy.
Matching the expert policy .
We evaluate the benchmarks’ ability to recover policies that match the performance on the expert policy for two settings of the discount factor γ ∈ { 0 . 99 , 0 . 5 } .
A lower γ indicates that the expert is optimizing for the immediate effect of actions, while a higher γ means they considered the long term effect of actions.
For each γ we learn expert policies for different reward weights and we use the expert policies to generate the batch datasets.
We evaluate the policies learned by the benchmarks using two metrics: cumulative reward for running the policy in the simulated environment and accuracy on matching the expert policy (computed as described in Appendix H).
We report in Tables 2 and 3 the average results and their standard error over 1000 sampled trajectories from the environment.
CIRL recovers a policy that has the closest cumulative reward to the expert policy and that can best match the treatments assigned by the expert.
[Table]
[Table]
5. C ASE STUDY ON REAL - WORLD DATASET : MIMIC III
Suppose we want to explain the decision-making process of doctors assigning antibiotics to patients in the ICU.
For this purpose, we consider a dataset with 6631 patients that have received antibiotics during their ICU stay, extracted from the Medical Information Mart for Intensive Care (MIMIC III) database (Johnson et al., 2016).
[Figure]
We used CIRL, with γ = 0 . 99 , to recover the policy and the reward weights of doctors administering antibiotics to understand their preferences over the effect of antibiotics on the patient features.
The relative magnitude of the reward weights for the counterfactual outcomes of the patient features considered are illustrated in Figure 4.
CIRL found that reducing temperature had the highest weight in the reward function of the expert, followed by WBC.
This corresponds to known medical guidelines (Marik, 2000; Palmer et al., 2008).
Sepsis is a leading cause of morbidity and mortality in the ICU, and several studies have shown that early administratio of antibiotics is crucial to decrease the risk of adverse outcomes (Zahar et al., 2011).
Fever and elevated
WBC are among a small subset of variables that indicate a systemic inﬂammatory response, concerning for the development of sepsis (Neviere et al., 2017).
While these ﬁndings are not speciﬁc to bacterial infection, the risk of failing to treat a potentially serious infection often outweighs the risk of inappropriate antibiotic administration, thereby driving clinicians to prescribe antibiotics in the setting of these abnormal ﬁndings.
Similarly, the decision to discontinue antibiotics is complex, but it is often supported by signs of a resolution of infection which included normalization of body temperature and a downtrending of the WBC.
As such, our ﬁnding that the two highest reward weights for the administration of antibiotics in the ICU is temperature and WBC is consistent with clinical practice.
Moreover, note that the model is simply identifying the factors that are driving the decision-making of the clinician represented in this dataset.
[Table] [Table]
In Table 4, to verify that explainability does not come at the cost of accuracy we also evaluate the benchmarks on matching the expert actions.
D ISCUSSION
In this paper, we propose building interpretable parametrizations of sequential decision-making by explaining an expert’s behaviour in terms of their preferences over "what-if" outcomes.
To achieve this, we introduce CIRL, a new method that incorporates counterfactual reasoning into batch IRL: counterfactuals are used to deﬁne the feature map part of the reward function, but also to tackle the off-policy nature of estimating feature expectations in the batch setting.
The reward weights recovered by CIRL indicate the relative preferences of the expert over the counterfactual outcomes of their actions.
Our aim is to provide a description of behavior, i.e. how the expert is effectively behaving under our interpretable parameterization of the reward based on counterfactuals.
We are not assuming that the experts actually operate under this speciﬁc (linear, in our case) model or that they compute the exact counterfactuals.
Instead, our purpose is to show that we can explain an agent’s behavior on the basis of counterfactuals, which is useful in that it allows us to audit them, sanity-check their policies and ﬁnd variation in practice.
Further discussion can be found in Appendix I.
There are several limitations of your method and directions for future work.
While our method considers reward functions that are linear in the features, one way of extending it to handle more complex reward functions is to use domain knowledge to deﬁne the feature map as a non-linear function over the counterfactual outcomes.
Nevertheless, these functions should be deﬁned in a way that still allows us to obtain interpretable explanations of the expert’s behaviour.
Moreover, although time-invariant reward weights w are standard in the IRL literature (Abbeel & Ng, 2004; Choi & Kim, 2011; Lee et al., 2019), time-variant rewards/policies have been considered in the dynamic treatment regimes (reinforcement learning) literature (Chakraborty, 2013; Zhang & Bareinboim, 2019).
Thus another direction for future work would be to extend our method to consider non-stationary policies and reward weights that can change over time.
A CKNOWLEDGMENTS
We would like to thank the reviewers for their valuable feedback.
The research presented in this paper was supported by The Alan Turing Institute, under the EPSRC grant EP/N510129/1, by Alzheimer’s
Research UK (ARUK), by the US Ofﬁce of Naval Research (ONR) and by the National Science
Foundation (NSF) under grant numbers 1407712, 1462245, 1524417, and 1722516.
The authors are also grateful to Brent Ershoff for the insightful discussions and help with interpreting the medical results on MIMIC III.
A A DDITIONAL RELATED WORKS
Alternative approaches for IRL require a known MDP or POMDP model.
In this context, several
Bayesian approaches to IRL have also been proposed which make use of the know transition dynamics provided by the model of the environment (Ziebart et al., 2008; Ramachandran & Amir, 2007).
We do not assume access to a MDP or POMDP model.
Makino & Takeuchi (2012) propose a method for estimating the unknown parameters of a POMDP model of the environment; however their method is only applicable to discrete observation spaces.
We do not make any assumptions about the observation space.
While several model-free IRL methods have also been developed, these are also not applicable in the batch setting where we only have access to a ﬁxed set of expert trajectories.
Relative Entropy IRL (Boularias et al., 2011) requires non-expert trajectories following arbitrary policy; such experimentation to obtain non-expert trajectories is not possible in the healthcare setting.
Distance Minimization IRL (DM-IRL) (Burchﬁel et al., 2016) learns reward functions from scores assigned by experts to sub-optimal demonstrations.
Moreover, guided cost learning proposed by Finn et al.
(2016) which performs model-free maximum entropy optimization also requires the ability to sample trajectories from the environment.
Similarly, adversarial IRL, proposed by Fu et al.
(2017) builds upon the maximum entropy framework in Ziebart et al.
(2008), but also requires the ability to execute trajectories from candidate policies.
B C OUNTERFACTUAL ESTIMATION AND TIME - DEPENDENT CONFOUNDING
Observational patient data (e.g. electronic health records) contain information about how actions, such as treatments are performed by doctors and how they affect the patient’s trajectory.
Such data can be used by causal inference methods to estimate counterfactual outcomes–what would happen to the patient if the expert takes a particular action given a history of observations?
To identify the counterfactual outcomes from observational data we make the standard assumptions of consistency, positivity and no hidden confounders as described in Assumption 1 (Rosenbaum &
Rubin, 1983; Robins et al., 2000).
Under Assumption 1, E [ Y t +1 [ a t ] | h t ] =
E [ X t +1 | a t , h t ] and this can be estimated by training a regression model on the batch observational data.
Assumption 1 (Consistency, Ignorability and Overlap) .
For any individual i , if action a t is taken at time t , we observe X t +
=
Y t +1 [ a t ] .
Moreover, we have sequential strong ignorability { Y t +1 [ a ] } a ∈A ⊥⊥ a t | h t , ∀ t and sequential overlap Pr( A t = a | h t ) > 0 , ∀ t, ∀ a ∈ A .
The sequential strong ignorability assumption, also known as no hidden confounders, means that we observe all variables affecting the action assignment and potential outcomes.
Sequential overlap means that at each timestep, every action has a non-zero probability, which can be satisﬁed by having a stochastic expert policy.
These assumptions are standard across causal inference methods (Robins et al., 2000; Schulam & Saria, 2017; Lim et al., 2018; Bica et al., 2020a).
We emphasize that these assumptions are needed to be able to reliably perform causal inference using observational data.
Nevertheless, they do not constrain the batch IRL set-up.
Using observational data to estimate the counterfactual outcomes poses additional challenges in this set-up that need to be considered.
In particular, direct estimation of the treatment effects is biased by the presence of time-varying confounders (Mansournia et al., 2012), which are patient covariates that inﬂuence the assignment of treatments and which, in turn, are affected by past actions.
For instance, consider that the doctor’s policy of assigning treatments takes into account whether the patients’ covariates denoting disease progression, such as tumor volume, has been increasing above normal thresholds for several timesteps.
If these patients are also more likely to have severe side effects, without adjusting for the bias introduced by time-varying confounders, we may incorrectly conclude that the treatment is harmful to the patients (Platt et al., 2009).
Using standard supervised learning methods to estimate the patients’ response to treatments in this setting will be biased by the doctor’s policy and will not be able to estimate the effect of treatments under different policies.
This represents an issue for our batch IRL setting where we need to be able to evaluate candidate policies that are different from the expert policy.
Thus, being able to correctly estimate counterfactual treatment outcomes is crucial for our method.
Methods for adjusting for the confounding bias use either inverse probability of treatment weighting (IPTW) or balancing representations.
The ﬁrst approach, IPTW, involves creating a pseudo-population where the probability of taking action a t does not depend on x 0: t (Robins et al., 2000; Lim et al., 2018), while the second approach builds a balancing representation of the history that is invariant to the treatment (Bica et al., 2020a).
Using either approach will result in an unbiased estimation of the counterfactual outcomes.
See Robins et al.
; Lim et al.
; Bica et al.
(2020b)
for more details about time-dependent confounding as well as for a more in-depth review of alternative methods for removing the bias from time-dependent confounders and estimating counterfactual outcomes.
C C OUNTERFACTUAL µ - LEARNING
Our counterfactual µ -learning algorithm involves learning the µ -values for policy π iteratively by updating the current estimates of the µ -values with the feature map plus the µ -values obtained by following policy π in the new counterfactual history h (cid:48)
= ( h, a, E
[ Y [ a ] | h ]) :
[Equation]
(13) where α is the learning rate and γ is the discount factor.
We approximate ˆ µ π ( h, a | θ f ) using an RNN with parameters θ f .
The RNN consists of an LSTM unit with linear output.
To stabilize training we use a target network ¯ µ π with parameters θ − f that provide updates for the main network.
Note that using a target network is standard in Q − learning (Mnih et al., 2013; Hausknecht & Stone, 2015).
The target network ¯ µ π has the same architecture as the main network ˆ µ π and its parameters θ − f are updated to match θ
f every M − iterations.
The loss function for updating the µ network for estimating feature expectations at iteration i is:
[Equation]
where α is the learning rate, D is the batch observational dataset and y
[Equation]
if patient trajectory terminates at history h
[Equation]
) is the target for iteration i obtained using the target network ¯ µ π .
The action a is chosen by following an ε -greedy policy by selecting action a ∼ π ( · | h ) with probability 1 − ε and a random action with probability (cid:15) .
We perform M training iterations.
Algorithm 2 describes the full training procedure used.
Table 5 indicates the search ranges used for the various hyperparameters involved in the counterfactual µ -learning algorithm.
The hyperparameters were selected to ensure stability of training and convergence of the algorithm.
[Table]
1: Input : Batch dataset D
= { ( x i 0 , a i 0 , . . .
x iT i − 1 , a iT i − 1 , x iT i ) }
Ni =1 , policy to evaluate π , counterfactual model φ ( h, a ) 2: Initialize feature expectations network ˆ µ π with random weights θ f 3: Initialize target feature expectations network ¯ µ π with random weights θ − f
= θ f 4: for i = 1 to M do 5:
Sample random minibatch B = { h b } Bb =1 of histories h from D 6: for b = 1 to B do 7:
With probability (cid:15) select random action a b , otherwise select a b ∼ π ( · | h b ) 8:
Compute counterfactual histories h b (cid:48)
= ( h b , a b , E
[ Y [ a b ] | h b ]) using the counterfactual model: E [ Y [ a b ] | h b ] = φ ( h b , a b ) .
Set targets: y bf,i = (cid:26) φ ( h b , a b ) , if trajectory terminates at history h b φ ( h b , a b ) + γ E a (cid:48) ∼ π ( ·| h b (cid:48) )
[¯ µ π ( h b (cid:48) , a (cid:48) | θ − f )] , otherwise (17) 10: end for 11:
Perform gradient descent step on (cid:80) B b =1 || y b
f,i − ˆ µ π ( h b , a b | θ f,i ) ||
2 with respect to parameters θ f 12: if i mod M − = 0 then θ − f
= θ f,i 13: end for 14: ˆ µ π = 1 N (cid:80)
Ni =1 (cid:80) a ∈A ˆ µ π ( h i 0 , a ) π ( a | h i 0 ) 15: Output : ˆ µ π
D F INDING OPTIMAL POLICY FOR GIVEN REWARD WEIGHTS
We use deep recurrent Q -learning (Hausknecht & Stone, 2015) to ﬁnd the optimal policy for each setting of the reward weights R ( h, a )
= w · φ ( h, a ) .
For history h , let the next history for taking action a be h (cid:48)
= ( h, a, E [ Y ( a ) | h ]) , where E [ Y ( a ) | h ] is estimated by the counterfactual model.
Using the batch dataset D , we learn the Q − values iteratively by updating the current estimate of the Q − values towards the reward plus the maximum Q -value over all possible actions in the new history h (cid:48) :
[Equation]
where α is the learning rate and γ is the discount factor.
We approximate Q ( h, a | θ q ) using an RNN parameterized by θ q .
The RNN consists of an LSTM unit with linear output.
We use the standard practices for training Q − networks (Mnih et al., 2013;
Hausknecht & Stone, 2015) and we employ a target network ¯ Q with parameters θ − q to provide the updates for the main network and to stabilize training.
The target network ¯ Q is the same architecture as the main network Q and its parameters θ − q are updated to match θ q every M − iterations.
We use the following loss function for the Q − learning update at iteration i :
[Equation] [Equation]
20) where α is the learning rate and y q,i = (cid:26) R (
[Equation]
, if patient trajectory terminates at history h
[Equation]
otherwise (21) is the stale update target obtained from the target network ¯ Q .
The action a is chosen by following an ε -greedy policy by selecting action a = arg max a (cid:48) Q ( h, a (cid:48) | θ q ) with probability 1 − ε and a random action with probability (cid:15) .
We perform M training iterations.
Table 6 indicates the search ranges used for the various hyperparameters involved in the deep recurrent Q − learnign algorithm.
The hyperparameters were selected to ensure stability of training and convergence of the algorithm.
[Table]
E D ATA SIMULATION
Using the dynamics of the simulated environment described in Equation 22, we trained a deep recurrent Q -learning agent (Hausknecht & Stone, 2015) to ﬁnd a stochastic optimal policy that optimizes the reward function for different settings of the reward weights w 1 and w 2 in Equation 23.
Let h t =
( x 0: t , z 0: t , a 0: t − 1 ) contain the history of the simulated patient covariates representing disease progression x and side effects z .
Let h t +1 =
( x 0: t +1 , z 0: t +1 , a 0: t ) be the new history after taking action a t given h t and let r t =
R ( h t , a t ) be the corresponding reward.
We again learn the Q − values iteratively by updating the current estimate of the Q − values for history h t towards the reward plus the maximum Q -value over all possible actions in the next history h t
+1 .
[Equation]
(22) where α is the learning rate and γ is the given discount factor.
We approximate the action-value function Q ( h t , a t | θ e ) using an RNN parameterized by θ e .
We use an LSTM (Hochreiter & Schmidhuber, 1997) unit as part of the RNN with a liner output activation for estimating the Q -values.
We use the standard practices for training Q − networks (Mnih et al., 2013; Hausknecht & Stone, 2015).
Let E = { ( h t , a t , r t , h t +1 ) } Et =0 be the experience replay memory of maximum capacity E obtained by simulating patient trajectories from the environment.
During training, the Q − learning agent selects and executes actions in the environment using an ε − greedy policy that follows the greedy policy a = arg max a (cid:48) Q ( h, a (cid:48) | θ e ) with probability 1 − ε and selects random action with probability (cid:15) .
The trajectories obtained from the agent’s behaviour are added to the experience replay memory which is then used to train the Q − network.
At each training iteration, we sample a batch B of examples from E .
Moreover, we use a target network ¯ Q with parameters θ − e to provide the updates to the main network.
The target network ¯ Q is the same architecture as the main network Q and its parameters θ − e are updated to match θ e every M − iterations.
The purpose of the target network is to stabilize training.
We use the following loss function for the Q − learning update at iteration i :
[Equation] [Equation]
(24) where α is the learning rate and y e,i =
[Equation]
, if patient trajectory terminates at timestep t
[Equation]
) , otherwise (25) is the stale update target obtained from the target network ¯ Q .
We perform M training iterations.
Table 7 indicates the search ranges used for the various hyperparameters involved in the deep recurrent
Q − learnign algorithm.
We selected hyperparameters based on the cummulative reward obtained from the learnt optimal greedy policy in the simulated environment.
[Table]
After training the Q − network we create a batch dataset D containing 10000 trajectories from the following stochastic expert policy:
[Equation]
(26) where κ is a parameter that introduces time-dependent confounding bias in the expert policy.
F I MPLEMENTATION DETAILS CIRL
The CIRL algorithm replies on using a counterfactual model to estimate the potential outcomes
E [ Y [ a ] | h ] which are used to deﬁne the reward and to estimate the feature expectations.
For this, we use the Counterfactual Recurrent Network (Bica et al., 2020a) which removes the bias from the time-dependend counfounders by building a balancing representation that is invariant to the treatment received by the patient at each timestep.
Refer to (Bica et al., 2020a) for details about the model architecture.
Note that alternative counterfactual models can be used for this purpose (Lim et al., 2018).
For each simulated batch observational dataset, we use 9000 samples for training the Counterfactual
Recurrent Network and 1000 for validation (hyperparameter optimization).
We perform hyperparameter optimization for the counterfactual model using the hyperparameter search ranges described in Table 8.
We select the model that has the lowest error in estimating the factual outcomes on the validation dataset.
Network.
C is the size of the input and R is the size of the balancing representation built by the Counterfactual Recurrent Network.
[Table]
In the CIRL algorithm, we set the maximum number of iterations to 50 and the convergence threshold (cid:15) to 0 . 001 .
The experiments were run on a system with 2 NVIDIA K80 Tesla GPUs, 12CPUs, and 112GB of
RAM.
G I MPLEMENTATION DETAILS BENCHMARKS
For benchmarks, we integrate as part of the proposed batch inverse reinforcement learning algorithm model-based policy evaluation reinforcement learning methods that use standard supervised learning approaches to estimate the next history (Nagabandi et al., 2018).
These methods use standard supervised learning to estimate the next history h (cid:48) needed for the counterfactual µ -learning algorithm and for ﬁnding the optimal policy given a vector of reward weights.
Our MB ( h ) benchmark uses a standard RNN to estimate the next history and deﬁne the policy, while MB ( x ) uses a multilayer perceptron (MLP) that only considers the current observations for this purpose.
The aim of these benchmarks is to highlight the importance of handling the the bias from the time-depdendent confounders and using a suitable counterfactual model, but also the importance of handling the patient history.
For each simulated batch observational datasets, we use 9000 of the samples for trainign andfor validation.
We chose hyperparameters according to the error of the models in estimating the next patient history on the validation set.
The MB ( h ) benchmark receives as input the patient history h t and current action a t and estimates the next observations x t +1 which are used to form the next history h t
+1 .
For this purpose, the MB ( h ) benchmark uses an LSTM unit, with a fully connected layer (FC) on top with ELU activation.
The hyperparameter search ranges used for this model are described in Table 9.
[Table]
Conversely, the MB( x ) benchmark receives as input the current patient observation x t and current action a t and is trained to estimate the next observation x t +1 .
The MB( x ) uses a multi-layer perceptron with two fully connected layers and ELU activation.
The hyperparameter search ranges used for this model are described in Table 10.
[Table]
H E VALUATING ACCURACY ON MATCHING EXPERT ACTIONS
The accuracy on matching the expert policy is computed as follows.
Consider running the expert policy π e in the environment and obtaining a test dataset with N trajectories: D t = { ζ i } Ni =1 , where each ζ i =
( x i 0 , a i 0 , . . .
x iT i − 1 , a iT i − 1 , x iT i ) has length T i .
Let ˆ a t be the action selected by the policy ˆ π recovered by CIRL for history h t
=
( x 0: t , a 0: t − 1 ) .
The accuracy for matching the expert policy is equal to 1 N (cid:80) Ni
=1 ( 1 T i ( (cid:80) T i t
=
I [ a t =
=
ˆ a t ])) .
I L IMITATIONS AND INTERACTION BETWEEN COUNTERFACTUAL MODULE AND CIRL
We illustrate in Figure 5 how the different components in our method interact and which are their limitations.
[Equation]
Possible limitations: - handling large actions spaces - handling high dimensional patient covariates
Limitations: - linear rewards - time-invariant
P
[Equation]
r
[Equation]
ce
[Equation]
e
[Equation]
(a) Counterfactual model (b) CIRL
[Equation]