Coder Social home page Coder Social logo

emadeldeen24 / eval_ssl_ssc Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 5.0 79 KB

[TNSRE 2023] Self-supervised Learning for Label-Efficient Sleep Stage Classification: A Comprehensive Evaluation

Home Page: https://ieeexplore.ieee.org/document/10044720

License: MIT License

Python 97.77% Shell 2.23%
deep-learning evaluation label-efficient self-supervised-learning sleep-stage-classification sleep-staging unsupervised-learning contrastive-learning pretext-task representation-learning

eval_ssl_ssc's Introduction

Self-supervised Learning for Label-Efficient Sleep Stage Classification: A Comprehensive Evaluation [Paper][Cite]

by: Emadeldeen Eldele, Mohamed Ragab, Zhenghua Chen, Min Wu, Chee Keong Kwoh, and Xiaoli Li.

This work has been accepted for publication in the IEEE Transactions on Neural Systems and Rehabilitation Engineering (TNSRE).

Abstract:

The past few years have witnessed a remarkable advance in deep learning for EEG-based sleep stage classification (SSC). However, the success of these models is attributed to possessing a massive amount of labeled data for training, limiting their applicability in real-world scenarios. In such scenarios, sleep labs can generate a massive amount of data, but labeling these data can be expensive and time-consuming. Recently, the self-supervised learning (SSL) paradigm has shined as one of the most successful techniques to overcome the scarcity of labeled data. In this paper, we evaluate the efficacy of SSL to boost the performance of existing SSC models in the few-labels regime. We conduct a thorough study on three SSC datasets, and we find that fine-tuning the pretrained SSC models with only 5% of labeled data can achieve competitive performance to the supervised training with full labels. Moreover, self-supervised pretraining helps SSC models to be more robust to data imbalance and domain shift problems.

Datasets:

We used three public datasets in this study:

  • Sleep-EDF
  • SHHS
  • ISRUC

We use the same preprocessing in TS-TCC.

To split the data into k-fold cross-validation and get the few label percentages, use split_k-fold_and_few_labels.py file.

To add a new dataset, include it in the "data" folder, add it to the configs/hparam.py and configs.data_configs.py files. Also add a corresponding definition in the trainer file.

Self-supervised learning Algorithms

We used four SSL algorithms:

To add a new SSL algorithm, include it in the algorithms.py file.

Sleep stage classification models.

We used three SSC models:

The code of the adopted SSC models is included in models/models.py. Each SSC model is split into two classes: feature extractor and temporal encoder. The classifier class is common among them all.

To add a new SSC model, say: "sleepX", include 2 classes: "sleepX_fe" and "sleepX_temporal" in models/models.py.

Training modes:

  1. Supervised: include "supervised" in the training mode.
  2. Self-supervised training: use "ssl"
  3. Fine-tuning with different label percentages: include "ft" in the training mode name and use any other description for yourself (e.g., "ft_1per_labels")

Results:

  • The experiments of each dataset will be in a separate folder.
  • Each run_description will be in a separate folder.
  • For the K-fold settings, the overall results will be calculated after the last fold.
  • Also, change "4" if you used different k-fold settings.

Run the code:

either use single_run.sh to run a specific fold or use multiple_runs.sh for multiple folds/multiple SSC models.

Citation:

If you found this work useful for you, please consider citing it.

@ARTICLE{emadeldeen2023eval,
  author={Eldele, Emadeldeen and Ragab, Mohamed and Chen, Zhenghua and Wu, Min and Kwoh, Chee-Keong and Li, Xiaoli},
  journal={IEEE Transactions on Neural Systems and Rehabilitation Engineering}, 
  title={Self-Supervised Learning for Label- Efficient Sleep Stage Classification: A Comprehensive Evaluation}, 
  year={2023},
  volume={31},
  number={},
  pages={1333-1342},
  doi={10.1109/TNSRE.2023.3245285}
}

Contact

For any issues/questions regarding the paper or reproducing the results, please contact me.
Emadeldeen Eldele
School of Computer Science and Engineering (SCSE),
Nanyang Technological University (NTU), Singapore.
Email: emad0002{at}e.ntu.edu.sg

eval_ssl_ssc's People

Contributors

emadeldeen24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eval_ssl_ssc's Issues

How to preprocess SHHS dataset

Thanks for your great work, I want to know how to preprocess the SHHS dataset, which doesn't seem to appear in the TS-TCC code. Could you please add a file?

How to divided the train data into 5 fold?

Hello, I have divided the data set of sleep edf according to the data preprocessing method of TS-TCC, and generated three files, train.pt/valid.pt/test.py. But I don't know how to divide train.pt into five folders.
I get error: FileNotFoundError: [Errno 2] No such file or directory: 'data\sleep_edf\fold_0\train_0_100per.pt'
Could you give me some suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.