Title: ROBUST INSTRUCTION-FOLLOWING IN A SITUATED AGENT VIA TRANSFER-LEARNING FROM TEXT

Abstract: Recent work has described neural-network-based agents that are trained to execute language-like commands in simulated worlds, as a step towards an intelligent agent or robot that can be instructed by human users. However, the instructions that such agents are trained to follow are typically generated from templates (by an environment simulator), and do not reflect the varied or ambiguous expressions used by real people. We address this issue by integrating language encoders that are pretrained on large text corpora into a situated, instruction-following agent. In a procedurally-randomized first-person 3D world, we first train agents to follow synthetic instructions requiring the identification, manipulation and relative positioning of visually-realistic object models. We then show how these abilities can transfer to a context where humans provide instructions in natural language, but only when agents are endowed with language encoding components that were pretrained on text-data. We explore techniques for integrating text-trained and environment-trained components into an agent, observing clear advantages for the fully-contextual phrase representations computed by the well-known BERT model, and additional gains by integrating a self-attention operation optimized to adapt BERT's representations for the agent's tasks and environment. These results bridge the gap between two successful strands of recent AI research: agent-centric behavior optimization and text-based representation learning.

1. INTRODUCTION:

Developing machines that can follow natural human commands, particularly those pertaining to an environment shared by both machine and human, is a long-standing and elusive goal of AI (Winograd, 1972) . Recent work has applied end-to-end, representation-learning-based methods to this challenge, where a neural-network-based agent is optimized to process language input, perceive its surroundings and execute appropriate movements jointly (Oh et al., 2017; Hermann et al., 2017; Chaplot et al., 2018) . End-to-end learning promises a way to deal flexibly with the complexity of the physical, visual and linguistic world without relying on (potentially brittle) hand-crafted features, rules or policies. Nevertheless, the cost of this flexibility is the large number of environment interactions (samples) required for a randomly-initialized network to learn behaviour policies from raw experience. To make the approach feasible, many studies thus employ a synthetic language that is generated on demand from templates by the environment simulator (Chevalier-Boisvert et al., 2018; Jiang et al., 2019; Yu et al., 2018b; a) . The studies that do combine both end-to-end learning with natural-language data do so in less realistic grid-like environments (Misra et al., 2017) or grant agents access to privileged global observations to make learning more tractable (Misra et al., 2018) .

Here, we take a different learning-based approach to instruction-following that is robust to human commands. We train agent policies to respond to synthetic, template-based language but also endow them with powerful language encoders that are pretrained on natural language text. The synthetic instructions that our agents are trained to follow require mastery of 26 fine-grained motor actions in order to identify and manipulate visually-realistic models from the ShapeNet dataset (Chang et al., 2015) in a 3D room. The visual realism of the world makes it possible to elicit diverse natural human ways of instructing and/or referring to things, and to study the agents' robustness to this diversity. Unsurprisingly, we find that agents that are trained on template-based commands do not cope well with the diversity and variation of natural keyboard-typed language. In contrast, when powerful Figure 1 : An episode of the putting task, seen from above (left) and from the agent's perspective (right). In each episode of training or evaluation, there are three randomly-coloured moveable objects, plus a pink bed and a white tray. Initial positions of all objects, doors, windows and the agent are random. To succeed in an evaluation trial, the agent must process an instruction given by a human (e.g. "Put the musical keyboard on the bed", or "Drop A Casio on the bed"), identify the intended object of reference, move towards it and lift it, rotating if necessary, and then lower it into the specified location. Our best-performing agent succeeds at this evaluation with 72% accuracy. Table 1 : Recent work on instruction-following in 3D environments (not exhaustive). By transferlearning from simulation, our best-performing agents overcome unique combination of policyoptimization challenges (partial observability, memory, raw perception, object manipulation and relations) and can also interpret natural human commands. pretrained language encoders are integrated into our agent, we find that agents can satisfy human instructions with substantially above-chance accuracy.

To better analyze the generalization that supports this robustness, we probe trained agents with specific modifications to their training instructions. We find that methods based on conventional (context-free) word embeddings support generalization that is driven by lexical similarity (executing lift a vehicle when trained to lift a car), but capture phrasal equivalence less well (failing at put a plate on the container when trained to put the dish on the tray). In contrast, methods that integrate contextual word representations support both types of generalization. We also find that robustness to synonyms can often be improved when pretrained encoders are combined with an additional (cross-modal) self-attention tuned to the agent's environmental objectives. Ablation experiments highlight the role that WordPiece tokenization (Schuster & Nakajima, 2012) plays in robustness to human instructions. This motivates the addition of typo noise to our training pipeline, which further improves the accuracy of the agent's responses.

Overall, our principal contributions are the following:

• We train an agent that can both interpret human language commands and overcome a similar range of behavioural and environmental challenges to state-of-the-art policy-learning approaches (Table 1 ).

