• Logo
  • HamaraJournals
101

Views

Recognition of Epileptic Seizures in EEG Records: A Transfer Learning Approach

and

Abstract

Introduction:

Seizure is a transient phenomenon with genesis in excessive abnormal or synchronous neuronal electrical activity in the brain, while epilepsy is defined as a brain dysfunction characterized by persistent predisposition to generate seizures. The identification of epileptogenic electroencephalographic patterns can be performed using machine learning. The present study aimed to develop a transfer learning based classifier able to detect epileptic seizures in images generated from electroencephalographic data graphic representation.

Material and Methods:

We used the Epileptic Seizure Recognition Data Set, which consists of 500 brain activity records for 23.6 seconds comprising 23 chunks of 178 data points, and transformed the resulting 11500 instances into images by graphically plotting its data points. Those images were then splitted in training and test set and used to build and assess, respectively, a transfer learning-based deep neural network, which classified the images according the presence or absence of epileptic seizures.

Results:

The model achieved 100% accuracy, sensitivity and specificity, with AUC-score of 1.0, demonstrating the great potential of transfer learning for the analysis of graphically represented electroencephalographic data.

Conclusion:

It is opportune to raise new studies involving transfer learning for the analysis of signal data, with the aim of improving, disseminating and validating its use for daily clinical practice.

INTRODUCTION

Seizure is an abnormal neuronal event that will be experienced by 5-10% of the world population at least once in the course of life. Seizure is a transient phenomenon with genesis in excessive abnormal or synchronous neuronal electrical activity in the brain, which will originate signs and symptoms [1]. Epilepsy was defined by Fisher et al. [2] as a brain dysfunction characterized by persistent predisposition to generate seizures and by the neurological, cognitive and social consequences of this condition. Based on this concept, epilepsy is clinically defined as the occurrence of two unprovoked convulsive events that are temporally separated by at least 24 hours [2]. The incidence of epilepsy in different populations around the world ranges from 0.3-0.5 with an estimated prevalence of 5-30 individuals per 1000 [1].

The electroencephalogram (EEG) is a propaedeutic element of fundamental importance in the diagnosis of epilepsy, given that it offers signs of epileptiform activity caused by neuronal dysfunction both in asymptomatic patients and in the period between or after crises [3]. The recording of epileptiform electrical activity performed by the EEG is the result of the sum of post-synaptic, inhibitory and excitatory neuronal potentials. The cellular influx of Na +, called depolarization, leads to a reduction in cellular negativity. During the epileptiform event, there is a relatively prolonged depolarization followed by an action potential induced by this slowness. This moment is recorded in the EEG as a spike activity. This event is followed by hyperpolarization that could be observed on the EEG as a slow wave [4].

The identification of epileptogenic electroencephalographic patterns can be performed using machine learning. The interest in using machine learning in the health field has been gaining attention, especially after the development and validation of a deep learning algorithm for detecting diabetic retinopathy by Gushal et al. [5, 6] Deep learning represents the state of the art with regard to technologies based on artificial intelligence, allowing the cognitive processing capacity of the human mind to be mimicked by increasingly sophisticated and independent machines [7].

Traditionally, machine learning is characterized by the existence of two different databases, one for training the machine and another for the tests themselves, which share the same data entry and distribution space. After completing the training stage, weights are obtained for analysis of test data. However, in certain situations, obtaining data that share the same data entry and distribution space can be extremely arduous and expensive [8].

Considering this circumstance, it is possible to choose the transfer learning technique, which is based on the use of data obtained in similar, but distinct, domains to perform machine training [8]. Based on this principle, it is possible to use a pre-trained weight scale in models for the analysis of medical images [9]. However, the use of a scale of pre-trained weights in the model does not exempt the realization of a new training, especially aiming at the improvement of the deep layers, with the data of the new training coming from the same database of the data to be tested [9].

Given the above, the present study aimed to develop a transfer learning based model able to classify images generated from electroencephalographic data graphic representation according the absence or presence of epileptic seizures.

MATERIAL AND METHODS

We used the Epileptic Seizure Recognition Data Set [10, 11], collected in the UCI Machine Learning Repository [12], which consists of 500 brain activity records for 23.6 seconds comprising 23 chunks of 178 data points (500 time series, each lasting approximately 23 seconds, and each second being represented by 178 data points). Thus, the dataset is composed of 11500 instances, each of which consists of 178 features and one label representing the class of the record (0 for the absence of epileptic seizure in the record and 1 for the presence of epileptic seizure in the record).

