Metadata-Version: 2.4
Name: sssm
Version: 0.0.9
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: importlib-metadata
Requires-Dist: torch>=2.8.0
Requires-Dist: pandas>=2.3.2
Requires-Dist: einops>=0.8.1
Requires-Dist: seaborn>=0.13.2
Requires-Dist: numpy>=1.26.4
Requires-Dist: scipy>=1.16.2
Requires-Dist: matplotlib>=3.10.6
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist

# SSSM - Sleep Semantic Segmentation Model

Sleep is organized by transient, heterogeneous events (e.g., spindles, slow waves, K-complexes) that shape
cognition and disease. Yet most automated analyses are constrained by narrow event definitions, coarse
temporal resolution, and the lack of large-scale, multi-event datasets. This project addresses these gaps by
reframing sleep analysis as semantic segmentation of EEG, delivering high-resolution event probabilities and
actionable downstream outputs.

## What SSSM provides
- Large-scale multi-event dataset: 276,404 events across 7 types (K-complex, slow wave, sleep spindle,
    micro-arousal, sawtooth wave, vertex sharp wave, background), built efficiently via self-supervised and
    active learning and validated with independent datasets/algorithms.
- Sleep Semantic Segmentation Model (SSSM): The first model to decode sleep EEG into fine-grained events at
    the sampling-point level (100 Hz), showing efficiency and strong generalizability across datasets, sampling
    rates, and electrode montages.
- Versatile applications: (a) Sleep event forecasting with an iTransformer, enabling up to 2 s look-ahead for
    real-time interventions; (b) Scalable automatic sleep staging by integrating a Transformer encoder into SSSM,
    achieving state-of-the-art performance across 14 clinical datasets; (c) Disease diagnosis by embedding a
    Mamba model into SSSM, detecting disorder-related patterns (e.g., sleep apnea, depression, REM behavior
    disorder).

## Citation
If you use this tool or its results in your research, please cite:

> ``` 
> @article {
>            Bao2025.09.25.25336636,
>            author = {Xiaoyu, Bao and Li, Man and Chen, Di and Wang, Zijian and Huang, Qiyun and Wen, Zhenfu and Li, Yuanqing},
>            title = {Semantic Segmentation of Sleep Events for High-Resolution Sleep Decoding},
>            elocation-id = {2025.09.25.25336636},
>            year = {2025},
>            doi = {10.1101/2025.09.25.25336636},
>            publisher = {Cold Spring Harbor Laboratory Press},
>            URL = {https://www.medrxiv.org/content/early/2025/09/29/2025.09.25.25336636},
>            eprint = {https://www.medrxiv.org/content/early/2025/09/29/2025.09.25.25336636.full.pdf},
>            journal = {medRxiv}
>        }
> ```
