Imitation from Observation: Learning to Imitate Behaviors from Raw Video via Context Translation.

Yuxuan Liu, Abhishek Gupta, Pieter Abbeel, Sergey Levine · DOI

TL;DR

This paper introduces "imitation-from-observation," a novel approach that allows robots to learn tasks by watching raw videos of experts, even when the viewpoint and environment differ. By learning to translate expert demonstrations into the robot's own context and using this as a reward signal for reinforcement learning, the method enables robots to acquire complex manipulation skills from readily available internet videos.

What Problem Does This Paper Address?

Traditional imitation learning methods often require robots to learn from expert demonstrations that provide explicit observation-action pairs. This is a significant limitation because humans and animals learn by observing behavior and inferring the necessary actions, often from different perspectives and in varied environments. The paper addresses this gap by proposing "imitation-from-observation," which aims to learn from raw video demonstrations without explicit action labels and can handle variations in context, such as viewpoint, object positions, and environmental surroundings. This opens up the possibility of using readily available internet videos as a source of supervision for robotic learning.

Methods

The core of the proposed method is a context translation model. This model is trained on multiple expert demonstrations from different contexts. Given a demonstration from a source context and an initial observation from the target (robot's) context, the model learns to predict what the expert's future observations would look like in the robot's context. This is achieved through a deep neural network architecture comprising:

  • Source and Target Encoders: These convolutional neural networks process the observation from the demonstration and the initial observation from the robot's context, respectively, extracting feature representations.
  • Translator: This module takes the encoded features from both sources and learns to translate the demonstration features into the target context's feature space.
  • Decoder: This component reconstructs the translated features back into an observation format.

To ensure the learned features are useful for imitation, the translation model is trained with a combination of losses:

  • Translation Loss ($L_{trans}$): Penalizes deviations between the predicted translated observation and the actual observation in the target context.
  • Reconstruction Loss ($L_{rec}$): Acts as an autoencoder loss to ensure the source encoder and decoder can reconstruct the original demonstration observation.
  • Alignment Loss ($L_{align}$): Encourages the translated features to be aligned with the features extracted from the target context observation.

Once trained, the context translation model is used to generate a reward function for reinforcement learning (RL). The reward is based on minimizing the distance between the robot's current observations and the translated expert demonstrations. Two reward components are used:

  • Feature Tracking Reward ($R_{feat}$): Penalizes deviations of the robot's current observation features from the translated expert features.
  • Image Tracking Reward ($R_{img}$): A weaker reward that penalizes significant differences between the robot's observed images and the translated expert observations, helping to handle out-of-distribution samples during RL.

The paper then uses standard RL algorithms (TRPO for simulation, trajectory-centric RL for real robots) to learn a policy that maximizes this reward.

Datasets

The paper does not explicitly mention using pre-existing public datasets. Instead, they generated their own datasets for training and evaluation:

  • Simulated Tasks: Datasets were created for four simulated manipulation tasks (reaching, pushing, sweeping, striking) using the MuJoCo simulator. Expert demonstrations were generated by hand-specifying reward functions and using a policy optimization algorithm. These demonstrations were collected from randomly generated contexts.
  • Real-World Tasks: Datasets were collected for real-world robotic tasks including pushing, sweeping (with paper and almonds), and ladling almonds. These demonstrations were provided by a human demonstrator.

Key Insights and Ideas

  • Human-like Imitation: The core idea is to mimic how humans learn by observing and inferring actions, rather than relying on explicit action labels. This is a significant departure from traditional imitation learning.
  • Context Translation as a Bridge: Learning to translate observations across different contexts is crucial for enabling imitation when demonstrations and the learning environment don't perfectly match. This translation provides a robust feature representation for reward generation.
  • Video as a Rich Supervision Source: The work demonstrates that raw video, even with viewpoint changes, can be a powerful and accessible source of supervision for robots, potentially leveraging vast amounts of online video data.
  • End-to-End Learning: The proposed method learns the context translation and the control policy in an end-to-end fashion, reducing the need for hand-engineered features or complex pipelines.

Key Results

  • Superior Performance in Varied Contexts: The proposed imitation-from-observation method significantly outperformed prior methods (pretrained visual features, third-person imitation learning, generative adversarial imitation learning) on simulated tasks involving changes in viewpoint and object appearance. Prior methods struggled, achieving near-zero success rates on some tasks.
  • Successful Real-World Robotic Manipulation: The method was successfully applied to real-world robotic tasks, including pushing, sweeping, and ladling almonds, demonstrating its ability to learn complex manipulation skills from human demonstrations.
  • Ablation Studies Confirm Component Importance: Removing key components of the translation model (losses) or the reward function led to significant performance degradation, highlighting the effectiveness of each part of the proposed system.

Limitations and Future Work

  • Data Requirements: The method requires a substantial number of demonstrations to learn the translation model effectively. The authors suggest combining their approach with higher-level representations to improve efficiency.
  • Multiple Contexts Needed: The current approach relies on having demonstrations from multiple contexts to learn the translation. Future work could explore how to combine multiple tasks into a single model or handle scenarios with scarce contextual variations.
  • Domain Shift: While the current work assumes demonstrations and the learner's context are sampled from the same distribution, handling systematic domain shift (e.g., differences in embodiment between human and robot) is identified as an area for future research.
  • Exploiting Internet Videos: The authors express excitement about exploring explicit handling of domain shift to learn skills directly from internet videos of human demonstrators.

Summary updated

Abstract

Imitation learning is an effective approach for autonomous systems to acquire control policies when an explicit reward function is unavailable, using supervision provided as demonstrations from an expert, typically a human operator. However, standard imitation learning methods assume that the agent receives examples of observation-action tuples that could be provided, for instance, to a supervised learning algorithm. This stands in contrast to how humans and animals imitate: we observe another person performing some behavior and then figure out which actions will realize that behavior, compensating for changes in viewpoint, surroundings, object positions and types, and other factors. We term this kind of imitation learning “imitation-from-observation,” and propose an imitation learning method based on video prediction with context translation and deep reinforcement learning. This lifts the assumption in imitation learning that the demonstration should consist of observations in the same environment configuration, and enables a variety of interesting applications, including learning robotic skills that involve tool use simply by observing videos of human tool use. Our experimental results show the effectiveness of our approach in learning a wide range of real-world robotic tasks modeled after common household chores from videos of a human demonstrator, including sweeping, ladling almonds, pushing objects as well as a number of tasks in simulation.
BibTeX
@misc{liu2017imitation,
  author = {Yuxuan Liu and Abhishek Gupta and Pieter Abbeel and Sergey Levine},
  title = {{Imitation from Observation: Learning to Imitate Behaviors from Raw Video via Context Translation.}},
  year = {2017},
  eprint = {1707.03374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1707.03374},
}
Figure