Keywords

1 Introduction

In real-life situations, where humans organize and optimize their behaviors to deal with challenges in complex and ever-changing environments, their brain activities are inevitably nonstationary. Among a variety of biosignals, electroencephalography (EEG) has consistently exhibited neural correlates of human cognitions and has a high temporal resolution for characterizing the brain nonstationarity. However, more work is required to quantitatively measure the EEG nonstationarity and to investigate its relations with changes in human cognitive states and behaviors.

Previous EEG studies focused on time-frequency analyses of recordings from each scalp channel and found that changes of EEG band power correlated with brain states such as drowsiness levels [1, 2] under the assumptions that the number of underlying performance-related brain sources were fixed and their spatial locations were stationary. On the contrary, this study assumed that as the brain changes between alertness and drowsiness states, the active brain sources might vary significantly.

Recent studies [3, 4] proposed a nonstationarity index (NSI) based on an adaptive Independent Component Analysis (ICA) method for detecting changes of co-activated brain sources or electrode displacements. Instead of using the NSI to evaluate errors of the adaptive ICA model, this study proposed to use the NSI to continuously and quantitatively assess deviations of brain activities from a fixed ICA model of a known brain state. In addition, we hypothesized that this concept could be applied to ICA models trained with EEG data from multiple brain states and the resultant NSIs could measure deviations of brain activities from the corresponding brain states and together may provide insights into brain nonstationarity. This study also modified the NSI used in [3, 4] to effectively measure model errors while ICA was applied to the new data and to reduce false alarms caused by artifacts. This study tested the hypothesis with EEG data collected from eight healthy volunteers performing a sustained-attention driving task [2, 5], where the subjects’ brain states could be inferred by their behavioral performance.

2 Methods

2.1 Independent Component Analysis (ICA) Model

Standard ICA assumes a linear generative model, \( \varvec{x} = \varvec{As} \), where \( \varvec{x} \) is N-by-T measurements (N: number of channels, T: number of time samples), \( \varvec{s} \) is unknown N-by-T source activities, and \( \varvec{A} \) is an unknown N-by-N mixing matrix. The blind separation of \( \varvec{A} \) and \( \varvec{s} \) can be solved by maximizing independence between sources, and the Infomax ICA [6] with natural gradient [7] has been used for efficient optimization with a general learning rule:

$$ \varvec{W} \leftarrow \varvec{W} + \eta \left[ {\varvec{I} - \varvec{f}(\varvec{y}) \cdot \varvec{y}^{\varvec{T}} } \right]\varvec{W} $$
(1)

where \( \varvec{y} = \varvec{Ws} \), \( \varvec{W} \) is an “unmixing” matrix that ideally satisfies \( \varvec{WA} = \varvec{I} \) such that \( \varvec{y} = \varvec{s} \), \( \varvec{I} \) is an identify matrix, \( \eta \) is a learning rate, and \( \varvec{f} \) is a nonlinear function and is chosen differently across algorithms:

