{'fraction_non_alphanumeric': 0.03320471373448743, 'fraction_numerical': 0.014162060694545833, 'mean_word_length': 5.0090236871788445, 'pattern_counts': {'":': 0, '<': 9, '<?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}}
Advantages of EEG phase patterns for the detection of gait intention in healthy and stroke subjects

One use of EEG-based brain-computer interfaces (BCIs) in rehabilitation is the detection of movement intention. In this paper we investigate for the first time the instantaneous phase of movement related cortical potential (MRCP) and its application to the detection of gait intention. We demonstrate the utility of MRCP phase in two independent datasets, in which 10 healthy subjects and 9 chronic stroke patients executed a self-initiated gait task in three sessions. Phase features were compared to more conventional amplitude and power features. The neurophysiology analysis showed that phase features have higher signal-to-noise ratio than the other features. Also, BCI detectors of gait intention based on phase, amplitude, and their combination were evaluated under three conditions: session specific calibration, intersession transfer, and intersubject transfer. Results show that the phase based detector is the most accurate for session specific calibration (movement intention was correctly detected in 66.5% of trials in healthy subjects, and in 63.3% in stroke patients). However, in intersession and intersubject transfer, the detector that combines amplitude and phase features is the most accurate one and the only that retains its accuracy (62.5% in healthy subjects and 59% in stroke patients) w.r.t. session specific calibration. Thus, MRCP phase features improve the detection of gait intention and could be used in practice to remove time-consuming BCI recalibration.


I. INTRODUCTION
Brain computer interfaces (BCIs) as a rehabilitaton tool have been used to restore functions in patients with gait impairments by actively involving the central nervous system to trigger prosthetic devices according to the detected intention to walk [1]. One of the most investigated neural correlates of movement intention, as imaged by electroencephalogram (EEG), is the movement related cortical potential (MRCP) [2], [3]. The relation between MRCP and movement intention has been extensively studied with EEG-based BCIs in the context of self-paced lower limb movements and gait [4]- [10].
All studies that used MRCP information for the detection of movement intention explored the amplitude representation of the neural correlate [9], [11]- [17]. In particular, the amplitude of the MRCP has been used to detect gait intention in healthy subjects within session [9] and between sessions [16]. In the frequency domain, the neural correlate of movement intention is the event related (de)-synchronization (ERD/S) in mu and beta bands [18]- [23]. An improvement in performance within session and between sessions was obtained by combining the two motor intention neural correlates [16], [17], [24], [25]. Recent work has been carried out to eliminate or to diminish the time required for BCI calibration in intersession and intersubject transfer learning [15]- [17], [26]- [37].
Although phase patterns have been investigated before in the context of event related-potentials in theta and alpha band, the MRCP phase representation (0.1 − 1 Hz delta oscillations) has not been explored yet. Oscillatory activity in theta and alpha bands revealed that instantaneous phase patterns can contain information about the response to external stimuli (visual or auditory event-related potentials) [38], [39]. Furthermore, they found that the information that can be discriminated by firing rates can also be discriminated by phase patterns, but not by power. In the delta frequency band, in which the MRCP is also observed, recent studies [40], [41] have reported that the phase patterns are linked to the anticipation of visual and auditory stimuli. However, it remains unknown whether the phase patterns of the slow oscillations in the delta band are as discriminable as the amplitude patterns, as shown before for faster arXiv:1605.04533v1 [cs.HC] 15 May 2016 oscillations [38], [39]. In studies about movement related neural correlates, phase patterns have been investigated mainly in the mu band as a metric of connectivity between brain areas [42]- [47].
In this paper we present first, the decomposition of MRCP amplitude into instantaneous phase and power, and second, we present three detectors of gait intention based on (a) MRCP amplitude, (b) MRCP instantaneous phase and (c) a combination of MRCP amplitude and MRCP instantaneous phase. We performed our analysis on two independent datasets recorded previously in separate studies, one in healthy subjects [16] and another in chronic stroke patients [17]. The group of healthy subjects is not a control group for the patients. Both groups of subjects underwent three self-paced walking sessions with one week between them. We show the applicability of the detectors of walking intention in three cases: within session, between sessions and between subjects, without recalibration.
Our findings indicate that MRCP instantaneous phase shows higher signal-to-noise ratio than amplitude and instantaneous power. This characteristic of phase yields higher detection accuracy of pre-movement state within session, as well as an earlier detection of movement intention compared to the MRCP amplitude based detector. Previous work [48] has shown that the latency of the detection of movement intention has an important effect on neuroplasticity and relearning. Small detection latencies relative to the movement onset aid functional recovery in rehabilitation therapies. Furthermore, patients are fatigue-prone in prolonged and repetitive therapy sessions. Thus, it would be beneficial to remove the need for session-and subject-specific BCI recalibration. By combining MRCP amplitude and phase information, without recalibration, we attained a detector with a more robust performance between sessions and subjects, outperforming the detectors that use only one type of information.

A. Description of the datasets
Two previously recorded datasets from two separate studies [16], [17] have been used in the current analysis. More information about the demographic and clinical information of the participants, the experimental procedure and the data acquisition can be found in the Supplementary Materials. 1) Dataset 1: Ten volunteers (six males and four females, mean age = 26.4 years, SD = 4.8 years) participated in the experiment described in [16]. All subjects were healthy without any known neurological anomalies and musculo-skeletal disorders.
2) Dataset 2: Nine chronic stroke patients (six males and three females, mean age = 59.7 years, SD = 11.3 years) participated in the experiment presented in [17]. Demographic and clinical information of the participants can be found in [17].
The experimental protocol in the two datasets was approved by the ethical committee of the HYPER project (approval number 12/104) 1 and all subjects gave written informed consent before participating in the experiments. Figure 1 illustrates the structure of one trial of the experimental protocol. In each of the datasets, the experimental protocol was performed in three sessions with one week between them. Each session had a total of 100 trials. In each trial, subjects were instructed with visual cues (in the healthy subjects) or auditory cues (in the stroke patients) to relax for the first 10 s, then start walking whenever they wanted, but not before waiting at least 1.5 s after the instruction cue. After each ten trials there were break intervals with a duration adjusted to the need of the participants. The experimental protocol was slightly modified in the second dataset, for the stroke group, to accommodate flexible pauses for patients to regain balance.
In the two datasets EEG data was recorded using 30 EEG water based electrodes (from TMSi, Enschede, The Netherlands) located according to the 10/10 international system [49]. The ground was placed on the right wrist and two sensors located on the ear lobes have been used for average linked ears reference. Electromyographic (EMG) activity and footswitch presses were recorded during the experiment with healthy subjects and only the EMG activity, during the recordings with patients.
B. Data processing EEG data was filtered with a Butterworth second order zero-phase shift band-pass filter at 0.1−30 Hz. EMG data was filtered at 100 − 125 Hz using a Butterworth second order zero-phase shift bandpass filter. For the data in the first dataset, the onset of motion was computed as being half a second before the footswitch release. For the second dataset, EMG data was used for the computation of movement onset, since the acquisition of the footswitch activity was impractical in the experiment with stroke patients due to different levels of mobility impairments. The EMG data was Hilbert transformed and a threshold of 10% of the highest value from the averaged EMG power across trials was computed. The onset of motion was defined as 100 ms before the threshold crossing. The trials in which the onset of motion was detected before the preparation of movement cue were rejected as considered artifactual due to erroneous execution of the experimental protocol. No trials have been rejected in the first dataset. After trial rejection, in the second dataset, there were in average across subjects and sessions 96 remaining trials, in a range between 86 and 100 trials.
In both datasets, the remaining trials were segmented into 6 s long epochs according to the movement onset (each epoch lasted from −6 to 0 s relative to the movement onset). EEG data in dataset 1 was processed with FastICA [50] for artifact correction, as described in [16]. For the EEG data in dataset 2, trials that were contaminated by large, infrequent artifacts were removed using the joint probability function from EEGLAB 13.3.2 toolbox [51]. Next the remaining trials were processed with FastICA.
Movement related cortical potentials (MRCP) were analyzed as EEG neural correlates of gait intention. For the analysis, EEG data was bandpass filtered with a zero-phase shift Butterworth second order filter at 0.1 − 1 Hz. As shown in [52], this low-frequency filter has reliable characteristics for the analysis of MRCPs.
The MRCP amplitude signals s(t) were decomposed into instantaneous amplitude and instantaneous phase using the analytic representation 2 where HT(s(t)) is the Hilbert transform of the signal s(t), defined as where P.V. denotes Cauchy principal value. Therefore, the analytic signals z(t) = A(t)e jφ(t) were obtained for each electrode. The instantaneous amplitude is expressed by A(t) and the instantaneous phase by φ(t). A convenient mathematical representation of phase angles as vectors with unit length is given by Euler's formula (e jφ = cos(φ) + jsin(φ)). To characterize the inter-trial phase consistency between narrow-band signals, phase locking value (PLV) is frequently used, where N represents the total number of trials [53]. This measurement is performed by averaging the vectors (not their phase angles) and taking the length of the average vector as a measure of uniformity in the polar space. PLV ranges between zero and one, where zero indicates completely uniformly distributed phase angles and one indicates completely identical phase angles [54].