• We develop the techniques of transfer-learning from a text representation-learning model to an embodied agent. Note that this is very different from transfer between language classification tasks (Collobert & Weston, 2008; Devlin et al., 2018) ; in our evaluations the agent must interpret unfamiliar instructions zero-shot (i.e. without additional learning steps), and must realize complex language-conditional behaviours (decoding ≈ 50 appropriate actions) in spite of this uncertainty.

1.1. HIGH-LEVEL APPROACH:

We experiment in a simulated room in the Unity1 game engine (Fig 1 ). Importantly, the realism of the visual assets in this room enable human observers to recognize the objects (and hence refer to them in natural ways). Our experimental pipeline then involves the following steps:

1. Define a (language-dependent) task, including initial conditions for the simulated room, a template-based process for generating synthetic language instructions and a reward function for checking game states and exposing reward if the agent succeeds. 2. Train agents with different language encoders to solve the task when conditioned on the synthetic language produced by the environment generator. 3. Evaluate the trained agent on 1000 episodes of the task with the synthetic instructions replaced with synonyms or free-form commands typed by human annotators.

2. ARCHITECTURES FOR INSTRUCTION-FOLLOWING AGENTS:

Since the object of our study is instruction-following, we consider an agent architecture that is as conventional as possible in aspects not related to language processing. It consists of standard components for computing visual representations of pixels, embedding text strings and predicting actions contingent on these and memory of past inputs.2 

Visual processing The visual observations received by the agent at each timestep are 96 × 72 × 3 real-valued tensors, which are processed by a 3-layer residual convnet.

Memory core The output of the visual processing is combined with language information according to a particular encoding strategy, as described below. In all conditions, some combination of vision and language input at each timestep passes into a LSTM memory core with hidden dim. 128.

Action and value prediction:

The state of the memory core at each timestep is passed through a linear layer and softmax to compute a distribution over 26 actions. Independently, the memory state is passed to a linear layer to yield a scalar value prediction.

Training algorithm The agent is trained using an importance-weighted actor-critic algorithm with a central learner and distributed actors (Espeholt et al., 2018) .

2.1. LANGUAGE ENCODING:

The agent must process both string observations in the simulated environment, during training, and human instructions, also encoded as strings, during evaluation. Its representations of language must be combined with visual information to make decisions about how to act. We compare various different ways of achieving this encoding. For methods that transfer knowledge from unsupervised text-based learning, we take weights from the well-known BERT model (Devlin et al., 2018) , specifically the uncased BERT BASE model made available by the authors.3 

BERT + mean pool For a given input of w words, BERT BASE returns w context-dependent (sub)word representations of 768 units. In this condition, a mean pooling operation is applied over the w dimension to yield a single representation of dimension 768, which is concatenated with the flattened output of the visual processing module. This multi-modal representation is passed through a single layer MLP with tanh activation and output dimension 128 before entering the memory core of the agent. We apply the standard BERT BASE WordPiece vocabulary (of size 30,000). Note that WordPiece encodes language in terms of subwords (a mix of characters, common word chunks, morphemes and words) rather than the word-level vocabulary applied in more traditional neural language models.

BERT + self-attention layer When applying BERT to text classification, performance can sometimes be improved by fine-tuning the weights in the BERT encoder to suit the task. Because of the large number of gradient updates required to learn a complex behaviour policy, fine-tuning the BERT weights in this way would cause substantial overfitting to the synthetic environment language. We therefore keep the BERT weights frozen, but experiment with an additional learned self-attention layer (Vaswani et al., 2017) to create a language encoder whose bottom layers are pretrained and whose final layer optimizes these representations to the present environment or tasks. This additional layer has 4 attention heads, and uses 64 dimensional key and value embeddings.

BERT+ cross-modal self-attention We also consider a cross-modal self-attention layer of the type suggested by e.g. Tsai et al. (2019) ; Lu et al. (2019) , which in our application provides an explicit pathway for the agent to bind visual experience to specific (contextual) word representations. In this case, we treat each of the output channels of the visual processing network as word-like entities, by passing them through a linear layer of output size 768 to match the BERT output. The embeddings for all words and the visual channels are then processed with a single self-attention layer, whose parameters are again learned with all other agent parameters.

Pretrained (sub)-word embeddings Language classification experiments with BERT show the value of highly context-dependent (sub)-word representations, but transfer in that context is also possible with more conventional (context-independent) word embeddings (Collobert & Weston, 2008) .

To measure the effect of this distinction, we consider a simpler encoder based on the (context independent) input (sub-)word embeddings from BERT, which are also of dimension 768. 4 Taking a mean of these context-independent vectors would yield a word-order-invariant representation of language. We therefore process them with single-layer transformer with 4 attention heads. As in BERT + mean pool, this output is averaged, reduced by a single-layer MLP (from 768 to 128 units) and passed to the agent's core memory.

