An Adaptive Brain-Computer Interface to Enhance Motor Recovery After Stroke

Brain computer interfaces (BCIs) have been demonstrated to have the potential to enhance motor recovery after stroke. However, some stroke patients with severe paralysis have difficulty achieving the BCI performance required for participating in BCI-based rehabilitative interventions, limiting their clinical benefits. To address this issue, we presented a BCI intervention approach that can adapt to patients’ BCI performance and reported that adaptive BCI-based functional electrical stimulation (FES) treatment induced clinically significant, long-term improvements in upper extremity motor function after stroke more effectively than FES treatment without BCI intervention. These improvements were accompanied by a more optimized brain functional reorganization. Further comparative analysis revealed that stroke patients with low BCI performance (LBP) had no significant difference from patients with high BCI performance in rehabilitation efficacy improvement. Our findings suggested that the current intervention may be an effective way for LBP patients to engage in BCI-based rehabilitation treatment and may promote lasting motor recovery, thus contributing to expanding the applicability of BCI-based rehabilitation treatments to pave the way for more effective rehabilitation treatments.


I. INTRODUCTION
D ESPITE great efforts in stroke rehabilitation over the past decades, stroke is still one of the leading causes of disability and death worldwide, and its global burden is gradually increasing [1]. Recently, several advanced rehabilitative intervention approaches, such as robot-assisted treatment [2], vagus nerve stimulation [3], constraint-induced movement therapy [4] and functional electrical stimulation (FES) [5], have been developed to restore motor function and have shown potential benefits for stroke patients. In particular, a motor imagery (MI)-based brain computer interface (BCI), which merely requires patients to imagine movements without performing actual physical movements, can enhance motor recovery for stroke patients with severe paralysis by inducing brain plasticity and functional reorganization [6], [7].
Recently, several studies have demonstrated significant clinical advantages in stroke patients if MI-based BCI was coupled with other interventions, e.g., rehabilitation robotics [8], virtual reality (VR) [9] and FES [10]. Murguialday et al. recruited 30 chronic stroke patients to investigate the efficacy of an MI-based BCI, and more significant motor improvement was observed in the BCI group that received MI-triggered orthoses feedback than in the control group that received random orthoses feedback [8]. Pichiorri et al. studied 14 subacute patients who performed MI training tasks with BCI-based VR feedback versus 14 patients who performed training tasks without BCI intervention; the authors reported a better motor functional outcome in the former group [9]. Biasiucci et al. investigated the efficacy of integrating an MI-based BCI with FES in a randomized control trial (RCT) with 27 chronic patients. The results showed that the BCI-FES group exhibited more significant functional recovery than the sham FES group [10]. Chen et al. reported that 16 stroke patients who received the treatment of MI-BCI-controlled FES achieved more effective recovery than those who received passive FES therapy [11]. Sinha et al. reported that BCI-based FES intervention involving 23 stroke patients could facilitate interhemispheric connectivity changes and upper limb motor recovery [12]. In addition, Sebastián-Romagosa et al. explored the clinical effect of combining an MI-based BCI with multisensory feedback (FES and VR) on upper limb motor rehabilitation using a recoveriX system [13] [14]. The authors reported that 51 stroke patients in [13] and 34 stroke patients in [14] achieved significant functional improvements after the intervention. Remsiket et al.also reported that 3 stroke patients obtained upper limb motor recovery using an MI-based BCI system with multimodal feedback, including visual feedback, FES, and tongue stimulation [15].
Nevertheless, MI-based BCI interventions still face several challenges. For instance, there is much variation in MI-BCI performance not only across subjects but also at different times within subjects [16]. Therefore, a fixed task difficulty in nonadaptive BCI interventions may be mismatched with the subject's BCI performance, and it is difficult for patients to maintain active patient engagement, especially for those with low BCI performance (LBP), during rehabilitation treatments. In addition, almost 20∼30% of subjects cannot generate controllable brain signals in MI [17]. Although studies have reported that intensive MI training can enhance the performance of LBP subjects before actual BCI control [18], [19], the performance improvement in some subjects is limited even after several months of training [20]. In general, sufficient BCI performance is required for BCI-based rehabilitation treatments. Ang et al. considered that the relatively LBP was functionally similar to BCI with random feedback, which had been proven to have no significant contribution to stroke recovery [21]. In the authors' three clinical trials, stroke patients whose BCI performance was below the chance level were excluded from rehabilitation treatments [22], [23], [24]. Currently, few studies have been conducted to investigate the clinical efficacy of BCI interventions in stroke patients with LBP.
Active engagement in rehabilitation training is essential to promote motor recovery and functional reorganization [25]. Several studies have noted that feedback, which was provided by a recoveriX system while patients performed MI tasks, could be used to monitor patients' engagement [14], [26]. Moreover, multimodal feedback through VR and FES in particular has been suggested to promote effective engagement and immersion of patients in MI tasks [27].
Here, we proposed an adaptive BCI intervention method that combines MI with VR and FES with the capacity to modulate task difficulty to adapt to the BCI performance of individual stroke patients. This intervention not only provided a feasible way for LBP stroke patients to participate in BCI-based rehabilitation treatment but could also reduce the impact of unstable BCI performance on patients' motivation to engage in rehabilitation treatment. We conducted a double-blind RCT in 33 subacute stroke patients to evaluate whether the proposed intervention could yield significantly better clinical efficacy on upper extremity motor recovery for the BCI group than for the control group. In addition, in the BCI group, we further investigated the clinical benefit of the proposed intervention in patients with LBP and compared it to that in patients with high BCI performance (HBP).

