Weighted Maximum Entropy Inverse Reinforcement Learning

The Viet Bui, Tien Mai, Patrick JailletarXiv 2022 · DOI

TL;DR

This paper introduces a "weighted maximum entropy" framework for Inverse Reinforcement Learning (IRL) and Imitation Learning (IM). By learning weights that modulate the entropy term in the objective, the approach can better capture the nuanced, state-dependent "bounded rationality" or stochasticity of expert behavior, leading to improved performance over existing methods.

What Problem Does This Paper Address?

Inverse Reinforcement Learning (IRL) and Imitation Learning (IM) aim to infer an agent's underlying reward function or policy from observed expert demonstrations. A popular approach is Maximum Entropy IRL, which formulates this as a maximum likelihood estimation problem by adding an entropy bonus to the reward. However, a key limitation of this standard approach is that it tends to produce policies with a uniform level of stochasticity across all states. In reality, experts often exhibit varying degrees of "bounded rationality" – they might be more or less deterministic in different situations. For instance, a taxi driver might be more predictable in well-trafficked areas and more exploratory in less familiar ones. The standard MaxEnt framework struggles to capture this state-dependent variability, leading to a mismatch between the learned policy and the expert's true behavior.

Methods

The core contribution is the introduction of a Weighted Maximum Entropy framework. This extends the standard Maximum Entropy approach by adding a state-dependent weight function, $\mu(s)$, to the entropy term. Instead of a uniform entropy bonus across all states, the framework learns a weight for each state, effectively allowing the model to learn how stochastic the expert's policy should be in different situations.

Mathematically, this is achieved by modifying the objective function. The original MaxEnt objective includes an entropy term proportional to a fixed parameter $\eta$. The proposed method replaces this with a term proportional to $\mu(s)$, where $\mu(s)$ is a learned function of state features. This weighted entropy term can be formulated as a constrained Markov Decision Process (MDP), similar to the original MaxEnt framework, but with the added flexibility of state-dependent weights.

The authors then adapt this weighted framework to existing IRL/IM algorithms:

  • MLE-based IRL: They extend classical MaxEnt and Gaussian Process IRL (GPIRL) by incorporating the learned weights.
  • Generative Adversarial IRL/IM: They modify the discriminators in Generative Adversarial Imitation Learning (GAIL) and Adversarial IRL (AIRL) to account for the learned weights, leading to new algorithms called WAIRL and WGAIL.

Datasets

The paper evaluates their approach on a variety of simulated and real-world datasets:

  • Objectworld: A simulated grid-world environment with discrete and continuous features.
  • Highway Driving Simulator: A simulated environment for evaluating driving behavior.
  • Driver Route Choice Behavior: A real-world dataset of taxi driver trajectories in Borlänge, Sweden.
  • MuJoCo Tasks: A suite of continuous control tasks (Reacher-v2, Walker2d-v2, HumanoidStandup-v2) used for evaluating generative adversarial methods.

The paper does not introduce new benchmark datasets but rather applies its methods to existing ones, often using established experimental setups from prior work.

Key Insights and Ideas

  • Bounded Rationality is State-Dependent: The most crucial insight is that expert behavior isn't uniformly rational. The degree of randomness or "bounded rationality" can vary significantly from one state to another, and capturing this variability is key to accurate imitation.
  • Weights as a Proxy for Stochasticity: The learned weights $\mu(s)$ act as a direct mechanism to control the stochasticity of the learned policy. Higher weights encourage more random policies in certain states, while lower weights lead to more deterministic ones.
  • Generalization of MaxEnt: The weighted framework is a natural generalization of the standard MaxEnt approach. When all weights are equal, it reduces to the original MaxEnt formulation. This means the new method is more powerful without sacrificing the benefits of the original.
  • Improved Feature Learning: By learning weights alongside rewards, the framework can potentially learn more nuanced representations of expert behavior, especially in scenarios with complex, non-linear reward functions.

Key Results

  • Outperformance on Discrete Tasks: In simulated environments like Objectworld and the Highway Driving Simulator, the weighted versions of MaxEnt (W-MaxEnt) and GPIRL (W-GPIRL) consistently outperformed their non-weighted counterparts, especially with fewer demonstrations.
  • Stronger Performance on Real-World Data: For the Driver Route Choice Behavior dataset, W-MaxEnt showed significantly higher log-likelihood values and better matching scores compared to standard MaxEnt.
  • Enhanced Generative Adversarial Methods: WAIRL and WGAIL demonstrated superior performance on continuous control tasks, particularly in transfer learning scenarios where environments changed between training and testing. Notably, WGAIL significantly improved upon GAIL's performance in transfer learning.
  • Visualizing Learned Weights: Heatmaps of the learned weights $\mu(s)$ in the Point Mass-Maze task showed higher weights in areas closer to the goal, suggesting that the algorithm learned to make policies more stochastic in more rewarding or critical regions.

Limitations and Future Work

  • Single Weight Function Assumption: The current framework assumes a single weight function $\mu(s)$ is learned. The authors acknowledge that real-world expert demonstrations might come from heterogeneous experts, suggesting that learning multiple weight functions for different expert types could be a valuable extension.
  • Multi-Agent and Generalized Regularizers: Future work could explore multi-agent IRL/IM with structural entropy or generalized regularizers, which could further enhance the expressiveness of the learned models.
  • Computational Cost: While not explicitly detailed as a limitation, the inclusion of learning an additional weight function and potentially more complex feature representations could increase computational demands, especially for very high-dimensional tasks.

Summary updated

BibTeX
@misc{bui2022weighted,
  author = {The Viet Bui and Tien Mai and Patrick Jaillet},
  title = {{Weighted Maximum Entropy Inverse Reinforcement Learning}},
  year = {2022},
  eprint = {2208.09611},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.09611},
}
Figure