A Novel Epilepsy Detection Method Based on Feature Extraction by Deep Autoencoder on EEG Signal

Xiaojie Huang, Xiangtao Sun, Lijun Zhang, Tong Zhu, Hao Yang, Qingsong Xiong, Lijie FengInternational Journal of Environmental Research and Public Health 2022

TL;DR

This paper introduces a novel, computationally efficient method for detecting epileptic seizures using Electroencephalogram (EEG) signals. By leveraging a deep autoencoder (AE) for feature extraction directly in the time domain, the approach achieves a high accuracy of 97% while addressing the common challenges of high computational cost and lack of model interpretability in existing methods.

What Problem Does This Paper Address?

Epilepsy detection relies heavily on EEG signals, and continuous monitoring is crucial for patient safety. While machine learning (ML) has shown promise for automated detection, current methods often struggle with:

  • High Computational Costs: Advanced feature extraction techniques, especially those involving time-frequency transformations, demand significant processing power, making real-time monitoring on resource-constrained devices difficult.
  • Information Loss: Traditional methods can sometimes discard crucial details within the EEG signals.
  • Lack of Model Interpretability: Understanding why an ML model makes a certain prediction is vital for clinical trust and further development, but many complex models operate as "black boxes."

This research aims to bridge this gap by proposing a method that is both accurate and efficient, extracting meaningful features directly from the time-domain EEG signals without complex transformations, and also providing insights into the model's decision-making process.

Methods

The core of this work is a novel feature extraction technique based on a deep Autoencoder (AE). Here's how it works:

  1. Autoencoder Architecture: A stacked deep AE is employed, consisting of an encoder that compresses the input EEG signal into a latent space representation and a decoder that attempts to reconstruct the original signal from this latent representation. The architecture includes convolutional layers, batch normalization, and activation functions.
  2. Time-Domain Feature Extraction: Crucially, the AE is trained on EEG signals from the interictal (between seizures) state. When new EEG signals (healthy, interictal, or ictal) are fed into the trained AE, the reconstruction error serves as the basis for feature extraction.
  3. Feature Quantification: Three specific metrics are derived from the AE's reconstruction process:
  4. Mean Squared Error (MSE): Measures the average squared difference between the original and reconstructed signals.
  5. Original-to-Reconstructed Signal Ratio (ORSR): A measure inspired by signal-to-noise ratio, comparing the amplitude of the original signal to the reconstructed one.
  6. Cosine Similarity (CS): Quantifies the similarity between the original and reconstructed signal vectors. These three metrics (MSE, ORSR, CS) are then used as the extracted, epilepsy-sensitive features.

  7. Classification: These AE-based features are fed into three standard supervised ML classifiers: Random Forest (RF), AdaBoost, and Gradient Boosting.

  8. Model Interpretability: To understand the model's behavior, Permutation Importance and SHapley Additive exPlanations (SHAP) are used to analyze the contribution of each extracted feature (CS, MSE, ORSR) to the classification outcome.
  9. Comparison: The proposed AE-based feature extraction method is compared against Principal Component Analysis (PCA), a traditional dimension reduction technique, using the same classifiers and evaluation metrics.

Datasets

The study utilizes the University of Bonn EEG dataset, a publicly available benchmark dataset for epilepsy research. This dataset comprises five subsets (A-E), each containing 100 single-channel EEG signals of 23.6-second duration sampled at 173.6 Hz.

  • Set A: Healthy individuals (eyes open).
  • Set D: Epileptic patients during interictal intervals.
  • Set E: Epileptic patients during active seizures (ictal).

For training the AE, signals from subset D (interictal) were used. For evaluation, signals from subsets A (healthy), D (interictal), and E (ictal) were selected to represent the three distinct states. All signals were normalized to the range [0, 1].

