# Automated Detection of Epileptic Seizures in EEG Signals via Micro-Capsule Networks
## 1 Introduction  
Epilepsy, a chronic neurological disorder affecting individuals of all ages, impacts an estimated 50 million people worldwide [1]. It is characterized by sudden or rhythmic abnormal neuronal discharges that can cause brain injury [2], leading to loss of consciousness, intense localized or generalized muscle contractions, and even life-threatening conditions [3]. Therefore, early detection of epilepsy in patients is crucial to prevent the spread of epileptic lesions in the brain [4]. Due to the potential adverse effects of antiepileptic drugs on the nervous system [5], electroencephalogram (EEG) monitoring provides an important non-pharmacological solution for real-time detection and intervention of epileptic seizures, while avoiding drug-related complications [6]. Based on altered neuronal activation patterns, EEG signals inepileptic patients are categorized into four states: pre-ictal, ictal, post-ictal, and inter-ictal [7]. The first three stages exhibit distinct differences in EEG signal amplitude and frequency, providing a basis for seizure detection [8]. However, manual EEG analysis by neurologists is time-consuming, requiring extensive observation of signals. Additionally, the process is labor-intensive and highly dependent on the clinician's expertise, increasing diagnostic burdens [9]. Thus, there is a critical need for automated seizure detection systems that enable real-time monitoring and alerts via computer-aided technologies [10]. Modern machine learning and deep learning techniques have become pivotal tools for seizure detection, driven by advances in computer-aided systems [11]. Prior research demonstrates that optimizing EEG features prior to classification is critical for improving seizure detection accuracy [12; 13; 14]. EEG feature extraction approaches primarily encompass two categories: manual extraction using classical algorithms and automated extraction via deep learning [15]. Classic artificial methods construct features by analyzing the time-domain (such as statistical moments: mean, variance, kurtosis; nonlinear features: entropy, Lyapunov exponent), frequency-domain (such as power spectral density), and time-frequency domain (such as wavelet transform) characteristics of signals. In addition, dimensionality reduction techniques (such as principal component analysis) and spatial filtering methods (such as common spatial pattern, often combined with wavelet transform) are also commonly used to optimize feature expression [16]. The automatic feature methods based on deep learning mainly rely on deep neural networks (such as convolutional neural networks (CNNs), recurrent neural networks (RNNs)) to directly learn hierarchical feature representations from raw or preprocessed EEG signals, reducing reliance on manually designed features [17; 18]. However, due to the non-stationary nature of EEG signals, this poses significant challenges for using the above two methods to stably and reliably extract highly discriminative features. This challenge is particularly prominent in applications such as epilepsy detection that require extremely high feature sensitivity. Following EEG feature extraction, the next step is classifying epileptic EEG signals. Researchers have employed both traditional machine learning and deep learning algorithms for this task [19; 20]. Common machine learning classifiers include k-means clustering, support vector machines (SVMs), linear discriminant analysis (LDA), Naive Bayes, Gaussian mixture models, and random forests. However, the performance of those methods largely relies on EEG signal detection tasks with distinctly identifiable features, severely constraining their applicability and generalization across diverse scenarios [21]. Consequently, enhancing models' capability to detect epilepsy from suboptimal EEG signals becomes paramount to address these challenges. Deep learning approaches include CNN, RNNs, long short-term memory (LSTM) networks, and capsule networks.