A. Patients
Thirty-three subacute stroke patients at Guangdong Work Injury Rehabilitation Hospital were sequentially enrolled and randomly allocated to the BCI group or control group by one investigator. This trial was a double-blinded design, with all the patients, the experimenters, and the therapist blinded to group assignments. Specifically, the investigator assigned two different experimenters who carried out the experiments for the BCI and control groups, respectively. The experimenters conducted the interventions, recorded the experimental data, and were unaware of the group allocations. The therapist who performed all functional assessments was blinded to the group allocations. This study was approved by the local ethics board (approval number: AF/SC-07/2020.03), and each patient gave informed consent prior to their eligibility assessment. The inclusion criteria were as follows: 1) cerebral infarction or cerebral hemorrhage caused by stroke, 2) unilateral cortical lesion or subcortical lesion, and 3) inability to actively extend the affected wrist. Patients were excluded if they suffered from contraindications to electrical stimulation, epilepsy, or cognitive disorders or were implanted with a heart pacemaker. In contrast to previous studies [21], [22], [23], [24], LBP patients could also participate in the experiment. The patients' demographic and baseline clinical assessment results are illustrated in Table I.

B. Interventions
All patients underwent 18 treatment sessions (1 session per day and 5 sessions per week) within one month, and a session consisted of two runs, with 40 trials per run. The interval between the two runs was 2∼5 minutes, according to the patient's needs. Each treatment session lasted approximately 40 minutes.
For the BCI group, each trial began with the audio instruction "prepare"; after 2 s, the instruction "extend the wrist" was presented for 1 s. The patient was then asked to perform the MI task by imagining the extension of the affected wrist for at least 15 s. During this period, the adaptive BCI system performed MI detection every 200 ms and employed its output to control the movements of the virtual wrist, providing real-time feedback to the patient. Once the upward bending angle of the virtual wrist reached the predefined maximum value within 15 s, the BCI system sent a control command to activate FES, and the trial finished with the affected arm receiving FES treatment for 3 s; otherwise, the trial was terminated without FES therapy (regarded as a trial with task failure). The interval between two trials was 8 s. See Fig. 1 or the Supplementary video for more details about the treatment session. Before each treatment session, each patient was required to perform a calibration session of 60 trials, which consisted of 30 wristextension MIs and 30 rests in random order. In each trial, the patient was instructed to either extend the affected wrist or rest for 5 s. The procedure of a trial was similar to that of the treatment session, except for the task execution time of 5 s and the intertrial interval of 2 s without visual and FES feedback. The calibration session lasted 10 minutes, excluding the time for preparation and device setup. The collected EEG data in the calibration session were used to train the support vector machine (SVM) classifier.
Patients in the control group wore identical hardware equipment, received identical task instructions, and performed the same MI task of extending the affected wrist as those in the BCI group; however, there was no BCI intervention. In general, the FES trigger time of each trial for the patients in the BCI group was different due to the variation in BCI performance. To simulate the uncertainty of the FES trigger time while maintaining the similarity of the FES trigger time between the BCI and control groups, the FES trigger time for the control group was set to a random value in the range of 8.3∼11.5 s, which was estimated from the time required by the first three patients in the BCI group.

