Coaching a Robotic Sonographer: Learning Robotic Ultrasound with Sparse Expert's Feedback
Deepak Raina Mythra V. Balakuntala Byung Wook Kim Juan Wachs Richard Voyles



















Coaching a Robotic Sonographer: Learning Robotic Ultrasound with Sparse Expert's Feedback
    Deepak Raina^*, Mythra V. Balakuntala^*, Byung Wook Kim, Juan Wachs  Senior Member, IEEE, 
Richard Voyles Fellow, IEEE


This work was supported by National Science Foundation (NSF) USA under Grant #2140612 and Purdue University seed grants for West Lafayette-Indianapolis campuses collaboration. (Corresponding author: Deepak Raina)

Deepak Raina is with the Malone Center for Engineering in Healthcare, Johns Hopkins University, Baltimore, MD 21218 USA (e-mail: draina1@jh.edu)
Mythra V. Balakuntala is with Nikon Research Corporation of America, Belmont, CA 94002 USA (e-mail: mythra.balakuntala@nikon.com)

Byung Wook Kim is with the Department of Computer Engineering, Purdue University, West Lafayette, IN 47907 USA (e-mail: kim2986@purdue.edu)
Juan Wachs is with the School of Industrial Technology, Purdue University, West Lafayette, IN 47907 USA (e-mail: jpwachs@purdue.edu).

Richard Voyles is with the School of Engineering Technology, Purdue University, West Lafayette, IN 47907 USA (e-mail: rvoyles@purdue.edu)
*DR and MVB primarily conducted this research at Purdue University
    
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================



§ ABSTRACT 
Ultrasound is widely employed for clinical intervention and diagnosis, due to its advantages of offering non-invasive, radiation-free, and real-time imaging. However, the accessibility of this dexterous procedure is limited due to the substantial training and expertise required of operators. The robotic ultrasound (RUS) offers a viable solution to address this limitation; nonetheless, achieving human-level proficiency remains challenging. Learning from demonstrations (LfD) methods have been explored in RUS, which learns the policy prior from a dataset of offline demonstrations to encode the mental model of the expert sonographer. However, active engagement of experts, i.e. Coaching, during the training of RUS has not been explored thus far. Coaching is known for enhancing efficiency and performance in human training. This paper proposes a coaching framework for RUS to amplify its performance. The framework combines DRL (self-supervised practice) with sparse expert's feedback through coaching. The DRL employs an off-policy Soft Actor-Critic (SAC) network, with a reward based on image quality rating. The coaching by experts is modeled as a Partially Observable Markov Decision Process (POMDP), which updates the policy parameters based on the correction by the expert. The validation study on phantoms showed that coaching increases the learning rate by 25% and the number of high-quality image acquisition by 74.5%.








Robotic ultrasound, Deep reinforcement learning, Coaching,  Learning from expert's feedback




§ INTRODUCTION

Medical ultrasound imaging is one of the most widely used imaging modalities for diagnostic and interventional procedures. Its widespread adoption can be attributed to its affordability, portability, non-invasiveness, absence of ionizing radiation, and real-time feedback. These merits make it particularly suitable for general use in low-income and developing regions. Unfortunately, the increasing demand for medical ultrasound, coupled with the substantial training required to become a proficient sonographer, and the significant impact of sonographer experience on diagnostic accuracy, contribute to a persistent gap in accessibility to this fundamental and valuable diagnostic tool <cit.>. 




Robotic Ultrasound (RUS) holds great promise to overcome these drawbacks. Further, RUS broadens the pool of skilled practitioners, enhances the safety of healthcare workers during pandemics, and improves the accessibility of ultrasound in rural areas where trained human practitioners are scarce <cit.>. A robot, once trained to an expert level, not only performs the procedure but also opens the possibility to train novice human operators. This dual functionality can significantly alleviate the training burden and offer a sustainable solution to the persistent gap in the availability of trained sonographers.


Thus, transferring this skillset from an expert human operator to a robot is a key research question <cit.>. Novice sonographers learn this procedure by observing experts, followed by self-practice under the supervision of an expert, who may interrupt and provide corrections as needed. It brings into the picture the critical element of their training: coaching <cit.>. It is defined as an active engagement of human experts in a trainee's learning process. 












