Effect of Lower Limb Exoskeleton on the Modulation of Neural Activity and Gait Classification

Neurorehabilitation with robotic devices requires a paradigm shift to enhance human-robot interaction. The coupling of robot assisted gait training (RAGT) with a brain-machine interface (BMI) represents an important step in this direction but requires better elucidation of the effect of RAGT on the user’s neural modulation. Here, we investigated how different exoskeleton walking modes modify brain and muscular activity during exoskeleton assisted gait. We recorded electroencephalographic (EEG) and electromyographic (EMG) activity from ten healthy volunteers walking with an exoskeleton with three modes of user assistance (i.e., transparent, adaptive and full assistance) and during free overground gait. Results identified that exoskeleton walking (irrespective of the exoskeleton mode) induces a stronger modulation of central mid-line mu (8–13 Hz) and low-beta (14–20 Hz) rhythms compared to free overground walking. These modifications are accompanied by a significant re-organization of the EMG patterns in exoskeleton walking. On the other hand, we observed no significant differences in neural activity during exoskeleton walking with the different assistance levels. We subsequently implemented four gait classifiers based on deep neural networks trained on the EEG data during the different walking conditions. Our hypothesis was that exoskeleton modes could impact the creation of a BMI-driven RAGT. We demonstrated that all classifiers achieved an average accuracy of ${84}.{13}\pm {3}.{49}\%$ in classifying swing and stance phases on their respective datasets. In addition, we demonstrated that the classifier trained on the transparent mode exoskeleton data can classify gait phases during adaptive and full modes with an accuracy of ${78}.{3}\pm {4}.{8}\%$ , while the classifier trained on free overground walking data fails to classify the gait during exoskeleton walking (accuracy of ${59}.{4}\pm {11}.{8}\%$ ). These findings provide important insights into the effect of robotic training on neural activity and contribute to the advancement of BMI technology for improving robotic gait rehabilitation therapy.

electroencephalographic (EEG) and electromyographic (EMG) activity from ten healthy volunteers walking with an exoskeleton with three modes of user assistance (i.e., transparent, adaptive and full assistance) and during free overground gait. Results identified that exoskeleton walking (irrespective of the exoskeleton mode) induces a stronger modulation of central mid-line mu (8-13 Hz) and low-beta (14-20 Hz) rhythms compared to free overground walking. These modifications are accompanied by a significant re-organization of the EMG patterns in exoskeleton walking. On the other hand, we observed no significant differences in neural activity during exoskeleton walking with the different assistance levels. We subsequently implemented four gait classifiers based on deep neural networks trained on the EEG data during the different walking conditions. Our hypothesis was that exoskeleton modes could impact the creation of a BMIdriven RAGT. We demonstrated that all classifiers achieved an average accuracy of 84.13 ± 3.49% in classifying swing and stance phases on their respective datasets. In addition, we demonstrated that the classifier trained on the transparent mode exoskeleton data can classify gait phases during adaptive and full modes with an accuracy of 78.3 ± 4.8%, while the classifier trained on free overground walking data fails to classify the gait during exoskeleton walking (accuracy of 59.4 ± 11.8%). These findings provide important insights into the effect of robotic training on neural activity and contribute to the advancement of BMI technology for improving robotic gait rehabilitation therapy.

I. INTRODUCTION
G AIT rehabilitation has benefited in recent years by the introduction of medical-grade robotic devices, which provide high dose and improve intensity of therapeutic exercise, and reduce the working load of the treating physiotherapists [1]. Additional technical advancement has seen the development of wearable exoskeletons for gait rehabilitation, with the advantage of training in more ecological settings and providing stimulation by navigating the environment [2]. Powered exoskeletons may exert different degrees of force, supporting the user across a range of power, from almost none (transparent mode -user donning an exoskeleton with inertia disengaged in the actuators) up to a full support, with intermediate modalities which partially assist the user. However, efficacy of robot assisted gait training (RAGT) after stroke remains controversial, with unclear effects on gait function, balance, and improvement of activities of daily life compared to conventional therapy [3], [4] even in trials using overground exoskeletons [5]. These inconclusive findings may, in part, be related to the lack of interaction between the end-user and the robot, opening the field of human-robot interaction in rehabilitation. Commercially available rehabilitation robots deploy pre-set training protocols defined by a physiotherapist at the start of each session. To the best of our knowledge at the time of this writing, there is neither fine tuning of the robot's support to the user nor physiological control of the robot by the user. A granular interplay of these two actors, with a continuous interaction particularly at the neural level, could facilitate neuroplasticity via a process of positive reinforcement. Ongoing personalisation of RAGT to the specific neurophysiological characteristics of the end-user might be an avenue to respond to this challenge.
In taking up this challenge, the research community has recently focused on the development of robotic devices controlled by a Brain-Machine Interface (BMI) to assist and rehabilitate gait function [6]. The aim of BMI is to translate brain signals into motor commands to control the behavior of the robotic exoskeleton [7], [8], [9]. By doing so, brain-driven robotic rehabilitation promotes the creation of a more direct link between the neural activity and the peripheral feedback, providing a seamless human-robot interaction and facilitating neuroplasticity [10], [11]. Although several studies have shown promising performance of brain-driven gait decoders for lower limb exoskeletons [12], [13], [14], [15], the main challenge is still the development of reliable BMIs that are robust to the session-to-session variability induced by the rehabilitation and neuroplasticity process [16], but also to the brain activity modifications induced by interaction with the robotic device alone [17].
Toward this ambitious aim, how exoskeleton assistance modes modulate neural oscillatory activity must first be determined. Since commonly used clinical scales primarily rely on subjective functional assessments, they fail to provide a complete description of end users' neuro-biomechanical status. Therefore, current clinical tests need to be integrated with specific physiological measurements to obtain a more in-depth understanding of the effect of the rehabilitative intervention. We know that RAGT induces modifications in cerebral and muscle activity in stroke survivors [18], [19], indicative of increased neural activity in motor and associative brain areas. What still requires clarification however, is whether incremental degrees of robot assistance impact differently on neural correlates of gait and what the differences with respect to overground free walking are. This knowledge is mandatory to define if neural activity during RAGT may be a biomarker of brain plasticity induced by exoskeleton training and how we may best manipulate training to stimulate the restoration of physiological neural activity. In this study, we will also evaluate the effectiveness of an offline gait classifier to identify the gait cycle phases from brain activity in each gait modality. This information will develop foundational knowledge required for the development of brain-controlled exoskeletons, driven by the user via a BMI.
This study aims to respond to the following, interdependent, research questions: 1) how do different exoskeleton gait modes (full, adaptive, transparent) differ from each other in terms of modulation of cortical and muscular activity and how do they differ in comparison to physiological overground walking? 2) are neurophysiological responses to free overground walking and transparent mode comparable? 3) if differences between these walking modalities exist, how do they affect the development of a gait classifier?

