Regression Planning Networks

09/28/2019 ∙ by Danfei Xu, et al. ∙ Stanford University 87

Recent learning-to-plan methods have shown promising results on planning directly from observation space. Yet, their ability to plan for long-horizon tasks is limited by the accuracy of the prediction model. On the other hand, classical symbolic planners show remarkable capabilities in solving long-horizon tasks, but they require predefined symbolic rules and symbolic states, restricting their real-world applicability. In this work, we combine the benefits of these two paradigms and propose a learning-to-plan method that can directly generate a long-term symbolic plan conditioned on high-dimensional observations. We borrow the idea of regression (backward) planning from classical planning literature and introduce Regression Planning Networks (RPN), a neural network architecture that plans backward starting at a task goal and generates a sequence of intermediate goals that reaches the current observation. We show that our model not only inherits many favorable traits from symbolic planning, e.g., the ability to solve previously unseen tasks but also can learn from visual inputs in an end-to-end manner. We evaluate the capabilities of RPN in a grid world environment and a simulated 3D kitchen environment featuring complex visual scenes and long task horizons, and show that it achieves near-optimal performance in completely new task instances.



page 7

page 8

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Performing real-world tasks such as cooking meals or assembling furniture requires an agent to determine long-term strategies. This is often formulated as a planning problem. In traditional AI literature, symbolic planners have shown remarkable capability in solving high-level reasoning problems by planning in human-interpretable symbolic spaces Fikes and Nilsson [1971], McDermott et al. [1998]. However, classical symbolic planning methods typically abstract away perception with ground-truth symbols and rely on pre-defined planning domains to specify the causal effects of actions. These assumptions significantly restrict the applicability of these methods in real environments, where states are high-dimensional (e.g., color images) and it’s tedious, if not impossible, to specify a detailed planning domain.

A solution to plan without relying on predefined action models and symbols is to learn to plan from observations. Recent works have shown that deep networks can capture the environment dynamics directly in the observation space Oh et al. [2015], Finn and Levine [2017], Agrawal et al. [2016] or a learned latent space Watter et al. [2015], Hafner et al. [2018], Kurutach et al. [2018]. With a learned dynamics model, these methods can plan a sequence of actions towards a desired goal through forward prediction. However, these learned models are far from accurate in long-term predictions due to the compounding errors over multiple steps. Moreover, due to the action-conditioned nature of these models, they are bound to use myopic sampling-based action selection for planning Agrawal et al. [2016], Finn and Levine [2017]. Such strategy may be sufficient for simple short-horizon tasks, e.g., pushing an object to a location, but they fall short in tasks that involve high-level decision making over longer timescale, e.g., making a meal.

In this work, we aim to combine the merits of planning from observation and the high-level reasoning ability and interpretability of classical planners. We propose a learning-to-plan method that can generate a long-term plan towards a symbolic task goal from high-dimensional observation inputs. As discussed above, the key challenge is that planning with either symbolic or observation space requires accurate forward models that are hard to obtain, namely symbolic planning domains and observation-space dynamics models. Instead, we propose to plan backward in a symbolic space conditioning on the current observation. Similar to forward planning, backward planning in symbolic space (formally known as regression planning Waldinger [1975], Korf [1987] or pre-image backchaining Lozano-Perez et al. [1984], Kaelbling and Lozano-Pérez [2011, 2017]) also relies on a planning domain to expand the search space starting from the final goal until the current state is reached. Our key insight is that by conditioning on the current observation, we can train a planner to directly predict a single path in the search space that connects the final goal to the current observation. The resulting plan is a sequence of intermediate goals that can be used to guide a low-level controller to interact with the environment and achieve the final task goal.

We present Regression Planning Networks (RPN), a neural network architecture that learns to perform regression planning (backward planning) in a symbolic planning space conditioned on environment observations. Central to the architecture is a precondition network that takes as input the current observation and a symbolic goal and iteratively predicts a sequence of intermediate goals in reverse order. In addition, the architecture exploits the compositional structure of the symbolic space by modeling the dependencies among symbolic subgoals with a dependency network. Such dependency information can be used to decompose a complex task goal into simpler subgoals, an essential mechanism to learn complex plans and generalize to new task goals. Finally, we present an algorithm that combines these networks to perform regression planning and invoke low-level controllers for executing the plan in the environment. An overview of our method is illustrated in Fig. 1.

We train RPN with supervisions from task demonstration data. Each demonstration consists of a sequence of intermediate symbolic goals, their corresponding environment observations, and a final symbolic task goal. An advantage of our approach is that the trained RPN models can compose seen plans to solve novel tasks that are outside of the training dataset. As we show in the experiments, when trained to cook two dishes with less than three ingredients, RPN can plan for a three-course meal with more ingredients with near-optimal performance. In contrast, we observe that the performance of methods that lack the essential components of our RPN degrades significantly when facing new tasks. We demonstrate the capabilities of RPN in solving tasks in two domains: a grid world environment that illustrates the essential features of RPN, and a 3D kitchen environment where we tackle the challenges of longer-horizon tasks and increased complexity of visual observations.

Figure 1: Regression (backward) planning with Regression Planning Networks (RPN): Starting from the final symbolic goal , our learning-based planner iteratively predicts a sequence of intermediate goals conditioning on the current observation until it reaches a goal that is reachable from the current state using a low-level controller.

2 Related Work

