Wasserstein Adversarial Imitation Learning

Huang Xiao, Michael Herman, Jörg Wagner, Sebastian Ziesche, Jalal Etesami, Thai Hong LinharXiv 2019

Abstract

Imitation Learning describes the problem of recovering an expert policy from demonstrations. While inverse reinforcement learning approaches are known to be very sample-efficient in terms of expert demonstrations, they usually require problem-dependent reward functions or a (task-)specific reward-function regularization. In this paper, we show a natural connection between inverse reinforcement learning approaches and Optimal Transport, that enables more general reward functions with desirable properties (e.g., smoothness). Based on our observation, we propose a novel approach called Wasserstein Adversarial Imitation Learning. Our approach considers the Kantorovich potentials as a reward function and further leverages regularized optimal transport to enable large-scale applications. In several robotic experiments, our approach outperforms the baselines in terms of average cumulative rewards and shows a significant improvement in sample-efficiency, by requiring just one expert demonstration.

Introduction

Imitation Learning (IL) aims to teach an agent to perform a task by observing an expert. Traditional approaches generally fall into two categories: Behavioral Cloning (BC), which directly maps states to actions but suffers from compounding errors, and Inverse Reinforcement Learning (IRL), which attempts to recover the underlying reward function. While IRL is more robust, it often involves a computationally expensive inner loop.

Generative Adversarial Imitation Learning (GAIL) introduced a breakthrough by using a GAN-like setup to match agent and expert distributions. However, GAIL relies on Jensen-Shannon (JS) divergence, which can lead to training instabilities like vanishing gradients and produces a discriminator that lacks the properties of a smooth, interpretable reward function. This paper introduces Wasserstein Adversarial Imitation Learning (WAIL) to address these limitations by bridging the gap between IRL and Optimal Transport (OT).

Methodology

WAIL replaces the JS divergence used in GAIL with the 1-Wasserstein distance. Rooted in Optimal Transport theory, this metric measures the "work" required to transform the agent's state-action distribution into the expert's.

The technical framework relies on three key innovations:

  1. Kantorovich Potentials as Rewards: The authors demonstrate that the dual variables in the OT problem (Kantorovich potentials) serve as valid, smooth reward functions.
  2. Regularized Optimal Transport: To scale to high-dimensional tasks, the authors employ $L_2$ or entropic regularization, transforming the OT problem into a smooth, convex optimization solvable via stochastic gradient descent.
  3. Adversarial Training: The agent alternates between updating the Kantorovich potential to distinguish behavior and updating its policy (using Trust Region Policy Optimization) to maximize the resulting reward.

Experimental Results

The researchers evaluated WAIL against GAIL and BC on nine standard continuous control benchmarks from OpenAI Gym, including Classic Control (CartPole, MountainCar, Acrobot) and MuJoCo robotics tasks (Hopper, Walker2d, HalfCheetah, Ant, Humanoid, Reacher).

Performance and Sample Efficiency

WAIL consistently outperforms baselines, particularly in low-data regimes. In complex environments like Walker2d and Humanoid, WAIL achieves near-expert performance with as few as 1–4 demonstration trajectories, whereas GAIL and BC require significantly more data to reach comparable levels.

Performance comparison of WAIL against GAIL and BC across various environments.

Reward Surface Interpretability

A primary advantage of WAIL is the quality of the learned reward function. Unlike GAIL, which often produces "flat" or uninformative reward surfaces once the discriminator saturates, WAIL enforces a Lipschitz constraint that ensures smoothness. This provides a clear, continuous gradient for the agent to follow toward expert-like states.

Comparison of learned reward surfaces between GAIL and WAIL on the Humanoid task.

Discussion and Insights

  • Geometric Sensitivity: By accounting for the underlying geometry of the state-action space, the Wasserstein distance provides a more informative learning signal than JS divergence, especially when the agent's behavior is far from the expert's.
  • Robustness: The smoothness of the Kantorovich potentials leads to more stable training and better generalization from limited demonstrations.

Conclusion

WAIL represents a significant advancement in imitation learning by providing a theoretically grounded framework that combines the efficiency of adversarial methods with the robustness of optimal transport. While future work may explore learning the ground cost function or formalizing sample complexity theory, WAIL's ability to reach expert performance from a single demonstration marks a major step toward practical, data-efficient robotic learning.

Summary updated

BibTeX
@misc{xiao2019wasserstein,
  author = {Huang Xiao and Michael Herman and Jörg Wagner and Sebastian Ziesche and Jalal Etesami and Thai Hong Linh},
  title = {{Wasserstein Adversarial Imitation Learning}},
  year = {2019},
  eprint = {1906.08113},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.08113},
}
Figure