A. Experimental Protocol
We used the dataset obtained with the protocol presented in [20]. The aim of this protocol is to investigate the neurophysiological bases underpinning locomotion during a single session of robotic gait training and to compare them with those of free overground walking.
The experiment employed an active exoskeleton used in gait rehabilitation, EKSO GT (EKSObionics Inc., San Raphael, CA, USA), shown in Fig. 1a. The device consists of two lower limb supports connected by a torso structure, four active joints at the hip and knee actuated by electric motors in the sagittal plane, and two sprung passive joints at the ankle. EKSO GT is activated by participants' shifting their body weight laterally and then forward to a predefined threshold (ProStep™mode). The power supplied to each leg during stepping can be adjusted based on three levels. Specifically, EKSO actuators can provide: (i) full power to both legs, i.e., leg trajectory is fully driven by the robot and no muscle strength is required by the user (Full Mode -F); (ii) additional power complementing the user leg strength needed to complete the gait trajectory (Adaptive Mode -A); and (iii) power to support the device's own weight and inertia, completely following the user movements (Transparent Mode -T). Before the beginning of the training session, all subjects underwent a familiarization phase with the device and a customization performed by a trained physical therapist setting the exoskeleton parameters based on participants' anthropometry. The protocol for the whole training session consisted in the following phases, summarized in Fig. 1c order. 1 For safety reasons, EKSO walking was always performed with the use of walking aids (i.e., crutches). 4) Free walking recording. After EKSO doffing, three additional free walking trials were collected. 5) Lastly, 5 min resting state data were recorded with the subjects sitting and with eyes open. The adaptive mode looks at the user's position relative to the desired position and provides assistance as needed to maintain a safe gait. Because this amount of assistance is in response to the needs of the participant, it is not consistent across participants. The full protocol was completed in sessions that lasted approximately 90 min.

B. Data Acquisition
The data acquisition setup consisted of three data acquisition systems synchronously recording neurophysiological and kinematic data during the experiment: electroencephalography (EEG), electromyography (EMG) and inertial measurement unit (IMU) systems.
Wireless EEG recordings were acquired with g.NAUTILUS PRO system with 64 electrodes (g.tec medical engineering, Schiedlberg, Austria), placed according to the international 10-20 system and referenced to the right ear lobe. In parallel, a wireless acquisition system (Cometa srl, Milan, Italy) consisting of EMG probes and IMUs was used to record muscle activity signals and kinematic data synchronized with EEG recordings. EMG channels were positioned on the bilateral vastus lateralis (VL), biceps femoris (BF), tibialis anterior (TA), and gastrocnemius lateral head (GL). One IMU was 1 List obtained on https://www.random.org/lists/ secured on the fifth lumbar vertebra L5 to measure the movements of the pelvis, while another was placed on the shank link of each leg. During exoskeleton gait tasks, the L5 IMU was moved to the equivalent location on the device. EEG, IMU and EMG data were synchronously collected through a C# custom-made software, using the g.NEEDACCESS .NET API and the COMETA .NET API. Before each recording, synchronicity of the system was verified through test-signals and test triggers fed in parallel to the sensors. Further detail on this methodology is available in [20]. EEG and IMU data were originally collected at a sampling rate of 250 Hz, whereas EMG data were collected at 2000 Hz. To ensure data synchronization among the three signals, EEG and IMU data were linearly upsampled to 2000 Hz.

