VirtualHome: Simulating Household Activities via Programs

Xavier Puig, Kevin Ra, Marko Boben, Jiaman Li, Tingwu Wang, Sanja Fidler, Antonio Torralba

Introduction

Executing complex household chores is a trivial task for humans but a significant challenge for autonomous agents. High-level instructions such as "make coffee" or "clean the living room" involve long-horizon planning and a deep understanding of common-sense sequences that are often omitted in natural language. For instance, a human knows that to "sit down," one must first navigate to a chair. This "common sense gap" is a primary hurdle in training robots for domestic environments.

In "VirtualHome: Simulating Household Activities via Programs," researchers introduce a novel framework that represents complex activities as executable programs. By bridging the gap between vague human instructions and precise robotic actions, VirtualHome provides a scalable platform for teaching agents the "how-to" of daily life.

The VirtualHome pipeline: from natural language descriptions to executable programs and simulated video.

Methodology

The core innovation of this work is the representation of activities as symbolic programs. A program consists of a sequence of atomic instructions, such as [Walk] <KITCHEN>(1) followed by [SwitchOn] <COFFEE_MACHINE>(1). This structured format serves as a universal language that is both human-interpretable and machine-executable.

To generate these programs at scale, the authors utilized a crowdsourcing approach. Workers used a Scratch-like graphical interface to translate natural language descriptions into structured code. This process captures the "hidden" intermediate steps that humans typically take for granted.

The researchers developed a translation model using a sequence-to-sequence (seq2seq) Recurrent Neural Network (RNN) to map text or video inputs to these programs. A critical component of the training process is the use of Reinforcement Learning (RL). While standard Maximum Likelihood Estimation (MLE) helps the model learn the syntax of programs, it often fails to ensure logical consistency. By incorporating an "executability reward" from the simulator, the model is incentivized to produce programs that are not only syntactically correct but also physically viable within the virtual environment.

Datasets and Simulator

The VirtualHome platform is built on a custom Unity3D simulator featuring six diverse, furnished homes and humanoid agents. The simulator supports 12 primary atomic actions—such as grabbing, opening, and switching on objects—modeled with realistic physics and navigation.

The paper introduces two major benchmarks:

  1. ActivityPrograms: A knowledge base containing 2,821 programs derived from 1,814 human descriptions. It spans 75 atomic actions and 308 object classes, providing a rich repository of procedural knowledge.
  2. VirtualHome Activity Dataset: A synthetic video dataset of over 5,000 activities. Unlike real-world video, these simulations provide "perfect" ground truth data, including 3D poses, semantic segmentation, depth maps, and optical flow.
Example of a simulated activity with ground truth labels including RGB, pose, segmentation, depth, and optical flow.

Evaluation and Results

The performance of the translation models was evaluated across two primary tasks: text-to-program and video-to-program.

In the text-to-program task, the RL-trained model achieved an accuracy of 77.4% (measured by Longest Common Subsequence) on the VirtualHome dataset. On the more challenging and diverse ActivityPrograms dataset, accuracy reached 44.7%. These results demonstrate the model's ability to generalize across different linguistic descriptions of the same task.

For video-to-program translation, the model successfully classified actions and objects from short video clips with a mean accuracy of 30.3%. While lower than text-based results, this proves that synthetic data can serve as a viable foundation for training video understanding models. Human validation studies further confirmed the quality of the generated activities, with many model-produced sequences rated as "excellent" or "perfect."

Conclusion and Future Work

Despite its successes, VirtualHome faces several limitations. Currently, only a subset of the 75 identified actions is fully animatable in the simulator; complex tasks like "wiping" or "folding" remain difficult to simulate realistically. Additionally, there is a persistent "reality gap" between synthetic Unity environments and the visual complexity of real-world homes. Finally, the agent's performance decreases in "unseen" environments, indicating a need for improved generalization across diverse home layouts.

VirtualHome represents a significant step toward creating robots that can learn from human demonstrations—whether through text or video—and execute complex, multi-step tasks in domestic settings.

Summary updated

BibTeX
@inproceedings{puig2018virtualhome,
  author = {Xavier Puig and Kevin Ra and Marko Boben and Jiaman Li and Tingwu Wang and Sanja Fidler and Antonio Torralba},
  title = {{VirtualHome: Simulating Household Activities via Programs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=rJVVLJGd-S},
}
Figure