PhysioEx β€” Pretrained Sleep Staging Models

Pretrained deep learning models for automatic sleep staging from PhysioEx (Gagliardi et al. 2025).

All models follow the AASM 5-class standard: W, N1, N2, N3, REM.

Available Models

Model Architecture Training Dataset ACC F1 ΞΊ Params Reference
sleeptransformer-phan Transformer SHHS 0.866 0.796 0.810 2.1M Phan et al. 2022
tinysleepnet-supratak CNN + LSTM Sleep-EDF 0.842 0.790 0.784 83K Supratak & Guo 2020
seqsleepnet-phan BiLSTM + Attention Sleep-EDF 0.810 0.758 0.742 659K Phan et al. 2019
chambon2018 Braindecode CNN MASS SS3 0.826 0.731 0.736 29K Chambon et al. 2018
tsinalis-2016 2-layer CNN Sleep-EDF 0.773 0.661 0.683 145K Tsinalis et al. 2016
protosleeptransformer-gagliardi Prototype-based Transformer 28 sites (multi-dataset) 0.880 0.797 0.829 4.0M Gagliardi et al.
protosleepnet-gagliardi Prototype-based BiLSTM + Attention 28 sites (multi-dataset) 0.872 0.780 0.818 792K Gagliardi et al.

The two *-gagliardi models are trained jointly on 28 sites; ACC / F1 / ΞΊ in this table are on the SHHS test subjects (842). Per-site test metrics for every training site are in each model folder (metrics.json) and on the documentation page. These sites were seen in training (other subjects), so the numbers are not an external validation.

Usage

from physioex.models import load_from_pretrained

model = load_from_pretrained("sleeptransformer-phan", verbose=True)

# Extract or download embeddings
from physioex.models import load_embeddings
path = load_embeddings("sleeptransformer-phan", "hmc", verbose=True)

ProtoSleepNet and ProtoSleepTransformer

model = load_from_pretrained("protosleeptransformer-gagliardi", verbose=True)   # L=21; "protosleepnet-gagliardi" has L=20
# input (batch, L, 3, 29, 129): log-power spectrograms of EEG, EOG, EMG; output (batch, L, 5) logits W/N1/N2/N3/REM

Interpretable, prototype-based sleep staging (paper and code, npj Digital Medicine). These checkpoints are the multi-dataset models; they contain no prototype codebook (quantize=True needs one learned after training, see the paper repository). Research use only; not a medical device.

Pre-extracted Embeddings

Model HuggingFace Repo Datasets
SeqSleepNet-Phan 4rooms/seqsleepnet-phan-embeddings 25 datasets
TinySleepNet-Supratak 4rooms/tinysleepnet-supratak-embeddings 25 datasets
SleepTransformer-Phan 4rooms/sleeptransformer-phan-embeddings 8 datasets
Chambon2018 4rooms/chambon2018-embeddings 8 datasets
Tsinalis-2016 4rooms/tsinalis-2016-embeddings 8 datasets

Datasets

Citations

@article{gagliardi2025physioex,
    author={Gagliardi, Guido and Alfeo, Luca and Cimino, Mario G C A and Valenza, Gaetano and De Vos, Maarten},
    title={PhysioEx, a new Python library for explainable sleep staging through deep learning},
    journal={Physiological Measurement},
    url={http://iopscience.iop.org/article/10.1088/1361-6579/adaf73},
    year={2025},
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support