Skip to main content
QUICK REVIEW

[Paper Review] ProTo: Program-Guided Transformer for Program-Guided Tasks

Zelin Zhao, Karan Samel|arXiv (Cornell University)|Oct 2, 2021
Multimodal Machine Learning ApplicationsComputer Science89 references15 citations
TL;DR

ProTo proposes a Program-Guided Transformer that leverages cross-attention and masked self-attention to jointly model program semantics and structure for unified execution in perception, reasoning, and decision-making tasks. It achieves state-of-the-art performance on GQA visual reasoning (+4.31% accuracy) and 2D Minecraft policy learning, demonstrating strong generalization to unseen, complex, and human-written programs.

ABSTRACT

Programs, consisting of semantic and structural information, play an important role in the communication between humans and agents. Towards learning general program executors to unify perception, reasoning, and decision making, we formulate program-guided tasks which require learning to execute a given program on the observed task specification. Furthermore, we propose the Program-guided Transformer (ProTo), which integrates both semantic and structural guidance of a program by leveraging cross-attention and masked self-attention to pass messages between the specification and routines in the program. ProTo executes a program in a learned latent space and enjoys stronger representation ability than previous neural-symbolic approaches. We demonstrate that ProTo significantly outperforms the previous state-of-the-art methods on GQA visual reasoning and 2D Minecraft policy learning datasets. Additionally, ProTo demonstrates better generalization to unseen, complex, and human-written programs.

Motivation & Objective

  • To unify perception, reasoning, and decision-making by learning general program executors for program-guided tasks.
  • To address the limitation of ad-hoc, task-specific program executors that hinder scalability and generalization.
  • To develop a neural-symbolic model that jointly encodes program semantics and structural control flow for improved reasoning and execution.
  • To evaluate the model on diverse program-guided tasks, including visual reasoning and policy learning, under both dense supervision and sparse reward settings.

Proposed method

  • ProTo uses cross-attention to align task specifications (e.g., images or environment states) with program routines for semantic grounding.
  • Masked self-attention is applied over the program structure to preserve control flow and enable structured reasoning across loops and conditionals.
  • The model executes programs in a learned latent space, enabling richer representation learning than previous neural-symbolic models.
  • It supports both dense execution supervision and sparse reward-based training, enabling generalization in complex environments.
  • The architecture is trained end-to-end on program-guided tasks, with attention mechanisms explicitly modeling both semantic and structural program components.
  • The model is evaluated on GQA (visual reasoning) and 2D Minecraft (policy learning), using program-annotated datasets and domain-specific languages (DSL).

Experimental results

Research questions

  • RQ1Can a unified neural model effectively learn to execute diverse programs across perception, reasoning, and decision-making tasks?
  • RQ2How does explicit modeling of program structure and semantics improve generalization to unseen, complex, or human-written programs?
  • RQ3Does a transformer-based approach with structured attention outperform vanilla transformers and symbolic planners in program-guided tasks?
  • RQ4To what extent can ProTo generalize to unseen program routines without explicit supervision?
  • RQ5Can ProTo scale to long and complex programs in environments with sparse reward signals?

Key findings

  • ProTo achieves a 4.31% accuracy gain over the previous state-of-the-art method on the public GQA test server in program-guided visual reasoning.
  • The model generalizes effectively to human-written programs, demonstrating robustness beyond synthetic or program-synthesized inputs.
  • ProTo significantly outperforms a vanilla transformer that lacks explicit structural guidance, especially on long and complex programs.
  • The model generalizes compositional abilities, such as inferring new routines (e.g., Mine(Gold)) after observing related ones like Is_there(gold) and Mine(Silver).
  • ProTo outperforms a hard-coded symbolic planner in scalability, adaptability to raw image inputs, and handling of unseen program components.
  • The model achieves strong performance under sparse reward learning, enabling it to learn complex behaviors like bridge-building in Minecraft without dense supervision.

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.