InfoGAIL: Interpretable Imitation Learning from Visual Demonstrations

Yunzhu Li, Jiaming Song, Stefano Ermon

Introduction

InfoGAIL is a novel imitation learning framework designed to not just mimic expert behavior, but to understand the underlying "why" behind it. By combining Generative Adversarial Imitation Learning (GAIL) with information-theoretic regularization, the model automatically discovers and disentangles latent factors—such as distinct driving styles—from unlabeled human demonstrations, even when learning directly from raw pixels.

The Challenge of Multi-Modal Demonstrations

Imitation learning (IL) aims to teach agents to perform tasks by watching experts, bypassing the need to manually design complex reward functions. However, human experts are inherently inconsistent. If you collect driving data from ten different people, some will prefer the inner lane, others the outer; some pass on the left, others on the right.

Standard IL methods like Behavior Cloning or standard GAIL often struggle with this "multi-modal" data. They tend to average out these different styles, resulting in a policy that performs poorly or fails to capture the nuances of human decision-making. The core challenge is to automatically discover and separate these latent styles without requiring manual labels for every demonstration.

Comparison of imitation learning methods on a multi-modal 2D trajectory task. InfoGAIL successfully separates the distinct modes.

The InfoGAIL Approach

The authors introduce InfoGAIL (Information Maximizing Generative Adversarial Imitation Learning) to address this limitation. Its architecture is built on three main pillars:

  1. Latent Variable Policy: Unlike standard GAIL, the policy $\pi(a|s, c)$ takes an additional latent code $c$ as input. This code is intended to represent high-level semantic factors (e.g., "aggressive" vs. "cautious" driving).
  2. Mutual Information Regularization: To ensure the latent code $c$ actually controls the behavior, the authors add a regularization term that maximizes the mutual information between the code and the resulting trajectory. They use a variational lower bound (similar to InfoGAN) by training a posterior estimator $Q(c|s, a)$ that tries to guess the latent code used to generate a specific action.
  3. Improved Optimization:
    • To handle high-dimensional visual inputs (110x200 pixels), the model uses a pre-trained ResNet as a feature extractor.
  4. The standard GAN objective is replaced with a Wasserstein GAN (WGAN) loss to improve training stability and prevent mode collapse.
  5. Reward Augmentation is incorporated, adding simple auxiliary rewards (like a penalty for crashing) to help the agent surpass suboptimal expert demonstrations.

Experimental Validation

The model was evaluated on two primary environments:

  • Synthetic 2D Plane: A toy environment where an agent must follow one of three distinct circular trajectories. This served as a proof-of-concept for mode separation, clearly demonstrating InfoGAIL's superiority over baselines that average the trajectories.
  • TORCS (The Open Source Racing Car Simulator): A sophisticated driving simulator. The authors collected human demonstrations for two specific scenarios: choosing between the inside or outside lane during a curve (Turn), and overtaking a slower vehicle from either the left or the right (Pass).

Key Insights and Results

  • Unsupervised Style Discovery: InfoGAIL learns to cluster behaviors without labels. By simply changing the latent code $c$, a user can force the agent to switch from "passing on the left" to "passing on the right."
  • Interpretable Latent Space: The learned latent space maps to human-understandable concepts. In the driving tests, the discrete codes naturally aligned with the physical choices made by the human experts.
  • Accuracy in Intent Inference: In the "pass" task, the posterior network $Q$ could correctly identify which side a human expert was passing on with 81.9% accuracy, despite never being shown a label during training.
  • Superior Performance: InfoGAIL achieved an average rollout distance of 1226.68 in TORCS, significantly outperforming standard GAIL (914.45) and even slightly exceeding the human expert (1203.51) thanks to the collision-avoidance reward augmentation.

Limitations and Future Work

While powerful, InfoGAIL has limitations. The current implementation requires the user to specify the structure of the latent variable in advance (e.g., a discrete one-hot vector of a certain size). If the number of "styles" in the data is unknown, the model might struggle. Additionally, like most GAIL-based methods, it requires a simulator to generate rollouts during training, which can be computationally expensive. Finally, while the paper handles discrete choices well, disentangling continuous, overlapping factors (like "speed" vs. "smoothness") remains a more difficult challenge for future research.

Summary updated

BibTeX
@inproceedings{li2017infogail,
  author = {Yunzhu Li and Jiaming Song and Stefano Ermon},
  title = {{InfoGAIL: Interpretable Imitation Learning from Visual Demonstrations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=B1-5yt-OWH},
}
Figure