GlyTwin: Enhancing Digital Twin for Glucose Control in Type 1 Diabetes using Patient-Centric Counterfactual Treatments

Abstract

Frequent and long-term exposure to hyperglycemia increases the risk of chronic complications, neuropathy, nephropathy, and cardiovascular disease. Existing continuous subcutaneous insulin infusion (CSII) and continuous glucose monitoring (CGM) technologies can only model specific aspects of glycemic regulation—such as predicting hypoglycemia and administering small insulin boluses. Similarly, current digital twin approaches in diabetes management are primarily focused on predicting glucose response to human behavior and insulin therapy. As a result, current technologies lack the ability to provide alternative treatment scenarios that could guide proactive behavioral interventions for optimal diabetes management. To address this gap, we propose GlyTwin, a novel computational framework that enhances capabilities of digital twin technologies by integrating counterfactual explanations to simulate optimal behavioral treatments for glucose control. GlyTwin generates counterfactual treatments by recommending adjustments to behavioral choices such as carbohydrate intake and insulin dosing to significantly reduce the occurrences and duration of hyperglycemic events. Additionally, GlyTwin incorporates stakeholders' preferences into its intervention-generation process and ensures that the tool itself is personalized and user-centric. We evaluate GlyTwin on AZT1D, a new dataset that we have constructed by collecting longitudinal data from $50$ individuals living with type 1 diabetes (T1D) on automated insulin delivery (AID) systems, each monitored for $26$ days. Results show that GlyTwin outperforms state-of-the-art methods for generating counterfactual explanations with 85.8% valid explanations and 87.3% effectiveness in preventing hyperglycemia when compared against historical data.

Publication
IEEE Journal of Biomedical and Health Informatics (IEEE JBHI) - May 2026
Asiful Arefeen
Asiful Arefeen
Graduate Research Assistant

I am a PhD student at Arizona State University (ASU). I am working under the supervision of Professor Hassan Ghasemzadeh at the Embedded Machine Intelligence Lab (EMIL). I am interested in explainable AI, using AI to generate interventions in digital health, machine learning, passive sensing and mobile health. I received a BS in Electrical & Electronic Engineering from Bangladesh University of Engineering & Technology (BUET) in 2019 and an MS in Biomedical Informatics from Arizona State University in 2023.

Saman Khamesian
Saman Khamesian
Graduate Research Associate

I am a Ph.D. researcher at Arizona State University, specializing in Artificial Intelligence with a focus on health applications. As a Graduate Research Assistant in the EMIL Lab under Dr. Hassan Ghasemzadeh, I work on developing advanced machine learning solutions for Type 1 diabetes management, including personalized glucose forecasting and automated insulin delivery systems.

Hassan Ghasemzadeh
Hassan Ghasemzadeh
Director

Hassan Ghasemzadeh is an Associate Professor of Biomedical Informatics at Arizona State University (ASU) and a Computer Science Adjunct Faculty at Washington State University (WSU).