Abstract
Tracking spectral changes in neural signals, such as local field potentials (LFPs) and scalp or intracranial electroencephalograms (EEG, iEEG), is an important problem in early detection and prediction of seizures. Most approaches have focused on either parametric or nonparametric spectral estimation methods based on moving time windows. Here, we explore an adaptive (time-varying) parametric ARMA approach for tracking spectral changes in neural signals based on the fixed-interval Kalman smoother. We apply the method to seizure detection based on spectral features of intracortical LFPs recorded from a person with pharmacologically intractable focal epilepsy. We also devise and test an approach for real-time tracking of spectra based on the adaptive parametric method with the fixed-interval Kalman smoother. The order of ARMA models is determined via the AIC computed in moving time windows. We quantitatively demonstrate the advantages of using the adaptive parametric estimation method in seizure detection over nonparametric alternatives based exclusively on moving time windows. Overall, the adaptive parametric approach significantly improves the statistical separability of interictal and ictal epochs.
I. INTRODUCTION
Spectral power in several frequency bands have been used [1-5] as informative features for human and non-human epileptic seizure detection based on a variety of neural signals, including scalp electroencephalogram (EEG), intracranial EEG (iEEG), and local field potentials (LFPs).
There are mainly two approaches for spectral estimation: nonparametric and parametric. The nonparametric spectral estimation method is usually based on the tapered Fast Fourier Transform (FFT) or related methods such as wavelet transforms. On the other hand, the parametric or model-based approach assumes that measured time series are realizations of a given stochastic model specified by certain parameters. Examples of parametric approaches include autoregressive (AR) [6-9] and autoregressive moving-average (ARMA) models [10, 11]. Recently, adaptive time-varying AR or ARMA models based on the fixed-interval Kalman smoother have been applied to track nonstationarities in EEG and LFPs [10-12]. Those approaches led to several advantages in terms of improved signal-to-noise ratio (SNR) and higher spectral resolution when compared to traditional nonparametric moving time window approaches.
In this study, we apply the adaptive time-varying ARMA model based on the fixed-interval Kalman smoother to early detection of human epileptic seizures, and compare its performance with respect to a nonparametric approach based on moving time windows. The adaptive ARMA model is used to estimate interictal (between seizures, normal) and ictal (seizure) LFP-spectral features in several frequency bands. In addition, we propose an approach for real-time processing of the adaptive parametric spectral estimation with the fixed-interval Kalman smoother. Furthermore, we explore an approach for ARMA model order selection based on the Akaike’s Information Criterion (AIC) and moving time windows [6] in the context of early seizure detection.
II. METHODS
In this section, we briefly review the main setup for ARMA modeling and adaptive spectral estimation approach based on the Kalman smoother. We follow the formulation in [10, 11] and also address practical implementation issues for real-time applications and model order selection.
A. ARMA Modeling and State Space Representation
The LFP in a given channel at discrete time k, Zk, is represented by a time-varying ARMA (p, q) model
Equivalently, a linear discrete-time state-space representation can be formulated as
where the states
are the parameters to be tracked and are assumed to follow a random walk; the noise processes {Wk} and {ek} are uncorrelated and given by
and
B. Fixed-Interval Kalman Smoothing and Parametric Spectral Estimation
The fixed-interval Kalman smoother is an algorithm used to estimate optimal states over interior time points in a fixed time interval via the standard forward Kalman filtering and backward smoothing. See [10, 11] for more details on the mathematical setup for ARMA modeling with the fixed-interval Kalman smoother. Our Kalman smoother was initialized with and an SNR of . This low SNR reflects our assumption that the time-varying coefficients of the ARMA model change much slower than the observation noise process.
Once the coefficients of the ARMA model were estimated during a fixed-time interval, power spectral density was calculated according to [10, 11]
where Fsdenotes the sampling rate.
C. Practical Online Processing with the Fixed-Interval Kalman Smoother
Fixed-interval Kalman smoothing is inherently applicable to offline analysis only, because it requires complete measurements in the fixed-interval epoch for smoothing to be processed. Thus, for actual real-time processing, a scheme based on the fixed-lag smoothing is typically used [10, 11].
Here, we have instead modified the traditional fixed-interval Kalman smoothing in order to handle the scenario of a real-time application. Using 1-sec time-moving Hamming windows, Kalman smoothing was applied in each window; we treated each 1-sec window as a fixed-interval; last state estimates and covariance matrix of their estimation errors in one window were passed to the next window and used for initialization and fast convergence; and so on for the following windows. In each time window, we used the Rauch, Tung and Striebel (RTS) smoothing [13]. In what we refer to as pseudo-online analysis, we applied this modified fixed-interval Kalman smoothing method for real-time processing to the collected dataset.
D. ARMA Model Order Determination
The selection of model complexity or order is a critical issue, because the model should neither over-fit the signals by generating spurious poles and zeros nor under-fit them by neglecting important spectral details. Unfortunately, model order selection in EEG or LFPs is not a trivial issue due to the nature of these signals. For model order selection, we adopted the following approach [6]. We ran adaptive ARMA models with the Kalman smoother on fixed 1-sec intervals in offline analysis, and tried different model orders for each interval. For each interval, the model order (p,q) that minimized the Akaike’s Information Criterion (AIC) [11],
where is N is the number of samples in a window, was selected. Finally, the most typical model order (p,q) across all of the examined 1-sec fixed intervals was selected as the actual model order to be used across the entire dataset in the seizure detection analysis (see Results for more details).
E. Dataset Description
LFPs were recorded via a NeuroPort 96-microelectrode array (Blackrock Microsystems, Salt Lake City, UT USA) implanted in the temporal cortex of a 52-year-old woman, who mainly suffered from complex partial seizures. All the recordings and this study were performed with approval of Institutional Review Boards at local Partners Human Research Committee and Brown University, as well as with informed consent of the participant. For more details about descriptions of the participant and the implanted array, refer to the online method section in [14].
The dataset used in this study included 4 seizures and a corresponding 6-min-long period preceding each seizure event. Neural signals were recorded originally broadband (0.3 Hz – 7.5 kHz) and sampled at 30 kHz. LFPs examined here were extracted from the neural recordings through lowpass-filtering at 256 Hz and down-sampling to 1 kHz.
III. RESULTS
We evaluated the seizure detection performance of the parametric spectral estimation method based on the adaptive time-varying ARMA modeling with the fixed-interval Kalman smoother. We also compared its performance with a nonparametric approach based on the multitaper spectral estimator.
A. Model Order Determination
For practical implementation purposes in the seizure detection context, we searched for a fixed model order which can capture well LFP spectra during both interictal and ictal periods. 20-sec epochs before and after all of the 4 seizures were examined for determination of model order. We computed the AIC for various ARMA model orders (p, q) using 1-sec fixed intervals as described in Methods, and considered the following ranges p = 1, …, 40, and q = 1, …, 4 (see Figure 2). The most frequently chosen ARMA model orders were (p = 22, q = 2) for offline smoothing with complete measurements and (p = 28, q = 2) for the pseudo-online analysis.
Figure 2.
ARMA model order (p,q) selection using the Akaike’s information criterion. Top panel: model order estimation based on offline examination of 20-sec before and after the onset of a single seizure example. The chosen model order was (p=22,q=2). Middle and bottom panels: histograms of model orders selected in 1-sec time windows in offline smoothing analysis (middle) and in pseudo-online smoothing analysis (bottom). The most frequent model order in the analyzed epochs (including all 4 seizure events) was (p=22,q=2) in the offline analysis and (p=28,p=2) in the pseudo-online analysis. These most frequent model orders were used for further analysis of seizure detection.
B. Comparison of Spectrograms based on Nonparametric and Proposed Parametric Methods
We compared the seizure detection performance based on our proposed adaptive parametric approach and a nonparametric approach using the multitaper estimator ([15, 16]; Chronux software package [17]). Specifically, for the nonparametric estimation, we used 9 tapers and a time-bandwidth product equal to 5 in 1-sec non-overlapping moving time windows (see Figure 3). For the parametric estimation, we computed spectral power in 1-sec windows with averaged coefficients of ARMA models with the fixed-interval Kalman smoother in the corresponding time window.
Figure 3.
A representative LFP channel is shown in the top panel (seizure onset is at time zero). Corresponding spectrograms based on the nonparametric estimation with multitapers (2nd panel from the top) and on the (offline) adaptive parametric estimation with Kalman smoothing (3rd panel from the top) are shown. Broadband bursts in the nonparametric-based spectrogram, occurring prior to the seizure (white-dotted region), are smoothed out in the adaptive parametric estimation. Spectral features during the seizure (e.g. gray-dashed region) appear more distinctively as well. The pseudo-online adaptive parametric approach held these advantages as well (bottom). Power in dB.
Based on visual inspection of the spectrograms generated by these two approaches (Figure 3), we observed the following main differences. First, short and abrupt bursts in LFP power in epochs prior to seizures were smoothed out in the adaptive parametric estimation methods. Also, spectral changes around 20-60 Hz during ictal epochs, which were important discriminative features of epileptic seizures in the studied participant’s LFPs, became more distinct in the adaptive parametric approach. In addition, the pseudo-online approach with the fixed-interval Kalman smoother performed comparably to the offline analysis with the fixed-interval smoother, which cannot be directly applied to online applications.
C. Enhancement of the Separability between Interictal and Ictal Epochs (for Seizure Detection)
We used the Fisher’s linear discriminant (FLD) to assess the performance of the two spectral estimators in terms of seizure detection. FLD is a linear separability measure between samples in two groups defined as
where m1 and m2 correspond to the mean of groups 1 (interictal) and 2 (ictal), respectively, and and are the corresponding variances. The greater FLD is, the more linearly separable the two groups are [18].
TABLE I shows the FLD separability measures based on 100-sec interictal and 20-sec ictal LFP spectral features. Spectral power in 3 bands (0.3-10 Hz, 20-55 Hz, and 125-250 Hz) were previously determined as important discriminative features for the participant [19], and were used here in the separability analysis. Though there was a decrease in separability when only the 1st band was used, significant improvements with the adaptive parametric approaches were observed in all of the other cases, in particular with the 3 bands (one-tailed p-value < 0.01 and p-value < 0.05 in the offline and the pseudo-online analyses, respectively).
Table 1.
FISHER LINEAR DISCRIMINANT OF INTERICTAL AND ICTAL LFP SPECTRAL POWER FEATURES
Spectral bands | 1st seizure | 2nd seizure | 3rd seizure | 4th seizure | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
MT1 | KS2 | KS online3 |
MT | KS | KS online |
MT | KS | KS online |
MT | KS | KS online |
|
0.3-10Hz | 0.017 | 0.002 | 0.005 | 0.021 | 0.016 | 0.015 | 0.011 | 0.008 | 0.007 | 0.011 | 0.018 | 0.017 |
20-55Hz | 0.001 | 0.095 | 0.024 | 0.001 | 0.102 | 0.074 | 0.013 | 0.119 | 0.098 | 0.026 | 0.114 | 0.069 |
125-250Hz | 0.001 | 0.092 | 0.004 | 0.001 | 0.009 | 0.008 | 0.000 | 0.003 | 0.025 | 0.000 | 0.000 | 0.000 |
All bands | 0.019 | 0.144 | 0.036 | 0.021 | 0.140 | 0.124 | 0.033 | 0.122 | 0.115 | 0.051 | 0.136 | 0.117 |
Average with all bands (± std) |
0.031 ± 0.015 |
0.136 ± 0.010 |
0.098 ± 0.042 |
MT: spectral estimation using the multitaper method;
KS: ARMA modeling with the fixed-interval Kalman smoother in offline analysis;
KS online: pseudo-online ARMA modeling with the fixed-interval Kalman smoother(see text)
IV. DISCUSSION
We examined an adaptive parametric spectral estimation approach based on ARMA models and the fixed-interval Kalman smoother for seizure detection in a participant with pharmacologically intractable focal epilepsy. Spectral features of LFPs recorded from an intracortical microelectrode array were used for seizure detection. In addition, we extended the approach based on the fixed-interval Kalman smoother in [10, 11], which was limited to offline applications, to a real-time approach. We successfully demonstrated this extension with the pseudo-online seizure detection analysis. The advantages of the proposed adaptive parametric approach, including the improvement in separability of interictal and ictal epochs, may ultimately lead to better seizure detection schemes.
ARMA model order selection is a non-trivial task, especially when tracking highly nonstationary signals such as EEG, iEEG, and LFPs. Several criteria (cost functions) and approaches have been proposed: for example, the final prediction error (FPE) criterion [20] and Bayesian-based inference [21]. We adopted a practical approach for model order selection based on finding the most typical order (determined according to the AIC criterion) in non-overlapping time windows covering segments of interictal and ictal periods. Determination with the FPE criterion resulted in identical model orders in the pseudo-online analysis. Adaptive model order selection remains, nevertheless, an important issue especially in the context of real-time applications. We plan to examine further this issue in future studies.
We hope to assess the performance of the adaptive parametric spectral estimation approach described here in the context of seizure detection in larger datasets including seizures from multiple participants and hybrid neural signals (e.g. iEEG and LFPs). We also anticipate the application of the proposed approach in the context of brain-computer/machine-interfaces that use neural-signal spectral features for restoration of movement and communication in people with neurological disorders [22, 23].
Figure 1.
Outline of the adaptive time-varying ARMA modeling with the Kalman smoother.
ACKNOWLEDGMENT
The authors thank the participant in this study and nurses and physicians at MGH, and also thank Wasim Malik for his suggestions in the implementation of the Kalman smoother. Part of this research was conducted using computational resources and services at the Center for Computation and Visualization, Brown University. The contents do not represent the views of the Department of Veterans Affairs or the United States government.
This study was supported by: the National Institutes of Health (NIH) National Institute of Neurological Disorders and Stroke (NINDS) under Grant R01NS079533 (to WT), Grant K01NS057389 (to WT), and Grant R01NS062092 (to SSC); the Office of Research and Development, Rehabilitation R&D Service, Department of Veterans Affairs B6453R; the Doris Duke Charitable Foundation; the Massachusetts General Hospital Deane Institute; and a postdoctoral fellowship from the Epilepsy Foundation (to YSP).
REFERENCES
- 1.Shoeb A, Guttag J. Application of machine learning to epileptic seizure detection. Proc. of int. conf. on machine learning.2010. [Google Scholar]
- 2.Tzallas AT, Tsipouras MG, Fotiadis DI. Epileptic seizure detection in EEGs using time–frequency analysis. Information Technology in Biomedicine. 2009;13:703–710. doi: 10.1109/TITB.2009.2017939. IEEE Transactions on. [DOI] [PubMed] [Google Scholar]
- 3.Shoeb A, Carlson D, Panken E, Denison T. A micropower support vector machine based seizure detection architecture for embedded medical devices. in Conf Proc IEEE Eng Med Biol Soc; 2009. pp. 4202–5. [DOI] [PubMed] [Google Scholar]
- 4.Kharbouch A, Shoeb A, Guttag J, Cash SS. An algorithm for seizure onset detection using intracranial EEG. Epilepsy & Behavior. 2012;24:389. doi: 10.1016/j.yebeh.2011.08.031. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Park Y, Netoff T, Yang X, Parhi K. Seizure detection on/off system using rats' ECoG. Conf Proc IEEE Eng Med Biol Soc; San Diego, CA, USA. 2012. pp. 4688–4691. [DOI] [PubMed] [Google Scholar]
- 6.Pardey J, Roberts S, Tarassenko L. A review of parametric modelling techniques for EEG analysis. Med Eng Phys. 1996 Jan;18:2–11. doi: 10.1016/1350-4533(95)00024-0. [DOI] [PubMed] [Google Scholar]
- 7.Palaniappan R, Raveendran P, Nishida S, Saiwaki N. Autoregressive spectral analysis and model order selection criteria for EEG signals. TENCON 2000. Proceedings.2000. pp. 126–129. [Google Scholar]
- 8.Franaszczuk PJ, Blinowska KJ, Kowalczyk M. The application of parametric multichannel spectral estimates in the study of electrical brain activity. Biological Cybernetics. 51:239–247. doi: 10.1007/BF00337149. 1985/01/01 1985. [DOI] [PubMed] [Google Scholar]
- 9.Ding M, Bressler SL, Yang W, Liang H. Short-window spectral analysis of cortical event-related potentials by adaptive multivariate autoregressive modeling: data preprocessing, model validation, and variability assessment. Biological Cybernetics. 83:35–45. doi: 10.1007/s004229900137. 2000/06/01 2000. [DOI] [PubMed] [Google Scholar]
- 10.Tarvainen MP, Hiltunen JK, Ranta-aho PO, Karjalainen PA. Estimation of nonstationary EEG with Kalman smoother approach: an application to event-related synchronization (ERS) IEEE Trans Biomed Eng. 2004 Mar;51:516–24. doi: 10.1109/TBME.2003.821029. [DOI] [PubMed] [Google Scholar]
- 11.Tarvainen MP. 2004. Estimation methods for nonstationary biosignals. Ph.D., University of Kuopio. [Google Scholar]
- 12.Nguyen DP, Wilson MA, Brown EN, Barbieri R. Measuring instantaneous frequency of local field potential oscillations using the Kalman smoother. Journal of Neuroscience Methods. 2009;184:365. doi: 10.1016/j.jneumeth.2009.08.012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Simon D. Optimal state estimation Kalman, H [infinity] and nonlinear approaches. Wiley-Interscience; Hoboken, N.J.: 2006. [Google Scholar]
- 14.Truccolo W, Donoghue JA, Hochberg LR, Eskandar EN, Madsen JR, Anderson WS, Brown EN, Halgren E, Cash SS. Single-neuron dynamics in human focal epilepsy. Nature Neuroscience. 2011 May;14:635–U130. doi: 10.1038/nn.2782. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Mitra PP, Pesaran B. Analysis of dynamic brain imaging data. Biophys J. 1999 Feb;76:691–708. doi: 10.1016/S0006-3495(99)77236-X. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Percival DB, Walden AT. Spectral analysis for physical applications multitaper and conventional univariate techniques. Cambridge University Press; Cambridge ; New York, NY, USA: 1993. [Google Scholar]
- 17.Chronux Available: http://www.chronux.org/
- 18.Alpaydin E. Introduction to machine learning. 2nd MIT Press; Cambridge, Mass.: 2010. [Google Scholar]
- 19.Park YS, Hochberg LR, Eskandar EN, Cash SS, Truccolo W. presented at the Society for Neuroscience Annual Meeting. San Diego, CA: 2013. Early detection of human epileptic seizures using neocortical microelectrode array signals. [Google Scholar]
- 20.Akaike H. Fitting autoregressive models for prediction. Annals of the Institute of Statistical Mathematics. 21:243–247. 1969/12/01 1969. [Google Scholar]
- 21.Djuric PM, Kay SM. Order selection of autoregressive models. Signal Processing. 1992;40:2829–2833. IEEE Transactions on. [Google Scholar]
- 22.Bansal AK, Truccolo W, Vargas-Irwin CE, Donoghue JP. Decoding 3D reach and grasp from hybrid signals in motor and premotor cortices: spikes, multiunit activity, and local field potentials. J Neurophysiol. 2012 Mar;107:1337–1355. doi: 10.1152/jn.00781.2011. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Hochberg LR, Bacher D, Jarosiewicz B, Masse NY, Simeral JD, Vogel J, Haddadin S, Liu J, Cash SS, van der Smagt P, Donoghue JP. Reach and grasp by people with tetraplegia using a neurally controlled robotic arm. Nature. 2012 May 17;485:372–5. doi: 10.1038/nature11076. [DOI] [PMC free article] [PubMed] [Google Scholar]