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. Prescribing motions that elicit desired activity is challenging because muscle activity is hysteretic and stochastic, noninvasive measurement methods (e.g., surface electromyography, or sEMG) are noisy and sensor-location-dependent, and interventional datasets are costly to collect, inhibiting model development. 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 sEMG) 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. User-specific fine-tuning further reduces error using only minutes of additional data collection and training. 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. To enable further development by scientific and user communities, data and code have been open-sourced as part of the OpenRobotRehabproject on SimTK (simtk.org/projects/openrobotrehab).
Stay tuned for code, data, and preprint links!