$$ \varvec{f}(\varvec{y}) = \left\{ {\begin{array}{*{20}l} {\left( {1 - e^{{ - \varvec{y}}} } \right)/\left( {1 + e^{{ - \varvec{y}}} } \right),} \hfill & {\text{Infomax ICA}} \hfill \\ {{ \tanh }\left( \varvec{y} \right) + \varvec{y}, } \hfill & {\text{Extended Infomax ICA}} \hfill \\ \end{array} } \right. $$

The nonlinear functions defined above are for separating supergaussian sources, where most of sources in EEG data are supergaussian-distributed [3]. The learning in Eq. (1) stops when \( \varvec{W} \) converges, i.e. \( \left\langle {\varvec{f} \cdot \varvec{y}^{\varvec{T}} } \right\rangle = \varvec{I} \), where \( \left\langle \cdot \right\rangle \) represents an average over a block of data.

2.2 The Nonstationarity Index (NSI)

Recent studies [3, 4] have proposed that, instead of using \( \left\langle {\varvec{f} \cdot \varvec{y}^{\varvec{T}} } \right\rangle \) as the ICA convergence criterion, this value could be a nonstationarity index that evaluates how well a model \( \varvec{W} \) fits new data. This index has been demonstrated to successfully detect abrupt electrode displacements [3] and changes of underlying sources [4] in simulated EEG data.

In this paper, instead of using the index to evaluate the performance of the adaptive ICA model described in [3, 4], we proposed to use the NSI to continuously and quantitatively assess deviations of brain activities from a fixed ICA model, \( \varvec{W}_{0} \), of a known brain state. Specifically, we learned the model from a small amount of training data, applied the model to test data, \( \varvec{x} \), in a sliding-window fashion, and computed a modified Nonstationarity Index (NSI):

$$ NSI = \frac{{\left\| {\left\langle {\varvec{f}_{\text{i}} \cdot \varvec{y}_{\text{j}}^{\text{T}} } \right\rangle_{{{\text{i}} \ne {\text{j}}}} } \right\|_{\text{F}} }}{{\left\| {\left\langle {\varvec{y} \cdot \varvec{y}^{\varvec{T}} } \right\rangle } \right\|_{\text{F}} }} $$
(2)

where \( \varvec{y} = \varvec{W}_{0} \varvec{x}, \) \( \left\langle {\varvec{f}_{\text{i}} \cdot {\mathbf{y}}_{\text{j}}^{\text{T}} } \right\rangle_{{{\text{i}} \ne {\text{j}}}} \) represents off-diagonal elements of \( \left\langle {\varvec{f} \cdot {\mathbf{y}}^{\text{T}} } \right\rangle \), and \( \left\| \cdot \right\|_{\text{F}} \) is the Frobenius norm. The numerator indicates the cross-talk errors of all sources in the model, \( \varvec{W}_{0} \), when it fits the test data, removing the contributions of individual sources (diagonal elements); the denominator represents the covariance of the source activities and is applied to reduce false alarms of NSI caused by high-amplitude artifacts. A low NSI indicates that the model fits test data well and both training and test data are arising from the same set of brain sources. On the other hand, a high NSI represents the model fails to fit test data and thus the brain state has “shifted away” from that of the training data. The proposed NSI illustrates better empirical results and intuition compared to the NSI defined in [3, 4].

3 Materials

3.1 The Sustained Attention Task and EEG Data Processing

This study used the EEG data collected from eight subjects performing a sustained-attention driving task, which were analyzed and reported in [2]. During the task, the subjects were immersed in a driving simulator, where they were presented with lane-departure events and were instructed to steer the car back to the cruising position quickly. The duration from the onset of a lane-departure event to the onset of their responses was defined as reaction time (RT), which has been reported to be associated with alertness level or vigilance state [2, 8] The experiment lasted for 90 min such that various alertness levels were observed.

For each subject, 30-channel EEG data were recorded, band-pass filtered to 1–50 Hz, and down-sampled to 250 Hz. Bad channels in the recordings such as flat channels (due to poor contacts of electrodes) and poorly correlated channels (with single-channel isolated noises) were removed and interpolated using the PREP pipeline [9]. Furthermore, an online-capable artifact removal method, artifact subspace reconstruction (ASR) [10], was applied to reduce the effects of high-amplitude artifacts. These artifact-reduction methods facilitated the convergence of an ICA model.

3.2 EEG Analysis I: Relations Between NSI and RT Across Subjects

For each subject, the first 3-min EEG data were used to train an ICA model (\( \varvec{W}_{0} \) in Eq. (1)) using the non-extended Infomax ICA implemented in EEGLAB [11]. It is worth noting that both the extended and non-extended Infomax ICA algorithms returned comparable results; we chose the one with less computational complexity. Principle Component Analysis (PCA) was applied before ICA to account for loss of data rank due to the removal of bad channels. The ICA model was then applied to the subsequent EEG data in a 30-s sliding window, and the NSI of the window was computed using Eq. (2) with \( f\left( y \right) = \left( {1 - e^{{ - \varvec{y}}} } \right)/\left( {1 + e^{{ - \varvec{y}}} } \right) \).

The lane-departure trials were divided into three groups based on their RTs: short-RT (top 20 % trials with the shortest RT), moderate-RT (the top 20 % to 80 % trials), and long-RT (the bottom 20 % trials) groups according to [2]. Choosing the uneven numbers of trials in each group was because the RTs in the session were not normally distributed and the majority of trials had moderate RTs around one second. The NSI of each trial was defined as the NSI of the 30-s window right before the onset of the lane-departure event. Finally, the NSIs of all trials were z-scored within each session to remove inter-session variability, and three groups of trials were separately pooled across all subjects. For each pooled group of trials, its NSI’s mean and standard error of mean were computed and two-sample unpaired t-test was performed to investigate the relations between the NSIs and the RTs.

3.3 EEG Analysis II: Comparisons of ICA Models and NSIs

To test the hypothesis that ICA models of different brain states and the resultant NSIs could measure deviations of brain activities from the corresponding brain states, we selected a typical subject who had significant fluctuations in RTs (local nonstationarity) through the session as an example. Under the assumption that behavioral performance (RT) reflects the subject’s brain states (alertness vs. drowsiness states), we learned three ICA models based on 3-min data from different periods of the session: (a) an initial model using the first three minutes of the experiment (the black block in Fig. 1), (b) a drowsiness model using the data between minutes 15–18 (the red block in Fig. 1) where RTs were long, and (c) an alertness model using the data between minutes 40–43 (the green block in Fig. 1) where RTs were short. The same analysis (e.g. computation of NSI and grouping of trials) described in Sect. 3.2 was applied to the data from the subject except that no z-scoring of NSI and pooling of trials were needed for a single subject.

Fig. 1.
figure 1

The single-trial reaction times (RTs) over a 95-min experiment of a subject performing a lane-departure task. In the first 5 min of the session, the subject stayed alert and the RTs were short; from minutes 5 to 20, the subject had increased RTs that indicated drowsiness; from minutes 20 to 55, the subject performed very well again and went back to alertness state; from minute 55 to the end of the session, the subject had intermittent performance. Three 3-min blocks of data, on which ICA models were trained, were shown in the colored regions: Model I (Initial) 0–3 min, black; Model D (Drowsiness) 15–18 min, red; Model A (alertness) 40–43 min, green. (Color figure online)

4 Results

4.1 Relations Between NSIs and RTs Across Subjects

Figure 2 shows that the z-scored NSI of the short-RT trials were significantly lower than that of the moderate-RT trials, and the NSI of the moderate-RT trials were significantly lower than that of the long-RT trials. This result might have been due to the fact that the ICA model used to compute the NSI was trained with the first 3-min of the data where the subjects were fairly alert, evident from short RTs in response to lane-deviations within this period. The model therefore fitted the EEG data in alertness, and low NSI values were found for short-RT trials. In contrast, the model did not fit the EEG activities in drowsiness and resulted in high NSI values in long-RT trials. In sum, higher NSI value was associated with higher RT, suggesting that NSI could assess the deviations of current brain activities from the model trained with the data from the first three minutes of the experiment.

Fig. 2.
figure 2

The nonstationarity index (NSI) of short-RT, moderate-RT and long-RT trials from eight subjects using individual initial models (trained with the first three minutes of the data in each session). The NSIs of all trials were z-scored within each session. The error bars show the within-group standard error of mean across all subjects. The significance levels between each two groups were computed by unpaired t-tests.

4.2 Comparisons of ICA Models and NSIs

Figure 3 shows the validity and comparisons of the three ICA models as described in Sect. 3.3 (cf. Fig. 1). The models trained with 3-min of 30-channel EEG data (\( 250 \times 60 \times 3 = 45{\text{k}} \) samples) using the Infomax ICA were able to converge to ICs that were comparable and consistent with previous findings in [8]. Firstly, all three models successfully identified occipital, parietal, motor, central, and frontal components reported in [2, 8]. Secondly, we found appreciable differences between resultant component scalp maps obtained by the three ICA models trained with data from different brain states.

Fig. 3.
figure 3

Scalp maps of the select ICs from the three ICA models: (a) Model initial, (b) Model drowsiness, and (c) Model alertness. Occipital, parietal, motor, central, and frontal ICs were manually identified and grouped for comparisons.

Figure 4 shows that both the initial model (Fig. 4a) and the alertness model (Fig. 4c) fitted the data of the short-RT trials well and resulted in lower NSI values than that of the moderate-RT trials; and the NSI values of the moderate-RT trials were significantly lower than that of the long-RT trials. On the other hand, the drowsiness model (Fig. 4b) fitted the data of the long-RT trials better and resulted in significantly lower NSI values than that of the moderate-RT and the short-RT trials.

Fig. 4.
figure 4

The nonstationarity index of short-RT, moderate-RT and long-RT trials of the subject using three ICA models (shown in Fig. 1): (a) Initial model, (b) Drowsiness model, and (c) Alertness model. The error bars show the standard deviation within trials in each group.

In summary, the NSI of the drowsiness model was negatively correlated with RT while that of the alertness model was positively correlated with RT. Since the initial and the alertness model were trained with data from short-RT trials (corresponding to an alertness state), when the subject became drowsy, the brain activities have significantly changed from the data used to train the alertness model, leading to higher NSI values. In contrast, the drowsiness model was trained with the data from long-RT trials (corresponding to a drowsiness state), and thus higher NSI values were observed when the subject returned to alertness because the brain activities have significantly changed from the data used to train the drowsiness model.

Furthermore, the alertness model induced more significant differences in the NSIs between long-RT and short-RT trials than the initial model did, suggesting that training with data from shorter-RT trials could result in a more accurate model for the alertness state and a more effective NSI in tracking the corresponding nonstationarity.

5 Discussion and Future Work

Study results showed that the proposed ICA model-based NSI could quantitatively measure deviations of brain activities from the ICA model of a known brain state, e.g. alertness or drowsiness states, and the deviations or model errors correlated with the subjects’ behavioral performance (RT) in the sustained-attention task. Furthermore, the NSIs based on multiple ICA models could all monitor the nonstationarity of the corresponding brain states. The results were comparable and consistent across eight subjects. These empirical results supported the hypothesis that brain nonstationarity can be modeled as changes of co-activated sources and their activities, and the proposed ICA model-based NSI can track this nonstationarity.

There is still room for improvement as the current NSI was still susceptible to EEG artifacts and the ICA model trained with the first three minutes of data was not yet optimal. Future work includes the development of new methods to improve the model performance and the robustness of the NSI to artifacts.

Finally, it is worth noting that the proposed approach is online-capable and can be used to track brain nonstationarity in near real-time, which enables many clinical and non-clinical applications that require continuous monitoring of the brain states.