An Empirical Investigation of Representation Learning for Imitation

Xin Chen, Sam Toyer, Cody Wild, Scott Emmons, Ian Fischer, Kuang-Huei Lee, Neel Alex, Steven H Wang, Ping Luo, Stuart Russell, Pieter Abbeel, Rohin Shah · DOI

Abstract

Representation learning (RepL) is often viewed as a potential "silver bullet" for data-hungry imitation learning (IL) tasks. By pre-training encoders to understand visual structure, researchers hope to reduce the number of expert demonstrations required for agent mastery. This paper presents a rigorous empirical investigation into whether popular RepL methods actually improve IL performance. Using the modular EIRLI (Empirical Investigation of Representation Learning for Imitation) framework, we evaluate various RepL algorithms across ten tasks in diverse environments. Our results indicate that simple image augmentations frequently outperform complex representation learning, primarily due to a mismatch between visually salient features and those required for fine-grained control.

Introduction

In computer vision and natural language processing, representation learning has led to massive performance leaps. Naturally, the imitation learning community has sought to leverage these techniques to make training more efficient. However, the utility of these auxiliary losses in IL has not been systematically tested across diverse benchmarks. This study seeks to answer a fundamental question: Do complex representation learning methods provide a material advantage over simple, well-tuned baselines?

The EIRLI Framework

To facilitate a systematic comparison, we introduced the EIRLI framework. This modular architecture allows for the independent selection and combination of imitation baselines and representation learning algorithms.

The EIRLI framework modularizes representation learning and imitation learning pipelines, allowing for systematic testing of pre-training and joint training strategies.

The framework supports two primary training strategies:

  1. Pre-training: The encoder is trained first using RepL losses, followed by policy training using expert demonstrations.
  2. Joint Training: The representation and the imitation task are learned simultaneously, allowing the encoder to potentially adapt to task-specific requirements.

Experimental Setup and Datasets

We evaluated five major types of RepL—including Variational Autoencoders (VAE), contrastive methods (SimCLR), and dynamics-based models—against standard imitation baselines like Behavioral Cloning (BC) and Generative Adversarial Imitation Learning (GAIL). These were tested across three distinct benchmark suites:

  • DeepMind Control Suite (DMC): Standard continuous control tasks.
  • Procgen: Procedurally generated games testing generalization to new layouts.
  • MAGICAL: A benchmark designed for robust imitation under varying appearances and physics.
Visualizations of the STL-10, MAGICAL, and Procgen datasets used for evaluation, showing the relationship between images, states, and actions.

Key Insights

Augmentation is the Real Hero

The most significant performance gains across almost all tasks did not come from complex RepL losses. Instead, simple image augmentations (e.g., random crops, rotations, and color jitters) applied directly to the imitation task provided the most robust improvements. In tasks like reacher-easy and Fruitbot, adding augmentations alone increased rewards by over 150%.

The Saliency Mismatch

A critical finding of this study is the mismatch between visual saliency and functional importance. Standard RepL methods often focus on "big picture" visual features. For example, in the game CoinRun, contrastive methods like SimCLR may focus on the rapidly changing background. However, for successful imitation, the agent must focus on fine-grained, pixel-level cues related to the character and immediate obstacles. Saliency maps confirmed that RepL-trained encoders often ignore these crucial task-relevant features.

Action vs. Value

RepL appears more effective at predicting "Value" (state quality) than "Action" (the next step). This suggests that while RepL may not significantly boost simple Behavioral Cloning, it may still hold value for Reinforcement Learning or Inverse Reinforcement Learning methods that rely on learning a Q-function.

Conclusion

Our investigation suggests that current representation learning methods are not a "silver bullet" for imitation learning. In most scenarios, a well-tuned baseline using basic image augmentation is more effective and less complex. Future work should focus on developing "task-aware" representation learning techniques that prioritize functionally important features over general visual saliency. To support this effort, we have released our modular codebase at github.com/HumanCompatibleAI/eirli.

Summary updated

BibTeX
@misc{chen2021empirical,
  author = {Xin Chen and Sam Toyer and Cody Wild and Scott Emmons and Ian Fischer and Kuang-Huei Lee and Neel Alex and Steven H Wang and Ping Luo and Stuart Russell and Pieter Abbeel and Rohin Shah},
  title = {{An Empirical Investigation of Representation Learning for Imitation}},
  year = {2021},
  eprint = {2205.07886},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.07886},
}
Figure