A Divergence Minimization Perspective on Imitation Learning Methods

Seyed Kamyar Seyed Ghasemipour, Richard S. Zemel, Shixiang Gu

Abstract

In many settings, it is desirable to learn decision-making and control policies through learning or bootstrapping from expert demonstrations. The most common approaches under this Imitation Learning (IL) framework are Behavioural Cloning (BC), and Inverse Reinforcement Learning (IRL). Recent methods for IRL have demonstrated the capacity to learn effective policies with access to a very limited set of demonstrations, a scenario in which BC methods often fail. Unfortunately, due to multiple factors of variation, directly comparing these methods does not provide adequate intuition for understanding this difference in performance. In this work, we present a unified probabilistic perspective on IL algorithms based on divergence minimization. We present f-MAX, an f-divergence generalization of AIRL, a state-of-the-art IRL method. f-MAX enables us to relate prior IRL methods such as GAIL and AIRL, and understand their algorithmic properties. Through the lens of divergence minimization we tease apart the differences between BC and successful IRL approaches, and empirically evaluate these nuances on simulated high-dimensional continuous control domains. Our findings conclusively identify that IRL’s state-marginal matching objective contributes most to its superior performance. Lastly, we apply our new understanding of IL method to the problem of state-marginal matching, where we demonstrate that in simulated arm pushing environments we can teach agents a diverse range of behaviours using simply hand-specified state distributions and no reward functions or expert demonstrations. For datasets and reproducing results please refer to https://github.com/KamyarGh/rl_swiss/blob/master/reproducing/fmax_paper.md.

Introduction

Imitation Learning (IL) aims to train agents to perform tasks by leveraging expert demonstrations. Traditionally, this is approached via Behavioral Cloning (BC), which treats the problem as supervised learning of actions, or Inverse Reinforcement Learning (IRL), which infers a reward function to be optimized via Reinforcement Learning. While IRL methods like GAIL and AIRL often outperform BC—particularly when data is scarce—the underlying reasons for this performance gap have remained unclear. This work provides a unified framework to analyze these methods through the lens of divergence minimization.

The f-MAX Framework: Unifying IRL Methods

We introduce f-MAX, a generalized framework for Maximum Entropy IRL based on $f$-divergences. This framework allows us to view existing IRL methods as minimizing specific mathematical distances between the agent's and the expert's distributions. For instance, AIRL is shown to minimize the "reverse KL" divergence, while GAIL minimizes the Jensen-Shannon divergence.

Comparison of reward functions for AIRL, GAIL, and FAIRL within the f-MAX framework.

By generalizing these methods, we can derive new algorithms such as FAIRL, which minimizes the "forward KL" divergence. This unification is crucial for isolating the variables that contribute to an algorithm's success, such as the direction of the divergence (mode-seeking vs. mode-covering) versus the objective itself.

The "Secret Sauce": State-Marginal Matching

A key contribution of this work is identifying why IRL methods consistently outperform BC. Our experiments on MuJoCo benchmarks (HalfCheetah, Ant, Walker, Hopper) reveal that the choice of divergence direction is secondary. Instead, the primary driver of performance is IRL's explicit objective of state-marginal matching.

BC focuses solely on matching the conditional distribution of actions given states. This makes it vulnerable to covariate shift: small errors in action prediction lead the agent into states not seen during training, where its behavior becomes unpredictable. In contrast, IRL methods (including our new FAIRL) aim to match the expert's state distribution. This objective naturally encourages the agent to return to the expert's path, providing a robust correction mechanism that BC lacks.

Programming by Distribution

The insight that state-marginal matching is the core component of successful IL allows for a new paradigm: "programming by distribution." We demonstrate that agents can be taught complex behaviors simply by specifying a target state distribution, without needing expert actions or a manually defined reward function.

State-marginal matching results for Pusher tasks, showing the robot environment and the alignment between target and learned distributions.

In simulated environments like the 7-DoF Pusher arm, we successfully trained agents to "draw" complex shapes like sine waves by matching a hand-specified "cloud" of target points. This approach was also effective for point-mass agents learning to follow spirals or infinity signs, showcasing the flexibility of the f-MAX framework for State-Marginal Matching (SMM) tasks.

Conclusion and Future Work

By viewing Imitation Learning as divergence minimization, we have clarified the fundamental differences between BC and IRL. The superior performance of IRL is largely attributable to its focus on matching state-marginal distributions. While the current SMM approach can be sample-inefficient due to its on-policy nature and may struggle with disconnected modes in target distributions, it opens promising avenues for robotics. Future work could leverage SMM to simplify task specification, allowing behaviors to be "sketched" as state distributions rather than requiring exhaustive expert demonstrations.

Summary updated

BibTeX
@inproceedings{ghasemipour2019divergence,
  author = {Seyed Kamyar Seyed Ghasemipour and Richard S. Zemel and Shixiang Gu},
  title = {{A Divergence Minimization Perspective on Imitation Learning Methods}},
  booktitle = {Conference on Robot Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=AzYomAhfTV},
}
Figure