C. Functional Electrical Stimulation (FES)
FES was induced via a stimulator (Motiontim 8, Krauth & Timmermann Ltd., Germany). Two electrodes were placed on the extensor carpi radialis and extensor digitorum of the affected arm. According to a previous study [28], the stimulation frequency and the pulse width were set to 20 Hz and 300 µs, respectively, while the stimulation current amplitude (ranging from 10 to 30 mA) was set individually for each patient so that the maximum movement angle of the affected wrist joint could be obtained in a comfortable manner. During the treatment, the stimulation current was gradually increased from 0 mA to the preset value within 1 s, and then this value was kept for 1 s before being gradually reduced to 0 mA in the next 1 s.

D. Adaptive BCI System
Some stroke patients, especially those with severe paralysis, have difficulty in MI-based BCI control, and thus, they may not be able to use the MI-based BCI system for rehabilitation treatment [21]. To enable all stroke patients with different BCI control abilities to participate in rehabilitation treatment, we designed an adaptive BCI system that can provide online assistance for patients where assistance is needed, e.g., when BCI performance is deficient.
As shown in Fig. 2, for each update of the virtual wrist movement, the motion intention of patients s r and the task completion information (s i and s min ) were first estimated. Based on this estimate, we evaluated the control performance of the patient by calculating two indexes (assistance degree d assistance and failure probability P f ailur e ). Next, the control weights of the user and machine (k u and k m ) were dynamically distributed based on the results of the performance evaluation. Last, the final score s f was calculated as the output of the BCI system and multiplied by the angular velocity ω to determine the motion angle of the virtual wrist for the current update.
1) Motion Intention Detection: The procedure for detecting patients' motion intention from EEG signals, as detailed in our previous studies [29], [30], mainly included the two parts described below.
Signal acquisition: The scalp EEG signals were acquired using a 32-channel Quik-Cap and NuAmps amplifier (Neuroscan Inc). The EEG signals were referenced to the virtual ground. As shown in Fig. 3, the channels were placed according to the extended international 10/20 system. The signal acquisition process did not include two channels for recording eye movements ("HEOG" and "VEOG", not displayed here). In addition, the EEG signals from channels "FP1" and "FP2" were susceptible to eye movement artifacts. Therefore, the signals from these two channels were not employed for MI detection. To assure the quality of the acquired signal, the experimenter examined and confirmed that all electrode impedances were stable and less than 5 k at the start of each experiment. The EEG signals were sampled at 250 Hz and bandpass filtered in the range of 0.05 to 100 Hz by the amplifier.
MI detection: MI detection was performed once every 200 ms. For each detection, we first extracted an EEG signal segment of 1000 ms ending at the current time point and then performed spatial filtering with common-average reference and bandpass filtering with a passband frequency ranging from 8 to 30 Hz. Next, a feature vector was formed by projecting the filtered EEG segment with a common spatial pattern (CSP) transformation matrix. Finally, a trained SVM classifier was applied to the feature vector, and then the predicted class and the corresponding output score s r of the SVM classifier were obtained to represent the motion intention. Here, the CSP Fig. 2. System architecture. s r , s i and s f denote the output score of the SVM classifier, the ideal output score, and the final output value of the BCI system for each update, respectively. s min is the minimum score required to extend the virtual wrist to the maximum angle. P failure reflects the possibility of task failure. d assistance indicates the extent of assistance. k m and k u represent the control weights of the machine and the user, respectively. transformation matrix and the SVM classifier were trained in the calibration session.
2) Task Completion Calculation: In each treatment trial, the angle of the virtual wrist was updated every 200 ms, and the ideal output score s i for each update can be calculated by where θ m is the maximum extension angle of the virtual wrist, ω represents the angular velocity of wrist movement for each update, and N is the total number of wrist movements. In general, the real output scores of the classifier are almost always different from the ideal output score due to the patient's control performance variability. Therefore, for each update, the minimum score s min required to extend the virtual wrist to the maximum angle needed to be estimated, and s min can be represented by where θ r is the remaining angle from the current angle of the virtual wrist to the maximum extension angle and N r is the remaining number of wrist movements. The ratio of θ m −θ r to θ m represents the current completion of the task as feedback to the patients.
3) Control Performance Evaluation: Frequently performing treatment tasks that are difficult to complete or easy to fail usually frustrates patients and increases their workload. In addition, it may even reduce patients' engagement in treatment tasks and impede treatment. Therefore, it is necessary to provide patients with assistance when the probability of task failure is high. However, too much assistance may easily result in dependence, such that the patients may not actively participate in BCI control; thus, too much assistance is not beneficial to rehabilitative treatment either. Based on these issues, two indexes, p f ailur e and d assistance , were employed to evaluate the patient's control performance.
The p f ailur e index was used to reflect the possibility that the treatment task was not completed within the specific timeout period in the current trial. For each update, the possibility of failure increased if the final output value s f of the BCI system was less than s min . The failure index can be represented as: where β is a constant to guarantee the highest likelihood of failure when the difference between s min and s r is beyond a value s min . The index d assistance was employed to evaluate the extent of assistance, which can be measured by the real output score s r of the classifier and the final output score s f of the BCI system. The greater the difference between the real output and final output, the greater the degree of assistance the patient obtained. This index can be defined as: where α is a constant to ensure that the degree of assistance was the greatest if s f − s r = s i .
For ease of comparison between different indexes, all indexes were normalized with negative exponential functions. 4) Control Weight Distribution: The control weights of the patient and the machine cannot be fixed beforehand due to the patient's variability in control performance. In the early stages of treatment, the patient may need more assistance, and the machine should be assigned a relatively large weight. As the treatment progresses, the patient becomes increasingly familiar with MI control, and the BCI system may assign more weight to the patient. Therefore, the control weights should be dynamically adjusted based on the results of performance evaluation. In addition, we should minimize the task failure rate to avoid patient frustration, and machine assistance should be reduced or terminated to encourage the patient to actively participate in treatment. Therefore, this problem can be represented by the following multiobjective optimization: where k m and k u represent the control weights of the machine and the user, respectively; s f is defined as a linear combination of s i and s r to avoid a drastic change; and σ is an assistant adjustment coefficient (σ = 0.8 in this study), which can ensure that the patient cannot complete the MI tasks (i.e., extending the affected wrist to the maximum angle) successfully if he or she is totally dependent on the machine assistance.
In general, the above two indexes are contradictory to each other if the patient's control performance is relatively low. For instance, reducing the possibility of failure increases machine assistance and vice versa. Therefore, it is difficult to obtain the absolute optimum solution for equation (5). A feasible solution is always to reduce the maximum index. This multiobjective optimization can be simplified to the single objective optimization as follows:

