Exploring the potential of XAI methods in generating clinically meaningful explanations for glycemia prediction in diabetes patients
Glycemic emergencies are a frequent cause of hospital admissions and can lead to severe complications, particularly in older or medically complex patients. Anticipating these events is essential for timely intervention and personalized care. This study aimed to identify patients at risk of hypoglycemia or hyperglycemia using routinely collected data from emergency department of 11 hospitals in Spain. A comprehensive modeling framework was designed to identify glycemic events from clinical data. Multiple supervised learning algorithms were trained and validated using routinely collected patient variables. Model explainability was ensured through the integration of XAI methods, which quantified the contribution of individual clinical features to prediction outcomes. This approach enabled transparent model behavior, supporting clinical understanding and facilitating patient risk stratification. The developed models achieved predictive accuracies between 70% and 74%. Explainability analyses revealed distinct glycemic risk patterns: patients aged 87 years and above were predominantly hypoglycemic, while among younger individuals, those with a body temperature exceeding 36 $$^{\circ}$$C, Chronic Kidney Disease (CKD) (creatinine $$ > 1.5 \textrm{mg/dL}$$), and platelet counts below $$200,000 /\mu \textrm{L}$$ were more likely to be hyperglycemic, whereas others tended toward hypoglycemia. These results highlight the predictive value of age, thermoregulation, renal function, and hematologic parameters in assessing glycemic risk. The combination of machine learning and explainability provides interpretable, actionable insights to support early risk stratification and improve outcomes in diabetes care. This retrospective study was approved by the Comité de Ética de la Investigación con medicamentos (CEIm) of Hospital Clínico San Carlos (Madrid, Spain) (Approval code: 19/332-E). The requirement for informed consent was waived. All procedures followed institutional ethics standards, the Declaration of Helsinki, and applicable national regulations. Retrospectively registered.
Authors
- Sayna Rotbei (ORCID: https://orcid.org/0000-0002-3457-7559)
- Giuseppe Fico (ORCID: https://orcid.org/0000-0003-1551-4613)
- Ricardo Mesanza Forés
- Ana Sánchez (ORCID: https://orcid.org/0000-0003-3283-8812)
- Aitor Odiaga Andicoechea
- Arturo Corbatón Anchuelo (ORCID: https://orcid.org/0000-0002-8775-4766)
- Ricardo Muñoz Albert
- Rosana Soriano Barrón
- Hania Tourab (ORCID: https://orcid.org/0000-0003-0287-1232)
- Raquel Piñero Panadero
- Pablo Matías Soler
- Andrea Irimia
- Esther Ruescas Esculano
- Mireia Cramp Vinceixo
- Laura Mariel Matus
- Beatriz Merino-Barbancho
- Alessio Botta
- María Ángeles San Martín Díez
- Laura Lopez-Perez
- F. Beddar Chaib
- Luis Picazo García
Institutions
- Universidad de Valladolid (ES)
- Generalitat Valenciana (ES)
- Hospital Clínico San Carlos (ES)
- Centro de Investigación Biomédica en Red Diabetes y Enfermedades Metabólicas Asociadas (ES)
- Hospital de Basurto (ES)
- Hospital de La Ribera (ES)
- Instituto de Investigación Sanitaria del Hospital Clínico San Carlos (ES)
- Hospital Universitario de Getafe (ES)
- Hospital de Galdakao (ES)
- Hospital Universitario Central de Asturias (ES)
- Clinica Universidad de Navarra (ES)
- Hospital Universitario del Vinalopó (ES)
- Hospital San Pedro (ES)
- Centro de Emergencias Sanitarias 061 (ES)
- Hospital Universitario de Fuenlabrada (ES)
- Hospital Universitari Joan XXIII de Tarragona (ES)
- Complejo Asistencial Universitario de Palencia (ES)
- University of Naples Federico II (IT)
- Universidad Politécnica de Madrid (ES)
Publication Details
- Journal
- BMC Medical Informatics and Decision Making
- Published
- 2026-03-14
- DOI
- https://doi.org/10.1186/s12911-026-03420-5
- Primary Topic
- Hyperglycemia and glycemic control in critically ill and hospitalized patients
- Type
- article
- Field-Weighted Citation Impact
- 0.00