Neural Task Graphs: Generalizing to Unseen Tasks From a Single Video Demonstration

De-An Huang, Suraj Nair, Danfei Xu, Yuke Zhu, Animesh Garg, Li Fei-Fei, Silvio Savarese, Juan Carlos Niebles

Abstract

Neural Task Graphs (NTG) enable robots to perform complex, multi-step tasks after observing a single video demonstration. By representing tasks as Conjugate Task Graphs—where nodes represent actions and edges represent state transitions—the framework achieves superior generalization to unseen task configurations and robust error recovery compared to traditional imitation learning methods.

Introduction

Teaching robots complex, multi-step tasks like setting a table or performing surgery typically requires massive amounts of labeled data or rigid, manually defined sub-goals. Traditional imitation learning often fails when faced with slight variations in the environment or unexpected errors, as these models often attempt to map high-dimensional visual states directly to actions without a structural understanding of the task.

The core challenge lies in one-shot generalization (learning from a single demonstration) and long-horizon compositionality (handling tasks with many sequential steps). Neural Task Graphs (NTG) address these by learning the underlying logical structure of tasks rather than just mimicking pixel sequences.

The NTG framework processes a single video demonstration to generate a Conjugate Task Graph, which guides the robot's execution in the environment.

Methodology: The Conjugate Task Graph

The innovation of NTG lies in the Conjugate Task Graph (CTG). In a standard task graph, nodes represent states and edges represent actions. NTG inverts this: nodes are actions (e.g., "Pick up block") and edges represent the preconditions or states required to transition between actions. This inversion is crucial because while visual states are infinite and combinatorial, the set of primitive actions in a specific domain is usually small and finite.

The NTG system operates in two phases:

  1. NTG Generator: This component uses a Demo Interpreter (CNN + Seq2Seq) to extract action sequences from a video. A Graph Completion Network (GCN) then expands this sequence into a full graph by incorporating prior knowledge about valid action transitions (e.g., realizing that certain steps can be re-ordered or repeated).
  2. NTG Execution Engine: During deployment, a Node Localizer identifies the robot's current action node from visual input, and an Edge Classifier determines the next action by evaluating the preconditions of outgoing edges.
The model is trained on a set of seen tasks and evaluated on unseen tasks, requiring it to generalize the learned action logic to new configurations from a single demo.

Experimental Evaluation

The authors evaluated NTG across three diverse environments:

  • Block Stacking (BulletPhysics): Testing the ability to arrange objects into specific 3D configurations.
  • Object Collection (AI2-THOR): A photo-realistic simulator requiring navigation and object manipulation in indoor scenes.
  • JIGSAWS: A real-world dataset of robotic surgical procedures (e.g., suturing) to test the capture of complex human expert behavior.

Key Results and Insights

  • Superior Generalization: In block stacking tasks, NTG outperformed the previous state-of-the-art (Neural Task Programming) by over 25% in success rate when using visual inputs.
  • Robust Error Recovery: Because the Execution Engine is reactive and constantly re-evaluates its position in the task graph, it can naturally recover from failures. If an action fails, the model can transition back to a previous node to retry—a capability "flat" sequence models lack.
  • Data Efficiency: By focusing on the modular nature of actions, NTG requires significantly fewer training tasks to achieve high performance compared to non-graph-based policies.

Conclusion and Future Work

Neural Task Graphs demonstrate that structural priors—specifically action-centric graphs—are powerful tools for one-shot imitation learning. While the current model requires a predefined action space and high-quality video demonstrations, it paves the way for robots that can "watch and learn" complex workflows. Future research may focus on learning action primitives directly from data or integrating natural language to provide further task guidance.

Summary updated

BibTeX
@inproceedings{huang2019neural,
  author = {De-An Huang and Suraj Nair and Danfei Xu and Yuke Zhu and Animesh Garg and Li Fei-Fei and Silvio Savarese and Juan Carlos Niebles},
  title = {{Neural Task Graphs: Generalizing to Unseen Tasks From a Single Video Demonstration}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00876},
}
Figure