Although recent, there is a large body of prior works in learning to plan from observation. Methods in model-based RL Oh et al. [2015], Agrawal et al. [2016], Finn and Levine [2017], Hafner et al. [2018] have focused on building action-conditioned forward models and perform sampling-based planning. However, learning to make accurate predictions with high-dimensional observation is still challenging Oh et al. [2015], Watter et al. [2015], Finn and Levine [2017], Hafner et al. [2018], especially for long-horizon tasks. Recent works have proposed to learn structured latent representations for planning Kurutach et al. [2018], Corneil et al. [2018], Asai and Fukunaga [2018]. For example, Causal InfoGAN Kurutach et al. [2018] learns a latent binary representation that can be used jointly with graph-planning algorithm. However, similar to model-based RL, learning such representations relies on reconstructing the full input space, which can be difficult to scale to challenging visual domains. Instead, our method directly plans in a symbolic space, which allows more effective long-term planning and interpretability, while still taking high-dimensional observation as input.

Our work is also closely related to Universal Planning Networks Srinivas et al. [2018], which propose to learn planning computation from expert demonstrations. However, their planning by gradient descent scheme is not ideal for non-differentiable symbolic action space, and they require detailed action trajectories as training labels, which is agent-specific and can be hard to obtain in the case of human demonstrations. Our method does not require an explicit action space and learns directly from high-level symbolic goal information, which makes it agent-agnostic and adaptive to different low-level controllers.

Our method is inspired by classical symbolic planning, especially a) goal-regression planning Waldinger [1975] (also known as pre-image backchaining Lozano-Perez et al. [1984], Kaelbling and Lozano-Pérez [2011, 2017]), where the planning process regresses from instead progressing towards a goal, and b) the idea of partial-order planning Korf [1987], Weld [1994], where the ordering of the subgoals within a goal is exploited to reduce search complexity. However, these methods require (1) complete specification of a symbolic planning domain Fikes and Nilsson [1971] and (2) the initial symbolic state either given or obtained from a highly accurate symbol grounding module Harnad [1990], Kaelbling and Lozano-Pérez [2013]; both can be hard to obtain for real-world task domains. In contrast, our method does not perform explicit symbolic grounding and can generate a plan directly from a high-dimensional observation and a task goal.

Our network architecture design is inspired by recursive networks for natural language syntax modeling Irsoy and Cardie [2014], Socher et al. [2013] and program induction Reed and de Freitas [2016], Cai et al. [2017]. Given a goal and an environment observation, our RPN predicts a set of predecessor goals that need to be completed before achieving the goal. The regression planning process is then to apply RPN recursively by feeding the predicted goals back to the network until a predicted goal is reachable from the current observation.

3 Problem Definition and Preliminaries

3.1 Zero-shot Task Generalization with a Hierarchical Policy

The goal of zero-shot task generalization is to achieve task goals that are not seen during training Andreas et al. [2017], Oh et al. [2017], Sohn et al. [2018]. Each task goal belongs to a set of valid goals

. We consider an environment with transition probability

, where is a set of environment observations and a set of primitive actions. Given a symbolic task goal , the objective of an agent is to arrive at , where is the set of observations where is satisfied. We adopt a hierarchical policy setup where given a final goal and the current observation , a high-level policy generates an intermediate goal , and a low-level policy acts in the environment to achieve the intermediate goal. We assume a low-level policy can only perform short-horizon tasks. In this work, we focus on learning an effective high-level policy and assume the low-level policy can be either a pre-trained agent or a motion planner. For evaluation we consider a zero-shot generalization setup Oh et al. [2017], Sohn et al. [2018] where only a subset of the task goals, , is available during training, and the agent has to achieve a disjoint set of test task goals , where .

3.2 Regression Planning

In this work, we formulate the high-level policy as a learning-based regression planner. Goal-regression planning Waldinger [1975], Korf [1987], Lozano-Perez et al. [1984], Kaelbling and Lozano-Pérez [2011, 2017] is a class of symbolic planning algorithms, where the planning process runs backward from the goal instead of forward towards the goal. Given an initial symbolic state, a symbolic goal, and a planning domain that defines actions as their pre-conditions and post-effects (i.e., action operators), a regression planner starts by considering all action operators that might lead to the goal and in turn expand the search space by enumerating all preconditions of the action operators. The process repeats until the current symbolic state satisfies the preconditions of an operator. A plan is then a sequence of action operators that leads to the state from the goal.

An important distinction in our setup is that, because we do not assume access to these high-level action operators (from a symbolic planning domain) and the current symbolic state, we cannot perform explicitly such an exhaustive search process. Instead, our model learns to predict the preconditions that need to be satisfied in order to achieve a goal, conditioned on the current environment observation. Such ability enables our method to perform regression planning without explicit action operators, planning domain definition, or symbolic states.

We now define the essential concepts of regression planning adopted by our method. Following Kaelbling and Lozano-Pérez [2011], we define goal as the conjunction of a set of logical atoms, each consists of a predicate and a list of object arguments, e.g., On(pot, stove)IsOpen(fridge). We denote each atom in a subgoal . A subgoal can also be viewed as a goal with a single atom. We define preconditions of a goal or a subgoal as another intermediate goal that needs to be satisfied before attempting or conditioning on the environment observation. An intuitive example is that Open(fridge) is a precondition of InHand(apple) if the fridge is closed and the apple is in the fridge.

4 Method

Our primary contribution is to introduce a learning formulation of regression planning and propose Regression Planning Networks (RPN) as a solution. Here, we summarize the essential regression planning steps to be posed as learning problems, introduce the state representation used by our model, and explain our learning approach to solving regression planning.

Subgoal Serialization: The idea of subgoal serialization stems from partial order planning Korf [1987], Weld [1994], where a planning goal is broken into sub-goals, and the plans for each subgoal can be combined to reduce the search complexity. The challenge is to execute the subgoal plans in an order such that a plan does not undo an already achieved subgoal. The process of finding such orderings is called subgoal serialization Korf [1987]. Our method explicitly models the dependencies among subgoals and formulates subgoal serialization as a directed graph prediction problem (Sec. 4.1). This is an essential component for our method to learn to achieve complex goals and generalize to new goals.

