Epileptic Seizure Detection From EEG Using Machine Learning with Explainable AI

Authors

  • Nurettin Gökşenli Vocational School, Çankırı Karatekin University, Çankırı, Türkiye
  • Mehmet Tümay Vocational School, Çankırı Karatekin University, Çankırı, Türkiye

DOI:

https://doi.org/10.51173/jt.v8i2.2848

Keywords:

EEG, Multiclass Classification, Explainable AI, Machine Learning

Abstract

In this study, three lightweight classifiers for a four-class epilepsy seizure type described by 16-channel EEG features have been benchmarked. Models have been evaluated on identical splits using standard accuracy, error rate, training time, prediction throughput and memory footprint, and then, further inspected through scatter-plot diagnostics, confusion matrices, ROC curves, and post-hoc explainability (SHAP and LIME). All algorithms achieve high validation accuracy (≥ 95 %), yet exhibit distinct trade-offs. The ensemble KNN delivers the best overall fidelity (98.8 % validation, 99.3 % test; macro-AUC ≈ 0.9996) but requires the largest model (25 MB) and provides only mid-range inference speed (3.8 k obs/s). The SVM matches the KNN's test accuracy and is the most balanced option, training in the quickest time (14s) and occupying < 2 MB. The ANN trails slightly in accuracy (97.1% test) but is two orders of magnitude smaller (24 kB) and fifty-fold faster at prediction (181 k obs/s), thus it is better suited for edge or real-time deployments. SHAP and LIME analyses converge on a common set of influential variables, primarily X15 and X16 with contributions from X8 or X11/12, strengthening confidence in the feature representation and suggesting a reduced sensor subset for future work.

Downloads

Download data is not yet available.

Author Biographies

Nurettin Gökşenli, Vocational School, Çankırı Karatekin University, Çankırı, Türkiye

   

Mehmet Tümay, Vocational School, Çankırı Karatekin University, Çankırı, Türkiye

Department of Electronics and Automation

References

V. L. Feigin et al., “Global, regional, and national burden of epilepsy, 1990–2021: a systematic analysis for the Global Burden of Disease Study 2021,” Lancet Public Health, vol. 10, no. 3, pp. e203–e227, Mar. 2025, https://doi.org/10.1016/S2468-2667(24)00302-5.

Najmusseher and B. P. K. Nizar, “Feature Engineering for Epileptic Seizure Classification Using SeqBoostNet,” International Journal of Computing and Digital Systems, vol. 2025, no. 1, pp. 1–15, 2025, https://doi.org/10.12785/ijcds/1571020131.

I. Ahmad et al., “EEG-Based Epileptic Seizure Detection via Machine/Deep Learning Approaches: A Systematic Review,” Comput Intell Neurosci, vol. 2022, p. 6486570, 2022, https://doi.org/10.1155/2022/6486570.

A. Shoeb and J. Guttag, “Application of machine learning to epileptic seizure detection,” in ICML’10: Proceedings of the 27th International Conference on International Conference on Machine Learning, 2025, pp. 975–982, https://dl.acm.org/doi/10.5555/3104322.3104446.

H. U. Amin et al., “Feature extraction and classification for EEG signals using wavelet transform and machine learning techniques,” Australas Phys Eng Sci Med, vol. 38, no. 1, pp. 139–149, Mar. 2015, https://doi.org/10.1007/s13246-015-0333-x.

A. R. Hassan and A. Subasi, “Automatic identification of epileptic seizures from EEG signals using linear programming boosting,” Comput Methods Programs Biomed, vol. 136, pp. 65–77, Nov. 2016, https://doi.org/10.1016/J.CMPB.2016.08.013.

P. Kunekar, M. K. Gupta, and P. Gaur, “Detection of epileptic seizure in EEG signals using machine learning and deep learning techniques,” Journal of Engineering and Applied Science, vol. 71, no. 1, pp. 1–15, Dec. 2024, https://doi.org/10.1186/s44147-023-00353-y.

N. Koolen et al., “Line length as a robust method to detect high-activity events: Automated burst detection in premature EEG recordings,” Clinical Neurophysiology, vol. 125, no. 10, pp. 1985–1994, Oct. 2014, https://doi.org/10.1016/J.CLINPH.2014.02.015.

H. F. Atlam, G. E. Aderibigbe, and M. S. Nadeem, “Effective Epileptic Seizure Detection with Hybrid Feature Selection and SMOTE-Based Data Balancing Using SVM Classifier,” Applied Sciences 2025, vol. 15, no. 9, p. 4690, Apr. 2025, https://doi.org/10.3390/APP15094690.