Coaching by an expert guides novice humans to learn more rapidly and to achieve high levels of performance <cit.>. Surprisingly, there is a dearth of coaching research in RUS. Although, it has started gaining prominence in robot learning literature <cit.>.  For RUS, Deep reinforcement learning (DRL)
have been explored to mimic the training process of humans under reward-based self-supervision  <cit.>. However, these methods suffer from longer training times, local minima issues, and limited adaptability to unforeseen scenarios. Later, several works leveraged the knowledge of experts in the form of demonstrations and pre-trained a model offline <cit.>. These approaches are often termed as learning from demonstration (LfD). Notably, none of these methods considered real-time engagement of experts during training. The aim of this paper is to develop a coaching framework for RUS to amplify its performance. There is a lack of formalism for coaching in robot learning. In this paper, we treat coaching as zero-shot learning because the RUS (learner) receives unlabeled corrective actions from the expert. These actions will correct the learnt policy and transform it towards an optimal policy.










 §.§ Related work



  §.§.§ Robotic ultrasound systems

Earlier RUS used visual servoing to automate the ultrasound procedure <cit.>, but these methods lack human-level anatomical knowledge, a crucial factor for sonographers in relating probe motions to the complex anatomy. To supplement this knowledge, later methods used high-end imaging modalities like MRI, CT, or 3D data  <cit.> to identify the anatomical landmarks and pre-plan the probe trajectory. However, the sparse availability of these modalities in underserved regions did not solve the underlying issue. Recent works have explored the use of DRL architectures to mimic the self-supervised practice of human trainees <cit.>, yet the clinical applicability of these systems was questioned due to longer training times. 











  §.§.§ Experts' engagement in learning of RUS

Researchers explored the engagement of ultrasound experts through LfD approaches to reduce training times. 

Lonas et al. <cit.> used the Gaussian Mixture Model (GMM) and Gaussian Mixture Regression (GMR) to learn a probe motion model from offline demonstrations. However, the model did not include the probe forces and ultrasound image information, which limited its clinical applicability. Li et al. <cit.> used the dataset curated from experts' demonstrations to sample probe poses during model-free RL. 

This approach has two demerits. First, a very large dataset would be required to handle human anatomical variability. Second, sampling from a large dataset would be computationally expensive, hence impractical for RUS. Raina et al. <cit.> proposed to model the Gaussian process (GP) prior and kernel from offline expert demonstrations. Later, this pre-trained GP was used in the Bayesian optimization framework for the robotic acquisition of optimal images.
Jiang et al. <cit.> and Burke et al. <cit.> inferred the reward for optimizing the RUS policy from scanning demonstrations, which assumed that the images shown in the later stage are more important than the earlier images. It is important to note that the above-cited works proposed to learn offline using a dataset collected from expert demonstrations, which often require numerous optimal demonstrations. Additionally, these approaches are goal-driven, while the proposed coaching framework allows updating the policy objectives and parameters through local corrections to the robot's trajectory. 




























  §.§.§ Coaching robots



Early coaching-based methods incorporated diverse human feedback within reinforcement learning methods <cit.>. Macglashan et al. <cit.> proposed COACH (Convergent Actor-Critic by humans) that extended RL with online reward/penalty from experts. However, COACH converged only to local minima and relied on sparse binary evaluations using goal examples.  

As such, this method demands substantial sampling, greater learning time, and a large feedback volume. Later, preference-based learning techniques were introduced into DRL, which involved presenting action samples (trajectories) to experts for grading and later enhancing behavior based on their preferences <cit.>. 

While preferences aid improvement, the challenge remained in estimating trajectories to elicit preference-based feedback, resulting in inefficient use of expert's input. Expert feedback is not only evaluation but also provides useful information on direct trajectory modifications <cit.>. Therefore, the robot should leverage these corrections to optimize actions and update rewards.

