# SelfEEG: A Python library for Self-Supervised Learning in Electroencephalography

arXiv: https://arxiv.org/abs/2401.05405 · HTML: https://mlsanity.com/paper/2401.05405/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 3 of its 9 references that are in the map.
- First posted on arXiv 20 Dec 2023.

## Builds on (most cited first, 3 of 3)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Uncovering the structure of clinical EEG signals with self-supervised learning](https://mlsanity.com/paper/2007.16104/) (2020)
- [An overview of open source Deep Learning-based libraries for Neuroscience](https://mlsanity.com/paper/2301.05057/) (2022)

## Built on by (most cited first, 5 of 5)

- [The role of data partitioning on the performance of EEG-based deep learning models in supervised cross-subject analysis: a preliminary study](https://mlsanity.com/paper/2505.13021/) (2025)
- [Self-DANA: A Resource-Efficient Channel-Adaptive Self-Supervised Approach for ECG Foundation Models](https://mlsanity.com/paper/2507.14151/) (2025)
- [xEEGNet: Towards Explainable AI in EEG Dementia Classification](https://mlsanity.com/paper/2504.21457/) (2025)
- [TransformEEG: Towards Improving Model Generalizability in Deep Learning-based EEG Parkinson's Disease Detection](https://mlsanity.com/paper/2507.07622/) (2025)
- [Low-Budget Active Learning through Entropic Optimal Transport](https://mlsanity.com/paper/2610.01199/) (2026)

## Abstract (arXiv)

SelfEEG is an open-source Python library developed to assist researchers in conducting Self-Supervised Learning (SSL) experiments on electroencephalography (EEG) data. Its primary objective is to offer a user-friendly but highly customizable environment, enabling users to efficiently design and execute self-supervised learning tasks on EEG data. SelfEEG covers all the stages of a typical SSL pipeline, ranging from data import to model design and training. It includes modules specifically designed to: split data at various granularity levels (e.g., session-, subject-, or dataset-based splits); effectively manage data stored with different configurations (e.g., file extensions, data types) during mini-batch construction; provide a wide range of standard deep learning models, data augmentations and SSL baseline methods applied to EEG data. Most of the functionalities offered by selfEEG can be executed both on GPUs and CPUs, expanding its usability beyond the self-supervised learning area. Additionally, these functionalities can be employed for the analysis of other biomedical signals often coupled with EEGs, such as electromyography or electrocardiography data. These features make selfEEG a versatile deep learning tool for biomedical applications and a useful resource in SSL, one of the currently most active fields of Artificial Intelligence.
