The aim of abating seizures in a spatio-temporally selective manner is not a modern one. As early as 150 AD, Pelops from Alexandria, the teacher of Galen, was reported to have aborted what would likely be referred to today as ‘a simple partial seizure with sensory-motor manifestations’ by tying a ligature around the affected limb at the time of the appearance of the first paroxysmal manifestation.1 Brown-Sequard,2 Jackson,3 and, later, Gowers,4 who coined the term ‘counter-irritation’ to denote a strategy to abate seizures, reintroduced the notion of contingent therapy in the 19th century, an objective that since then and until recently was ignored. After nearly two millennia, the seminal tasks of automated seizure detection and contingent warning and delivery of therapy endowed with realtime feedback capabilities are finally not only feasible but also possibly safe and efficacious.5 This substantive advance, which at this juncture is in an ‘embryonic’ developmental stage, attempts to address the lack of efficacy of systemically administered pharmacological agents in a large group of patients with epilepsy,6 together with the relatively high incidence of serious idiosyncratic or intolerable dose-dependent adverse effects, including exacerbation of seizures,7 and to decrease the risk of injury and the psychosocial burden resulting from their unpredictability. The medical, psychosocial, and economic benefits that will be derived from achieving these objectives are salutary and self-evident to patients, their care-givers, and healthcare providers.
Realtime automated seizure detection, the obligatory condition for implementation of contingent warning and therapies, has been attempted with various degrees of success since the mid-1970s.8 The rationale for the method/algorithm,9,10 developed by the group of which these authors are members, and its architecture will be described in some detail for the purpose of shedding light on the process and on the value of signal analyses for the implementation of novel clinical epilepsy therapies. This algorithm is discussed herein simply because it is well understood by these authors. References to and comparisons with other algorithms are not germane, because, to date, a formal evaluation of their performance on a common data set has not been carried out.
Simply put, and making allowances for lack of mathematical rigor, this modular, adaptable algorithm separates and quantifies (measuring intensity, duration, and extent of spread) in realtime (as ‘things’ are happening) the seizure, from the non-seizure content in cortical electrical signals by comparing signal features on two timescales, one short (two seconds), containing ongoing (‘foreground’) activity, and the other long (30 minutes), containing recent past (‘background’) activity, which is used as a reference against which the current activity is weighed/quantified. It undertakes two different filtering steps: one discards the non-seizure activity and the other the epileptiform activity that does not qualify as a ‘seizure.’ There is also a division (yielding a ratio) of the doubly filtered seizure content in the short ‘foreground’ window by that in the ‘background’ window. All of the above is carried out with a worthwhile degree of accuracy and speed. The algorithm’s design/architecture was guided by three central concepts.
• The raw cortical signals (digitized voltages recorded directly by electrocorticogram (ECoG) from the brains of subjects with pharmaco-resistant localization-related (‘focal’) seizures undergoing invasive surgical evaluation) have time-varying seizure (ictal) and non-seizure (inter-ictal) ‘components’ that are separable or decomposable (see Figure 1) and also quantifiable.
• The separation of seizure from non-seizure activity must be as complete (see Figure 2) as is practicable with existing analysis tools (and battery power available to implantable medical devices) to maximize sensitivity, accuracy, and speed of detection of relevant changes.
• Constraints must be imposed on the duration and intensity of changes in the ECoG’s seizure content that would be selectable for triggering warnings and delivery of therapy.
Single or brief bursts of epileptiform discharges (EDs) without visible clinical correlates, which are a frequent occurrence in subjects with pharmaco-resistant seizures, may not require warning or treatment and, unless ‘ignored’ by the algorithm, could trigger unnecessary warnings and treatment.
The decomposition of the ECoG into seizure and non-seizure may be accomplished simply and effectively through the application of spectral filters. A spectral filter, as with any other filter, selectively blocks the ‘passage’ of irrelevant or undesirable activity. In this application the non-seizure activity in the ECoG is removed using a differential weighting of its frequency content. A reliable and distinctive property of seizures, the sudden and usually marked increases in power relative to the non-seizure state, which in human ECoG typically occur around the 15–35 Hertz frequency range, were exploited for their automated detection. So-called wavelets,11 which are a robust and highly efficient tool for time– frequency–energy analysis, were used in the algorithm as filters. Among existing wavelet functions, the Daubechies 4, level 3, was selected as the spectral filter because it closely matches the seizures’ spectral changes (15–35Hz), especially at onset. This wavelet-based filter extracts the ECoG’s seizure energy content for subsequent comparison between the short (two-second) foreground window and the longer (30-minute) background window. Once extracted, the seizure content in the foreground window is divided by that in the background window to yield a ratio that varies with time, reflecting the relative seizure intensity of the foreground activity in comparison with the background. Increases in this ratio that reach or cross a threshold value are indicative of seizure onset and a subsequent drop below the threshold of its termination (see Figure 3). The time this ratio spends above the threshold gives the seizure duration and, combined with its magnitude, its intensity. The spatial extent of seizure spread is obtained by calculating these ratios on signals from multiple brain locations simultaneously. The detection threshold, filter settings, and timescales of analysis may each be adapted individually to maximize seizure detection performance.
The occurrence of frequent single or bursts of EDs, often originating outside the primary epileptogenic zone and usually devoid of behavioral/clinical correlates, complicates the task of seizure detection. Rejection (not detection) of EDs poses a non-trivial challenge that has confounded many a seizure detection algorithm because their power spectrum is often similar to that of seizures. Although in these authors’ opinion EDs are part of a continuum, with seizures at the other end, and may play a role in ictiogenesis, EDs confound and may degrade the value of any automated warning and therapy system that does not selectively ‘ignore’ them, because their detection could trigger hundreds, even thousands, of daily warnings and therapy deliveries. These actions would translate directly into worsening quality of life (compared with that without warnings), rapid battery depletion, and unforeseen, possibly deleterious, effects on neural dynamics. Selective ED rejection was accomplished through the incorporation of yet another type of filter into the algorithm architecture: an ‘order-statistic filter,’ which is a fanciful term for a mathematical operation that treats ED discharges as ‘outliers,’ excluding them from the final computation that quantifies the seizure content in the signal. For the generic algorithm, a 50th percentile or median filter was chosen, but this percentile value may be changed as needed to enhance detection performance in terms of speed and sensitivity or specificity.
How does a median filter work? Unlike a mean or average filter (commonly used in seizure detection algorithms) that takes into account all values in a distribution (e.g. for the set 1, 1, 1, 1, 96; mean = 20), a median filter selects the one in the middle (1, 1, 1, 1, 96; median = 1), a filtering operation that instills the requisite insensitivity to outliers (96 in the numerical example above and EDs in the ECoG) into the process. More explicitly, in the generic algorithm embodiment, EDs must last for at least one second or comprise at least 50% of the two-second foreground window to have any effect on the ratio/output. This filtering step markedly reduces detections that do not merit issuance of warnings or treatment.
What Is the Clinical Value of Realtime Automated Seizure Detection and Quantification?
There is the ability to deliver therapy in close temporal proximity to seizure onset and to objectively assess efficacy using not only one (frequency or rate) but three additional relevant variables (intensity, duration, and extent of spread). The results of a clinical trial5 performed by these authors will be used to illustrate these benefits in detail. For this trial, subjects with localization-related, pharmaco-resistant epilepsies were assigned to two groups based on the results of invasive monitoring. One group consisted of four subjects, deemed to be good candidates for resection of epileptogenic tissue (three mesial temporal and one dorsal frontal), to whom high-frequency (>100Hz) charge-balanced square pulses at safe intensities were delivered to the primary epileptogenic zone. The other group comprised four subjects whose seizures originated independently from both mesial temporal regions and were thus inoperable. This group was also treated with high-frequency currents, but these were delivered to the anterior thalamic nuclei, not to the epileptogenic tissue. This trial had two phases: the baseline/control phase, which corresponded to the surgical evaluation phase, and the experimental phase, during which every other seizure was stimulated electrically.
Seizure quantification allows precise assessment of the effects of therapy. Figure 4 compares the intensities and durations of seizures during the control phase (blue curve) with those treated with different frequencies. Currents at 300Hz (red curve) markedly decrease intensity and duration, whereas those at 50Hz (green curve) increase intensity and duration. Seizure quantification also uncovers effects of therapy that otherwise are likely to be overlooked. The beneficial effect of electrical stimulation on seizure intensity and duration can outlast its duration (‘carry-over’ effect), but is less marked than for seizures that are actually stimulated (see Figure 5). The intensity and duration of seizures stimulated at onset are considerably decreased (red curve) compared with those in the control (blue) phase. Note that in this experimental paradigm,5 stimulation was delivered to every other seizure, and non-stimulated seizures (green curve) in the experimental phase had lower intensity than those in the control phase but were more intense and longer than those receiving electrical stimulation.
Current clinical practice ignores seizure intensity, duration, and extent of spread and lacks accurate logging of the time between seizures (and their frequency of occurrence), variables that are complexly inter-related. For example, electrical stimulation directly to the epileptogenic zone may decrease seizure intensity significantly (p<0.05) in certain subjects and also time between seizures, thus increasing their frequency (manuscript in preparation). However, the overall effect is beneficial.
A quantitating detection algorithm also allows investigation of the role that circadian rhythms, seizure interdependencies, and different stimulation parameters have on the severity variables (seizure frequency, intensity, duration, and extent of spread). The influences of seizures on each other (‘interdependencies’) are being uncovered,12 and their frequency and intensity show consistent increases at certain times of the day.13,14
Development of scalp and extracerebral seizure detection will advance the field even further because its clinical applicability would be broadened beyond that which requires intracranial electrodes. Cardiac-based (EKG) detection15 is a promising avenue, especially for seizures originating from mesial temporal and insular regions. Once fully developed, extracerebral seizure detection will expand automated detection and logging, warning, and delivery of therapy possibly to non-refractory subjects.
Quantitative seizure detection also allows in-depth investigation of the spatio-temporal behavior (‘dynamics’) of experimental and human epilepsies using means for data quantification that were not available before. Although in humans the source of these data is likely to be restricted to subjects with pharmaco-resistant seizures, the dynamic knowledge thus accrued may provide insight into questions of central importance to epileptology, such as: Do seizures beget seizures, or is epilepsy a progressive disorder? Are seizures predictable? If the probability of seizure occurrence and intensity is subject to circadian variations, what factors (i.e. hormones) exert a modulatory effect? Valid answers to these questions will lay the basis for rational, evidence-based management of epilepsies. Modern clinical epileptology continues to rely solely on utterly inaccurate and incomplete seizure diaries16,17 to develop and assess therapies.
Electrical current is not the only therapeutic modality amenable to automated contingent delivery. The efficacy of targeted (spatially selective) delivery of antiseizure compounds and of thermal energy (cooling), although technically more demanding and cumbersome than electrical currents, is worth assessing. The main limitation for the pharmacological and other modalities is their inherently low (slow) tissue diffusivity compared with electrical currents, which, even if triggered at onset, may translate into late delivery/arrival to fully control the entire epileptogenic zone.
Automated warning to patients or caregivers is possible only if automated seizure is practicable and may take place at several seizure stages. The most desirable is that which is issued before the subject loses awareness. Notification that a seizure is occurring, even though the subject may be unaware or unconscious, is useful, especially for the pediatric and geriatric populations and for subjects with nocturnal epilepsies and those who live alone. Finally, notification that a seizure’s intensity, duration, and frequency have exceeded pre-determined (for the subject) values may prevent the transition into status epilepticus or allow early intervention if the transition has occurred. Automated warnings may decrease risk of injury and partly relieve patients and their care-givers from the burden of unpredictability.
What about seizure prediction? This valuable aim will take time to bear fruit but should be pursued vigorously for practical and heuristic reasons. An invaluable by-product of attempts to predict seizures is much-needed knowledge about the dynamics of the epileptic brain. Indeed, the existing fund of knowledge, a direct result of the lack of application of quantitative methods to seizure time series, is insufficient to yield clinically worthwhile prediction. The reason for this is simple: predicting the behavior of complex systems such as the brain, which are continuously subject to myriad exogenous and endogenous influences, and doing so with useful accuracy is a daunting task, even if the systems’ dynamics are known, which is not the case in epileptology. Barring serendipity, seizure prediction will be, for years to come, a treasured work in progress.
Substantive advances in clinical epileptology may be realized through the judicious use of realtime automated seizure detection, quantification, warning, and delivery of therapy in refractory epileptics. Materialization of these efforts is likely to elevate epileptology to the level of a clinical science. ■