Recent strategies in physical human-robot interaction (pHRI) considered corrections as informative rather than disturbance <cit.>. Online learning from correction aimed to refine objectives and generate the trajectory based on comparisons between corrected and original trajectories <cit.>. Similar techniques have been employed in shared autonomy in manipulation <cit.>. 

However, the challenge lies in the robot understanding the context of interactive feedback and updating its objectives and policy accordingly. A formalism for coaching that combines policy updates and learning new objectives is lacking in the robotics literature. In order to address these challenges, we extend Partially Observable Markov Decision Process (POMDP) formalizations from pHRI and shared autonomy to coaching the DRL policy. Moreover, we demonstrate its applicability to previously unexplored and highly expert-dependent modality of medical ultrasound imaging.




§ METHODOLOGY

The pipeline of the methodology is outlined in Algorithm 1, which combines self-supervised practice through DRL with coaching through sparse expert feedback. The robot learns a DRL policy to perform ultrasound under self-supervision. During learning, the expert provides online feedback through kinesthetic corrections, which will update the policy objective and parameters towards optimal policy.





 §.§ Self-supervised practice through DRL




This section describes a self-supervised practice through DRL policy, which is learnt using a reward formulation based on ultrasound image quality. The robot model executes in a finite bounded horizon, with a Markov decision process ℳ, with state space 𝒮 and action space 𝒜. For a horizon T, the state transitions according to the dynamics 𝒯:𝒮×𝒜⟶𝒮. A policy π_θ (a|s) represents the probability of taking action a given a state s, with parameters θ. The cumulative expected reward over horizon T is given by eq. (<ref>). 

    J(π) = 𝔼_π[∑_t=1^Tϕ(s_t,a_t)]

We used an off-policy algorithm, Soft Actor-Critic (SAC) <cit.> to learn the policy. This is due to the better sample efficiency and generation of stable policies by SAC, which is suitable for practical
applications such as manipulation <cit.>. This algorithm maximizes the cumulative reward and entropy to learn the policy. 



  §.§.§ State space

The state 𝒮 is defined based on the ultrasound image. We have adopted an image quality classification network from our previous work <cit.>, which used ResNet50 as a base network with multi-scale and higher-order processing of the image for conducting the holistic assessment of the image quality. The block diagram of this network is shown in Fig. <ref>. 




This classifier first extracts features at multiple scales to encode the inter-patient anatomical variations. Then, it uses second-order pooling (SoP) in the intermediate layers (local) and at the end of the network (global) to exploit the second-order
statistical dependency of features. The local-to-global SoP will capture the higher-order relationships between different spatial locations and provide the seed for correlating local patches.
This network encodes the image into a feature vector of size 2048, which represents the state of the policy. 


  §.§.§ Action space

The action space 𝒜 for the SAC policy is a combined position, orientation, and forces of the probe. Specifically, the robot controls the position of the probe in the xy-plane; orientation along roll, pitch and yaw; and force along the z-axis (normal to the surface). 



  §.§.§ Rewards

The reward is based on the ultrasound image quality estimated using the same network <cit.>, which represents the state. The extracted image features are passed through a linear classifier layer to generate a feature vector of size 5. Finally, the index of maximum value for this feature vector gives an integer quality rating between 1-5. In addition, a quality rating of 0 is assigned when the measured force value of the probe along the z-axis is below the minimum required for the appropriate contact. The reward is then defined as


    r_u = η (q==q_max) + q/q_max


where q is the quality of the image, and the expression (q==q_max) is 1 if the quality is maximum and 0 otherwise. The constant η is used to amplify the reward when the robot reaches the maximum image quality (i.e., q=q_max). This image quality-based reward guides the self-supervised learning of the ultrasound policy.



 §.§ Coaching with sparse expert's feedback

The coaching scenario for RUS is shown in Fig. <ref>. It is treated as learning a hidden goal (g^*) by observing the corrective actions (a^c) provided by the expert. We develop a formalism for representing coaching as a partially observable dynamical system. Coaching aims to improve the objectives and parameters through local corrections to the trajectory. 



