Zero-shot Imitation Policy via Search in Demonstration Dataset

Federico Malato, Florian Leopold, Andrew Melnik, Ville Hautamäki · DOI

Abstract

Behavioral cloning uses a dataset of demonstrations to learn a policy. To overcome computationally expensive training procedures and address the policy adaptation problem, we propose to use latent spaces of pre-trained foundation models to index a demonstration dataset, instantly access similar relevant experiences, and copy behavior from these situations. Actions from a selected similar situation can be performed by the agent until representations of the agent's current situation and the selected experience diverge in the latent space. Thus, we formulate our control problem as a dynamic search problem over a dataset of experts' demonstrations. We test our approach on BASALT MineRL-dataset in the latent representation of a Video Pre-Training model. We compare our model to state-of-the-art, Imitation Learning-based Minecraft agents. Our approach can effectively recover meaningful demonstrations and show human-like behavior of an agent in the Minecraft environment in a wide variety of scenarios. Experimental results reveal that performance of our search-based approach clearly wins in terms of accuracy and perceptual evaluation over learning-based models.

Introduction

Imitation Learning (IL) is a powerful paradigm for solving complex control tasks by leveraging human demonstrations. However, traditional methods like Behavioral Cloning (BC) and Generative Adversarial Imitation Learning (GAIL) suffer from high computational costs and brittleness under distributional shifts. This paper introduces the Zero-shot Imitation Policy (ZIP), which shifts the paradigm from learning a policy network to a retrieval-based search over expert demonstrations. By utilizing the latent space of a pre-trained foundation model, ZIP achieves zero-shot adaptation to complex tasks in Minecraft without explicit training.

Methodology

The ZIP framework relies on a pre-trained Video Pre-Training (VPT) model, which provides a robust feature extractor for the Minecraft environment. The methodology consists of two primary phases:

  1. Dataset Indexing: A demonstration dataset is processed through the VPT model to extract latent embeddings for each frame. These embeddings, paired with the corresponding expert actions, form a "Situations Dataset."
  2. Dynamic Search and Control: During inference, the agent encodes its current observation into the VPT latent space. It then performs a search (using L1 distance) to find the most similar situation in the indexed dataset. The agent copies the expert's actions for a duration, re-triggering the search if the current state diverges significantly from the reference trajectory or after a fixed time interval.
ZIP Workflow: (A) Indexing human demonstrations into a situations dataset using VPT embeddings. (B) Inference loop where the agent searches for the most similar situation and copies actions.

Experimental Results

The approach was evaluated on the MineRL BASALT 2022 benchmark, focusing on tasks like "FindCave," "MakeWaterfall," and construction tasks. These tasks are characterized by the absence of clear reward functions, making them ideal for imitation-based approaches.

ZIP demonstrated superior performance and efficiency compared to standard IL baselines. Notably, the "training" phase (indexing) for ZIP took only 32 minutes, whereas BC required up to 212 minutes and GAIL nearly 6 hours. In the FindCave task, ZIP achieved a success rate of 43.32%, significantly outperforming the best BC baseline (~33%) and GAIL, which failed to complete the task. Human perceptual evaluations further confirmed that ZIP's behavior was perceived as more human-like and effective.

Success rate comparison on the FindCave task. ZIP significantly outperforms Behavioral Cloning (BC) and GAIL baselines.

Conclusion

ZIP presents a compelling alternative to traditional imitation learning by framing control as a search problem. While highly effective, the method is dependent on the quality and coverage of the demonstration dataset. Future work involves scaling the search using vector databases like FAISS and incorporating goal-conditioning to enhance intent-driven retrieval.

Paper Citation: Malato, F., Leopold, F., Melnik, A., & Hautamaki, V. (2024). Zero-shot Imitation Policy via Search in Demonstration Dataset. arXiv:2401.16398v1 [cs.AI].

Summary updated

BibTeX
@inproceedings{malato2024zero,
  author = {Federico Malato and Florian Leopold and Andrew Melnik and Ville Hautamäki},
  title = {{Zero-shot Imitation Policy via Search in Demonstration Dataset}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=7mrjm9FLq6},
}
Figure