Alignment-Based Compositional Semantics for Instruction Following
Paper · 2015 · Jacob Andreas and Dan Klein
Summary
An instruction can make sense and still be impossible to carry out as the next move. An agent told to go down a yellow hallway may be facing a wall. It first has to work out which hallway the instruction describes, then find a way to move into it. The turn that makes the instruction possible may never have been mentioned. Andreas and Klein approach this problem by scoring entire candidate plans against the instructions and the environment. The system can give credit to a move that closely matches the wording and retain an unmentioned move that makes the rest of the plan possible.
The method aligns language and action at two levels. At the level of a plan, it infers which actions the instructions describe. This lets several utterances refer to the same move and leaves room for actions with no instruction attached. Within an utterance, it uses dependency parsing to identify relations between words, then compares those relations with links in a graph describing an action and its surroundings. The graph can carry details such as a landmark’s name, its position, or the distance moved. The alignment therefore does work typically assigned to semantic parsing, which turns language into a structured meaning representation. Here, the interpretation is assembled by comparing the sentence with a candidate action in context. Training uses instructions paired with demonstrated action sequences, while the alignments themselves are inferred.
The authors test the approach on map reading, maze navigation, and the Crossblock puzzle. On the map-reading test split, the full system reaches an F-measure of 0.55 for identifying transitions in the reference route. On the maze’s leave-one-map-out evaluation, it reaches 59.6% success under the single-instruction criterion, ahead of several task-specific systems and behind the strongest reported comparison at 65.3%. Across the Crossblock train/test folds, it exactly matches 70% of the annotated plans and produces a winning board on 86% of the puzzles. Those measures distinguish following the demonstrated route through a puzzle from finding any sequence that solves it.
The components help in different ways. In the maze, removing the internal structure of action descriptions brings the largest drop among the paper’s variants. On the map, the flat representation retains slightly higher precision, while the full system recovers more of the reference route and obtains the best F-measure. In Crossblock, the flat representation already captures the relevant board information, and the comparison with a reflex agent highlights the value of looking ahead. Together, the experiments show how language can help rank feasible plans, with the most useful source of structure depending on what makes each task difficult.
Deep dive: Alignment-Based Compositional Semantics for Instruction Following
Andreas and Klein show how an agent can follow instructions by aligning words with its surroundings and searching for a feasible plan. · about 39 minutes to read
The problem and its context
What a demonstration leaves unexplained
The paper studies an agent that receives a sequence of commands and has to carry out a sequence of actions in an environment. A training example supplies the commands and a demonstration. Given the starting state, the agent can replay the demonstrated moves and recover the states they lead through. It still has to infer how the words and moves correspond. The demonstrated turn might fulfill a command about direction, prepare for a later command, or make sense only in relation to a landmark that becomes visible after turning.
This gap matters because the unit convenient for a person giving instructions can differ from the unit available to the agent. A speaker can describe a route by naming a recognizable feature of its destination. The agent must translate that description into operations it can execute from its present position. In the other direction, an informal speaker can repeat or revise a description of the same part of a route. Matching utterances to successive moves rigidly would make repetition look like extra work and an omitted prerequisite look like an impossible instruction.
A separate problem arises inside an utterance. A route description can name a landmark and specify where to go relative to it. The words that identify the landmark and the words that convey the relation serve different functions. An agent needs to connect the relevant condition to the right object. Simply detecting that the sentence names a kind of landmark and that a matching object exists somewhere in the environment would leave that relation unresolved. A plausible interpretation has to describe the candidate move in its particular setting.
The authors use compositionality to capture the way these pieces work together. Within a sentence, individual expressions contribute to an interpretation through their relations to one another. Across instructions, a move can establish the conditions in which a later command becomes executable. The paper gives these problems different representations. Relations among words and environmental features are compared within an action, while the sequence of states and decisions is handled through a separate search over plans.
The plan level also gives the authors a way to study pragmatics in a specific operational sense. The yellow-hallway direction presupposes that the agent can proceed along the hall. When its present orientation prevents that, a preparatory turn can resolve the difficulty. The text does not have to supply direct evidence for that turn. The rest of the route can make a plan containing it more plausible. Likewise, when a landmark description has several possible referents, the distance to each candidate can help resolve the reference even if the speaker never mentions distance.
The strengths the authors wanted to combine
The paper describes earlier instruction-following research in terms of two broad families. One family used semantic parsers to produce commands in a formal language. A formal command could represent the relationship between an action and the objects, directions, or conditions mentioned with it. Earlier systems used techniques drawn from work such as Learning to Map Sentences to Logical Form and Learning for Semantic Parsing with Statistical Machine Translation. These techniques gave instruction-following research an established way to represent how sentence parts combine.
The task also provided a way to learn without having a person write a formal command for every sentence. In the line of work represented by Weakly Supervised Learning of Semantic Parsers for Mapping Instructions to Actions, the result of executing a predicted command could supply feedback. This is weak supervision because the behavior of the completed command provides evidence about its interpretation without identifying the correct formal analysis directly. The paper notes a related arrangement in question answering, where a returned answer can give feedback on an interpretation.
The authors identify a restriction in the way earlier instruction-following parsers used execution. If the environment is consulted only after the formal command is complete, the score used to build that command cannot directly take account of the current state or the states a candidate action might produce. The formal language also has to provide a usable vocabulary for the task. A finite list of predicates presents a practical difficulty for a map whose landmark names can be unfamiliar strings and whose positions are real-valued. In such a task, matching a word against an unfamiliar name or comparing positions directly can be useful during interpretation.
The other family estimated a policy, a rule for selecting an action from the current situation. The authors describe work that represents the domain as a Markov decision process and learns to choose among primitive actions, such as Reinforcement Learning for Mapping Instructions to Actions. In these systems the input to a decision can include the instructions and details of the state, and deciding when to advance through the instructions can itself become part of the policy. The feature function has considerable freedom to inspect the text and the environment.
The typical flat representation in this family gave all that information to the decision rule as a single vector. As the authors describe it, this made it harder to represent which particular word modified which candidate referent, or how several relations fit together. A greedy policy also chooses what to do now on the strength of its current decision score. In contrast, a plan search can consider a move’s contribution to a sequence before committing to it. The difference is particularly relevant when the instructions describe a result whose prerequisites are left implicit.
The paper treats these as properties of particular approaches. It points to gameplay research, including Language Understanding for Text-based Games Using Deep Reinforcement Learning, as earlier work that brings aspects of the two traditions together on a different class of problems. Its own aim is to combine structured interpretation with flexible access to environmental information and a search that can consider the consequences of a move.
Where the alignments came from
The idea of learning a correspondence between language and another representation had precedents. In machine translation, alignments connect items in different sequences. The authors also cite work that connects words to pieces of semantic representations, including Aligning English Strings with Abstract Meaning Representation Graphs. Their proposal makes the unit of alignment depend on the problem being solved. At the level of a plan, it is an utterance and an action. Within that pair, it is a word and a graph node, together with the relations leading to other aligned items.
Graph representations of meaning also had a history, including the work on semantics-based translation with hyperedge replacement grammars that the authors cite. For instruction following, the graph on the action side is built from what the agent can do and what it can observe around that action. It gives the linguistic analysis something concrete to line up with. That is the sense in which the interpretation is grounded. A word associated with motion, for example, is evaluated against a candidate move from a particular state, with perceptible features of the resulting environment available to help interpret its dependents.
Earlier approaches had also used flexible machinery around formal meanings. The paper discusses Semantic Parsing via Paraphrasing in relation to selecting lexical entries and on-the-fly ontology matching in relation to rewriting logical forms. It cites grounded color semantics as work that considers real-valued outputs. The question here is whether a system can compare such observations directly with language while retaining a compositional treatment of a sentence and the ability to plan across several sentences.
The method, step by step
Start with a demonstrated route
Imagine receiving written directions and a trace of someone following them. The trace gives a starting point and the moves taken from there. The authors turn each move into a description of the action with its preceding and resulting states attached. The same movement command can thus give rise to different descriptions depending on where it occurs and what it brings into view. In the maze example, a graph for a movement can include locations visible after the move. Their presence is a consequence of the candidate action in that setting.
The written side of the example passes through a pretrained dependency parser. A dependency tree links words through relations such as those between a head and its dependents. Starting with a word high in the tree, the procedure can inspect the words dependent on it and follow their links to further words. The paper uses this structure as evidence about how the sentence’s semantic parts relate. Syntactic relations and proximity serve as guides to relations in the world, and learning determines how much particular links are worth.
On the action side, the environment provides a graph for each transition the system considers. A node can represent the move itself, a location, or another relevant part of the scene. The features attached to it describe such things as which kind of movement occurred or what a landmark is called. Edges can also have features. Word features can be compared with node features, while the labels of grammatical relations can be compared with features of graph edges. This gives the agent a way to ask whether the object that fits a word also stands in a relation that fits its place in the sentence.
At the plan level, the agent considers which moves the utterances are talking about. It has to preserve their order while allowing the two sequences to advance at different rates. A route can have an initial turn that no statement describes. A long instruction sequence can also return to an action it has already described without requiring an extra move. The action descriptions matter when they are paired with utterances. The parts of the plan score concerned with movement and feasibility matter throughout the route.
How instructions and candidate plans are aligned
The steps in order.
The order in the diagram expresses the dependencies among the steps. During training, the demonstrated path is available, and the method alternates between finding its alignment and fitting the scoring weights. At test time, the path itself is unknown. The system uses the environment to consider possible moves and alternates between updating the plan and updating its alignment with the instructions.
Represent the two sides of an action
A training example can be written as a pair of sequences.
(x, y) = ((x₁, …, xₘ), (y₁, …, yₙ))
Here x is the instruction sequence, with xᵢ its ith utterance and m its number of utterances. The sequence y is the demonstrated plan, with yⱼ its jth transition and n its number of transitions. The subscripts identify positions, and the ellipses stand for the intervening items in each ordered sequence. Given the start, each demonstrated action can be executed to recover the transition represented by yⱼ.
A transition may include environment information relevant to interpreting language about the move. In the maze example, the action node identifies a movement, and other nodes represent locations that can be seen afterward. The feature that gives the distance covered can preserve its real-valued character. A landmark’s name can stay a string. The graph gives the procedure places to attach these observations and links that specify which parts of the transition are related.
G = (V, E, L, fᵥ, fₑ)
Here G denotes a grounding graph. V is its set of vertices, E its set of directed edges, and L the space of available feature labels or values. The functions fᵥ and fₑ supply the feature sets for a vertex and an edge, respectively. The parentheses indicate that these components together define the graph. A directed edge connects an ordered pair of vertices, so the graph can distinguish different roles for its source and destination.
fᵥ: V → 2ᴸ
Here fᵥ maps each member of V, the vertex set, to a member of 2ᴸ, the space of subsets of the feature space L. The arrow denotes the mapping from input to output. In practical terms, a node can carry multiple descriptors. A movement node, for instance, can supply both the kind of action and its distance.
fₑ: E → 2ᴸ
Here fₑ maps each member of E, the directed-edge set, to a set of features drawn from L, again written as a member of 2ᴸ. The arrow gives the direction of the mapping. These edge features give the scorer evidence about relations, alongside the evidence about individual objects and actions carried by the vertices.
The particular graph is a domain design choice. All of the experiments start from structured virtual environments, and the authors keep the graph features close to representations used in earlier work on the respective tasks. They also describe how the same interface could accept graphs built from a perceptual system. A graph derived from perception would have to supply the entities, relations, and properties that downstream alignment needs. The experiments obtain those directly from the virtual setting.
A graph can also represent the sort of distinctions familiar from formal semantics. The authors explain that a choice of labels identifying atomic entities and relations, with unique labels at vertices and single active labels on edges, gives the existentially quantified fragment of first-order logic. In that configuration, the graph can represent that entities exist and stand in particular relations. Broader feature choices let it also carry names and quantitative attributes. The ability to attach those observations is important because the next stage can compare them with language as they are.
Compare language and environment features
A joining feature function combines information from the sentence and the grounding graph. It takes feature sets from each side and returns a numerical vector. A word can contribute its identity, while the graph node contributes a color or a movement property. A comparison can record the joint presence of particular features, or compute something from their values. The authors use the example of comparing a word with a landmark name by edit distance, which measures the changes needed to turn one string into the other. This makes it possible to compute evidence for a landmark name that did not occur in training.
φ: (2ᴸ × 2ᴸ) → ℝᵈ
Here φ is the joining feature function. 2ᴸ is the space of subsets of the label space L, × forms pairs of such subsets, and ℝᵈ is the space of real vectors with d components. The arrow shows that the pair of feature sets is the input and the numerical vector is the output. In later expressions the arguments to φ are written as the words, nodes, or relations whose features are passed to it.
For a word such as yellow, a possible joint feature records its association with a particular environmental color. A string-similarity feature can instead return evidence according to the degree of resemblance between a textual expression and a name. The distinction affects what can transfer. An indicator tied to a specific pair of identities fires only for that pair. A comparison computed from the strings can have a value on a new pair. The framework accommodates both decisions, with the training data supplying evidence about the usefulness of their weights.
The same construction applies to relations. If a head and a dependent are being aligned to a pair of graph nodes, the dependency between the words can be compared with the edge linking the nodes. The fit of the resulting interpretation depends on both kinds of evidence. A word may fit a node locally, yet contribute weakly if the graph relations around that node give poor matches for the rest of the phrase. A candidate whose locally plausible matches also fit together through the graph can receive a stronger score.
Work upward through the sentence
For the local computation, the authors use x and y for a single utterance and its candidate action description. Think of a word in the dependency tree and a node in the grounding graph as provisionally paired. To score the interpretation under that pairing, the procedure first scores the word against the node. It then looks at each dependent of the word and the candidate nodes reachable from the current graph node. For a candidate dependent–node pairing, it scores the relation connecting the pair back to its parents and includes the score for everything below the dependent.
A hidden alignment, written b, specifies the correspondences inside an utterance–action pair. The score can use several words to describe the same perceptual component, and the graph can have relations the sentence never mentions. The choice of what goes with what is guided by the weights on lexical and relational evidence. The authors present this as a relaxation of grammatical systems in which lexical entries have specified functional forms and syntactic types tightly constrain possible semantic types.
Dᵦ(i, j) = {(k, l) : k ∈ Cₓ(i), l ∈ Cᵧ(j), (k, l) ∈ b}
Here i is a word index and j a graph-node index. Cₓ(i) gives the indices of the dependents of word i in utterance x, and Cᵧ(j) gives the indices reachable as children of node j in the action graph y. The symbol ∈ means membership of a set. The braces collect ordered pairs (k, l) meeting the conditions following the colon. b is the selected alignment, and Dᵦ(i, j) gathers its paired children of the current word and current node.
The multiplicative form of the score follows the description of the derivation. Pairing a word and node makes an immediate contribution. Each aligned child pair adds a factor for its incoming relation and another for the interpretation below it.
ψ(xᵢ, yⱼ, b) = exp(θᵀφ(xᵢ, yⱼ)) × ∏₍ₖ,ₗ₎ ∈ Dᵦ(i, j) [exp(θᵀφ(xᵢₖ, yⱼₗ)) × ψ(xₖ, yₗ, b)]
Here ψ(xᵢ, yⱼ, b) is the score of the derivation under alignment b, starting with word xᵢ and node yⱼ. The vector θ contains the learned weights. θᵀφ is their dot product with the feature vector returned by φ. The superscript ᵀ makes θ a row for that multiplication, and exp is the exponential function. The first factor is the local word–node score. The product symbol ∏ multiplies factors over all the pairs in Dᵦ(i, j), with × denoting multiplication. xᵢₖ is the dependency from word i to word k, yⱼₗ is the graph relation from node j to node l, and the brackets group their joint score with the recursively obtained ψ(xₖ, yₗ, b).
The computation follows the sentence tree down to a word with no dependents. At such a word, the word–node comparison supplies the score because there is nothing further to attach. It makes no difference to termination if the grounding graph contains a cycle or an edge from a node to itself. Every recursive call still moves down the dependency tree. This property is useful for graph construction, because the graph can describe environmental relationships that do not have the shape of a tree.
At plan level, the system uses the combined evidence of the possible local alignments. Marginalizing the local alignment means summing its contributions and making the utterance–action score available without selecting a single correspondence for every word.
ψ(x, y) = ∑ᵦ ψ(x, y, b)
Here x is the utterance, y the action graph, and b ranges over the structure-to-structure alignments allowed by their representations. ψ(x, y, b) is the score for an individual alignment, and ∑ᵦ sums those scores. The result, ψ(x, y), is the local pairing score passed to the plan-level procedure.
A dynamic program performs this sum by keeping a chart of partial results. A chart cell corresponds to a word paired with a graph node. The chart fills cells for dependent words before filling those for the words that govern them. For each dependent of the current word, it sums over the compatible child nodes, combining the relation score with the already computed score for that dependent and child node. The alternatives for an individual dependent are summed, and the contributions across dependents are multiplied. The resulting cell also includes the score of the current word and node. The utterance–action calculation can use the root pairing after the relevant smaller cases have been filled.
O(|x||y|)
Here O describes an upper bound on the growth of the computation, |x| counts words in the utterance, and |y| counts nodes in the action graph. The adjacent counts denote multiplication. The paper gives this running time assuming the number of outgoing edges is bounded by a constant. The chart then has a cell for each word–node pair, with bounded work on descendants per cell. The complexity claim concerns the local sum for a single utterance and action, leaving the separate problem of searching for actions and full paths.
Give a score to the complete path
The paper sets up plan prediction as a conditional random field. This is a way of assigning probabilities to structured outputs given an input, with scores for related parts of the output contributing to its overall probability. The input here is the instruction sequence. A candidate output includes a path through the environment together with an alignment telling the scorer which instructions apply to which transitions. The environment supplies the possible state changes. The paths under consideration are therefore sequences the environment can produce from the start.
For the plan, the score has contributions from the path itself and from its fit to the text. The path-only part includes a length potential and a potential for each transition. A potential is a scoring function, here with learned weights. These path-only functions can favor plausible movement independent of the wording. An action that has no utterance paired with it contributes through the path, and it can lead to a later state where a text-dependent match is strong.
p(y, a | x; θ) ∝ exp[ψ(n; θ) + ∑ⱼ ψ(yⱼ; θ) + ∑ᵢ ∑ⱼ 𝟙[aᵢ = j] ψ(xᵢ, yⱼ; θ)]
Here p is the conditional probability of plan y and alignment a, given instruction sequence x and parameters θ. The vertical bar introduces the conditioning input, and the semicolon separates the parameters in the notation. ∝ means proportional to, and exp exponentiates the total score inside the brackets. The score ψ(n; θ) depends on the number n of transitions, and ψ(yⱼ; θ) scores transition j without reference to an utterance. The first ∑ⱼ adds these transition scores across the path. The double sum ranges over utterances i and transitions j. The indicator 𝟙[aᵢ = j] includes ψ(xᵢ, yⱼ; θ), the utterance–action score, exactly when alignment variable aᵢ assigns utterance i to transition j. The plus signs add the length, transition, and text contributions.
The alignment must be monotonic. As the procedure moves through the utterances, their assigned positions cannot move backward through the plan. A transition can be passed over by the alignment, leaving it in the plan with no utterance attached. When several utterances specify the same action, the alignment can assign them to the same position. That flexibility accounts for under-specification and redundancy while preserving an ordering constraint that can be used in inference.
Global normalization means that, given the instructions, the probability scale is set by the total weight of the possible outputs. An exponentiated path score therefore stands in comparison with scores for alternative paths and alignments. With alignment fixed, the paper describes the resulting structure as a linear-chain conditional random field. Its transition structure follows the sequence of moves. The analogy to word alignment in translation is that a learned pair score connects items across sequences. Here the score inside each connection has its own structure, computed from a dependency tree and a grounding graph.
Fit the weights and recover a plan
The training procedure seeks parameters that put high conditional probability on the demonstrated plans. The training pairs give neither an utterance-to-action alignment nor a word-to-graph alignment. Their absence creates different computational problems. For a given utterance and action the local dynamic program can sum over the word–graph correspondences exactly. At the path level, the authors replace a sum over sequence alignments with selection of a best alignment. They then alternate between improving that alignment and improving the parameters. This procedure is called iterated conditional modes because each update seeks a preferred value for one part with the other held fixed.
The authors initialize the weights randomly and use L-BFGS, a numerical optimization method, for the weight updates. An exact gradient would need information about competing paths, because the conditional probabilities depend on the shared normalizing constant. The forward algorithm can in principle organize this calculation, but the environments considered in the paper have too many states for the authors to do it in practice. They approximate the comparison using alternative actions sampled from the environment.
p(y, a | x) ≈ ∑ⱼ exp[ψ(yⱼ) + ∑ᵢ 𝟙[aᵢ = j] ψ(xᵢ, yⱼ)] / ∑ᵧ̃ ∈ Ỹ exp[ψ(ỹ) + ∑ᵢ 𝟙[aᵢ = j] ψ(xᵢ, ỹ)]
Here p(y, a | x) denotes the conditional quantity the paper approximates in training, with the weights suppressed. The symbol ≈ marks the approximation, and the outer ∑ⱼ sums the local ratios for positions j in the demonstrated plan. In each ratio, yⱼ is the demonstrated transition and ỹ ranges over the sampled alternatives Ỹ in the denominator. The slash separates numerator and denominator. The function exp converts the bracketed scores to positive terms. ψ with one argument is a transition score, ψ with two arguments is an utterance–transition score, and the sums over i add the text scores for utterances xᵢ assigned to position j by a. The indicator 𝟙[aᵢ = j] makes that selection. The resulting comparison uses local alternatives in place of a normalizer over complete paths.
With the weights and observed path fixed, the best monotonic alignment can be found by the Viterbi algorithm. This dynamic program retains the best scores of compatible partial alignments and extends them along the ordered sequences. It finds the maximizing alignment without calculating the normalizer, since the normalizer is common to the alignments being compared. Improving the parameters against sampled alternatives and finding the best alignment on a fixed path therefore have different guarantees.
At test time the parameters are fixed and the plan is unknown. Iterated conditional modes now alternates between choosing an alignment for the current plan and choosing a plan for the current alignment. The alignment step again uses Viterbi. The path step uses Viterbi where feasible and beam search where the calculation would be too expensive. A beam keeps a limited collection of promising partial paths and extends them, so early choices can still be assessed in light of later moves. The authors also describe how known bounds on path length allow their dynamic programs to consider the lengths within those bounds.
The training procedure, word-level calculation, and path search thus use exact computation at different points and approximations where the remaining choices are too numerous. The authors released the implementation as jacobandreas/instructions. The accompanying software contains the details of how the grounding graphs and features are constructed for the individual tasks.
Experiments and results
The authors evaluate on established benchmarks with different sources of difficulty. The map instructions are long, informal, and often redundant. The maze instructions are more tightly coupled to what the agent must do and use the relations among parts of an utterance in a more consequential way. Crossblock makes it difficult to find a winning sequence even when the board and the rules are available. Using the existing protocols lets the authors compare with research that addressed each task separately. Since the protocols score different outputs, the results are best read within each task.
Map reading with unfamiliar landmarks
The map task uses the route-following setup established by Vogel and Jurafsky from experimental data collected by Anderson and colleagues. A map specifies a starting position and supplies a collection of landmarks with names and coordinates. Instructions lead from the start to a destination without a label identifying that destination. Names can be shared by more than one landmark, and the test landmarks are unseen during training. The language comes from spoken directions transcribed as text, so the instructions can contain false starts, irregular grammar, and repeated guidance.
This setup asks for more than recovering a destination name. The reference path is evaluated through transitions between landmarks, and the predicted transitions are compared with those on that path. Precision asks what share of the predicted transitions belong to the reference. Recall asks what share of the reference transitions are recovered. F-measure combines the two. Thus the evaluation can distinguish a conservative prediction that misses route segments from one that covers more of the route at the cost of extra transitions.
Vogel and Jurafsky learned an action policy using SARSA and a simple set of features. Andreas and Klein reuse those features in the alignment and search framework. The paper compares the full and reduced systems with Vogel and Jurafsky and with the authors’ own earlier work on grounding language in continuous space. The figures are on the same train/test split as the Vogel and Jurafsky evaluation.
Map-reading test F-measure by system
The full system leads on F-measure, and the system with planning and flat features also exceeds the earlier systems.
The numbers
| System or setting | F-measure |
|---|---|
| Vogel and Jurafsky | 0.48 |
| Andreas and Klein earlier system | 0.45 |
| No planning | 0.45 |
| No grounding graphs | 0.52 |
| Full system (this paper) | 0.55 |
On the map-reading test split, Vogel and Jurafsky obtain precision of 0.46 and recall of 0.51. The earlier Andreas and Klein system has precision of 0.43 and recall of 0.51. The full system reaches precision of 0.51 and recall of 0.60. Its F-measure of 0.55 is the highest in the comparison. The variant with no grounding graphs has the highest precision at 0.52 and obtains recall of 0.52. Across the variants, the authors’ approach yields the best reported result on each metric, with different variants providing the precision and recall maxima.
The landmark split is an important condition of that result. When a test landmark is new, its name cannot have been learned as the identity of that particular object from a training demonstration. The feature machinery can still look for string resemblance and use geometric information from the map. The route score can also prefer a closer candidate when several positions fit a textual description. The evaluation measures the resulting transition predictions in this setting. It gives no separate success rate for identifying a name or choosing among duplicate names.
Maze navigation and the single-instruction criterion
In the maze task established by MacMahon and colleagues, hallways differ in the appearance of their walls and floors and in the objects they contain. A virtual agent receives directions through the maze. The language has less redundancy than the map directions, and parts of a sentence can matter for identifying the correct movement or feature. The paper’s yellow-hallway example illustrates the interaction with the starting state. A forward move that would satisfy the wording once the agent is oriented correctly cannot be performed while it is facing the wall.
The evaluation leaves a map out in turn and uses that map for testing. Training uses full action sequences. The reported success metric checks whether the agent has reached the correct position and orientation after acting on a single instruction. Both components count, since being at the right location with the wrong heading can change what the agent can carry out next. The authors chose this version of the evaluation because the alternative that scores full sequences does not match their data condition precisely.
The comparison includes earlier task-specific systems from Kim and Mooney and from Chen, followed by stronger results obtained with discriminative reranking and with a manually seeded lexicon. Reranking uses another scoring stage to reorder candidates. The semisupervised approach benefits from initial hand-annotated logical forms. The authors present these as resources or techniques that could be used alongside their contributions.
Maze navigation success in leave-one-map-out testing
The full system leads both of its ablations and the earlier task-specific baselines, while reranking and semi-supervised learning score higher.
The numbers
| System or setting | Success % |
|---|---|
| Kim and Mooney | 57.2 |
| Chen | 57.3 |
| No planning | 58.9 |
| No grounding graphs | 51.7 |
| Full system (this paper) | 59.6 |
| Kim and Mooney with reranking | 62.8 |
| Artzi and colleagues with semi-supervision | 65.3 |
The full system’s 59.6% success on held-out maze maps exceeds the earlier Kim and Mooney result of 57.2% and Chen’s 57.3% on the single-instruction criterion. It also exceeds both variants of the authors’ method. The reranked system at 62.8% and the semisupervised system at 65.3% remain ahead. The comparison supports the paper’s claim that the approach transfers to a task typically studied through semantic parsing, with the best absolute maze result in the reported comparison belonging to the semisupervised system.
There are two levels of sequence in this experiment. Training uses full demonstrations, which supply the transitions and contexts through which the agent moved. The test measure in the chart checks the outcome attached to an instruction. A result under that measure describes how often position and orientation line up at those evaluation points. It cannot be read as the rate at which an entire multi-instruction route is executed correctly.
Crossblock and the difference between matching and winning
Crossblock uses instructions to describe a solution to a puzzle whose goal is to eliminate all the blocks. The actions and board configuration can be represented with flat features. The hard part is finding a sequence that reaches the goal. An early decision can affect which moves remain feasible, so even a system with a complete description of the board faces a substantial search problem. The text can provide partial guidance, giving the search a reason to retain some paths over others.
The paper reports separate measures for reproducing a demonstration and solving the puzzle. Match is the share of predictions that reproduce the annotated action sequence exactly. Success is the share that lead to a winning configuration. A prediction can lead to a winning board by a different sequence, and the two metrics count that case differently. The authors follow Branavan and colleagues in averaging over five random train/test folds. The earlier study supplies a Match comparison, and a no-text beam-search baseline supplies results for both metrics.
Crossblock exact plan match across random train/test folds
The full system reproduces the annotated action sequence most often, with the reflex variant close to the previous task-specific system.
The numbers
| System or setting | Match % |
|---|---|
| No text | 54 |
| Branavan and colleagues | 63 |
| No planning | 64 |
| Full system (this paper) | 70 |
Across the Crossblock folds, the full system obtains 70% exact Match. The no-planning variant scores 64%, the Branavan and colleagues result is 63%, and the no-text search scores 54%. On Success across the same folds, the full system reaches 86%, the no-text search reaches 78%, and the reflex variant reaches 66%. The paper does not report a Success number for the Branavan and colleagues comparison.
The metrics make distinct contributions to the case for language. Exact matching shows that the text-guided planner more often makes the same choices as the annotator. Success shows that the guidance also helps find paths that achieve the goal, even when the sequence differs from the annotation. In particular, the full system’s higher Success relative to the no-text beam search provides evidence that language can help the search itself. The flat graph setting makes this evidence easier to interpret because richer action structure is unnecessary for representing the board in this experiment.
What the ablations show
Representing the relations inside a move
The authors compare the full method with a version that removes grounding graphs in favor of an unstructured representation of the environment. This comparison holds on to the planning framework and changes how it represents a candidate action for interpretation. It tests the contribution of the structured action representation and the correspondences it supports. It does not isolate the contribution of a particular edge feature or a particular feature of the dependency parse.
The maze provides the clearest result for this change. The full system obtains 59.6% Success on the leave-one-map-out single-instruction test, while the version without grounding graphs obtains 51.7%. Because the flat variant can still plan, the comparison points to the interpretation performed within the utterance–action pair. When several pieces of the scene appear relevant, the graph allows a word to describe a particular item and a dependency to contribute evidence about its relation to the surrounding action. Having access to the components in a flat feature description gives the procedure less structure for making that distinction.
The map results show a tradeoff. The system without grounding graphs has test precision of 0.52, while the full system has 0.51. The full system’s recall of 0.60 is higher than the flat variant’s 0.52, and its F-measure is higher as well. In this task, planning with flat features already recovers more of the reference route than some of the alternatives. Adding structured action descriptions improves overall route-transition recovery under the reported F-measure. The slight precision advantage for the flat variant is a reason to retain the separate metrics when describing the result.
The Crossblock representation makes the same comparison uninformative there. The authors say the relevant perceptual state for this task fits a flat feature description, so the full and no-grounding-graphs versions coincide. This specifies a boundary for the ablation. An extra graph comparison can contribute only when there is useful internal structure for it to represent. Here the board and action features already give the search what it needs from that part of the system.
Looking ahead before committing
The other ablation is a reflex agent without planning lookahead. The comparison asks how much is gained by a procedure that can evaluate the contribution of a move to a longer path. In the maze, the no-planning variant scores 58.9% Success on the held-out maps, close to the full system’s 59.6%. The drop is smaller than the one from removing grounding graphs in that evaluation. A preparatory turn still explains why lookahead can matter in a particular maze instruction. The reported aggregate gives stronger evidence for the value of structured grounding on this measure.
Map reading shows a different pattern. On the map test split, the reflex version reaches precision of 0.44, recall of 0.46, and F-measure of 0.45. The full version reaches 0.51, 0.60, and 0.55 on those measures, respectively. The result concerns the transitions present along the recovered route. It supports the usefulness of considering a plan across a redundant sequence of spoken directions. It leaves open how much of the result is associated with the ability to fill in steps, how much with managing repeated descriptions, and how much with selecting among overlapping plausible stretches of a route.
In Crossblock, on the random train/test folds, the reflex agent’s 64% Match is below the full planner’s 70% Match, and its 66% Success is below the planner’s 86% Success. A comparison with the no-text system gives another perspective. The reflex agent with the text matches the reference more often than search without the text, which has 54% Match. The no-text search solves more boards than the reflex agent, at 78% Success. The ordering changes with the target. Text can help recover human move choices, while a search procedure can find winning paths that the locally selected moves miss. The full configuration combines these advantages in the reported Crossblock comparison.
Each of these ablations changes a substantial part of the system. A reflex agent differs from the planner in the way it evaluates candidate action sequences. The flat variant replaces the structured grounding on which within-sentence alignment operates. The experiments compare usable configurations, so they support claims about the importance of those components as implemented. They leave the effects of narrower choices, such as the monotonicity constraint or the contribution of one type of relational feature, unresolved.
What the learned weights reveal
The map experiment also examines individual weights after training. The paper looks at how the word top interacts with the side of a destination landmark. The learned weight for its conjunction with the north side is 1.31, the weight for the south side is 0.61, and the weight for the east side is −0.93. These are feature weights from the trained map system. A positive weight favors the candidate when the feature applies, and a negative weight works against it, with other active features also contributing to the score.
The authors read the north and south associations in light of different ways a speaker can describe a relative position. A direction can put the navigator above the landmark, or place the landmark on the upper side relative to the navigator. The same word can occur in both perspectives. The stronger north-side weight and the positive south-side weight are consistent with that mixture in the instructions. The east-side weight shows that a side position in that direction receives less support from this expression.
The paper also lists distance features from the map task. The feature labeled distance 0 has weight 4.51, distance 1 has weight 2.78, and distance 4 has weight 1.54. The distance labels here are those of the feature settings, and the larger weights for nearer destinations express a text-independent preference. If the language leaves two destinations plausible, this part of the score can help favor the nearer one. Across transitions, such preferences can support shorter routes.
The two weight examples show the distinction between kinds of evidence the architecture was designed to combine. The weights involving top measure a learned compatibility of a word with an environmental relation. The distance weights can contribute even at a place in the plan where no word mentions distance. Neither set of examples measures how frequently the corresponding feature resolves an ambiguity on its own. The ablations provide the outcome-level comparisons, and the learned weights illustrate how particular decisions can be influenced within the full score.
Limitations
Where the authors draw the boundary
The authors focus on the part of sentence meaning needed to connect predicates with their arguments in instruction following. A movement expression can specify a direction, a target, and conditions on where the movement ends. A dependency-based alignment has a way to represent such relationships to a grounding graph. The authors observe that quantification and scope play a limited role in the tasks they target. As a result, the experiments leave those aspects of meaning largely outside their scope. The paper’s discussion of an existential fragment describes what a particular graph construction can express, while the task results concern the forms of language required by the benchmarks.
The authors also give their treatment of pragmatics a specific scope. The path structure can help resolve some presupposition failures, favor a nearby reading of an ambiguous landmark description, and use hints to guide puzzle search. A fuller account could explain how a person forms an instruction from their own beliefs about likely routes or action sequences. The paper proposes this possibility in its conclusion. Its experiments examine how the agent can respond to the resulting words in context, with no explicit account of how the instruction giver chose them.
The Crossblock discussion identifies the planner as another place for further work. On these puzzles, text can give a heuristic, meaning guidance that helps choose which paths to inspect. The authors suggest investigating a closer coupling to a more sophisticated planner. Their present procedure can search with lookahead and use the learned score to guide that search. In the beam-search case, it can discard a partial path that would ultimately have led to a strong outcome. The method’s practical result therefore depends partly on the set of paths that the search actually considers.
For the maze, the authors explicitly point out that reranking and the use of a seed lexicon produce stronger published results in the comparison. They suggest that these techniques could be combined with their approach. The paper does not test such a combination. They also restrict the maze evaluation to the single-instruction version whose data condition fits their setup. The full-sequence version would be needed to measure how errors accumulate over complete routes under its own protocol.
What follows from the experimental setup
The successful use of grounding graphs in the experiments depends on access to structured virtual environments. These make states, possible actions, and relevant environmental attributes available for constructing the graphs. The authors describe supplying graphs through perception as a possibility. The benchmark results do not establish performance when a perceptual front end misidentifies an object, misses a relation, or estimates a continuous property imprecisely. In that setting, the evidence used in alignment would depend on the quality of those additional inputs.
The framework also retains task-specific work. Someone must choose the graph’s contents and features, define or supply the environment’s possible transitions, and determine useful comparisons between the text and observations. These choices can be simpler or more flexible than writing a formal command language. They still define what distinctions the system has available. For instance, a graph that exposes visible objects after a move can support language referring to what comes into sight. That interpretation would be hard to score if the relevant property were absent from the graph. The evidence for generality comes from reusing the architecture across domains with different representations.
Several kinds of prior structure are supplied to learning. The dependency parser is pretrained, and the environment makes it possible to recover structured transitions from the demonstrations. Training supervision includes a path as well as the text. The agent infers the alignments within this setup. The results consequently speak to learning from demonstrated moves, with syntactic analysis and environmental structure available. Learning the transitions from scratch, inducing syntax from the commands, or training solely from a final win signal would change the information available to the procedure.
The path alignment preserves order. This provides a useful treatment of omission and repetition and makes the ordered search tractable. It also constrains the interpretations available to the method. A speaker can describe a later destination and then return to instructions for an earlier part of the route. An alignment that maps those mentions directly to their respective transitions could require going backward. The evaluation contains informal language, but the paper does not separately establish how the system handles such changes in discourse order. The architecture is strongest where instruction order is a reasonable guide to action order.
Exactness also has to be attributed to the right subproblem. The local chart sums alignments for a fixed utterance and grounding graph. The Viterbi step for the outer alignment finds the best monotonic alignment on a fixed path. The training procedure alternates conditional updates and uses sampled alternatives. Test-time planning alternates again and can use a beam. Neither the local sum nor the exact alignment step makes the complete learning or prediction procedure an exact global search. The reported benchmarks give empirical evidence about the outcomes of these approximations together.
Finally, the benchmarks identify success through different observable criteria. A map-transition score registers overlap with a reference route. The maze test checks position and orientation under the single-instruction protocol. Crossblock can separate a demonstration match from a win. A higher number on any of these measures gives evidence about that measured outcome. The learned alignments offer an explanation for how language enters the decision, but the experiments do not compare those alignments with independent annotations of what particular speakers intended.
What came after
Later work citing Andreas and Klein reaches across several problems raised by the paper. Some of it centers on the search for actions in an environment. Some treats the direction between language and behavior as reversible, asking how to generate an instruction as well as how to follow one. Other work takes up the representation of grounded meaning or uses natural language to inform decisions outside physical navigation. These connections concern shared problems. The fact that a paper cites Andreas and Klein is by itself evidence of a relationship in the literature, with the specific mechanism of any reuse a separate question.
Navigation, observations, and progress
In Andreas and Klein’s maze experiment, a candidate transition brings a structured description of the surroundings with it. Mapping Instructions and Visual Observations to Actions with Reinforcement Learning addresses the related problem with visual observations explicitly among the inputs and reinforcement learning as the named approach. The connection is the need to interpret an instruction against what the agent observes while acting. A useful decision depends on which parts of an instruction fit the current surroundings and what actions are available there.
The map benchmark in the earlier paper holds out landmark identities, while the maze protocol holds out a map. Learning to Navigate Unseen Environments puts the issue of navigation in unseen environments at the center and names back translation and environmental dropout as its techniques. The common question is how a learned relation between wording and surroundings can continue to guide action when the test setting differs from the ones available during training. The earlier paper approaches part of this problem by making comparisons against the features of each candidate environment. The later work frames unseen environments as the primary navigation challenge.
Self-Monitoring Navigation Agent via Auxiliary Progress Estimation addresses how a navigator estimates its progress. Andreas and Klein’s outer alignment similarly has to relate stages of a route to stages of the instructions. A turn with no direct verbal counterpart can advance the executed path without marking another utterance as fulfilled. An auxiliary estimate of progress takes up the general problem of tracking where an agent is within the requested task, through a different quantity from the earlier paper’s monotonic alignment.
Together these navigation papers illustrate how many questions are contained in the move from language to a route. The agent has to identify a relevant observation, handle unfamiliar surroundings, and track how much of the instruction it has carried out. Andreas and Klein make these questions interact within one search. The later titles put different parts of that interaction in the foreground, through visual input, environmental generalization, or progress estimation.
The speaker’s side and the structure of meaning
Unified Pragmatic Models for Generating and Following Instructions considers instruction generation alongside instruction following. This connects directly to the earlier paper’s discussion of the instruction giver. Andreas and Klein score actions and paths given a sequence of commands, and their conclusion raises the possibility of describing how beliefs about plans give rise to instructions. Treating production and interpretation together puts corresponding questions on each side. A follower considers which route a description could pick out, and a generator considers which description could guide a follower to the intended route.
Transforming Dependency Structures to Logical Forms addresses the passage from syntax to meaning through an explicit logical form. The common starting point is that dependencies can supply evidence about the relationships a semantic interpretation needs to represent. In Andreas and Klein, the dependencies guide a correspondence with the relations of a candidate action in context. In the later work’s stated task, a logical form is the destination of the transformation. That difference locates where each approach places the structured representation of meaning.
Representation Learning for Grounded Spatial Reasoning puts the representation needed for spatial reasoning at the center. The earlier paper illustrates why this matters when a phrase describes a side of a landmark or a hallway identified by perceptual properties. In its experiments, task-specific graph features give the alignment access to positions, actions, and relations. The later work names representation learning as the route to supporting grounded spatial reasoning. The shared question is which information about space an interpretation must preserve so that it can guide a decision.
Language as evidence for a search
A Survey of Reinforcement Learning Informed by Natural Language places instruction following in the broader study of how language can inform action learning and selection. Crossblock illustrates one form of that relationship. The puzzle rules establish legal moves, while a textual hint can give evidence about which legal paths are promising. The survey’s scope encompasses the more general use of language as information for reinforcement learning. Andreas and Klein’s experiment supplies a concrete example in which the effect of text on reproducing behavior can be evaluated separately from its effect on obtaining a successful outcome.
SPoC names a search-based approach to going from pseudocode to code. Its output is different from a route or puzzle solution, but the connection is structural. Language-like descriptions guide a search whose output must be assembled from compatible decisions. In Andreas and Klein, an attractive isolated move must fit the rest of the route and the environment’s possible transitions. In the task named by SPoC, the search is over code corresponding to pseudocode. The two problems illustrate why locally plausible interpretations can be assessed as parts of a larger structured output.
The earlier paper’s core question persists across these different settings. When a description gives only partial evidence about a structured outcome, interpretation depends both on what individual expressions can describe and on what candidates can form a feasible whole. The later work takes up different sides of that question through navigation, instruction generation, spatial representations, and search.
Cite
Cite as Jacob Andreas and Dan Klein. 2015. Alignment-Based Compositional Semantics for Instruction Following. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{andreas2015alignment,
title = {{Alignment-Based Compositional Semantics for Instruction Following}},
author = {Jacob Andreas and Dan Klein},
booktitle = {Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing},
year = {2015},
doi = {10.18653/v1/d15-1138},
url = {https://doi.org/10.18653/v1/d15-1138}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/andreas-2015-alignment-based-compositional-semantics-instruction/