Parallel Real Time Seizure Detection in Large EEG Data

Laeeq Ahmed, Ake Edlund, Erwin Laure, Stephen Whitmarsh


Electroencephalography (EEG) is one of the main techniques for detecting and diagnosing epileptic seizures. Due to the large size of EEG data in long term clinical monitoring and the complex nature of epileptic seizures, seizure detection is both data-intensive and compute-intensive. Analysing EEG data for detecting seizures in real time has many applications, e.g., in automatic seizure detection or in allowing a timely alarm signal to be presented to the patient. In real time seizure detection, seizures have to be detected with negligible delay, thus requiring lightweight algorithms. MapReduce and its variations have been effectively used for data analysis in large dataset problems on general-purpose machines. In this study, we propose a parallel lightweight algorithm for epileptic seizure detection using Spark Streaming. Our algorithm not only classifies seizures in real time, it also learns an epileptic threshold in real time. We furthermore present “top-k amplitude measure” as a feature for classifying seizures in the EEG, that additionally assists in reducing data size. In a benchmark experiment we show that our algorithm can detect seizures in real time with low latency, while maintaining a good seizure detection rate. In short, our algorithm provides new possibilities in using private cloud infrastructures for real time epileptic seizure detection in EEG data.


  1. Ahmed, L. (2015). Github, inc.
  2. Bifet, A. (2013). Mining big data in real time. In Informatica 37.1.
  3. Dagum, L. and Enon., R. (1998). Openmp: an industry standard api for shared-memory programming. In Computational Science & Engineering, IEEE 5.1 (1998): 46-55.
  4. Dean, J. and Ghemawat, S. (2008). Mapreduce: simplified data processing on large clusters. In Communications of the ACM 51.1 (2008): 107-113.
  5. Dutta, Haimonti, e. a. (2011). Distributed storage of largescale multidimensional electroencephalogram data using hadoop and hbase. In Grid and Cloud Database Management. Springer Berlin Heidelberg, 2011. 331- 347.
  6. Ekanayake, Jaliya, S. P. and Fox, G. (2008). Mapreduce for data intensive scientific analyses. In IEEE Fourth International Conference on e-science. IEEE.
  7. Esteller, R. (2000). Detection of seizure onset in epileptic patients from intracranial eeg signals. In Vol. 1.
  8. Ferrarelli, Fabio, e. a. (2010). Reduced sleep spindle activity in schizophrenia patients. In The American journal of psychiatry 164.3 (2007): 483-492.. Vol. 10. 2010.
  9. Gropp, William, E. L. and Skjellum, A. (1999). Using mpi: portable parallel programming with the message-passing interface. In Vol. 1. MIT press.
  10. Hadoop (2009). Apache hadoop.
  11. Jayapandian, Catherine P., e. a. (2013). Cloudwave: distributed processing of big data from electrophysiological recordings for epilepsy clinical research using hadoop. In AMIA Annual Symposium Proceedings. Vol. 2013. American Medical Informatics Association.
  12. Kang, Sol Ji, S. Y. L. and Lee, K. M. (2014). Performance comparison of openmp, mpi, and mapreduce in practical problems. In Advances in Multimedia.
  13. Kramer, Uri, e. a. (2011). A novel portable seizure detection alarm system: preliminary results. In Journal of Clinical Neurophysiology 28.1 (2011): 36-38.
  14. Kreps, Jay, N. N. and Rao, J. (2011). Kafka: A distributed messaging system for log processing. In Proceedings of the NetDB.
  15. Litt, Brian, e. a. (2001). Epileptic seizures may begin hours in advance of clinical onset: a report of five patients. In Neuron 30.1 (2001): 51-64.
  16. Nunez, P. L. and Srinivasan, R. (2006). Electric fields of the brain: the neurophysics of eeg. Oxford university press.
  17. Qu, H. and Gotman, J. (1997). A patient-specific algorithm for the detection of seizure onset in long-term eeg monitoring: possible use as a warning device. In Biomedical Engineering, IEEE Transactions on 44.2 (1997): 115-122. IEEE.
  18. Riedner, Brady A., e. a. (2007). Sleep homeostasis and cortical synchronization: Iii. a high-density eeg study of sleep slow waves in humans. In Sleep 30.12 (2007): 1643.
  19. Sefraoui, Omar, M. A. and Eleuldj, M. (2012). Openstack: toward an open-source solution for cloud computing. In nternational Journal of Computer Applications 55.3 (2012): 38-42.
  20. Shoeb, A. H. and Guttag, J. V. (2010). Application of machine learning to epileptic seizure detection. In Proceedings of the 27th International Conference on Machine Learning (ICML-10).
  21. Shoeb, Ali, e. a. (2004). Patient-specific seizure onset detection. In Epilepsy and Behavior 5.4 (2004): 483-498.
  22. Smith, S. J. M. (2005). Eeg in the diagnosis, classification, and management of patients with epilepsy. In Journal of Neurology, Neurosurgery and Psychiatry 76.suppl 2 (2005): ii2-ii7.
  23. Stern, J. M. (2005). In Atlas of EEG patterns. Lippincott Williams and Wilkins.
  24. Wang, Lizhe, e. a. (2012). Parallel processing of massive eeg data with mapreduce. In ICPADS. Vol. 2012.
  25. Wulsin, D. F., e. a. (2011). Modeling electroencephalography waveforms with semi-supervised deep belief nets: fast classification and anomaly measurement. In Journal of neural engineering 8.3 (2011): 036015.
  26. Zaharia, Matei, e. a. (2010). Spark: cluster computing with working sets. In Proceedings of the 2nd USENIX conference on Hot topics in cloud computing. Vol. 10. 2010. USENIX.
  27. Zaharia, Matei, e. a. (2012a). Discretized streams: an efficient and fault-tolerant model for stream processing on large clusters. In Proceedings of the 4th USENIX conference on Hot Topics in Cloud computing. USENIX.
  28. Zaharia, Matei, e. a. (2012b). Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing. In Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation. USENIX Association.
  29. Zikopoulos, P. and Eaton, C. (2011). Understanding big data: Analytics for enterprise class hadoop and streaming data. McGraw-Hill Osborne Media.

Paper Citation

in Harvard Style

Ahmed L., Edlund A., Laure E. and Whitmarsh S. (2016). Parallel Real Time Seizure Detection in Large EEG Data . In Proceedings of the International Conference on Internet of Things and Big Data - Volume 1: IoTBD, ISBN 978-989-758-183-0, pages 214-222. DOI: 10.5220/0005875502140222

in Bibtex Style

author={Laeeq Ahmed and Ake Edlund and Erwin Laure and Stephen Whitmarsh},
title={Parallel Real Time Seizure Detection in Large EEG Data},
booktitle={Proceedings of the International Conference on Internet of Things and Big Data - Volume 1: IoTBD,},

in EndNote Style

JO - Proceedings of the International Conference on Internet of Things and Big Data - Volume 1: IoTBD,
TI - Parallel Real Time Seizure Detection in Large EEG Data
SN - 978-989-758-183-0
AU - Ahmed L.
AU - Edlund A.
AU - Laure E.
AU - Whitmarsh S.
PY - 2016
SP - 214
EP - 222
DO - 10.5220/0005875502140222