E. Functional Assessment
Functional assessments were performed before and after the intervention, as well as after 6 months of follow-up. We conducted the primary clinical outcome measure in terms of the Fugl-Meyer assessment for upper extremity (FM-UE) [31] and checked whether its changes achieved a minimal clinically important difference (MCID) of 7 points [9], [32]. In addition, secondary clinical outcome measures, including the manual muscle test (MMT) score [33] and the range of motion (ROM) of the wrist joint [32], were performed for each patient.

F. Neurophysiological Assessment
After a stroke, the nerve tissue in the damaged brain region tends to degenerate and undergo necrosis, and other distal undamaged regions also undergo secondary degeneration or reorganization, which results in extensive changes in the brain networks [34]. We conducted a neurophysiological assessment of the topological changes in networks using the graph theoretical approach [35]. First, we extracted the EEG signals of all the resting trials from the calibration sessions in the first and last interventions. The obtained EEG signals were then bandpass filtered in the range of 0.5 to 45 Hz, common-average referenced, and baseline corrected. Next, we eliminated the artifacts from EEG signals by independent component analysis (ICA). Finally, the preprocessed EEG signals in all the resting trials were segmented into 3 s resting-state epochs. To further reduce the artifacts, the epochs contaminated by eye or muscle movements were removed via visual inspection. Moreover, the affected side was uniformly oriented to the left hemisphere for all patients to facilitate group analysis so that all EEG channels were flipped to the opposite side for the patients with brain lesions in the right hemisphere.
After preprocessing, the brain networks were constructed using the directed transfer function (DTF) method, which can measure the information flow direction among brain regions [36]. To analyze the motor-related brain network, we focused on the sensorimotor rhythms (alpha rhythm: 8∼12 Hz and beta rhythm: 13∼30 Hz). For each rhythm, the directed network-based statistic (dNBS) approach [37] was employed to identify the significant networks of BCI patients, where the connectivity was significantly increased after intervention. First, we compared each edge of DTF matrices corresponding to the BCI patients before and after the intervention using a paired-sample t test and obtained a set of supra-threshold connections comprising the edge that had a significantly increased (p < 0.005) DTF value after the intervention. Second, all the possible connected components were identified from the supra-threshold connections, and the sizes of these components were then determined. Next, we computed the null distribution of the maximal connected component size using a nonparametric permutation approach (5000 permutations). Finally, we obtained the one-sided familywise error rate (FWER)-corrected p value for each component by counting the number of values within the null distribution that were greater than the real component size and dividing it by 5000. Based on the identified significant network, we measured the topological changes in networks for each patient in both groups before and after the interventions. Specifically, we calculated the clustering coefficient and global efficiency, which are defined as two elemental indicators of functional segregation and integration of brain networks [38].