RUS can only observe the coach's corrections a^c and its actions a^r. It acts according to its optimal policy (π_θ), however, the coach expects it to operate with respect to a true objective whose optimal actions are determined by π_θ^*. The coach does not directly provide parameters θ^*, nor does the RUS know π_θ^*.
In DRL policy learning, we assumed that the goal states (g) are known and the reward is computed based on eq. (2). However, a correction from the coach implies that the goals and the policy need to be updated. If the current policy parameters θ = θ^*, then the formulation is an MDP where the robot is already behaving optimally with respect to expectations. However, when θ≠θ^*, the robot cannot directly observe θ^* to update its policy. Further, the robot cannot observe the coach's expected goals g^* as well.  Therefore, the uncertainty in the objectives g^* and corresponding policy parameters θ^* turns this into a Partially Observable Markov Decision Process (POMDP).


  §.§.§ POMDP model
In this POMDP, g^* forms the hidden part of the state s̅, and the coach's corrective actions a^c are observations about g^* and θ^* under some observation model as 𝒪(a^c | s̅^* = (s, g^*), a^r). The observation of the coach's correction allows the robot to learn the true objective. The coach's feedback is modeled as corrections that optimize the expected return from the state s̅ while taking action a^r+a^c. The action-value function (Q) captures this expected return. Thus, it can be written as:

    𝒪(a^c|s̅,a^r) ∝ e^Q_π_θ(s̅,a^r+a^c)


The relationship for the observation model indicates that the coach provides feedback,
which together with the robot’s action, will lead to the desired behavior. And similar to
human coaching, the robot is expected to continuously learn a better objective by observing
the feedback. This formal approach captures the true essence of human coaching. The uncertainty is in the estimate of the desired goals g^* and the corresponding policy parameters θ^*.
The environmental state s, which is part of the POMDP state s̅, is assumed to be fully observable, similar to POMDP-lite <cit.>. However, the robot cannot observe the goal part of the state s̅. Instead, the robot can learn an action-value function over belief states b(s̅) as follows:

    Q^*(b, a^c+a^r) = 𝔼[r(b, a^c + a^r) + 𝔼_b^'[V*(b')]]

Note that solving a POMDP with continuous action and states is expensive and usually intractable. Several approaches to estimate and approximate solutions for a POMDP have been explored in literature, such as hindsight optimization <cit.> or reduction to QMDP <cit.>. We provide an approximation to simultaneously update the policy parameters θ and the action value at the corrected states.



  §.§.§ Approximate solution

