A Deep Learning Framework for Automatic Meal Detection and Estimation in Artificial Pancreas Systems
Abstract
:1. Introduction
2. Related Work
- We develop a novel meal detection algorithm based on multitask neural networks and quantile regression in order to automatically announce meals and estimate meal size.
- We evaluate in silico the performance of the meal detection and estimation algorithm in moving towards fully closed-loop insulin delivery.
3. Materials and Methods
3.1. Multitask Deep Neural Network
3.1.1. Quantile Regression
3.1.2. Network Training
3.2. Meal Detection and Estimation
3.2.1. Meal Detection
3.2.2. Carbohydrate Estimation
3.3. Fully Closed-Loop Control for Insulin Delivery
Algorithm 1 Meal Detection and Estimation Algorithm |
Require:, |
Ensure: Output meal size, |
Initialise model parameters from memory |
for do |
Compare and |
Let k be number of samples where < |
if k > N AND BG/t ≥ 1 then ▹ Activate meal detection |
while error AND do ▹ Perform meal estimation |
if fine_search then |
else |
end if |
if error then |
Activate fine_search |
end if |
if verify appropriate glucose dynamics then |
▹ Discard meal estimate |
break |
end if |
end while |
else |
end if |
end for |
3.4. Performance Metrics
Statistical Analysis
3.5. In-Silico Dataset
4. Results
4.1. Meal Detection and Estimation Performance
4.2. Closed-Loop Glucose Control
5. Discussion
5.1. Comparison with Other Approaches
5.2. Misestimation of Carbohydrate Content
5.3. Safety Monitoring with Uncertainty Quantification
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Conflicts of Interest
Abbreviations
AP | Artificial Pancreas |
BiAP | Bio-inspired Artificial Pancreas |
BG | Blood Glucose |
CGM | Continuous Glucose Monitor |
CHO | Carbohydrate |
CSII | Continuous Subcutaneous Insulin Infusion |
CV | Coefficient of Variation |
CVGA | Control-variability grid analysis |
DNN | Deep Neural Network |
EKF | Extended Kalman Filter |
FN | False Negative |
FP | False Positive |
HBGI | High Blood Glucose Index |
HbA1C | Glycated Haemoglobin |
LBGI | Low Blood Glucose Index |
LSTM | Long Short-Term Memory |
MAE | Mean Absolute Error |
PI | Prediction Interval |
RI | Risk Index |
RMSE | Root Mean Square Error |
Seq2Seq | Sequence-to-Sequence |
T1D | Type 1 Diabetes |
TN | True Negative |
TP | True Positive |
TIR | % Time In Range |
TAR | % Time Above Range |
TBR | % Time Below Range |
UKF | Unscented Kalman Filter |
VSD | Variable State Dimension |
Appendix A
ID | Metric | ||
---|---|---|---|
RMSE | MAE | PI | |
1 | 5.8 | 4.0 | 95.3 |
2 | 5.9 | 4.1 | 94.5 |
3 | 8.0 | 4.6 | 94.7 |
4 | 5.7 | 4.0 | 94.9 |
5 | 7.7 | 4.3 | 93.6 |
6 | 5.7 | 4.1 | 94.9 |
7 | 6.7 | 4.8 | 94.7 |
8 | 7.2 | 4.3 | 93.7 |
9 | 5.0 | 3.7 | 97.3 |
10 | 8.4 | 4.3 | 95.4 |
Average | 6.6 ± 1.1 | 4.2 ± 0.3 | 94.9 ± 1.0 |
References
- Ramli, R.; Reddy, M.; Oliver, N. Artificial Pancreas: Current Progress and Future Outlook in the Treatment of Type 1 Diabetes. Drugs 2019, 79, 1089–1101. [Google Scholar] [CrossRef]
- Dassau, E.; Zisser, H.; Harvey, R.A.; Percival, M.W.; Grosman, B.; Bevier, W.; Atlas, E.; Miller, S.; Nimri, R.; Jovanovič, L.; et al. Clinical Evaluation of a Personalized Artificial Pancreas. Diabetes Care 2013, 36, 801–809. [Google Scholar] [CrossRef] [Green Version]
- Reddy, M.; Herrero, P.; Sharkawy, M.E.; Pesl, P.; Jugnee, N.; Pavitt, D.; Godsland, I.F.; Alberti, G.; Toumazou, C.; Johnston, D.G.; et al. Metabolic Control With the Bio-inspired Artificial Pancreas in Adults With Type 1 Diabetes: A 24-Hour Randomized Controlled Crossover Study. J. Diabetes Sci. Technol. 2015, 10, 405–413. [Google Scholar] [CrossRef] [Green Version]
- Robinson, S.; Newson, R.S.; Liao, B.; Kennedy-Martin, T.; Battelino, T. Missed and mistimed insulin doses in people with diabetes: A systematic literature review. Diabetes Technol. Ther. 2021, 23, 844–856. [Google Scholar] [CrossRef]
- Hessler, D.M.; Fisher, L.; Polonsky, W.H.; Masharani, U.; Strycker, L.A.; Peters, A.L.; Blumer, I.; Bowyer, V. Diabetes distress is linked with worsening diabetes management over time in adults with Type 1 diabetes. Diabet. Med. J. Br. Diabet. Assoc. 2017, 34, 1228–1234. [Google Scholar] [CrossRef]
- Smythe, K.; Saw, M.; Mak, M.; Wong, V.W. Carbohydrate knowledge, lifestyle and insulin: An observational study of their association with glycaemic control in adults with type 1 diabetes. J. Hum. Nutr. Diet. Off. J. Br. Diet. Assoc. 2018, 31, 597–602. [Google Scholar] [CrossRef]
- Joiner, K.L.; Holland, M.L.; Grey, M. Stressful Life Events in Young Adults With Type 1 Diabetes in the U.S. T1D Exchange Clinic Registry. J. Nurs. Scholarsh. Off. Publ. Sigma Theta Tau Int. Honor. Soc. Nurs. 2018, 50, 676–686. [Google Scholar] [CrossRef]
- Tamborlane, W.V.; Pfeiffer, K.M.; Brod, M.; Nikolajsen, A.; Sandberg, A.; Peters, A.L.; Van Name, M. Understanding bolus insulin dose timing: The characteristics and experiences of people with diabetes who take bolus insulin. Curr. Med. Res. Opin. 2017, 33, 639–645. [Google Scholar] [CrossRef] [PubMed]
- Datye, K.A.; Boyle, C.T.; Simmons, J.; Moore, D.J.; Jaser, S.S.; Sheanon, N.; Kittelsrud, J.M.; Woerner, S.E.; Miller, K.M. Timing of Meal Insulin and Its Relation to Adherence to Therapy in Type 1 Diabetes. J. Diabetes Sci. Technol. 2018, 12, 349–355. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Norlander, L.M.; Anderson, S.; Levy, C.J.; Ekhlaspour, L.; Lam, D.W.; Hsu, L.; Loebner, S.E.; Ogyaadu, S.J.; O’malley, G.; Levister, C.M.; et al. Late and Missed Meal Boluses with Multiple Daily Insulin Injections. Diabetes 2018, 67. [Google Scholar] [CrossRef]
- Norlander, L.M.; Nykaza, E.T.; Arbiter, B.; Buckingham, B.A.; Lal, R. 931 -P: Hyperglycemia following Early vs. Late Meal Boluses. Diabetes 2019, 68. [Google Scholar] [CrossRef]
- Peters, A.; Van Name, M.A.; Thorsted, B.; Piltoft, J.S.; Tamborlane, W.V. Postprandial Dosing of Bolus Insulin in Patients with type 1 Diabetes: A Cross-sectional Study Using Data From the T1d Exchange Registry. Endocr. Pract. 2017, 23, 1201–1209. [Google Scholar] [CrossRef]
- Brazeau, A.S.; Mircescu, H.; Desjardins, K.; Leroux, C.; Strychar, I.; Ekoé, J.M.; Rabasa-Lhoret, R. Carbohydrate counting accuracy and blood glucose variability in adults with type 1 diabetes. Diabetes Res. Clin. Pract. 2013, 99, 19–23. [Google Scholar] [CrossRef]
- Meade, L.T.; Rushton, W.E. Accuracy of Carbohydrate Counting in Adults. Clin. Diabetes 2016, 34, 142–147. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Daniels, J.; Herrero, P.; Georgiou, P. Automatic Meal Detection and Estimation using Neural Networks. Diabetes Technol. Ther. 2021, 23, A-1–A-206. [Google Scholar] [CrossRef]
- Dassau, E.; Bequette, B.W.; Buckingham, B.A.; Doyle, F.J. Detection of a Meal Using Continuous Glucose Monitoring: Implications for an artificial -cell. Diabetes Care 2008, 31, 295–300. [Google Scholar] [CrossRef] [Green Version]
- Ramkissoon, C.M.; Herrero, P.; Bondia, J.; Vehi, J. Unannounced Meals in the Artificial Pancreas: Detection Using Continuous Glucose Monitoring. Sensors 2018, 18, 884. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Samadi, S.; Turksoy, K.; Hajizadeh, I.; Feng, J.; Sevil, M.; Cinar, A. Meal Detection and Carbohydrate Estimation Using Continuous Glucose Sensor Data. IEEE J. Biomed. Health Inform. 2017, 21, 619–627. [Google Scholar] [CrossRef] [PubMed]
- Samadi, S.; Rashid, M.; Turksoy, K.; Feng, J.; Hajizadeh, I.; Hobbs, N.; Lazaro, C.; Sevil, M.; Littlejohn, E.; Cinar, A. Automatic Detection and Estimation of Unannounced Meals for Multivariable Artificial Pancreas System. Diabetes Technol. Ther. 2018, 20, 235–246. [Google Scholar] [CrossRef] [PubMed]
- Cameron, F.; Niemeyer, G.; Buckingham, B.A. Probabilistic Evolving Meal Detection and Estimation of Meal Total Glucose Appearance. J. Diabetes Sci. Technol. 2009, 3, 1022–1030. [Google Scholar] [CrossRef] [PubMed]
- Xie, J.; Wang, Q. A Variable State Dimension Approach to Meal Detection and Meal Size Estimation: In Silico Evaluation Through Basal-Bolus Insulin Therapy for Type 1 Diabetes. IEEE Trans. Biomed. Eng. 2017, 64, 1249–1260. [Google Scholar] [CrossRef] [PubMed]
- Mahmoudi, Z.; Nørgaard, K.; Poulsen, N.K.; Madsen, H.; Jørgensen, J.B. Fault and meal detection by redundant continuous glucose monitors and the unscented Kalman filter. Biomed. Signal Process. Control. 2017, 38, 86–99. [Google Scholar] [CrossRef]
- Zheng, M.; Ni, B.; Kleinberg, S. Automated meal detection from continuous glucose monitor data through simulation and explanation. J. Am. Med. Inform. Assoc. 2019, 26, 1592–1599. [Google Scholar] [CrossRef] [PubMed]
- Garcia-Tirado, J.; Diaz, J.L.; Esquivel-Zuniga, R.; Koravi, C.L.K.; Corbett, J.P.; Dawson, M.; Wakeman, C.; Barnett, C.L.; Oliveri, M.C.; Myers, H.; et al. Advanced Closed-Loop Control System Improves Postprandial Glycemic Control Compared With a Hybrid Closed-Loop System Following Unannounced Meal. Diabetes Care 2021, 44, 2379–2387. [Google Scholar] [CrossRef] [PubMed]
- Sutskever, I.; Vinyals, O.; Le, Q.V. Sequence to Sequence Learning with Neural Networks. In Proceedings of the NIPS, Montreal, QC, Canada, 8–13 December 2014; pp. 3104–3112. [Google Scholar]
- Mirshekarian, S.; Shen, H.; Bunescu, R.; Marling, C. LSTMs and Neural Attention Models for Blood Glucose Prediction: Comparative Experiments on Real and Synthetic Data. In Proceedings of the 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Berlin, Germany, 23–27 July 2019; pp. 706–712, ISSN 1557-170X. [Google Scholar] [CrossRef]
- Bhimireddy, A.R.; Sinha, P.; Oluwalade, B.; Gichoya, J.W.; Purkayastha, S. Blood Glucose Level Prediction as Time-Series Modeling using Sequence-to-Sequence Neural Networks. In Proceedings of the 5th International Workshop on Knowledge Discovery in Healthcare Data, KDH@ECAI 2020, Santiago de Compostela, Spain, 29–30 August 2020; Volume 2675, pp. 125–130. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Koenker, R. Quantile Regression Econometric Society Monographs; Cambridge University Press: Cambridge, UK, 2005. [Google Scholar] [CrossRef]
- Zhu, T.; Li, K.; Herrero, P.; Georgiou, P. Deep Learning for Diabetes: A Systematic Review. IEEE J. Biomed. Health Inform. 2020, 25, 2744–2757. [Google Scholar] [CrossRef]
- Tagasovska, N.; Lopez-Paz, D. Single-Model Uncertainties for Deep Learning. arXiv 2019, arXiv:1811.00908. [Google Scholar]
- El Youssef, J.; Castle, J.; Ward, W.K. A Review of Closed-Loop Algorithms for Glycemic Control in the Treatment of Type 1 Diabetes. Algorithms 2009, 2, 518–532. [Google Scholar] [CrossRef] [Green Version]
- Maahs, D.M.; Buckingham, B.A.; Castle, J.R.; Cinar, A.; Damiano, E.R.; Dassau, E.; DeVries, J.H.; Doyle, F.J.; Griffen, S.C.; Haidar, A.; et al. Outcome Measures for Artificial Pancreas Clinical Trials: A Consensus Report. Diabetes Care 2016, 39, 1175–1179. [Google Scholar] [CrossRef] [Green Version]
- Magni, L.; Raimondo, D.M.; Man, C.D.; Breton, M.; Patek, S.; Nicolao, G.D.; Cobelli, C.; Kovatchev, B.P. Evaluating the Efficacy of Closed-Loop Glucose Regulation via Control-Variability Grid Analysis. J. Diabetes Sci. Technol. (Online) 2008, 2, 630–635. [Google Scholar] [CrossRef] [Green Version]
- Liu, C.; Vehí, J.; Avari, P.; Reddy, M.; Oliver, N.; Georgiou, P.; Herrero, P. Long -Term Glucose Forecasting Using a Physiological Model and Deconvolution of the Continuous Glucose Monitoring Signal. Sensors 2019, 19, 4338. [Google Scholar] [CrossRef] [Green Version]
- Subbaswamy, A.; Saria, S. From development to deployment: Dataset shift, causality, and shift-stable models in health AI. Biostatistics 2020, 21, 345–352. [Google Scholar] [CrossRef]
- Kendall, A.; Gal, Y. What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision? arXiv 2017, arXiv:1703.04977. [Google Scholar]
Metric | CHO (g) | ||||
---|---|---|---|---|---|
Breakfast | Lunch | Snack | Dinner | Overall (Meals) | |
70 ± 7 | 100 ± 10 | 30 ± 3 | 80 ± 7 | 70 ± 27 (83 ± 15) | |
Meal Detection Performance | |||||
Precision (%) | 86 ± 7 | 98 ± 2 | 97 ± 5 | 94 ± 6 | 93 ± 4 (92 ± 4) |
Recall (%) | 90 ± 5 | 97 ± 3 | 24 ± 14 | 89 ± 4 | 76 ± 5 (92 ± 3) |
Delay (min) | 38 ± 13 | 36 ± 11 | 41 ± 23 | 37 ± 15 | 38 ± 15 (37 ± 13) |
Metric | Controller | p * | p† | ||
---|---|---|---|---|---|
BiAP-MA | BiAP-MD | BiAP-NMA | |||
Glycaemic Targets | |||||
Mean BG (mg/dL) | 137.7 ± 5.0 | 144.5 ± 6.8 | 148.9 ± 9.8 | 0.002 | 0.003 |
TIR (%) | 84.7 ± 5.1 | 77.8 ± 6.3 | 73.9 ± 7.9 | 0.002 | 0.0007 |
TAR (%) | 13.7 ± 4.4 | 20.7 ± 6.0 | 24.9 ± 7.8 | 0.002 | 0.0009 |
TBR (%) | 1.5 ± 1.3 | 1.4 ± 0.9 | 1.3 ± 1.2 | 0.8 | 0.4 |
Risk Indices | |||||
HBGI | 3.2 ± 0.8 | 4.3 ± 1.1 | 5.1 ± 1.5 | 0.002 | 0.0005 |
LBGI | 0.5 ± 0.4 | 0.6 ± 0.4 | 0.5 ± 0.3 | 0.3 | 0.1 |
RI | 3.7 ± 1.0 | 4.9 ± 1.3 | 5.6 ± 1.6 | 0.002 | 0.002 |
Algorithm | Performance Metrics | |||||
---|---|---|---|---|---|---|
Precision | Recall | F-Score | Delay | Size Error | UQ | |
Dassau et al. [16] | - | - | - | 30 min | - | ✗ |
Ramkissoon et al. [17] | 92.5% | 82% | 0.87 | 38 min | - | ✗ |
Samadi et al. [18] | 79% | 87% | 0.86 | - | 23% | ✗ |
Samadi et al. [19] | 79% | 93.5% | 0.86 | 35 min | - | ✗ |
Zheng et al. [23] | 93% | 88% | 0.91 | 26 min | - | ✗ |
Xie and Wang [21] | 84% | 76% | 0.80 | 45 min | 43% | ✓ |
Mahmoudi et al. [22] | - | 99.5% | - | 58 min | - | ✓ |
Ours | 93% | 76% | 0.84 | 38 min | 31% | ✓ |
Ours—Meals | 92% | 92% | 0.92 | 37 min | 19% | ✓ |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Daniels, J.; Herrero, P.; Georgiou, P. A Deep Learning Framework for Automatic Meal Detection and Estimation in Artificial Pancreas Systems. Sensors 2022, 22, 466. https://doi.org/10.3390/s22020466
Daniels J, Herrero P, Georgiou P. A Deep Learning Framework for Automatic Meal Detection and Estimation in Artificial Pancreas Systems. Sensors. 2022; 22(2):466. https://doi.org/10.3390/s22020466
Chicago/Turabian StyleDaniels, John, Pau Herrero, and Pantelis Georgiou. 2022. "A Deep Learning Framework for Automatic Meal Detection and Estimation in Artificial Pancreas Systems" Sensors 22, no. 2: 466. https://doi.org/10.3390/s22020466
APA StyleDaniels, J., Herrero, P., & Georgiou, P. (2022). A Deep Learning Framework for Automatic Meal Detection and Estimation in Artificial Pancreas Systems. Sensors, 22(2), 466. https://doi.org/10.3390/s22020466