C. Participants
The study enrolled 10 healthy volunteers ( with no neuro-muscular, cardiovascular, orthopedic, visual or dermatological pathology, or anthropometric measurements limiting exoskeleton use, and were right-handed according to the Edinburgh Handedness Questionnaire (EHQ). Participants were recruited at the High Specialization Rehabilitative Hospital (ORAS-Ospedale Riabilitativo ad Alta Specializzazione), Motta di Livenza (Italy). Participants were naive to the device and were familiarized with it (i.e., they were allowed to walk with EKSO in assistive mode along the same experimental corridor back and forth, for further details on protocol please refer to [20]). Data collection was conducted according to the principles of the Declaration of Helsinki. Participants read and signed an informed consent, with the full ethical approval being granted by the Institutional Review Board (Treviso, PROGAIT TRAINER, 24.10.19).

D. Gait Events Identification
Data related to walking bouts were automatically extracted from the dataset using the rectified magnitude of the shank accelerometer and the adaptive Otsu's threshold [21]. Then, the heel-strike (HS) and toe-off (TO) events, signaling the beginning of stance and swing phases of each leg, were identified through the shank-gyroscope's angular velocity in the sagittal plane [22]. This information was used to reconstruct the gait cycle of each step in every walking condition.

E. EEG Processing
A multiple-stage processing pipeline was implemented and applied to the EEG signals to reduce presence of movement artifacts, and other noise interference that could overlap in time and frequency with brain activity during walking [23]. The pipeline comprises of the following steps: (i) pre-processing, (ii) non-stereotyped artifacts rejection, (iii) stereotyped noise removal, and (iv) blind source separation (BSS)-based minimization of EMG contamination. After each step, the efficacy of the cleaning processing was checked and confirmed for each subject by a neurologist with EEG expertise, through the visual inspection of EEG time-courses, signal's spectrum, and topographic maps.
1) Pre-Processing: EEG data were downsampled to 250 Hz and the most external EEG channels in the 64-channel configuration were removed from the dataset as they are characterized by high-amplitude artifacts dominant during all walking sessions. Thus, all subsequent analyses considered only the following 38 channels: FC5, FC3, FC1, FCz, FC2, FC4, FC6, C5, C3, C1, Cz, C2, C4, C6, CP5, CP3, CP1, CPz, CP2, CP4, CP6, P5, P3, P1, Pz, P2, P4, P6, PO3, POz and PO4. Raw EEG data were detrended with a zerophase high-pass FIR filter above 1 Hz and power line interference was removed by applying a zerophase IIR notch filter centred at 50 Hz and with a 2 Hz bandwidth, and low-pass filtered below 45 Hz (4th-order zerophase Butterworth filter). Then, a robust re-referencing [24] was adopted to re-reference the EEG signals to the common average across the channels. This processing stage was applied to the data from all walking conditions (EKSO walking recording, Free walking recording) and to the resting state data.
2) Non-Stereotyped Artifacts Rejection: To remove highamplitude and rare artifacts (e.g., EMG burst, cable movements), we applied an iterative version of the artifact subspace reconstruction (ASR) [25], [26] using a 3s sliding window (66% overlap) and a threshold of 10 standard deviations, selected according to previous literature [27], [28] and the visual inspection of original and cleaned signals. After each iteration, the L1-norm of the difference between the original and processed data, normalized by the L1-norm of the original data, was computed and the iteration stopped when this difference is below 5% [25]. ASR was calibrated on the EEG data collected during the resting state condition and applied to data collected during the walking conditions. The ASR calibration and computation were performed using the EEGLAB functions asr_calibrate and asr_process, respectively. ASR was used to obtain more homogenous data before applying the Independent Component Analysis (ICA) decomposition in the following stage. Indeed, the presence of non-stationary movement artifacts in the signals may impair the reliability of the ICA [29] and the use of ASR has been found to help the extraction of independent components (ICs) with higher dipolarity [25].
3) Stereotyped Noise Removal: EEG data were submitted to ICA decomposition with an extended-infomax AMICA core [30] (this analysis was performed using the pop_runamica function from EEGLAB). A PCA-based pre-elaboration was applied to resolve eventual rank deficiency in our data. After decomposition, the ICs were classified into "brain components" and "artifact components" by combining information from three approaches: • ADJUST plugin [31] using Kurtosis and Skewness spatial thresholding to identify artifactual ICs related to eye blinks, vertical/horizontal electrooculography, general discontinuities; • ICLabel plugin [32] using a machine learning-based method which classifies ICs into six classes (brain, eye, muscle, heart, channel noise, other); • Visual observation of the topographic maps, signal spectrum and time courses of ICs to fine-tune the results of ICLabel for that ICs which were classified as "other". On average, AMICA extracted 34 ± 2 ICs of which 13 ± 2 were removed during this stage. Examples of retained and removed components are reported in Supplementary Fig. S1 and Supplementary Fig. S2, respectively. Cleaned EEG signals were obtained by back-projecting the retained components in the original channel domain. 4) BSS-Based Minimization of EMG: Canonical correlation analysis (CCA) [33] was applied with a 5s sliding window (50% overlap) and 20 Hz cut-off to separate the EEG and EMG frequency content in every canonical component (CC). A component was removed if the EMG/EEG power ratio was above 10. On average, 7±2 CCs were removed over an average of 30 ± 5 components.
The final EEG dataset was then segmented in gait cycles, from right toe-off (RTO) to the following right toe-off. By visual inspection, we identified and removed the gait cycles that still contained artifacts even after the previous processing stages. On average, 10.4 ± 2.3% of the gait cycles were removed, ensuring the EEG dataset is maximally cleaned enabling the extraction of gait-related neural features that are minimally affected by movement or other environmental artifacts.