C. Neurophysiological analysis
We conducted the neurophysiological analysis at two levels, using the first session of the two datasets. First, at a scalp level, we performed a temporal analysis to investigate three types of features: 1) MRCP amplitude features of the signal filtered in 0.1 − 1 Hz frequency band; 2) MRCP phase features: instantaneous phase features obtained with Hilbert transform, and PLV as a summary statistic for single-trial instantaneous phase features; 3) MRCP (instantaneous) power features obtained with Hilbert transform as the logarithm of squared instantaneous amplitude values and multiplied by 10 to yield the decibels scale. Second, for channel Cz, which exhibits relevant patterns related to gait intention over the motor areas [9], [16], we conducted a statistical analysis to assess the signal-to-noise ratio of the features. Therefore, we computed the effect size for each type of feature relative to the baseline interval (between −5.5 and −4 s relative to the movement onset). More precisely, we computed the average of the three features over trials, for each subject. Next we calculated the baseline mean and standard deviation. Finally we quantified the effect size, for each feature type, by subtracting from the grand average activity (over subjects) the grand average baseline, and dividing by the standard deviation of the baseline.
We performed for each of the datasets, a statistical analysis at neurophysiological level, using pairwise Wilcoxon signed rank tests. For the analysis we used the absolute values of the effect sizes of the three features (amplitude, instantaneous phase and power) in channel Cz. We used a nonparametric test to avoid inappropriate assumptions about the distribution of the features. We chose to compare the absolute values of the effect size due to the differences in sign between them. Next we corrected for multiple comparisons using Bonferroni-Holm correction [55]. We evaluated the statistical significance between the effect sizes of the three representations in the intention of motion interval (−1.5, 0s).

