A Deep Learning Framework for Automatic Meal Detection and Estimation in Artificial Pancreas Systems

Sensors (Basel). 2022 Jan 8;22(2):466. doi: 10.3390/s22020466.


Current artificial pancreas (AP) systems are hybrid closed-loop systems that require manual meal announcements to manage postprandial glucose control effectively. This poses a cognitive burden and challenge to users with T1D since this relies on frequent user engagement to maintain tight glucose control. In order to move towards fully automated closed-loop glucose control, we propose an algorithm based on a deep learning framework that performs multitask quantile regression, for both meal detection and carbohydrate estimation. Our proposed method is evaluated in silico on 10 adult subjects from the UVa/Padova simulator with a Bio-inspired Artificial Pancreas (BiAP) control algorithm over a 2 month period. Three different configurations of the AP are evaluated -BiAP without meal announcement (BiAP-NMA), BiAP with meal announcement (BiAP-MA), and BiAP with meal detection (BiAP-MD). We present results showing an improvement of BiAP-MD over BiAP-NMA, demonstrating 144.5 ± 6.8 mg/dL mean blood glucose level (-4.4 mg/dL, p< 0.01) and 77.8 ± 6.3% mean time between 70 and 180 mg/dL (+3.9%, p< 0.001). This improvement in control is realised without a significant increase in mean in hypoglycaemia (+0.1%, p= 0.4). In terms of detection of meals and snacks, the proposed method on average achieves 93% precision and 76% recall with a detection delay time of 38 ± 15 min (92% precision, 92% recall, and 37 min detection time for meals only). Furthermore, BiAP-MD handles hypoglycaemia better than BiAP-MA based on CVGA assessment with fewer control errors (10% vs. 20%). This study suggests that multitask quantile regression can improve the capability of AP systems for postprandial glucose control without increasing hypoglycaemia.

Keywords: artificial pancreas; carbohydrate estimation; deep learning; machine learning; meal detection; multitask learning; neural network; quantile regression; type 1 diabetes.

MeSH terms

  • Adult
  • Algorithms
  • Blood Glucose
  • Blood Glucose Self-Monitoring
  • Deep Learning*
  • Diabetes Mellitus, Type 1* / drug therapy
  • Humans
  • Insulin
  • Insulin Infusion Systems
  • Meals
  • Pancreas, Artificial*


  • Blood Glucose
  • Insulin