Real-Time Continuous Glucose Monitoring and Diabetic Ketoacidosis Interception: Optimizing Lightweight Random Forest and XGBoost Architectures for Resource-Constrained Edge-AI Wearable Devices
- Authors
-
-
Billy Elly
LautechAuthor
-
- Keywords:
- Diabetic Ketoacidosis, Continuous Glucose Monitoring, Edge-AI, XGBoost, Random Forest, Wearable Devices
- Abstract
-
Diabetic ketoacidosis (DKA) remains a life-threatening complication of type 1 diabetes, with delayed detection contributing to significant morbidity and healthcare costs. While continuous glucose monitoring (CGM) devices have revolutionized diabetes management, existing machine learning approaches for DKA prediction predominantly rely on computationally intensive deep learning models unsuitable for resource-constrained wearable deployment. This study addresses this gap by developing and optimizing lightweight Random Forest and XGBoost architectures specifically designed for real-time DKA interception on edge-AI wearable devices. Using a retrospective dataset of 259 participants with over 49,000 days of CGM monitoring, we engineered 26 temporal features capturing glucose dynamics and insulin delivery patterns. Our optimized XGBoost model achieved an ROC-AUC of 0.82 (SD 0.01) for predicting elevated ketone bodies (≥0.6 mmol/L), with feature importance analysis identifying glucose rate-of-change and time-above-threshold as the most discriminative predictors. Through systematic feature reduction and model quantization, we achieved a 62% reduction in memory footprint (from 4.2 MB to 1.6 MB) with minimal performance degradation, enabling deployment on microcontroller-class hardware with 347 kB flash and 23 kB RAM. The framework provides a replicable, clinically actionable approach for early DKA warning, with practical implications for improving patient outcomes through proactive intervention.
- Downloads
- Published
- 06/27/2026
- Section
- Articles
- License
-
Copyright (c) 2026 Billy Elly (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.
