Xiang Fei, Mingyue Liu, Wenna Chen, Shaojie Zheng, Jincan Zhang, Ganqin Du
Introduction: Epilepsy is a neurological disorder characterized by abnormal neuronal discharges in the brain, posing a persistent challenge in clinical diagnosis. This study presents a high-performance epileptic seizure detection framework that integrates advanced feature extraction and classification techniques using EEG signals. Methods: We conduct experiments on the Bonn and CHB-MIT EEG datasets. The EEG signals are preprocessed through bandpass filtering and five-level Discrete Wavelet Transform (DWT) decomposition. From each sub-band, four representative features are systematically extracted. To mitigate severe class imbalance, we propose a two-stage balancing strategy: cluster centroid-based under-sampling initially reduces the interictal-to-ictal ratio to 2:1, followed by Borderline Synthetic Minority Oversampling Technique (BLSMOTE) in the feature space. A hybrid classification model that combines Convolutional Sparse Autoencoder (CSAE) with Gated Recurrent Unit (GRU) is proposed in the paper. The encoder weights from the pre-trained CSAE are transferred to the GRU-based classifier to enhance feature representation and model generalization. Results: The proposed method achieves outstanding performance, with accuracy, sensitivity, specificity, precision, f1 score and AUC of 98.46, 98.27, 98.50, 98.36, 98.31, and 98.23% on the Bonn dataset, and 99.49, 99.21, 99.77, 99.49, 99.35, and 99.57% on the CHB-MIT dataset, respectively. These results validate the effectiveness of the proposed approach. Discussion: This study introduces a novel framework combining cluster centroid-based under-sampling, BLSMOTE oversampling, and transfer learning via CSAE-GRU integration. The method offers a promising direction for reliable and clinically applicable automated epilepsy diagnosis.