Department of Computer Science, University of Texas at San Antonio, San Antonio, TX 78249, USA

Human Research and Engineering Directorate, US Army Research Laboratory, Aberdeen Proving Ground, Aberdeen, MD 21005, USA

Abstract

Background

Rhythmic oscillatory activity is widely observed during a variety of subject behaviors and is believed to play a central role in information processing and control. A classic example of rhythmic activity is

Methods

In this work we propose modeling the alpha band EEG time series using discounted autoregressive (DAR) modeling. The DAR model uses a discounting rate to weigh points measured further in the past less heavily than points more recently observed. This model is used together with predictive loss scoring to identify periods of EEG data that are statistically significant.

Results

Our algorithm accurately captures changes in the statistical properties of the alpha frequency band. These statistical changes are highly correlated with alpha spindle occurrences and form a reliable measure for detecting alpha spindles in EEG. We achieve approximately 95% accuracy in detecting alpha spindles, with timing precision to within approximately 150 ms, for two datasets from an experiment of prolonged simulated driving, as well as in simulated EEG. Sensitivity and specificity values are above 0.9, and in many cases are above 0.95, for our analysis.

Conclusion

Modeling the alpha band EEG using discounted AR models provides an efficient method for detecting oscillatory alpha activity in EEG. The method is based on statistical principles and can generally be applied to detect rhythmic activity in any frequency band or brain region.

Background

Alpha waves ([8, 13] Hz) were among the earliest described functional oscillatory components in the human EEG

A widely-studied characteristic of the alpha frequency band is the

Recently, Simon et al.

The goal of this work is to develop an efficient algorithm to reliably detect sudden increases of narrowband oscillatory EEG activity with good temporal resolution. Our motivating example for the development of this algorithm is detecting alpha spindles in EEG. We hypothesize that alpha spindles in EEG represent a changes in the underlying neural dynamics that can be characterized and identified by their statistical properties. To detect these changes, we propose a method that is based on

Since EEG signals are highly dynamic, we develop a change-point detection algorithm based on

We apply our SDAR algorithm together with predictive loss scoring to identify time periods in the alpha frequency range of EEG where the time-dependent DAR model cannot adequately describe future data points (periods of high loss scores) and correlate these time periods with alpha spindles in EEG. The model parameters, such as the time-varying AR model coefficients and the model variance, can be used for further analysis of these time periods. We demonstrate the efficacy of this approach both for simulated data as well as for expert-labeled EEG data from simulated driving tasks.

Methods

Sequential discounted AR algorithm (SDAR)

Autoregressive models (AR) represent each data point as a linear combination of a certain number (the model order) of previous data points. Discounted AR models assume that data points observed further in the past contribute less information than points more recently observed. An algorithm for the sequential computation of the DAR model parameters was proposed in

First, we give a description of the standard autoregressive model. Suppose _{
t
} is a zero-mean time series vector of length

where the _{
i
}, _{
t
} is normally distributed noise with mean 0 and variance ^{2}, i.e., ^{2}). The temporal dynamics of the time series are described by the model coefficients _{1}, …, _{
p
}, ^{2}). The model structure given above implies that _{
t
}|_{
t − 1},.., _{
t − p
}, ^{2}):

where

The log-likelihood function for the AR(

This procedure is equivalent to minimizing the sum of squared errors for linear Gaussian models:

where _{1},…,_{
p
})^{T} and ^{2} can be estimated in a similar fashion

Discounted autoregressive models instead minimize:

where ^{
t-i
}. This model has been used previously in the analysis of time series signals in information network security

Using the DAR model, Urabe et al.

