Evaluating Reinforcement Learning Algorithms in Observational Health Settings

05/31/2018 ∙ by Omer Gottesman, et al. ∙ 4

Much attention has been devoted recently to the development of machine learning algorithms with the goal of improving treatment policies in healthcare. Reinforcement learning (RL) is a sub-field within machine learning that is concerned with learning how to make sequences of decisions so as to optimize long-term effects. Already, RL algorithms have been proposed to identify decision-making strategies for mechanical ventilation, sepsis management and treatment of schizophrenia. However, before implementing treatment policies learned by black-box algorithms in high-stakes clinical decision problems, special care must be taken in the evaluation of these policies. In this document, our goal is to expose some of the subtleties associated with evaluating RL algorithms in healthcare. We aim to provide a conceptual starting point for clinical and computational researchers to ask the right questions when designing and evaluating algorithms for new ways of treating patients. In the following, we describe how choices about how to summarize a history, variance of statistical estimators, and confounders in more ad-hoc measures can result in unreliable, even misleading estimates of the quality of a treatment policy. We also provide suggestions for mitigating these effects---for while there is much promise for mining observational health data to uncover better treatment policies, evaluation must be performed thoughtfully.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Motivation

Much attention has been devoted recently to the development of machine learning algorithms with the goal of improving treatment policies in healthcare. Reinforcement learning (RL) is a sub-field within machine learning that is concerned with learning how to make sequences of decisions so as to optimize long-term effects. Already, RL algorithms have been proposed to identify decision-making strategies for mechanical ventilation (Prasad et al., 2017), sepsis management (Raghu et al., 2017) and treatment of schizophrenia (Shortreed et al., 2011). However, before implementing treatment policies learned by black-box algorithms in high-stakes clinical decision problems, special care must be taken in the evaluation of these policies.

In this document, our goal is to expose some of the subtleties associated with evaluating RL algorithms in healthcare. Specifically, we focus on the observational setting, that is, the setting in which our RL algorithm has proposed some treatment policy, and we want to evaluate it based on historical data. This setting is common in healthcare applications, where we do not wish to experiment with patients’ lives without evidence that the proposed treatment strategy may be better than current practice.

While formal statistical methods have been developed to assess the quality of new policies based on observational data alone (Thomas and Brunskill, 2016; Precup et al., 2000; Pearl, 2009; Imbens and Rubin, 2015), these methods rely on strong assumptions and are limited by statistical properties. We do not attempt to summarize this vast literature in this work, rather, we aim to provide a conceptual starting point for clinical and computational researchers to ask the right questions when designing and evaluating algorithms for new ways of treating patients. In the following, we describe how choices about how to summarize a history, variance of statistical estimators, and confounders in more ad-hoc measures can result in unreliable, even misleading estimates of the quality of a treatment policy. We also provide suggestions for mitigating these effects—for while there is much promise for mining observational health data to uncover better treatment policies, evaluation must be performed thoughtfully.

2 Running Example: Managing Sepsis in the ICU

There exist many healthcare scenarios in which treatment involves a series of decisions. To make the remainder of the document concrete, we will use sepsis management as our running example. Below, we first describe the sepsis management setting and then describe how we formalize the clinical problem into the reinforcement learning framework.

Specifically, we consider decisions around when and how much vasopressor and IV-fluids should be administered to patients with sepsis. In this setting, identifying a good treatment strategy is challenging because the true outcome of interest, mortality, may not be observed for days after a series of decisions are made, and shorter term goals (such as maintaining a particular blood pressure level), may not necessarily correlate strongly with better mortality outcomes. Patients in critical care settings also generate a large amount of data, and it may not be immediately obvious what parts of a patient’s history are most relevant for making the decision.

We use a cohort of sepsis patients curated from the MIMIC III dataset (Johnson et al., 2017; Raghu et al., 2017). The dataset consists of 47 features (including demographics, vitals, and lab test results) measured on 19,275 ICU patients who fulfilled the sepsis-3 definition criteria, namely the presence of a suspected infection along with evidence of organ dysfunction (Singer et al., 2016). Following Raghu et al. (2017), for every patient, each parameter is aggregated at 4-hour intervals. We also record administration of IV-fluids and vasopressors, as well as mortality within 90 days of admission to the ICU. Our goal is to determine, at every 4-hour interval, whether and how much vasopressor and IV fluid should be administered. This problem is challenging because these treatments might have long term effects such as interstitial fluid accumulation and subsequent organ dysfunction following excessive fluid administration.