Typo noise Finally, in one condition we introduce typo noise (each key character was replaced with that of an adjacent character on a standard keyboard, with a probability of 0.01) to the synthetic language strings produced by the environment, allowing the agent to learn to compensate during training. No modifications were made to the evaluation stimuli. Much previous work applies typing noise for language classifier robustness; see e.g. (Pruthi et al., 2019) for a recent survey.

We compare to various baselines designed to isolate specific components of these encoders.

Random mean pool As a direct baseline for BERT mean pool, we consider an identical architecture but in which the contextual BERT embeddings are replaced by fixed random (subword-specific) vectors (also of dimension 768). The weights in the rest of the agent network are trained as in other conditions. We note that random sentence vectors are a competitive baseline on many language classification tasks (Wieting & Kiela, 2019) .

Word-level and WordPiece transformers In addition to pre-trained weights, a potentially important aspect of encoders based on BERT is WordPiece tokenization, which can afford greater ability to make sense of typos or rare words with familiar morphemes than in a more conventional wordlevel encoder. To isolate the effect of tokenization from that of pretrained weights, we compared two further encoders. In one, we split all input strings by whitespace and hash each word string to a unique index representing an input to a single-layer transformer with 4 attention heads and embedding size 768 (chosen to match BERT BASE ), the output of which is processed identically to the Random mean pool condition. We contrast this with an otherwise identical condition in which the WordPiece tokenization from BERT is applied rather than splitting on white space.

3. EXPERIMENTS:

We experiment with a lifting task, which focuses on object identification, and a putting task which focuses on object relations and manipulation. In both tasks the locations of all objects and the initial position and orientation of the agent are chosen at random on floating point scales, so it is highly unlikely that any two episodes are spatially identical (whether during training or evaluation). The action set consists of movements (move-{forward,back,left,right}), turns (turn-{up,down,left,right}), and object pick-up and manipulation with 4 DoF. The placement of objects is assisted by a visible vertical line. See Appendix C a full description.

3.1. LIFTING WITH HUMAN INSTRUCTIONS:

In an episode of the lifting task, the environment selects two movable objects at random from a global object set, and generates a language instruction of the form Lift a X, where X is the correct name for (exactly) one of those objects. To achieve reward, the agent must locate the X, lift it more than 1m above the ground and keep it there for 5 time steps. If the reward function in the environment determines that these conditions are met, a positive reward of +1 is emitted and the episode ends. If a lifting takes place with the incorrect object, the episode also ends with reward 0. For a global set of recognisable objects, we use the ShapeNet dataset (Chang et al., 2015) , which contains over 12,000 3D rendered models. For performance reasons we discard models with more than 8,000 vertices or an OBJ file size greater than 1 MB and consider only those tagged into a synset in the WordNet taxonomy. We use the name of the first lemma of that synset as a proxy for the name of the object.

From these names, we selected 80 to for the environment, each referring to a set of object models with a minimum of 12 exemplars. See appendix D for more details. For all language encoding strategies described above, the agent was able to learn the task, and a well-trained policy completed episodes in an average of ≈ 20 timesteps with accuracy around 90%. The failure of agents to reach perfect performance on the training set is unimportant for the present study; we suspect that the agent's comparatively small convolutional network fails to perceive important distinctions between the more intricate ShapeNet models. We consider two evaluation settings. In the synonym evaluation, we ran the environment for 1,000 episodes with the noun in the environment template instruction replaced by a synonym (Lift a X becomes Lift a X * where X ≈ X * ). The synonyms were provided by native English speaking subjects. In the natural referring expression evaluation, we gave 40 annotators access to a room containing a single ShapeNet model via a crowd-sourcing platform. We asked them to write down what they found in the room and then hit a button that restarted the environment with a new object in the room. 5 As illustrated in Table 2 , unlike the synonyms, the natural referring expressions involve variation in articles as well as nouns (a pencil might become the pen), may include spelling mistakes or typos, can refer entirely incorrectly to the intended object (if the subject fails to recognize the ShapeNet model), but may also match the training instruction exactly. Moreover, unlike the synonym test, there are 30 -40 natural referring expressions for each of the 80 environment nouns, from which we sample randomly when evaluating the agent (again on 1,000 evaluation espisodes).

3.2. PUTTING OBJECTS ON OTHER OBJECTS WITH HUMAN INSTRUCTIONS:

The strength of models like BERT is their ability to combine lexical representations into phrasal or sentence representations. To study this capacity in the context of instruction-following, we devised a putting task involving the verb 'to put', which, in the imperative (put the cup on the tray) takes two arguments, the direct object (D.O.) cup and the indirect object (I.O.) tray. In terms of the behaviours required, the putting task focuses on manipulation and object relations rather than object identification or reference. The environment was configured to begin each episode with three randomly-chosen moveable objects and two larger immovable objects (a bed and a tray), each randomly positioned in the room. As before, we first trained all agents on the putting task with synthetic environment language instructions. Training a policy on this task with reinforcement learning required a bespoke task curriculum (see Appendix C for details); a well-trained policy completes each episode in an average of ≈ 50 actions/timesteps. To gather the evaluation stimuli, we again crowd-sourced humans to provide both natural synonyms for each of the 12 objects in the global set for this task and, in this case, entirely free-form natural human instructions. To obtain natural instructions, we instantiated an environment with only one of the global set of moveable objects, coloured red, and one of either the bed or the tray, coloured white, and asked subjects to ask somebody to place the red object on top of the white object without mentioning their color. From these instructions, we defined four evaluations, illustrated in The accuracies for both lifting tasks are presented in Table 4 and for putting tasks in Table 5 . The results reveal the following main effects of language encoding on model performance:

