<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Model-Based Reinforcement Learning for Type 1 Diabetes Blood Glucose Control</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Taku Yamagata</string-name>
          <email>taku.yamagata@bristol.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Aisling O'Kane</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paul Marshall</string-name>
          <email>p.marshall@bristol.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Amid Ayobi</string-name>
          <email>amid.ayobi@bristol.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Peter Flach</string-name>
          <email>Peter.Flach@bristol.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmitri Katz</string-name>
          <email>dmitri.katz@open.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Katarzyna Stawarz</string-name>
          <email>StawarzK@cardiff.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ra u´l Santos-Rodr´ıguez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Copyright © 2020 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). This volume is published and copyrighted by its editors. Advances in Artificial Intelligence for Healthcare</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we investigate the use of model-based reinforcement learning to assist people with Type 1 Diabetes with insulin dose decisions. The proposed architecture consists of multiple Echo State Networks to predict blood glucose levels combined with Model Predictive Controller for planning. Echo State Network is a version of recurrent neural networks which allows us to learn long term dependencies in the input of time series data in an online manner. Additionally, we address the quantification of uncertainty for a more robust control. Here, we used ensembles of Echo State Networks to capture model (epistemic) uncertainty. We evaluated the approach with the FDA-approved UVa/Padova Type 1 Diabetes simulator and compared the results against baseline algorithms such as Basal-Bolus controller and Deep Q-learning. The results suggest that the modelbased reinforcement learning algorithm can perform equally or better than the baseline algorithms for the majority of virtual Type 1 Diabetes person profiles tested.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Type 1 Diabetes is a chronic condition that is characterized by the
lack of insulin secretion and resulting in uncontrolled blood glucose
level increase [
        <xref ref-type="bibr" rid="ref1 ref9">1, 9</xref>
        ]. High blood glucose levels for extended
periods of time can result in permanent damage to the eyes, nerves,
kidneys and blood vessels, while low blood glucose levels can lead to
death [
        <xref ref-type="bibr" rid="ref19 ref20 ref23">19, 20, 23</xref>
        ]. To manage blood glucose level, people on
multidose injection (MDI) therapy usually take two types of insulin
injections: basal and bolus. The basal is long-acting insulin, which
provides a constant supply of insulin over 24-48 hours, helping
maintain resting blood glucose levels. The bolus is fast-acting insulin
which helps to suppress the peak of the blood glucose levels caused
by meals or to counteract hyperglycemia [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ]. People with diabetes
must make constant decisions of the timing and amount of these
insulin injections, which is often challenging as insulin requirements
for meals can change depending upon many factors such as exercise,
sleep, or stress. The idiosyncratic nature of the condition means that
triggers, symptoms and even treatments are often quite individual
[
        <xref ref-type="bibr" rid="ref18 ref24 ref25 ref26 ref29">18, 24, 25, 26, 29</xref>
        ], which creates challenges to developing diabetes
self-management technologies.
      </p>
      <p>
        In this paper we consider the benefits of using model-based
reinforcement learning (MBRL) to assist decisions about bolus insulin
injections. The goal of reinforcement learning (RL) is to learn
sequences of actions in an unknown environment [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ]. The learner
(Agent) interacts with the environment, observes its consequences,
and receives a reward (or a cost) signal, which is a numerical
number assessing current the situation. The agent decides a sequence of
actions to maximize the reward (or minimize the cost) as shown in
Fig.1. RL is well-suited to this task because it can learn the model
in an online manner with minimal assumptions about the underlying
process of the blood glucose behaviour and hence can adapt to
different individuals or changes over time. MBRL is particularly well
suited to this objective because it is more sample-efficient than
alternative RL approaches (model-free reinforcement learning (MFRL))
and also allows us to generate predictions for consequences of
counterfactual actions that can be used as explanations of the suggestion.
In our MBRL setting, we also can estimate the confidence level of the
predictions by using the prediction uncertainty. It is very important to
show the explanation for the suggestion together with its confidence
level so that the person that receives the suggestion can make a
decision whether they would follow the recommended course of action.
      </p>
      <p>As a first step towards realising such a recommender system, we
investigated how well MBRL can learn the insulin injection
decision and compared it with both a typical MFRL algorithm (deep
Q-Learning (DQN)) and an algorithm that mimics human
decisionmaking (Basal-Bolus controller (BBController)). We used an
FDAapproved Type 1 Diabetes computer simulator and let the algorithms
decide the insulin injections and evaluated its blood glucose level
behaviours.</p>
      <p>
        Our MBRL approach builds upon previous work on Echo State