F. Gait-Related Neural Features
To evaluate the cortical involvement during the walking activity, we calculated the event-related spectral perturbation (ERSP) over the gait cycle [34]. This metric measures the relative modulation of the EEG activity in the frequency domain during walking with respect to a baseline condition [17]. To do Schematic workflow of the offline EEG processing. Single-subject EEG datasets were first preprocessed (blu box) through bad external channels removal, data filtering and re-referencing. These steps were applied to the data from all walking conditions and to the resting state data. Preprocessed walking datasets were then cleaned by non-stereotyped artifacts through an iterative ASR, calibrated with the resting state EEG, and then submitted to an ICA decomposition for stereotyped noise removal (orange box). A BSS-CCA algorithm was applied to minimize the effect of muscular artifacts. The final EEG signals were segmented in gait cycles and bad gait cycles that still contained artifacts were removed from the datasets. . ERSP plots are masked for significance (p > 0.05, in green). The grand-average modulation of the four frequency bands over the gait cycle is also reported. We represented Cz due the anatomical representation of the lower limb over the interhemisferic cortices of the motor area, corresponding to the scalp topography of Cz. so, the EEG power spectrum of each step was timewarped using linear interpolation (0.1% gait cycle resolution) to align the timepoints for the RTOs of the different steps. The ERSP is computed by subtracting for each channel the average log spectrum across all gait cycles of the same condition from each single-step log spectrogram [35], and then by averaging the normalized step-cycle spectrograms for each condition, as described by where F k ( f, t) is the spectral estimate of the EEG signal at frequency f and time t in step k, computed by applying the Short-Time Fast Fourier Transform (STFT) on a 0.4s sliding Hanning window with 99% overlap to preserve the temporal resolution as much as possible. τ refers to the temporal index in the gait cycle of duration T for the computation of the average log spectrum. The baseline correction using the average spectrum of each condition allows the relative changes in spectral power of the brain activity during the walking condition to be better highlighted [17], [35], but also corrects for EEG baseline drift over time during the recording session. This analysis was performed using the newtimef function from EEGLAB providing the pre-computed average log-spectrum using the 'powbase' argument and setting the 'trialbase' argument to 'on'. Fig. 3 shows the grand-average ERSP over the gait cycle for the Cz channel in each walking condition, and the topographic distribution in four frequency bands: theta (4-8 Hz), mu (8-13 Hz), low-beta (14-24 Hz) and high-beta (24)(25)(26)(27)(28)(29)(30). Negative values of the ERSP (blue spots) mark an event-related desynchronization (ERD) during the gait cycle, while positive values (red spots) mark an eventrelated synchronization (ERS). Significant deviations from the baseline were computed with a bootstrapping method, thus the ERSP plots are masked for significance ( p > 0.05, colored green) with respect to the gait cycle baseline.
To assess the relative modulation in EEG rhythms during the gait cycle for free and exoskeleton walking conditions [36], we computed the ERSP oscillation around the baseline of the right leg ( E R ) and of the left leg ( E L ) as the average absolute difference between the ERSP in the swing phase of each leg and the previous stance phase as follows: where B is a selected EEG rhythm in the four considered frequency bands. Statistically significant differences of E R and E L between the walking conditions were evaluated for each channel through a 4× 4 ANOVA with factors "Walking condition" (i.e., free walking, transparent mode, adaptive mode, full mode) and "Frequency band" (i.e., theta, mu, low-beta, highbeta). Post-hoc comparisons between walking conditions were corrected with the Bonferroni method. We also checked for statistically significant differences between the free walking recordings before and after the robotic gait training through a 2 × 4 ANOVA with factors "Free walking recording" (i.e., free walking pre-training, free walking post-training) and "Frequency band" (i.e., theta, mu, low-beta, high-beta). Effects were deemed significant if the p-value is less than 0.05.

G. EMG Processing and Analysis
EMG data were first band-pass filtered between 20 and 250 Hz (4th-order zerophase Butterworth filter) [37] and segmented in gait cycles. For each muscle, we calculated the signal amplitude as the Root Mean Square (RMS) over the gait cycle. In addition to the mean amplitude analysis, we computed the center of activity (CoA) [38] of each muscle throughout the gait cycle, similar to what we have done in [39]. The CoA is the first trigonometric moment of the signal distribution and has been used in the literature to characterize the overall temporal shifts of EMG since during locomotion it is often impossible to identify a single peak in the muscle activity [38], [40]. To compute the CoA, the pre-processed EMG signals were rectified and low-pass filtered below 10 Hz (4th-order zerophase Butterworth filter) to obtain the smoothrectified EMG (SRE) signals. SRE data were segmented in gait cycles and averaged across strides. The CoA was then computed for each muscle through circular statistics (i.e., circ_mean function from the CircStat Matlab toolbox [41]) as follows: with angle θ that varies from 0 to 360 • corresponding to 0 and 100% of the gait cycle, respectively. Statistically significant differences of RMS and CoA between the walking conditions were evaluated for each muscle using a Friedman test. Posthoc comparisons between walking conditions were corrected with the Bonferroni method. Effects were deemed significant if the p-value is less than 0.05.

H. Gait Classifier Implementation and Evaluation
To compare the effect of different walking conditions on the calibration of a hypothetical BMI to control the lower limb exoskeleton, we implemented a gait classifier that takes the power spectrogram of the EEG data during walking as input and outputs the classification that the subject is in either the swing (i.e., RTO-RHS or LTO-LHS) or the stance (i.e., double-support, RHS-LTO or LHS-RTO) phase of gait. Thus, the model aims to classify the gait cycle's events from brain activity. To do so, we computed for each EEG channel the log power spectral density (PSD) using the STFT on a 0.4s sliding Hanning window with 90% overlap. Thus, the input to the classifier consisted of the sequences of EEG features X ∈ R C×F , that are matrices with C channels and F frequencies in the range 4-30 Hz. Following the recent literature which shows the superiority of deep learning-based models over traditional machine learning approaches in gait classification [14], [26], [42], [43], particularly when they contain one or more recurrent layers [26], [43], the gait classifier implemented in this work consisted of deep neural network with a 2D-convolutional layer (CNN), to learn spatiofrequency characteristics in the input EEG data, and two Long Short-Term Memory (LSTM) layers encoding the temporal relationship between the extracted features and the walking pattern. The output of the last LSTM layer was further processed by a fully-connected (FC) layer and a Softmax layer to predict the probability of each class. At each time step, the network output is the class with the highest probability. A graphical representation of the implemented neural network is shown in Fig. 4. The network was trained with an adaptive moment estimation (Adam) [44] algorithm, the objective of which is the minimization of the balanced cross-entropy loss of K mutually exclusive classes with cost function, defined as: where N is the number of samples in the training set and t i j is the indicator that the ith sample belongs to the jth class. y i j is the Softmax layer output for the jth class at the ith sample, that depends on the set of network parameters θ. α j is weighting factor to account for the unbalanced class distributions in the dataset (i.e., swing phases occupy ∼ 70% of the gait cycle). Finally, ρ(θ ) is the L2-norm regularization term [45] with a regularization factor λ equal to 0.0001, to achieve a sparse solution of the optimization problem and avoid over-fitting Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. during the training phase. To further regularize the network, a Dropout layer was added after each LSTM layer with a probability of 0.1. To ensure easy replicability, a summary of the Adam optimizer settings is provided in Table I. For the free walking condition and for each of the three exoskeleton modes, a subject-specific gait classifier was trained using 75% of the data as training set, and the remaining 25% as a validation set. Network hyper-parameters (e.g., convolutional filters, number of hidden units) were manually tuned based on our previous experience [26], [46] and on the average results across subjects and conditions. The results obtained with the proposed network were also compared with performance of a simpler linear discriminant analysis (LDA) classifier or LDA combined with a filter-bank common spatial pattern (FBCSP) and mutual information-based minimum redundancy maximum relevance (MI-MRMR) algorithm for feature selection [9]. In addition, we also evaluated the performance of the networks employing only the CNN or only the LSTM architecture. Since the aim of this study was to measure the impact of the exoskeleton on the calibration of a BMI to activate exoskeleton assistance, we considered the two gait classifiers in which the source data for training the network come from the conditions in which no assistance was provided (i.e., free walking, transparent mode). We then analysed their performance on the target data in which the walking is assisted by the exoskeleton (i.e., full mode, adaptive mode). Statistically significant effects of the walking condition on the gait classification performance were evaluated through nonparametric Kruskal-Wallis tests. Post-hoc comparisons were corrected with the Bonferroni method. Effects were deemed significant if the p-value is less than 0.05.

