Transformers for One-Shot Visual Imitation

Sudeep Dasari, Abhinav Gupta

Abstract

Humans can seamlessly imitate others by inferring intentions and applying past experiences to new contexts. In robotics, "one-shot visual imitation" aims to replicate this ability, allowing an agent to perform a task after viewing a single video demonstration. This paper presents a framework that leverages Transformers and a self-supervised inverse dynamics loss to bridge domain gaps between demonstrators and robots. The approach achieves an 88.8% success rate on complex pick-and-place tasks, a significant improvement over previous state-of-the-art methods.

Introduction

Traditional robot imitation often relies on kinesthetic teaching or extensive teleoperation within a specific environment. These methods are rigid and do not scale well to diverse real-world scenarios. The challenge of one-shot visual imitation is to enable a robot to watch a single video—potentially of a human with a different body shape (morphological mismatch) in a different setting (spatial mismatch)—and then execute the task itself. Key hurdles include handling visual distractions and identifying task-relevant features across different domains.

Methodology: Relational Reasoning with Transformers

The authors move away from standard meta-learning, which often overfits on single examples, toward a more robust task-driven feature representation.

Architecture

The core of the system is a Transformer network. Unlike LSTMs, which process sequences linearly and often struggle with long-term context, Transformers use self-attention to create relational features. The model processes spatial features extracted via a ResNet-18 from both the "context" demonstration video and the robot's live observations. This allows the robot to "attend" to specific objects in the demo that are critical for its current state.

The proposed architecture uses a Transformer network to relate context frames from a demonstration to current robot observations, augmented by self-supervised losses.

Self-Supervised and Auxiliary Losses

To ground these visual representations in physical reality, the framework incorporates several key components:

  • Inverse Dynamics Loss: The model is tasked with predicting the action taken between sequential frames. This forces the internal representations to be "dynamics-aware," understanding how actions transform the environment.
  • Multi-Modal Action Prediction: By using a discretized logistic mixture for action prediction, the robot can handle ambiguity (e.g., multiple valid ways to grasp an object) without defaulting to a failing "average" action.
  • Point Prediction: An optional loss predicts the future location of the robot's gripper, further grounding visual features in physical movement.

Experimental Evaluation

The researchers utilized a simulated environment based on RoboTurk and MuJoCo. The setup involved a Sawyer robot acting as the teacher and a Panda robot as the student. The evaluation covered 16 distinct pick-and-place tasks involving various objects and bins.

Performance and Efficiency

The proposed method demonstrated a dramatic performance leap over existing baselines. It achieved an overall success rate of 88.8%, compared to just 6.9% for the previous state-of-the-art (DAML) and 23.8% for a Contextual-LSTM baseline.

Comparison of success rates across different task phases. The proposed method significantly outperforms previous meta-learning approaches like DAML.

Beyond raw success rates, the model proved highly efficient, matching the best baseline's performance while requiring 3x fewer data points. The robot showed near-perfect competency in the "reaching" phase (99.4%) and high proficiency in "picking" (92.5%), validating the Transformer's ability to translate visual goals into motor control.

Discussion and Future Work

While the results are promising, limitations remain. In tests with entirely unseen objects, the robot was effective at picking (~50% success) but struggled with the "placing" phase, often selecting the wrong bin. Furthermore, the current work is confined to simulation. Future research will focus on bridging the "Sim-to-Real" gap—addressing real-world visual noise and lighting—and extending the framework to more complex, multi-stage tasks like cooking or assembly.

Summary updated

BibTeX
@inproceedings{dasari2020transformers,
  author = {Sudeep Dasari and Abhinav Gupta},
  title = {{Transformers for One-Shot Visual Imitation}},
  booktitle = {Conference on Robot Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=qcuqmQwV1Y},
}
Figure