D. Feature extraction and classification
At the classification level, we studied the MRCP amplitude and instantaneous phase features. The instantaneous phase features were decomposed into sine and cosine features according to Euler's formula. Features for both processes were extracted from ten electrodes with a one second long sliding window in steps of 125 ms. The ten electrodes (F3, Fz, F4, FC1, FC2, C3, Cz, C4, CP1 and CP2) were located over the precentral, central and postcentral motor and sensorimotor cortex. Windows between −6 and −1.5 s were labeled as relaxation state and those from −1.5 to 0 s as pre-movement state.
We analyzed a total of 41 windows per trial out of which the last 8 belonged to the pre-movement class. Before training the classifier, features were normalized to unit Euclidean length.
For the classification we used a support-vector machine (SVM) with radial basis function (RBF) kernel. This method has two hyperparameters: the RBF parameter γ and the regularization parameter C. We used this method due to the nonlinear nature of the instantaneous phase features.
Three detection models were built based on different sets of features: (1) Amplitude model, a single-view detection model based on lowfrequency MRCP amplitude features, (2) Phase model, a single-view detection model based on MRCP instantaneous phase features, and (3) Amplitude + Phase model, a multi-view detection model. The first layer of the multi-view model contains, as features, the outputs of the two single-view detectors, Amplitude model and Phase model, while in the second layer we used linear discriminant analysis to combine the two single-view models.
Model selection and artifact cleaning procedures were performed on each fold inside a 5 × 5-fold nested chronological cross-validation [56]. During model selection, the SVM hyperparameters, RBF parameter γ and regularization parameter C, were selected using a 5 × 5 grid search in the inner loop of the cross-validation. The search range for both parameters was between 2 −5 and 2 5 . The probability threshold was automatically selected in the inner loop of the cross-validation as the one that maximizes the performance on the validation set of the inner loop. In the outer loop we computed the classification performance.