Substantial transfer from text requires contextual encoders Agents with weights that are pretrained on text data exhibit substantially higher accuracy on both the lifting and the putting tasks. This effect is greatest in the more focused synonym evaluations, but also holds for the the freeform human instructions. A small transfer effect can be seen by comparing the word embeddings + Transformer condition (62% accuracy on the synonym evaluation, lifting task and 57% accuracy  and 20% ). However, overall the transfer effect is much stronger in the case of the full context-dependent BERT representations. On the same two evaluations, BERT + mean pool achieves 77% and 94% accuracy respectively. The gains from transferring via BERT representations vs. just (sub)word embeddings are greatest for the (longer) putting instructions than for the lifting instructions, and greatest of all in the D.O & I.O. synonym evaluation. These are cases where one would expect the marginal value of powerful sentential (rather than just lexical) representations should be greatest. Tuning via self-attention layers (with typo noise) helps Interestingly, we find that tuned self-attention layers do not improve generalization performance over using BERT and mean pooling. This may be simply because the additional layers cause a degree of overfitting to the template environment language during training. However, typo noise mitigates this issue, so that the strongest evaluation performance on the putting tasks overall is observed with a combination of a tuned cross-modal self-attention layer and typo-noise training.7 Indeed, the value of typo noise as a regularizer can be seen by the fact that it improves the robustness of agents with tuned self-attention layers even in the synonym evaluations (for both lifting and putting), which do not involve any typos. Thus, the BERT + CMSA + TN model performs better than all others on two of the three synonym evaluations in the putting task.

One way in which the appropriately-tuned self-attention layer might make the agent more robust to synonyms in this case is by spreading out task-relevant object-nouns in the agent's language representation space (leaving those words closer to synonyms than to potential confounding words).

The degree to which this happens when the object-nouns and their synonymns in our environments are passed first through BERT and then through a (BERT + SA) agent-tuned self-attention layer (compared to passing through the same layer but with random weights) is shown in Fig 2 .

WordPiece tokenization adds robustness In the two evaluations involving natural language instructions from humans, a comparison of Word-level Transformer and WordPiece Transformer shows that some robustness is obtained simply from WordPiece encoding, which in turn must play some part in all BERT-based conditions (e.g. improving from 61% to 66% in the natural referring expression evaluation and from 36% to 42% in the natural instruction putting evaluation). As mentioned above, BERT-based agents with WordPiece encoding are particularly robust to human instructions when trained with typo noise, and this is most effective when combined with tuned self-attention layers. This makes intuitive sense, as a learnable self-attention layer should provide the agent with more flexibility to learn to correct for typos during training. Indeed, on the natural instruction evaluation of the putting task, where typos or spelling errors are most common, the crossmodal attention agent trained with typo noise achieves 70% accuracy. Note that 100% accuracy on this evaluation may be impossible, even for humans, because visual ambiguity or human error mean that instructions can sometimes refer in entirely mistaken ways to the objects in the room.

Multitask learning is possible The performance of an agent trained on both the putting and lifting tasks is not substantially lower than agents that are specialized to each of the tasks individually.

4. RELATED WORK:

Most closely related to our work is an experiment by Chan et al. (2019) , who showed how an agent trained with InferLite sentence representations (Kiros & Chan, 2018 ) can be robust to synonym replacements in template instructions. The task itself involves object identification in the VizDoom environment (Kempka et al., 2016) , which requires only 3 motor actions. Our work develops this insight substantially, applying a similar approach to a visually-realistic environment requiring finegrained object manipulation, integrating context-dependent pre-trained models with subword tokenization (BERT), analysing architectures and training strategies for integrating such models and extending from synonym replacements to free-form instructions typed by humans.

Much recent work applies deep learning and policy optimization in end-to-end approaches to learning instruction following (Chaplot et al., 2018; Oh et al., 2017; Bahdanau et al., 2018; Chevalier-Boisvert et al., 2018; Yu et al., 2018b; a; Jiang et al., 2019) . As noted in the introduction, these studies do not typically involve natural language. Our work differs from studies that do (Misra et al., 2017; 2018) in several ways. First, we consider generalization and robustness (rather than performance when trained on a set of natural language commands). Second, we apply our method to learn much more complex policies requiring object manipulation and positioning and mastery of fine-grained action sets. Our approach makes learning such policies possible because we combine (potentially infinite) template-based RL training with text-based pretraining and transfer.

