Abstract
Background:
Insulin bolus calculators assist people with Type 1 diabetes (T1D) to calculate the amount of insulin required for meals to achieve optimal glucose levels but lack adaptability and personalization. We have proposed enhancing bolus calculators by the means of case-based reasoning (CBR), an established problem-solving methodology, by individualizing and optimizing insulin therapy for various meal situations. CBR learns from experiences of past similar meals, which are described in cases through a set of parameters (eg, time of meal, alcohol, exercise). This work discusses the selection, representation and effect of case parameters used for a CBR-based Advanced Bolus Calculator for Diabetes (ABC4D).
Methods:
We analyzed the usage and effect of selected parameters during a pilot study (n = 10), where participants used ABC4D for 6 weeks. Retrospectively, we evaluated the effect of glucose rate of change before the meal on the glycemic excursion. Feedback from study participants about the choice of parameters was obtained through a nonvalidated questionnaire.
Results:
Exercise and alcohol were the most frequently used parameters, which was congruent with the feedback from study participants, who found these parameters most useful. Furthermore, cases including either exercise or alcohol as parameter showed a trend in reduction of insulin at the end of the study. A significant difference (P < .01) was found in glycemic outcomes for meals where glucose rate of change was rising compared to stable rate of change.
Conclusions:
Results from the 6-week study indicate the potential benefit of including parameters exercise, alcohol and glucose-rate of change for insulin dosing decision support.
Keywords: bolus calculator, diabetes management, case-based-reasoning, decision support, insulin dosing algorithm, case parameters
At present, people with type 1 diabetes (T1D) rely on exogenous insulin to maintain optimal glucose levels after meals. Insulin bolus calculators that help with the decision making process on how much insulin is required at,1 are commonly implemented in insulin pumps, and more recently in some glucose meters and smartphone apps. However, recommendations often need to be adjusted to a specific situation affecting insulin sensitivity (eg, exercise or alcohol) to avoid postprandial hyper- or hypoglycemia, which makes the utilization of bolus calculators challenging. To overcome this limitation we have proposed the use of case-based reasoning (CBR), an established artificial intelligence technique,2 as a learning methodology to enhance flexibility of existing bolus calculators by enabling them to react to various meal scenarios and automatically adjust the insulin therapy over time.3 A meal scenario (eg, late breakfast after exercise) can be described through cases with a set of case parameters, which need to be defined a priori. After encouraging results from in silico studies,3,4 we implemented the CBR algorithm into a smartphone-based insulin advisory platform called the Advanced Bolus Calculator for Diabetes (ABC4D), which was used in a pilot study by 10 people with T1D to receive personalized insulin advice over a period of 6 weeks.5 Figure 1 shows the graphical user interface of the ABC4D smartphone application, which was used by study participants to enter blood glucose levels and the anticipated amount of carbohydrates and, if applicable, information about various case parameters such as alcohol consumption, exercise or meal absorption. In this article, we evaluate the usage and effect of case parameters selected for the pilot study.
Figure 1.
Graphical user interface of ABC4D patient smartphone platform used in the 6-week pilot study where participants entered information about case parameters such as exercise and alcohol (left) and receive personalized insulin bolus advice for meals (right).
Methods
Case-Based Reasoning for Meal Insulin Bolus Advice
CBR is an artificial intelligence technique, which has been extensively applied in medicine6 and in diabetes management7,8 to support physicians in their clinical decision-making process. CBR tries to solve newly encountered problems by applying the solutions learned from solving similar problems encountered in the past. Past problems are stored in cases, which contain knowledge related to the various aspects of the situation. A case consists of 3 major parts: the problem description, the solution to the problem, and the outcome. In the particular case of meal insulin dosing, the problem is described by a selected set of case parameters affecting glucose levels (eg, meal time, exercise, alcohol); the solution is information on how much insulin is needed to cover the consumed amount of carbohydrates, that is, insulin-to-carbohydrate ratio (ICR), and the outcome is the clinical evaluation of the postprandial glucose excursion (eg, minimum glucose value).
An Advanced Bolus Calculator System Based on CBR
This section describes the use of CBR within ABC4D and the selection of case parameters for the 6-week pilot study.5 Figure 2 shows the implemented learning cycle of CBR,9 which can be detailed in following 4 steps:
Figure 2.
Case-based reasoning cycle implemented into the ABC4D system.
Retrieve: Each time an insulin recommendation is required, the current problem is compared for similarity to cases stored in the case-base. Then, the most similar case is retrieved.
Reuse: When a case is successfully retrieved from the case-base, 2 options are possible to reuse its solution. If the similarity is high, the solution can be used without requiring any adaptation. If the similarity is low, an adaptation of the solution is required (eg, reducing the dose by a predefined percentage). If no similar case is found, a new case is created, which is initialized with a solution that is considered safe.
Revise: Once the recommended insulin bolus has been delivered, the outcome of the solution is assessed. The outcome (ie, postprandial glucose excursion) is evaluated through continuous glucose monitoring (CGM) data as presented in Herrero et al.4 In case the outcome is unsatisfactory, a revision of the solution is required.
Retain: Once a new case has been created, it is introduced in the case base for further utilization and revision.
The ABC4D system splits the functionalities of the CBR cycle into a smartphone-based patient and a PC-based clinical platform. The patient platform holds the case-base and retrieves the most similar case compared to the current situation whenever the user requests a new insulin advice. Furthermore, case solutions are adapted to the current situation if necessary (ie, reuse step). The clinical platform implements the revision and the retention steps of the CBR cycle and enables remote clinical supervision of changes in the patient’s insulin therapy. Acceptability and usability results of the ABC4D system incorporating the CBR algorithm have been previously presented [Ref 5], showing encouraging results for both clinical experts and people with diabetes.
Case Parameters
Several factors have an impact on the glucose regulatory system and therefore have the potential to be included as a parameter within a case. Physical exercise is known to result in a drop of basal plasma insulin concentration10 as well as an amplification of glucose uptake by the working tissue11 and elevated hepatic glycogenolysis.12 Moderate alcohol consumption has been shown to affect insulin sensitivity and hepatic glucose output,13-14 while stress has been reported to induce hyperglycemia.15 However, the more parameters used to describe a case, the larger the case base becomes, and thus, more time is needed to for case solutions to be optimized. Because of the short duration of the presented study, only a limited number of case parameters were selected. Chosen case parameters were: time of meal, meal absorption rate, physical exercise and alcohol consumption. Although some of these parameters have a continuous domain, (eg, intensity of exercise, amount of alcohol consumed), they were discretized and simplified for the sake of practicality. Table 1 shows the set of parameters used in the 6-week pilot trial and if they required manual user input or not (ie, automatic input). While parameter exercise was Boolean (none/yes), additional information about the intensity (moderate/intense) was considered in the reuse step of the CBR cycle by adding a predefined percentage to the case solution (ie, ICR). Parameter hyperglycemia was automatically assigned, when blood glucose levels at mealtime were above 270 mg/dl.
Table 1.
Selection of Case Parameters Used for the 6-Week Study of ABC4D.
Parameter | Discrete states | Automatic/manual input |
---|---|---|
Meal time | Breakfast/lunch/dinner | Automatic |
Exercise | None/yes | Manual |
Alcohol | None/yes | Manual |
Meal absorption | Slow/medium/fast | Manual |
Hyperglycemia | No/yes | Automatic |
Initialization of cases
At the start of the study, the case base was initialized with 3 cases for different times of the day (ie, breakfast, lunch, dinner). Initial solutions of the cases were the ICRs, which participants used prior to the study and were optimized by a clinical expert based on data collected from a run-in period of 1 week.
Case retrieval
Several similarity measurement metrics can be found in the literature,16-18 which are commonly integrated within CBR and can be used for case retrieval. ABC4D uses the k-nearest neighbor (k-NN)19 classifier to retrieve the most similar case when compared to the current meal scenario. Only the solution of the closest case has been considered for the retrieval step (ie, k = 1). The similarity of the best match is calculated by the weighted arithmetic mean of the distance between the parameters of the current situation and those of the retrieved case. The resulting distance D is described in as following
where is the weight associated with the case feature which is compared to feature describing the current problem situation. [] denotes the possible range of the case parameter. If D = 0, then an exact match was found in the case-base. As the possible states of selected parameters were limited for this study (see Table 1), and therefore the number of cases were small, the threshold of distance D for creating a new case was set to ≥1. Thus every time no exact case is found in the case-base, a new case will be created. The solution of the newly created case can either be the solution of the most similar case (calculated by the distance function) or the clinically safe ICR, which was predefined by the clinician. The weights for each parameter were predefined as equal (ie, ) and remained static throughout the duration of the pilot study.
Evaluation of Case Parameters
We have analyzed the number of created cases as well as the usage of individual case parameters during the pilot study (n = 10) over 6 weeks. Ten adults with T1D (6 male and 4 female, mean age 42±17 years, diabetes duration 21±15 years, and HbA1c of 64±15 mmol/mol) participated in the study. Although ABC4D can be equally used by people on insulin pump therapy, all participants were on multiple daily injections for the sake of consistency. Basal insulin was optimized prior to the beginning of the intervention phase based on retrospective continuous glucose data collected during a one-week run-in period and was not altered during the remaining of the study. We evaluated the individual effect of case parameters on the case solution (ICR) and the resulting postprandial glycemic outcomes such as the number of hypoglycemic events, before and after the optimization of ICRs. Case solutions have been revised and adapted on a weekly basis after being approved by the study team. Retrospective CGM data were used for case revision, thus information about the glucose trend was not available at the time of meal. Future studies will incorporate real-time CGM where the glucose rate of change at mealtime can be used as a potential case parameter. With the retrospective glucose data available from the 6-week study, we have evaluated the effect of glucose rate of change (ROC) before mealtime (15-0 min before) on the postprandial glucose.
Results
Number of Cases
Figure 3 shows the growth of the case base through the 6-week pilot study. On average, 11.6 ± 3.5 cases were created by the end of the study which is half of the maximum possible number of cases (ie, 24). The majority of cases was created within the first week of use. Throughout the rest of the study the case base grew steadily, but fewer cases were created compared to the initial week.
Figure 3.
Graph showing number of cases (mean ± standard deviation) in the case base for each study week.
Usage of Case Parameters
Case parameter time of meal was automatically obtained by retrieving the system clock of the phone when an insulin advice had been requested. Out of all used cases, 30.9 ± 6.4% were assigned to breakfast, 34.8 ± 3.8% to lunch and 34.2 ± 5.7% to dinner. Parameter hyperglycemia was observed in 8.5 ± 10.4% of all case retrievals. Exercise was the most frequently manually entered parameter with 8.4 ± 6.3 % of all retrieved cases, followed by alcohol (5.5 ± 6.0%) and absorption rate (1.8 ± 2.1%).
Effect of Case Parameters
Table 2 shows the mean change in ICRs of case parameters alcohol, exercise, and hyperglycemia after the 6 weeks study compared to the initial case solution. Parameter meal absorption rate was not included in this analysis because of its little usage. Cases including only exercise or alcohol yield less insulin delivery at the end of the study compared to cases without the parameter. The resulting postprandial outcome (30 min-6 hours after meal) showed a slight reduction in the number of hypoglycemic events (<70 mg/dL) per participant for cases with parameter alcohol and exercise in the final 3 weeks of the study. Although presented changes are not statistical significant, the trend to reduce hypoglycemia indicates the importance of analyzed case parameters. For cases, where blood glucose levels were high at meal-time (case parameter hyperglycemia), the mean ICR was slightly reduced compared to lower glucose levels, thus more insulin was proposed toward the end of the study. In spite of the insulin therapy being more aggressive, this did not negatively affect the number of hypoglycemic events with 0.4 ± 0.5 and 0.2 ± 0.4 events in weeks 1-3 and weeks 4-6, respectively.
Table 2.
Evolution of Case Solutions (ICRs) of Cases With Parameters Alcohol, Exercise, and Hyperglycemia After the 6-Week Study (Above) and Number of Hypoglycemic Events for Weeks 1-3 and 4-6 for Used Case Parameter (Below).
Parameter | Week 1 ICR (1 unit/g carbohydrates) | Week 6 ICR (1 unit/g carbohydrates) | P value |
---|---|---|---|
Alcohol | 10.5 ± 3.6 | 11.1 ± 4.1 | .2 |
Exercise | 13.1 ± 3.1 | 14.6 ± 8.0 | .4 |
Hyperglycemia | 12.5 ± 3.0 | 10.6 ± 4.1 | .1 |
Number of hypoglycemic events (<70 mg/dL) weeks 1-3 | Number of hypoglycemic events (<70 mg/dL) weeks 4-6 | ||
Alcohol | 0.4 ± 0.1 | 0.3 ± 0.0 | .7 |
Exercise | 0.9 ± 0.1 | 0.5 ± 0.1 | .2 |
Hyperglycemia | 0.4 ± 0.5 | 0.2 ± 0.4 | .4 |
Potential use of Glucose Rate of Change as Case Parameter
A total of 649 meal scenarios have been analyzed. We categorized glucose ROC into 3 trends (falling, stable, or rising) and evaluated the effect between ROC trends and the minimum postprandial glucose concentration (i.e. lowest glucose value between 2-6 hours after the meal intake). For the majority of analyzed meals (53.9%), glucose ROC was stable (–0.5 mg•dl-1•min-1 to < +0.5 mg•dl-1•min-1) at mealtime, for 29.6% above +0.5 mg•dl-1•min-1 and for 16.5% below –0.5 mg•dl-1•min-1, respectively. For 7.5% of meals with a falling glucose trend, active-insulin from previous insulin administrations was recorded. The postprandial minimum mean glucose levels were 106 ± 52 mg•dl-1, 115 ± 55 mg•dl-1, 128 ± 56 mg•dl-1 for falling, stable, and rising glucose trends at meal times, respectively. The reported difference of minimum glucose levels for rising and stable glucose ROC was significant with P = .01.
Users’ Perception on Selected Parameters
Usability plays a key role in the adoption of decision support systems for insulin dosing and implemented case parameters can only demonstrate their efficacy when frequently used. We hypothesize that case parameters, which need to be entered manually in the system, will more likely be selected if they are perceived as useful or important to the person with diabetes. Study participants were asked at the end of the study to fill a nonvalidated questionnaire about their perception on the importance of selected case parameter. Eight out of 10 participants stated that it would be useful to add additional information about case parameters alcohol and exercise. While users could choose between 2 levels of intensities, the inclusion of type and duration of exercise was highlighted as a potential useful additional feature. Participants further pointed out that they would like to differentiate between type and amount of consumed alcohol.
Discussion
When using CBR for providing decision support in insulin dosing, the selection and representation of case parameters are crucial for achieving optimal results. Many factors have been reported to have impact on glycemic control. However, incorporating a vast number of parameters results in a longer time needed to populate the case-base, as the number of possible cases rises exponentially with each additional parameter. Adding more parameters may also require additional manual user input, if a parameter cannot be captured by sensors (e.g. illness), thus potentially reducing the usability of an insulin advisory system. Therefore, the number of case parameters used is always a compromise between usability and convergence time of the CBR algorithm.
In the presented pilot study, we have included parameters that are frequently considered by people with T1D when estimating the amount of insulin needed to cover a meal. Further parameters that are known to affect insulin sensitivity, but may occur less frequently (eg, illness, menstrual cycle) have been omitted due to the short study period and still need to be investigated. While a larger cohort of participants is needed to significantly demonstrate the importance of individual parameters on glycemic outcomes, initial results indicate the clinical importance of case parameter exercise and alcohol with a slight reduction of postprandial hypoglycemic events. Study participants further stressed the importance of these parameters to the user with diabetes through a nonvalidated questionnaire at the end of the 6-week study. We observed that parameter absorption rate was used least often by participants but its usefulness might be evaluated again if the parameter can be automatically obtained, for example, through a preprogrammed meal library.
Although all study participants completed structured education and thus had knowledge about insulin dose adjustments for different type of meals, we observed only little usage of parameter ‘absorption rate’. Future work could envisage automatic acquisition of the parameter e.g. through a pre-programmed meal-library to overcome the low utilization. Additional advice regarding the timing or shape of the insulin bolus (e.g. split bolus) could further enhance the usefulness of parameter absorption rate.
In spite of the relatively short duration of the study, we have demonstrated that the majority of cases found in the final case-base were created within the first week of the study. However, the case base was still growing steadily in the last week, suggesting a longer study time is needed to cover all of the typical scenarios of the user’s life style. We anticipate that in the future clinicians could customize the number and type of parameters together with the patient. Features that are not of relevance to the user could be removed. For instance, a person with T1D who does not drink alcohol could opt to omit and replace that parameter with another one more suited to the person’s lifestyle.
As retrospective CGM was used during the pilot study, it was not possible to include glucose ROC as a case parameter. However, the reported significant difference of postprandial glucose concentration for different glucose ROCs indicates the potential benefit of the parameter for insulin dosing decision support, where real-time CGM is available. Long-term research goals in diabetes management include the development of technology such as closed-loop insulin delivery (i.e. artificial pancreas), which intends to totally, or partially, remove the person with diabetes from the insulin dosing decision-making process. However, due to the slow pharmacodynamics of insulin formulations, many of the currently investigated artificial pancreas systems, require manually calculated pre-meal boluses to achieve good post-prandial glycaemic outcomes. While the presented ABC4D system is not designed to adjust insulin basal rates, we envisage the integration of such an intelligent and adaptive decision support for pre-meal insulin dosing into future artificial pancreas systems.
Conclusion
The performance of current bolus calculators is limited, as they do not differentiate between various scenarios affecting insulin sensitivity and are not able to automatically adapt the insulin therapy accordingly. Case-Based Reasoning utilizes cases, which are described through a set of parameters, to allow individualization and adaptation of the insulin therapy for various meal scenarios.. Initial results from a pilot study give a positive indication on both user perception and clinical effectiveness of case parameters exercise and alcohol. Retrospective analyses of the results show that including information about glucose ROC for a real-time CGM could potentially improve glycemic control. A large scale randomized controlled trial is currently underway to further evaluate the proposed ABC4D system.
Footnotes
Abbreviations: ABC4D, Advanced Bolus Calculator for Diabetes; CBR, case-based reasoning; CGM, continuous glucose monitoring; ICR, insulin-carbohydrate ratio; ROC, rate of change; T1D, type 1 diabetes.
Authors’ Note: An abstract including part of this work was presented as a poster at the conference ‘Diabetes Technology Meeting’ (DTM) in Bethesda, Maryland, USA, October 22-24, 2015 and at the conference `Advanced Technologies & Treatments for Diabetes’ (ATTD) in Milan, Italy, February 3-6,2016.
Declaration of Conflicting Interests: The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding: The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This article presents independent research funded by the Imperial College NIHR Biomedical Research Centre and supported by the NIHR CRF at Imperial College Healthcare NHS Trust. The views expressed are those of the authors and not necessarily those of the NHS, the NIHR, or the Department of Health.
References
- 1. Zisser H, Robinson L, Bevier W, et al. Bolus calculator: a review of four “smart” insulin pumps. Diabetes Technol Ther. 2008;10(6):441-444 [DOI] [PubMed] [Google Scholar]
- 2. Kolodner J. Case-Based Reasoning. San Mateo, CA: Morgan Kaufmann; 1993. [Google Scholar]
- 3. Herrero P, Pesl P, Reddy M, Oliver N, Georgiou P, Toumazou C. Advanced insulin bolus advisor based on run-to-run control and case-based reasoning. IEEE J Biomed Health Inform. 2015;19(3):1087-1096. [DOI] [PubMed] [Google Scholar]
- 4. Herrero P, Pesl P, Bondia J, et al. Method for automatic adjustment of an insulin bolus calculator: in silico robustness evaluation under intra-day variability. Comput Methods Programs Biomed. 2015;119(1):1-8. [DOI] [PubMed] [Google Scholar]
- 5. Pesl P, Herrero P, Reddy M, et al. An advanced bolus calculator for type 1 diabetes: system architecture and usability results. IEEE J Biomed Health Inform. 2016;20(1):11-17. [DOI] [PubMed] [Google Scholar]
- 6. Holt A, Bichindaritz I, Schmidt R, Perner P. Medical applications in case-based reasoning. Knowledge Engineer Rev. 2005;20(3):289-292. [Google Scholar]
- 7. Marling C, Wiley M, Bunescu R, Shubrook J, Schwartz F. Emerging applications for intelligent diabetes management. AI Mag. 2012;33(2):67. [Google Scholar]
- 8. Schmidt R, Montani S, Bellazzi R, Portinale L, Gierl L. Cased-based reasoning for medical knowledge-based systems. Int J Med Inform. 2001;64(2):355-367. [DOI] [PubMed] [Google Scholar]
- 9. Aamodt A, Plaza E. Case-based reasoning: foundational issues, methodological variations, and system approaches. AI Comm. 1994;7(1):39-59. [Google Scholar]
- 10. Felig P, Wahren J. Fuel homeostasis in exercise. N Engl J Med. 1975;293(21):10. [DOI] [PubMed] [Google Scholar]
- 11. Wasserman DH, Cherrington AD. Hepatic fuel metabolism during muscular work: role and regulation. Am J Physiol Endocrinol Metab. 1991;260(6):E811-E824. [DOI] [PubMed] [Google Scholar]
- 12. Wahren J, Felig P, Ahlborg G, Jorfeldt L. Glucose metabolism during leg exercise in man. J Clin Invest. 1971;50(12):2715. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13. Avogaro A, Watanabe RM, Gottardo L, de Kreutzenberg S, Tiengo A, Pacini G. Glucose tolerance during moderate alcohol intake: insights on insulin action from glucose/lactate dynamics. J Clin Endocrinol Metab. 2002;87(3):1233-1238. [DOI] [PubMed] [Google Scholar]
- 14. Kiechl S, Willeit J, Poewe W, et al. Insulin sensitivity and regular alcohol consumption: large, prospective, cross sectional population study (Bruneck study). BMJ. 1996;313(7064):1040-1044. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15. McCowen KC, Malhotra A, Bistrian BR. Stress-induced hyperglycemia. Crit Care Clin. 2001;17(1):107-124. [DOI] [PubMed] [Google Scholar]
- 16. Liao TW, Zhang Z, Mount CR. Similarity measures for retrieval in case-based reasoning systems. Applied Artificial Intel. 1998;12(4):267-288. [Google Scholar]
- 17. Lopez De Mantaras R, McSherry D, Bridge D, et al. Retrieval, reuse, revision and retention in case-based reasoning. Knowledge Engineer Rev. 2005;20(3):215-240. [Google Scholar]
- 18. Dubois D, Prade H. Similarity versus preference in fuzzy set-based logics. In: Orłowska E. (ed.) Incomplete Information: Rough Set Analysis. Toulouse, France: Physica-Verlag, 1998, pp. 441-461. [Google Scholar]
- 19. Cover TM, Hart PE. Nearest neighbor pattern classification. IEEE Trans Inform Theory. 1967;13(1):21-27. [Google Scholar]