Guido Gagliardi, Luca Alfeo, Mario G C A Cimino, Gaetano Valenza, Maarten De Vos
{"title":"PhysioEx, a new Python library for explainable sleep staging through deep learning.","authors":"Guido Gagliardi, Luca Alfeo, Mario G C A Cimino, Gaetano Valenza, Maarten De Vos","doi":"10.1088/1361-6579/adaf73","DOIUrl":null,"url":null,"abstract":"<p><strong>Objective: </strong>
Sleep staging is a crucial task in clinical and research contexts for diagnosing and understanding sleep disorders. This work introduces PhysioEx, a Python library designed to support the analysis of sleep stages using deep learning and Explainable AI (XAI). 

Approach:
PhysioEx provides an extensible and modular API for standardizing and automating the sleep staging pipeline, covering data preprocessing, model training, testing, fine-tuning, and explainability. It supports both low-resource devices and high-performance computing clusters and includes pretrained models based on the Sleep Heart Health Study (SHHS) dataset. These models support single-channel EEG and multichannel EEG-EOG-EMG configurations and are easily adaptable to custom datasets. PhysioEx also features a command-line interface toolbox allowing users to streamline the model development and deployment. The library offers a range of XAI post-hoc methods to explain model decisions and align them with expert knowledge. 

Main results:
PhysioEx benchmark state-of-the-art sleep staging models in a standard pipeline. Enabling a fair comparison between them both on the training source and out-of-domain sources. Its XAI techniques provide insights into deep learning-based sleep staging by linking model decisions to human-understandable concepts, such as AASM-defined rules. 

Significance:
PhysioEx addresses the need for a standardized and accessible platform for sleep staging analysis, combining deep learning and XAI. By supporting modular workflows and explainable insights, it bridges the gap between machine learning models and clinical expertise. PhysioEx is publicly available and installable via pip, making it a valuable tool for researchers and practitioners in sleep medicine.</p>","PeriodicalId":20047,"journal":{"name":"Physiological measurement","volume":" ","pages":""},"PeriodicalIF":2.3000,"publicationDate":"2025-01-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Physiological measurement","FirstCategoryId":"5","ListUrlMain":"https://doi.org/10.1088/1361-6579/adaf73","RegionNum":4,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"BIOPHYSICS","Score":null,"Total":0}
引用次数: 0
Abstract
Objective:
Sleep staging is a crucial task in clinical and research contexts for diagnosing and understanding sleep disorders. This work introduces PhysioEx, a Python library designed to support the analysis of sleep stages using deep learning and Explainable AI (XAI).
Approach:
PhysioEx provides an extensible and modular API for standardizing and automating the sleep staging pipeline, covering data preprocessing, model training, testing, fine-tuning, and explainability. It supports both low-resource devices and high-performance computing clusters and includes pretrained models based on the Sleep Heart Health Study (SHHS) dataset. These models support single-channel EEG and multichannel EEG-EOG-EMG configurations and are easily adaptable to custom datasets. PhysioEx also features a command-line interface toolbox allowing users to streamline the model development and deployment. The library offers a range of XAI post-hoc methods to explain model decisions and align them with expert knowledge.
Main results:
PhysioEx benchmark state-of-the-art sleep staging models in a standard pipeline. Enabling a fair comparison between them both on the training source and out-of-domain sources. Its XAI techniques provide insights into deep learning-based sleep staging by linking model decisions to human-understandable concepts, such as AASM-defined rules.
Significance:
PhysioEx addresses the need for a standardized and accessible platform for sleep staging analysis, combining deep learning and XAI. By supporting modular workflows and explainable insights, it bridges the gap between machine learning models and clinical expertise. PhysioEx is publicly available and installable via pip, making it a valuable tool for researchers and practitioners in sleep medicine.
期刊介绍:
Physiological Measurement publishes papers about the quantitative assessment and visualization of physiological function in clinical research and practice, with an emphasis on the development of new methods of measurement and their validation.
Papers are published on topics including:
applied physiology in illness and health
electrical bioimpedance, optical and acoustic measurement techniques
advanced methods of time series and other data analysis
biomedical and clinical engineering
in-patient and ambulatory monitoring
point-of-care technologies
novel clinical measurements of cardiovascular, neurological, and musculoskeletal systems.
measurements in molecular, cellular and organ physiology and electrophysiology
physiological modeling and simulation
novel biomedical sensors, instruments, devices and systems
measurement standards and guidelines.