Objective: Deep learning (DL) has become state-of-the-art for blood glucose (BG) forecasting in type 1 diabetes (T1D). However, its black-box nature raises safety and reliability concerns regarding its use for therapeutic decision-support. This study aims to: (1) highlight potential risks associated with standard DL-based BG forecasting, and (2) address them with PhyNet, a physiology-constrained monotonic neural network. Methods: Two large-scale datasets (T1DEXI and MetaboNet, 848 subjects in total) were used to develop PhyNet-which enforces physiological consistency through a multi-branch structure and weight constraints-and compare it against six DL baselines (convolutional, recurrent, and transformer-based architectures). Models predicted BG levels up to 90-minute ahead using continuous glucose monitoring (CGM) data, carbohydrate intake, and insulin dosing, and were assessed for: (i) predictive accuracy with standard metrics, and (ii) adherence to physiological principles (i.e., carbohydrates increase BG, insulin lowers it) using explainable AI. Specifically, we evaluated model-predicted responses to varying carbohydrate and insulin intakes, and generated counterfactual explanations to identify model-recommended actions for avoiding adverse events. Results: At a 30-minute horizon, predictive accuracy was similar across models (RMSE: 19.39-21.00 mg/dL; Time Gain: 10.45-13.35 min). Despite this, only PhyNet consistently captured the physiological effects of carbohydrates and insulin, yielding 0% unsafe recommendations versus up to 64.3% for baselines. Conclusion: Standard DL models can achieve state-of-the-art performance while failing to respect physiology, posing clinical risk. PhyNet preserves accuracy while enhancing physiological fidelity, supporting safer integration into T1D technologies. Significance: Evaluating physiological consistency alongside predictive accuracy is essential for responsible clinical translation of DL-based BG forecasting.
PhyNet: A Physiology-Constrained Monotonic Neural Network for Safe and Explainable Blood Glucose Forecasting
Andrea Calzavara;Francesco Prendin;Giacomo Cappon;Simone Del Favero;Andrea Facchinetti
2026
Abstract
Objective: Deep learning (DL) has become state-of-the-art for blood glucose (BG) forecasting in type 1 diabetes (T1D). However, its black-box nature raises safety and reliability concerns regarding its use for therapeutic decision-support. This study aims to: (1) highlight potential risks associated with standard DL-based BG forecasting, and (2) address them with PhyNet, a physiology-constrained monotonic neural network. Methods: Two large-scale datasets (T1DEXI and MetaboNet, 848 subjects in total) were used to develop PhyNet-which enforces physiological consistency through a multi-branch structure and weight constraints-and compare it against six DL baselines (convolutional, recurrent, and transformer-based architectures). Models predicted BG levels up to 90-minute ahead using continuous glucose monitoring (CGM) data, carbohydrate intake, and insulin dosing, and were assessed for: (i) predictive accuracy with standard metrics, and (ii) adherence to physiological principles (i.e., carbohydrates increase BG, insulin lowers it) using explainable AI. Specifically, we evaluated model-predicted responses to varying carbohydrate and insulin intakes, and generated counterfactual explanations to identify model-recommended actions for avoiding adverse events. Results: At a 30-minute horizon, predictive accuracy was similar across models (RMSE: 19.39-21.00 mg/dL; Time Gain: 10.45-13.35 min). Despite this, only PhyNet consistently captured the physiological effects of carbohydrates and insulin, yielding 0% unsafe recommendations versus up to 64.3% for baselines. Conclusion: Standard DL models can achieve state-of-the-art performance while failing to respect physiology, posing clinical risk. PhyNet preserves accuracy while enhancing physiological fidelity, supporting safer integration into T1D technologies. Significance: Evaluating physiological consistency alongside predictive accuracy is essential for responsible clinical translation of DL-based BG forecasting.Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.




