Attention-based deep convolutional neural network for classification of generalized and focal epileptic seizures

Epilepsy Behav. 2024 Apr 17:155:109732. doi: 10.1016/j.yebeh.2024.109732. Online ahead of print.

Abstract

Epilepsy affects over 50 million people globally. Electroencephalography is critical for epilepsy diagnosis, but manual seizure classification is time-consuming and requires extensive expertise. This paper presents an automated multi-class seizure classification model using EEG signals from the Temple University Hospital Seizure Corpus ver. 1.5.2. 11 features including time-based correlation, time-based eigenvalues, power spectral density, frequency-based correlation, frequency-based eigenvalues, sample entropy, spectral entropy, logarithmic sum, standard deviation, absolute mean, and ratio of Daubechies D4 wavelet transformed coefficients were extracted from 10-second sliding windows across channels. The model combines multi-head self-attention mechanism with a deep convolutional neural network (CNN) to classify seven subtypes of generalized and focal epileptic seizures. The model achieved 0.921 weighted accuracy and 0.902 weighted F1 score in classifying focal onset non-motor, generalized onset non-motor, simple partial, complex partial, absence, tonic, and tonic-clonic seizures. In comparison, a CNN model without multi-head attention achieved 0.767 weighted accuracy. Ablation studies were conducted to validate the importance of transformer encoders and attention. The promising classification results demonstrate the potential of deep learning for handling EEG complexity and improving epilepsy diagnosis. This seizure classification model could enable timely interventions when translated into clinical practice.

Keywords: Convolution Neural Network; Electroencephalogram; Epilepsy; Epileptic Seizures; Multi-Headed Attention Mechanism.