GlucoTwin: An Adaptive Digital Twin for Glucose-Risk Prediction

Team: Team MeowMeow
Theme: AI × Healthcare

Inspiration

Glucose is dynamic. A single sensor reading cannot fully describe how it is changing, and interpreting a stream of measurements requires more context than looking at the latest number alone.

We built GlucoTwin to explore how a continuously updating digital twin could combine simulated sensor observations, temporal patterns, and patient context to estimate near-term glucose-threshold risk. Our goal was to create an interactive, inspectable prototype—not a black-box prediction demo.

What it does

GlucoTwin replays simulated continuous glucose monitoring (CGM) data and estimates whether a future simulated glucose reading will exceed 180 mg/dL within the next 120 minutes.

The application brings together:

  • Live digital-twin replay: Step through a simulated sensor stream and observe predictions update.
  • Machine-learning inference: Use a trained HistGradientBoostingClassifier with calibrated probabilities.
  • Temporal feature engineering: Summarize recent glucose dynamics and sensor quality using causal features.
  • Explainability: Inspect the factors associated with model predictions.
  • Scenario simulation: Explore how changes to simulated meals, activity, and profile assumptions affect outputs.
  • Data-quality safeguards: Withhold predictions when sensor data is insufficient or unreliable.
  • Retrospective evaluation and audit logging: Review prior predictions and examine held-out model performance.

How we built it

The prototype uses Python, Streamlit, pandas, NumPy, scikit-learn, and SQLite. Its workflow includes synthetic-data generation, temporal feature engineering, patient-separated model development and evaluation, interactive inference, and prediction logging.

The reported evaluation uses 160 synthetic patients with five-minute sensor observations across seven simulated days. Training, validation, calibration, and test patients are separated to evaluate performance on held-out patients.

Results

On the reported held-out evaluation, the fused model achieved:

  • F1 score: 0.845
  • Average precision: 0.950
  • Precision: 0.873
  • Recall: 0.819
  • Brier score: 0.070

These are experimental results on synthetic data, not evidence of clinical performance. A dynamic-only ablation slightly outperformed the fused model on F1, so the current experiment does not demonstrate a predictive benefit from adding historical profile context. We treat this as an important finding and a direction for further work.

What we learned

A digital twin needs more than a prediction score. It needs a way to inspect evolving state, understand data quality, explore assumptions, and review previous outputs. We also learned that a more elaborate feature set is not automatically a better model: ablation results are essential to evaluating whether additional context helps.

What's next

Future work could investigate more realistic data-generating processes, stronger patient-level personalization, uncertainty-aware decisions, robustness to missing sensor data, and independent validation before any clinical use is considered.

Links

Team MeowMeow

  • J K Raj Vamshi Thakur — IIIT Allahabad
  • Swasti Mishra — IIT (ISM) Dhanbad

Important limitation

All patient profiles and sensor readings are synthetic. GlucoTwin is an unvalidated research prototype, not a medical device. It must not be used for diagnosis, treatment, or real-world clinical decisions. The reported metrics do not establish clinical accuracy or benefit.

Share this project:

Updates

Submission history