Precondition Prediction: Finding the predecessor goals (preconditions) that need to be satisfied before attempting to achieve another goal is an essential step in planning backward. As discussed in Sec. 3.2, symbolic regression planners rely on a set of high-level action operators defined in a planning domain to enumerate valid preconditions. The challenge here is to directly predict the preconditions of a goal given an environment observation without assuming a planning domain. We formulate the problem of predicting preconditions as a graph node classification problem in Sec. 4.2.

The overall regression planning process is then as follows: Given a task goal, we (1) decompose the final task goal into subgoals and find the optimal ordering of completing the subgoals (subgoal serialization), (2) predict the preconditions of each subgoal, and (3) set the preconditions as the final goal and repeat (1) and (2) recursively. We implement the process with a recursive neural network architecture and an algorithm that invokes the networks to perform regression planning (Sec. 4.4).

Object-Centric Representation: To bridge between the symbolic representation of the goals and the raw observations, we adopt an object-centric state representation Wang et al. [2018], Janner et al. [2018], Wu et al. [2017]

. The general form is that each object is represented as a continuous-valued feature vector extracted from the observation. We extend such representation to

-ary relationships among the objects, where each relationship has its corresponding feature, akin to a scene-graph feature representation Xu et al. [2017]. We refer to objects and their -ary relationship as entities and their features as entity features, . Such factorization reflects that each goal atom indicates the desired symbolic state of an entity in the scene. For example, the goal On(A, B) indicates that the desired states of the binary entity (A, B) is A on top of B. We assume that either the environment observation is already in such entity-centric representations, or there exists a perception function that maps an observation to a set of entity features , where is the number of entities in an environment and is the feature dimension. As an example, can be a 2D object detector, and the features are simply the resulting image patches.

4.1 Learning Subgoal Serialization

We pose subgoal serialization as a learning problem. We say that a subgoal depends on subgoal if needs to be completed before attempting . For example, InHand(apple) depends on IsOpen(Fridge) if the apple is in the fridge. The process of subgoal serialization Korf [1987] is to find the optimal order to complete all subgoals by considering all dependencies among them. Following the taxonomy introduced by Korf et alKorf [1987], we consider four cases: we say that a set of subgoals is independent if the subgoals can be completed in any order and serializable if they can be completed in a fixed order. Often a subset of the subgoals needs to be completed together, e.g., Heated(pan) and On(stove), in which case these subgoals are called a subgoal block and is block-serializable. Non-serializable is a special case of block-serializable where the entire is a subgoal block.

To see how to pose subgoal serialization as a learning problem, we note that the dependencies among a set of subgoals can be viewed as a directed graph, where the nodes are individual subgoals and the directed edges are dependencies. Dependence and independence between a pair of subgoals can be expressed as a directed edge and its absence. We express subgoal block as a complete subgraph and likewise a non-serializable goal as a complete graph. The dependence between a subgoal block and a subgoal or another subgoal block can then be an edge between any node in the subgraph and an outside node or any node in another subgraph. For simplicity, we refer to both subgoals and subgoal blocks interchangeably from now on.

Now, we can formulate the subgoal serialization problem as a graph prediction problem. Concretely, given a goal and the corresponding entity features , our subgoal dependency network is then:


where is a score indicating if depends on . is a learnable network and is concatenation. We describe a subgoal serialization algorithm in Sec. 4.4.

4.2 Learning Precondition Prediction

We have discussed how to find the optimal order of completing a set of subgoals. The next step is to find the precondition of a subgoal or subgoal block, an essential step in planning backward. The preconditions of a subgoal is another goal that needs to be completed before attempting the subgoal at hand. To formulate it as a learning problem, we note that the subgoal and its preconditions may not share the same set of entities. For example, the precondition of InHand(apple) may be IsOpen(fridge). Hence a subgoal may map to any subgoals grounded on any entities in the scene. To realize such intuition, we formulate the precondition problem as a node classification problem Kipf and Welling [2016], where each node corresponds to a pair of goal predicate and entity in the scene. We consider three target classes, True and False corresponds to the logical state of the goal predicate, and a third Null class to indicate that the predicate is not part of the precondition. Concretely, given a goal or subgoal set and all entity features , the precondition network is then:


where is the predicted precondition of , and is a learnable network. Note that may only map to a subset of . fills the missing predicates with Null class before concatenating and .

Figure 2: Given a task goal, , and the current observation, , RPN performs subgoal serialization (Algorithm 1

) to find the highest priority subgoal and estimates whether the subgoal is reachable by one of the low-level controllers. If not, RPN predicts the preconditions of the subgoal and recursively uses them as new goal for the regression planning

4.3 Learning Subgoal Satisfaction and Reachability

Subgoal serialization determines the order of completing subgoals, but some of the subgoals might have already been completed. Here we use a learnable module to determine if a subgoal is already satisfied. We formulate the subgoal satisfaction problem as a single entity classification problem because whether a subgoal is satisfied does not depend on any other entity features. Similarly, we use another module to determine if a subgoal is reachable by a low-level controller from the current observation. We note that the reachability of a subgoal by a low-level controller may depend on the state of other entities. For example, whether we can launch a grasping planner to fetch an apple from the fridge depends on if the fridge door is open. Hence we formulate it as a binary classification problem conditioning on all entity features. Given a goal and its subgoals , the models can be expressed as:


where indicates if a subgoal is satisfied, and indicates if the goal is reachable by a low-level controller given the current observation.

Inputs: Current entity features , goal
for all  do
     if  then
     end if
end for
Algorithm 1 SubgoalSerialization

4.4 Regression Planning with RPN

