KinTwin: Biomechanical Digital Twin Framework
- KinTwin is a modular, goal-conditioned imitation learning framework that creates physics-based digital twins by mapping observed human kinematics to neuromusculoskeletal models.
- It employs reinforcement learning (PPO) and anatomically detailed torque-driven and muscle-driven models validated on extensive clinical data, achieving sub-degree accuracy in joint tracking.
- KinTwin provides clinically interpretable metrics by quantifying joint torques, GRFs, and muscle activations, enhancing movement science and rehabilitative medicine applications.
KinTwin denotes a modular, goal-conditioned imitation learning framework for producing physics-based digital twins of human biomechanics. KinTwin accurately replicates observed human kinematics captured by markerless motion capture and maps these trajectories onto high-fidelity, physics-driven neuromusculoskeletal models, yielding estimates of joint torques, ground reaction forces (GRFs), and muscle activations. KinTwin is structured around reinforcement learning-driven policy optimization, leverages both torque-driven and muscle-driven whole-body models, and is validated on extensive clinical movement datasets—including impaired populations and assistive device use. It provides clinically aligned metrics and interpretable inferences relevant for both movement science and rehabilitative medicine (Cotton, 19 May 2025).
1. System Overview and Principal Contributions
KinTwin is a goal-conditioned policy trained with Proximal Policy Optimization (PPO) to find controls that best match observed human pose trajectories within a physics-based dynamic simulation environment. Unlike canonical pose estimation pipelines based on purely visual models (e.g., SMPL), KinTwin incorporates:
- Anatomically detailed biomechanical models: These models are derived from LocoMuJoCo, with two principal variants: a torque-driven model (40 degrees of freedom (dof), 34 joint torques, and 6 residual force control dof), and a muscle-driven model (40 dof plus 92 lower-limb Hill-type muscle actuators).
- Expansive clinical validation dataset: 467 subjects yielding 34 hours of movement data, including able-bodied, prosthesis users, hemiparese patients, and subjects using assistive devices or receiving physical therapist support.
- Clinically interpretable tracking metrics: Performance is reported as joint angle mean absolute errors (down to ≤0.65° for torque models), pelvis translation error (42 mm), and gait event timing error (approximately 80 ms), exceeding the clinical sensitivity of standard metrics such as mean per-joint position error (MPJPE).
- Goal-conditioned imitation learning: The policy is conditioned not only on the current state but also on future target kinematics, enabling superior anticipation and robustness in replicating diverse movement patterns, including pathological and assisted gaits (Cotton, 19 May 2025).
2. Biomechanical Model Specification
KinTwin’s simulation core builds upon rigid-body multibody dynamics. For generalized coordinates :
where is the mass-inertia matrix, contains Coriolis and centrifugal terms, accounts for gravity, are internal actuators (joint torques or muscle-generated moments), is a residual force control vector (6 dof at the pelvis for handling unmodeled dynamics), is the Jacobian at contact, and are GRFs generated by parametric foot–ground contact models.
In the muscle-driven configuration, each muscle follows a Hill-type contractile model:
where is muscle activation, is maximal isometric force, and are normalized force–length and force–velocity relations, and is passive elastic force computed as a function of fiber length. Muscle excitation is filtered by first-order activation dynamics, and the model incorporates pennation, tendon compliance, and multi-sphere foot collisions as implemented in MuJoCo MJX (Cotton, 19 May 2025).
3. Imitation Learning Formulation and Policy Architecture
KinTwin is trained as a goal-conditioned RL agent using PPO. The state vector at instant includes:
- Model joint positions and velocities , excluding global X-Y translation,
- 21 body segments’ inertial parameters,
- Center-of-mass (COM) velocities,
- Most recent control signals deemed "active forces".
Observation incorporates:
- The previous action ,
- Anatomical scaling parameters (8 values individually fit from keypoints),
- A "goal horizon": target kinematics at multiple future lags , encoded as relative position/quaternion differences and velocity differences.
The combined policy input is processed through an eight-layer multilayer perceptron (MLP) (256-unit, tanh activations), and the value function via a separately parameterized, deeper MLP (eight layers, 1024 units each). Actions are:
- Torque model: 40 dimensions (6 residual force + 34 joint torque actuators)
- Muscle model: 118 dimensions (6 RFC + 20 upper-body joint torques + 92 muscle excitations)
Training is conducted in parallel across 4096 environments per GPU, with physics running at 450 Hz (90 Hz frames, 5 substeps each). The torque-driven agent is trained for 4 billion simulator steps; the muscle-driven variant requires 8 billion steps (Cotton, 19 May 2025).
4. Optimization Objectives and Loss Construction
Rewards at each step are:
where to ensure reward positivity, and early termination is triggered for pelvis height outside m.
- Kinematic tracking losses: is a weighted mean-squared error on pose, penalizes velocity deviation. Weights are assigned per degree-of-freedom: for most, 0.0 for pelvis height, 2.0 for pelvis rotation; (pelvis velocity), $0.01$ (joint velocities).
- Action shaping losses: balances regularization on action magnitude (), action smoothness (), and a negative weight on RFC magnitude (), discouraging non-physical compensatory impulses unless required.
Notably, there are no explicit terms enforcing torque or muscle force matching; the policy infers internal forces dynamically through the tracking reward structure alone (Cotton, 19 May 2025).
5. Clinical Dataset and Experimental Paradigms
KinTwin is evaluated on a proprietary clinical biomechanical dataset (under IRB approval), consisting of:
- Participants: 467 (426 train, 41 test; 34 h of data)
- Pathologies/assistive conditions: Including lower-limb amputees (multiple prosthetic levels), hemiparesis post-stroke, spinal cord tumor, assistive device usage (cane, crutch, walker), and therapist assistance.
- Activities: Overground walking, timed-up-and-go, L-test, four-square-step, functional gait tasks, sit-to-stand.
- Acquisition: Multi-camera markerless motion capture (MOVI keypoints, MetrABs-ACAE), fitted via differentiable optimization to scale a MuJoCo reference model at 30 Hz, then interpolated to 90 Hz. Training/test partitioning is by participant, eliminating data leakage (Cotton, 19 May 2025).
6. Quantitative Evaluation and Ablation Analysis
Performance on the held-out test set:
Torque-driven (n=397 test trials):
- Failure rate (pelvis <0.3 m): 3.8%
- Mean absolute errors:
- Pelvis position: 42 mm
- Pelvis velocity: 82 mm/s
- Joint angles: 0.65° (hip: 1.2°, knee: 0.9°, ankle: 0.7°)
- Joint velocities: 8.2°/s
- Gait event timing (vs. instrumented walkway): foot contact error 80 ms (NIQR), foot off 71 ms, stride length error 20 mm
Muscle-driven:
- Failure rate: 9.6%
- Joint angle MAE: 1.68° (hip 2.1°, knee 1.7°, ankle 3.5°)
- Gait event timing: foot contact 120 ms, foot off 135 ms, stride 29 mm
Ablation studies confirm importance of design choices: removing future target observations nearly doubles joint angle error and increases failure; removing RFC raises failure by 61% (Cotton, 19 May 2025).
7. Clinical Interpretation, Use Cases, and Limitations
KinTwin enables inference of patient- and pathology-specific kinetic and muscle activation patterns otherwise inaccessible from kinematics alone. In transfemoral amputees, it reveals reduced prosthetic-side hip extension and stance propulsion, with intact-side compensation verifiable by external walkways. In hemiparetic stroke, it elucidates side-asymmetric muscle activations and torque generation linked to clinical gait deficits.
Applications include:
- Objective phenotyping of gait pathology and quantification of muscle deficits (stroke, amputation, neurodegeneration)
- Longitudinal monitoring of rehabilitation progress or intervention effects (e.g., prosthetic fitting, functional electrical stimulation)
- Early identification of fall risk from subtle kinetic or muscle pattern changes
Limitations include unmodeled foot–ground interactions, limited 3D GRF validation, and muscle parameter calibration challenges. Possible improvements comprise integrating electromyographic (EMG) data, refining contact dynamics, and adopting learned trajectory representations via generative motion models. The system achieves the first demonstration of sub-degree, sub-100 mm tracking within clinical populations using muscle-driven models (Cotton, 19 May 2025).