A limitation of all studies above is the reliance on simulation. Both object identification and manipulation are likely far harder in reality, and it remains to be seen whether our methods scale to robot language understanding (Tellex et al., 2011; 2012; Walter et al., 2014) . See also (Anderson et al., 2018; Wang et al., 2019) for recent improvements to visual realism in simulated environments.

Finally, there is a long history of building in knowledge about the structure of language and/or its environment into instruction-following systems rather than learning it end-to-end. In Winograd (1972) 's SHRDLU, syntactic modules parsed the language input into a logical form, and handwritten rules were applied to connect such forms to the environment. More recent pipeline-based approaches use learning algorithms to map language to a program that can then interface with a planner (Chen & Mooney, 2011; Matuszek et al., 2013; Wang et al., 2016) , and/or a controller, both of which may have priviledged information about how the world connects to the program. It is likely that pretrained language encoders could add robustness to parts of these approaches, much as they do here. Our focus on end-to-end learning, however, is motivated by the intuition that it may eventually scale or adapt more flexibly to arbitrary environments or problems than pipeline approaches.

5. CONCLUSIONS:

In this work, we have developed an agent that can follow natural human instructions requiring the identification, manipulation and positioning of visually-realistic assets. Our method relies on zeroshot transfer from template language instructions to those given by human annotators when asked to refer and instruct in natural ways. The results show that, with powerful pretrained language encoders, this transfer effect is sufficiently strong to permit decoding of complex language-dependent motor behaviours, despite the shift in distribution of the agent's input. More generally, we hope that this contribution serves to bring research on text-based and situated language learning closer together. To facilitate research in this direction, we provide our dataset of natural instructions and referring expressions aligned to ShapeNet models.

We have explored only a tiny fraction of the many possible ways to transfer knowledge from a text corpus to a situated environment. For instance, our approach involves freezing rather than fine-tuning the BERT encoder weights to our desired behaviour policy, to avoid overfitting, but techniques such as knowledge distillation (Hinton et al., 2015) could point to more elegant ways to learn jointly from text and environmental experiences. Moreover, we have focused on BERT, but improvements may be possible by applying alternative general-purpose language encoders, such as GPT-2 (Radford et al., 2019) , Roberta (Liu et al., 2019) and Transformer XL (Dai et al., 2019) .

A FULL EXPERIMENTAL RESULTS:

The results presented in charts here are those shown in the tables in the paper, with two additional conditions involving typo noise. 

B INSTRUCTIONS TO HUMAN ANNOTATORS:

Human annotators use a keyboard and mouse to control a player in the environment simulator, as is standard in first-person video games. The annotators were given the following instructions as part of the each annotation task.

B.1 NATURAL REFERRING EXPRESSIONS:

This is a task called Name The Object. You will find yourself in a room containing a single object.

Please move around the room to get a good view of the object. 

C AGENT ARCHITECTURE AND TRAINING DETAILS:

To process visual input, the agent uses a residual convolutional network with 64, 64, 32 channels in the first, second and third layers respectively and 2 residual blocks in each layer.

As the agent learns, actors carry replicas of the latest learner network, interact with the environment independently and send trajectories (observations and agent actions) back to a central learner. The learning algorithm (Espeholt et al., 2018) modifies the learner weights to optimize an actor-critic objective, with updates importance-weighted to correct for differences between the actor policy and the current state of the learner policy. We used a learning rate of 0.0005, a learner batch size of 32, an agent unroll length of 50, a discounting factor of 0.99, an epsilon (epsilon-greedy policy) of 1e -6 and an entropy cost of 0.0003 (Mnih et al., 2016) . We use an Adam optimizer (Kingma & Ba, 2014) with β 1 = 0.90 and β 2 = 0.95.

In order to train the agent on the putting task, it was necessary to combine episodes of the task itself with episodes of simpler tasks, in a form of curriculum (although learning in parallel on all tasks). In particular, we trained it concurrently on a lifting task that involved the same moveable objects as the putting task (so that the agent could receive signal about their names without relying on a complete act of putting). We also found it beneficial to add a put-near task to the curriculum, where the instructions were of the form Put a cup near the tray rather than Put a cup on the tray, and a reward was emitted if the agent moved the cup a short distance from the tray and placed it on the ground.

In 

D FURTHER ENVIRONMENT DETAILS:

For all experiments, the environment is a Unity room of dimension 4m x 4m. The walls, floor and ceiling are always the same color, but we add a window and door (positioned randomly per episode) to give some sense of absolute location to the agent.

When importing ShapeNet models, we use the scaling provided in the metadata, unless it it is very small (less than 0.000001), in which case we interpret the coordinates in the OBJ file as meters. All objects have rigid bodies with collision meshes generated using Unity's built in MeshCollider, with convex set to true. The masses of all movable objects are set to 1 kg, so that our avatar has enough strength to pick all of them up (except for beds and trays, which are made kinetic).