Having described the essential components of RPN, we introduce an algorithm that invokes the network at inference time to generate a plan. Given the entity features and the final goal , the first step is to serialize the subgoals. We start by finding all subgoals are unsatisfied with and construct the input nodes for , which in turn predicts a directed graph structure. Then we use the Bron-Kerbosch algorithm Akkoyunlu [1973] to find all complete subgraphs and construct a DAG among all subgraphs. Finally, we use topological sorting to find the subgoal block that has the highest priority to be completed. The subgoal serialization subroutine is summarized in Algorithm 1. Given a subgoal, we first check if it is reachable by a low-level controller with , and invoke the controller with the subgoal if it is deemed reachable. Otherwise is used to find the preconditions of the subgoal and set it as the new goal. The overall process is illustrated in Fig. 2 and is in addition summarized with an algorithm in Appendix.

4.5 Supervision and Training

Supervision from demonstrations: We parse the training labels from task demonstrations generated by a hard-coded expert. A task demonstration consists of a sequence of intermediate goals and the corresponding environment observations . In addition, we also assume the dependencies among the subgoals of a goal are given in the form of a directed graph. A detailed discussion on training supervision is included in Appendix.

Training: We train all sub-networks with full supervision. Due to the recursive nature of our architecture, a long planning sequence can be optimized in parallel by considering the intermediate goals and their preconditions independent of the planning history. More details is included in the Appendix.

5 Experiments

Our experiments aim to (1) illustrate the essential features of RPN, especially the effect of regression planning and subgoal serialization, (2) test whether RPN can achieve zero-shot generalization to new task instances, and (3) test whether RPN can directly learn from visual observation inputs. We evaluate our method on two environments: an illustrative Grid World environment Chevalier-Boisvert et al. [2018] that dissects different aspects of the generalization challenges (Sec. 5.1), and a simulated Kitchen 3D domain (Sec. 5.2) that features complex visual scenes and long-horizon tasks in BulletPhysics Coumans and Bai [2016–2017].

We evaluate RPN including all components introduced in Sec. 4 to perform regression planning with the algorithm of Sec. 4.4 and compare the following baselines and ablation versions: 1) E2E, a reactive planner adopted from Pathak et alPathak et al. [2018] that learns to plan by imitating the expert trajectory. Because we do not assume a high-level action space, we train the planner to directly predict the next intermediate goal conditioning on the final goal and the current observation. The comparison to E2E is important to understand the effect of the inductive biases embedded in RPN. 2) SS-only shares the same network architecture as RPN, but instead of performing regression planning, it directly plans the next intermediate goal based on the highest-priority subgoal produced by Algorithm 1. This baseline evaluates in isolation the capabilities of our proposed subgoal serialization to decompose complex task goal into simpler subgoals. Similarly, in 3) RP-only we replace subgoal serialization (Algorithm 1) with a single network, measuring the capabilities of the backward planning alone.

5.1 Grid World

In this environment we remove the complexity of learning the visual features and focus on comparing planning capabilities of RPN and the baselines. The environment is the 2D grid world built on Chevalier-Boisvert et al. [2018] (see Table 1, left). The state space is factored into object-centric features, which consist of object types (door, key, etc), object state (e.g., door is open), object colors (six unique colors), and their locations relative to the agent. The goals are provided in a grounded symbolic expression as described in Sec. 3, e.g., Open(door_red)Open(door_blue). Both the expert demonstrator and the low-level controllers are -based search algorithm. Further details on training and evaluation setup are in the Appendix. In the grid world we consider two domains:

DoorKey: Six pairs of doors and keys, where a locked door can only be unlocked by the key of the same color. Doors are randomly initialized to be locked or unlocked. The training tasks consist of opening randomly selected doors (the other doors can be in any state). The evaluation tasks consist of opening doors, measuring the generalization capabilities of the methods to deal with new tasks composed of multiple instances of similar subtasks. The key to solving tasks involving more than two doors is to model opening each door as an independent subgoal.

RoomGoal: Six rooms connected to a central area by possibly locked and closed doors. The training data is evenly sampled from two tasks: k-d (key-door) is to open a randomly selected (possibly locked) door without getting into the room. d-g (door-goal) is to reach a tile by getting through a closed but unlocked door. In evaluation, the agent is asked to reach a specified tile by getting through a locked door (k-d-g), measuring the capabilities of the methods to compose plans learned from the two training tasks to form a longer unseen plan.

Domain DoorKey RoomGoal Train Eval Train Eval Task D=2 D=4 D=6 k-d d-g k-d-g E2E Pathak et al. [2018] 81.2 1.2 0.0 100.0 100.0 3.2 RP-only 92.2 18.2 0.0 100.0 100.0 100.0 SS-only 99.7 46.0 21.1 99.9 100.0 7.8 RPN 99.1 91.9 64.3 98.7 99.9 98.8
Table 1: (Left) Sample initial states of DoorKey and RoomGoal domains; (Right) Results of DoorKey and RoomGoal reported in average success rate (percentage).

Results: The results of both domains are shown in Table 1, right. In DoorKey, all methods except E2E almost perfectly learn to reproduce the training tasks. The performance drops significantly for the three baselines when increasing the number of doors, . RP-only degrades significantly for the inability to decompose the goal into independent parts, while the performance of SS-only degrades because, in addition to interpreting the goal, it also needs to determine if a key is needed and the color of the key to pick. However, it still achieves 21% success rate at . RPN maintains 64% success rate even for , although it has been trained with very few samples where all six doors are initialized as closed or locked. Most of the failures (21% of the episodes) are due to RPN not being able to predict any precondition while no subgoals are reachable (full error breakdown in Appendix).

In RoomGoal all methods almost perfectly learn the two training tasks. In particular, E2E achieves perfect performance, but it only achieves 3.2% success rate in the k-d-g long evaluation task. In contrast, both RP-only and RPN achieve optimal performance also on the k-d-g evaluation task, showing that our regression planning mechanism is enough to solve new tasks by composing learned plans, even when the planning steps connecting plans have never been observed during training.