In order to solve the POMDP, we transform it into a policy update problem. Several approximation are defined to achieve the policy update, which include trajectory correction, reward formulation, and policy parameter computation. These approximations provide an elegant solution to the POMDP model.







    Trajectory correction :     The Q-value shown in eq. (<ref>) cannot be computed for continuous state and action spaces. Therefore, the reasoning is done in the trajectory space instead of the control action space. The trajectory space is defined based on pose and force profiles resulting from the DRL policy learning. First, the robot estimates a trajectory based on the learned policy π_θ(a|s) derived from the observed goal g. The robot then utilizes an in-built hybrid force-position controller to track this trajectory. Instead of computing the Q-value for each action, we can estimate the total reward resulting from following this trajectory Π^r. 
    Fig. <ref> shows an example of a scenario where the robot is following the trajectory determined by the DRL policy. The robot trajectory can be represented as a sequence of control inputs resulting from the actions generated by π_θ.
    

    
    
    The coach can apply a correction at any instant after some duration of DRL policy learning. This corrective action a^c is provided at a point p^c on the robot trajectory. However, the point correction has to be propagated across a local region of the trajectory. A trajectory optimizer is used to obtain the coach-preferred trajectory. The coach-preferred trajectory (Π^c) is obtained by smoothly deforming the robot trajectory (Π^r) locally using minimum jerk constraints, as follows:
    
    Π^c = Π^r + μΠ^o(a^c)

    where μ>0 is a scaling factor for the deformation and Π^o is offset to current trajectory based on action a^c computed using minimum jerk optimization. The minimum jerk trajectory is computed by obtaining a trajectory Π^o that minimizes the integral of a squared jerk over time. The solution to this optimization is a trajectory represented by a quintic polynomial as Π^o_t = ∑_i=0^5k_i t^i. Here, t is the time, and k_i are coefficients of the polynomial to be determined based on control points and boundary conditions. The first three constants can be determined from the initial position, velocity, and acceleration at t = 0. Similarly, the last three can be estimated based on the final or target position, velocity, and acceleration. For the case of offsetting the robot trajectory Π^r, we generate piecewise minimum jerk trajectory with control points at a p^c and two points on either side of p^c spaced at a time distance determined by the scale of the correction. Once the trajectory is updated, we can run the robot along the new trajectory and discover the associated states observed while moving on the expert-preferred trajectory.
    
    

    

    Reward modification:
   The coach-preferred trajectory is only a trajectory offset based on the corrective action. The robot has not learned how to leverage the knowledge from the preferred trajectory to improve the policy. We propose augmenting the reward objectives with two components as coach reward r_c(s̅, a) and trajectory reward r_Π (s̅,a), as follows:
    
    r(s̅,a) = w_u r_u(s̅,a) + w_c r_c(s̅,a) + w_Π r_Π(s̅,a)

    where w_* is the weight associated with corresponding rewards (r_*). The coach reward r_c associates the states observed by following the coach-preferred trajectory Π^c with a small positive reward. The trajectory reward r_π penalizes large changes in poses or forces to ensure that the policy generates a smoother path. The reward weights w_* are learned by maximizing the return to choose the preferred trajectory over the old robot trajectory
    
    

    

    Policy update:
    In addition to updating the reward or goals, the policy parameters are offset to move towards the coach’s optimal policy π_θ^*. Several iterations of coaching will generate multiple desired states and segments of preferred trajectories. The state transitions, the corresponding rewards from the new reward model, and the actions along these trajectories are stored in a separate replay buffer, named as coach replay buffer. Then, an approximation of the desired optimal policy is computed.  The approximate policy π_θ̂(a|s) generates the actions needed to move along the preferred trajectories. The parameters of the policy are represented as θ̂^* because they are an approximation of the true optimal parameters θ^*.   The policy can be written as
    π_θ̂^*(a|s) →π(a|s, θ̂^*). A Gaussian distribution is used for the approximate policy, i.e., π(a|s, θ̂^*) ∼𝒩(μ(θ̂^*), σ(θ̂^*)). We know the sequence of states s on the expert-preferred trajectories and the corresponding action to take in these states. Therefore, we aim to estimate the policy parameters θ̂^* that fit this state and action data. The parameters are estimated using maximum likelihood estimation. Once the approximate policy is found, the current policy is regularly updated by performing gradient steps of SAC on the coach replay buffer. For the policy update during SAC, we include an additional loss based on KL divergence between the robot’s policy π_θ(a|s) and the approximation π(a|s,θ̂^*).
    
    ℒ_KL = 𝐃_KL(π_θ(a|s) || π(a|s, θ̂^*))

    This KL divergence loss ensures actions are taken according to the coach's preferences in the preferred states. 
    









































 











§ RESULTS AND DISCUSSIONS



 §.§ Experimental setup

The experimental setup is shown in Fig <ref>. It consists of a 7-DOF Rethink Robotics Sawyer arm, with a Micro Convex MC10-5R10S-3 probe by Telemed Medical Systems, USA, attached to its end-effector using a custom-designed gripper. The robot has a wrist-mounted force-torque sensor, which was used to measure the forces. Two urinary bladder phantoms, P0 and P1, were used for scanning. P1 is a modified variant of P0 with a ballistic gel layer. ROS was used as the middleware to transmit images and commands across the devices.





 §.§ Implementation details