III. RESULTS
A. Gait-Related Neural Features Fig. 5 reports the results of the E R and E L for the Cz channel (Fig. 5a) and the topographic distribution over the cortex (Fig. 5b).
The statistical analysis revealed a significant effect of the walking condition on both the E R (theta p = 0.008, mu p = 0.008, low-beta p = 0.010) and E L (high-beta p = 0.005) in Cz channel. In particular, the ERSP oscillation related to the right leg (i.e., E R ) is significantly lower during free walking than in exoskeleton walking in almost all the frequency bands. Indeed, a significant increase was found between the free walking and the adaptive mode (theta p = 0.005, mu p = 0.007, low-beta p = 0.016), as well as between the free walking and the full mode (mu p = 0.041, low-beta p = 0.028). Conversely, no significant differences emerged between the transparent mode and either the free walking (theta p = 0.605, mu p = 0.203, low-beta p = 0.548), the adaptive mode (theta p = 0.105, mu p = 0.459, low-beta p = 0.282) or the full mode (theta p = 0.999, mu p = 0.871, low-beta p = 0.391). In addition, no significant difference was found between adaptive and full modes (theta p = 0.080, mu p = 0.888, low-beta p = 0.996). These differences are consistent over the whole cortex as shown in Fig. 5b, particularly over the centro-parietal mid-line in the mu and beta bands for the right (CPz: mu p = 0.013, low-beta p < 0.001, high-beta p = 0.011; Pz: mu p = 0.020, lowbeta p < 0.001, high-beta p = 0.030) and left steps (Pz: high-beta p = 0.040).
Weakly significant differences were also found between the exoskeleton walking conditions (i.e., transparent, adaptive, full), in only a few lateral channels and with no consistency evident across the dataset. Similarly, no statistically significant differences were found between the free walking recordings before and after the exoskeleton walking recordings, as shown in Fig. 7.  8a illustrates the grand-averaged EMG patterns of leg muscles in the different walking conditions. The time course of the proximal muscles (i.e., VL and BF) shows similar amplitudes in all the walking conditions. As shown in Fig. 8b, no statistically significant differences between walking conditions ( p > 0.05) were found for BF and VL muscles, except for the right BF muscle ( p = 0.033). Statistically significant differences were also found in the right TA ( p = 0.001) and left TA ( p = 0.004) muscles. In particular, the free walking is characterized by significantly higher RMS values compared to adaptive mode (right leg: p = 0.001; left leg: p = 0.040) and full mode (right leg: p = 0.003; left leg: p = 0.003). For instance, the right TA pattern in free walking presents a visible peak at the end of the right swing phase (i.e., ∼30% of gait cycle) which almost disappears in the adaptive and full modes (Fig. 8a). No statistically significant difference was found, instead, with respect to transparent mode (right leg: p = 0.402; left leg: p = 0.726). Also the transparent mode is characterized by a general increase in the TA activity compared to the adaptive and full modes, that is found to be significant only in the right leg compared to adaptive mode ( p = 0.029).
The EMG waveforms of BF and TA muscles also differs along the gait cycle between walking conditions. By looking to the grand-averaged EMG activity (Fig. 8a), BF and TA are mostly activated during the early swing and mid swing phases in the free walking. On the other hand, during all the exoskeleton walking conditions, BF shows an additional burst of activity during the late swing phase of the contralateral leg, as highlighted by the CoA analysis (Fig. 8c). Indeed, the CoA of the BF muscles in the free walking condition differs significantly from both adaptive mode (right leg: p = 0.010; left leg: p < 0.001) and full mode (right leg: p = 0.001; left leg: p < 0.001). Significant difference was also found between free walking and transparent mode in the center of right BF activity ( p = 0.017), but not for the left BF activity ( p = 0.118). Additionally, all the exoskeleton walking conditions present a significant shift in the TA pattern anticipating the CoA towards the early swing with respect to natural free walking. This shift is found to be statistically significant for the right TA activity ( p = 0.005). It is also worth noting that (c) Polar plots of the center of EMG activity (CoA). Polar direction denotes the relative time over the gait cycle (time progresses clockwise) averaged across subjects, radius of the sector shows the mean smoothrectified EMG activity of the muscle over the gait cycle, and the width of the sector represents the CoA std. dev. across subjects (* p < 0.05; ** p < 0.01; *** p < 0.001). transparent mode, adaptive mode and full mode are generally characterized by a larger CoA standard deviation, suggesting a higher variability of muscular activations across subjects when walking with the exoskeleton. Table II illustrates the performance of the networks trained for each walking condition and evaluated with their respective validation set. No significant effects for walking conditions were found on the classification performance when the networks were trained and evaluated on data from the same walking condition ( p = 0.078). The proposed network for gait classification can classify the gait cycle with an average accuracy of 84.13 ± 3.49%, with the highest performance of 89.32 ± 4.65% evident in the free walking condition. Fig. 9 summarises the results of the two networks trained on the transparent mode and the free walking conditions (source datasets) when used to classify gait in adaptive and full exoskeleton modes (target datasets). The comprehensive results, reported in Supplementary Table S2, identify a significant effect for the walking condition on the accuracy ( p < 0.001). In particular, the accuracy is significantly higher ( p < 0.01) for networks trained with data from the transparent mode (78.3 ± 2.9% on adaptive mode, 78.3 ± 4.3% on full mode) when compared with networks trained with data from free natural walking (58.8±12.3% on adaptive mode, 60.0±11.9% on full mode). Indeed, Fig. 9a shows that, when using the transparent mode data as source domain, the network can produce predictions that correctly follow, on average, the gait cycle of the assisted walking conditions, while the network from free walking source data fails. No significant differences were found between classifying data from either adaptive or full modes for both the networks from transparent mode ( p = 0.998) and free walking ( p = 0.995) source data. Both the transparent mode and the free walking networks show a drop in accuracy when the target data are from a different condition than the source data (Supplementary Table S1) with respect to the accuracy on the data of the same condition (Table II). However, the performance reduction for the network trained with transparent mode data is not statistically significant on either the target data from adaptive ( p = 0.167) or full modes ( p = 0.219). Conversely, the network trained with the free walking data shows a significant reduction in accuracy on both the adaptive mode data ( p < 0.001) and the full mode data ( p < 0.001).

