{'fraction_non_alphanumeric': 0.02673382409918636, 'fraction_numerical': 0.008291359938008523, 'mean_word_length': 4.914757103574702, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Learning to Act: Novel Integration of Algorithms and Models for Epidemic Preparedness

In this work we present a framework which may transform research and praxis in epidemic planning. Introduced in the context of the ongoing COVID-19 pandemic, we provide a concrete demonstration of the way algorithms may learn from epidemiological models to scale their value for epidemic preparedness. Our contributions in this work are two fold: 1) a novel platform which makes it easy for decision making stakeholders to interact with epidemiological models and algorithms developed within the Machine learning community, and 2) the release of this work under the Apache-2.0 License. The objective of this paper is not to look closely at any particular models or algorithms, but instead to highlight how they can be coupled and shared to empower evidence-based decision making.


INTRODUCTION
This work provides a concrete example of a new paradigm to inform decision support processes in a public health context. Public health professionals are expected to engage in evidence-informed decision making to advise their practice (Petticrew et al., 2004;Yost et al., 2014). As indicated in Nutbeam (2001), evidence is required from a variety of sources including expert knowledge, existing domestic and international research, stakeholder consultation, and even assessment of existing policies. While it is rational to expect evidence to be used, challenges in evidence based decision-making are ever present. Today, very few decisions have complete information, the simplest decisions often have innumerable outcomes which are ultimately uncertain. For high impact decision making, such as epidemic planning, though of great importance, it is not possible to evaluate all possible options, or completely characterize their uncertainty. Many turn to modeling as a mechanism to generate insights about what could potentially happen, and consider model output as informative in the decision making process. It is well known that all models can be considered to be 'wrong' (Ioannidis et al., 2020), and in some cases have led to ill conceived actions being considered, but it has also been shown that when properly contextualized, even these incorrect models can be useful (Holmdahl & Buckee, 2020).
In this work we demonstrate an approach to harness epidemiological models to generate evidence which can inform decision making. We utilize Machine learning algorithms from a range of classes (from RL, to Optimization, to Planning). Our aim is not to focus on model validity as defined in Petticrew et al. (2004), nor the non-technical issues related to adoption of the insights generated from these models Liverani et al. (2013), nor even to adjudicate which model (or algorithm) is 'best'. Our goal is to show the community how models can be connected with these algorithms in a flexible manner which will support integration of multiple classes and implementations of models. What we champion here will also provide a mechanism to realize a repeatable infrastructure to generate insights, not just for COVID-19, but for any decision making process which can be informed by multiple models and data sources. The resources we describe in this work have been released via a public GitHub source repository 1 which serves as both an installation point and templates for continued extension. The key abstraction presented in this work wraps domain models in OpenAI Gym environments, exposing the STEP method as a connection between models and algorithms.

METHODOLOGY
In this project we utilize the framework presented in Wachira et al. (2020) to access models at scale with transparency and trust. This framework enables API mediated access to a suite of models. Containerized models are deployed on-demand, and configured at runtime to use the input parameters defined by the user. The framework marshals the use of the model and the associated data in a manner that gives both the users and owners of these assets confidence in the output which is generated. Moreover, the framework permits data collected by different algorithms, and possibly even at different times, to be shared. Every additional execution of an algorithm contributes to the pool of knowledge which exists about the models. Finally, the framework also supports the flexible integration of input into a format which can be consumed by the specific models which are available.
For the larger project in which this work is situated, we select models provided by modelers from different communities. In this manuscript we will only highlight the use of two types of models: compartmental models (Brauer, 2008;Edlund et al., 2011) and agent based models (Macal & North, 2009;Kerr et al., 2020) as they are both widely used by epidemiologists across a variety of domains. For these instances of COVID-19 models referenced in this work, the countermeasures (or interventions) are captured as sequences of parameter values. In the first framing, we permit the actions (e.g. physical distancing, mask wearing, vaccination) to directly change model parameters like transmission rate, recovery rate, and the death rate. In an alternate framing, we also link model parameters to the Stringency Index (Hale et al., 2020), a metric which captures the impact that a particular set of countermeasures has on disease progression. These framings represent distinct implementations of models specifically either for model predictions or assessing the impact of control policies.
Listing 1: Sample code instantiating an environment with access of the STEP method on line #4. The crux of the contribution of this work lies in encapsulating the epidemiological model into an OpenAI Gym environment. In this case, when the step method is provided with an action (see Listing 1), the model is able to run and provides information indicating what occurred (the observation), and a metric capturing the goodness of the action (the reward). Other metadata is provided as well, but it is out of the scope of this paper. Depending on the definition of the environment, the action can be a single intervention or a sequence of interventions.
In this project we have successfully harnessed algorithms from multiple domains of the Machine Learning spectrum. From Reinforcement Learning (Watkins & Dayan, 1992;Keerthi & Ravindran, 1994;Mnih et al., 2013) to Optimization (Srinivas et al., 2009;Contal et al., 2013), they have all been implemented utilizing the step method of the environment to access the reward function (and in some cases the observations of the model states) when presented with an action/intervention to evaluate. An example of these algorithms in seen in the psuedocode for Bayesian optimization presented in Algorithm 1. Due to space constraints, we omit discussion of the algorithm itself, but refer the curious reader to Contal et al. (2013) for further details.

