Skip to main content
QUICK REVIEW

[Paper Review] Transformers for One-Shot Visual Imitation

Sudeep Dasari, Abhinav Gupta|arXiv (Cornell University)|Nov 11, 2020
Multimodal Machine Learning ApplicationsComputer Science57 references7 citations
TL;DR

This paper proposes a Transformer-based policy network for one-shot visual imitation learning that leverages context video from a teacher agent and self-supervised inverse dynamics loss to generalize across domain shifts. By attending to task-relevant visual features and preserving dynamics-aware representations, the method achieves a ~2× improvement in success rate over prior baselines on one-shot manipulation tasks.

ABSTRACT

Humans are able to seamlessly visually imitate others, by inferring their intentions and using past experience to achieve the same end goal. In other words, we can parse complex semantic knowledge from raw video and efficiently translate that into concrete motor control. Is it possible to give a robot this same capability? Prior research in robot imitation learning has created agents which can acquire diverse skills from expert human operators. However, expanding these techniques to work with a single positive example during test time is still an open challenge. Apart from control, the difficulty stems from mismatches between the demonstrator and robot domains. For example, objects may be placed in different locations (e.g. kitchen layouts are different in every house). Additionally, the demonstration may come from an agent with different morphology and physical appearance (e.g. human), so one-to-one action correspondences are not available. This paper investigates techniques which allow robots to partially bridge these domain gaps, using their past experience. A neural network is trained to mimic ground truth robot actions given context video from another agent, and must generalize to unseen task instances when prompted with new videos during test time. We hypothesize that our policy representations must be both context driven and dynamics aware in order to perform these tasks. These assumptions are baked into the neural network using the Transformers attention mechanism and a self-supervised inverse dynamics loss. Finally, we experimentally determine that our method accomplishes a $\sim 2$x improvement in terms of task success rate over prior baselines in a suite of one-shot manipulation tasks.

Motivation & Objective

  • Address the challenge of one-shot visual imitation in robotics, where a robot must learn from a single demonstration with domain shifts (e.g., different layouts, morphologies).
  • Overcome limitations of prior methods that rely on behavior cloning alone, which struggle with generalization and overfitting in low-data regimes.
  • Develop a policy that is both context-driven and dynamics-aware, enabling robust performance across unseen task instances and environments.
  • Investigate whether self-supervised loss and attention mechanisms can improve generalization in one-shot imitation without requiring extensive fine-tuning.

Proposed method

  • Use a Transformer encoder to process spatial ResNet features from both the robot's current observations and the teacher agent's demonstration video.
  • Apply multi-head self-attention to learn relational, task-conditioned representations that focus on salient visual elements (e.g., object positions) while ignoring distractors.
  • Train the policy using a behavior cloning loss to mimic expert actions based on the context-aware state representation.
  • Introduce a self-supervised inverse dynamics loss to regularize the representation learning, ensuring it captures motion-relevant dynamics for robust control.
  • Apply data augmentation (e.g., random cropping, color jittering) during training to improve generalization and reduce overfitting.
  • Condition the policy on full demonstration videos rather than a single goal frame, enabling better task understanding and context-aware action prediction.

Experimental results

Research questions

  • RQ1Can a Transformer-based architecture with self-attention improve one-shot visual imitation performance compared to recurrent or feedforward baselines?
  • RQ2How effective is a self-supervised inverse dynamics loss in improving generalization when only a single demonstration is available?
  • RQ3Does conditioning the policy on full demonstration videos (rather than a single frame) lead to better task understanding and success rates?
  • RQ4To what extent do architectural biases (e.g., attention mechanism) and loss functions jointly improve test-time performance in low-data imitation settings?
  • RQ5Can the proposed method generalize across domain shifts such as different object placements or robot morphologies without fine-tuning?

Key findings

  • The proposed Transformer-based policy achieves a ~2× improvement in task success rate over prior one-shot imitation learning baselines on a suite of pick-and-place tasks.
  • The model without the inverse dynamics loss performs more than 25% worse than its counterparts when trained on 1600 data pairs, demonstrating the critical role of this regularization.
  • The inverse dynamics loss improves test-time performance beyond what is captured by the behavior cloning loss, indicating it enables positive transfer not reflected in training objectives.
  • The Transformer model outperforms all other architectures—including LSTMs and ResNet-based models—by a large margin, even when using the same training losses.
  • Removing the inverse loss leads to significantly worse performance across all data regimes, especially in low-data settings, confirming its importance for generalization.
  • Conditioning the policy on full demonstration videos rather than a single frame leads to better performance, showing that contextual information is crucial for task understanding.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.