5.2 Kitchen 3D

This environment features complex visual scenes and very long-horizon tasks composed of tabletop cooking and sorting subtasks. We test in this environment the full capabilities of each component in RPN, and whether the complete regression planning mechanism can solve previously unseen task instances without dropping performance while coping directly with high-dimensional visual inputs.

Figure 3: The Kitchen 3D environment. An agent (not shown) is tasked to prepare a meal with variable number of dishes and ingredients

Cooking: The task is for a robotic agent to prepare a meal consisting of a variable number of dishes, each involving a variety of ingredients and different cookwares. As shown in Fig. 4, the initial layout consists of a set of ingredients and plates randomly located at the center of the workspace surrounded by (1) a stove, (2) a sink, (3) two cookwares, and (4) three serving areas. There are two types of ingredients: fruits and vegetables, and six ingredients in total. An ingredient needs to be cleaned at the sink before cooking. An ingredient can be cooked by setting up the correct cookware at the stove, activating the stove, and placing the ingredient on the cookware. Fruits can only be cooked in the small pan and vegetables in the big pot.

Figure 4: Visualization of RPN solving a sample cooking task with one dish and two ingredients (, ): (Top) Visualization of the environment after a goal is achieved (zoom in to see details), and (Bottom) the regression planning trace generated by RPN. Additional video illustration is in the supplementary material.

The environment is simulated with Coumans and Bai [2016–2017]. A set of low-level controllers interact with objects to complete a subgoal, e.g., On(tomato, sink) invokes an RRT-based motion planner LaValle [1998] to pick up the tomato and place it in the sink. For the object-centric representation, we assume access to object bounding boxes of the input image and use a CNN-based encoder to encode individual image patches to . The encoder is trained end-to-end with the rest of the model. More details on network architectures and evaluation setup are available in the Appendix.

We focus on evaluating the ability to generalize to tasks that involve a different number of dishes () and ingredients (). The training tasks are to cook randomly chosen ingredients into dishes. The evaluation tasks are to cook meals with ingredients and dishes. In addition, cooking steps may vary depending on the order of cooking each ingredient, e.g., the agent has to set up the correct cookware before cooking an ingredient or turn on the stove/sink if these steps are not done from cooking the previous ingredient.

Train Evaluation
Task I=3, D=2 I=2, D=1 I=4, D=1 I=4, D=3 I=6, D=1 I=6, D=3
E2E Pathak et al. [2018] 5.0 0.1 16.4 0.1 2.3 <0.1 0.7 <0.1 0.0 0.0 0.0 0.0
RP-only 70.3 0.2 67.1 0.3 47.0 0.2 27.9 0.4 <0.1 <0.1 0.0 0.0
SS-only 49.1 0.2 59.3 0.7 56.6 0.2 43.4 0.2 42.8 0.2 32.7 0.5
RPN 98.5 <0.1 98.6 <0.1 98.2 0.1 98.4 <0.1 95.3 <0.1 97.2 0.1
Table 2:

Task success rate (percentage with standard error) in the Kitchen 3D domain.

Results: As shown in Table 4, RPN is able to achieve near-optimal performance on all tasks, showing that our method achieves strong zero-shot generalization even with visual inputs. In comparison, E2E performs poorly on both training and evaluation tasks and RP-only achieves high accuracy on training tasks, but the performance degrades significantly as the generalization difficulty increases. This shows that the regression planning is effective in modeling long-term plans but generalize poorly to new task goals. SS-only performs worse than RP-only in training tasks, but it is able to maintain reasonable performance across evaluation tasks by decomposing task goals to subgoals.

In Fig. 4, we visualize a sample planning trajectory generated by RPN on a two-ingredients one-dish task (). RPN is able to resolve the optimal order of completing each subgoal. In this case, RPN chooses to cook cabbage first and then banana. Note that the steps for cooking a banana is different than that of cooking cabbage: the agent does not have to activate the stove and the sink, but it has to set a pan on the stove in addition to the pot because fruits can only be cooked with pan. RPN is able to correctly generate different plans for the two ingredients and complete the task.

6 Conclusions

We present Regression Planning Networks, a learning-to-plan method that plans backward in an abstract symbolic space conditioned on high-dimensional environment observation inputs. We show that each component in RPN plays an important role to learn complex long-horizon tasks and to generalize to new task goals. In future work we plan to extend the regression planning mechanism to more complex but structured planning spaces such as geometric planning Kaelbling and Lozano-Pérez [2013] (e.g., including the object pose as part of a goal) and programs Reed and de Freitas [2016]. We also intend to learn high-level plans from visual demonstration datasets such as instructional videos Gu et al. [2018] to extend to real-world tasks.

7 Acknowledgement