A. Shoeibi et al., “Epileptic Seizures Detection Using Deep Learning Techniques: A Review,” International Journal of Environmental Research and Public Health, vol. 18, no. 11, p. 5780, May 2021, https://doi.org/10.3390/IJERPH18115780.

A. Selvaraj, S. Pj, J. Thomas, Y. Rajamanickam, R. N. Menon, and J. F. Agastinose Ronickom, “Multi-Class Seizure Type Classification Using Features Extracted from the EEG,” Stud Health Technol Inform, vol. 305, pp. 68–71, Jun. 2023, https://doi.org/10.3233/SHTI230426.

P. Sari Tekten, S. Kotan, and F. Kacar, “Multiclass classification of epileptic seizure phases using a novel HFO-based feature extraction model,” Signal Image Video Process, vol. 19, no. 4, pp. 1–15, Apr. 2025, https://doi.org/10.1007/s11760-025-03896-0 .

“BEED: Bangalore EEG Epilepsy Dataset - UCI Machine Learning Repository.” Accessed: Aug. 06, 2025. [Online]. Available: https://archive.ics.uci.edu/dataset/1134/beed:+bangalore+eeg+epilepsy+dataset.

D. Chen, S. Wan, J. Xiang, and F. S. Bao, “A high-performance seizure detection algorithm based on Discrete Wavelet Transform (DWT) and EEG,” PLoS One, vol. 12, no. 3, p. e0173138, Mar. 2017, https://doi.org/10.1371/JOURNAL.PONE.0173138.

J. Bamwenda and M. S. Özerdem, “Static Hand Gesture Recognition System Using Artificial Neural Networks and Support Vector Machine,” Dicle Üniversitesi Mühendislik Fakültesi Mühendislik Dergisi, vol. 10, no. 2, pp. 561–568, Jun. 2019, https://doi.org/10.24012/DUMF.569357.

H. Polat, “Time-Frequency Complexity Maps for EEG-Based Diagnosis of Alzheimer’s Disease Using a Lightweight Deep Neural Network”, Traitement du Signal, vol. 39, no. 6, pp. 2103-2113, Dec. 2022, https://doi.org/10.18280/ts.390623.

E. Fide, H. Polat, G. Yener, and M. S. Özerdem, “Effects of Pharmacological Treatments in Alzheimer’s Disease: Permutation Entropy-Based EEG Complexity Study,” Brain Topogr, vol. 36, no. 1, pp. 106–118, Jan. 2023, https://doi.org/10.1007/S10548-022-00927-8/METRICS.

S. K. Satapathy, A. K. Jagadev, and S. Dehuri, “Weighted majority voting based ensemble of classifiers using different machine learning techniques for classification of eeg signal to detect epileptic seizure.,” Informatica, vol. 41, no. 1, 2017, Accessed: Aug. 06, 2025. [Online]. Available: https://informatica.si/index.php/informatica/issue/download/205/204#page=101.

T. T. Ağır, “Using Machine Learning Algorithms For Classifying Transmission Line Faults,” Dicle Üniversitesi Mühendislik Fakültesi Mühendislik Dergisi, vol. 13, no. 2, pp. 227–234, Jun. 2022, https://doi.org/10.24012/DUMF.1096691.

M. Yıldırım and A. Yıldız, “Farklı zaman ölçekli EEG işaretlerinden epilepsi nöbetinin otomatik tespiti,” Dicle Üniversitesi Mühendislik Fakültesi Mühendislik Dergisi, vol. 8, no. 4, pp. 745–757, Sep. 2017, Accessed: Aug. 06, 2025. [Online]. Available: https://dergipark.org.tr/en/pub/dumf/issue/33630/408745.

S. Raghu, N. Sriraam, Y. Temel, S. V. Rao, and P. L. Kubben, “EEG based multi-class seizure type classification using convolutional neural network and transfer learning,” Neural Networks, vol. 124, pp. 202–212, Apr. 2020, https://doi.org/10.1016/J.NEUNET.2020.01.017.

M. Mursalin, S. Mohammed, S. Islam, K. Noman, and A. A. Al-Jumaily, “Epileptic seizure classification using statistical sampling and a novel feature selection algorithm,” Feb. 2019, Accessed: Aug. 06, 2025. [Online]. Available: https://arxiv.org/pdf/1902.09962.

