Abstract
This study introduces a novel AI-based algorithm designed to detect and reconstruct meals in real-time using continuous glucose monitoring (CGM) data. The goal is to automate meal detection for insulin-dependent diabetes management, eliminating the need for manual carbohydrate (CHO) intake entries, which are often incomplete or inaccurate. The algorithm was developed using data from the CDDIAB observational study, which includes 30 days of real-life CGM readings, self-reported CHO intakes, and insulin doses from 14 patients with Type 1 Diabetes (T1DM).The algorithm uses a global approach, training models on the data of multiple patients and testing on individual patient datasets. By applying binary classification (meal/no meal) to CGM data and optimizing detection time range, the system aims to improve the accuracy and timing of meal detection. Preliminary results are promising, showing an AUC of 91.5%, with a precision of 0.59 and sensitivity of 0.63 at a 60-minute detection time range. However, challenges arise from missing or inaccurate self-reported data, which can bias results by falsely classifying correct detections as false positives.This real-time meal detection algorithm shows potential for improving decision support tools and diabetes management systems by automating meal inputs. Future work will focus on refining the model with cleaner datasets and developing an additional algorithm to estimate CHO amounts for meal reconstruction.