This work has been partially supported by American Technologies Corporation (“JD”) under the SAIL-JD AI Research Initiative. This article solely reflects the opinions and conclusions of its authors and not JD or any entity associated with


  • Fikes and Nilsson [1971] Richard E Fikes and Nils J Nilsson. Strips: A new approach to the application of theorem proving to problem solving. Artificial intelligence, 2(3-4):189–208, 1971.
  • McDermott et al. [1998] Drew McDermott, Malik Ghallab, Adele Howe, Craig Knoblock, Ashwin Ram, Manuela Veloso, Daniel Weld, and David Wilkins. Pddl-the planning domain definition language. 1998.
  • Oh et al. [2015] Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in ATARI games. In NIPS, pages 2863–2871, 2015.
  • Finn and Levine [2017] Chelsea Finn and Sergey Levine. Deep visual foresight for planning robot motion. In ICRA, pages 2786–2793. IEEE, 2017.
  • Agrawal et al. [2016] Pulkit Agrawal, Ashvin V Nair, Pieter Abbeel, Jitendra Malik, and Sergey Levine. Learning to poke by poking: Experiential learning of intuitive physics. In Advances in Neural Information Processing Systems, pages 5074–5082, 2016.
  • Watter et al. [2015] Manuel Watter, Jost Springenberg, Joschka Boedecker, and Martin Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In Advances in neural information processing systems, pages 2746–2754, 2015.
  • Hafner et al. [2018] Danijar Hafner, Timothy Lillicrap, Ian Fischer, Ruben Villegas, David Ha, Honglak Lee, and James Davidson. Learning latent dynamics for planning from pixels. arXiv preprint arXiv:1811.04551, 2018.
  • Kurutach et al. [2018] Thanard Kurutach, Aviv Tamar, Ge Yang, Stuart J Russell, and Pieter Abbeel. Learning plannable representations with causal infogan. In Advances in Neural Information Processing Systems, pages 8733–8744, 2018.
  • Waldinger [1975] Richard Waldinger. Achieving several goals simultaneously. Stanford Research Institute Menlo Park, CA, 1975.
  • Korf [1987] Richard E Korf. Planning as search: A quantitative approach. Artificial Intelligence, 33(1):65–88, 1987.
  • Lozano-Perez et al. [1984] Tomas Lozano-Perez, Matthew T Mason, and Russell H Taylor. Automatic synthesis of fine-motion strategies for robots. The International Journal of Robotics Research, 3(1):3–24, 1984.
  • Kaelbling and Lozano-Pérez [2011] Leslie Pack Kaelbling and Tomás Lozano-Pérez. Hierarchical task and motion planning in the now. In ICRA, 2011.
  • Kaelbling and Lozano-Pérez [2017] Leslie Pack Kaelbling and Tomás Lozano-Pérez. Pre-image backchaining in belief space for mobile manipulation. In Robotics Research, pages 383–400. Springer, 2017.
  • Corneil et al. [2018] Dane Corneil, Wulfram Gerstner, and Johanni Brea.

    Efficient modelbased deep reinforcement learning with variational state tabulation.


    International Conference on Machine Learning

    , pages 1057–1066, 2018.
  • Asai and Fukunaga [2018] Masataro Asai and Alex Fukunaga. Classical planning in deep latent space: Bridging the subsymbolic-symbolic boundary. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
  • Srinivas et al. [2018] Aravind Srinivas, Allan Jabri, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Universal planning networks: Learning generalizable representations for visuomotor control. In International Conference on Machine Learning, pages 4739–4748, 2018.
  • Weld [1994] Daniel S Weld. An introduction to least commitment planning. AI magazine, 15(4):27–27, 1994.
  • Harnad [1990] Stevan Harnad. The symbol grounding problem. Physica D: Nonlinear Phenomena, 42(1-3):335–346, 1990.
  • Kaelbling and Lozano-Pérez [2013] Leslie Pack Kaelbling and Tomás Lozano-Pérez. Integrated task and motion planning in belief space. The International Journal of Robotics Research, 32(9-10):1194–1227, 2013.
  • Irsoy and Cardie [2014] Ozan Irsoy and Claire Cardie. Deep recursive neural networks for compositionality in language. In Advances in neural information processing systems, pages 2096–2104, 2014.
  • Socher et al. [2013] Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In

    Proceedings of the 2013 conference on empirical methods in natural language processing

    , pages 1631–1642, 2013.
  • Reed and de Freitas [2016] Scott Reed and Nando de Freitas. Neural programmer-interpreters. In ICLR, 2016.
  • Cai et al. [2017] Jonathon Cai, Richard Shin, and Dawn Song. Making neural programming architectures generalize via recursion. arXiv preprint arXiv:1704.06611, 2017.
  • Andreas et al. [2017] Jacob Andreas, Dan Klein, and Sergey Levine. Modular multitask reinforcement learning with policy sketches. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 166–175. JMLR. org, 2017.
  • Oh et al. [2017] Junhyuk Oh, Satinder Singh, Honglak Lee, and Pushmeet Kohli. Zero-shot task generalization with multi-task deep reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 2661–2670. JMLR. org, 2017.
  • Sohn et al. [2018] Sungryull Sohn, Junhyuk Oh, and Honglak Lee. Multitask reinforcement learning for zero-shot generalization with subtask dependencies. arXiv preprint arXiv:1807.07665, 2018.
  • Wang et al. [2018] Dequan Wang, Coline Devin, Qi-Zhi Cai, Fisher Yu, and Trevor Darrell. Deep object centric policies for autonomous driving. arXiv preprint arXiv:1811.05432, 2018.
  • Janner et al. [2018] Michael Janner, Sergey Levine, William T Freeman, Joshua B Tenenbaum, Chelsea Finn, and Jiajun Wu. Reasoning about physical interactions with object-oriented prediction and planning. arXiv preprint arXiv:1812.10972, 2018.
  • Wu et al. [2017] Jiajun Wu, Erika Lu, Pushmeet Kohli, Bill Freeman, and Josh Tenenbaum. Learning to see physics via visual de-animation. In Advances in Neural Information Processing Systems, pages 153–164, 2017.
  • Xu et al. [2017] Danfei Xu, Yuke Zhu, Christopher B Choy, and Li Fei-Fei. Scene graph generation by iterative message passing. In

    Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

    , pages 5410–5419, 2017.
  • Kipf and Welling [2016] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
  • Akkoyunlu [1973] Eralp Abdurrahim Akkoyunlu. The enumeration of maximal cliques of large graphs. SIAM Journal on Computing, 2(1):1–6, 1973.
  • Chevalier-Boisvert et al. [2018] Maxime Chevalier-Boisvert, Lucas Willems, and Suman Pal. Minimalistic gridworld environment for openai gym., 2018.
  • Coumans and Bai [2016–2017] Erwin Coumans and Yunfei Bai. pybullet, a python module for physics simulation, games, robotics and machine learning., 2016–2017.
  • Pathak et al. [2018] Deepak Pathak, Parsa Mahmoudieh, Guanghao Luo, Pulkit Agrawal, Dian Chen, Yide Shentu, Evan Shelhamer, Jitendra Malik, Alexei A Efros, and Trevor Darrell. Zero-shot visual imitation. In ICLR, 2018.
  • LaValle [1998] Steven M LaValle. Rapidly-exploring random trees: A new tool for path planning. 1998.
  • Gu et al. [2018] Chunhui Gu, Chen Sun, David A Ross, Carl Vondrick, Caroline Pantofaru, Yeqing Li, Sudheendra Vijayanarasimhan, George Toderici, Susanna Ricco, Rahul Sukthankar, et al. Ava: A video dataset of spatio-temporally localized atomic visual actions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6047–6056, 2018.
  • Kingma and Ba [2014] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
  • Paszke et al. [2017] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer.

    Automatic differentiation in pytorch.


