{'fraction_non_alphanumeric': 0.03134515493462296, 'fraction_numerical': 0.01585169263836647, 'mean_word_length': 5.1390874106652005, 'pattern_counts': {'":': 0, '<': 0, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
RECURRENCE PLOT STRUCTURES REFLECT MOTOR-RELATED EEG PATTERN

Detection and classiﬁcation of motor-related brain patterns from non-invasive electroencephalograms (EEGs) is challenging due to their non-stationarity and low signal-to-noise ratio and requires using advanced mathe-matical approaches. Traditionally applied methods such as time-frequency analysis and spatial ﬁltering allow to quantify the main attribute of the motor-related brain activity – contralateral desynchronization of µ -band oscillations (8-13 Hz) in sensorimotor cortex – by measuring EEG signal’s amplitude, power spectral density, location etc. However, these features suffer from strong inter- and intra-subject variability. So, special attention is paid to the ﬁnding of stable features. In present paper, we inves-tigate application of the recurrence plots – robust mathe-matical tool for nonstationary data analysis – to explore properties of motor-related EEG samples. Our goal is to show that recurrence plots are sensitive to the changes in brain activity accessed from noninvasive EEG record-ings and may provide us a new context for interpretation of motor-related pattern in EEG.


Introduction
Detecting motor-related events using EEG signal is highly demanded in the area of brain-computer interfaces development for post-stroke rehabilitation and control of external devices. The progress made in this area allowed to connect motor action with certain phenomena occurring in bran activity, forming the idea of how motor task execution is reflected in human brain. The well-known attribute of the motor-related activity confirmed by the majority of studies is event-related desynchronization (ERD), which is manifested as a suppression of µ-band oscillations in sensorimotor area [Neuper et al., 2006;Pfurtscheller and Neuper, 1997]. Traditionally, ERD detection is done via time-frequency analysis [Wang et al., 2004;Ince et al., 2007;Maksimenko et al., 2018b] with the decrease of spectral power density as a classification criteria [Carrera-Leon et al., 2012;Xu and Song, 2008]. Besides, various methods were applied for this purpose including spatial filtering [Wang et al., 2006], detrended fluctuation analysis [Pavlov et al., 2018;Pavlov et al., 2019], clasterization methods [Chholak et al., 2019], and artificial intelligence [Sakhavi et al., 2015;Grubov et al., 2017;Maksimenko et al., 2018a].
However, there are inherent limitations of the mentioned approaches, such as the lack of inter-and intrasubjects robustness and the computational demands. For this reason, we introduce the approach which uses concept of recurrences to characterize complexity of the process via its signal analysis. In particular, we use recurrence plots (RPs), which is an efficient tool for visualization of repeating regimes in time series [Marwan et al., 2007]. Quantification of RP allows to interpret various dynamical regimes emerging in time series in terms of signal complexity and reveal new features of these time series. In particular, RPs were applied to biological data analysis [Hirata et al., 2016;Acharya et al., 2011;Acharya et al., 2013], seismic activity analysis [Lin et al., 2015;Chelidze and Matcharashvili, 2015], chemistry [Alves et al., 2017;Facchini et al., 2009], and were especially demanded in climate research [Deng et al., 2017;Feng and Dijkstra, 2017;García-Olivares and Herrero, 2013;Panagoulia and Vlahogianni, 2018].
In the current study, we apply RPs to the EEG time series associated with hands movements. In our opinion, lowering amplitude of EEG µ-band oscillations during motor action is also associated with less random behavior of corresponding EEG signal. In its turn, reduce of randomness in time series generates more adjacent trajectories in the phase space, which means the increase of recurrence rate. We show that measures of recurrence quantification analysis (RQA) are sensitive to transitions from random uncorrelated background EEG to motor task accomplishment, allowing to detect movement onset.

Experimental Dataset
In our research we used data obtained during the experiment on recording of EEG and EMG signals while performing actual movements with right and left hands. For this research we selected 10 participants using following criteria: aged 18-33, healthy, right-handed and not experienced in participating in similar experiments. During the experimental session, participants were sitting in a comfortable chair with both hands lying on armrests or on the table in the pose that allows to avoid any not task-related muscle tension. Experimental session started with 5 minutes of background activity recording, which corresponds to relaxing state of participant while listening to the classical music, without focusing on any particular thought. Then, the active stage started, which consisted of two type of tasks: 1. Squeezing the left hand into fist after first short signal, holding it squeezed until the second signal, and relax it after; 2. Squeezing the right hand into fist after first long signal, holding it squeezed until the second signal, and relax it after; Tasks were alternating randomly to avoid possible effects of adaptation, as well as distances between first and second signals within one task (4-5 seconds) and between the second signal of previous task and the first signal of next task (6-8 seconds). Finally, the experimental session ended with short period of rest. The scheme of the experimental procedure is illustrated on Fig. 1A.
During the experimental procedure, we recorded EEG signal using 9 Ag/AgCl electrodes located on the sensorimotor cortex according to the international "10-10" system of electrode application. According to recent studies  in present research we used C3 and C4 sensors as the most informative and reflecting contralateral properties of motor-related brain activity.
Before proceeding with RQA, we carried out a number of following preprocessing procedures. First, EMG from both hands were band-pass filtered in 10-100 Hz to capture high-frequency component of the signal associated with experimental task execution. EMG recording was necessary to capture exact moments of movement accomplishment. For further analysis, we used filtered EEG signal in the range 8-13 Hz to extract µ-rhythm component. Whole experimental recording lasting approximately 20 minutes was sliced on trials, each 18 seconds long, containing 6 seconds of baseline (background activity preceding the signal), and 12 seconds fully covering the motor task. The example of single trial timing can be seen on Fig. 1B.

Recurrence Plots
Recurrence plot (RP) is a powerful tool for visualization and numerical analysis of repeating states emerging in time series. State x i is considered as repeating, or recurrent, if it lies in some -neighborhood of x j in the reconstructed phase space. In other words, RPs are determining as follows: where i, j = 1, ..., N and is a recurrence threshold determining the size of considering neighborhood. Elements of RP form various structures, each representing certain dynamical regime in time series. For quantitative analysis of these structures, Eckmann et al. [Eckmann et al., 1995] introduced recurrence quantification analysis and its measures of complexity. In present study, we use recurrence rate: which measures the density of recurrence points in RP of motor-related EEG. In our research, we compute recurrence rate in sliding window to monitor its evolution in time. Selection of window size is discussed in section 3.
Finally, in order to validate our results we applied cluster-based nonparametric statistical test with random partitions [Maris and Oostenveld, 2007] to reveal differences between two experimental conditions (motor execution vs baseline).

Results
At the first step we demonstrate RPs of single trial EEG for right and left hands in one subject (see Fig. 2). For this illustration we selected trials with most pronounced ERD observed on raw EEG signal associated with motor execution (see Fig. 2A,D). One can notice that amplitude suppression of µ-band oscillations starts even before the movement onset according to EMG, capturing short period of motor preparation after the first signal.
On Fig. 2B,E we show recurrence plots for corresponding time series (single trial for left and right hand, channels C4 and C3 respectively). Visual inspection of RPs showed increase of recurrence points density in the time interval corresponding to the motor tasks, which is consistent with our suggestion that lower signal amplitude during motor-related ERD results in larger number of neighboring trajectories in the phase space.
Since we are interested in detection of transitions from baseline to motor-related event, we use windowed modification of recurrence rate with 3-second-window. Selection of the window size is explained on Fig. 3C,F, which presents recurrence rate calculated for windows of different sizes (1,2 and 3 seconds corresponding to 250, 500 and 750 points of the signal). Although the measures have similar shapes, the window expansion results in more smooth form of RR, reducing uninformative fluctuations. Shaded area corresponds to the interval with statistical significant differences between baseline and motor-related EEG. Red dashed marks first audio signal.
We see that for all three window choices the recurrence rate behaves as expected, having sharp increase shortly before the signal and drop after the movement is completed. To validate this result, we perform the same analysis for recurrence rate in 3-seconds-window for whole dataset. Fig. 3 demonstrates the mean value of obtained measure with standard error and results of statistical test represented as shaded areas.
Shape of RR averaged over subjects evidences of validity of pattern observed in single trial. Increase of RR starts approximately 2 seconds before the signal, which can be explained by the shift in RR values provided by sliding window. However, area of statistically significant differences between motor accomplishment and baseline is strongly associated with motor task, since it starts almost simultaneously with the signal and ends after 5th second, when motor task is completed. Therefore, significant increase of RR is strongly associated with movement execution and even captures short period of motor preparation. We conclude, that RR not only allows to reveal hidden transitions associated with signal structure alternation during motor action, but also is sensitive enough to detect the movement onset using µ-rhythm component of EEG signal.

Conclusion
In present paper, we demonstrated the ability of recurrence quantification analysis to detect motor-related pattern. We observed strong motor-related increase of recurrence rate peaking during the movement onset. Area of statistical significant difference between baseline and the time interval corresponding to the movement fits between two audio signals determining start and end of motor task. We believe that results of this research will be useful for further investigations of RPs use in EEG analysis, and especially in brain-computer interface applications.