Blood Glucose Prediction Using a Lightweight Sequential Transformer with Heart Rate Integration
DOI:
https://doi.org/10.47392/IRJAEH.2026.0257Keywords:
Blood Glucose Prediction, Continuous Glucose Monitoring, Focal Loss, Heart Rate Integration, Hypoglycemia Detection, Sequential Transformer, Type-1 DiabetesAbstract
Diabetes mellitus remains one of the most prevalent chronic conditions worldwide, demanding continuous and accurate monitoring of blood glucose levels to prevent life-threatening complications such as hypoglycemia and hyperglycemia. Traditional glucose prediction systems rely solely on historical glucose readings, overlooking the physiological relationship between cardiovascular activity and glycemic fluctuations. In this work, a lightweight Sequential Transformer model is proposed that integrates heart rate signals alongside conventional diabetes management inputs — including basal insulin, bolus insulin, and carbohydrate intake — to achieve more physiologically informed blood glucose forecasting across multiple prediction horizons ranging from 5 to 30 minutes. The model is trained and evaluated on the OhioT1DM dataset comprising six Type-1 diabetic patients. To address the clinically critical problem of hypoglycemia detection, a Combined Focal-Asymmetric Huber Loss is introduced alongside a hypoglycemia-aware oversampling strategy. A post-training threshold calibration further tunes the decision boundary by maximising the F2-score on the validation set. The proposed system achieves a root mean square error of 5.81 mg/dL, a mean absolute percentage error of 1.28%, and an R² of 0.877, with 98.89% of predictions falling within the clinically safe Zone A of the Clarke Error Grid. Hypoglycemia sensitivity improved from 0% in the baseline to 66.7% at the critical 5-minute prediction horizon, demonstrating that targeted loss design and sampling strategies can transform a clinically unsafe model into a practically deployable glucose forecasting system.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2026 International Research Journal on Advanced Engineering Hub (IRJAEH)

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