G. Statistical Analysis
To analyze the significant within-group and between-group differences, we first applied the Lilliefors test to check the normality of the measured data. For normally distributed data, a one-sided paired t test or two-sample t test was employed for within-or between-group difference analysis, respectively. For the skewed distributional data, the one-sided Wilcoxon signed rank test was applied to detect pre-and postintervention differences, and the Wilcoxon rank sum test was performed to analyze the between-group differences. In particular, Fisher's exact test was used to analyze the significant differences in the data containing categorical information, such as gender, etiology, lesion side and lesion site. Bonferroni correction was applied for multiple comparisons.

A. Baseline Differences
As illustrated in Table I, there were no significant baseline differences between the two groups in age, gender, stroke time, etiology, lesion side, lesion site, FM-UE score, MMT score or ROM before the intervention. In addition, the analysis of BCI performance revealed no significant differences between groups at baseline. Fig. 4A showed that there were 8 BCI patients at the 1 st calibration session and 3 at the 18 th calibration session with an offline accuracy below the chance level; the patients' average offline accuracies increased significantly (1 st session = 65.7% ± 13.2%; 18 th session = 72.6% ± 13.4%, p = 0.027) after the intervention. In addition, the results showed a stable or slight increase in the average offline accuracy across all BCI patients over time in the intervention period (Fig. 4B). We also investigated online BCI performance in terms of the task failure rate across each treatment session. The task failure rate (expressed as a percentage) refers to the ratio of the number of task failure trials to the 80 total task trials in a treatment session. Note that if the patients did not control the virtual wrist to reach the predefined maximum angle through the BCI within the trial duration of 15 s, the trial was regarded as a trial with task failure. A significant negative correlation was observed between the task failure rate and the treatment session ( Fig. 4C; r= -0.66, p = 0.003). These results indicated that the BCI patients improved their BCI performance as the number of sessions increased.
We further analyzed the FM-UE results for the hand and wrist, which are vital to the independence of stroke patients. As shown in Fig. 5B-C, the results revealed significant improvements in the hand and wrist after the intervention in the BCI group (hand: p = 3.1 * 10 −5 , wrist: p = 0.002); however, only the hand (p = 0.002), not the wrist (p = 0.13), showed significant improvement in the control group. In addition, significant pre-post differences between groups were observed both in the improvements in FM-UE score of the hand (p = 0.04) and wrist (p = 0.001), indicating that the motor function of the hand and wrist in the BCI group improved significantly more than that in the control group. At the follow-up evaluation, both groups maintained improved FM-UE scores for the hand (post vs. follow-up, BCI: p = 0.62; control: p = 0.96) and wrist (BCI: p = 0.56; control: p = 0.86).

