# Action Diffusion for Learning Therapist Behavior in Exoskeleton-Assisted Dyadic Rehabilitation

Abhishek Sankar, Emek Barıs Kucuktabak, Clément Lhoste, Matthew Short, Lorenzo Vianello, Jose Pons

► To cite this version:

Abhishek Sankar, Emek Barıs Kucuktabak, Clément Lhoste, Matthew Short, Lorenzo Vianello, et al. Action Diffusion for Learning Therapist Behavior in Exoskeleton-Assisted Dyadic Rehabilitation. International Conference on NeuroRehabilitation, Nov 2024, La Granja, Spain. hal-05141147

HAL Id: hal-05141147

https://hal.science/hal-05141147v1

Submitted on 2 Jul 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Action Diffusion for Learning Therapist Behavior in Exoskeleton-Assisted Dyadic Rehabilitation

Abhishek Sankar, Emek Barış Küçüktabak, Clément Lhoste, Matthew Short, Lorenzo Vianello, Jose Pons

*Abstract*— In this work, we present a machine learning model based on the Action Diffusion paradigm to mimic the behavior of a physical therapist in a dyadic rehabilitation context. The experimental setup involves a patient and a therapist wearing multi-joint lower limb exoskeletons, virtually connected via a spring-damper system, through which the therapist provides assistive gait correction during walking. The primary aim of this work is to train a machine learning model on data collected from these patient-therapist interactions, enabling it to predict and replicate the therapist's actions during real-time rehabilitation sessions. The model predicts therapist behavior $t_a$ seconds into the future based on $t_o$ seconds of patient joint kinematic data. Results demonstrate that the model effectively mimics the therapist's corrective actions, achieving notable accuracy within a short training cycle. This work has the potential to automate, personalize, and enhance gait rehabilitation by reducing reliance on human therapists.

## I. INTRODUCTION

In physical therapy, motor-impaired patients often rely on physical assistance from therapists to regain lost mobility and improve motor functions. For instance, therapists often guide foot placement during post-stroke gait rehabilitation. Recent developments in human-robot interfaces have enabled a new approach to these dyadic rehabilitation setups, where both the patient and the therapist are supported by robotic devices, such as lower-limb exoskeletons [1].

In such setups, the exoskeletons worn by the patient and the therapist are connected via a virtual physical interface, allowing the forces exerted by one to be felt by the other. This virtual coupling simulates the physical interaction that occurs during traditional therapy in a way that is more natural to the therapist, resulting in better rehabilitation outcomes. The Fourier ExoMotus X2 exoskeletons used in this work are designed to facilitate lower-limb rehabilitation. The therapist's movements help guide the patient toward more natural gait patterns through this virtual spring-damper system. This dynamic interaction is crucial in helping motor-impaired patients correct their gait and improve mobility during rehabilitation sessions.

Despite the effectiveness of this improved physical interface, the need for a human therapist in the loop creates a limitation in the scalability and accessibility of such therapy. Our work aims to address this limitation by replacing the therapist with a machine learning model that can mimic the therapist's corrective actions. By training an Action Diffusion model on data collected from actual patient-therapist interactions, we developed a system where the patient receives personalized assistance without needing a human therapist present. This not only enables autonomous rehabilitation, but also tailors

the assistance to the specific patient's needs according to previous sessions.

## II. MATERIALS AND METHODS

### A. Dyadic Rehabilitation System Description

This work uses two Fourier Exoskeleton X2 lower-limb exoskeletons for the physical-interaction based dyadic rehabilitation system. The two exoskeletons are virtually connected by a spring-damper system. The impaired patient receives corrective assistance from the therapist through this connection. This system allows the patient and the therapist to walk synchronously, giving the therapist the ability to apply subtle corrections to the patient's walking pattern.

The ExoMotus X2 exoskeleton is designed for overground walking with four active degrees of freedom (DoF) at the hip and knee joints, allowing passive motion at the ankle joints. Communication between the motors and onboard sensors is established via the CANOpen communication protocol over CAN bus. The controllers are implemented on a ROS and C++-based open-source software stack, the CANOpen Robot Controller (CORC) [2], and run at 333 Hz on an external PC. The joint positions of both the patient and therapist are streamed as ROS messages, and the controller processes these messages to apply appropriate torque commands to the motors on the patient's exoskeleton.