E. Evaluation
We assessed the performance of the detection models in intra-and intersession conditions. In the intrasession condition, we evaluated the detection models in a 5×5-fold chronological cross-validation using subject-specific data within a session. In the intersession transfer condition we trained the detection models with data from one session and tested on all the data of a subsequent session, respecting the chronological order of the sessions in each of the datasets.
For the assessment of the three detection models (Amplitude model, Phase model and Amplitude + Phase model) in the intra-and intersession conditions, we used two metrics of performance: at the level of window and at the level of trial (sequence of sliding windows).
At the window level we measured the performance of correctly classified windows using receiver operating characteristic (ROC) curves. We conducted this analysis for all the models in intrasession and intersession conditions. In order to asses the performance while taking into account the empirical chance level, we have also used the Cohen's kappa [57].
At the trial level we assessed the performance of the models, in all the conditions as the percentage of correctly classified trials [16]. This metric is dependent on the labeling sequence of the sliding windows. Pre-movement class (−1.5 s to the onset of movement, equivalent to the last 8 sliding windows) was defined as the positive class. Thus a correct trial is defined according to the following logical expression: where FP and TP are the false and the true positive windows, respectively, and i represents the index of the window. The symbol stands for the logical product, while the symbol stands for the logical sum of the windows. In other words, the logical expression defines as correct a trial in which there are no false positive windows and there is at least one true positive window. This metric gives a conservative estimate of performance compared to the accuracy computed at the level of windows. Furthermore, this metric is more meaningful in rehabilitation scenarios, in which neural plasticity and implicitly functional recovery are determined by the correctly detected self-initiated (attempts of) movement of the participants [1].
We conducted statistical tests of the trial-based performance using repeated measures two-way ANOVA, with factors "detection model type" (amplitude, phase, combined amplitude and phase) and "evaluation type" (intra-and intersession), in which the averaged performance across sessions for individual subjects are the repeated measures. We tested for the sphericity of the data using the Mauchly's test. We evaluated the difference between intraand intersession conditions using pairwise t-tests. We corrected for multiple comparisons using the Bonferroni-Holm correction.
In addition to the transfer between sessions we performed the intersubject evaluation in a leaveone subject out cross-validation within each session using the trial-based metric. In each dataset, we trained the models with the data of all but one subject and evaluated on the data of the left out subject. We repeated the procedure, evaluating for each subject of the two groups. The intrasubject evaluation was equivalent with the intrasession evaluation.
We evaluated the difference between intra-and intersubject conditions using a pairwise Wilcoxon signed rank test. We corrected for multiple comparisons using the Bonferroni-Holm correction.
Furthermore, we performed the analysis of the detection time (latency) for the intrasession condition based on the probability outputs of the correctly classified trials, for all the detection models and subjects. The detection time was computed as the time point of the first true positive window (first window correctly classified as movement intention). We performed a pairwise Wilcoxon signed rank statistical test of the detection time between the three detection models, for each dataset and corrected for multiple comparisons using Bonferroni-Holm correction.
The statistical analysis was conducted in R [58], while the rest of the analysis was performed in Matlab R2011a (MathWorks, Massachusetts, US).

