Alignment-Based Compositional Semantics for Instruction Following

Jacob Andreas, Dan Klein

Abstract

This paper describes an alignment-based model for interpreting natural language instructions in context. We approach instruction following as a search over plans, scoring sequences of actions conditioned on structured observations of text and the environment. By explicitly modeling both the low-level compositional structure of individual actions and the high-level structure of full plans, we are able to learn both grounded representations of sentence meaning and pragmatic constraints on interpretation. To demonstrate the model’s flexibility, we apply it to a diverse set of benchmark tasks. On every task, we outperform strong task-specific baselines, and achieve several new state-of-the-art results.

Introduction

Instruction following requires an agent to translate a sequence of natural language commands into a sequence of physical or virtual actions. Historically, researchers have approached this through two primary lenses: rigid semantic parsers that map text into formal logic, and linear policy estimators that map text directly to actions using simple features. While semantic parsers offer precision, they often struggle with noisy real-world observations. Conversely, linear policies are flexible but frequently ignore the compositional structure of language.

This paper introduces a nested, structured alignment framework implemented as a Conditional Random Field (CRF). The model aims to combine the compositional power of semantic parsing with the flexibility of direct policy learning, while also addressing pragmatic challenges such as inferring actions that are implied but not explicitly stated.

Methodology: Nested Alignment and Grounding Graphs

The core innovation of this work is the treatment of instruction following as a nested alignment problem. This approach operates at two distinct levels: path structure and action structure.

Path Structure (Sentence-to-Action Alignment)

The model treats the relationship between a sequence of instructions and a sequence of actions as a latent alignment problem. This allows the agent to handle "under-specification" (where the agent must perform unstated actions, like rotating, to fulfill a command) and "over-specification" (where multiple sentences describe a single action). By allowing "null" alignments, the agent learns that some actions are common-sense requirements of the environment, even if not explicitly mentioned.

Action Structure and Syntax

Instead of using a formal logical language, the model aligns the dependency parse of a sentence with a "grounding graph" of the environment. The grounding graph represents the state of the world—including actions, landmarks, and their relations—as nodes and edges.

Linguistic syntax represented as a dependency parse for the instruction 'Go down the yellow hall'.

Compositional Semantics via Alignment

Meaning is derived by matching the hierarchy of the parse tree to the hierarchy of the grounding graph. This allows the model to reason about complex phrases by looking at how specific words relate to specific nodes in the environment graph. Unlike "reflex" agents that decide the next action greedily, this model uses a search-based approach with lookahead, evaluating how well an entire sequence of actions satisfies the provided instructions.

The alignment process mapping linguistic tokens to nodes in the environment's grounding graph.

Experimental Evaluation

The model was evaluated on three diverse benchmark tasks to demonstrate its generality:

  1. Map Reading (HCRC Map Task): Navigating a 2D map based on long, noisy, human-to-human speech transcripts. The model achieved an F1 score of 0.55, significantly outperforming the previous best of 0.48.
  2. Maze Navigation (SAIL): Moving a virtual agent through a 3D grid-based maze. The model reached a 59.6% success rate, outperforming other supervised baselines.
  3. Puzzle Solving (Crossblock): A challenging search problem where the agent must clear blocks from a grid based on high-level strategy hints. The model achieved an 86% success rate, proving that natural language can act as a powerful heuristic for complex search problems.

Key Insights and Discussion

The primary contribution of this work is the demonstration of logic-free compositionality. By aligning linguistic structure directly to world structure, the model handles novel strings and spatial relations more fluidly than traditional logic-based systems. Furthermore, the inclusion of search and planning proved vital; ablation studies showed that removing the grounding graphs or the lookahead planning led to significant performance drops.

While the model is computationally expensive due to the complexity of summing over all possible alignments, it represents a significant step toward agents that can interpret natural language instructions pragmatically and compositionally in complex, structured environments.

Conclusion

By modeling instruction following as a global sequence prediction problem rooted in structural alignment, this framework achieves state-of-the-art results across multiple domains. Future work will focus on scaling these methods to more continuous state spaces and explicitly modeling the instruction-giver's intentions to further refine pragmatic reasoning.

Summary updated

BibTeX
@inproceedings{andreas2015alignment,
  author = {Jacob Andreas and Dan Klein},
  title = {{Alignment-Based Compositional Semantics for Instruction Following}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  url = {https://openreview.net/forum?id=BJZdwGM_-S},
}
Figure