D. Neurophysiological Outcomes
For the alpha rhythm (Fig. 6A), the results showed that the significantly increased network comprised 52% of the ipsilesional hemisphere connections (IHCs), 30% of the contralesional hemisphere connections (CHCs) and 18% of interhemisphere connections (InterHCs). Based on this network, we calculated the network topological characteristics in terms of the clustering coefficient and global efficiency of the BCI and control groups before and after intervention and analyzed the correlations between their changes and FM-UE improvement. The results revealed significant increases in both the clustering coefficient and global efficiency for the BCI group For the beta rhythm (Fig. 6B), the ipsilesional hemisphere included the majority of significantly increased connectivity (IHCs: 53%; CHCs: 27%; InterHCs: 20%), and one of the regions with the highest degree was located in the ipsilesional primary motor cortex (M1). Importantly, the motor cortical connectivity between M1 and the ipsilesional premotor cortex (PM) was significantly increased in the BCI group. The clustering coefficient and global efficiency were significantly increased after the intervention for the BCI group (clustering coefficient: p = 3.9 * 10 −4 ; global efficiency: p = 1.2 * 10 −3 ) but not for the control group (clustering coefficient: p = 0.08; global efficiency: p = 0.19). In addition, the increase in global efficiency (r = 0.464, p = 0.01) was significantly and positively correlated with the improvement in FM-UE scores but not the increase in the clustering coefficient (r = 0.27, p = 0.149).

E. Comparisons Between LBP and HBP Patients
To investigate whether the proposed adaptive BCI intervention enables stroke patients, especially those with LBP, to participate in rehabilitation treatment, as well as to compare the achieved rehabilitation efficacy with those with HBP, we divided all stroke patients in the BCI group into two subgroups, i.e., LBP and HBP, based on whether their baseline BCI performance was below the chance level and conducted the same abovementioned analysis on these two subgroups.
Prior to the BCI intervention, no significant differences were found in demographic and baseline clinical scores between subgroups (see Table II). After intervention, only the LBP patients achieved a significant improvement in offline BCI performance (Fig. 7A, LBP: P < 0.05, HBP: p=0.3). In addition, we further analyzed the online BCI performance across LBP and HBP patients during the 18 intervention sessions. As shown in Fig. 8A, for the LBP subgroup, both the task failure rate and task completion time (which refers to the time required by the BCI to control the virtual wrist to reach the predefined maximum angle) had significantly negative correlations with the intervention sessions (task failure rate: Fig. 6. Significantly increased connectivity (p < 0.005, identified with the dNBS method) after intervention for the BCI group (left), the changes in topological characteristics of networks for the two groups pre-and postintervention (middle) and the correlation between the changes in topological characteristics and FM-UE score improvement (right). (A) Alpha rhythm and (B) beta rhythm. The channels in the ipsilesional M1 and PM are marked by red and purple, respectively. The EEG data from two patients in the control group were not included in the brain network analysis due to artifact contamination. Significant differences are indicated ( * * p < 0.005, * * * p < 0.0001, Bonferroni-corrected one-sided paired t test). Prior to the correlation analysis, the outliers, denoted with '+', were eliminated according to the Pauta criterion (3σ criterion). r= -0.796, p < 0.001; task completion time: r = -0.527, p < 0.05), and user weight had a significant positive correlation with the sessions (r = 0.891, p < 0.001), indicating that the LBP patients gradually achieved better online performance and obtained higher control weight along with the increase in sessions. However, there were no similar observations in the HBP subgroup (Fig. 8B). We also found that the control weight of both the LBP and HBP patients remained above 0.8 across all sessions, revealing that all BCI patients dominated the control of the rehabilitation tasks throughout the entire intervention period.
Regarding rehabilitation efficacy, both subgroups exhibited significant motor recovery in terms of FM-UE scores (Fig. 7B, LBP: p < 0.05, HBP: p < 0.005) after intervention. Moreover, both the clustering coefficient (Fig. 7C, LBP: p < 0.05, HBP: p < 0.05) and global efficiency (Fig. 7D, LBP: p < 0.05, HBP: p < 0.005) for the alpha rhythm were significantly increased for the two subgroups, whereas for the beta rhythm, only the HBP subgroup showed significant increases in the clustering coefficient (Fig. 7E, LBP: p = 0.12, HBP: p < 0.05) and global efficiency (Fig. 7F, LBP: p = 0.09, HBP: p < 0.05). However, there were no pre-post intervention differences in BCI performance, FM-UE scores, clustering coefficient or global efficiency for either alpha or beta rhythms between the two subgroups. These results indicated that LBP patients could obtain rehabilitation efficacy that was not significantly different from that of HBP patients.
In addition, we tracked the functional improvement in BCI patients with relatively poor BCI performance during the intervention. Specifically, we identified three patients whose average offline accuracies across all the calibration sessions were 56.9%, 51%, and 58.3%, which were all close to the chance level. After intervention, they recovered 2, 4, and 4 FM-UE points, respectively, all of which were far less than the average 9.8 points in the BCI group and close to the average 4.3 points in the control group. These results suggested that poor BCI performance during the whole intervention period may affect functional improvement.

