Machine Learning-Based Real-Time Detection of Compensatory Trunk Movements Using Trunk-Wrist Inertial Measurement Units
Pith reviewed 2026-05-10 15:35 UTC · model grok-4.3
The pith
A two-IMU setup with machine learning detects compensatory trunk movements in real time at macro-F1 of 0.80.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The central claim is that a minimal trunk-wrist IMU configuration supplies enough kinematic information for an XGBoost model to discriminate compensatory trunk movements, yielding macro-F1 of 0.80 plus or minus 0.07, Matthews correlation coefficient of 0.73 plus or minus 0.08, and ROC-AUC above 0.93 under leave-one-subject-out validation on able-bodied data collected with elbow brace and resistance band. This matches the reference optical motion capture model in accuracy while satisfying timing constraints for real-time use. Feature importance analysis attributes the decisions mainly to trunk dynamics and wrist-trunk interaction terms. A preliminary check on four neurological participants保留s
What carries the argument
The two-IMU sensing pair at trunk and wrist, whose raw signals and derived interaction features are fed to an extreme gradient boosting classifier that outputs a compensatory versus non-compensatory label per time window.
If this is right
- Sparse IMU placement becomes sufficient for objective CTM monitoring during therapy and activities of daily living.
- Prediction latency remains short enough to support real-time corrective feedback.
- The model performs at parity with full optical motion capture under the tested conditions.
- Trunk dynamics and wrist-trunk coupling dominate the classification decisions.
- Performance on neurological participants is retained at ROC-AUC near 0.78 but becomes more threshold-sensitive.
Where Pith is reading between the lines
- A smartphone app could stream the two IMUs and deliver immediate alerts when compensatory patterns appear during home exercises.
- Patient-specific fine-tuning of the decision threshold might reduce the variability observed in the neurological cohort.
- Longitudinal logging of detected compensations could quantify how often maladaptive patterns occur outside the clinic.
- The same minimal sensor set might extend to other upper-limb compensation types once additional labeled patient data are collected.
Load-bearing premise
Movements produced by able-bodied volunteers wearing an elbow brace and resistance band closely mimic the compensatory trunk patterns that arise in people after stroke.
What would settle it
Apply the trained model to synchronized IMU and video data from at least twenty stroke patients performing the same daily activities and observe whether ROC-AUC stays above 0.85 or falls below 0.70.
Figures
read the original abstract
Compensatory trunk movements (CTMs) are commonly observed after stroke and can lead to maladaptive movement patterns, limiting targeted training of affected structures. Objective, continuous detection of CTMs during therapy and activities of daily living remains challenging due to the typically complex measurements setups required, as well as limited applicability for real-time use. This study investigates whether a two-inertial measurement unit configuration enables reliable, real-time CTM detection using machine learning. Data were collected from ten able-bodied participants performing activities of daily living under simulated impairment conditions (elbow brace restricting flexion-extension, resistance band inducing flexor-synergy-like patterns), with synchronized optical motion capture (OMC) and manually annotated video recordings serving as reference. A systematic location-reduction analysis using OMC identified wrist and trunk kinematics as a minimal yet sufficient set of anatomical sensing locations. Using an extreme gradient boosting classifier (XGBoost) evaluated with leave-one-subject-out cross-validation, our two-IMU model achieved strong discriminative performance (macro-F1 = 0.80 +/- 0.07, MCC = 0.73 +/- 0.08; ROC-AUC > 0.93), with performance comparable to an OMC-based model and prediction timing suitable for real-time applications. Explainability analysis revealed dominant contributions from trunk dynamics and wrist-trunk interaction features. In preliminary evaluation using recordings from four participants with neurological conditions, the model retained good discriminative capability (ROC-AUC ~ 0.78), but showed reduced and variable threshold-dependent performance, highlighting challenges in clinical generalization. These results support sparse wearable sensing as a viable pathway toward scalable, real-time monitoring of CTMs during therapy and daily living.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript claims that a two-IMU (trunk and wrist) configuration with an XGBoost classifier enables reliable real-time detection of compensatory trunk movements (CTMs). Data from 10 able-bodied participants under simulated impairment conditions (elbow brace and resistance band) with OMC and video ground truth yield macro-F1 = 0.80 ± 0.07, MCC = 0.73 ± 0.08, and ROC-AUC > 0.93 under LOSO cross-validation, comparable to an OMC-based model. A preliminary evaluation on four neurological participants reports ROC-AUC ~0.78 with reduced threshold-dependent performance. The work includes a systematic sensor-location reduction analysis and SHAP explainability showing dominant trunk and wrist-trunk interaction features.
Significance. If the generalization claim holds, the work would advance practical wearable monitoring for stroke rehabilitation by demonstrating that a minimal two-sensor IMU setup can achieve OMC-comparable CTM detection with real-time timing. Notable strengths include the rigorous LOSO validation on simulated data, the data-driven identification of a minimal sensor set, direct performance comparison to full OMC, and the explainability analysis that ties predictions to biomechanically plausible features.
major comments (2)
- [Abstract and preliminary evaluation] Abstract and preliminary evaluation section: the reported drop to ROC-AUC ~0.78 and threshold-dependent variability on the n=4 neurological cohort directly undermines the central claim that the pipeline is suitable for therapy and ADL use in neurological conditions. The manuscript must clarify whether the model was applied zero-shot, whether thresholds were re-tuned on patient data, and must report per-subject metrics or inter-subject variance to allow assessment of transfer from simulated impairments.
- [Methods: simulated impairment conditions] Methods section on simulated impairment conditions: the assumption that elbow-brace and resistance-band conditions in able-bodied subjects produce CTM kinematics representative of post-stroke patterns is load-bearing for training-data validity and generalization, yet no quantitative kinematic comparison (e.g., joint-angle distributions or timing metrics) to actual patient data is provided.
minor comments (2)
- [Abstract] Abstract: the reported standard deviations on F1 and MCC indicate subject-level variability; a supplementary table or figure with per-subject performance would improve transparency without altering the main claims.
- [Main text] Ensure first-use definitions for all acronyms (CTM, OMC, LOSO, MCC, XGBoost, SHAP) appear in the main text body, not only the abstract.
Simulated Author's Rebuttal
We thank the referee for the constructive and detailed feedback. The comments highlight important aspects of generalization and data validity that we address point by point below. We will revise the manuscript to incorporate clarifications and additional details where feasible.
read point-by-point responses
-
Referee: [Abstract and preliminary evaluation] Abstract and preliminary evaluation section: the reported drop to ROC-AUC ~0.78 and threshold-dependent variability on the n=4 neurological cohort directly undermines the central claim that the pipeline is suitable for therapy and ADL use in neurological conditions. The manuscript must clarify whether the model was applied zero-shot, whether thresholds were re-tuned on patient data, and must report per-subject metrics or inter-subject variance to allow assessment of transfer from simulated impairments.
Authors: We agree that the performance drop and variability on the small neurological cohort (n=4) warrant clearer presentation to avoid overstatement. The model was applied zero-shot: it was trained exclusively on the able-bodied simulated-impairment data and evaluated directly on the patient IMU recordings with no retraining and no re-tuning of the classification threshold. This design choice was made to assess transfer from simulated to real clinical data. We will revise the abstract and the preliminary-evaluation section to explicitly state the zero-shot application and absence of threshold adjustment. In addition, we will add per-subject metrics (ROC-AUC, macro-F1, and MCC for each of the four participants) together with the observed inter-subject variance to allow readers to evaluate transfer performance. These changes will also temper the wording around clinical suitability. revision: yes
-
Referee: [Methods: simulated impairment conditions] Methods section on simulated impairment conditions: the assumption that elbow-brace and resistance-band conditions in able-bodied subjects produce CTM kinematics representative of post-stroke patterns is load-bearing for training-data validity and generalization, yet no quantitative kinematic comparison (e.g., joint-angle distributions or timing metrics) to actual patient data is provided.
Authors: The choice of elbow-brace and resistance-band conditions was guided by clinical literature describing common post-stroke compensatory patterns (reduced elbow extension and flexor synergy). We acknowledge that a direct quantitative kinematic comparison (joint-angle distributions, timing) between the simulated able-bodied data and the neurological patients would strengthen the justification. However, the patient recordings were collected with IMUs only and did not include optical motion capture, precluding such a comparison within the current dataset. In the revised manuscript we will expand the Discussion to (i) provide a more detailed literature-based rationale for the simulation protocol, (ii) explicitly note the absence of direct kinematic matching as a limitation, and (iii) highlight that the observed drop in patient performance already signals differences in movement patterns. This will give a balanced account without requiring new data collection. revision: partial
- Quantitative kinematic comparison (joint-angle distributions or timing metrics) between simulated able-bodied conditions and actual neurological patient movements cannot be supplied, because the patient recordings lack synchronized optical motion capture.
Circularity Check
No significant circularity; empirical ML evaluation is independent of inputs
full rationale
The paper's derivation consists of empirical data collection under simulated conditions, OMC-based location selection, XGBoost training with LOSO CV, and performance reporting against independent OMC/video ground truth. No equations, fitted parameters, or self-citations reduce the reported metrics (F1, MCC, AUC) or real-time claims to tautological re-statements of the training inputs. The preliminary patient evaluation is presented as separate and lower-performing, without any reduction to the able-bodied fit. Generalization assumptions are untested but do not constitute circularity per the defined patterns.
Axiom & Free-Parameter Ledger
Reference graph
Works this paper leans on
-
[1]
D. O’Flaherty and K. Ali, “Recommendations for upper limb motor recovery: An overview of the UK and european rehabilitation after stroke guidelines (2023),”Healthcare, vol. 12, no. 14, p. 1433, 2024
work page 2023
-
[2]
M. Levin, J. Kleim, and S. Wolf, “What do motor “recovery” and “compensation” mean in patients following stroke?”Neurorehabilitation and Neural Repair, vol. 23, pp. 313–319, May 2009
work page 2009
-
[3]
Motor compensation and its effects on neural reorganization after stroke,
T. Jones, “Motor compensation and its effects on neural reorganization after stroke,”Nature Reviews Neuroscience, vol. 18, Mar. 2017
work page 2017
-
[4]
B. Kim, J. Girnis, V . Sweet, T. Nobiling, T. Agag, and C. Neville, “Impact of motor task conditions on end-point kinematics and trunk movements during goal-directed arm reach,”Scientific Reports, vol. 14, Feb. 2024
work page 2024
-
[5]
M. Alt Murphy and C. Hager, “Kinematic analysis of the upper extremity after stroke—how far have we reached and what have we grasped?” Physical Therapy Reviews, vol. 20, pp. 137–155, May 2015
work page 2015
-
[6]
Motor compensation and recovery for reaching in stroke patients,
A. Roby-Brami, A. Feydy, M. Combeaud, E. Biryukova, B. Bussel, and M. Levin, “Motor compensation and recovery for reaching in stroke patients,”Acta Neurologica Scandinavica, vol. 107, pp. 369–381, Jun. 2003
work page 2003
-
[7]
A standardized approach to the Fugl-Meyer assessment and its implications for clinical trials,
J. See, L. Dodakian, C. Chou, V . Chan, A. McKenzie, D. Reinkensmeyer, and S. Cramer, “A standardized approach to the Fugl-Meyer assessment and its implications for clinical trials,”Neurorehabilitation and Neural Repair, vol. 27, Jun. 2013
work page 2013
-
[8]
Assessing Wolf Motor Function Test as outcome measure for research in patients after stroke,
S. L. Wolf, P. A. Catlin, M. Ellis, A. L. Archer, B. Morgan, and A. Piacentino, “Assessing Wolf Motor Function Test as outcome measure for research in patients after stroke,”Stroke, vol. 32, no. 7, pp. 1635– 1639, 2001
work page 2001
-
[9]
M. Levin, J. Desrosiers, D. Beauchemin, N. Bergeron, and A. Rochette, “Development and validation of a scale for rating motor compensations used for reaching in patients with hemiparesis: The Reaching Perfor- mance Scale,”Physical Therapy, vol. 84, pp. 8–22, Feb. 2004
work page 2004
-
[10]
Interrater reliability of the Wolf Motor Function Test-Functional Ability Scale: Why it matters,
S. Duff, J. He, M. Nelsen, C. Lane, V . Rowe, S. Wolf, and A. Dromerick, “Interrater reliability of the Wolf Motor Function Test-Functional Ability Scale: Why it matters,”Neurorehabilitation and Neural Repair, vol. 29, Oct. 2014
work page 2014
-
[11]
X. Wang, Y . Fu, B. Ye, J. Babineau, Y . Ding, and A. Mihailidis, “Technology-based compensation assessment and detection of upper extremity activities of stroke survivors: Systematic review,”Journal of Medical Internet Research, vol. 24, p. e34307, Jun. 2022
work page 2022
-
[12]
A real-time algorithm for the detection of compensatory movements during reaching,
E. Averell, D. Knox, and F. van Wijck, “A real-time algorithm for the detection of compensatory movements during reaching,”Journal of Rehabilitation and Assistive Technologies Engineering, vol. 9, p. 20556683221117085, Sep. 2022
work page 2022
-
[13]
A. C ´oias, M. Lee, and A. Bernardino, “A low-cost virtual coach for 2D video-based compensation assessment of upper extremity rehabilitation exercises,”Journal of NeuroEngineering and Rehabilitation, vol. 19, Jul. 2022
work page 2022
-
[14]
Automatic detection of compensation during robotic stroke rehabili- tation therapy,
Y . Zhi, M. Lukasik, M. Li, E. Dolatabadi, R. Wang, and B. Taati, “Automatic detection of compensation during robotic stroke rehabili- tation therapy,”IEEE Journal of Translational Engineering in Health and Medicine, vol. PP, pp. 1–1, Dec. 2017
work page 2017
-
[15]
Simple torso model for upper limb compensatory assessment after stroke,
N. B. Nordin, S. Q. Xie, and B. C. W ¨unsche, “Simple torso model for upper limb compensatory assessment after stroke,” inProc. IEEE Int. Conf. Advanced Intelligent Mechatronics (AIM), 2016, pp. 775–780
work page 2016
-
[16]
Exploring the feasibility of computer vision for detecting post-stroke compensatory movements,
H.-P. Lin, L. Zhao, D. Woolley, X. Zhang, H.-J. Cheng, W. Liang, C. Kuah, T. Plunkett, K. Chua, L. Zhang, and N. Wenderoth, “Exploring the feasibility of computer vision for detecting post-stroke compensatory movements,” inProc. IEEE Int. Conf. Rehabil. Robot. (ICORR), Sep. 2023, pp. 1–6
work page 2023
-
[17]
T. Unger, B. K ¨uhnis, L. Sauerzopf, M. R. Spiess, A. de Spindler, A. R. Luft, C. Easthope Awai, J. G. Sch ¨onhammer, and E. Gavagnin, “Using deep learning to detect upper limb compensation in individuals post- stroke using consumer-grade webcams—a feasibility study,”Frontiers in Medicine, vol. 12, 2025
work page 2025
-
[18]
J. Held, B. Klaassen, A. Eenhoorn, B.-J. van Beijnum, J. Buurke, P. Veltink, and A. Luft, “Inertial sensor measurements of upper-limb kinematics in stroke patients in clinic and home environment,”Frontiers in Bioengineering and Biotechnology, vol. 6, Apr. 2018
work page 2018
-
[19]
Assessment of upper limb movement impairments after stroke using wearable inertial sensing,
A. Schwarz, M. M. C. Bhagubai, G. Wolterink, J. P. O. Held, A. R. Luft, and P. H. Veltink, “Assessment of upper limb movement impairments after stroke using wearable inertial sensing,”Sensors, vol. 20, no. 17, p. 4770, 2020
work page 2020
-
[20]
Measures of interjoint coordination post-stroke across different upper limb movement tasks,
A. Schwarz, J. Veerbeek, J. Held, J. Buurke, and A. Luft, “Measures of interjoint coordination post-stroke across different upper limb movement tasks,”Frontiers in Bioengineering and Biotechnology, vol. 8, p. 620805, Jan. 2021
work page 2021
-
[21]
Self-directed arm therapy at home after stroke with a sensor-based virtual reality training system,
F. Wittmann, J. P. Held, O. Lambercy, M. L. Starkey, A. Curt, R. H ¨over, R. Gassert, A. R. Luft, and R. R. Gonzenbach, “Self-directed arm therapy at home after stroke with a sensor-based virtual reality training system,”Journal of NeuroEngineering and Rehabilitation, vol. 13, no. 1, Aug. 2016
work page 2016
-
[22]
G. Nguyen, J. MacLean, and L. Stirling, “Quantification of com- pensatory torso motion in post-stroke patients using wearable inertial measurement units,”IEEE Sensors Journal, vol. PP, pp. 1–1, Apr. 2021
work page 2021
-
[23]
Task-dependent weakness at the elbow in patients with hemiparesis,
R. F. Beer, J. D. Given, and J. P. A. Dewald, “Task-dependent weakness at the elbow in patients with hemiparesis,”Archives of Physical Medicine and Rehabilitation, vol. 80, no. 7, pp. 766–772, 1999
work page 1999
-
[24]
Biomechanics of reach- ing: Clinical implications for individuals with acquired brain injury,
P. H. McCrea, J. J. Eng, and A. J. Hodgson, “Biomechanics of reach- ing: Clinical implications for individuals with acquired brain injury,” Disability and Rehabilitation, vol. 24, pp. 534–541, Aug. 2002
work page 2002
-
[25]
J. P. A. Dewald, P. S. Pope, J. D. Given, T. S. Buchanan, and W. Z. Rymer, “Abnormal muscle coactivation patterns during isometric torque generation at the elbow and shoulder in hemiparetic subjects,”Brain, vol. 118, no. 2, pp. 495–510, 1995
work page 1995
-
[26]
M. D. Ellis, I. Schut, and J. P. A. Dewald, “Flexion synergy overshadows flexor spasticity during reaching in chronic moderate to severe hemi- paretic stroke,”Clinical Neurophysiology, vol. 128, no. 7, pp. 1308– 1314, 2017
work page 2017
-
[27]
Introducing a standardized Nine Hole Peg Test in persons with stroke—kinematic analysis,
G. M. Johansson, H. Grip, and C. Hager, “Introducing a standardized Nine Hole Peg Test in persons with stroke—kinematic analysis,”Gait & Posture, vol. 42, p. S57, Dec. 2015
work page 2015
-
[28]
R. C. Lyle, “A performance test for assessment of upper limb function in physical rehabilitation treatment and research,”International Journal of Rehabilitation Research, vol. 4, no. 4, pp. 483–492, Dec. 1981
work page 1981
-
[29]
An objective and standardized test of hand function,
R. H. Jebsen, N. Taylor, R. B. Trieschmann, M. J. Trotter, and L. A. Howard, “An objective and standardized test of hand function,”Archives of Physical Medicine and Rehabilitation, vol. 50, no. 6, pp. 311–319, 1969
work page 1969
-
[30]
C. Lhoste, M. Quast, A. Ronco, A. V ogel, C. E. Awai, M. Branscheidt, O. Lambercy, P. Viskaitis, and D. Donegan, “Closed-loop movement- paired transcutaneous auricular vagus nerve stimulation for upper-limb rehabilitation: A feasibility study,” Sep. 2025, research Square preprint
work page 2025
-
[31]
J. Barth, J. Klaesner, and C. Lang, “Relationships between accelerometry and general compensatory movements of the upper limb after stroke,” Journal of NeuroEngineering and Rehabilitation, vol. 17, p. 138, Oct. 2020
work page 2020
-
[32]
L. Sauerzopf, C. G. C. Panduro, A. R. Luft, B. K ¨uhnis, E. Gavagnin, T. Unger, C. E. Awai, J. G. Sch ¨onhammer, J. Degenfellner, and M. R. Spiess, “Evaluating inter- and intra-rater reliability in assessing upper limb compensatory movements post-stroke: Creating a ground truth through video analysis?”Journal of NeuroEngineering and Rehabili- tation, vol....
work page 2024
-
[33]
D. Laidig and T. Seel, “VQF: Highly accurate IMU orientation es- timation with bias estimation and magnetic disturbance rejection,” Information Fusion, vol. 91, pp. 187–204, 2023
work page 2023
-
[34]
A unified approach to interpreting model predictions,
S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” inAdvances in Neural Information Processing Systems (NeurIPS), 2017, pp. 4768–4777
work page 2017
-
[35]
XGBoost: A scalable tree boosting system,
T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proc. ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining (KDD), 2016, pp. 785–794
work page 2016
-
[36]
D. Chicco and G. Jurman, “The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation,”BMC Genomics, vol. 21, no. 1, Jan. 2020
work page 2020
-
[37]
Compensatory strategies for reaching in stroke,
C. Cirstea and M. Levin, “Compensatory strategies for reaching in stroke,”Brain, vol. 123, no. 5, pp. 940–953, Jun. 2000
work page 2000
-
[38]
A. Roby-Brami, N. Jarrasse, and R. Parry, “Impairment and compen- sation in dexterous upper-limb function after stroke: From the direct consequences of pyramidal tract lesions to behavioral involvement of both upper-limbs in daily activities,”Frontiers in Human Neuroscience, vol. 15, Jun. 2021
work page 2021
-
[39]
Identifying com- pensatory movement patterns in the upper extremity using a wearable sensor system,
R. Ranganathan, R. Wang, B. Dong, and S. Biswas, “Identifying com- pensatory movement patterns in the upper extremity using a wearable sensor system,”Physiological Measurement, vol. 38, no. 12, pp. 2222– 2234, Nov. 2017
work page 2017
-
[40]
K. Ding, J. Wang, X. Wang, L. Zhou, D. Xiong, and L. Guo, “System for detection and quantitative evaluation of compensatory movement in post-stroke patients based on wearable sensor and machine learning GABLERet al.: ML-BASED REAL-TIME DETECTION OF COMPENSATORY TRUNK MOVEMENTS USING TRUNK-WRIST IMUS 17 algorithm,”IEEE Sensors Journal, vol. 24, no. 14, pp....
work page 2024
-
[41]
Detecting compensatory trunk movements in stroke survivors using a wearable system,
R. Ranganathan, R. Wang, R. Gebara, and S. Biswas, “Detecting compensatory trunk movements in stroke survivors using a wearable system,” inProc. Workshop Wearable Systems and Applications, Jun. 2017, pp. 29–32
work page 2017
-
[42]
S. Cai, G. Li, E. Su, X. Wei, S. Huang, K. Ma, H. Zheng, and L. Xie, “Real-time detection of compensatory patterns in patients with stroke to reduce compensation during robotic rehabilitation therapy,”IEEE Journal of Biomedical and Health Informatics, vol. 24, no. 9, pp. 2630– 2638, 2020
work page 2020
-
[43]
S. Cai, X. Wei, E. Su, W. Wu, H. Zheng, and L. Xie, “Online compensation detecting for real-time reduction of compensatory mo- tions during reaching: A pilot study with stroke survivors,”Journal of NeuroEngineering and Rehabilitation, vol. 17, Apr. 2020
work page 2020
-
[44]
Wearable sensor to monitor quality of upper limb task practice for stroke survivors at home,
N. J. Seo, K. Coupland, C. Finetto, and G. Scronce, “Wearable sensor to monitor quality of upper limb task practice for stroke survivors at home,”Sensors, vol. 24, p. 554, Jan. 2024
work page 2024
-
[45]
Selecting muscles for detection of upper-limb compensatory movements using s-EMG sensors,
M. Berjis, M.-E. LeBel, D. Lizotte, and A. Trejos, “Selecting muscles for detection of upper-limb compensatory movements using s-EMG sensors,”IEEE Transactions on Medical Robotics and Bionics, vol. PP, pp. 1–1, Jan. 2025
work page 2025
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.