When selecting ShapeNet models, for performance reasons we discarded all models with a vertex count higher than 8000, and an OBJ file size greater than 1 MB. The native ShapeNet category names are often not natural everyday names (for instance, they can be highly specific, like "dual shock analog controller"). To mitigate this, we used ShapeNet's WordNet tags, grouping models into categories according to WordNet synsets and the name of the first synset lemma to the category.

Because depth-perception is challenging without binocular vision, the agent is assisted in manipulation by a visual guide (bottom-right) that highlights objects within grasping range and drops a vertical line from held objects.

Full lists of objects and synonyms are on the following pages. 7 : The two immovable and ten movable objects in the putting experiment. To begin each episode, both immovable objects and three randomly-selected movable objects are randomly positioned in the room.

:

Unity. http://unity3d.com.

See Appendix C for details not included here.

Available at https://tfhub.dev/google/bert_uncased_L-12_H-768_A-12/1

These embeddings capture lexical similarity much like conventional word embeddings; a cosine metric produces a Spearman correlation of 0.49 with human ratings from the Simlex-999 dataset(Hill et al., 2015).

See Appendix B for the full list of synonyms and annotator instructions.

We found that ending the episode in such cases made learning much faster.

See Appendix A to compare BERT-based architectures with and without typo-noise.

Figures and Tables:

Figure 2: Self-attention layers learn to pull-apart both training nouns and their synonyms as the agent learns the putting task with synthetic environment language.

Figure 3: Lifting task, synonym evaluation. Left: accuracy of different agents over 1,000 episodes when no change is made to the environment template instruction. Right: accuracy of different agents when a synonym is introduced. Dotted line indicates score of an agent that carries out the correct behaviour but with random objects from the room.

Figure 4: Lifting task, natural referring expression evaluation. Performance of agents on 1,000 evaluation episodes when part of the environment template lifting instruction is replaced by a natural referring expression from human annotators. Dotted line indicates score of an agent that carries out the correct behaviour but with random objects from the room.

Figure 5: Putting task, synonym evaluation. Performance of agents on 1,000 evaluation episodes when (left) no change is made to the template environment instruction and (rightmost three) different parts of the template environment instruction are replaced with synonyms. Dotted line indicates score of an agent that carries out the correct behaviour but with random objects from the room.

Figure 6: Putting task, natural instruction evaluation. Performance of agents on 1,000 evaluation episodes when the full environment template putting instruction is replaced by a natural instruction from human annotators. Dotted line indicates score of an agent that carries out the correct behaviour but with random objects from the room.



Table content: <table/>

Example training (left) and test instructions in the putting task. Underlined words are examples of synonyms, italics indicate entire phrases provided by human annotators.

Table content: <table/>

In each episode of this task, the agent receives an instruction Put a D.O. on the I.O., where D.O. is any of the three moveable objects (chosen from a global set of ten) and I.O. is either bed or tray. The environment checks whether an instance of D.O. is at rest (and not held by the agent) on top of the I.O., returning a positive reward+1 if so and ending the episode. If the object D.O. is placed on something other than a I.O., or if another movable object is placed on the bed or the tray then again the episode ends immediately with reward 0. 6

Table content: <table/>

D.O. synonym, I.O. synonym and D.O. & I.O. synonym, in which particular parts of the original template command were replaced with synonyms, and Natural instruction, the fully free-form human instruction, which can include orthographic errors and misidentified objects.

Table content: <table><tr><td>3.3 DISCUSSION OF RESULTS</td><td/><td/><td/></tr><tr><td/><td>Template language</td><td/><td>Natural referring</td></tr><tr><td>Model</td><td>(training)</td><td>Synonym</td><td>expression</td></tr><tr><td>Random 'lifting' act</td><td>0.5</td><td>0.50</td><td>0.50</td></tr><tr><td>Random-embedding + MP</td><td>0.86</td><td>0.49</td><td>0.48</td></tr><tr><td>Word-level Transf.</td><td>0.91</td><td>0.58</td><td>0.61</td></tr><tr><td>WordPiece Transf.</td><td>0.89</td><td>0.57</td><td>0.66</td></tr><tr><td>Word-level Transf. + TN</td><td>0.86</td><td>0.62</td><td>0.70</td></tr><tr><td>WordPiece Transf. + TN</td><td>0.86</td><td>0.64</td><td>0.69</td></tr><tr><td>Word embeddings + Transf.</td><td>0.89</td><td>0.62</td><td>0.64</td></tr><tr><td>BERT + MP</td><td>0.93</td><td>0.77</td><td>0.76</td></tr><tr><td>BERT + SA</td><td>0.91</td><td>0.70</td><td>0.70</td></tr><tr><td>BERT + CMSA</td><td>0.88</td><td>0.68</td><td>0.67</td></tr><tr><td>BERT + CMSA + TN</td><td>0.89</td><td>0.74</td><td>0.73</td></tr><tr><td>Multitask BERT + CMSA + TN</td><td>0.87</td><td>0.74</td><td>0.73</td></tr></table>