Here we define the SDAR algorithm (using the notation from _{
t
} be the data point observed at time

1. Initialization of parameters at

2. Update the model parameters at time

3. Update the mean _{
t
} and variance

4. Calculate the quadratic loss score _{
t
} by comparing the current data point to the mean of the Gaussian distribution updated in Step 3:

5. Repeat Steps 2–4 until the end of the time series at

In Step 1 we initialize the parameters at time _{
p
} denotes a _{
t
} and

In Step 2 we update the DAR parameters _{
t
} given the new data point _{
t
}. Step 3 updates the mean and variance of the Gaussian distribution using the newly estimated DAR model parameters. Step 4 calculates a quadratic loss score by comparing the data point to the mean of the Gaussian distribution at the current time. Steps 2–4 are repeated until the end of the recording at

Alpha spindles in EEG are identified by thresholding the smoothed loss score time series. We find the optimal threshold value by maximizing a weighted F-measure given as:

where

We calculate the True Positive (TP), False Positive (FP), and False Negative (FN) rates by comparing the alpha spindle time regions identified by an expert with those marked by the SDAR algorithm as having a smoothed loss score that exceeds the specified threshold. We use the weighted F-measure to take into account the highly unbalanced nature of the data, as alpha spindles occurred less than 1% of the total time.

To compute a direct time comparison between expert labeling and regions marked by the SDAR algorithm as exceeding the threshold, we use the compareLabels function from the DETECT Toolbox

An illustration of the comparison algorithm for comparing two labeled data sets

**An illustration of the comparison algorithm for comparing two labeled data sets.** There are 4 possible decisions: NA (Null Agreement), FN (False Negative), FP (False Positive) and Agreement. An optional parameter, the fuzzy window time (shown in green), can be used to account for small timing errors in the comparison.

We report the hit rate (HR) of the algorithm, which is the number of times the algorithm identified a region that was also identified by the expert, regardless of the timing precision in the detected regions. We also report the Spindle Temporal Error (STE) as the ratio of the total time in the False Negative state to the total number of alpha spindles. This gives a summary of the temporal localization of the detected spindles.

If more than one EEG channel is modeled, the SDAR algorithm uses a voting strategy that only selects a time region if a certain percentage of the overall number of channels identified the same time region. This strategy reduces the impact of isolated outliers that may exist only in one EEG channel. We use a voting threshold of 33% (1/3) for analyzing all the parietal/occipital EEG channels. More or less stringent strategies can be used by changing the voting percentage required for identifying significant time regions. Detected alpha spindle regions separated by less than 250 ms were merged together to form a single alpha spindle. Since the literature suggests that alpha spindle duration is generally between 500 ms and 2 s, isolated alpha spindle regions shorter than 250 ms were removed from the data

SDAR model simulation study

We conducted a series of simulation studies to verify the SDAR algorithm performance in tracking model changes in time series. In these studies, an AR(2) process was simulated with varying degrees of change. In the first study, we simulated an AR(2) process where the AR coefficients changed at a known time point. The first model (Model 1) was simulated according to:

The noise variance was set to 1 so _{t} ~ _{1,t} ~ _{2,t} ~

In both simulations, the DAR model order was set to 2, and the discounting rate was set to

Alpha spindle simulation study using DipoleSimulator

In another simulation study, we simulated EEG data using DipoleSimulator (BESA Tools version 3.3.0.4, MEGIS Software GmbH, Gräfelfing, Germany). DipoleSimulator allows the user to simulate EEG data from user-specified dipole characteristics and locations. Given the location and direction of the dipoles, DipoleSimulator simulates electrical activity that propagates through the scalp and skull. A graphical representation of our simulation is shown in Figure

Alpha spindle simulation results

**Alpha spindle simulation results. ****(A)** A screen capture of the DipoleSimulator software program for simulating EEG activity. **(B)** The simulated EEG activity, with the Y-axis denoting the channel locations, ordered left to right hemisphere, frontal to occipital.

To analyze the performance of the algorithm, we changed the signal-to-noise ratio (SNR) by changing the amplitude factor of the alpha spindle dipoles. For example, an amplitude factor of 6 means the SNR is 2 (6/3). We simulated the alpha spindles at SNR ratios of 1, 1.3, 1.6, 2 and 3 (corresponding to amplitude factors of 3, 4, 5, 6 and 9, respectively). ROC and F-measure analyses were performed for each SNR value.

The simulated EEG data was sampled at 300 Hz. The data was subsequently down-sampled to 128 Hz and band-pass filtered at [6, 15] Hz using an order 8 Butterworth filter prior to analysis. An EEG electrode mosaic with 33 channels was used for simulating the data, with a channel orientation following the international 10–10 system of electrode placement. We applied the SDAR algorithm with model order 1 and discounting rate

EEG data collection and processing

To test the efficacy of the algorithm, we applied the algorithm to two fatigue-related driving simulator datasets (Driving Data 1 and Driving Data 2) recorded from two neurologically intact, healthy, adult, right-handed and right-eye-dominant males that had been previously labeled by an expert. The two subjects had at least 10 years of driving experience prior to data collection. Informed written consent was obtained as required by the US Army Federal Regulations

Example data from experimental protocol

**Example data from experimental protocol. ****(A)** A screen capture of the simulated driving environment. **(B)** An example of an alpha spindle event in an EEG dataset, with the Y-axis denoting the channel locations in the EEG data set.

The EEG was recorded using a 64-channel Biosemi ActiveTwo system, and offline referenced to the average of the two mastoids. Four external channels were used to record eye movements by EOG, although EOG data was not analyzed in this study. The experiment was originally sampled at 2048 Hz and then subsequently down-sampled to 128 Hz. Figure

EEG signal preprocessing for expert identification of alpha spindles

An expert with more than 10 years of EEG processing experience visually identified and marked alpha spindle events in the EEG data. Recent literature has suggested that alpha spindling occurring in the parietal and occipital regions of the brain is related to fatigue in experiments of prolonged driving

EEG signal preprocessing for the SDAR algorithm

The data was processed in EEGLAB

Results

SDAR model simulation results

Our first analysis verifies SDAR algorithm performance in tracking changes in underlying AR model parameters. A plot of the results of the simulation for Model 1 is shown in Figure

AR Model 1 Simulation Results

**AR model 1 simulation results. ****(A)** A plot of the simulated AR(2) signal for the time range [1900, 2100] for readability. Blue = original signal, Red = estimated signal, Dashed vertical line: time of the change point at **(B)** The plot of the estimated AR(2) coefficients over-plotted with the known true value of the AR(2) coefficients. **(C)** The plot of the estimated variance ^{2} over-plotted with the known true value of the variance.

The results for the simulation of Model 2 are shown in Figure

AR Model 2 Simulation Results

**AR model 2 simulation results. ****(A)** A plot of the simulated AR(2) signal for the time range [1900, 2100] for readability. Blue = original signal, Red = estimated signal, Dashed vertical line: time of the change point at **(B)** The plot of the estimated AR(2) coefficients over-plotted with the known true value of the AR(2) coefficients. **(C)** The plot of the estimated variance ^{2} over-plotted with the known true value of the variance.

Simulated alpha spindle detection performance

Figure

Alpha Spindle Detection Performance on Simulated Data

**Alpha spindle detection performance on simulated data. ****(A)** Plot of the ROC curves for each of five different SNR values at **(B)** Plot of the F-measure versus the SNR.

Alpha spindle detection in real EEG data

We then analyzed the two datasets obtained from the simulated driving experiment (see Methods). These datasets are referred to as Driving Data 1 and Driving Data 2, respectively. We use an order 1 SDAR model with discounting rate

**Analysis of SDAR Model Order Performance.**

Click here for file

Results of the analysis are shown in Table

**Full data**

**Training data**

**Testing data**

A fuzzy window parameter of 0 s was used.

.915

.895

.863

.966

.966

.984

.536

.612

.581

97.87% (138/141)

100% (96/96)

93.33% (42/45)

~96 ms

~120 ms

~150 ms

146.430 s

98.617 s

43.055 s

3591.156 s

1762.414 s

1861.141 s

13.586 s

11.531 s

6.813 s

126.828 s

62.445 s

31.000 s

Note that a fuzzy window parameter of 0 s indicates that very minor differences in labeled regions will count negatively against the performance of the algorithm. It is unrealistic in practice to assume an exact temporal agreement between an expert and the algorithm, or even among two different experts. Incorporating an allowable timing error in the comparison can produce a more appropriate comparison.

When using a fuzzy window parameter of 100 ms (meaning errors less than 100 ms before or after the events are treated as agreements), the performance of the algorithm significantly increases (Table

Alpha Spindle Detection Performance on Real Data

**Alpha spindle detection performance on real data. ****(A)** Plot of the ROC curve for the alpha spindle detection algorithm for the Full Data and Training Data of Driving Data 1 using a fuzzy window parameter of 100 ms. **(B)** The corresponding modified F-measure plot for the ROC curves shown in **(A)**.

**Full data**

**Training data**

**Testing data**

**
Data 1
**

**
Data 2
**

**
Data 1
**

**
Data 2
**

**
Data 1
**

**
Data 2
**

A fuzzy window parameter of 0.1 s was used.

.957

.876

.959

.914

.952

.904

.981

.964

.974

.958

.989

.934

.704

.620

.706

.660

.701

.400

97.16% (137/141)

94.36% (184/195)

100% (96/96)

95.38% (124/130)

91.11% (41/45)

93.85% (61/65)

~52 ms

~114 ms

~50 ms

~77 ms

~40 ms

~96 ms

165.422 s

157.008 s

114.539 s

106.688 s

50.833 s

59.047 s

3635.516 s

2584.453 s

1167.875 s

1257.414 s

1866.859 s

1275.273 s

7.438 s

22.195 s

4.875 s

9.984 s

2.563 s

6.273 s

69.625 s

96.344 s

47.720 s

54.922 s

21.703 s

89.414 s

An example detection in the testing data of Driving Data 1 is shown in Figure

A plot comparing expert-labeled alpha spindles with alpha spindles labeled by the SDAR algorithm

**A plot comparing expert-labeled alpha spindles with alpha spindles labeled by the SDAR algorithm.** The algorithmic labelings are shown in light blue, while the start and end event codes (in green and red, respectively) denote the expert-labeled regions. (Top). An example where the algorithm labels a slightly narrower region as alpha spindle when compared to the expert. This minor timing difference will generate False Negative errors if no fuzzy window parameter is used. (Bottom). An example where the algorithm over-estimates the alpha-spindle region. This will generate False Positive errors, which can be accounted for if a fuzzy window parameter is used.

Comparison with other alpha spindle detection measures

Previously, Simon et al.

where

where _{
i
},_{
i
} is the pair of fitted and observed values of the ASD, respectively. An example for a time segment with an alpha spindle is shown in Figure

An illustration of the technique used in

**An illustration of the technique used in ****for detecting alpha spindles in EEG.** The blue curve is the Amplitude Spectral Density (ASD), the red is the exponential fit to the data, and the black line is the full-width at half maximum (FWHM) of the peak amplitude.

We compare the ASD and SDAR approaches for Driving Data 1. In order to compare SDAR with ASD, we applied the ASD algorithm as follows. For the ASD algorithm we processed the data according to the procedure used in

The results of the comparison are shown in Table

**SDAR**

**ASD algorithm without ICA**

**ASD algorithm with ICA**

A fuzzy window parameter of 0.1 s was used.

.942

.607

.529

.984

.728

.909

.728

.094

.209

97.16% (137/141)

78.72% (111/141)

66.67% (94/141)

~150 ms

~478 ms

~560 ms

157.008 s

104.063 s

88.961 s

3584.453 s

2700.063 s

3373.461 s

22.195 s

67.320 s

79.359 s

96.344 s

1006.555 s

336.359 s

Discussion

In this paper we propose an efficient method for detecting large narrowband increases in oscillatory EEG activity using change point detection methods based on discounted autoregressive models. This technique was applied to the alpha frequency range where the goal of the method was to detect alpha spindling activity and to estimate features of the alpha spindling such as the spindle rate and temporal localization. Our results show that this approach successfully identifies alpha spindles in EEG time series with good time resolution, allowing for the possibility of using characteristics such as alpha spindle frequency and duration as features for other types of modeling approaches, including state classification, fatigue monitoring, and performance prediction.

Early work using change point detection models for EEG data analysis was done by Brodsky et al.

There are some differences in processing between our SDAR method and the ASD method proposed by Simon et al.

The SDAR approach sequentially calculates a quadratic loss score at each time point and uses this score function to identify irregular periods in the data. We obtain an effective time resolution equal to the window size of our temporal smoothing function. One possible disadvantage of our approach is that it requires

One important parameter of the SDAR model is the discounting rate,

Previous research in autoregressive modeling of EEG data has shown that large model orders are needed to estimate the underlying dynamics of the EEG signal. For example,

Several techniques have been proposed for detecting oscillatory activity in higher frequency bands. For example, a technique based on FFT analysis in the [80, 500] Hz frequency range was proposed in

Future applications

The SDAR algorithm is based on an adaptive statistical representation of the EEG time series and is not limited to alpha spindle detection in EEG. Results of our simulation study show that alpha spindles can be detected reasonably well if the spindle signal strength is at least 50% stronger than then the background noise signal (Figure

Other types of oscillatory activity could be modeled using our SDAR approach. For example, oscillatory activity in the theta range was analyzed by Cruikshank et al.

Our method requires an initial band-pass of the EEG data in a relevant frequency range of interest prior to analysis. For our analysis we band-passed the data at [6, 15] Hz for detecting alpha spindle oscillations in EEG. Since eye movement artifacts in EEG are generally in frequency ranges smaller than 6 Hz and artifacts from muscle movements are generally greater than 15 Hz, no additional artifact preprocessing is required. However, analysis of other brain regions may require additional preprocessing to remove artifacts prior to analysis. This is especially true for [3, 7] Hz theta oscillations, as eye movement artifacts will be more prevalent and pervasive when compared to the analysis of the alpha band. Analysis of the gamma frequency range will require removal of high frequency muscle activity as well as the removal of power-line noise (either at 50 or 60 Hz) prior to modeling by the SDAR algorithm.

Our primary goal of this work was the development of an algorithm for accurately identifying alpha spindles in EEG. We focused primarily on the parietal-occipital EEG channels as alpha spindles generally occur in these regions. However, this approach could be applied to analyze all the EEG channels simultaneously. In this way, the changes in the EEG could be correlated across brain regions, thus revealing additional features that can be useful for analysis. This is currently the topic of future research.

Recent advances in sensor technologies have enabled the non-invasive recording of neural activity in a variety of scenarios

Conclusion

In this work we showed that discounted autoregressive models can be used to model the alpha band EEG time series for detecting alpha spindle events in EEG. Our method is based on statistical principles and can generally be applied to detect rhythmic activity in any frequency band or brain region. As the algorithm is based on a time-adaptive statistical representation of the signal, it can account for slowly non-stationary behavior, making it an attractive model for EEG data analysis.

Authors’ contributions

Designed the software used in the analysis: VL, KAR. Conceived and designed the experiments: SK. Performed the experiments: SK. Analyzed the data: VL, SK, KAR. Wrote the paper: VL, SK, KAR. All authors read and approved the final manuscript.

Acknowledgments

The authors wish to thank W. David Hairston and Kaleb McDowell, both with the Army Research Laboratory, for helpful discussions, and DCS Corporation for the support and development of the experimental design used in this study. This research was sponsored by the Army Research Laboratory and was accomplished under Cooperative Agreement Number W911NF-10-2-0022. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Laboratory or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.