Learning to follow instructions is of fundamental importance to autonomous agents for vision-and-language navigation (VLN). In this paper, we study how an agent can navigate long paths when learning from a corpus that consists of shorter ones. We show that existing state-of-the-art agents do not generalize well. To this end, we propose BabyWalk, a new VLN agent that is learned to navigate by decomposing long instructions into shorter ones (BabySteps) and completing them sequentially. A special design memory buffer is used by the agent to turn its past experiences into contexts for future steps. The learning process is composed of two phases. In the first phase, the agent uses imitation learning from demonstration to accomplish BabySteps. In the second phase, the agent uses curriculum-based reinforcement learning to maximize rewards on navigation tasks with increasingly longer instructions. We create two new benchmark datasets (of long navigation tasks) and use them in conjunction with existing ones to examine BabyWalk's generalization ability. Empirical results show that BabyWalk achieves state-of-the-art results on several metrics, in particular, is able to follow long instructions better. The codes and the datasets are released on our project page https://github.com/ Sha-Lab/babywalk . Autonomous agents such as household robots need to interact with the physical world in multiple modalities. As an example, in vision-and-language navigation (VLN) (Anderson et al., 2018), the agent moves around in a photo-realistic simulated environment (Chang et al., 2017) by following a sequence of natural language instructions. To infer its whereabouts so as to decide its moves, the  Author contributed equally  On leave from University of Southern California agent infuses its visual perception, its trajectory and the instructions (Fried et al., 2018; Anderson et al., 2018; Wang et al., 2019; Ma et al., 2019a,b). Arguably, the ability to understand and follow the instructions is one of the most crucial skills to acquire by VLN agents. Jain et al. (2019) shows that the VLN agents trained on the originally proposed dataset ROOM 2R OOM ( i.e . R 2 R thereafter) do not follow the instructions, despite having achieved high success rates of reaching the navigation goals. They proposed two remedies: a new dataset ROOM 4R OOM (or R 4 R ) that doubles the path lengths in the R 2 R , and a new evaluation metric Coverage weighted by Length Score (CLS) that measures more closely whether the ground-truth paths are followed. They showed optimizing the fidelity of following instructions leads to agents with desirable behavior. Moreover, the long lengths in R 4 R are informative in identifying agents who score higher in such fidelity measure. In this paper, we investigate another crucial aspect of following the instructions: can a VLN agent generalize to following longer instructions by learning from shorter ones? This aspect has important implication to real-world applications as collecting annotated long sequences of instructions and training on them can be costly. Thus, it is highly desirable to have this generalization ability. After all, it seems that humans can achieve this effortlessly 1 . To this end, we have created several datasets of longer navigation tasks, inspired by R 4 R (Jain et al., 2019). We trained VLN agents on R 4 R and use the agents to navigate in ROOM 6R OOM ( i.e ., R 6 R ) and ROOM 8R OOM ( i.e ., R 8 R ). We contrast to the performance of the agents which are trained on those datasets directly (in-domain). The results 1 Anecdotally, we do not have to learn from long navigation experiences. Instead, we extrapolate from our experiences of learning to navigate in shorter distances or smaller spaces (perhaps a skill we learn when we were babies or kids). Our findings are that the agents trained on R 4 R (denoted by the purple and the pink solid lines) perform significantly worse than the in-domain agents (denoted the light blue dashed line). Also interestingly, when such out-of-domain agents are applied to the dataset R 2 R with shorter navigation tasks, they also perform significantly worse than the corresponding in-domain agent despite R 4 R containing many navigation paths from R 2 R . Note that the agent trained to optimize the aforementioned fidelity measure ( RCM (fidelity)) performs better than the agent trained to reach the goal only ( RCM (goal)), supporting the claim by Jain et al. (2019) that following instructions is a more meaningful objective than merely goal-reaching. Yet, the fidelity measure itself is not enough to enable the agent to transfer well to longer navigation tasks. To address these deficiencies, we propose a new approach for VLN. The agent follows a long navigation instruction by decomposing the instruction into shorter ones (micro-instructions, i.e ., BABYSTEP s), each of which corresponds to an intermediate goal/task to be executed sequentially. To this end, the agent has three components: (a) a memory buffer that summarizes the agent's experiences so that the agent can use them to provide the context for executing the next BABY-STEP . (b) the agent first learns from human experts in bite-size. Instead of trying to imitate to achieve the ground-truth paths as a whole, the agent is given the pairs of a BABY-STEP and the corresponding human expert path so that it can learn policies of actions from shorter instructions. (c) In the second stage of learning, the agent refines the policies by curriculum-based reinforcement learning, where the agent is given increasingly longer navigation tasks to achieve. In particular, this curriculum design reflects our desiderata that the agent optimized on shorter tasks should generalize well to slightly longer tasks and then much longer ones. While we do not claim that our approach faithfully simulates human learning of navigation, the design is loosely inspired by it. We name our approach BABYWALK and refer to the intermediate navigation goals in (b) as BABY-STEP s. Fig. 1 shows that BABYWALK (the red solid line) significantly outperforms other approaches and despite being out-of-domain, it even reach the performance of in-domain agents on R 6 R and R 8 R . The effectiveness of BABYWALK also leads to an interesting twist. As mentioned before, one of the most important observations by Jain et al. (2019) is that the original VLN dataset R 2 R fails to reveal the difference between optimizing goal-reaching (thus ignoring the instructions) and optimizing the fidelity (thus adhering to the instruc-tions). Yet, leaving details to section 5, we have also shown that applying BABYWALK to R 2 R can lead to equally strong performance on generalizing from shorter instructions ( i.e ., R 2 R ) to longer ones. In summary, in this paper, we have demonstrated empirically that the current VLN agents are ineffective in generalizing from learning on shorter navigation tasks to longer ones. We propose a new approach in addressing this important problem. We validate the approach with extensive benchmarks, including ablation studies to identify the effectiveness of various components in our approach. Vision-and-Language Navigation (VLN) Recent works (Anderson et al., 2018; Thomason et al., 2019; Jain et al., 2019; Chen et al., 2019; Nguyen and Daum III, 2019) extend the early works of instruction based navigation (Chen and Mooney, 2011; Kim and Mooney, 2013; Mei et al., 2016) to photo-realistic simulated environments. For instance, Anderson et al. (2018) proposed to learn a multi-modal Sequence-to-Sequence agent (Seq2Seq) by imitating expert demonstration. Fried et al. (2018) developed a method that augments the 2541 paired instruction and demonstration data using a learned speaker model, to teach the navigation agent to better understand instructions. Wang et al. (2019) further applies reinforcement learning (RL) and self-imitation learning to improve navigation agents. Ma et al. (2019a,b) designed models that track the execution progress for a sequence of instructions using soft-attention. Different from them, we focus on transferring an agent's performances on shorter tasks to longer ones. This leads to designs and learning schemes that improve generalization across datasets. We use a memory buffer to prevent mistakes in the distant past from exerting strong influence on the present. In imitation learning stage, we solve fine-grained subtasks (BABY-STEP s) instead of asking the agent to learn the navigation trajectory as a whole. We then use curriculum-based reinforcement learning by asking the agent to follow increasingly longer instructions. Transfer and Cross-domain Adaptation There have been a large body of works in transfer learning and generalization across tasks and environments in both computer vision and reinforcement learning (Andreas et al., 2017; Oh et al., 2017; Zhu et al., 2017a,b; Sohn et al., 2018; Hu et al., 2018). Of particular relevance is the recent work on adapting VLN agents to changes in visual environments (Huang et al., 2019; Tan et al., 2019). To our best knowledge, this work is the first to focus on adapting to a simple aspect of language variability  the length of the instructions. Curriculum Learning Since proposed in (Ben-gio et al., 2009), curriculum learning was successfully used in a range of tasks: training robots for goal reaching (Florensa et al., 2017), visual question answering (Mao et al., 2019), image generation (Karras et al., 2018). To our best knowledge, this work is the first to apply the idea to learning in VLN. In the VLN task, the agent receives a natural language instruction X composed of a sequence of sentences. We model the agent with an Markov Decision Process (MDP) which is defined as a tuple of a state space S , an action space A , an initial state s 1 , a stationary transition dynamics  : SA  S , a reward function r : S A  R , and the discount factor  for weighting future rewards. The agent acts according to a policy  : S  A  0  R + . The state and action spaces are defined the same as in (Fried et al., 2018) (cf.  4.4 for details). For each X , the sequence of the pairs ( s , a ) is called a trajectory Y = (cid:2) s 1 , a 1 , . . . , s | Y | , a | Y | (cid:3) where || denotes the length of the sequence or the size of a set. We use  a to denote an action taken by the agent according to its policy. Hence, Y denotes the agent's trajectory, while Y (or a ) denotes the human expert's trajectory (or action). The agent is given training examples of (X , Y) to optimize its policy to maximize its expected rewards. In our work, we introduce additional notations in the following. We will segment a (long) instruction X into multiple shorter sequences of sentences { x m , m = 1 , 2 ,    , M } , to which we refer as BABY-STEP s. Each x m is interpreted as a microinstruction that corresponds to a trajectory by the agent  y m and is aligned with a part of the human expert's trajectory, denoted as y m . While the alignment is not available in existing datasets for VLN, we will describe how to obtain them in a later section ( 4.3). Throughout the paper, we also freely interexchange the term following the m th micro-instruction, executing the BABY-STEP x m , or complete the m th subtask. We use t  [1 , | Y | ] to denote the (discrete) time steps the agent takes actions. Additionally, when the agent follows x m , for convenience, we sometimes use t m  [1 , |  y m | ] to index the time steps, instead of the global time t = t m + (cid:4) m  1 i =1 |  y i | . We describe in detail the 3 key elements in the design of our navigation agent: (i) a memory buffer for storing and recalling past experiences to provide contexts for the current navigation instruction ( 4.1); (ii) an imitation-learning stage of navigating with short instructions to accomplish a single BABY-STEP ( 4.2.1); (iii) a curriculum-based reinforcement learning phase where the agent learns with increasingly longer instructions ( i.e . multiple BABY-STEP s) ( 4.2.2). We describe new benchmarks created for learning and evaluation and key implementation details in  4.3 and  4.4 (with more details in the Appendix). The basic operating model of our navigation agent BABYWALK is to follow a micro instruction x m ( i.e ., a short sequence of instructions, to which we (cid:6)(cid:23)(cid:29) (cid:7) (cid:26)(cid:8) (cid:22) (cid:11) (cid:22) (cid:2)(cid:14) (cid:19) (cid:27)(cid:17) (cid:19) (cid:16) (cid:19) (cid:3)(cid:4)(cid:6)(cid:7)(cid:8)(cid:10)(cid:1)(cid:2)(cid:9)(cid:5)(cid:5)(cid:4)(cid:8) (cid:4) (cid:7)(cid:23)(cid:26)(cid:27)(cid:25)(cid:28)(cid:16)(cid:27)(cid:20)(cid:24)(cid:23)(cid:1)(cid:26)(cid:17)(cid:18)(cid:22)(cid:17)(cid:23)(cid:27)(cid:15)(cid:27)(cid:20)(cid:24)(cid:23) (cid:1) (cid:10) (cid:27)(cid:19)(cid:1)(cid:5) (cid:4)(cid:5)(cid:14) (cid:3)(cid:11) (cid:12)(cid:6)(cid:10) (cid:2) (cid:16) (cid:27)(cid:17) (cid:16) (cid:27)(cid:17) (cid:16) (cid:27)(cid:17) (cid:28) (cid:28) (cid:28) (cid:3) (cid:29) (cid:3) (cid:29) (cid:3) (cid:29) (cid:9) (cid:21)(cid:23)(cid:19)(cid:19)(cid:18)(cid:20)(cid:24) (cid:12) (cid:13) (cid:5) (cid:4)(cid:5)(cid:14) (cid:13) (cid:4)(cid:9)(cid:8) (cid:10)(cid:24)(cid:21)(cid:20)(cid:16)(cid:30)(cid:1) (cid:15) (cid:10) (cid:5)(cid:25) (cid:10) (cid:5)(cid:25) (cid:5) (cid:5) (cid:6) (cid:6) Figure 2: The BABYWALK agent has a memory buffer storing its past experiences of instructions x m , and its trajectory  y m . also refer as BABY-STEP ), conditioning on the context  z m and to output a trajectory  y m . A schematic diagram is shown in Fig. 2. Of particularly different from previous approaches is the introduction of a novel memory module. We assume the BABYSTEP s are given in the training and inference time   4.3 explains how to obtain them if not given a prior (Readers can directly move to that section and return to this part afterwards). The left of the Fig. 3 gives an example of those micro-instructions. Context The context is a summary of the past experiences of the agent, namely the previous ( m  1) mini-instructions and trajectories:  z m = g (cid:5) f SUMMARY ( x 1 ,    , x m  1 ) , f SUMMARY ( y 1 ,    ,  y m  1 ) (cid:6) (1) where the function g is implemented with a multilayer perceptron. The summary function f SUMMARY is explained in below. Summary To map variable-length sequences (such as the trajectory and the instructions) to a single vector, we can use various mechanisms such as LSTM. We reported an ablation study on this in  5.3. In the following, we describe the forgetting one that weighs more heavily towards the most recent experiences and performs the best empirically. where the weights are normalized to 1 and inverse proportional to how far i is from m , is a hyper-parameter (we set to 1 / 2 ) and  (  ) is a monotonically nondecreasing function and we simply choose the identity function. Note that, we summarize over representations of micro-instructions ( x m ) and experiences of executing those micro-instructions  y m . The two encoders u (  ) and v (  ) are described in  4.4. They are essentially the summaries of low-level details, i.e ., representations of a sequence of words, or a sequence of states and actions. While existing work often directly summarizes all the low-level details, we have found that the current form of hierarchical summarizing ( i.e ., first summarizing each BABY-STEP , then summarizing all previous BABY-STEP s) performs better. Policy The agent takes actions, conditioning on the context  z m , and the current instruction x m :  a t   ( | s t ,  a t  1 ; u ( x m ) ,  z m ) (5) where the policy is implemented with a LSTM with the same cross-modal attention between visual states and languages as in (Fried et al., 2018). The agent learns in two phases. In the first one, imitation learning is used where the agent learns to execute BABY-STEP s accurately. In the second one, the agent learns to execute successively longer tasks from a designed curriculum. BABY-STEP s are shorter navigation tasks. With the m th instruction x m , the agent is asked to follow the instruction so that its trajectory matches the human expert's y m . To assist the learning, the context is computed from the human expert trajectory up to the m th BABY-STEP ( i.e ., in eq. (1),  y s are replaced with y s). We maximize the objective (cid:6) = M (cid:7) m =1 | y m | (cid:7) t m =1 log  ( a t m | s t m , a t m  1 ; u ( x m ) , z m ) We emphasize here each BABY-STEP is treated independently of the others in this learning regime. Each time a BABY-STEP is to be executed, we preset the agent in the human expert's context (cid:7)(cid:24)(cid:28)(cid:29)(cid:27)(cid:30)(cid:15)(cid:29)(cid:20)(cid:25)(cid:24)(cid:25)(cid:18)(cid:1)(cid:28)(cid:30)(cid:14)(cid:3)(cid:29)(cid:13)(cid:28)(cid:21)(cid:28) (cid:12)(cid:13)(cid:27)(cid:23)(cid:30)(cid:26)(cid:5) (cid:7)(cid:8) (cid:8)(cid:23)(cid:26)(cid:25)(cid:17)(cid:17)(cid:34)(cid:27)(cid:17)(cid:28)(cid:30)(cid:36)(cid:29)(cid:14)(cid:17)(cid:20)(cid:13)(cid:32)(cid:21)(cid:26)(cid:28)(cid:30)(cid:26)(cid:15)(cid:26)(cid:24)(cid:27)(cid:23)(cid:17)(cid:30)(cid:17)(cid:29)(cid:21)(cid:25)(cid:19)(cid:23)(cid:17)(cid:29)(cid:31)(cid:14)(cid:4)(cid:30)(cid:13)(cid:29)(cid:22)(cid:29) (cid:10)(cid:8)(cid:1)(cid:15)(cid:30)(cid:27)(cid:27)(cid:20)(cid:15)(cid:30)(cid:22)(cid:30)(cid:23) (cid:8)(cid:17)(cid:15)(cid:29)(cid:30)(cid:27)(cid:17) (cid:2)(cid:4) (cid:10)(cid:26)(cid:1)(cid:17)(cid:34)(cid:27)(cid:17)(cid:28)(cid:30)(cid:1)(cid:16)(cid:17)(cid:24)(cid:26)(cid:3)(cid:1)(cid:23)(cid:17)(cid:13)(cid:28)(cid:25)(cid:1)(cid:18)(cid:28)(cid:26)(cid:24)(cid:1)(cid:17)(cid:34)(cid:30)(cid:17)(cid:28)(cid:25)(cid:13)(cid:23)(cid:1)(cid:28)(cid:17)(cid:33)(cid:13)(cid:28)(cid:16)(cid:29) (cid:6)(cid:1)(cid:29)(cid:31)(cid:14)(cid:4)(cid:30)(cid:13)(cid:29)(cid:22)(cid:1)(cid:19)(cid:21)(cid:32)(cid:17)(cid:25)(cid:1)(cid:20)(cid:21)(cid:29)(cid:30)(cid:26)(cid:28)(cid:35)(cid:15)(cid:26)(cid:25)(cid:30)(cid:17)(cid:34)(cid:30) (cid:3) (cid:8)(cid:17)(cid:15)(cid:29)(cid:30)(cid:27)(cid:17) (cid:2)(cid:29) (cid:30)(cid:1)(cid:15)(cid:26)(cid:25)(cid:29)(cid:17)(cid:15)(cid:31)(cid:30)(cid:21)(cid:32)(cid:17)(cid:1)(cid:29)(cid:31)(cid:14)(cid:4)(cid:30)(cid:13)(cid:29)(cid:22)(cid:29)(cid:1)(cid:19)(cid:21)(cid:32)(cid:17)(cid:25)(cid:1)(cid:20)(cid:21)(cid:29)(cid:30)(cid:26)(cid:28)(cid:35)(cid:1)(cid:15)(cid:26)(cid:25)(cid:30)(cid:17)(cid:34)(cid:30) (cid:3) (cid:8)(cid:17)(cid:15)(cid:29)(cid:30)(cid:27)(cid:17) (cid:2)(cid:11) (cid:12)(cid:20)(cid:17)(cid:1)(cid:33)(cid:20)(cid:26)(cid:23)(cid:17)(cid:1)(cid:30)(cid:13)(cid:29)(cid:22) (cid:17)(cid:34)(cid:21)(cid:30)(cid:1)(cid:30)(cid:20)(cid:17)(cid:1)(cid:28)(cid:26)(cid:26)(cid:24)(cid:1)(cid:30)(cid:20)(cid:17)(cid:25)(cid:1)(cid:19)(cid:26)(cid:1)(cid:29)(cid:30)(cid:28)(cid:13)(cid:21)(cid:19)(cid:20)(cid:30)(cid:1)(cid:13)(cid:25)(cid:16)(cid:1)(cid:30)(cid:31)(cid:28)(cid:25)(cid:1)(cid:23)(cid:17)(cid:18)(cid:30)(cid:5) (cid:19)(cid:26)(cid:1)(cid:29)(cid:30)(cid:28)(cid:13)(cid:21)(cid:19)(cid:20)(cid:30)(cid:1)(cid:31)(cid:25)(cid:30)(cid:21)(cid:23)(cid:1)(cid:35)(cid:26)(cid:31)(cid:1)(cid:27)(cid:13)(cid:29)(cid:29)(cid:1)(cid:13)(cid:25)(cid:1)(cid:17)(cid:35)(cid:17)(cid:1)(cid:15)(cid:20)(cid:13)(cid:28)(cid:30)(cid:1)(cid:27)(cid:21)(cid:15)(cid:30)(cid:31)(cid:28)(cid:17)(cid:1)(cid:18)(cid:28)(cid:13)(cid:24)(cid:17)(cid:1)(cid:26)(cid:25)(cid:1)(cid:30)(cid:20)(cid:17)(cid:1)(cid:23)(cid:17)(cid:18)(cid:30)(cid:1)(cid:33)(cid:13)(cid:23)(cid:23)(cid:1)(cid:30)(cid:20)(cid:17)(cid:25)(cid:1)(cid:33)(cid:13)(cid:21)(cid:30)(cid:1)(cid:30)(cid:20)(cid:17)(cid:28)(cid:17)(cid:5)(cid:1) (cid:19)(cid:26)(cid:1)(cid:29)(cid:30)(cid:28)(cid:13)(cid:21)(cid:19)(cid:20)(cid:30)(cid:5)(cid:1)(cid:27)(cid:13)(cid:29)(cid:29)(cid:1)(cid:30)(cid:20)(cid:17)(cid:1)(cid:14)(cid:13)(cid:28)(cid:1)(cid:33)(cid:21)(cid:30)(cid:20)(cid:1)(cid:30)(cid:20)(cid:17)(cid:1)(cid:29)(cid:30)(cid:26)(cid:26)(cid:23)(cid:29)(cid:5)(cid:1) (cid:33)(cid:13)(cid:23)(cid:22)(cid:1)(cid:29)(cid:30)(cid:28)(cid:13)(cid:21)(cid:19)(cid:20)(cid:30)(cid:1)(cid:31)(cid:25)(cid:30)(cid:21)(cid:23)(cid:1)(cid:35)(cid:26)(cid:31)(cid:1)(cid:19)(cid:17)(cid:30)(cid:1)(cid:30)(cid:26)(cid:1)(cid:13)(cid:1)(cid:30)(cid:13)(cid:14)(cid:23)(cid:17)(cid:1)(cid:33)(cid:21)(cid:30)(cid:20)(cid:1)(cid:15)(cid:20)(cid:13)(cid:21)(cid:28)(cid:29)(cid:1)(cid:30)(cid:20)(cid:17)(cid:25)(cid:1)(cid:29)(cid:30)(cid:26)(cid:27)(cid:5)(cid:1) (cid:5) (cid:11) (cid:5) (cid:10) (cid:5) (cid:9) (cid:5) (cid:8) (cid:6) (cid:8) (cid:6) (cid:9) (cid:6) (cid:10) (cid:6) (cid:11) (cid:9)(cid:17)(cid:15)(cid:30)(cid:31)(cid:28)(cid:17)(cid:1)(cid:2)(cid:6) (cid:11)(cid:17)(cid:33)(cid:13)(cid:28)(cid:16) (cid:5) (cid:11) (cid:2) (cid:5) (cid:8) (cid:6) (cid:8) (cid:5) (cid:9) (cid:6) (cid:9) (cid:5) (cid:10) (cid:6) (cid:10) (cid:12)(cid:6) (cid:11) (cid:1)(cid:7) (cid:11) (cid:2) (cid:2) BabyWalk (cid:11)(cid:17)(cid:33)(cid:13)(cid:28)(cid:16) (cid:12)(cid:6) (cid:10) (cid:12)(cid:6) (cid:10) (cid:12)(cid:6) (cid:11) (cid:9)(cid:17)(cid:15)(cid:30)(cid:31)(cid:28)(cid:17)(cid:1)(cid:2)(cid:7) (cid:5) (cid:8) (cid:6) (cid:8) (cid:5) (cid:9) (cid:6) (cid:9) (cid:5) (cid:10) (cid:2) (cid:2) (cid:2) (cid:5) (cid:11) (cid:1)(cid:7) (cid:11) (cid:5) (cid:10) (cid:5) (cid:8) (cid:6) (cid:8) (cid:5) (cid:9) (cid:6) (cid:9) (cid:2) (cid:2) (cid:1)(cid:7) (cid:10) BabyWalk BabyWalk (cid:6)(cid:17)(cid:15)(cid:25)(cid:23)(cid:26)(cid:25)(cid:28)(cid:20)(cid:29)(cid:20)(cid:25)(cid:24)(cid:1)(cid:25)(cid:18)(cid:1)(cid:13)(cid:1)(cid:24)(cid:13)(cid:31)(cid:20)(cid:19)(cid:13)(cid:29)(cid:20)(cid:25)(cid:24)(cid:1)(cid:29)(cid:13)(cid:28)(cid:21)(cid:1) (cid:10)(cid:8)(cid:1)(cid:15)(cid:30)(cid:27)(cid:27)(cid:20)(cid:15)(cid:30)(cid:22)(cid:30)(cid:23)(cid:1)(cid:16)(cid:17)(cid:28)(cid:20)(cid:19)(cid:24) (cid:9)(cid:20)(cid:26)(cid:17)(cid:22)(cid:20)(cid:24)(cid:17) (cid:4)(cid:13)(cid:5) (cid:11) (cid:14) (cid:4)(cid:13)(cid:5) (cid:11) (cid:14) (cid:4)(cid:13)(cid:5) (cid:10) (cid:14) Figure 3: Two-phase learning by BABYWALK . and the last visited state. We follow existing literature (Anderson et al., 2018; Fried et al., 2018) and use student-forcing based imitation learning, which uses agent's predicted action instead of the expert action for the trajectory rollout. We want the agent to be able to execute multiple consecutive BABY-STEP s and optimize its performance on following longer navigation instructions (instead of the cross-entropy losses from the imitation learning). However, there is a discrepancy between our goal of training the agent to cope with the uncertainty in a long instruction and the imitation learning agent's ability in accomplishing shorter tasks given the human annotated history . Thus it is challenging to directly optimize the agent with a typical RL learning procedure, even the imitation learning might have provided a good initialization for the policy, see our ablation study in  5.3. Inspired by the curriculum learning strategy (Bengio et al., 2009), we design an incremental learning process that the agent is presented with a curriculum of increasingly longer navigation tasks. Fig. 3 illustrates this idea with two lec-tures. Given a long navigation instruction X with M BABY-STEP s, for the k th lecture, the agent is given all the human expert's trajectory up to but not including the (M  k + 1) th BABY-STEP , as well as the history context z M  k +1 . The agent is then asked to execute the k th micro-instructions from x M  k +1 to x M using reinforcement learning to produce its trajectory that optimizes a task related R 2 R R 4 R R 6 R R 8 R Train seen instr. metric, for instance the fidelity metric measuring how faithful the agent follows the instructions. As we increase k from 1 to M , the agent faces the challenge of navigating longer and longer tasks with reinforcement learning. However, the agent only needs to improve its skills from its prior exposure to shorter ones. Our ablation studies show this is indeed a highly effective strategy. To our best knowledge, this is the first work studying how well VLN agents generalize to long navigation tasks. To this end, we create the following datasets in the same style as in (Jain et al., 2019). ROOM 6R OOM and ROOM 8R OOM We concatenate the trajectories in the training as well as the validation unseen split of the ROOM 2R OOM dataset for 3 times and 4 times respectively, thus extending the lengths of navigation tasks to 6 rooms and 8 rooms. To join, the end of the former trajectory must be within 0.5 meter with the beginning of the later trajectory. Table 1 and Fig. 4 contrast the different datasets in the # of instructions, the average length (in words) of instructions and how the distributions vary. Table 1 summarizes the descriptive statistics of BABY-STEP s across all datasets used in this paper. The datasets and the segmentation/alignments are made publically available 2 . In the following, we describe key information for research reproducibility, while the complete details are in the Appendix. States and Actions We follow (Fried et al., 2018) to set up the states as the visual features ( i.e . ResNet-152 features (He et al., 2016)) from the agent-centric panoramic views in 12 headings  3 elevations with 30 degree intervals. Likewise, we use the same panoramic action space. Identifying BABY-STEP s Our learning approach requires an agent to follow microinstructions ( i.e ., the BABY-STEP s). Existing datasets (Anderson et al., 2018; Jain et al., 2019; Chen et al., 2019) do not provide fine-grained segmentations of long instructions. Therefore, we use a template matching approach to aggregate consecutive sentences into BABY-STEP s. First, we extract the noun phrase using POS tagging. Then, we employs heuristic rules to chunk a long instruction into shorter segments according to punctuation and landmark phrase ( i.e ., words for concrete objects). We document the details in the Appendix. Without extra annotation , we propose a method to approximately chunk original expert trajectories into sub-trajectories that align with the BABYSTEP s. This is important for imitation learning at the micro-instruction level ( 4.2.1). Specifically, we learn a multi-label visual landmark classifier to identify concrete objects from the states along expert trajectories by using the landmark phrases 2 Available at https://github.com/Sha-Lab/ babywalk extracted from the their instructions as weak supervision. For each trajectory-instruction pair, we then extract the visual landmarks of every state as well as the landmark phrases in BABY-STEP instructions. Next, we perform a dynamic programming procedure to segment the expert trajectories by aligning the visual landmarks and landmark phrases, using the confidence scores of the multi-label visual landmark classifier to form the function. Encoders and Embeddings The encoder u (  ) for the (micro)instructions is a LSTM. The encoder for the trajectory y contains two separate Bi-LSTMs, one for the state s t and the other for the action a t . The outputs of the two Bi-LSTMs are then concatenated to form the embedding function v (  ) . The details of the neural network architectures ( i.e . configurations as well as an illustrative figure), optimization hyper-parameters, etc . are included in the Appendix. Learning Policy with Reinforcement Learning In the second phase of learning, BABYWALK uses RL to learn a policy that maximizes the fidelity-oriented rewards (CLS) proposed by Jain et al. (2019). We use policy gradient as the optimizer (Sutton et al., 2000). Meanwhile, we set the maximum number of lectures in curriculum RL to be 4, which is studied in Section 5.3. We describe the experimental setup ( 5.1),fol-lowed by the main results in  5.2 where we show the proposed BABYWALK agent attains competitive results on both the in-domain dataset but also generalizing to out-of-the-domain datasets with varying lengths of navigation tasks. We report results from various ablation studies in  5.3. While we primarily focus on the ROOM 4R OOM dataset, we re-analyze the original ROOM 2R OOM dataset in  5.4 and were surprised to find out the agents trained on it can generalize. Datasets We conduct empirical studies on the existing datasets ROOM 2R OOM and ROOM 4R OOM (Anderson et al., 2018; Jain et al., 2019), and the two newly created benchmark datasets ROOM 6R OOM and ROOM 8R OOM , described in  4.3. Table 1 and Fig. 4 contrast their differences. Evaluation Metrics We adopt the following metrics: Success Rate ( SR ) that measures the average rate of the agent stopping within a specified distance near the goal location (Anderson et al., 2018), Coverage weighted by Length Score ( CLS ) (Jain et al., 2019) that measures the fidelity of the agent's path to the reference, weighted by the length score, and the newly proposed Success rate weighted normalized Dynamic Time Warping ( SDTW ) that measures in more fine-grained details, the spatiotemporal similarity of the paths by the agent and the human expert, weighted by the success rate (Maga-lhaes et al., 2019). Both CLS and SDTW measure explicitly the agent's ability to follow instructions and in particular, it was shown that SDTW corresponds to human preferences the most. We report results in other metrics in the Appendix. Agents to Compare to Whenever possible, for all agents we compare to, we either re-run, reimplement or adapt publicly available codes from their corresponding authors with their provided instructions to ensure a fair comparison. We also sanity check by ensuring the results from our implementation and adaptation replicate and are comparable to the reported ones in the literature. We compare our BABYWALK to the following: (1) the SEQ 2 SEQ agent (Anderson et al., 2018), being adapted to the panoramic state and action space used in this work; (2) the Speaker Follower ( SF ) agent (Fried et al., 2018); (3) the Reinforced Cross-Modal Agent ( RCM ) (Wang et al., 2019) that refines the SF agent using reinforcement learning with either goal-oriented reward ( RCM ( GOAL )) or fidelity-oriented reward ( RCM ( FIDELITY )); (4) the Regretful Agent ( REGRETFUL ) (Ma et al., 2019b) that uses a progress monitor that records visited path and a regret module that performs backtracking; (5) the Frontier Aware Search with Backtracking agent ( FAST ) (Ke et al., 2019) that incorporates global and local knowledge to compare partial trajectories in different lengths. The last 3 agents are reported having state-of-the art results on the benchmark datasets. Except the SEQ 2 SEQ agent, all other agents depend on an additional pre-training stage with data augmentation (Fried et al., 2018), which improves cross-board. Thus, we train two BABYWALK agents: one with and the other without the data augmentation. In-domain Generalization This is the standard evaluation scenario where a trained agent is assessed on the unseen split from the same dataset as the training data. The leftmost columns in Table 2 reports the results where the training data is from R 4 R . The BABYWALK agents outperform all other agents when evaluated on CLS and SDTW . When evaluated on SR , FAST performs the best and the BABYWALK agents do not stand out. This is expected: agents which are trained to reach goal do not necessarily lead to better instruction-following. Note that RCM ( FIDELITY ) performs well in path-following. Out-of-domain Generalization While our primary goal is to train agents to generalize well to longer navigation tasks, we are also curious how the agents perform on shorter navigation tasks too. The right columns in Table 2 report the comparison. The BABYWALK agents outperform all other agents in all metrics except SR . In particular, on 2546 Figure 5: Performance by various agents on navigation tasks in different lengths. SDTW , the generalization to R 6 R and R 8 R is especially encouraging, resulting almost twice those of the second-best agent FAST . Moreover, recalling from Fig. 1, BABYWALK 's generalization to R 6 R and R 8 R attain even better performance than the RCM agents that are trained in-domain . Fig. 5 provides additional evidence on the success of BABYWALK , where we have contrasted to its performance to other agents' on following instructions in different lengths across all datasets . Clearly, the BABYWALK agent is able to improve very noticeably on longer instructions. Qualitative Results Fig. 6 contrasts visually several agents in executing two (long) navigation tasks. BABYWALK 's trajectories are similar to what human experts provide, while other agents' are not. Memory Buffer is Beneficial Table 3 illustrates the importance of having a memory buffer to summarize the agent's past experiences. Without the memory ( NULL ), generalization to longer tasks is significantly worse. Using LSTM to summarize is worse than using forgetting to summarize (eqs. (2,3)). Meanwhile, ablating  of the forgetting Setting R 4 R  R 4 R R 4 R  others Metrics SR  CLS  SDTW  SR  CLS  SDTW  IL 24.7 27.9 11.1 24.2 25.8 10.2 IL + RL 25.0 45.5 13.6 25.0 43.8 14.1 IL + CRL w/ LECTURE # 1 st 24.1 44.8 13.5 24.1 43.1 13.6 2 nd 26.7 45.9 15.2 26.2 43.7 14.8 3 rd 27.9 47.4 17.0 26.7 45.4 16.3 4 th 27.3 49.4 17.3 27.6 47.9 17.5 Table 4: BABYWALK 's performances with curriculum-based reinforcement learning ( CRL ), which improves imitation learning without or with reinforcement learning ( IL + RL ). mechanism concludes that  = 0 . 5 is the optimal to our hyperparameter search. Note that when  = 0 , this mechanism degenerates to taking average of the memory buffer, and leads to inferior results. Curriculum-based RL (CRL) is Important Table 4 establishes the value of CRL. While imitation learning ( IL ) provides a good warm-up for SR , significant improvement on other two metrics come from the subsequent RL ( IL + RL ). Furthermore, CRL (with 4 lectures) provides clear improvements over direct RL on the entire instruction ( i.e ., learning to execute all BABY-STEP s at once). Each lecture improves over the previous one, especially in terms of the SDTW metric. Our experimental study has been focusing on using R 4 R as the training dataset as it was established that as opposed to R 2 R , R 4 R distinguishes well an agent who just learns to reach the goal from an agent who learns to follow instructions. Given the encouraging results of generalizing to longer tasks, a natural question to ask, how well 2547 HUMANBABYWALK RCM SF SEQ 2 SEQ Figure 6: Trajectories by human experts and VLN agents on two navigation tasks. can an agent trained on R 2 R generalize? Results in Table 5 are interesting. Shown in the top panel, the difference in the averaged performance of generalizing to R 6 R and R 8 R is not significant. The agent trained on R 4 R has a small win on R 6 R presumably because R 4 R is closer to R 6 R than R 2 R does. But for even longer tasks in R 8 R , the win is similar. In the bottom panel, however, it seems that R 2 R  R 4 R is stronger (incurring less loss in performance when compared to the in-domain setting R 4 R  R 4 R ) than the reverse direction ( i.e ., comparing R 4 R  R 2 R to the in-domain R 2 R  R 2 R ). This might have been caused by the noisier segmentation of long instructions into BABY-STEP s in R 4 R . (While R 4 R is composed of two navigation paths in R 2 R , the segmentation algorithm is not aware of the natural boundaries between the two paths.) 6 Discussion There are a few future directions to pursue. First, despite the significant improvement, the gap between short and long tasks is still large and needs to be further reduced. Secondly, richer and more complicated variations between the learning setting and the real physical world need to be tackled. For instance, developing agents that are robust to variations in both visual appearance and instruction descriptions is an important next step. Acknowledgments We appreciate the feedback from the reviewers. This work is partially supported by NSF Awards IIS-1513966/1632803/1833137, CCF-1139148, DARPA Award#: FA8750-18-2-0117, DARPA-D3M Award UCB-00009528, Google Research Awards, gifts from Face-book and Netflix, and ARO# W911NF-12-1-0241 and W911NF-15-1-0484.
abstain method result objective abstain abstain abstain abstain objective abstain other abstain abstain abstain abstain abstain abstain abstain abstain objective abstain abstain abstain method method objective result abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method method abstain abstain abstain abstain abstain abstain abstain abstain method other other other other other method other method objective method other other objective other objective abstain method abstain abstain abstain method abstain abstain method method abstain method method method method method abstain abstain abstain method method method abstain abstain method abstain other abstain method method method abstain method method abstain abstain abstain method other abstain abstain abstain abstain abstain abstain abstain abstain method method abstain method method method method method abstain abstain abstain abstain method abstain method method method method abstain abstain method abstain method method abstain method method abstain method method method method method abstain other method method abstain abstain abstain abstain abstain abstain method method abstain result result method abstain method abstain method method method method abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain