Robot-mediated rehabilitation has the potential to deliver high-intensity, individualized therapy, but existing systems (which have not consistently improved outcomes) typically prescribe kinematic trajectories rather than explicitly targeting the neuromotor activations thought to support recovery. To address this gap, and ultimately enable activation-optimizing rehabilitation robot behavior, we present a personalizable transformer-based model mapping individuals' muscle activations (as measured via surface electromyography) to prescribed contact force trajectories when interacting with an end-effector rehabilitation robot. The model uses a transformer encoder-decoder leveraging rotary positional embeddings (RoPE) to generate a latent representation of trajectory-relevant and user-specific neuromotor factors, and augments trajectory prediction with flow matching to produce a distribution over plausible prescriptions biased toward the training distribution. Using data from 16 healthy participants completing 15 isometric trajectory tracking tasks, we evaluate generalization across held-out tasks and users, as well as the feasibility of user-specific fine-tuning within a therapy-session timescale. The model achieves mean trajectory prediction errors of <8% on held out tasks and users, with effectively instantaneous deterministic inference and sub-second sampling of trajectory distributions. An initial test using the model during live rehabilitation tasks demonstrates that, on average, participants reach the target neuromotor activations with just 15% error accumulated throughout the task. These results provide a proof of concept for data-driven, activation-targeted trajectory prescription in robot-mediated rehabilitation and establish a foundation for future validation in clinical populations. Data and code have been open-sourced as part of the OpenRobotRehab project on SimTK.
Figures & tables
Figure 1: End-effector robot-mediated rehabilitation platform. Users exert forces on a LBR iiwa 14 R820 7-degree-of-freedom cobot (KUKA AG, Augsburg, Germany; a) via a custom handle attached to a SensONE 6-axis force torque sensor (Bota Systems AG, Zürich, Switzerland; b). Users’ forces along each positional axis are mapped to the corresponding x/y/z velocity of an on-screen avatar ball (c), where the z axis into and out of the screen is represented by a decrease and increase in avatar size, respectively. Users are instructed to follow a target ball along a displayed trajectory. Force and game trajectory data (of both avatar and target) are collected at 1000 Hz and 60 Hz, respectively. During this process, two Trigno Quattro 4-channel sensor motes (d), controlled through a Trigno Base Station (Delsys, Inc., Natick, MA, USA) collect surface electromyography (sEMG) data at a rate of 2.22 kHz from 8 upper limb muscles (e). Electrode placements are as follows: anterior deltoid (AD), middle deltoid (MD), posterior deltoid (PD), and biceps brachii (BB), grounded at the acromion (G1); and triceps brachii (long head, TR), brachioradialis (BR), wrist flexors (FL), and wrist extensors (EX), grounded at the olecranon (G2). All data are collected and synchronized via Redis (MongoDB, Inc., New York, NY, USA). Full implementation details are included with code release.
Task No.
Task
Other axes locked?
Force required for unit velocity x/y/z motion (N)
Repe-ti-tions
Dura-tion (s)
Trajectory displayed?
Trai-ning set?
Test set?
T01
x -axis
No
15/15/36
3
60
Yes
✓
T02
y -axis
No
15/15/36
3
60
Yes
✓
T03
z -axis
No
15/15/36
3
60
Yes
✓
T04
x -axis
Yes
15/−/−
3
60
Yes
✓
T05
y -axis
Yes
−/15/−
3
60
Yes
✓
T06
z -axis
Yes
−/−/36
3
60
Yes
✓
Table 1: Trajectory Tracking Tasks
Figure 2: Architecture of trajectory prescription model. Latent representation z of both target-associated information ( zv ) and unknown neuromotor behavior ( zU ) is generated using a RoPE [ 17 ] transformer encoder ( blue flow), then decoded separately to generate prescribed trajectory v^target ( green flow) and estimated activation a^ ( turquoise flow). A flow-matching diffusion model [ 12 ] is also trained to generate a conditional distribution of zv given zU whose samples can be passed through the target trajectory decoder to generate a distribution over v^target ( orange flow).
Metric
Model
Components
Error (mean ± standard deviation)
Traj. Dec.
Act. Dec.
Flow Mat.
Training Set
New Tasks
New Users
New Tasks & Users
MSETD
Naive MLP
✓
0.106±0.273
0.097±0.233
0.238±0.462
0.106±0.204
LSTM
✓
0.155±0.308
0.068±0.143
0.191±0.354
0.063±0.128
Minimal
✓
0.016±0.109
0.108±0.211
0.099±0.256
0.115±0.213
+ Act. Dec.
✓
✓
0.005±0.074
0.117±0.267
0.088±0.252
0.110±0.228
+ Flow Mat.
✓
✓
0.069±0.216
0.115±0.239
0.095±0.255
0.106±0.185
Table 2: Trajectory Prediction Performance of Baselines, Ablated Models, and Full Model
Figure 3: Exemplar trajectory prediction accuracy V^target distributions for unseen tasks and unseen users. Left : Known participant (P09) performing unknown task (T14). For regions within the distribution of tasks observed during training ( 0.3<t<0.6 ), trajectory mean is accurately predicted. For regions outside this distribution ( t<0.3 , t>0.9 ), flow matching tends to pull predicted trajectories toward in-distribution regions, which are more likely to be safe. Some regions ( 0.6<t<0.9 ) exhibit a mix of this behavior across axes. Center : Unseen participant (P11) performing known task (T07). Trajectory predictions are accurate aside from artifacts (e.g., at t≈0.15 ) due to the length of windows that were seen by the transformer at training time. Right : Unseen participant (P16) performing unseen task (T14). Prediction is qualitatively comparable to unseen tasks performed by known users, with slightly higher overall error rates.
Figure 5: Training loss L upper-bounding trajectory prediction error after re-training using an incrementing number of each user’s trials via our greedy re-training algorithm. All users exhibit decreasing error with additional training, characterizing the trade-off between calibration time and prediction accuracy.
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
ID
Age
Gender
Handedness
P01
21
M
Left
P02
24
M
Right
P03
24
M
Right
P04
19
M
Right
P05
27
M
Left
P06
47
F
Right
Appendix
Table 3: Participant Demographics
Figure 6: Example of user force generation behavior f about target v on unlocked x -axis task T01 ( top ) and its locked counterpart T02 ( bottom ). Due to the challenge of maintaining appropriate values in all axes during unlocked tasks, users frequently correct one axis at a time, resulting in oscillating signals. On locked tasks, users’ signals are smoother, but have bias in unspecified dimensions that varies from user to user.
Figure 7: T01 and T04
Figure 8: T07 and T10
Figure 9: T02 and T05
Figure 10: T08 and T11
Figure 11: T03 and T06
Figure 12: T09 and T12
Figure 13: T14 (exemplar)
Figure 14: T15 (exemplar)
Component
Hyperparameter
Value
Transformer Encoder/Decoder
Model width
128
Attention heads
4
Feedforward width
512
Encoder layers
3
Decoder layers
3
Latent dimension
64
Appendix
Table 4: Hyperparameters
Figure 15: Target ( top ) and user-generated ( bottom ) muscle activations for participant P08.
Figure 16: Target ( top ) and user-generated ( bottom ) muscle activations for participant P13.
Figure 17: Target ( top ) and user-generated ( bottom ) muscle activations for participant P18.
Figure 18: Target ( top ) and user-generated ( bottom ) muscle activations for participant P19.
Successful robot-mediated rehabilitation requires designing games and robot interventions that promote healthy motor practice. However, the interplay between a given user's neuromotor behavior, the gaming interface, and the physical robot makes designing system elements -- and even characterizing what behaviors are "healthy" or pathological -- challenging. We leverage our OpenRobotRehab 1.0 open access data set to assess the characteristics of 13 healthy and 2 post-stroke users' force output, muscle activations, and game performance while executing isometric trajectory tracking tasks using an end-effector rehabilitation robot. We present an assessment of how subtle aspects of interface design impact user behavior; an analysis of how pathological neuromotor behaviors are reflected in end-effector force dynamics; and a novel hidden Markov model (HMM)-based neuromotor behavior classification method based on surface electromyography (sEMG) signals during cyclic motions. We demonstrate that task specification (including which axes are constrained and how users interpret tracking instructions) shapes user behavior; that pathology-related features are detectable in 6D end-effector force data during isometric task execution (with significant differences between healthy and post-stroke profiles in force error and average force production at p=0.05); and that healthy neuromotor strategies are heterogeneous and inherently difficult to characterize. We also show that our HMM-based models discriminate healthy and post-stroke neuromotor dynamics where synergy-based decompositions reflect no such differentiation. Lastly, we discuss these results' implications for the design of adaptive end-effector rehabilitation robots capable of promoting healthier movement strategies across diverse user populations.
Ajay Anand, Gabriel Parra, Chad A. Berghoff +1
The authors are with the Departments of Mechanical Engineering, Physical Medicine & Rehabilitation, and Mathematics, the Kahlert School of Computing, and the Robotics Center at the University of Utah, Salt Lake City, UT 84112, USA.
Reliable estimation of neuromuscular activation is a key enabler for adaptive and personalized control in wearable robotics. However, surface electromyography (EMG) remains difficult to deploy robustly outside laboratory settings due to electrode sensitivity, signal non-stationarity, and strong subject dependence. In this work, we propose an adaptive IMU-to-EMG learning framework that reconstructs continuous muscle activation envelopes from wearable inertial measurements across heterogeneous movement conditions. The approach combines a Transformer encoder with Gaussian Error Gated Linear Units (GEGLU-Transformer) to enhance cross-subject generalization and enable rapid subject-specific personalization. Under a strict leave-one-subject-out (LOSO) protocol on a multi-condition lower-limb biomechanics dataset, the proposed architecture achieves r = 0.706 +/- 0.139 and R^2 = 0.474 +/- 0.208 without subject-specific adaptation. With only 0.5% adaptation data, performance increases to r = 0.761 +/- 0.030 and R^2 = 0.559 +/- 0.047, demonstrating rapid adaptation and early performance saturation. These results support attention-based architectures combined with lightweight adaptation as a practical and scalable alternative to direct EMG sensing for real-world wearable robotic applications.
In this paper, we propose a novel framework that allows therapists to teach robot-assisted rehabilitation exercises remotely via RGB-D video. Our system encodes demonstrations as 6-DoF body-centric trajectories using Cartesian Dynamic Movement Primitives (DMPs), ensuring accurate posture-independent spatial generalisation across diverse patient anatomies. Crucially, we execute these trajectories through a decoupled hybrid control architecture that constructs a spatially compliant virtual tunnel, paired with an effort-based temporal dilation mechanism. This architecture is applied to three distinct rehabilitation modalities: Passive, Active-Assisted, and Active-Resistive, by dynamically linking the exercise's execution phase to the patient's tangential force contribution. To guarantee safety, a Gaussian Mixture Regression (GMR) model is learned on-the-fly from the patient's own limb. This allows the detection of abnormal interaction forces and, if necessary, reverses the trajectory to prevent injury. Experimental validation demonstrates the system's precision, achieving an average trajectory reproduction error of 3.7cm and a range of motion (ROM) error of 5.5 degrees. Furthermore, dynamic interaction trials confirm that the controller successfully enforces effort-based progression while maintaining strict spatial path adherence against human disturbances.
Ali Alabbas, Camillo Murgia, Joanne Regan +1
Faculty of Mechanical Engineering, Atlantic Technological University, Galway, Ireland. · Department of Health and Nutritional Science, Atlantic Technological University, Sligo, Ireland.