Value Iteration Networks
Value Iteration Networks
Dept. of Electrical Engineering and Computer Sciences, UC Berkeley
Abstract
摘要
We introduce the value iteration network (VIN): a fully differentiable neural network with a ‘planning module’ embedded within. VINs can learn to plan, and are suitable for predicting outcomes that involve planning-based reasoning, such as policies for reinforcement learning. Key to our approach is a novel differentiable approximation of the value-iteration algorithm, which can be represented as a convolutional neural network, and trained end-to-end using standard backpropagation. We evaluate VIN based policies on discrete and continuous path-planning domains, and on a natural-language based search task. We show that by learning an explicit planning computation, VIN policies generalize better to new, unseen domains.
我们提出价值迭代网络(value iteration network,VIN):一种在内部嵌入了“规划模块”的、完全可微分的神经网络。VIN 能够学会规划,适合预测需要基于规划来推理的结果,例如强化学习中的策略。我们方法的关键是对价值迭代算法的一种新的可微分近似:它可以表示成卷积神经网络,并用标准反向传播做端到端训练。我们在离散和连续的路径规划域,以及一项基于自然语言的搜索任务上,评估了以 VIN 为基础的策略。结果表明,通过学习显式的规划计算,VIN 策略能更好地泛化到新的、未见过的域。
1 Introduction
1 引言
Over the last decade, deep convolutional neural networks (CNNs) have revolutionized supervised learning for tasks such as object recognition, action recognition, and semantic segmentation [3, 15, 6, 19]. Recently, CNNs have been applied to reinforcement learning (RL) tasks with visual observations such as Atari games [21], robotic manipulation [18], and imitation learning (IL) [9]. In these tasks, a neural network (NN) is trained to represent a policy – a mapping from an observation of the system’s state to an action, with the goal of representing a control strategy that has good long-term behavior, typically quantified as the minimization of a sequence of time-dependent costs.
过去十年,深度卷积神经网络(CNN)彻底改变了物体识别、动作识别和语义分割等监督学习任务 [3, 15, 6, 19]。近来,CNN 也被用到带视觉观察的强化学习(RL)任务中,例如 Atari 游戏 [21]、机器人操作 [18] 和模仿学习(IL)[9]。在这些任务里,神经网络(NN)被训练来表示一个策略:从系统状态的观察映射到动作,目标是表示一种具有良好长期行为的控制策略,通常量化为最小化一串随时间变化的代价。
The sequential nature of decision making in RL is inherently different than the one-step decisions in supervised learning, and in general requires some form of planning [2]. However, most recent deep RL works [21, 18, 9] employed NN architectures that are very similar to the standard networks used in supervised learning tasks, which typically consist of CNNs for feature extraction, and fully connected layers that map the features to a probability distribution over actions. Such networks are inherently reactive, and in particular, lack explicit planning computation. The success of reactive policies in sequential problems is due to the learning algorithm, which essentially trains a reactive policy to select actions that have good long-term consequences in its training domain.
强化学习中决策的序列性质,与监督学习里的单步决策本质上不同,一般需要某种形式的规划 [2]。然而,近来大多数深度强化学习工作 [21, 18, 9] 所采用的网络结构,与监督学习任务中的标准网络非常相似:通常用 CNN 提取特征,再用全连接层把特征映射成动作上的概率分布。这类网络本质上是反应式的,尤其是缺少显式的规划计算。反应式策略能在序列问题中取得成功,靠的是学习算法:它实质上是在训练域里,把反应式策略训练成会选择具有良好长期后果的动作。
To understand why planning can nevertheless be an important ingredient in a policy, consider the grid-world navigation task depicted in Figure 1 (left), in which the agent can observe a map of its domain, and is required to navigate between some obstacles to a target position. One hopes that after training a policy to solve several instances of this problem with different obstacle configurations, the policy would generalize to solve a different, unseen domain, as in Figure 1 (right). However, as we show in our experiments, while standard CNN-based networks can be easily trained to solve a set of such maps, they do not generalize well to new tasks outside this set, because they do not understand the goal-directed nature of the behavior. This observation suggests that the computation learned by reactive policies is different from planning, which is required to solve a new task.
要理解规划何以仍可能是策略中的重要成分,可以看图 1(左)中的网格世界导航任务:智能体能够观察到其所在域的地图,并需要在一些障碍物之间导航到目标位置。人们希望,在用若干种不同障碍布局的问题实例训练策略之后,该策略能够泛化,去解决如图 1(右)那样不同的、未见过的域。然而,正如我们在实验中表明的,标准的基于 CNN 的网络虽然很容易被训练来解决一组这样的地图,却不能很好地泛化到这组之外的新任务,因为它们并不理解这种行为的目标导向性质。这一观察表明,反应式策略所学到的计算不同于规划,而解决一项新任务需要的正是规划。
In principle, with enough training data that covers all possible task configurations, and a rich enough policy representation, a reactive policy can learn to map each task to its optimal policy. In practice, this is often too expensive, and we offer a more data-efficient approach by exploiting a flexible prior about the planning computation underlying the behavior.
原则上,如果训练数据足以覆盖所有可能的任务配置,并且策略表示足够丰富,反应式策略也可以学会把每个任务映射到其最优策略。实践中这往往代价过高,我们则利用关于行为背后规划计算的一种灵活先验,给出一种更节省数据的方法。
30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain.
In this work, we propose a NN-based policy that can effectively learn to plan. Our model, termed a value-iteration network (VIN), has a differentiable ‘planning program’ embedded within the NN structure.
在本工作中,我们提出一种能够有效学会规划的、基于神经网络的策略。我们的模型称为价值迭代网络(value-iteration network,VIN),在神经网络结构中嵌入了一个可微分的“规划程序”。
The key to our approach is an observation that the classic value-iteration (VI) planning algorithm [1, 2] may be represented by a specific type of CNN. By embedding such a VI network module inside a standard feed-forward classification network, we obtain a NN model that can learn the parameters of a planning computation that yields useful predictions. The VI block is differentiable, and the whole network can be trained using standard backpropagation. This makes our policy simple to train using standard RL and IL algorithms, and straightforward to integrate with NNs for perception and control.
我们方法的关键是这样一个观察:经典的价值迭代(value-iteration,VI)规划算法 [1, 2] 可以用一种特定类型的 CNN 来表示。把这样一个 VI 网络模块嵌入标准的前馈分类网络,我们就得到一个神经网络模型,它能够学习一种产生有用预测的规划计算的参数。VI 块是可微分的,整个网络可以用标准反向传播来训练。这使我们的策略易于用标准的强化学习和模仿学习算法训练,也便于与用于感知和控制的神经网络集成。
图 1:网格世界域的两个实例。任务是在障碍物之间移动到目标。
Connections between planning algorithms and recurrent NNs were previously explored by Ilin et al. [12]. Our work builds on related ideas, but results in a more broadly applicable policy representation. Our approach is different from model-based RL [25, 4], which requires system identification to map the observations to a dynamics model, which is then solved for a policy. In many applications, including robotic manipulation and locomotion, accurate system identification is difficult, and modelling errors can severely degrade the policy performance. In such domains, a model-free approach is often preferred [18]. Since a VIN is just a NN policy, it can be trained model free, without requiring explicit system identification. In addition, the effects of modelling errors in VINs can be mitigated by training the network end-to-end, similarly to the methods in [13, 11].
规划算法与循环神经网络之间的联系,此前已由 Ilin 等人 [12] 探讨过。我们的工作建立在相关想法之上,但得到的是一种适用面更广的策略表示。我们的方法不同于基于模型的强化学习 [25, 4],后者需要通过系统辨识把观察映射成动力学模型,再对该模型求解策略。在包括机器人操作和行走在内的许多应用中,精确的系统辨识很困难,建模误差会严重损害策略表现。在这类域中,人们往往更偏好无模型方法 [18]。VIN 本身只是一个神经网络策略,因此可以无模型地训练,不必做显式的系统辨识。此外,VIN 中建模误差的影响可以通过端到端训练网络来减轻,这与 [13, 11] 中的方法类似。
We demonstrate the effectiveness of VINs within standard RL and IL algorithms in various problems, among which require visual perception, continuous control, and also natural language based decision making in the WebNav challenge [23]. After training, the policy learns to map an observation to a planning computation relevant for the task, and generate action predictions based on the resulting plan. As we demonstrate, this leads to policies that generalize better to new, unseen, task instances.
我们在多种问题中展示了 VIN 与标准强化学习和模仿学习算法结合的有效性,其中有些需要视觉感知、连续控制,也包括 WebNav 挑战 [23] 中基于自然语言的决策。训练之后,策略学会把观察映射成与任务相关的规划计算,并基于得到的规划产生动作预测。正如我们将表明的,这会带来能更好地泛化到新的、未见过的任务实例的策略。
2 Background
2 背景
In this section we provide background on planning, value iteration, CNNs, and policy representations for RL and IL. In the sequel, we shall show that CNNs can implement a particular form of planning computation similar to the value iteration algorithm, which can then be used as a policy for RL or IL.
本节提供关于规划、价值迭代、CNN,以及强化学习和模仿学习中策略表示的背景。在后文中,我们将表明 CNN 可以实现一种与价值迭代算法相似的规划计算,并进而用作强化学习或模仿学习的策略。
Value Iteration: A standard model for sequential decision making and planning is the Markov decision process (MDP) [1, 2]. An MDP consists of states , actions , a reward function , and a transition kernel that encodes the probability of the next state given the current state and action. A policy prescribes an action distribution for each state. The goal in an MDP is to find a policy that obtains high rewards in the long term. Formally, the value of a state under policy is the expected discounted sum of rewards when starting from that state and executing policy , , where is a discount factor, and denotes an expectation over trajectories of states and actions , in which actions are selected according to , and states evolve according to the transition kernel . The optimal value function is the maximal long-term return possible from a state. A policy is said to be optimal if . A popular algorithm for calculating and is value iteration (VI):
价值迭代:序贯决策与规划的一个标准模型是马尔可夫决策过程(MDP)[1, 2]。一个 MDP 由状态 、动作 、奖励函数 ,以及编码在当前状态和动作下下一状态概率的转移核 组成。策略 为每个状态规定一个动作分布。MDP 中的目标是找到一个能在长期获得高奖励的策略。形式上,策略 下某个状态的价值 ,是从该状态出发并执行策略 时所获得奖励的期望折现和:,其中 是折现因子, 表示对状态与动作轨迹 的期望,轨迹中的动作按 选择,状态按转移核 演化。最优价值函数 是从某一状态出发可能得到的最大长期回报。若 ,则称策略 是最优的。计算 和 的一个常用算法就是价值迭代(VI):
It is well known that the value function in VI converges as to , from which an optimal policy may be derived as .
众所周知,价值迭代中的价值函数 在 时收敛到 ,由此可按 导出一个最优策略。
Convolutional Neural Networks (CNNs) are NNs with a particular architecture that has proved useful for computer vision, among other domains [8, 16, 3, 15]. A CNN is comprised of stacked convolution and max-pooling layers. The input to each convolution layer is a 3-dimensional signal , typically, an image with channels, horizontal pixels, and vertical pixels, and its output is a -channel convolution of the image with kernels , , where is some scalar activation function. A max-pooling layer selects, for each channel and pixel in , the maximum value among its neighbors , . Typically, the neighbors are chosen as a image patch around pixel . After max-pooling, the image is down-sampled by a constant factor , commonly 2 or 4, resulting in an output signal with channels, horizontal pixels, and vertical pixels. CNNs are typically trained using stochastic gradient descent (SGD), with backpropagation for computing gradients.
卷积神经网络(CNN)是具有特定结构的神经网络,这种结构已被证明在计算机视觉以及其他领域中很有用 [8, 16, 3, 15]。CNN 由堆叠的卷积层和最大池化层组成。每个卷积层的输入是一个三维信号 ,通常是具有 个通道、 个水平像素和 个垂直像素的图像;其输出 是该图像与卷积核 的 通道卷积,,其中 是某个标量激活函数。最大池化层对 中的每个通道 和像素 ,在其邻域 中选取最大值:。邻域 通常取为像素 周围的 图像块。最大池化之后,图像按常数因子 下采样,常见取值是 2 或 4,得到具有 个通道、 个水平像素和 个垂直像素的输出信号。CNN 通常用随机梯度下降(SGD)训练,并用反向传播计算梯度。
Reinforcement Learning and Imitation Learning: In MDPs where the state space is very large or continuous, or when the MDP transitions or rewards are not known in advance, planning algorithms cannot be applied. In these cases, a policy can be learned from either expert supervision – IL, or by trial and error – RL. While the learning algorithms in both cases are different, the policy representations – which are the focus of this work – are similar. Additionally, most state-of-the-art algorithms such as [24, 21, 26, 18] are agnostic to the policy representation, and only require it to be differentiable, for performing gradient descent on some algorithm-specific loss function. Therefore, in this paper we do not commit to a specific learning algorithm, and only consider the policy.
强化学习和模仿学习:当 MDP 的状态空间非常大或连续,或者转移或奖励事先未知时,规划算法无法直接使用。在这些情形下,策略可以从专家监督中学习,即模仿学习(IL),也可以通过试错来学习,即强化学习(RL)。两种情形下的学习算法不同,但策略表示——正是本工作的重点——是相似的。此外,大多数前沿算法,例如 [24, 21, 26, 18],对策略表示是无关的,只要求它可微分,以便对某种算法特定的损失函数做梯度下降。因此,本文并不绑定某一种具体的学习算法,而只讨论策略。
Let denote an observation for state . The policy is specified as a parametrized function mapping observations to a probability over actions, where are the policy parameters. For example, the policy could be represented as a neural network, with denoting the network weights. The goal is to tune the parameters such that the policy behaves well in the sense that , where is the optimal policy for the MDP, as defined in Section 2.
用 表示状态 的观察。策略被指定为一个参数化函数 ,把观察映射为动作上的概率,其中 是策略参数。例如,策略可以表示成一个神经网络, 就是网络权重。目标是调节参数,使策略表现良好,即 ,其中 是第 2 节所定义的该 MDP 的最优策略。
In IL, a dataset of state observations and corresponding optimal actions is generated by an expert. Learning a policy then becomes an instance of supervised learning [24, 9]. In RL, the optimal action is not available, but instead, the agent can act in the world and observe the rewards and state transitions its actions effect. RL algorithms such as in [27, 21, 26, 18] use these observations to improve the value of the policy.
在模仿学习中,由专家生成一个包含 个状态观察及相应最优动作的数据集 。学习策略于是成为监督学习的一个实例 [24, 9]。在强化学习中,最优动作不可得,但智能体可以在世界中行动,并观察其动作所带来的奖励和状态转移。诸如 [27, 21, 26, 18] 中的强化学习算法,利用这些观察来改进策略的价值。
3 The Value Iteration Network Model
3 价值迭代网络模型
In this section we introduce a general policy representation that embeds an explicit planning module. As stated earlier, the motivation for such a representation is that a natural solution to many tasks, such as the path planning described above, involves planning on some model of the domain.
本节引入一种嵌入了显式规划模块的通用策略表示。如前所述,采用这种表示的动机是:对许多任务(例如上面描述的路径规划)而言,一种自然的解法是在域的某个模型上做规划。
Let denote the MDP of the domain for which we design our policy . We assume that there is some unknown MDP such that the optimal plan in contains useful information about the optimal policy in the original task . However, we emphasize that we do not assume to know in advance. Our idea is to equip the policy with the ability to learn and solve , and to add the solution of as an element in the policy . We hypothesize that this will lead to a policy that automatically learns a useful to plan on. We denote by , , , and the states, actions, rewards, and transitions in . To facilitate a connection between and , we let and depend on the observation in , namely, and , and we will later learn the functions and as a part of the policy learning process.
用 表示我们为之设计策略 的那个域的 MDP。我们假定存在某个未知的 MDP ,使得 中的最优规划包含关于原任务 中最优策略的有用信息。不过我们强调,并不假定事先知道 。我们的想法是让策略具备学习和求解 的能力,并把 的解作为策略 中的一个要素。我们假设,这将导致策略自动学会一个对规划有用的 。我们用 、、 和 表示 中的状态、动作、奖励和转移。为了建立 与 之间的联系,我们让 和 依赖于 中的观察,即 ,,并在后文把函数 和 作为策略学习过程的一部分来学习。
For example, in the grid-world domain described above, we can let have the same state and action spaces as the true grid-world . The reward function can map an image of the domain to a high reward at the goal, and negative reward near an obstacle, while can encode deterministic movements in the grid-world that do not depend on the observation. While these rewards and transitions are not necessarily the true rewards and transitions in the task, an optimal plan in will still follow a trajectory that avoids obstacles and reaches the goal, similarly to the optimal plan in .
例如,在上面描述的网格世界域中,可以让 与真实网格世界 具有相同的状态和动作空间。奖励函数 可以把域的图像映射成:在目标处给出高奖励,在障碍附近给出负奖励;而 可以编码网格世界中不依赖于观察的确定性移动。尽管这些奖励和转移不一定是任务中的真实奖励和转移, 中的最优规划仍会沿着一条避开障碍并到达目标的轨迹,这与 中的最优规划类似。
Once an MDP has been specified, any standard planning algorithm can be used to obtain the value function . In the next section, we shall show that using a particular implementation of VI for planning has the advantage of being differentiable, and simple to implement within a NN framework. In this section however, we focus on how to use the planning result within the NN policy . Our approach is based on two important observations. The first is that the vector of values encodes all the information about the optimal plan in . Thus, adding the vector as additional features to the policy is sufficient for extracting information about the optimal plan in .
一旦指定了 MDP ,就可以用任何标准规划算法来得到价值函数 。下一节我们将表明,用一种特定的价值迭代实现来做规划,其优点是可微分,并且容易在神经网络框架中实现。不过在本节中,我们先关注如何在神经网络策略 中使用规划结果 。我们的方法基于两个重要观察。第一, 这一价值向量编码了关于 中最优规划的全部信息。因此,把向量 作为附加特征加入策略 ,就足以提取关于 中最优规划的信息。
However, an additional property of is that the optimal decision at a state can depend only on a subset of the values of , since . Therefore, if the MDP has a local connectivity structure, such as in the grid-world example above, the states for which is a small subset of .
然而, 还有一个额外性质:在状态 处的最优决策 可以只依赖于 中的一个子集,因为 。因此,如果 MDP 具有局部连通结构,例如上面的网格世界例子,使 的那些状态只是 的一个小子集。
In NN terminology, this is a form of attention [31], in the sense that for a given label prediction (action), only a subset of the input features (value function) is relevant. Attention is known to improve learning performance by reducing the effective number of network parameters during learning. Therefore, the second element in our network is an attention module that outputs a vector of (attention modulated) values . Finally, the vector is added as additional features to a reactive policy . The full network architecture is depicted in Figure 2 (left).
用神经网络的术语来说,这是一种注意力(attention)[31]:对一个给定的标签预测(动作),只有输入特征(价值函数)的一个子集是相关的。注意力被公认可以通过在学习过程中减少网络的有效参数数量来改进学习表现。因此,我们网络中的第二个要素是一个注意力模块,它输出一个(经过注意力调制的)价值向量 。最后,向量 作为附加特征被加入反应式策略 。完整的网络结构如图 2(左)所示。
Returning to our grid-world example, at a particular state , the reactive policy only needs to query the values of the states neighboring in order to select the correct action. Thus, the attention module in this case could return a vector with a subset of for these neighboring states.
回到网格世界的例子:在某个特定状态 ,反应式策略只需要查询 的邻近状态的价值,就能选择正确的动作。因此,在这种情形下,注意力模块可以返回一个 向量,其中包含这些邻近状态上 的一个子集。
图 2:基于规划的神经网络模型。左:一种通用策略表示,把规划器得到的价值函数特征加入反应式策略。右:VI 模块,即价值迭代算法的 CNN 表示。
Let denote all the parameters of the policy, namely, the parameters of , , and , and note that is in fact a function of . Therefore, the policy can be written in the form , similarly to the standard policy form (cf. Section 2). If we could back-propagate through this function, then potentially we could train the policy using standard RL and IL algorithms, just like any other standard policy representation. While it is easy to design functions and that are differentiable (and we provide several examples in our experiments), back-propagating the gradient through the planning algorithm is not trivial. In the following, we propose a novel interpretation of an approximate VI algorithm as a particular form of a CNN. This allows us to conveniently treat the planning module as just another NN, and by back-propagating through it, we can train the whole policy end-to-end.
用 表示策略的全部参数,即 、 和 的参数,并注意到 实际上是 的函数。因此,策略可以写成 的形式,与标准策略形式类似(参见第 2 节)。如果我们能够通过这个函数做反向传播,就有可能用标准的强化学习和模仿学习算法来训练该策略,就像训练任何其他标准策略表示一样。设计可微分的 和 并不困难(我们在实验中给出了若干例子),但让梯度穿过规划算法反向传播却并非易事。下文中,我们提出把一种近似价值迭代算法重新解释为一种特定形式的 CNN。这样我们就可以方便地把规划模块当作又一个神经网络,并通过它做反向传播,从而端到端地训练整个策略。
3.1 The VI Module
3.1 VI 模块
We now introduce the VI module – a NN that encodes a differentiable planning computation.
我们现在引入 VI 模块:一个编码了可微分规划计算的神经网络。
Our starting point is the VI algorithm (1). Our main observation is that each iteration of VI may be seen as passing the previous value function and reward function through a convolution layer and max-pooling layer. In this analogy, each channel in the convolution layer corresponds to the -function for a specific action, and convolution kernel weights correspond to the discounted transition probabilities. Thus by recurrently applying a convolution layer times, iterations of VI are effectively performed.
我们的出发点是价值迭代算法 (1)。主要观察是:价值迭代的每一轮,都可以看成把上一轮的价值函数 和奖励函数 送过一层卷积和一层最大池化。在这个类比中,卷积层的每个通道对应某一特定动作的 函数,卷积核权重对应折现后的转移概率。因此,把一层卷积循环使用 次,就等效于执行了 轮价值迭代。
Following this idea, we propose the VI network module, as depicted in Figure 2B. The inputs to the VI module is a ‘reward image’ of dimensions , where here, for the purpose of clarity, we follow the CNN formulation and explicitly assume that the state space maps to a 2-dimensional grid. However, our approach can be extended to general discrete state spaces, for example, a graph, as we report in the WikiNav experiment in Section 4.4. The reward is fed into a convolutional layer with channels and a linear activation function, . Each channel in this layer corresponds to for a particular action . This layer is then max-pooled along the actions channel to produce the next-iteration value function layer , . The next-iteration value function layer is then stacked with the reward , and fed back into the convolutional layer and max-pooling layer times, to perform iterations of value iteration.
顺着这一想法,我们提出如图 2B 所示的 VI 网络模块。VI 模块的输入是一幅尺寸为 的“奖励图像” 。这里为了表述清楚,我们沿用 CNN 的写法,并显式假定状态空间 映射到一个二维网格。不过,我们的方法可以推广到一般的离散状态空间,例如图,正如我们在第 4.4 节的 WikiNav 实验中所报告的。奖励被送入一个具有 个通道、线性激活函数的卷积层 ,。该层的每个通道对应某一特定动作 的 。然后沿动作通道做最大池化,得到下一轮价值函数层 ,。下一轮价值函数层 再与奖励 堆叠,并被送回卷积层和最大池化层,如此循环 次,以执行 轮价值迭代。
The VI module is simply a NN architecture that has the capability of performing an approximate VI computation. Nevertheless, representing VI in this form makes learning the MDP parameters and reward function natural – by backpropagating through the network, similarly to a standard CNN. VI modules can also be composed hierarchically, by treating the value of one VI module as additional input to another VI module. We further report on this idea in the supplementary material.
VI 模块不过是一种有能力执行近似价值迭代计算的神经网络结构。尽管如此,把价值迭代表示成这种形式,会使学习 MDP 参数和奖励函数变得自然:只需像标准 CNN 那样,通过网络做反向传播。VI 模块也可以分层组合,做法是把一个 VI 模块的价值当作另一个 VI 模块的附加输入。我们在补充材料中对这一想法有进一步报告。
3.2 Value Iteration Networks
3.2 价值迭代网络
We now have all the ingredients for a differentiable planning-based policy, which we term a value iteration network (VIN). The VIN is based on the general planning-based policy defined above, with the VI module as the planning algorithm. In order to implement a VIN, one has to specify the state and action spaces for the planning module and , the reward and transition functions and , and the attention function; we refer to this as the VIN design. For some tasks, as we show in our experiments, it is relatively straightforward to select a suitable design, while other tasks may require more thought. However, we emphasize an important point: the reward, transitions, and attention can be defined by parametric functions, and trained with the whole policy. Thus, a rough design can be specified, and then fine-tuned by end-to-end training.
至此,我们已具备构造一种可微分的、基于规划的策略的全部要素,我们称之为价值迭代网络(VIN)。VIN 建立在上面定义的通用规划型策略之上,并以 VI 模块作为规划算法。要实现一个 VIN,必须指定规划模块的状态与动作空间 和 、奖励和转移函数 与 ,以及注意力函数;我们把这些称作 VIN 设计。对某些任务,正如我们在实验中表明的,选择一个合适的设计相对直接;对另一些任务则可能需要更多考虑。不过有一点需要强调:奖励、转移和注意力都可以由参数化函数定义,并与整个策略一起训练。因此,可以先给出一个粗略设计,再通过端到端训练来微调。
VINs are fundamentally different than inverse RL methods [22], where transitions are required to be known.
VIN 与逆强化学习方法 [22] 有根本不同,后者要求转移是已知的。
Once a VIN design is chosen, implementing the VIN is straightforward, as it is simply a form of a CNN. The networks in our experiments all required only several lines of Theano [28] code. In the next section, we evaluate VIN policies on various domains, showing that by learning to plan, they achieve a better generalization capability.
一旦选定了 VIN 设计,实现起来就很直接,因为它本身只是一种形式的 CNN。我们实验中的网络都只需数行 Theano [28] 代码。下一节中,我们在多个域上评估 VIN 策略,表明通过学会规划,它们能获得更好的泛化能力。
4 Experiments
4 实验
In this section we evaluate VINs as policy representations on various domains. Additional experiments investigating RL and hierarchical VINs, as well as technical implementation details are discussed in the supplementary material. Source code is available at https://github.com/avivt/VIN.
本节在多个域上把 VIN 作为策略表示来评估。关于强化学习与分层 VIN 的补充实验,以及技术实现细节,在补充材料中讨论。源代码见 https://github.com/avivt/VIN。
Our goal in these experiments is to investigate the following questions:
这些实验的目标是考察下列问题:
- Can VINs effectively learn a planning computation using standard RL and IL algorithms?
- VIN 能否用标准的强化学习和模仿学习算法,有效地学会一种规划计算?
- Does the planning computation learned by VINs make them better than reactive policies at generalizing to new domains?
- VIN 所学到的规划计算,是否使它们在向新域泛化时优于反应式策略?
An additional goal is to point out several ideas for designing VINs for various tasks. While this is not an exhaustive list that fits all domains, we hope that it will motivate creative designs in future work.
另一个目标是指出若干为不同任务设计 VIN 的想法。这并不是一份适用于所有域的穷尽清单,但我们希望它能激发未来工作中的创造性设计。
4.1 Grid-World Domain
4.1 网格世界域
Our first experiment domain is a synthetic grid-world with randomly placed obstacles, in which the observation includes the position of the agent, and also an image of the map of obstacles and goal position. Figure 3 shows two random instances of such a grid-world of size . We conjecture that by learning the optimal policy for several instances of this domain, a VIN policy would learn the planning computation required to solve a new, unseen, task.
我们的第一个实验域是带有随机放置障碍物的合成网格世界,观察包括智能体的位置,以及障碍物地图和目标位置的图像。图 3 给出了两个尺寸为 的随机实例。我们猜想,通过学习该域若干实例上的最优策略,VIN 策略会学会解决一项新的、未见过的任务所需的规划计算。
In such a simple domain, an optimal policy can easily be calculated using exact VI. Note, however, that here we are interested in evaluating whether a NN policy, trained using RL or IL, can learn to plan. In the following results, policies were trained using IL, by standard supervised learning from demonstrations of the optimal policy. In the supplementary material, we report additional RL experiments that show similar findings.
在如此简单的域中,用精确价值迭代很容易算出最优策略。不过需要注意,这里我们关心的是:一个用强化学习或模仿学习训练的神经网络策略,能否学会规划。在下面的结果中,策略是用模仿学习训练的,即从最优策略的示范中做标准监督学习。补充材料中我们报告了更多强化学习实验,结论类似。
We design a VIN for this task following the guidelines described above, where the planning MDP is a grid-world, similar to the true MDP. The reward mapping is a CNN mapping the image input to a reward map in the grid-world. Thus, should potentially learn to discriminate between obstacles, non-obstacles and the goal, and assign a suitable reward to each. The transitions were defined as convolution kernels in the VI block, exploiting the fact that transitions in the grid-world are local. The recurrence was chosen in proportion to the grid-world size, to ensure that information can flow from the goal state to any other state. For the attention module, we chose a trivial approach that selects the values in the VI block for the current state, i.e., . The final reactive policy is a fully connected network that maps to a probability over actions.
我们按上面所述的原则为该任务设计 VIN,其中规划用 MDP 是一个与真实 MDP 类似的网格世界。奖励映射 是一个 CNN,把图像输入映射成网格世界上的奖励图。因此, 应当有可能学会区分障碍、非障碍和目标,并给每一类赋予合适的奖励。转移 被定义为 VI 块中的 卷积核,以利用网格世界中转移是局部的这一事实。循环次数 按网格世界的尺寸成比例选取,以确保信息能从目标状态流向任何其他状态。对于注意力模块,我们采用一种简单做法:选取 VI 块中当前状态的 值,即 。最后的反应式策略是一个全连接网络,把 映射为动作上的概率。
Note that the transitions defined this way do not depend on the state . Interestingly, we shall see that the network learned to plan successful trajectories nevertheless, by appropriately shaping the reward.
注意,这样定义的转移并不依赖于状态 。有意思的是,我们将会看到,网络仍然通过适当地塑造奖励,学会了规划出成功的轨迹。
We compare VINs to the following NN reactive policies:
我们把 VIN 与下列神经网络反应式策略加以比较:
CNN network: We devised a CNN-based reactive policy inspired by the recent impressive results of DQN [21], with 5 convolution layers, and a fully connected output. While the network in [21] was trained to predict values, our network outputs a probability over actions. These terms are related, since .
CNN 网络:我们设计了一种受 DQN [21] 近来出色结果启发的、基于 CNN 的反应式策略,含 5 个卷积层和一个全连接输出。[21] 中的网络被训练来预测 值,而我们的网络输出的是动作上的概率。这两项是相关的,因为 。
Fully Convolutional Network (FCN): The problem setting for this domain is similar to semantic segmentation [19], in which each pixel in the image is assigned a semantic label (the action in our case). We therefore devised an FCN inspired by a state-of-the-art semantic segmentation algorithm [19], with 3 convolution layers, where the first layer has a filter that spans the whole image, to properly convey information from the goal to every other state.
全卷积网络(FCN):该域的问题设定与语义分割 [19] 相似,即给图像中的每个像素指定一个语义标签(在我们这里就是动作)。因此我们设计了一种受当时先进语义分割算法 [19] 启发的 FCN,含 3 个卷积层,其中第一层的滤波器覆盖整幅图像,以便把来自目标的信息妥当地传送到每一个其他状态。
In Table 1 we present the average - prediction loss of each model, evaluated on a held-out test-set of maps with random obstacles, goals, and initial states, for different problem sizes. In addition, for each map, a full trajectory from the initial state was predicted, by iteratively rolling-out the next-states predicted by the network. A trajectory was said to succeed if it reached the goal without hitting obstacles. For each trajectory that succeeded, we also measured its difference in length from the optimal trajectory. The average difference and the average success rate are reported in Table 1.
在表 1 中,我们给出每个模型的平均 - 预测损失,评估是在由随机障碍、目标和初始状态构成的留出测试集上进行的,并覆盖不同的问题尺寸。此外,对每张地图,通过迭代地 rollout 网络所预测的下一状态,从初始状态预测出一条完整轨迹。一条轨迹若在不碰到障碍的情况下到达目标,则称为成功。对每条成功的轨迹,我们还测量了它与最优轨迹的长度差。平均差值与平均成功率也报告在表 1 中。
Figure 3: Grid-world domains (best viewed in color). A,B: Two random instances of the synthetic gridworld, with the VIN-predicted trajectories and ground-truth shortest paths between random start and goal positions. C: An image of the Mars domain, with points of elevation sharper than colored in red. These points were calculated from a matching image of elevation data (not shown), and were not available to the learning algorithm. Note the difficulty of distinguishing between obstacles and non-obstacles. D: The VIN-predicted (purple line with cross markers), and the shortest-path ground truth (blue line) trajectories between between random start and goal positions.
图 3:网格世界域(彩色阅读效果更好)。A、B:两个 合成网格世界的随机实例,图中给出 VIN 预测的轨迹,以及随机起点与终点之间的真实最短路径。C:火星域的一幅图像,坡度陡于 的点标成红色。这些点由配套的高程数据图像(未显示)计算得到,学习算法无法获得这些点。注意区分障碍与非障碍的困难。D:在随机起点与终点之间,VIN 预测的轨迹(带叉号标记的紫色线)以及最短路径真实轨迹(蓝色线)。
| Domain | VIN | VIN | VIN | CNN | CNN | CNN | FCN | FCN | FCN |
|---|---|---|---|---|---|---|---|---|---|
| Prediction loss | Success rate | Traj. diff. | Pred. loss | Succ. rate | Traj. diff. | Pred. loss | Succ. rate | Traj. diff. | |
| 0.004 | 99.6% | 0.001 | 0.02 | 97.9% | 0.006 | 0.01 | 97.3% | 0.004 | |
| 0.05 | 99.3% | 0.089 | 0.10 | 87.6% | 0.06 | 0.07 | 88.3% | 0.05 | |
| 0.11 | 97% | 0.086 | 0.13 | 74.2% | 0.078 | 0.09 | 76.6% | 0.08 |
Table 1: Performance on grid-world domain. Top: comparison with reactive policies. For all domain sizes, VIN networks significantly outperform standard reactive networks. Note that the performance gap increases dramatically with problem size.
| 域 | VIN | VIN | VIN | CNN | CNN | CNN | FCN | FCN | FCN |
|---|---|---|---|---|---|---|---|---|---|
| 预测损失 | 成功率 | 轨迹差 | 预测损失 | 成功率 | 轨迹差 | 预测损失 | 成功率 | 轨迹差 | |
| 0.004 | 99.6% | 0.001 | 0.02 | 97.9% | 0.006 | 0.01 | 97.3% | 0.004 | |
| 0.05 | 99.3% | 0.089 | 0.10 | 87.6% | 0.06 | 0.07 | 88.3% | 0.05 | |
| 0.11 | 97% | 0.086 | 0.13 | 74.2% | 0.078 | 0.09 | 76.6% | 0.08 |
表 1:网格世界域上的表现。上:与反应式策略的比较。在所有域尺寸上,VIN 网络都明显优于标准反应式网络。注意,表现差距随问题尺寸急剧增大。
Clearly, VIN policies generalize to domains outside the training set. A visualization of the reward mapping (see supplementary material) shows that it is negative at obstacles, positive at the goal, and a small negative constant otherwise. The resulting value function has a gradient pointing towards a direction to the goal around obstacles, thus a useful planning computation was learned. VINs also significantly outperform the reactive networks, and the performance gap increases dramatically with the problem size. Importantly, note that the prediction loss for the reactive policies is comparable to the VINs, although their success rate is significantly worse. This shows that this is not a standard case of overfitting/underfitting of the reactive policies. Rather, VIN policies, by their VI structure, focus prediction errors on less important parts of the trajectory, while reactive policies do not make this distinction, and learn the easily predictable parts of the trajectory yet fail on the complete task.
显然,VIN 策略能够泛化到训练集之外的域。对奖励映射 的可视化(见补充材料)表明:它在障碍处为负,在目标处为正,在其余位置则是一个较小的负常数。由此得到的价值函数在障碍周围具有指向目标方向的梯度,因此学到了一种有用的规划计算。VIN 也明显优于反应式网络,而且表现差距随问题尺寸急剧增大。重要的是,反应式策略的预测损失与 VIN 相当,但其成功率却差得多。这说明,这并不是反应式策略标准意义上的过拟合或欠拟合。相反,VIN 策略凭借其价值迭代结构,把预测误差集中在轨迹中不太重要的部分;反应式策略则不做这种区分,学会了轨迹中容易预测的部分,却在完整任务上失败。
The VINs have an effective depth of , which is larger than the depth of the reactive policies. One may wonder, whether any deep enough network would learn to plan. In principle, a CNN or FCN of depth has the potential to perform the same computation as a VIN. However, it has much more parameters, requiring much more training data. We evaluate this by untying the weights in the recurrent layers in the VIN. Our results, reported in the supplementary material, show that untying the weights degrades performance, with a stronger effect for smaller sizes of training data.
VIN 的有效深度是 ,大于反应式策略的深度。人们可能会问,是否任意一个足够深的网络都会学会规划。原则上,深度为 的 CNN 或 FCN 有可能执行与 VIN 相同的计算。然而,它的参数要多得多,因而需要多得多的训练数据。我们通过解开 VIN 中 个循环层的权重来评估这一点。补充材料中报告的结果表明,解开权重会损害性能,而且在训练数据更少时影响更强。
4.2 Mars Rover Navigation
4.2 火星车导航
In this experiment we show that VINs can learn to plan from natural image input. We demonstrate this on path-planning from overhead terrain images of a Mars landscape.
在本实验中,我们表明 VIN 能够从自然图像输入中学会规划。我们用火星地貌的俯瞰地形图像上的路径规划来展示这一点。
Each domain is represented by a image patch, on which we defined a grid-world, where each state was considered an obstacle if the terrain in its corresponding image patch contained an elevation angle of 10 degrees or more, evaluated using an external elevation data base. An example of the domain and terrain image is depicted in Figure 3. The MDP for shortest-path planning in this case is similar to the grid-world domain of Section 4.1, and the VIN design was similar, only with a deeper CNN in the reward mapping for processing the image.
每个域由一个 的图像块表示,我们在其上定义一个 的网格世界;若某状态所对应的 图像块中的地形含有 10 度或更大的高程角(用外部高程数据库评估),则该状态被视为障碍。域与地形图像的一个例子见图 3。此时最短路径规划的 MDP 与第 4.1 节的网格世界域相似,VIN 设计也相似,只是奖励映射 中用于处理图像的 CNN 更深。
The policy was trained to predict the shortest-path directly from the terrain image. We emphasize that the elevation data is not part of the input, and must be inferred (if needed) from the terrain image.
该策略被训练为直接从地形图像预测最短路径。我们强调,高程数据不是输入的一部分,必须(如有需要)从地形图像中推断。
After training, VIN achieved a success rate of 84.8%. To put this rate in context, we compare with the best performance achievable without access to the elevation data, which is 90.3%. To make this comparison, we trained a CNN to classify whether an patch is an obstacle or not. This classifier was trained using the same image data as the VIN network, but its labels were the true obstacle classifications from the elevation map (we reiterate that the VIN did not have access to these ground-truth obstacle labels during training or testing). The success rate of planner that uses the obstacle map generated by this classifier from the raw image is 90.3%, showing that obstacle identification from the raw image is indeed challenging. Thus, the success rate of the VIN, which was trained without any obstacle labels, and had to ‘figure out’ the planning process is quite remarkable.
训练之后,VIN 达到了 84.8% 的成功率。为了给这个数字一个参照,我们与在无法获得高程数据时所能达到的最好表现比较,后者是 90.3%。为做这一比较,我们训练了一个 CNN 来分类一个 图像块是否为障碍。该分类器使用与 VIN 网络相同的图像数据训练,但其标签是来自高程图的真实障碍分类(我们再次说明,VIN 在训练或测试中都无法获得这些真实障碍标签)。用该分类器从原始图像生成的障碍图再做规划,成功率为 90.3%,这说明从原始图像识别障碍确实很困难。因此,VIN 在没有任何障碍标签的情况下训练、还必须自己“弄清”规划过程,却达到这样的成功率,相当可观。
4.3 Continuous Control
4.3 连续控制
We now consider a 2D path planning domain with continuous states and continuous actions, which cannot be solved using VI, and therefore a VIN cannot be naively applied. Instead, we will construct the VIN to perform ‘high-level’ planning on a discrete, coarse, grid-world representation of the continuous domain. We shall show that a VIN can learn to plan such a ‘high-level’ plan, and also exploit that plan within its ‘low-level’ continuous control policy. Moreover, the VIN policy results in better generalization than a reactive policy.
我们现在考虑一个具有连续状态和连续动作的二维路径规划域,它无法用价值迭代求解,因此不能把 VIN 直接套用上去。相反,我们将构造 VIN,使其在该连续域的一种离散、粗糙的网格世界表示上做“高层”规划。我们将表明,VIN 能够学会做出这样的“高层”规划,并在其“低层”连续控制策略中利用该规划。此外,VIN 策略带来的泛化也优于反应式策略。
Consider the domain in Figure 4. A red-colored particle needs to be navigated to a green goal using horizontal and vertical forces. Gray-colored obstacles are randomly positioned in the domain, and apply an elastic force and friction when contacted. This domain presents a non-trivial control problem, as the agent needs to both plan a feasible trajectory between the obstacles (or use them to bounce off), but also control the particle (which has mass and inertia) to follow it. The state observation consists of the particle’s continuous position and velocity, and a static downscaled image of the obstacles and goal position in the domain. In principle, such an observation is sufficient to devise a ‘rough plan’ for the particle to follow.
考虑图 4 中的域。一颗红色粒子需要借助水平和垂直方向的力,被导航到绿色目标。灰色障碍物随机分布在域中,接触时施加弹性力和摩擦力。该域提出了一个非平凡的控制问题:智能体既要在障碍之间规划出一条可行轨迹(或利用障碍反弹),又要控制具有质量和惯性的粒子去跟随这条轨迹。状态观察包括粒子的连续位置与速度,以及一幅把域中障碍和目标位置缩小后的静态 图像。原则上,这样的观察足以制定一个供粒子跟随的“粗略计划”。
图 4:连续控制域。上:VIN 与 CNN 策略在训练域和测试域上到目标的平均距离。下:VIN 与 CNN 在测试域上预测的轨迹。
As in our previous experiments, we investigate whether a policy trained on several instances of this domain with different start state, goal, and obstacle positions, would generalize to an unseen domain. For training we chose the guided policy search (GPS) algorithm with unknown dynamics [17], which is suitable for learning policies for continuous dynamics with contacts, and we used the publicly available GPS code [7], and Mujoco [29] for physical simulation. We generated 200 random training instances, and evaluate our performance on 40 different test instances from the same distribution.
与前面的实验一样,我们考察:在该域的若干实例(起点、目标和障碍位置各不相同)上训练出的策略,能否泛化到一个未见过的域。训练时我们选用了未知动力学下的 guided policy search(GPS)算法 [17],它适合学习带接触的连续动力学策略;我们使用公开的 GPS 代码 [7],并用 Mujoco [29] 做物理仿真。我们生成了 200 个随机训练实例,并在来自同一分布的 40 个不同测试实例上评估表现。
Our VIN design is similar to the grid-world cases, with some important modifications: the attention module selects a patch of the value , centered around the current (discretized) position in the map. The final reactive policy is a 3-layer fully connected network, with a 2-dimensional continuous output for the controls. In addition, due to the limited number of training domains, we pre-trained the VIN with transition weights that correspond to discounted grid-world transitions. This is a reasonable prior for the weights in a 2-d task, and we emphasize that even with this initialization, the initial value function is meaningless, since the reward map is not yet learned. We compare with a CNN-based reactive policy inspired by the state-of-the-art results in [21, 20], with 2 CNN layers for image processing, followed by a 3-layer fully connected network similar to the VIN reactive policy.
我们的 VIN 设计与网格世界情形相似,但有几处重要修改:注意力模块选取价值 中以当前(离散化)地图位置为中心的 块。最后的反应式策略是一个 3 层全连接网络,输出二维连续控制量。此外,由于训练域数量有限,我们用对应于折现网格世界转移的权重对 VIN 做了预训练。对二维任务而言,这是一种合理的权重先验;我们强调,即便有这一初始化,初始价值函数仍然没有意义,因为奖励图 尚未被学习。对照是一种受 [21, 20] 中先进结果启发的、基于 CNN 的反应式策略,用 2 个 CNN 层处理图像,再接一个与 VIN 反应式策略类似的 3 层全连接网络。
Figure 4 shows the performance of the trained policies, measured as the final distance to the target. The VIN clearly outperforms the CNN on test domains. We also plot several trajectories of both policies on test domains, showing that VIN learned a more sensible generalization of the task.
图 4 给出了训练后策略的表现,度量是到目标的最终距离。在测试域上,VIN 明显优于 CNN。我们还绘制了两种策略在测试域上的若干轨迹,表明 VIN 学到了对该任务更为合理的泛化。
4.4 WebNav Challenge
4.4 WebNav 挑战
In the previous experiments, the planning aspect of the task corresponded to 2D navigation. We now consider a more general domain: WebNav [23] – a language based search task on a graph.
在前面的实验中,任务的规划方面对应于二维导航。我们现在考虑一个更一般的域:WebNav [23],即图上的一项基于语言的搜索任务。
In WebNav [23], the agent needs to navigate the links of a website towards a goal web-page, specified by a short 4-sentence query. At each state (web-page), the agent can observe average word-embedding features of the state and possible next states (linked pages), and the features of the query , and based on that has to select which link to follow. In [23], the search was performed on the Wikipedia website. Here, we report experiments on the ‘Wikipedia for Schools’ website, a simplified Wikipedia designed for children, with over 6000 pages and at most 292 links per page.
在 WebNav [23] 中,智能体需要沿着一个网站的链接导航,走到由一段短的 4 句查询所指定的目标网页。在每个状态 (网页),智能体可以观察到该状态的平均词嵌入特征 、可能的下一状态(链接页)的特征 ,以及查询的特征 ,并据此选择跟随哪一条链接。[23] 中的搜索是在 Wikipedia 网站上进行的。这里,我们报告在 “Wikipedia for Schools” 网站上的实验,这是一个为儿童设计的简化版 Wikipedia,有超过 6000 个页面,每页最多 292 条链接。
In [23], a NN-based policy was proposed, which first learns a NN mapping from to a hidden state vector . The action is then selected according to . In essence, this policy is reactive, and relies on the word embedding features at each state to contain meaningful information about the path to the goal. Indeed, this property naturally holds for an encyclopedic website that is structured as a tree of categories, sub-categories, sub-sub-categories, etc.
在 [23] 中,提出了一种基于神经网络的策略:它首先学习一个从 到隐状态向量 的神经网络映射,再按 选择动作。本质上,这一策略是反应式的,并依赖于每个状态上的词嵌入特征包含关于通往目标之路的有意义信息。对于一个按类别、子类别、子子类别等组织成树的百科全书式网站,这一性质确实自然成立。
We sought to explore whether planning, based on a VIN, can lead to better performance in this task, with the intuition that a plan on a simplified model of the website can help guide the reactive policy in difficult queries. Therefore, we designed a VIN that plans on a small subset of the graph that contains only the 1st and 2nd level categories ( of the graph), and their word-embedding features.
我们想探索:基于 VIN 的规划能否在这一任务上带来更好的表现,直觉是,在网站的一个简化模型上做出的规划,可以帮助引导反应式策略处理困难查询。因此,我们设计了一个 VIN,它只在图的一个小子集上规划,该子集仅包含第一级和第二级类别(不到全图的 )及其词嵌入特征。
Designing this VIN requires a different approach from the grid-world VINs described earlier, where the most challenging aspect is to define a meaningful mapping between nodes in the true graph and nodes in the smaller VIN graph. For the reward mapping , we chose a weighted similarity measure between the query features , and the features of nodes in the small graph . Thus, intuitively, nodes that are similar to the query should have high reward. The transitions were fixed based on the graph connectivity of the smaller VIN graph, which is known, though different from the true graph. The attention module was also based on a weighted similarity measure between the features of the possible next states and the features of each node in the simplified graph . The reactive policy part of the VIN was similar to the policy of [23] described above. Note that by training such a VIN end-to-end, we are effectively learning how to exploit the small graph for doing better planning on the true, large graph.
设计这个 VIN 需要一种与前面所述网格世界 VIN 不同的途径,其中最困难的是定义真实图中的节点与较小 VIN 图中节点之间有意义的映射。对于奖励映射 ,我们选用查询特征 与小图中节点特征 之间的加权相似度。因此,直观上,与查询相似的节点应具有高奖励。转移则根据较小 VIN 图的图连通性固定下来,该连通性是已知的,尽管与真实图不同。注意力模块同样基于可能的下一状态特征 与简化图中各节点特征 之间的加权相似度。VIN 的反应式策略部分与上面所述 [23] 的策略相似。注意,通过端到端训练这样一个 VIN,我们实际上是在学习如何利用这张小图,在真实的大图上做出更好的规划。
Both the VIN policy and the baseline reactive policy were trained by supervised learning, on random trajectories that start from the root node of the graph. Similarly to [23], a policy is said to succeed a query if all the correct predictions along the path are within its top-4 predictions.
VIN 策略和作为基线的反应式策略都用监督学习训练,数据是从该图根节点出发的随机轨迹。与 [23] 类似,若一条路径上所有正确预测都落在策略的前 4 个预测之内,则称该策略成功完成了这一查询。
After training, the VIN policy performed mildly better than the baseline on 2000 held-out test queries when starting from the root node, achieving 1030 successful runs vs. 1025 for the baseline. However, when we tested the policies on a harder task of starting from a random position in the graph, VINs significantly outperformed the baseline, achieving 346 successful runs vs. 304 for the baseline, out of 4000 test queries. These results confirm that indeed, when navigating a tree of categories from the root up, the features at each state contain meaningful information about the path to the goal, making a reactive policy sufficient. However, when starting the navigation from a different state, a reactive policy may fail to understand that it needs to first go back to the root and switch to a different branch in the tree. Our results indicate such a strategy can be better represented by a VIN.
训练之后,从根节点出发时,VIN 策略在 2000 条留出测试查询上略优于基线,成功 1030 次,基线为 1025 次。然而,当我们在更难的设定下测试这些策略,即从图中的随机位置出发时,VIN 明显优于基线:在 4000 条测试查询中,VIN 成功 346 次,基线为 304 次。这些结果证实:当从根节点沿类别树往上导航时,每个状态上的特征已经包含关于通往目标之路的有意义信息,反应式策略就足够了。可是,当导航从另一个状态开始时,反应式策略可能无法理解它需要先回到根,再切换到树的另一分支。我们的结果表明,这样一种策略可以由 VIN 更好地表示。
We remark that there is still room for further improvements of the WebNav results, e.g., by better models for reward and attention functions, and better word-embedding representations of text.
我们要指出,WebNav 的结果仍有进一步改进的余地,例如采用更好的奖励和注意力函数模型,以及更好的文本词嵌入表示。
5 Conclusion and Outlook
5 结论与展望
The introduction of powerful and scalable RL methods has opened up a range of new problems for deep learning. However, few recent works investigate policy architectures that are specifically tailored for planning under uncertainty, and current RL theory and benchmarks rarely investigate the generalization properties of a trained policy [27, 21, 5]. This work takes a step in this direction, by exploring better generalizing policy representations.
强有力且可扩展的强化学习方法的出现,为深度学习打开了一系列新问题。然而,近来很少有工作去研究专门为不确定条件下的规划而设计的策略结构,当前的强化学习理论和基准也很少考察训练后策略的泛化性质 [27, 21, 5]。本工作朝这一方向迈出一步,探索更好泛化的策略表示。
Our VIN policies learn an approximate planning computation relevant for solving the task, and we have shown that such a computation leads to better generalization in a diverse set of tasks, ranging from simple gridworlds that are amenable to value iteration, to continuous control, and even to navigation of Wikipedia links. In future work we intend to learn different planning computations, based on simulation [10], or optimal linear control [30], and combine them with reactive policies, to potentially develop RL solutions for task and motion planning [14].
我们的 VIN 策略学会了一种与求解任务相关的近似规划计算,并且我们已经表明,这种计算在一组多样化的任务上带来了更好的泛化,范围从适合价值迭代的简单网格世界,到连续控制,乃至 Wikipedia 链接上的导航。在未来工作中,我们打算学习不同的规划计算,它们可以基于仿真 [10],或基于最优线性控制 [30],并把它们与反应式策略结合起来,以期为任务与运动规划 [14] 发展强化学习方案。
Acknowledgments
致谢
This research was funded in part by Siemens, by ONR through a PECASE award, by the Army Research Office through the MAST program, and by an NSF CAREER grant. A. T. was partially funded by the Viterbi Scholarship, Technion. Y. W. was partially funded by a DARPA PPAML program, contract FA8750-14-C-0011.
References
参考文献
[1] R. Bellman. Dynamic Programming. Princeton University Press, 1957.
[2] D. Bertsekas. Dynamic Programming and Optimal Control, Vol II. Athena Scientific, 4th edition, 2012.
[3] D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In Computer Vision and Pattern Recognition, pages 3642–3649, 2012.
[4] M. Deisenroth and C. E. Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In ICML, 2011.
[5] Y. Duan, X. Chen, R. Houthooft, J. Schulman, and P. Abbeel. Benchmarking deep reinforcement learning for continuous control. arXiv preprint arXiv:1604.06778, 2016.
[6] C. Farabet, C. Couprie, L. Najman, and Y. LeCun. Learning hierarchical features for scene labeling. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8):1915–1929, 2013.
[7] C. Finn, M. Zhang, J. Fu, X. Tan, Z. McCarthy, E. Scharff, and S. Levine. Guided policy search code implementation, 2016. Software available from rll.berkeley.edu/gps.
[8] K. Fukushima. Neural network model for a mechanism of pattern recognition unaffected by shift in position- neocognitron. Transactions of the IECE, J62-A(10):658–665, 1979.
[9] A. Giusti et al. A machine learning approach to visual perception of forest trails for mobile robots. IEEE Robotics and Automation Letters, 2016.
[10] X. Guo, S. Singh, H. Lee, R. L. Lewis, and X. Wang. Deep learning for real-time atari game play using offline monte-carlo tree search planning. In NIPS, 2014.
[11] X. Guo, S. Singh, R. Lewis, and H. Lee. Deep learning for reward design to improve monte carlo tree search in atari games. arXiv:1604.07095, 2016.
[12] R. Ilin, R. Kozma, and P. J. Werbos. Efficient learning in cellular simultaneous recurrent neural networks-the case of maze navigation problem. In ADPRL, 2007.
[13] J. Joseph, A. Geramifard, J. W. Roberts, J. P. How, and N. Roy. Reinforcement learning with misspecified model classes. In ICRA, 2013.
[14] L. P. Kaelbling and T. Lozano-Pérez. Hierarchical task and motion planning in the now. In IEEE International Conference on Robotics and Automation (ICRA), pages 1470–1477, 2011.
[15] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012.
[16] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[17] S. Levine and P. Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In NIPS, 2014.
[18] S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. JMLR, 17, 2016.
[19] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3431–3440, 2015.
[20] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016.
[21] V. Mnih, K. Kavukcuoglu, D. Silver, A. Rusu, J. Veness, M. Bellemare, A. Graves, M. Riedmiller, A. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
[22] G. Neu and C. Szepesvári. Apprenticeship learning using inverse reinforcement learning and gradient methods. In UAI, 2007.
[23] R. Nogueira and K. Cho. Webnav: A new large-scale task for natural language based sequential decision making. arXiv preprint arXiv:1602.02261, 2016.
[24] S. Ross, G. Gordon, and A. Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In AISTATS, 2011.
[25] J. Schmidhuber. An on-line algorithm for dynamic reinforcement learning and planning in reactive environments. In International Joint Conference on Neural Networks. IEEE, 1990.
[26] J. Schulman, S. Levine, P. Abbeel, M. Jordan, and P. Moritz. Trust region policy optimization. In ICML, 2015.
[27] R. S. Sutton and A. G. Barto. Reinforcement learning: An introduction. MIT press, 1998.
[28] Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016.
[29] E. Todorov, T. Erez, and Y. Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pages 5026–5033. IEEE, 2012.
[30] M. Watter, J. Springenberg, J. Boedecker, and M. Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In NIPS, 2015.
[31] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhudinov, R. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015.



