Epileptic seizure detection using deep learning (DL) are often focused on data recorded using scalp electroencephalography (EEG), cases with limited data such as intracranial EEG are indeed unexplored. Self-supervised learning (SSL) can serve as a pretext task to learn useful features before performing classification task using relatively smaller datasets. We herein introduce an SSL strategy for vision transformers utilizing group masked image modeling applied to EEG spectrograms for classifying seizure and non-seizure activity. Particularly, we leverage EEG spectrogram representation, which is robust to noise, and incorporates time and frequency information. By inducing corruption into each input spectrogram, our model recovers the lost information and, in the process, learns features, which enables the acquisition of significant characteristics essential for downstream classification task. Our experimental results show that longer spectrogram window sizes yielded higher accuracy in detecting seizure activity. Specifically, average classification using fully supervised model across four channels demonstrated optimal performance on 90s EEG segments with an accuracy of 88.65%, followed by 45s (88.49%) and 30s (84.54%) spectrograms. We further compared seizure classification performance using vision transformers with pretraining using spectrograms (SSL-ECoG), without pretraining, and with a pretraining strategy using non-EEG data (ImageNet-1K). Notably, we show that the classification task following SSL-ECoG pre-training attained highest accuracy of 94.32%, AUC-PR of 0.966, 96.47 % F-1 score, and AUROC of 0.977. These results highlight the potential of using SSL and vision transformers with pertinent data can achieve highly accurate classification, even with limited data sizes.
|