8 Appendix

8.1 Architecture

Below we provide the details of our model size and architecture in the Kitchen 3D environment. The image encoder architecture is shared across all models. For Grid World, we use the same architecture but reduce all layer sizes by a factor of two. We use ReLU for activation. We train all models in all experiments with batch size of 128 and ADAM optimizer 

Kingma and Ba [2014] with learning rate

on a single GTX 1080 Ti GPU. We use a hold-out set for validation that runs every epoch. The models are implemented with PyTorch 

Paszke et al. [2017].

RPN MLP(128, 128, 128) MLP(128, 128, 128) MLP(128, 64, 64) MLP(128, 128, 128)
RP-only Same as RPN N/A Same as RPN N/A
SS-only N/A Same as RPN N/A Same as RPN
E2E MLP(256, 256, 256)
Image encoder
[Conv2D(k=3, c=64), MaxPool(2, 2),
Conv2D(k=3, c=128), MaxPool(2, 2),
Conv2D(k=3, c=32), MaxPool(2, 2)]

8.2 Regression Planning Algorithm

Here we summarize the full regression planning algorithm (the subroutine SubgoalSerialization is included in the main text). We set the maximum regression depth for all experiments.

Inputs: Current entity features , final goal , maximum regression depth
Outputs: Intermediate goal to be executed by a low-level controller.
while  do
     if  then
     end if
end while
Algorithm 2 RegressionPlanning

8.3 Experiments Details

8.3.1 Grid World

Environment: The environment is built on Chevalier-Boisvert et al. [2018], where an agent moves around a 2D grid to interact with objects. There are three types of objects in our setup: door, key, and tile indicating a goal location, and six unique colors for each object type. Doors can be in one of three states: (1) open, (2) close, (3) close and locked. A door can be only unlocked by the key of the same color, and a key can be used only once. Both the expert demonstrator and the low-level controllers are -based search algorithm. A low-level controller can be invoked to execute subgoals, e.g., Holding(key_red).

Planning space: We express task goals as conjunctive expressions such as Open(door_red) Open(door_blue). The symbolic planning space includes four unitary predicates: {Open, Locked, Holding, On}, where Open and Locked are for door-related goals. Holding is for picking up keys. On is for indicating a goal tile that the agent should reach in RoomGoal.

State representation: We factor the grid state information to object-centric features. Each feature is the concatenation of a set of one-hot vectors in the order of (1) object types (door, key, tile), (2) colors (6 in total), (3) object state (open, close, locked, holding), and (4) object location relative to the agent.

Evaluation: In the DoorKey domain, the task is to open out of 6 doors. We generate 5000 training task demonstration trajectories by randomly sampling the state of the doors and the locations of keys and the agent. The evaluation tasks are opening doors. For RoomGoal, the training tasks are evenly sampled from (1) opening a possibly locked door without getting into the room (k-d) and (2) opening an unlocked door and reach a goal tile (d-g). We generate 2500 task demonstrations for each training tasks and evenly sample from these trajectories during training. All evaluation results are reported by running 1000 trials for each task instance.

8.3.2 Kitchen 3D

Environment: The 3D environment is built using Bullet Physics Coumans and Bai [2016–2017]. We use a disemboddied gripper for both gathering training data and evaluation. To minimize the effect of low-level controller and focus on evaluating the high-level planners, we assume the controllers are macros equipped with RRT motion planners, and the picking and placing movements are coded as setting and removing motion constraints between an object and the gripper. The placing poses are sampled randomly on the target placing surface with a collision checking algorithm provided by Bullet Physics. The controller in addition have an atomic action to activate the stove and the sink.

Planning space: The symbolic planning space includes four predicates: {On, Cooked, Cleaned, Activated}, where On indicates desired binary relationship between pairs of objects, and the others are unary predicates for specifying desired object states. A typical cooking goal specifies ingredients, mapping from ingredients to plates, and which serving area should a plate be placed.

Rendering: Because we directly take in image observation as input, the state changes of the objects (e.g., an ingredient is cooked, the stove is activated) should be reflected visually. All such visual state changes are implemented with swapping the mesh textures and / or setting the transparency of the texture. For example, cooking an ingredient darkens its texture, and cleaning an object makes the texture semi-transparent. We plan to extend such visual changes to be more realistic and include gradual changes of the state instead of instant changes in the future. We set the gripper to be invisible when rendering to minimize the effect of occlusion.

State representation: We render the scene into RGB images with PyBullet’s built-in renderer. For object-centric representation, we crop the images into image patches for individual object with object bounding boxes. We reshape the object bounding boxes to be the minimum enclosing square that can cover the full object and expand the box sizes by a factor of 1.1 to emulate an object detector. We resize all image crops to and scale the pixels by before feeding to the image encoder (Sec. 8.1) and the rest of the network. The unary entity features are encodings of the individual image crops, and the binary entity features are the concatenation of encoding pairs.

