Mitigating Covariate Shift in Imitation Learning via Offline Data Without Great Coverage

Jonathan D. Chang, Masatoshi Uehara, Dhruv Sreenivas, Rahul Kidambi, Wen SunarXiv 2021

Abstract

Imitation Learning (IL) typically struggles with covariate shift, where compounding errors lead agents away from expert trajectories into states not covered by training data. While interactive methods like DAgger or datasets with global coverage can mitigate this, they are often impractical for real-world applications. This paper introduces MILO (Model-based IL from Offline data), a framework that utilizes a small set of expert demonstrations alongside a large, potentially sub-optimal offline dataset. By employing a pessimistic penalty based on transition model uncertainty, MILO constrains the agent to the expert's distribution. Evaluated on MuJoCo benchmarks, MILO demonstrates superior sample efficiency and robustness, achieving near-expert performance where traditional Behavior Cloning fails.

Introduction

Imitation Learning (IL) aims to teach agents tasks by mimicking expert behavior. The most straightforward approach, Behavior Cloning (BC), treats this as supervised learning. However, BC is notoriously vulnerable to covariate shift: because the training data only covers the expert's optimal path, a single minor error can push the agent into an unfamiliar state. Without guidance on how to recover, errors compound, leading to total task failure.

Existing remedies are often limited. Interactive IL requires an expert to be available during training to label new states, while offline methods typically require "global coverage"—a dataset that spans the entire environment. MILO addresses these gaps by using a large, "messy" offline dataset to provide the necessary recovery information, requiring only partial coverage of the expert's likely paths.

Qualitative comparison on Humanoid-v2: Behavior Cloning (BC) variants fail to maintain balance and drift off-course, while MILO achieves stable locomotion and near-expert normalized scores.

Methodology

MILO operates through a three-step algorithmic framework designed to leverage offline data pessimistically:

  1. Model Learning: The agent learns a transition model ($\hat{P}$) of the environment using the large, static offline dataset.
  2. Pessimistic Penalty Design: The agent calculates an uncertainty measure ($\sigma$) for the learned model. High uncertainty indicates regions not well-represented in the offline data. MILO assigns a pessimistic penalty to these regions to discourage the agent from entering "uncharted territory."
  3. Offline Min-Max Optimization: The agent solves a game to find a policy that minimizes the distance to the expert distribution while staying within the "safe" (low-uncertainty) regions defined by the offline data.

This approach ensures that the agent stays near the expert's distribution, using the offline data as a buffer to correct for the drift that typically plagues BC.

Experimental Results

The researchers evaluated MILO on five standard MuJoCo continuous control benchmarks: Hopper, Walker2d, HalfCheetah, Ant, and Humanoid. The setup was intentionally challenging: expert data was limited to just 100–200 state-action pairs, and the offline data (1 million samples) was collected from sub-optimal policies, often achieving less than 50% of the expert's score.

Performance and Robustness

MILO significantly outperformed both Behavior Cloning and ValueDICE, a state-of-the-art offline IL method. In the complex Humanoid-v2 task, MILO achieved near-expert performance with only 100 expert samples, whereas BC failed to maintain balance.

Normalized scores across five MuJoCo benchmarks. MILO (red) consistently outperforms Behavior Cloning (blue/yellow) and ValueDICE (green) across various tasks, demonstrating superior robustness to limited expert data.

Key findings include:

  • Sample Efficiency: MILO imitates experts with an extremely low number of demonstrations by leveraging the learned dynamics of the environment.
  • Robustness to Sub-optimal Data: Even when the offline dataset was generated by a "random" or weak policy, MILO maintained significant performance, proving that global coverage is not a prerequisite for effective imitation.

Conclusion and Future Work

MILO demonstrates that pessimism is a powerful tool for mitigating covariate shift in imitation learning. By focusing on partial coverage of the expert's neighborhood, it makes offline IL more applicable to real-world robotics where perfect datasets are unavailable. Future research will focus on improving model calibration in neural network ensembles and scaling the framework to high-dimensional, image-based control tasks.

Summary updated

BibTeX
@misc{chang2021mitigating,
  author = {Jonathan D. Chang and Masatoshi Uehara and Dhruv Sreenivas and Rahul Kidambi and Wen Sun},
  title = {{Mitigating Covariate Shift in Imitation Learning via Offline Data Without Great Coverage}},
  year = {2021},
  eprint = {2106.03207},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.03207},
}
Figure