For this study, we have chosen to transform the collected numerical data into images by graphically plotting the 178 data points of each instance, without any previous regularization or manipulation of the numeric values. Among the 11500 images, 2300 were labeled as 1 and 9200 were labeled as 0. Fig 1 shows examples of generated images representing records with absence and of records with presence of epileptic seizures.

FIH-10-61-g001.jpg

Fig 1

Examples of generated images representing EEG records with and without epileptic seizures

The images were converted to arrays of dimension 299x299x3 (with the units being rescaled through division by 255), so they would be suitable to the image classification approach intended, and used as input for the transfer learning-based deep neural network summarized in Table 1. This neural network consists in a binary classifier, which predicts if the input shows presence or absence of epileptic seizure.

Table 1

Synthesis of the deep neural network used to classify images generated from EEG data according the presence or absence of epileptic seizures.

Type of layer Brief description Number of parameters
Functional layer Instantiates the Xception architecture with average pooling of the output 20861480
Dropout layer Randomly sets input units to 0 with a 0.15 frequency at each step -
Dense layer One unit with sigmoid activation 2048

The functional layer “Xception” instantiates the Xception architecture with weights pre-trained on the ImageNet data set. This architecture consists of a convolutional neural network (CNN) composed of 126 layers (of which 36 are convolutional) based entirely on depth wise separable convolution layers [13]. Since this architecture was originally designed to classify between 1000 different classes using the softmax classification activator, the last network layer (top layer) was excluded.

The data were divided in proportion of 75%/25% in training (N=8625) and test set (N=2875) respectively, being the accuracy, sensitivity, specificity and AUC-score of the model (that is, of the prediction regarding the absence or presence of epileptic seizure) evaluated in the test data.

RESULTS

The final model consisted of the conjunction of: (1) the Xception architecture with pre-trained weights in the ImageNet dataset, composed of 126 layers, the first 26 of which had no weights trained in the training set, while the others had; (2) a dropout layer with a rate of 0.2; (3) a dense final layer consisting of one unit using the sigmoid activation function, responsible for the classification in absence or presence of epileptic seizure for each instance.

The optimizer algorithm used in the Adam model, with a learning rate of 0.0001, and the loss function adopted was binary cross entropy. In order to address the imbalance between classes, class weights (inversely proportional to the frequencies) were assigned.

In the test set, the model achieved 100% accuracy, sensitivity and specificity, with AUC-score of 1.0. The result achieved by the model in the test set is represented in a confusion matrix showed in Table 2.

Table 2

Evaluation of the models performance in test set

True labels
Predicted labels Presence of epilepsy Absence of epilepsy
Presence of epilepsy 575 0
Absence of epilepsy 0 2300

DISCUSSION

In this work, we built a model based on transfer learning capable of detecting epileptic seizures with 100% accuracy in images generated from the graphic representation of electroencephalographic records. The data set used in this study has also been used in the construction of other diverse binary predictive models (presence vs. absence of epileptic seizure) reported in the literature, using different approaches and reaching different accuracy values.

For instance, Kumar & Kolekar [14] and Wang et al. [15] used discrete wavelet transform followed support vector machine (SVM) classification, obtaining accuracy values of 98% and 99.25%, respectively. Subasi et al. [16] also used hybrid SVM models, obtaining a maximum accuracy of 99.38% with the model that incorporated particle swarm optimization algorithm. Yuan et al. [17] have developed a multi-feature fusion framework combining features from global handcrafted engineering, deep learning and embedding models together into a fixed-length feature vector, which has achieved a 100% accuracy. Hussein et al. [18] were also able to achieve a 100% accuracy value, using a Long Short-Term Memory model. Bizopoulos et al. [19] used, like us, the conversion to the image followed by classification (through deep convolutional architectures) approach; however, they converted the signals to image using learnable parameters (applying one and two layer CNN modules) instead of a static procedure. Their best accuracy, 85.3%, was achieved using the one layer CNN signal to image module combined to the DenseNet121 architecture.

Thus, the model developed by us reached maximum accuracy from a simple and straightforward approach to pre-processing and data transformation, which is a positive point regarding the potential of applicability in different scenarios. However, given the restricted dimension of the dataset, in contrast with the depth of the neural network and the large volume of data in which its parameters were pre-trained, it is necessary to put the methodology to the test in other related sets, especially considering the concern with the possibility of overfitting.

CONCLUSION

The use of deep learning, especially the transfer learning technique, has great potential in the medical field for the analysis of data and clinical images. This paper used this technique to recognize epileptogenic electroencephalographic patterns in images obtained from the conversion of electrical signals for their graphic representation.