C. Gait Classification Performance
Taken together, the gait classifiers show higher performance in classifying samples from the swing phase (positive class) rather than the stance phase (negative class), as shown in the confusion matrices of Fig. 9b, and this difference is significant for both the transparent mode ( p < 0.001) and the free walking condition ( p < 0.001). Nevertheless, the stance recognition rate for the transparent mode significantly exceeds the chance level [47] in both target domains, while the free walking does not. Finally, both networks show higher performance in classifying the right swing (transparent mode 90.7 ± 7.1%, free walking 77.2 ± 19.2%) than the left swing (transparent mode 76.5 ± 10.9%, free walking 68.1 ± 34.6%), and this difference is significant for the transparent mode ( p = 0.002).

IV. DISCUSSION
This study addressed the extent to which the brain and muscular activity during exoskeleton walking is modulated by the device modes (full support, adaptive, or transparent). A hot topic in neurorehabilitation and assistive robotics is to single out the contributors to human-robot interaction. In a clinical perspective, if a robot impinges too much in terms of constrained biomechanics and/or increased metabolic rate, this might not be the ideal device. Our research aims to contribute new knowledge to address this issue: the assumption is that a robot in a transparent mode, as stated by the terminology to describe the mode itself, is an electromechanical device which fully adapts on-line to voluntary movements of the user with no resistance expected. On these grounds, the research question asks how different exoskeleton settings affect neural activity, implying that a fully transparent exoskeleton should ideally not substantially differ from a free overground walking. This is a crucial point to address in the quest to identify effective training modes in neurorehabilitation: if we want to boost true recovery after a neurological lesion, we need to provide training modes which promote restoration of physiological brain-muscular activity and natural gait restoration. Singling out which training modes provide better neurophysiological activation and embedding them in standard neurorehabilitation protocols should improve motor outcomes of people with central nervous system lesions.
Our experimental paradigm is one of the few recording EEG and EMG data during overground exoskeleton walking. Previous literature reported data from treadmill walking [17], [48], which reduces the technical challenge of mobile EEG and has the advantage of a relatively fixed head position of the subject, also allowing use of wired acquisition systems. Related works in unconstrained overground walking employed single joint exoskeletons [49], [50], [51] or did not consider different exoskeleton assistive modes [52]. We did not compare our results with those studies reporting on neurophysiological measures (EEG, EMG) during exoskeleton assisted walking on a treadmill, given the physiological demands of treadmill walking imply an external pacer to gait and may affect spinal Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
control (for an in-depth review of gait physiology please refer to [53]). Other studies which recorded EEG during exoskeleton training focused instead on learning effects on EEG along a standard clinical training with an exoskeleton providing assistive support (i.e. partial integration of the users' torques initiated by voluntary movement) [13]. Thus, to the best of our knowledge, this is the first study to demonstrate the neurophysiological differences between free walking and different exoskeleton walking modes in an overground walking condition. The focus is to contribute to the understanding of how human-robot interaction influences the cortical control of gait with the final aim of increasing neurorehabilitation outcome in future clinical applications.

A. Effect of Walking Condition on Neuromuscular Activity
To evaluate brain activity modulation under different walking conditions, we analysed the absolute variation of the ERSP during right and left legs' step according to equations (2) and (3). High positive values of E R and E L signal a sharp reduction of band power during step execution, confirming a stronger modulation of the EEG rhythms during locomotion. Indeed, all walking conditions exhibit alternating ERD and ERS during the swing and stance phases of gait (Fig. 3), with mu and low-beta ERD and ERS strongly modulated over mid-line channels (Cz, CPz, Pz). These results confirm previous data on EEG activity during locomotion [18], [54], [55], [56], [57], showing a power increase of sensorimotor rhythms (SMRs) (i.e., mu and beta bands) during doublesupport and push off, and a decrease during contralateral limb swing. In addition, our results show a stronger modulation of the centro-parietal mid-line SMRs during exoskeleton walking, irrespective of the mode, in the low-beta band. A likely explanation for this marked cortical activation during any mode of exoskeleton gait may be related to the intrinsic challenge of the task. Exoskeleton walking bears a high motor request [58], [59], ranging from balance control to triggering the exoskeleton step (i.e., in the assistive modes). We know that beta desynchronization is related to stronger sensorimotor integration, performance maintenance, and error monitoring [60], [61], [62], [63], phenomena which all take place during exoskeleton walking. Of note, all our study participants were naive to the device and thus were challenged more in this regard than pre-trained users [64], [65].
Another potential explanation for the stronger neural activity observed during EKSO walking might be related to gait physiology. In healthy individuals, free overground walking is an automated motor task, which involves planning, voluntary activation at gait initiation and modification, which then becomes mostly automatic through sub-cortical mechanisms [53], [66], [67]. In contrast, exoskeleton walking requires more active and consistent motor control, with a large cortical contribution. The neural networks activated during physiological gait in comparison to robotic gait (i.e., sub-cortical vs. cortical) generate diverse field potentials, reflected by the different power spectra recorded during the two tasks.
The findings of the EMG analysis further support the aforementioned explanations of the EEG findings. Contrary to expectations, the walking modes of the exoskeleton did not induce a reduced EMG activity of the muscles assisted by the actuated exoskeleton joints (i.e., VL and BF, Fig. 8b). This result is in line with previous studies comparing muscle activity during walking with and without exoskeleton in healthy subjects [38]. This aspect was hypothesized to be related partially to the contribution of the afferent sensory feedback to the pre-programmed motoneural drive [68] and partially to the active participation required of the user to trigger the exoskeleton assistance. This prevents the subjects from being completely relaxed even in the fully assisted mode [38]. On the other hand, the reduced TA and GL amplitudes observed, characterized particularly during the assisted exoskeleton walking conditions (i.e., adaptive and full modes) can be explained in the light of the EKSO GT mechanical structure that constrains the ankle kinematics, inhibiting their contribution during the push-off and load acceptance phases. Our results also showcase a reorganization of EMG patterns under the interaction with the exoskeleton dynamic (Fig. 8c). This phenomenon could be regarded as an alteration of natural muscle activity coordination induced by the exoskeleton assistance. Nevertheless, we identified this significant reorganization -even if less pronounced -also in the unassisted transparent mode. In addition, the most significant modifications were found in the BF (hip extensor and knee flexor muscle) and TA (ankle dorsiflexor muscle) whose activation was previously found to be the most altered during balance-perturbed walking [69]. These considerations suggest that the physical interaction with the exoskeleton imposes an important challenge in motor coordination and balance control during a walking task which is reflected in modifications in the cortical control of gait.
Another relevant finding in this study derived from ERD/ERS alternation over time, is the bilateral sensorimotor activation (Fig. 3). A subtle lateralization is particularly evident in the topographic distribution of the statistical difference between the walking conditions reported in Fig. 6. In more detail, the topographic maps of the two legs are characterized by higher statistical differences in the ipsilateral parietal cortex and in the contralateral frontal cortex, particularly in the alpha and beta frequency bands. This neural activity is commonly observed during treadmill [17], [70], [71] and overground walking [60] and may be related to balance control and upper limb swing [72]. Conversely, during exoskeleton walking upper limbs were activated by the use of crutches for stabilization. We did not use sensorized crutches since these data were beyond the scope of our study. In fact, regardless of the assistance mode, healthy volunteers use crutches mainly for safety reasons to avoid loss of balance but, in research settings, they might be discarded [73]. Nevertheless, we are confident that the strong neural modulation differentiating exoskeleton walking from free overground gait reflects a true gait-related phenomenon, since it displays a univocal, clear-cut topographical distribution over the central cortex, corresponding to the somatotopic lower limb representation [74], [75]. In addition, our finding is supported by previous studies [49], [51] showing a change in the lateralised brain activity associated with exoskeleton support even in the absence of passive support systems for balance maintenance.
Here, we also observed a stronger neural activity during right lower limb movement. This asymmetry is also paralleled in the EMG results showing higher statistical differences between walking conditions in the right leg muscles. Hemispheric dominance is known to play a role in arm preference and target location [76], with limb dynamics more developed for the right upper limb, and stabilization more developed for the left upper limb. Asymmetries between dominant and nondominant lower limb have also been described for some bilateral activities such as gait [77]. These interlimb differences emerge when a person cannot walk at the preferred speed. When walking in the context of a pathological condition (i.e., an individual with hemiparesis) or during exoskeleton-assisted gait, speed cannot be optimized from a biomechanical point of view and a stronger lateralised activity could emerge, as might have been the case in our experiments.
In this study, a relevant theta modulation was observed over the frontal channels during all exoskeleton walking modes. This modulation is likely to be related to the cognitive load induced by exoskeleton walking [71], [78], [79]. In fact, active exoskeleton assistance (i.e., adaptive, full modes) induces a stronger frontal-midline theta (FMT) modulation (Fig. 5b), although the dual-task of spatial navigation and ambulation [80] induces a minor theta rhythm modulation, also during overground free walking.
Taken together, these findings support the view that the physical interaction between the user and the exoskeleton, coupled with the cognitive demands of exoskeleton walking, influences brain rhythms modulations. During exoskeleton walking, the cortical sensorimotor areas are more actively engaged in the generation and ongoing maintenance of the gait pattern by programming and monitoring the execution of each step. Similar results have been found in human-robot comanipulation studies [81] showing higher EEG beta activity when a user is physically interacting with a robot. The fact that no statistically significant differences have been found in our study between free walking recordings before and after the use of the exoskeleton (Fig. 7) further support the hypothesis that the human-robot physical interaction plays the key-role in inducing the modifications in the brain activity during locomotion.
These findings, which need to be replicated in additional studies, represent an important step toward the adoption of robotic exoskeletons in gait rehabilitation. Specifically, we showed that exoskeletons produce stronger activation of the brain areas associated with movement generation which, if combined with increased patient's engagement in the training [82], could promote positively neuroplastic changes towards restoration of functional gait.

B. Effect of Walking Condition on Gait Classification
In gait classification, accuracy values in the same walking conditions (Table II) show that the proposed deep neural network can classify the swing and stance phases of the gait cycle with comparable performance to similar approaches [14], [26], [42]. These results confirm the existence of discernible information in the EEG power spectrum correlated to the gait cycle in all the walking conditions examined. Comparison of the performance achieved by the proposed network and the other state-of-the-art approaches is reported in Supplementary  Table S1. As expected, the machine learning methods achieved significantly lower performance than the deep learning counterparts, even if with classification accuracy above the chance level, in line with the results from previous studies [26], [42], [43]. Also the network employing only the CNN architecture did not show satisfactory accuracies. This is also not unexpected as previous studies highlighted that the encoding of gait-related temporal features in the network using recurrent layers has been demonstrated to be the key for achieving high gait classification performance [26], [43]. Indeed, the network employing only the LSTM architecture obtained higher results than the CNN in all the walking conditions, strengthening the importance of temporal encoding in gait classification. Nevertheless, the proposed CNN-LSTM network architecture obtained the best performance by combining the processing of spatial-frequency features in the convolutional layer with the memory-based capabilities of the recurrent layers.
Here, we also considered how the gait classification performance changes when the networks are trained and tested on data from different walking conditions. This analysis can be accounted as a transfer learning problem in which the networks are trained on the data with no exoskeleton assistance (i.e., free walking, transparent mode), as source domains, and tested on the data in which the walking is assisted by the exoskeleton (i.e., adaptive mode, full mode), as target domains. This choice was made to simulate a real usage of the BMI in the context of gait rehabilitation. Indeed, the application of the proposed BMI for gait classification is for a rehabilitation scenario of people with gait impairment, but with residual motor activity (e.g., stroke survivors) for whom the goal of the training is the restoration of functional gait. In this setting, the idea is that at the beginning of the therapy period the patient first conducts a traditional gait rehabilitation session (e.g., gait training between parallel bars) with or without the exoskeleton in transparent mode. The data collected during this session will be then used to calibrate the gait classifier. In the following sessions, the pre-trained classifier can be used to activate the walking program of the exoskeleton in one of the two assistive modes, replacing the currently used humanrobot interfaces (e.g., body weight shift). In this classification scenario, we show that the natural free walking protocol is not a suitable condition to calibrate a BMI for controlling a robotic exoskeleton. The reasons for this drop of performance can be explained considering the previously discussed differences in neural modulation between walking with and without an exoskeleton. This additional analysis strengthens the findings discussed in the previous section, showing that the significant differences that we found in the grand-average gait-related neural features have also a significant impact in the creation of a within-subject BMI for gait classification. Even if we found no significant differences between the exoskeleton walking conditions in the ERSP analysis, the transparent mode classifier still showed a reduction in performance metrics when classifying gait in different exoskeleton modes. This was not an unexpected finding as we applied no domain adaptation techniques to help match features between different Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
conditions [83]. Thus, there may be differences in the withinsubject datasets that are not significant in the grand-average, but that could affect the classification performance when transferring the network between different walking conditions. Nevertheless, the reduction of the transparent mode network was less than 5% in accuracy and not statistically significant, suggesting that the user presents similar gait-related brain activity independent of the exoskeleton assistance, in line with the findings of the ERSP analysis and negating network overfitting of data from a specific walking condition.
This result highlights the importance of tailoring the procedure for creating a BMI-driven technology to the specific field of application. This aspect is in line with recent studies investigating the BMI performance under different calibration paradigms [84]. The modifications, induced by a robotic exoskeleton, to how our brain controls gait generation have received limited attention in the literature to date. However, here we show that this effect cannot be overlooked: the different brain activity observed between free walking and exoskeleton walking is meaningful not only from a neurophysiological perspective, but also from a practical point of view in how a calibration protocol for the training of a BMI for gait classification is defined.

C. Limitations
The study has some limitations. Firstly, although there was a relatively small number of recruited subjects, nevertheless it was sufficient to provide significant results. All study participants were non-disabled, leaving an open question on how brain activation in a robotic gait device responds in individuals with brain pathology (e.g., after stroke) and how to translate these findings to meaningful neurorehabilitation. The study focuses on a single session with the aim of disentangling different physiological reactions of diverse support levels of the EKSO, in a perspective of human-robot interaction. From a technical point of view, the processing pipeline we adopted is not compatible with an online application. In particular, we used the ICA to remove the majority of artifacts from our EEG dataset, which can be employed in offline analysis only. However, the aggressive EEG cleaning approach we used was necessary to ensure that our results were not, or minimally, affected by artifacts.
Another aspect that should be discussed is the potential effect of the noise produced by the exoskeleton motors (48 dB). However, it has been shown that significant brain response is generated for sounds with amplitude above 60 dB and mostly in the higher frequencies (>50 Hz) of the gamma band [85] that were not considered in our analysis. In addition, the primary brain area involved in the processing of sounds is located in the temporal lobes whose activity is visible in the most external channels that were removed during the preprocessing. Thus, we are confident that the noise produced by the exoskeleton did not severely affect the EEG measure and the differences that we see between free walking and exoskeleton walking cannot be attributed to this effect.
A limitation of the used decoding approach is related to the difference in performance obtained between the recognition of the swing and stance phases (Fig. 9). This difference can be primarily attributed to the unbalanced data samples between the two classes. Even if this unbalance has been partially attenuated through the use of a weighted cost function (see equation (7)), the limited time length of the double stance phase makes its decoding by the LSTM layers difficult. Future developments should consider data augmentation techniques of time series [86] to achieve higher performance in the recognition of the stance phase. Moreover, it is worth noting that the objective of this study is not to propose a BMI for real-time gait classification that could be directly used as control input for a robotic exoskeleton. Lastly, a potential confounder to take into account might have been a learning effect during the session. To mitigate this effect, we designed the experimental protocol with a random order of EKSO modes.

V. CONCLUSION
We demonstrated how neural activity differs during exoskeleton gait compared to free overground walking. Of interest, the progressive degree of assistance provided by the robot (from transparent to full assistance) does not substantially modify brain and muscular activity, suggesting that the major modulation is related to the externally imposed motor pattern dictated by the device and the associated attentional tasks in healthy participants. These findings lay the ground for gait cycle classification during exoskeleton walking, confirming that training of the algorithm may only be possible on exoskeleton gait trials (i.e., transparent mode). Taken together, our data reinforce the view that robotic gait training may contribute to motor networks reactivation and that future BMI implementations need to consider the complex interaction of the human body with the device to achieve robust and reliable performance.