SSM-CGM: Interpretable State-Space Forecasting Model of Continuous Glucose Monitoring for Personalized Diabetes Management

Shakson Isaac, Yentl Collin, Chirag PatelTS4H @ NeurIPS 2025

TL;DR

This paper introduces SSM-CGM, a novel interpretable forecasting model for continuous glucose monitoring (CGM) that leverages Mamba's efficient state-space modeling. SSM-CGM not only improves prediction accuracy over existing methods but also provides crucial interpretability and enables counterfactual "what-if" scenarios, paving the way for more personalized diabetes management.

What Problem Does This Paper Address?

Managing diabetes effectively relies heavily on understanding glucose levels, which are continuously tracked by Continuous Glucose Monitors (CGMs). While CGM data is rich, current forecasting models often lack interpretability, making it difficult for clinicians and patients to trust and act upon their predictions. This gap hinders the translation of CGM data into actionable, personalized guidance for diabetes management. The authors aim to bridge this by developing a model that is not only accurate but also transparent and capable of simulating the impact of potential interventions.

Methods

The core of SSM-CGM is a Mamba-based neural state-space model. Mamba is chosen for its efficiency in handling long sequences and its state-space architecture, which is well-suited for temporal modeling. The model integrates CGM data with wearable activity signals (heart rate, respiration, steps, etc.) and static features (age, diabetes status).

Key methodological innovations include:

  • Mamba Integration: Replacing the traditional LSTM and self-attention mechanisms in models like the Temporal Fusion Transformer (TFT) with Mamba blocks for improved long-context handling and efficiency.
  • Interpretability Mechanisms:
    • Variable Selection Networks (VSNs): These networks provide insights into which input features (e.g., heart rate, meal flags) are most influential for predictions at different time steps.
  • Hidden Attention (SSM Dynamics): By unrolling the Mamba state-space equations, the model generates "hidden attention" maps that reveal when past information is most critical for forecasting.
  • Counterfactual Forecasting: The model can simulate "what-if" scenarios by allowing users to specify planned changes in physiological signals (like heart rate) and observe their predicted impact on future glucose levels. This is achieved by directly conditioning the model on these planned future covariate sequences.

Datasets

The primary dataset used is AI-READI, a multimodal dataset containing CGM and wearable activity data from 741 individuals. To address the lack of meal annotations in AI-READI, the authors trained a meal-detection model on the CGMacros dataset.

Key Insights and Ideas

  • Mamba's Efficacy for CGM: The paper demonstrates that Mamba's state-space approach is a viable and effective alternative to transformers for long-context time-series forecasting tasks like CGM prediction.
  • Interpretability as a Clinical Necessity: The VSNs and hidden attention mechanisms provide crucial insights into what signals matter and when they matter, moving beyond black-box predictions to offer clinically relevant explanations.
  • Physiologically Grounded Counterfactuals: The ability to simulate "what-if" scenarios based on physiological signals offers a powerful tool for personalized behavioral guidance, allowing users to understand the potential consequences of planned actions.
  • Individualized Dynamics: The model's ability to capture individual variations, as evidenced by participant ID embeddings and personalized forecasts, is key to effective diabetes management.

Key Results

  • Improved Accuracy: SSM-CGM consistently outperformed the Temporal Fusion Transformer (TFT) baseline, showing approximately 2-7% reduction in Mean Absolute Error (MAE) across different context lengths (12h, 24h, 48h).
  • Context Length Benefits: Performance gains were observed with increasing context length, highlighting the importance of long-range temporal information for CGM forecasting.
  • Interpretability Findings: VSNs identified meal flags, stress levels, and heart/respiration rates as key predictors. Hidden attention maps revealed that recent history is dominant, but specific past events can remain influential.
  • Counterfactual Impact: Simulated interventions showed that a +2 SD increase in heart rate could lead to a -5.0 mg/dL change in glucose, while a similar increase in respiration rate had a smaller effect. These effects correlated with distinct health markers, suggesting distinct physiological pathways.
  • Meal Detection Performance: The trained meal detection model achieved a recall of 80.13% and precision of 72.08%, deemed sufficient for use as a proxy covariate.

Limitations and Future Work

  • Dataset Limitations: The AI-READI dataset lacks direct meal and medication annotations, which are crucial for glucose dynamics. The meal detection model provides only a coarse proxy. Unrecorded insulin administration also contributes to prediction error.
  • Modeling Limitations: While SSM-CGM outperformed TFT, further comparisons with other state-of-the-art models and more extensive ablation studies are needed. Runtime efficiency is also a consideration.
  • Interpretability vs. Causality: The interpretability and counterfactual outputs are associational, not causal, and should be viewed as hypothesis-generating.
  • Forecasting Scope: The current evaluation is limited to a 1-hour forecast horizon. Extending this to longer horizons and incorporating multivariate interventions (e.g., coordinated activity patterns) is a future direction.
  • Generalization: Results are specific to the AI-READI cohort; generalization to other datasets with different demographics, devices, or recording conditions needs to be explored.

Future work includes incorporating planned categorical covariates, extending to multivariate forecasting, developing streaming-capable versions, and integrating with reinforcement learning for personalized adaptive policies.

Summary updated

BibTeX
@inproceedings{isaac2025ssm,
  author = {Shakson Isaac and Yentl Collin and Chirag Patel},
  title = {{SSM-CGM: Interpretable State-Space Forecasting Model of Continuous Glucose Monitoring for Personalized Diabetes Management}},
  booktitle = {TS4H @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=CatU8GAvxV},
}
Figure