RESULTS
What are the most cost effective ways to "flatten the curve"? If there is a fixed amount of money which can be allocated to interventions over the next three months, what sequence would be best? If you wish to simplify your policies, which reduced sets of interventions are most impactful? To address any of these questions using model derived evidence, one must first calibrate the model to Result: Policy π greedy = argmax (v π (θ gp )), wherev π (θ gp ) ≈ v π Initialise GP priors, θ GP 0 for i = 1,2, ..., end do if i ≤ k then select π i = rand(π) else select π i = argmax(α(v π (θ gp i−1 ))), where α is the acquisition function end R i = step(π i ) end Update GP Posteriorv(θ gp i ); mean m i (π); co-variance function k i (π); Algorithm 1: An Implementation of Bayesian Optimization using the STEP method. data for the location in question, and then one can utilize an environment which provides the reward functions relevant to the particular question.
As indicated previously, the same algorithms can be applied with the multiple algorithm types and model types (through the use of the respective environments). Moreover, for each model, there were environments for calibration and optimization with various objective functions. A subset of the combinations is included herein for brevity. Figure 2 shows the results of calibrating the parameters three different models to the same data, utilizing Algorithm 1. In each case the algorithm was able to identify reasonable fits, even though the structures of the models were quite different. : Calibration of three environments to the same case data (in this case using more data than is typically available). In each calibration, the results consider learning 20 sets of parameters.
The reward function in the case of calibration is the error between the data and the observed model output. The actions permit the algorithms to set the values of the calibration parameters. By changing the reward function to represent different properties, for example, the number of cases, and changing the actions to modify the transmission rate, another environment can be created permitting the same models to help consider the problem of flattening the curve. In this case, the algorithm's role is to find the best set of interventions (the sequence of transmission rates) which minimize the number of individuals who contract the disease (see Figure 3).
In this case, the environment's states are the values from each of the compartments (or the fraction of the population in a given state); the rewards produced are the cumulative incidence for the two week period which each step is assessed for; and the actions are integers in the range [0, 99]. The overall goal is thus to minimize the total number of cases by learning when to vary the stringency of the interventions implemented. In Figure 3, we show the state trajectories (incidence) for two sequences of actions. The first was a very stringent disease management response which was learned, while the other may be considered lenient. In both cases there are individuals in the population who contract the disease, however under the stringent policy, there are much less who do. Also, under this policy, the peak number who are infected at the same time is also lower. This might be considered as an example of the impact of "flattening the curve". Using this type of approach, and by changing the reward function, it would be possible to raise the question of whether there are other intervention programs (sequences of actions) which could have flattened the curve with a lower societal cost.

SUMMARY
In proposing a new paradigm to inform decision support for epidemic planning, we have detailed extensions of epidemiological models to learning environments and the demonstration of learning algorithm performance on such environments. We posit that there is much to consider in the rich space of reward functions which arise from capturing the complexity of decisions in the real-world which are full of trade-offs and balancing competing needs. It is left to be seen whether the algorithms which will be most successful in this problem domain will be similar to those which are dominant in domains such as backgammon, chess, or even those which have physics based dynamics like the cart-pole or walking robots. COVID-19 has shown us that there is still need for research advancement in the process of decision-making being supported by models.
Our primary contribution in this work is the demonstration of how decision makers can access selfcontained resources curated by the relevant experts (e.g. epidemiological modelers and ML experts). The secondary, and equally as valuable contribution is the presentation of the open sourced, OpenAI Gym environments typifying the encapsulation of epidemiological models in a manner which will be illustrative and enable stakeholders to play with the assets themselves, and subsequently to extend them to include models/data/algorithms which are relevant for their context.
In closing, we acknowledge the limitations of models but we still advocate for their use in principled and pragmatic ways. We specifically assert that whether considered in the traditional sense or as we've proposed in this work, any model usage must be in line with the intended manner defined by the model creators, as well as those defined by the users who will consume the output of the model. While we connect models to algorithms by extending the model abstractions to environments, we take care not to violate the underlying assumptions and definitions prescribed by their creators. In our future work we will perform user studies with the aim of characterizing the utility of these resources in practice, and to better understand how to amplify the decision making power of policy makers. Further, we will use in silico means to consider the impact of data integrity on the calibration and optimization results which can be generated using our approach.