Real-Time Decoding of Movement Onset and Offset for Brain-Controlled Rehabilitation Exoskeleton
Robot-assisted therapy can deliver high-dose, task-specific training after neurologic injury, but most systems act primarily at the limb level-engaging the impaired neural circuits only indirectly-which remains a key barrier to truly contingent, neur…
Authors: Kanishka Mitra, Satyam Kumar, Frigyes Samuel Racz
Real-T ime Decoding of Mov ement Onset and Offset f or Brain-Contr olled Rehabilitation Exoskeleton Kanishka Mitra 1 , 2 , Satyam Kumar 2 , Frigyes Samuel Racz 3 , Deland Liu 2 , Ashish D. Deshpande 4 , 5 , Jos ´ e del R. Mill ´ an 2 , 3 , 6 Abstract — Robot-assisted therapy can deliver high-dose, task-specific training after neurologic injury , but most systems act primarily at the limb level—engaging the impaired neural circuits only indirectly—which remains a key barrier to truly contingent, neuroplasticity-targeted rehabilitation. W e address this gap by implementing online, dual-state motor imagery control of an upper -limb exoskeleton, enabling goal-directed reaches to be both initiated and terminated directly from non- in vasi ve EEG. Eight participants used EEG to initiate assistance and then volitionally halt the robot mid-trajectory . Across two online sessions, group-mean hit rates were 61.5% for onset and 64.5% for offset, demonstrating reliable start–stop command delivery despite instrumental noise and passive arm motion. Methodologically , we rev eal a systematic, class-driven bias in- duced by common task-based recentering using an asymmetric margin diagnostic, and we introduce a class-agnostic fixation- based recentering method that tracks drift without sampling command classes while preserving class geometry . This substan- tially improves threshold-fr ee separability (A UC gains: onset +56%, p = 0 . 0117 ; offset +34%, p = 0 . 0251 ) and reduces bias within and across days. T ogether , these results help bridge offline decoding and practical, intention-driven start–stop con- trol of a rehabilitation exoskeleton, enabling precisely timed, contingent assistance aligned with neuroplasticity goals while supporting future clinical translation. Project page, code, and supplementary videos: https://mitrakanishka.github. io/projects/startstop- bci/ . I . I N T RO D U C T I O N Despite decades of effort, robotic exoskeletons have yet to deliver clinically meaningful recov ery after stroke. While they provide scalable, high-dose, task-specific therapy , their effects remain modest [1][2]. A central limitation is that most robotic interventions act at the distal, mechanical lev el, with only indirect influence on the neural circuits that must adapt during recovery . In contrast, therapies gated by neural intent can align ef ferent dri ve with afferent feedback, a contingency known to promote activity-dependent plasticity [3]. Surface EMG triggers partially embody this idea by 1 Department of Electrical Engineering and Computer Science, Mas- sachusetts Institute of T echnology , Cambridge, MA, USA. Email: mitra819@mit.edu 2 Chandra Department of Electrical and Computer Engineer- ing, The Univ ersity of T exas at Austin, Austin, TX, USA. Email: { satyam.kumar, deland.liu } @utexas.edu, jose.millan@austin.utexas.edu 3 Department of Neurology , The University of T exas at Austin, Austin, TX, USA. Email: fsr324@austin.utexas.edu 4 W alker Department of Mechanical Engineering, The University of T exas at Austin, Austin, TX, USA. Email: ashish@austin.utexas.edu 5 Meta Reality Labs Research, Redmond, W A, USA. 6 Department of Biomedical Engineering, The University of T exas at Austin, Austin, TX, USA. coupling assistance to residual muscle acti vity , but they underperform when paresis is severe [4]. T o ov ercome these limitations, brain-computer interfaces (BCIs) decode motor intention directly from neural activ- ity . Motor imagery (MI) of fers a noninv asive BCI route to intention-contingent control: kinesthetically imagining an action—without executing it—elicits e vent-related desyn- chronization (ERD) over sensorimotor cortex in the µ (8– 13 Hz) and β (13–30 Hz) bands measured with scalp electroencephalography (EEG) [5][6]. MI-BCIs hav e been integrated with rehabilitation robots, yet most systems still rely on (i) a single discrete mental command that triggers complex gestures [7], which restricts the action repertoire, or (ii) maintaining the MI state during robot movement [8], which becomes brittle as propriocepti ve feedback and de vice artifacts mask the MI rhythms being decoded. A principled approach to intention-contingent robotic as- sistance lev erages the distinct neural signatures of MI onset (Start) and MI termination (Stop): one decoder initiates assistance against Rest, and a second decoder terminates assistance against Maintain-MI [9]. Detecting offset—not just onset—matters for rehabilitation. First, intention-gated cessation of assistance near a target supports assist-as- needed control, improving precision and safety by a voiding run-on torques and enforcing minimal necessary aid [10]. Second, reliable stopping supports agency and reduces user confusion—factors linked to engagement and motor learning in technology-mediated movement training [11]. Third, con- trolling offset trains inhibitory control, a core motor function associated with better dexterity recov ery post-stroke [12]. Finally , unchecked carry-through can reinforce maladaptiv e agonist–antagonist co-contraction, which is associated with poorer upper-limb function after stroke [13][14]. Prior work shows that MI onset and offset are separable and detectable in offline or pseudo-online analyses—including under pas- siv e movement—supporting the feasibility of start/stop-style control [9][15]. What has been missing is a real-time demonstration that both transitions can be decoded online to directly start and stop a rehabilitation exoskeleton, while (i) maintaining accuracy despite mov ement-e vok ed sensory feedback and robot operation distorting the signals, and (ii) mitigating EEG drifts that degrade online BCI performance. W e demonstrate online, dual-state MI control to initiate and terminate robotic assistance on an upper-limb exoskele- ton, providing a real-time solution to a key barrier in non- in vasi ve BCI-driven therapy . This is implemented using a geometry-aware (Riemannian) EEG pipeline paired with a Rest Rest Stop MI Detected Countdown Start MI Prompted g 5s 6s If miss or timeout , trial ends. Of fset NOT attempted. Onset/Of fset Control Robot moves Robot stops N C T N C T If hit , robot stops. If miss or timeout , robot continues reach. If hit , robot starts. Of fset attempted. 3s a b c d 6s f N C T 3…2…1… Fixation-based recentering e Fig. 1: Experimental setup, task timeline, and decoding pipeline for onset/offset EEG control of the Harmony exoskeleton. (a) Harmony (§II-B); (b) EEG cap; (c) stNMES pads under the cuff; (d) arm-mounted LEDs indicating trial phase (white: countdown; green: Start; red: Stop; blue: Rest); (e) fixation-based recentering (§IV -A); (f) subject-specific Riemannian decoders (§II-C); (g) three spatial targets defining goal-directed trajectories. Blue, green, and orange sliding windows depict EEG samples of shape N × C × T (trials × channels × time) with T=512 points ( 1 s at 512 Hz), as used in §II-C. Onset/of fset decisions and robot transitions follow the thresholding logic in §II-C and state machine in §II-C. class-agnostic, fixation-based recentering strategy that tracks EEG drift and significantly improv es pseudo-online perfor- mance. Our contributions are threefold. (1) T o our knowl- edge, the first online demonstration of dual-state MI control that both initiates and terminates robot assistance during mov ement using EEG in na ¨ ıve healthy users. (2) An online Riemannian decoder with subject-specific thresholds and state gating that maintains separability despite exosk eleton- induced variability . (3) Identification and quantification of bias during BCI operation and a technique to reduce it and improve performance. T ogether , these elements provide a practical foundation for intention-contingent, start/stop assistance aligned with assist-as-needed principles and neu- roplasticity goals—positioning MI-BCI with robotic control for successful clinical translation. I I . M E T H O D S This section describes the experimental design for EEG- based control of the Harmony exoskeleton, including the participant cohort and task protocols, the apparatus and con- trol architecture, the Riemannian decoding pipeline, and the neurophysiological and behavioral metrics used to e v aluate performance. A. P articipants and Protocol Eight health y , right-handed adults (mean age 24 . 25 ± 3 . 01 years; 1 female) participated after providing written informed consent (IRB protocol 2020-03-0073). This sample size was chosen in line with prior MI-BCI exoskeleton studies, where cohorts of 6-10 participants were sufficient to establish proof-of-concept for online control [15], [16]. EEG was recorded from 60 scalp locations using a 64- channel eego system (ANT Neuro, Germany) arranged ac- cording to the international 10–10 system while participants were strapped into the Harmony upper-limb rehabilitation exoskeleton (§II-B) (Fig. 1, a,b). Four channels (T7, T8, M1, M2) were excluded due to artifact susceptibility . Bipolar electrooculography (EOG) was recorded to reject trials with potential ocular contamination as described in [17]. The setup also included three LEDs mounted to Harmony’ s right arm (Fig. 1, d), whose color indicated the current trial phase. Participants were instructed to maintain visual fixation near the right-arm cue LEDs while attending peripherally to the limb and workspace, supporting somatosensory congruence during MI-dri ven control [3], [15]. The study comprised three sessions: one of fline calibration session with six runs of 20 trials, followed by two closed-loop online sessions described below . During the of fline protocol (Session 1), each trial followed a standardized, LED-cued timeline designed to elicit clear contrasts for Start MI and Stop MI. From a start posture (sitting, right arm by the side, elbo w at ∼ 90 ◦ , strapped to the exoskeleton), a trial began with 3 s rest, followed by a 3 s countdown indicated by sequential white LEDs (1 s each). Then, the LEDs turned green to cue Start MI; participants intentionally initiated right-arm MI. After 3 s of Start MI, the exoskeleton began a goal-directed reach tow ard one of three spatial targets positioned in front of the participant (Fig. 1, g). T argets varied across trials to span distinct movement di- rections, ensuring that Start/Stop MI decoding did not depend on any single kinematic pattern and demonstrating that the neural signatures generalize across trajectories. For training the Stop MI decoder , “Maintain” samples were taken during this movement period (i.e., participants continued Start MI while the robot mov ed). Three seconds after mo vement onset, the LEDs switched to red to cue Stop MI for 3 s; participants activ ely imagined bringing the ongoing reach to a halt while the exoskeleton continued to move the arm to ward the target. The robot then stopped, the LEDs turned blue to indicate rest for 3 s (participants were instructed not to perform any specific mental strategy), and finally , the exoskeleton returned to the home position, concluding the trial (total duration ∼ 21 s). This design cleanly contrasts MI initiation with the limb stationary versus MI termination with the limb moving, capturing both MI-related dynamics and movement- ev oked reafference under natural human–robot interaction. T o strengthen kinesthetic MI and provide effector -le vel feedback congruent with the intended action, we deliv ered sensory-threshold neuromuscular electrical stimulation (stN- MES; RehaMo ve3, Hasomed GmbH, Germany) via surface electrodes on upper-arm muscles (Fig. 1, c). During Start MI, stimulation targeted the triceps brachii (primary elbo w extensor engaged in reaching); during Stop MI, stimulation targeted the biceps brachii (antagonist elbow flexor) [18]. For each participant, the minimum intensity was set to the lowest clearly perceptible current (sensory threshold) and the maximum to 0.5 mA below visible contraction (motor threshold) and held constant within a trial [19]. During the online protocol (Sessions 2–3), each session implemented real-time decoding of Start MI and Stop MI to control the exosk eleton. Upon the cue for Start MI, participants initiated MI; after successful decoding of Start MI, the exosk eleton began to reach to ward a randomly selected target. Immediately after movement onset, the Stop MI decoder operated asynchronously (i.e., without an e xplicit stop cue). Participants were instructed to maintain the Start state during the reach and then intentionally transition to Stop MI when they judged their hand to be near the tar get, with the goal of halting the robot as close to the target as possible (Fig. 1, g), thereby testing whether they could volitionally titrate MI termination to achiev e spatial precision. T o balance task completion while minimizing user frustration, onset decisions were required within 5 s of the green LED cue (otherwise declared a miss), and of fset decisions within 6 s of mov ement onset (otherwise declared a timeout), consistent with [6]. If Stop MI was detected (§II-C), the robot halted in place, then entered a rest phase and returned to home. If the Stop MI command was missed, the robot completed a pre- programmed 5 s trajectory into the compliant (foam) target to allow benign ov er-tra vel, rested for 2 s, and then returned. T o substitute for the continuous visual feedback commonly used in MI-BCI training, we mapped stNMES intensity to the BCI output: intensity was scaled between participant- specific thresholds proportional to the posterior probability (Eq. 6). Triceps stimulation increased with Start MI e vidence, whereas biceps stimulation increased with Stop MI evidence, reinforcing the intentional polarity via an agonist–antagonist pairing and obviating a screen [3]. B. Harmony SHR ® Exoskeleton W e used the Harmony SHR ® exoskeleton (Harmonic Bionics, USA), a clinical-grade, bimanual upper-limb robot with se ven de grees of freedom (DOFs) per arm—including fiv e dev oted to coordinated shoulder motion that preserve natural scapulohumeral rhythm. Harmony can assist, resist, or challenge upper-limb movements while logging end- effector pose, joint kinematics, and kinetic v ariables. The BCI was integrated with Harmony over a low-latenc y UDP link so that the decoder directly gated robotic assistance in real time. The decoder output was a binary assistance gate, g bci ∈ { 0 , 1 } : detection of Start MI set g bci = 1 to enable assistance, and detection of Stop MI set g bci = 0 to remov e assistance—ev en mid-trajectory . When assistance was off, the controller continued to compensate for robot dynamics and enforce scapulohumeral coordination to keep the limb comfortable and stable. This created a simple neural-to- mechanical mapping for initiating and halting mov ement aid. The joint-space control torque was composed as τ control = τ dyn + τ shr + g bci · τ task (1) where τ dyn compensates robot dynamics (e.g., gravity/weight support, Coriolis/centrifugal, and frictional effects), τ shr en- forces scapulohumeral coordination [20], and τ task is the assistiv e term that tracks a predefined reach trajectory with an impedance-based policy using conservati ve stiffness and damping to yield smooth motion and lo w apparent inertia. The BCI gate g bci modulated only the assistiv e channel. Thus, when the gate was on, the robot guided the arm along the desired path; when off, the motion ceased smoothly under intrinsic damping while posture remained stationary due to the coordination constraints. C. T raining and Real-T ime Decoding W e decode MI with a Riemannian-geometry pipeline and a minimum-distance-to-mean (MDM) classifier [21]. EEG was band-passed (8–30 Hz) and common-a verage referenced. From a sample of length 1 s (updated e very 62.5 ms), we form a trace-normalized spatial covariance [16] Σ t = X ⊤ t X t trace( X ⊤ t X t ) ∈ R N t × N c (2) where X t ∈ R N t × N c is the preprocessed data in the current buf fer . Σ t is a symmetric positiv e definite (SPD) matrix and thus lies on the SPD manifold. Using the affine-in variant Riemannian metric (AIRM) on this manifold, the distance between two SPD matrices can be estimated as δ R (Σ 1 , Σ 2 ) = log Σ − 1 2 1 Σ 2 Σ − 1 2 1 F (3) where log ( · ) denotes the matrix logarithm and ∥ · ∥ F the Frobenius norm. This distance is in v ariant under affine transformations and has been used in online settings [21][22] for domain adaptation to mitigate EEG non-stationarity . Using the above-mentioned distance, we can estimate the mean of a set of covariance matrices, also known as the Riemannian mean. F or each class k ∈ { Start , Rest } or k ∈ { Stop , Maintain } , we estimate its Riemannian mean ( ¯ Σ k ) from the corresponding training covariances { Σ k i } : ¯ Σ k = arg min Σ ∈S ++ X i δ 2 R Σ , Σ k i . (4) Here, S ++ denotes the set of SPD matrices. In practice, the Riemannian mean is computed using an iterativ e gradient descent–based method [23]. Session-wise r ecentering (distribution alignment). T o mit- igate inter-session EEG drift, we recenter training and online cov ariances by their corresponding session means [21]. Let S train be the Riemannian mean of all training cov ariances pooled across classes, and let S online be a running Rie- mannian mean of recent cov ariances in the online session. Recentering is then performed using the square-root inv erse of these means as a whitening transform on corresponding training and online cov ariances. Distances for classification are then computed between the recentered class prototypes, ˆ Σ k, train = S − 1 2 train ¯ Σ k S − 1 2 train , obtained from training covariances, and the transformed online covariance ˆ Σ online = S − 1 2 online Σ online S − 1 2 online , estimated per sample using Eq. 2 from the online session [21]. MDM scor e, posterior mapping, and smoothing. For a giv en decoder (Start vs Rest, or Stop vs Maintain), we compute AIRM distances d k ( t ) = δ R ˆ Σ t , ˆ Σ k using Eq. 3 and map them to pseudo-posteriors with a softmax over negati ve distances, p k ( t ) = exp − α d k ( t ) P j exp − α d j ( t ) (5) where the temperature α > 0 is chosen from the offline ses- sion. T o suppress rapid fluctuations, posteriors are smoothed by an exponential moving average (EMA), ˆ p k ( t ) = (1 − β ) ˆ p k ( t − 1) + β p k ( t ) , (6) with β ∈ (0 , 1) tuned offline. Decision rule and thr esholds. Each decoder has a subject- specific decision threshold θ set from the offline session (R OC-based selection under a latency constraint). A com- mand is issued when the corresponding smoothed posterior first exceeds its threshold for a short hold-time (0.25 s); a brief refractory period is enforced to prevent rapid toggling. State machine and r obot gating. Online, both decoders run in real time with a 1 s buf fer updated every 62.5 ms. The Onset decoder is active from trial onset; when ˆ p Start ( t ) ≥ θ StartMI a Start decision is emitted and assistance is enabled, g bci ( t ) = 1 . After movement onset, only the Stop decoder remains active; when ˆ p Stop ( t ) ≥ θ StopMI a Stop decision is emitted and assistance is halted, g bci ( t ) = 0 . If no threshold is reached within the decision window , the trial is a timeout; if the opposite class crosses first, the trial is a miss. D. Neur ophysiological Analysis and P erformance Metrics 1) T ime-F r equency Analysis: W e computed time–frequency maps of EEG power throughout the trial using offline data (Session 1). Data were segmented with a 0.5 s sliding window , advanced every 1 / 16 s. Within each window , spectral power was estimated using W elch’ s method and con verted to a baseline-normalized index so that all frequencies are comparable. For each trial and frequency f , the baseline B ( f ) was the av erage spectral amplitude during the 1 s resting period immediately preceding the countdown; the power was then normalized as ERD / ERS( f , t ) = log 10 A ( f , t ) /B ( f ) , (7) where A ( f , t ) is the windowed spectral amplitude. Negati ve values indicate ERD (po wer suppression) and positi ve val- ues indicate event-related synchronization (ERS). Although ERD/ERS was computed at all channels, we present C3, the canonical EEG channel over left sensorimotor cortex contralateral to the right arm, and band-averaged ( 8 – 30 Hz) time courses. Subject-lev el maps were obtained by av eraging the log 10 -ratios across trials; group-lev el maps were formed by av eraging the resulting subject maps. 2) Online P erformance: W e analyzed the two online sessions (four runs per session, 20 trials per run). In e very trial, Start MI was prompted. A hit was recorded if the Start posterior crossed its threshold within the decision window; a miss if the opposite class crossed first; and a timeout if no decision was reached. Stop MI was ev aluated only on trials where Start had been successfully decoded (movement initiated), since termination can only be attempted once the robot is moving. For those trials, hit/miss/timeout were defined analogously using the Stop posterior and threshold. For each subject and session, we report the proportions of hit, miss, and timeout for onset and (attempted) offset; the primary online accuracy is the hit proportion. 3) T ime-Delivery Accuracy: Onset decoding time w as defined as the interval from the green LED cue (Start instruction) to the instant the Start posterior crossed its threshold. Offset decoding time was defined as the interv al from movement onset (assistance enabled, g bci = 1 ) to the instant the Stop posterior crossed its threshold. Only hits contribute v alid times. Timing is summarized per subject and session, and then at the group level to characterize central tendency and dispersion for onset and of fset decisions. I I I . R E S U L T S This section quantifies dual-state EEG–BCI performance using baseline-normalized time–frequency analysis of sen- sorimotor modulation, online onset/offset command-deliv ery outcomes (hit, miss, timeout), and decision latencies com- paring cue-locked onset with movement-lock ed offset. G r a n d A v e r a g e S p e c t r o g r a m , E l e c t r o d e C3 T i me (s) F r eq u en cy (H z ) Po wer (d B / H z ) 0 3 6 9 12 15 17 0 - 2 - 4 - 6 - 8 - 10 C o u n t d o w n Sta r t M I R o b o t M o v e s Sto p M I R o b o t Sto p s (r e s t) R o b o t R e tu r n s R e s t 30 24 21 18 11 8 15 27 Fig. 2: Grand average spectrogram from the C3 electrode showing changes in spectral power ov er the course of task trials. Data were obtained by averaging over all trials and all subjects. V ertical lines mark task ev ents (countdown, Start MI, robot moves, Stop MI, robot stops, Rest, robot returns). A. EEG Modulations during the T ask P aradigm The grand-av erage spectrogram at channel C3 of of fline data pooled across targets (Fig. 2) shows clear , event-related modulation of sensorimotor rhythms across the trial. Dur- ing the countdown, spectral power remains near baseline. W ith the Start MI cue, a pronounced µ -band ERD emerges and deepens throughout the Start MI period. As the robot begins to move, µ suppression persists with a modest de- pression extending into lo wer β , while a transient broad- band elev ation appears at higher frequencies—consistent with movement-related reafference. At the Stop MI cue, we observe a β -band ERS (increase in band po wer) that peaks shortly after imagery termination—the post-movement β rebound—supporting that MI termination is a distinct process from passiv e rest and aligning with prior reports of a stop-specific signature [9]. After the robot stops and rest en- sues, po wer trends back toward baseline. During the return- to-home phase, elev ated high-frequency acti vity co-occurs with a lingering µ ERD, reflecting proprioceptiv e/mov ement influences during the return trajectory . Similar ERD/ERS patterns were observed for all three target directions. B. Online Command Delivery Accur acy Group performance sho ws reliable dual-state control with distinct error profiles for onset and offset (Fig. 3). For Start MI (onset), the mean hit rate improved from 58% in Session 2 to 65% in Session 3. Errors were mostly misses (Session 2: 33.1%; Session 3: 30.5%), with timeouts rare (Session 2: 8.4%; Session 3: 5.9%). This indicates that participants generally produced a decisiv e class output when prompted, with fewer trials stalling without a decision in Session 3. For Stop MI (of fset), computed only on trials where a Start hit initiated movement, the mean hit rate was 66% in Session 2 and 63% in Session 3. Here, errors skewed toward time- outs rather than misses (Session 2: timeouts 22.0%, misses 0% 20% 40% 60% 80% 100% Percentage of T rials (%) 58% 65% 66% 63% Session 2 Session 3 Session 2 Session 3 Onset Offset Online Command-Delivery Accuracy Hit Miss Timeout Fig. 3: Online command-deliv ery outcomes. Stacked bars show group-mean outcome proportions (hit, miss, timeout) for onset and offset in Sessions 2–3; numbers indicate mean hit rate. Offset is computed on attempted trials only (i.e., trials following a successful onset). 12.4%; Session 3: timeouts 20.2%, misses 17.0%), reflecting the inherently more demanding asynchronous stopping task. Despite being issued during movement, offset performance remained comparable to onset, demonstrating consistent real- time initiation and termination using noninv asive EEG. C. T iming Dynamics Fig. 4 summarizes decision-latency distributions for Start MI (onset; cue-locked) and Stop MI (of fset; mo vement- locked to the onset of assistance), defined as the time from cue/movement onset to decoder threshold crossing (hits only). Onset decisions clustered around ∼ 1 s, with mean ± SD of 0 . 990 ± 0 . 953 s in Session 2 and 1 . 061 ± 1 . 001 s in Session 3. Offset decisions were predictably slo wer— as designed—because participants were instructed to stop nearer the target: 3 . 419 ± 1 . 050 s in Session 2 and 3 . 328 ± 0 . 998 s in Session 3. These latencies closely match the theo- retical optimum ( ∼ 3.2 s) implied by the reaching trajectories in the offline spectrogram timeline (Fig. 2). Most onset com- mands occurred within ∼ 1–1.5 s, whereas offset commands concentrated around ∼ 3–4 s with occasional long-latenc y trials. Session-to-session changes were modest relativ e to within-session variability . I V . D I S C U S S I O N This study shows that a nonin v asi ve BCI can start and stop assistance during ongoing mov ement of a multi-DOF upper-limb exoskeleton in real time. Framed this way , the interface is a simple intent-gated “go/stop” control well aligned with rehabilitation needs: an intentional start to launch a functional reach and an intentional stop to terminate near a goal, offering a practical middle ground between continuous control and preprogrammed motion. The neurophysiology supports this mapping. The spectro- gram (Fig. 2) shows robust µ -band desynchronization with Start MI and a clear β -band rebound after Stop MI. Cru- cially , these canonical signatures persist despite movement- related sensory feedback and instrumental noise: participants still produced µ -ERD at onset and β -ERS at offset. The Onset Offset 0 1 2 3 4 5 6 Decoding Time (s) Online Decoding Time Session 2 Session 3 Fig. 4: Online decoding time for hits only . V iolin plots show the distribution of decision latencies for onset (cue-locked) and offset (movement-locked to assistance onset) in Sessions 2-3; black bars indicate means. rebound is somewhat attenuated—consistent with the arm being moved and additional sensor noise partially masking the response—but the separation of states remains evident. That separation justifies dedicated onset and of fset decoders rather than thresholding a single stream. Online results sho w that onset command deliv ery im- prov ed between sessions and sho wed fe w timeouts (Fig. 3), while of fset achie ved comparable hit rates but with errors ske wed tow ard timeouts rather than misses. This pattern fits the instructions—participants attempted offset near the target—placing decisions close to the boundary; they typ- ically either hit or timed out, with comparati vely fe wer outright misses. Decision-time distributions (Fig. 4) are con- sistent: onset latencies cluster near ∼ 1 s, whereas offset is significantly slower as users time termination to the target rather than halting reflexi vely . A notable limitation of the online results warrants dis- cussion. Online BCI performance is acceptable but far from optimal. This is likely caused by the recentering process that transforms the online EEG samples to mitigate EEG drift ov er sessions. Next, we examine the effects of the con ventional recentering process that, due to the nature of the experimental protocol, creates a bias in the distribution of transformed online EEG samples with respect to the class prototypes. W e then introduce a new recentering method. A. Recentering Limitations and Pseudo-Online Alternatives Our recentering approach estimates a whitening reference S from the online EEG samples processed by the BCI— hence, task-based. This reference is then used to transform incoming covariances, and Riemannian distances are com- puted between the transformed cov ariance and the class pro- totypes. Operationally , this method seems natural: it attempts to align the distribution of covariances in the online session with that of the offline training data to reduce session-related shifts. Ho wev er , unlike con v entional BCI scenarios—where the reference is deriv ed from the ov erall distribution of both positiv e (Start MI, Stop MI) and negati ve (Rest, Maintain- MI) classes—our online protocol only provides samples from the positive (target) class. As a result, the recentering oper- Δ pos (Start-MI) Δ neg (REST) Δ sep −0.6 −0.4 −0.2 0.0 0.2 0.4 Δ vs S I (median margin) Δ sep vs S I : p=0.0078 Onset Δ pos (Stop-MI) Δ neg (Maintain-MI) Δ sep −0.6 −0.4 −0.2 0.0 0.2 0.4 0.6 Δ sep vs S I : p=0.0078 Offset Task Recentering vs Identity ( Δ Median Margin) Fig. 5: T ask-based recentering shifts class separation relative to S i ( ∆ median mar gin). Bars show the group-mean change in median mar gin, m = d neg ativ e − d positiv e , under task- based recentering versus the identity reference S i . Error bars denote 95% CIs across subjects (subject means over runs). ation effecti vely pulls the positi ve-class distribution tow ard the global center of the offline data, which includes both classes. This induces a bias that shifts positiv e samples closer to the offline mean, thereby increasing the likelihood of misclassification as the negati ve class. T o diagnose and visualize ho w task-based recentering biases the data, we quantify the role of each sample with a distance-dif ference score that tells us which class the recentered sample most resembles. W e first build two class prototypes from of fline data: a positiv e prototype (Start MI for the onset decoder; Stop MI for the offset decoder) and a negati ve prototype (Rest for onset; Maintain for of fset). During online decoding, for any incoming cov ariance Σ i , we measure two Riemannian distances (Eq. 3): d positiv e (from Σ i to the positi ve prototype) and d negati ve (to the negati ve prototype). W e then compute a single margin, m = d negati ve − d positiv e , (8) so m > 0 means the sample is closer to the positi ve class, and m < 0 means it is closer to the ne gati ve class. T o analyze the ef fects of task-based recentering, we also compute the margins using the identity reference (no whiten- ing; geometry unchanged, S i ), referred to as identity-based recentering. Then, we examine how the median margin shifts for the two references. W e define the mar gin shift for the positiv e samples and ne gati ve samples separately as, ∆ pos = ¯ m pos ( task ) − ¯ m pos ( identity ) (9) ∆ neg = ¯ m neg ( task ) − ¯ m neg ( identity ) (10) W e define a single metric capturing the change between classes, ∆ sep = ∆ pos − ∆ neg (11) Fig. 5 visualizes these values. For both onset and offset, ∆ pos < 0 and ∆ neg > 0 , so ∆ sep is strongly negati ve (paired W ilcoxon p = 0 . 0078 ). This means, when the reference is built from Start MI, Start MI samples’ margins drop (they look less distinctly Start relati ve to Rest), while Rest samples’ margins rise (they look more Start-like). When the reference is built from Stop MI, Stop MI samples’ margins drop, while Maintain samples’ margins rise. In both cases, the positive and negativ e score distributions move closer together, so they are less separable. With a single fixed threshold, more samples fall in the ambiguous middle, making decisions less reliable and degrading online BCI performance ov er time. Howe ver , if we remove recentering altogether , we fail to capture day-to-day EEG drift. Therefore, we propose a new recentering technique that uses a fixation-based reference built only from the pre-cue fixation period before each trial (Fig. 1, e). Critically , this reference uses samples that are class agnostic—i.e., these EEG samples belong neither to the positiv e nor the negativ e class. The method works as follows. Using online fixation sam- ples, the method performs five operations (i) compute covari- ances (Eq. 2) and a log-Euclidean mean; (ii) trim outliers on the SPD manifold—intuitively , we reject fixation samples that contain blinks or mov ement artifacts by removing the farthest 20% from the initial mean, measured by Eq. 3, and then recompute the mean; (iii) gently shrink the result tow ard the identity in the log domain, which regularizes the reference tow ard a neutral, class-agnostic distribution, log S fix = (1 − α ) log S raw (12) where S raw is the unregularized fixation mean, α is the identity-shrink strength (per run); (i v) apply eigen v alue (di- agonal) shrinkage for conditioning, so no single channel dominates and distances remain stable, S fix = V diag (1 − λ ) ℓ + λ ¯ ℓ 1 V ⊤ (13) where V and ℓ are the eigenv ectors and eigen values of the current S fix , ¯ ℓ is the mean eigen v alue, and 1 is a vector of ones; and (v) smooth across runs in the log domain to slowly track the drift, log S ( r ) fix = (1 − β ) log S ( r − 1) fix + β log S ( r ) raw . (14) where β is the across-run smoothing weight, with r indexing the run. W e used grid search to select hyperparameters: outlier rejection percentage = 0 . 20 , α = 0 . 25 , λ = 0 . 05 , β = 0 . 30 (requiring N min = 8 fixation samples to form a new reference; otherwise we reuse the prior run’ s reference). T ogether , these choices suppress outliers, keep the transformed online EEG samples in a neutral (class- agnostic) distribution, and adapt smoothly within and across sessions—precisely the behavior missing from task-based recentering. T o test the new S fix , we ran a pseudo-online analysis on the recorded online data. Each sample was recentered in two ways–once with the task-based reference and once with the fixation-based reference—and we recomputed the distance- difference margin m . W e then computed A UC per run for each recentering approach; because A UC is threshold-free, it is a fair comparison under EEG drift. Fig. 6 shows the results. W ith the fixation-based reference, onset A UC rises from 0 . 554 ± 0 . 291 (task) to 0 . 866 ± 0 . 073 S2,R1 S2,R2 S2,R3 S2,R4 S3,R1 S3,R2 S3,R3 S3,R4 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 AUC p=0.0117 Onset FIX T ASK Chance S2,R1 S2,R2 S2,R3 S2,R4 S3,R1 S3,R2 S3,R3 S3,R4 Session Number , Run Number 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 AUC p=0.0251 Offset AUC: T ask vs Fixation-Based Recentering Fig. 6: A UC by run for onset and offset under task- vs fixation-based recentering. Lines show group-mean A UC; ribbons denote 95% CIs. Inset boxes report paired W ilcoxon p -values for per-subject mean A UC differences (T ask − Fix). (fix), a +56% relati ve gain (paired W ilcoxon p = 0 . 0117 ). Offset A UC rises from 0 . 619 ± 0 . 266 to 0 . 832 ± 0 . 124 , a +34% gain ( p = 0 . 0251 ). Many per-run comparisons are also significant. Critically , across the Session-2 to Session- 3 boundary (S2-R4 to S3-R1), fixation-based A UC stays high while task-based A UC drops, indicating markedly better tolerance to between-day EEG drift. W e also recomputed the same distance-difference sum- mary from above as a single “separation change” ∆ sep . Fixation reduces the one-sided shift substantially . At onset: task = − 0 . 584 ± 0 . 242 vs. fix = − 0 . 442 ± 0 . 206 (improve- ment ∆( Fix − task ) = +0 . 142 ± 0 . 079 , a 24 . 4% reduction; p = 0 . 0117 , n = 8 ). At offset: task = − 0 . 556 ± 0 . 239 vs. fix = − 0 . 451 ± 0 . 199 (improvement +0 . 105 ± 0 . 076 , an 18 . 9% reduction; p = 0 . 0117 ). T aken together , fixation- based recentering both increases separability and suppresses unilateral bias, yielding a more symmetric, more stable decision boundary that is robust within runs and across days. B. Limitations and Future W ork Despite encouraging results, this study remains an initial feasibility demonstration with important limitations. The cohort was small, all participants were healthy , and each completed only two online sessions, limiting our ability to assess learning, longer-term adaptation, and the development of reliable offset control. Thus, the present findings show that online, intention-gated start/stop control is achiev able under controlled conditions, b ut do not yet establish readiness for rehabilitation use. As an immediate next step, we will ev aluate the fixation-based recentering method in a fully on- line, multi-session setting to test whether repeated exposure improv es stopping precision, consistency across days, and ov erall control stability . A key translational limitation is that the system has not yet been ev aluated in the target rehabilitation population. Post-stroke users will likely introduce greater heterogene- ity , including altered sensorimotor rhythms, increased non- stationarity , and fatigue, all of which may af fect calibration and online reliability . While the fixation-based recentering may help mitigate some of this variability , this must be established in patient studies. Future work will therefore extend ev aluation to p ost-stroke participants and incorporate measures such as stop-accuracy kinematics, reduced system latency , and improved characterization of false activ ations. T ogether , these steps will determine whether the present framew ork can progress from healthy-subject feasibility to- ward clinical translation. V . C O N C L U S I O N S W e hav e demonstrated online, intention-gated start/stop control of a clinical upper-limb exoskeleton with a nonin- vasi ve BCI, bridging MI transition decoding and real-time robot assistance. A geometry-aware Riemannian pipeline with subject-specific thresholds and proprioceptive feedback enabled reliable multi-session operation: participants consis- tently initiated assistance and terminated it mid-trajectory in real time. Methodologically , we rev ealed a bias from task- based recentering and quantified its asymmetric margin shift. Replacing it with a class-agnostic fixation reference that tracks EEG drift while preserving class geometry yielded substantially higher threshold-free separability and reduced unilateral bias within and across days. T ogether , these ad- vances establish an important feasibility step toward MI-BCI rehabilitation by enabling precise initiation and termination with reduced recalibration burden, while motiv ating further ev aluation in patient populations before clinical translation. R E F E R E N C E S [1] J. Mehrholz, M. Pohl, T . Platz, J. Kugler, and B. Elsner , “Electrome- chanical and robot-assisted arm training for improving acti vities of daily living, arm function, and arm muscle strength after stroke, ” Cochrane Database of Systematic Revie ws , no. 9, 2018. [2] V . Klamroth-Marg anska, J. Blanco, K. Campen, A. Curt, V . Dietz, T . Ettlin, et al. , “Three-dimensional, task-specific robot therapy of the arm after stroke: A multicentre, parallel-group randomised trial, ” The Lancet Neurology , vol. 13, no. 2, pp. 159–166, 2014. [3] A. Biasiucci, R. Leeb, I. Iturrate, S. Perdikis, A. Al-Khodairy , T . Cor- bet, et al. , “Brain-actuated functional electrical stimulation elicits lasting arm motor recovery after stroke, ” Nature Communications , vol. 9, no. 1, p. 2421, 2018. [4] N. Ho, K. T ong, X. Hu, K. Fung, X. W ei, W . Rong, and E. Susanto, “ An EMG-driv en exoskeleton hand robotic training device on chronic stroke subjects: T ask training system for stroke rehabilitation, ” in 2011 IEEE International Conference on Rehabilitation Robotics , pp. 1–5, 2011. [5] G. Pfurtscheller and C. Neuper , “Motor imagery and direct brain- computer communication, ” Proceedings of the IEEE , vol. 89, no. 7, pp. 1123–1134, 2001. [6] L. T onin and J. d. R. Mill ´ an, “Nonin vasiv e brain-machine interf aces for robotic de vices, ” Annual Revie w of Contr ol, Robotics, and Autonomous Systems , vol. 4, no. 1, pp. 191–214, 2021. [7] M. Barsotti, D. Leonardis, C. Loconsole, M. Solazzi, E. Sotgiu, C. Procopio, C. Chisari, M. Bergamasco, and A. Frisoli, “ A full upper limb robotic exoskeleton for reaching and grasping rehabilitation triggered by MI-BCI, ” in 2015 IEEE International Confer ence on Rehabilitation Robotics , pp. 49–54, 2015. [8] A. A. Frolov , O. Mokienko, R. L yukmanov , E. Biryukova, S. Ko- tov , L. T urbina, G. Nadareyshvily , and Y . Bushkova, “Post-stroke rehabilitation training with a motor-imagery-based brain-computer interface (BCI)-controlled hand exoskeleton: A randomized controlled multicenter trial, ” F r ontiers in Neur oscience , vol. 11, p. 400, 2017. [9] B. Orset, K. Lee, R. Chav arriaga, and J. d. R. Mill ´ an, “Stopping vs resting state during motor imagery paradigm, ” bioRxiv , 2021. [10] R. Baud, A. R. Manzoori, A. Ijspeert, and M. Bouri, “Revie w of control strategies for lower -limb exoskeletons to assist gait, ” Journal of Neuroengineering and Rehabilitation , vol. 18, no. 1, p. 119, 2021. [11] R. Nataraj, S. Sanford, A. Shah, and M. Liu, “ Agency and performance of reach-to-grasp with modified control of a virtual hand: Implications for rehabilitation, ” F rontier s in Human Neuroscience , vol. 14, p. 126, 2020. [12] J. Plantin, A. K. Godbolt, G. V . Pennati, E. Laurencikas, P . Fransson, J. C. Baron, M. A. Maier, J. Borg, and P . G. Lindberg, “Motor inhibition and its contribution to recovery of dexterous hand use after stroke, ” Brain Communications , vol. 4, no. 5, p. fcac241, 2022. [13] A. Chalard, D. Amarantini, J. T isseyre, P . Marque, J. T allet, and D. Gasq, “Spastic co-contraction, rather that spasticity , is associated with impaired active function in adults with acquired brain injury: A pilot study , ” Journal of r ehabilitation medicine , vol. 51, no. 4, pp. 307– 311, 2019. [14] W . Sheng, S. Li, J. Zhao, Y . W ang, Z. Luo, W . L. A. Lo, M. Ding, C. W ang, and L. Li, “Upper limbs muscle co-contraction changes correlated with the impairment of the corticospinal tract in stroke surviv ors: Preliminary evidence from electromyography and motor- ev oked potential, ” F r ontiers in Neur oscience , vol. 16, p. 886909, 2022. [15] K. Mitra, F . S. Racz, S. Kumar , A. D. Deshpande, and J. D. R. Mill ´ an, “Characterizing the onset and offset of motor imagery during passiv e arm movements induced by an upper-body exoskeleton, ” in 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) , pp. 3789–3794, IEEE, 2023. [16] S. Kumar, F . Yger, and F . Lotte, “T owards adapti ve classification using Riemannian geometry approaches in brain-computer interfaces, ” in 7th International Winter Confer ence on BCI , pp. 1–6, 2019. [17] S. Perdikis, L. T onin, S. Saeedi, C. Schneider , and J. d. R. Mill ´ an, “The Cybathlon BCI race: Successful longitudinal mutual learning with two tetraplegic users, ” PLoS Biology , vol. 16, no. 5, p. e2003787, 2018. [18] S. D. Forro, A. Munjal, and J. B. Lowe, “ Anatomy , shoulder and upper limb, arm structure and function, ” in StatP earls [Internet] , StatPearls Publishing, 2023. [19] T . Corbet, I. Iturrate, M. Pereira, S. Perdikis, and J. d. R. Mill ´ an, “Sensory threshold neuromuscular electrical stimulation fosters motor imagery performance, ” Neuroima ge , vol. 176, pp. 268–276, 2018. [20] B. Kim and A. D. Deshpande, “ An upper-body rehabilitation ex- oskeleton Harmony with an anatomical shoulder mechanism: Design, modeling, control, and performance ev aluation, ” The International Journal of Robotics Researc h , vol. 36, no. 4, pp. 414–435, 2017. [21] S. Kumar, H. Alawieh, F . S. Racz, R. Fakhreddine, and J. d. R. Mill ´ an, “Transfer learning promotes acquisition of individual BCI skills, ” PN AS Nexus , vol. 3, no. 2, p. pgae076, 2024. [22] F . S. Racz, S. Kumar , Z. Kaposzta, H. Alawieh, D. H. Liu, R. Liu, A. Czoch, P . Mukli, and J. d. R. Mill ´ an, “Combining detrended cross- correlation analysis with riemannian geometry-based classification for improved brain-computer interface performance, ” F rontier s in Neur oscience , vol. 18, p. 1271831, 2024. [23] P . Zanini, M. Congedo, C. Jutten, S. Said, and Y . Berthoumieu, “T ransfer learning: A Riemannian geometry framework with applica- tions to brain-computer interfaces, ” IEEE T ransactions on Biomedical Engineering , vol. 65, no. 5, pp. 1107–1116, 2017.
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment