Abstract
Inverse reinforcement learning is a paradigm motivated by the goal of learning general reward functions from demonstrated behaviours. Yet the notion of generality for learnt costs is often evaluated in terms of robustness to various spatial perturbations only, assuming deployment at fixed speeds of execution. However, this is impractical in the context of robotics and building, time-invariant solutions is of crucial importance. In this work, we propose a formulation that allows us to 1) vary the length of execution by learning time-invariant costs, and 2) relax the temporal alignment requirements for learning from demonstration. We apply our method to two different types of cost formulations and evaluate their performance in the context of learning reward functions for simulated placement and peg in hole tasks executed on a 7DoF Kuka IIWA arm. Our results show that our approach enables learning temporally invariant rewards from misaligned demonstration that can also generalise spatially to out of distribution tasks.
Introduction
A persistent challenge in robotics is teaching agents to perform tasks using demonstrations that are often inconsistent, misaligned in time, and executed at varying speeds. Traditional Inverse Reinforcement Learning (IRL) methods typically assume that demonstrations are perfectly aligned or rely on pre-processing techniques like Dynamic Time Warping (DTW) to force alignment. However, these approaches often result in reward functions tied to specific execution speeds, limiting a robot's ability to adapt to new contexts, such as slowing down for precision or speeding up for efficiency.
This paper introduces a model-based IRL framework designed to learn time-invariant reward functions. By embedding a temporal scaling mechanism directly into the cost function, the proposed method allows robots to learn from misaligned demonstrations and successfully execute tasks across a wide range of speeds without further training.
Methodology
The researchers utilize a bi-level optimization framework. The inner loop employs a Model Predictive Control (MPC) agent to optimize a policy based on the current reward function. The outer loop then updates the reward function's parameters to minimize the difference between the agent's generated trajectories and the expert's demonstrations.
The key innovation is the Temporal Scaling Mechanism ($\lambda$), defined as the ratio between a base task duration and the actual duration of a demonstration. This mechanism is applied to two distinct cost formulations:
- Structured Cost ($\lambda$-RBF): This approach uses a weighted Radial Basis Function (RBF) network. By applying the scaling factor $\lambda$, the centers of the RBFs are shifted in time. This ensures that specific task segments (represented by weights) remain spatially relevant regardless of the total execution time.
- Unstructured Cost ($\lambda$-MLP): This approach uses a Multi-Layer Perceptron (MLP) where $\lambda$ is provided as an explicit input feature. This allows the network to learn a more flexible, internal representation of how the reward should adjust based on execution speed.
Experimental Evaluation
The framework was evaluated in a simulated environment using the Robosuite framework and PyBullet physics engine, featuring a 7-Degree-of-Freedom (7DoF) Kuka IIWA robotic arm. Two benchmark tasks were used:
- Object Placement: Moving an object to a target location using a non-linear path to avoid obstacles.
- Peg-in-Hole (PiH): A high-precision insertion task requiring fine motor control.
The models were trained on small datasets (3 to 12 demonstrations) that were intentionally misaligned in both speed and target goal locations to test robustness.
Key Results and Discussion
The proposed time-invariant models significantly outperformed standard IRL baselines and DTW-based approaches.
- Accuracy and Success: In the object placement task, the $\lambda$-MLP achieved a mean error of 0.96cm, compared to 4.08cm for the standard RBF baseline. In the Peg-in-Hole task, the $\lambda$-MLP reached a 70.22% success rate, while the baseline struggled at 22.22%.
- Generalization: While the structured $\lambda$-RBF approach is more interpretable and faster to train, the unstructured $\lambda$-MLP demonstrated superior generalization to "Out-of-Distribution" (OOD) goals—targets located far from the training demonstrations.
- Temporal Robustness: The models maintained high performance even when the required execution speed differed drastically from the training data, demonstrating true time-invariance.
Conclusion
This work demonstrates that incorporating temporal scaling into reward function learning allows robots to handle the inherent variability of human demonstrations. By decoupling task intent from execution speed, the framework enables more flexible and robust robotic behavior. Future research will focus on handling multiple control frequencies and integrating multi-modal sensor data, such as vision and touch, into the reward learning process.
Summary updated