To analyze the effect of coaching on learning performance, we conducted experiments by inducing coaching corrections at different iterations of training.
Four policies were trained for the following cases: (i) No Coaching; Coached after every (ii) 20k, (iii) 10k, (iv) 5k timesteps.  The policy with no coaching was based on reward in eq. (2) and policies with coaching were based on a combined reward in eq. (6). Each policy was trained for a maximum of 200k steps or until convergence, approximately equal to eight hours of wall clock time. The robot was initialized to a random pose for each episode of training. An episode of training ends upon either achieving the high-quality image or reaching the 50 steps. The value of η in eq. (<ref>) is empirically set to 10 to maximize performance. The action space limits are set as x ∈ (-0.05, 0.05)m, y ∈ (-0.03, 0.03)m, fz ∈ (5 - 30)N, roll ∈ (-0.2, 0.2)rad, pitch ∈ (-0.2, 0.2)rad,
and yaw ∈ (-0.5, 0.5)rad. The roll, pitch and yaw angles were carefully selected to ensure collision-free scanning of the phantoms. The hybrid position-force control mode of Sawyer was used to control the robot.

The coaching corrections are provided by human experts through kinesthetic interactions with the robotic arm. At the instant of interaction, the robot movement is paused, which was hardcoded in the training script. Then, the expert activated the free-drive mode of the robot by pressing the button provided on the wrist and nudged the robot toward the optimal trajectory. Once the expert finished the coaching, which is indicated by a high-quality image (q≥4), the training script was re-initialized from the same time step. Note that the policy weights were updated before re-initialization. 






 §.§ Performance evaluation
 
 Fig. <ref> compares the normalized average reward over the training timesteps for different policies. One of the primary issues associated with the “no coaching" policy was the tendency to explore sub-optimal states (i.e., low image quality regions). The poses and forces necessary for producing high-quality images constitute a narrow domain within the action space. Consequently, the “no coaching" policy often chooses inappropriate actions (probe poses and force). To correct this behavior, the coach intervened by adjusting either the probe position or orientation relative to the phantom surface, or by modifying the force applied to the phantom. After coaching, the reward from the resulting policy demonstrated improvement at each step of the training, wherever it was introduced. Coaching also improved the learning efficiency, as seen by the faster convergence of coached policies in Fig. <ref>. In the absence of coaching, the policy failed to approach the optimal region even after 100k steps and showed no convergence even at 200k steps. In contrast, policies with coaching introduced at intervals of 20k and 10k timesteps demonstrated convergence at approximately  150k (↓∼25%) and 120k (↓∼40%) steps, respectively. The policy receiving maximum coaching (every 5k steps) converged at 100k steps. These findings underscore the efficacy of coaching in identifying optimal policies at a faster learning rate.


Once the policies were trained, we compared the performance of learned policies during execution. Each policy is executed for 10 trials, and each trial has a maximum of 50 steps. The following metrics are used for comparison: (i) Number of High-Quality Images (HQI) sampled (q≥4), (ii) First instance of HQI sampling, (iii) Errors in probe motion. The metric (iii) measures the error between probe position (p), orientation (o) and force (f_z) at the step with the best reward and their corresponding Ground Truth (GT) values. The evaluated mean ± standard deviation values of these metrics are given in Table <ref>.











































For Phantom P0, the results showed an improvement in HQI from 2.1 to 8.2 (↑74.4%) with coaching. Specifically, for the test phantom P1, the “no coaching" policy resulted in a low HQI of 1.5. However, the policy with coaching after every 20k steps resulted in the HQI of 5.9 (↑74.6%). The error in probe motion (p, o and f_z) reduced by 31.6%, 26.6% and 59.0%, with a mean error reduction of ∼40%. The performance improved further when coaching was used more frequently, verifying its effectiveness for training of RUS.





§ CONCLUSION AND FUTURE WORK

This paper presents a coaching framework for RUS to improve the learning efficiency and accuracy of ultrasound image acquisition. Unlike previously proposed LfD methods for RUS, this framework leveraged real-time feedback from experts during the training process. Coaching is modeled as a Partially Observable Markov Decision Process (POMDP), which approximates the trajectory-based corrections from the expert to update the reward, objectives, and parameters of the DRL policy. When tested for an ultrasound of urinary bladder phantom, this methodology improved the convergence rate of learned policy by 25% and increased the number of high-quality image acquisitions by 74.4%. Future work will explore further improvement in performance through policy priors derived using offline expert demonstrations, as done in our previous works <cit.>.



























 
 






 
IEEEtran










































 




