III. RESULTS
A. Neurophysiological analysis of healthy subjects Figure 2 shows the low-frequency EEG correlates of gait intention in healthy subjects (dataset 1). Figure 2A presents the MRCP features in grand average over subjects. On the first panel the MRCP amplitude pattern is observed as a negative deflection in the activity recorded by electrodes located over the motor cortex, starting 1 s prior to the movement onset. The middle panel shows the PLV or the phase synchronization. An increase in PLV over the motor cortex electrodes indicates a higher synchronization in the phases patterns starting 1.5 s prior to the movement onset. The bottom panel presents the evolution of low-frequency power across time. In the proximity of movement onset there is a slight increase in power. Figure 2B presents the size of the effect of the movement intention on the three features across channel Cz. This channel is chosen because it presents a relevant pattern over motor areas for all types of features [9], [16]. The estimation of the effect size was done relative to the baseline interval (−5.5, −4) s with respect to the movement onset.
In the intention of motion interval (−1.5, 0) s, PLV has the largest average effect size (5.25 standard deviations), while the amplitude of the MRCP has a lower average effect size (3.23 standard deviations). Power shows the smallest effect size (0.26 standard deviations). We evaluated the statistical significance between the absolute value of the averaged effect size of the three representations (amplitude, instantaneous phase and power) in the intention of motion interval (−1.5, 0) s using a pairwise Wilcoxon test. After the Bonferroni-Holm correction we found a statistically significant difference between instantaneous phase and power (p = 0.002), as well as between amplitude and power (p = 0.027). However, the difference between instantaneous phase and amplitude was not statistically significant (p = 0.556). Figure 2C illustrates the behavior of the three types of features in single trials over the central channel Cz for one representative subject. The course of the MRCP amplitude feature across trials is shown in the top panel. A decrease in amplitude is visible 1 s before the onset of motion. The middle panel presents a synchronization of instantaneous phase across trials. After 1.5 s prior to the movement onset, there is an ascending trend in phase from π/2 to π. Next, in the bottom panel power shows a less robust pattern across trials compared to the MRCP instantaneous phase or amplitude representations.
B. Evaluation of detection models in healthy subjects 1) Intra-and intersession evaluation: We evaluated the detection performance in healthy subjects during the intra-and intersession conditions using two metrics: window-based and trial-based.
Window-based performance: Figure 3A presents the averaged ROC curves across subjects for the three detection models, in two evaluation conditions, intrasession and intersession. To quantify the window-based performance in our unbalanced experimental design, we computed the area under the curve (AUC) as a summary statistic of the presented ROC curves. During intrasession the highest averaged AUC was attained for the Phase model (M = 0.88, SD = 0.09), while the lowest AUC was obtained using the Amplitude model (M = 0.82, SD = 0.09). For the intersession, the highest AUC was obtained using the multi-view model (M = 0.87, SD = 0.09), and the lowest AUC was attained using the Amplitude model (M = 0.69, SD = 0.16). We attained the average empirical chance level of 59±2%, with Cohen's κ = 0.68±0.1. From these findings we conclude that in the group of healthy subjects, the Phase model is the most reliable in intrasession, while in intersession the Amplitude + Phase model attains higher performance relative to the other detection models.
Trial-based performance: Figure 3B shows the performance of the three detection models at trial level, as percentage of correctly classified trials, in intrasession and intersession conditions.
During the intersession transfer condition, the multi-view model attained similar performance (M dn = 61%, range = 12% -79%) to the intrasession evaluation. The intersession transfer performance attained with the Amplitude model and with the Phase model shows a large decrease in performance.
These findings indicate similar results to the ones observed at window-level. Hence, using the Phase model we attained the largest percentage of correct trials in intrasession, whereas in intersession the Amplitude + Phase detector was the most reliable. In addition, the performance obtained using the Amplitude + Phase detector in intersession was similar to the one obtained in intrasession.
We present next the results of the repeated measures two-way ANOVA for the trial-based performance of the three detection models in the two evaluation conditions.
In healthy subjects, Mauchly's test indicated that the assumption of sphericity was not violated neither for the model type factor, nor for the evaluation type factor.
All effects are reported as significant at p < 0.05. There was a significant main effect of the factor "type of the detection model" on performance, F (2, 18) = 20.21, p < 0.001. There was also a significant main effect of the factor "type of evaluation" on performance, F (1, 9) = 93.20, p < 0.001. Furthermore, we found a significant interaction effect between the type of detection model and the type of evaluation used, F (2, 18) = 42, p < 0.001. This indicates that the type of evaluation had different effects on the attained performance, depending on which type of detection model was used. Comparing intrasession with intersession performance within each model, the post-hoc Bon-ferroni corrected t-tests showed that the Amplitude model and the Phase model performed significantly worse in intersession than in intrasession (p < 0.001 for both models), whereas the performance of the Amplitude + Phase model was not significantly different between the two conditions. Similarly, comparing different models in the intersession condition, we found that the Amplitude + Phase model was significantly better than both the Amplitude model (p = 0.001) and the Phase model (p < 0.001). Taken together, these results show the advantage of the Amplitude + Phase model in the transfer between sessions.
2) Intersubject evaluation: For the intersubject transfer, we report in Figure 3C similar trialbased performance using the Amplitude + Phase model (62.5%) relative to the intrasession evaluation. However, using the single-view models the attained performance was below both intrasession and intersession evaluations. The robustness of the multi-view model to session-and subjectspecific variability is due to a better discrimination between the movement intention and rest classes provided by the output combination of the singleview classifiers. We found no statistically significant difference according to a pairwise Wilcoxon signed rank test between intra-and intersubject evaluations using the Amplitude + Phase model in this group of healthy subjects. We provide all the performance results for all the conditions in healthy subjects in the Supplementary Materials.
3) Detection time evaluation: Next, we performed the analysis of the detection time in intrasession for the three detection models. Based on the neurophysiological results presented in section III-A, we surmised that the phase-based model will detect earlier the intention of walking compared to the amplitude-based model. Figure 3D presents for the healthy subjects, the output of three detection models as a probability of belonging to the intention of walking class, as well as the subject-specific detection time for the three detection models. All the models show an increase in the probability of gait intention before the onset of motion.
For all the subjects the multi-view model had the earliest detection time (910 ms before the movement onset). Moreover, for the Phase model and for the multi-view model we observe longer time intervals between the detection of gait intention and the actual movement onset compared to the Amplitude model. In average we measured a difference of 240 ms between the output of the multi-view model and the single-view Amplitude model, and a difference of 175 ms between the Phase model and the Amplitude model. Furthermore, according to the paired signed rank Wilcoxon test and after Bonferroni-Holm correction for multiple comparisons, we found statistically significant differences between the latencies of the models (p = 0.0078 between the Amplitude + Phase model and the Amplitude model, and p = 0.0117 for the other two model comparisons).

C. Neurophysiological analysis of stroke patients
In Figure 4 we present the MRCP features in stroke patients (dataset 2). First, in Figure 4A we observe these features in grand average over subjects. The MRCP amplitude shows a decrease in voltage, while the PLV presents an increase in magnitude over the motor cortex area with a large spread towards precentral and frontal areas. The power shows a slight increase in the proximity of movement onset.
In Figure 4B, we computed the grand average effect sizes of the three features relative to the baseline interval (−5.5, −4) s. During the intention of motion interval (−1.5, 0) s, PLV has the largest average effect size (5.23 standard deviations), amplitude has a lower effect size (3.25 standard deviations) and power shows the smallest effect size (0.47 standard deviations). We evaluated the statistical significance between the absolute value of the averaged effect size of three representations (amplitude, instantaneous phase and power) in the intention of motion interval (−1.5, 0) s using a pairwise Wilcoxon test. After the Bonferroni-Holm correction we found a statistically significant difference between instantaneous phase and power (p = 0.004), as well as between amplitude and power (p = 0.039). However, the difference between instantaneous phase and amplitude was not statistically significant (p = 0.734).
The illustration of the behavior in single trials of the three features is depicted in Figure 4C over the central channel Cz, for one representative patient. The top panel shows the MRCP amplitude features aligned relative to the movement onset. A negative deflection is found starting −1.5 s relative to the onset. We observe a large inter-trial variation in amplitude and in instantaneous phase. We found a slight increase in power starting 0.5 s before the movement onset and lasting during the movement.

