Wearable exoskeletons and prostheses can react before a movement happens because muscles fire electrically tens of milliseconds before they produce force. A model reading surface electromyography (EMG, electrodes on the skin that record muscle electrical activity) can therefore predict where a knee will be about 100 ms from now. These predictors work well in the lab session they were trained in. They degrade when the body or the sensors change: muscles fatigue, sweat alters skin contact, an electrode is re-seated a centimetre away, and over weeks muscle mass and fibre properties shift with diet, disease and training. Current decoders treat all of this as noise. We propose to treat it as a small, slowly varying hidden "body state" that the model infers online. That state changes the rules of the fast muscle-to-motion dynamics rather than simply corrupting the input.
Concretely, we build a two-timescale model. A fast neural ordinary differential equation (neural ODE, a network that learns the rate of change of a hidden state so the state can be computed at any continuous time) forecasts joint angles from EMG and inertial sensors. A slow latent vector, updated at a coarse rate from recent prediction errors and signal statistics, sets the parameters of that fast vector field. We pretrain the model in a musculoskeletal simulator in which both sensor corruption and slow physiological change are randomized. The question is whether this structure keeps early-prediction accuracy intact under fatigue, electrode shifts, channel dropout and multi-day drift. We compare against the obvious fixes: noise augmentation, per-session recalibration, and discrete recurrent models given the same slow context.
Core Claim
Most of the non-stationarity that breaks EMG-based early intent decoding is low-dimensional and slow relative to the 25–125 ms window being exploited. It can be absorbed by a slow latent that modulates, rather than feeds, the fast dynamics. The claim makes three separable predictions, and each can fail on its own. The first is that a slow modulating latent reduces accuracy loss under within-session fatigue and between-session electrode shifts more than noise augmentation does. The second is that making the fast model continuous-time matters specifically when channels drop out or arrive asynchronously, and that it does not matter under clean, uniformly sampled input. The third is that randomizing slow physiological parameters in simulation, and not only sensor noise, is what makes simulation pretraining transfer to real people.
We write the model as
$$\frac{dz(t)}{dt} = f_\theta\big(z(t), u(t); s_k\big), \qquad s_{k+1} = s_k + \epsilon\, g_\phi\big(s_k, r_k\big).$$
Here $z(t)$ is the fast latent motor state, $u(t)$ is the EMG envelope and inertial input, and $s_k$ is the slow body-state latent held fixed over update window $k$. The residual summary $r_k$ collects recent forecast errors and EMG spectral statistics, and $\epsilon$ is small, which enforces the timescale separation. Because $s_k$ is held constant within a window and is not integrated jointly with $z$, the solver never sees millisecond and multi-hour dynamics in the same system. This is our answer to the stiffness problem documented in Stiff Neural Ordinary Differential Equations.
Where This Sits in Prior Work
The motivating baseline is KinPreNet from Continuous Prediction of Lower-Limb Kinematics From Multi-Modal Biomedical Signals. It chains two LSTMs over 9 EMG channels plus inertial sensors to predict knee angle 27–108 ms ahead. It reports 3.98° RMSE and a correlation of 0.88 at 100 ms, against about 15.95° for a hand-crafted-feature support vector machine, with 5–7 ms inference. It is discrete-time, deterministic, and evaluated without electrode shift, dropout or fatigue, which are exactly the conditions we target. The EEG decoder in On the Feasibility of EEG-based Motor Intention Detection for Real-Time Robot Assistive Control takes the opposite route to non-stationarity. It differentiates the signal, uses covariance geometry, and applies majority voting. The result is robust but slow: 86.88% offline accuracy and 70–79% online, with 1–2 s trigger latency. That paper constrains our design by showing that heavy smoothing buys robustness at the cost of the lead time that makes early decoding worthwhile.
Three papers supply the continuous-time method. Neural Ordinary Differential Equations gives the basic machinery. GRU-ODE-Bayes and Continuous-time Model-based Reinforcement Learning show how to integrate across irregular observation gaps and how to treat noise as a measurement error rather than letting it corrupt the state. Both were tested on sporadic clinical series or low-dimensional control tasks, not on physiological drift. Evaluation of Differentially Constrained Motion Models for Graph-Based Trajectory Prediction is a cautionary result for us. On rounD, simple second-order neural ODEs matched complex kinematic models at about 0.98 m ADE, and solver choice alone moved ADE from 1.82 m to 1.23 m. We therefore fix and report solver order rather than treating it as an implementation detail. SNODEP is the closest structural precedent. It conditions a neural ODE process on an auxiliary control latent to forecast metabolic flux distributions from sparse single-cell data. Our slow latent plays a similar conditioning role, but it is inferred online from a fast wearable stream, not from destructive sparse snapshots.
From sim-to-real robotics we take the lesson of Deep Drone Acrobatics: 0% transfer success from raw pixels against 100% from abstract feature tracks. We also take the lesson of On the use of Deep Autoencoders for Efficient Embedded Reinforcement Learning, where a compressed latent learned about 4–5× faster and ran at 60 FPS under 2 W. Both argue that controllers should see a compact, noise-stripped representation. Both use a static abstraction, whereas our abstraction has a slow state of its own. Domain randomization as in Emergent Dexterity via Diverse Resets, and noise injection into the vector field as in Neural SDE, are the robustness techniques we must beat, not reinvent.
The microbial metabolite literature enters as a constraint, and we are explicit that we do not decode metabolites. Composite dietary fiber alleviates obesity-induced skeletal muscle atrophy shows that gut-derived butyrate changes are associated with large functional shifts in muscle over weeks: +10.6–14.7% fibre cross-sectional area, +52.2% grip strength and +256.9% rotarod endurance in mice. That study is observational at the mechanistic level and uses terminal endpoints. Two design facts follow. First, the plausible magnitude of slow change in force-generating capacity is far larger than the noise ranges usually randomized. Second, such change happens on a timescale at which no wearable could measure the driver directly, so any modulator must be inferred from the motor signal itself. The heterogeneity reported in The Gut Microbiome and Individual-Specific Responses to Diet supports inferring the slow state per person rather than assuming a population value.
Research Program
We build three things.
The first is a simulation pipeline. It drives a musculoskeletal gait model to produce synthetic EMG envelopes, inertial signals and knee angles. Two separate families of perturbation are randomized. Sensor perturbations are electrode displacement, modelled as channel mixing and gain changes, together with impedance drift, powerline and motion artifacts, channel dropout and timestamp jitter. Physiological perturbations are slow changes in maximum isometric force, fibre composition, activation time constants and the fatigue-induced shift of EMG spectra toward lower frequencies. We set force-capacity ranges to span the tens-of-percent changes reported in the gut–muscle mouse study, as an upper bound rather than a human estimate.
The second is the model. The fast ODE runs on roughly 100 Hz EMG envelopes rather than raw 1–2 kHz EMG, and uses a fixed-step second-order Heun solver with a step budget chosen to meet a 7 ms latency target on an embedded GPU. Its output is a Gaussian over future joint angle at any requested horizon. The slow latent is 2–4 dimensional, updated every few seconds by a small recurrent filter over residuals, and enters the fast field through feature-wise scaling of hidden units. A prior penalizes fast movement of $s$, so it cannot become a second fast state.
The third is an analysis layer. We regress the inferred $s$ in real data on measurable proxies: elapsed exercise time, median EMG frequency, post-session maximal voluntary contraction, and electrode re-placement events. The purpose is to check that the latent tracks physiology and sensor state and is not an unconstrained nuisance variable.
As a secondary use of the probabilistic output, we measure whether forecast variance rises in the ~200 ms before movements that participants abort. Movement vetoes are reported in The Berlin Brain-Computer Interface. We treat this as exploratory and not as a core claim.
Baselines
The naive reference point is zero-lead prediction, which assumes the knee angle 100 ms from now equals the current angle. Alongside it we run a linear autoregressive predictor on inertial data only. Together these tell us how much of the reported gain is EMG-derived lead at all.
The strongest existing method is KinPreNet Continuous Prediction of Lower-Limb Kinematics From Multi-Modal Biomedical Signals. Its reported 3.98° RMSE and R = 0.88 at 100 ms is the target on clean in-session data, and 15.95° is its reported SVM reference. We reimplement it with the same inputs, the same train/test splits, the same number of hyperparameter trials (fixed at 40 for every model), and the same simulation pretraining when that condition is tested. We report both our reimplementation's number and the paper's, so any gap in reproduction is visible. Beating it means two things. On clean in-session data we must be within 0.3° of it, and we do not claim a win there. Under the shift conditions we must lose at least 30% less accuracy relative to clean in-session performance, with non-overlapping subject-level bootstrap intervals.
The robustness competitor is KinPreNet trained with the full sensor-and-physiology randomization and with vector-field noise in the style of Neural SDE. This isolates whether explicit slow-state inference beats simply training against the same perturbations.
The adaptation competitor is per-session recalibration. It refits the output layer, plus channel-wise normalization, on the first 60 s of each new session. This is the cheap, practical answer clinicians already use.
Three ablations isolate the ingredients. Holding $s$ fixed removes slow inference. Feeding $s$ as an extra input rather than as a modulator of the vector field tests the modulation design. Replacing the fast ODE with a GRU that receives the time gap as input, while keeping the same slow latent, tests continuity. All models run on the same embedded hardware, and latency is reported per model.
Why not just…?
Why not just train KinPreNet with heavy noise augmentation? This is the most serious threat. Augmentation handles the stationary part of sensor noise well. It can only teach invariance, and invariance is the wrong response when the mapping from EMG to motion has truly changed, as with fatigued muscle producing less torque per unit of activation. The randomized-KinPreNet baseline tests this directly. If it matches our model under the fatigue and multi-day conditions, the slow latent is unnecessary and we will say so.
Why not just recalibrate at the start of each session? Recalibration fixes between-session electrode shifts cheaply, and we expect it to do well there. It cannot follow drift within a session, such as fatigue building over a 30-minute walk, without repeated labelled data that a wearable does not have. It also requires the user to perform calibration movements. The within-session fatigue condition separates the two approaches. If recalibration plus a fixed model matches ours across all conditions, our contribution shrinks to the simulation-pretraining result.
Why not a discrete GRU with the same slow context? This is plausible, and it is why the GRU-with-slow-latent ablation exists. Our expectation, from GRU-ODE-Bayes and Continuous-time Model-based Reinforcement Learning, is that continuity pays off only under dropout, asynchronous sensor rates and forecasts at arbitrary horizons. Under clean uniform sampling we predict a tie. If the GRU also ties under dropout, the continuous-time component should be dropped from the claim.
Why not a static latent compression (PCA or VAE) before the LSTM? The finger-coordination results in The structured variability of finger coordination in daily tasks show that 4–5 static dimensions capture 80–95% of variance. A static projection is fitted once, however, and so it drifts along with the sensors. We include a PCA-front-end LSTM as a cheap reference inside the ablation set.
Proposed Experiments
The primary data is the 10-subject lower-limb gait set of Continuous Prediction of Lower-Limb Kinematics From Multi-Modal Biomedical Signals. We will request it from the authors. If it is unavailable, we collect a matched protocol: 9 lower-limb EMG channels, inertial sensors, and optical motion-capture ground truth. We extend that protocol with a new cohort of about 15 participants recorded over three sessions on separate days. Each session includes a 30-minute treadmill fatigue block and a mid-session deliberate re-seating of electrodes by 1 cm. This design yields four test conditions: clean in-session, late-fatigue, post-re-seat, and cross-day. On every condition we add synthetic channel dropout (0–3 channels) and timestamp jitter. We evaluate all conditions with leave-one-subject-out splits.
Metrics are RMSE and Pearson R at horizons of 25, 50, 100, 150 and 200 ms. We also report degradation ratio, defined as shifted RMSE divided by clean RMSE, together with calibration of the predicted intervals and embedded inference latency. The 5–7 ms KinPreNet figure is the latency bar.
The sim-to-real experiment trains on simulation only, then on simulation plus 2 minutes of real data per subject. It crosses sensor-only randomization with sensor-plus-physiology randomization. This tests the third prediction: physiology randomization should specifically help the fatigue and cross-day conditions.
The decisive checks are these. The full model must beat randomized KinPreNet and recalibration on late-fatigue and cross-day degradation ratio at 100 ms. The fixed-$s$ ablation must lose most of that advantage. The inferred $s$ must correlate with median EMG frequency and post-session force across held-out subjects. The ODE-versus-GRU gap must appear under dropout and vanish on clean data. Any other pattern of outcomes identifies which part of the claim is wrong. On the EEG side we do not claim improvements. The 86.88% offline figure of On the Feasibility of EEG-based Motor Intention Detection stays outside our scope unless the EMG results hold first. We found no reported result on Lacuna for EMG intent decoding under deliberate electrode re-seating or fatigue, so those conditions have no published baseline number and we will establish them.
References
- Stiff Neural Ordinary Differential Equations
- Continuous Prediction of Lower-Limb Kinematics From Multi-Modal Biomedical Signals
- On the Feasibility of EEG-based Motor Intention Detection for Real-Time Robot Assistive Control
- Neural Ordinary Differential Equations
- GRU-ODE-Bayes: Continuous Modeling of Sporadically-Observed Time Series
- Continuous-time Model-based Reinforcement Learning
- Evaluation of Differentially Constrained Motion Models for Graph-Based Trajectory Prediction
- PREDICTING TIME-VARYING METABOLIC DYNAMICS USING STRUCTURED NEURAL ODE PROCESSES
- Deep Drone Acrobatics (Extended Abstract)
- On the use of Deep Autoencoders for Efficient Embedded Reinforcement Learning
- Emergent Dexterity Via Diverse Resets and Large-Scale Reinforcement Learning
- Neural SDE: Stabilizing Neural ODE Networks with Stochastic Noise
- Composite dietary fiber alleviates obesity-induced skeletal muscle atrophy by regulating gut microbiota-derived short-chain fatty acids in mice
- The Gut Microbiome and Individual-Specific Responses to Diet
- The Berlin Brain-Computer Interface: Progress Beyond Communication and Control
- The structured variability of finger coordination in daily tasks