Model-Free Imitation Learning with Policy Optimization

Jonathan Ho, Jayesh K. Gupta, Stefano Ermon

Introduction

Traditional imitation learning faces a "Goldilocks" problem. On one hand, Behavioral Cloning (supervised learning) is simple but brittle; small errors accumulate over time, leading the agent into unfamiliar states it cannot recover from—a phenomenon known as the "cascading errors" problem. On the other hand, Inverse Reinforcement Learning (IRL) is robust because it learns a cost function over entire trajectories. However, IRL is computationally grueling, typically requiring a full reinforcement learning algorithm to run at every single iteration to check if a candidate cost function makes the expert look optimal.

This paper introduces a scalable, model-free framework for imitation learning that bypasses the need to solve expensive reinforcement learning problems in an inner loop. By combining the "apprenticeship learning" formalism with modern policy gradient methods like TRPO, the authors enable agents to learn complex behaviors in high-dimensional continuous environments directly from expert demonstrations.

Methods: Apprenticeship Learning via Policy Optimization

The authors frame the problem as Apprenticeship Learning (AL), where the goal is to find a policy that performs at least as well as the expert across a whole class of potential cost functions. They propose two main algorithms:

  1. IM-REINFORCE: A "Model-Free Imitation" version of the classic REINFORCE algorithm. It alternates between finding a cost function that distinguishes the current policy from the expert and taking a gradient step to improve the policy based on that cost.
  2. IM-TRPO: A more stable version based on Trust Region Policy Optimization. It uses a surrogate loss function and a KL-divergence constraint to ensure that policy updates do not move too far in parameter space, preventing the catastrophic collapses common in vanilla policy gradients.

Crucially, for linear cost functions, the authors derive a closed-form expression for the worst-case cost function at each step. This makes the "inner loop" of the algorithm nearly instantaneous compared to traditional IRL.

Key Insights

  • Direct Policy Optimization: Instead of trying to perfectly recover the true hidden reward function of the expert, the framework focuses on directly optimizing the policy. The cost function is treated merely as a source of learning signal to push the learner toward the expert's distribution.
  • The GAN Connection: In a prophetic observation for 2016, the authors note that their framework mirrors Generative Adversarial Networks (GANs). The policy acts as a "generator" of state-action pairs, while the cost function acts as an "adversary" trying to distinguish the learner from the expert.
  • Model-Free Advantage: Unlike many IRL methods of the time (like CIOC), these algorithms are model-free. They do not need to know the underlying physics or dynamics derivatives of the environment, making them applicable to complex simulators where the math is a black box.

Experimental Results

The algorithms were evaluated on several simulated environments, ranging from finite Gridworlds to high-dimensional continuous tasks like Objectworld and Highway Driving.

Performance vs. Scalability

In gridworld environments, IM-REINFORCE achieved 98% of the performance of globally optimal methods (like LPAL) but ran significantly faster as the state space grew.

Gridworld performance and timing comparison

High-Dimensional Success and Stability

In the Objectworld continuous planar navigation task, the algorithms demonstrated strong sample efficiency and low excess cost compared to baselines. Furthermore, IM-TRPO significantly outperformed IM-REINFORCE in continuous tasks, demonstrating that trust-region constraints are vital for stable imitation learning in complex spaces.

Objectworld excess cost comparison

In a complex highway driving task, IM-TRPO successfully learned distinct driving styles (Aggressive, Evasive, Tailgater) using 610-dimensional egocentric features. It matched the performance of model-based IRL methods that had the unfair advantage of knowing the full environment state and dynamics.

Limitations and Future Work

  • Local Minima: Unlike linear programming approaches for small Markov Decision Processes (MDPs), this gradient-based approach only guarantees convergence to a local minimum, not a global optimum.
  • Linear Cost Assumption: While the framework is general, the experiments primarily used linearly parameterized cost functions. The authors suggest that moving to non-linear cost functions (like neural networks) is a promising next step—a direction that eventually led to the development of Generative Adversarial Imitation Learning (GAIL).
  • Sample Efficiency: As a model-free method, it still requires a significant number of interactions with the environment to estimate gradients accurately.

Summary updated

BibTeX
@inproceedings{ho2016model,
  author = {Jonathan Ho and Jayesh K. Gupta and Stefano Ermon},
  title = {{Model-Free Imitation Learning with Policy Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2016},
  url = {https://openreview.net/forum?id=S1WA-iZdbH},
}
Figure