To apply reinforcement learning techniques to the sepis management problem, we need to define three things: a state space, an action space, and a reward function. The state representation can be thought of all the relevant covariates about a patient at some point in time; these are the inputs to the decision-making system. In general, for each patient, we have a history of their measurements and treatments to date. We define a policy as a mapping from the patient’s history to the next treatment decision. However, working with entire histories can be unweildy; and so reinforcement learning practioners often simplify the problem by defining a simpler set of covariates to summarize the history. In Section 4, we discuss how the choice of summary statistic can impact the quality of the policy learned.

For the action (or treatment) space, we also make some simplifying assumptions. We discretize each of our treatments (IV fluids and vasopressors) into 5 bins, the first representing no treatment (zero dosage), and the rest representing quartiles of the actions prescribed by physicians. The combination of these two actions results in 25 possible treatment choices that we must choose from for every 4-hour interval. Focusing on IV fluids and vasopressors assumes that those are the only treatments that we have control over; the patient may receive other treatments (e.g. antibiotics) but those are out of our scope.

Finally, we must define a reward function. In reinforcement learning, the reward represents the desirability of the immediate outcomes of the action taken, and the goal of an RL policy is to learn the policy which will maximize for all patients the total reward collected over the entire history, , where is the reward received at time , and is the total number of time intervals in the patient’s history. In our analyses, we assume that our decision-making agent receives a reward of zero up until its last action; at the final time interval of the history the agent receives a positive reward if the patient survives and a negative reward otherwise.

Once the state, action, and reward structure of the problem have been formalized, we are ready to start searching for an optimal policy . In reinforcement learning, the quality of a policy is quantified by the expected cumulative rewards, known as the value . If we could implement our treatment policy, calculating the above would be easy: we would simply try our policy on many patients and then compute the average returns (outcomes). However, in many cases, we cannot directly experiment with patients in this way; we first want to estimate how well a policy might perform given historical data. The challenge of computing the value of one policy given another is known as off-policy evaluation and is the subject of this discussion.

3 Why do we need careful evaluation?

Before diving into the sublteties associated with off-policy evaluation, we first provide two illustrative examples of why careful evaluation is needed in the first place.

For the first illustration, we describe what happens when we apply a standard reinforcement learning algorithm to the sepsis management problem above. We observed a tendency of learned policies to recommend minimal treatment for patients with very high acuity (SOFA score). This recommendation makes little sense from a clinical perspective, but can be understood from the perspetive of the RL algorithm. Most patients who have high SOFA score receive aggressive treatment, and because of the severity of their condition, the mortality rate for this subpopulation is also high. In the absence of data on patients with high acuity that received no treatment, the RL algorithm concludes that trying something rarely or never performed may be better than treatments known to have poor outcomes.

For our second illustration, we consider what happens when the RL agent is tasked to only consider when to intubate a patient (and not provided agency over other treatments, such as IV fluids or vasopressors). Limiting the number of treatments makes the RL problem more tractable, but we observed that the RL agent recommended intubation noticably more than clinicians. Upon further inspection, it turns out that the overuse of intubation is a result of a lack of treatment options: the RL algorithm learns to recognize patients who need additional care, and, in the absence of other options, takes the only action available to it. When we trained an RL agent with more treatment choices (mechanical ventillation, IV fluids, and vasopressors), the overuse of mechanical ventillation disappears.

The susceptibility of AI algorithms to learn harmful policies due to artifacts in the data or methodology highlights the importance of evaluation. In the following sections we demonstrate how and when standard evaluation methods may fail to recognize such artifacts, and recommend best practices for evaluation.

4 Challenges with Choosing Representations

The Challenge