Key Insights and Ideas

  • Reconstruction Error as a Feature: The core innovation is using the difference between an original EEG signal and its AE-reconstructed counterpart (trained on interictal data) as a powerful indicator of epilepsy. This elegantly captures deviations from the "normal" interictal state.
  • Time-Domain Efficiency: By avoiding time-frequency transformations, the AE approach significantly reduces computational overhead, paving the way for real-time applications on wearable devices.
  • Preserving Information: The AE's ability to reconstruct signals suggests it preserves essential information while filtering out noise, potentially outperforming traditional methods like PCA in capturing subtle epileptic patterns.
  • Feature Importance Revealed: Model interpretability techniques (Permutation Importance and SHAP) highlight that Cosine Similarity (CS) and MSE are the most influential features for epilepsy detection, with ORSR playing a lesser role. This provides valuable guidance for future feature selection or engineering.
  • Robustness Across Classifiers: The AE-based features demonstrate consistent high performance across different ML classifiers, indicating their inherent quality and stability.

Key Results

  • High Prediction Accuracy: The proposed AE-based feature extraction method achieved a testing accuracy of 97% across three different ML classifiers (RF, AdaBoost, Gradient Boosting).
  • Superior to PCA: The AE-based features significantly outperformed PCA-based features, which achieved a maximum testing accuracy of only 72% (Gradient Boosting) and showed unstable performance across classifiers.
  • Reduced Misclassification: The AE method resulted in only two misclassifications of healthy EEG signals as epileptic across all classifiers, which is considered more acceptable from a safety perspective than missing an actual seizure.
  • Computational Efficiency: The method operates in the time domain, avoiding computationally intensive transformations, making it suitable for real-time applications.
  • Model Interpretability: Permutation importance and SHAP analyses confirmed the effectiveness of the extracted features and provided insights into their relative importance.

Limitations and Future Work

  • Dataset Generalization: The study's analysis was primarily conducted on the University of Bonn dataset. The authors acknowledge that further studies are needed to assess the generalization of the AE-based feature extraction method to other EEG datasets and diverse patient populations.
  • Feature Set Expansion: While the study extracted three key features (CS, ORSR, MSE) based on AE reconstruction, the authors suggest investigating more prevalent time-domain features (e.g., amplitude, zero-crossing rate) in conjunction with the AE-based approach for even more comprehensive epilepsy detection.

Summary updated

Abstract

Electroencephalogram (EEG) signals are the gold standard tool for detecting epileptic seizures. Long-term EEG signal monitoring is a promising method to realize real-time and automatic epilepsy detection with the assistance of computer-aided techniques and the Internet of Medical Things (IoMT) devices. Machine learning (ML) algorithms combined with advanced feature extraction methods have been widely explored to precisely recognize EEG signals, while among which, little attention has been paid to high computing costs and severe information losses. The lack of model interpretability also impedes the wider application and deeper understanding of ML methods in epilepsy detection. In this research, a novel feature extraction method based on an autoencoder (AE) is proposed in the time domain. The architecture and mechanism are elaborated. In this method, specified features are defined and calculated on the basis of signal reconstruction quantification of the AE. The EEG recognition is performed to validate the effectiveness of the proposed detection method, and the prediction accuracy reached 97%. To further investigate the superiority of the proposed AE-based feature extraction method, a widely used feature extraction method, PCA, is allocated for comparison. In order to understand the underlying working mechanism, permutation importance and SHapley Additive exPlanations (SHAP) are conducted for model interpretability, and the results further confirm the reasonability and effectiveness of the extracted features by AE reconstruction. With high computing efficiency in the time domain and an extensively satisfactory accuracy, the proposed epilepsy detection method exhibits great superiority and potential in almost real-time and automatic epilepsy monitoring.
BibTeX
@article{huang2022novel,
  author = {Xiaojie Huang and Xiangtao Sun and Lijun Zhang and Tong Zhu and Hao Yang and Qingsong Xiong and Lijie Feng},
  title = {{A Novel Epilepsy Detection Method Based on Feature Extraction by Deep Autoencoder on EEG Signal}},
  journal = {International Journal of Environmental Research and Public Health},
  year = {2022},
  doi = {10.3390/ijerph192215110},
}
Figure