Accuracy of different models on training instructions, the synonym evaluation and the natural referring expression evaluation. MP: mean pool, SA: self-attention layer, CMSA: crossmodal self-attention layer, TN: typo-noise. Multitask: single agent trained on both 'lifting' and 'putting' tasks. Scores show mean across 1,000 episodes (with instructions randomly chosen by the environment generator).

Table content: <table/>

Accuracy of different models on the putting task when different parts of instructions of the form "Put a [D.O.] on the [I.O.]" are replaced with synonyms. Underlined words in model names indicate pre-trained weights from text-based training. MP: mean pool, SA: self-attention

Table content: <table/>

Please don't describe the object. Just write down what you see, with an article like 'a' or 'some' if appropriate. Ask to put. You will find yourself in a room. Your job is to imagine giving an instruction to somebody else so that that person puts the red object on to the white object. Move around the room to get a good look at what the two objects are. When you are ready to give your Put the ball on the plate3. Move the pencil onto the boxWords to avoid Your instruction must not contain words for colours or other properties of the object. Please do not use the words red, white, scarlet, dark, large etc. in your instruction. Instead, refer to objects by their name as you recognise them. If you don't recognise what an object is, just make your best guess.

Table content: <table><tr><td>When you know what the object is:</td></tr></table>

Put the large object on the small object 3. Put the small round thing on the chest Keep your language varied. Try to use various ways to express your instruction in different episodes to keep things interesting.

Table content: <table/>

the lifting task, training the agent requires approximately 200 million frames of experience (approximately 7 million episodes), which takes about 24 hours with 250 actors on GPU. In the putting task, training in each condition was stopped after 30 million episodes, approximately three days of training.

Table content: <table><tr><td colspan="2">Body movement actions Movement and grip actions</td><td>Object manipulation</td></tr><tr><td>NOOP</td><td>GRAB</td><td>GRAB + SPIN OBJECT RIGHT</td></tr><tr><td>MOVE FORWARD</td><td>GRAB + MOVE FORWARD</td><td>GRAB + SPIN OBJECT LEFT</td></tr><tr><td>MOVE BACKWARD</td><td colspan="2">GRAB + MOVE BACKWARD GRAB + SPIN OBJECT UP</td></tr><tr><td>MOVE RIGHT</td><td>GRAB + MOVE RIGHT</td><td>GRAB + SPIN OBJECT DOWN</td></tr><tr><td>MOVE LEFT</td><td>GRAB + MOVE LEFT</td><td>GRAB + SPIN OBJECT FORWARD</td></tr><tr><td>LOOK RIGHT</td><td>GRAB + LOOK RIGHT</td><td>GRAB + SPIN OBJECT BACKWARD</td></tr><tr><td>LOOK LEFT</td><td>GRAB + LOOK LEFT</td><td>GRAB + PUSH OBJECT AWAY</td></tr><tr><td>LOOK UP</td><td>GRAB + LOOK UP</td><td>GRAB + PULL OBJECT CLOSE</td></tr><tr><td>LOOK DOWN</td><td>GRAB + LOOK DOWN</td><td/></tr></table>

The 80 ShapeNet category names and their sizes, corresponding WordNet synsets and an example model id for a category exemplar used in the lifting task. In the extra materials we provide a full list of ShapeNet model ids in each category.

Table content: <table><tr><td/><td colspan="2">Environment word Synonym</td></tr><tr><td colspan="2">Immovable objects tray</td><td>box</td></tr><tr><td/><td>bed</td><td>mattress</td></tr><tr><td/><td>boat</td><td>ship</td></tr><tr><td/><td>hairdryer</td><td>dryer</td></tr><tr><td/><td>racket</td><td>bat</td></tr><tr><td/><td>bus</td><td>coach</td></tr><tr><td/><td>rocket</td><td>spaceship</td></tr><tr><td/><td>car</td><td>automobile</td></tr><tr><td>Movable objects</td><td>plane</td><td>aeroplane</td></tr><tr><td/><td>mug</td><td>cup</td></tr><tr><td/><td>robot</td><td>android</td></tr><tr><td/><td>train</td><td>locomotive</td></tr><tr><td/><td>keyboard</td><td>piano</td></tr><tr><td/><td>helicopter</td><td>airplane</td></tr><tr><td/><td>candle</td><td>lamp</td></tr><tr><td>Table</td><td/><td/></tr></table>

