Abstract
This paper addresses a common class of problems where a robot learns to perform a discovery task based on example solutions, or human demonstrations. As an example, this work considers the problem of ultrasound scanning, where a demonstration involves an expert adaptively searching for a satisfactory view of internal organs, vessels or tissue and potential anomalies while maintaining optimal contact between the probe and surface tissue. Such problems are often solved by inferring notional rewards that, when optimised for, result in a plan that mimics demonstrations. A pivotal assumption, that plans with higher reward should be exponentially more likely, leads to the de facto approach for reward inference in robotics. While this approach of maximum entropy inverse reinforcement learning leads to a general and elegant formulation, it struggles to cope with frequently encountered sub-optimal demonstrations. In this paper, we propose an alternative approach to cope with the class of problems where sub-optimal demonstrations occur frequently. We hypothesise that, in tasks which require discovery, successive states of any demonstration are progressively more likely to be associated with a higher reward. We formalise this temporal ranking approach and show that it improves upon maximum-entropy approaches to perform reward inference for autonomous ultrasound scanning, a novel application of learning from demonstration in medical imaging.
Introduction
Robotic learning from demonstration (LfD) typically relies on Inverse Reinforcement Learning (IRL) to infer reward functions from expert behavior. A standard assumption in frequentist IRL models is that the demonstrator is near-optimal, meaning states visited more frequently are assigned higher rewards. However, in discovery-based tasks like medical ultrasound scanning, experts must explore sub-optimal regions—encountering air pockets or blurry views—to locate target anatomy. Standard IRL often fails in these scenarios, mistakenly rewarding the frequent "searching" states rather than the final, high-quality "finding" state. This paper introduces Probabilistic Temporal Ranking (PTR) to bridge this gap by distinguishing the journey of exploration from the destination of the goal.
Methods: Probabilistic Temporal Ranking
PTR leverages the chronological nature of discovery tasks, hypothesizing that successive states in a demonstration are progressively more likely to be associated with higher rewards. Instead of state frequency, PTR uses the chronology of the demonstration as a supervisory signal.
- The "Later is Better" Heuristic: Successive states are assumed to have higher rewards. To handle the high-dimensional image data of ultrasound, we use a Convolutional Variational Autoencoder (CVAE) to compress frames into a lower-dimensional latent space.
- Probabilistic Generative Model: The system samples pairs of states $(s_i, s_j)$ where $j > i$. It assumes $R(s_j) > R(s_i)$ using a Bernoulli trial over a sigmoid of the reward difference. This provides "slack," allowing the model to handle temporary performance dips during human exploration.
- Reward Modeling and Control: We implement GP-PTR, using Gaussian Processes for uncertainty estimation, and ML-PTR for faster training. Once the reward function is learned, the robot employs Bayesian Optimization (specifically the Upper Confidence Bound algorithm) to navigate new environments, balancing the search for high rewards with the exploration of uncertain areas.
Experimental Setup
We evaluated PTR on an autonomous ultrasound scanning task using a robotic arm. The primary benchmark involved searching for a target object (a tumor-like mass) inside a deformable phantom filled with scattering gel.
We collected 10 kinesthetic demonstrations (approximately 5,000 images). The robot's task was to replicate the expert's ability to find the highest quality view of the target mass in a new environment.
Results and Analysis
PTR demonstrated superior alignment with human expert ratings compared to Maximum Entropy IRL. In the ultrasound task, PTR achieved a human-aligned image rating of 0.254, significantly outperforming the 0.119 achieved by the MaxEnt baseline.
Using Kendall’s $\tau$ and Spearman’s $\rho$ correlations, we confirmed that PTR’s inferred rewards strongly match actual human preferences for image quality. Furthermore, PTR proved robust to sub-optimality; while standard IRL performance plummeted as demonstrations became longer and more exploratory, PTR remained stable. This is because PTR produces a denser training signal, as every pair of frames in a sequence provides a potential comparison point.
Conclusion
PTR provides a robust framework for reward inference in tasks where exploration is inherent. By using time as a supervisory signal, it bypasses the pitfalls of frequency-based reward modeling. While highly effective for goal-oriented discovery, PTR is limited by its monotonicity assumption and currently struggles with cyclic tasks like locomotion. Future work will explore dynamic adjustment of ultrasound parameters and accounting for physical constraints like gel management.
Summary updated