### B. Data Collection

Training data was collected from multiple rehabilitation sessions between the same patient-therapist pair. The exoskeleton joint positions were recorded at a frequency of 66.66 Hz, capturing the dynamic physical interaction over the course of the therapy session. The model takes as input joint state data from the patient over a 1.5-second ($t_o$) window, while predicting the therapist's corrective actions over the next 3 seconds ($t_a$).

### C. Action Diffusion Model

In their work in [3], Chi et al. describe the architecture of an Action Diffusion model, a denoising diffusion probabilistic model (DDPM) that is highly effective at learning from demonstration data in complex, multimodal environments. Unlike conventional models that struggle to capture multimodal action distributions and are unstable to train, diffusion models succeed in representing a robot's visuomotor policy as a conditional denoising diffusion process, where random noise is synthesized into structured action trajectories in a number of denoising steps. With the dyadic rehabilitation setup, the model observes the patient's exoskeleton joint
<figure><img src="image_2.png" /><figcaption>Fig. 1. Action Diffusion Process Overview. The model takes the latest $t_o$ steps of observation data and outputs $t_a$ steps of actions.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>Fig. 2. Sample inference from the model compared against the ground truth therapist action from the test dataset.</figcaption></figure>

angles and predicts the therapist's response by iteratively refining action trajectories over the prediction horizon. Figure 1 provides a general overview of this process. The architecture remains largely consistent with the original implementation of the diffusion policy, featuring a CNN-based policy to model long-term dependencies in the patient-therapist interaction. Inferences are processed in separate threads to handle computation latency and ensure continuous action generation in real-time. The trained model was integrated into the ROS framework for communication between the two exoskeletons. The model streams generated action trajectories as ROS messages, which are then converted into desired motor torques by the patient's exoskeleton controller.

### III. RESULTS

The Action Diffusion model successfully learned to predict the corrective actions of the therapist based on the patient's joint state data within just a few epochs of training. The model was evaluated on test data where it predicted the therapist's actions over a 3-second window, based on 1.5 seconds of observed patient joint state data. The predictions of the model closely matched the actions of the therapist, demonstrating its ability to learn from and accurately mimic the therapist. Figure 2 highlights a sample inference, plotting the predicted action against the actual actions of the therapist. The overlapping curves show that the model learned to match the timing and magnitude of the therapist's actions during therapy.

### IV. DISCUSSION

While testing, it was observed that the model overfit to the specific gait pattern in the training dataset, leading to poor predictions and decreased generalization capabilities. Expanding the training dataset and implementing some form of adaptive learning may help the model to dynamically adjust and personalize action generation, resulting in more effective therapy across a variety of rehabilitation scenarios. Addressing this problem is crucial for the scalability of the system.

### V. CONCLUSION

The results of this work highlight the potential of machine learning models to replace expert human therapists in dyadic rehabilitation setups for personalized therapy. Future work in this area, such as training on diverse data and improving the model's adaptability, can create systems that are able to handle a large number of rehabilitation use cases and are not reliant on human intervention.

### REFERENCES

[1] Emek Barış Küçüktabak, Yue Wen, Matthew Short, Efe Demirbaş, Kevin Lynch, and Jose Pons. Virtual physical coupling of two lower-limb exoskeletons, 2023.

[2] Justin Fong, Emek Barış Küçüktabak, Vincent Crocher, Ying Tan, Kevin M. Lynch, Jose L. Pons, and Denny Oetomo. CANopen Robot Controller (CORC): An Open Software Stack for Human Robot Interaction Development, pages 287–292. Biosystems and Biorobotics. Springer Science and Business Media Deutschland GmbH, Germany, 2022. Publisher Copyright: © 2022, The Author(s), under exclusive license to Springer Nature Switzerland AG.

[3] Cheng Chi, Zhenjia Xu, Siyuan Feng, Eric Cousineau, Yilun Du, Benjamin Burchfiel, Russ Tedrake, and Shuran Song. Diffusion policy: Visuomotor policy learning via action diffusion, 2024.