Politecnico di Torino (logo)

Unsupervised and Self-Supervised Machine-Learning for Epilepsy Detection on EEG Data

Luca Benfenati

Unsupervised and Self-Supervised Machine-Learning for Epilepsy Detection on EEG Data.

Rel. Daniele Jahier Pagliari, Luca Benini, Andrea Cossettini, Alessio Burello, Thorir Mar Ingolfsson. Politecnico di Torino, Corso di laurea magistrale in Data Science and Engineering, 2023

PDF (Tesi_di_laurea) - Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (8MB) | Preview

Epilepsy is a neurological disorder characterized by abnormal electrical activity of the brain that causes recurrent seizures. Electroencephalography (EEG) data can help in the detection of such seizures. However, labelled EEG datasets are scarce because the labelling process of this type of data is a time-consuming and expertise-requiring activity. On the other hand, vast amounts of unlabelled data are available. The objective of this work is to understand if and how it is possible to exploit unannotated datasets for seizure detection on EEG data. Since supervised methods are limited by the amount of labelled data available, the thesis focuses on unsupervised and self-supervised methods. Firstly, two different fully-unsupervised methods proposed by the literature are considered. These methods exploit non-seizure data to learn their distribution, and then recognize seizures based on how much they differ from the training distribution. However, since the results obtained with these two methods were not promising, the focus shifted to self-supervised methods. In this context, BENDR, inspired by Large Language Model BERT and self-supervised speech recognition approach wav2vec 2.0, was proposed: BENDR is pre-trained on a huge unlabelled EEG dataset (TUEG) and fine-tuned for different Brain-Computer Interface (BCI) tasks and datasets. Starting from the pre-trained weights made available by the authors of BENDR, the thesis adapts this self-supervised approach to a different downstream task (seizure detection) and a different dataset (CHB-MIT). The idea is to exploit the knowledge learned on a huge amount of unlabelled data to understand and capture the underlying structure of data. Once this first unsupervised task has been carried out, the model is then fine-tuned on a more specific task and a smaller labelled dataset. An extensive search of the optimal fine-tuning strategy is carried out, considering various aspects: among all, the impact of model size when fine-tuning is evaluated, as well as the impact of pre-processing and post-processing techniques, the impact of further pre-training on the downstream dataset itself, and the impact of reducing the available training data. The key takeaways that have been found and validated during the development of the thesis are: a model of smaller size may prevent overfitting on a smaller dataset than the one on which it was pre-trained; regularization techniques (especially heavy dropout, early stopping mechanism, learning rate scheduler and a loss that prioritizes the metrics that are being considered) reduce overfitting and improve the generalization on different patients; finally, pre-processing and post-processing techniques have the biggest impact on performance improvement. At the end of this extensive search, performance comparable with the current supervised state of the art was obtained (even slightly better under certain conditions): specifically, 99.9% specificity, 66.6% sensitivity and 0.698 FP/h. This work further validated the effectiveness of a huge large language-inspired model as BENDR and of the self-supervision approach in EEG-based tasks. The thesis successfully showed the potential of the transfer learning scheme applied to EEG in the seizure detection task, leveraging the huge amounts of unlabelled EEG data available.

Relators: Daniele Jahier Pagliari, Luca Benini, Andrea Cossettini, Alessio Burello, Thorir Mar Ingolfsson
Academic year: 2022/23
Publication type: Electronic
Number of Pages: 103
Corso di laurea: Corso di laurea magistrale in Data Science and Engineering
Classe di laurea: New organization > Master science > LM-32 - COMPUTER SYSTEMS ENGINEERING
Ente in cotutela: ETH Zurich (SVIZZERA)
Aziende collaboratrici: ETH Zurich
URI: http://webthesis.biblio.polito.it/id/eprint/27685
Modify record (reserved for operators) Modify record (reserved for operators)