A. T. Tzallas, M. G. Tsipouras, and D. I. Fotiadis, “Automatic Seizure Detection Based on Time-Frequency Analysis and Artificial Neural Networks,” Comput Intell Neurosci, vol. 2007, no. 1, p. 080510, Jan. 2007, https://doi.org/10.1155/2007/80510.

G. Ekincioğlu, D. Akbay, and S. Keser, “Estimating Uniaxial Compressive Strength of Sedimentary Rocks with Leeb hardness Using SVM Regression Analysis and Artificial Neural Networks,” Journal of Polytechnic, vol. 28, no. 2, pp. 503–512, Mar. 2025, https://doi.org/10.2339/POLITEKNIK.1475944.

S. Huang, I. Arpaci, M. Al-Emran, S. Kılıçarslan, and M. A. Al-Sharafi, “A comparative analysis of classical machine learning and deep learning techniques for predicting lung cancer survivability,” Multimed Tools Appl, vol. 82, no. 22, pp. 34183–34198, Sep. 2023, https://doi.org/10.1007/S11042-023-16349-Y/TABLES/8.

P. Puranik and R. Pethe, “Introduction to Explainable AI in EEG Signal Processing: A Review,” Explainable Artificial Intelligence in the Healthcare Industry, A. Kumar, Scrivener Publishing LLC, 2025, pp. 79–104, https://doi.org/10.1002/9781394249312.

M. S. Islam, I. Hussain, M. M. Rahman, S. J. Park, and M. A. Hossain, “Explainable Artificial Intelligence Model for Stroke Prediction Using EEG Signal,” Sensors, vol. 22, no. 24, p. 9859, Dec. 2022, https://doi.org/10.3390/S22249859.

B. Fresz, E. Dubovitskaya, D. Brajovic, M. F. Huber, and C. Horz, “How Should AI Decisions Be Explained? Requirements for Explanations from the Perspective of European Law,” Proceedings of the AAAI/ACM Conference on AI, Ethics, and Society, vol. 7, no. 1, pp. 438–450, Oct. 2024, https://doi.org/10.1609/AIES.V7I1.31648.

S. Dal and N. Sezgin, “Heart Attack Classification with a Machine Learning Approach Based on the Random Forest Algorithm,” Balkan Journal of Electrical and Computer Engineering, vol. 13, no. 2, pp. 140–147, Jul. 2025, https://doi.org/10.17694/BAJECE.1691905.

F. A. Khan, Z. Umar, A. Jolfaei, and M. Tariq, “Explainable AI for epileptic seizure detection in Internet of Medical Things,” Digital Communications and Networks, vol. 11, no. 3, pp. 587–593, Jun. 2025, https://doi.org/10.1016/j.dcan.2024.08.013.

S. Pourbahrami, M. A. Balafar, and L. M. Khanli, “ASVMK: A novel SVMs Kernel based on Apollonius function and density peak clustering,” Eng Appl Artif Intell, vol. 126, p. 106704, Nov. 2023, https://doi.org/10.1016/J.ENGAPPAI.2023.106704.

M. Tümay, Z. Civelek, and M. Teke, “Glakom ve Katarakt Hastalığının Derin Öğrenme Modelleri ile Teşhisi,” Politeknik Dergisi, vol. 27, no. 5, pp. 1813–1821, Oct. 2024, https://doi.org/10.2339/POLITEKNIK.1348143.

A. A. Hamidi, B. Robertson, and J. Ilow, “A new approach for ECG artifact detection using fine-KNN classification and wavelet scattering features in vital health applications,” Procedia Comput Sci, vol. 224, pp. 60–67, Jan. 2023, https://doi.org/10.1016/J.PROCS.2023.09.011.

D. Jiang, X. Shi, Y. Liang, and H. Liu, “Feature extraction technique based on Shapley value method and improved mRMR algorithm,” Measurement, vol. 237, p. 115190, Sep. 2024, https://doi.org/10.1016/J.MEASUREMENT.2024.115190.

T. A. A. Abdullah et al., “Sig-Lime: A Signal-Based Enhancement of Lime Explanation Technique,” IEEE Access, vol. 12, pp. 52641–52658, 2024, https://doi.org/10.1109/ACCESS.2024.3384277.

Sample EEG records of Healthy subjects, Generalized seizures, Focal seizures, and Seizure events

Downloads

Published

2026-06-30

How to Cite

Gökşenli, N., & Tümay, M. (2026). Epileptic Seizure Detection From EEG Using Machine Learning with Explainable AI. Journal of Techniques, 8(2), 37–47. https://doi.org/10.51173/jt.v8i2.2848

Issue

Section

Engineering (Miscellaneous): Computer Engineering