IV. DISCUSSION
In this study, we conducted a double-blind RCT to investigate the clinical efficacy of an adaptive BCI-based FES intervention on upper extremity motor recovery in subacute stroke patients. The patients in the BCI group achieved more significant improvements in clinical outcomes than the control group, and the improvement in primary outcome can be retained for at least 6 months after the end of intervention, therefore reflecting that this BCI intervention can yield better  functional recovery with a long-term effect for stroke patients. Moreover, we further noticed that LBP patients, who were often excluded from previous BCI-based motor rehabilitation studies, had no significant difference from HBP patients in terms of improved efficacy.
Neurophysiological outcomes obtained from resting-state EEG may contribute to clarifying the possible mechanisms underlying the changes in clinical outcomes. There is increasing evidence that functional recovery after stroke is associated with the newly formed functional connections of restingstate networks. For instance, the postintervention increases in ipsilesional connections related to the recruitment of the affected hemisphere during the intervention have been proven to influence functional improvement [39], [40]. In particular, the increases in ipsilesional M1-PM connectivity with beta rhythm activity indicate greater motor gains after stroke [41]. In addition, the node degree of the ipsilesional M1 with beta rhythm activity was positively correlated with better subsequent motor recovery [40]. The analysis results for the BCI group were in line with these findings. Although new functional connections can compensate for impaired neural pathways to promote motor recovery, the outgrowth of new connections may result in network randomization, indicating that a nonoptimized reorganization may be involved in recovery [42]. There is solid evidence that the small-world properties of a high clustering coefficient and high global efficiency are generally present in the brain networks of healthy individuals [43]. After stroke, the topology of the brain network gradually shifts from a small-world pattern to a more random mode [44]. The simultaneously increased clustering coefficient and global efficiency in the sensorimotor rhythms only for the BCI group after the intervention were conducive to forming small-world networks, thereby preventing the brain network from degrading to a random mode. Moreover, we observed that the clustering coefficient and global efficiency at alpha rhythm were significantly positively correlated with the improvement in FM-UE scores. These findings indicated that the proposed intervention method promoted a more optimized functional reorganization during the recovery process of the affected limb.
In recent years, a few studies have suggested that BCI performance may influence rehabilitation efficacy in stroke patients as a significant correlation was observed between clinical gains and BCI performance [45], [46], [47]. Indeed, sufficient BCI performance is required for stroke patients to complete rehabilitation tasks in nonadaptive BCI interventions that depend entirely on their own BCI performance. Higher BCI performance can improve patients' confidence and motivation, which may further promote their active engagement in treatment [48]. Active participation in rehabilitation training is essential to promote motor recovery and functional reorganization [25]. However, several intricate factors, such as fatigue, frustration, motivation, and concentration, have been reported to affect BCI performance [49], [50]. Although intensive MI training can improve the BCI performance of healthy subjects [18], [19], it is extremely difficult for stroke patients to perform this training. Therefore, some studies had to identify LBP patients based on their baseline BCI performance in advance and exclude them from the BCI interventions [22], [23], [24], [51], limiting the clinical application of BCI interventions.
To increase patients' motivation and engagement in the BCI intervention, we introduced enriched visual and proprioceptive feedback. Motivation and active engagement contribute to enhanced BCI performance [52]. In addition, feedback provides a means of measuring task compliance and patient engagement and helps maintain patients' concentration [27]. To benefit more stroke patients, we proposed an adaptive BCI system that can provide appropriate assistance for patients when their BCI performance is low, so as to reduce patient frustration and enhance their enthusiasm. Therefore, the current study may somewhat minimize the impact of these factors, such as frustration and motivation, on BCI performance. We also conducted a comparative analysis of BCI performance and clinical benefits between the LBP and HBP subgroups in the current intervention. We observed that the BCI performance of the LBP patients gradually improved as the intervention progressed, which was consistent with a previous study that showed that the majority of LBP patients after stroke can obtain a significant improvement in BCI performance after 13∼22 BCI training sessions [53]. We also found that all patients in both subgroups dominated the rehabilitation tasks throughout the entire intervention period, with the control weight of the LBP patients during the rehabilitation tasks gradually increasing. This finding implied that the obtained rehabilitation efficacy of both BCI subgroups mainly benefited from their own MI, and as the intervention proceeded, the assistance the LBP patients received from the adaptive BCI intervention decreased. Furthermore, patients from both subgroups exhibited significant motor functional recovery after intervention. Most notably, the obtained motor rehabilitation efficacy of the LBP patients was not significantly different from that of HBP patients. Therefore, the current BCI intervention has been proven to be an effective way for LBP patients to participate in rehabilitation treatment and thus could increase the clinical benefits of BCI intervention.
A few studies have also investigated the clinical benefits of combining MI-based BCI with FES and VR on upper limb motor rehabilitation using a recoveriX system [13], [14]. This system can simultaneously provide real-time VR and FES feedback to the patient once the MI of the affected hand is detected. In comparison, VR and FES feedback in our study were provided separately to the patient at different stages. During the period when the patient performed MI, VR feedback was provided whenever MI was detected, while FES was provided as reward feedback only when the whole MI task was successfully completed. In this way, real-time VR feedback can facilitate the acquisition of the current completion of the MI task, so that the patient can regulate his or her strategy when needed, whereas rewarding feedback after completion is for increasing rehabilitation compliance [54] and promoting long-lasting retention of regained motor function [55]. In addition, the designed MI tasks in the current study are more challenging than the tasks in those studies [13], [14]. As shown in our results, the patient was required to perform continuous MI for an average of 10 s to complete an MI task. Another critical difference is that the virtual wrist in our study was controlled by an adaptive BCI system that provided appropriate assistance for the patient to perform the rehabilitation tasks when BCI performance was deficient. Such assistance can reduce patient frustration and may even stimulate more enthusiasm in completing the task. The studies in [13] and [14] reported that 51 and 34 stroke patients achieved improvements in FM-UE scores by 4.68 and 3.12 points on average, respectively. In comparison, the sample sizes in both of those studies were larger than that in our study, without a control group though.
It was not easy to assign the same number of FES treatments to the two groups in advance because the number of FES treatments in the BCI group was determined by the patient's BCI performance. To reduce the confounding effects of FES on the clinical outcomes, the patients in the control group were given more FES treatments per session on average than those in the BCI group (BCI: 63.7±11.4; control: 80). For the BCI group, no significant correlation between the increments of FM-UE scores and the number of FES treatments was observed (r = 0.16, p = 0.55). In addition, although FES for the control group was delivered randomly in time instead of by BCI activation, the patients generally believed that the FES was triggered by their motor imagination, as the therapist learned from the interviews with the patients after the experiments. To further test the possible impact of the FES trigger time on the clinical outcomes, we first compared the average trigger time between the two groups and found that there was no significant difference (p = 0.21) in the trigger time between the BCI (10 ± 1.2 s) and control (9.8 ± 0.9 s) groups. There was also no significant correlation between the average FES trigger time and the improvement in FM-UE scores (r = -0.03, p = 0.83). These results suggested that the differences in FES treatment between the BCI and control groups were unlikely to confound our clinical outcomes.
Despite these promising results, several limitations should be overcome in further studies. First, only 33 subacute stroke patients were recruited to participate in our intervention. The sample size was relatively small, and larger groups of patients and other types of patients (e.g., chronic stroke patients) are needed to reach more solid conclusions in the future. Second, the BCI intervention reported here required approximately 18 treatment sessions and 1 hour per session; and the optimal treatment intensity and the duration of each session in BCI-based upper extremity motor recovery warrant further investigation.