The algorithm used in this paper achieved a remarkable result of 100% in accuracy, sensitivity and specificity in the test set. The potential of machine learning and, specifically, transfer learning for the analysis of graphically represented electroencephalographic data becomes evident. In view of this, it is opportune to raise new studies involving transfer learning for the analysis of related data (signal data), with the aim of improving, disseminating and validating its use for daily clinical practice.

AUTHOR’S CONTRIBUTION

The authors agree on this final form of the manuscript, and attested that all authors contributed in the final draft of the manuscript. 

CONFLICTS OF INTEREST

The authors declare no conflicts of interest regarding the publication of this study.

FINANCIAL DISCLOSURE

No financial interests related to the material of this manuscript have been declared.

References

1. Jameson, JL.; Fauci, A.; Kasper, D.; Hauser, S.; Longo, D.; Loscalzo, J. Harrison’s principles of internal medicine. 20th ed. New York: The McGraw-Hill Companies, Inc: 2016.
2. Fisher RS, Boas WVE, Blume W, Elger C, Genton P, Lee P, et al. Epileptic seizures and epilepsy: Definitions proposed by the International League Against Epilepsy (ILAE) and the International Bureau for Epilepsy (IBE). Epilepsia. 2005;46(4):470–2.
3. Gloor P. Neuronal generators and the problem of localization in electroencephalography: Application of volume conductor theory to electroencephalography. J Clin Neurophysiol. 1985;2(4):327–54.
4. Browne, TR.; Holmes, GL. Epilepsy: Definitions and backgroundIn: Browne TR, Holmes GL. , editors. Handbook of epilepsy. Philadelphia: Lippincott-Raven; 1997.
5. Beam AL, Kohane IS. Big data and machine learning in health care. JAMA. 2018;319(13):1317–8.
6. Gulshan V, Peng L, Coram M, Stump M, Wu D, Narayanaswamy A, et al. Development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs. JAMA. 2016;316(22):2402–10.
7. Stead WW. Clinical implications and challenges of artificial intelligence and deep learning. JAMA. 2018;320(11):1107–8.
8. Weiss K, Khoshgoftaar M, Wang D. A survey of transfer learning. Journal of Big Data. 2016;3(1)
9. Raghu M, Zhang C, Kleinberg J, Bengio S. Transfusion: Understanding transfer learning for medical imaging. Advances in Neural Information Processing Systems. arXiv Prepint 2019;
10. Andrzejak R, Lehnertz K, Rieke C, Mormann F, David P, Elger CE. Indications of nonlinear deterministic and finite dimensional structures in time series of brain electrical activity: Dependence on recording region and brain state. Phys Rev E Stat Nonlin Soft Matter Phys. 2001;64(6 Pt 1):061907.
11. Wu Q, Fokoue E. Epileptic seizure recognition data set [Internet] 2017 ; Avaliable from: https://archive.ics.uci.edu/ml/datasets/Epileptic+Seizure+Recognition.
12. Dua D, Graff C. UCI machine learning repository [Internet] 2001 ; Available from: http://archive.ics.uci.edu/ml.
13. Chollet F. Xception: Deep learning with depthwise separable convolutions. IEEE Conference on Computer Vision and Pattern Recognition. IEEE 2017;
14. Kumar A, Kolekar MH. Machine learning approach for epileptic seizure detection using wavelet analysis of EEG signals. International Conference on Medical Imaging, m-Health and Emerging Communication Systems. IEEE 2014;
15. Wang L, Xue W, Li Y, Luo M, Huang J, Cui W, et al. Automatic epileptic seizure detection in EEG signals using multi-domain feature extraction and nonlinear analysis. Entropy. 2017;19(6):222.
16. Subasi A, Kevric J, Abdullah M. Epileptic seizure detection using hybrid machine learning methods. Neural Computing and Applications. 2019;31:317–25.
17. Yuan Y, Xun G, Jia K, Zhang A. A novel wavelet-based model for EEG epileptic seizure detection using multi-context learning. International Conference on Bioinformatics and Biomedicine. IEEE 2017;
18. Hussein R, Palangi H, Ward R, Wang ZJ. Epileptic seizure detection: A deep learning approach. arXiv Prepint 2018;
19. Bizopoulos P, Lambrou G, Koutsouris D. Signal2image modules in deep neural networks for EEG classification. Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE 2019;

This display is generated from Gostaresh Afzar Hamara JATS XML.

Refbacks

  • There are currently no refbacks.