A Phase-Locked Loop Epilepsy Network Emulator
Abstract
Most seizure forecasting employs statistical learning techniques that lack a representation of the network interactions that give rise to seizures. We present an epilepsy network emulator (ENE) that uses a network of interconnected phase-locked loops (PLLs) to model synchronous, circuit-level oscillations between electrocorticography (ECoG) electrodes. Using ECoG data from a canine-epilepsy model (Davis et al. 2011) and a physiological entropy measure (approximate entropy or ApEn, Pincus 1995), we demonstrate the entropy of the emulator phases increases dramatically during ictal periods across all ECoG recording sites and across all animals in the sample. Further, this increase precedes the observable voltage spikes that characterize seizure activity in the ECoG data. These results suggest that the ENE is sensitive to phase-domain information in the neural circuits measured by ECoG and that an increase in the entropy of this measure coincides with increasing likelihood of seizure activity. Understanding this unpredictable phase-domain electrical activity present in ECoG recordings may provide a target for seizure detection and feedback control.
1. Introduction
Recent combinations of machine-learning based statistical classifiers (Mirowski et al. 2009), advanced information metrics (Pincus 1995), and publicly available electrocorticography (ECoG) data from patients and animal models (Davis et al. 2011, Cook et al. 2013) have begun to successfully identify biomarkers that predict seizures. However, specificity remains a challenge especially with regards to false positives (Mormann et al. 2006, Andrzejak et al. 2009).
While more data, better recording techniques, and more advanced classification algorithms will undoubtedly improve seizure prediction, these approaches lack a representation of the underlying neurophysiology that contributes to epileptic pathology. Theoretical and empirical work on epilepsy suggests that run-away network-level interactions produce the cascade of uncontrolled, high frequency oscillations (HFOs) that produce the voltage discharges that characterize seizures (Wendling et al. 2003, Kramer & Cash 2012, Viventi et al. 2012). This mirrors emerging work on non-pathological brain activity that highlights the importance of coordinated oscillations for information flow between different neural processors (Gray 1994, Hampson et al. 2012, Derix et al. 2013). Information routing in neural networks is often modeled with oscillatory phase dynamics between different neural populations. These phase-sensitive neural networks are frequently used to model phenomena such as recognition memory (Hoppenstadt & Izhikevich 2000, Matrosov, Mishchenko, & Shalfeev 2013), wherein oscillations are used to bind together different memory components by locking different sub-processors to a target memory state. We reason that these same techniques could be used to emulate the circuit-level dynamics between neural populations that contribute to epileptiform activity, thereby identifying the circuit-level oscillatory cascade that precedes HFOs and seizures. Previous neural network models of epilepsy (Molaee-Ardekani et al. 2010), have had success in generating seizure-like activity, and have called attention to the intrinsic difficulty of seizure prediction due to the underlying chaotic dynamics of seizure generation (Anderson et al. 2012).
In the current work, we present an epilepsy network emulator (ENE), designed to be sensitive to unpredictable, non-linear fluctuations in the phase of neural communication. The ENE is a phase-locked loop neural-network (a PLL is a non-linear control loop that synchronizes the phase of the output signal to the phase of the input, see Gardner 2005) to model coordination between the recorded voltages from multiple ECoG sites in a canine epilepsy model (Davis et al. 2011). In the current study, we lock the network directly to recorded ECoG voltages gathered during ictal and interictal periods and employ an entropy measure (approximate entropy, or ApEn, a measure of the entropy of patterns in physiological data, see: Pincus 1994), to monitor how the entropy of the interactions between different ECoG sites changes over the course of seizure activity. As emulated interactions become less predictable (i.e., when ApEn of the ENE’s phase-domain information increases), we can identify periods of time where the ENE is more likely to produce HFOs and produce voltage discharges. By comparing how the emulator’s behavior is related to changes in recored ECoG voltages we can identify how coordinated interactions between ECoG electrodes are related to ictal activity.
2. Methods
Phase locked loop trajectories
A PLL contains a voltage-controlled oscillator (VCO), a low-pass filter, and a phase detector (Fig. 1). It detects the phase-difference between a periodic input signal and the VCO, and adjusts the VCO to lock to the phase of its input.
If the input frequency and the internal frequency are different, or if the output of the PLL is perturbed (such as by the weights of PLL neural network), then there exists no stead-state (Hoppenstadt & Izhikevich 2000, Oliaei 2006), and the PLL cannot synchronously lock to the input. Instead there will be a class of solutions, and the PLL will find a low-energy limit cycle trajectory that orbits within this class. This limit-cycle trajectory is characterized by either 1) synchronizing with the harmonics of the different frequencies, 2) periodic synchronization to each frequency (such that the network is synchronized on average), or 3) chaotic behavior (Matrosov, Mishchenko, & Shalfeev 2013).
Because PLLs use voltages as inputs, they can map directly onto EEG (electroencephalography), ECoG, and LFP (local field potential) recordings. We map the raw, measured voltages one-to-one from an ECoG electrode to a PLL in our network. The network then attempts to synchronize with oscillatory phase or frequency information implicit in the changing ECoG voltages. The PLL network thus models network dynamics across electrode sites by locking to phase-frequency interactions present between electrodes.
Epilepsy data
We used canine epilepsy data (Davis et al. 2011) made public as part of the American Epilepsy Society Seizure Prediction Challenge. (https://www.ieeg.org/). This data consisted of intercranial EEG data from four dogs with naturally occurring epilepsy collected via a chronic implantable monitoring system over several months. EEG was sampled from 16 electrodes at 400hz, referenced to group average, and binned into 1 s samples labeled inter-ictal or ictal. In all cases, we use the raw voltages from these samples as inputs to our emulator and characterize the phase-trajectories of the PLLs in response to the different classes of data.
PLL epilepsy network emulator
We used a PLL neural network to emulate the cortical dynamics that contribute to eplieptiform activity in the canine model. Our network consisted of 16 PLLs, one for each recording electrode, connected via a symmetric weight matrix with uniform weights of 0.5 (Fig. 1). Each PLLs VCO had a internal frequency of 1 Hz. All used a third-order type 2 Chebyshev low pass-filter with τ = 0.4 Hz, and a window size of 0.25 s. All implementations used a multiplicative phase detector. The dynamical system embodied by this network is characterized by:
where ϑi is the phase of the ith PLL, Ω is the free-running frequency of the VCO, and V(x) and V (x − π/2) are sin(x) and cos(x) respectively.
Each PLL in this network was locked to voltages from one electrode in a single dogs chronic recording array. We observed the models phase trajectories over a period of 8π (4 s). This network was fully implemented in python using the SciPy package (Jones, Oliphant, Peterson et al. 2001-, Open Source Scientific Tools for Python) and the PyEEG package (Bao, Liu, & Zhang 2011) with data visualizations using PyQtGraph. In all cases, the two variables of interest are PLL phase (ϑ), and ECoG voltage (V). We plot these over time, and characterize the complexity of these trajectories using a measure of entropy.
Approximate Entropy
Approximate entropy (ApEn) is a measure of the unpredictability of the fluctuations within a set of time-series data that was developed for computing the amount of information present in finite samples of physiological data (Pincus 1995). ApEn has previously been used as a metric for predicting seizure activity from EEG and ECoG data (Yuan et al. 2011, Kumar, Dewal & Anand 2012). ApEn is a measure of the likelihood that similar patterns in time-series data will be followed by dissimilar patterns. A low ApEn means that patterns in a time-series are likely to be repeated, a high ApEn means that patterns are likely to change. ApEn is a modification of Komologorov-Sinai entropy (Sinai 2007), and is computed via an algorithm:
For a finite set of equally-space time-series measurements u, take a sample of m values from u
Let x(i) = [u(i), u(i + 1), …, u(i + m − 1)]
For each x(i) with 1 < i < (N − m + 1) find x(j) where j = i + m
Compute ,
where r a real valued filtering level and d is the maximum scalar difference between x(i) and x(j). For
(2)and
ApEn = Φm(r) - Φm+1(r).(3)
We chose a sample size m of 2, and set r to 0.2 standard deviations of the 1 second samples based on prior literature (Gray 1994). Because much computationally simpler measures are also sensitive to ENE phase entropy we expect a range of parameters to be appropriate here.
We compute ApEn on the phase of the PLLs in the ENE and the raw voltages of the recording array. This approach assumes that seizure activity is characterized by entropy of network coordination (i.e., the dynamics of phase locking between electrodes), rather than entropy of local activation (i.e., voltage changes in individual electrodes). PyEEG (Bao, Liu & Zhang 2011) contains a built in package for evaluating ApEn. Where appropriate, we report mean ApEn across electrodes, for each animal.
Alternate measures
Because ApEn is a tremendously computationally intensive measure, we additionally employed a measure of the entropy of the sample spectrum (renormalized entropy Bondarenko 1997, Quiroga et al. 1999), which has also been employed in EEG measures of epileptiform activity (Kopintzki, Warnke, & Timmer 1998).
Wherein S(ωi) is the spectra of an ENE output or ECoG channel, and H is referenced to the lowest-entropy channel.
Further, we also report the path length in phase space of the plot produced by the ENE output and a phase plot of ECoG voltages (because these units have dramatically different scale, we z-scored both after computing this length). This measure of phase is novel in epilepsy forecasting literature, but it is highly computationally efficient.
3. Results
Effect of ictal input
We characterized the mean ApEn (i.e., unpredictability) of ictal and interictal data from 100 randomly drawn windows per canine (Fig. 2a), and created a 2x2 comparison: 1) ENE phase v. ECoG voltage and 2) ictal v. interictal. These results were highly consistent across and within each animal (individual means are points in Fig. 2a). The complexity of the samples (as measured by ApEn) are visually apparent from plots of ApEn over time in each of our four conditions (Fig. 2b shows example traces from one animal). A 2x2 ANOVA found significant effects of seizure status (ictal v. interictal, d.f. = 1 F = 5.85 p < .04), data type (ENE phase v. ECoG voltage, d.f. = 1 F = 127.90 p < .0001), and a significant interaction (d.f. = 1 F = 9.2 p < .01). In the recorded ECoG voltages, ictal periods increase voltage amplitude but decrease entropy relative to interictal periods. ENE phase, however, increases its entropy during ictal periods. While the ENE’s PLL phase behavior during interictal periods shows characteristic phase trajectories that transition between locked, harmonic, and chaotic states (as in Matrosov, Mishchenko, & Shalfeev 2013), the ictal periods are almost entirely composed of high-frequency oscillation. Thus, while we observe some turbulent periods in ENE behavior even during interical periods (e.g., See 250–400 in the interictal period in Fig. B), quantitative measures of phase complexity strongly differentiate between states.
A) Mean ApEn of ENE phase and ECoG voltage during ictal and interical periods. Dots are individual subject averages. B) Traces at individual electrodes during ictal and interictal periods show increased amplitude, but not entropy of voltage traces, while the output of the ENE greatly increases in entropy during ictal periods. Note however, that both ictal and interictal ENE plots contain high-frequency turbulent periods.
A possible explanation for the negative relationship between ECoG voltage and ENE phase complexity is present in the time-domain plots of these signals (Fig. 3). During ictal periods ApEn for ENE phase (Fig. 3a) and ECoG voltage (Fig. 3b) showed opposite patterns. ENE phase complexity increases before ECoG voltage complexity, and is reset by it, suggesting that complex phase-interactions implicit in ECoG voltages may precede seizure-related voltage discharges. Note that the increase in PLL phase entropy precedes spike in ECoG voltage entropy by nearly a minute.
Because ApEn is a computationally intensive measure we also computed mean renormalized entropy (Bondarenko 1997) a measure of spectral information. The 2x2 Anova on renormalized entropy did not find significant effects of seizure status (ictal v. interictal, d.f. = 1 F = 4.78 p < .12), data type (ENE phase v. ECoG voltage, d.f. = 1 F = .02 p < .97), or a significant interaction (d.f. = 1 F = .79 p < .44), although a one-sided t-test on the model output alone was significant (ictal v. interictal p <.02). Thus spectral entropy is not sufficient to account for the differences observed in ApEn.
However, the computationally simplest measure, the path length of the ENE output, was actually the strongest differentiator between conditions. After z-scoring the outputs (to account for dramatically different scales between ECoG voltages and ENE phase traces), a 2x2 ANOVA found significant effects of seizure status (ictal v. interictal, d.f. = 1 F = 31.34 p < .02), data type (ENE phase v. ECoG voltage, d.f. = 1 F = 235.74 p < .001), and a significant interaction (d.f. = 1 F = 31.34 p < .02). This suggests that the effect of the ENE is not dependent on computationally complex measures.
4. Discussion
We demonstrated the ability of an untrained PLL neural network to emulate epileptiform activity from canine ECoG data. We observed that a measure of the unpredictability of ENE network interactions increases dramatically during ictal periods, and is complementary to measures of entropy in ECoG voltage. Therefore, measures of network-level coordination among different neural recording sites provides additional information about the trajectories of network oscillations that result in seizure activity. The PLL-based ENE could be useful as an “entropy amplifier” that magnifies information contained in the subtle phase dis-coordination that precede seizure-related voltage discharges.
Our results generally parallel epilepsy models that stress a break down of network coordination (Kramer & Cash 2012), resulting in local high-frequency oscillations (HFOs). The PLL network also provides a mechanistic framework for the generation of HFOs and seizure activity. A PLL locks to phases by increasing the frequency of its VCO to “catch up” to phase advanced signals. When one PLL in the system overshoots, the other PLLs must then speed up their frequencies to compensate. This produces a low-to-high-frequency cascade resulting in turbulence or a blowup. Some emerging high-density ECoG recording has observed similar network-level phenomena in animal epilepsy models (for example, see Viventi et al. 2013).
Future research to identify the specific interactions that produce these cascades can guide the development of prediction algorithms that classify ictal and interictal periods (i.e., detection of seizure activity) using a sequential detection test (Wald, 1947). The mostly obvious test statistic to use would be the cumulative sum of log-likelihood ratios (Page, 1954) of the ictal to inter-ictal phases. A sequential detection task has the advantage of being implemented in real-time for online detection of seizure activity. In addition, while the measures reported here focus on seizure activity present across all electrodes, future research could productively explore localization of electrode sites responsible for generating and propagating seizure activity within the network based on entropy measures at those sites. In addition, simulating these interactions within an ENE can provide a test-bed for stimulation protocols to disrupt HFO cascades and suggest possible treatments to reduce the frequency and severity of seizures.
Acknowledgments
The Authors were supported during this work in part by National Institute on Mental Health RO1 award MH062500-12, the NSF IGERT 0903622, College of Engineering, Coordinated Science Laboratory, and Advanced Digital Science Center (Illinois at Singapore).
Footnotes
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.



