{'fraction_non_alphanumeric': 0.03541233541233541, 'fraction_numerical': 0.026264726264726264, 'mean_word_length': 4.818951612903226, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Exploring differences between left and right hand motor imagery via spatio-temporal EEG microstate

Abstract EEG-based motor imagery is very useful in brain-computer interface. How to identify the imaging movement is still being researched. Electroencephalography (EEG) microstates reflect the spatial configuration of quasi-stable electrical potential topographies. Different microstates represent different brain functions. In this paper, microstate method was used to process the EEG-based motor imagery to obtain microstate. The single-trial EEG microstate sequences differences between two motor imagery tasks – imagination of left and right hand movement were investigated. The microstate parameters - duration, time coverage and occurrence per second as well as the transition probability of the microstate sequences were obtained with spatio-temporal microstate analysis. The results were shown significant differences (P < 0.05) with paired t-test between the two tasks. Then these microstate parameters were used as features and a linear support vector machine (SVM) was utilized to classify the two tasks with mean accuracy 89.17%, superior performance compared to the other methods. These indicate that the microstate can be a promising feature to improve the performance of the brain-computer interface classification.


Introduction
There has been an increasing interest in the research of human brain during different types of motor imagery [1][2][3], as well as EEG-based motor imagery [4,5]. These researches not only provided deep insights to human brain function, but also laid the foundation of brain-computer interface (BCI) technology which has been a new method for human machine interaction [5]. EEG-based motor imagery was widely used, because it provides high temporal resolution in milliseconds [6]. EEG microstate analysis treats multichannel EEG as a series of momentary quasi-stable scalp electric potential topographies [6]. These quasi-stable potential topographies are referred to as microstates [7]. So brain electrical activity could be modeled as being composed of a time sequence of non-overlapping microstates [6,8]. This method could be utilized to reduce the recorded multichannel EEG signals to a sequence of prototypical topographical maps, which could capture important spatio-temporal properties of the signal [9,10]. A number of studies applied EEG microstate analysis have been reported in schizophrenia [11][12][13][14], panic [15], depression [16], sleep [17], personality [18] and Alzheimer's disease [19]. However, few study analyzed EEG-based motor imagery microstate.
In this paper, the multichannel EEG-based motor imagery of left and right hand movement imagination were processed by EEG microstate analysis which could extract rich information in both temporal and spatial domains. The microstate sequences of left and right hand motor imagery were compared across the average of 9 subjects. The aim of the research was to reveal the differences between different brain activities related to left and right hand motor imagery. This could provide a new spatial-temporal feature for BCI classification.

Data description
The EEG data used in this paper were datasets 2a from BCI Competition IV [20]. The data were recorded from 9 healthy subjects, each subject performed 6 sets of experiments. Each set consists of 48 trials (12 of imaging left hand movement, 12 for the right, 12 for both feet and 12 for tongue), a total of 144 trials per subject. The data were sampled with 250 Hz, bandpass-filtered between 0.5 Hz and 100 Hz and recorded by 22 electrodes, left mastoid as reference and the right mastoid as ground. In this paper, only 24 trials (12 of left hand movement and 12 of the right) were used in each set.

Data pre-processing
EEG Data were imported into MATLAB for preprocessing. ICA (EEGLAB toolbox version 13 b) was used to eliminate eye movement artifacts and other noise by most conservative criteria. Then the data were averaged re-referenced and bandpass filtered to [8][9][10][11][12][13][14][15] Hz which mainly focused on the mu rhythm range of motor imagery [4]. Finally, the artifact-free data were imported to CARTOOL [9] for the microstate analysis.

EEG spatio-temporal microstate analysis
A similar methodology in literature [15] was used to obtain the microstates. In this strategy (Figure 1), multichannel EEG signals of left and right hand motor imagery from all subjects were transformed into a series of momentary potential topographies at Global Field Power (GFP) peaks that highest signal-to-noise ratio (SNR) could be reached [9,10], as shown in Figure 1(A).
Then the original maps were processed by a modified spatial cluster analysis method known as the topographical atomize-agglomerate hierarchical clustering (TAAHC) [6] to get microstate classes, as shown in Figure 1(B). In TAAHC, four classes of microstate topography were used, because this number of classes nearly maximized the common variance over 9 subjects using a cross validation criterion in our data and this number has previously been found to be optimal [6,10,[22][23]. Using the clustered four microstate maps as templates, entire data were assigned to one of the 4 microstate classes according to maximal spatial correlation to the four microstate maps, as shown in Figure 1(C). Using this methodology, every single-trial multichannel data were transformed to microstate sequences. There were about 75 microstates in a single trial data.
To compare the single-trial EEG microstate differences between two motor imagery tasksimagination of left and right hand movement, four microstate parameters were computed.

Results
Each subject performed 144 trials (72 for the left hand motor imagery while 72 for the right hand), and 9 subjects performed a total 1296 trials (648 for the left while 648 for the right). For the parameters of microstate time series of all subjects between the two tasks, significant differences were tested with paired t-test. While P < 0.05, there is significance of difference. Mean and standard deviation (SD) of microstate parameters (mean duration, time coverage ratio, and occurrence per second) for the two task as well as t-tests for group differences were shown in Table 1. One can find that microstate class 3 and class 4 showed significant differences of duration, occurrence and coverage between them.
For transition probability between the two tasks, Mean and SD for each task as well as t-tests for group differences was shown in Table 2. The result showed significant differences on transition probability of the one microstate to other states in left-hand motor imagery compared to right-hand (P < 0.05), except for the transition probability from class 1 to class 2 and from class 2 to class 1.

Differences in mean duration
As shown in Figure 2, individually, the duration of microstate class 3 was prominently longer in right compared to left, and is parallel to the mean values across all subjects (mean 42.315 ms in left and 57.579 ms in right). For microstate class 4, the situation was just on the contrary with higher mean in left (54.153 ms) than in right (41.470 ms).

Differences in occurrence per second
As shown in Figure 3, microstate class 3 was observed with a mean frequency of 9.318 times per second in right, while would be reduced to 7.525 times per second in left; But microstate class 4 tend to have more occurrence in left (mean 9.071) than in right (mean 6.858).

Differences in time coverage ratio
As shown in Figure 4, the time coverage ratio of microstate class 3, not only within subject but also on the average level, is higher in right than in left (mean 53.208% and 31.895% respectively) too. On the contrary, TCR of microstate #4 is higher in left than in right (mean 48.857% and 28.531% respectively).

Transition probability between different microstates
From microstate class 1 to other microstates: As shown in Figure 5, in left, TP from microstate 1 to 4 is the highest (mean 61.486%); But in right, TP from microstate class 1 to class 3 is the highest (mean  The mean and SD of the transition probability between different microstate classes for two tasks as well as tests for group differents (unpaired t-test). Bold values indicated P < 0.05.   72.479%). The difference demonstrates that microstate class 1 is more likely to transfer to state class 4 in left but more likely to transfer to state class 3 in right.
From microstate class 2 to other microstates: As shown in Figure 6, For microstate class 2, as the case with microstate class 1 is more likely to transfer to state 4 in left (highest mean 59.682%) but more likely to transfer to state 3 in right (highest mean 72.565%).
From microstate class 3 to other microstates: As shown in Figure 7, whether in left or right, microstate class 3 is more likely to transfer to state 4, but with a higher mean value in left (81.739%) than in right (64.462%). Meanwhile, the decreased probability from 3 to 4 brought on an increased probability to 1 and 2 in right(mean 11.812% and 6.449% respectively) compared to left (mean 23.249% and 12.289% respectively).
From microstate class 4 to other microstates: As shown in Figure 8, differences in TP from microstate class 4 to other states between the two tasks were the opposite of those found in microstate 3. the decreased probability from state 4 to 3 (from 87.488% in right decreased to 63.317% in left) brought on an increased probability to 1 and 2 in left (mean 20.438% and 12.245% respectively) compared to right(mean 8.242% and 4.270% respectively).

Classification validation
Based on differences in microstate parameters between the two tasks, a linear kernel support vector machine (SVM) was used for the two tasks. The selected microstate parameter: MD, TCR, OPS of microstate class 3 and class 4, as well as TP of the  one microstate to other microstates, except for the transition probability from class 1 to class 2 and from class 2 to class 1, were used as features for classification.
The performance of this classifier was estimated using a 10-fold cross-validation over the training data (288 trials, 144 for the left hand motor imagery while 144 for the right hand). Accuracy of the classification achieved 95.7%.
Then, this classifier was tested with 720 trials, 360 for each task. Because previous researchers have used several latest methods to classify the same data [24], we present their classification accuracy and compared with ours (microstate is short for microstate method). From Table 3, microstate method has not only a higher mean accuracy but also a smaller SD (Standard Deviation), i.e. has a higher stability.

Kernel function effects for SVM
In this study, different kernel functions of SVM were compared. Linear kernel, j x; x i ð Þ ¼ x T x i þ c; polynomial kernel, jðx; x i Þ ¼ ðx T x i þ cÞ l ; and radial basis function (RBF) kernel jðx; x i Þ ¼ expðÀ ||xÀx i || 2 2r 2 Þ were employed, where c was an optional constant, l was the degree of polynomial and r controlled the width of RBF function. The receiver operation characteristic (ROC) curve were computed, which showed the relationship between the true positive rate (sensitivity) and false positive rate (1 À specificity) for all possible threshold values. A ROC curve with an area of 1 indicated perfect classification performance where the sensitivity and specificity were both equal to one for all  threshold values. Figure 9 shows the ROC curves of the SVM classifier that identified the two tasks of motor imagery with the linear, polynomial and RBF kernel functions. As one can see from Figure 9, the linear kernel function performs best classification AUC (Area Under the Curve) 0.92 compared to the RBF AUC ¼ 0.87 and polynomial AUC ¼ 0.90 kernel functions.

Microstate clustering methods
Microstate class templates could be computed using TAAHC and k-means. In [25], they found that TAAHC and k-means clustering both give results with excellent test-retest reliability. The maps derived using both methods are highly similar. So, only TAAHC method as implemented by the CARTOOL was used in this study.

EEG rhythm
The ongoing brain electric activity of left-hand and right-hand motor imagery was transformed into temporal microstates of 4 classes that are distinguished by their different spatial distributions of electrical potential topography. So, the microstate parameters reflect the brain state difference between left-hand and righthand motor imagery. Unlike the visual alpha rhythm, mu rhythm is away from visual impact, and can be changed by the activity of movement, movement preparation or imagery movement. Several studies have demonstrated that not only actual hand movement but also movement imagery leads to an energy change in the mu (8-13 Hz) and beta (13-28 Hz) rhythm known as event-related (de-)synchronization (ERD/ERS) [4]. Microstates represent quasi-stable field topographies. Different motor imagery tasks have different effect on mu rhythm activity, so changes in brain mu rhythm activity in principle can alter microstate parameters. In our study, mu rhythm EEG microstates were focused. The significant differences have been found in microstate parameters between left-hand and right-hand motor imagery. The results further indicate that those four classes microstates that were extracted from motor imagery EEG truly reflect the temporal and spatial features of brain in  these two activities. It appears that continuous brain electric activity is composed of a concatenation of building blocks. These building blocks can be represented by EEG microstates, which are defined by their quasi-stable potential landforms and reflect different modes, contents or steps of information processing [26].

Conclusion
In this paper, the single-trial EEG microstate differences between two motor imagery tasksimagination of left and right hand movement were analyzed. The microstate parameters -duration, time coverage and occurrence per second as well as the transition probability of the microstate sequences were shown significant differences. Based on differences in microstate parameters between the two tasks, a linear SVM were used to classify the two tasks. The classification results demonstrate that the microstate parameters of left and right motor imagery was different and could be used as features to classify which could greatly improve the performance.