Reinforcement Learning for Mapping Instructions to Actions
Paper · 2009 · S.R.K. Branavan, Harr Chen, Luke Zettlemoyer et al.
Summary
A troubleshooting guide can tell a reader which setting to change while leaving several steps implicit. To carry out the guide, a system has to identify the relevant controls, choose operations such as clicking or typing, and inspect what each operation makes available. People could annotate guides with the correct operations, their targets, and the words that describe them. The paper asks how much of that work can be replaced by having the system try actions and learn from their effects.
The authors use reinforcement learning. At each step, a policy assigns probabilities to candidate actions from the current sentence and the environment as it now stands. A candidate includes a command, its arguments, and the span of words it accounts for. A log-linear policy gives each candidate a score by adding weighted features, such as the resemblance between an instruction word and a menu label or the position of a segment on a puzzle grid. During training, the system samples actions, executes them in order, and uses the resulting reward to adjust the feature weights through policy gradient. The learner can observe transitions by acting, so it can train on a small sample of possible histories without estimating how the environment changes for every possible action.
The experiments use Windows 2000 troubleshooting articles and tutorials for the Crossblock puzzle. Windows supplies indirect feedback about whether the current interface has objects that match words in the instructions. In Crossblock, the program can check whether the board has been cleared. On the Windows test set, action accuracy rises from 0.647 with environment reward alone to 0.723 when 20 of the 70 training documents are annotated and to 0.756 with full supervision. The authors describe the environment-only result as within 11% of full supervision and the partially supervised result as within 4%. On Crossblock, the corresponding test action accuracies are 0.428, 0.575, and 0.632, with 10 of the 40 training tutorials annotated in the partial setting. The average number of action choices is 27.14 per step in Windows and 9.78 in Crossblock, and an early error can disrupt the rest of the sequence.
Two checks help establish that the policy learns something about the wording. In Crossblock, a variant trained without text features solves 34% of the puzzles. In Windows, the highest word alignment scores, 0.989 and 0.991, occur with partial and full supervision and apply to correctly analyzed test documents. The results show how feedback from interaction can reduce annotation effort when the outcome or an informative proxy can be checked. The authors made their code, data, and annotations available and ran the Windows experiments in VMware Workstation.
Deep dive: Reinforcement Learning for Mapping Instructions to Actions
The paper shows how reinforcement learning can turn written instructions into executable actions using feedback from software and puzzles. · about 40 minutes to read
The problem and its context
A written step can require several executable actions
An instruction is frequently written at the level of a human task. The program that carries it out works with the operations its environment supports. A person reading a reference to an option can work out that the option is inside a particular tab, that it appears in a tree of controls, and that changing it means clearing a checkbox. Each of those decisions has a counterpart in the executable sequence. In the paper's Windows example involving a temporary folder, the relevant operations include opening a tab, locating the option, and changing the checkbox. The reader can think of this as a single instruction even though the interface exposes several points of interaction.
A mapping therefore has to settle several questions together. It has to decide where an instruction about one action ends, which primitive operation it describes, and which available object that operation concerns. Text may supply arguments as well as object names. An instruction to enter text, for instance, calls for a target control and a string to enter. Other words may help make the sentence readable while describing no operation of their own. A mapping procedure has to move past those words so that it can reach the part that matters for the next action.
The interface also changes during interpretation. A menu item that is absent when the reader begins a step can become an available target after opening the menu. The meaning of a reference to that item can then be resolved against the new display. Conversely, heading into the wrong menu can leave no object that fits the next instruction. A system with a perfect vocabulary for menu names would still need to track what it had done and what it could now manipulate. The difficulty comes from connecting the language to an evolving situation.
The same issue appears in a compact form in Crossblock. The tutorial describes segments on a board with occupied and empty positions. A reference to a row or column has to be resolved to a particular location, and the next move has to be chosen on the board left by earlier moves. A sentence can contain several such descriptions, so even a game with a single substantive command requires the learner to work out which words go with each move. Where a Windows guide can vary both the operation and its target, the puzzle puts much of the burden on identifying the target and dividing the text into usable spans.
Why the authors look to the environment for supervision
A direct training method would show the system what to do at each step. For the paper's formulation, a complete example can identify the operation, its arguments, and the words associated with it. Producing that record requires someone to interpret the instructions at the same level of detail as the executor. A document written for human readers may already describe the task adequately, yet still require substantial work to turn it into a training example of that kind.
An environment can sometimes answer a narrower question cheaply. If the desired end state is recognizable, it can report whether the sequence reached it. If verification is difficult, the environment may still show whether the sequence is progressing through objects that fit the text. Such evidence is about the consequences of a proposed reading. It can be generated for attempts that no annotator has seen, and it can be obtained repeatedly as the system's choices change during training.
There is an important distinction between evaluating a sequence and supplying one. When a puzzle run leaves the board in a state from which it cannot be completed, that fact gives the learner a reason to reduce the probability of the choices that led there. It leaves open which choice caused the failure. A successful clear likewise supplies evidence in favor of the run while leaving open whether every move follows the tutorial's wording. The research question is whether feedback of this kind, coupled with a representation that connects words to actions, can guide learning towards the readings an annotator would choose.
Where this fits in earlier research
The paper situates the task in a long line of work on understanding instructions. It cites earlier studies of general natural language understanding and of purpose clauses in instructions. Its practical motivation is to carry out tasks described in existing documentation. The authors give software configuration and simulator operation as examples of applications where a system could take over work that otherwise falls to a person reading a manual.
The authors also relate their approach to grounded language acquisition, where the learner draws evidence about meaning from language in a setting. They describe studies that infer word meanings from visual material and work that links commentary to play in simulated soccer. In their account, much of this research learns from some form of parallel observations. Language and the events or perceptual material that accompany it provide evidence about which expressions tend to occur with which things. In the instruction problem, the learner also chooses what to try. Its choice changes the setting and determines which evidence it gets to observe.
Reinforcement learning already had an application in dialogue management. The paper describes dialogue systems that choose utterances while tracking information about what a user says and what the user's goal might be. Repeated interaction supplies feedback on the policy for running a conversation. In the instruction task, actions operate on software or on a game board, and the document supplies the language ahead of execution. An attempt can go forward without a person answering at each turn. The authors point out that this lowers the cost of interaction in one respect, while leaving the underlying environment to determine a potentially large space of states.
This difference shapes the choice of learning algorithm. The learner needs a way to reinforce useful behavior from the relatively few states it actually visits. It can exploit what it already knows how to observe, including available objects and the actions they accept. Its job is to acquire a policy for choosing among those actions as it works through an unfamiliar document. The paper treats executing actions and observing their effects as enough access to train the policy, provided the feedback is informative.
The method, step by step
Start with the document and its initial setting
The learner begins with a document and the environment prepared for that document. It reads the current sentence, looks at the available objects or moves, and constructs candidate choices. Each choice says what to do and which words of the current sentence the choice will consume. When a selected action is executed, the environment may change and the text advances by the chosen span. The next round starts with the updated information. A whole run gives the learner both an executable sequence and a record of how it divided the text across its decisions.
Consider the example represented in the paper's Windows figure. Several actions come from a single sentence. At each step the illustration identifies the words selected for that action and the words that have already been handled. The selected text can describe an immediate operation on one control while a later part of the sentence concerns something that operation exposes. This is why the system alternates between choosing and executing. Predicting the rest of the document from the original screen would deprive the policy of the changed set of available objects.
The paper writes the input document and the output sequence as follows.
d = (u₁, …, uℓ)
Here d is the document, each u with a subscript denotes a sentence made up of words, and ℓ denotes the number of sentences. The ellipsis stands for the intervening sentences in their document order. Parentheses group the entries into an ordered sequence.
a⃗ = (a₀, …, aₙ₋₁)
The arrow over a identifies the whole action sequence. An indexed a denotes an individual action, n is the length of the run, and n−1 labels its last action under the paper's indexing from 0. The output length can differ from the number of sentences because a sentence can account for several actions.
From a training document to a policy update
The steps in order.
Define what the learner chooses and remembers
In the paper, an action contains more information than the operation sent to the environment.
a = (c, R, W′)
Here a is a candidate action, c is the command, R holds the command's arguments, and W′ denotes the selected words. The prime distinguishes the words selected at this step from W, the words already assigned in the sentence. Arguments can refer to objects in the environment. Some can also refer to words in the document, as when a command requires text input. The command can be null, in which case the decision accounts for words without a substantive operation in the environment.
There are two kinds of state in the formulation. The environment state describes the objects the executor can interact with and their properties. The mapping state also records where the learner is in the instructions. This gives the policy access to the text still under consideration as well as the current interface or board.
s = (E, d, j, W)
Here s is the mapping state, E is the environment state, d is the document, j identifies the sentence being interpreted, and W is the set of words already assigned by earlier decisions for that sentence. A word enters W when a selected action accounts for it. When the sentence is fully accounted for, the procedure moves to the next sentence.
s₀ = (E_d, d, 0, ∅)
Here s₀ is the initial mapping state, E_d is the starting environment associated with document d, and 0 is the starting sentence index in the state representation. The symbol ∅ is the empty set and records that no words in the first sentence have been assigned yet.
The paper denotes the environment and mapping transitions separately.
p(E′ | E, c, R)
Here p denotes a probability distribution, the vertical bar means “given,” and E′ is the environment state reached from E after executing command c with arguments R. The learner can obtain an outcome by carrying out the command. The transition distribution is unknown to it in advance.
p(s′ | s, a)
Here s′ is the next mapping state, s is the current mapping state, and a is the selected action. The operation and its arguments determine the change to the environment, while the word assignment updates the progress through the document. In both experimental domains these transitions are deterministic. Given a particular state and action, the next state is fixed. The learner can still generate different runs for the same training document because it samples its actions.
At each step, the learner enumerates spans of unused words in the current sentence alongside the commands and arguments available in the current environment. Where an argument is a word or text input, the unused words restrict the choices for that argument as well. Because the candidate includes the chosen span, a particular click or puzzle move can enter the decision with more than one possible reading. Those candidates can be distinguished by their language features even when they have the same immediate effect on the environment.
Use features to score the candidates
The policy needs to compare candidates whose differences can be quite varied. A button may be more plausible because it has focus. A menu item may be plausible because its label resembles a word in the sentence. In a puzzle, a move may fit because the words in its span describe the direction and location of the segment. The policy represents these sources of evidence as features, values computed for a pairing of the current state and a candidate action.
Each feature has a weight. A positive weight raises the score when the corresponding feature has a positive value. A negative weight favors competing choices without that evidence, all else being equal. A candidate can have several active features, so a single lexical match need not decide which one wins. The policy adds the weighted features, exponentiates the scores, and normalizes them over the available candidates. This is what the authors mean by a log-linear policy.
p(a | s; θ) = exp(θ · φ(s, a)) / Σₐ′ exp(θ · φ(s, a′))
On the left, p(a | s; θ) is the policy's probability of action a at state s with weights θ. The semicolon inside the formula separates the policy parameters from the state. The feature vector φ(s, a) contains the values computed for that state and action, and the dot · is the dot product that adds their weighted contributions. The function exp is the exponential. The slash divides the candidate's exponentiated score by the sum Σ over all available actions a′, including a. The prime here indicates a candidate used in the sum. Each state has its own normalization because the available actions and their features can change.
During training, sampling from this distribution lets the learner try alternatives to the highest-scoring choice. The procedure can encounter a useful trajectory before its weights rank that trajectory's choices first. During evaluation, it uses the mode of the distribution, the most probable current action. The policy scores again after execution, so this decision rule operates one action at a time. Its output is the sequence produced as the environment and the mapping state change.
Turn a run into an objective
A training run gives the learner a history. It records the state before each action, the action itself, and the state reached at the end. Keeping the states is important because the same command can have different significance in different places in a document or different interface configurations.
h = (s₀, a₀, …, sₙ₋₁, aₙ₋₁, sₙ)
Here h is the history of interpreting a document, s with a subscript denotes a mapping state, and a with a subscript denotes an action. State s₀ comes before action a₀, the ellipsis stands for the intervening state and action entries, and sₙ comes after the last action aₙ₋₁. The symbol n again gives the number of actions.
The reward function assigns the history a real-valued score r(h). The paper allows immediate reward from individual steps as well as delayed reward that depends on what happened across the run. In a task where the only useful observation is a successful finish, a learner can carry out the whole sequence before it gets that part of the feedback. When feedback is available at each action, the paper gives the following special case.
r(h) = Σₜ r(sₜ, aₜ)
Here r(h) is the reward for history h, Σₜ adds contributions across the timesteps t, and r(sₜ, aₜ) is the immediate reward associated with acting from state sₜ using action aₜ. The history formulation also covers scores that depend on the sequence as a whole and are given directly for it.
The objective asks which policy weights give the learner the best reward on average. An occasional good run matters in proportion to how likely the policy is to produce it. The expected value is taken over histories for the given start, and training averages that objective over the collection of documents.
Vθ(s) = 𝔼ₚ₍ₕ₎ [r(h)]
Here Vθ(s) is the value of starting at state s with policy parameters θ. The expectation operator 𝔼 averages the reward r(h) over histories h. Its subscript p₍ₕ₎ denotes the history distribution p(h | θ) for that start state. In particular, the averaging includes runs that the current policy produces with low reward as well as those that lead to a good result.
A history is generated by two events at each step. The policy chooses an action, and the environment together with the text bookkeeping produces the next state. The probability of that complete sequence has the following factorization.
p(h | θ) = ∏ₜ₌₀ⁿ⁻¹ p(aₜ | sₜ; θ) p(sₜ₊₁ | sₜ, aₜ)
On the left, p(h | θ) is the probability of history h under weights θ from the given start. The product operator ∏ multiplies factors for timesteps t from 0 through n−1, where n is the number of actions. The first factor at each step is the probability that the policy chooses aₜ from sₜ. The second is the probability of arriving at sₜ₊₁ once aₜ has been taken from sₜ. In the experiments the second factor describes a deterministic transition, but the factorization lets the authors express the method with a general transition distribution.
Estimate an update from what happened
A policy gradient says in which direction the weights would need to move to increase expected reward. It is useful here because the probabilities of the learner's own choices depend explicitly on the weights. The probabilities of the observed state transitions, considered at fixed states and actions, have no explicit dependence on them. In the derivative, the policy therefore needs to account for how it chose the actions that led to a history. It can obtain the intervening states by executing those actions.
∂Vθ(s)/∂θ = 𝔼ₚ₍ₕ₎ [r(h) Σₜ ∂log p(aₜ | sₜ; θ)/∂θ]
Here ∂/∂θ denotes differentiation with respect to the vector of weights θ, so the left side is the gradient of the value Vθ(s). The subscript on 𝔼 again means that the expectation uses p(h | θ) for the given start. Inside the expectation, the reward r(h) scales the sum Σₜ over steps t in history h. The function log is the logarithm. Its argument p(aₜ | sₜ; θ) is the probability the policy assigned to the action actually taken at step t. The derivative of this log probability measures how the weights would change the relative preference for that action.
The derivative at each visited state has a form that can be calculated from the same candidate scores used to choose an action.
∂log p(a | s; θ)/∂θ = φ(s, a) − Σₐ′ φ(s, a′) p(a′ | s; θ)
Here the left-hand side is the gradient with respect to θ of the log probability for action a at state s. The vector φ(s, a) describes the selected action. The sum Σₐ′ ranges over all available candidates a′. It weights each feature vector φ(s, a′) by the policy probability p(a′ | s; θ). The minus sign subtracts this probability-weighted average from the features of the selected action.
The subtraction matters because the policy expresses a preference among alternatives. Suppose a feature indicates that an object is in the foreground. If all candidates have the same value for it, that value appears equally in the selected vector and the policy's average. The feature contributes nothing to the preference among them at that step. If the chosen action has a value that differs from the average, the difference supplies a direction for the update. A good reward can strengthen the features that distinguished the choice. An unfavorable reward can push the weights in the opposite direction.
It is feasible to sum over the candidate actions at a visited state. Summing over all complete histories would require considering the states reached by all branches and the branches that follow those. The paper uses stochastic gradient ascent, which estimates a direction of improvement by sampling. A history sampled from the current policy supplies the states, chosen actions, and reward needed for one such estimate. The authors note that a single history can suffice for an update in practice.
In the training algorithm, the weights start at small random values. The learner makes T passes over the training set D, where T is the specified number of iterations and D is the collection of training documents. For a document, the learner samples and executes actions until it has a history. It then forms the following quantity.
Δ ← Σₜ [φ(sₜ, aₜ) − Σₐ′ φ(sₜ, a′) p(a′ | sₜ; θ)]
Here Δ is the vector of feature differences for the sampled history, and ← assigns the expression on its right to the quantity on its left. The outer sum ranges over the steps t. At each step the first term uses the features of the sampled action aₜ at state sₜ. The inner sum, indexed by a′, takes the expected features of all available actions at that state under the current policy with parameters θ. The brackets group the two terms that produce the difference for that step.
θ ← θ + r(h) Δ
Here the arrow updates the weight vector θ. The expression adds the product of the observed history reward r(h) and the vector Δ to the old weights. The reward sets the direction and scale of this sample's contribution. Because the same outcome can affect choices throughout the history, the update reflects a productive or unproductive run without identifying an individual decision as its cause.
The objective depends on how sequences of choices lead into one another. The authors describe it as non-convex and give a local guarantee for policy gradient. The practical attraction is that the cost of the update comes from the histories actually explored and the candidate sets they encounter. The learner can change its behavior in a large environment without building a table of how every possible interaction turns out.
Get more training evidence from a run
The authors propose two ways to reuse interaction when it is costly. A complete history contains suffixes starting at later observed states. If the environment supplies reward for those portions as a side effect of the run, the learner can use the corresponding feature differences to update the weights from the suffixes. The actions and states needed for these updates have already been observed. This makes the start of a useful suffix another place from which to learn how the policy behaves.
They also consider alternative histories that pair the same commands and arguments with different spans of words. This variation matters because an environment can respond identically to two mappings that take different views of where one action description ends and the next begins. A recorded run can supply evidence about those alternatives without requiring the commands to be executed again. The proposed weighting uses a probability ratio.
p(h′ | θ) / p(h | θ)
Here h′ is the alternative history with changed word spans, h is the sampled history, and θ is the current vector of policy weights. The numerator is the policy's probability of the alternative history from the given start, and the denominator is the probability of the sampled history. The ratio expresses their relative likelihood for weighting an update. Even with the same external operations, the different spans can lead to different mapping states and probabilities.
Use the same objective with or without annotations
When the authors have a complete annotation and the transitions are deterministic, they can reward a history for matching the annotation. The reward is one for the annotated history and zero for every other history. In that case, the expected reward for the document reduces to the probability assigned to the annotation. The paper connects this objective to maximum likelihood, the practice of fitting the parameters to give higher probability to observed training outputs.
𝔼ₚ₍ₕ₎ [r(h)] = Σₕ r(h) p(h | θ) = p(h_d | θ)
Here 𝔼 is the expectation over the history distribution, and Σₕ is a sum over possible histories h for document d. Each history's contribution is its reward r(h) times its probability p(h | θ) under the weights θ. The symbol h_d denotes the annotated history for that document. Because it is the only history with a non-zero reward, the expectation is its probability. For this per-document objective, increasing that probability has the same desired direction as increasing its log. The equation itself gives the probability.
An unannotated document can instead contribute a score derived from the environment. The training loop uses the same document representation, policy, and form of update. Partial supervision simply makes the source of reward depend on the training document. An annotated document can favor the recorded sequence directly, while an unannotated one can encourage behavior that leads to favorable feedback. The tradeoff depends on how much the environment score tells the learner about the sequence that the document actually describes.
Choose features and feedback for each environment
In Windows, the operation set includes left-click, right-click, double-click, and typing into a control. The target is a user interface object, with a further text argument for typing. The available objects carry properties such as their displayed labels, their location, and the window they belong to. The authors use properties of candidates including whether the target is visible, has focus, or is in the foreground. Other features ask whether the object has been used already or has appeared since the last action. Those observations can distinguish a control newly exposed by a preceding operation from one that has been present for longer.
Part of the Windows feature inventory connects the instruction to these choices. There are features for words paired with commands and for commands paired with object classes such as buttons. The system also measures edit distance between words and object labels. Edit distance expresses how much text must change to turn one spelling into another, so a close match can carry evidence even when the strings differ. The paper gives this similarity feature a real-valued representation and lists the other example features as binary indicators. The complete Windows inventory contains 4,438 features.
Verifying the eventual effect of an arbitrary support article would itself be an engineering problem. The Windows reward instead asks whether a sentence has at least one sufficiently close word match to an object in the current environment. The check uses an edit distance threshold. A missing match is taken as a sign that an earlier sentence may have led the executor to the wrong place, and the history receives -1. An available match gives the procedure a reason to keep considering the run, although a chance correspondence can also pass the check.
For a passing history, each percentage-point increase in the share of words assigned to non-null commands adds a fixed amount to the positive score, and each emitted action subtracts a fixed amount. The first term encourages the learner to find operational content in the instructions. The second discourages it from creating extra operations simply to account for more words. The two preferences are part of the reward used to steer learning. Correctness at test time is checked separately against annotated actions.
Crossblock uses a grid with some positions occupied. A legal line segment removes a prescribed number of squares, and that number depends on the puzzle. The goal is to clear the board. The substantive command is clear, and its argument identifies where to apply a horizontal or vertical segment. A phrase describing squares near the bottom of a column gives both an orientation and a spatial constraint. The learner has to combine those clues with the legal choices in the current grid.
Crossblock's features are binary. Some indicate which vocabulary word comes last in a proposed span, giving the policy evidence about where action descriptions tend to end. Others pair words with action properties, including orientation and the grid positions the move would clear. A feature that connects the word “row” to a horizontal move provides a direct way for reward to strengthen that correspondence when it occurs in useful histories. The domain has 8,094 features.
In Crossblock the learner can verify completion directly. A history that ends with the puzzle impossible to finish receives -1. When the puzzle is solved, the reward is positive and proportional to the percentage of words mapped to non-null commands. A successful run therefore supplies evidence from the board and still gives the policy an incentive to account for the tutorial's language. The two parts of the signal address different questions. Board clearance says whether the game goal was reached, and word coverage favors analyses that assign more of the instruction to substantive moves.
Experiments and results
Documents, tutorials, and execution settings
The Windows corpus consists of 128 troubleshooting documents. The split allocates 70 to training, 18 to development, and 40 to testing. The corpus contains 5562 words and has a vocabulary of 610. Its sentences average 9.93 words, and its documents average 4.38 sentences and 10.37 actions. These figures describe guides in which interpretation has to continue across several sentences and where a sentence can contribute several actions.
The Crossblock corpus contains 50 tutorials, with 40 for training and 10 for testing in each split. There is no separate development set. The authors report averages across five training and test splits because the available collection is limited. The corpus contains 994 words and has a vocabulary of 46. The average sentence length is 19.88 words. Documents average 1.00 sentences and 5.86 actions. A single puzzle sentence thus carries a series of move descriptions, which helps explain the attention the features give to segment boundaries.
The Windows implementation uses the Win32 application programming interface to gather information about controls and simulate the interactions a user would make. Windows 2000 runs inside a virtual machine, where snapshots let the experiment save and restore system state. This supports repeated attempts to interpret documents from their starting conditions. In Crossblock, the authors replicate the game in a form that lets the learner play automatically. Both setups give the training procedure a way to observe the effects of its choices and repeat runs.
The authors use a softmax temperature of 0.1 in the experiments. Temperature is a setting that changes how strongly differences between scores affect the spread of policy probabilities. In Windows, the development set determines the parameter setting used for test prediction. For Crossblock, the authors choose parameters by the reward obtained during training. The test documents then evaluate the mappings produced with those choices. The Crossblock figures should be read as averages under that procedure, while the Windows figures come from the held-out Windows test set.
What the evaluation counts
The evaluation compares the executed sequence to a manually constructed reference. An action is correct when its command and arguments match the annotation. This permits a check of operational correctness independently of whether the learner chose the same phrase boundary as the annotator. To get a sentence right, the system must identify all actions for it. To get a document right, it must identify the complete sequence for that document. Crossblock documents consist of a single sentence, so sentence and document scores coincide there.
These measures ask different questions of a policy. Action accuracy reflects agreement at the level of individual decisions. Sentence and document accuracy demand consistency through a longer stretch of interpretation. An incorrect action changes what is available for subsequent decisions, so failures within a document can be related. The paper also points out that documents differ in length. A score that gives each document one result weights the corpus differently from a score that counts individual actions. The document proportion can consequently exceed the action proportion.
The paper reports word alignment separately. Among correctly analyzed documents, it measures the proportion of words paired with their annotated actions. This conditional calculation makes it possible to examine the assignment of words once the correct sequence has been produced. It leaves open how well words are assigned on failed runs and gives no word alignment score for the random or majority baselines. The authors use the sign test to assess statistical significance in the performance comparisons.
What the systems are compared against
The Windows random and majority baselines both make use of names in the instructions. Each scans the sentence from left to right and finds the first name matching an environment object. It acts on that object, continuing as long as it encounters more such matches. The random baseline chooses the command randomly. The majority baseline always uses left-click, the most frequent command. These baselines test how far name matching can take the execution when the command rule is simple.
The Crossblock random baseline chooses among moves that are valid on the current grid. A random move therefore respects the game's immediate constraints and may lead to a clear board. The authors do not define a majority baseline for the puzzle because a move selects a particular object of interaction, and there is no natural majority choice among those targets. This comparison concerns what is gained over legal play without a learned preference for the actions described in the tutorial.
The trained settings differ in the source of reward. Environment reward uses the interface or game feedback for all training examples. Partial supervision uses annotations where available and retains environmental feedback for the rest. Full supervision uses manually annotated training sequences. The last condition estimates how the same general action prediction approach fares with complete annotations. It gives a comparison for the annotation savings claimed by the paper, while leaving any capacity limits of the representation or policy in place.
Windows test results
Windows troubleshooting test action accuracy by training condition and baseline
Full supervision leads, and partial supervision improves on environment reward alone.
The numbers
| System or setting | proportion of correct actions |
|---|---|
| Random baseline | 0.128 |
| Majority baseline | 0.287 |
| Environment reward | 0.647 |
| Partial supervision | 0.723 |
| Full supervision (this paper) | 0.756 |
The majority baseline's action accuracy of 0.287 shows that naming objects and relying on left-click can recover some of the annotated steps. Its sentence accuracy is 0.197, and its document accuracy is 0.100. The random-command baseline gets 0.128 of the actions and 0.101 of the sentences right, with document accuracy of 0.000. The comparison shows the benefit of even a simple command preference alongside object names, and the gap between that preference and a learned policy conditioned on the state and language.
With environment reward alone, the policy achieves Windows test sentence accuracy of 0.590 and document accuracy of 0.375, alongside its action accuracy of 0.647. This system has received no annotated action sequences for training. Its reward depends on whether words can be matched to interface objects as the guide progresses, together with the preferences for word coverage and economical execution. Its test scores make it possible to judge that signal against actions and sequences a person recorded separately.
Partial supervision uses 20 annotated documents out of 70 in Windows training. With the remaining documents still contributing environment reward, test sentence accuracy reaches 0.702 and document accuracy reaches 0.475. Full supervision produces 0.714 sentence accuracy and 0.525 document accuracy. The partially supervised sentence result is close to the fully supervised result, while the complete-document results still show a difference. The latter measure requires the system to preserve the reference mapping through the changing interface until the guide ends.
The paper marks the environment-reward improvements over the majority baseline on Windows actions, sentences, and documents at p < 0.01. The move from environment reward to partial supervision is marked at p < 0.05 for action accuracy and at p < 0.01 for sentence accuracy. The increase from partial to full supervision is marked at p < 0.05 for action accuracy. The table gives no significance marker for the successive Windows document increases after environment reward or for the final sentence increase with full supervision.
Crossblock test results
Crossblock test action accuracy by training condition and baseline
Puzzle feedback improves on legal random play, and annotated training sequences raise accuracy further.
The numbers
| System or setting | proportion of correct actions |
|---|---|
| Random baseline | 0.081 |
| Environment reward | 0.428 |
| Partial supervision | 0.575 |
| Full supervision (this paper) | 0.632 |
The Crossblock baseline has action accuracy of 0.081 and document accuracy of 0.111. Choosing a legal move keeps a run inside the game's rules, but there are many legal choices that differ from the tutorial. The environment-reward policy raises those figures to 0.428 and 0.453. The score for a completed puzzle helps guide the learner toward useful moves, and the action comparison shows that the policy often selects moves that also agree with the annotated tutorial.
The partial setting uses annotations for 10 of the 40 training tutorials in a split. It achieves 0.575 action accuracy and 0.523 document accuracy. Full supervision gives 0.632 action accuracy and 0.630 document accuracy. Because the document contains only one sentence in this corpus, the document figures also give sentence accuracy. The environment-only result remains below the fully supervised result even though completion can be checked directly. Achieving a game objective and reproducing an instructional sequence are different demands on the same run.
The paper marks the environment-reward improvements over random play at p < 0.01 for both puzzle action and document accuracy. The document increase from environment reward to partial supervision is also marked at p < 0.01. The table gives no significance marks for the successive puzzle action increases after the environment-only setting, or for the final document increase under full supervision. The reported proportions still describe how the settings were ordered on the test splits.
Why errors can carry forward
The authors report an average of 27.14 action choices per step in Windows and 9.78 in Crossblock. Those averages illustrate the number of alternatives the policy faces during execution. In Windows, a wrong choice can leave the wrong window active or expose a different set of controls. In Crossblock, removing a segment changes which future segments remain. A later decision will then be made from the state brought about by the error. Training samples and test runs both operate under that dependence.
A high score on one step can therefore matter for several later steps. At the same time, document accuracy requires a complete exact sequence, so an error remains visible at document level even if the executor subsequently takes useful actions. These two effects explain why the authors report performance at several units. The results describe both the policy's ability to identify the intended operation when it acts and its ability to sustain a correct reading through an entire instruction sequence.
What the ablations show
Removing language from puzzle play
Crossblock permits a direct check on whether the policy benefits from the instruction. Every puzzle has the same kind of goal, a cleared board. A learner can try to reach that goal from the grid and the feedback even when it has no features derived from the tutorial. The authors train such a variant and report that it solves 34% of the puzzles.
The result shows that the environment carries information that can support some successful play by itself. Legal moves, board structure, and feedback on their outcomes give the learner a basis for preferring certain choices. The authors interpret the text-free result as evidence that instruction features improve performance. In the full setting, words can tell the system where to look and which orientation to favor, narrowing the possibilities it has to resolve from the board. The reported 34% is a puzzle-solving figure. The test table evaluates agreement with annotated moves and documents, so a comparison with the table should preserve that difference in what is counted.
The ablation works particularly well as a question in Crossblock because the board supplies a common terminal criterion. A Windows document can specify a different objective from the next document, and the authors lack a direct check of arbitrary troubleshooting success. Setting the language aside would therefore change what can be determined about the intended task. The paper reports the text-feature removal in the domain where the goal remains available from the game.
Checking which words support a correct run
Word alignment offers a complementary analysis. In the successful Windows test documents, the environment-only policy has a word alignment score of 0.819. It rises to 0.989 under partial supervision and 0.991 under full supervision. These are proportions of correct word assignments within documents that were already evaluated as correctly analyzed. In that subset, the best annotated settings recover almost all of the recorded connections between words and actions.
On correctly analyzed Crossblock test documents, the corresponding alignment scores are 0.686 with environment reward, 0.850 with partial supervision, and 0.869 with full supervision. Even with a correct move sequence, a puzzle tutorial can allow competing segmentations that have identical consequences on the grid. The alignment diagnostic makes such differences visible by comparing the word assignments to the reference. An environment-only reward can favor word coverage while leaving the exact boundary between two move descriptions uncertain.
Taken together, removal of the text features and inspection of alignments address different aspects of language use. The removal experiment asks how far the puzzle learner gets with the board alone. The alignment analysis asks whether the phrases selected in successful runs agree with the phrases a person associates with the same actions. An improvement in puzzle solving can come from exploiting only part of the instruction. A high alignment score on correctly analyzed documents provides more direct evidence about the reading used in those cases, while its conditioning limits the scope of that evidence.
Measuring what unannotated documents add
The annotation experiment varies how many training documents come with labeled sequences. At each amount of annotation shown, the authors compare training on those labeled examples alone with training that also makes use of environment reward from the remaining unannotated documents. The figure reports a consistent improvement when those additional documents contribute feedback. Its comparison keeps the annotation effort fixed at each point while changing how much of the available data the learner can use.
That comparison provides evidence beyond the difference between full and partial supervision. The partially supervised totals could otherwise leave open whether the annotated examples produced most of the useful behavior by themselves. The comparison in the figure gives the labeled examples their own condition. When the other training documents also supply reward, the learner gets additional evidence about which outputs fit the environment and can reuse feature weights learned across examples.
The study evaluates the reward designs as packages. For example, the Windows signal combines the sentence-to-object match with word coverage and a penalty for more actions. The experiments establish that the combined signal can help, and the text-removal experiment evaluates access to language as a whole in the puzzle. They leave the contribution of each individual feature or reward term unresolved.
Limitations
Limits the authors identify
The authors emphasize that directly checking whether a Windows support task succeeded is hard. Their reward detects signs that a sequence can proceed in a plausible interface state. An unrelated control may have a label close to a word in the current sentence, allowing an incorrect history to pass. The positive score also favors assigning words to operations while keeping the sequence short. Each is a useful training preference, while the gold annotations remain the source of evidence about whether the retrieved action sequence is the intended one.
The authors also identify the size of the search implicit in the task. A single visited state may have many candidate actions, and the learner pays for its mistakes through the states those actions produce. Sampling histories avoids evaluating the entire search space, but it still requires enough useful exploration for reward to shape the policy. The paper explicitly treats the objective as non-convex. Its account of the optimization therefore gives a local guarantee and uses experiments to establish the quality of the policies found in practice.
The experimental design also reflects the size of the puzzle collection. The authors repeatedly split the 50 tutorials into training and test sets and omit a separate development set for Crossblock. They choose parameters using training reward in that domain. Windows uses a development split for this purpose. The two results are consequently evidence from their respective selection procedures, with limited data especially for the puzzle comparison.
Limits visible in the setup
The Windows and Crossblock experiments begin with environments prepared for their respective documents, and both expose usable state information. Windows provides objects and properties through a programmatic interface. Crossblock provides the grid and legal moves through an implementation suitable for automatic play. The learner still has to connect words to those operations, but the study presumes an executor that can already inspect the objects, enumerate appropriate actions, and carry them out. It leaves acquisition of that interface outside the learning problem.
The formulation describes probabilistic transitions, while the tested environments have deterministic ones. From a fixed state, carrying out a given action produces a fixed outcome in the experiments. This helps make a manually annotated action sequence define a particular history from the starting state. In an environment where the same command sometimes leads to different states, identical attempts could receive different feedback and require different continuations. The formal presentation accommodates sampled transitions, but the performance of the approach under that extra variability remains unmeasured here.
The text search space is structured in advance. Candidate spans come from unused words in the current sentence, and the operation inventory defines what the system can do. This gives the learner tractable alternatives and a way to make progress through a document. It also bounds the linguistic claim. The paper measures the ability to produce sequences in these representations, with access to features designed for the interface or game. The experiments leave open how well the same procedure would handle actions outside the available inventory or instructions whose interpretation requires revising earlier span assignments.
For Crossblock, successful completion is an exact measurement of the game goal. It remains an indirect measurement of tutorial interpretation. Clearing the board along a different route can be a legitimate solution to the puzzle even when the action sequence differs from the annotation. Word coverage can encourage the executor to use the text, but the score does not itself verify that a particular phrase was attached to its intended move. The agreement scores and alignment analysis remain necessary for assessing the language side of the task.
The converse issue matters in Windows. An exact sequence comparison can count a departure from the reference even if it has a useful effect. The reported evaluation therefore tells the reader how well the policy reproduces the manually constructed sequence. The authors' own discussion of how hard it is to verify Windows task completion explains why the experiment cannot also settle the eventual practical consequences of every departure. Likewise, the alignment results apply only to correct documents. Near-perfect alignment within that subset leaves the system's handling of language across unsuccessful documents uncertain.
Finally, the paper demonstrates reuse of a learning procedure across domains with distinct features and reward functions. Windows uses properties of controls and an indirect progress check. Crossblock uses geometric features and a verifiable puzzle outcome. The study trains and evaluates the systems within their domains. It leaves open whether weights learned for one environment or instruction collection would carry over to a different one, and how much engineering would be needed to supply equally useful feedback and features there.
What came after
Learning meanings from actions and outcomes
The paper's later citations span several kinds of instruction learning. Some retain the aim of acting on instructions. Others apply related supervision questions to programs, recipes, or interactions in which the meanings themselves have to be learned. The connections are clearest when one asks what the system is expected to produce and where evidence for that output can come from.
Weakly Supervised Learning of Semantic Parsers keeps instruction-to-action mapping as the application and puts semantic parsing at the center. A semantic parser assigns a structured meaning to an utterance. In the earlier paper, the learned choice couples a word span directly to an executable command and its arguments. The later work's emphasis on semantic parsers directs attention to the representation of an instruction's meaning under weak supervision. Both ask how to acquire an interpretation in a setting where supplying the complete mapping by hand is costly.
Environment-Driven Lexicon Induction treats a lexicon for high-level instructions as something the learner must acquire with help from the environment. The earlier action policy already learns weights for associations such as an instruction word paired with a command or the orientation of a move. The later work makes the acquisition of vocabulary for interpreting instructions the focus. The shared issue is how observations outside the document can help determine which meanings to assign to words that refer to action.
Mapping Instructions and Visual Observations to Actions combines instructions with visual observations and uses reinforcement learning for action selection. The earlier paper likewise makes the action depend on the current setting, using properties of Windows controls or the current puzzle grid. The later work places visual observation at that junction between what the instruction says and what action is appropriate. The state information supplied to the learner is part of the problem in its own right.
Learning Language Games through Interaction takes interaction as the setting for acquiring a language game. The earlier work starts with a written guide and obtains feedback by operating on the world it describes. A language game brings the acquisition of the conventions governing the interaction itself into view. This connects to the earlier interest in actively gathering evidence about meaning, with different roles for the language and the actions through which it is learned.
Executable interpretations beyond troubleshooting guides
Language to Code for If-This-Then-That Recipes applies semantic parsing to recipes expressed as conditions and actions. In Windows, the interpretation is worked out incrementally as the system executes an ordered procedure. For an if-this-then-that recipe, a central part of the interpretation is the relation between the condition and the action it calls for. The later work takes the broader problem of translating natural language into executable behavior into a setting where that relation is part of the output.
From Language to Programs addresses the relationship between reinforcement learning and maximum marginal likelihood in learning to map language to programs. The earlier paper also considers the relationship between a reward objective and likelihood. For a document with a unique annotated history, the expected reward becomes the probability of that history. Program interpretation brings into focus the possibility of several candidates relevant to the same supervision signal. The later work's stated bridge between objectives develops the question of how to assign credit across such executable interpretations.
From Natural Language Specifications to Program Input Parsers takes a natural language specification as the source for producing a program input parser. The intended artifact is a parser rather than the operations needed to carry out a troubleshooting document. It still shares the problem of recovering executable detail from text written for people. The connection is in turning the constraints expressed in a specification into behavior that software can realize.
Mise en Place studies the unsupervised interpretation of instructional recipes. Recipes belong to the same broad family of procedural texts as tutorials, with later steps interpreted in light of earlier ones. The later work's focus on recipe interpretation shifts the setting of instruction understanding while retaining the question of how to learn without a fully annotated account of each procedure. The citing work puts the interpretation of the procedure itself at the center.
From desktop controls to other interactive environments
Mapping Natural Language Instructions to Mobile UI Action Sequences carries the instruction-to-interface problem into mobile software. Its stated output, a sequence of interface actions, is close to the Windows task. Both settings make the current user interface relevant to interpreting the next instruction. The mobile work extends the application question to a different class of interfaces while retaining the need for decisions that can be carried out as a sequence.
WebArena focuses on a realistic web environment for building autonomous agents. The Windows experiment shows the role an executable environment can play in studying instruction following. It makes actions have consequences and gives the learner observations at subsequent steps. WebArena makes the environment itself the central contribution in the web setting, where the actions of an agent can likewise be considered in relation to the state it encounters and changes.
Autonomous Evaluation and Refinement of Digital Agents focuses on having evaluation inform the refinement of digital agents. The earlier study already uses an evaluation loop during learning, with the result of an attempt feeding back into future action choice. The later work puts the autonomy of evaluation and refinement in the foreground. Its connection is to the role of outcome evidence in improving behavior as well as measuring it.
Improving Natural Language Interaction with Robots Using Advice takes advice as a route to improving interaction with robots. In the troubleshooting and puzzle study, the text specifies a procedure whose interpretation is scored through another channel. Advice gives language a different role in an interactive system, where it can provide guidance for improvement. Together the settings illustrate how the source of the instruction and the source of corrective evidence shape what the learner can acquire.
Interpreting instructions in context
Parsing entire discourses as very long strings emphasizes topic continuity in grounded language learning. The earlier method carries the changing environment across sentence boundaries while selecting words within the current sentence. The later work highlights continuity across the language itself. A whole discourse can supply context that is available only when its sentences are interpreted in relation to one another.
Unified Pragmatic Models for Generating and Following Instructions brings instruction generation and instruction following into the same study. The earlier system takes the guide as given and asks which actions its words support. A pragmatic approach can also consider why a speaker might have chosen those words for a listener in that setting. Adding generation makes the production of a description part of the account of how it can be followed.
Pragmatics in Language Grounding treats the broader set of phenomena and tasks arising when meaning depends on use in a situation. The Windows and Crossblock examples supply a concrete instance of that dependence. The same words can pick out different operations as the available controls or board positions change, and an instruction can leave details implicit for its reader to resolve. The later work's wider scope places these questions alongside other ways in which context matters for grounded language.
Cite
Cite as S.R.K. Branavan, Harr Chen, Luke Zettlemoyer and Regina Barzilay. 2009. Reinforcement Learning for Mapping Instructions to Actions. Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP.
@inproceedings{branavan2009reinforcement,
title = {{Reinforcement Learning for Mapping Instructions to Actions}},
author = {S.R.K. Branavan, Harr Chen, Luke Zettlemoyer and Regina Barzilay},
booktitle = {Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP},
year = {2009},
doi = {10.3115/1687878.1687892},
url = {https://doi.org/10.3115/1687878.1687892}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/branavan-2009-reinforcement-learning-mapping-instructions-actions/