Overview
Standard Inverse Reinforcement Learning (IRL) operates on a rigid assumption: an expert follows a single, static reward function throughout an entire demonstration. However, real-world behavior is rarely so uniform. A driver might start a trip intending to take the fastest route, but switch to a "scenic" or "avoid tolls" mindset halfway through due to traffic or road conditions.
This paper introduces a more realistic framework where an expert can switch between multiple "locally consistent" reward functions mid-trajectory. By using an Expectation-Maximization (EM) approach, the model learns both the underlying rewards and the environmental triggers that cause an expert to change their goals.
Methodology: Modeling Shifting Intentions
If a standard IRL algorithm tries to explain shifting behavior with a single reward function, it often fails to find a meaningful policy, as the observed actions appear inconsistent or sub-optimal. The authors tackle this by allowing trajectories to be partitioned into segments, each governed by a different, locally consistent reward.
To achieve this, they propose a Probabilistic Graphical Model that treats the active reward function at any given time step as a latent (hidden) variable.
Key components of the framework include:
- Multiple Rewards: Instead of learning a single weight vector, the model learns a set of distinct reward functions.
- Stochastic Transitions: A transition function determines the probability of switching from one reward function to another at any state.
- Generalized Linear Model (GLM) for Transitions: To make the model predictive rather than just descriptive, the transition matrix is not static. A GLM links transitions to environmental features, allowing the model to predict reward switches even in unvisited states.
- Expectation-Maximization (EM): The authors derive an EM algorithm to iteratively solve the problem. The E-step estimates the probability of which reward was active at each time step (similar to the Forward-Backward algorithm in HMMs). The M-step optimizes the reward weights and transition parameters to maximize the likelihood of the observed trajectories.
- Viterbi Partitioning: Once trained, the Viterbi algorithm finds the most likely sequence of rewards, effectively segmenting the expert's path into different intentional phases.
Datasets and Experimental Setup
The algorithm was evaluated across three distinct environments:
- Synthetic Grid World A: A 5x5 grid where an expert switches between "prefer land" and "prefer water" rewards at specific coordinates.
- Synthetic Grid World B: A similar grid designed to test the model's ability to generalize transition rules to unvisited states using features (e.g., "barriers" triggering a switch).
- Real-World Taxi Trajectories: GPS traces of 59 taxis in Singapore traveling between the same origin and destination. The state space consisted of 193 road segments, with features including road types and distance to the destination.
Key Results and Insights
The core insight of the paper is the distinction between global inconsistency and local optimality. Behavior that looks "irrational" under a single global reward can be perfectly optimal if viewed as a sequence of different local goals. By tying reward switches to features (like a toll gantry or a traffic jam), the model learns why the expert changed their mind.
- Superior Likelihood: In both synthetic and real-world tests, the proposed algorithm significantly outperformed the state-of-the-art "EM clustering with MLIRL" baseline. The baseline can only assign one reward per trajectory, whereas this model flexibly assigns multiple rewards per trajectory.
- Discovering Taxi Intentions: In the Singapore taxi dataset, the model successfully identified two distinct behaviors: "Direct" (driving straight to the destination) and "Detour" (taking longer routes to stay on high-speed arterials).
- Speed-Triggered Switches: A fascinating qualitative result showed that taxi drivers were more likely to switch from a "Detour" intention back to a "Direct" intention when their speed dropped (e.g., hitting traffic on a slip road). This suggests they adapt their high-level strategy based on real-time feedback.
Limitations and Future Work
While powerful, the approach has a few limitations. Currently, the user must pre-define the number of reward functions in advance; future work could use nonparametric Bayesian methods (like Dirichlet Processes) to learn this automatically. Additionally, the model assumes rewards are linear combinations of features, which could be expanded using Gaussian Processes. Finally, running Value Iteration inside an EM loop is computationally expensive, potentially limiting the approach to medium-sized state spaces without further optimization.
Summary updated