Networks (ESNs) [
        <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
        ], the ensembles of models for MBRL [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
and model predictive controller (MPC) for artificial pancreas [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ].
However we believe this is the first attempt to combine these
algorithms for the Type 1 Diabetes blood glucose level control task, and
evaluate its performance against non-MBRL algorithms.
      </p>
      <p>This paper is organized as follows. Section 2 introduces related
work regarding the blood glucose control task. Section 3 describes
our MBRL method. Section 4 presents our evaluation method,
benchmark algorithms and the evaluation results. Finally, Section 5
concludes with a summary and possible future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Several attempts have been made for a closed-loop artificial pancreas,
especially in the control system society using MPC [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
proportionalintegral-derivative control [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ] and fuzzy logic [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        However, there are relatively few studies on the blood glucose
levels control task using RL approaches. Most of the early works
employ compartmental blood glucose and insulin models to infer some
of insulin/glucose related internal states of human body, and then
learn its insulin injection policy with relatively simple MFRL
algorithms such as Q-Learning [
        <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
        ] or Actor-Critic [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. Fox et
al. employed more recent RL techniques [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], such as deep neural
networks for the Q-Learning algorithm – arguably the most
common MFRL algorithm. They showed that although the agent was not
given any prior knowledge of the blood glucose/insulin relations, it
learns its insulin injection policy and achieves performance
comparable with existing algorithms.
      </p>
      <p>
        In the field of model-based system control several approaches
exist – we refer the reader to [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and the references therein. The
closest to our work is [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], where the authors use a linear compartmental
model for predicting the mean and variance of the future blood
glucose levels. It exploits MPC for planning by taking into account the
variance of the blood glucose level prediction. The main differences
from our work are: (1) they employ a linear compartmental model
which has a small number of parameters and hence easier to learn,
whereas we use more generic recurrent neural networks, which have
greater flexibility to adapt to any personal blood glucose level
behaviour; (2) their model parameters are learnt off-line, whereas ours
are adjusted online; and (3) the handling of uncertainty – we measure
the model’s uncertainty while they measure the uncertainty involved
in meal events.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Methods</title>
      <p>In order to apply RL algorithms to this problem, we formulate the
task as Markov Decision Process (MDP), which has four tuples
(S; A; p; c) where S is a set of states, A is a set of actions, p is the
state transition probabilities and c is a cost function. Essentially the
blood glucose control task is a Partially Observable MDP, however
we see it as an MDP by defining state S as all history of insulin doses
and carbohydrate intakes.</p>
      <p>
        More precisely, the overall pipeline makes use of ESNs to store
the history in its hidden states, shown in Section3.2. The
corresponding actions A are the dosages of bolus insulin. We exploit the
risk function introduced in [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] as our cost function c, described
in Section 3.1. While we use the model-based reinforcement
learning (MBRL) algorithm with ESNs for the prediction of blood glucose
levels, MPC generates the insulin dose suggestions from the blood
glucose level predictions (Section 3.4) and their uncertainty
estimations (Section 3.3).
3.1
      </p>
    </sec>
    <sec id="sec-4">
      <title>Cost function</title>
      <p>
        For our task, it is natural to use as cost function a measure of risk
associated with the given blood glucose level. However it is not
straightforward to define such a measure, as it presents different
scales of risks between higher than normal blood glucose levels
(hyperglycemia) and lower than normal blood glucose levels
(hypoglycemia). Kovatchev et al. proposed the following expression to
symmetrize the risks of hyper and hypoglycemia [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. This blood
glucose risk function fr is defined as in Eq. 1. The blood glucose
level transition from 180 to 250mg/dl would appear threefold larger
than a transition from 70 to 50mg/dl, whereas these are similar in
terms of the risk function variations.
      </p>
      <p>
        fr(BGL) = 10 1:509 log(BGL)1:084
5:381
2
(1)
where BGL is the blood glucose level in mg/dl. Fig. 2 shows the
mapping between blood glucose level (x-axis) to the risk function
(y-axis). We used the risk function value as the cost function, hence
our RL agent searches a policy minimising the total risk values over
an episode.
ESNs were proposed as an alternative structure of standard recurrent
neural networks in machine learning [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. They are also called liquid
state machine in computational neuroscience [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. ESNs take an
input sequence u = (u(1); u(2); :::; u(T )) by recursively processing
each symbol while maintaining its internal hidden state x. At each
time step t, the ESN takes input u(t) 2 RK and updates its hidden
state x(t) 2 RN by:
x~(t)
x(t)
= f (Win
u(t) + W
x(t
      </p>
      <p>1))
= (1
) x(t
1) +
x~(t);
where f is the internal unit activation function, which is tanh in our
model, Win 2 RN K is the input weight matrix, W 2 RN N is
the internal connections weight matrix and 2 (0; 1] is the
leakage rate, which controls the speed of the hidden states change hence
controls the output smoothness.</p>
      <p>The output at time step t, y(t) 2 RL is obtained from the hidden
states and the inputs by:
y(t) = f out</p>
      <p>Wout hx(t)T ; u(t)T iT
;
(2)
(3)
where f out is the output unit activation function (which is the
identity function in our model as we are dealing with a regression task)
and Wout 2 RL (N+K) is the output weights matrix.</p>
      <p>The matrices for updating the hidden states, Win and W, are
randomly initialized and fixed (not updated during learning process),
only the output weights matrix Wout is leaned to obtain the target
output sequences. As it only learns the output weights, it doesn’t
require back propagation through the network nor time, hence it learns
much faster than the normal recurrent neural networks. The downside
of using ESN is that it requires much higher number of hidden states
to achieve good performance, hence it required more computational
power for inference.</p>
      <p>
        To make ESNs work properly, the fixed weights must satisfy
the so-called echo state property: the internal states x(t) should be
uniquely defined only by the past inputs u(k)jk=:::t [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. The
actual method to initialise the weights can be found in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], which also
gives useful guidance for using ESNs.
      </p>
      <p>ESNs for the blood glucose level prediction task In our work,
the ESN takes a sequence of bolus insulin injection and carbohydrate
intakes as inputs, and predicts the blood glucose level.</p>
      <p>To learn the ESN output weights we use the Mean Squared Error
between predicted and observed blood glucose levels as loss
function.
(t)</p>
      <p>BGL(t))2
(5)
Ld( ) =
1 XT(</p>
      <p>
        T t=1
Here, (t) is the predicted blood glucose level by ESN at time
step t, where is the optimization parameter (here it is Wout) and
BGL(t) is observed blood glucose level. As it can be seen as a
linear regression problem, the output weights are derived by solving the
Normal equation [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
      </p>
      <p>
        To capture model (epistemic) uncertainty, it applies multiple
instances of ESNs, and each of them has different input and internal
connection weights. ESNs are well suited for the ensemble approach
as it has fixed random internal weights which project the inputs
sequence into different hidden states. So naturally they output different
values where there is no training data, capturing higher epistemic
uncertainty. In our evaluation, we employ five instances of ESNs, which
is suggested by [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
3.3
      </p>
    </sec>
    <sec id="sec-5">
      <title>Uncertainty quantification</title>
      <p>We employ multiple ESNs to capture the uncertainty in predicted
blood glucose level. They produce multiple predictions of the blood
glucose levels from the ESN models for each action sequence. To
quantify the cost (risk) of uncertainty, we take the mean of the
cost of the predicted blood glucose levels for each of action
sequence M1T Ptn=+nT 1 PmM=1 c(BGLtm), where c(:) is a cost
function, BGLtm is blood glucose levels prediction from ESN model m
at time step t, and M and T are number of ESN models and
number of time steps in the action sequence. We then select the action
sequence which minimises this mean cost.</p>
      <p>We encourage (optimistic or exploratory approach) or
discourage (pessimistic or safe approach) taking risks by designing the cost
function accordingly. Here we define a risk margin RM as the
difference between the averaged cost function and cost of the averaged
blood glucose level predictions.</p>
      <p>A positive (negative) risk margin means our metric E[c(BGL)]
discourages (encourages) taking risks. If we use a convex cost function
as described in Section 3.1, RM is positive according to Jensen’s
inequality, hence it discourages risks.
Model predictive controller (MPC) is a planning method to facilitate
control of systems with a long time delay and non-linear
characteristics. The MPC uses a prediction model to estimate the consequences
of a sequence of actions and repeats the process for many action
sequences. Then it picks the sequence of actions that gives the best
consequence and applies the first action of the sequence. In the next
time step this process is repeated. This effectively means it re-plans
the sequence of actions based on the latest state information from the
environment, which makes the algorithm robust against any noise or
prediction errors.</p>
      <p>
        There are several algorithms to generate the sequence of actions to
test – such as random shooting [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ] and cross entropy method [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
In our work, we use a fixed table for the sequence of actions to test.
The table has six action sequences, each of which takes a different
amount of bolus injection as its first action. The amount of bolus
injection at the first action is f0, 5, 10, 20, 40, 80g times of the person’s
basal infusion rate. Following the approach of [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], the basal infusion
rate is given for each virtual person’s model, and we use it to scale
the bolus injection. While our model generates suggestions for bolus
injections, for the basal injections, it assumes the person is taking the
given basal infusion rate. The action sequence length (time horizon)
is set to 48 time steps, which is 4 hours long as each time step
represents a five-minute period. Each action sequence has a bolus injection
as the first action of the sequence. We believe this is sensible because
the bolus injections is normally taken just after or before a meal and
there is no meal announcement in our system at moment (the
algorithm does not know the meal event until it happens). Therefore, the
best time to take bolus injection would be immediately after
detecting the meal event, which is the first action in the sequence. A proper
meal announcement mechanism is left for future work.
4
      </p>
    </sec>
    <sec id="sec-6">
      <title>Evaluation</title>
      <p>We empirically evaluated how well the model-based reinforcement
learning (MBRL) can learn insulin injection decisions and compared
it with a typical model-free reinforcement learning (MFRL)
algorithm and also with a non-RL algorithm designed to mimic human
decision-making. In this paper, we did not compare the blood glucose
level prediction accuracy with other prediction models. Instead, we
focused on evaluating the performance of the agents. The overview of
the evaluation system is shown in Fig. 3. We used an FDA-approved
Type 1 Diabetes simulator, which takes meal and insulin injection
information, then outputs a blood glucose level (BGL) as a continuous
glucose monitor (CGM) reading at each time step. The algorithms
(agents) receive the meal, insulin and blood glucose level
information and decides the amount of insulin taking in the next time step.
We simulated the algorithms together with the Type 1 Diabetes
simulator, and evaluated how well the blood glucose levels are managed.
4.1</p>
    </sec>
    <sec id="sec-7">
      <title>UVa/Padova Type 1 Diabetes simulator</title>
      <p>
        The UVa/Padova Type 1 Diabetes Simulator [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] was the first
computer model accepted by the FDA as a substitute for preclinical
trials of certain insulin treatments, including closed-loop algorithms.
      </p>
      <p>
        The model takes carbohydrate intakes and insulin injection as inputs,
simulates human body insulin/blood glucose behaviours and outputs
the blood glucose level measurements. It has gastro-interstinal tract,
glucose kinetics and insulin kinetics sub models. Each of these sub
models is defined with differential equations with parameters to
simulate different individuals. Our simulator is based on an open source
implementation of the UVa/Padova Type 1 Diabetes simulator [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ],
which comes with different profiles for 30 virtual people with type 1
diabetes – ten each for children, adolescents and adults. Our
experiments use nine virtual people, three of each age group.
4.2
      </p>
    </sec>
    <sec id="sec-8">
      <title>Benchmark algorithms</title>
      <p>We used two benchmark algorithms to compare the proposed
approach against, one from RL algorithms (GRU-DQN) and the other
one from non-RL approaches (BBController). These are described
below.</p>
      <p>
        GRU-DQN Deep Q-Learning (DQN) is a common MFRL
algorithm, which learns the action-value function Q(s; a) – expected
cumulative future rewards starting with state s and action a. It then
uses the learned action value function to decide which action to take
at time step t by at = argmaxa2AQ(st; a). In our work, the agent
observes the blood glucose levels from a CGM, carbohydrate intakes
and insulin injections, and infers the action value function. It is a
partially observable model so we used gated recurrent units (GRU)
to infer the hidden states and approximate the action value function.
GRU-DQN was successfully applied to this problem before [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] so
we followed their same set up which involves two GRU recurrent
layers of 128 hidden states and followed by a fully connected output
layer size of 128. However, our our states (the input of GRU-DQN)
include carbohydrate information, whereas [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] does not. We include
it here to make our comparison fair against the MBRL algorithm,
which has acess to the carbohydrate information.
      </p>
      <p>
        BBController Basal-Bolus Controller mimics how an
individual with Type 1 Diabetes controls their blood glucose levels. The
UVa/Padova simulator comes with the necessary parameters for this
algorithm for each of the virtual people with Type 1 Diabetes models,
such as basal insulin rates bas, a correction factor CF and a
carbohydrate ratio CR. The simulator decides the amount of insulin injection
by bas + (ct &gt; 0) (ct=CR + (bt &gt; 150) (bt btgt)=CF ), where
ct is carbohydrate intake at time step t, bt is the blood glucose
measurements, btgt is a target blood glucose level. The last term is only
applied when the blood glucose measurement exceeds 150 mg/dl.
We use the implemented model that comes with the Type 1 Diabetes
simulator [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
4.3
Each episode lasts 24 hours, starting at 6am and finishing at 6am
the next day. Three meals and three snack events are simulated with
some randomness in terms of amount, timing and also whether they
take the meal/snack. The timing follows a truncated normal
distribution and the amount is normally distributed. The meal parameters are
shown in Table 1. The agent receives information from the
environment such as the meal (carbohydrate), insulin and blood glucose
levels, and decides the insulin dose for the next time step. Each time step
is set to five minutes in length. In this evaluation, the person does not
take food to compensate for low blood glucose levels (the meal event
always follows a pre-defined order as described above). While this
is not realistic, it is a good way to measure how well the algorithm
works because ultimately we would like to develop an algorithm that
does not require any corrections from the user. The episode is
terminated if the blood glucose level goes below 20 mg/dl or beyond 600
mg/dl, as these limit are extreme and they are outside of the possible
blood glucose level range considered by [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
4.4
      </p>
    </sec>
    <sec id="sec-9">
      <title>Results</title>
      <p>We train MBRL for 200 episodes and GRU-DQN for 1000 episodes,
then use the last 30 episodes to measure the percentage of episodes
completed without termination due to extreme blood glucose levels.
For BBController, we just run 30 episodes to measure, as it has
preoptimized model parameters and no training is required.</p>
      <p>The results are given in Table 2. MBRL gives better results than
GRU-DQN and comparable with BBController. MBRL struggles
with child#002, #003 and adolescent#002. By looking into these
cases, we found that MBRL fails due to the MPC time horizon not
being long enough. The MPC time horizon is set to 4 hours, hence the
agent could not foresee a possible hypoglycemia event in the early
morning after the person takes an evening meal. The agent suggests
too much insulin, and it causes hypoglycemia in the early morning.
This can be fixed by increasing the MPC time horizon, but requires
some additional consideration as it might lead to inappropriate
suggestions during the day.</p>
      <p>Table 3 shows the percentage of time spent in a target blood
glucose level range (70-180 mg/dl.) These are measured in the last 10 of
the completed episodes(i.e., not terminated). Here MBRL gives the
best overall results compared to the other agents. Note that no data
is available for adolescent#002, as it fails to get any non-terminated
episode (due to the reason described above).</p>
      <p>We also evaluated the effect of the uncertainty estimation by
comparing the results from MBRL with/without it. For MBRL without
uncertainty, we take an average over multiple ESNs predictions to
come up with a single blood glucose prediction, and then we
calculate its cost. Whereas MBRL with uncertainty computes the cost of
the all predictions, then takes average of the costs as described in
Section 3.3.</p>
      <p>Figure 4 shows the learning curves for these two MBRL
algorithms with adult#001. The upper plot shows the episode period,
which goes up to 24 hours if there is no termination, and the
bottom plot shows % of time spent in the target blood glucose range.
From the upper plot, the algorithm with uncertainty achieves “no
episode termination” (24 hours episode) much earlier than the one
without estimating uncertainty. At an early stage of the learning
process, the prediction model is not very accurate, so it is much better
by taking into account its uncertainty. For the later stages, the
predictions become more accurate, hence it shows similar performance
in both cases. Table 4 shows asymptotic results of the percentage of
time spent in the target blood glucose range, indicating that both have
similar asymptotic performances.</p>
    </sec>
    <sec id="sec-10">
      <title>Conclusions and Future Work</title>
      <p>We investigated the use of MBRL to assist Type 1 Diabetes
decisionmaking by evaluating MBRL with the FDA-approved UVa/Padova
simulator. We compared the results with two baseline algorithms,
GRU-DQN and BBController. The results suggest that the MBRL
approach works better than the GRU-DQN algorithm and similar or
slightly better than the BBController. Also, our results show that
taking into account the model uncertainty improves its performance in
the early stages of learning.</p>
      <p>
        There are several avenues for future work. At the present stage we
only tested our algorithms with the UVa/Padova Type 1 Diabetes
simulator, which is good for single meal scenarios but not for multiple
meals [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. This is primarily because the model has fixed parameters
for each person and does not simulate meal-by-meal nor day-by-day
parameter drifting. In addition, our current learning method must be
extended to adapt to parameter drifts. A possible approach for such
an extension would be to introduce meta-learning [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>Another area for further work relates to meal information. We
assumed all meal events are correctly given by the person when the
event is happening; however, this may not be very realistic as it is
a considerable burden for a person to put every single meal event
into the algorithm. It is also hard to know the exact carbohydrate
count of each meal. Some researchers therefore structure the blood
glucose predictor without having a meal input. Another alternative
would be to have a model to back-predict a meal event from the
observed blood glucose levels. We think it is possible to learn the meal
event in conjunction with the blood glucose level prediction model
with occasional human inputs.</p>
    </sec>
    <sec id="sec-11">
      <title>ACKNOWLEDGEMENTS</title>
      <p>This project is funded by the Innovate UK Digital Catalyst Award –
Digital Health and is in partnership with Quin Technology.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Kurt</given-names>
            <surname>George Matthew Mayer Alberti</surname>
          </string-name>
          and Paul Z Zimmet, '
          <article-title>Definition, diagnosis and classification of diabetes mellitus and its complications. part 1: diagnosis and classification of diabetes mellitus</article-title>
          .
          <source>provisional report of a who consultation'</source>
          ,
          <source>Diabetic medicine</source>
          ,
          <volume>15</volume>
          (
          <issue>7</issue>
          ),
          <fpage>539</fpage>
          -
          <lpage>553</lpage>
          , (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Eran</given-names>
            <surname>Atlas</surname>
          </string-name>
          , Revital Nimri,
          <string-name>
            <given-names>Shahar</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Eli A.</given-names>
            <surname>Grunberg</surname>
          </string-name>
          , and Moshe Phillip, '
          <article-title>MD-logic artificial pancreas system: A pilot study in adults with type 1 diabetes'</article-title>
          ,
          <string-name>
            <surname>Diabetes</surname>
            <given-names>Care</given-names>
          </string-name>
          , (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>B.</given-names>
            <surname>Wayne Bequette</surname>
          </string-name>
          , '
          <article-title>Algorithms for a closed-loop artificial pancreas: The case for model predictive control'</article-title>
          ,
          <source>Journal of Diabetes Science and Technology</source>
          ,
          <volume>7</volume>
          (
          <issue>6</issue>
          ),
          <fpage>1632</fpage>
          -
          <lpage>1643</lpage>
          , (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Fraser</given-names>
            <surname>Cameron</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. Wayne</given-names>
            <surname>Bequette</surname>
          </string-name>
          , Darrell M. Wilson, Bruce A.
          <string-name>
            <surname>Buckingham</surname>
            ,
            <given-names>Hyunjin</given-names>
          </string-name>
          <string-name>
            <surname>Lee</surname>
          </string-name>
          , and
          <article-title>Gu¨ nter Niemeyer, 'A closed-loop artificial pancreas based on risk management'</article-title>
          ,
          <source>Journal of Diabetes Science and Technology</source>
          ,
          <volume>5</volume>
          (
          <issue>2</issue>
          ),
          <fpage>368</fpage>
          -
          <lpage>379</lpage>
          , (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Kurtland</given-names>
            <surname>Chua</surname>
          </string-name>
          , Roberto Calandra,
          <string-name>
            <surname>Rowan McAllister</surname>
          </string-name>
          , and Sergey Levine, '
          <article-title>Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models'</article-title>
          ,
          <source>in Advances in Neural Information Processing Systems</source>
          , volume 2018-Decem, (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Chiara</given-names>
            <surname>Dalla</surname>
          </string-name>
          <string-name>
            <surname>Man</surname>
          </string-name>
          , Francesco Micheletto, Dayu Lv, Marc Breton, Boris Kovatchev, and Claudio Cobelli, '
          <article-title>The UVA/PADOVA type 1 diabetes simulator: New features'</article-title>
          ,
          <source>Journal of Diabetes Science and Technology</source>
          ,
          <volume>8</volume>
          (
          <issue>1</issue>
          ),
          <fpage>26</fpage>
          -
          <lpage>34</lpage>
          , (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Elena</given-names>
            <surname>Daskalaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Peter</given-names>
            <surname>Diem</surname>
          </string-name>
          , and Stavroula G. Mougiakakou, '
          <article-title>An Actor-Critic based controller for glucose regulation in type 1 diabetes'</article-title>
          ,
          <source>Computer Methods and Programs in Biomedicine</source>
          ,
          <volume>109</volume>
          (
          <issue>2</issue>
          ),
          <fpage>116</fpage>
          -
          <lpage>125</lpage>
          , (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Elena</given-names>
            <surname>Daskalaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Peter</given-names>
            <surname>Diem</surname>
          </string-name>
          , and Stavroula G Mougiakakou,
          <article-title>'Personalized tuning of a reinforcement learning control algorithm for glucose regulation'</article-title>
          ,
          <source>in 2013 35th Annual international conference of the IEEE engineering in medicine and biology society (EMBC)</source>
          , pp.
          <fpage>3487</fpage>
          -
          <lpage>3490</lpage>
          . IEEE, (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Asa</surname>
            <given-names>K Davis</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stephanie N DuBose</surname>
          </string-name>
          , Michael J Haller,
          <string-name>
            <surname>Kellee M Miller</surname>
            ,
            <given-names>Linda A DiMeglio</given-names>
          </string-name>
          , Kathleen E Bethin, Robin S Goland, Ellen M Greenberg, David R Liljenquist,
          <string-name>
            <surname>Andrew J Ahmann</surname>
          </string-name>
          , et al.,
          <article-title>'Prevalence of detectable c-peptide according to age at diagnosis and duration of type 1 diabetes'</article-title>
          ,
          <source>Diabetes care</source>
          ,
          <volume>38</volume>
          (
          <issue>3</issue>
          ),
          <fpage>476</fpage>
          -
          <lpage>481</lpage>
          , (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Pieter Tjerk De Boer</surname>
          </string-name>
          , Dirk P. Kroese, Shie Mannor, and Reuven Y. Rubinstein, '
          <article-title>A tutorial on the cross-entropy method'</article-title>
          ,
          <source>Annals of Operations Research</source>
          , (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Chelsea</surname>
            <given-names>Finn</given-names>
          </string-name>
          , Pieter Abbeel, and Sergey Levine, '
          <article-title>Model-agnostic metalearning for fast adaptation of deep networks'</article-title>
          ,
          <source>34th International Conference on Machine Learning</source>
          ,
          <string-name>
            <surname>ICML</surname>
          </string-name>
          <year>2017</year>
          ,
          <volume>3</volume>
          ,
          <fpage>1856</fpage>
          -
          <lpage>1868</lpage>
          , (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Ian</given-names>
            <surname>Fox</surname>
          </string-name>
          and Jenna Wiens, '
          <article-title>Reinforcement Learning for Blood Glucose Control: Challenges</article-title>
          and Opportunities', (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13] Nurdan Gu¨ rbilek, '
          <article-title>Real-Time Computing Without Stable States: A New Framework for Neural Computation Based on Perturbations'</article-title>
          ,
          <source>Journal of Chemical Information and Modeling</source>
          ,
          <volume>53</volume>
          (
          <issue>9</issue>
          ),
          <fpage>1689</fpage>
          -
          <lpage>1699</lpage>
          , (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Herbert</surname>
            <given-names>Jaeger,</given-names>
          </string-name>
          '
          <article-title>The “ echo state ” approach to analysing and training recurrent neural networks - with an Erratum note 1'</article-title>
          ,
          <source>GMD Report, (148)</source>
          ,
          <fpage>1</fpage>
          -
          <lpage>47</lpage>
          , (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Jinyu</given-names>
            <surname>Xie</surname>
          </string-name>
          .
          <source>Simglucose v0.2</source>
          .1 https://github.com/jxx123/simglucose,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Boris</surname>
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Kovatchev</surname>
          </string-name>
          , Daniel J.
          <string-name>
            <surname>Cox</surname>
          </string-name>
          , Linda A.
          <string-name>
            <surname>Gonder-Frederick</surname>
          </string-name>
          , and William Clarke, '
          <article-title>Symmetrization of the blood glucose measurement scale and its applications'</article-title>
          ,
          <source>Diabetes Care</source>
          ,
          <volume>20</volume>
          (
          <issue>11</issue>
          ),
          <fpage>1655</fpage>
          -
          <lpage>1658</lpage>
          , (
          <year>1997</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>Mantas</surname>
            <given-names>Lukosˇevicˇius</given-names>
          </string-name>
          , '
          <article-title>A practical guide to applying echo state networks'</article-title>
          ,
          <source>Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)</source>
          , 7700 LECTU,
          <fpage>659</fpage>
          -
          <lpage>686</lpage>
          , (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>B</given-names>
            <surname>Mianowska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W</given-names>
            <surname>Fendler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            <surname>Szadkowska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            <surname>Baranowska</surname>
          </string-name>
          ,
          <string-name>
            <surname>E GrzelakAgaciak</surname>
          </string-name>
          , J Sadon, Hillary Keenan, and W Mlynarski, '
          <article-title>Hba 1c levels in schoolchildren with type 1 diabetes are seasonally variable and dependent on weather conditions'</article-title>
          ,
          <source>Diabetologia</source>
          ,
          <volume>54</volume>
          (
          <issue>4</issue>
          ),
          <fpage>749</fpage>
          -
          <lpage>756</lpage>
          , (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>Annemarie</given-names>
            <surname>Mol</surname>
          </string-name>
          and John Law, '
          <article-title>Embodied action, enacted bodies: The example of hypoglycaemia'</article-title>
          ,
          <source>Body &amp; society</source>
          ,
          <volume>10</volume>
          (
          <issue>2-3</issue>
          ),
          <fpage>43</fpage>
          -
          <lpage>62</lpage>
          , (
          <year>2004</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Elizabeth</surname>
            <given-names>D</given-names>
          </string-name>
          <string-name>
            <surname>Mynatt</surname>
          </string-name>
          ,
          <string-name>
            <surname>Gregory D Abowd</surname>
            ,
            <given-names>Lena</given-names>
          </string-name>
          <string-name>
            <surname>Mamykina</surname>
          </string-name>
          , and
          <article-title>Julie A Kientz, 'Understanding the potential of ubiquitous computing for chronic disease management', Health Informatics: A Patient-Centered Approach to Diabetes</article-title>
          .
          <source>Health Informatics</source>
          ,
          <fpage>85</fpage>
          -
          <lpage>106</lpage>
          , (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>Phuong</surname>
            <given-names>D</given-names>
          </string-name>
          <string-name>
            <surname>Ngo</surname>
            , Susan Wei, Anna Holubova´,
            <given-names>Jan</given-names>
          </string-name>
          <string-name>
            <surname>Muzik</surname>
          </string-name>
          , and Fred Godtliebsen, '
          <article-title>Control of blood glucose for type-1 diabetes by using reinforcement learning with feedforward algorithm'</article-title>
          ,
          <source>Computational and mathematical methods in medicine,</source>
          <year>2018</year>
          , (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Phuong</surname>
            <given-names>D</given-names>
          </string-name>
          <string-name>
            <surname>Ngo</surname>
            , Susan Wei, Anna Holubova´,
            <given-names>Jan</given-names>
          </string-name>
          <string-name>
            <surname>Muzik</surname>
          </string-name>
          , and Fred Godtliebsen, '
          <article-title>Reinforcement-learning optimal control for type-1 diabetes'</article-title>
          ,
          <source>in 2018 IEEE EMBS International Conference on Biomedical &amp; Health Informatics (BHI)</source>
          , pp.
          <fpage>333</fpage>
          -
          <lpage>336</lpage>
          . IEEE, (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>NHS</given-names>
            <surname>Choices</surname>
          </string-name>
          .
          <article-title>Type 1 diabetes https://www</article-title>
          .nhs.uk/conditions/type-1- diabetes/,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <surname>Aisling Ann O'Kane</surname>
          </string-name>
          , Yi Han, and
          <string-name>
            <surname>Rosa</surname>
            <given-names>I Arriaga,</given-names>
          </string-name>
          '
          <article-title>Varied &amp; bespoke caregiver needs: organizing and communicating diabetes care for children in the diy era'</article-title>
          ,
          <source>in Proceedings of the 10th EAI International Conference on Pervasive Computing Technologies for Healthcare</source>
          , pp.
          <fpage>9</fpage>
          -
          <lpage>12</lpage>
          , (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <surname>Aisling Ann O'Kane</surname>
          </string-name>
          , Sun Young Park, Helena Mentis, Ann Blandford, and Yunan Chen, '
          <article-title>Turning to peers: integrating understanding of the self, the condition, and others' experiences in making sense of complex chronic conditions'</article-title>
          ,
          <source>Computer Supported Cooperative Work (CSCW)</source>
          ,
          <volume>25</volume>
          (
          <issue>6</issue>
          ),
          <fpage>477</fpage>
          -
          <lpage>501</lpage>
          , (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>Peter</given-names>
            <surname>Pesl</surname>
          </string-name>
          , Pau Herrero, Monika Reddy, Nick Oliver, Desmond G Johnston,
          <article-title>Christofer Toumazou, and Pantelis Georgiou, 'Case-based reasoning for insulin bolus advice: evaluation of case parameters in a six-week pilot study'</article-title>
          ,
          <source>Journal of diabetes science and technology</source>
          ,
          <volume>11</volume>
          (
          <issue>1</issue>
          ),
          <fpage>37</fpage>
          -
          <lpage>42</lpage>
          , (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <surname>Anil</surname>
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Rao</surname>
          </string-name>
          , '
          <article-title>A survey of numerical methods for optimal control'</article-title>
          ,
          <source>in Advances in the Astronautical Sciences</source>
          , (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <surname>Garry</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Steil</surname>
          </string-name>
          , '
          <article-title>Algorithms for a closed-loop artificial pancreas: The case for proportional-integral-derivative control'</article-title>
          ,
          <source>Journal of Diabetes Science and Technology</source>
          ,
          <volume>7</volume>
          (
          <issue>6</issue>
          ),
          <fpage>1621</fpage>
          -
          <lpage>1631</lpage>
          , (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <surname>Cristiano</surname>
            <given-names>Storni</given-names>
          </string-name>
          , '
          <article-title>Complexity in an uncertain and cosmopolitan world. rethinking personal health technology in diabetes with the tag-ityourself</article-title>
          .',
          <source>PsychNology Journal</source>
          ,
          <volume>9</volume>
          (
          <issue>2</issue>
          ), (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <surname>Richard</surname>
            <given-names>S</given-names>
          </string-name>
          <string-name>
            <surname>Sutton</surname>
            and
            <given-names>Barto Andrew G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reinforcement</surname>
            <given-names>Learning</given-names>
          </string-name>
          , The MIT Press,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>