Peer review (iclr2020):
The authors present a method of transferring template-based instruction following agents to natural language instructions by using language encoders trained on large text corpora. They explore different ways of combining text-based language encoders with visual representations and compare them. They find that contextual phrase-based representations learned by BERT significantly improve the performance on natural language instructions. Strengths: - The paper is written well, it is easy to understand and follow. - The task setup is good, authors collect natural language instruction data from humans. - The paper presents several language encoding methods for the task and systematically evaluates them in a scientific manner. - The experimental results indicate that it is possible to transfer an agent trained on template-based instructions to natural language instructions using language models trained on large text corpora. It is not necessary to train the agent on natural language instructions. I find this result important and useful. Weaknesses: - The paper lacks significant technical novelty. It essentially combines known reinforcement learning based instruction following agents with known language models. The different ways of combining language encoding with visual representations are either trivial or adapted from prior work. - A major concern is that the natural language instructions considered in the paper do not have much diversity with respect to language. The paper only considers lifting and putting tasks and trains a separate model for both the tasks. -- The lifting task always uses the verb *lift* and replaces the object word with synonyms or referring expressions. There are 80 objects in the lifting task and I suspect there are very few referring expressions for these objects and they mostly involve a synonym. Furthermore, at test time, the agent only needs to distinguish between 2 objects. The performance with random embedding is around 50% for this task and the best model is around 76% which means the agent is not recognizing the correct object around 50% of the time. -- For the putting task, authors consider synonyms for object words and natural instructions which involve changing the verb ‘put’. It seems like humans mostly use only 4 verb words for this task, ‘put’, ‘keep’, ‘move’, ‘place’. This might be an artifact of the examples given to the human annotators. In any case, this word is inconsequential as the agent always lifts one of 3 available objects on one of 2 fixed objects. - It seems like the most diversity is coming from synonyms which can probably be handled with a dictionary or wordnet rather than requiring a language model. There is also some prior work on handling synonyms (https://arxiv.org/pdf/1902.04546.pdf). I would have liked to see many more tasks and a multi-task learning model which is also able to distinguish between the task based on natural language instructions in addition to understanding object word synonyms and referring expressions. More objects would also help. - The authors claim to tackle “more behavioural and environmental challenges than previous work”. I do not agree with this claim. It is true that this paper handles object interaction and natural language instructions in a partially observable setting, however, previous work has tackled other challenges which this work does not tackle. For example, Oh et al. 2017 generalize to new sequence of instructions, Hermann et al. 2017 and Chaplot et al. 2018 also handle compositionality and generalize to unseen instructions referring to new objects, Hermann et al. 2017 handle negation, Chaplot et al. 2018 handle instructions involving ‘largest’ or ‘smallest’ objects, Misra et al. 2018 handle more diverse natural language and so on. - I wouldn’t call moving objects using high-level symbolic actions as ‘manipulation’. This is a whole research area in robotics involving taking low-level actions to move an object. Also, the environment used in the paper is not visually realistic in my opinion. It looks game-like and visual encoders trained in this environment are unlikely to generalize to the real world. This is fine as it is mostly irrelevant to handling natural language instructions, but authors should not claim visual realism and object manipulation in my opinion. Comments/Questions - I do not understand the meaning and purpose of some actions. Why are there GRAB + actions? Doesn’t the object move with the agent once it is grabbed? What is SPIN_OBJECT? Why is it needed? It seems like there is no ‘place’ action, how does the agent place the object? I am guessing when the agent stops taking GRAB+ actions. If that is the case, then wouldn’t it be easier to just have Grab and Place actions rather than 16 GRAB+ actions? - The meaning of ‘(sub)-’ in (sub)-word is not described. - What is the probability of typo noise in the experiments? - Many experimental details are missing. How long was the model trained for both the tasks? How many training samples/episodes? What were the hyperparameters used for reinforcement learning? Learning rate, optimizer, discount value and so on. Updates after author response: I have examined the author response and additional experiments carefully. I am maintaining my score due to the following reasons: - The authors seem to agree that the paper does not provide any *substantial algorithmic advance*. - The authors argue that the number of objects in the paper is much more than prior work. However, the focus of prior work (referenced by authors) was not to tackle natural language. Since the focus of this paper is to tackle natural language, I believe the number and diversity of objects and tasks need to be much higher than 80 objects and 2 tasks used in the paper. - *We would language referring to an even wider range of motor-behaviours, e.g. more *verbs** -> I do not understand what the authors are trying to say here, but if *learning the motor programmes for such concepts in an environment* is not *the focus of the present paper*, I believe the focus is only handling synonyms and referring expressions for objects. In my opinion, these are relatively easier to tackle, (for example using a dictionary or wordnet) than grounding *verbs* into sequence of actions, which limits the scope of this paper further. - The authors still claim to tackle object manipulation and visual realism which I do not agree with. I do not believe taking high-level *GRAB* action can be called object manipulation. The objects are taken from shape net with relatively realistic shapes, but neither the appearance of objects (textures, shadows) nor the relative arrangement of objects is realistic. In my opinion, a model trained in this environment has no hope of generalizing to the real-world. - I do not agree with the authors* argument against chance performance in the lifting task. From my experience, I believe an RL agent trained without any language input would perform at 50% if it receives a reward for lifting one of the two available objects. I do not understand why the authors chose to put only 2 objects in the environment. Why not put 5 or more objects? - I appreciate authors* efforts towards multi-task learning results, however, tackling only 2 tasks is not convincing enough.