D. Evaluation of detection models in stroke patients
1) Intra-and intersession evaluation: As in the case of healthy subjects, we analyze first the performance in the intra-and inter-session conditions using the two metrics of performance.
Window-based performance: In Figure 5A the performance is presented as averaged ROC curves across patients for the three detection models, in two evaluation conditions, intrasession and For the intersession, the highest AUC was obtained using the multi-view model (M = 0.84, SD = 0.12), and the lowest AUC was attained using the Amplitude model (M = 0.63, SD = 0.12). We attained the average empirical chance level of 58±2%, with Cohen's κ = 0.63±0.12. We conclude that in the group of stroke patients, the Phase model attains the highest performance in intrasession, while in intersession the Amplitude + Phase model is the most reliable for the window-based classification relative to the other detection models.
Trial-based performance: Figure 5B shows the performance of the three detection models at trial level, as percentage of correctly classified trials, in intra-and intersession conditions.
During the intersession transfer condition, the multi-view model attained similar performance (M dn = 58.3%, range = 21.1% -87.9%) compared to the intrasession evaluation. The intersession transfer performance attained with the Amplitude model and with the Phase model shows a large decrease in performance.
We conducted the same statistical analysis using repeated measures two-way ANOVA, as previously described in healthy subjects. For the stroke patients, Mauchly's test indicated that the assumption of sphericity was not violated for neither of the effects of the type of model (Amplitude, Phase or Amplitude + Phase) nor for the effects of the type of evaluation (intra-or intersession).
There was a significant main effect of the factor "type of the detection model" on performance, F (2, 16) = 15.57, p < 0.001. There was also a significant main effect of the factor "type of evaluation" on performance, F (1, 8) = 35.17, p < 0.001 and a significant interaction effect between the type of detection model and the type of evaluation used, F (2, 16) = 9.89, p < 0.001. This indicates that the type of evaluation had different effects on the attained performance, depending on which type of detection model was used. Bonferroni-Holm corrected t-tests revealed significant differences between intrasession and intersession evaluations for the Amplitude model (p = 0.010) and for the Phase model (p = 0.034), but not for the Amplitude + Phase model. For the intersession evaluation, significant differences have been found between the Amplitude + Phase model and the Amplitude model (p = 0.002) and differences close to significance between the Amplitude + Phase model and the Phase model (p = 0.058). These findings suggest that the Amplitude + Phase model is robust to intersession variability and it attains the highest scores compared to the single-view models.
2) Intersubject evaluation: For the intersubject transfer we obtained similar trial-based performance using the multi-view model (59%) relative to the intrasession evaluation, as shown in Figure 5C. The attained accuracy for single-view models was below the accuracy of both intrasession and intersession evaluations. The multi-view model has a lower sensitivity to the specific threshold obtained in cross-validation and, consequently, is less sensitive to changes in the features distributions. We found no statistically significant difference according to a Wilcoxon signed rank test between intra-and intersubject evaluations using the Amplitude + Phase model. We provide all the performance results for all the conditions in stroke patients in the Supplementary Materials.
3) Detection time evaluation: In addition, we performed the detection time analysis of the three detection models in the intrasession evaluation. Figure 5D presents for the stroke patients, the output of the detection models as a probability of belonging to the intention of walking class, as well as the subject-specific detection time for the three detection models. All the models show an increase in the probability of gait intention before the onset of motion. For all the subjects the multiview model had the earliest detection time (924 ms before the movement onset). We found statistically significant differences according to a signed rank Wilcoxon test and after Bonferroni-Holm correction, between the detection time of the Phase model and Amplitude model, as well as between the multiview model and the Amplitude model detection IV. DISCUSSION This paper studies the instantaneous phase representation of the MRCP and its usage for the detection of gait intention. We show that the MRCP instantaneous phase has a higher signal-to-noise ratio and that its pattern related to movement intention emerges earlier than the patterns of the MRCP amplitude or power. Next, we propose three detection models: two single-view models, one based on MRCP amplitude features and another based on MRCP instantaneous phase features, and a multi-view model that combines the outputs of the single-view models. During intrasession evaluation the single-view Phase model attained the highest detection score compared to the other detectors. However, in both intersession and intersubject transfer conditions, the multi-view model outperformed the single-view models.

