A patient-specific digital-twin framework with multimodal EEG–GSR state estimation for computational decision support in adaptive transcutaneous electrical nerve stimulation
Background and Objective: Transcutaneous electrical nerve stimulation (TENS) for musculoskeletal pain is almost always deliveredopen-loop, with fixed pulse trains that ignore the patient’s evolving physiological state—a primary source of variability inTENS outcomes. Adapting stimulation to state is fundamentally computational: it requires a patient-specific dynamical model ofpain, a way to estimate the latent state from noisy wearable signals, and a model-based rule mapping the estimate to a therapydecision. We develop and evaluate a computational framework addressing these jointly.Methods: The framework comprises (i) a four-state, two-timescale patient-specific digital twin of pain in discrete-time statespace, identified individually for each patient from measured pain, electrodermal, and cortical responses; (ii) a multimodal observationmodel coupling electroencephalographic (EEG) alpha power and galvanic skin response (GSR) to the latent state; (iii) arecursive Kalman filter fusing the cortical and autonomic channels into a drift-corrected pain-state estimate; and (iv) a model-baseddecision layer mapping the estimate to a stimulation regime with a posterior-derived confidence and an early-warning flag. It wasidentified for a prospectively recorded cohort of N = 71 participants and evaluated in silico under four modes (Fixed, EEG-only,GSR-only, Fusion).Results: The twins reproduced the measured Pre/During/Post observables within 8% and the per-patient endpoint at r = 0.93(95% CI 0.90–0.96; p < 0.001; mean absolute error 0.042). All three estimators reached comparably high regime concordance(94–95%, no significant difference), but only fusion remained dependable under channel loss, never failing catastrophically (RMSE0.038–0.053 across degradation scenarios); its gain over GSR-only was significant (p < 0.001) whereas the ideal-condition gainover EEG-only was not, locating fusion’s value in fault tolerance. Adaptive control significantly raised relaxed-regime occupancy(70%→78%; p < 0.001), and an early-warning rule flagged eventual slow responders within 90 s (AUC 0.81, 95% CI 0.70–0.91).The identified responsiveness explained residual pain (r = −0.87). Over a simulated 30-day horizon it sustained relief and trackedtolerance where fixed therapy lost efficacy.Conclusions: Per-patient twin identification, recursive multimodal state estimation, and model-based decision support form areproducible computational foundation for adaptive neuromodulation, validated in silico against real cohort physiology and generalto other latent-state-guided therapies.