Scene setup: For the scene setup, stove, sink, and the tray that initially holds cookwares have fixed locations. All ingredients and plates are initialized with random locations on the table. We have six ingredients in total, each fall into one of two types: fruits and vegetables. Fruits can only be cooked with the small pan, and vegetable can only be cooked with the big pot.

Evaluation: For training, we generate a total of 10800 trajectories for the task of cooking one dish with two randomly selected ingredients (). Both the choice of plates and the serving areas are random. All evaluation results are reported with 1000 trials for each evaluation task. The standard error is reported on running 5 evaluation trials with different random seeds.

8.4 Obtaining Training Supervision

We use expert demonstration trajectories annotated with intermediate goal information as training data. We envision a few sources of such demonstrations. First, one can provide intermediate goal trajectories and use hard-coded policies to follow the intermediate goals as instructions to generate the corresponding environment observations. We use such setup in this work and generate training data on simple tasks, from which we train our RPN to generalize to more complex tasks. Second, we also intend to extend our work to use human demonstrations annotated with sub-task information (e.g., the data of the instructional video dataset Gu et al. [2018]) as training data.

We include in Fig. 5 a sample intermediate goal trajectory and the subgoal-dependency information used to generated training data for the Kitchen3D environment (). The precondition training label is parsed by tracing in the list of intermediate goals the subgoals that are part of the final goal recursively. Labels to learn subgoals dependency are provided as direct graphs as shown in the figure. Satisfied and Reachable labels can be directly parsed while stepping through the intermediate goal list in execution.

Figure 5: A sample intermediate goal trajectory used to generated training data for the Kitchen 3D environment (). Each row in the intermediate goals is a step to be completed by a low-level policy. Dependencies are global information and are used when applicable. Such type of annotation is commonly provided as labels in instructional video datasets, where video segments are annotated with step-by-step sub-task information.

8.5 Additional Results

8.5.1 DoorKey: Error Breakdown

Here we show a detailed error breakdown of the evaluation tasks in the DoorKey environment.

Network Environment
Error Type Success All Sat No Prec Max Iter Controller Bad Goal Max Step
E2E 0.0 / / / 0.3 92.6 7.1
RP-only 0.0 0.0 91.8 0.0 0.2 8.0 0.0
SS-only 21.1 0.0 / / 0.0 78.9 0.0
Ours 64.3 0.9 21.3 8.7 0.1 1.4 3.3
Table 3: Error breakdown of task in the Doorkey environment reported in percentage.

We analyze two categories of errors: Environment and Network. Environment errors are errors occurred when the agent is interacting with the environment: Controller means that the low-level controller cannot find a valid path to reach a particular goal, e.g., all paths to reach a key is blocked. Bad Goal means that the goals predicted by the network are invalid, e.g., picking up a key that’s already been used. Max Step is that the maximum of steps that the environment allows is reached.

Network errors are internal errors from components of our RPN network: All Sat means that the network incorrectly predicts that all subgoals are satisfied and exits prematurely. No Prec means that the network cannot predict any preconditions while none of the subgoals is reachable. Max Iter means that the regression planning process has reached the maximum number of steps ( in Algorithm 2).

We see that the major source of error for E2E and SS-only is Bad Goal, i.e., the predicted goal is invalid to execute. We are able to catch these types of errors due to the simplicity of the grid world environment. However, this type of error may cause a low-level controller to behave unexpectedly in real-world tasks, causing security concerns. In contrast, RP-only and RPN both have very few such errors thanks to the robustness of our precondition networks. However, due to the inability to break a task goal into simpler parts, RP-only can easily make mistakes in the regression planning process, causing No Prec error. Finally, RPN is able to achieve 64% success rate while minimizing the errors occurred while interacting with the environment, highlighting a potential benefit of our system when deployed to real-world agents.

8.5.2 Kitchen 3D: Average Subgoal Completion Rate

In the main paper, we report results on the Kitchen 3D tasks in task success rate. However, this metric is not informative in the case where an agent can complete most part of a task but not the entire task, e.g., an agent can prepare 5 out of 6 ingredients in a task. Here we include results in a different metric: average fraction of subgoals completed. In the case of an episode where 5 out of 6 ingredients is successfully prepared for a task, the metric value would be . We include results using both metrics in Table 4 for reference.

Train Evaluation
Task I=3, D=2 I=2, D=1 I=4, D=1 I=4, D=3 I=6, D=1 I=6, D=3
E2E 5.0 / 8.3 16.4 / 21.2 2.3 / 3.7 0.7 / 3.0 0.0 / <0.1 0.0 / <0.1
RP-only 70.3 / 83.4 67.1 / 77.4 47.0 / 71.7 27.9 / 64.1 <0.1 / 23.9 0.0 / 22.9
SS-only 49.1 / 59.7 59.3 / 61.9 56.6 / 66.2 43.4 / 60.0 42.8 / 69.3 32.7 / 59.7
RPN 98.5 / 98.8 98.6 / 98.7 98.2 / 99.2 98.4 / 99.2 95.3 / 98.9 97.2 / 99.4
Table 4: Evaluation results on Kitchen 3D reported in: average task success rate / average subgoal completion rate. All standard errors for average subgoal completion rate is less or equal to 0.1 and is thus omitted.

We observe that for tasks, although RP-only has close to 0% task success rate, it on average can complete 23% of the subgoals. On the other hand, the performance degradation of SS-only is less pronounced in the new metric: it is able to maintain 60% average subgoal completion rate for all evaluation tasks, showing the power of goal decomposition.