As we mentioned in our overview of the sepsis management problem, the first step in applying the reinforcement learning framework to a problem is determining how to summarize a patient’s history into some more manageable covariate that we define as the state representation . In machine learning, this task is known is choosing a representation, because it involves deciding how to represent a patient’s history in a way that retains sufficient information for the task at hand. It is essential that this representation accounts for any variables that might confound estimates of outcomes under the policy (Robins, 2000), that is, we must include any factors that causally affect both observed treatment decisions and the outcome. For example, sicker patients receive more aggressive treatments and have higher mortality. If one fails to adjust for the acuity of the patient, one might erroneously conclude that treatment increases risk of mortality, even when the opposite is true.

Formally, confounding variables represent any information that influenced a decision and had an effect on the outcome of that decision. These variables may include a patient’s entire medical record, their genetic make-up, as well as socio-economic and environmental factors. Unfortunately, it is impossible to verify that all confounders have been measured based on statistical quantities alone (Robins, 2000). Instead, domain knowledge must be applied to justify this claim. Does the clinical researcher, based on their knowledge of the disease, believe that all important factors have been measured? We note that identifying confounding factors is a substantial task even for the simpler problem of making a single treatment decision, and this problem is only aggravated in the sequential setting (Chakraborty and Murphy, 2014).

Moreover, even if all potential confounders have been measured, it is important to ensure that the data structure passed to the RL algorithm retains this information. In particular, as we mentioned before, a patient’s history is a large and often unwieldy object, and thus it is standard practice to compress this history into some features known as the state representation. All RL algorithms assume that the features given to them are sufficient summaries of the entire patient history and will fail if the representation is insufficient. However, identifying such a representation is not straightforward. For example, to make a prediction about a patient’s response to a specific medication such as a vasopressor in the ICU, is it sufficient to recall the last dose administered? The cumulative dose given throughout the ICU stay? Each instance it was given? The correct choice of summary will depend on the specific clinical problem at hand.


To illustrate the sensitivity of RL algorithms to these kinds of representation choices, we decided to use a simple clustering algorithm, k-means, to divide the patient’s current measurements into

clusters. At any point in time, we assumed that the patient’s current cluster was sufficient to summarize their history, and then used the cluster as our covariate to learn a sepsis treatment policy—clearly a simplified view of sepsis, but potentially the innocent kind of simplification we can all imagine making. Next, we repeated the process four times with different random initializations to the clustering algorithm. Across these initializations, the agreement between treatment choices from the four runs and the initial run was only . If we performed the same experiment with clusters and compared the treatment recommendations learned to our base recommendation (), the agreement on treatment with the base recommendation (with ) drops to . This low agreement, even when running the same algorithms with the same data, highlights the need to choose a meaningful representation.

Diagnosing and Mitigating Concerns

While there are some ways in which to ensure that the representation that is learned is adequate (e.g. Shalit et al. (2016)), it is ultimately not possible to ascertain, via quantitive means, whether the data contain all the confounders. When quantitive evaluation is challenging, we must rely on other methods to assess the validity of our ideas. Interpretability is one fall-back when we don’t have quantitative options: one should always ask expert clinicians whether the final state representation seems reasonable for decision-making or is missing important information.

5 Challenges with Statistical Evaluation


