# A Hybrid DenseNet-LSTM Model for Epileptic Seizure Prediction
###### Abstract  
The number of people diagnosed with epilepsy as a common brain disease accounts for about 1% of the world's total population. Seizure prediction is an important study that can improve the lives of patients with epilepsy, and, in recent years, it has attracted more and more attention. In this paper, we propose a novel hybrid deep learning model that combines a Dense Convolutional Network (DenseNet) and Long Short-Term Memory (LSTM) for epileptic seizure prediction using EEG data. The proposed method first converts the EEG data into the time-frequency domain through Discrete Wavelet Transform (DWT) for use in the input of the model. Then, we train the previously transformed image through a hybrid model combining Densenet and LSTM. To evaluate the performance of the proposed method, experiments are conducted for each pretical length of 5, 10, and 15 min using the CHB-MIT scalp EEG dataset. As a result, we obtained a prediction accuracy of 93.28%, a sensitivity of 92.92%, a specificity of 93.65%, a false positive rate of 0.063 per hour, and an F1-score of 0.923 when the preictal length was 5 min. Finally, as the proposed method is compared to previous studies, it is confirmed that the seizure prediction performance was improved significantly.  
seizure prediction; electroencephalogram (EEG); Discrete Wavelet Transforms (DWT); Dense Convolutional Network (DenseNet); Long Short-Term Memory (LSTM); hybrid model +
Footnote †: journal: Applied Sciences  
1  
e1e1e1e1e2e3e3e4e5e6e7e8e8e9e11e6e1e76e1e1e2e3e3e4e7e8e1e  
been conducted steadily to give time to raise an alarm before a seizure onset and take appropriate actions. Seizure prediction begins with the existence of a difference between the interictal and preictal intervals. That is, before the seizure onset, it detects the preictal interval and generates an alarm. In the past few years, machine learning has been widely used in seizure prediction, but in recent years, research using deep learning algorithms that show great performance in fields such as computer vision and speech recognition have mainly been conducted. In seizure prediction, Convolutional Neural Networks (CNN) [4], which are widely used in image processing and show good performances, have attracted the attention of researchers. The supervised learning method using this CNN trains the difference between interictal and preictal states, and the trained classifier predicts the occurrence of seizures by detecting the preictal interval in the new EEG recording.  
In this paper, we propose a seizure prediction method using DenseNet-LSTM. Dense Convolutional Network (DenseNet) [5] is an architecture that solves problems such as vanishing gradient or parameter increase that occurs as the CNN layer deepens, and is more advantageous than CNN in training information from limited EEG data. In addition, the Long Short-Term Memory (LSTM) [6] is an architecture that solves the long-term dependence problem of Recurrent Neural Network (RNN) and is mainly used to predict time-series data, so it is suitable for finding temporal features of EEG, which are time-series data. The proposed method consists of two stages. In the first stage, to use the EEG signal as input data of DenseNet, it is converted into image data in the time-frequency domain using Discrete Wavelet Transforms (DWT). In the second stage, seizures are predicted by training the difference between the interictal and preictal states using the EEG signal converted into an image.  
The rest of this paper is organized as follows. Section 2 covers previous studies of seizure prediction. Section 3 describes the dataset used, the preprocessing method, and the proposed model. Section 4 presents the performance evaluation according to preictal length and comparative analysis with previous studies. Finally, Section 5 concludes the paper.