Bayesian multitask inverse reinforcement learning

Christos Dimitrakakis, Constantin A. Rothkopf · DOI

Abstract

Inverse Reinforcement Learning (IRL) aims to infer the underlying reward function of an agent from observed behavior. While traditional IRL focuses on single tasks, real-world scenarios often involve multiple related tasks. This paper presents a hierarchical Bayesian framework for Multitask IRL, enabling information sharing across tasks through structured priors. We introduce two models: the parametric Multitask Reward-Policy Prior (MRP) and the non-parametric Multitask Policy Optimality Prior (MPO). Experimental results on synthetic environments demonstrate that these models achieve higher sample efficiency and lower loss compared to single-task baselines.

Introduction

Inverse Reinforcement Learning (IRL) is the process of deducing the reward function that an expert agent is attempting to maximize based on a set of demonstrations. Standard IRL approaches typically assume a single task and a single expert. However, many practical applications are inherently multitask, involving either one expert performing various related chores or multiple experts solving the same problem with individual biases.

The primary challenge in multitask IRL is effective information sharing: leveraging knowledge gained from one task to improve the understanding of another. This paper addresses the lack of a principled statistical framework for this problem by proposing a hierarchical Bayesian approach that moves beyond simple imitation to true goal inference across a population of tasks.

Methodology

The proposed framework utilizes a hierarchical structure where a "hyperprior" captures the relationships between different tasks. Two primary models are developed:

Multitask Reward-Policy Prior (MRP)

The MRP model adopts a parametric approach. It assumes that rewards are drawn from a Dirichlet distribution, treating rewards as a measure over the state space. Experts are assumed to follow a stationary "soft-max" policy. This structure allows the model to share biases regarding reward distributions and policy shapes across the entire task set.

Multitask Policy Optimality Prior (MPO)

The MPO model is a non-parametric alternative that avoids rigid assumptions about policy shapes. Instead, it places a prior on policy optimality, essentially quantifying how close to perfect an expert is expected to be. By defining a prior over $\epsilon$-optimality (where $\epsilon$ represents the loss in value), the model can infer rewards based on the intuitive belief that experts are likely to be near-optimal.

Graphical model of the hierarchical Bayesian multitask IRL framework.

Posteriors for these models are estimated using sampling algorithms, including Monte Carlo (MC) and Metropolis-Hastings (MH) samplers.

Experimental Setup

The models were evaluated on two synthetic environments:

  1. The Chain Task: A standard RL benchmark where an agent moves through a sequence of states to reach rewarding ends. 3-state and 5-state versions were used to test the differentiation of reward locations.
  2. Random MDPs: Markov Decision Processes with transition dynamics and rewards sampled from hierarchical distributions were used to test robustness across diverse but related tasks.

Results and Discussion

The hierarchical framework demonstrates significant advantages in both performance and efficiency.

Performance Gains and Sample Efficiency

In the Chain task, the performance gain of the multitask model over simple imitators increases as the number of tasks grows, confirming successful learning of the underlying population structure. The MPO-MC model, in particular, shows superior efficiency compared to the parametric MRP-MC model as more data becomes available.

Comparison of sampling methods and model performance. (a) Sampling comparison across different MH configurations. (b) Performance comparison between MRP and MPO models.

Comparison with Baselines

In Random MDP experiments, the multitask MRP-MH model outperformed established IRL algorithms, such as Linear Programming IRL and MWAL, as well as "flat" Bayesian IRL models that do not share information across tasks. The ability to model the distribution of tasks (the hyperprior $\eta$) allows the learner to "borrow strength" from other demonstrations, leading to faster and more accurate reward inference.

Conclusion and Future Work

This work establishes a robust Bayesian framework for multitask IRL. By modeling optimality as a prior and utilizing hierarchical structures, the proposed methods offer a more intuitive and efficient way to encode beliefs about expert behavior.

Future research directions include addressing the computational cost associated with calculating loss matrices in the MPO model, extending theoretical bounds to continuous reward spaces, and integrating uncertainty regarding environment dynamics into the multitask framework.

Summary updated

BibTeX
@inproceedings{dimitrakakis2011bayesian,
  author = {Christos Dimitrakakis and Constantin A. Rothkopf},
  title = {{Bayesian multitask inverse reinforcement learning}},
  booktitle = {EWRL},
  year = {2011},
  doi = {10.1007/978-3-642-29946-9\_27},
}
Figure