A. Neurophysiological results
In recent studies [39], [59], [60] the instantaneous phase of theta and alpha frequency bands has shown a higher signal-to-noise ratio and earlier patterns compared to the ones observed in power. Furthermore, Ng et al. [39] have shown that these phase patterns persist even in the absence of an increase in power.
In our analysis we show that the phase patterns of the slow oscillations in delta frequency band related to the movement intention have the highest signalto-noise ratio and appear even earlier than 1.5 s before the movement onset, which is conventionally used as a lower bound for the effect of movement intention to appear in EEG [61] (see Figure 2B and Figure 4B). Next, we show that the increase in the power of the slow (delta) oscillations during the intention of movement interval is relatively small and it appears after the phase pattern (see Figure 2C and in Figure 4C).
As previously stated in [59], [60] theta and alpha oscillations reset early relative to the stimulus presentation (already before or around 50 ms). More precisely, a phase reset has been found at a time point when there is still no activity visible in power. Recent studies [40], [41] have shown that phase synchronization of slow (delta) oscillation depends on the likelihood of the appearance of a significant event, suggesting that phase locking is not only a mechanistic consequence of periodic stimulation. Based on previous findings [40], [41] and on the self-paced nature of our protocol, we consider the significant event to be the subjects' intention to move whenever they want. We found a nonuniform pattern in the phase of the delta oscillation, related to the intention to move, preceding the movement onset. The phase synchronization value (PLV) anticipates the pattern elicited by the MRCP amplitude with more than half a second, both in healthy subjects (see Figure 2A) and stroke patients (see Figure 2B).
In the last decade, a debate about the generation of event-related potentials (ERPs) has proposed two models. The evoked model [62] states that ERPs are generated by additive evoked responses which are completely independent of ongoing background electroencephalography (EEG). On the other hand, the phase reset model [63]- [65] suggests a resetting of ongoing brain oscillations to be the neural generator of ERPs.
The presented neurophysiological results suggest phase resetting as a potential neural generator of MRCPs after the appearance of gait intention. In particular, phase resetting indicates that after each stimulus, the phase of a certain rhythm is shifted towards a dominant value in relation to the stimulus [64]. More specifically, looking at the distribution of instantaneous phase over many trials in Figure 2C for healthy subjects and in Figure 4C for stroke patients, one can observe a distribution of random fluctuation in the instantaneous phase of the slow oscillations during the rest period (before the movement intention), changing after two seconds before the movement onset to a distribution that peaks about a dominant value from π/2 to π.
It is important to note that the group of healthy subjects is not a control group for the stroke patients, since the two groups have been recorded in different datasets and there are several factors that differentiate them, such as age, medication, slight differences in the experimental protocol, etc. Although a direct comparison between the two groups of subjects is not straightforward due to the aforementioned factors, we observed similar patterns between the features of the two groups of subjects. The MRCP amplitude and PLV have a similar behavior in healthy and stroke subjects, although, a larger spread is observed in stroke patients covering frontal, precentral and central areas (see Figure 2A and Figure 4A). The effect sizes of the three representations have smaller magnitude in stroke patients relative to the ones attained in healthy subjects (see Figure 2B and Figure 4B). Note that the behavior of the MRCP amplitude's effect size is conserved between the two groups of subjects, whereas the effect size of PLV and power features show dissimilarities between groups. The PLV in stroke patients presents the highest effect size in the proximity of the onset as observed in healthy subjects, but the increase is attenuated and more gradual in stroke patients than in healthy subjects. Power presents a different effect-size pattern between the two groups of subjects. Although increasing before the onset of motion for both groups, in stroke patients the effect-size of power remains constant also during movement.
In the future, a comparison should be performed between a group of stroke patients and their matched healthy control group in order to establish the effect of lesion on the dynamics of the neural correlates of movement intention. In addition, MRCP phase patterns could be analyzed under different protocols that require the execution of different tasks (such as tongue, hand, foot movements, etc.). We consider that several characteristics of the MRCP investigated in amplitude (such as latelarization, preference for specific areas of motor cortex, etc.) could be further explored by the dynamics of the MRCP instantaneous phase.

