Enhancing the Interpretability of Deep Models in Healthcare Through Attention: Application to Glucose Forecasting for Diabetic People

Maxime De Bois, Mounîm A. El-Yacoubi, Mehdi Ammi

Introduction

The integration of deep learning into clinical practice is often hindered by the "black box" nature of high-performing models. In critical domains like blood glucose forecasting for diabetic patients, transparency is as vital as accuracy. Clinicians and patients must understand the underlying rationale for a prediction—such as a forecasted hypoglycemic event—to ensure it is based on sound physiological signals rather than data artifacts or biases. This work addresses the trade-off between predictive power and interpretability by adapting the RETAIN (REverse Time AttentIoN) architecture for continuous glucose monitoring (CGM) forecasting.

Methodology: Interpretable Glucose Forecasting

The proposed model adapts the RETAIN architecture, originally designed for classification, into a regression framework for predicting continuous glucose values. The innovation lies in a two-level attention mechanism that provides granular insights into the model's decision-making process.

The RETAIN architecture adapted for glucose forecasting. It features a dual-level attention mechanism: (2) temporal attention $\alpha$ and (3) variable-level attention $\beta$, which are combined (4) to produce the final prediction (5) from input embeddings (1).

As illustrated in the architecture above, the model processes input sequences through two distinct pathways:

  1. Temporal Attention ($\alpha$): This mechanism identifies which specific time steps in the historical data (e.g., glucose levels from 30 minutes ago vs. 2 hours ago) are most influential for the current prediction.
  2. Variable-level Attention ($\beta$): This identifies which specific input features—such as insulin dosage, carbohydrate intake, or prior glucose levels—are driving the prediction at each of those time steps.

By combining these weights, the authors derive a Contribution Coefficient. This metric allows the model's final prediction to be "unfolded" into a linear combination of its inputs, making the influence of each physiological factor quantifiable and interpretable. To address data scarcity in individual patient profiles, the model utilizes Multi-Source Adversarial Transfer Learning (ATL), learning general physiological patterns from a broad patient cohort before fine-tuning for specific individuals.

Experimental Setup and Datasets

The model was validated on two datasets representing different diabetic populations:

  • IDIAB Dataset: A proprietary dataset of 6 patients with Type-2 diabetes, monitored for approximately one month.
  • OhioT1DM Dataset: A public benchmark dataset of 6 patients with Type-1 diabetes, monitored for eight weeks.

Both datasets include CGM data, insulin infusion records, and carbohydrate (CHO) intake.

Results and Clinical Insights

The RETAIN-based model demonstrates a favorable balance between accuracy and transparency.

Predictive Performance

On the IDIAB dataset, the model achieved a Root Mean Square Error (RMSE) of 19.49 mg/dL, performing comparably to "black-box" models like LSTMs (19.27 mg/dL) and Fully Convolutional Networks (18.51 mg/dL). Crucially, in terms of clinical safety measured by Continuous Glucose-Error Grid Analysis (CG-EGA), RETAIN achieved an "Accurate Prediction" (AP) rate of 92.41%, slightly exceeding the performance of the LSTM and FCN.

Interpretability and Physiological Patterns

The attention mechanism revealed several key physiological insights:

  • Temporal Locality: For a 30-minute prediction horizon, data older than one hour contributed almost nothing to the prediction. This suggests that short-term glucose dynamics are highly localized in time.
  • Contextual Importance: The model places significant weight on the patient's physiological state immediately preceding events like meals or insulin doses, highlighting the importance of baseline trends in determining future responses.
Detailed view of the temporal attention mechanism ($\alpha$) weighting historical states ($h$) to form the context vector ($c_t$) for the prediction horizon ($PH$).

Conclusion

This research demonstrates that deep learning models can be made interpretable without significant sacrifices in predictive accuracy. By providing a "Contribution Coefficient," the adapted RETAIN model offers a clinically actionable tool that can explain its forecasts. Future work will explore more complex hidden representations to capture longer-term dependencies and integrate additional data streams like physical activity and sleep patterns to further enhance forecasting precision.

Summary updated

BibTeX
@article{bois2021enhancing,
  author = {Maxime De Bois and Mounîm A. El-Yacoubi and Mehdi Ammi},
  title = {{Enhancing the Interpretability of Deep Models in Healthcare Through Attention: Application to Glucose Forecasting for Diabetic People}},
  journal = {Int. J. Pattern Recognit. Artif. Intell.},
  year = {2021},
  doi = {10.1142/s0218001421600065},
}
Figure