Tag Archives: Algorithms

Early Detection of Seizures

For decades,  the early detection of a seizure was a serious research effort.  It was obvious that if a seizure could be detected before its initiation, the patient would be better prepared to seek help to suppress the seizure.  However, early detection of a seizure with a lead time of hours proved to be unattainable.  Over the past decade, early detection of a seizure within minutes not hours of its initiation seemed a more reasonable objective.  This blog will focus on the state of research on early detection of seizures with advances developed by the epilepsy laboratory at Johns Hopkins University.

Introduction

As reviewed by Jouny et al., (2011), “The window of opportunity is the time of the earliest detectable changes in the EEG and the onset of disabling clinical symptoms”.  Thus, this provides a definition of early detection.  It may sound straightforward but there are numerous challenges to early detection of seizures. Jouny et al., reviews some of them.

1. Early detection of seizures –  Sensitivity and specificity

Early detection is just that.  Firstly, it must detect the earliest change in the electrical (neuronal) activity that leads to a seizure (called a true positive) and not an electrical event that would not lead to a seizure (called false positive).  Stated another way, the seizure is termed the ictal event and non seizure activity is the interictal activity.  Secondly, early detection must distinguish between lots of interictal activity and a smaller amount of ictal activity.  Many times initially there is little neuronal difference in the two.  Therefore, both sensitivity and specificity are required elements of any measurement targeting early detection of a seizure.

2.  Early detection of seizures – Capacity of microelectrodes.  

Microelectrodes in high density arrays are useful in obtaining detailed data of abnormal neuronal activity (termed pathological high frequency oscillations) indicative of  localized seizures. Specifically, researchers attach microelectrodes to the EEG or intracellular electrodes to capture as much information as possible.  Seizures that spread over extensive areas, unfortunately, surpass the present day recording capabilities of the microelectrode arrays.

3.  Early detection of seizures – Sampling rate.

Higher sampling rates are desirable but this produces more data for analysis.  This requires more powerful computers and better electronics.  Improvements here are needed to detect unique potential changes that distinguish the initiation of the seizure and the seizure itself from all the electrical activity in between.

Current Advances in Early Detection of Seizures.

Early detection devices depend on what is called support vector machines (SVM) which are a type of machine learning algorithms.  “Several algorithms have been developed for early-seizure-onset detection with real-time capabilities for scalp-EEG” (Ehrens et al., 2022).  In particular, they include early detection algorithms worldwide from labs in the Netherlands (Bogaarts et al., 2016); in India (Sridevi et al., 2019); in Italy (Chisci et al., 2010); in Austria/Netherlands (Fürbass et al., 2015); in Germany (Meier et al., 2008; Manzouri et al., 2021); in Canada (Saab and Gotman, 2005) and in the US, (Minasyan et al., 2010, Yidiz et al., 2022, Ehrens et al., 2022). 

Application of early detection algorithms

Early detection devices are appropriately evaluated in an epilepsy monitoring unit (EMU).  The EMU needs to gather reams of data for precise surgical intervention in patients with epilepsy that are resistant to drugs.  The Johns Hopkins Epilepsy Laboratory developed an “dynamical and self-adapting algorithm” (Ehrenss et al., 2022) which detects in real time the seizure phase of early onset as well as the seizure itself.  It is patient specific and does not require prior EEG training.  Basically, the ” algorithm uses a dynamic training set, based on a 20-min dataset that is updating every second” and ” requires no prior training because the algorithm compares the past 20 minutes of activity with the current activity and looks for novelty” (Ehrens et al., 2022)  A processing time of 0.5 seconds allows  algorithm processing, removal of artifacts, and extraction of essential features in the 20 minute learning session.

One-class SVM in early detection of seizures.

This algorithm, referred to as a one-class SVM, was tested in 35 patients with epilepsy (male: female, 62%:38%, 34 years average age) in the Johns Hopkins Hospital EMU.  “Patients were implanted intracranially with a combination of subdural grids, strips and/or depth electrodes to record cortical EEG and stereo EEG signals respectively ” (Ehrens et la., 2022).   For other information on intracranial recordings, check out Blog 10.

As presented above, the algorithm collected EEG data, eliminated non-neural artifacts and identified features essential to seizure identification  This preprocessing trains the one-class SVM and determines novelty.  The output is “post processed” such that it will then identify and signal the detection of an epileptiform event in real time. 

Although multiple SVM configurations were evaluated, the single SVM configuration yielded the best results.  The John Hopkins Laboratory SVM achieved a rate of 87% for true positives and a rate of 1.25% for false positive/hour.  That is, the SVM algorithm detected a seizure correctly 87% of the time and was wrong 1.25% of the time.  The true positive rate increased another 6% points and the false positives declined by half with removal of artifacts post analysis.  The mean detection latency (early detection) was 10.4 seconds. 

Conclusions

There is definitely a need for devices capable of early detection of seizures.  In the EMU, early detection alerts the staff and enables immediate treatment of the patient with epilepsy.  Outside the EMU, an early detection device would dramatically enhance the quality of life of patients with epilepsy.  The algorithm (one class SVM) is moving closer to achieving these goals.  Presently, 100% sensitivity of early detection is achievable in 74% of patients in the EMU setting with the unique algorithm developed at Johns Hopkins Laboratory (Ehrens et al., 2022). 

References (pubmed)

Bogaarts JG et al.,. Improved epileptic seizure detection combining dynamic feature normalization with EEG novelty detection. Med Biol Eng Comput  54:1883–92, 2016.

Chisci L. et al., Real-time epileptic seizure prediction using AR models and support vector machines. IEEE Trans Biomed Eng. 57(5):1124-32, 2010.

Ehrens et al., Dynamic training of a novelty classifier algorithm for real-time detection of early seizure onset.  Clin Neurophysiol.  135: 85–95, 2022.

Furbass F. et al., Prospective multi-center study of an automatic online seizure detection system for epilepsy monitoring units Clin Neurophysiol. 126(6):1124-1131, 2015.

Jouny CC. et al., Improving Early Seizure Detection Epilepsy Behav.  22(Suppl 1): S44–S48, 2011.

Manzouri F et al., A Comparison of Energy-Efficient Seizure Detectors for Implantable Neurostimulation Devices Front Neurol 12:703797, 2022.

Meier R et al., Detecting epileptic seizures in long-term human EEG: a new approach to automatic online and real-time detection and classification of polymorphic seizure patterns J Clin Neurophysiol. 25(3):119-31, 2008.

Minasyan GR et al., -specific early seizure detection from scalp electroencephalogram J Clin Neurophysiol. 27(3):163-78, 2010.

Saab ME, Gotman J. A system to detect the onset of epileptic seizures in scalp EEG Clin Neurophysiol. 116(2):427-42, 2005.

Sridevi V, et al.,. Improved Patient-Independent System for Detection of Electrical Onset of Seizures. J Clin Neurophysiol 36:14–24, 2019.

Yidiz I et al., Unsupervised seizure identification on EEG Comput Methods Programs Biomed. 215:106604, 2022.