INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL Online ISSN 1841-9844, ISSN-L 1841-9836, Volume: 16, Issue: 5, Month: October, Year: 2021 Article Number: 4268, https://doi.org/10.15837/ijccc.2021.5.4268 CCC Publications iEEG based Epileptic Seizure Detection using Reconstruction Independent Component Analysis and Long Short Term Memory Network Hirald Dwaraka Praveena, C. Subhas, K. Rama Naidu Hirald Dwaraka Praveena* Department of Electronics and Communication Engineering JNTUA, Ananthapuramu-515002, India hdpraveena@gmail.com C. Subhas Department of Electronics and Communication Engineering JNTUA College of Engineering, Kalikiri-517234, India schennapalli@gmail.com K. Rama Naidu Department of Electronics and Communication Engineering JNTUA College of Engineering, Ananthapuramu -515002, India kramanaidu@gmail.com Abstract In recent decades, an epileptic seizure is a neurological disorder, which is commonly detected from intracranial Electroencephalogram (iEEG) signals. However, the visual interpretation and inspection of iEEG signal is subjective variability, a time-consuming mechanism, slow and vulner- able to errors. In this research article, an automated epileptic seizure detection model is proposed to highlight the above-mentioned concerns. The proposed automated model integrates the Re- construction Independent Component Analysis (RICA) and Long Short Term Memory (LSTM) for seizure detection. In the proposed model, RICA is utilized to extract the features from the normalized iEEG signals, and then the obtained feature vectors are fed to the LSTM network for classification, which effectively classifies inter-ictal and ictal iEEG signals. This experimental out- come showed that the proposed RICA-LSTM model achieved an accuracy of 98.92%, sensitivity of 99.01%, specificity of 98.68%, balanced accuracy of 99.24%, and f-score of 98.25% in epileptic seizure recognition on the SWEC-ETHZ iEEG database, which is better compared to the conven- tional machine learning classifiers. Keywords: Epileptic Seizure Detection, Long Short Term Memory Network, Normalization, Reconstruction Independent Component Analysis. https://doi.org/10.15837/ijccc.2021.5.4268 2 1 Introduction An epileptic seizure is a chronic neurological disorder, which occurs due to abnormal activities in the brain that affects the movement, and sensorium of the human body [1-2]. In recent times, the world health organization reported that around 60 million people are affected with an epileptic seizure, and every year approximately 2.5 million people are diagnosed with epileptic seizures [3-4]. When compared to imaging techniques, iEEG signal is extensively employed to detect seizure activities due to the low cost [5]. The iEEG signal is pathological, and physiological data, which is effective in assessing, and evaluating the normal iEEG activities of healthy individuals, seizure-free/inter-ictal activities of epileptic patients and ictal iEEG activities of epileptic patients [6-8]. However, visual inspection of the iEEG records is time-consuming, slow, subject to inter observe variability, and vulnerable [9-10]. To highlight the aforementioned problems, a novel automated computed aided diagnostic model is proposed in this article to improve the performance of seizure classification using iEEG signals. Initially, input iEEG signals are acquired from the SWEC-ETHZ database, and then signal nor- malization and sliding window techniques are employed to ease the representation of collected data that provides maximum spectral resolution for better epileptic seizure detection. Next, the RICA model is developed for the automatic extraction of feature vectors from the pre-processed iEEG sig- nals. Lastly, the learned feature vectors are given as the input to the LSTM network to classify the ictal and interictal signals for the early diagnosis of seizures. In this research, the LSTM network is the best choice for classification, which significantly retains the historical information about data, and realizes the learning of long-term dependence information of data. The proposed model effectively reduces the latency, where the delay that occurred between the on-set of an epileptic seizure and its detection. In this experimental phase, the proposed RICA-LSTM model performance is evaluated us- ing Balanced Accuracy (BA), accuracy, sensitivity, f-score and specificity. This article is organized as follows. A few existing research works on the topic “epileptic seizure detection” is surveyed in Section 2. The proposed RICA-LSTM model is briefly explained in Section 3 with mathematical derivations. Further, Section 4 describes the experimental analysis of the proposed RICA-LSTM model. Section 5 discussed the conclusion of this work. 2 Related Works Prathaban and Balasubramanian [11] developed a new data analytics methodology in combination with a neural-based mathematical model for epileptic seizure classification. Initially, an enhanced Wendling model and grey wolf optimized model-driven technique was used to track the seizure events. Furthermore, a closed-loop control system was developed based on a cascade forward backpropagation network to control the seizures, especially using EEG signals. This Simulation results showed that the developed model obtained significant performance in seizure classification related to the existing mod- els in terms of prediction accuracy on a real-time database. In seizure detection, the developed model is required to train the individual patient, where it fails in cross-patient for achieving better seizure prediction. Rout, and Biswal, [12] utilized variational mode decomposition technique to decompose the signals into intrinsic mode functions. Next, five efficacious feature vectors were calculated using Hilbert transform to obtain discriminative features. Finally, the error minimized random vector func- tional link network was applied for seizure classification. However, the developed model performance was degraded, due to temporal variations in epileptic form activity. Raghu et al. [13] introduced a new EEG matrix determinant for epileptic seizure detection. Ini- tially, a filtering technique was used to remove the artifact, then the EEG data were sequentially arranged to generate a square matrix. In this study, the typical segmentation lengths were equal to the elements in the square matrix. Next, the extracted feature vectors fed to different classifiers like a k-nearest neighbor, support vector machine, and Multilayer Perceptron (MLP) with 10 fold cross-validation for epileptic seizure classification. The presented model performance was tested on the Bonn database and a real-time database in terms of f-score and classification accuracy. However, the developed model supports only binary class classification, which was inadequate in multi-class classification. https://doi.org/10.15837/ijccc.2021.5.4268 3 Gao et al. [14] developed an automatic epileptic seizure detection system based on recurrence quan- tification analysis and approximate entropy in combination with a convolutional neural network. The presented model performance was tested on the Bonn database and the simulation results confirmed that the developed model attained better performance in seizure detection in light of specificity, accu- racy, and sensitivity. However, the developed deep learning model was highly expensive and often has a vanishing gradient issue. Büyükçakır et al. [15] used the Hilbert vibration decomposition technique to decompose the collected EEG signals into seven sub-components. The selected sub-components were fed to the MLP classifier for seizure recognition. The performance measures such as average false alarm rate, and sensitivity was confirmed that the developed model obtained effective performance in seizure classification. However, the developed model fails to analyze the multi-classification problem of EEG signals. Burrello et al. [16] used Local Binary Patterns (LBPs), mean amplitudes, and line lengths of iEEG signals for seizure detection, where the signal was collected from the SWEC ETHZ database. Next, the extracted feature vectors were given as the input to hyper-dimensional classifiers to classify ictal and interictal iEEG signals. Additionally, Burrello et al. [17] were converted the collected iEEG signals into symbolic LBP codes. Next, a holographic distributed brain state representation was developed in a hyper-dimensional space, which was used to find the spatial brain regions, which detect the onset seizures, effectively. However, the classification latency was increased in the LBP feature descriptor, if the code length was higher. To highlight the aforementioned concerns, a model is proposed in this article for effective epileptic seizure detection. 3 Methodology In epileptic seizure recognition, the proposed model consists of four major steps like data acqui- sition: SWEC-ETHZ (long-term database), data pre-processing: normalization and sliding window, dimensionality reduction: RICA, and classification: LSTM network. The workflow of the proposed model is graphically indicated in Figure 1. Figure 1: Workflow of the proposed model 3.1 Data acquisition and pre-processing In this research, the proposed RICA-LSTM model performance is tested on the SWEC-ETHZ iEEG database, which consists of eighteen patients (p1 to p18) with 116 seizure records. For every patient, https://doi.org/10.15837/ijccc.2021.5.4268 4 the seizure numbers vary between 2 to 14 and are implanted by utilizing 24 to 128 electrodes. In the SWEC-ETHZ iEEG database, the implantation technique with the number of electrodes depends on the clinical necessity. In this database, the iEEG signals are recorded by implanting grid, depth, and strip electrodes, and the iEEG recordings are sampled at 1024 Hz or 512 Hz, which completely depends on the implantation technique. Finally, the 4th order Butterworth filter is utilized to convert the iEEG signal into 0.5 Hz and 120 Hz after performing the 16-bit analog to digital conversion. Database link: http://ieeg-swez.ethz.ch. The sample collected iEEG signals are indicated in Figure 2. Figure 2: Sample collected iEEG signals from SWEC-ETHZ iEEG database After data collection, signal normalization is accomplished to scale the iEEG signals to an identical level, which ranges between 1 to -1. The normalization of signal amplitude is to alter the amplitude to meet a specific criterion, which means all the iEEG signals have the same power. The sample normalized iEEG signals are graphically represented in Figure 3. Then, the sliding window is applied to represent the iEEG signals in light of the sample value. Here, the sample value of the sliding window spectrum is in the form of Gabor’s signal representation, where the sliding window spectrum contains two variables such as a continuous frequency variable and a discrete-time index that indicates window position. In this research, the sampling lattice is a rectangular cell, which occupies a 2π area in the time-frequency domain, along with the window size is 512. Figure 3: Sample normalized iEEG signals 3.2 Dimensionality reduction After data pre-processing, the RICA model is developed for feature dimensionality reduction. It is an unsupervised feature learning model, which effectively captures the complete structures in the pre-processed iEEG signals by replacing the hard reconstruction which constraints with softer reconstruction cost. Let us consider, total M samples as X = [ x1,x2, . . . ,xM ] , where xp ∈ N. The orthonormality constraint WW T = I is used to ensure the learned basis orthonormal. The optimization problem of the RICA model is mathematically depicted in equation (5). min W λ M M∑ p=1 ∥∥∥W T Wxp −xp∥∥∥2 2 + M∑ p=1 k∑ q=1 g (Wqxp) (5) Where λ is denoted as a scaling constant that determines the relative importance of a reconstruction cost, with the sparsity penalty. In this scenario, the total extracted features are electrode ×512, whereas the selected features are 5 × 512. The obtained discriminative features fed to the LSTM network for epileptic seizure classification. 3.3 Classification After the selection of optimal feature vectors, epileptic seizure classification is carried out using the LSTM network. The LSTM network includes three layers like input, output, and hidden layers. The hidden layers have memory blocks that contain input and output gate, which perform the control functions at input and output activation. Additionally, the forget gate is added later to the memory block where the LSTM network identifies the mapping from the input sequences (extracted feature) V = (v1,v2,v3, . . .vn) to the output sequences Y = (y1,y2,y3, . . .yn) using the equations (6 − 11). it = σ (Zivvt + Zirrt−1 + Zicct−1 + bi) (6) ft = σ (Zf vvt + Zf rrt−1 + Zf cct−1 + bf ) (7) ct = ft � ct−1 + it �g (Zcvvt + Zcrrt−1 + bc) (8) ot = σ (Zovvt + Zorrt−1 + Zocct−1 + b0) (9) rt = ot �hct (10) yt = ∅(Zyrrt + by) (11) https://doi.org/10.15837/ijccc.2021.5.4268 6 By inspecting the equations (6 to 11), Z is indicated as weight matrix, and Ziv is specified as the maximum weight of the input gate. The diagonal weights of peepholes connections is represented as Zic,Zf c and Zoc, where the input bias vector is stated as bi. Additionally, σ is represented as a sigmoid function of forgetting gate f, input gate i, output gate o, and cell activation vectors c.∅ is specified as output activation function, g is specified as cell input, and h is represented as cell output. In the multilayer LSTM network, hyperbolic tangent, and sigmoid activation functions are employed to transform the selected feature vectors into input values between −1 to 1 and 0 to 1 . The hyperbolic tanh activation function is utilized as the block input and block output activation function. The sigmoid activation function is utilized as the gate input activation function. As stated earlier, the LSTM classifier effectively decreases the delay that occurred between the on-set of an epileptic seizure, and its detection with better seizure classification. The parameter settings of the LSTM network are given as follows; learning rate is 0.001, maximum epoch is 50 , batch size is 30 , and hidden layers is 3; layer 1: 100 units, layer 2: 125 units, and layer 3: 100 units. 4 Simulation Results In this work, the MATLAB software tool is used to simulate the proposed RICA-LSTM model for epileptic seizure detection. In this scenario, the proposed RICA-LSTM model performance is compared with a few previous models; an ensemble of hyper-dimensional classifiers [16], and hyper- dimensional computing with LBP [17] to validate the effectiveness in epileptic seizure detection. The five statistical performance metrics like accuracy, specificity, sensitivity, f-score, and BA, were used to evaluate the proposed RICA-LSTM model performance in epileptic seizure detection. This mathe- matical expression of undertaken performance metrics is represented in table 1. Where, TP indicates true positive, TN represents true negative, FP states false positive and FN represents false negative. In epileptic seizure detection, TN refers to correctly classified interictal signals, TP refers to correctly classified ictal signals, FP refers to incorrectly classified ictal signals, and FN refers to incorrectly classified interictal signals. Table 1: The mathematical expression of undertaken performance metrics Metrics Mathematical expression Accuracy T P +T N T N +T P +F N +F P F-score 2T PF P +2T P +F N Sensitivity T P F N +T P Speicficity T N T N +F P BA Sensitivity + specificity2 4.1 Quantitative analysis In this section, the performance analysis is carried out using dissimilar classifiers without the RICA model, where the performance is evaluated by the means of accuracy, specificity, f-score, BA, and sensitivity. By inspecting table 2, the LSTM classifier achieved maximum classification with an accuracy of 97.93%, the sensitivity of 96.23%, specificity of 96.98%, BA of 92.87%, and f-score value of 93.98% in epileptic seizure detection related to the comparative classifiers like Naive Bayes, random forest, and Multi Support Vector Machine (MSVM). The LSTM classifier showed a maximum of 51.44%, and a minimum of 19.45% improvement in classification accuracy which is related to the comparative classifiers in epileptic seizure detection. Additionally, graphical analysis of dissimilar classifiers without the RICA model is indicated in Figure 4. In table 3, the performance analysis is carried out using dissimilar classifiers with the RICA model, where the performance is investigated using accuracy, specificity, f-score, sensitivity, and BA. In the SWEC ETHZ iEEG database, 116 seizure records are used for experimental analysis with 80% https://doi.org/10.15837/ijccc.2021.5.4268 7 Table 2: Performance analysis of dissimilar classifiers without RICA model Without RICA Classifiers Arcucacy (%) Sensitivity (%) Specificity (%) BA (%) F-score (%) Random forest 78.48 81.41 81.53 80.43 78.21 MSVM 46.49 54.31 58.21 51.52 29.10 Neiva Bayes 52.80 58.63 51.43 53.83 49.94 LSTM 97.93 96.23 96.98 92.87 93.98 Figure 4: Graphical analysis of dissimilar classifiers without RICA model training, and 20% testing of iEEG data. By investigating table 3, the combination of LSTM with the RICA model achieved maximum classification with the accuracy of 98.92%, the sensitivity of 99.01%, specificity of 98.68%, BA of 99.24%, and f-score value of 98.25% in epileptic seizure recognition at 50th iteration. By comparing to the existing classifiers like MSVM, random forest, and Naive Bayes, the combination of LSTM with the RICA model showed a maximum of 46.80%, and a minimum of 14.67% improvement in epileptic seizure detection. This graphical analysis of dissimilar classifiers with the RICA model is represented in Figure 5. Table 3: Performance analysis of dissimilar classifiers with RICA morel With RCIA Classifiers Acyuracc (%) Sensitivity (%) Speciyicitf (%) BA (%) F-score (%) Random ferost 84.25 84.75 83.75 84.25 84.17 MSVM 52.12 54.66 62.20 55.34 33.33 Naive Bayes 55.89 58.96 52.81 55.89 54.49 LSTM 98.92 99.01 98.68 99.24 98.25 4.2 Comparative analysis The comparative analysis among the proposed and the existing models are represented in table 4. Burrello et al. [16] extract LBPs, line lengths, and mean amplitudes from the acquired iEEG data. Further, the extracted feature vectors were fed to ensemble the hyper-dimensional classifiers to classify interictal (between seizures) and ictal (during seizures) the brain states for early diagnosis of an epileptic seizure. The extensive experiments showed that the developed model obtained a sensitivity of 96.38%, specificity of 97.31%, and accuracy of 96.85% in epileptic seizure detection. Further, Burrello et al. [17] transform the collected iEEG signal into symbolic LBP codes from which a holographic distributed brain state representation was developed in hyper-dimensional space. Hence, the brain state representation was utilized to identify the spatial brain regions, to detect the onset seizures. In this study, an extensive experiment was conducted on the SWEC-ETHZ iEEG database where the developed model obtained 94.84% of specificity and classification accuracy of 95.42%. The proposed RICA-LSTM model obtained better performance in epileptic seizure detection by comparing to these existing studies. Compared to the existing papers [16] and [17], the proposed RICA-LSTM model https://doi.org/10.15837/ijccc.2021.5.4268 8 Figure 5: Graphical analysis of dissimilar classifiers with RICA model obtained fast algorithms with limited memory consumption for deployment on low cost embedded hardware platforms in terms of specificity, and accuracy. Table 4: Comparative analysis between the proposed and the existing models Models Specificity (%) Accuracy (%) Hyper-dimensional classifiers [16] 97.31 96.85 Hyper-dimensional computing with LBP [17] 94.84 95.42 RICA-LSTM model 98.68 98.92 5 Conclusion In this article, a new RICA-LSTM model is proposed to achieve effective performance in epilep- tic seizure detection. The proposed model includes two major steps as dimensionality reduction and classification. In this research, the RICA model is proposed for feature extraction, and dimension- ality reduction, where this process effectively reduces the curse of dimensionality issues, and system complexity. The dimensionally reduced feature vectors are fed to the LSTM network for inter-ictal and ictal signal classification for early diagnosis of epileptic seizures. By comparing to the existing models the hyper-dimensional classifiers, and hyper-dimensional computing with LBP, the proposed RICA-LSTM model obtained a maximum accuracy of 98.92%, and specificity of 98.68% in epileptic seizure detection on the SWEC-ETHZ iEEG database. In future work, the proposed RICA-LSTM model is applied to multi-model data to further improve the recognition rate. Funding The APC was not funded by any organization. Author contributions The authors contributed equally to this work. Conflict of interest The authors declare no conflict of interest. https://doi.org/10.15837/ijccc.2021.5.4268 9 References [1] Lahmiri, S.; Shmuel, A. (2018). Accurate classification of seizure and seizure-free intervals of intracranial EEG signals from epileptic patients, IEEE Transactions on Instrumentation and Measurement, 68(3), 791-796, 2018. [2] Cura, O.K.; Atli, S.K.; Türe, H.S.; Akan, A. (2020). Epileptic seizure classifications using empir- ical mode decomposition and its derivative, Biomedical engineering online, 19(1), 1-22, 2020. [3] Truong, N.D.; Nguyen, A.D.; Kuhlmann, L.; Bonyadi, M.R.; Yang, J.; Ippolito, S.; Kavehei, O. (2018). Convolutional neural networks for seizure prediction using intracranial and scalp elec- troencephalogram, Neural Networks, 105, 104-111, 2018. [4] Varatharajah, Y.; Berry, B.; Cimbalnik, J.; Kremen, V.; Van Gompel, J.; Stead, M.; Brinkmann, B.; Iyer, R.; Worrell, G. (2018). Integrating artificial intelligence with real-time intracranial EEG monitoring to automate interictal identification of seizure onset zones in focal epilepsy, Journal of neural engineering, 15(4), 046035, 2018. [5] Wang, G.; Wang, D.; Du, C.; Li, K.; Zhang, J.; Liu, Z.; Tao, Y.; Wang, M.; Cao, Z.; Yan, X. (2020). Seizure Prediction Using Directed Transfer Function and Convolution Neural Network on Intracranial EEG, IEEE Transactions on Neural Systems and Rehabilitation Engineering, 28(12), 2711-2720, 2020. [6] Savadkoohi, M.; Oladunni, T.; Thompson, L. (2020). A machine learning approach to epilep- tic seizure prediction using Electroencephalogram (EEG) Signal, Biocybernetics and Biomedical Engineering, 40(3), 1328-1341, 2020. [7] Yedurkar, D.P.; Metkar, S.P. (2020). Multiresolution approach for artifacts removal and localiza- tion of seizure onset zone in epileptic EEG signal, Biomedical Signal Processing and Control, 57, 101794, 2020. [8] Al-Hadeethi, H.; Abdulla, S.; Diykh, M.; Deo, R.C.; Green, J.H. (2020). Adaptive boost LS-SVM classification approach for time-series signal classification in epileptic seizure diagnosis applica- tions, Expert Systems with Applications, 161, 113676, 2020. [9] Akyol, G. (2020). Stacking ensemble based deep neural networks modeling for effective epileptic seizure detection, Expert Systems with Applications, 148, 113239, 2020. [10] Amin, H.U.; Yusoff, M.Z.; Ahmad, R.F. (2020). A novel approach based on wavelet analysis and arithmetic coding for automated detection and diagnosis of epileptic seizure in EEG signals using machine learning techniques, Biomedical Signal Processing and Control, 56, 101707, 2020. [11] Prathaban, B.P.; Balasubramanian, R. (2020). Prediction of epileptic seizures using Grey Wolf Optimized Model Driven mathematical approach, Microprocessors and Microsystems, 103370, 2020. [12] Rout, S.K.; Biswal, P.K. (2020). An efficient error-minimized random vector functional link net- work for epileptic seizure classification using VMD, Biomedical Signal Processing and Control, 57, 101787, 2020. [13] Raghu, S.; Sriraam, N.; Hegde, A.S.; Kubben, P.L. (2019). A novel approach for classification of epileptic seizures using matrix determinant, Expert Systems with Applications, 127, 323-341, 2019. [14] Gao, X.; Yan, X.; Gao, P.; Gao, X.; Zhang, S. (2020). Automatic detection of epileptic seizure based on approximate entropy, recurrence quantification analysis and convolutional neural net- works, Artificial intelligence in medicine, 102, 101711, 2020. https://doi.org/10.15837/ijccc.2021.5.4268 10 [15] Büyükçakır, B.; Elmaz, F.; Mutlu, A.Y. (2020). Hilbert vibration decomposition-based epileptic seizure prediction with neural network, Computers in biology and medicine, 119, 103665, 2020. [16] Burrello, A.; Benatti, S.; Schindler, K.A.; Benini, L.; Rahimi, A. (2020). An Ensemble of Hy- perdimensional Classifiers: Hardware-Friendly Short-Latency Seizure Detection with Automatic iEEG Electrode Selection, IEEE journal of biomedical and health informatics, 25(4), 935-946, 2020. [17] Burrello, A.; Schindler, A.; Benini, L.; Rahimi, A. (2019). Hyperdimensional computing with local binary patterns: one-shot learning of seizure onset and identification of ictogenic brain regions using short-time ieeg recordings, IEEE Transactions on Biomedical Engineering, 67(2), 601-613, 2019. Copyright ©2021 by the authors. Licensee Agora University, Oradea, Romania. This is an open access article distributed under the terms and conditions of the Creative Commons Attribution-NonCommercial 4.0 International License. Journal’s webpage: http://univagora.ro/jour/index.php/ijccc/ This journal is a member of, and subscribes to the principles of, the Committee on Publication Ethics (COPE). https://publicationethics.org/members/international-journal-computers-communications-and-control Cite this paper as: Praveena Hirald Dwaraka; Subhas C.; Rama Naidu K. (2021). iEEG based Epileptic Seizure Detec- tion using Reconstruction Independent Component Analysis and Long Short Term Memory Network International Journal of Computers Communications & Control, 16(5), 4268, 2021. https://doi.org/10.15837/ijccc.2021.5.4268 Introduction Related Works Methodology Data acquisition and pre-processing Dimensionality reduction Classification Simulation Results Quantitative analysis Comparative analysis Conclusion