Imitation Learning from Imperfect Demonstration

Yueh-Hua Wu, Nontawat Charoenphakdee, Han Bao, Voot Tangkaratt, Masashi Sugiyama

Overview

This paper introduces two novel algorithms, 2IWIL and IC-GAIL, designed to perform imitation learning using imperfect (sub-optimal) demonstrations. By leveraging "confidence scores"—which indicate the likelihood that a demonstration is optimal—these methods allow agents to learn expert-level policies even when the majority of the training data is flawed or unlabeled.

The Challenge of Imperfect Data

Standard Imitation Learning (IL) algorithms, such as Behavioral Cloning (BC) or Generative Adversarial Imitation Learning (GAIL), typically operate under a strong assumption: the provided demonstrations come from a perfect expert.

In the real world, this is rarely true. Collecting perfect data is expensive and time-consuming. Most accessible data (like YouTube videos of humans performing tasks) contains mistakes, distractions, or sub-optimal strategies. If you train a standard GAIL agent on these "noisy" demonstrations, the agent will simply learn to imitate the mistakes. The authors set out to solve how an agent can distinguish between "good" and "bad" parts of a demonstration mixture to recover an optimal policy.

Proposed Methods

The authors propose two distinct approaches that utilize a small amount of data labeled with confidence scores ($r \in [0, 1]$) alongside a larger set of unlabeled, imperfect data.

  1. 2IWIL (Two-step Importance Weighting IL):
  2. Step 1: It treats the problem as a semi-supervised classification task. It trains a probabilistic classifier to predict confidence scores for the unlabeled demonstrations.
  3. Step 2: It performs GAIL but uses the predicted confidence scores as importance weights. This effectively "mutes" the influence of bad demonstrations and amplifies the good ones.
  4. IC-GAIL (Imperfect Confidence GAIL):
  5. This is an end-to-end approach. Instead of a separate classification step, it modifies the GAIL objective to match a mixture of occupancy measures.
  6. It mathematically accounts for the fact that the demonstration distribution is a mix of optimal and non-optimal policies, allowing the agent to "filter" the distribution during the adversarial training process.

Experimental Setup

The methods were evaluated on the MuJoCo physics engine, a standard benchmark for continuous control in reinforcement learning. Specifically, they tested on HalfCheetah-v2, Ant-v2, Hopper-v2, Swimmer-v2, and Walker2d-v2.

To simulate "imperfect" data, the authors used a mix of trajectories from an optimal policy and two intermediate (sub-optimal) policies. Confidence scores were generated using a pre-trained classifier, with only 20% of the data being "labeled" with these scores to mimic a realistic, data-scarce scenario.

Key Insights and Ideas

  • Confidence as a Proxy for Reward: In RL, designing reward functions is notoriously hard. The authors argue that providing a "confidence score" (e.g., a human rating a video from 0 to 1) is much easier and more intuitive for human supervisors than engineering a complex reward signal.
  • The Power of Unlabeled Data: Even if you don't have confidence scores for every trajectory, the "unlabeled" sub-optimal data is still useful. In 2IWIL, it helps reduce the variance of the risk estimator; in IC-GAIL, it acts like "guided exploration," helping the agent understand the environment's transitions even if the actions aren't perfect.
  • Robustness to Human Error: The authors found that their methods are surprisingly robust to noise. Even if the confidence scores are slightly "off" (simulated with Gaussian noise), the algorithms still converge to near-optimal policies.
Impact of noise on the performance of 2IWIL and IC-GAIL in the Ant-v2 environment.

Key Results

  • Superior Performance: Both 2IWIL and IC-GAIL outperformed standard GAIL and other baselines (like GAIL with reweighting but no unlabeled data) by a significant margin across almost all MuJoCo tasks.
Performance comparison of 2IWIL and IC-GAIL against baselines across MuJoCo environments.
  • Convergence Trade-offs:
  • 2IWIL generally converges faster, making it better for scenarios where environment interaction is expensive.
  • IC-GAIL is more theoretically elegant as an end-to-end system and avoids the potential for "error accumulation" that can happen in 2IWIL's two-step process.
  • Data Efficiency: The methods achieved near-optimal performance (normalized reward $\approx 1.0$) even when the "expert" portion of the demonstration mixture was only about 33%.

Limitations and Future Work

  • The Class-Prior Problem: IC-GAIL's performance is sensitive to the "class-prior" ($\alpha$), which is the proportion of optimal data in the mixture. If this is very low, the agent learns much more slowly. The authors introduced a thresholding hyperparameter ($\tau$) to mitigate this, but it adds another knob to tune.
  • Dependency on Initial Labels: While the methods use unlabeled data, they still require some initial confidence scores. If the initial labeled set is extremely small or biased, the classifier in 2IWIL might fail.
  • Future Directions: The authors suggest extending this framework to discrete sequence generation (like NLP) or specialized fields like chemistry, where "confidence" could be determined by automated scoring functions (e.g., molecular solubility).

Summary updated

BibTeX
@inproceedings{wu2019imitation,
  author = {Yueh-Hua Wu and Nontawat Charoenphakdee and Han Bao and Voot Tangkaratt and Masashi Sugiyama},
  title = {{Imitation Learning from Imperfect Demonstration}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=fRrxSS0YERm},
}
Figure