Once we have a state representation (Section 4, there is still the question of how to evaluate the treatment policy recommended by the RL algorithm given only observational data. A large class of off-policy evaluation methods are built on the principle of importance sampling (IS). At their core, given a large batch of retrospective data observed under the clinician policy , these methods assign weights to individual samples to make the data appear to be drawn from the evaluation policy, . The basic importance sampling estimator of is given by:


where denotes the history of patient , and is the total number of patients.

The weights in (1) tell us how important the sample is for estimating . In the basic IS estimator, this corresponds to how likely it is to observe the history is under the RL-based policy compared to how likely it is under the clinician policy:


with being the number of time steps in history , and and

being the probabilities of taking at time

action given state representation under the RL algorithm’s and clinician’s policies, respectively. Intuitively, when the clinician takes actions that the RL algorithm does not, the weight attributed to that trajectory and outcome will be small. In this way, IS-based methods can be thought of as sub-sampling the trajectories from the observational data that match the treatment policy recommended by the RL algorithm.

A short calculation shows that the IS estimator is an unbiased estimator of

—given enough samples, we obtain the correct value (Precup et al., 2000). However, when the evaluation policy is deterministic, i.e. is one for one action and zero for all others, the only histories with non-zero weight are those in which all observed actions match the actions proposed by the evaluation policy—all other samples are effectively discarded. As a result, the number of informative samples may be very small if and differ significantly, and the variance of the IS estimator will be high. To overcome this, there exists a large body of work on striking beneficial tradeoffs between bias and variance in off-policy evaluation estimators (Precup et al., 2000; Jiang and Li, 2015; Thomas and Brunskill, 2016). The details of each estimator are given in the provided references, but the point we emphasize here is that all of them are unreliable for evaluation in the sepsis management problem for two main reasons:

  • Outcomes are sparse in time: our histories can have up to 20 time-steps in which decisions are made, but we only see the outcome (mortality) at the end. (In contrast, a problem involving glucose management in diabetes might involve a reward for staying in range at every time step.) Having sparse outcomes makes it challenging to assess the value of an individual treatment decision; often, we can only make assessments about a collection of decisions.

  • Unless the (deterministic) policy we wish to evaluate is very similar to the one already used by physicians, most of the weights will be zero—only a tiny fraction of histories in the data will have all the treatments that our policy recommends. In the absence of an intermediate reward signal, we need to find entire sequences that match to uncover whether the treatment was successful.

The combination of these properties results in few samples being assigned non-zero weight, which in turn results in high-variance estimates of the quality of the evaluation policy.


We now illustrate the consequences of the challenges above in our sepsis management case study. We test the performance of four modern importance sampling methods on the dataset described in Section 2: per-decision importance sampling (PDIS), weighted per-decision importance sampling (WPDIS) (Precup et al., 2000), doubly-robust (DR) (Jiang and Li, 2015), and weighted doubly-robust (WDR) (Thomas and Brunskill, 2016). The weighted methods trade increased bias for reduced variance, while the per-decision methods reduce variance by computing the weights in a way that does not penalize the probability of a current action based on future ones. Doubly robust methods leverage an approximate model of the reward function to reduce variance.

In the experiments below, we defined the state representation based on clustering the patient’s current observations into clusters. This definition was kept constant throughout the experiments. Next, we randomly partitioned the data 50 times into training sets (80% of the data) and test sets (20%) and learned a treatment policy based on the training set. We then estimated the value of this optimal policy with the test data using the off-policy estimators described earlier. For every partitioning, we also computed a model-based value estimate by building a model from the training data. Model-based estimates are biased, but often have less variance than IS-based estimators.

Figure 0(a) shows box plots representing the distribution of values of the estimators obtained for different random partitionings of the cohort (top) and for different policies (bottom). We observe (Figure 0(a)) that the unweighted estimators have very large variance—many orders of magnitude larger than the possible range in which the actual value of the policies might lie. This is typical of the unweighted versions of the IS algorithms when data is too sparse, and we therefore turn our attention to the weighted estimators, in spite of the bias they introduce (Precup et al., 2000). It is important to point out that such large variance in unweighted estimators raises red flags about placing too much confidence in the weighted version of the estimators as well. The variance of the model-based estimate, as expected, is much smaller (Figure 0(b)), but is quite optimistically biased111For a discount factor of , average sequence length of time-steps, reward for a patient’s survival and for death, an estimate of the value of a policy as a function of cohort mortality rate, , is . This value may be made more accurate by taking into account the full distribution of patients ICU stay lengths for both survivors and non-survivors. For our cohort mortality of the expected value of the physicians’ policy is 30, which is consistent with the results shown in Figure 0(c). The model-based value approximation of 50 already corresponds to a zero mortality rate, and the model-based approximation of can be thought of the model expecting to have zero mortality rate and being able to reduce ICU stay to less than 6 time-steps on average.. The weighted importance sampling methods give more realistic estimates of the policies values, and, as expected, the WDR method has smaller variance than the WPDIS, even though both of them have approximately the same mean.

To understand if these importance sampling methods are useful for policy evaluation we investigate whether they allow us to confidently differentiate between the performance of different policies. In Figure 0(c) we compare the WDR estimates for the values of four different policies: the RL-based policy from our model, the physicians’ behavior policy, a policy which takes actions uniformly at random, and a policy of never giving any treatment. The value of the physician’s policy is estimated with high confidence, which is expected, as in this case our evaluation reduces to an on-policy evaluation. The RL-based policy is the only one for which the bounds on the estimated value is relatively tight and larger than the value of the physicians’ policy. ( to quartile box small and above the mean for the physician’s policy, in contrast to the large boxes extending to well below the physicians’ policies for the random and no-action policies). That said, all of the policies have relatively close median values and large variances, making it hard to draw definitive conclusions. Moreover, because the WDR estimator uses a model to reduce variance, it also inherits the optimistic bias of the model—note that the model-free WPDIS estimator in Figure 0(d) has larger variances and the possible dominance of the RL algorithm’s policy has vanished.

Figure 1: Policy value estimates. All boxes represent results over 50 random partitionings of the data into training (80%) and test (20%) set. (a) Estimates (log of the absolute value) of the value of the optimal policy learned by our model using different estimators. The unweighted estimators give results which are unrealistic by many orders of magnitude. (b) True values (not logged) of a subset of the data shown in (a). The IS estimators have a large variance, but give more realistic estimates than the model-based estimator. (c-d) Estimates of the values of different policies using the WDR (c) and WPDIS (d) estimators. While the results are noisy and inconclusive, the WDR estimator suggests that the model-based optimal policy outperforms other policies.

The estimates of the model-free WPDIS estimator in Figure 0(d) also demonstrate how unexpected biases can creep into the IS methods. The surprising feature in Figure 0(d) is that the policy of never treating patients seems to be outperforming all other treatment policies. This phenonoma occurs because the numerator of the importance weights is a product of , which, for a deterministic policy, is a product of 0’s and 1’s. The only sequences retained in the estimate are ones in which the patient receives no (IV fluid or vasopressor) treatment. These patients form a lower risk group, and therefore the WPDIS method suffers from a selection bias which causes it to predict a much lower mortality rate under the no-treatment policy.

Diagnosing and Mitigating Concerns

The illustration above emphasizes one of the most important practice recommendations when using any of the importance sampling methods: always examine the distribution of the importance weights. We demonstrate such analysis in Figure 1(a). For our data, for example, the test data includes 3855 patients. However, the average effective sample size, i.e. the number of patients for which the importance weight is non-zero under the learned policy is only 25. Furthermore, the average length of stay of such patients is 3.7 time-intervals, whereas the average ICU stay in the data is 13 time-intervals. Even for a policy which takes in every state the action most commonly used by physicians (i.e. the deterministic policy which is as close as possible to the physicians’), the average effective sample size is only 167 out of the 3855 patients in the cohort, and the average ICU stay for these patients is 6 time-intervals. These results demonstrate that even in the best case scenario only a very small fraction of the data is actually used in the IS methods, and examining the distribution of importance weights can give us a sense of how much the IS estimates can be trusted.

Figure 2: Analysis of useful sequences for IS evaluation. (a) The log of the number of sequences in the data compared with the number of sequences for which the physicians action are in full agreement with the actions recommended by the optimal policy from the model, and from a deterministic policy which always takes the most common action used by physicians. (b) Mean lengths of the sequences found in (a). As long as we try to evaluate a deterministic policy, even in the best case scenario the IS methods use only a small fraction of patients’ data, and these are usually uncharacteristic patients with very short ICU stays.

A way to increase the robustness of IS estimators is to evaluate non-deterministic policies. If more than one action per state has a non-zero probability of being recommended, the fraction of the data which is attached to non-zero importance weights will be significantly increased. In terms of application of these policies to health-care, given a patient’s state, a physician will see a variety of possible treatment recommendation, each with its own level of confidence, and the clinician will need to use their own judgment to choose between the most recommended actions. Having clinicians exercise their own judgment in whether or not to adopt an algorithm suggestion might be desirable in its own right, and therefore introducing such a constraint on the learned policy may be beneficial not only for the purpose of evaluation.

6 Challenges With Ad-Hoc Evaluation Measures


Due to both the mathematical sophistication and data-related concerns associated with statistical off-policy evaluation, other works choose to use more direct measures of policy performance. In this section, we consider a class of measures that we call the U-curve method (Raghu et al., 2017; Prasad et al., 2017), which is based on the idea of associating the difference between the clinician’s policy and the evaluation policy with some outcome, such as mortality. If this association is positive, the reasoning goes, then it must mean that when there is no difference—that is, when the clinician’s action agreed with the suggested action—outcomes were the best.


We apply this method to compare the RL-learned policy from the previous section to the clinician policy. Figure 3 plots the average mortality rate of patients as a function of the difference between the dosage recommended by a learned optimal policy and the actual dosage given to the patients. Both plots demonstrate a characteristic ‘U’ shape, with the lowest mortality attained for zero dosage differences, indicating that patients are more likely to survive the closer the treatment they are given is to the treatment the learned policy would have recommended. This observation appears to support the utility of the learned policy.

Figure 3: Mortality vs. deviation from the dose recommended by the optimal policy learned from the model. Without careful analysis, the characteristic U-shaped plots seem to predict the learned policy to significantly outperform the clinicians’ policy.

However, upon a closer inspection of the data we see that such an observation can easily be an artifact of confounding factors and the way actions are binned. In Figure 4 we plot the same data as in Figure 3, but overlay it with similar plots for two obviously suboptimal treatment policies: a policy which assigns a completely random action to every patient, and a policy in which patients never receive any treatment. The plots exhibit the same U-shaped curves even for two obviously bad policies, and in the vasopressors case the results for all three policies are indistinguishable.

Why does this happen? Let us consider the no-treatment policy. The u-curve for this policy simply demonstrates the correlation between dosage given to patients and mortality. This correlation is intuitive: sicker patients with a higher risk of mortality are given higher treatment dosages. The remaining u-curves appear to be similar to the no-action policy because of the way continuous actions (dosages) are binned into discrete values. For every treatment, one bin represents no treatment, and the other four bins represent four quartiles of the dosages in the data. Because the given dosage is exponentially distributed (see Figure 

5), the medians dosages (red diamonds in Figure 5) for all but the last quartile are negligible on the scale of the x-axes of the u-curves, and therefore for this binning of the actions, the u-curves are replicas of the no-action curves with the exception of patients for whom the maximal dose possible was recommended.

Diagnosing and Mitigating Concerns

It is possible to try and avoid this affect by choosing bins of equal sizes rather than quantiles and focusing only on a narrower range of actions, but care must be taken since in that case nearly all of the observations will be assigned to the first few bins, and the observations for the more severe patients will be very sparse. In general, we recommend that it is best to avoid these ad-hoc methods; as with the question of learning a state respresentation, when quantiative evaluation is challenging we should turn to feedback and checks of face-validity from expert clinicians and the clinical literature.

Figure 4: Mortality vs. deviation from the dose recommended by the optimal policy learned from the model, as well as a random policy and a no-action policy. The performances of all policies look remarkably similar. The binning of actions into dosage quartiles (see also Figure 5) results in the learned policy’s dosage recommendation be insignificant for most data-points in these plots.
Figure 5: Histogram of dosages recommended by clinicians’. The recommended dosages have a long tail, making the medians of all but the last quartiles very close on the scale of possible dosages.

7 Recommendations for Researchers

Given the challenges above, what are we to do? Retrospective critical care data sets such as the one we described are a gold mine of information, and to dismiss them entirely would be the equivalent of telling a clinician to avoid learning from their colleagues and focus only on their own experience. Just as it is unethical to present sloppy research results, it is also unethical to not leverage data that could improve patient health. Below we summarize the issues discussed in this paper and provide several recommendations for researchers working on questions involving optimizing sequential decisions in the healthcare domain.

Design data collection and representation to support causal conclusions.

To justify clinical adoption of policies learned from observational data, it is critical that any causal conclusions are supported by the data used by the learning algorithm. This is a process that should be guided by domain knowledge, as claims that all confounding variables have been accounted for cannot be made based on statistical quantities alone. Instead, researchers should strive to collaborate with practitioners to verify that any information that guides current practice has been sufficiently well recorded. In addition, it is equally important that any model or variable selection that follows data collection preserves such information. Efforts to reduce variance through dimensionality reduction may introduce confounding bias if confounders are left out of the analysis.

Limit yourself to actions that were taken and policies that are similar to physicians’.

At its core, we cannot evaluate things that we have not tried. It is easy for algorithms to become overly optimistic (or in some cases, pessimistic) about actions rarely performed in practice on particular patients. Therefore, all studies should limit themselves to decisions that have sufficient data to be evaluated. Conceptually, this is quite reasonable. We cannot expect, from retrospective data, for an AI to identify an amazing treatment policy that was never tried by clinicians but somehow “hiding” in the data: AI is not magic. However, we can use AI to identify which decisions, of those taken, were best, and thus create a decision support tool that helps clinicians mimic the best doctors at their best moments. To take that practice of caution a step further, we should try to evaluate policies which are not too dissimilar from physicians, and could be evaluated more accurately using statistical tools such as importance sampling estimators.

Combine an understanding of the limitations of AI algorithms and evaluation methods to calibrate expectations and define goals accordingly.

More broadly, if we understand the limitations of existing methods, we can use AI algorithms to perform more modest tasks which could still be of tremendous use in medicine. For example, current algorithms using available data are well suited to build treatment recommendation systems or suggest small changes to existing policies which are worth exploring further.

Be cognizant of effective sample sizes.

Most state of the art off-policy evaluation methods today use some sort of importance sampling estimate. As discussed in section 5, when we use these methods to evaluate deterministic policies, the number of sequences with non-zero weights decays exponentially with the length of sequences. As a result, it is very common for the effective number of samples used to evaluate a policy to be only a small fraction of the actual cohort size. We should therefore make sure the effective sample sizes used to evaluate policies is large enough for our evaluations to be statistically significant. Limiting ourselves to policies that are similar to physicians’, as discussed above, will also be beneficial for increasing the effective sample size.

Interpret the features that are being used by the policy, and also where the policies differ from what was done.

Finally, as we have alluded many times, not all problems can be solved by fancier RL algorithms or fancier RL evaluation techniques. Currently, RL algorithms usually operate as black boxes—they receive a set of data as input, and output a policy. These policies are often difficult to interpret and it is usually hard to discern which features in the data resulted in the specific suggestion for an action. Uninterpretable policies are of concern not only because they do not allow experts the opportunity to identify errors and artifacts, but also because they can slow adoption as clinicians are (rightly) unlikely to attempt treatments lacking in clinical reasoning.

Recent works have recently addressed the issue of modifying ML algorithms to produce more interpretable predictions (Vellido et al., 2012; Doshi-Velez and Kim, 2017; Lipton, 2016; Wang and Rudin, 2015) and some have tackled the specific problem of interpretability of ML in the healthcare domain (Caruana et al., 2015). More recently some works have also specifically attempted to address the problem of interpretability in RL algorithms (Maes et al., 2012; Hein et al., 2017). There are a variety of ways to interrogate policies suggested by agents: we can consider what are the input features that most affect the output recommendation, and do changing the inputs change the recommendation in expected ways? What features are most predictive of there being a difference between the recommendation and the clinician’s action? Dependence on inputs that are clearly irrelevant from a clinical perspective can be a useful signal that something is wrong.

Finally, expert evaluation should be performed not only on the final policy but at every stage of the learning process. For example, the representation of states can be evaluated to check that states represent meaningful sub-groups in the population. Domain expert input is important in setting up the RL problem, in particular in choosing the reward scheme. The performance of all RL algorithms will depend on what outcome they are designed to optimize for, and thus clinicians should weigh in on questions such as whether short term goals such as keeping patients’ vitals within a certain range will translate into desirable long-term outcomes such as mortality. RL is a powerful tool which can allow us to improve and refine existing treatment policies, but clinical experts must still be called upon to exercise their judgment and expertise.

8 Conclusions

This article raises more questions than it answers: evaluation, especially of sequential decisions, on retrospective data is a fundamentally hard problem. We hope that by exposing these issues, we create an informed community of researchers who understand both the promise and the challenges of working with such data. We hope that readers will be inspired to think deeply about careful evaluation, and we spark a conversation on best practices for research in this area.