B. Detection models evaluation
MRCPs have been investigated in many studies for the detection of upper limb, lower limb and gait movement intention [9], [11]- [17]. All these studies analyzed MRCP amplitude representation, whereas MRCP phase oscillatory activity, in delta band has not yet been evaluated for the detection of gait intention.
However, the phase synchronization of oscillatory signals in mu band has been investigated to assess connectivity between brain areas while performing imaginary movements [42]- [45], [47]. They concluded that phase patterns contain complementary information to the power in the mu band and can effectively improve classification. Our findings show that using either of the metrics (window-based or trial-based) the model built on MRCP phase features attained the largest performance in the intrasession condition in both healthy subjects and stroke patients. Using the trial-based metric we observed an improvement of 4.5% in healthy subjects and of 10.1% in stroke patients compared to the model based on more conventional MRCP amplitude features. In a recent study [9] that investigates the amplitude of the MRCP for the detection of gait intention in healthy subjects, authors report a TPR of 76.9% and a FPR of 2.93 ± 1.09 per minute. We can compared these results with our intrasession window-based performance, in which for a similar FPR we attained a TPR of 87.6% using the Phase model, followed by the Amplitude + Phase model (TPR = 81.9%) and by the Amplitude model (TPR = 79.2%). The reported TPRs are derived from the AUC reported in Figure 3A and Figure 5A.
The majority of EEG based BCIs that study MRCP information for the detection or classification of movement use either linear discriminant analysis or template matching methods [9], [11]- [13], [16]. We used SVM classification models for the detectors based on both MRCP amplitude and MRCP instantaneous phase. The benefit of the SVM classifier was shown in the classification of instantaneous phase features, which have a nonlinear representation. Therefore, a nonlinear classifier such as RBF-SVM can be more successful in separating data that is not linearly discriminable. However, since amplitude features are linearly separable, the results attained with the MRCP amplitude detector were similar to the ones obtained with sparse linear discriminant analysis, shown in [16].
In BCI based neurorehabilitation, plasticity can be induced if the response latency of the detector relative to the user's movement intention is in the order of a few hundred milliseconds or smaller [48].
In the current study we show, for the two groups of subjects, that the detection models based on phase features attained an earlier detection compared to the model based on amplitude features. It would be interesting to evaluate the effect of such an earlier detection time, that precedes the movement onset, on plasticity and functional recovery. From a technological perspective, an earlier detection yields a longer time interval from the detection point until the decision-making process to trigger the rehabilitation device, allowing the integration of other processes.
Previous studies that use MRCP amplitude information for the detection of movement intention label the interval from 1.5 s prior to the movement onset as the intention of motion interval or the pre-movement state [9], [12], [16], [61], [66], [67]. In the current study, we used the same convention. However, we observed that the MRCP instantaneous phase pattern emerges earlier than the MRCP amplitude or power representations. Therefore, we surmise that the earlier appearance of the phase pattern might increase the accuracy of the detector by using different relaxation and premovement state labeling criteria in future studies.
A common trend in BCI to reduce (or even eliminate) the time needed for recalibration and increase robustness to artifacts and nonstationarities is the integration of data from multiple sessions and subjects (see [26]- [33], [35] for motor imagery, [15]- [17], [36], [37] for real movement execution and [34] for workload and mental imagery). The calibration of the BCI is usually associated with significant costs and subjects tiredness [1]. The current study shows, for the detection of gait intention, that the combination of MRCP amplitude and phase information achieves similar performance during intrasession to the performance attained without recalibration during intersession and intersubject transfer conditions (∼61% in healthy subjects and ∼57% in stroke patients). In a previous study, we reported similar results between sessions for healthy subjects, but with lower overall performance (∼58%) [16]. Furthermore, in stroke patients it was still necessary to integrate small amounts of data (∼10 minutes) for every session to avoid large decay in performance [36]. Despite that the results of the detector based on phase and amplitude features suggest that session-and subject-specific BCI recalibration could be unnecessary for the detection of gait intention, there is still a need to understand where is the limit of the proposed combination of features. First, longer term usage of the BCI may impose larger changes in the feature distributions that can affect performance (e.g. due to neural plastic changes during rehabilitation and to the learning process). Second, results may vary for other types of movement (e.g. motor imagery patterns are known to have smaller amplitude than the ones for real movements). Moreover, in [68] they have shown that upper limb, tongue and lower limb movements have different activity patterns. For these cases, the proposed models could be useful to allow long term operation in a wide range of movements.
Traditional BCIs use a range of features to allow the user to control an external device, such a computer or a prosthesis [69]. These feature types can include amplitude values, frequency based features such as band powers and timefrequency maps of cortical activity of specific brain areas [70]. Our results suggest that phase is a better representation of MRCP amplitude that improves the detection of movement intention and removes the need of session-and subject-specific BCI recalibration widening the integration of this type of detectors in other applications that need an earlier assessment of movement intention for the control of an external device. Due to the robustness in transfer learning we consider gait rehabilitation as a primary application of this technique, however other applications in which the users perform various types of movement (e.g. upper limb, lower limb movements) could also benefit from off-theshelf BCI technology.