ZHANGYUXUAN-zR commited on
Commit
1ea2e3f
·
verified ·
1 Parent(s): 8451815

Add files using upload-large-folder tool

Browse files
parse/train/Bye9LiR9YX/Bye9LiR9YX.md ADDED
@@ -0,0 +1,365 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REMEMBER AND FORGET FOR EXPERIENCE REPLAY
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Experience replay (ER) is crucial for attaining high data-efficiency in off-policy deep reinforcement learning (RL). ER entails the recall of experiences obtained in past iterations to compute gradient estimates for the current policy. However, the accuracy of such updates may deteriorate when the policy diverges from past behaviors, possibly undermining the effectiveness of ER. Previous off-policy RL algorithms mitigated this issue by tuning their hyper-parameters in order to abate policy changes. We propose ReF-ER, a method for active management of experiences in the Replay Memory (RM). ReF-ER forgets experiences that would be too unlikely with the current policy and constrains policy changes within a trust region of the behaviors in the RM. We couple ReF-ER with Q-learning, deterministic policy gradient and off-policy gradient methods to show that ReF-ER reliably improves the performance of continuous-action off-policy RL. We complement ReF-ER with a novel off-policy actor-critic algorithm (RACER) for continuous-action control. RACER employs a computationally efficient closed-form approximation of the action values and is shown to be highly competitive with state-of-the-art algorithms on benchmark problems, while being robust to large hyper-parameter variations.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep Reinforcement Learning (RL) has an ever increasing number of success stories ranging from realistic simulated environments (Schulman et al., 2015; Mnih et al., 2016), robotics (Levine et al., 2016) and games (Mnih et al., 2015; Silver et al., 2016). Experience Replay (ER) (Lin, 1992) enhances deep RL algorithms by using information collected in past policy $( \mu )$ iterations to compute updates for the current policy $( \pi )$ . ER has become one of the mainstay techniques to improve the sample-efficiency of off-policy deep RL. Sampling from a Replay Memory (RM) stabilizes stochastic gradient descent (SGD) by disrupting temporal correlations and extracts information from useful experiences over multiple updates (Schaul et al., 2015b). However, when $\pi$ is parameterized by a Neural Network (NN), SGD updates may result in significant changes to the policy, thereby shifting the distribution of states observed from the environment. In this case sampling the RM for further updates may lead to incorrect gradient estimates, therefore deep RL methods must account for and limit the dissimilarity between $\pi$ and behaviors in the RM. Previous works employed trust region methods to bound policy updates (Schulman et al., 2015; Wang et al., 2017). Despite several successes, deep RL algorithms are known to suffer from instabilities and exhibit high-variance of outcomes (Islam et al., 2017; Henderson et al., 2017), especially continuous-action methods employing the stochastic (Sutton et al., 2000) or deterministic (Silver et al., 2014) Policy Gradients (PG or DPG).
12
+
13
+ In this work we redesign ER in order to control the distance between the behaviors $\mu$ used to compute the update and the current policy $\pi$ . More specifically, we classify experiences either as “near-policy" or “far-policy", depending on the ratio $\rho$ of probabilities of selecting the associated action with $\pi$ and that with $\mu$ . The weight $\rho$ appears in many estimators that are used with ER such as the off-policy policy gradients (off-PG) (Degris et al., 2012) and the off-policy return-based evaluation algorithm Retrace (Munos et al., 2016). From this classification, we introduce measures to limit the fraction of “far-policy" samples in the RM, as well as computing gradient estimates only from “near-policy" experiences. Furthermore, these hyper-parameters can be gradually annealed during training to obtain increasingly accurate updates from nearly on-policy experiences. Remember and Forget Experience Replay (ReF-ER) is a simple algorithm that can be applied to virtually any off-policy RL algorithm with parameterized policies. We show that ReF-ER allows better stability and performance than conventional ER in all three main classes of continuous-actions off-policy deep RL algorithms:
14
+
15
+ methods based on the DPG (ie. DDPG (Lillicrap et al., 2016)), methods based on Q-learning (ie.
16
+ NAF (Gu et al., 2016)), and with off-PG (Degris et al., 2012; Wang et al., 2017).
17
+
18
+ In recent years, there has been a growing interest in coupling RL with high-fidelity physics simulations (Reddy et al., 2016; Novati et al., 2017; Colabrese et al., 2017; Verma et al., 2018). The computational cost of these simulations calls for data-efficient RL methods that are reliable and do not require problem-specific tweaks to the hyper-parameters. Moreover, while on-policy training of simple policy architectures has been shown to be sufficient in some benchmark environments (Rajeswaran et al., 2017), agents aiming to solve complex problems with highly non-linear dynamics might require deep or recurrent models that can be trained more efficiently with off-policy methods. We address these issues by introducing a simple and computationally efficient off-policy actor-critic architecture (RACER) for continuous-action control problems. We systematically analyze a wide range of hyper-parameters on the OpenAI Gym (Brockman et al., 2016) robotic tasks, and show that RACER combined with ReF-ER reliably obtains results that are competitive with the state-of-the-art.
19
+
20
+ # 2 PRELIMINARIES
21
+
22
+ Consider the sequential decision process of an agent aiming to optimize its interaction with the environment. At each step $t$ , the agent observes its state $s _ { t } \in \bar { \mathbb { R } } ^ { d _ { S } }$ , performs an action by sampling a policy $a _ { t } \sim \mu ( a | s _ { t } ) \in \mathbb { R } ^ { \mathbf { \bar { d } } _ { A } }$ , and transitions to a new state $s _ { t + 1 } \sim \mathcal { D } ( s | a _ { t } , s _ { t } )$ with reward $r _ { t + 1 } \in \mathbb { R }$ . These interactions $\{ s _ { t } , a _ { t } , r _ { t } , \mu _ { t } \}$ are stored in a RM, which constitutes the data used by off-policy RL to train the parametric policy $\pi ^ { \mathfrak { w } } ( a | s )$ . The importance weight $\rho _ { t } = \pi ^ { \mathrm { w } } ( a _ { t } | s _ { t } ) / \mu _ { t }$ is the ratio between the probability of selecting $a _ { t }$ with the current $\pi ^ { \mathfrak { w } }$ and with the behavior $\mu _ { t }$ , which gradually becomes dissimilar from $\pi ^ { \mathfrak { w } }$ as the latter is trained. The on-policy state-action value $Q ^ { \pi } ( s , a )$ measures the expected returns from $( s , a )$ following the policy $\pi ^ { \mathfrak { w } }$ :
23
+
24
+ $$
25
+ Q ^ { \pi } ( s , a ) = \underset { s _ { t } \sim \mathcal { D } , ~ a _ { t } \sim \pi ^ { \mathfrak { r } } } { \mathbb { E } } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t + 1 } \bigg | s _ { 0 } = s , a _ { 0 } = a \right]
26
+ $$
27
+
28
+ Here $\gamma$ is a discount factor. The value of state $s$ is the on-policy expectation: $V ^ { \pi } ( s ) \ =$ $\mathbb { E } _ { a \sim \pi } \left[ Q ^ { \pi } ( s , a ) \right]$ and the action advantage is $\begin{array} { r l } { A ^ { \pi } ( s , a ) } & { { } = { \begin{array} { l } { { \bar { } } Q ^ { \pi } { \bar { } } ( s , a { \bar { ) } } - V ^ { \pi } ( s ) } \end{array} } } \end{array}$ , such that $\mathbb { E } _ { a \sim \pi } \left[ A ^ { \pi } ( s , a ) \right] : = 0$ . We consider algorithms that train parametric approximators $Q ^ { \mathsf { w } }$ from off-policy data. The Q-learning target is $\begin{array} { r } { \hat { q } _ { t } = r _ { t + 1 } + \gamma \mathbb { E } _ { a ^ { \prime } \sim \pi } Q ^ { \mathrm { w } } ( s _ { t + 1 } , a ^ { \prime } ) } \end{array}$ . The Retrace algorithm (Munos et al., 2016) includes all the rewards obtained by the behavior $\mu _ { t }$ in the value estimation:
29
+
30
+ $$
31
+ \hat { Q } _ { t } ^ { \mathrm { r e t } } = r _ { t + 1 } + \gamma V ^ { \mathrm { u } } ( s _ { t + 1 } ) + \gamma \operatorname* { m i n } \{ 1 , \rho _ { t + 1 } \} \left[ \hat { Q } _ { t + 1 } ^ { \mathrm { r e t } } - Q ^ { \mathrm { u } } ( s _ { t + 1 } , a _ { t + 1 } ) \right]
32
+ $$
33
+
34
+ The off-PG (Degris et al., 2012) can be used to update $\pi ^ { \mathfrak { w } }$ by ER: $\begin{array} { r } { \hat { g } _ { t } ^ { \mathrm { o f f - P G } } ( \mathbb { w } ) = \rho _ { t } \hat { A } _ { t } ^ { \pi } \nabla _ { \mathbb { w } } \log \pi ^ { \mathrm { w } } ( a _ { t } | s _ { t } ) } \end{array}$ Here, $\hat { A } _ { t } ^ { \pi }$ is an estimator for the on-policy advantage, such as $\hat { A } _ { t } ^ { \mathrm { r e t } } : = \hat { Q } _ { t } ^ { \mathrm { r e t } } - V ^ { \mathsf { u } } ( s _ { t } )$ .
35
+
36
+ # 3 REMEMBER AND FORGET EXPERIENCE REPLAY
37
+
38
+ In off-policy RL it is common to maximize on-policy returns averaged over the distribution of states in a RM (Degris et al., 2012). However, as $\pi ^ { \mathfrak { w } }$ gradually shifts away from previous behaviors $\mu _ { t }$ , the distribution of states in the RM is increasingly dissimilar from the on-policy distribution, and trying to increase an off-policy performance metric may not improve on-policy outcomes. This issue may be compounded with algorithm-specific concerns. For example, in ACER (Wang et al., 2017) the dissimilarity between $\mu _ { t }$ and $\pi ^ { \mathfrak { w } }$ may cause vanishing or diverging importance weights $\rho _ { t }$ , thereby increasing the variance of the off-PG and deteriorating the convergence speed of Retrace by inducing “trace-cutting” (Munos et al., 2016). As a remedy, ACER tunes the learning rate and uses a target network (Mnih et al., 2015), updated as a delayed copy of the policy network, to constrain policy updates. Target networks are also employed in DDPG (Lillicrap et al., 2016) in order to slow down the feedback loop between value-network and policy-network optimizations. This feedback loop causes overestimated action values that can only be corrected by acquiring new on-policy samples. Recent works (Henderson et al., 2017) have shown the opaque variability of outcomes of continuous-action deep RL algorithms depending on hyper-parameters. Target-networks may be one of the sources of this unpredictability. In fact, when using deep approximators, there is no guarantee that the small weight changes imposed by target-networks correspond to small changes in the network’s output.
39
+
40
+ Here we propose a set of three simple rules, collectively referred to as Remember and Forget ER (ReF-ER), to directly control the degree of “off-policyness” of the samples in the RM:
41
+
42
+ 1. Updates are computed from mini-batches drawn uniformly from a RM. We compute the importance weight $\rho _ { t }$ of each sample and classify it as “near-policy" if $1 / c _ { \mathrm { m a x } } { < } \rho _ { t } { < } c _ { \mathrm { m a x } }$ with $c _ { \operatorname* { m a x } } > 1$ . The samples with vanishing $( \rho _ { t } { < } 1 / c _ { \mathrm { m a x } } )$ or exploding $( \rho _ { t } > c _ { \operatorname* { m a x } } )$ importance weights are classified as “far-policy". When computing off-policy estimators with finite batch-sizes, such as ${ \hat { Q } } ^ { \mathrm { r e t } }$ or the off-PG, “far-policy" samples may either be irrelevant or increase the variance. ReF-ER allows computing gradient estimates exclusively from “near-policy" samples. In order to efficiently approximate the number of far-policy samples in the RM, we store for each step its most recent $\rho _ { t }$
43
+
44
+ 2. When acquiring samples from the environment, older episodes with the highest fraction of far-policy samples are removed until the number $n _ { \mathrm { o b s } }$ of samples in the RM is at most $N$ .
45
+
46
+ 3. Policy updates are penalized in order to attract the current policy $\pi ^ { \mathfrak { w } }$ towards $\mu _ { t }$
47
+
48
+ $$
49
+ \begin{array} { r } { \hat { \mathbf { g } } _ { t } ^ { \mathrm { R e F - E R } } ( \mathsf { w } ) = \left\{ \begin{array} { l l } { \beta \hat { \mathbf { g } } _ { t } ( \mathsf { w } ) - ( 1 - \beta ) \nabla D _ { \mathrm { K L } } \left[ \mu _ { t } \| \pi ^ { \mathsf { w } } ( \cdot | s _ { t } ) \right] } & { \mathrm { i f ~ } 1 / c _ { \mathrm { m a x } } < \rho _ { t } < c _ { \mathrm { m a x } } } \\ { - ( 1 - \beta ) \nabla D _ { \mathrm { K L } } \left[ \mu _ { t } \| \pi ^ { \mathsf { w } } ( \cdot | s _ { t } ) \right] } & { \mathrm { o t h e r w i s e } } \end{array} \right. } \end{array}
50
+ $$
51
+
52
+ Here $D _ { \mathrm { K L } }$ is the Kullback–Leibler divergence and the coefficient $\beta \in [ 0 , 1 ]$ is updated after each gradient step such that a fixed fraction $\bar { D } \in ( 0 , 1 )$ of the RM are far-policy samples:
53
+
54
+ $$
55
+ \beta \{ { \begin{array} { l l } { ( 1 - \eta ) \beta } & { { \mathrm { i f ~ } } n _ { \mathrm { f a r } } / n _ { \mathrm { o b s } } > D } \\ { ( 1 - \eta ) \beta + \eta , } & { { \mathrm { o t h e r w i s e } } } \end{array} }
56
+ $$
57
+
58
+ where $\eta$ is the learning rate and $n _ { \mathrm { f a r } }$ is the number of far-policy samples. Note that iteratively updating $\beta$ with Eq. 4 has fixed points in 0 for $n _ { \mathrm { f a r } } / n _ { \mathrm { o b s } } { > } D$ and in 1 otherwise.
59
+
60
+ For $c _ { \mathrm { m a x } } { \to } 1$ and $D { \to } 0$ , ReF-ER becomes asymptotically equivalent to computing updates from on-policy samples. ReF-ER aims to reduce the sensitivity on the network architecture and hyperparameters by controlling the rate at which the policy can deviate from the behaviors in the RM.
61
+
62
+ # 4 RACER: REGULARIZED ACTOR-CRITIC WITH EXPERIENCE REPLAY
63
+
64
+ This work analyzes ReF-ER with three types of continuous-actions off-policy deep RL algorithms: methods based on the DPG (i.e. DDPG), based on Q-learning (i.e. NAF), and based on the off-PG (e.g. ACER (Wang et al., 2017) and IMPALA (Espeholt et al., 2018)). Here we introduce RACER, an off-PG based architecture with some improvements over ACER and IMPALA which aid our analysis of ReF-ER. First, RACER does not require expensive network architectures (easing reproducibility and exploration of the hyper-parameters). Second, it samples time steps rather than episodes (like DDPG and NAF and unlike ACER and IMPALA), further reducing its cost. Third, it does not introduce any technique that would interfere with ReF-ER and affect its analysis. Specifically, ACER uses the variance truncation and bias correction trick (TBC), employs a target network to bound policy updates with a trust-region scheme, and modifies Retrace to use $^ { d } \hat { \sqrt { \rho } }$ instead of $\rho$ . Lacking these techniques, we expect RACER to require ReF-ER to deal with unbounded importance weights.
65
+
66
+ ![](images/bb8172b77ac56a54a355bcfdffc23d8d393655da7f73bb88893d97320043ed90.jpg)
67
+ Figure 1: (a) Diagram of asynchronous ER-based RL algorithms. (b) Neural network architecture employed by RACER. Blue arrows connect each output with the elements of the actor-critic framework for which it is used. Red arrows represent the flow of the error signals.
68
+
69
+ RACER’s network architecture consists of a single Multilayer Perceptron (MLP) with weights $\mathtt { w }$ which receives the state $s$ and outputs as shown in Fig. 1b. From the final layer, the first $2 d _ { A }$ outputs are taken as the mean m and diagonal covariance $\pmb { \Sigma }$ of the Gaussian policy $\pi ^ { \mathfrak { w } } ( a | s )$ . One output estimates the state value $V ^ { \mathrm { { w } } }$ , and the remaining outputs are the parameters of a closed-form approximator for the action advantage $A ^ { \mathfrak { w } }$ . RACER can be extended for problems where the state is received as a visual feed (by inserting convolutional layers), or where the state is only partially observable (by substituting the MLP with a recurrent model). However, these extensions are outside the scope of this paper.
70
+
71
+ The parameters $\mathtt { w }$ are updated from mini-batches of off-policy time steps with ReF-ER. A separate gradient is defined for each component of the actor-critic framework, as sketched in figure 1b. The policy statistics $\mathbf { m } ( s )$ and $\Sigma ( s )$ are updated with the off-PG (Degris et al., 2012):
72
+
73
+ $$
74
+ \hat { \mathbf { g } } _ { t } ^ { \pi } ( \mathsf { w } ) = \rho _ { t } \hat { A } _ { t } ^ { \mathrm { r e t } } \nabla _ { \{ \mathbf { m } , \Sigma \} } \log \pi ^ { \forall } ( a _ { t } \mid s _ { t } )
75
+ $$
76
+
77
+ We estimate the on-policy advantage with Retrace. From TBC and Retrace, we obtain an estimator for the on-policy state value $\hat { V } _ { t } ^ { \mathrm { t b c } } = V ^ { \mathrm { u } } ( s _ { t } ) + \operatorname* { m i n } \{ 1 , \rho _ { t } \} ( \hat { Q } _ { t } ^ { \mathrm { r e t } } - Q ^ { \mathrm { u } } ( s _ { t } , a _ { t } ) )$ , used as a target for $V ^ { \mathtt { w } }$ :
78
+
79
+ $$
80
+ \hat { \mathbf { g } } _ { t } ^ { V } ( \mathbf { w } ) = \hat { V } ^ { \mathrm { t b c } } ( s ) - V ^ { \mathrm { u } } ( s _ { t } ) = \operatorname* { m i n } \left. 1 , \rho _ { t } \right. \left[ \hat { Q } _ { t } ^ { \mathrm { r e t } } - Q ^ { \mathrm { u } } ( s _ { t } , a _ { t } ) \right]
81
+ $$
82
+
83
+ Rather than having a separate MLP with inputs $( s , a )$ to parameterize $Q ^ { \mathsf { w } }$ (as in ACER or $\tt D D P G$ ), whose expected value under the policy would be computationally demanding to compute, we employ a closed-form equation for $A ^ { \mathfrak { w } }$ inspired by NAF (Gu et al., 2016). The network outputs the coefficients of a concave function $f ^ { \ w } ( s , a )$ which is chosen such that its maximum coincides with the mean of the policy $\mathbf { m } ( s )$ , and such that it is possible to derive analytical expectations for $a \sim \pi ^ { \mathfrak { w } }$ . In App. B we explore multiple choices of $f ^ { \ w } ( s , a )$ . For all results in the main text of the manuscript we used:
84
+
85
+ $$
86
+ f ^ { \bowtie } ( s , a ) = K ( s ) \exp \left[ - { \frac { 1 } { 2 } } { \mathbf { a } } _ { + } ^ { \intercal } { \mathbf { L } } _ { + } ^ { - 1 } ( s ) { \mathbf { a } } _ { + } - { \frac { 1 } { 2 } } { \mathbf { a } } _ { - } ^ { \intercal } { \mathbf { L } } _ { - } ^ { - 1 } ( s ) { \mathbf { a } } _ { - } \right]
87
+ $$
88
+
89
+ Here $\mathbf { a } _ { - } = \operatorname* { m i n } \left[ a - \mathbf { m } ( s ) , \mathbf { 0 } \right]$ and $\mathbf { a } _ { + } { = } \operatorname* { m a x } \left[ a { - } \mathbf { m } ( s ) , \mathbf { 0 } \right]$ (both element-wise operations). This parameterization requires one MLP output for $K ( s )$ and $d _ { A }$ outputs for each diagonal matrix $\mathbf { L } _ { + }$ and $\mathbf { L } _ { - }$ . In total, given a state $s$ , the MLP computes $\mathbf { m } , \pmb { \Sigma } , V , K , \mathbf { L } _ { + }$ and $\mathbf { L } _ { - }$ . From Eq.7, for any action $a$ the advantage is uniquely defined: $A ^ { \mathfrak { w } } ( s , a ) { : = } f ^ { \mathfrak { w } } ( s , a ) { - } \mathbb { E } _ { a ^ { \prime } \sim \pi } \left[ f ^ { \mathfrak { w } } ( s , a ^ { \prime } ) \right]$ . Like the exact on-policy advantage $A ^ { \pi }$ , $A ^ { \mathfrak { w } }$ has by design expectation zero under the policy. The parameterization coefficients $K$ and $\mathbf { L }$ are updated to minimize the L2 error from $\hat { A } _ { t } ^ { \mathrm { r e t } }$ :
90
+
91
+ $$
92
+ \hat { \mathbf { g } } _ { t } ^ { A } ( \mathfrak { w } ) = \rho _ { t } \left[ \hat { A } _ { t } ^ { \mathrm { r e t } } - A ^ { \mathfrak { w } } ( s _ { t } , a _ { t } ) \right] \nabla _ { \{ K , \mathbf { L } \} } A ^ { \mathfrak { w } } ( s _ { t } , a _ { t } )
93
+ $$
94
+
95
+ Here, $\rho _ { t }$ reduces the weight of estimation errors for unlikely actions, where $A ^ { \mathfrak { w } }$ is expected to be less accurate. To ensure that $\Sigma , K , \mathbf { L } _ { + }$ and $\mathbf { L } _ { - }$ are positive definite, the respective outputs are mapped onto $\mathbb { R } ^ { + }$ by a Softplus rectifier. The analytical derivation of $\mathbb { E } _ { a ^ { \prime } \sim \pi } \left[ f ^ { \mathsf { w } } ( s , { \overline { { a ^ { \prime } } } } ) \right]$ can be found in App. A. Collectively, $\hat { \mathbf { g } } _ { t } ^ { \pi } ( \mathbf { \bar { w } } ) , \hat { \mathbf { g } } _ { t } ^ { V } ( \mathbf { w } )$ , and $\hat { \mathbf { g } } _ { t } ^ { A } ( \mathbf { \bar { w } } )$ form a vector $\hat { \mathbf { g } } _ { t } ^ { \mathrm { A C } } ( \mathbf { w } )$ with the same size as the MLP output. $\hat { \mathbf { g } } _ { t } ^ { \mathrm { A C } } ( \mathbf { w } )$ is weighted with the ReF-ER penalization (Eq. 3) and then back-propagated to the MLP.
96
+
97
+ In order to estimate $\hat { Q } _ { t } ^ { \mathrm { r e t } }$ for a sampled time step $t$ , Retrace (Eq. 2) requires $V ^ { \mathrm { { w } } }$ and $Q ^ { \mathrm { w } }$ for all future steps in sample $t$ ’s episode. These are naturally computed when training from batches of episodes (as in ACER) rather than time steps. However, the information contained in consecutive steps is highly correlated, worsening the quality of the gradient estimate, and episodes can be composed of thousands of time steps, increasing the computational cost. In order to efficiently train from uncorrelated time steps, RACER stores for each sample in the RM the most recently computed estimations of $V ^ { \mathbb { w } } ( s _ { t } )$ , $A ^ { \mathrm { w } } ( s _ { t } , a _ { t } )$ , $\rho _ { t }$ and $\boldsymbol { Q } _ { t } ^ { \mathrm { r e t } }$ . When a batch of time steps is sampled, the stored $\boldsymbol { Q } _ { t } ^ { \mathrm { r e t } }$ are used to compute the gradient update. At the same time, the stored $V ^ { \mathbb { w } } ( s _ { t } )$ , $A ^ { \mathbb { w } } ( s _ { t } , a _ { t } )$ and $\rho _ { t }$ are updated with the current NN outputs and used to correct $\boldsymbol { Q } ^ { \mathrm { r e t } }$ for all prior time-steps in the respective episodes with Eq. 2. A description of all remaining implementation details is provided in App. D.
98
+
99
+ # 5 RELATED WORK
100
+
101
+ The rules that determine which samples are kept in the RM and how they are used for training can be designed to address several objectives. For example, properly designed ER may prove necessary to prevent lifelong learning agents from forgetting previously mastered tasks (Isele & Cosgun, 2018). Prioritized Experience Replay (Schaul et al., 2015b) (PER) improves the performance of DQN (Mnih et al., 2015) by biasing sampling in favor of experiences that cause large temporal-difference (TD) errors. TD errors may signal rare events that would convey useful information to the learner. ER can be used to train transition models in planning-based RL (Pan et al., 2018), or to train off-policy learners on auxiliary tasks (Schaul et al., 2015a; Jaderberg et al., 2017) helping to shape the network features. When rewards are very sparse, RL agents can be trained to repeat previous outcomes (Andrychowicz et al., 2017) or to reproduce successful states or episodes (Oh et al., 2018; Goyal et al., 2018).
102
+
103
+ de Bruin et al. (2015) proposes a modification to ER that increases the diversity of behaviors contained in the RM, which is the opposite of what ReF-ER achieves. The ideas proposed by de Bruin et al. (2015) cannot readily be applied to complex tasks (they consider a low-dimensional problem which can be learned with the RM holding a handful of episodes) and the authors concede that their method is not suitable when the policy is advanced for many iterations. For these reasons, we compare ReF-ER only to PER and conventional ER. We assume that if increasing the diversity of experiences in the RM were beneficial to off-policy RL then either PER or ER would outperform ReF-ER.
104
+
105
+ ReF-ER is inspired by the techniques developed for on-policy RL to bound policy updates of PPO (Schulman et al., 2017). Rule 1 of ReF-ER is similar to the clipped objective function of PPO (gradients are zero if $\rho$ lies outside of some range). However, Rule 1 is not affected by the sign of the advantage estimate and clips both policy and value gradients. Like Rule 3, one variant of PPO penalizes $D _ { K L } ( \mu _ { t } | | \pi ^ { \mathtt { W } } )$ (also Schulman et al. (2015) and Wang et al. (2017) employ trust-region schemes in the on- and off-policy setting respectively). While PPO picks one of the two techniques, in ReF-ER Rules 1 and 3 complement each other and can be applied to most off-policy RL methods with parametric policies. In the ER setting, samples remain in the RM over many iterations. If only Rule 1 is included, any PG could push the sample’s $\rho$ outside of the clipping range without means to recover, leading to zero-valued gradients. Including only Rule 3 would not reduce the number of hyper-parameters (a target $D _ { K L }$ would be needed), and would not prevent unbounded $\rho$ .
106
+
107
+ The first method to combine ER and PG was the Off-Policy Actor Critic (Degris et al., 2012). Further contributions were introduced with ACER (Wang et al., 2017), such as extension to NN, estimation of on-policy returns with Retrace, and the variance truncation and bias correction trick (TBC). In the continuous-action domain, the proposed RACER offers several advantages over ACER: (a) reduced complexity by employing a single NN and closed-form $A ^ { \mathfrak { w } }$ (continuous-ACER uses 9 NN evaluations per gradient). (b) relies on ReF-ER rather than constraining policy updates around a target network. (c) samples time steps rather than episodes (which may consist of thousands of steps). (d) uses the original Retrace estimator, which has better convergence guarantees than the value-estimators used by continuous-ACER. Because of (a) and (c), RACER is two orders of magnitude faster than ACER.
108
+
109
+ # 6 RESULTS
110
+
111
+ In this section we couple ReF-ER, conventional ER and PER with one method from each of the three main classes of deep continuous-action RL algorithms: DDPG, NAF, and RACER. The performance of each combination of algorithms is measured on the MuJoCo (Todorov et al., 2012) tasks of OpenAI Gym (Brockman et al., 2016) by plotting the mean cumulative reward $R = \textstyle \sum _ { t } r _ { t }$ . Each plot tracks the average $R$ among all episodes entering the RM within intervals of $2 { \cdot } 1 0 ^ { 5 }$ time steps and averaged again among five differently seeded training trials. In the appendix we include contours of the $2 \overline { { 0 } } ^ { t h }$ to $8 0 ^ { t h }$ percentiles of $R$ obtained by DDPG and RACER on the OpenAI Gym and on the DeepMind Control Suite (Tassa et al., 2018). The code to reproduce all present results is available on GitHub.1
112
+
113
+ # 6.1 RESULTS FOR DDPG
114
+
115
+ DDPG (Lillicrap et al., 2016) trains two networks by ER. The value network outputs $Q ^ { \mathrm { w } ^ { \prime } } ( s , a )$ and is trained to minimize the L2 distance from the Q-learning target (Sec. 2). The policy network outputs a deterministic policy $\mathbf { m } ^ { \mathbf { w } } ( s )$ and is trained with the DPG (Silver et al., 2014):
116
+
117
+ $$
118
+ \hat { g } _ { t } ^ { \mathrm { D P G } } ( \boldsymbol { \mathbf { \check { w } } } ) = \nabla _ { \boldsymbol { \mathbf { \check { w } } } } \boldsymbol { \mathbf { m } } ^ { \boldsymbol { \mathsf { w } } } ( s ) \left. \nabla _ { a } Q ^ { \boldsymbol { \mathsf { w } } ^ { \prime } } ( s , a ) \right| _ { a = \boldsymbol { \mathbf { m } } ^ { \boldsymbol { \mathsf { s } } } ( s ) }
119
+ $$
120
+
121
+ ![](images/fd14a3ccf717d22d8150eb33367b3e35617491d7ff87dcb8267b305bb1c22820.jpg)
122
+ Figure 2: Cumulative rewards on OpenAI MuJoCo tasks for DDPG (green line), DDPG with rankbased PER (gray line), u-DDPG with regular ER (blue), and ReF-ER with $C = 8$ (purple), $C = 4$ (red), $C = 2$ (orange). Implementation details in App. D.
123
+
124
+ ![](images/9493238e568f9f81711dbca8f0db65b2089903628dad5239d49c3c0d8f9e9dd9.jpg)
125
+ Figure 3: Average Kullback-Leibler divergence between the policy $\pi ^ { \mathrm { { w } } } = m ^ { \mathrm { { w } } } + \mathcal { N } ( \mathbf { 0 } , \sigma ^ { 2 } \mathbf { I } )$ and the behaviors $\mu _ { t }$ in the RM during training for DDPG (green line), u-DDPG with regular ER (blue), and ReF-ER with $C = 8$ (purple), $C = 4$ (red), $C = 2$ (orange).
126
+
127
+ Noise is added to the deterministic policy $\boldsymbol { \pi } ^ { \mathrm { w } } { = } \mathbf { m } ^ { \mathrm { w } } { + } \mathcal { N } ( \mathbf { 0 } , \boldsymbol { \sigma } ^ { 2 } \mathbf { I } )$ for exploration. We consider two variants of DDPG: one with $\mathbf { m } ^ { \mathtt { w } }$ bounded to the unit box $[ - 1 , 1 ] ^ { d _ { A } }$ (as in the original) and one without bounds (referred to as $\mathtt { u - D D P G }$ , implementation details can be found in App. D). Bounding the policy may lead to lower returns in the OpenAI MuJoCo benchmarks, which are defined for unbounded actions. We note that, without measures to constrain policy updates or without careful tuning of the hyper-parameters (we found the critic’s weight decay and temporally-correlated action noise to be necessary), $\mathtt { u - D D P G }$ is unstable. The returns for u-DDPG can fall to large negative values, especially in tasks that include a control-cost penalty in the reward such as Ant. This behavior is explained by the value network not having learned local maxima with respect to the action (Silver et al., 2014).
128
+
129
+ By replacing ER with ReF-ER we can stabilize u-DDPG and greatly improve its performance, especially for tasks with complex dynamics such as Humanoid or Ant. The hyper-parameter $c _ { \mathrm { m a x } }$ determines how much the policy is allowed to change from the behaviors in the RM. By annealing $c _ { \mathrm { m a x } }$ we can allow faster improvements at the beginning of training, when an inaccurate policy gradient might be sufficient to estimate a good direction for the update. Conversely, during the later stages of training, precise updates can be computed from almost on-policy samples. We anneal $c _ { \mathrm { m a x } }$ and the learning rate according to:
130
+
131
+ $$
132
+ c _ { \operatorname* { m a x } } ( k ) = 1 + C / ( 1 + 5 e - 7 \cdot k ) , \quad \eta ( k ) = \eta / ( 1 + 5 e - 7 \cdot k )
133
+ $$
134
+
135
+ Here $k$ is the gradient step index, $\eta$ is the initial learning rate $1 0 ^ { - 4 }$ and $1 0 ^ { - 5 }$ for the value and policy networks respectively, as when using regular ER). We found that annealing $\eta$ worsened the instability of $\mathtt { u - D D P G }$ with regular ER. Lower values of $C$ reduce the speed of policy improvements, but after $\mathrm { i 0 ^ { 7 } }$ time steps $C = 2$ achieves the best performance in most tasks. In Fig. 3 we report for a subset of problems the average $D _ { K L } ( \mu _ { t } | | \pi ^ { \mathtt { w } } )$ . $D _ { K L }$ decreases for lower values of $C$ and further decreases during training due to the annealing process. With regular ER, even after lowering $\eta$ by one order of magnitude from that of the original paper, the distance between $\pi$ and $\mu$ may span the entire action space. In fact, in most tasks shown in Fig. 3 the $D _ { K L } ( \mu _ { t } | | \pi ^ { \mathbf { w } } )$ of DDPG is of similar order of magnitude as its maximum $\textstyle { \frac { d _ { A } } { 2 } } ( 2 / \sigma ) ^ { 2 }$ (for example, since $\sigma = 0 . 2$ , the maximum $D _ { K L }$ is 850 for Humanoid and 300 for Walker2d and it oscillates during training around 100 and 50 respectively).
136
+
137
+ ![](images/b96ae8567cce571316779f22c467e45be5f69c8ac8a14a72fdf404e4ba23313f.jpg)
138
+ Figure 4: Cumulative rewards on the OpenAI MuJoCo tasks for NAF (blue line), NAF with rank-based PER (gray line), NAF with ReF-ER and $C = 8$ (purple), $C = 4$ (red), $C = 2$ (orange).
139
+
140
+ ReF-ER maintains a RM of mostly near-policy samples, providing the value-network with multiple examples of trajectories that are possible with the current policy. This focuses the predictive capabilities of the value-network, enabling it to extrapolate the effect of a marginal change of action on the expected returns, and therefore increasing the accuracy of the DPG. Any misstep of the DPG is weighted with a penalization term that attracts the policy towards past behaviors. This allows time for the learner to gather experiences with the new policy, improve the value-network, and correct the misstep. This reasoning is almost diametrically opposed to that behind PER. In PER observations that are associated with larger TD errors are sampled more frequently. In the continuous-action setting, however, TD errors may be result from actions that are farther from the current policy. Therefore, precisely estimating their value might not help the value network in yielding an accurate estimate of the DPG. We obtained better results with the rank-based variant of PER, which has similar performance to that of DDPG with ER. The main benefits over ReF-ER arise in tasks that require more exploration, such as Swimmer and HumanoidStandup.
141
+
142
+ # 6.2 RESULTS FOR NAF
143
+
144
+ Normalized Advantage Functions (NAF) is the state-of-the-art of Q-learning based algorithms for continuous-action problems. It employs a quadratic-form approximation of the advantage $A ^ { \mathfrak { w } }$ , analogous to the one employed by RACER:
145
+
146
+ $$
147
+ A _ { \mathrm { N A F } } ^ { \boldsymbol { \mathsf { w } } } ( s , a ) = - \left[ a - \mathbf { m } ^ { \boldsymbol { \mathsf { w } } } ( s ) \right] ^ { \mathsf { T } } \mathbf { L } _ { \mathrm { Q } } ^ { \boldsymbol { \mathsf { w } } } ( s ) \left[ \mathbf { L } _ { \mathrm { Q } } ^ { \boldsymbol { \mathsf { w } } } ( s ) \right] ^ { \mathsf { T } } \left[ a - \mathbf { m } ^ { \boldsymbol { \mathsf { w } } } ( s ) \right]
148
+ $$
149
+
150
+ NAF trains $A ^ { \mathtt { w } }$ with the Q-learning target (Sec. 2) and uses the location $\mathbf { m } ^ { \mathtt { w } }$ of its maximum as the mean of the policy, with added Gaussian noise for exploration. When the actual $A ^ { \pi }$ is not well approximated by a quadratic (e.g. when the return landscape is multi-modal), NAF may fail to choose good actions. In contrast, RACER updates $\pi ^ { \mathfrak { w } }$ with the off-PG, which is independent of the error in approximating $A ^ { \pi } ( s _ { t } , a _ { t } )$ (but depends on the error at $t { + } 1$ ). Figure 4 shows how NAF is affected by the choice of ER algorithm. While Q-learning based methods are thought to be less sensitive than PG-based methods to the dissimilarity between policy and stored behaviors owing to the bootstrapped Q-learning target, NAF benefits from REF-ER. This is because $A ^ { \pi }$ is likely to be approximated well by a quadratic in a small neighborhood near its local maxima. ReF-ER constrains learning from actions within this neighborhood and prevents large TD errors from disrupting the locally-accurate approximation of $A ^ { \mathfrak { w } }$ . This intuition is supported by observing that rank-based PER (the better performing variant of PER also in this case), often worsens the performance of NAF. PER aims at biasing sampling in favor of larger TD errors, which are more likely to be farther from $\mathbf { m } ( s )$ (note that $f _ { \mathrm { N A F } } ^ { \mathrm { w } }$ is unbounded), and their accurate prediction might not help the learner in fine-tuning the policy by improving a local approximation of the advantage.
151
+
152
+ ![](images/1eef93c9888c9abf2cab0bb892b7935a2a01f86c12427a8150f2083feb73bce5.jpg)
153
+ Figure 5: Average cumulative rewards on MuJoCo OpenAI Gym tasks obtained with PPO (dashed black lines), ACER (dash-dot purple lines) and with RACER by independently varying the two main hyper-parameters of ReF-ER: the RM size $N$ and $C$ (colored lines).
154
+
155
+ # 6.3 RESULTS FOR RACER
156
+
157
+ Here we compare RACER to ACER and PPO, an algorithm that owing to its simplicity and good performance on MuJoCo tasks is often used as baseline. We omit results from coupling RACER with ER or PER as it yields large negative $R$ values. In fact, without ReF-ER, the unbounded importance weights cause off-PG estimates to diverge, disrupting prior learning progress. Similarly to ReF-ER, ACER’s techniques (Sec. 4) guard against the numerical instability of the off-PG. However, bounding policy updates to a target-network does not ensure similarity between $\pi ^ { \mathfrak { w } }$ and RM behaviors (as shown in Fig. 7). In fact, when using deep approximators, simply enforcing slow parameter updates does not guarantee small changes in the output. As $D _ { K L } ( \mu _ { t } \parallel \pi ^ { \mathsf { w } } )$ grows, off-PG estimates may become inaccurate, causing ACER to be outperformed by RACER and PPO. We note that, due to ACER’s cost, we could only optimize some of its hyper-parameters relative to the original paper (see App. D). We do not exclude that ACER could have performed better after more extensive tuning.
158
+
159
+ The two hyper-parameters that most strongly affect the performance of RACER are the RM size $N$ and $c _ { \mathrm { m a x } }$ , annealed with Eq. 10 (for a discussion of the other parameters see App. B). RACER uses the Retrace estimator $\boldsymbol { Q } ^ { \mathrm { r e t } }$ which is expected to converge to the on-policy $Q ^ { \pi }$ (Munos et al., 2016). Because $\pi ^ { \mathfrak { w } }$ is gradually changing during training, it is crucial to maximize the convergence speed of Retrace to obtain accurate estimates of the off-PG. Large values of $c _ { \mathrm { m a x } }$ increase the variance of the policy gradient and increase the amount of “trace-cutting” as the importance weights are allowed to diverge from 1. The cumulative rewards reported in Fig. 5 show that “stable” tasks, where the agent’s success is less predicated on avoiding mistakes that would cause it to trip, are more tolerant to high values of $c _ { \mathrm { m a x } }$ (e.g. HalfCheetah). In most other tasks, especially those that require precise controls (e.g. Walker), the best results are obtained for values of $c _ { \mathrm { m a x } }$ that strike a balance between strict penalty terms, which slow down policy improvements, and high-variance gradient estimates. The RM size $N$ has a parallel effect. A small RM may not contain enough diversity of samples for the learner to accurately estimate the gradients. Conversely, a large RM is composed of episodes obtained with increasingly older versions of $\pi ^ { \mathfrak { w } }$ . In this case, the penalty terms required to preserve a sufficient fraction of near-policy samples may prevent the policy from improving. A discussion of all the secondary hyper-parameters and the choice of function parameterizing $A ^ { \mathfrak { w } }$ can be found in App. B. For most combinations of hyper-parameters and tasks presented in this section, RACER outperforms the best result from DDPG (Sec. 6.1), PPO, and is competitive with the best results found in the published literature, which to our knowledge were achieved by the on-policy algorithms TRPO (Schulman et al., 2015) and Policy Search with Natural Gradient (Rajeswaran et al., 2017).
160
+
161
+ # 7 CONCLUSION
162
+
163
+ Many RL algorithms update a policy $\pi ^ { \mathfrak { w } }$ from past experiences collected with off-policy behaviors $\mu$ . We present evidence that off-policy continuous-action deep RL methods benefit from actively maintaining similarity between policy and replay behaviors. We propose a novel ER algorithm (ReF-ER) that extends these benefits to off-policy PG, deterministic PG and Q-learning methods. ReF-ER characterizes past behaviors either as “near-policy" or “far-policy" by the deviation from one of the importance weight $\rho { = } { \pi } ^ { \mathsf { w } } ( a | s ) / \mu ( a | s )$ . ReF-ER consists of: 1) Computing gradients only from near-policy experiences. 2) Forgetting far-policy samples when new observations are obtained from the environment. 3) Regulating the pace at which $\pi ^ { \mathfrak { w } }$ is allowed to deviate from $\mu$ through penalty terms that reduce $D _ { K L } ( \mu | | \pi ^ { \mathtt { w } } )$ . This allows time for the learner to gather experiences with the new policy, improve the value estimators, and increase the accuracy of the next steps. The extension of ReF-ER to discrete-action methods is subject of ongoing work.
164
+
165
+ ReF-ER is combined with a novel method based on the off-policy PG (RACER). RACER uses a closed-form parameterization of the advantage and it estimates on-policy returns with a bootstrapped formulation of Retrace. These innovations greatly increase the computational efficiency of RACER compared to similar methods. The application of ReF-ER and RACER to OpenAI Gym benchmarks produces state-of-the-art results while being robust to large variations in their hyper-parameters.
166
+
167
+ # REFERENCES
168
+
169
+ M. Andrychowicz, F. Wolski, A. Ray, J. Schneider, R. Fong, P. Welinder, B. McGrew, J. Tobin, P. Abbeel, and W. Zaremba. Hindsight experience replay. In Advances in Neural Information Processing Systems, pp. 5048–5058, 2017.
170
+ G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
171
+ S. Colabrese, K. Gustavsson, A. Celani, and L. Biferale. Flow navigation by smart microswimmers via reinforcement learning. Physical Review Letters, 118(15):158004, 2017.
172
+ T. de Bruin, J. Kober, K. Tuyls, and R. Babuška. The importance of experience replay database composition in deep reinforcement learning. In Deep Reinforcement Learning Workshop, NIPS, 2015.
173
+ T. Degris, M. White, and R. S. Sutton. Off-policy actor-critic. arXiv preprint arXiv:1205.4839, 2012.
174
+ Y. Duan, X. Chen, R. Houthooft, J. Schulman, and P. Abbeel. Benchmarking deep reinforcement learning for continuous control. In International Conference on Machine Learning, pp. 1329–1338, 2016.
175
+ L. Espeholt, H. Soyer, R. Munos, K. Simonyan, V. Mnih, T. Ward, Y. Doron, V. Firoiu, T. Harley, I. Dunning, et al. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. arXiv preprint arXiv:1802.01561, 2018.
176
+ A. Goyal, P. Brakel, W. Fedus, T. Lillicrap, S. Levine, H. Larochelle, and Y. Bengio. Recall traces: Backtracking models for efficient reinforcement learning. arXiv preprint arXiv:1804.00379, 2018.
177
+ S. Gu, T. Lillicrap, I. Sutskever, and S. Levine. Continuous deep q-learning with model-based acceleration. In International Conference on Machine Learning, pp. 2829–2838, 2016.
178
+ P. Henderson, R. Islam, P. Bachman, J. Pineau, D. Precup, and D. Meger. Deep reinforcement learning that matters. arXiv preprint arXiv:1709.06560, 2017.
179
+ D. Isele and A. Cosgun. Selective experience replay for lifelong learning. arXiv preprint arXiv:1802.10269, 2018.
180
+ R. Islam, P. Henderson, M. Gomrokchi, and D. Precup. Reproducibility of benchmarked deep reinforcement learning tasks for continuous control. arXiv preprint arXiv:1708.04133, 2017.
181
+ M. Jaderberg, V. Mnih, W. M. Czarnecki, T. Schaul, J. Z. Leibo, D. Silver, and K. Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. In International Conference on Learning Representations (ICLR), 2017.
182
+ S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. The Journal of Machine Learning Research, 17(1):1334–1373, 2016.
183
+ T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. In International Conference on Learning Representations (ICLR), 2016.
184
+ L. H. Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine learning, 8(3/4):69–97, 1992.
185
+ V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, j. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540): 529, 2015.
186
+ V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pp. 1928–1937, 2016.
187
+ R. Munos, T. Stepleton, A. Harutyunyan, and M. Bellemare. Safe and efficient off-policy reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1054–1062, 2016.
188
+ G. Novati, S. Verma, D. Alexeev, D. Rossinelli, W. M. van Rees, and P. Koumoutsakos. Synchronisation through learning for two self-propelled swimmers. Bioinspiration & Biomimetics, 12(3):036001, 2017.
189
+ J. Oh, Y. Guo, S. Singh, and H. Lee. Self-imitation learning. arXiv preprint arXiv:1806.05635, 2018.
190
+ Y. Pan, M. Zaheer, A. White, A. Patterson, and M. White. Organizing experience: A deeper look at replay mechanisms for sample-based planning in continuous state domains. arXiv preprint arXiv:1806.04624, 2018.
191
+ A. Rajeswaran, K. Lowrey, E. V. Todorov, and S. M. Kakade. Towards generalization and simplicity in continuous control. In Advances in Neural Information Processing Systems, pp. 6553–6564, 2017.
192
+ G. Reddy, A. Celani, T. J. Sejnowski, and M. Vergassola. Learning to soar in turbulent environments. Proceedings of the National Academy of Sciences, pp. 201606075, 2016.
193
+ T. Schaul, D. Horgan, K. Gregor, and D. Silver. Universal value function approximators. In International Conference on Machine Learning, pp. 1312–1320, 2015a.
194
+ T. Schaul, J. Quan, I. Antonoglou, and D. Silver. Prioritized experience replay. In International Conference on Learning Representations (ICLR), 2015b.
195
+ J. Schulman, S. Levine, P. Abbeel, M. Jordan, and P. Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1889–1897, 2015.
196
+ J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
197
+ D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. Riedmiller. Deterministic policy gradient algorithms. In ICML, 2014.
198
+ D. Silver, A. Huang, C. J Maddison, A. Guez, L. Sifre, G. Van Den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489, 2016.
199
+ R. S. Sutton, D. A. McAllester, S. P. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in neural information processing systems, pp. 1057–1063, 2000.
200
+ Y. Tassa, Y. Doron, A. Muldal, T. Erez, Y. Li, D. Casas, D. Budden, A. Abdolmaleki, J. Merel, A. Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018.
201
+ 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, pp. 5026–5033. IEEE, 2012.
202
+ S. Verma, G. Novati, and P. Koumoutsakos. Efficient collective swimming by harnessing vortices through deep reinforcement learning. Proceedings of the National Academy of Sciences, 2018.
203
+ Z. Wang, V. Bapst, N. Heess, V. Mnih, R. Munos, K. K., and N. de Freitas. Sample efficient actor-critic with experience replay. In International Conference on Learning Representations (ICLR), 2017.
204
+
205
+ We considered three parameterizations for the action advantage:
206
+
207
+ $$
208
+ \begin{array} { r l } { f _ { \mathbf { Q } } ^ { \aleph } ( s , a ) = } & { \quad - \frac { 1 } { 2 } \left[ a - \mathbf { m } ( s ) \right] ^ { \top } \mathbf { L } _ { \mathbf { Q } } ( s ) \mathbf { L } _ { \mathbf { Q } } ^ { \top } ( s ) \left[ a - \mathbf { m } ( s ) \right] } \\ { f _ { \mathrm { S G } } ^ { \aleph } ( s , a ) = } & { \ K ( s ) \ \exp \left\{ - \frac { 1 } { 2 } \left[ a - \mathbf { m } ( s ) \right] ^ { \top } \mathbf { L } _ { \mathrm { S G } } ^ { - 1 } ( s ) \left[ a - \mathbf { m } ( s ) \right] \right\} } \\ { f _ { \mathrm { D G } } ^ { \aleph } ( s , a ) = } & { \ K ( s ) \ \exp \left\{ - \frac { 1 } { 2 } \mathbf { a } _ { + } ^ { \top } \mathbf { L } _ { + } ^ { - 1 } ( s ) \mathbf { a } _ { + } - \frac { 1 } { 2 } \mathbf { a } _ { - } ^ { \top } \mathbf { L } _ { - } ^ { - 1 } ( s ) \mathbf { a } _ { - } \right\} } \end{array}
209
+ $$
210
+
211
+ We recall $\mathbf { a } _ { - } = \operatorname* { m i n } \left[ a - \mathbf { m } ( s ) , \mathbf { 0 } \right]$ and $\mathbf { a } _ { + } { = } \operatorname* { m a x } \left[ a { - } \mathbf { m } ( s ) , \mathbf { 0 } \right]$ . The first parameterization $f _ { \mathrm { Q } } ^ { \mathrm { w } }$ is identical to the one employed by NAF (Gu et al., 2016), and requires training $( d _ { A } ^ { 2 } + d _ { A } ) / 2$ coefficients of the lower triangular matrix $\mathbf { L } _ { \mathrm { Q } }$ . Its quadratic complexity makes the choice of $f _ { \mathrm { Q } } ^ { \ w }$ unfavorable for high-dimensional action spaces (e.g. it requires 153 parameters for the 17-dimensional Humanoid tasks of OpenAI Gym, against the 35 of $f _ { \mathrm { D G } } ^ { \mathrm { w } } )$ . In order to preserve bijection between $\mathbf { L } _ { \mathrm { Q } }$ and $\mathbf { L } _ { \mathrm { Q } } \mathbf { L } _ { \mathrm { Q } } ^ { \intercal }$ , the diagonal terms are mapped to $\mathcal { R } ^ { + }$ with a Softplus function. The expectation under a Gaussian policy can be computed as (Petersen et al., 2008):
212
+
213
+ $$
214
+ \begin{array} { r } { \mathbb { E } _ { a ^ { \prime } \sim \pi } \left[ f _ { \mathrm { Q } } ^ { \mathrm { w } } ( s , a ^ { \prime } ) \right] = \operatorname { T r } \left[ \mathbf { L } _ { \mathrm { Q } } ( s ) \mathbf { L } _ { \mathrm { Q } } ^ { \mathsf { T } } ( s ) \Sigma ( s ) \right] } \end{array}
215
+ $$
216
+
217
+ Here Tr denotes the trace of a matrix.
218
+
219
+ The second parameterization requires training the $1 + d _ { A }$ coefficients for $K ( s )$ and the diagonal matrix $\mathbf { L } ( s )$ . The expectation can be easily derived from the properties of products of Gaussian densities:
220
+
221
+ $$
222
+ \mathbb { E } _ { a ^ { \prime } \sim \pi } \left[ f _ { \mathrm { S G } } ^ { \mathtt { w } } ( s , a ^ { \prime } ) \right] = K ( s ) \sqrt { \frac { | \mathbf { L } ( s ) | } { | \mathbf { L } ( s ) + \boldsymbol { \Sigma } ( s ) | } }
223
+ $$
224
+
225
+ Here $| \cdot |$ denotes a determinant.
226
+
227
+ To derive the expectation of the third parameterization, which was used for most results in the paper, we recall that the expectation of a product of independent variables is the product of the expectations. For one component $i$ of the action vector:
228
+
229
+ $$
230
+ \mathbb { E } _ { a ^ { \prime } \sim \pi } \left[ e ^ { - \frac { 1 } { 2 } u _ { + , i } ^ { \tau } \ L _ { + , i } ^ { - 1 } ( s ) \ u _ { + , i } - \frac { 1 } { 2 } u _ { - , i } ^ { \tau } \ L _ { - , i } ^ { - 1 } ( s ) \ u _ { - , i } } \right] = \frac { \sqrt { \frac { L _ { + , i } ( s ) } { L _ { + , i } ( s ) + \Sigma _ { i } ( s ) } } + \sqrt { \frac { L _ { - , i } ( s ) } { L _ { - , i } ( s ) + \Sigma _ { i } ( s ) } } } { 2 }
231
+ $$
232
+
233
+ Here we exploited the symmetry of the Gaussian policy around the mean. Since $\Sigma , \mathbf { L } _ { + }$ , and $\mathbf { L } _ { - }$ are all diagonal, we can compute the expectation:
234
+
235
+ $$
236
+ \mathbb { E } _ { a ^ { \prime } \sim \pi } \left[ f _ { \mathrm { D G } } ^ { \mathrm { w } } ( s , a ^ { \prime } ) \right] = K ( s ) \prod _ { i = 1 } ^ { d _ { A } } \frac { \sqrt { \frac { L _ { + , i } ( s ) } { L _ { + , i } ( s ) + \Sigma _ { i } ( s ) } } + \sqrt { \frac { L _ { - , i } ( s ) } { L _ { - , i } ( s ) + \Sigma _ { i } ( s ) } } } { 2 }
237
+ $$
238
+
239
+ Finally, we note that all these parameterizations are differentiable.
240
+
241
+ # B SENSITIVITY TO HYPER-PARAMETERS
242
+
243
+ Figure 6 shows the robustness of RACER to various hyper-parameters and to the choice of the advantage parameterizations introduced in App. A. Moreover, we can bypass the advantage approximator (i.e. $A ^ { \mathfrak { w } } { : = } 0 )$ and rely exclusively on the state value approximator. We recall the on-policy value estimator obtained with “variance truncation and bias correction” (TBC) (Wang et al., 2017) (Sec. 4):
244
+
245
+ $$
246
+ \hat { V } _ { t } ^ { \mathrm { t b c } } = V ^ { \mathrm { u } } ( s _ { t } ) + \operatorname* { m i n } \{ 1 , \rho _ { t } \} ( \hat { Q } _ { t } ^ { \mathrm { r e t } } - Q ^ { \mathrm { u } } ( s _ { t } , a _ { t } ) )
247
+ $$
248
+
249
+ From Eq. 2 and 19 we obtain $\hat { Q } ^ { \mathrm { r e t } } \big ( s _ { t } , a _ { t } \big ) = r _ { t + 1 } + \gamma \hat { V } ^ { \mathrm { t b c } } \big ( s _ { t + 1 } \big )$ . By neglecting $A ^ { \mathfrak { w } }$ , from this relation and Eq. 19, we obtain a recursive Retrace-based estimator for the on-policy state value that depends on $V ^ { \mathrm { { w } } }$ alone:
250
+
251
+ $$
252
+ \hat { V } _ { t } ^ { \mathrm { t b c } } = V ^ { \mathrm { v } } ( s _ { t } ) + \operatorname* { m i n } \left\{ 1 , \rho ( s _ { t } , a _ { t } ) \right\} \Big [ r _ { t + 1 } + \gamma \hat { V } ^ { \mathrm { t b c } } ( s _ { t + 1 } ) - V ^ { \mathrm { u } } ( s _ { t } ) \Big ]
253
+ $$
254
+
255
+ This target is equivalent to the recently proposed $\mathrm { v } .$ -trace estimator (Espeholt et al., 2018) when all importance weights are clipped at 1, which was empirically found by the authors to be the best-performing solution. As expected, lacking a model for $A ^ { \mathfrak { w } } ( s , a )$ , this architecture (denoted as V-RACER in the first column of results of Fig. 6) yielded worse performance than the original RACER. However the difference is often minor and the increased simplicity of this architecture might justify its adoption for some problems.
256
+
257
+ ![](images/4b3e2406b36f277ce9faeeccd263995374e7920211f7bf4101bd5b708c00bbb2.jpg)
258
+ Figure 6: Mean cumulative rewards with RACER on OpenAI Gym tasks exploring the effect of the choice of advantage parameterization, ReF-ER tolerance factor $D$ , mini-batch size $B$ , number of time steps per gradient step $F$ , and learning rate $\eta$ . Dashed-black lines refer to the baseline parameters. The $y$ -axes are magnified around the final returns to clarify often minor differences in performance.
259
+
260
+ The tolerance $D$ for far-policy samples in the RM has a similar effect as $c _ { \mathrm { m a x } }$ : low values tend to delay learning while high values reduce the fraction of the RM that is used to compute updates and may decrease the accuracy of gradient estimates. Increasing the number $F$ of time steps per gradient step could either cause a rightward shift of the expected returns because the learner computes fewer updates for the same budget of observations, or it could aid the learner by providing more on-policy samples. The actual outcomes depend on the problem: tasks with simpler dynamics (e.g. HalfCheetah) can be learned more quickly by performing more gradient steps, while problems with more complex dynamics (e.g. Ant, Humanoid) benefit from more on-policy samples. The batch-size $B$ and learning rate $\eta$ have a minor effect on performance.
261
+
262
+ # C STATE, ACTION AND REWARD PREPROCESSING
263
+
264
+ Several authors have employed state (Henderson et al., 2017) and reward (Duan et al., 2016) (Gu et al., 2017) rescaling to improve the learning results. This technique has not systematically been studied but reflects a deeper challenge of RL. The success of any RL algorithm is intrinsically linked to the design of the control problem. For example, the stability of DDPG is affected by the L2 weight decay of the value-network. Depending on the numerical values of the distribution of rewards provided by the environment and the choice of weight decay coefficient, the L2 penalization can be either negligible or dominate the Bellman error. Similarly, the distribution of values describing the state variables can increase the challenge of learning by gradient descent.
265
+
266
+ We propose partially addressing these issues by rescaling both rewards and state vectors depending on the the experiences contained in the RM. At the beginning of training we prepare the RM by collecting $N _ { \mathrm { s t a r t } }$ observations and then we compute:
267
+
268
+ $$
269
+ \begin{array} { r l } { \mu _ { s } = } & { \frac { 1 } { n _ { \mathrm { o b s } } } \sum _ { t = 0 } ^ { n _ { \mathrm { o b s } } } s _ { t } } \\ { \sigma _ { s } = } & { \sqrt { \frac { 1 } { n _ { \mathrm { o b s } } } \sum _ { t = 0 } ^ { n _ { \mathrm { o b s } } } \left( s _ { t } - \mu _ { s } \right) ^ { 2 } } } \end{array}
270
+ $$
271
+
272
+ Throughout training, $\mu _ { s }$ and $\sigma _ { s }$ are used to standardize all state vectors $\hat { s } _ { t } = ( s _ { t } - \mu _ { s } ) / ( \sigma _ { s } + \epsilon )$ before feeding them to the network approximators. Moreover, every 1000 steps, chosen as the smallest power of ten that did not affect the run time, we loop over the $n _ { \mathrm { o b s } }$ observations stored in the RM to compute:
273
+
274
+ $$
275
+ \sigma _ { r } \gets \sqrt { \frac { 1 } { n _ { \mathrm { o b s } } } \sum _ { t = 0 } ^ { n _ { \mathrm { o b s } } } { \left( r _ { t + 1 } \right) ^ { 2 } } }
276
+ $$
277
+
278
+ This value is used to scale the rewards $\hat { r } _ { t } = r _ { t } / ( \sigma _ { r } + \epsilon )$ used by the Q-learning target of DDPG and the Retrace algorithm for RACER. We use $\epsilon = 1 0 ^ { - 7 }$ to ensure numerical stability.
279
+
280
+ The actions sampled by the learner may need to be rescaled or bounded to some interval depending on the environment. For the OpenAI Gym tasks this amounts to a linear scaling $\textit { a } ^ { \prime } = \textit { a }$ $\mathsf { \backslash u p p e r \_ v a l u e - l o w e r \_ v a l u e ) / 2 }$ , where the values specified by the Gym library are $\pm 0 . 4$ for the Humanoid tasks, $\pm 8$ for the Pendulum tasks, and $\pm 1$ for all others. The tasks of DeepMind Control Suite are defined with all actions bounded do the interval $[ - 1 , 1 ] ^ { d _ { A } }$ . In this case we can learn Gaussian policies, as if the action space were unbounded, and then map the actions sent to the environment with an hyperbolic tangent: $a _ { t } ^ { \prime } = \operatorname { t a n h } a _ { t }$ . This approach, however, might prevent efficiently learning policies that behave like bang-bang controllers. Close to the bounds of the control space, actions that should be similar may be mapped to distant positions in the unbounded action space. Therefore, learning bang-bang controls is more likely to be hindered by the $D _ { K L }$ penalties of ReF-ER. This issue may explain some poor results on the DeepMind Control Suite shown in Fig. 10 and 11. These results show that successfully tackling control problems with bounded action spaces may require policies parameterized as Beta distribution (Chou et al., 2017).
281
+
282
+ # D IMPLEMENTATION AND NETWORK ARCHITECTURE DETAILS
283
+
284
+ We implemented all presented learning algorithms within smarties,2 our open source $\mathrm { C } + +$ RL framework, and optimized for high CPU-level efficiency through fine-grained multi-threading, strict control of cache-locality, and computation-communication overlap. On every step, we asynchronously obtain on-policy data by sampling the environment with $\pi$ , which advances the index $t$ of observed time steps, and we compute updates by sampling from the Replay Memory (RM), which advances the index $k$ of gradient steps (Fig. 1a). During training, the ratio of time and update steps is usually equal to a constant: $t / k = \bar { F }$ . This parameter affects the data efficiency of the algorithm; by lowering $F$ each sample is used more times to improve the policy before being replaced by newer samples. Upon completion of all tasks, we apply the gradient update and proceed to the next step. The pseudo-codes in App. E neglect parallelization details as they do not affect execution.
285
+
286
+ In order to evaluate all algorithms on equal footing, we use the same baseline network architecture for RACER, DDPG and NAF, consisting of an MLP with two hidden layers of 128 units each. For the sake of computational efficiency, we employed Softsign activation functions. The weights of the hidden√ √ layers are initialized according to $\mathcal { U }$ $\lceil - 6 / \sqrt { f _ { i } + \bar { f _ { o } } }$ , $6 / \sqrt { f _ { i } + f _ { o } } ]$ , where $f _ { i }$ and $f _ { o }$ are respectively the layer’s fan-in and fan-out (Glorot & Bengio, 2010). The weights of the linear output layer are√ √ initialized from the distribution $\mathcal { A } \left[ - 0 . 1 / \sqrt { f _ { i } } , 0 . 1 / \sqrt { f _ { i } } \right]$ , such that the MLP has near-zero outputs at the beginning of training. When sampling the components of the action vectors, the policies are treated as truncated normal distributions with symmetric bounds at three standard deviations from the mean. Finally, we optimize the network weights with the Adam algorithm (Kingma & Ba, 2015).
287
+
288
+ RACER We note that the values of the diagonal covariance matrix are shared among all states and initialized to $\pmb { \Sigma } = 0 . 2 \mathbf { I }$ . The remaining hyper-parameters of RACER are listed in table 1.
289
+
290
+ DDPG In its original formulation, DDPG transforms the policy-network’s output onto the bounded interval $[ - 1 , 1 ] ^ { \breve { d } _ { A } }$ with an hyperbolic tangent function. We found that bounding the action space may limit the performance of DDPG with the OpenAI MuJoCo tasks. In order to stabilize the unboundedaction version of DDPG $\mathrm { \backslash u - D D P G } ,$ we set the learning rate for the policy-network to $1 \cdot 1 0 ^ { - 5 }$ and that of the value-network to $1 \cdot 1 0 ^ { - 4 }$ with L2 weight decay coefficient of $1 \cdot 1 0 ^ { - 4 } $ . These changes lead to better performance also with the bounded-action DDPG and therefore were used for all numerical experiments. The RM is set to contain $N { = } 2 ^ { 1 9 }$ observations and we follow Henderson et al. (2017) for the remaining hyper-parameters: mini-batches of $B = 1 2 8$ samples, $\gamma { = } 0 . 9 9 5$ , soft target network update coefficient 0.01. We note that while DDPG is the only algorithm employing two networks, choosing half the batch-size as RACER and NAF makes the compute cost roughly equal among the three methods. Finally, when using ReF-ER we add exploratory Gaussian noise to the deterministic policy: $\boldsymbol { \pi } ^ { \mathrm { w } ^ { \prime } } { = } \mathbf { m } ^ { \mathrm { w } ^ { \prime } } { + } \dot { \mathcal { N } } ( \mathbf { 0 } , \sigma ^ { 2 } \mathbf { I } )$ with $\sigma { = } 0 . 2$ . When performing regular ER or PER we sample the exploratory noise from an Ornstein–Uhlenbeck process with $\sigma { = } 0 . 2$ and $\theta { = } 0 . 1 5$ .
291
+
292
+ Table 1: RACER architecture’s baseline hyper-parameters.
293
+
294
+ <table><tr><td>Short-hand</td><td>Description</td><td>Baseline value</td></tr><tr><td>C</td><td>Annealing parameter of Cmax*</td><td>4</td></tr><tr><td>N</td><td>Size of the Replay Memory.</td><td>219</td></tr><tr><td>Nstart</td><td>Number of samples gathered before training starts.</td><td>218</td></tr><tr><td>D</td><td>Fraction of far-policy samples allowed in the RM.</td><td>0.1</td></tr><tr><td>B</td><td>Mini-batch size.</td><td>256</td></tr><tr><td>F</td><td>Ratio between observed time steps and gradient steps.</td><td>1</td></tr><tr><td>n</td><td>Learning rate.</td><td>10-4</td></tr><tr><td>Y</td><td>Discount factor.</td><td>0.995</td></tr></table>
295
+
296
+ NAF We use the same baseline MLP architecture and learning rate $\eta = 1 0 ^ { - 4 }$ , batch-size $B = 2 5 6$ discount $\gamma = 0 . 9 9 5$ , RM size $N = 2 ^ { 1 9 }$ , and soft target network update coefficient 0.01. Gaussian noise is added to the deterministic policy $\scriptstyle \pi ^ { \mathsf { w } ^ { \prime } } = \mathbf { m } ^ { \mathsf { w } ^ { \prime } } + { \bar { \mathcal { N } } } ( \mathbf { 0 } , \sigma ^ { 2 } \mathbf { I } )$ with $\sigma { = } 0 . 2$ .
297
+
298
+ PPO We tuned the hyper-parameters as Henderson et al. (2017): $\gamma { = } 0 . 9 9 5$ , GAE $\lambda { = } 0 . 9 7$ , policy clipping at $\Delta \rho _ { t } { = } 0 . 2$ , and we alternate performing 2048 environment steps and 10 optimizer epochs with batch-size 64 on the obtained data. Both the policy- and the value-network are 2-layer MLPs with 64 units per layer. We further improved results by having separate learning rates ( $1 0 ^ { - 4 }$ for the policy and $3 \cdot 1 0 ^ { - 4 }$ for the critic) with the same annealing as used in the other experiments.
299
+
300
+ ACER We kept most hyper-parameters as described in the original paper (Wang et al., 2017): the TBC clipping parameter is $c = 5$ , the trust-region update parameter is $\delta = 1$ , and five samples of the advantage network are used to compute $A ^ { \mathfrak { w } }$ estimates under $\pi$ . We use a RM of $1 e 5$ samples, each gradient is computed from 24 uniformly sampled episodes, and we perform one gradient step per environment step. Because here learning is not from pixels, each network (value, advantage, and policy) is an MLP with 2 layers and 64 units per layer (we tried training runs with 96 and 128 units per layer and did not observe improvements). Accordingly, we reduced the soft target-network update coefficient $\begin{array} { r } { \alpha = 0 . 0 0 1 , } \end{array}$ ) and the learning rates for the value- $( \eta = 3 \cdot 1 0 ^ { - 4 } )$ and for the policy-network $( \eta = 1 \cdot 1 0 ^ { - 4 } )$ ). Despite these reduced learning rates, Fig. 7 shows that ACER’s techniques do not prevent the policy from becoming disconnected from prior behaviors. We note that hyper-parameters are known to affect performance (Henderson et al., 2017) and we do not exclude that ACER could have performed better with more extensive tuning.
301
+
302
+ # E PSEUDO-CODES
303
+
304
+ Remarks on algorithm 1: 1) It describes the general structure of the ER-based off-policy RL algorithms implemented for this work (i.e. RACER, DDPG, and NAF). 2) This algorithm can be adapted to conventional ER, PER (by modifying the sampling algorithm to compute the gradient estimates), or ReF-ER (by following Sec. 3)). 3) The algorithm requires 3 hyper-parameters: the ratio of time step to gradient steps $F$ (usually set to 1 as in DDPG), the maximal size of the RM $N$ , and the minimal size of the RM before we begin gradient updates $N _ { \mathrm { s t a r t } }$ .
305
+
306
+ Remarks on algorithm 2: 1) The reward for an episode’s initial state, before having performed any action, is zero by definition. 2) The value $V ^ { \mathbb { w } } ( s _ { t } )$ for the last state of an episode is computed if the episode has been truncated due the task’s time limits or is set to zero if $s _ { t }$ is a terminal state. 3) Each time step we use the learner’s updated policy network and we store $\mu _ { t } = \{ \mathbf { m } ( s _ { t } ) , \pmb { \Sigma } ( s _ { t } ) \}$ .
307
+
308
+ Remarks on algorithm 3: 1) In order to compute the gradients $\hat { g } _ { t _ { i } } ^ { A C } ( \mathbf { w } )$ , we rely on advantage estimates $\boldsymbol { Q } _ { t _ { i } } ^ { \mathrm { r e t } }$ that were computed when subsequent time steps in $t _ { i }$ ’s episode were previously drawn by ER. Not having to compute the quantities , and $\rho$ for all following steps comes with clear computational
309
+
310
+ Algorithm 1 Serial description of the master algorithm.
311
+
312
+ $t = 0 , k = 0$ ,
313
+ Initialize an empty RM, network weights $\mathtt { w }$ , and Adam’s (Kingma & Ba, 2015) moments.
314
+ while $n _ { \mathrm { o b s } } < N _ { \mathrm { s t a r t } }$ do Advance the environment according algorithm 2.
315
+ end while
316
+ Compute the initial statistics used to standardize the state vectors (App. C).
317
+ Compute the initial statistics used to rescale the rewards (App. C).
318
+ while $t < T _ { \operatorname* { m a x } }$ do while $t < F \cdot k$ do Advance the environment according to algorithm 2. while $n _ { \mathrm { o b s } } > N _ { \mathrm { s t a r t } }$ do Remove an episode from the RM (either first in first out or as in Sec. 3). end while $t \gets t + 1$ end while Sample $B$ time steps from the RM to compute a gradient estimate (e.g. for RACER with algorithm 3). Perform the gradient step with the Adam algorithm. If applicable, update the ReF-ER penalization coefficient $\beta$ . if modulo $( k , 1 0 0 0 )$ is 0 then Update the statistics used to rescale the rewards (App. C). end if k ← k + 1
319
+ end while
320
+
321
+ # Algorithm 2 Environment sampling
322
+
323
+ Observe $s _ { t }$ and $r _ { t }$ .
324
+ if $s _ { t }$ concludes an episode then Store data for $t$ into the RM: $\left\{ { { s _ { t } } , { r _ { t } } , V ^ { \mathrm { w } } ( { s _ { t } } ) } \right\}$ Compute and store $\boldsymbol { Q } ^ { \mathrm { r e t } }$ for all steps of the episode
325
+ else Sample the current policy $a _ { t } \sim \pi ^ { \mathsf { w } } ( a | s _ { t } ) = \mu _ { t }$ Store data for $t$ into the RM: $\left\{ s _ { t } , r _ { t } , a _ { t } , \mu _ { t } , V ^ { \mathsf { w } } \big ( s _ { t } \big ) , A ^ { \mathsf { w } } \big ( s _ { t } , a _ { t } \big ) \right\}$ Advance the environment by performing $a _ { t }$
326
+ end if
327
+
328
+ efficiency benefits, at the risk of employing an incorrect estimate for $Q _ { t _ { i } } ^ { \mathrm { r e t } }$ . In practice, we find that the Retrace values incur only minor changes between updates (even when large RM sizes decrease the
329
+
330
+ # Algorithm 3 RACER’s gradient update
331
+
332
+ <table><tr><td>for mini-batch sample i = O to B do Fetch allrelevantinformation: St,atQtt,andμt={mt∑t}. Call the approximator to compute π&quot;,V(sti), A&quot;(St, @ti) Update Qret for all prior steps in ti&#x27;s episode with Vw(sti),A&quot;(Sti , ati) Update the importance weight ρti = π&quot;(ati|Sti)/μti(at: |Sti)</td></tr><tr><td>if1/Cmax&lt;pt&lt;Cmax then Compute gAC gAC(w) according to Sec. 4 else</td></tr><tr><td>9ti AC (w)=0 end if</td></tr><tr><td>gReF-ER(w)= βgAC(w)-(1-β)VDkL[μti(-|st:)lπ&quot;(*|st)] ReF-ER penalization: gti end for Accumulate the gradient estimate over the mini-batch ∑=0 9R ReF-ER(w) JB</td></tr></table>
333
+
334
+ <table><tr><td>Algorithm 4 DDPG&#x27;s gradient update with ReF-ER</td></tr><tr><td>for mini-batch sample i= O to B do Fetch all relevant information: Sti,ati,and μti = {mti,∑ti}. The policy-network computes m&quot;(sts) and the value-network computes Qw&#x27;(St , äti ). Define a stochastic policy with Gaussian exploration noise: π&quot;(a | sti)= m(st)+N</td></tr><tr><td>Update the importance weight βt: = π&quot;(ati|Sti)/μti(ati|Sti) if 1/Cmax &lt; pti &lt;Cmax then</td></tr><tr><td>Compute the policy at ti+1 with the target-network: m&quot;(Sti+1) Compute the Q-learning target: qti = rti+1 + γQ (Sti+1,m&quot;(Sti+1))</td></tr><tr><td>The gradient gt&amp;(w&#x27;) of the value-network minimizes the squared distance from qti ·</td></tr><tr><td>The gradient gDP gPG(w) of the policy-network is the deterministic PG (Eq. 9).</td></tr><tr><td></td></tr><tr><td>else g (w&#x27;)=0,gDPG(w)=0</td></tr><tr><td>end if ReF-ER penalization: RF-ER()=βgDG()-(1-β)Dμt(-|st)l/(st)</td></tr></table>
335
+
336
+ frequency of updates to the Retrace estimator) and that relying on previous estimates has no evident effect on performance. This could be attributed to the gradual policy changes enforced by ReF-ER. 2) With a little abuse of the notation, with $\pi$ (or $\mu _ { . }$ ) we denote the statistics (mean, covariance) of the multivariate normal policy, with $\pi ( a | s )$ we denote the probability of performing action $a$ given state $s$ , and with $\pi ( \cdot | s )$ we denote the probability density function over actions given state $s$ .
337
+
338
+ Remarks on algorithm 4: 1) It assumes that weights and Adam are initialized for both policy-network and value-network. 2) The “target” weights are initialized as identical to the “trained” weights. 3) For the sake of brevity, we omit the algorithm for NAF, whose structure would be very similar to this one. The key difference is that NAF employs only one network and all the gradients are computed from the Q-learning target.
339
+
340
+ # SUPPLEMENTARY REFERENCES
341
+
342
+ [S1] P. Chou, D. Maturana, and S. Scherer. Improving stochastic policy gradients in continuous control with deep reinforcement learning using the beta distribution. In International Conference on Machine Learning, pp. 834–843, 2017.
343
+
344
+ [S2] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the 13th international conference on artificial intelligence and statistics, pp. 249–256, 2010.
345
+
346
+ [S3] S. Gu, T. Lillicrap, Z. Ghahramani, R. E Turner, and S. Levine. Q-prop: Sample-efficient policy gradient with an off-policy critic. In International Conference on Learning Representations (ICLR), 2017.
347
+
348
+ ![](images/863aa310e277a818ee1432f564f09bae7ac18f984b41cfbccc4a1bd507c0cc81.jpg)
349
+ Figure 7: Average $D _ { K L } ( \mu _ { t } \| \pi ^ { \mathtt { w } } )$ for ACER (purple line), RACER baseline (green line, $C { = } 4$ , $N { = } 1 0 ^ { 1 9 }$ ), RACER with conservative ReF-ER constraints and large RM size (blue line, $C { = } 2$ , $N { = } 1 0 ^ { 2 0 }$ ), and RACER with relaxed ReF-ER constraints and smaller RM size (red line, $C { = } 8$ , $N { = } 1 0 ^ { 1 8 }$ ).
350
+
351
+ [S4] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015.
352
+
353
+ [S5] K. B. Petersen, M. S. Pedersen, et al. The matrix cookbook. Technical University of Denmark, 7(15):510, 2008.
354
+
355
+ ![](images/9c8a9d5163b0e5ec6930b914dbd682c9f0d222acb32d59a4d44fa0161794b8e1.jpg)
356
+ Figure 8: $2 0 ^ { \mathrm { t h } }$ and $8 0 ^ { \mathrm { t h } }$ percentiles of cumulative rewards for episodes of OpenAI Gym tasks ended within intervals of $2 \cdot 1 \bar { 0 } ^ { 5 }$ time steps across 5 independent training runs. The figures includes results for PPO (black contours), RACER baseline (green contours, $C = 4$ , $N = \overline { { 1 0 ^ { 1 9 } } }$ ), RACER with conservative ReF-ER constraints and large RM size (blue contours, $C = 2$ , $N = 1 0 ^ { 2 0 }$ ), and RACER with relaxed ReF-ER constraints and smaller RM size (red contours, $C = 8$ , $N = 1 0 ^ { 1 8 }$ ).
357
+
358
+ ![](images/5438bba8c8373cc49fff03377836ba4e2afb1deab101b17f669e80e5666d3a84.jpg)
359
+ Figure 9: $2 0 ^ { \mathrm { t h } }$ and $8 0 ^ { \mathrm { t h } }$ percentiles of cumulative rewards for episodes of OpenAI Gym tasks ended within intervals of $2 \cdot 1 0 ^ { 5 }$ time steps across 5 independent training runs. The figures includes results for DDPG (green contours), DDPG with PER (red contours), and $\mathtt { u - D D P G }$ with ReF-ER (blue contours, $C = 4$ , and all other hyper-parameters set according to App. D).
360
+
361
+ ![](images/44401207c677aad2f129128914ff8cbc45b15441ed441c84293900e8bc206350.jpg)
362
+ Figure $1 0 \colon 2 0 ^ { \mathrm { t h } }$ and $8 0 ^ { \mathrm { t h } }$ percentiles of cumulative rewards for trajectories of DeepMind Control Suite tasks ended within intervals of $2 \cdot 1 0 ^ { 5 }$ time steps across 5 independent training runs using the baseline RACER hyper-parameters (Table 1).
363
+
364
+ ![](images/8a899a9ca2e6c00be6eef1e2af70ce0a8e98acd4738b4713dac0ef5231e65933.jpg)
365
+ Figure 11: $2 0 ^ { \mathrm { t h } }$ and $8 0 ^ { \mathrm { t h } }$ percentiles of cumulative rewards for trajectories of DeepMind Control Suite tasks ended within intervals of $2 \cdot 1 0 ^ { 5 }$ time steps across 5 independent training runs for $\mathtt { u - D D P G }$ with ReF-ER, $C = 4$ , and all other hyper-parameters set according to App. D.
parse/train/Bye9LiR9YX/Bye9LiR9YX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bye9LiR9YX/Bye9LiR9YX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bye9LiR9YX/Bye9LiR9YX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Syhr6pxCW/Syhr6pxCW.md ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PIXELNN: EXAMPLE-BASED IMAGE SYNTHESIS
2
+
3
+ Aayush Bansal Yaser Sheikh Deva Ramanan
4
+
5
+ Carnegie Mellon University {aayushb,yaser,deva}@cs.cmu.edu
6
+
7
+ # ABSTRACT
8
+
9
+ We present a simple nearest-neighbor (NN) approach that synthesizes highfrequency photorealistic images from an “incomplete” signal such as a lowresolution image, a surface normal map, or edges. Current state-of-the-art deep generative models designed for such conditional image synthesis lack two important things: (1) they are unable to generate a large set of diverse outputs, due to the mode collapse problem. (2) they are not interpretable, making it difficult to control the synthesized output. We demonstrate that NN approaches potentially address such limitations, but suffer in accuracy on small datasets. We design a simple pipeline that combines the best of both worlds: the first stage uses a convolutional neural network (CNN) to map the input to a (overly-smoothed) image, and the second stage uses a pixel-wise nearest neighbor method to map the smoothed output to multiple high-quality, high-frequency outputs in a controllable manner. Importantly, pixel-wise matching allows our method to compose novel high-frequency content by cutting-and-pasting pixels from different training exemplars. We demonstrate our approach for various input modalities, and for various domains ranging from human faces, pets, shoes, and handbags.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ We consider the task of generating high-resolution photo-realistic images from incomplete input such as a low-resolution image, sketches, surface normal map, or label mask. Such a task has a number of practical applications such as upsampling/colorizing legacy footage, texture synthesis for graphics applications, and semantic image understanding for vision through analysis-by-synthesis. These problems share a common underlying structure: a human/machine is given a signal that is missing considerable details, and the task is to reconstruct plausible details.
14
+
15
+ Consider the edge map of cat in Figure 1-c. When we humans look at this edge map, we can easily imagine multiple variations of whiskers, eyes, and stripes that could be viable and pleasing to the eye. Indeed, the task of image synthesis has been well explored, not just for its practical applications but also for its aesthetic appeal.
16
+
17
+ GANs: Current state-of-the-art approaches rely on generative adversarial networks (GANs) (Goodfellow et al., 2014), and most relevant to us, conditional GANS that generate image conditioned on an input signal (Denton et al., 2015; Radford et al., 2015; Isola et al., 2016). We argue that there are two prominent limitations to such popular formalisms: (1) First and foremost, humans can imagine multiple plausible output images given a incomplete input. We see this rich space of potential outputs as a vital part of the human capacity to imagine and generate. Conditional GANs are in principle able to generate multiple outputs through the injection of noise, but in practice suffer from limited diversity (i.e., mode collapse) (Fig. 2). Recent approaches even remove the noise altogether, treating conditional image synthesis as regression problem (Chen & Koltun, 2017). (2) Deep networks are still difficult to explain or interpret, making the synthesized output difficult to modify. One implication is that users are not able to control the synthesized output. Moreover, the right mechanism for even specifying user constraints (e.g., “generate a cat image that looks like my cat”) is unclear. This restricts applicability, particularly for graphics tasks.
18
+
19
+ Nearest-neighbors: To address these limitations, we appeal to a classic learning architecture that can naturally allow for multiple outputs and user-control: non-parametric models, or nearestneighbors (NN). Though quite a classic approach (Efros & Leung, 1999; Efros & Freeman, 2001;
20
+
21
+ ![](images/82b6530a39c59797d49f4600bdd196a0e71c5c25b1644e46bf1a210a7e6f8387.jpg)
22
+ Figure 1: Our approach generates photorealistic output for various “incomplete” signals such as a low resolution image, a surface normal map, and edges/boundaries for human faces, cats, dogs, shoes, and handbags. Importantly, our approach can easily generate multiple outputs for a given input which was not possible in previous approaches (Isola et al., 2016) due to mode-collapse problem. Best viewed in electronic format.
23
+
24
+ ![](images/5e82f8c24138fb7b5f3c36ba1c13ec82f08d69b345016495485b8b3119bcd69e.jpg)
25
+ Figure 2: Mode collapse problem for GANs: We ran pix-to-pix pipeline of Isola et al. (2016) 72 times. Despite the random noise set using dropout at test time, we observe similar output generated each time. Here we try to show 6 possible diverse examples of generation for a hand-picked bestlooking output from Isola et al. (2016).
26
+
27
+ Freeman et al., 2002; Hertzmann et al., 2001; Johnson et al., 2011), it has largely been abandoned in recent history with the advent of deep architectures. Intuitively, NN matches an incomplete input (b) Edges-to-Cats-and-Dogs query to a large corpus of training pairs of (incomplete inputs, high-quality outputs), and simply returns the corresponding output. This trivially generalizes to multiple outputs through $K$ -NN and allows for intuitive user control through on-the-fly modification of the training corpus - e.g., by restricting the training examplars to those that “look like my cat”.
28
+
29
+ In practice, there are several limitations in applying NN for conditional image synthesis. The first is a practical lack of training data. The second is a lack of an obvious distance metric. And the last is a computational challenge of scaling search to large training sets.
30
+
31
+ Approach: To reduce the dependency on training data, we take a compositional approach by matching local pixels instead of global images. This allows us to synthesize a face by “copy-pasting” the eye of one training image, the nose of another, etc. Compositions dramatically increase the representational power of our approach: given that we want to synthesize an image of $K$ pixels using $N$ training images (with $K$ pixels each), we can synthesize an exponential number $( N \bar { K } ) ^ { K }$ of compositions, versus a linear number of global matches $( N )$ . A significant challenge, however, is defining an appropriate feature descriptor for matching pixels in the incomplete input signal. We would like to capture context (such that whisker pixels are matched only to other whiskers) while allowing for compositionality (left-facing whiskers may match to right-facing whiskers). To do so, we make use of deep features, as described below.
32
+
33
+ Pipeline: Our precise pipeline (Figure 3) works in two stages. (1) We first train an initial regressor (CNN) that maps the incomplete input into a single output image. This output image suffers from the aforementioned limitations - it is a single output that will tend to look like a “smoothed” average of all the potential images that could be generated. (2) We then perform nearest-neighbor queries on pixels from this regressed output. Importantly, pixels are matched (to regressed outputs from training data) using a multiscale deep descriptor that captures the appropriate level of context. This enjoys the aforementioned benefits - we can efficiently match to an exponential number of training examples in an interpretable and controllable manner. Finally, an interesting byproduct of our approach is the generation of dense, pixel-level correspondences from the training set to the final synthesized outputs.
34
+
35
+ ![](images/32e01ff75a1e6ff1ac336d4b14e3ac4cf819a4220fe18af4b8a6fb853792b996.jpg)
36
+ Figure 3: Overview of pipeline: Our approach is a two-stage pipeline. The first stage directly regresses an image from an incomplete input (using a CNN trained with $l _ { 2 }$ loss). This image will tend to look like a “smoothed” average of all the potential images that could be generated. In the second stage, we look for matching pixels in similarly-smoothed training images. Importantly, we match pixels using multiscale descriptors that capture the appropriate levels of context (such that eye pixels tend to match only to eyes). To do so, we make use of off-the-shelf hypercolumn features extracted from a CNN trained for semantic pixel segmentation. By varying the size of the matched set of pixels, we can generate multiple outputs (on the right).
37
+
38
+ # 2 RELATED WORK
39
+
40
+ Our work is inspired by a large body of work on discriminative and generative models, nearest neighbors architectures, pixel-level tasks, and dense pixel-level correspondences. We provide a broad overview, focusing on those most relevant to our approach.
41
+
42
+ Synthesis with CNNs: Convolutional Neural Networks (CNNs) have enjoyed great success for various discriminative pixel-level tasks such as segmentation (Bansal et al., 2017; Long et al., 2015), depth and surface normal estimation (Bansal et al., 2016; Eigen et al., 2013; Eigen & Fergus, 2015), semantic boundary detection (Bansal et al., 2017; Xie & Tu, 2015) etc. Such networks are usually trained using standard losses (such as softmax or $l _ { 2 }$ regression) on image-label data pairs. However, such networks do not typically perform well for the inverse problem of image synthesis from a (incomplete) label, though exceptions do exist (Chen & Koltun, 2017). A major innovation was the introduction of adversarially-trained generative networks (GANs) (Goodfellow et al., 2014). This formulation was hugely influential in computer visions, having been applied to various image generation tasks that condition on a low-resolution image (Denton et al., 2015; Ledig et al., 2016), segmentation mask (Isola et al., 2016), surface normal map (Wang & Gupta, 2016) and other inputs (Chen et al., 2016; Huang et al., 2016; Radford et al., 2015; Wu et al., 2016; Zhang et al., 2016a; Zhu et al., 2017). Most related to us is Isola et al. (2016) who proposed a general loss function for adversarial learning, applying it to a diverse set of image synthesis tasks. Importantly, they report the problem of mode collapse, and so cannot generate diverse outputs nor control the synthesis with user-defined constraints (unlike our work).
43
+
44
+ Interpretability and user-control: Interpreting and explaining the outputs of generative deep networks is an open problem. As a community, we do not have a clear understanding of what, where, and how outputs are generated. Our work is fundamentally based on copy-pasting information via nearest neighbors, which explicitly reveals how each pixel-level output is generated (by in turn revealing where it was copied from). This makes our synthesized outputs quite interpretable. One important consequence is the ability to intuitively edit and control the process of synthesis. Zhu et al. (2016) provide a user with controls for editing image such as color, and outline. But instead of using a predefined set of editing operations, we allow a user to have an arbitrarily-fine level of control through on-the-fly editing of the exemplar set (e.g., “resynthesize the output using the eye from this training image and the nose from that one”).
45
+
46
+ Correspondence: An important byproduct of pixelwise NN is the generation of pixelwise correspondences between the synthesized output and training examples. Establishing such pixel-level correspondence has been one of the core challenges in computer vision (Choy et al., 2016; Kanazawa et al., 2016; Liu et al., 2011; Long et al., 2014; Wei et al., 2015; Zhou et al., 2016a;b). Tappen & Liu (2012) used SIFT flow (Liu et al., 2011) to hallucinate details for image super-resolution. Zhou et al. (2016b) proposed a CNN to predict appearance flow that can be used to transfer information from input views to synthesize a new view. Kanazawa et al. (2016) generate 3D reconstructions by training a CNN to learn correspondence between object instances. Our work follows from the crucial observation of Long et al. (2014), who suggested that features from pre-trained convnets can also be used for pixel-level correspondences. In this work, we make an additional empirical observation: hypercolumn features trained for semantic segmentation learn nuances and details better than one trained for image classification. This finding helped us to establish semantic correspondences between the pixels in query and training images, and enabled us to extract high-frequency information from the training examples to synthesize a new image from a given input.
47
+
48
+ ![](images/ecc8b7ee6bb4092a7a40e66b4e980d1de557f29dd6a223d35ab3c1a23e9b7d9e.jpg)
49
+ Figure 4: Frequency Analysis: We show the image and its corresponding Fourier spectrum. Note how the frequency spectrum improve as we move from left to right. The Fourier spectrum of our final output closely matches that of original high resolution image.
50
+
51
+ ![](images/89b3472a7e998f2b7a3992225707439ef7cbf865dd2a049fe67462955265e2de.jpg)
52
+ Figure 5: Global vs. Compositional: Given the low-resolution input images on the left, we show high-frequency output obtained with a global nearest neighbor versus a compositional reconstruction. We visualize the correspondences associated with the compositional reconstruction on the right. We surround the reconstruction with 8 neighboring training examples, and color code pixels to denote correspondences. For example, when reconstructing the female face, forehead pixels are copied from the top-left neighbor (orange) , while right-eye pixels are copied from the bottom-left neighbor (green).
53
+
54
+ Nonparametrics: Our work closely follows data-driven approaches that make use of nearest neighbors (Efros & Leung, 1999; Efros & Freeman, 2001; Freeman et al., 2000; 2002; Ren et al., 2005; Hays & Efros, 2007; Johnson et al., 2011; Shrivastava et al., 2011). Hays & Efros (2007) match a query image to 2 million training images for various tasks such as image completion. We make use of dramatically smaller training sets by allowing for compositional matches. Liu et al. (2007) propose a two-step pipeline for face hallucination where global constraints capture overall structure, and local constraints produce photorealistic local features. While they focus on the task of facial super-resolution, we address variety of synthesis applications.
55
+
56
+ Final, our compositional approach is inspired by Boiman & Irani (2006; 2007), who reconstruct a query image via compositions of training examples.
57
+
58
+ # 3 PIXELNN: ONE-TO-MANY MAPPINGS
59
+
60
+ We define the problem of conditional image synthesis as follows: given an input $x$ to be conditioned on (such as an edge map, normal depth map, or low-resolution image), synthesize a high-quality output image(s). To describe our approach, we focus on illustrative the task of image super-resolution,
61
+
62
+ ![](images/5b72414041bcc9c09e54351f07c329d7e9a0f3940b4e99356b12cb6dfb97612e.jpg)
63
+ Figure 6: Edges/Normals to RGB: Our approach used for faces, cats, and dogs to generate RGB maps for a given edge/normal map as input. One output was picked from the multiple generations.
64
+
65
+ where the input is a low-resolution image. We assume we are given training pairs of input/outputs, written as $( x _ { n } , y _ { n } )$ . The simplest approach would be formulating this task as a (nonlinear) regression problem:
66
+
67
+ $$
68
+ \operatorname* { m i n } _ { \boldsymbol { w } } | | \boldsymbol { w } | | ^ { 2 } + \sum _ { n } | | \boldsymbol { y } _ { n } - \boldsymbol { f } ( \boldsymbol { x } _ { n } ; \boldsymbol { w } ) | | ^ { 2 }
69
+ $$
70
+
71
+ where $f ( x _ { n } ; w )$ refers to the output of an arbitrary (possibly nonlinear) regressor parameterized with $w$ . In our formulation, we use a fully-convolutional neural net – specifically, PixelNet (Bansal et al., 2017) – as our nonlinear regressor. For our purposes, this regressor could be any trainable black-box mapping function. But crucially, such functions generate one-to-one mappings, while our underlying thesis is that conditional image synthesis should generate many mappings from an input. By treating synthesis as a regression problem, it is well-known that outputs tend to be oversmoothed (Johnson et al., 2016). In the context of the image colorization task (where the input is a grayscale image), such outputs tend to desaturated (Larsson et al., 2016; Zhang et al., 2016b).
72
+
73
+ Frequency analysis: Let us analyze this smoothing a bit further. Predicted outputs $f ( x )$ (we drop the dependance on $w$ to simplify notation) are particularly straightforward to analyze in the context of super-resolution (where the conditional input $x$ is a low-resolution image). Given a low-resolution image of a face, there may exist multiple textures (e.g., wrinkles) or subtle shape cues (e.g., of local features such as noses) that could be reasonably generated as output. In practice, this set of outputs tends to be “blurred” into a single output returned by a regressor. This can be readably seen in a frequency analysis of the input, output, and original target image (Fig. 4). In general, we see that the regressor generates mid-frequencies fairly well, but fails to return much high-frequency content. We make the operational assumption that a single output suffices for mid-frequency output, but multiple outputs are required to capture the space of possible high-frequency textures.
74
+
75
+ Global/Exemplar Matching: To capture multiple possible outputs, we appeal to a classic nonparametric approaches in computer vision. We note that a simple K-nearest-neighbor (KNN) algorithm has the trivial ability to report back $K$ outputs. However, rather than using a KNN model to return an entire image, we can use it to predict the (multiple possible) high-frequencies missing from $f ( x )$ :
76
+
77
+ $$
78
+ G l o b a l ( x ) = f ( x ) + \Bigl ( y _ { k } - f ( x _ { k } ) \Bigr ) \qquad \mathrm { w h e r e } \qquad k = \mathrm { a r g m i n D i s t } \Bigl ( f ( x ) , f ( x _ { n } ) \Bigr )
79
+ $$
80
+
81
+ where $D i s t$ is some distance function measuring similarity between two (mid-frequency) reconstructions. To generate multiple outputs, one can report back the $K$ best matches from the training set instead of the overall best match.
82
+
83
+ Compositional Matching: However, the above is limited to report back high frequency images in the training set. As we previously argued, we can synthesize a much larger set of outputs by copying and pasting (high-frequency) patches from the training set. To allow for such compositional matchings, we simply match individual pixels rather than global images. Writing $f _ { i } ( x )$ for the $i ^ { t h }$ pixel in the reconstructed image, the final composed output can be written as:
84
+
85
+ ![](images/314099b9c2383b70f21f616c4872ba44803aada1316f1a7031c781ae951d54bd.jpg)
86
+ Figure 7: Low-Resolution to High-Resolution: We used our approach for hallucinating $9 6 \times 9 6$ images from an input $1 2 \times 1 2$ low-resolution image. One output was picked from multiple generations.
87
+
88
+ ![](images/e9178537b132ca5c7eaaba1a7ffa0fd6072239f63e9ab38ffa1eb9e504681538.jpg)
89
+ Figure 8: Edges-to-Shoes: Our approach used to generate multiple outputs of shoes from the edges. We picked seven distinct examples from multiple generations.
90
+
91
+ $$
92
+ { \begin{array} { r } { C o m p _ { i } ( x ) = f _ { i } ( x ) + \left( y _ { j k } - f _ { j } ( x _ { k } ) \right) } \end{array} } \quad { \mathrm { w h e r e } } \quad ( j , k ) = \operatorname { a r g m i n } \operatorname { D i s t } \Bigl ( f _ { i } ( x ) , f _ { m } ( x _ { n } ) \Bigr )
93
+ $$
94
+
95
+ where $y _ { j k }$ refers to the output pixel $j$ in training example $k$ .
96
+
97
+ Distance function & Pixel representation: A crucial question in non-parametric matching is the choice of distance function. To compare global images, contemporary approaches tend to learn a deep embedding where similarity is preserved (Bell & Bala, 2015; Chopra et al., 2005; Long et al., 2015). Distance functions for pixels are much more subtle (3). In theory, one could also learn a metric for pixel matching, but this requires large-scale training data with dense pixel-level correspondences.
98
+
99
+ Suppose we are trying to generate the left corner of an eye. If our distance function takes into account only local information around the corner, we might mistakenly match to the other eye or mouth. If our distance function takes into account only global information, then compositional matching reduces to global (exemplar) matching. Instead, we exploit the insight from previous works that different layers of a deep network tend to capture different amounts of spatial context (due to varying receptive fields) (Bansal et al., 2017; Hariharan et al., 2015; Raiko et al., 2012; Sermanet et al., 2013). Hypercolumn descriptors (Hariharan et al., 2015) aggregate such information across multiple layers into a highly accurate, multi-scale pixel representation (visualized in Fig. 3). We construct a pixel descriptor using features from conv- $\{ 1 _ { 2 } , 2 _ { 2 } , 3 _ { 3 } , 4 _ { 3 } , 5 _ { 3 } \}$ for a PixelNet model trained for semantic segmentation (on PASCAL Context (Mottaghi et al., 2014)).
100
+
101
+ To measure pixel similarity, we compute cosine distances between two descriptors. We visualize the compositional matches (and associated correspondences) in Figure 5. Finally, Figure 6, and Figure 7 shows the output of our approach for various input modalities.
102
+
103
+ Efficient search: We have so far avoided the question of run-time for our pixel-wise NN search. A naive approach would be to exhaustively search for every pixel in the dataset but that would make the computation vary linearly with the size of dataset. On the other hand, deep generative models outpace naive NN search, which is one of the reasons for their popularity over NN search.
104
+
105
+ To speed up search, we made some non-linear approximations: Given a reconstructed image $f ( x )$ , we first (1) find the global K-NN using conv-5 features and then (2) search for pixel-wise matches only in a $T \times T$ pixel window around pixel $i$ in this set of $K$ images. In practice, we vary $K$ from $\{ 1 , 2 , . . , 1 0 \}$ and $T$ from $\{ 1 , 3 , 5 , 1 0 , 9 6 \}$ and generate 72 candidate outputs for a given input. Because the size of synthesized image is $9 6 \times 9 6$ , our search parameters include both a fullycompositional output $( K = 1 0 , T = 9 6 )$ and a fully global exemplar match $\mathit { K } = 1 , T = 1 \rangle$ as candidate outputs. Our approximate neighbor neighbor search takes .2 fps. We did not optimize our approach for speed. Importantly, we make use of a single CPU to perform our nearest neighbor search, while Isola et al. (2016)makes use of a GPU. We posit that GPU-based nearest-neighbor libraries (e.g., FAISS) will allow for real-time performance comparable to Isola et al. (2016).
106
+
107
+ ![](images/fef432b657129aff7ba768e90d0567485a1736ee78d2d0d40ece24e13adb5fb3.jpg)
108
+ Figure 9: Edges-to-Bags: Our approach used to generate multiple outputs of bags from the edges. We picked seven distinct examples from multiple generations.
109
+
110
+ ![](images/fa8d7ab945c8757c417464b92f7768ea40b982fae47ff79da4f2038a269f6351.jpg)
111
+ Figure 10: Multiple Outputs for Edges/Normals to RGB: Our approach used to generate multiple outputs of faces, cats, and dogs from the edges/normals. As an example, note how the subtle details such as eyes, stripes, and whiskers of cat (left) that could not be inferred from the edge map are different in multiple generations.
112
+
113
+ Figure 8, Figure 9, and Figure 10 show examples of multiple outputs generated using our approach by simply varying these parameters.
114
+
115
+ # 4 EXPERIMENTS
116
+
117
+ We now present our findings for multiple modalities such as a low-resolution image $1 2 \times 1 2$ image), a surface normal map, and edges/boundaries for domains such as human faces, cats, dogs, handbags, and shoes. We compare our approach both quantitatively and qualitatively with the recent work of Isola et al. (2016) that use generative adversarial networks for pixel-to-pixel translation.
118
+
119
+ Dataset: We conduct experiments for human faces, cats and dogs, shoes, and handbags using various modalities.
120
+
121
+ Human Faces We use 100, 000 images from the training set of CUHK CelebA dataset (Liu et al., 2015) to train a regression model and do NN. We used the subset of test images to evaluate our approach. The images were resized to $9 6 \times 9 6$ following Gucluturk et al. (2016).
122
+
123
+ Cats and Dogs: We use 3, 686 images of cats and dogs from the Oxford-IIIT Pet dataset (Parkhi et al., 2012). Of these 3, 000 images were used for training, and remaining 686 for evaluation. We used the bounding box annotation made available by Parkhi et al. (2012) to extract head of the cats and dogs.
124
+
125
+ <table><tr><td>Normals-to-RGB</td><td></td><td></td><td>Mean Median RMSE 11.25</td><td></td><td>22.5°</td><td>30°</td><td>AP</td></tr><tr><td>Human Faces</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>17.2</td><td>14.3</td><td>21.0</td><td>37.2</td><td>74.7</td><td>86.8</td><td>0.34</td></tr><tr><td>Pix-to-Pix (Oracle)</td><td>15.8</td><td>13.1</td><td>19.4</td><td>41.9</td><td>78.5</td><td>89.3</td><td>0.34</td></tr><tr><td>PixelNN (Rand-1)</td><td>12.8</td><td>10.4</td><td>16.0</td><td>54.2</td><td>86.6</td><td>94.1</td><td>0.38</td></tr><tr><td>PixelNN (Oracle)</td><td>10.8</td><td>8.7</td><td>13.5</td><td>63.7</td><td>91.6</td><td>96.7</td><td>0.42</td></tr><tr><td>Cats and Dogs</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>14.7</td><td>12.8</td><td>17.5</td><td>42.6</td><td>82.5</td><td>92.9</td><td>0.82</td></tr><tr><td>Pix-to-Pix (Oracle)</td><td>13.2</td><td>11.4</td><td>15.7</td><td>49.2</td><td>87.1</td><td>95.3</td><td>0.85</td></tr><tr><td>PixelNN (Rand-1)</td><td>16.6</td><td>14.3</td><td>19.8</td><td>36.8</td><td>76.2</td><td>88.8</td><td>0.80</td></tr><tr><td>PixelNN (Oracle)</td><td>13.8</td><td>11.9</td><td>16.6</td><td>46.9</td><td>84.9</td><td>94.1</td><td>0.92</td></tr></table>
126
+
127
+ <table><tr><td>Edges-to-RGB</td><td>AP</td><td></td><td>|Mean Median RMSE 11.25°</td><td></td><td></td><td>22.50</td><td>300</td></tr><tr><td>Human Faces</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>0.35</td><td>12.1</td><td>9.6</td><td>15.5</td><td>58.1</td><td>88.1</td><td>94.7</td></tr><tr><td>Pix-to-Pix(Oracle)</td><td>0.35</td><td>11.5</td><td>9.1</td><td>14.6</td><td>61.1</td><td>89.7</td><td>95.6</td></tr><tr><td>PixelNN (Rand-1)</td><td>0.38</td><td>13.3</td><td>10.6</td><td>16.8</td><td>52.9</td><td>85.0</td><td>92.9</td></tr><tr><td>PixelNN (Oracle)</td><td>0.41</td><td>11.3</td><td>9.0</td><td>14.4</td><td>61.6</td><td>90.0</td><td>95.7</td></tr><tr><td>Cats and Dogs</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>0.78</td><td>18.2</td><td>16.0</td><td>21.8</td><td>32.4</td><td>71.0</td><td>85.1</td></tr><tr><td>Pix-to-Pix(Oracle) 0.81</td><td></td><td>16.5</td><td>14.2</td><td>19.8</td><td>37.2</td><td>76.4</td><td>89.0</td></tr><tr><td>PixelNN (Rand-1)</td><td>0.77</td><td>18.9</td><td>16.4</td><td>22.5</td><td>30.3</td><td>68.9</td><td>83.5</td></tr><tr><td>PixelNN (Oracle)</td><td>0.89</td><td>16.3</td><td>14.1</td><td>19.6</td><td>37.6</td><td>77.0</td><td>89.4</td></tr></table>
128
+
129
+ Table 1: We compared our approach, PixelNN, with the GAN-based formulation of Isola et al. (2016) for human faces, and cats and dogs. We used an off-the-shelf PixelNet model trained for surface normal estimation and edge detection. We use the output from real images as ground truth surface normal and edge map respectively.
130
+
131
+ ![](images/5e4b9c11ad2454d91e8a83dfceb66f02de1ec6de487174608c9894f3525df3b7.jpg)
132
+ Figure 11: Comparison of our approach with Pix-to-Pix (Isola et al., 2016).
133
+
134
+ For human faces, and cats and dogs, we used the pre-trained PixelNet (Bansal et al., 2017) to extract surface normal and edge maps. We did not do any post-processing (NMS) to the outputs of edge detection.
135
+
136
+ Shoes & Handbags: We followed Isola et al. (2016) for this setting. 50, 000 training images of shoes were used from (Yu & Grauman, 2014), and 137, 000 images of Amazon handbags from (Zhu et al., 2016). The edge maps for this data was computed using HED (Xie & Tu, 2015) by Isola et al. (2016).
137
+
138
+ Qualitative Evaluation: Figure 11 shows the comparison of our NN based approach (PixelNN) with Isola et al. (2016) (Pix-to-Pix).
139
+
140
+ Quantitative Evaluation: We quantitatively evaluate our approach to measure if our generated outputs for human faces, cats and dogs can be used to determine surface normal and edges from an off-the-shelf trained PixelNet (Bansal et al., 2017) model for surface normal estimation and edge detection. The outputs from the real images are considered as ground truth for evaluation as it gives an indication of how far are we from them. Somewhat similar approach is used by Isola et al. (2016) to measure their synthesized cityscape outputs and compare against the output using real world images, and Wang & Gupta (2016) for object detection evaluation.
141
+
142
+ We compute six statistics, previously used by (Bansal et al., 2016; Eigen & Fergus, 2015; Fouhey et al., 2013; Wang et al., 2015), over the angular error between the normals from a synthesized image and normals from real image to evaluate the performance – Mean, Median, RMSE, ${ \bf 1 1 . 2 5 ^ { \circ } }$ , $2 2 . 5 ^ { \circ }$ , and $3 0 ^ { \circ }$ – The first three criteria capture the mean, median, and RMSE of angular error, where lower is better. The last three criteria capture the percentage of pixels within a given angular error, where higher is better. We evaluate the edge detection performance using average precision (AP).
143
+
144
+ Table 1 quantitatively shows the performance of our approach with (Isola et al., 2016). Our approach generates multiple outputs and we do not have any direct way of ranking the outputs, therefore we show the performance using a random selection from one of 72 outputs, and an oracle selecting the best output. To do a fair comparison, we ran trained models for Pix-to-Pix (Isola et al., 2016) 72 times and used an oracle for selecting the best output as well. We observe that our approach generates better multiple outputs as performance improves significantly from a random selection to oracle as compared with Isola et al. (2016). Our approach, though based on simple NN, achieves result quantitatively and qualitatively competitive (and many times better than) with state-of-the-art models based on GANs and produce outputs close to natural images.
145
+
146
+ ![](images/34433780414fdf8253053f09c62de4cfb93be4e6011215d36265d5ceeb90f64a.jpg)
147
+ Figure 12: Controllable synthesis: We generate the output of cats given a user input from a edge map. From the edge map, we do not know what type of cat it is. A user can suggest what kind of the output they would like, and our approach can copy-paste the information.
148
+
149
+ ![](images/7a60c70be503894a96230d770692694874af94ae2f0421246d7855aa77ee1529.jpg)
150
+ Figure 13: Failure Cases: We show some failure cases for different input types. Our approach mostly fails when it is not able to find suitable nearest neighbors.
151
+
152
+ Controllable synthesis: Finally, NN provides a user with intuitive control over the synthesis process. We explore a simple approach based on on-the-fly pruning of the training set. Instead of matching to the entire training library, a user can specify a subset of relevant training examples. Figure 12 shows an example of controllable synthesis. A user “instructs” the system to generate an image that looks like a particular dog-breed by either denoting the subset of training examplars (e.g., through a subcategory label), or providing an image that can be used to construct an on-the-fly neighbor set.
153
+
154
+ Failure cases: Our approach mostly fails when there are no suitable NNs to extract the information from. Figure 13 shows some example failure cases of our approach. One way to deal with this problem is to do exhaustive pixel-wise NN search but that would increase the run-time to generate the output. We believe that system-level optimization such as Scanner1, may potentially be useful in improving the run-time performance for pixel-wise NNs.
155
+
156
+ # 5 DISCUSSION
157
+
158
+ We present a simple approach to image synthesis based on compositional nearest-neighbors. Our approach somewhat suggests that GANs themselves may operate in a compositional “copy-andpaste” fashion. Indeed, examining the impressive outputs of recent synthesis methods suggests that some amount of local memorization is happening. However, by making this process explicit, our system is able to naturally generate multiple outputs, while being interpretable and amenable to user constraints. An interesting byproduct of our approach is dense pixel-level correspondences. If training images are augmented with semantic label masks, these labels can be transfered using our correspondences, implying that our approach may also be useful for image analysis through label transfer (Liu et al., 2011).
159
+
160
+ # REFERENCES
161
+
162
+ Aayush Bansal, Bryan Russell, and Abhinav Gupta. Marr Revisited: 2D-3D model alignment via surface normal prediction. In CVPR, 2016.
163
+
164
+ Aayush Bansal, Xinlei Chen, Bryan Russell, Abhinav Gupta, and Deva Ramanan. Pixelnet: Representation of the pixels, by the pixels, and for the pixels. arXiv:1702.06506, 2017.
165
+
166
+ Sean Bell and Kavita Bala. Learning visual similarity for product design with convolutional neural networks. ACM Transactions on Graphics, 2015.
167
+
168
+ Oren Boiman and Michal Irani. Similarity by composition. In NIPS, 2006.
169
+
170
+ Oren Boiman and Michal Irani. Detecting irregularities in images and in video. IJCV, 2007.
171
+
172
+ Qifeng Chen and Vladlen Koltun. Photographic image synthesis with cascaded refinement networks. arXiv preprint arXiv:1707.09405, 2017.
173
+
174
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. CoRR, abs/1606.03657, 2016.
175
+
176
+ Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005.
177
+
178
+ Christopher B Choy, JunYoung Gwak, Silvio Savarese, and Manmohan Chandraker. Universal correspondence network. In NIPS, 2016.
179
+
180
+ Emily L. Denton, Soumith Chintala, Arthur Szlam, and Robert Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. CoRR, abs/1506.05751, 2015.
181
+
182
+ Alexei A. Efros and William T. Freeman. Image quilting for texture synthesis and transfer. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH $\cdot _ { 0 1 }$ . ACM, 2001.
183
+
184
+ Alexei A. Efros and Thomas K. Leung. Texture synthesis by non-parametric sampling. In ICCV, 1999.
185
+
186
+ David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In ICCV, 2015.
187
+
188
+ David Eigen, Dilip Krishnan, and Rob Fergus. Restoring an image taken through a window covered with dirt or rain. In ICCV, 2013.
189
+
190
+ David F. Fouhey, Abhinav Gupta, and Martial Hebert. Data-driven 3D primitives for single image understanding. In ICCV, 2013.
191
+
192
+ William T. Freeman, Egon C. Pasztor, and Owen T. Carmichael. Learning low-level vision. Int. J. Comput. Vision, 40(1):25–47, October 2000. ISSN 0920-5691.
193
+
194
+ William T. Freeman, Thouis R. Jones, and Egon C Pasztor. Example-based super-resolution. IEEE Comput. Graph. Appl., 22(2):56–65, March 2002. ISSN 0272-1716. doi: 10.1109/38.988747. URL http://dx. doi.org/10.1109/38.988747.
195
+
196
+ Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial networks. CoRR, abs/1406.2661, 2014.
197
+
198
+ Yagmur Gucluturk, Umut Guclu, Rob van Lier, and Marcel A. J. van Gerven. Convolutional sketch inversion. In ECCV, 2016.
199
+
200
+ Bharath Hariharan, Pablo Arbelaez, Ross Girshick, and Jitendra Malik. Hypercolumns for object segmentation ´ and fine-grained localization. In CVPR, 2015.
201
+
202
+ James Hays and Alexei A Efros. Scene completion using millions of photographs. ACM Transactions on Graphics, 2007.
203
+
204
+ Aaron Hertzmann, Charles E. Jacobs, Nuria Oliver, Brian Curless, and David H. Salesin. Image analogies. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques. ACM, 2001.
205
+
206
+ Xun Huang, Yixuan Li, Omid Poursaeed, John E. Hopcroft, and Serge J. Belongie. Stacked generative adversarial networks. CoRR, abs/1612.04357, 2016.
207
+
208
+ Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. arxiv, 2016.
209
+ Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and superresolution. In ECCV, 2016.
210
+ Micah K. Johnson, Kevin Dale, Shai Avidan, Hanspeter Pfister, William T. Freeman, and Wojciech Matusik. Cg2real: Improving the realism of computer generated images using a large collection of photographs. IEEE Transactions on Visualization and Computer Graphics, 2011.
211
+ Angjoo Kanazawa, David W. Jacobs, and Manmohan Chandraker. Warpnet: Weakly supervised matching for single-view reconstruction. CoRR, abs/1604.05592, 2016.
212
+ Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In ECCV, 2016.
213
+ Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew P. Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image super-resolution using a generative adversarial network. CoRR, abs/1609.04802, 2016.
214
+ Ce Liu, Heung-Yeung Shum, and William T. Freeman. Face hallucination: Theory and practice. IJCV, 2007.
215
+ Ce Liu, Jenny Yuen, and Antonio Torralba. Sift flow: Dense correspondence across scenes and its applications. IEEE Trans. Pattern Anal. Mach. Intell., 2011.
216
+ Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015.
217
+ Jonathan Long, Ning Zhang, and Trevor Darrell. Do convnets learn correspondence? In NIPS, 2014.
218
+ Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional models for semantic segmentation. In CVPR, 2015.
219
+ Roozbeh Mottaghi, Xianjie Chen, Xiaobai Liu, Nam-Gyu Cho, Seong-Whan Lee, Sanja Fidler, Raquel Urtasun, and Alan Yuille. The role of context for object detection and semantic segmentation in the wild. In CVPR, 2014.
220
+ O. M. Parkhi, A. Vedaldi, A. Zisserman, and C. V. Jawahar. Cats and dogs. In CVPR, 2012.
221
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, abs/1511.06434, 2015.
222
+ Tapani Raiko, Harri Valpola, and Yann LeCun. Deep learning made easier by linear transformations in perceptrons. In AISTATS, volume 22, pp. 924–932, 2012.
223
+ Liu Ren, Alton Patrick, Alexei A. Efros, Jessica K. Hodgins, and James M. Rehg. A data-driven approach to quantifying natural human motion. ACM Trans. Graph., 2005.
224
+ Pierre Sermanet, Koray Kavukcuoglu, Soumith Chintala, and Yann LeCun. Pedestrian detection with unsupervised multi-stage feature learning. In CVPR, 2013.
225
+ Abhinav Shrivastava, Tomasz Malisiewicz, Abhinav Gupta, and Alexei A. Efros. Data-driven visual similarity for cross-domain image matching. ACM Transaction of Graphics (TOG), 2011.
226
+ Marshall F. Tappen and Ce Liu. A bayesian approach to alignment-based image hallucination. In ECCV, 2012.
227
+ Xiaolong Wang and Abhinav Gupta. Generative image modeling using style and structure adversarial networks. In ECCV, 2016.
228
+ Xiaolong Wang, David Fouhey, and Abhinav Gupta. Designing deep networks for surface normal estimation. In CVPR, 2015.
229
+ Lingyu Wei, Qixing Huang, Duygu Ceylan, Etienne Vouga, and Hao Li. Dense human body correspondences using convolutional networks. CoRR, abs/1511.05904, 2015.
230
+ Jiajun Wu, Chengkai Zhang, Tianfan Xue, William T Freeman, and Joshua B Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In NIPS, 2016.
231
+ Saining Xie and Zhuowen Tu. Holistically-nested edge detection. In ICCV, 2015.
232
+ A. Yu and K. Grauman. Fine-Grained Visual Comparisons with Local Learning. In CVPR, 2014.
233
+ Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaolei Huang, Xiaogang Wang, and Dimitris N. Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. CoRR, abs/1612.03242, 2016a.
234
+ Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. ECCV, 2016b.
235
+ Tinghui Zhou, Philipp Krahenb ¨ uhl, Mathieu Aubry, Qixing Huang, and Alexei A. Efros. Learning dense ¨ correspondence via 3d-guided cycle consistency. In CVPR, 2016a.
236
+ Tinghui Zhou, Shubham Tulsiani, Weilun Sun, Jitendra Malik, and Alexei A Efros. View synthesis by appearance flow. In ECCV, 2016b.
237
+ Jun-Yan Zhu, Philipp Krahenb ¨ uhl, Eli Shechtman, and Alexei A. Efros. Generative visual manipulation on the ¨ natural image manifold. In ECCV, 2016.
238
+ Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. CoRR, abs/1703.10593, 2017.
parse/train/Syhr6pxCW/Syhr6pxCW_content_list.json ADDED
@@ -0,0 +1,1185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "PIXELNN: EXAMPLE-BASED IMAGE SYNTHESIS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 751,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Aayush Bansal Yaser Sheikh Deva Ramanan ",
17
+ "bbox": [
18
+ 183,
19
+ 143,
20
+ 560,
21
+ 159
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Carnegie Mellon University {aayushb,yaser,deva}@cs.cmu.edu ",
28
+ "bbox": [
29
+ 184,
30
+ 160,
31
+ 486,
32
+ 188
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 224,
43
+ 544,
44
+ 239
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "We present a simple nearest-neighbor (NN) approach that synthesizes highfrequency photorealistic images from an “incomplete” signal such as a lowresolution image, a surface normal map, or edges. Current state-of-the-art deep generative models designed for such conditional image synthesis lack two important things: (1) they are unable to generate a large set of diverse outputs, due to the mode collapse problem. (2) they are not interpretable, making it difficult to control the synthesized output. We demonstrate that NN approaches potentially address such limitations, but suffer in accuracy on small datasets. We design a simple pipeline that combines the best of both worlds: the first stage uses a convolutional neural network (CNN) to map the input to a (overly-smoothed) image, and the second stage uses a pixel-wise nearest neighbor method to map the smoothed output to multiple high-quality, high-frequency outputs in a controllable manner. Importantly, pixel-wise matching allows our method to compose novel high-frequency content by cutting-and-pasting pixels from different training exemplars. We demonstrate our approach for various input modalities, and for various domains ranging from human faces, pets, shoes, and handbags. ",
51
+ "bbox": [
52
+ 233,
53
+ 257,
54
+ 764,
55
+ 478
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 508,
66
+ 336,
67
+ 523
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "We consider the task of generating high-resolution photo-realistic images from incomplete input such as a low-resolution image, sketches, surface normal map, or label mask. Such a task has a number of practical applications such as upsampling/colorizing legacy footage, texture synthesis for graphics applications, and semantic image understanding for vision through analysis-by-synthesis. These problems share a common underlying structure: a human/machine is given a signal that is missing considerable details, and the task is to reconstruct plausible details. ",
74
+ "bbox": [
75
+ 174,
76
+ 541,
77
+ 825,
78
+ 625
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Consider the edge map of cat in Figure 1-c. When we humans look at this edge map, we can easily imagine multiple variations of whiskers, eyes, and stripes that could be viable and pleasing to the eye. Indeed, the task of image synthesis has been well explored, not just for its practical applications but also for its aesthetic appeal. ",
85
+ "bbox": [
86
+ 176,
87
+ 631,
88
+ 825,
89
+ 686
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "GANs: Current state-of-the-art approaches rely on generative adversarial networks (GANs) (Goodfellow et al., 2014), and most relevant to us, conditional GANS that generate image conditioned on an input signal (Denton et al., 2015; Radford et al., 2015; Isola et al., 2016). We argue that there are two prominent limitations to such popular formalisms: (1) First and foremost, humans can imagine multiple plausible output images given a incomplete input. We see this rich space of potential outputs as a vital part of the human capacity to imagine and generate. Conditional GANs are in principle able to generate multiple outputs through the injection of noise, but in practice suffer from limited diversity (i.e., mode collapse) (Fig. 2). Recent approaches even remove the noise altogether, treating conditional image synthesis as regression problem (Chen & Koltun, 2017). (2) Deep networks are still difficult to explain or interpret, making the synthesized output difficult to modify. One implication is that users are not able to control the synthesized output. Moreover, the right mechanism for even specifying user constraints (e.g., “generate a cat image that looks like my cat”) is unclear. This restricts applicability, particularly for graphics tasks. ",
96
+ "bbox": [
97
+ 174,
98
+ 694,
99
+ 825,
100
+ 875
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Nearest-neighbors: To address these limitations, we appeal to a classic learning architecture that can naturally allow for multiple outputs and user-control: non-parametric models, or nearestneighbors (NN). Though quite a classic approach (Efros & Leung, 1999; Efros & Freeman, 2001; ",
107
+ "bbox": [
108
+ 176,
109
+ 882,
110
+ 823,
111
+ 924
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/82b6530a39c59797d49f4600bdd196a0e71c5c25b1644e46bf1a210a7e6f8387.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Our approach generates photorealistic output for various “incomplete” signals such as a low resolution image, a surface normal map, and edges/boundaries for human faces, cats, dogs, shoes, and handbags. Importantly, our approach can easily generate multiple outputs for a given input which was not possible in previous approaches (Isola et al., 2016) due to mode-collapse problem. Best viewed in electronic format. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 181,
124
+ 102,
125
+ 816,
126
+ 318
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "image",
132
+ "img_path": "images/5e82f8c24138fb7b5f3c36ba1c13ec82f08d69b345016495485b8b3119bcd69e.jpg",
133
+ "image_caption": [
134
+ "Figure 2: Mode collapse problem for GANs: We ran pix-to-pix pipeline of Isola et al. (2016) 72 times. Despite the random noise set using dropout at test time, we observe similar output generated each time. Here we try to show 6 possible diverse examples of generation for a hand-picked bestlooking output from Isola et al. (2016). "
135
+ ],
136
+ "image_footnote": [],
137
+ "bbox": [
138
+ 202,
139
+ 419,
140
+ 794,
141
+ 525
142
+ ],
143
+ "page_idx": 1
144
+ },
145
+ {
146
+ "type": "text",
147
+ "text": "Freeman et al., 2002; Hertzmann et al., 2001; Johnson et al., 2011), it has largely been abandoned in recent history with the advent of deep architectures. Intuitively, NN matches an incomplete input (b) Edges-to-Cats-and-Dogs query to a large corpus of training pairs of (incomplete inputs, high-quality outputs), and simply returns the corresponding output. This trivially generalizes to multiple outputs through $K$ -NN and allows for intuitive user control through on-the-fly modification of the training corpus - e.g., by restricting the training examplars to those that “look like my cat”. ",
148
+ "bbox": [
149
+ 174,
150
+ 595,
151
+ 825,
152
+ 680
153
+ ],
154
+ "page_idx": 1
155
+ },
156
+ {
157
+ "type": "text",
158
+ "text": "In practice, there are several limitations in applying NN for conditional image synthesis. The first is a practical lack of training data. The second is a lack of an obvious distance metric. And the last is a computational challenge of scaling search to large training sets. ",
159
+ "bbox": [
160
+ 174,
161
+ 686,
162
+ 825,
163
+ 728
164
+ ],
165
+ "page_idx": 1
166
+ },
167
+ {
168
+ "type": "text",
169
+ "text": "Approach: To reduce the dependency on training data, we take a compositional approach by matching local pixels instead of global images. This allows us to synthesize a face by “copy-pasting” the eye of one training image, the nose of another, etc. Compositions dramatically increase the representational power of our approach: given that we want to synthesize an image of $K$ pixels using $N$ training images (with $K$ pixels each), we can synthesize an exponential number $( N \\bar { K } ) ^ { K }$ of compositions, versus a linear number of global matches $( N )$ . A significant challenge, however, is defining an appropriate feature descriptor for matching pixels in the incomplete input signal. We would like to capture context (such that whisker pixels are matched only to other whiskers) while allowing for compositionality (left-facing whiskers may match to right-facing whiskers). To do so, we make use of deep features, as described below. ",
170
+ "bbox": [
171
+ 174,
172
+ 736,
173
+ 825,
174
+ 875
175
+ ],
176
+ "page_idx": 1
177
+ },
178
+ {
179
+ "type": "text",
180
+ "text": "Pipeline: Our precise pipeline (Figure 3) works in two stages. (1) We first train an initial regressor (CNN) that maps the incomplete input into a single output image. This output image suffers from the aforementioned limitations - it is a single output that will tend to look like a “smoothed” average of all the potential images that could be generated. (2) We then perform nearest-neighbor queries on pixels from this regressed output. Importantly, pixels are matched (to regressed outputs from training data) using a multiscale deep descriptor that captures the appropriate level of context. This enjoys the aforementioned benefits - we can efficiently match to an exponential number of training examples in an interpretable and controllable manner. Finally, an interesting byproduct of our approach is the generation of dense, pixel-level correspondences from the training set to the final synthesized outputs. ",
181
+ "bbox": [
182
+ 174,
183
+ 882,
184
+ 823,
185
+ 924
186
+ ],
187
+ "page_idx": 1
188
+ },
189
+ {
190
+ "type": "image",
191
+ "img_path": "images/32e01ff75a1e6ff1ac336d4b14e3ac4cf819a4220fe18af4b8a6fb853792b996.jpg",
192
+ "image_caption": [
193
+ "Figure 3: Overview of pipeline: Our approach is a two-stage pipeline. The first stage directly regresses an image from an incomplete input (using a CNN trained with $l _ { 2 }$ loss). This image will tend to look like a “smoothed” average of all the potential images that could be generated. In the second stage, we look for matching pixels in similarly-smoothed training images. Importantly, we match pixels using multiscale descriptors that capture the appropriate levels of context (such that eye pixels tend to match only to eyes). To do so, we make use of off-the-shelf hypercolumn features extracted from a CNN trained for semantic pixel segmentation. By varying the size of the matched set of pixels, we can generate multiple outputs (on the right). "
194
+ ],
195
+ "image_footnote": [],
196
+ "bbox": [
197
+ 176,
198
+ 104,
199
+ 823,
200
+ 188
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "",
207
+ "bbox": [
208
+ 174,
209
+ 320,
210
+ 825,
211
+ 417
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "2 RELATED WORK ",
218
+ "text_level": 1,
219
+ "bbox": [
220
+ 176,
221
+ 439,
222
+ 344,
223
+ 455
224
+ ],
225
+ "page_idx": 2
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "Our work is inspired by a large body of work on discriminative and generative models, nearest neighbors architectures, pixel-level tasks, and dense pixel-level correspondences. We provide a broad overview, focusing on those most relevant to our approach. ",
230
+ "bbox": [
231
+ 174,
232
+ 472,
233
+ 825,
234
+ 513
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "Synthesis with CNNs: Convolutional Neural Networks (CNNs) have enjoyed great success for various discriminative pixel-level tasks such as segmentation (Bansal et al., 2017; Long et al., 2015), depth and surface normal estimation (Bansal et al., 2016; Eigen et al., 2013; Eigen & Fergus, 2015), semantic boundary detection (Bansal et al., 2017; Xie & Tu, 2015) etc. Such networks are usually trained using standard losses (such as softmax or $l _ { 2 }$ regression) on image-label data pairs. However, such networks do not typically perform well for the inverse problem of image synthesis from a (incomplete) label, though exceptions do exist (Chen & Koltun, 2017). A major innovation was the introduction of adversarially-trained generative networks (GANs) (Goodfellow et al., 2014). This formulation was hugely influential in computer visions, having been applied to various image generation tasks that condition on a low-resolution image (Denton et al., 2015; Ledig et al., 2016), segmentation mask (Isola et al., 2016), surface normal map (Wang & Gupta, 2016) and other inputs (Chen et al., 2016; Huang et al., 2016; Radford et al., 2015; Wu et al., 2016; Zhang et al., 2016a; Zhu et al., 2017). Most related to us is Isola et al. (2016) who proposed a general loss function for adversarial learning, applying it to a diverse set of image synthesis tasks. Importantly, they report the problem of mode collapse, and so cannot generate diverse outputs nor control the synthesis with user-defined constraints (unlike our work). ",
241
+ "bbox": [
242
+ 174,
243
+ 520,
244
+ 825,
245
+ 742
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "Interpretability and user-control: Interpreting and explaining the outputs of generative deep networks is an open problem. As a community, we do not have a clear understanding of what, where, and how outputs are generated. Our work is fundamentally based on copy-pasting information via nearest neighbors, which explicitly reveals how each pixel-level output is generated (by in turn revealing where it was copied from). This makes our synthesized outputs quite interpretable. One important consequence is the ability to intuitively edit and control the process of synthesis. Zhu et al. (2016) provide a user with controls for editing image such as color, and outline. But instead of using a predefined set of editing operations, we allow a user to have an arbitrarily-fine level of control through on-the-fly editing of the exemplar set (e.g., “resynthesize the output using the eye from this training image and the nose from that one”). ",
252
+ "bbox": [
253
+ 174,
254
+ 750,
255
+ 825,
256
+ 888
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "Correspondence: An important byproduct of pixelwise NN is the generation of pixelwise correspondences between the synthesized output and training examples. Establishing such pixel-level correspondence has been one of the core challenges in computer vision (Choy et al., 2016; Kanazawa et al., 2016; Liu et al., 2011; Long et al., 2014; Wei et al., 2015; Zhou et al., 2016a;b). Tappen & Liu (2012) used SIFT flow (Liu et al., 2011) to hallucinate details for image super-resolution. Zhou et al. (2016b) proposed a CNN to predict appearance flow that can be used to transfer information from input views to synthesize a new view. Kanazawa et al. (2016) generate 3D reconstructions by training a CNN to learn correspondence between object instances. Our work follows from the crucial observation of Long et al. (2014), who suggested that features from pre-trained convnets can also be used for pixel-level correspondences. In this work, we make an additional empirical observation: hypercolumn features trained for semantic segmentation learn nuances and details better than one trained for image classification. This finding helped us to establish semantic correspondences between the pixels in query and training images, and enabled us to extract high-frequency information from the training examples to synthesize a new image from a given input. ",
263
+ "bbox": [
264
+ 174,
265
+ 895,
266
+ 821,
267
+ 924
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "image",
273
+ "img_path": "images/ecc8b7ee6bb4092a7a40e66b4e980d1de557f29dd6a223d35ab3c1a23e9b7d9e.jpg",
274
+ "image_caption": [
275
+ "Figure 4: Frequency Analysis: We show the image and its corresponding Fourier spectrum. Note how the frequency spectrum improve as we move from left to right. The Fourier spectrum of our final output closely matches that of original high resolution image. "
276
+ ],
277
+ "image_footnote": [],
278
+ "bbox": [
279
+ 178,
280
+ 103,
281
+ 821,
282
+ 176
283
+ ],
284
+ "page_idx": 3
285
+ },
286
+ {
287
+ "type": "image",
288
+ "img_path": "images/89b3472a7e998f2b7a3992225707439ef7cbf865dd2a049fe67462955265e2de.jpg",
289
+ "image_caption": [
290
+ "Figure 5: Global vs. Compositional: Given the low-resolution input images on the left, we show high-frequency output obtained with a global nearest neighbor versus a compositional reconstruction. We visualize the correspondences associated with the compositional reconstruction on the right. We surround the reconstruction with 8 neighboring training examples, and color code pixels to denote correspondences. For example, when reconstructing the female face, forehead pixels are copied from the top-left neighbor (orange) , while right-eye pixels are copied from the bottom-left neighbor (green). "
291
+ ],
292
+ "image_footnote": [],
293
+ "bbox": [
294
+ 178,
295
+ 233,
296
+ 820,
297
+ 385
298
+ ],
299
+ "page_idx": 3
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "",
304
+ "bbox": [
305
+ 174,
306
+ 510,
307
+ 825,
308
+ 676
309
+ ],
310
+ "page_idx": 3
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Nonparametrics: Our work closely follows data-driven approaches that make use of nearest neighbors (Efros & Leung, 1999; Efros & Freeman, 2001; Freeman et al., 2000; 2002; Ren et al., 2005; Hays & Efros, 2007; Johnson et al., 2011; Shrivastava et al., 2011). Hays & Efros (2007) match a query image to 2 million training images for various tasks such as image completion. We make use of dramatically smaller training sets by allowing for compositional matches. Liu et al. (2007) propose a two-step pipeline for face hallucination where global constraints capture overall structure, and local constraints produce photorealistic local features. While they focus on the task of facial super-resolution, we address variety of synthesis applications. ",
315
+ "bbox": [
316
+ 174,
317
+ 683,
318
+ 825,
319
+ 795
320
+ ],
321
+ "page_idx": 3
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "Final, our compositional approach is inspired by Boiman & Irani (2006; 2007), who reconstruct a query image via compositions of training examples. ",
326
+ "bbox": [
327
+ 173,
328
+ 801,
329
+ 823,
330
+ 829
331
+ ],
332
+ "page_idx": 3
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "3 PIXELNN: ONE-TO-MANY MAPPINGS ",
337
+ "text_level": 1,
338
+ "bbox": [
339
+ 176,
340
+ 849,
341
+ 524,
342
+ 866
343
+ ],
344
+ "page_idx": 3
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "We define the problem of conditional image synthesis as follows: given an input $x$ to be conditioned on (such as an edge map, normal depth map, or low-resolution image), synthesize a high-quality output image(s). To describe our approach, we focus on illustrative the task of image super-resolution, ",
349
+ "bbox": [
350
+ 176,
351
+ 882,
352
+ 823,
353
+ 924
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "image",
359
+ "img_path": "images/5b72414041bcc9c09e54351f07c329d7e9a0f3940b4e99356b12cb6dfb97612e.jpg",
360
+ "image_caption": [
361
+ "Figure 6: Edges/Normals to RGB: Our approach used for faces, cats, and dogs to generate RGB maps for a given edge/normal map as input. One output was picked from the multiple generations. "
362
+ ],
363
+ "image_footnote": [],
364
+ "bbox": [
365
+ 176,
366
+ 104,
367
+ 818,
368
+ 297
369
+ ],
370
+ "page_idx": 4
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "where the input is a low-resolution image. We assume we are given training pairs of input/outputs, written as $( x _ { n } , y _ { n } )$ . The simplest approach would be formulating this task as a (nonlinear) regression problem: ",
375
+ "bbox": [
376
+ 174,
377
+ 351,
378
+ 825,
379
+ 393
380
+ ],
381
+ "page_idx": 4
382
+ },
383
+ {
384
+ "type": "equation",
385
+ "img_path": "images/6cadc4316fc48b462eb4e5fec1d4b1bdc49d53e92ccdc02ae28eb1ea89aaea3b.jpg",
386
+ "text": "$$\n\\operatorname* { m i n } _ { \\boldsymbol { w } } | | \\boldsymbol { w } | | ^ { 2 } + \\sum _ { n } | | \\boldsymbol { y } _ { n } - \\boldsymbol { f } ( \\boldsymbol { x } _ { n } ; \\boldsymbol { w } ) | | ^ { 2 }\n$$",
387
+ "text_format": "latex",
388
+ "bbox": [
389
+ 377,
390
+ 400,
391
+ 619,
392
+ 434
393
+ ],
394
+ "page_idx": 4
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "where $f ( x _ { n } ; w )$ refers to the output of an arbitrary (possibly nonlinear) regressor parameterized with $w$ . In our formulation, we use a fully-convolutional neural net – specifically, PixelNet (Bansal et al., 2017) – as our nonlinear regressor. For our purposes, this regressor could be any trainable black-box mapping function. But crucially, such functions generate one-to-one mappings, while our underlying thesis is that conditional image synthesis should generate many mappings from an input. By treating synthesis as a regression problem, it is well-known that outputs tend to be oversmoothed (Johnson et al., 2016). In the context of the image colorization task (where the input is a grayscale image), such outputs tend to desaturated (Larsson et al., 2016; Zhang et al., 2016b). ",
399
+ "bbox": [
400
+ 173,
401
+ 440,
402
+ 825,
403
+ 553
404
+ ],
405
+ "page_idx": 4
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "Frequency analysis: Let us analyze this smoothing a bit further. Predicted outputs $f ( x )$ (we drop the dependance on $w$ to simplify notation) are particularly straightforward to analyze in the context of super-resolution (where the conditional input $x$ is a low-resolution image). Given a low-resolution image of a face, there may exist multiple textures (e.g., wrinkles) or subtle shape cues (e.g., of local features such as noses) that could be reasonably generated as output. In practice, this set of outputs tends to be “blurred” into a single output returned by a regressor. This can be readably seen in a frequency analysis of the input, output, and original target image (Fig. 4). In general, we see that the regressor generates mid-frequencies fairly well, but fails to return much high-frequency content. We make the operational assumption that a single output suffices for mid-frequency output, but multiple outputs are required to capture the space of possible high-frequency textures. ",
410
+ "bbox": [
411
+ 173,
412
+ 559,
413
+ 825,
414
+ 699
415
+ ],
416
+ "page_idx": 4
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "Global/Exemplar Matching: To capture multiple possible outputs, we appeal to a classic nonparametric approaches in computer vision. We note that a simple K-nearest-neighbor (KNN) algorithm has the trivial ability to report back $K$ outputs. However, rather than using a KNN model to return an entire image, we can use it to predict the (multiple possible) high-frequencies missing from $f ( x )$ : ",
421
+ "bbox": [
422
+ 173,
423
+ 704,
424
+ 825,
425
+ 775
426
+ ],
427
+ "page_idx": 4
428
+ },
429
+ {
430
+ "type": "equation",
431
+ "img_path": "images/8297d793c6dcceaaeacf53bfb02de91e2c75d613ca0c3ec26539870b4ec845a0.jpg",
432
+ "text": "$$\nG l o b a l ( x ) = f ( x ) + \\Bigl ( y _ { k } - f ( x _ { k } ) \\Bigr ) \\qquad \\mathrm { w h e r e } \\qquad k = \\mathrm { a r g m i n D i s t } \\Bigl ( f ( x ) , f ( x _ { n } ) \\Bigr )\n$$",
433
+ "text_format": "latex",
434
+ "bbox": [
435
+ 215,
436
+ 781,
437
+ 781,
438
+ 811
439
+ ],
440
+ "page_idx": 4
441
+ },
442
+ {
443
+ "type": "text",
444
+ "text": "where $D i s t$ is some distance function measuring similarity between two (mid-frequency) reconstructions. To generate multiple outputs, one can report back the $K$ best matches from the training set instead of the overall best match. ",
445
+ "bbox": [
446
+ 173,
447
+ 818,
448
+ 825,
449
+ 861
450
+ ],
451
+ "page_idx": 4
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "Compositional Matching: However, the above is limited to report back high frequency images in the training set. As we previously argued, we can synthesize a much larger set of outputs by copying and pasting (high-frequency) patches from the training set. To allow for such compositional matchings, we simply match individual pixels rather than global images. Writing $f _ { i } ( x )$ for the $i ^ { t h }$ pixel in the reconstructed image, the final composed output can be written as: ",
456
+ "bbox": [
457
+ 174,
458
+ 867,
459
+ 823,
460
+ 924
461
+ ],
462
+ "page_idx": 4
463
+ },
464
+ {
465
+ "type": "image",
466
+ "img_path": "images/314099b9c2383b70f21f616c4872ba44803aada1316f1a7031c781ae951d54bd.jpg",
467
+ "image_caption": [
468
+ "Figure 7: Low-Resolution to High-Resolution: We used our approach for hallucinating $9 6 \\times 9 6$ images from an input $1 2 \\times 1 2$ low-resolution image. One output was picked from multiple generations. "
469
+ ],
470
+ "image_footnote": [],
471
+ "bbox": [
472
+ 181,
473
+ 103,
474
+ 818,
475
+ 236
476
+ ],
477
+ "page_idx": 5
478
+ },
479
+ {
480
+ "type": "image",
481
+ "img_path": "images/e9178537b132ca5c7eaaba1a7ffa0fd6072239f63e9ab38ffa1eb9e504681538.jpg",
482
+ "image_caption": [
483
+ "Figure 8: Edges-to-Shoes: Our approach used to generate multiple outputs of shoes from the edges. We picked seven distinct examples from multiple generations. "
484
+ ],
485
+ "image_footnote": [],
486
+ "bbox": [
487
+ 178,
488
+ 281,
489
+ 820,
490
+ 401
491
+ ],
492
+ "page_idx": 5
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "",
497
+ "bbox": [
498
+ 173,
499
+ 454,
500
+ 684,
501
+ 469
502
+ ],
503
+ "page_idx": 5
504
+ },
505
+ {
506
+ "type": "equation",
507
+ "img_path": "images/3144b1e738aeb6bf7da809b6afaa1ba121cfb893080b49bf94ddf8a09de676b9.jpg",
508
+ "text": "$$\n{ \\begin{array} { r } { C o m p _ { i } ( x ) = f _ { i } ( x ) + \\left( y _ { j k } - f _ { j } ( x _ { k } ) \\right) } \\end{array} } \\quad { \\mathrm { w h e r e } } \\quad ( j , k ) = \\operatorname { a r g m i n } \\operatorname { D i s t } \\Bigl ( f _ { i } ( x ) , f _ { m } ( x _ { n } ) \\Bigr )\n$$",
509
+ "text_format": "latex",
510
+ "bbox": [
511
+ 189,
512
+ 474,
513
+ 787,
514
+ 506
515
+ ],
516
+ "page_idx": 5
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "where $y _ { j k }$ refers to the output pixel $j$ in training example $k$ . ",
521
+ "bbox": [
522
+ 173,
523
+ 512,
524
+ 565,
525
+ 526
526
+ ],
527
+ "page_idx": 5
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "Distance function & Pixel representation: A crucial question in non-parametric matching is the choice of distance function. To compare global images, contemporary approaches tend to learn a deep embedding where similarity is preserved (Bell & Bala, 2015; Chopra et al., 2005; Long et al., 2015). Distance functions for pixels are much more subtle (3). In theory, one could also learn a metric for pixel matching, but this requires large-scale training data with dense pixel-level correspondences. ",
532
+ "bbox": [
533
+ 173,
534
+ 532,
535
+ 825,
536
+ 617
537
+ ],
538
+ "page_idx": 5
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "Suppose we are trying to generate the left corner of an eye. If our distance function takes into account only local information around the corner, we might mistakenly match to the other eye or mouth. If our distance function takes into account only global information, then compositional matching reduces to global (exemplar) matching. Instead, we exploit the insight from previous works that different layers of a deep network tend to capture different amounts of spatial context (due to varying receptive fields) (Bansal et al., 2017; Hariharan et al., 2015; Raiko et al., 2012; Sermanet et al., 2013). Hypercolumn descriptors (Hariharan et al., 2015) aggregate such information across multiple layers into a highly accurate, multi-scale pixel representation (visualized in Fig. 3). We construct a pixel descriptor using features from conv- $\\{ 1 _ { 2 } , 2 _ { 2 } , 3 _ { 3 } , 4 _ { 3 } , 5 _ { 3 } \\}$ for a PixelNet model trained for semantic segmentation (on PASCAL Context (Mottaghi et al., 2014)). ",
543
+ "bbox": [
544
+ 174,
545
+ 623,
546
+ 825,
547
+ 762
548
+ ],
549
+ "page_idx": 5
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "To measure pixel similarity, we compute cosine distances between two descriptors. We visualize the compositional matches (and associated correspondences) in Figure 5. Finally, Figure 6, and Figure 7 shows the output of our approach for various input modalities. ",
554
+ "bbox": [
555
+ 174,
556
+ 770,
557
+ 825,
558
+ 811
559
+ ],
560
+ "page_idx": 5
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "Efficient search: We have so far avoided the question of run-time for our pixel-wise NN search. A naive approach would be to exhaustively search for every pixel in the dataset but that would make the computation vary linearly with the size of dataset. On the other hand, deep generative models outpace naive NN search, which is one of the reasons for their popularity over NN search. ",
565
+ "bbox": [
566
+ 174,
567
+ 819,
568
+ 825,
569
+ 875
570
+ ],
571
+ "page_idx": 5
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "To speed up search, we made some non-linear approximations: Given a reconstructed image $f ( x )$ , we first (1) find the global K-NN using conv-5 features and then (2) search for pixel-wise matches only in a $T \\times T$ pixel window around pixel $i$ in this set of $K$ images. In practice, we vary $K$ from $\\{ 1 , 2 , . . , 1 0 \\}$ and $T$ from $\\{ 1 , 3 , 5 , 1 0 , 9 6 \\}$ and generate 72 candidate outputs for a given input. Because the size of synthesized image is $9 6 \\times 9 6$ , our search parameters include both a fullycompositional output $( K = 1 0 , T = 9 6 )$ and a fully global exemplar match $\\mathit { K } = 1 , T = 1 \\rangle$ as candidate outputs. Our approximate neighbor neighbor search takes .2 fps. We did not optimize our approach for speed. Importantly, we make use of a single CPU to perform our nearest neighbor search, while Isola et al. (2016)makes use of a GPU. We posit that GPU-based nearest-neighbor libraries (e.g., FAISS) will allow for real-time performance comparable to Isola et al. (2016). ",
576
+ "bbox": [
577
+ 174,
578
+ 882,
579
+ 823,
580
+ 924
581
+ ],
582
+ "page_idx": 5
583
+ },
584
+ {
585
+ "type": "image",
586
+ "img_path": "images/fef432b657129aff7ba768e90d0567485a1736ee78d2d0d40ece24e13adb5fb3.jpg",
587
+ "image_caption": [
588
+ "Figure 9: Edges-to-Bags: Our approach used to generate multiple outputs of bags from the edges. We picked seven distinct examples from multiple generations. "
589
+ ],
590
+ "image_footnote": [],
591
+ "bbox": [
592
+ 176,
593
+ 103,
594
+ 818,
595
+ 224
596
+ ],
597
+ "page_idx": 6
598
+ },
599
+ {
600
+ "type": "image",
601
+ "img_path": "images/fa8d7ab945c8757c417464b92f7768ea40b982fae47ff79da4f2038a269f6351.jpg",
602
+ "image_caption": [
603
+ "Figure 10: Multiple Outputs for Edges/Normals to RGB: Our approach used to generate multiple outputs of faces, cats, and dogs from the edges/normals. As an example, note how the subtle details such as eyes, stripes, and whiskers of cat (left) that could not be inferred from the edge map are different in multiple generations. "
604
+ ],
605
+ "image_footnote": [],
606
+ "bbox": [
607
+ 176,
608
+ 272,
609
+ 818,
610
+ 430
611
+ ],
612
+ "page_idx": 6
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "",
617
+ "bbox": [
618
+ 174,
619
+ 513,
620
+ 825,
621
+ 613
622
+ ],
623
+ "page_idx": 6
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "Figure 8, Figure 9, and Figure 10 show examples of multiple outputs generated using our approach by simply varying these parameters. ",
628
+ "bbox": [
629
+ 173,
630
+ 619,
631
+ 823,
632
+ 647
633
+ ],
634
+ "page_idx": 6
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "4 EXPERIMENTS ",
639
+ "text_level": 1,
640
+ "bbox": [
641
+ 176,
642
+ 681,
643
+ 326,
644
+ 696
645
+ ],
646
+ "page_idx": 6
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "We now present our findings for multiple modalities such as a low-resolution image $1 2 \\times 1 2$ image), a surface normal map, and edges/boundaries for domains such as human faces, cats, dogs, handbags, and shoes. We compare our approach both quantitatively and qualitatively with the recent work of Isola et al. (2016) that use generative adversarial networks for pixel-to-pixel translation. ",
651
+ "bbox": [
652
+ 174,
653
+ 719,
654
+ 825,
655
+ 776
656
+ ],
657
+ "page_idx": 6
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "Dataset: We conduct experiments for human faces, cats and dogs, shoes, and handbags using various modalities. ",
662
+ "bbox": [
663
+ 173,
664
+ 784,
665
+ 821,
666
+ 811
667
+ ],
668
+ "page_idx": 6
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "Human Faces We use 100, 000 images from the training set of CUHK CelebA dataset (Liu et al., 2015) to train a regression model and do NN. We used the subset of test images to evaluate our approach. The images were resized to $9 6 \\times 9 6$ following Gucluturk et al. (2016). ",
673
+ "bbox": [
674
+ 174,
675
+ 818,
676
+ 825,
677
+ 861
678
+ ],
679
+ "page_idx": 6
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "Cats and Dogs: We use 3, 686 images of cats and dogs from the Oxford-IIIT Pet dataset (Parkhi et al., 2012). Of these 3, 000 images were used for training, and remaining 686 for evaluation. We used the bounding box annotation made available by Parkhi et al. (2012) to extract head of the cats and dogs. ",
684
+ "bbox": [
685
+ 174,
686
+ 867,
687
+ 823,
688
+ 924
689
+ ],
690
+ "page_idx": 6
691
+ },
692
+ {
693
+ "type": "table",
694
+ "img_path": "images/de3efea17a40c187b7149f3e254e17895474be28324dd201a78ebda0bcc55b5f.jpg",
695
+ "table_caption": [],
696
+ "table_footnote": [],
697
+ "table_body": "<table><tr><td>Normals-to-RGB</td><td></td><td></td><td>Mean Median RMSE 11.25</td><td></td><td>22.5°</td><td>30°</td><td>AP</td></tr><tr><td>Human Faces</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>17.2</td><td>14.3</td><td>21.0</td><td>37.2</td><td>74.7</td><td>86.8</td><td>0.34</td></tr><tr><td>Pix-to-Pix (Oracle)</td><td>15.8</td><td>13.1</td><td>19.4</td><td>41.9</td><td>78.5</td><td>89.3</td><td>0.34</td></tr><tr><td>PixelNN (Rand-1)</td><td>12.8</td><td>10.4</td><td>16.0</td><td>54.2</td><td>86.6</td><td>94.1</td><td>0.38</td></tr><tr><td>PixelNN (Oracle)</td><td>10.8</td><td>8.7</td><td>13.5</td><td>63.7</td><td>91.6</td><td>96.7</td><td>0.42</td></tr><tr><td>Cats and Dogs</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>14.7</td><td>12.8</td><td>17.5</td><td>42.6</td><td>82.5</td><td>92.9</td><td>0.82</td></tr><tr><td>Pix-to-Pix (Oracle)</td><td>13.2</td><td>11.4</td><td>15.7</td><td>49.2</td><td>87.1</td><td>95.3</td><td>0.85</td></tr><tr><td>PixelNN (Rand-1)</td><td>16.6</td><td>14.3</td><td>19.8</td><td>36.8</td><td>76.2</td><td>88.8</td><td>0.80</td></tr><tr><td>PixelNN (Oracle)</td><td>13.8</td><td>11.9</td><td>16.6</td><td>46.9</td><td>84.9</td><td>94.1</td><td>0.92</td></tr></table>",
698
+ "bbox": [
699
+ 184,
700
+ 101,
701
+ 483,
702
+ 250
703
+ ],
704
+ "page_idx": 7
705
+ },
706
+ {
707
+ "type": "table",
708
+ "img_path": "images/95056bee38f5b7ea90b52c8dd1613acc7f37e0f26d57c6b497b26436b4a73917.jpg",
709
+ "table_caption": [],
710
+ "table_footnote": [],
711
+ "table_body": "<table><tr><td>Edges-to-RGB</td><td>AP</td><td></td><td>|Mean Median RMSE 11.25°</td><td></td><td></td><td>22.50</td><td>300</td></tr><tr><td>Human Faces</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>0.35</td><td>12.1</td><td>9.6</td><td>15.5</td><td>58.1</td><td>88.1</td><td>94.7</td></tr><tr><td>Pix-to-Pix(Oracle)</td><td>0.35</td><td>11.5</td><td>9.1</td><td>14.6</td><td>61.1</td><td>89.7</td><td>95.6</td></tr><tr><td>PixelNN (Rand-1)</td><td>0.38</td><td>13.3</td><td>10.6</td><td>16.8</td><td>52.9</td><td>85.0</td><td>92.9</td></tr><tr><td>PixelNN (Oracle)</td><td>0.41</td><td>11.3</td><td>9.0</td><td>14.4</td><td>61.6</td><td>90.0</td><td>95.7</td></tr><tr><td>Cats and Dogs</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Pix-to-Pix</td><td>0.78</td><td>18.2</td><td>16.0</td><td>21.8</td><td>32.4</td><td>71.0</td><td>85.1</td></tr><tr><td>Pix-to-Pix(Oracle) 0.81</td><td></td><td>16.5</td><td>14.2</td><td>19.8</td><td>37.2</td><td>76.4</td><td>89.0</td></tr><tr><td>PixelNN (Rand-1)</td><td>0.77</td><td>18.9</td><td>16.4</td><td>22.5</td><td>30.3</td><td>68.9</td><td>83.5</td></tr><tr><td>PixelNN (Oracle)</td><td>0.89</td><td>16.3</td><td>14.1</td><td>19.6</td><td>37.6</td><td>77.0</td><td>89.4</td></tr></table>",
712
+ "bbox": [
713
+ 511,
714
+ 101,
715
+ 812,
716
+ 250
717
+ ],
718
+ "page_idx": 7
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "Table 1: We compared our approach, PixelNN, with the GAN-based formulation of Isola et al. (2016) for human faces, and cats and dogs. We used an off-the-shelf PixelNet model trained for surface normal estimation and edge detection. We use the output from real images as ground truth surface normal and edge map respectively. ",
723
+ "bbox": [
724
+ 174,
725
+ 260,
726
+ 825,
727
+ 316
728
+ ],
729
+ "page_idx": 7
730
+ },
731
+ {
732
+ "type": "image",
733
+ "img_path": "images/5e4b9c11ad2454d91e8a83dfceb66f02de1ec6de487174608c9894f3525df3b7.jpg",
734
+ "image_caption": [
735
+ "Figure 11: Comparison of our approach with Pix-to-Pix (Isola et al., 2016). "
736
+ ],
737
+ "image_footnote": [],
738
+ "bbox": [
739
+ 176,
740
+ 325,
741
+ 820,
742
+ 459
743
+ ],
744
+ "page_idx": 7
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "For human faces, and cats and dogs, we used the pre-trained PixelNet (Bansal et al., 2017) to extract surface normal and edge maps. We did not do any post-processing (NMS) to the outputs of edge detection. ",
749
+ "bbox": [
750
+ 173,
751
+ 497,
752
+ 825,
753
+ 539
754
+ ],
755
+ "page_idx": 7
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "Shoes & Handbags: We followed Isola et al. (2016) for this setting. 50, 000 training images of shoes were used from (Yu & Grauman, 2014), and 137, 000 images of Amazon handbags from (Zhu et al., 2016). The edge maps for this data was computed using HED (Xie & Tu, 2015) by Isola et al. (2016). ",
760
+ "bbox": [
761
+ 173,
762
+ 546,
763
+ 825,
764
+ 603
765
+ ],
766
+ "page_idx": 7
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "Qualitative Evaluation: Figure 11 shows the comparison of our NN based approach (PixelNN) with Isola et al. (2016) (Pix-to-Pix). ",
771
+ "bbox": [
772
+ 174,
773
+ 609,
774
+ 821,
775
+ 637
776
+ ],
777
+ "page_idx": 7
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "Quantitative Evaluation: We quantitatively evaluate our approach to measure if our generated outputs for human faces, cats and dogs can be used to determine surface normal and edges from an off-the-shelf trained PixelNet (Bansal et al., 2017) model for surface normal estimation and edge detection. The outputs from the real images are considered as ground truth for evaluation as it gives an indication of how far are we from them. Somewhat similar approach is used by Isola et al. (2016) to measure their synthesized cityscape outputs and compare against the output using real world images, and Wang & Gupta (2016) for object detection evaluation. ",
782
+ "bbox": [
783
+ 173,
784
+ 645,
785
+ 825,
786
+ 742
787
+ ],
788
+ "page_idx": 7
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "We compute six statistics, previously used by (Bansal et al., 2016; Eigen & Fergus, 2015; Fouhey et al., 2013; Wang et al., 2015), over the angular error between the normals from a synthesized image and normals from real image to evaluate the performance – Mean, Median, RMSE, ${ \\bf 1 1 . 2 5 ^ { \\circ } }$ , $2 2 . 5 ^ { \\circ }$ , and $3 0 ^ { \\circ }$ – The first three criteria capture the mean, median, and RMSE of angular error, where lower is better. The last three criteria capture the percentage of pixels within a given angular error, where higher is better. We evaluate the edge detection performance using average precision (AP). ",
793
+ "bbox": [
794
+ 173,
795
+ 750,
796
+ 825,
797
+ 833
798
+ ],
799
+ "page_idx": 7
800
+ },
801
+ {
802
+ "type": "text",
803
+ "text": "Table 1 quantitatively shows the performance of our approach with (Isola et al., 2016). Our approach generates multiple outputs and we do not have any direct way of ranking the outputs, therefore we show the performance using a random selection from one of 72 outputs, and an oracle selecting the best output. To do a fair comparison, we ran trained models for Pix-to-Pix (Isola et al., 2016) 72 times and used an oracle for selecting the best output as well. We observe that our approach generates better multiple outputs as performance improves significantly from a random selection to oracle as compared with Isola et al. (2016). Our approach, though based on simple NN, achieves result quantitatively and qualitatively competitive (and many times better than) with state-of-the-art models based on GANs and produce outputs close to natural images. ",
804
+ "bbox": [
805
+ 174,
806
+ 840,
807
+ 825,
808
+ 924
809
+ ],
810
+ "page_idx": 7
811
+ },
812
+ {
813
+ "type": "image",
814
+ "img_path": "images/34433780414fdf8253053f09c62de4cfb93be4e6011215d36265d5ceeb90f64a.jpg",
815
+ "image_caption": [
816
+ "Figure 12: Controllable synthesis: We generate the output of cats given a user input from a edge map. From the edge map, we do not know what type of cat it is. A user can suggest what kind of the output they would like, and our approach can copy-paste the information. "
817
+ ],
818
+ "image_footnote": [],
819
+ "bbox": [
820
+ 176,
821
+ 103,
822
+ 816,
823
+ 202
824
+ ],
825
+ "page_idx": 8
826
+ },
827
+ {
828
+ "type": "image",
829
+ "img_path": "images/7a60c70be503894a96230d770692694874af94ae2f0421246d7855aa77ee1529.jpg",
830
+ "image_caption": [
831
+ "Figure 13: Failure Cases: We show some failure cases for different input types. Our approach mostly fails when it is not able to find suitable nearest neighbors. "
832
+ ],
833
+ "image_footnote": [],
834
+ "bbox": [
835
+ 176,
836
+ 270,
837
+ 823,
838
+ 405
839
+ ],
840
+ "page_idx": 8
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "",
845
+ "bbox": [
846
+ 174,
847
+ 462,
848
+ 825,
849
+ 503
850
+ ],
851
+ "page_idx": 8
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "Controllable synthesis: Finally, NN provides a user with intuitive control over the synthesis process. We explore a simple approach based on on-the-fly pruning of the training set. Instead of matching to the entire training library, a user can specify a subset of relevant training examples. Figure 12 shows an example of controllable synthesis. A user “instructs” the system to generate an image that looks like a particular dog-breed by either denoting the subset of training examplars (e.g., through a subcategory label), or providing an image that can be used to construct an on-the-fly neighbor set. ",
856
+ "bbox": [
857
+ 173,
858
+ 511,
859
+ 825,
860
+ 608
861
+ ],
862
+ "page_idx": 8
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "Failure cases: Our approach mostly fails when there are no suitable NNs to extract the information from. Figure 13 shows some example failure cases of our approach. One way to deal with this problem is to do exhaustive pixel-wise NN search but that would increase the run-time to generate the output. We believe that system-level optimization such as Scanner1, may potentially be useful in improving the run-time performance for pixel-wise NNs. ",
867
+ "bbox": [
868
+ 174,
869
+ 616,
870
+ 825,
871
+ 685
872
+ ],
873
+ "page_idx": 8
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "5 DISCUSSION ",
878
+ "text_level": 1,
879
+ "bbox": [
880
+ 176,
881
+ 717,
882
+ 310,
883
+ 733
884
+ ],
885
+ "page_idx": 8
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "We present a simple approach to image synthesis based on compositional nearest-neighbors. Our approach somewhat suggests that GANs themselves may operate in a compositional “copy-andpaste” fashion. Indeed, examining the impressive outputs of recent synthesis methods suggests that some amount of local memorization is happening. However, by making this process explicit, our system is able to naturally generate multiple outputs, while being interpretable and amenable to user constraints. An interesting byproduct of our approach is dense pixel-level correspondences. If training images are augmented with semantic label masks, these labels can be transfered using our correspondences, implying that our approach may also be useful for image analysis through label transfer (Liu et al., 2011). ",
890
+ "bbox": [
891
+ 174,
892
+ 755,
893
+ 825,
894
+ 881
895
+ ],
896
+ "page_idx": 8
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "REFERENCES ",
901
+ "text_level": 1,
902
+ "bbox": [
903
+ 174,
904
+ 103,
905
+ 287,
906
+ 117
907
+ ],
908
+ "page_idx": 9
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "Aayush Bansal, Bryan Russell, and Abhinav Gupta. Marr Revisited: 2D-3D model alignment via surface normal prediction. In CVPR, 2016. ",
913
+ "bbox": [
914
+ 174,
915
+ 125,
916
+ 823,
917
+ 151
918
+ ],
919
+ "page_idx": 9
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "Aayush Bansal, Xinlei Chen, Bryan Russell, Abhinav Gupta, and Deva Ramanan. Pixelnet: Representation of the pixels, by the pixels, and for the pixels. arXiv:1702.06506, 2017. ",
924
+ "bbox": [
925
+ 174,
926
+ 160,
927
+ 821,
928
+ 185
929
+ ],
930
+ "page_idx": 9
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "Sean Bell and Kavita Bala. Learning visual similarity for product design with convolutional neural networks. ACM Transactions on Graphics, 2015. ",
935
+ "bbox": [
936
+ 173,
937
+ 194,
938
+ 821,
939
+ 222
940
+ ],
941
+ "page_idx": 9
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Oren Boiman and Michal Irani. Similarity by composition. In NIPS, 2006. ",
946
+ "bbox": [
947
+ 174,
948
+ 229,
949
+ 622,
950
+ 244
951
+ ],
952
+ "page_idx": 9
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Oren Boiman and Michal Irani. Detecting irregularities in images and in video. IJCV, 2007. ",
957
+ "bbox": [
958
+ 171,
959
+ 252,
960
+ 717,
961
+ 267
962
+ ],
963
+ "page_idx": 9
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Qifeng Chen and Vladlen Koltun. Photographic image synthesis with cascaded refinement networks. arXiv preprint arXiv:1707.09405, 2017. ",
968
+ "bbox": [
969
+ 174,
970
+ 275,
971
+ 825,
972
+ 301
973
+ ],
974
+ "page_idx": 9
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. CoRR, abs/1606.03657, 2016. ",
979
+ "bbox": [
980
+ 173,
981
+ 309,
982
+ 825,
983
+ 348
984
+ ],
985
+ "page_idx": 9
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005. ",
990
+ "bbox": [
991
+ 173,
992
+ 357,
993
+ 823,
994
+ 385
995
+ ],
996
+ "page_idx": 9
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "Christopher B Choy, JunYoung Gwak, Silvio Savarese, and Manmohan Chandraker. Universal correspondence network. In NIPS, 2016. ",
1001
+ "bbox": [
1002
+ 174,
1003
+ 392,
1004
+ 823,
1005
+ 420
1006
+ ],
1007
+ "page_idx": 9
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "Emily L. Denton, Soumith Chintala, Arthur Szlam, and Robert Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. CoRR, abs/1506.05751, 2015. ",
1012
+ "bbox": [
1013
+ 171,
1014
+ 428,
1015
+ 823,
1016
+ 455
1017
+ ],
1018
+ "page_idx": 9
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "Alexei A. Efros and William T. Freeman. Image quilting for texture synthesis and transfer. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH $\\cdot _ { 0 1 }$ . ACM, 2001. ",
1023
+ "bbox": [
1024
+ 174,
1025
+ 463,
1026
+ 826,
1027
+ 502
1028
+ ],
1029
+ "page_idx": 9
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "Alexei A. Efros and Thomas K. Leung. Texture synthesis by non-parametric sampling. In ICCV, 1999. ",
1034
+ "bbox": [
1035
+ 173,
1036
+ 511,
1037
+ 782,
1038
+ 526
1039
+ ],
1040
+ "page_idx": 9
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In ICCV, 2015. ",
1045
+ "bbox": [
1046
+ 173,
1047
+ 534,
1048
+ 818,
1049
+ 560
1050
+ ],
1051
+ "page_idx": 9
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "David Eigen, Dilip Krishnan, and Rob Fergus. Restoring an image taken through a window covered with dirt or rain. In ICCV, 2013. ",
1056
+ "bbox": [
1057
+ 174,
1058
+ 568,
1059
+ 823,
1060
+ 595
1061
+ ],
1062
+ "page_idx": 9
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "David F. Fouhey, Abhinav Gupta, and Martial Hebert. Data-driven 3D primitives for single image understanding. In ICCV, 2013. ",
1067
+ "bbox": [
1068
+ 174,
1069
+ 603,
1070
+ 823,
1071
+ 631
1072
+ ],
1073
+ "page_idx": 9
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "William T. Freeman, Egon C. Pasztor, and Owen T. Carmichael. Learning low-level vision. Int. J. Comput. Vision, 40(1):25–47, October 2000. ISSN 0920-5691. ",
1078
+ "bbox": [
1079
+ 173,
1080
+ 638,
1081
+ 823,
1082
+ 666
1083
+ ],
1084
+ "page_idx": 9
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "William T. Freeman, Thouis R. Jones, and Egon C Pasztor. Example-based super-resolution. IEEE Comput. Graph. Appl., 22(2):56–65, March 2002. ISSN 0272-1716. doi: 10.1109/38.988747. URL http://dx. doi.org/10.1109/38.988747. ",
1089
+ "bbox": [
1090
+ 173,
1091
+ 672,
1092
+ 826,
1093
+ 713
1094
+ ],
1095
+ "page_idx": 9
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial networks. CoRR, abs/1406.2661, 2014. ",
1100
+ "bbox": [
1101
+ 173,
1102
+ 720,
1103
+ 823,
1104
+ 748
1105
+ ],
1106
+ "page_idx": 9
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "Yagmur Gucluturk, Umut Guclu, Rob van Lier, and Marcel A. J. van Gerven. Convolutional sketch inversion. In ECCV, 2016. ",
1111
+ "bbox": [
1112
+ 173,
1113
+ 756,
1114
+ 821,
1115
+ 784
1116
+ ],
1117
+ "page_idx": 9
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "Bharath Hariharan, Pablo Arbelaez, Ross Girshick, and Jitendra Malik. Hypercolumns for object segmentation ´ and fine-grained localization. In CVPR, 2015. ",
1122
+ "bbox": [
1123
+ 173,
1124
+ 791,
1125
+ 823,
1126
+ 819
1127
+ ],
1128
+ "page_idx": 9
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "James Hays and Alexei A Efros. Scene completion using millions of photographs. ACM Transactions on Graphics, 2007. ",
1133
+ "bbox": [
1134
+ 173,
1135
+ 827,
1136
+ 821,
1137
+ 854
1138
+ ],
1139
+ "page_idx": 9
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "Aaron Hertzmann, Charles E. Jacobs, Nuria Oliver, Brian Curless, and David H. Salesin. Image analogies. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques. ACM, 2001. ",
1144
+ "bbox": [
1145
+ 174,
1146
+ 861,
1147
+ 823,
1148
+ 888
1149
+ ],
1150
+ "page_idx": 9
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "Xun Huang, Yixuan Li, Omid Poursaeed, John E. Hopcroft, and Serge J. Belongie. Stacked generative adversarial networks. CoRR, abs/1612.04357, 2016. ",
1155
+ "bbox": [
1156
+ 171,
1157
+ 897,
1158
+ 825,
1159
+ 922
1160
+ ],
1161
+ "page_idx": 9
1162
+ },
1163
+ {
1164
+ "type": "text",
1165
+ "text": "Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. arxiv, 2016. \nJustin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and superresolution. In ECCV, 2016. \nMicah K. Johnson, Kevin Dale, Shai Avidan, Hanspeter Pfister, William T. Freeman, and Wojciech Matusik. Cg2real: Improving the realism of computer generated images using a large collection of photographs. IEEE Transactions on Visualization and Computer Graphics, 2011. \nAngjoo Kanazawa, David W. Jacobs, and Manmohan Chandraker. Warpnet: Weakly supervised matching for single-view reconstruction. CoRR, abs/1604.05592, 2016. \nGustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In ECCV, 2016. \nChristian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew P. Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image super-resolution using a generative adversarial network. CoRR, abs/1609.04802, 2016. \nCe Liu, Heung-Yeung Shum, and William T. Freeman. Face hallucination: Theory and practice. IJCV, 2007. \nCe Liu, Jenny Yuen, and Antonio Torralba. Sift flow: Dense correspondence across scenes and its applications. IEEE Trans. Pattern Anal. Mach. Intell., 2011. \nZiwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015. \nJonathan Long, Ning Zhang, and Trevor Darrell. Do convnets learn correspondence? In NIPS, 2014. \nJonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional models for semantic segmentation. In CVPR, 2015. \nRoozbeh Mottaghi, Xianjie Chen, Xiaobai Liu, Nam-Gyu Cho, Seong-Whan Lee, Sanja Fidler, Raquel Urtasun, and Alan Yuille. The role of context for object detection and semantic segmentation in the wild. In CVPR, 2014. \nO. M. Parkhi, A. Vedaldi, A. Zisserman, and C. V. Jawahar. Cats and dogs. In CVPR, 2012. \nAlec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, abs/1511.06434, 2015. \nTapani Raiko, Harri Valpola, and Yann LeCun. Deep learning made easier by linear transformations in perceptrons. In AISTATS, volume 22, pp. 924–932, 2012. \nLiu Ren, Alton Patrick, Alexei A. Efros, Jessica K. Hodgins, and James M. Rehg. A data-driven approach to quantifying natural human motion. ACM Trans. Graph., 2005. \nPierre Sermanet, Koray Kavukcuoglu, Soumith Chintala, and Yann LeCun. Pedestrian detection with unsupervised multi-stage feature learning. In CVPR, 2013. \nAbhinav Shrivastava, Tomasz Malisiewicz, Abhinav Gupta, and Alexei A. Efros. Data-driven visual similarity for cross-domain image matching. ACM Transaction of Graphics (TOG), 2011. \nMarshall F. Tappen and Ce Liu. A bayesian approach to alignment-based image hallucination. In ECCV, 2012. \nXiaolong Wang and Abhinav Gupta. Generative image modeling using style and structure adversarial networks. In ECCV, 2016. \nXiaolong Wang, David Fouhey, and Abhinav Gupta. Designing deep networks for surface normal estimation. In CVPR, 2015. \nLingyu Wei, Qixing Huang, Duygu Ceylan, Etienne Vouga, and Hao Li. Dense human body correspondences using convolutional networks. CoRR, abs/1511.05904, 2015. \nJiajun Wu, Chengkai Zhang, Tianfan Xue, William T Freeman, and Joshua B Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In NIPS, 2016. \nSaining Xie and Zhuowen Tu. Holistically-nested edge detection. In ICCV, 2015. \nA. Yu and K. Grauman. Fine-Grained Visual Comparisons with Local Learning. In CVPR, 2014. \nHan Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaolei Huang, Xiaogang Wang, and Dimitris N. Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. CoRR, abs/1612.03242, 2016a. \nRichard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. ECCV, 2016b. \nTinghui Zhou, Philipp Krahenb ¨ uhl, Mathieu Aubry, Qixing Huang, and Alexei A. Efros. Learning dense ¨ correspondence via 3d-guided cycle consistency. In CVPR, 2016a. \nTinghui Zhou, Shubham Tulsiani, Weilun Sun, Jitendra Malik, and Alexei A Efros. View synthesis by appearance flow. In ECCV, 2016b. \nJun-Yan Zhu, Philipp Krahenb ¨ uhl, Eli Shechtman, and Alexei A. Efros. Generative visual manipulation on the ¨ natural image manifold. In ECCV, 2016. \nJun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. CoRR, abs/1703.10593, 2017. ",
1166
+ "bbox": [
1167
+ 169,
1168
+ 60,
1169
+ 828,
1170
+ 924
1171
+ ],
1172
+ "page_idx": 10
1173
+ },
1174
+ {
1175
+ "type": "text",
1176
+ "text": "",
1177
+ "bbox": [
1178
+ 169,
1179
+ 102,
1180
+ 828,
1181
+ 329
1182
+ ],
1183
+ "page_idx": 11
1184
+ }
1185
+ ]
parse/train/Syhr6pxCW/Syhr6pxCW_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Syhr6pxCW/Syhr6pxCW_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/eaAM_bdW0Q/eaAM_bdW0Q.md ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Robust Deep Reinforcement Learning through Adversarial Loss
2
+
3
+ Tuomas Oikarinen∗ UC San Diego CSE
4
+
5
+ Wang Zhang MIT MechE
6
+
7
+ Alexandre Megretski MIT EECS
8
+
9
+ Tsui-Wei Weng UC San Diego HDSI
10
+
11
+ # Abstract
12
+
13
+ Recent studies have shown that deep reinforcement learning agents are vulnerable to small adversarial perturbations on the agent’s inputs, which raises concerns about deploying such agents in the real world. To address this issue, we propose RADIAL-RL, a principled framework to train reinforcement learning agents with improved robustness against $l _ { p }$ -norm bounded adversarial attacks. Our framework is compatible with popular deep reinforcement learning algorithms and we demonstrate its performance with deep Q-learning, A3C and PPO. We experiment on three deep RL benchmarks (Atari, MuJoCo and ProcGen) to show the effectiveness of our robust training algorithm. Our RADIAL-RL agents consistently outperform prior methods when tested against attacks of varying strength and are more computationally efficient to train. In addition, we propose a new evaluation method called Greedy Worst-Case Reward (GWC) to measure attack agnostic robustness of deep RL agents. We show that GWC can be evaluated efficiently and is a good estimate of the reward under the worst possible sequence of adversarial attacks. All code used for our experiments is available at https://github.com/tuomaso/radial_rl_v2.
14
+
15
+ # 1 Introduction
16
+
17
+ Deep learning has achieved enormous success on a variety of challenging domains, ranging from computer vision [1], natural language processing [2] to reinforcement learning (RL) [3, 4]. Nevertheless, the existence of adversarial examples [5] indicates that deep neural networks (DNNs) are not as robust and trustworthy as we would expect, as small and often imperceptible perturbations can result in misclassifications of state-of-the-art DNNs. Unfortunately, adversarial attacks have also been shown possible in deep reinforcement learning, where adversarial perturbations in the observation space and/or action space can cause arbitrarily bad performance of deep RL agents [6, 7, 8]. As deep RL agents are deployed in many safety critical applications such as self-driving cars and robotics, it is of crucial importance to develop robust training algorithms (a.k.a. defense algorithms) such that the resulting trained agents are robust against adversarial (and non-adversarial) perturbation.
18
+
19
+ Many heuristic defenses have been proposed to improve robustness of DNNs against adversarial attacks for image classification tasks, but they often fail against stronger adversarial attack algorithms. For example, [9] showed that 13 such defense methods (recently published at prestigious conferences) can all be broken by more advanced attacks. One emerging alternative to heuristic defenses is defense algorithms 2 based on robustness verification or certification bounds [10, 11, 12, 13]. These algorithms produce robustness certificates such that for any perturbations within the specified $\ell _ { p }$ - norm distance , the trained DNN will produce consistent classification results on given data points. Representative works along this line include [11] and [14], where the learned models can have much higher certified accuracies by including the robustness verification bounds in the loss function with proper training schedule, even if the verifier produces loose robustness certificates [14] for models without robust training (a.k.a. nominal models). Here, the certified accuracy is calculated as the percentage of the test images that are guaranteed to be classified correctly under a given perturbation magnitude $\epsilon$ .
20
+
21
+ ![](images/86b2ea5b9ea7c8293bf47f1b10bcb3a6edaa515344f97c86d3c6f1edfeed1a94.jpg)
22
+ Figure 1: Screenshots of our RADIAL framework promoting robustness of deep RL agents while the standard deep RL agents without robust training are vulnerable to adversarial attacks.
23
+
24
+ However, most of the defense algorithms are developed for classification tasks. Few defense algorithms have been designed for deep RL agents perhaps due to the additional challenges in RL that are not present in classification tasks, including credit assignment and lack of a stationary training set. To bridge this gap, in this paper we present the RADIAL(Robust ADversarIAl Loss)-RL framework to train robust deep RL agents. We show that RADIAL can improve the robustness of deep RL agents by using carefully designed adversarial loss functions based on robustness verification bounds. Our contributions are listed below:
25
+
26
+ • We propose a novel robust deep RL framework, RADIAL-RL, which can be applied to different types of deep RL algorithms. We demonstrate RADIAL on three popular RL algorithms, DQN [3], A3C [15] and PPO [16].
27
+ We demonstrate the superior performance of RADIAL agents on both Atari games and continuous control tasks in MuJoCo: our agents are $2 - 1 0 \times$ more computationally efficient to train than [17] and can resist up to $5 \times$ stronger adversarial perturbations better than existing works [18, 17].
28
+ �� We also evaluate the effects of robust training on the ability of agents to generalize to new levels using the ProcGen benchmark, and show that our training also increases robustness on unseen levels, reaching high rewards even against $\epsilon = 5 / 2 5 5$ PGD-attacks.
29
+ • We propose a new evaluation method, Greedy Worst-Case Reward (GWC), for efficiently (in linear time) evaluating RL agent performance under attack of strongest adversaries (i.e. worst-case perturbation) on discrete action environments.
30
+
31
+ # 2 Related work and background
32
+
33
+ # 2.1 Adversarial attacks in Deep RL
34
+
35
+ The topic of adversarial examples in supervised learning tasks has been extensively studied, especially for DNN classifiers [5, 19]. More recently, [6, 7, 8] showed that deep RL agents are also vulnerable to adversarial perturbations, including adversarial perturbations on agents’ observations and actions [6, 7, 8], mis-specification on the environment [20], adversarial disruptions on the agents [21] and other adversarial agents [22]. For a review of different attack and defense settings in RL see Ilahi et al. [23].
36
+
37
+ In this paper, we focus on $\ell _ { p }$ -norm adversarial perturbations on agents’ observations since this threat model is adopted by many of the existing works investigating adversarial robustness of deep RL [6, 7, 8, 24, 25, 26, 27, 18, 17]. However, our framework is not limited to $\ell _ { p }$ -norm perturbation and in fact can be easily extended to semantic perturbations (e.g. rotations, color/brightness changes, etc) for vision-based deep RL agents (e.g. atari games) by leveraging the techniques proposed in [28].
38
+
39
+ # 2.2 Formal verification and robust training for Deep RL
40
+
41
+ Robustness certification methods for DNN classifiers [12] have been applied in the deep RL setting: for example, [27] propose a policy of choosing the action with highest certified lower bound Q-value during execution, and [24] derived tighter robustness certificate for neural network policies under persistent adversarial perturbations in the system. These works study the robustness with fixed neural networks, while our work is focused on training neural networks that produce more robust RL policies.
42
+
43
+ The idea of adversarial training has been applied to deep RL to defend against adversarial attacks [25, 26]; however, these approaches often have much higher computational cost than standard training. While previous work such as [21] have also trained robust agents under different threat models from ours, we will not be comparing against them as they have different goals and evaluation methods.
44
+
45
+ The most relevant literature to our work are two robust training methods for deep Q-learning agents [18, 17]. RS-DQN [18] decouples the DQN agent into a policy and student networks, which enables leveraging additional constraints on the student DQN without strongly affecting learning of the correct Q-function, whereas SA-DQN [17] adds a hinge loss regularizer to encourage the DQN agents to follow their original actions when there are perturbations in the observation space. [17] also propose SA-PPO and SA-DDPG for training robust RL-agents in continuous control. In contrast, in RADIAL, we leverage the in-expensive robustness verification bounds to carefully design regularizers discouraging potentially overlapping actions of deep RL agents. As demonstrated in the Sec 4, our RADIAL agents outperform [18, 17] under various strength of adversarial attacks, while being $2 { - } 1 0 \times$ more computationally efficient to train than [17]. Moreover, we introduce a novel metric to evaluate agent performance against worst possible adversary that is not investigated in [18, 17].
46
+
47
+ # 2.3 Basics of Deep Reinforcement Learning
48
+
49
+ Markov Decision Process with parameters $( S , { \mathcal { A } } , { \mathcal { P } } , { \mathcal { R } } , \gamma , s _ { 0 } )$ is used to characterize the environments in this paper, where $s$ is a set of states, $\mathcal { A }$ is a set of the available actions, $\mathcal { P } : \mathcal { S } \times \mathcal { A } \times \mathcal { S } \mathbb { R }$ defines the transition probabilities, and $\mathcal { R } : \mathcal { S } \times \mathcal { A } \to \mathbb { R }$ is the scalar reward function, $s _ { 0 }$ is the initial state distribution and $\gamma$ is the discount factor. RL algorithms aim at learning a possibly stochastic policy $\pi : \mathcal { S } \times \mathcal { A } \to \mathbb { R }$ describing the probability of taking an action $a$ given state $s$ . The goal of a policy is to maximize the cumulative time discounted reward of an episode $\textstyle \sum _ { t } \gamma ^ { t } r _ { t }$ , where $t$ is the timestep and $r _ { t } , a _ { t }$ and $s _ { t }$ are reward, action and state at timestep $t$ .
50
+
51
+ Deep Q-networks (DQN) [3]. An action-value function $Q ( s , a )$ describes the expected cumulative rewards given current state $s$ and action $a$ . In Q-learning, a policy $\pi$ is constructed by taking the action with highest $Q$ -value. The optimal $Q$ function, denoted as $Q ^ { * } ( s , a )$ , satisfies the Bellman Optimality Equations $\begin{array} { r } { Q ^ { * } ( s , a ) = r + \gamma \mathbb { E } _ { ( s ^ { \prime } \mid s , a ) } \left[ \operatorname* { m a x } _ { a ^ { \prime } } Q ^ { * } ( s ^ { \prime } , a ^ { \prime } ) \right] } \end{array}$ , where $s ^ { \prime }$ is the next state and $r$ is reward. The essence of DQN is to use neural networks to approximate the $Q ^ { * } ( s , a )$ and the networks can be trained by minimizing the loss $\begin{array} { r } { \mathcal L ( \theta ) = \mathbb { E } _ { ( s , a , s ^ { \prime } , r ) } \left[ ( r + \gamma \operatorname* { m a x } _ { a ^ { \prime } } Q ( s ^ { \prime } , a ^ { \prime } ; \theta ) - Q ( s , a ; \theta ) ) ^ { 2 } \right] } \end{array}$ . The two baseline works on robust training for RL agents [18, 17] use more advanced versions than vanilla
52
+
53
+ DQN including Dueling-DQN [29] and Double-DQN [30]. Double-DQN uses two Q-networks to evaluate target value $Q _ { \mathrm { t a r g e t } }$ and the one being trained $Q \mathrm { { a c t o r } }$ , with $\theta _ { \mathrm { a c t o r } }$ being optimized by minimizing the loss ${ \mathcal { L } } ( \theta _ { \mathrm { a c t o r } } )$ :
54
+
55
+ $$
56
+ \mathcal { L } ( \theta _ { \mathrm { a c t o r } } ) = \mathbb { E } _ { ( s , a , s ^ { \prime } , r ) } \Big [ ( r + \gamma \operatorname* { m a x } _ { a ^ { \prime } } Q _ { \mathrm { t a r g e t } } ( s ^ { \prime } , a ^ { \prime } ; \theta _ { \mathrm { t a r g e t } } ) - Q _ { \mathrm { a c t o r } } ( s , a ; \theta _ { \mathrm { a c t o r } } ) ) ^ { 2 } \Big ] .
57
+ $$
58
+
59
+ Dueling-DQN improves DQN by splitting Q-values into the value of the state $V _ { Q } ( s )$ and advantage $A _ { Q } ( s , a )$ calculated by different output layers such that $Q ( s , a ) = V _ { Q } ( s ) + A _ { Q } ( \stackrel { . } { s } , \stackrel { . } { a } )$ .
60
+
61
+ Asynchronous Advantage Actor Critic (A3C) [15]. A3C uses neural networks to learn a policy function $\pi ( a | s ; \theta )$ and a state-value function $V ( s ; \theta _ { v } )$ . Here the policy network $\pi ( a | s ; \theta )$ determines which action to take, and value function evaluates how good each state is. To update the network $( \theta , \theta _ { v } )$ antage function, with hyperparam $A _ { t }$ ,r s defined as . The networ $A _ { t } ( s _ { t } , a _ { t } ; \theta , \theta _ { v } ) \ =$ $\begin{array} { r } { \sum _ { i = 0 } ^ { k - 1 } \gamma ^ { i } r _ { t + i } + \gamma ^ { k } V ( s _ { t + k } ; \theta _ { v } ) - V ( s _ { t } ; \theta _ { v } ) } \end{array}$ $k$ $( \theta , \theta _ { v } )$ are learned by minimizing the following loss function:
62
+
63
+ $$
64
+ \begin{array} { r } { \boldsymbol { \mathcal { L } } ( \boldsymbol { \theta } , \boldsymbol { \theta } _ { v } ) = \mathbb { E } _ { ( s _ { t } , a _ { t } , r _ { t } ) } \left[ \boldsymbol { A } _ { t } ^ { 2 } - \boldsymbol { A } _ { t } \log \pi ( \boldsymbol { a } _ { t } ) - \boldsymbol { \beta } \boldsymbol { \mathcal { H } } ( \boldsymbol { \pi } ) \right] , } \end{array}
65
+ $$
66
+
67
+ where the first term optimizes the value function, second optimizes policy function and last term encourages exploration by rewarding high entropy $\mathcal { H }$ of the policy with scaling parameter $\beta$ .
68
+
69
+ Proximal Policy Optimization (PPO) [16]. PPO is a critic based policy-gradient method similar to A3C, that works for off-policy updates unlike A3C.
70
+
71
+ PPO uses the clipping function on the ratio of action probabilities to constrain the difference between new and old policy. The resulting objective function is
72
+
73
+ $$
74
+ \mathcal { L } ( \theta ) = \mathbb { E } _ { ( s _ { t } , a _ { t } , r _ { t } ) } \left[ - \operatorname* { m i n } ( \frac { \pi ( a _ { t } | s _ { t } ; \theta ) } { \pi ( a _ { t } | s _ { t } ; \theta _ { \mathrm { o l d } } ) } A _ { t } , \mathrm { c l i p } ( \frac { \pi ( a _ { t } | s _ { t } ; \theta ) } { \pi ( a _ { t } | s _ { t } ; \theta _ { \mathrm { o l d } } ) } , 1 - \eta , 1 + \eta ) A _ { t } ) \right] ,
75
+ $$
76
+
77
+ where $\eta$ is a hyper-parameter and $A _ { t }$ is an estimate of the advantage function at timestep $t$ . In addition, PPO usually includes a term minimizes loss of the value function and rewarding entropy of the policy similar to A3C.
78
+
79
+ # 3 A Robust Deep RL framework with adversarial loss
80
+
81
+ In this section, we propose RADIAL (Robust ADversarIAl Loss)-RL, a principled framework for training deep RL agents robust against adversarial attacks. RADIAL designs adversarial loss functions by leveraging existing neural network robustness formal verification bounds. We first introduce the key idea of RADIAL and then elucidate a few ways to formulate adversarial loss for the three classical deep reinforcement learning algorithms, DQN, A3C and PPO in Sections 3.1, 3.2 and 3.3. In Section 3.4, we propose a novel evaluation metric, Greedy Worst-Case Reward (GWC), to efficiently assess agent’s robustness against input perturbations.
82
+
83
+ Main idea. The training loss of the RADIAL framework, $\mathcal { L } _ { \mathrm { R A D I A L } }$ , consists of two terms:
84
+
85
+ $$
86
+ \mathcal { L } _ { \mathrm { R A D I A L } } = \kappa \mathcal { L } _ { \mathrm { n o m } } + ( 1 - \kappa ) \mathcal { L } _ { \mathrm { a d v } } ,
87
+ $$
88
+
89
+ where ${ \mathcal { L } } _ { \mathrm { n o m } }$ denotes the nominal loss function such as Eqs. (1)-(3) for nominal (standard) deep RL agents, and ${ \mathcal { L } } _ { \mathrm { a d v } }$ denotes the adversarial loss which we will design carefully to account for adversarial perturbations. $\kappa$ is a hyperparameter controlling the trade-off between standard performance and robust performance with value between 0 and 1, and note that standard RL training algorithms have $\kappa = 1$ throughout the full training process. Here we propose two principled approaches to construct ${ \mathcal { L } } _ { \mathrm { a d v } }$ both via the neural network robustness certification bounds [14, 12, 13, 11, 31, 32, 33, 34]:
90
+
91
+ #1. Construct an strict upper bound of the perturbed standard loss (Eq (9), (10), (7)); #2. Design a regularizer to minimize overlap between output bounds of actions with large difference in outcome (Eq (5), (6)).
92
+
93
+ The Approach #1 is well-motivated as minimizing a strict upper bound of the perturbed standard loss usually also decreases the true perturbed standard loss, which indicates the policy should perform well under adversarial perturbations. Alternatively, Approach $\# 2$ is motivated by the idea that we want to avoid choosing a significantly worse action because of a small input perturbation.
94
+
95
+ The foundation of both Approach #1 and $\# 2$ lies in the robustness formal verification tools to derive output bounds of neural networks under input perturbations. Specifically, for a given neural network, suppose $z _ { i } ( x )$ is the activation of the $i$ th layer of a neural network with input $x$ . The goal of a robustness verification algorithm is to compute layer-wise lower and upper bounds of the neural network, denoted as $\underline { { z } } _ { i } ( x , \epsilon )$ and $\overline { { z } } _ { i } ( x , \epsilon )$ , such that $\underline { { z } } _ { i } ( x , \epsilon ) \leq z _ { i } ( x + \delta ) \leq \overline { { z _ { i } } } ( x , \epsilon )$ , for any additive input perturbation $\delta$ on $x$ with $| | \delta | | _ { p } \leq \epsilon$ . We will apply robustness verification algorithms on the Q-networks (for DQN) or policy networks (for A3C and PPO) to get layer-wise output bounds of $Q$ and $\pi$ . These output bounds can be used to calculate an upper bound of the original loss function under worst-case adversarial perturbation ${ \mathcal { L } } _ { \mathrm { a d v } }$ for Approach #1. Similarly, the layer-wise bound is used to minimize the overlap of output intervals as proposed in Approach $\# 2$ . For the purpose of training efficiency, IBP [14] is used to compute the layer-wise bounds for the neural networks, but other differentiable certification methods [12, 13, 11, 31, 32, 33] could be applied directly (albeit may incur additional computation cost). Our experiments focus on $p = \infty$ to compare with baselines but the methodology works for general $p$ .
96
+
97
+ # 3.1 RADIAL-DQN
98
+
99
+ For Dueling-DQN, the advantage function $A _ { Q }$ is used to decide which action to take and the value function $V _ { Q }$ is only important for training. Hence, we only need to make $A _ { Q }$ robust and the Q function is lower and upper bounded by $\underline { { Q } } ( s , a , \epsilon ) = V _ { Q } ( s ) + \underline { { A _ { Q } } } ( s , a , \epsilon )$ and $\overline { { { Q } } } ( s , a , \epsilon ) = V _ { Q } ( s ) + \overline { { { A _ { Q } } } } ( s , a , \epsilon )$ with $\epsilon$ -bounded perturbations to input $s$ . In RADIAL we proposde two approaches to derive the adversarial loss ${ \mathcal { L } } _ { \mathrm { a d v } }$ ; however, due to the space constraints, we describe the approach that has better empirical performance in the main text, and leave the other in the Appendix.
100
+
101
+ For DQN, we find that Approach $\# 2$ performs better. The goal of Approach #2 is to minimize the weighted overlap of activation bounds for different actions (Fig. 2). The idea is to minimize only what is necessary for robust performance, overlap. If there is no overlap, the original action’s Q-value is guaranteed to be higher than others even under perturbation, so the agent won’t change it’s behavior under perturbation. However not all overlap is equally important. If two actions have a very similar $\mathrm { Q }$ -value, overlap is acceptable, as taking a different but equally good action under perturbation is not a problem. To address this we added weighting by $Q _ { \mathrm { d i f f } }$ , which helps by multiplying overlaps with similar Q-values by a small number and overlaps with different Q-values by a large number.
102
+
103
+ The final loss loss function is as follows:
104
+
105
+ $$
106
+ \mathcal { L } _ { \mathrm { a d v } } ( \theta _ { \mathrm { a c t o r } } , \epsilon ) = \mathbb { E } _ { ( s , a , s ^ { \prime } , r ) } [ \sum _ { y } Q _ { \mathrm { d i f f } } ( s , y ) \cdot O v l ( s , y , \epsilon ) ]
107
+ $$
108
+
109
+ where
110
+
111
+ $$
112
+ Q _ { \mathrm { d i f f } } ( s , y ) = \operatorname* { m a x } ( 0 , Q ( s , a ) - Q ( s , y ) ) , \quad O v l ( s , y , \epsilon ) = \operatorname* { m a x } ( 0 , \overline { { Q } } ( s , y , \epsilon ) - \underline { { Q } } ( s , a , \epsilon ) + \eta )
113
+ $$
114
+
115
+ $\eta = 0 . 5 \cdot Q _ { \mathrm { d i f f } } ( s , y )$ and $a$ is the action taken. Here $O v l$ represents the overlap between the bounds of two actions (grey region in Fig 2). To promote additional robustness, the network is incentivized to have a margin $\eta$ (rather than simply no overlaps). We set $\eta = 0 . 5 \cdot Q _ { \mathrm { d i f f } }$ to have it be half of the maximum margin attainable. See Appendix $\mathrm { F }$ for experiments and discussion on the importance of this choice for margin. Note that $Q _ { \mathrm { d i f f } }$ is treated as a constant (no gradient) for the optimization. Eq. (5) reduces to zero when $\epsilon = 0$ .
116
+
117
+ # 3.2 RADIAL-A3C
118
+
119
+ In A3C, as the value network $V$ and entropy $\mathcal { H }$ are only used to help training, we will use the unperturbed form of the approximated advantage $A _ { t } \big ( s _ { t } , a _ { t } ; \theta , \theta _ { v } \big )$ and entropy $\mathcal { H }$ and focus on designing a robust policy network $\pi$ in RADIAL-A3C. As the Approach $\# 2$ is more effective in our experiments, we focus on describing Approach $\# 2$ here and leave Approach #1 in the Appendix $\mathbf { B }$ . The idea of Approach $\# 2$ for A3C is very similar to DQN, except that the $\mathrm { Q }$ -values are replaced by a combination of the policy outputs $\pi$ and the pen-ultimate layer of the policy networks $z$ (before the softmax layer):
120
+
121
+ $$
122
+ \mathcal { L } _ { \mathrm { a d v } } ( \theta _ { \mathrm { a c t o r } } , \epsilon ) = \mathbb { E } _ { ( s , a , s ^ { \prime } , r ) } [ \sum _ { y } \pi _ { \mathrm { d i f f } } ( s , y ) \cdot O v l ( s , y , \epsilon ) ]
123
+ $$
124
+
125
+ ![](images/6c9e9d36358ef5d3e304ac88c13e30f6b9509dfe8e774585db0bf8244ffaad53.jpg)
126
+ Figure 2: Visualizing $L _ { \mathrm { a d v } }$ for RADIAL-DQN (Approach #2) in a simple case with 2 actions.
127
+
128
+ # Algorithm 1: Greedy Worst-Case Reward
129
+
130
+ $\overline { { R = 0 } }$
131
+ while $s _ { t }$ not terminal do 1. Calculate $\pi _ { i } ( s _ { t } , \theta )$ , $\underline { { \pi } } _ { i } ( s _ { t } , \epsilon ; \theta )$ and $\overline { { \pi } } _ { i } ( s _ { t } , \epsilon ; \theta )$ for each action $i$ 2. Calculate set of possible actions $\Gamma : = \{ i | \overline { { \pi } } _ { i } \geq \operatorname* { m a x } _ { j } ( \underline { { \pi } } _ { j } ) \}$ 3. Take the "worst" action $k$ out of the possible actions, $k = \mathrm { a r g m i n } _ { i \in \Gamma } ( \pi _ { i } ( s _ { t } , \theta ) )$ . Observe $r _ { t }$ and $s _ { t + 1 }$ and update $R \gets R + r _ { t }$ 4. $t = t + 1$
132
+ end
133
+ return $R$
134
+
135
+ with $\pi _ { \operatorname { d i f f } } ( s , y ) = \operatorname* { m a x } ( 0 , \pi ( s , a ) - \pi ( s , y ) )$ and $O v l ( s , y , \epsilon ) = \operatorname* { m a x } ( 0 , \overline { { z } } ( s , y , \epsilon ) - \underline { { z } } ( s , a , \epsilon ) + \eta )$ Where $\eta = 0 . 5 \cdot z _ { \mathrm { d i f f } } ( s , y )$ and $z _ { \mathrm { d i f f } } ( s , y ) = \operatorname* { m a x } ( 0 , z ( s , a ) - z ( s , y ) )$ .
136
+
137
+ # 3.3 RADIAL-PPO
138
+
139
+ For RADIAL-PPO, we use Approach #1 as Approach $\# 2$ does not work for continuous actions(discussion in Appendix C). In RADIAL-PPO, we only calculate bounds over current policy output, because the experiences are generated by sampling from unperturbed old policy, and value function/advantage are only used during training. The intuition for Approach #1 is to derive an upper bound of the RHS of Eqn. 3 which will always hold.
140
+
141
+ $\forall s _ { t } \in S , \forall | | \delta | | _ { p } \leq \epsilon \ ; \mathcal { L } ( \theta , s _ { t } + \delta ) \leq \mathcal { L } _ { \mathrm { a d v } } ( \theta , s _ { t } , \epsilon )$ . Minimizing this upper bound will then also decrease the loss under perturbation. In practice optimizing this loss function results in increasing the lower bound of the probability of taking good actions $( A _ { t } \geq 0 )$ ), and decreasing the upper bound of the probability to take bad actions $( A _ { t } < 0 )$ ).
142
+
143
+ The mathematical definition of ${ \mathcal { L } } _ { \mathrm { a d v } }$ is the following:
144
+
145
+ $$
146
+ \mathcal { L } _ { \mathrm { a d v } } ( \theta , \epsilon ) = \mathbb { E } _ { ( s _ { t } , a _ { t } , r _ { t } ) } \left[ - \operatorname* { m i n } ( \frac { \hat { \pi } ( a _ { t } | s _ { t } , \epsilon ; \theta ) } { \pi ( a _ { t } | s _ { t } ; \theta _ { \mathrm { o l d } } ) } A _ { t } , \mathrm { c l i p } ( \frac { \hat { \pi } ( a _ { t } | s _ { t } , \epsilon ; \theta ) } { \pi ( a _ { t } | s _ { t } ; \theta _ { \mathrm { o l d } } ) } , 1 - \eta , 1 + \eta ) A _ { t } ) \right] .
147
+ $$
148
+
149
+ The worst-case policy is defined as:
150
+
151
+ $$
152
+ \hat { \pi } ( a _ { t } | s _ { t } , \epsilon ; \theta ) = \left\{ \frac { \pi ( a _ { t } | s _ { t } , \epsilon ; \theta ) , \ \mathrm { i f } \ A _ { t } \geq 0 } { \pi ( a _ { t } | s _ { t } , \epsilon ; \theta ) , \ \mathrm { o t h e r w i s e } } \right.
153
+ $$
154
+
155
+ For our continuous control experiments, the output of our policy are the parameters $\mu , \Sigma$ of a Gaussian, with covariance being diagonal and independent of input state $s$ . We can define bounds on distance $d$ :
156
+
157
+ d $\begin{array} { r l } & { \mathfrak { l } ( a _ { t } , s _ { t } , \epsilon ) = \operatorname* { m a x } _ { \mu \in \{ \underline { { \mu } } , \vec { \mu } \} } ( a _ { t } - \mu ) ^ { T } \Sigma ^ { - 1 } ( a _ { t } - \mu ) , \underline { { d } } ( a _ { t } , s _ { t } , \epsilon ) = \operatorname* { m i n } _ { \mu \in [ \underline { { \mu } } , \vec { \mu } ] } ( a _ { t } - \mu ) ^ { T } \Sigma ^ { - 1 } ( a _ { t } - \mu ) } \\ & { \mathrm { ~ h e n ~ } \overline { { \pi } } ( a _ { t } | s _ { t } , \epsilon ; \theta ) = \frac { e ^ { - \frac { d } { d } / 2 } } { ( ( 2 \pi ) ^ { k } \operatorname* { d e t } \Sigma ) ^ { 0 . 5 } } \mathrm { ~ a n d ~ } \underline { { \pi } } ( a _ { t } | s _ { t } , \epsilon ; \theta ) = \frac { e ^ { - \overline { { d } } / 2 } } { ( ( 2 \pi ) ^ { k } \operatorname* { d e t } \Sigma ) ^ { 0 . 5 } } \cdot \mathrm { ~ W h e r e ~ } k \mathrm { ~ i s ~ t h e ~ n u m b e r ~ o f ~ } } \end{array}$ dimensions in the action space.
158
+
159
+ For discrete action, $\pi$ is a categorical distribution over possible actions, where $\overline { { \pi } } ( a _ { t } )$ is the upper bound of the policy network $\pi$ at $a _ { t }$ -th output. This can be computed from the upper bound of $a _ { t }$ -th logit(output before softmax) and lower bound of other logits by applying softmax.
160
+
161
+ # 3.4 New efficient evaluation metric: Greedy Worst-Case Reward
162
+
163
+ The goal of training RL agents robust against input perturbations is to ensure that the agents could still perform well under any (bounded) adversarial perturbations. This can be translated into maximizing the worst-case reward $R _ { w c }$ , which is the reward under worst possible sequence of adversarial attacks.
164
+
165
+ We define $R _ { w c }$ as follows: $\begin{array} { r } { R _ { w c } = \operatorname* { m i n } _ { | | \delta _ { t } | | _ { p } \leq \epsilon } \mathbb { E } _ { \tau } [ R ( \tau ) ] } \end{array}$ with trajectory $\tau = ( s _ { 0 } , a _ { 0 } , . . . , s _ { T } , a _ { T } )$ where $a _ { t } , s _ { t } , r _ { t }$ are drawn from $\pi ( s _ { t } + \delta _ { t } ) , { \mathcal { P } } ( s _ { t - 1 } , a _ { t - 1 } ) ,$ $\mathscr { R } ( s _ { t - 1 } , a _ { t - 1 } )$ respectively, and $R ( \tau ) =$ $\textstyle \sum _ { t } r _ { t }$ . One idea is to evaluate every possible trajectory $\tau$ to find which one produces the minimal reward. However $R _ { w c }$ is practically impossible to evaluate, as finding the worst perturbations $\delta _ { t }$ of a set of possible actions $a _ { t }$ for each state $s _ { t }$ is NP-hard, and the amount of trajectories to evaluate grows exponentially with respect to trajectory length $T$ , which is hard to compute. One possible way to avoid finding worst-case perturbations directly is to use certified output bounds [12, 13, 11, 31, 32, 33], which produces a superset of all possible actions under worst-case perturbations and hence the resulting total accumulative reward is a lower bound of $R _ { w c }$ . We name this reward as Absolute Worst-Case Reward (AWC). Note that AWC is a lower bound of $R _ { w c }$ when both the policy and environment are deterministic.
166
+
167
+ However, AWC still requires evaluating an exponential amount of possible action sequences, which is computationally expensive. To overcome this limitation, we propose an alternative evaluation method called Greedy Worst-Case Reward (GWC) in Algorithm 1, which approximates the desired $R _ { w c }$ and can be computed efficiently with a linear complexity of total timesteps $T$ . The idea of GWC is to avoid evaluating exponential numbers of trajectories and use a simple heuristic to approximate $R _ { w c }$ by choosing the action with lowest Q-value (or the probability of action taken for A3C) greedily at each state. We show in Fig 4 (in Appendix E) that GWC is often close to AWC while being much faster to evaluate (linear complexity of total time steps). Discussion about metrics used in baseline works [17, 18] and full description of the algorithm for computing AWC is in Appendix D.
168
+
169
+ # 4 Experimental results
170
+
171
+ Environments and setup To have a fair comparison with baseline works [17, 18], we experiment on the same Atari-2600 environment [35] and same 4 games used in [17, 18]. Different from [17, 18], we further evaluate our algorithm on a more challenging ProcGen [36] benchmark, which allows us to test generalization abilities of the agent. Note that both Atari-games and ProcGen [36] benchmark have high dimensional pixel inputs and discrete action spaces. To compare our RL agents with continuous actions with [17], we use the MuJoCo environment which simulates robotic control and has relatively low-dimensional inputs and a continuous action space. Full training details and hyperparameter settings are available in Appendix H.
172
+
173
+ Evaluation. We evaluate the performance of our agents with a total of 3 metrics: (a) total reward under 10-steps $l _ { \infty }$ -PGD untargeted attack applied on every frame, (b) GWC and (c) Action Certification Rate (ACR)[17]. For Atari games the result of Approach #2 for RADIAL-agents are in Table 1, and the results of Approach #1 are in Appendix I. Note that A3C and PPO take actions stochastically during training but we set them to deterministically choose the action that has the highest probability during evaluation.
174
+
175
+ # 4.1 Atari results
176
+
177
+ Table 1 shows that RADIAL-DQN outperforms or matches all the baselines on all four games against $\epsilon = 1 / 2 5 5$ PGD-attacks with the same evaluation method in [17]. The result suggests that RADIAL can train a robust policy against $\epsilon = 1 / 2 5 5$ adversarial perturbations without sacrificing nominal performance. In fact, our robust RADIAL agents consistently outperform the baselines on all the evaluation metrics, with significant margin in RoadRunner. In addition to better rewards, our RADIAL-DQN is roughly $6 \times$ faster to train than [17]. Experimentally if we include the standard training process, our total run time is only 17 hours compared to SA-DQN’s 35 hours on our hardware. RADIAL-A3C also achieves high rewards under adversarial attacks and beats the baselines on 2/4 tasks despite the games likely being chosen by previous work because they are easy for Q-learning agents. As shown in Table 1 (A3C is excluded because it did not learn Freeway), RADIAL-A3C reaches slightly lower nominal rewards than RADIAL-DQN but shows more robust performance against large perturbations, even outperforming RADIAL-DQN against $\epsilon = 5 / 2 5 5$ PGD attacks on RoadRunner. This shows RADIAL works well for very different types of RL algorithms.
178
+
179
+ One interesting finding is that our A3C baseline actually performed well against small PGD-attacks even without robust training (the standard DQN models all perform terribly at $\epsilon = 1 / 2 5 5$ while A3C has comparable or even better performance than the robust trained SA-DQN or RS-DQN.) We believe this is due to two main factors: (a) the network architecture is slightly different from DQN and uses Max-pooling layers, which naturally makes it more resistant against many small changes to input; (b) A3C training is more stochastic, so it is more resistant to occasional random actions caused by the untargeted attack.
180
+
181
+ <table><tr><td></td><td>Model/metric</td><td>Nominal</td><td></td><td>PGD attack</td><td></td><td>GWC</td><td>ACR</td></tr><tr><td></td><td>E</td><td>0</td><td>1/255</td><td>3/255</td><td>5/255</td><td>1/255</td><td>1/255</td></tr><tr><td colspan="8">BankHeist</td></tr><tr><td colspan="8">Baselines:</td></tr><tr><td>Standard</td><td>DQN[17] A3C</td><td>1325.5±5.7 1109.0±21.4</td><td>29.5±2.4 1102.5±49.4</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.0±0.0 0.5±0.5</td><td>0.000 0.000</td></tr><tr><td>Robust</td><td>RS-DQN[18]</td><td>238.66</td><td>190.67</td><td>534.5±58.2 N/A</td><td>115.0±27.8 N/A</td><td>N/A</td><td>N/A</td></tr><tr><td></td><td>SA-DQN[17]</td><td>1237.6±1.7</td><td>1237.0±2.0</td><td>1213.0±2.5</td><td>1130.0±29.1</td><td>1196.5±9.4</td><td>0.976</td></tr><tr><td colspan="8">Our Methods:</td></tr><tr><td></td><td>RADIAL-DQN</td><td>1349.5±1.7</td><td>1349.5±1.7</td><td>1348±1.7</td><td>1182.5±43.3</td><td>1344.5±1.8</td><td>0.981</td></tr><tr><td></td><td>RADIAL-A3C</td><td>1036.5±23.4</td><td>975±22.2</td><td>949±19.5</td><td>712±46.4</td><td>851.5±2.9</td><td>0.718</td></tr><tr><td colspan="8">Freeway Baselines:</td></tr><tr><td colspan="8"></td></tr><tr><td>Standard</td><td>DQN[17]</td><td>33.9±0.07</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.000</td></tr><tr><td>Robust</td><td>RS-DQN[18]</td><td>32.93</td><td>32.53</td><td>N/A</td><td>N/A</td><td>N/A</td><td>N/A</td></tr><tr><td></td><td>SA-DQN [17]</td><td>30.0±0.0</td><td>30.0±0.0</td><td>30.05±0.05</td><td>27.65±0.22</td><td>30.0±0.0</td><td>1.000</td></tr><tr><td colspan="8">Our Methods:</td></tr><tr><td></td><td>RADIAL-DQN</td><td>33.2±0.19</td><td>33.35±0.16</td><td>33.4±0.13</td><td>29.1±0.17</td><td>33.25±0.24</td><td>0.998</td></tr><tr><td colspan="8">Pong Baselines:</td></tr><tr><td colspan="8"></td></tr><tr><td>Standard</td><td>DQN[17]</td><td>21.0±0.0</td><td>-21.0±0.0</td><td>-21.0±0.0</td><td>-20.85±0.08</td><td>-21.0±0.0</td><td>0.000</td></tr><tr><td>Robust</td><td>A3C</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>-17.85±0.33</td><td>-21.0±0.0</td><td>0.000</td></tr><tr><td></td><td>RS-DQN[18] SA-DQN[17]</td><td>19.73 21.0±0.0</td><td>18.13 21.0±0.0</td><td>N/A 21.0±0.0</td><td>N/A -19.75±0.1</td><td>N/A 21.0±0.0</td><td>N/A 1.000</td></tr><tr><td colspan="8">Our Methods:</td></tr><tr><td></td><td></td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td></td></tr><tr><td></td><td>RADIAL-DQN RADIAL-A3C</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>0.894 0.755</td></tr><tr><td colspan="8">RoadRunner</td></tr><tr><td colspan="8">Standard</td></tr><tr><td></td><td>DQN[17] A3C</td><td>43390±973 34420±604</td><td>0.0±0.0 31040±2173</td><td>0.0±0.0 3025±317</td><td>0.0±0.0 350±93</td><td>0.0±0.0 0.0±0.0</td><td>0.000 0.000</td></tr><tr><td>Robust</td><td>RS-DQN[18]</td><td>12106.67</td><td>5753.33</td><td>N/A</td><td>N/A</td><td>N/A</td><td>N/A</td></tr><tr><td></td><td>SA-DQN [17]</td><td>45870±1380</td><td>44300±1753</td><td>20170±1822</td><td>3350±335</td><td>0.0±0.0</td><td>0.602</td></tr><tr><td colspan="8">Our Methods:</td></tr><tr><td></td><td>RADIAL-DQN</td><td>44495±1165</td><td>44445±1148</td><td>39560±1621</td><td>23820±942</td><td>45770±1622</td><td>0.994</td></tr><tr><td></td><td>RADIAL-A3C</td><td>34825±981</td><td>31960±933</td><td>29920±1496</td><td>31545±1480</td><td>31885±1912</td><td>0.923</td></tr></table>
182
+
183
+ Table 1: We report the mean reward of 20 runs as well as the standard error of the mean(sem). Best result boldfaced, results within a sem of the best result underlined. RADIAL-DQN outperforms all the baselines. All the robust models are trained with $\epsilon = 1 / 2 5 5$ . RS-DQN results are N/A besides 1/255 PGD as the authors have not released code or models.
184
+
185
+ Another interesting observation in our experiments across different algorithms and environments is that sometimes applying an attack or increasing the magnitude of PGD-attack increases the reward achieved. We note that this phenomenon is not unreasonable since the PGD attack is designed to simply change original actions of RL agent; it is possible and often even likely that original trajectory was not the best possible one and a different trajectory can give higher reward. We observed this phenomenon on Freeway for both SA-DQN and RADIAL-DQN (Table 1), and for RADIAL-PPO on CoinRun and Jumper (Table 2). We believe this indicates the weakness of untargeted PGD-attacks and highlights room for improvement of attacks on RL-policies.
186
+
187
+ # 4.2 ProcGen Results
188
+
189
+ We report our results on 3 environments on the ProcGen benchmark [36] in Table 2. To our best knowledge, it is the first evaluation of robustness of RL-agents trained on ProcGen. All our agents were trained for 25M steps on the easy setting, trained on 200 different levels and evaluated on the full distribution. We used the IMPALA-CNN architecture [36], which is a significantly larger than the ones in our Atari experiments, but our algorithm and training setup can still successfully scale to this more complex setting. We notice like A3C, the original PPO-policy is already quite robust against small PGD-attacks, but RADIAL-PPO has even better robustness to much stronger attacks. Next, we use the train/evaluation split in levels to study whether our robust training generalizes to new environments. We observe that RADIAL training increases robustness consistently on both training and evaluation set, and the gap between training and evaluation results is often smaller for RADIAL-PPO. The results in Table 2 uses a deterministic version of the policy and the result of stochastic policy is reported in Appendix I.
190
+
191
+ <table><tr><td>Env:</td><td>Model</td><td>Dist</td><td>Nominal</td><td>e=1/255 PGD</td><td>e=3/255PGD</td><td>e=5/255 PGD</td></tr><tr><td rowspan="4">Fruitbot</td><td>PPO</td><td>Train</td><td>30.20±0.23</td><td>25.72 ± 0.33</td><td>15.56 ± 0.38</td><td>8.79 ± 0.35</td></tr><tr><td rowspan="2">RADIAL-PPO</td><td>Eval</td><td>26.09 ± 0.33</td><td>22.53 ± 0.38</td><td>13.51 ± 0.39</td><td>8.51 ± 0.35</td></tr><tr><td>Train</td><td>28.03±0.24</td><td>27.93 ± 0.25</td><td>27.84 ± 0.26</td><td>27.50 ± 0.26</td></tr><tr><td></td><td>Eval</td><td>26.08 ± 0.29</td><td>26.06 ± 0.30</td><td>25.87 ± 0.30</td><td>25.81 ± 0.30</td></tr><tr><td rowspan="4">Coinrun</td><td rowspan="2">PPO</td><td>Train</td><td>8.31± 0.12</td><td>6.36± 0.15</td><td>4.19 ± 0.16</td><td>3.32 ±0.15</td></tr><tr><td>Eval</td><td>6.65 ± 0.15</td><td>5.22 ± 0.16</td><td>3.58 ± 0.15</td><td>3.36 ± 0.15</td></tr><tr><td rowspan="2">RADIAL-PPO</td><td>Train</td><td>7.12 ±0.14</td><td>7.10 ±0.14</td><td>7.19 ± 0.14</td><td>7.34± 0.14</td></tr><tr><td>Eval</td><td>6.66 ± 0.15</td><td>6.71 ± 0.15</td><td>6.71 ± 0.15</td><td>6.67 ± 0.15</td></tr><tr><td rowspan="4">Jumper</td><td>PPO</td><td>Train</td><td>8.69± 0.11</td><td>6.61 ± 0.15</td><td>4.50 ± 0.16</td><td>3.42 ± 0.15</td></tr><tr><td rowspan="2">RADIAL-PPO</td><td>Eval</td><td>4.22 ± 0.16</td><td>3.90 ± 0.15</td><td>3.10 ± 0.15</td><td>3.15 ± 0.15</td></tr><tr><td>Train</td><td>6.59 ± 0.15</td><td>6.70 ± 0.15</td><td>6.55 ± 0.15</td><td>6.83 ± 0.15</td></tr><tr><td></td><td>Eval</td><td>3.85 ± 0.15</td><td>3.93 ± 0.15</td><td>3.75 ± 0.15</td><td>3.59 ± 0.15</td></tr></table>
192
+
193
+ Table 2: Results on the ProcGen environments. Each model was evaluated for 1000 episodes on the training/evaluation set. Reported means together with standard error of the mean.
194
+
195
+ Table 3: We report the results of reward (mean $\pm$ standard error of the mean) for each agent in MuJoCo continuous control tasks. Agents are trained for 4096k steps and evaluated for 50 episodes on the evaluation set. Results within standard error of the mean from best result underlined.
196
+
197
+ <table><tr><td>Environment</td><td>Model</td><td>Nominal e=0</td><td>e = 0.0375</td><td>Attack (MAD) e= 0.075</td><td>∈=0.15</td></tr><tr><td rowspan="3">Walker2D (etrain = 0.075)</td><td>PPO</td><td>3635.3±50.7</td><td>1968.5±90.6</td><td>1283.1±61.9</td><td>670.3±31.9</td></tr><tr><td>SA-PPO [17]</td><td>3776.4±186.0</td><td>3923.6±189.9</td><td>3263.7±228.1</td><td>3652.1±203.3</td></tr><tr><td>RADIAL-PPO</td><td>5251.6±10.4</td><td>5108.4±67.9</td><td>4474.7±140.6</td><td>3895.3±128.3</td></tr><tr><td rowspan="3">Hopper (etrain = 0.075)</td><td>PPO</td><td>2740.7±125.8</td><td>2034.4±126.9</td><td>1524.2±146.3</td><td>969.9±90.1</td></tr><tr><td>SA-PPO [17]</td><td>3585.0±56.4</td><td>3364.7±93.9</td><td>3165.1±107.1</td><td>2248.3±124.7</td></tr><tr><td>RADIAL-PPO</td><td>3737.5±4.4</td><td>3684.9±27.4</td><td>3252.1±101.9</td><td>2498.9±130.0</td></tr><tr><td rowspan="3">Half Cheetah (etrain = 0.15)</td><td>PPO</td><td>5566.0±8.7</td><td>5517.8±8.8</td><td>5179.3±64.7</td><td>1483.6±193.4</td></tr><tr><td>SA-PPO [17]</td><td>4175.0±29.9</td><td>4168.8±29.9</td><td>4178.5±35.3</td><td>4173.1±31.8</td></tr><tr><td>RADIAL-PPO</td><td>4724.3±10.6</td><td>4629.7±36.9</td><td>4480.0±66.9</td><td>4008.5±119.5</td></tr></table>
198
+
199
+ # 4.3 MuJoCo Results
200
+
201
+ In Table 3 we show our results on 3 environments from MuJoCo [37] and comparison with vanilla PPO method and SA-PPO [17] convex relaxation approach. We directly use the implementation from [17]. We train $4 0 9 6 \mathrm { k \Omega }$ steps for all 3 environments, whereas [17] uses roughly 2000k for Walker2D and Hopper. For each environment, we compare the performance under MAD attacks [17] with different . For Walker2D, we use training $\epsilon = 0 . 0 7 5$ instead of $\epsilon = 0 . 0 5$ from [17] for better comparison under different attacks. For Walker2D and Hopper, RADIAL-PPO outperforms SA-PPO [17] in both natural testing and robust testing. Interesting, for Half-Cheetah, we found this environment is naturally robust (even better than robust trained agents) against attack up to $\scriptstyle \epsilon = 0 . 0 7 5$ .
202
+
203
+ # 4.4 Evaluating GWC
204
+
205
+ We show empirically that GWC is indeed a good approximation of AWC reward. We compare GWC and action certification rate (ACR) against the Absolute Worst-Case Reward (AWC) on a small scale experiments on reaching the first reward within 80 frames on Freeway due to the exponential complexity of AWC. Figure is available in Appendix D. GWC is the ratio of $+ 1$ rewards as measured by GWC, while AWC uses depth first search to compute the percentage of $+ 1$ rewards using Algorithm 2 (i.e. where all possible sequences of actions get at least $+ 1$ reward). For the episodes that we evaluated, GWC matched AWC perfectly for $\epsilon \in \{ 1 . 0 , 1 . 2 , 1 . 5 \}$ . Since AWC is a lower bound of GWC, for $\epsilon \in \{ 1 . 3 , 1 . 4 \}$ GWC matched AWC on 37/40 episodes, while overestimating on the $3 / 4 0$ ACR (as used in [17]) did not show as strong of a correlation with AWC. As evident in Table 1, GWC is a better indicator for the robust performance than ACR – this is the case for Freeway and Pong where SA-DQN has higher action certification rates but RADIAL-DQN has higher GWC and PGD rewards. Together these results give faith in GWC being a good evaluation method.
206
+
207
+ # 5 Conclusions and Future works
208
+
209
+ We have shown that using the proposed RADIAL framework can significantly improve the robustness of deep RL agents against adversarial perturbations based on robustness verification bounds – our robustly trained agents reach very good performance against even $5 \times$ larger perturbations than previous state of the art, and in the meantime are much more computationally efficient to train. In addition, we have presented a new evaluation method, Greedy Worst-Case Reward, as a good surrogate of the worst-case reward to evaluate deep RL agent’s performance under adversarial input perturbations. Future works include extending our framework to defend against semantic perturbations such as contrast and brightness changes, which are more realistic on the vision-based RL agents (e.g. self-driving car, vision-based robots).
210
+
211
+ # 6 Limitations and Potential negative impact
212
+
213
+ An important limitation of our work and one that may cause negative impact in the future is that our work addresses only a specific axis of robustness, robustness against $l _ { p }$ -norm bounded perturbations. While there are ways to extend this, for example to semantic perturbation [28], other axes like robustness to changing environment conditions are not addressed by our method. We want to highlight common terms used in this field like certified defense and robustness may sound very convincing to a non-expert, but insufficient understanding of the limits of current robust training methods and overly relying on them presents pressing potential for negative social impact.
214
+
215
+ # Acknowledgement
216
+
217
+ The authors would like to thank anonymous reviewers for valuable feedback to improve the manuscript. The authors thank MIT-IBM Watson AI lab and the MIT SuperUROP program for support in this work. T. Oikarinen and T.-W. Weng are supported by National Science Foundation under Grant No. 2107189.
218
+
219
+ # References
220
+
221
+ [1] A. Krizhevsky, “Learning multiple layers of features from tiny images,” 2009.
222
+ [2] S. Lai, L. Xu, K. Liu, and J. Zhao, “Recurrent convolutional neural networks for text classification,” in Twenty-ninth AAAI conference on artificial intelligence, 2015.
223
+ [3] V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller, “Playing atari with deep reinforcement learning,” arXiv preprint arXiv:1312.5602, 2013.
224
+ [4] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra, “Continuous control with deep reinforcement learning.,” in ICLR 2016.
225
+ [5] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus, “Intriguing properties of neural networks,” in 2nd International Conference on Learning Representations, ICLR 2014.
226
+ [6] S. Huang, N. Papernot, I. Goodfellow, Y. Duan, and P. Abbeel, “Adversarial attacks on neural network policies,” arXiv preprint arXiv:1702.02284, 2017.
227
+ [7] Y.-C. Lin, Z.-W. Hong, Y.-H. Liao, M.-L. Shih, M.-Y. Liu, and M. Sun, “Tactics of adversarial attack on deep reinforcement learning agents,” in Proceedings of the 26th International Joint Conference on Artificial Intelligence, pp. 3756–3762, 2017.
228
+ [8] T.-W. Weng, K. D. Dvijotham, J. Uesato, K. Xiao, S. Gowal, R. Stanforth, and P. Kohli, “Toward evaluating robustness of deep reinforcement learning with continuous control,” ICLR 2020.
229
+ [9] F. Tramer, N. Carlini, W. Brendel, and A. Madry, “On adaptive attacks to adversarial example defenses,” Advances in Neural Information Processing Systems, vol. 33, 2020.
230
+ [10] A. Raghunathan, J. Steinhardt, and P. Liang, “Certified defenses against adversarial examples,” ICLR 2018.
231
+ [11] J. Z. Kolter and E. Wong, “Provable defenses against adversarial examples via the convex outer adversarial polytope,” ICML 2018.
232
+ [12] L. Weng, H. Zhang, H. Chen, Z. Song, C.-J. Hsieh, L. Daniel, D. Boning, and I. Dhillon, “Towards fast computation of certified robustness for relu networks,” in International Conference on Machine Learning, pp. 5276–5285, PMLR, 2018.
233
+ [13] G. Singh, T. Gehr, M. Mirman, M. Püschel, and M. Vechev, “Fast and effective robustness certification,” in NeurIPS 2018.
234
+ [14] S. Gowal, K. Dvijotham, R. Stanforth, R. Bunel, C. Qin, J. Uesato, R. Arandjelovic, T. Mann, and P. Kohli, “On the effectiveness of interval bound propagation for training verifiably robust models,” arXiv preprint arXiv:1810.12715, 2018.
235
+ [15] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu, “Asynchronous methods for deep reinforcement learning,” in International conference on machine learning, pp. 1928–1937, PMLR, 2016.
236
+ [16] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, “Proximal policy optimization algorithms,” arXiv preprint arXiv:1707.06347, 2017.
237
+ [17] H. Zhang, H. Chen, C. Xiao, B. Li, M. Liu, D. S. Boning, and C.-J. Hsieh, “Robust deep reinforcement learning against adversarial perturbations on state observations,” in NeurIPS 2020.
238
+ [18] M. Fischer, M. Mirman, S. Stalder, and M. Vechev, “Online robustness training for deep reinforcement learning,” arXiv preprint arXiv:1911.00887, 2019.
239
+ [19] I. J. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and harnessing adversarial examples,” ICLR 2015.
240
+ [20] D. J. Mankowitz, N. Levine, R. Jeong, A. Abdolmaleki, J. T. Springenberg, Y. Shi, J. Kay, T. Hester, T. Mann, and M. Riedmiller, “Robust reinforcement learning for continuous control with model misspecification,” in International Conference on Learning Representations, 2020.
241
+ [21] L. Pinto, J. Davidson, R. Sukthankar, and A. Gupta, “Robust adversarial reinforcement learning,” in Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2817– 2826, JMLR. org, 2017.
242
+ [22] A. Gleave, M. Dennis, C. Wild, N. Kant, S. Levine, and S. Russell, “Adversarial policies: Attacking deep reinforcement learning,” in International Conference on Learning Representations, 2020.
243
+ [23] I. Ilahi, M. Usama, J. Qadir, M. U. Janjua, A. Al-Fuqaha, D. T. Huang, and D. Niyato, “Challenges and countermeasures for adversarial attacks on deep reinforcement learning,” IEEE Transactions on Artificial Intelligence, 2021.
244
+ [24] Y.-S. Wang, T.-W. Weng, and L. Daniel, “Verification of neural network control policy under persistent adversarial perturbation,” arXiv preprint arXiv:1908.06353, 2019.
245
+ [25] J. Kos and D. Song, “Delving into adversarial attacks on deep policies,” arXiv preprint arXiv:1705.06452, 2017.
246
+ [26] A. Pattanaik, Z. Tang, S. Liu, G. Bommannan, and G. Chowdhary, “Robust deep reinforcement learning with adversarial attacks,” in Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2040–2042, 2018.
247
+ [27] B. Lütjens, M. Everett, and J. P. How, “Certified adversarial robustness for deep reinforcement learning,” in Conference on Robot Learning, pp. 1328–1337, PMLR, 2020.
248
+ [28] J. Mohapatra, P.-Y. Chen, S. Liu, L. Daniel, et al., “Towards verifying robustness of neural networks against semantic perturbations,” CVPR 2020.
249
+ [29] Z. Wang, T. Schaul, M. Hessel, H. Hasselt, M. Lanctot, and N. Freitas, “Dueling network architectures for deep reinforcement learning,” in International conference on machine learning, pp. 1995–2003, PMLR, 2016.
250
+ [30] H. Van Hasselt, A. Guez, and D. Silver, “Deep reinforcement learning with double q-learning,” in Proceedings of the AAAI conference on artificial intelligence, vol. 30, 2016.
251
+ [31] S. Wang, K. Pei, J. Whitehouse, J. Yang, and S. Jana, “Efficient formal safety analysis of neural networks,” in Advances in Neural Information Processing Systems, pp. 6367–6377, 2018.
252
+ [32] H. Zhang, T.-W. Weng, P.-Y. Chen, C.-J. Hsieh, and L. Daniel, “Efficient neural network robustness certification with general activation functions,” in Advances in neural information processing systems, pp. 4939–4948, 2018.
253
+ [33] A. Boopathy, T.-W. Weng, P.-Y. Chen, S. Liu, and L. Daniel, “Cnn-cert: An efficient framework for certifying robustness of convolutional neural networks,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 3240–3247, 2019.
254
+ [34] V. Tjeng, K. Y. Xiao, and R. Tedrake, “Evaluating robustness of neural networks with mixed integer programming,” in International Conference on Learning Representations, 2018.
255
+ [35] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling, “The arcade learning environment: An evaluation platform for general agents,” Journal of Artificial Intelligence Research, vol. 47, p. 253–279, Jun 2013.
256
+ [36] K. Cobbe, C. Hesse, J. Hilton, and J. Schulman, “Leveraging procedural generation to benchmark reinforcement learning,” in International conference on machine learning, pp. 2048–2056, PMLR, 2020.
257
+ [37] E. Todorov, T. Erez, and Y. Tassa, “Mujoco: A physics engine for model-based control,” in 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033, 2012.
258
+ [38] H. Zhang, H. Chen, C. Xiao, S. Gowal, R. Stanforth, B. Li, D. Boning, and C.-J. Hsieh, “Towards stable and efficient training of verifiably robust neural networks,” in International Conference on Learning Representations, 2020.
259
+ [39] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” in ICLR 2015.
parse/train/eaAM_bdW0Q/eaAM_bdW0Q_content_list.json ADDED
@@ -0,0 +1,1176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Robust Deep Reinforcement Learning through Adversarial Loss ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 269,
8
+ 122,
9
+ 728,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Tuomas Oikarinen∗ UC San Diego CSE ",
17
+ "bbox": [
18
+ 209,
19
+ 226,
20
+ 346,
21
+ 255
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Wang Zhang MIT MechE ",
28
+ "bbox": [
29
+ 380,
30
+ 227,
31
+ 473,
32
+ 253
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Alexandre Megretski MIT EECS ",
39
+ "bbox": [
40
+ 514,
41
+ 227,
42
+ 661,
43
+ 253
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Tsui-Wei Weng UC San Diego HDSI ",
50
+ "bbox": [
51
+ 429,
52
+ 275,
53
+ 566,
54
+ 304
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 339,
65
+ 535,
66
+ 356
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Recent studies have shown that deep reinforcement learning agents are vulnerable to small adversarial perturbations on the agent’s inputs, which raises concerns about deploying such agents in the real world. To address this issue, we propose RADIAL-RL, a principled framework to train reinforcement learning agents with improved robustness against $l _ { p }$ -norm bounded adversarial attacks. Our framework is compatible with popular deep reinforcement learning algorithms and we demonstrate its performance with deep Q-learning, A3C and PPO. We experiment on three deep RL benchmarks (Atari, MuJoCo and ProcGen) to show the effectiveness of our robust training algorithm. Our RADIAL-RL agents consistently outperform prior methods when tested against attacks of varying strength and are more computationally efficient to train. In addition, we propose a new evaluation method called Greedy Worst-Case Reward (GWC) to measure attack agnostic robustness of deep RL agents. We show that GWC can be evaluated efficiently and is a good estimate of the reward under the worst possible sequence of adversarial attacks. All code used for our experiments is available at https://github.com/tuomaso/radial_rl_v2. ",
73
+ "bbox": [
74
+ 233,
75
+ 375,
76
+ 766,
77
+ 594
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 628,
88
+ 310,
89
+ 646
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Deep learning has achieved enormous success on a variety of challenging domains, ranging from computer vision [1], natural language processing [2] to reinforcement learning (RL) [3, 4]. Nevertheless, the existence of adversarial examples [5] indicates that deep neural networks (DNNs) are not as robust and trustworthy as we would expect, as small and often imperceptible perturbations can result in misclassifications of state-of-the-art DNNs. Unfortunately, adversarial attacks have also been shown possible in deep reinforcement learning, where adversarial perturbations in the observation space and/or action space can cause arbitrarily bad performance of deep RL agents [6, 7, 8]. As deep RL agents are deployed in many safety critical applications such as self-driving cars and robotics, it is of crucial importance to develop robust training algorithms (a.k.a. defense algorithms) such that the resulting trained agents are robust against adversarial (and non-adversarial) perturbation. ",
96
+ "bbox": [
97
+ 174,
98
+ 662,
99
+ 825,
100
+ 803
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Many heuristic defenses have been proposed to improve robustness of DNNs against adversarial attacks for image classification tasks, but they often fail against stronger adversarial attack algorithms. For example, [9] showed that 13 such defense methods (recently published at prestigious conferences) can all be broken by more advanced attacks. One emerging alternative to heuristic defenses is defense algorithms 2 based on robustness verification or certification bounds [10, 11, 12, 13]. These algorithms produce robustness certificates such that for any perturbations within the specified $\\ell _ { p }$ - norm distance \u000f, the trained DNN will produce consistent classification results on given data points. Representative works along this line include [11] and [14], where the learned models can have much higher certified accuracies by including the robustness verification bounds in the loss function with proper training schedule, even if the verifier produces loose robustness certificates [14] for models without robust training (a.k.a. nominal models). Here, the certified accuracy is calculated as the percentage of the test images that are guaranteed to be classified correctly under a given perturbation magnitude $\\epsilon$ . ",
107
+ "bbox": [
108
+ 174,
109
+ 808,
110
+ 825,
111
+ 864
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/86b2ea5b9ea7c8293bf47f1b10bcb3a6edaa515344f97c86d3c6f1edfeed1a94.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Screenshots of our RADIAL framework promoting robustness of deep RL agents while the standard deep RL agents without robust training are vulnerable to adversarial attacks. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 240,
124
+ 87,
125
+ 753,
126
+ 311
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 174,
135
+ 401,
136
+ 825,
137
+ 526
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "However, most of the defense algorithms are developed for classification tasks. Few defense algorithms have been designed for deep RL agents perhaps due to the additional challenges in RL that are not present in classification tasks, including credit assignment and lack of a stationary training set. To bridge this gap, in this paper we present the RADIAL(Robust ADversarIAl Loss)-RL framework to train robust deep RL agents. We show that RADIAL can improve the robustness of deep RL agents by using carefully designed adversarial loss functions based on robustness verification bounds. Our contributions are listed below: ",
144
+ "bbox": [
145
+ 173,
146
+ 534,
147
+ 825,
148
+ 630
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "• We propose a novel robust deep RL framework, RADIAL-RL, which can be applied to different types of deep RL algorithms. We demonstrate RADIAL on three popular RL algorithms, DQN [3], A3C [15] and PPO [16]. \nWe demonstrate the superior performance of RADIAL agents on both Atari games and continuous control tasks in MuJoCo: our agents are $2 - 1 0 \\times$ more computationally efficient to train than [17] and can resist up to $5 \\times$ stronger adversarial perturbations better than existing works [18, 17]. \n• We also evaluate the effects of robust training on the ability of agents to generalize to new levels using the ProcGen benchmark, and show that our training also increases robustness on unseen levels, reaching high rewards even against $\\epsilon = 5 / 2 5 5$ PGD-attacks. \n• We propose a new evaluation method, Greedy Worst-Case Reward (GWC), for efficiently (in linear time) evaluating RL agent performance under attack of strongest adversaries (i.e. worst-case perturbation) on discrete action environments. ",
155
+ "bbox": [
156
+ 217,
157
+ 638,
158
+ 825,
159
+ 821
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "2 Related work and background ",
166
+ "text_level": 1,
167
+ "bbox": [
168
+ 174,
169
+ 89,
170
+ 459,
171
+ 106
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "2.1 Adversarial attacks in Deep RL ",
178
+ "text_level": 1,
179
+ "bbox": [
180
+ 174,
181
+ 121,
182
+ 431,
183
+ 136
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "The topic of adversarial examples in supervised learning tasks has been extensively studied, especially for DNN classifiers [5, 19]. More recently, [6, 7, 8] showed that deep RL agents are also vulnerable to adversarial perturbations, including adversarial perturbations on agents’ observations and actions [6, 7, 8], mis-specification on the environment [20], adversarial disruptions on the agents [21] and other adversarial agents [22]. For a review of different attack and defense settings in RL see Ilahi et al. [23]. ",
190
+ "bbox": [
191
+ 173,
192
+ 146,
193
+ 826,
194
+ 229
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "In this paper, we focus on $\\ell _ { p }$ -norm adversarial perturbations on agents’ observations since this threat model is adopted by many of the existing works investigating adversarial robustness of deep RL [6, 7, 8, 24, 25, 26, 27, 18, 17]. However, our framework is not limited to $\\ell _ { p }$ -norm perturbation and in fact can be easily extended to semantic perturbations (e.g. rotations, color/brightness changes, etc) for vision-based deep RL agents (e.g. atari games) by leveraging the techniques proposed in [28]. ",
201
+ "bbox": [
202
+ 174,
203
+ 236,
204
+ 825,
205
+ 306
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "2.2 Formal verification and robust training for Deep RL ",
212
+ "text_level": 1,
213
+ "bbox": [
214
+ 174,
215
+ 321,
216
+ 575,
217
+ 337
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "Robustness certification methods for DNN classifiers [12] have been applied in the deep RL setting: for example, [27] propose a policy of choosing the action with highest certified lower bound Q-value during execution, and [24] derived tighter robustness certificate for neural network policies under persistent adversarial perturbations in the system. These works study the robustness with fixed neural networks, while our work is focused on training neural networks that produce more robust RL policies. ",
224
+ "bbox": [
225
+ 174,
226
+ 348,
227
+ 825,
228
+ 431
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "The idea of adversarial training has been applied to deep RL to defend against adversarial attacks [25, 26]; however, these approaches often have much higher computational cost than standard training. While previous work such as [21] have also trained robust agents under different threat models from ours, we will not be comparing against them as they have different goals and evaluation methods. ",
235
+ "bbox": [
236
+ 174,
237
+ 438,
238
+ 825,
239
+ 493
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "The most relevant literature to our work are two robust training methods for deep Q-learning agents [18, 17]. RS-DQN [18] decouples the DQN agent into a policy and student networks, which enables leveraging additional constraints on the student DQN without strongly affecting learning of the correct Q-function, whereas SA-DQN [17] adds a hinge loss regularizer to encourage the DQN agents to follow their original actions when there are perturbations in the observation space. [17] also propose SA-PPO and SA-DDPG for training robust RL-agents in continuous control. In contrast, in RADIAL, we leverage the in-expensive robustness verification bounds to carefully design regularizers discouraging potentially overlapping actions of deep RL agents. As demonstrated in the Sec 4, our RADIAL agents outperform [18, 17] under various strength of adversarial attacks, while being $2 { - } 1 0 \\times$ more computationally efficient to train than [17]. Moreover, we introduce a novel metric to evaluate agent performance against worst possible adversary that is not investigated in [18, 17]. ",
246
+ "bbox": [
247
+ 173,
248
+ 500,
249
+ 826,
250
+ 652
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "2.3 Basics of Deep Reinforcement Learning ",
257
+ "text_level": 1,
258
+ "bbox": [
259
+ 174,
260
+ 667,
261
+ 488,
262
+ 683
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "Markov Decision Process with parameters $( S , { \\mathcal { A } } , { \\mathcal { P } } , { \\mathcal { R } } , \\gamma , s _ { 0 } )$ is used to characterize the environments in this paper, where $s$ is a set of states, $\\mathcal { A }$ is a set of the available actions, $\\mathcal { P } : \\mathcal { S } \\times \\mathcal { A } \\times \\mathcal { S } \\mathbb { R }$ defines the transition probabilities, and $\\mathcal { R } : \\mathcal { S } \\times \\mathcal { A } \\to \\mathbb { R }$ is the scalar reward function, $s _ { 0 }$ is the initial state distribution and $\\gamma$ is the discount factor. RL algorithms aim at learning a possibly stochastic policy $\\pi : \\mathcal { S } \\times \\mathcal { A } \\to \\mathbb { R }$ describing the probability of taking an action $a$ given state $s$ . The goal of a policy is to maximize the cumulative time discounted reward of an episode $\\textstyle \\sum _ { t } \\gamma ^ { t } r _ { t }$ , where $t$ is the timestep and $r _ { t } , a _ { t }$ and $s _ { t }$ are reward, action and state at timestep $t$ . ",
269
+ "bbox": [
270
+ 174,
271
+ 694,
272
+ 825,
273
+ 792
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "text",
279
+ "text": "Deep Q-networks (DQN) [3]. An action-value function $Q ( s , a )$ describes the expected cumulative rewards given current state $s$ and action $a$ . In Q-learning, a policy $\\pi$ is constructed by taking the action with highest $Q$ -value. The optimal $Q$ function, denoted as $Q ^ { * } ( s , a )$ , satisfies the Bellman Optimality Equations $\\begin{array} { r } { Q ^ { * } ( s , a ) = r + \\gamma \\mathbb { E } _ { ( s ^ { \\prime } \\mid s , a ) } \\left[ \\operatorname* { m a x } _ { a ^ { \\prime } } Q ^ { * } ( s ^ { \\prime } , a ^ { \\prime } ) \\right] } \\end{array}$ , where $s ^ { \\prime }$ is the next state and $r$ is reward. The essence of DQN is to use neural networks to approximate the $Q ^ { * } ( s , a )$ and the networks can be trained by minimizing the loss $\\begin{array} { r } { \\mathcal L ( \\theta ) = \\mathbb { E } _ { ( s , a , s ^ { \\prime } , r ) } \\left[ ( r + \\gamma \\operatorname* { m a x } _ { a ^ { \\prime } } Q ( s ^ { \\prime } , a ^ { \\prime } ; \\theta ) - Q ( s , a ; \\theta ) ) ^ { 2 } \\right] } \\end{array}$ . The two baseline works on robust training for RL agents [18, 17] use more advanced versions than vanilla ",
280
+ "bbox": [
281
+ 174,
282
+ 810,
283
+ 825,
284
+ 911
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "DQN including Dueling-DQN [29] and Double-DQN [30]. Double-DQN uses two Q-networks to evaluate target value $Q _ { \\mathrm { t a r g e t } }$ and the one being trained $Q \\mathrm { { a c t o r } }$ , with $\\theta _ { \\mathrm { a c t o r } }$ being optimized by minimizing the loss ${ \\mathcal { L } } ( \\theta _ { \\mathrm { a c t o r } } )$ : ",
291
+ "bbox": [
292
+ 174,
293
+ 90,
294
+ 825,
295
+ 135
296
+ ],
297
+ "page_idx": 3
298
+ },
299
+ {
300
+ "type": "equation",
301
+ "img_path": "images/60ad0226c345d356cd0bff991adabcb0aa0a7227d27223d42618b61a82c99386.jpg",
302
+ "text": "$$\n\\mathcal { L } ( \\theta _ { \\mathrm { a c t o r } } ) = \\mathbb { E } _ { ( s , a , s ^ { \\prime } , r ) } \\Big [ ( r + \\gamma \\operatorname* { m a x } _ { a ^ { \\prime } } Q _ { \\mathrm { t a r g e t } } ( s ^ { \\prime } , a ^ { \\prime } ; \\theta _ { \\mathrm { t a r g e t } } ) - Q _ { \\mathrm { a c t o r } } ( s , a ; \\theta _ { \\mathrm { a c t o r } } ) ) ^ { 2 } \\Big ] .\n$$",
303
+ "text_format": "latex",
304
+ "bbox": [
305
+ 240,
306
+ 140,
307
+ 756,
308
+ 167
309
+ ],
310
+ "page_idx": 3
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Dueling-DQN improves DQN by splitting Q-values into the value of the state $V _ { Q } ( s )$ and advantage $A _ { Q } ( s , a )$ calculated by different output layers such that $Q ( s , a ) = V _ { Q } ( s ) + A _ { Q } ( \\stackrel { . } { s } , \\stackrel { . } { a } )$ . ",
315
+ "bbox": [
316
+ 173,
317
+ 175,
318
+ 826,
319
+ 204
320
+ ],
321
+ "page_idx": 3
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "Asynchronous Advantage Actor Critic (A3C) [15]. A3C uses neural networks to learn a policy function $\\pi ( a | s ; \\theta )$ and a state-value function $V ( s ; \\theta _ { v } )$ . Here the policy network $\\pi ( a | s ; \\theta )$ determines which action to take, and value function evaluates how good each state is. To update the network $( \\theta , \\theta _ { v } )$ antage function, with hyperparam $A _ { t }$ ,r s defined as . The networ $A _ { t } ( s _ { t } , a _ { t } ; \\theta , \\theta _ { v } ) \\ =$ $\\begin{array} { r } { \\sum _ { i = 0 } ^ { k - 1 } \\gamma ^ { i } r _ { t + i } + \\gamma ^ { k } V ( s _ { t + k } ; \\theta _ { v } ) - V ( s _ { t } ; \\theta _ { v } ) } \\end{array}$ $k$ $( \\theta , \\theta _ { v } )$ are learned by minimizing the following loss function: ",
326
+ "bbox": [
327
+ 173,
328
+ 209,
329
+ 825,
330
+ 296
331
+ ],
332
+ "page_idx": 3
333
+ },
334
+ {
335
+ "type": "equation",
336
+ "img_path": "images/f96f54cc4f586e88bf6380cd70c21aebb761f322ee9a3a3ec1937bddaeaa7e04.jpg",
337
+ "text": "$$\n\\begin{array} { r } { \\boldsymbol { \\mathcal { L } } ( \\boldsymbol { \\theta } , \\boldsymbol { \\theta } _ { v } ) = \\mathbb { E } _ { ( s _ { t } , a _ { t } , r _ { t } ) } \\left[ \\boldsymbol { A } _ { t } ^ { 2 } - \\boldsymbol { A } _ { t } \\log \\pi ( \\boldsymbol { a } _ { t } ) - \\boldsymbol { \\beta } \\boldsymbol { \\mathcal { H } } ( \\boldsymbol { \\pi } ) \\right] , } \\end{array}\n$$",
338
+ "text_format": "latex",
339
+ "bbox": [
340
+ 320,
341
+ 301,
342
+ 676,
343
+ 321
344
+ ],
345
+ "page_idx": 3
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "where the first term optimizes the value function, second optimizes policy function and last term encourages exploration by rewarding high entropy $\\mathcal { H }$ of the policy with scaling parameter $\\beta$ . ",
350
+ "bbox": [
351
+ 176,
352
+ 327,
353
+ 821,
354
+ 356
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "Proximal Policy Optimization (PPO) [16]. PPO is a critic based policy-gradient method similar to A3C, that works for off-policy updates unlike A3C. ",
361
+ "bbox": [
362
+ 173,
363
+ 369,
364
+ 821,
365
+ 398
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "PPO uses the clipping function on the ratio of action probabilities to constrain the difference between new and old policy. The resulting objective function is ",
372
+ "bbox": [
373
+ 171,
374
+ 404,
375
+ 823,
376
+ 433
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "equation",
382
+ "img_path": "images/f543c1b61e0899b8d3a54a1848051adef540eca0441210a99527da02dc8933ba.jpg",
383
+ "text": "$$\n\\mathcal { L } ( \\theta ) = \\mathbb { E } _ { ( s _ { t } , a _ { t } , r _ { t } ) } \\left[ - \\operatorname* { m i n } ( \\frac { \\pi ( a _ { t } | s _ { t } ; \\theta ) } { \\pi ( a _ { t } | s _ { t } ; \\theta _ { \\mathrm { o l d } } ) } A _ { t } , \\mathrm { c l i p } ( \\frac { \\pi ( a _ { t } | s _ { t } ; \\theta ) } { \\pi ( a _ { t } | s _ { t } ; \\theta _ { \\mathrm { o l d } } ) } , 1 - \\eta , 1 + \\eta ) A _ { t } ) \\right] ,\n$$",
384
+ "text_format": "latex",
385
+ "bbox": [
386
+ 223,
387
+ 439,
388
+ 772,
389
+ 474
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "where $\\eta$ is a hyper-parameter and $A _ { t }$ is an estimate of the advantage function at timestep $t$ . In addition, PPO usually includes a term minimizes loss of the value function and rewarding entropy of the policy similar to A3C. ",
396
+ "bbox": [
397
+ 174,
398
+ 479,
399
+ 825,
400
+ 522
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "3 A Robust Deep RL framework with adversarial loss ",
407
+ "text_level": 1,
408
+ "bbox": [
409
+ 174,
410
+ 541,
411
+ 638,
412
+ 559
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "In this section, we propose RADIAL (Robust ADversarIAl Loss)-RL, a principled framework for training deep RL agents robust against adversarial attacks. RADIAL designs adversarial loss functions by leveraging existing neural network robustness formal verification bounds. We first introduce the key idea of RADIAL and then elucidate a few ways to formulate adversarial loss for the three classical deep reinforcement learning algorithms, DQN, A3C and PPO in Sections 3.1, 3.2 and 3.3. In Section 3.4, we propose a novel evaluation metric, Greedy Worst-Case Reward (GWC), to efficiently assess agent’s robustness against input perturbations. ",
419
+ "bbox": [
420
+ 173,
421
+ 571,
422
+ 826,
423
+ 671
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "Main idea. The training loss of the RADIAL framework, $\\mathcal { L } _ { \\mathrm { R A D I A L } }$ , consists of two terms: ",
430
+ "bbox": [
431
+ 171,
432
+ 684,
433
+ 774,
434
+ 700
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "equation",
440
+ "img_path": "images/ee80cc1c070551c37af49cd7258948e82c4a1ab254f87fbf32791fd2522fc050.jpg",
441
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { R A D I A L } } = \\kappa \\mathcal { L } _ { \\mathrm { n o m } } + ( 1 - \\kappa ) \\mathcal { L } _ { \\mathrm { a d v } } ,\n$$",
442
+ "text_format": "latex",
443
+ "bbox": [
444
+ 385,
445
+ 705,
446
+ 611,
447
+ 723
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "where ${ \\mathcal { L } } _ { \\mathrm { n o m } }$ denotes the nominal loss function such as Eqs. (1)-(3) for nominal (standard) deep RL agents, and ${ \\mathcal { L } } _ { \\mathrm { a d v } }$ denotes the adversarial loss which we will design carefully to account for adversarial perturbations. $\\kappa$ is a hyperparameter controlling the trade-off between standard performance and robust performance with value between 0 and 1, and note that standard RL training algorithms have $\\kappa = 1$ throughout the full training process. Here we propose two principled approaches to construct ${ \\mathcal { L } } _ { \\mathrm { a d v } }$ both via the neural network robustness certification bounds [14, 12, 13, 11, 31, 32, 33, 34]: ",
454
+ "bbox": [
455
+ 174,
456
+ 729,
457
+ 825,
458
+ 814
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "#1. Construct an strict upper bound of the perturbed standard loss (Eq (9), (10), (7)); #2. Design a regularizer to minimize overlap between output bounds of actions with large difference in outcome (Eq (5), (6)). ",
465
+ "bbox": [
466
+ 200,
467
+ 824,
468
+ 825,
469
+ 873
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "The Approach #1 is well-motivated as minimizing a strict upper bound of the perturbed standard loss usually also decreases the true perturbed standard loss, which indicates the policy should perform well under adversarial perturbations. Alternatively, Approach $\\# 2$ is motivated by the idea that we want to avoid choosing a significantly worse action because of a small input perturbation. ",
476
+ "bbox": [
477
+ 174,
478
+ 882,
479
+ 821,
480
+ 911
481
+ ],
482
+ "page_idx": 3
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "",
487
+ "bbox": [
488
+ 173,
489
+ 90,
490
+ 823,
491
+ 119
492
+ ],
493
+ "page_idx": 4
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "The foundation of both Approach #1 and $\\# 2$ lies in the robustness formal verification tools to derive output bounds of neural networks under input perturbations. Specifically, for a given neural network, suppose $z _ { i } ( x )$ is the activation of the $i$ th layer of a neural network with input $x$ . The goal of a robustness verification algorithm is to compute layer-wise lower and upper bounds of the neural network, denoted as $\\underline { { z } } _ { i } ( x , \\epsilon )$ and $\\overline { { z } } _ { i } ( x , \\epsilon )$ , such that $\\underline { { z } } _ { i } ( x , \\epsilon ) \\leq z _ { i } ( x + \\delta ) \\leq \\overline { { z _ { i } } } ( x , \\epsilon )$ , for any additive input perturbation $\\delta$ on $x$ with $| | \\delta | | _ { p } \\leq \\epsilon$ . We will apply robustness verification algorithms on the Q-networks (for DQN) or policy networks (for A3C and PPO) to get layer-wise output bounds of $Q$ and $\\pi$ . These output bounds can be used to calculate an upper bound of the original loss function under worst-case adversarial perturbation ${ \\mathcal { L } } _ { \\mathrm { a d v } }$ for Approach #1. Similarly, the layer-wise bound is used to minimize the overlap of output intervals as proposed in Approach $\\# 2$ . For the purpose of training efficiency, IBP [14] is used to compute the layer-wise bounds for the neural networks, but other differentiable certification methods [12, 13, 11, 31, 32, 33] could be applied directly (albeit may incur additional computation cost). Our experiments focus on $p = \\infty$ to compare with baselines but the methodology works for general $p$ . ",
498
+ "bbox": [
499
+ 173,
500
+ 125,
501
+ 825,
502
+ 319
503
+ ],
504
+ "page_idx": 4
505
+ },
506
+ {
507
+ "type": "text",
508
+ "text": "3.1 RADIAL-DQN ",
509
+ "text_level": 1,
510
+ "bbox": [
511
+ 174,
512
+ 333,
513
+ 318,
514
+ 349
515
+ ],
516
+ "page_idx": 4
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "For Dueling-DQN, the advantage function $A _ { Q }$ is used to decide which action to take and the value function $V _ { Q }$ is only important for training. Hence, we only need to make $A _ { Q }$ robust and the Q function is lower and upper bounded by $\\underline { { Q } } ( s , a , \\epsilon ) = V _ { Q } ( s ) + \\underline { { A _ { Q } } } ( s , a , \\epsilon )$ and $\\overline { { { Q } } } ( s , a , \\epsilon ) = V _ { Q } ( s ) + \\overline { { { A _ { Q } } } } ( s , a , \\epsilon )$ with $\\epsilon$ -bounded perturbations to input $s$ . In RADIAL we proposde two approaches to derive the adversarial loss ${ \\mathcal { L } } _ { \\mathrm { a d v } }$ ; however, due to the space constraints, we describe the approach that has better empirical performance in the main text, and leave the other in the Appendix. ",
521
+ "bbox": [
522
+ 173,
523
+ 359,
524
+ 825,
525
+ 448
526
+ ],
527
+ "page_idx": 4
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "For DQN, we find that Approach $\\# 2$ performs better. The goal of Approach #2 is to minimize the weighted overlap of activation bounds for different actions (Fig. 2). The idea is to minimize only what is necessary for robust performance, overlap. If there is no overlap, the original action’s Q-value is guaranteed to be higher than others even under perturbation, so the agent won’t change it’s behavior under perturbation. However not all overlap is equally important. If two actions have a very similar $\\mathrm { Q }$ -value, overlap is acceptable, as taking a different but equally good action under perturbation is not a problem. To address this we added weighting by $Q _ { \\mathrm { d i f f } }$ , which helps by multiplying overlaps with similar Q-values by a small number and overlaps with different Q-values by a large number. ",
532
+ "bbox": [
533
+ 173,
534
+ 453,
535
+ 825,
536
+ 565
537
+ ],
538
+ "page_idx": 4
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "The final loss loss function is as follows: ",
543
+ "bbox": [
544
+ 176,
545
+ 570,
546
+ 441,
547
+ 585
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "equation",
553
+ "img_path": "images/33c317fca69d8030101ff07179f67cd136e0e6baf7037510f03ea4b73724c03d.jpg",
554
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { a d v } } ( \\theta _ { \\mathrm { a c t o r } } , \\epsilon ) = \\mathbb { E } _ { ( s , a , s ^ { \\prime } , r ) } [ \\sum _ { y } Q _ { \\mathrm { d i f f } } ( s , y ) \\cdot O v l ( s , y , \\epsilon ) ]\n$$",
555
+ "text_format": "latex",
556
+ "bbox": [
557
+ 316,
558
+ 583,
559
+ 681,
560
+ 617
561
+ ],
562
+ "page_idx": 4
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "where ",
567
+ "bbox": [
568
+ 174,
569
+ 619,
570
+ 215,
571
+ 632
572
+ ],
573
+ "page_idx": 4
574
+ },
575
+ {
576
+ "type": "equation",
577
+ "img_path": "images/8d9b46786e65355b698ac95a9a7d933826cf416ff605fb04599ef28fddeefd7c.jpg",
578
+ "text": "$$\nQ _ { \\mathrm { d i f f } } ( s , y ) = \\operatorname* { m a x } ( 0 , Q ( s , a ) - Q ( s , y ) ) , \\quad O v l ( s , y , \\epsilon ) = \\operatorname* { m a x } ( 0 , \\overline { { Q } } ( s , y , \\epsilon ) - \\underline { { Q } } ( s , a , \\epsilon ) + \\eta )\n$$",
579
+ "text_format": "latex",
580
+ "bbox": [
581
+ 187,
582
+ 633,
583
+ 808,
584
+ 654
585
+ ],
586
+ "page_idx": 4
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "$\\eta = 0 . 5 \\cdot Q _ { \\mathrm { d i f f } } ( s , y )$ and $a$ is the action taken. Here $O v l$ represents the overlap between the bounds of two actions (grey region in Fig 2). To promote additional robustness, the network is incentivized to have a margin $\\eta$ (rather than simply no overlaps). We set $\\eta = 0 . 5 \\cdot Q _ { \\mathrm { d i f f } }$ to have it be half of the maximum margin attainable. See Appendix $\\mathrm { F }$ for experiments and discussion on the importance of this choice for margin. Note that $Q _ { \\mathrm { d i f f } }$ is treated as a constant (no gradient) for the optimization. Eq. (5) reduces to zero when $\\epsilon = 0$ . ",
591
+ "bbox": [
592
+ 173,
593
+ 661,
594
+ 825,
595
+ 746
596
+ ],
597
+ "page_idx": 4
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "3.2 RADIAL-A3C ",
602
+ "text_level": 1,
603
+ "bbox": [
604
+ 174,
605
+ 760,
606
+ 313,
607
+ 775
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "In A3C, as the value network $V$ and entropy $\\mathcal { H }$ are only used to help training, we will use the unperturbed form of the approximated advantage $A _ { t } \\big ( s _ { t } , a _ { t } ; \\theta , \\theta _ { v } \\big )$ and entropy $\\mathcal { H }$ and focus on designing a robust policy network $\\pi$ in RADIAL-A3C. As the Approach $\\# 2$ is more effective in our experiments, we focus on describing Approach $\\# 2$ here and leave Approach #1 in the Appendix $\\mathbf { B }$ . The idea of Approach $\\# 2$ for A3C is very similar to DQN, except that the $\\mathrm { Q }$ -values are replaced by a combination of the policy outputs $\\pi$ and the pen-ultimate layer of the policy networks $z$ (before the softmax layer): ",
614
+ "bbox": [
615
+ 173,
616
+ 785,
617
+ 826,
618
+ 882
619
+ ],
620
+ "page_idx": 4
621
+ },
622
+ {
623
+ "type": "equation",
624
+ "img_path": "images/1340647e19c98aa79c844a77ed6f9d36272b17257f140baca08eb2fe1f8096ff.jpg",
625
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { a d v } } ( \\theta _ { \\mathrm { a c t o r } } , \\epsilon ) = \\mathbb { E } _ { ( s , a , s ^ { \\prime } , r ) } [ \\sum _ { y } \\pi _ { \\mathrm { d i f f } } ( s , y ) \\cdot O v l ( s , y , \\epsilon ) ]\n$$",
626
+ "text_format": "latex",
627
+ "bbox": [
628
+ 318,
629
+ 881,
630
+ 679,
631
+ 915
632
+ ],
633
+ "page_idx": 4
634
+ },
635
+ {
636
+ "type": "image",
637
+ "img_path": "images/6c9e9d36358ef5d3e304ac88c13e30f6b9509dfe8e774585db0bf8244ffaad53.jpg",
638
+ "image_caption": [
639
+ "Figure 2: Visualizing $L _ { \\mathrm { a d v } }$ for RADIAL-DQN (Approach #2) in a simple case with 2 actions. "
640
+ ],
641
+ "image_footnote": [],
642
+ "bbox": [
643
+ 186,
644
+ 98,
645
+ 464,
646
+ 276
647
+ ],
648
+ "page_idx": 5
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "Algorithm 1: Greedy Worst-Case Reward ",
653
+ "text_level": 1,
654
+ "bbox": [
655
+ 524,
656
+ 109,
657
+ 799,
658
+ 123
659
+ ],
660
+ "page_idx": 5
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "$\\overline { { R = 0 } }$ \nwhile $s _ { t }$ not terminal do 1. Calculate $\\pi _ { i } ( s _ { t } , \\theta )$ , $\\underline { { \\pi } } _ { i } ( s _ { t } , \\epsilon ; \\theta )$ and $\\overline { { \\pi } } _ { i } ( s _ { t } , \\epsilon ; \\theta )$ for each action $i$ 2. Calculate set of possible actions $\\Gamma : = \\{ i | \\overline { { \\pi } } _ { i } \\geq \\operatorname* { m a x } _ { j } ( \\underline { { \\pi } } _ { j } ) \\}$ 3. Take the \"worst\" action $k$ out of the possible actions, $k = \\mathrm { a r g m i n } _ { i \\in \\Gamma } ( \\pi _ { i } ( s _ { t } , \\theta ) )$ . Observe $r _ { t }$ and $s _ { t + 1 }$ and update $R \\gets R + r _ { t }$ 4. $t = t + 1$ \nend \nreturn $R$ ",
665
+ "bbox": [
666
+ 522,
667
+ 127,
668
+ 802,
669
+ 304
670
+ ],
671
+ "page_idx": 5
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "with $\\pi _ { \\operatorname { d i f f } } ( s , y ) = \\operatorname* { m a x } ( 0 , \\pi ( s , a ) - \\pi ( s , y ) )$ and $O v l ( s , y , \\epsilon ) = \\operatorname* { m a x } ( 0 , \\overline { { z } } ( s , y , \\epsilon ) - \\underline { { z } } ( s , a , \\epsilon ) + \\eta )$ Where $\\eta = 0 . 5 \\cdot z _ { \\mathrm { d i f f } } ( s , y )$ and $z _ { \\mathrm { d i f f } } ( s , y ) = \\operatorname* { m a x } ( 0 , z ( s , a ) - z ( s , y ) )$ . ",
676
+ "bbox": [
677
+ 173,
678
+ 347,
679
+ 825,
680
+ 377
681
+ ],
682
+ "page_idx": 5
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "3.3 RADIAL-PPO ",
687
+ "text_level": 1,
688
+ "bbox": [
689
+ 174,
690
+ 391,
691
+ 316,
692
+ 406
693
+ ],
694
+ "page_idx": 5
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "For RADIAL-PPO, we use Approach #1 as Approach $\\# 2$ does not work for continuous actions(discussion in Appendix C). In RADIAL-PPO, we only calculate bounds over current policy output, because the experiences are generated by sampling from unperturbed old policy, and value function/advantage are only used during training. The intuition for Approach #1 is to derive an upper bound of the RHS of Eqn. 3 which will always hold. ",
699
+ "bbox": [
700
+ 173,
701
+ 417,
702
+ 825,
703
+ 487
704
+ ],
705
+ "page_idx": 5
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "$\\forall s _ { t } \\in S , \\forall | | \\delta | | _ { p } \\leq \\epsilon \\ ; \\mathcal { L } ( \\theta , s _ { t } + \\delta ) \\leq \\mathcal { L } _ { \\mathrm { a d v } } ( \\theta , s _ { t } , \\epsilon )$ . Minimizing this upper bound will then also decrease the loss under perturbation. In practice optimizing this loss function results in increasing the lower bound of the probability of taking good actions $( A _ { t } \\geq 0 )$ ), and decreasing the upper bound of the probability to take bad actions $( A _ { t } < 0 )$ ). ",
710
+ "bbox": [
711
+ 173,
712
+ 492,
713
+ 825,
714
+ 549
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "The mathematical definition of ${ \\mathcal { L } } _ { \\mathrm { a d v } }$ is the following: ",
721
+ "bbox": [
722
+ 174,
723
+ 554,
724
+ 521,
725
+ 570
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "equation",
731
+ "img_path": "images/a65430ac47d8d19456c9232e2055935426825b5e86ec57fb3f48aeae22d72438.jpg",
732
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { a d v } } ( \\theta , \\epsilon ) = \\mathbb { E } _ { ( s _ { t } , a _ { t } , r _ { t } ) } \\left[ - \\operatorname* { m i n } ( \\frac { \\hat { \\pi } ( a _ { t } | s _ { t } , \\epsilon ; \\theta ) } { \\pi ( a _ { t } | s _ { t } ; \\theta _ { \\mathrm { o l d } } ) } A _ { t } , \\mathrm { c l i p } ( \\frac { \\hat { \\pi } ( a _ { t } | s _ { t } , \\epsilon ; \\theta ) } { \\pi ( a _ { t } | s _ { t } ; \\theta _ { \\mathrm { o l d } } ) } , 1 - \\eta , 1 + \\eta ) A _ { t } ) \\right] .\n$$",
733
+ "text_format": "latex",
734
+ "bbox": [
735
+ 210,
736
+ 575,
737
+ 784,
738
+ 609
739
+ ],
740
+ "page_idx": 5
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "The worst-case policy is defined as: ",
745
+ "bbox": [
746
+ 174,
747
+ 621,
748
+ 408,
749
+ 636
750
+ ],
751
+ "page_idx": 5
752
+ },
753
+ {
754
+ "type": "equation",
755
+ "img_path": "images/0c60b2a8549c800f95ec7f3bb3600df305f8ffa629996b2c38a6ed507962e41c.jpg",
756
+ "text": "$$\n\\hat { \\pi } ( a _ { t } | s _ { t } , \\epsilon ; \\theta ) = \\left\\{ \\frac { \\pi ( a _ { t } | s _ { t } , \\epsilon ; \\theta ) , \\ \\mathrm { i f } \\ A _ { t } \\geq 0 } { \\pi ( a _ { t } | s _ { t } , \\epsilon ; \\theta ) , \\ \\mathrm { o t h e r w i s e } } \\right.\n$$",
757
+ "text_format": "latex",
758
+ "bbox": [
759
+ 352,
760
+ 642,
761
+ 643,
762
+ 678
763
+ ],
764
+ "page_idx": 5
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "For our continuous control experiments, the output of our policy are the parameters $\\mu , \\Sigma$ of a Gaussian, with covariance being diagonal and independent of input state $s$ . We can define bounds on distance $d$ : ",
769
+ "bbox": [
770
+ 171,
771
+ 690,
772
+ 825,
773
+ 719
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "d $\\begin{array} { r l } & { \\mathfrak { l } ( a _ { t } , s _ { t } , \\epsilon ) = \\operatorname* { m a x } _ { \\mu \\in \\{ \\underline { { \\mu } } , \\vec { \\mu } \\} } ( a _ { t } - \\mu ) ^ { T } \\Sigma ^ { - 1 } ( a _ { t } - \\mu ) , \\underline { { d } } ( a _ { t } , s _ { t } , \\epsilon ) = \\operatorname* { m i n } _ { \\mu \\in [ \\underline { { \\mu } } , \\vec { \\mu } ] } ( a _ { t } - \\mu ) ^ { T } \\Sigma ^ { - 1 } ( a _ { t } - \\mu ) } \\\\ & { \\mathrm { ~ h e n ~ } \\overline { { \\pi } } ( a _ { t } | s _ { t } , \\epsilon ; \\theta ) = \\frac { e ^ { - \\frac { d } { d } / 2 } } { ( ( 2 \\pi ) ^ { k } \\operatorname* { d e t } \\Sigma ) ^ { 0 . 5 } } \\mathrm { ~ a n d ~ } \\underline { { \\pi } } ( a _ { t } | s _ { t } , \\epsilon ; \\theta ) = \\frac { e ^ { - \\overline { { d } } / 2 } } { ( ( 2 \\pi ) ^ { k } \\operatorname* { d e t } \\Sigma ) ^ { 0 . 5 } } \\cdot \\mathrm { ~ W h e r e ~ } k \\mathrm { ~ i s ~ t h e ~ n u m b e r ~ o f ~ } } \\end{array}$ dimensions in the action space. ",
780
+ "bbox": [
781
+ 173,
782
+ 723,
783
+ 830,
784
+ 780
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "For discrete action, $\\pi$ is a categorical distribution over possible actions, where $\\overline { { \\pi } } ( a _ { t } )$ is the upper bound of the policy network $\\pi$ at $a _ { t }$ -th output. This can be computed from the upper bound of $a _ { t }$ -th logit(output before softmax) and lower bound of other logits by applying softmax. ",
791
+ "bbox": [
792
+ 173,
793
+ 785,
794
+ 825,
795
+ 829
796
+ ],
797
+ "page_idx": 5
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "3.4 New efficient evaluation metric: Greedy Worst-Case Reward ",
802
+ "text_level": 1,
803
+ "bbox": [
804
+ 174,
805
+ 843,
806
+ 635,
807
+ 859
808
+ ],
809
+ "page_idx": 5
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "The goal of training RL agents robust against input perturbations is to ensure that the agents could still perform well under any (bounded) adversarial perturbations. This can be translated into maximizing the worst-case reward $R _ { w c }$ , which is the reward under worst possible sequence of adversarial attacks. ",
814
+ "bbox": [
815
+ 174,
816
+ 869,
817
+ 825,
818
+ 911
819
+ ],
820
+ "page_idx": 5
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "We define $R _ { w c }$ as follows: $\\begin{array} { r } { R _ { w c } = \\operatorname* { m i n } _ { | | \\delta _ { t } | | _ { p } \\leq \\epsilon } \\mathbb { E } _ { \\tau } [ R ( \\tau ) ] } \\end{array}$ with trajectory $\\tau = ( s _ { 0 } , a _ { 0 } , . . . , s _ { T } , a _ { T } )$ where $a _ { t } , s _ { t } , r _ { t }$ are drawn from $\\pi ( s _ { t } + \\delta _ { t } ) , { \\mathcal { P } } ( s _ { t - 1 } , a _ { t - 1 } ) ,$ $\\mathscr { R } ( s _ { t - 1 } , a _ { t - 1 } )$ respectively, and $R ( \\tau ) =$ $\\textstyle \\sum _ { t } r _ { t }$ . One idea is to evaluate every possible trajectory $\\tau$ to find which one produces the minimal reward. However $R _ { w c }$ is practically impossible to evaluate, as finding the worst perturbations $\\delta _ { t }$ of a set of possible actions $a _ { t }$ for each state $s _ { t }$ is NP-hard, and the amount of trajectories to evaluate grows exponentially with respect to trajectory length $T$ , which is hard to compute. One possible way to avoid finding worst-case perturbations directly is to use certified output bounds [12, 13, 11, 31, 32, 33], which produces a superset of all possible actions under worst-case perturbations and hence the resulting total accumulative reward is a lower bound of $R _ { w c }$ . We name this reward as Absolute Worst-Case Reward (AWC). Note that AWC is a lower bound of $R _ { w c }$ when both the policy and environment are deterministic. ",
825
+ "bbox": [
826
+ 174,
827
+ 90,
828
+ 825,
829
+ 244
830
+ ],
831
+ "page_idx": 6
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "However, AWC still requires evaluating an exponential amount of possible action sequences, which is computationally expensive. To overcome this limitation, we propose an alternative evaluation method called Greedy Worst-Case Reward (GWC) in Algorithm 1, which approximates the desired $R _ { w c }$ and can be computed efficiently with a linear complexity of total timesteps $T$ . The idea of GWC is to avoid evaluating exponential numbers of trajectories and use a simple heuristic to approximate $R _ { w c }$ by choosing the action with lowest Q-value (or the probability of action taken for A3C) greedily at each state. We show in Fig 4 (in Appendix E) that GWC is often close to AWC while being much faster to evaluate (linear complexity of total time steps). Discussion about metrics used in baseline works [17, 18] and full description of the algorithm for computing AWC is in Appendix D. ",
836
+ "bbox": [
837
+ 174,
838
+ 251,
839
+ 825,
840
+ 376
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "4 Experimental results ",
847
+ "text_level": 1,
848
+ "bbox": [
849
+ 176,
850
+ 395,
851
+ 380,
852
+ 412
853
+ ],
854
+ "page_idx": 6
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "Environments and setup To have a fair comparison with baseline works [17, 18], we experiment on the same Atari-2600 environment [35] and same 4 games used in [17, 18]. Different from [17, 18], we further evaluate our algorithm on a more challenging ProcGen [36] benchmark, which allows us to test generalization abilities of the agent. Note that both Atari-games and ProcGen [36] benchmark have high dimensional pixel inputs and discrete action spaces. To compare our RL agents with continuous actions with [17], we use the MuJoCo environment which simulates robotic control and has relatively low-dimensional inputs and a continuous action space. Full training details and hyperparameter settings are available in Appendix H. ",
859
+ "bbox": [
860
+ 174,
861
+ 426,
862
+ 825,
863
+ 537
864
+ ],
865
+ "page_idx": 6
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "Evaluation. We evaluate the performance of our agents with a total of 3 metrics: (a) total reward under 10-steps $l _ { \\infty }$ -PGD untargeted attack applied on every frame, (b) GWC and (c) Action Certification Rate (ACR)[17]. For Atari games the result of Approach #2 for RADIAL-agents are in Table 1, and the results of Approach #1 are in Appendix I. Note that A3C and PPO take actions stochastically during training but we set them to deterministically choose the action that has the highest probability during evaluation. ",
870
+ "bbox": [
871
+ 174,
872
+ 544,
873
+ 825,
874
+ 627
875
+ ],
876
+ "page_idx": 6
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "4.1 Atari results ",
881
+ "text_level": 1,
882
+ "bbox": [
883
+ 174,
884
+ 643,
885
+ 299,
886
+ 659
887
+ ],
888
+ "page_idx": 6
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "Table 1 shows that RADIAL-DQN outperforms or matches all the baselines on all four games against $\\epsilon = 1 / 2 5 5$ PGD-attacks with the same evaluation method in [17]. The result suggests that RADIAL can train a robust policy against $\\epsilon = 1 / 2 5 5$ adversarial perturbations without sacrificing nominal performance. In fact, our robust RADIAL agents consistently outperform the baselines on all the evaluation metrics, with significant margin in RoadRunner. In addition to better rewards, our RADIAL-DQN is roughly $6 \\times$ faster to train than [17]. Experimentally if we include the standard training process, our total run time is only 17 hours compared to SA-DQN’s 35 hours on our hardware. RADIAL-A3C also achieves high rewards under adversarial attacks and beats the baselines on 2/4 tasks despite the games likely being chosen by previous work because they are easy for Q-learning agents. As shown in Table 1 (A3C is excluded because it did not learn Freeway), RADIAL-A3C reaches slightly lower nominal rewards than RADIAL-DQN but shows more robust performance against large perturbations, even outperforming RADIAL-DQN against $\\epsilon = 5 / 2 5 5$ PGD attacks on RoadRunner. This shows RADIAL works well for very different types of RL algorithms. ",
893
+ "bbox": [
894
+ 173,
895
+ 669,
896
+ 826,
897
+ 849
898
+ ],
899
+ "page_idx": 6
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "One interesting finding is that our A3C baseline actually performed well against small PGD-attacks even without robust training (the standard DQN models all perform terribly at $\\epsilon = 1 / 2 5 5$ while A3C has comparable or even better performance than the robust trained SA-DQN or RS-DQN.) We believe this is due to two main factors: (a) the network architecture is slightly different from DQN and uses Max-pooling layers, which naturally makes it more resistant against many small changes to input; (b) A3C training is more stochastic, so it is more resistant to occasional random actions caused by the untargeted attack. ",
904
+ "bbox": [
905
+ 176,
906
+ 856,
907
+ 823,
908
+ 911
909
+ ],
910
+ "page_idx": 6
911
+ },
912
+ {
913
+ "type": "table",
914
+ "img_path": "images/eb0684095f8c4ed42a4e1a770d041f72780f92f5e554e3b9d4a7c1b2ad90464e.jpg",
915
+ "table_caption": [],
916
+ "table_footnote": [
917
+ "Table 1: We report the mean reward of 20 runs as well as the standard error of the mean(sem). Best result boldfaced, results within a sem of the best result underlined. RADIAL-DQN outperforms all the baselines. All the robust models are trained with $\\epsilon = 1 / 2 5 5$ . RS-DQN results are N/A besides 1/255 PGD as the authors have not released code or models. "
918
+ ],
919
+ "table_body": "<table><tr><td></td><td>Model/metric</td><td>Nominal</td><td></td><td>PGD attack</td><td></td><td>GWC</td><td>ACR</td></tr><tr><td></td><td>E</td><td>0</td><td>1/255</td><td>3/255</td><td>5/255</td><td>1/255</td><td>1/255</td></tr><tr><td colspan=\"8\">BankHeist</td></tr><tr><td colspan=\"8\">Baselines:</td></tr><tr><td>Standard</td><td>DQN[17] A3C</td><td>1325.5±5.7 1109.0±21.4</td><td>29.5±2.4 1102.5±49.4</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.0±0.0 0.5±0.5</td><td>0.000 0.000</td></tr><tr><td>Robust</td><td>RS-DQN[18]</td><td>238.66</td><td>190.67</td><td>534.5±58.2 N/A</td><td>115.0±27.8 N/A</td><td>N/A</td><td>N/A</td></tr><tr><td></td><td>SA-DQN[17]</td><td>1237.6±1.7</td><td>1237.0±2.0</td><td>1213.0±2.5</td><td>1130.0±29.1</td><td>1196.5±9.4</td><td>0.976</td></tr><tr><td colspan=\"8\">Our Methods:</td></tr><tr><td></td><td>RADIAL-DQN</td><td>1349.5±1.7</td><td>1349.5±1.7</td><td>1348±1.7</td><td>1182.5±43.3</td><td>1344.5±1.8</td><td>0.981</td></tr><tr><td></td><td>RADIAL-A3C</td><td>1036.5±23.4</td><td>975±22.2</td><td>949±19.5</td><td>712±46.4</td><td>851.5±2.9</td><td>0.718</td></tr><tr><td colspan=\"8\">Freeway Baselines:</td></tr><tr><td colspan=\"8\"></td></tr><tr><td>Standard</td><td>DQN[17]</td><td>33.9±0.07</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.0±0.0</td><td>0.000</td></tr><tr><td>Robust</td><td>RS-DQN[18]</td><td>32.93</td><td>32.53</td><td>N/A</td><td>N/A</td><td>N/A</td><td>N/A</td></tr><tr><td></td><td>SA-DQN [17]</td><td>30.0±0.0</td><td>30.0±0.0</td><td>30.05±0.05</td><td>27.65±0.22</td><td>30.0±0.0</td><td>1.000</td></tr><tr><td colspan=\"8\">Our Methods:</td></tr><tr><td></td><td>RADIAL-DQN</td><td>33.2±0.19</td><td>33.35±0.16</td><td>33.4±0.13</td><td>29.1±0.17</td><td>33.25±0.24</td><td>0.998</td></tr><tr><td colspan=\"8\">Pong Baselines:</td></tr><tr><td colspan=\"8\"></td></tr><tr><td>Standard</td><td>DQN[17]</td><td>21.0±0.0</td><td>-21.0±0.0</td><td>-21.0±0.0</td><td>-20.85±0.08</td><td>-21.0±0.0</td><td>0.000</td></tr><tr><td>Robust</td><td>A3C</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>-17.85±0.33</td><td>-21.0±0.0</td><td>0.000</td></tr><tr><td></td><td>RS-DQN[18] SA-DQN[17]</td><td>19.73 21.0±0.0</td><td>18.13 21.0±0.0</td><td>N/A 21.0±0.0</td><td>N/A -19.75±0.1</td><td>N/A 21.0±0.0</td><td>N/A 1.000</td></tr><tr><td colspan=\"8\">Our Methods:</td></tr><tr><td></td><td></td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td></td></tr><tr><td></td><td>RADIAL-DQN RADIAL-A3C</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>21.0±0.0</td><td>0.894 0.755</td></tr><tr><td colspan=\"8\">RoadRunner</td></tr><tr><td colspan=\"8\">Standard</td></tr><tr><td></td><td>DQN[17] A3C</td><td>43390±973 34420±604</td><td>0.0±0.0 31040±2173</td><td>0.0±0.0 3025±317</td><td>0.0±0.0 350±93</td><td>0.0±0.0 0.0±0.0</td><td>0.000 0.000</td></tr><tr><td>Robust</td><td>RS-DQN[18]</td><td>12106.67</td><td>5753.33</td><td>N/A</td><td>N/A</td><td>N/A</td><td>N/A</td></tr><tr><td></td><td>SA-DQN [17]</td><td>45870±1380</td><td>44300±1753</td><td>20170±1822</td><td>3350±335</td><td>0.0±0.0</td><td>0.602</td></tr><tr><td colspan=\"8\">Our Methods:</td></tr><tr><td></td><td>RADIAL-DQN</td><td>44495±1165</td><td>44445±1148</td><td>39560±1621</td><td>23820±942</td><td>45770±1622</td><td>0.994</td></tr><tr><td></td><td>RADIAL-A3C</td><td>34825±981</td><td>31960±933</td><td>29920±1496</td><td>31545±1480</td><td>31885±1912</td><td>0.923</td></tr></table>",
920
+ "bbox": [
921
+ 174,
922
+ 87,
923
+ 826,
924
+ 561
925
+ ],
926
+ "page_idx": 7
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "",
931
+ "bbox": [
932
+ 174,
933
+ 651,
934
+ 823,
935
+ 694
936
+ ],
937
+ "page_idx": 7
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "Another interesting observation in our experiments across different algorithms and environments is that sometimes applying an attack or increasing the magnitude of PGD-attack increases the reward achieved. We note that this phenomenon is not unreasonable since the PGD attack is designed to simply change original actions of RL agent; it is possible and often even likely that original trajectory was not the best possible one and a different trajectory can give higher reward. We observed this phenomenon on Freeway for both SA-DQN and RADIAL-DQN (Table 1), and for RADIAL-PPO on CoinRun and Jumper (Table 2). We believe this indicates the weakness of untargeted PGD-attacks and highlights room for improvement of attacks on RL-policies. ",
942
+ "bbox": [
943
+ 174,
944
+ 713,
945
+ 825,
946
+ 825
947
+ ],
948
+ "page_idx": 7
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "4.2 ProcGen Results ",
953
+ "text_level": 1,
954
+ "bbox": [
955
+ 176,
956
+ 843,
957
+ 328,
958
+ 857
959
+ ],
960
+ "page_idx": 7
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "We report our results on 3 environments on the ProcGen benchmark [36] in Table 2. To our best knowledge, it is the first evaluation of robustness of RL-agents trained on ProcGen. All our agents were trained for 25M steps on the easy setting, trained on 200 different levels and evaluated on the full distribution. We used the IMPALA-CNN architecture [36], which is a significantly larger than the ones in our Atari experiments, but our algorithm and training setup can still successfully scale to this more complex setting. We notice like A3C, the original PPO-policy is already quite robust against small PGD-attacks, but RADIAL-PPO has even better robustness to much stronger attacks. Next, we use the train/evaluation split in levels to study whether our robust training generalizes to new environments. We observe that RADIAL training increases robustness consistently on both training and evaluation set, and the gap between training and evaluation results is often smaller for RADIAL-PPO. The results in Table 2 uses a deterministic version of the policy and the result of stochastic policy is reported in Appendix I. ",
965
+ "bbox": [
966
+ 174,
967
+ 869,
968
+ 823,
969
+ 911
970
+ ],
971
+ "page_idx": 7
972
+ },
973
+ {
974
+ "type": "table",
975
+ "img_path": "images/9e612535553db477a75e3961cd4396da78cd4fd95d3ced722f5e23df834d7edf.jpg",
976
+ "table_caption": [],
977
+ "table_footnote": [
978
+ "Table 2: Results on the ProcGen environments. Each model was evaluated for 1000 episodes on the training/evaluation set. Reported means together with standard error of the mean. "
979
+ ],
980
+ "table_body": "<table><tr><td>Env:</td><td>Model</td><td>Dist</td><td>Nominal</td><td>e=1/255 PGD</td><td>e=3/255PGD</td><td>e=5/255 PGD</td></tr><tr><td rowspan=\"4\">Fruitbot</td><td>PPO</td><td>Train</td><td>30.20±0.23</td><td>25.72 ± 0.33</td><td>15.56 ± 0.38</td><td>8.79 ± 0.35</td></tr><tr><td rowspan=\"2\">RADIAL-PPO</td><td>Eval</td><td>26.09 ± 0.33</td><td>22.53 ± 0.38</td><td>13.51 ± 0.39</td><td>8.51 ± 0.35</td></tr><tr><td>Train</td><td>28.03±0.24</td><td>27.93 ± 0.25</td><td>27.84 ± 0.26</td><td>27.50 ± 0.26</td></tr><tr><td></td><td>Eval</td><td>26.08 ± 0.29</td><td>26.06 ± 0.30</td><td>25.87 ± 0.30</td><td>25.81 ± 0.30</td></tr><tr><td rowspan=\"4\">Coinrun</td><td rowspan=\"2\">PPO</td><td>Train</td><td>8.31± 0.12</td><td>6.36± 0.15</td><td>4.19 ± 0.16</td><td>3.32 ±0.15</td></tr><tr><td>Eval</td><td>6.65 ± 0.15</td><td>5.22 ± 0.16</td><td>3.58 ± 0.15</td><td>3.36 ± 0.15</td></tr><tr><td rowspan=\"2\">RADIAL-PPO</td><td>Train</td><td>7.12 ±0.14</td><td>7.10 ±0.14</td><td>7.19 ± 0.14</td><td>7.34± 0.14</td></tr><tr><td>Eval</td><td>6.66 ± 0.15</td><td>6.71 ± 0.15</td><td>6.71 ± 0.15</td><td>6.67 ± 0.15</td></tr><tr><td rowspan=\"4\">Jumper</td><td>PPO</td><td>Train</td><td>8.69± 0.11</td><td>6.61 ± 0.15</td><td>4.50 ± 0.16</td><td>3.42 ± 0.15</td></tr><tr><td rowspan=\"2\">RADIAL-PPO</td><td>Eval</td><td>4.22 ± 0.16</td><td>3.90 ± 0.15</td><td>3.10 ± 0.15</td><td>3.15 ± 0.15</td></tr><tr><td>Train</td><td>6.59 ± 0.15</td><td>6.70 ± 0.15</td><td>6.55 ± 0.15</td><td>6.83 ± 0.15</td></tr><tr><td></td><td>Eval</td><td>3.85 ± 0.15</td><td>3.93 ± 0.15</td><td>3.75 ± 0.15</td><td>3.59 ± 0.15</td></tr></table>",
981
+ "bbox": [
982
+ 233,
983
+ 88,
984
+ 766,
985
+ 271
986
+ ],
987
+ "page_idx": 8
988
+ },
989
+ {
990
+ "type": "table",
991
+ "img_path": "images/0c635eda1a4941cceb73e2da4eb0361f39f277096b8fd68e831e52a3d0fa1669.jpg",
992
+ "table_caption": [
993
+ "Table 3: We report the results of reward (mean $\\pm$ standard error of the mean) for each agent in MuJoCo continuous control tasks. Agents are trained for 4096k steps and evaluated for 50 episodes on the evaluation set. Results within standard error of the mean from best result underlined. "
994
+ ],
995
+ "table_footnote": [],
996
+ "table_body": "<table><tr><td>Environment</td><td>Model</td><td>Nominal e=0</td><td>e = 0.0375</td><td>Attack (MAD) e= 0.075</td><td>∈=0.15</td></tr><tr><td rowspan=\"3\">Walker2D (etrain = 0.075)</td><td>PPO</td><td>3635.3±50.7</td><td>1968.5±90.6</td><td>1283.1±61.9</td><td>670.3±31.9</td></tr><tr><td>SA-PPO [17]</td><td>3776.4±186.0</td><td>3923.6±189.9</td><td>3263.7±228.1</td><td>3652.1±203.3</td></tr><tr><td>RADIAL-PPO</td><td>5251.6±10.4</td><td>5108.4±67.9</td><td>4474.7±140.6</td><td>3895.3±128.3</td></tr><tr><td rowspan=\"3\">Hopper (etrain = 0.075)</td><td>PPO</td><td>2740.7±125.8</td><td>2034.4±126.9</td><td>1524.2±146.3</td><td>969.9±90.1</td></tr><tr><td>SA-PPO [17]</td><td>3585.0±56.4</td><td>3364.7±93.9</td><td>3165.1±107.1</td><td>2248.3±124.7</td></tr><tr><td>RADIAL-PPO</td><td>3737.5±4.4</td><td>3684.9±27.4</td><td>3252.1±101.9</td><td>2498.9±130.0</td></tr><tr><td rowspan=\"3\">Half Cheetah (etrain = 0.15)</td><td>PPO</td><td>5566.0±8.7</td><td>5517.8±8.8</td><td>5179.3±64.7</td><td>1483.6±193.4</td></tr><tr><td>SA-PPO [17]</td><td>4175.0±29.9</td><td>4168.8±29.9</td><td>4178.5±35.3</td><td>4173.1±31.8</td></tr><tr><td>RADIAL-PPO</td><td>4724.3±10.6</td><td>4629.7±36.9</td><td>4480.0±66.9</td><td>4008.5±119.5</td></tr></table>",
997
+ "bbox": [
998
+ 218,
999
+ 347,
1000
+ 779,
1001
+ 508
1002
+ ],
1003
+ "page_idx": 8
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "",
1008
+ "bbox": [
1009
+ 173,
1010
+ 609,
1011
+ 825,
1012
+ 734
1013
+ ],
1014
+ "page_idx": 8
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "4.3 MuJoCo Results ",
1019
+ "text_level": 1,
1020
+ "bbox": [
1021
+ 174,
1022
+ 767,
1023
+ 328,
1024
+ 782
1025
+ ],
1026
+ "page_idx": 8
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "In Table 3 we show our results on 3 environments from MuJoCo [37] and comparison with vanilla PPO method and SA-PPO [17] convex relaxation approach. We directly use the implementation from [17]. We train $4 0 9 6 \\mathrm { k \\Omega }$ steps for all 3 environments, whereas [17] uses roughly 2000k for Walker2D and Hopper. For each environment, we compare the performance under MAD attacks [17] with different \u000f. For Walker2D, we use training $\\epsilon = 0 . 0 7 5$ instead of $\\epsilon = 0 . 0 5$ from [17] for better comparison under different attacks. For Walker2D and Hopper, RADIAL-PPO outperforms SA-PPO [17] in both natural testing and robust testing. Interesting, for Half-Cheetah, we found this environment is naturally robust (even better than robust trained agents) against attack up to $\\scriptstyle \\epsilon = 0 . 0 7 5$ . ",
1031
+ "bbox": [
1032
+ 173,
1033
+ 800,
1034
+ 825,
1035
+ 911
1036
+ ],
1037
+ "page_idx": 8
1038
+ },
1039
+ {
1040
+ "type": "text",
1041
+ "text": "4.4 Evaluating GWC ",
1042
+ "text_level": 1,
1043
+ "bbox": [
1044
+ 174,
1045
+ 90,
1046
+ 333,
1047
+ 106
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "We show empirically that GWC is indeed a good approximation of AWC reward. We compare GWC and action certification rate (ACR) against the Absolute Worst-Case Reward (AWC) on a small scale experiments on reaching the first reward within 80 frames on Freeway due to the exponential complexity of AWC. Figure is available in Appendix D. GWC is the ratio of $+ 1$ rewards as measured by GWC, while AWC uses depth first search to compute the percentage of $+ 1$ rewards using Algorithm 2 (i.e. where all possible sequences of actions get at least $+ 1$ reward). For the episodes that we evaluated, GWC matched AWC perfectly for $\\epsilon \\in \\{ 1 . 0 , 1 . 2 , 1 . 5 \\}$ . Since AWC is a lower bound of GWC, for $\\epsilon \\in \\{ 1 . 3 , 1 . 4 \\}$ GWC matched AWC on 37/40 episodes, while overestimating on the $3 / 4 0$ ACR (as used in [17]) did not show as strong of a correlation with AWC. As evident in Table 1, GWC is a better indicator for the robust performance than ACR – this is the case for Freeway and Pong where SA-DQN has higher action certification rates but RADIAL-DQN has higher GWC and PGD rewards. Together these results give faith in GWC being a good evaluation method. ",
1054
+ "bbox": [
1055
+ 173,
1056
+ 116,
1057
+ 825,
1058
+ 282
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "5 Conclusions and Future works ",
1065
+ "text_level": 1,
1066
+ "bbox": [
1067
+ 176,
1068
+ 301,
1069
+ 460,
1070
+ 318
1071
+ ],
1072
+ "page_idx": 9
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "We have shown that using the proposed RADIAL framework can significantly improve the robustness of deep RL agents against adversarial perturbations based on robustness verification bounds – our robustly trained agents reach very good performance against even $5 \\times$ larger perturbations than previous state of the art, and in the meantime are much more computationally efficient to train. In addition, we have presented a new evaluation method, Greedy Worst-Case Reward, as a good surrogate of the worst-case reward to evaluate deep RL agent’s performance under adversarial input perturbations. Future works include extending our framework to defend against semantic perturbations such as contrast and brightness changes, which are more realistic on the vision-based RL agents (e.g. self-driving car, vision-based robots). ",
1077
+ "bbox": [
1078
+ 174,
1079
+ 332,
1080
+ 825,
1081
+ 457
1082
+ ],
1083
+ "page_idx": 9
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "6 Limitations and Potential negative impact ",
1088
+ "text_level": 1,
1089
+ "bbox": [
1090
+ 174,
1091
+ 476,
1092
+ 553,
1093
+ 492
1094
+ ],
1095
+ "page_idx": 9
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "An important limitation of our work and one that may cause negative impact in the future is that our work addresses only a specific axis of robustness, robustness against $l _ { p }$ -norm bounded perturbations. While there are ways to extend this, for example to semantic perturbation [28], other axes like robustness to changing environment conditions are not addressed by our method. We want to highlight common terms used in this field like certified defense and robustness may sound very convincing to a non-expert, but insufficient understanding of the limits of current robust training methods and overly relying on them presents pressing potential for negative social impact. ",
1100
+ "bbox": [
1101
+ 174,
1102
+ 507,
1103
+ 825,
1104
+ 603
1105
+ ],
1106
+ "page_idx": 9
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "Acknowledgement ",
1111
+ "text_level": 1,
1112
+ "bbox": [
1113
+ 176,
1114
+ 622,
1115
+ 330,
1116
+ 638
1117
+ ],
1118
+ "page_idx": 9
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "The authors would like to thank anonymous reviewers for valuable feedback to improve the manuscript. The authors thank MIT-IBM Watson AI lab and the MIT SuperUROP program for support in this work. T. Oikarinen and T.-W. Weng are supported by National Science Foundation under Grant No. 2107189. ",
1123
+ "bbox": [
1124
+ 174,
1125
+ 654,
1126
+ 826,
1127
+ 709
1128
+ ],
1129
+ "page_idx": 9
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "References ",
1134
+ "text_level": 1,
1135
+ "bbox": [
1136
+ 174,
1137
+ 728,
1138
+ 266,
1139
+ 744
1140
+ ],
1141
+ "page_idx": 9
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "[1] A. Krizhevsky, “Learning multiple layers of features from tiny images,” 2009. \n[2] S. Lai, L. Xu, K. Liu, and J. Zhao, “Recurrent convolutional neural networks for text classification,” in Twenty-ninth AAAI conference on artificial intelligence, 2015. \n[3] V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller, “Playing atari with deep reinforcement learning,” arXiv preprint arXiv:1312.5602, 2013. \n[4] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra, “Continuous control with deep reinforcement learning.,” in ICLR 2016. \n[5] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus, “Intriguing properties of neural networks,” in 2nd International Conference on Learning Representations, ICLR 2014. \n[6] S. Huang, N. Papernot, I. Goodfellow, Y. Duan, and P. Abbeel, “Adversarial attacks on neural network policies,” arXiv preprint arXiv:1702.02284, 2017. \n[7] Y.-C. Lin, Z.-W. Hong, Y.-H. Liao, M.-L. Shih, M.-Y. Liu, and M. Sun, “Tactics of adversarial attack on deep reinforcement learning agents,” in Proceedings of the 26th International Joint Conference on Artificial Intelligence, pp. 3756–3762, 2017. \n[8] T.-W. Weng, K. D. Dvijotham, J. Uesato, K. Xiao, S. Gowal, R. Stanforth, and P. Kohli, “Toward evaluating robustness of deep reinforcement learning with continuous control,” ICLR 2020. \n[9] F. Tramer, N. Carlini, W. Brendel, and A. Madry, “On adaptive attacks to adversarial example defenses,” Advances in Neural Information Processing Systems, vol. 33, 2020. \n[10] A. Raghunathan, J. Steinhardt, and P. Liang, “Certified defenses against adversarial examples,” ICLR 2018. \n[11] J. Z. Kolter and E. Wong, “Provable defenses against adversarial examples via the convex outer adversarial polytope,” ICML 2018. \n[12] L. Weng, H. Zhang, H. Chen, Z. Song, C.-J. Hsieh, L. Daniel, D. Boning, and I. Dhillon, “Towards fast computation of certified robustness for relu networks,” in International Conference on Machine Learning, pp. 5276–5285, PMLR, 2018. \n[13] G. Singh, T. Gehr, M. Mirman, M. Püschel, and M. Vechev, “Fast and effective robustness certification,” in NeurIPS 2018. \n[14] S. Gowal, K. Dvijotham, R. Stanforth, R. Bunel, C. Qin, J. Uesato, R. Arandjelovic, T. Mann, and P. Kohli, “On the effectiveness of interval bound propagation for training verifiably robust models,” arXiv preprint arXiv:1810.12715, 2018. \n[15] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu, “Asynchronous methods for deep reinforcement learning,” in International conference on machine learning, pp. 1928–1937, PMLR, 2016. \n[16] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, “Proximal policy optimization algorithms,” arXiv preprint arXiv:1707.06347, 2017. \n[17] H. Zhang, H. Chen, C. Xiao, B. Li, M. Liu, D. S. Boning, and C.-J. Hsieh, “Robust deep reinforcement learning against adversarial perturbations on state observations,” in NeurIPS 2020. \n[18] M. Fischer, M. Mirman, S. Stalder, and M. Vechev, “Online robustness training for deep reinforcement learning,” arXiv preprint arXiv:1911.00887, 2019. \n[19] I. J. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and harnessing adversarial examples,” ICLR 2015. \n[20] D. J. Mankowitz, N. Levine, R. Jeong, A. Abdolmaleki, J. T. Springenberg, Y. Shi, J. Kay, T. Hester, T. Mann, and M. Riedmiller, “Robust reinforcement learning for continuous control with model misspecification,” in International Conference on Learning Representations, 2020. \n[21] L. Pinto, J. Davidson, R. Sukthankar, and A. Gupta, “Robust adversarial reinforcement learning,” in Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2817– 2826, JMLR. org, 2017. \n[22] A. Gleave, M. Dennis, C. Wild, N. Kant, S. Levine, and S. Russell, “Adversarial policies: Attacking deep reinforcement learning,” in International Conference on Learning Representations, 2020. \n[23] I. Ilahi, M. Usama, J. Qadir, M. U. Janjua, A. Al-Fuqaha, D. T. Huang, and D. Niyato, “Challenges and countermeasures for adversarial attacks on deep reinforcement learning,” IEEE Transactions on Artificial Intelligence, 2021. \n[24] Y.-S. Wang, T.-W. Weng, and L. Daniel, “Verification of neural network control policy under persistent adversarial perturbation,” arXiv preprint arXiv:1908.06353, 2019. \n[25] J. Kos and D. Song, “Delving into adversarial attacks on deep policies,” arXiv preprint arXiv:1705.06452, 2017. \n[26] A. Pattanaik, Z. Tang, S. Liu, G. Bommannan, and G. Chowdhary, “Robust deep reinforcement learning with adversarial attacks,” in Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2040–2042, 2018. \n[27] B. Lütjens, M. Everett, and J. P. How, “Certified adversarial robustness for deep reinforcement learning,” in Conference on Robot Learning, pp. 1328–1337, PMLR, 2020. \n[28] J. Mohapatra, P.-Y. Chen, S. Liu, L. Daniel, et al., “Towards verifying robustness of neural networks against semantic perturbations,” CVPR 2020. \n[29] Z. Wang, T. Schaul, M. Hessel, H. Hasselt, M. Lanctot, and N. Freitas, “Dueling network architectures for deep reinforcement learning,” in International conference on machine learning, pp. 1995–2003, PMLR, 2016. \n[30] H. Van Hasselt, A. Guez, and D. Silver, “Deep reinforcement learning with double q-learning,” in Proceedings of the AAAI conference on artificial intelligence, vol. 30, 2016. \n[31] S. Wang, K. Pei, J. Whitehouse, J. Yang, and S. Jana, “Efficient formal safety analysis of neural networks,” in Advances in Neural Information Processing Systems, pp. 6367–6377, 2018. \n[32] H. Zhang, T.-W. Weng, P.-Y. Chen, C.-J. Hsieh, and L. Daniel, “Efficient neural network robustness certification with general activation functions,” in Advances in neural information processing systems, pp. 4939–4948, 2018. \n[33] A. Boopathy, T.-W. Weng, P.-Y. Chen, S. Liu, and L. Daniel, “Cnn-cert: An efficient framework for certifying robustness of convolutional neural networks,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 3240–3247, 2019. \n[34] V. Tjeng, K. Y. Xiao, and R. Tedrake, “Evaluating robustness of neural networks with mixed integer programming,” in International Conference on Learning Representations, 2018. \n[35] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling, “The arcade learning environment: An evaluation platform for general agents,” Journal of Artificial Intelligence Research, vol. 47, p. 253–279, Jun 2013. \n[36] K. Cobbe, C. Hesse, J. Hilton, and J. Schulman, “Leveraging procedural generation to benchmark reinforcement learning,” in International conference on machine learning, pp. 2048–2056, PMLR, 2020. \n[37] E. Todorov, T. Erez, and Y. Tassa, “Mujoco: A physics engine for model-based control,” in 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033, 2012. \n[38] H. Zhang, H. Chen, C. Xiao, S. Gowal, R. Stanforth, B. Li, D. Boning, and C.-J. Hsieh, “Towards stable and efficient training of verifiably robust neural networks,” in International Conference on Learning Representations, 2020. \n[39] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” in ICLR 2015. ",
1146
+ "bbox": [
1147
+ 181,
1148
+ 755,
1149
+ 828,
1150
+ 911
1151
+ ],
1152
+ "page_idx": 9
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "",
1157
+ "bbox": [
1158
+ 171,
1159
+ 75,
1160
+ 828,
1161
+ 915
1162
+ ],
1163
+ "page_idx": 10
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "",
1168
+ "bbox": [
1169
+ 171,
1170
+ 87,
1171
+ 828,
1172
+ 587
1173
+ ],
1174
+ "page_idx": 11
1175
+ }
1176
+ ]
parse/train/eaAM_bdW0Q/eaAM_bdW0Q_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/eaAM_bdW0Q/eaAM_bdW0Q_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1YNw6sxg/r1YNw6sxg.md ADDED
@@ -0,0 +1,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING VISUAL SERVOING WITH DEEP FEATURES AND FITTED Q-ITERATION
2
+
3
+ Alex X. Lee†, Sergey Levine†, Pieter Abbeel‡†§
4
+
5
+ † UC Berkeley, Department of Electrical Engineering and Computer Sciences
6
+ ‡ OpenAI
7
+ § International Computer Science Institute
8
+ {alexlee gk,svlevine,pabbeel}@cs.berkeley.edu
9
+
10
+ # ABSTRACT
11
+
12
+ Visual servoing involves choosing actions that move a robot in response to observations from a camera, in order to reach a goal configuration in the world. Standard visual servoing approaches typically rely on manually designed features and analytical dynamics models, which limits their generalization capability and often requires extensive application-specific feature and model engineering. In this work, we study how learned visual features, learned predictive dynamics models, and reinforcement learning can be combined to learn visual servoing mechanisms. We focus on target following, with the goal of designing algorithms that can learn a visual servo using low amounts of data of the target in question, to enable quick adaptation to new targets. Our approach is based on servoing the camera in the space of learned visual features, rather than image pixels or manually-designed keypoints. We demonstrate that standard deep features, in our case taken from a model trained for object classification, can be used together with a bilinear predictive model to learn an effective visual servo that is robust to visual variation, changes in viewing angle and appearance, and occlusions. A key component of our approach is to use a sample-efficient fitted Q-iteration algorithm to learn which features are best suited for the task at hand. We show that we can learn an effective visual servo on a complex synthetic car following benchmark using just 20 training trajectory samples for reinforcement learning. We demonstrate substantial improvement over a conventional approach based on image pixels or hand-designed keypoints, and we show an improvement in sample-efficiency of more than two orders of magnitude over standard model-free deep reinforcement learning algorithms. Videos are available at http://rll.berkeley.edu/visual_servoing.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Visual servoing is a classic problem in robotics that requires moving a camera or robot to match a target configuration of visual features or image intensities. Many robot control tasks that combine perception and action can be posed as visual servoing, including navigation (DeSouza & Kak, 2002; Chen et al., 2006), where a robot must follow a desired path; manipulation, where the robot must servo an end-effector or a camera to a target object to grasp or manipulate it (Malis et al., 1999; Corke, 1993; Hashimoto, 1993; Hosoda & Asada, 1994; Kragic & Christensen, 2002); and various other problems, as surveyed in Hutchinson et al. (1996). Most visual servoing methods assume access to good geometric image features (Chaumette & Hutchinson, 2006; Collewet et al., 2008; Caron et al., 2013) and require knowledge of their dynamics, which are typically obtained from domain knowledge about the system. Using such hand-designed features and models prevents exploitation of statistical regularities in the world, and requires manual engineering for each new system.
17
+
18
+ In this work, we study how learned visual features, learned predictive dynamics models, and reinforcement learning can be combined to learn visual servoing mechanisms. We focus on target following, with the goal of designing algorithms that can learn a visual servo using low amounts of data of the target in question, so as to be easy and quick to adapt to new targets. Successful target following requires the visual servo to tolerate moderate variation in the appearance of the target, including changes in viewpoint and lighting, as well as occlusions. Learning invariances to all such distractors typically requires a considerable amount of data. However, since a visual servo is typically specific to a particular task, it is desirable to be able to learn the servoing mechanism very quickly, using a minimum amount of data. Prior work has shown that the features learned by large convolutional neural networks on large image datasets, such as ImageNet classification (Deng et al., 2009), tend to be useful for a wide range of other visual tasks (Donahue et al., 2014). We explore whether the usefulness of such features extends to visual servoing.
19
+
20
+ To answer this question, we propose a visual servoing method that uses pre-trained features, in our case obtained from the VGG network (Simonyan & Zisserman, 2014) trained for ImageNet classification. Besides the visual features, our method uses an estimate of the feature dynamics in visual space by means of a bilinear model. This allows the visual servo to predict how motion of the robot’s camera will affect the perceived feature values. Unfortunately, servoing directly on the high-dimensional features of a pre-trained network is insufficient by itself to impart robustness on the servo: the visual servo must not only be robust to moderate visual variation, but it must also be able to pick out the target of interest (such as a car that the robot is tasked with following) from irrelevant distractor objects. To that end, we propose a sample-efficient fitted Q-iteration procedure that automatically chooses weights for the most relevant visual features. Crucially, the actual servoing mechanism in our approach is extremely simple, and simply seeks to minimize the Euclidean distance between the weighted feature values at the next time step and the target. The form of the servoing policy in our approach leads to an analytic and tractable linear approximator for the Qfunction, which leads to a computationally efficient fitted Q-iteration algorithm. We show that we can learn an effective visual servo on a complex synthetic car following benchmark using just 20 training trajectory samples for reinforcement learning. We demonstrate substantial improvement over a conventional approach based on image pixels or hand-designed keypoints, and we show an improvement in sample-efficiency of more than two orders of magnitude over standard model-free deep reinforcement learning algorithms.
21
+
22
+ The environment for the synthetic car following benchmark is available online as the package $\mathrm { C i t y S i m } 3 \mathrm { D } ^ { \mathrm { 1 } }$ , and the code to reproduce our method and experiments is also available online2. Supplementary videos of all the test executions are available on the project’s website3.
23
+
24
+ # 2 RELATED WORK
25
+
26
+ Visual servoing is typically (but not always) performed with calibrated cameras and carefully designed visual features. Ideal features for servoing should be stable and discriminative, and much of the work on visual servoing focuses on designing stable and convergent controllers under the assumption that such features are available (Espiau et al., 2002; Mohta et al., 2014; Wilson et al., 1996). Some visual servoing methods do not require camera calibration (Jagersand et al., 1997; Yoshimi & Allen, 1994), and some recent methods operate directly on image intensities (Caron et al., 2013), but generally do not use learning to exploit statistical regularities in the world and improve robustness to distractors.
27
+
28
+ Learning is a relatively recent addition to the repertoire of visual servoing tools. Several methods have been proposed that apply ideas from reinforcement learning to directly acquire visual servoing controllers (Lampe & Riedmiller, 2013; Sadeghzadeh et al., 2015). However, such methods have not been demonstrated under extensive visual variation, and do not make use of state-of-the-art convolutional neural network visual features. Though more standard deep reinforcement learning methods (Lange et al., 2012; Mnih et al., 2013; Levine et al., 2016; Lillicrap et al., 2015) could in principle be applied to directly learn visual servoing policies, such methods tend to require large numbers of samples to learn task-specific behaviors, making them poorly suited for a flexible visual servoing algorithm that can be quickly repurposed to new tasks (e.g. to following a different object).
29
+
30
+ Instead, we propose an approach that combines learning of predictive models with pre-trained visual features. We use visual features trained for ImageNet (Deng et al., 2009) classification, though any pre-trained features could in principle be applicable for our method, so long as they provide a suitable degree of invariance to visual distractors such as lighting, occlusion, and changes in viewpoint. Using pre-trained features allows us to avoid the need for large amounts of experience, but we must still learn the policy itself. To further accelerate this process, we first acquire a predictive model that allows the visual servo to determine how the visual features will change in response to an action. General video prediction is an active research area, with a number of complex but data-hungry models proposed in recent years (Oh et al., 2015; Watter et al., 2015; Mathieu et al., 2015; Xue et al., 2016; Lotter et al., 2016; Jia et al., 2016; Walker et al., 2016; Vondrick et al., 2016).
31
+
32
+ However, we observe that convolutional response maps can be interpreted as images and, under mild assumptions, the dynamics of image pixels during camera motion can be well approximated by means of a bilinear model (Censi & Murray, 2015). We therefore train a relatively simple bilinear model for short-term prediction of visual feature dynamics, which we can use inside a very simple visual servo that seeks to minimize the error between the next predicted feature values and a target image.
33
+
34
+ Unfortunately, simply training predictive models on top of pre-trained features is insufficient to produce an effective visual servo, since it weights the errors of distractor objects the same amount as the object of interest. We address this challenge by using an efficient Q-iteration algorithm to train the weights on the features to maximize the servo’s long-horizon reward. This method draws on ideas from regularized fitted Q-iteration (Gordon, 1995; Ernst et al., 2005; Farahmand et al., 2009) and neural fitted Q-iteration (Riedmiller, 2005) to develop a sample-efficient algorithm that can directly estimate the expected return of the visual servo without the use of any additional function approximator.
35
+
36
+ # 3 PROBLEM STATEMENT
37
+
38
+ Let $\mathbf { y } _ { t }$ be a featurization of the camera’s observations $\mathbf { x } _ { t }$ and let $\mathbf { y } _ { \ast }$ be some given goal feature map. For the purposes of this work, we define visual servoing as the problem of choosing controls $\mathbf { u } _ { t }$ for a fixed number of discrete time steps $t$ as to minimize the error $\| \mathbf { y } _ { * } - \mathbf { y } _ { t } \|$ .
39
+
40
+ We use a relatively simple gradient-based servoing policy that uses one-step feature dynamics, $f : \{ \mathbf { y } _ { t } , \mathbf { u } _ { t } \} \mathbf { y } _ { t + 1 }$ . The policy chooses the control that minimizes the distance between the goal feature map and the one-step prediction:
41
+
42
+ $$
43
+ \pi ( \mathbf { x } _ { t } , \mathbf { x } _ { * } ) = \arg \operatorname* { m i n } _ { \mathbf { u } } \left\| \mathbf { y } _ { * } - f ( \mathbf { y } _ { t } , \mathbf { u } ) \right\| ^ { 2 } .
44
+ $$
45
+
46
+ Learning this policy amounts to learning the robot dynamics and the distance metric $\lVert \cdot \rVert$
47
+
48
+ To learn the robot dynamics, we assume that we have access to a dataset of paired observations and controls $\mathbf { x } _ { t } , \mathbf { u } _ { t } , \mathbf { x } _ { t + 1 }$ . This data is relatively easy to obtain as it involves collecting a stream of the robot’s observations and controls. We use this dataset to learn a general visual dynamics model that can be used for any task.
49
+
50
+ To learn the distance metric, we assume that the robot interacts with the world and collects tuples of the form $\mathbf { x } _ { t } , \mathbf { u } _ { t } , c _ { t } , \mathbf { x } _ { t + 1 } , \mathbf { x } _ { * }$ . At every time step during learning, the robot observes $\mathbf { x } _ { t }$ and takes action $\mathbf { u } _ { t }$ . After the transition, the robot observes $\mathbf { x } _ { t + 1 }$ and receives an immediate cost $c _ { t }$ . This cost is task-specific and it quantifies how good that transition was in order to achieve the goal. At the beginning of each trajectory, the robot is given a goal observation $\mathbf { x } _ { * }$ , and it is the same throughout the trajectory. We define the goal feature map to be the featurization of the goal observation. We learn the distance metric using reinforcement learning and we model the environment as a Markov Decision Process (MDP). The state of the MDP is the tuple of the current observation and the episode’s target observation, $\mathbf { s } _ { t } = ( \mathbf { x } _ { t } , \mathbf { x } _ { * } )$ , the action $\mathbf { u } _ { t }$ is the discrete-time continuous control of the robot, and the cost function maps the states and action $\left( \mathbf { s } _ { t } , \mathbf { u } _ { t } , \mathbf { s } _ { t + 1 } \right)$ to a scalar cost $c _ { t }$ .
51
+
52
+ ![](images/c2a6d6e79280db98c85c7e8ea7bdfd43e9187405f3d1d881fb7ad397e16719be.jpg)
53
+ Figure 1: Multiscale bilinear model. The function $h$ maps images $\mathbf { x }$ to feature maps $\mathbf { y } ^ { ( 0 ) }$ , the operator $d$ downsamples the feature maps $\mathbf { y } ^ { ( l - 1 ) }$ to $\mathbf { y } ^ { ( l ) }$ , and the bilinear function $f ^ { ( l ) }$ predicts the next feature $\hat { \mathbf { y } } ^ { ( l ) }$ . The number of channels for each feature map is $n _ { c }$ , regardless of the scale $l$ .
54
+
55
+ ![](images/e4ff562a2aff99c691d24a4db6d6c85ece83bca9522003a8125de0809be2757c.jpg)
56
+ Figure 2: Dilated VGG-16 network. The intermediate feature maps drawn in a lighter shade are outputs of maxpooling layers. The features maps in the conv4 and conv5 blocks are outputs of dilated convolutions with dilation factors of 2 and 4, respectively.
57
+
58
+ # 4 VISUAL FEATURES DYNAMICS
59
+
60
+ We learn a multiscale bilinear model to predict the visual features of the next frame given the current image from the robot’s camera and the action of the robot. An overview of the model is shown in Figure 1. The learned dynamics can then be used for visual servoing as described in Section 5.
61
+
62
+ # 4.1 VISUAL FEATURES
63
+
64
+ We consider both pixels and semantic features for the visual representation. We define the function $h$ to relate the image $\mathbf { x }$ and its feature ${ \bf y } = h \left( { \bf x } \right)$ . Our choice of semantic features are derived from the VGG-16 network (Simonyan & Zisserman, 2014), which is a convolutional neural network trained for large-scale image recognition on the ImageNet dataset (Deng et al., 2009). Since spatial invariance is undesirable for servoing, we remove some of the max-pooling layers and replace the convolutions that followed them with dilated convolutions, as done by Yu & Koltun (2015). The modified VGG network is shown in Figure 2. We use the model weights of the original VGG-16 network, which are publicly available as a Caffe model (Jia et al., 2014). The features that we use are the outputs of some of the intermediate convolutional layers, that have been downsampled to a $3 2 \times 3 2$ resolution (if necessary) and standarized with respect to our training set.
65
+
66
+ We use multiple resolutions of these features for servoing. The idea is that the high-resolution representations have detailed local information about the scene, while the low-resolution representations have more global information available through the image-space gradients. The features at level $l$ of the multiscale pyramid are denoted as $\mathbf { y } ^ { ( l ) }$ . The features at each level are obtained from the features below through a downsampling operator $d ( \mathbf { y } ^ { ( l - 1 ) } ) = \mathbf { y } ^ { ( l ) }$ that cuts the resolution in half.
67
+
68
+ # 4.2 BILINEAR DYNAMICS
69
+
70
+ The features conditioned $\mathbf { y } _ { t } ^ { ( l ) }$ are usede action predict the corresponding level’s fe, according to a prediction function $\mathbf { y } _ { t + 1 } ^ { ( l ) }$ t time step,. We use a $\mathbf { u } _ { t }$ $f ^ { ( l ) } ( \mathbf { y } _ { t } ^ { ( l ) } , \mathbf { u } _ { t } ) = \hat { \mathbf { y } } _ { t + 1 } ^ { ( l ) }$ bilinear model to represent these dynamics, motivated by prior work (Censi & Murray, 2015). In order to servo at different scales, we learn a bilinear dynamics model at each scale. We consider two variants of the bilinear model in previous work in order to reduce the number of model parameters.
71
+
72
+ The first variant uses fully connected dynamics as in previous work but models the dynamics of each channel independently. When semantic features are used, this model interprets the feature maps as being abstract images with spatial information within a channel and different entities or factors of variation across different channels. This could potentially allow the model to handle moving objects, occlusions, and other complex phenomena.
73
+
74
+ The fully connected bilinear model is quite large, so we propose a bilinear dynamics that enforces sparsity in the parameters. In particular, we constrain the prediction to depend only on the features that are in its local spatial neighborhood, leading to the following locally connected bilinear model:
75
+
76
+ $$
77
+ \hat { \mathbf { y } } _ { t + 1 , c } ^ { ( l ) } = \mathbf { y } _ { t , c } ^ { ( l ) } + \sum _ { j } \left( W _ { c , j } ^ { ( l ) } * \mathbf { y } _ { t , c } ^ { ( l ) } + B _ { c , j } ^ { ( l ) } \right) \mathbf { u } _ { t , j } + \left( W _ { c , 0 } ^ { ( l ) } * \mathbf { y } _ { t , c } ^ { ( l ) } + B _ { c , 0 } ^ { ( l ) } \right) .
78
+ $$
79
+
80
+ The parameters are the 4-dimensional tensor $W _ { c , j } ^ { ( l ) }$ and the matrix $B _ { c , j } ^ { ( l ) }$ for each channel $c$ , scale $l$ , and control coordinate $j$ . The last two terms are biases that allow to model action-independent visual changes, such as moving objects. The $^ *$ is the locally connected operator, which is like a convolution but with untied filter weights4.
81
+
82
+ # 4.3 TRAINING VISUAL FEATURE DYNAMICS MODELS
83
+
84
+ The loss that we use for training the bilinear dynamics is the sum of the losses of the predicted features at each level, $\textstyle \sum _ { l = 0 } ^ { L } \ell ^ { ( l ) }$ , where the loss for each level $l$ is the squared \`-2 norm between the predicted features and the actual features of that level, $\boldsymbol { \ell } ^ { ( l ) } = \| \mathbf { y } _ { t + 1 } ^ { ( l ) } - \hat { \mathbf { y } } _ { t + 1 } ^ { ( l ) } \| ^ { 2 }$ .
85
+
86
+ We optimize for the dynamics while keeping the feature representation fixed. This is a supervised learning problem, which we solve with ADAM (Kingma & Ba, 2014). The training set, consisting of triplets $\mathbf { x } _ { t } , \mathbf { u } _ { t } , \mathbf { x } _ { t + 1 }$ , was obtained by executing a hand-coded policy that moves the robot around the target with some Gaussian noise.
87
+
88
+ # 5 LEARNING VISUAL SERVOING WITH REINFORCEMENT LEARNING
89
+
90
+ We propose to use a multiscale representation of semantic features for servoing. The challenge when introducing multiple scales and multi-channel feature maps for servoing is that the features do not necessarily agree on the optimal action when the goal is unattainable or the robot is far away from the goal. To do well, it’s important to use a good weighing of each of the terms in the objective. Since there are many weights, it would be impractically time-consuming to set them by hand, so we resort to learning. We want the weighted one-step lookahead objective to encourage good longterm behavior, so we want this objective to correspond to the state-action value function $Q$ . So we propose a method for learning the weights based on fitted Q-iteration.
91
+
92
+ # 5.1 SERVOING WITH WEIGHTED MULTISCALE FEATURES
93
+
94
+ Instead of attempting to build an accurate predictive model for multi-step planning, we use the simple greedy servoing method in Equation (1), where we minimize the error between the target and predicted features for all the scales. Typically, only a few objects in the scene are relevant, so the errors of some channels should be penalized more than others. Similarly, features at different scales might need to be weighted differently. Thus, we use a weighting $\mathbf { w } _ { c } ^ { ( l ) } \geq 0$ per channel $c$ and scale $l$ :
95
+
96
+ $$
97
+ \pi ( \mathbf { x } _ { t } , \mathbf { x } _ { * } ) = \arg \operatorname* { m i n } _ { \mathbf { u } } \sum _ { c } \sum _ { l = 0 } ^ { L } \frac { \mathbf { w } _ { c } ^ { ( l ) } } { | \mathbf { y } _ { \cdot , c } ^ { ( l ) } | } \left\| \mathbf { y } _ { * , c } ^ { ( l ) } - f _ { c } ^ { ( l ) } \left( \mathbf { y } _ { t , c } ^ { ( l ) } , \mathbf { u } \right) \right\| _ { 2 } ^ { 2 } + \sum _ { j } \lambda _ { j } \mathbf { u } _ { j } ^ { 2 } ,
98
+ $$
99
+
100
+ where $| \cdot |$ denotes the cardinality operator and the constant $^ 1 / | \mathbf { y } _ { \cdot , c } ^ { ( l ) } |$ normalizes the feature errors by its spatial resolution. We also use a separate weight $\lambda _ { j }$ for each control coordinate $j$ . This optimization can be solved efficiently since the dynamics is linear in the controls (see Appendix A).
101
+
102
+ # 5.2 Q-FUNCTION APPROXIMATION FOR THE WEIGHTED SERVOING POLICY
103
+
104
+ We choose a Q-value function approximator that can represent the servoing objective such that the greedy policy with respect to the Q-values results in the policy of Equation (3). In particular, we use a function approximator that is linear in the weight parameters $\pmb { \theta } ^ { \top } = \left[ \mathbf { w } ^ { \top } \quad \lambda ^ { \top } \right]$ :
105
+
106
+ $$
107
+ \begin{array} { r l } & { Q _ { \theta , b } ( \mathbf { s } _ { t } , \mathbf { u } ) = \phi ( \mathbf { s } _ { t } , \mathbf { u } ) ^ { \top } \pmb \theta + b , \quad \phi \left( \mathbf { s } _ { t } , \mathbf { u } \right) ^ { \top } = \left[ \left[ \frac { 1 } { \left| \mathbf { y } _ { \cdot , c } ^ { ( l ) } \right| } \left\| \mathbf { y } _ { \ast , c } ^ { ( l ) } - f _ { c } ^ { ( l ) } \left( \mathbf { y } _ { t , c } ^ { ( l ) } , \mathbf { u } \right) \right\| _ { 2 } ^ { 2 } \right] _ { c , l } ^ { \top } \quad \left[ \mathbf { u } _ { j } ^ { 2 } \right] _ { j } ^ { \top } \right] . } \end{array}
108
+ $$
109
+
110
+ We denote the state of the MDP as $\mathbf { s } _ { t } = ( \mathbf { x } _ { t } , \mathbf { x } _ { * } )$ and add a bias $b$ to the Q-function. The servoing policy is then simply $\begin{array} { r } { \pi _ { \pmb { \theta } } ( \mathbf { s } _ { t } ) = \arg \operatorname* { m i n } _ { \mathbf { u } } Q _ { \pmb { \theta } , b } ( \mathbf { s } _ { t } , \mathbf { u } ) } \end{array}$ . For reinforcement learning, we optimized for the weights $\pmb { \theta }$ but kept the feature representation and its dynamics fixed.
111
+
112
+ # 5.3 LEARNING THE Q-FUNCTION WITH FITTED Q-ITERATION
113
+
114
+ Reinforcement learning methods that learn a Q-function do so by minimizing the Bellman error:
115
+
116
+ $$
117
+ \left. Q \left( \mathbf { s } _ { t } , \mathbf { u } _ { t } \right) - \left( c _ { t } + \gamma \operatorname* { m i n } _ { \mathbf { u } } Q \left( \mathbf { s } _ { t + 1 } , \mathbf { u } \right) \right) \right. _ { 2 } ^ { 2 } .
118
+ $$
119
+
120
+ In fitted Q-iteration, the agent iteratively gathers a dataset according to an exploration policy, and then minimizes the B $\{ \mathbf { s } _ { t } ^ { ( i ) } , \mathbf { u } _ { t } ^ { ( i ) } , c _ { t } ^ { ( i ) } , \mathbf { s } _ { t + 1 } ^ { ( i ) } \} _ { i } ^ { N }$ of data $N$ samples. We use the term sampling iteration to refer to each iteration $j$ of this procedure. At the beginning of each sampling iteration, the current policy with added Gaussian noise is used as the exploration policy.
121
+
122
+ It is typically hard or unstable to optimize for both Q-functions that appear in the Bellman error of Equation (4), so it is usually optimized by iteratively optimizing the current Q-function while keeping the target Q-function constant. However, we notice that for a given state, the action that minimizes its Q-values is the same for any non-negative scaling $\alpha$ of $\pmb \theta$ and for any bias $b$ . Thus, to speed up the optimization of the Q-function, we first set $\alpha ^ { ( k - \frac { 1 } { 2 } ) }$ and $b ^ { ( k - \frac { 1 } { 2 } ) }$ by jointly solving for $\alpha$ and $b$ of both the current and target Q-function:
123
+
124
+ $$
125
+ \operatorname* { m i n } _ { \boldsymbol { \alpha } \geq 0 , b } \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \left\| Q _ { \boldsymbol { \alpha } \boldsymbol { \theta } ^ { ( k - 1 ) } , b } \left( \mathbf { s } _ { t } ^ { ( i ) } , \mathbf { u } _ { t } ^ { ( i ) } \right) - \left( c _ { t } ^ { ( i ) } + \gamma \operatorname* { m i n } _ { \mathbf { u } } Q _ { \boldsymbol { \alpha } \boldsymbol { \theta } ^ { ( k - 1 ) } , b } \left( \mathbf { s } _ { t + 1 } ^ { ( i ) } , \mathbf { u } \right) \right) \right\| _ { 2 } ^ { 2 } + \nu \left\| \boldsymbol { \theta } \right\| _ { 2 } ^ { 2 } .
126
+ $$
127
+
128
+ This is similar to how, in policy evaluation, state values can be computed by solving a linear system. We regularize the parameters with an \`-2 penalty, weighted by $\nu \geq 0$ . We use the term $F Q I$ iteration to refer to each iteration $k$ of optimizing the Bellman error, and we use the notation $\left( k - { \frac { 1 } { 2 } } \right)$ to denote an intermediate step between iterations $\left( k { - } 1 \right)$ and (k). The parameters $\pmb \theta$ can then be updated with $\pmb { \theta } ^ { ( k - \frac { 1 } { 2 } ) } = \alpha ^ { ( k - \frac { 1 } { 2 } ) } \pmb { \dot { \theta } } ^ { ( k - 1 ) }$ . Then, we update $\pmb \theta ^ { ( k ) }$ and $b ^ { ( k ) }$ by optimizing for $\pmb { \theta }$ and $b$ of the current Q-function while keeping the parameters of the target Q-function fixed:
129
+
130
+ $$
131
+ \operatorname* { m i n } _ { \theta \geq 0 , b } \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \left\| Q _ { \theta , b } \left( \mathbf { s } _ { t } ^ { ( i ) } , \mathbf { u } _ { t } ^ { ( i ) } \right) - \left( c _ { t } ^ { ( i ) } + \gamma \operatorname* { m i n } _ { \mathbf { u } } Q _ { \theta ^ { ( k - \frac { 1 } { 2 } ) } , b ^ { ( k - \frac { 1 } { 2 } ) } } \left( \mathbf { s } _ { t + 1 } ^ { ( i ) } , \mathbf { u } \right) \right) \right\| _ { 2 } ^ { 2 } + \nu \left\| \theta \right\| _ { 2 } ^ { 2 } .
132
+ $$
133
+
134
+ A summary of the algorithm used to learn the feature weights is shown in Algorithm 1.
135
+
136
+ # Algorithm 1 FQI with initialization of policy-independent parameters
137
+
138
+ <table><tr><td colspan="2">1: procedure FQ1(0(0), Texploration, V)</td></tr><tr><td>2:</td><td>for s = 1,..., S do sampling iterations</td></tr><tr><td>3:</td><td>ut (i) V using exploration policy N(π(o), gexploration) ,</td></tr><tr><td>4:</td><td>for k =1,...,K do FQI iterations</td></tr><tr><td>5:</td><td>Fit q(𝑘-)and b(k-¹) using (5)</td></tr><tr><td>6:</td><td>0(k-)←a(𝑘-)θ(k-1)</td></tr><tr><td>7:</td><td>Fit 0(k) and b(k) using (6)</td></tr><tr><td>8:</td><td>0(0)←0(K)</td></tr></table>
139
+
140
+ ![](images/5ab3c4f2745de653bf131a14e9e8fde9948cab5b82a9fdec66f3e9d23f0a9b6a.jpg)
141
+ Figure 3: Cars used to learn the dynamics and the feature weights. They were also used in some of the test experiments.
142
+
143
+ ![](images/f685d484f8df0c71a6741a096c715c4e9e8c037718d7b1ff4c66a63ebea7cba9.jpg)
144
+ Figure 4: Novel cars used only in the test experiments. They were never seen during training or validation.
145
+
146
+ ![](images/be26ebb731bab62a70dfac8a76dfdeafeef8d80b53ec264c775376d018cfa872.jpg)
147
+ Figure 5: Costs of test executions using various feature dynamics models, where the feature weights are optimized with FQI. We test on cars that were used during learning (left plot) and on novel cars that were only used at test time (right plot). The reported values are the mean and standard error across 100 trajectories, of up to 100 time steps each. The policies based on pixel intensities use either fully connected or locally connected dynamics, whereas all the policies based on VGG features use locally connected dynamics. The policies based on deeper VGG features generally achieve better performance, except for the deepest feature representation, VGG conv5 3, which is not as suitable for approximating Q-values. The policies based on pixel intensities and VGG conv5 3 features perform worse on the novel cars. However, VGG features conv1 2 through conv4 3 achieve some degree of generalization on the novel cars.
148
+
149
+ ![](images/4109b969b0d336d68dc1e9426f93e150d3495781f98958f87a00f1665a5f9251.jpg)
150
+
151
+ # 6 EXPERIMENTS
152
+
153
+ We evaluate the performance of the model for visual servoing in a simulated environment. The simulated quadcopter is governed by rigid body dynamics. The robot has 4 degrees of freedom, corresponding to translation along three axis and yaw angle. This simulation is inspired by tasks in which an autonomous quadcopter flies above a city, with the goal of following some target object (e.g., a car).
154
+
155
+ # 6.1 LEARNING FEATURE DYNAMICS AND WEIGHTS WITH FQI
156
+
157
+ The dynamics for each of the features were trained using a dataset of 10000 samples (corresponding to 100 trajectories) with ADAM (Kingma & Ba, 2014). A single dynamics model was learned for each feature representation for all the training cars (Figure 3). This training set was generated by executing a hand-coded policy that navigates the quadcopter around a car for 100 time steps per trajectory, while the car moves around the city.
158
+
159
+ We used the proposed FQI algorithm to learn the weightings of the features and control regularizer. At every sampling iteration, the current policy was executed with Gaussian noise to gather data from 10 trajectories. All the trajectories in our experiments were up to 100 time steps long. The immediate cost received by the agent encodes the error of the target in image coordinates (details in Appendix B). Then, the parameters were iteratively updated by running $K = 1 0$ iterations of FQI. We ran the overall algorithm for only $S = 2$ sampling iterations and chose the parameters that achieved the best performance on 10 validation trajectories. These validation trajectories were obtained by randomly choosing 10 cars from the set of training cars and randomly sampling initial states, and executing the policy with the parameters of the current iteration. All the experiments share the same set of validation trajectories.
160
+
161
+ ![](images/4540545dced51c0abd585e7ed5e7a57173a87b2f2e78539848cc48b0c5deaee0.jpg)
162
+ Table 1: Sample observations from test executions in our experiments with the novel cars, and the costs for each trajectory, for different feature dynamics. We use the weights learned by our FQI algorithm. In each row, we show the observations of every 10 steps and the last one. The first observation of each trajectory is used as the target observation. The trajectories shown here were chosen to reflect different types of behaviors. The servoing policy based on pixel feature dynamics can generally follow cars that can be discriminated based on RGB pixel intensities (e.g., a yellow car with a relatively uniform background). However, it performs poorly when distractor objects appear throughout the execution (e.g., a lamp) or when they appear in the target image (e.g., the crosswalk markings on the road). On the other hand, VGG conv4 3 features are able to discriminate the car from distractor objects and the background, and the feature weights learned by the FQI algorithm are able to leverage this. Additional sample executions with other feature dynamics can be found in Table 3 in the Appendix.
163
+
164
+ # 6.2 COMPARISON OF FEATURE REPRESENTATIONS FOR SERVOING
165
+
166
+ We compare the servoing performance for various feature dynamics models, where the weights are optimized with FQI. We execute the learned policies on 100 test trajectories and report the average cost of the trajectory rollouts on Figure 5. The cost of a single trajectory is the (undiscounted) sum of costs $c _ { t }$ . We test the policies with cars that were seen during training as well as with a set of novel cars (Figure 4), to evaluate the generalization of the learned dynamics and optimized policies.
167
+
168
+ The test trajectories were obtained by randomly sampling 100 cars (with replacement) from one of the two sets of cars, and randomly sampling initial states (which are different from the ones used for validation). For consistency and reproducibility, the same sampled cars and initial states were used across all the test experiments, and the same initial states were used for both sets of cars. These test trajectories were never used during the development of the algorithm or for choosing hyperparameters.
169
+
170
+ From these results, we notice that policies based on deeper VGG features, up to VGG conv4 3, generally achieve better performance. However, the deepest feature representation, VGG conv5 3, is not as suitable for approximating Q-values. We hypothesize that this feature might be too spatially invariant and it might lack the necessary spatial information to differentiate among different car positions. The policies based on pixel intensities and VGG conv5 3 features perform worse on the novel cars. However, VGG features conv1 2 through conv4 3 achieve some degree of generalization on the novel cars.
171
+
172
+ We show sample trajectories in Table 1. The policy based on pixel-intensities is susceptible to occlusions and distractor objects that appear in the target image or during executions. This is because distinguishing these occlusions and distractors from the cars cannot be done using just RGB features.
173
+
174
+ ![](images/67b41a2dee9ac0539f6b042687072840938c12c33781bd8c673c7c0b60d0acee.jpg)
175
+ Figure 6: Comparison of costs on test executions of prior methods against our method based on VGG conv4 3 feature dynamics. These costs are from executions with the training cars; the costs are comparable when testing with the novel cars (Table 2). The first two methods use classical image-based visual servoing (IBVS) with feature points from an off-the-shelf keypoint detector and descriptor extractor (ORB features), and with feature points extracted from bounding boxes predicted by a state-of-the-art visual tracker (C-COT tracker), respectively. The third method trains a convolutional neural network (CNN) policy end-to-end with Trust Region Policy Optimization (TRPO). The other methods use the servoing policy based on VGG conv4 3 feature dynamics, either with unweighted features or weights trained with TRPO for either 2 or 50 iterations. In the case of unweighted features, we learned the weights $\boldsymbol { \lambda }$ and a single weight w with the cross entropy method (CEM). We report the number of training trajectories in parenthesis for the methods that require learning. For TRPO, we use a fixed number of training samples per iteration, whereas for CEM and FQI, we use a fixed number of training trajectories per iteration. We use a batch size of 4000 samples for TRPO, which means that at least 40 trajectories were used per iteration (since trajectories can terminate early, i.e. in less than 100 time steps).
176
+
177
+ # 6.3 COMPARISON OF WEIGHTINGS FROM OTHER OPTIMIZATION METHODS
178
+
179
+ We compare our policy using conv4 3 feature dynamics, with weights optimized by FQI, against policies that use these dynamics but with either no feature weighting or weights optimized by other algorithms.
180
+
181
+ For the case of no weighting, we use a single feature weight w but optimize the relative weighting of the controls $\boldsymbol { \lambda }$ with the cross entropy method (CEM) (De Boer et al., 2005). For the other cases, we learn the weights with Trust Region Policy Optimization (TRPO) (Schulman et al., 2015). Since the servoing policy is the minimizer of a quadratic objective (Equation (3)), we represent the policy as a neural network that has a matrix inverse operation at the output. We train this network for 2 and 50 sampling iterations, and use a batch size of 4000 samples per iteration. All of these methods use the same feature representation as ours, the only difference being how the weights w and $\boldsymbol { \lambda }$ are chosen.
182
+
183
+ We report the average costs of these methods on the right of Figure 6. In 2 sampling iterations, the policy learned with TRPO does not improve by much, whereas our policy learned with FQI significantly outperforms the other policies. The policy learned with TRPO improves further in 50 iterations; however, the cost incurred by this policy is still about one and a half times the cost of our policy, despite using more than 100 times as many trajectories.
184
+
185
+ # 6.4 COMPARISON TO PRIOR METHODS
186
+
187
+ We also consider other methods that do not use the dynamics-based servoing policy that we propose.
188
+ We report their average performance on the left of Figure 6.
189
+
190
+ For one of the prior methods, we train a convolutional neural network (CNN) policy end-to-end with TRPO. The policy is parametrized as a 5-layer CNN, consisting of 2 convolutional and 3 fullyconnected layers, with ReLU activations except for the output layer; the convolutional layers use
191
+
192
+ 16 filters $4 \times 4$ , stride 2) each and the first 2 fully-connected layers use 32 hidden units each. The policy takes in raw pixel-intensities and outputs controls.
193
+
194
+ This policy achieves a modest performance (although still worse than the policies based on conv4 3 feature dynamics) but it requires significantly more training samples than any of the other learningbased methods. We also trained CNN policies that take in extracted VGG features (without any dynamics) as inputs, but they perform worse (see Table 4 in the Appendix). This suggests that given a policy parametrization that is expressive enough and given a large number of training samples, it is better to directly provide the raw pixel-intensity images to the policy instead of extracted VGG features. This is because VGG features are not optimized for this task and their representation loses some information that is useful for servoing.
195
+
196
+ The other two prior methods use classical image-based visual servoing (IBVS) (Chaumette & Hutchinson, 2006) with respect to Oriented FAST and Rotated BRIEF (ORB) feature points (Rublee et al., 2011), or feature points extracted from a visual tracker. For the former, the target features consist of only the ORB feature points that belong to the car, and this specifies that the car is relevant for the task. For the tracker-based method, we use the Continuous Convolution Operator Tracker (C-COT) (Danelljan et al., 2016) (the current state-of-the-art visual tracker) to get bounding boxes around the car and use the four corners of the box as the feature points for servoing. We provide the ground truth car’s bounding box of the first frame as an input to the C-COT tracker. For all of the IBVS methods, we provide the ground truth depth values of the feature points, which are used in the algorithm’s interaction matrix5.
197
+
198
+ The first method performs poorly, in part because ORB features are not discriminative enough for some of the cars, and the target feature points are sometimes matched to feature points that are not on the car. The tracker-based method achieves a relatively good performance. The gap in performance with respect to our method is in part due to the lack of car dynamics information in the IBVS model, whereas our method implicitly incorporates that in the learned feature dynamics. It is also worth noting that the tracker-based policy runs significantly slower than our method. The open-source implementation of the C-COT tracker6 runs at about $1 \mathrm { H z }$ whereas our policy based on conv4 3 features runs at about $1 6 \mathrm { H z }$ . Most of the computation time of our method is spent computing features from the VGG network, so there is room for speedups if we use a network that is less computationally demanding.
199
+
200
+ # 7 DISCUSSION
201
+
202
+ Manual design of visual features and dynamics models can limit the applicability of visual servoing approaches. We described an approach that combines learned visual features with learning predictive dynamics models and reinforcement learning to learn visual servoing mechanisms. Our experiments demonstrate that standard deep features, in our case taken from a model trained for object classification, can be used together with a bilinear predictive model to learn an effective visual servo that is robust to visual variation, changes in viewing angle and appearance, and occlusions. For control we propose to learn Q-values, building on fitted Q-iteration, which at execution time allows for one-step lookahead calculations that optimize long term objectives. Our method can learn an effective visual servo on a complex synthetic car following benchmark using just 20 training trajectory samples for reinforcement learning. We demonstrate substantial improvement over a conventional approach based on image pixels or hand-designed keypoints, and we show an improvement in sample-efficiency of more than two orders of magnitude over standard model-free deep reinforcement learning algorithms.
203
+
204
+ # ACKNOWLEDGEMENTS
205
+
206
+ This research was funded in part by the Army Research Office through the MAST program and the Berkeley DeepDrive consortium. Alex Lee was also supported by the NSF GRFP.
207
+
208
+ # REFERENCES
209
+
210
+ Herbert Bay, Tinne Tuytelaars, and Luc Van Gool. SURF: Speeded up robust features. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 404–417. Springer, 2006, 2006.
211
+
212
+ Guillaume Caron, Eric Marchand, and El Mustapha Mouaddib. Photometric visual servoing for omnidirectional cameras. Autonomous Robots, 35(2-3):177–193, 2013, 2013.
213
+
214
+ Andrea Censi and Richard M Murray. Bootstrapping bilinear models of simple vehicles. The International Journal of Robotics Research, 34(8):1087–1113, 2015, 2015.
215
+
216
+ Francois Chaumette and Seth Hutchinson. Visual servo control. I. Basic approaches. IEEE Robotics & Automation Magazine, 13(4):82–90, 2006, 2006.
217
+
218
+ Jian Chen, Warren E Dixon, M Dawson, and Michael McIntyre. Homography-based visual servo tracking control of a wheeled mobile robot. IEEE Transactions on Robotics, 22(2):406–415, 2006, 2006.
219
+
220
+ Christophe Collewet and Eric Marchand. Photometric visual servoing. IEEE Transactions on Robotics, 27(4):828–834, 2011, 2011.
221
+
222
+ Christophe Collewet, Eric Marchand, and Francois Chaumette. Visual servoing set free from image processing. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), pp. 81–86. IEEE, 2008, 2008.
223
+
224
+ Peter I Corke. Visual control of robot manipulators – A review. Visual servoing, 7:1–31, 1993, 1993.
225
+
226
+ Martin Danelljan, Andreas Robinson, Fahad Shahbaz Khan, and Michael Felsberg. Beyond correlation filters: Learning continuous convolution operators for visual tracking. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 472–488. Springer, 2016, 2016.
227
+
228
+ Pieter-Tjerk De Boer, Dirk P Kroese, Shie Mannor, and Reuven Y Rubinstein. A tutorial on the cross-entropy method. Annals of operations research, 134(1):19–67, 2005, 2005.
229
+
230
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009, 2009.
231
+
232
+ Guilherme N DeSouza and Avinash C Kak. Vision for mobile robot navigation: A survey. IEEE transactions on pattern analysis and machine intelligence, 24(2):237–267, 2002, 2002.
233
+
234
+ Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. DeCAF: A deep convolutional activation feature for generic visual recognition. In Proceedings of the International Conference on Machine Learning (ICML), volume 32, pp. 647–655, 2014, 2014.
235
+
236
+ Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6(Apr):503–556, 2005, 2005.
237
+
238
+ Bernard Espiau, Francois Chaumette, and Patrick Rives. A new approach to visual servoing in robotics. IEEE Transactions on Robotics and Automation, 8(3):313–326, 2002, 2002.
239
+
240
+ Amir Massoud Farahmand, Mohammad Ghavamzadeh, Csaba Szepesvari, and Shie Mannor. Reg- ´ ularized fitted Q-iteration for planning in continuous-space Markovian decision problems. In American Control Conference, 2009. ACC’09., pp. 725–730. IEEE, 2009, 2009.
241
+
242
+ John T Feddema and Owen Robert Mitchell. Vision-guided servoing with feature-based trajectory generation (for robots). IEEE Transactions on Robotics and Automation, 5(5):691–700, 1989, 1989.
243
+
244
+ Geoffrey J Gordon. Stable function approximation in dynamic programming. In Proceedings of the International Conference on Machine Learning (ICML), 1995, 1995.
245
+
246
+ Koichi Hashimoto. Visual servoing, volume 7. World scientific, 1993, 1993.
247
+
248
+ Koh Hosoda and Minoru Asada. Versatile visual servoing without knowledge of true Jacobian. In Intelligent Robots and Systems’ 94.’Advanced Robotic Systems and the Real World’, IROS’94. Proceedings of the IEEE/RSJ/GI International Conference on, volume 1, pp. 186–193. IEEE, 1994, 1994.
249
+
250
+ Seth Hutchinson, Gregory D Hager, and Peter I Corke. A tutorial on visual servo control. IEEE transactions on robotics and automation, 12(5):651–670, 1996, 1996.
251
+
252
+ Martin Jagersand, Olac Fuentes, and Randal Nelson. Experimental evaluation of uncalibrated visual servoing for precision manipulation. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), volume 4, pp. 2874–2880. IEEE, 1997, 1997.
253
+
254
+ Xu Jia, Bert De Brabandere, Tinne Tuytelaars, and Luc V Gool. Dynamic filter networks. In Advances in Neural Information Processing Systems (NIPS), pp. 667–675, 2016, 2016.
255
+
256
+ Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the 22nd ACM International Conference on Multimedia, pp. 675–678. ACM, 2014, 2014.
257
+
258
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014, 2014.
259
+
260
+ Danica Kragic and Henrik I Christensen. Survey on visual servoing for manipulation. Computational Vision and Active Perception Laboratory, Fiskartorpsv, 15, 2002, 2002.
261
+
262
+ Thomas Lampe and Martin Riedmiller. Acquiring visual servoing reaching and grasping skills using neural reinforcement learning. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), pp. 1–8. IEEE, 2013, 2013.
263
+
264
+ Sascha Lange, Martin Riedmiller, and Arne Voigtlander. Autonomous reinforcement learning on raw visual input data in a real world application. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), pp. 1–8. IEEE, 2012, 2012.
265
+
266
+ Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016, 2016.
267
+
268
+ Timothy P. Lillicrap, Jonathan J. Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. CoRR, abs/1509.02971, 2015, 2015.
269
+
270
+ William Lotter, Gabriel Kreiman, and David Cox. Deep predictive coding networks for video prediction and unsupervised learning. CoRR, abs/1605.08104, 2016, 2016.
271
+
272
+ David G Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004, 2004.
273
+
274
+ Ezio Malis, Francois Chaumette, and Sylvie Boudet. 2 1/2 D visual servoing. IEEE Transactions on Robotics and Automation, 15(2):238–250, 1999, 1999.
275
+
276
+ Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond ¨ mean square error. CoRR, abs/1511.05440, 2015, 2015.
277
+
278
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin A. Riedmiller. Playing Atari with deep reinforcement learning. CoRR, abs/1312.5602, 2013, 2013.
279
+
280
+ Kartik Mohta, Vijay Kumar, and Kostas Daniilidis. Vision-based control of a quadrotor for perching on lines. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), pp. 3130–3136. IEEE, 2014, 2014.
281
+
282
+ Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in Atari games. In Advances in Neural Information Processing Systems (NIPS), pp. 2863–2871, 2015, 2015.
283
+
284
+ Martin Riedmiller. Neural fitted Q iteration – First experiences with a data efficient neural reinforcement learning method. In European Conference on Machine Learning, pp. 317–328. Springer, 2005, 2005.
285
+
286
+ Ethan Rublee, Vincent Rabaud, Kurt Konolige, and Gary Bradski. ORB: An efficient alternative to SIFT or SURF. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pp. 2564–2571. IEEE, 2011, 2011.
287
+
288
+ Mehdi Sadeghzadeh, David Calvert, and Hussein A Abdullah. Self-learning visual servoing of robot manipulator using explanation-based fuzzy neural networks and Q-learning. Journal of Intelligent & Robotic Systems, 78(1):83–104, 2015, 2015.
289
+
290
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael I Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the International Conference on Machine Learning (ICML), pp. 1889–1897, 2015, 2015.
291
+
292
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014, 2014.
293
+
294
+ Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In Advances in Neural Information Processing Systems (NIPS), pp. 613–621, 2016, 2016.
295
+
296
+ Jacob Walker, Carl Doersch, Abhinav Gupta, and Martial Hebert. An uncertain future: Forecasting from static images using variational autoencoders. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 835–851. Springer, 2016, 2016.
297
+
298
+ 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 (NIPS), pp. 2746–2754, 2015, 2015.
299
+
300
+ Lee E Weiss, Arthur C Sanderson, and Charles P Neuman. Dynamic sensor-based control of robots with visual feedback. IEEE Journal on Robotics and Automation, 3(5):404–417, 1987, 1987.
301
+
302
+ William J Wilson, Carol C Williams Hulls, and Graham S Bell. Relative end-effector control using cartesian position based visual servoing. IEEE Transactions on Robotics and Automation, 12(5): 684–696, 1996, 1996.
303
+
304
+ Tianfan Xue, Jiajun Wu, Katherine Bouman, and Bill Freeman. Visual dynamics: Probabilistic future frame synthesis via cross convolutional networks. In Advances in Neural Information Processing Systems (NIPS), pp. 91–99, 2016, 2016.
305
+
306
+ Billibon H Yoshimi and Peter K Allen. Active, uncalibrated visual servoing. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), pp. 156–161. IEEE, 1994, 1994.
307
+
308
+ Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. CoRR, abs/1511.07122, 2015, 2015.
309
+
310
+ # A LINEARIZATION OF THE BILINEAR DYNAMICS
311
+
312
+ The optimization of Equation (3) can be solved efficiently by using a linearization of the dynamics,
313
+
314
+ $$
315
+ f _ { c } ^ { ( l ) } \left( \mathbf { y } _ { t , c } ^ { ( l ) } , \mathbf { u } \right) = f _ { c } ^ { ( l ) } \left( \mathbf { y } _ { t , c } ^ { ( l ) } , \bar { \mathbf { u } } \right) + J _ { t , c } ^ { ( l ) } \left( \mathbf { u } - \bar { \mathbf { u } } \right) = f _ { c } ^ { ( l ) } \left( \mathbf { y } _ { t , c } ^ { ( l ) } , \mathbf { 0 } \right) + J _ { t , c } ^ { ( l ) } \mathbf { u } ,
316
+ $$
317
+
318
+ where $J _ { t , c } ^ { ( l ) }$ is the Jacobian matrix with partial derivatives $\frac { \partial f _ { c } ^ { ( l ) } } { \partial \mathbf { u } } \left( \mathbf { y } _ { t , c } ^ { ( l ) } , \bar { \mathbf { u } } \right)$ and $\bar { \bf u }$ is the linearization point. Since the bilinear dynamics are linear with respect to the controls, this linearization is exact and the Jacobian matrix does not depend on $\bar { \bf u }$ . Without loss of generality, we set $\bar { \mathbf { u } } = \mathbf { 0 }$ .
319
+
320
+ Furthermore, the bilinear dynamics allows the Jacobian matrix to be computed efficiently by simply doing a forward pass through the model. For the locally bilinear dynamics of Equation (2), the $j$ -th column of the Jacobian matrix is given by
321
+
322
+ $$
323
+ \pmb { J } _ { t , c , j } ^ { ( l ) } = \frac { \partial f _ { c } ^ { ( l ) } } { \partial \mathbf { u } _ { j } } ( \mathbf { y } _ { t , c } ^ { ( l ) } , \mathbf { 0 } ) = \pmb { W } _ { c , j } ^ { ( l ) } * \mathbf { y } _ { t , c } ^ { ( l ) } + \pmb { B } _ { c , j } ^ { ( l ) } .
324
+ $$
325
+
326
+ # B SERVOING COST FUNCTION FOR REINFORCEMENT LEARNING
327
+
328
+ The goal of reinforcement learning is to find a policy that maximizes the expected sum of rewards, or equivalently, a policy that minimizes the expected sum of costs. The cost should be one that quantifies progress towards the goal. We define the cost function in terms of the position of the target object (in the camera’s local frame) after the action has been taken,
329
+
330
+ $$
331
+ \begin{array} { r } { c ( \mathbf { s } _ { t } , \mathbf { u } _ { t } , \mathbf { s } _ { t + 1 } ) = \left\{ \begin{array} { l l } { \sqrt { \left( \frac { \mathbf { p } _ { t + 1 } ^ { z } } { \mathbf { p } _ { t + 1 } ^ { z } } \right) ^ { 2 } + \left( \frac { \mathbf { p } _ { t + 1 } ^ { y } } { \mathbf { p } _ { t + 1 } ^ { z } } \right) ^ { 2 } + \left( \frac { 1 } { \mathbf { p } _ { t + 1 } ^ { z } } - \frac { 1 } { \mathbf { p } _ { t } ^ { z } } \right) ^ { 2 } } , } & { \mathrm { i f ~ } \vert \vert \mathbf { p } _ { t + 1 } \vert \vert _ { 2 } \geq \tau \mathrm { ~ a n d ~ c a r ~ i n ~ F O V } } \\ { \left( T - t + 1 \right) c ( \cdot , \cdot , \mathbf { s } _ { t } ) , } & { \mathrm { o t h e r w i s e } , } \end{array} \right. } \end{array}
332
+ $$
333
+
334
+ where $T$ is the maximum trajectory length. The episode terminates early if the camera is too close to the car (less than a distance $\tau$ ) or the car’s origin is outside the camera’s field of view (FOV). The car’s position at time $t$ is $\mathbf { p } _ { t } = \left( \mathbf { p } _ { t } ^ { x } , \mathbf { p } _ { t } ^ { y } , \mathbf { p } _ { t } ^ { z } \right)$ and the car’s target position is ${ \bf p } _ { * } = ( 0 , 0 , { \bf p } _ { * } ^ { z } )$ , both in the camera’s local frame ( $\mathbf { Z }$ -direction is forward). Our experiments use $T = 1 0 0$ and $\tau = 4 \mathrm { m }$ .
335
+
336
+ # C EXPERIMENT DETAILS
337
+
338
+ # C.1 TASK SETUP
339
+
340
+ The camera is attached to the vehicle slightly in front of the robot’s origin and facing down at an angle of $\pi / 6$ rad, similar to a commercial quadcopter drone. The robot has 4 degrees of freedom, corresponding to translation and yaw angle. Pitch and roll are held fixed.
341
+
342
+ In our simulations, the quadcopter follows a car that drives at $1 \mathrm { m } \mathrm { s } ^ { - 1 }$ along city roads during training and testing. The quadcopter’s speed is limited to within $1 0 \mathrm { m } \mathrm { s } ^ { - 1 }$ for each translational degree of freedom, and its angular speed is limited to within $\pi / 2 \mathrm { r a d s } ^ { - 1 }$ . The simulator runs at $1 0 \mathrm { H z }$ . For each trajectory, a car is chosen randomly from a set of cars, and placed randomly on one of the roads. The quadcopter is initialized right behind the car, in the desired relative position for following. The image observed at the beginning of the trajectory is used as the goal observation.
343
+
344
+ # C.2 LEARNING FEATURE DYNAMICS
345
+
346
+ The dynamics of all the features were trained using a dataset of 10000 triplets $\mathbf { x } _ { t } , \mathbf { u } _ { t } , \mathbf { x } _ { t + 1 }$ . The observations are $1 2 8 \times 1 2 8$ RGB images and the actions are 4-dimensional vectors of real numbers encoding the linear and angular (yaw) velocities. The actions are normalized to between $- 1$ and 1.
347
+
348
+ The training set was generated from 100 trajectories of a quadcopter following a car around the city with some randomness. Each trajectory was 100 steps long. Only 5 training cars were shown during learning. The generation process of each trajectory is as follows: First, a car is chosen at random from the set of available cars and it is randomly placed on one of the roads. Then, the quadcopter is placed at some random position relative to the car’s horizontal pose, which is the car’s pose that has been rotated so that the vertical axis of it and the world matches. This quadcopter position is uniformly sampled in cylindrical coordinates relative to the car’s horizontal pose, with heights in the interval $1 2 \mathrm { m }$ to $1 8 \mathrm { m }$ , and azimuthal angles in the interval $- \pi / 2$ rad to $\pi / 2$ rad (where the origin of the azimuthal angle is the back of the car). The radii and yaw angles are initialized so that the car is in the middle of the image. At every time step, the robot takes an action that moves it towards a target pose, with some additive Gaussian noise $( \sigma = 0 . 2$ ). The target pose is sampled according to the same procedure as the initial pose, and it is sampled once at the beginning of each trajectory.
349
+
350
+ We try the fully and locally connected dynamics for pixel intensities to better understand the performance trade-offs when assuming locally connected dynamics. We do not use the latter for the semantic features since they are too high-dimensional for the dynamics model to fit in memory. The dynamics models were trained with ADAM using 10000 iterations, a batch size of 32, a learning rate of 0.001, and momentums of 0.9 and 0.999, and a weight decay of 0.0005.
351
+
352
+ (a) Costs when using the set of cars seen during learning.
353
+
354
+ <table><tr><td rowspan="2">Feature Dynamics</td><td colspan="5">Policy Optimization Algorithm</td></tr><tr><td>unweighted feature dynamics + CEM (1500)</td><td>feature dynamics + CEM (3250)</td><td>feature dynamics + TRPO (≥ 80)</td><td>feature dynamics + TRPO (≥ 2000)</td><td>ours, feature dynamics + FQI (20)</td></tr><tr><td>pixel, FC</td><td>8.20 ± 0.66</td><td>7.77 ± 0.66</td><td>9.56 ± 0.62</td><td>8.03 ± 0.66</td><td>7.92 ± 0.67</td></tr><tr><td>pixel, LC</td><td>8.07± 0.74</td><td>7.13 ± 0.74</td><td>10.11 ± 0.60</td><td>7.97 ± 0.72</td><td>7.98 ± 0.77</td></tr><tr><td>VGG conv1_2</td><td>2.22 ± 0.38</td><td></td><td>2.06 ± 0.35</td><td>1.66 ± 0.31</td><td>1.89 ± 0.32</td></tr><tr><td>VGG conv2_2</td><td>2.40 ± 0.47</td><td></td><td>2.42 ± 0.47</td><td>1.89 ± 0.40</td><td>1.40 ± 0.29</td></tr><tr><td>VGG conv3_3</td><td>2.91 ± 0.52</td><td></td><td>2.87 ± 0.53</td><td>1.59 ± 0.42</td><td>1.56 ± 0.40</td></tr><tr><td>VGG conv4_3</td><td>2.70 ± 0.52</td><td></td><td>2.57 ± 0.49</td><td>1.69 ± 0.41</td><td>1.11 ± 0.29</td></tr><tr><td>VGG conv5_3</td><td>3.68 ± 0.47</td><td></td><td>3.69 ± 0.48</td><td>3.16 ± 0.48</td><td>2.49 ± 0.35</td></tr></table>
355
+
356
+ <table><tr><td rowspan="3">Feature</td><td colspan="5">Policy Optimization Algorithm</td></tr><tr><td>unweighted feature dynamics + CEM (1500)</td><td>feature dynamics + CEM (3250)</td><td>feature dynamics +TRPO (≥ 80)</td><td>feature dynamics + TRPO (≥ 2000)</td><td>ours, feature dynamics + FQI (20)</td></tr><tr><td>pixel,FC</td><td>8.84±0.68</td><td>8.66 ± 0.70</td><td>10.01 ± 0.62</td><td>8.75 ± 0.67</td><td>9.00 ± 0.70</td></tr><tr><td>pixel, LC</td><td>8.37 ± 0.75</td><td>7.17 ± 0.75</td><td>11.29 ± 0.57</td><td>8.25 ± 0.71</td><td>8.36 ± 0.79</td></tr><tr><td>VGG conv1_2</td><td>2.03 ± 0.43</td><td></td><td>1.79 ± 0.36</td><td>1.42 ± 0.33</td><td>1.78 ± 0.37</td></tr><tr><td>VGG conv2_2</td><td>2.01 ± 0.44</td><td></td><td>2.00 ± 0.45</td><td>1.26 ± 0.30</td><td>1.28 ± 0.30</td></tr><tr><td>VGG conv3_3</td><td>2.03 ± 0.47</td><td></td><td>2.08 ± 0.47</td><td>1.46 ± 0.37</td><td>1.04 ± 0.31</td></tr><tr><td>VGG conv4_3</td><td>2.40 ± 0.50</td><td></td><td>2.57 ± 0.53</td><td>1.48 ± 0.36</td><td>0.90 ± 0.26</td></tr><tr><td>VGG conv5_3</td><td>3.31 ± 0.45</td><td></td><td>3.55 ± 0.50</td><td>2.76 ± 0.42</td><td>2.56 ± 0.41</td></tr></table>
357
+
358
+ (b) Costs when using novel cars, none of which were seen during learning.
359
+
360
+ Table 2: Costs on test executions of the dynamics-based servoing policies for different feature dynamics and weighting of the features. The reported numbers are the mean and standard error across 100 test trajectories, of up to 100 time steps each. We test on executions with the training cars and the novel cars; for consistency, the novel cars follow the same route as the training cars. We compare the performance of policies with unweighted features or weights learned by other methods. For the case of unweighted feature dynamics, we use the cross entropy method (CEM) to learn the relative weights $\boldsymbol { \lambda }$ of the control and the single feature weight w. For the other cases, we learn the weights with CEM, Trust Region Policy Optimization (TRPO) for either 2 or 50 iterations, and our proposed FQI algorithm. CEM searches over the full space of policy parameters w and $\boldsymbol { \lambda }$ , but it was only ran for pixel features since it does not scale for high-dimensional problems. We report the number of training trajectories in parenthesis. For TRPO, we use a fixed number of training samples per iteration, whereas for CEM and FQI, we use a fixed number of training trajectories per iteration. We use a batch size of 4000 samples for TRPO, which means that at least 40 trajectories were used per iteration, since trajectories can terminate early, i.e. in less than 100 time steps.
361
+
362
+ # C.3 LEARNING WEIGHTING OF FEATURE DYNAMICS WITH REINFORCEMENT LEARNING
363
+
364
+ We use CEM, TRPO and FQI to learn the feature weighting and report the performance of the learned policies in Table 2. We use the cost function described in Appendix B, a discount factor of $\gamma = 0 . 9$ , and trajectories of up to 100 steps. All the algorithms used initial weights of $\mathbf { w } = 1$ and $\lambda = 1$ , and a Gaussian exploration policy with the current policy as the mean and a fixed standard deviation $\sigma _ { \mathrm { e x p l o r a t i o n } } = 0 . 2$ .
365
+
366
+ For the case of unweighted features, we use CEM to optimize for a single weight w and for the weights $\boldsymbol { \lambda }$ . For the case of weighted features, we use CEM to optimize for the full space of parameters, but we only do that for the pixel feature dynamics since CEM does not scale for highdimensional problems, which is the case for all the VGG features. Each iteration of CEM performs a certain number of noisy evaluations and selects the top $20 \%$ for the elite set. The number of noisy evaluations per iteration was 3 times the number of parameters being optimized. Each noisy evaluation used the average sum of costs of 10 trajectory rollouts as its evaluation metric. The parameters of the last iteration were used for the final policy. The policies with unweighted features dynamics and the policies with pixel features dynamics were trained for 10 and 25 iterations, respectively.
367
+
368
+ ![](images/4c6177077dfa8599d899aeb06acf487fad31ef1a515229554606af33c10e41f4.jpg)
369
+ Table 3: Sample observations from test executions in our experiments, and the costs for each trajectory, for different feature dynamics. We use the weights learned by our FQI algorithm. This table follows the same format as Table 1. Some of the trajectories were shorter than 100 steps because of the termination condition (e.g. the car is no longer in the image). The first observation of each trajectory is used as the target observation. The trajectories shown in here were chosen to reflect different types of behaviors. In the first trajectory, the blue car turns abruptly to the right, making the view significantly different from the target observation. In the second trajectory, a distractor object (i.e. the lamp) shows up in the target image and an occluder object (i.e. the traffic light) appears through the execution. The policies based on deeper VGG features, up to VGG conv4 3, are generally more robust to the appearance changes between the observations and the target observation, which are typically caused by movements of the car, distractor objects, and occlusions.
370
+
371
+ ![](images/7deac798d93c4cc540660785b6648f05b2d8e609ad88882cae8407a49e3ca838.jpg)
372
+ Figure 7: Costs of validation executions using various feature dynamics models, where the feature weights are optimized with FQI (left plot) or TRPO (right plot). The reported values are the mean and standard error across 10 validation trajectories, of up to 100 time steps each.
373
+
374
+ We use TRPO to optimize for the full space of parameters for each of the feature dynamics we consider in this work. We use a Gaussian policy, where the mean is the servoing policy of Equation (3) and the standard deviation is fixed to $\sigma _ { \mathrm { e x p l o r a t i o n } } = 0 . 2$ (i.e. we do not learn the standard deviation). Since the parameters are constrained to be non-negative, we parametrize the TRPO policies with $\sqrt { \mathbf { w } }$ and $\sqrt { \lambda }$ . We use a Gaussian baseline, where the mean is a 5-layer CNN, consisting of 2 convolutional and 3 fully connected layers, and a standard deviation that is initialized to 1. The convolutional layers use 16 filters $( 4 \times 4$ , stride 2) each, the first 2 fully-connected layers use 32 hidden units each, and all the layers except for the last one use ReLU activations. The input of the baseline network are the features (either pixel intensities or VGG features) corresponding to the feature dynamics being used. The parameters of the last iteration were used for the final policy. The policies are trained with TRPO for 50 iterations, a batch size of 4000 samples per iteration, and a step size of 0.01.
375
+
376
+ We use our proposed FQI algorithm to optimize for the weights $\mathbf { w } , \lambda$ , and surpass the other methods in terms of performance on test executions, sample efficiency, and overall computation efficiency7. The updates of the inner iteration of our algorithm are computationally efficient; since the data is fixed for a given sampling iteration, we can precompute $\phi \left( \mathbf { s } _ { t } , \mathbf { u } _ { t } \right)$ and certain terms of $\phi \left( \mathbf { s } _ { t + 1 } , \cdot \right)$ . The parameters that achieved the best performance on 10 validation trajectories were used for the final policy. The policies are trained with FQI for $S = 2$ sampling iterations, a batch size of 10 trajectories per sampling iteration, $K = 1 0$ inner iterations per sampling iteration, and a regularization coefficient of $\nu = 0 . 1$ . We found that regularization of the parameters was important for the algorithm to converge. We show sample trajectories of the resulting policies in Table 3.
377
+
378
+ The FQI algorithm often achieved most of its performance gain after the first iteration. We ran additional sampling iterations of FQI to see if the policies improved further. For each iteration, we evaluated the performance of the policies on 10 validation trajectories. We did the same for the policies trained with TRPO, and we compare the learning curves of both methods in Figure 7.
379
+
380
+ <table><tr><td>Observation Modality</td></tr><tr><td>ground truth car position 0.59 ± 0.24</td></tr><tr><td>3.23 ± 0.22</td></tr><tr><td>raw pixel-intensity images VGG conv1_2 features 7.45 ± 0.40</td></tr><tr><td>VGG conv2_2 features 13.38 ± 0.53</td></tr><tr><td>VGG conv3_3 features 10.02 ± 0.49</td></tr><tr><td></td></tr></table>
381
+
382
+ (a) Costs when using the set of cars seen during learning.
383
+
384
+ <table><tr><td>Observation Modality</td></tr><tr><td>ground truth car position 0.59 ± 0.24</td></tr><tr><td>raw pixel-intensity images 5.20 ± 0.40</td></tr><tr><td>VGG conv1_2 features 8.35 ± 0.44</td></tr><tr><td>VGG conv2_2 features 14.01 ± 0.47</td></tr><tr><td>VGG conv3_3 features 10.51 ± 0.65</td></tr></table>
385
+
386
+ (b) Costs when using a new set of cars, none of which were seen during learning.
387
+
388
+ Table 4: Costs on test executions of servoing policies that were trained end-to-end with TRPO. These policies take in different observation modalities: ground truth car position or image-based observations. This table follows the same format as Table 2. The mean of the first policy is parametrized as a 3-layer MLP, with tanh non-linearities except for the output layer; the first 2 fully connected layers use 32 hidden units each. For the other policies, each of their means is parametrized as a 5-layer CNN, consisting of 2 convolutional and 3 fullyconnected layers, with ReLU non-linearities except for the output layer; the convolutional layers use 16 filters $( 4 \times 4$ , stride 2) each and the first 2 fully-connected layers use 32 hidden units each. All the policies are trained with TRPO, a batch size of 4000 samples, 500 iterations, and a step size of 0.01. The car position observations are not affected by the appearance of the cars, so the test performance for that modality is the same regardless of which set of cars are used.
389
+
390
+ C.4 LEARNING END-TO-END SERVOING POLICIES WITH TRPO
391
+
392
+ We use TRPO to train end-to-end servoing policies for various observation modalities and report the performance of the learned policies in Table 4. The policies are trained with the set of training cars, and tested on both this set and on the set of novel cars. The observation modalities that we consider are ground truth car positions (relative to the quadcopter), images of pixel intensities from the quadcopter’s camera, and VGG features extracted from those images. Unlike our method and the other experiments, no feature dynamics are explicitly learned for these experiments.
393
+
394
+ We use a Gaussian policy, where the mean is either a multi-layer perceptron (MLP) or a convolutional neural net (CNN), and the standard deviation is initialized to 1. We also use a Gaussian baseline, which is parametrized just as the corresponding Gaussian policy (but no parameters are shared between the policy and the baseline). For the policy that takes in car positions, the mean is parametrized as a 3-layer MLP, with tanh non-linearities except for the output layer; the first 2 fully connected layers use 32 hidden units each. For the other policies, each of their means is parametrized as a 5-layer CNN, consisting of 2 convolutional and 3 fully-connected layers, with ReLU non-linearities except for the output layer; the convolutional layers use 16 filters $( 4 \times 4$ , stride 2) each and the first 2 fully-connected layers use 32 hidden units each.
395
+
396
+ The CNN policies would often not converge for several randomly initialized parameters. Thus, at the beginning of training, we tried multiple random seeds until we got a policy that achieved a relatively low cost on validation trajectories, and used the best initialization for training. The MLP policy did not have this problem, so we did not have to try multiple random initializations for it. All the policies are trained with a batch size of 4000 samples, 500 iterations, and a step size of 0.01. The parameters of the last iteration were used for the final policy.
397
+
398
+ Table 5: Costs on test executions when using classical image-based visual servoing (IBVS) with respect to feature points derived from bounding boxes and keypoints derived from hand-engineered features. Since there is no learning involved in this method, we only test with one set of cars: the cars that were used for training in the other methods. This table follows the same format as Table 2. This method has one hyperparameter, which is the gain for the control law. For each feature type, we select the best hyperparameter (shown in parenthesis) by validating the policy on 10 validation trajectories for gains between 0.05 and 2, in increments of 0.05. The servoing policies based on bounding box features achieve low cost, and even lower ones if ground truth car dynamics is used. However, servoing with respect to hand-crafted feature points is significantly worse than the other methods.
399
+
400
+ <table><tr><td colspan="3">Observation Modality (Feature Points)</td></tr><tr><td>corners of bounding box from C-COT tracker</td><td>(0.75)</td><td>1.70 ± 0.30</td></tr><tr><td>corners of ground truth bounding box</td><td>(0.75)</td><td>0.86 ± 0.25</td></tr><tr><td>corners of next frame&#x27;s bounding box from C-COT tracker</td><td>(0.65)</td><td>1.46 ± 0.22</td></tr><tr><td>corners of next frame&#x27;s ground truth bounding box</td><td>(0.65)</td><td>0.53 ± 0.05</td></tr><tr><td>SIFT feature points</td><td>(0.30)</td><td>14.47 ± 0.75</td></tr><tr><td>SURF feature points</td><td>(0.60)</td><td>)16.37±0.78</td></tr><tr><td>ORB feature points</td><td>(0.30)</td><td>4.41 ± 0.60</td></tr></table>
401
+
402
+ # C.5 CLASSICAL IMAGE-BASED VISUAL SERVOING
403
+
404
+ Traditional visual servoing techniques (Feddema & Mitchell, 1989; Weiss et al., 1987) use the image-plane coordinates of a set of points for control. For comparison to our method, we evaluate the servoing performance of feature points derived from bounding boxes and keypoints derived from hand-engineered features, and report the costs of test executions on Table 5.
405
+
406
+ We use bounding boxes from the C-COT tracker (Danelljan et al., 2016) (the current state-of-the-art visual tracker) and ground truth bounding boxes from the simulator. The latter is defined as the box that tightly fits around the visible portions of the car. We provide the ground truth bounding box of the first frame to the C-COT tracker to indicate that we want to track the car. We use the four corners of the box as the feature points for servoing to take into account the position and scale of the car in image coordinates.
407
+
408
+ We provide the ground truth depth values of the feature points for the interaction matrices. In classical image-based visual servoing, the control law involves the interaction matrix (also known as feature Jacobian), which is the Jacobian of the points in image space with respect to the camera’s control (see Chaumette & Hutchinson (2006) for details). The analytical feature Jacobian used in IBVS assumes that the target points are static in the world frame. This is not true for a moving car, so we consider a variant where the feature Jacobian incorporates the ground truth dynamics of the car. This amounts to adding a non-constant translation bias to the output of the dynamics function, where the translation is the displacement due to the car’s movement of the 3-dimensional point in the camera’s reference frame. Note that this is still not exactly equivalent to having the car being static since the roads have different slopes but the pitch and roll of the quadcopter is constrained to be fixed.
409
+
410
+ For the hand-crafted features, we consider SIFT (Lowe, 2004), SURF (Bay et al., 2006) and ORB (Rublee et al., 2011) keypoints. We filter out the keypoints of the first frame that does not belong to the car and use these as the target keypoints. However, we use all the keypoints for the subsequent observations.
411
+
412
+ The servoing policies based on bounding box features achieve low cost, and even lower ones if ground truth car dynamics is used. However, servoing with respect to hand-crafted feature points is significantly worse than the other methods. This is, in part, because the feature extraction and matching process introduces compounding errors. Similar results were found by Collewet & Marchand (2011), who proposed photometric visual servoing (i.e. servoing with respect to pixel intensities) and showed that it outperforms, by an order of magnitude, classical visual servoing that uses SURF features.
413
+
414
+ <table><tr><td rowspan="3">Observation Modality (Pose)</td><td colspan="3">Policy Variant</td></tr><tr><td>Use Rotation</td><td>Ignore Rotation</td></tr><tr><td>car pose</td><td>(1.55) 0.58 ±0.25</td><td>(1.90) 0.51 ±0.25</td></tr><tr><td>next frame&#x27;s car pose</td><td>(1.00) 0.0059 ± 0.0020</td><td>(1.00) 0.0025 ± 0.0017</td></tr></table>
415
+
416
+ Table 6: Costs on test executions when using classical position-based visual servoing (PBVS). Since there is no learning involved in this method, we only test with one set of cars: the cars that were used for training in the other methods. This table follows the same format as Table 2. This method has one hyperparameter, which is the gain for the control law. For each condition, we select the best hyperparameter (shown in parenthesis) by validating the policy on 10 validation trajectories for gains between 0.05 and 2, in increments of 0.05. These servoing policies, which use ground truth car poses, outperforms all the other policies based on images. In addition, the performance is more than two orders of magnitude better if ground truth car dynamics is used.
417
+
418
+ # C.6 CLASSICAL POSITION-BASED VISUAL SERVOING
419
+
420
+ Position-based visual servoing (PBVS) techniques use poses of a target object for control (see Chaumette & Hutchinson (2006) for details). We evaluate the servoing performance of a few variants, and report the costs of test executions on Table 6.
421
+
422
+ Similar to our IBVS experiments, we consider a variant that uses the car pose of the next time step as a way to incorporate the ground truth car dynamics into the interaction matrix. Since the cost function is invariant to the orientation of the car, we also consider a variant where the policy only minimizes the translational part of the pose error.
423
+
424
+ These servoing policies, which use ground truth car poses, outperforms all the other policies based on images. In addition, the performance is more than two orders of magnitude better if ground truth car dynamics is used.
parse/train/r1YNw6sxg/r1YNw6sxg_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1YNw6sxg/r1YNw6sxg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1YNw6sxg/r1YNw6sxg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryUlhzWCZ/ryUlhzWCZ.md ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TRUNCATED HORIZON POLICY SEARCH: COMBINING REINFORCEMENT LEARNING & IMITATION LEARNING
2
+
3
+ # Wen Sun
4
+
5
+ # Byron Boots
6
+
7
+ J. Andrew Bagnell Robotics Institute Carnegie Mellon University Pittsburgh, PA, USA dbagnell@cs.cmu.edu
8
+
9
+ Robotics Institute Carnegie Mellon University Pittsburgh, PA, USA wensun@cs.cmu.edu
10
+
11
+ School of Interactive Computing Georgia Institute of Technology Atlanta, GA, USA bboots@cc.gatech.edu
12
+
13
+ # ABSTRACT
14
+
15
+ In this paper, we propose to combine imitation and reinforcement learning via the idea of reward shaping using an oracle. We study the effectiveness of the nearoptimal cost-to-go oracle on the planning horizon and demonstrate that the costto-go oracle shortens the learner’s planning horizon as function of its accuracy: a globally optimal oracle can shorten the planning horizon to one, leading to a onestep greedy Markov Decision Process which is much easier to optimize, while an oracle that is far away from the optimality requires planning over a longer horizon to achieve near-optimal performance. Hence our new insight bridges the gap and interpolates between imitation learning and reinforcement learning. Motivated by the above mentioned insights, we propose Truncated HORizon Policy Search (THOR), a method that focuses on searching for policies that maximize the total reshaped reward over a finite planning horizon when the oracle is sub-optimal. We experimentally demonstrate that a gradient-based implementation of THOR can achieve superior performance compared to RL baselines and IL baselines even when the oracle is sub-optimal.
16
+
17
+ # 1 INTRODUCTION
18
+
19
+ Reinforcement Learning (RL), equipped with modern deep learning techniques, has dramatically advanced the state-of-the-art in challenging sequential decision problems including high-dimensional robotics control tasks as well as video and board games (Mnih et al., 2015; Silver et al., 2016). However, these approaches typically require a large amount of training data and computational resources to succeed. In response to these challenges, researchers have explored strategies for making RL more efficient by leveraging additional information to guide the learning process. Imitation learning (IL) is one such approach. In IL, the learner can reference expert demonstrations (Abbeel & $\mathrm { N g }$ , 2004), or can access a cost-to-go oracle (Ross & Bagnell, 2014), providing additional information about the long-term effects of learner decisions. Through these strategies, imitation learning lowers sample complexity by reducing random global exploration. For example, Sun et al. (2017) shows that, with access to an optimal expert, imitation learning can exponentially lower sample complexity compared to pure RL approaches. Experimentally, researchers also have demonstrated sample efficiency by leveraging expert demonstrations by adding demonstrations into a replay buffer (Vecer ˇ ´ık et al., 2017; Nair et al., 2017), or mixing the policy gradient with a behavioral cloning-related gradient (Rajeswaran et al., 2017).
20
+
21
+ Although imitating experts can speed up the learning process in RL tasks, the performance of the learned policies are generally limited to the performance of the expert, which is often sub-optimal in practice. Previous imitation learning approaches with strong theoretical guarantees such as Data Aggregation (DAgger) (Ross et al., 2011) and Aggregation with Values (AGGREVATE) (Ross & Bagnell, 2014) can only guarantee a policy which performs as well as the expert policy or a one-step deviation improvement over the expert policy.1 Unfortunately, this implies that imitation learning with a sub-optimal expert will often return a sub-optimal policy. Ideally, we want the best of both
22
+
23
+ IL and RL: we want to use the expert to quickly learn a reasonable policy by imitation, while also exploring how to improve upon the expert with RL. This would allow the learner to overcome the sample inefficiencies inherent in a pure RL strategy while also allowing the learner to eventually surpass a potentially sub-optimal expert. Combining RL and IL is, in fact, not new. Chang et al. (2015) attempted to combine IL and RL by stochastically interleaving incremental RL and IL updates. By doing so, the learned policy will either perform as well as the expert policy–the property of IL (Ross & Bagnell, 2014), or eventually reach a local optimal policy–the property of policy iteration-based RL approaches. Although, when the expert policy is sub-optimal, the learned locally optimal policy could potentially perform better than the expert policy, it is still difficult to precisely quantify how much the learner can improve over the expert.
24
+
25
+ In this work, we propose a novel way of combining IL and RL through the idea of Reward Shaping $\mathrm { N g }$ et al., 1999). Throughout our paper we use cost instead of reward, and we refer to the concept of reward shaping with costs as cost shaping. We assume access to a cost-to-go oracle that provides an estimate of expert cost-to-go during training. The key idea is that the cost-to-go oracle can serve as a potential function for cost shaping. For example, consider a task modeled by a Markov Decision Process (MDP). Cost shaping with the cost-to-go oracle produces a new MDP with an optimal policy that is equivalent to the optimal policy of the original MDP $\mathrm { N g }$ et al., 1999). The idea of cost shaping naturally suggests a strategy for IL: pick a favourite RL algorithm and run it on the new MDP reshaped using expert’s cost-to-go oracle. In fact, $\mathrm { N g }$ et al. (1999) demonstrated that running SARSA (Sutton & Barto, 1998) on an MDP reshaped with a potential function that approximates the optimal policy’s value-to-go, is an effective strategy.
26
+
27
+ We take this idea one step further and study the effectiveness of the cost shaping with the expert’s cost-to-go oracle, with a focus on the setting where we only have an imperfect estimator $\hat { V } ^ { e }$ of the cost-to-go of some expert policy $\pi ^ { e }$ , i.e., $\tilde { V } ^ { e } \ne V ^ { * }$ , where $V ^ { * }$ is the optimal policy’s cost-to-go in the original MDP. We show that cost shaping with the cost-to-go oracle shortens the learner’s planning horizon as a function of the accuracy of the oracle $\hat { V } ^ { e }$ compared to $V ^ { * }$ . Consider two extremes. On one hand, when we reshape the cost of the original MDP with $V ^ { * }$ (i.e., $\hat { V } ^ { e } = V ^ { * }$ ), the reshaped MDP has an effective planning horizon of one: a policy that minimizes the one-step cost of the reshaped MDP is in fact the optimal policy (hence the optimal policy of the original MDP). On the other hand, when the cost-to-go oracle provides no information regarding $V ^ { * }$ , we have no choice but simply optimize the reshaped MDP (or just the original MDP) using RL over the entire planning horizon.
28
+
29
+ With the above insight, we propose the high-level strategy for combining IL and RL, which we name Truncated HORizon Policy Search with cost-to-go oracle (THOR). The idea is to first shape the cost using the expert’s cost-to-go oracle $\hat { V } ^ { e }$ , and then truncate the planning horizon of the new MDP and search for a policy that optimizes over the truncated planning horizon. For discrete MDPs, we mathematically formulate this strategy and guarantee that we will find a policy that performs better than the expert with a gap that can be exactly quantified (which is missing in the previous work of Chang et al. (2015)). In practice, we propose a gradient-based algorithm that is motivated from this insight. The practical algorithm allows us to leverage complex function approximators to represent policies and can be applied to continuous state and action spaces. We verify our approach on several MDPs with continuous state and action spaces and show that THOR can be much more sample efficient than strong RL baselines (we compared to Trust Region Policy Optimization with Generalized Advantage Estimation (TRPO-GAE) (Schulman et al., 2016)), and can learn a significantly better policy than AGGREVATE (we compared to the policy gradient version of AGGREVATE from (Sun et al., 2017)) with access only to an imperfect cost-to-go oracle.
30
+
31
+ # 1.1 RELATED WORK AND OUR CONTRIBUTION
32
+
33
+ Previous work has shown that truncating the planning horizon can result in a tradeoff between accuracy and computational complexity. Farahmand et al. (2016) proposed a model-based RL approach that focuses on a search for policies that maximize a sum of $k$ -step rewards with a termination value that approximates the optimal value-to-go. Their algorithm focuses on the model-based setting and the discrete state and action setting, as the algorithm needs to perform $k$ -step value iteration to compute the policy. Another use of the truncated planning horizon is to trade off bias and variance. When the oracle is an approximation of the value function of the agent’s current policy, by using kstep rollouts bottomed up by the oracle’s return, truncating the planning horizon trades off bias and variance of the estimated reward-to-go. The bias-variance tradeoff has been extensively studied in Temporal Difference Learning literature (Sutton, 1988) and policy iteration literature as well (Gabillon et al., 2011). $\mathrm { N g }$ (2003) is perhaps the closest to our work. In Theorem 5 in the Appendix of $\mathrm { N g }$ ’s dissertation, $\mathrm { N g }$ considers the setting where the potential function for reward shaping is close to the optimal value function and suggests that if one performs reward shaping with the potential function, then one can decrease the discount factor of the original MDP without losing the optimality that much. Although in this work we consider truncating the planning steps directly, Theorem 5 in $\mathrm { N g }$ ’s dissertation and our work both essentially considers trading off between the hardness of the reshaped MDP (the shorter the planning horizon, the easier the MDP to optimize) and optimality of the learned policy. In addition to this tradeoff, our work suggests a path toward understanding previous imitation learning approaches through reward shaping, and tries to unify IL and RL by varying the planning horizon from 1 to infinity, based on how close the expert oracle is to the optimal value function. Another contribution of our work is a lower bound analysis that shows that performance limitation of AGGREVATE with an imperfect oracle, which is missing in previous work (Ross & Bagnell, 2014). The last contribution of our work is a model-free, actor-critic style algorithm that can be used for continuous state and action spaces.
34
+
35
+ # 2 PRELIMINARIES
36
+
37
+ We consider the problem of optimizing Markov Decision Process defined as $\mathcal { M } _ { 0 } = ( S , \mathcal { A } , P , C , \gamma )$ . Here, $s$ is a set of $S$ states and $\mathcal { A }$ is a set of $A$ actions; $P$ is the transition dynamics at such that for any $s \in { \mathcal { S } } , s ^ { \prime } \in { \mathcal { S } } , a \in { \mathcal { A } }$ , $P ( s ^ { \prime } | s , a )$ is the probability of transitioning to state $s ^ { \prime }$ from state $s$ by taking action $a$ . For notation simplicity, in the rest of the paper, we will use short notation $P _ { s a }$ to represent the distribution $P ( \cdot | s , a )$ . The cost for a given pair of $s$ and $a$ is $c ( s , a )$ , which is sampled from the cost distribution $C ( s , a )$ with mean value $\textstyle { \bar { c } } ( s , a )$ . A stationary stochastic policy $\pi ( a | s )$ computes the probability of generating action $a$ given state $s$ .
38
+
39
+ The value function $V _ { \mathcal { M } _ { 0 } } ^ { \pi }$ and the state action cost-to-go $Q _ { \mathcal { M } _ { 0 } , h } ^ { \pi } ( s , a )$ of $\pi$ on $\mathcal { M } _ { 0 }$ are defined as:
40
+
41
+ $$
42
+ V _ { M _ { 0 } } ^ { \pi } ( s ) = \mathbb { E } \big [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } c ( s _ { t } , a _ { t } ) | s _ { 0 } = s , a \sim \pi \big ] , \quad Q _ { \mathcal { M } _ { 0 } } ^ { \pi } ( s , a ) = \mathbb { E } \big [ c ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim P _ { s a } } \big [ V _ { M _ { 0 } } ^ { \pi } ( s ^ { \prime } ) \big ] \big ] ,
43
+ $$
44
+
45
+ where the expectation is taken with respect to the randomness of $\mathcal { M } _ { 0 }$ and the stochastic policy $\pi$ . With $V _ { \mathcal { M } _ { 0 } } ^ { \pi }$ and $Q _ { { \mathcal { M } } _ { 0 } } ^ { \pi }$ , we define the disadvantage2 function $A _ { \mathcal { M } _ { 0 } } ^ { \pi } ( s , a ) = Q _ { \mathcal { M } _ { 0 } } ^ { \pi } ( s , a ) - V _ { \mathcal { M } _ { 0 } } ^ { \pi } ( s )$ The objective is to search for the optimal policy $\pi ^ { * }$ such that $\begin{array} { r } { \pi ^ { * } = \arg \operatorname* { m i n } _ { \pi } V ^ { \pi } ( s ) , \forall s \in \mathcal { S } } \end{array}$ .
46
+
47
+ Throughout this work, we assume access to an cost-to-go oracle ${ \hat { V } } ^ { e } ( s ) : { \mathcal { S } } \mathbb { R }$ . Note that we do not require $\hat { V } ^ { e } ( s )$ to be equal to $V _ { \mathcal { M } _ { 0 } } ^ { * }$ . For example, $\hat { V } ^ { e } ( s )$ could be obtained by learning from trajectories demonstrated by the expert $\pi ^ { e }$ (e.g., Temporal Difference Learning (Sutton & Barto, 1998)), or $\hat { V } ^ { e }$ could be computed by near-optimal search algorithms via access to ground truth information (Daume III et al., 2009; Chang et al., 2015; Sun et al., 2016) or via access to a simulator ´ using Dynamic Programming (DP) techniques (Choudhury et al., 2017; Pan et al., 2017). In our experiment, we focus on the setting where we learn a $\hat { V } ^ { e } ( s )$ using TD methods from a set of expert demonstrations.
48
+
49
+ # 2.1 COST SHAPING
50
+
51
+ Given the original MDP $\mathcal { M } _ { 0 }$ and any potential functions $\Phi : S \mathbb { R }$ , we can reshape the cost $c ( s , a )$ sampled from $C ( s , a )$ to be:
52
+
53
+ $$
54
+ c ^ { \prime } ( s , a ) = c ( s , a ) + \gamma \Phi ( s ^ { \prime } ) - \Phi ( s ) , ~ s ^ { \prime } \sim P _ { s a } .
55
+ $$
56
+
57
+ Denote the new MDP $\mathcal { M }$ as the MDP obtained by replacing $c$ by $c ^ { \prime }$ in $\mathcal { M } _ { 0 }$ : $\mathcal { M } = ( \mathcal { S } , \mathcal { A } , P , c ^ { \prime } , \gamma )$ . $\mathrm { N g }$ et al. (1999) showed that the optimal policy $\pi _ { \mathcal { M } } ^ { * }$ on $\mathcal { M }$ and the optimal policy $\pi _ { \mathcal { M } _ { 0 } } ^ { * }$ on the original MDP are the same: $\pi _ { \mathcal M } ^ { * } ( s ) = \pi _ { \mathcal M _ { 0 } } ^ { * } ( s ) , \forall s$ . In other words, if we can successfully find $\pi _ { \mathcal { M } } ^ { * }$ on $\mathcal { M }$ , then we also find $\pi _ { \mathcal { M } _ { 0 } } ^ { * }$ , the optimal policy on the original MDP $\mathcal { M } _ { 0 }$ that we ultimately want to optimize.
58
+
59
+ # 2.2 IMITATION LEARNING
60
+
61
+ In $\mathrm { I L }$ , when given a cost-to-go oracle $V ^ { e }$ , we can use it as a potential function for cost shaping. Specifically let us define the disadvantage $A ^ { e } ( s , a ) = c ( s , a ) ^ { \circ } + \gamma \mathbb { E } _ { s ^ { \prime } \sim P _ { s a } } [ V ^ { e } ( s ^ { \prime } ) ] - V ^ { e } ( s )$ . As cost shaping does not change the optimal policy, we can rephrase the original policy search problem using the shaped cost:
62
+
63
+ $$
64
+ \pi ^ { * } = \arg \operatorname* { m i n } _ { \pi } \mathbb { E } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } A ^ { e } ( s _ { t } , a _ { t } ) | s _ { 0 } = s , a \sim \pi ] ,
65
+ $$
66
+
67
+ for all $s \in S$ . Though Eq. 2 provides an alternative objective for policy search, it could be as hard as the original problem as $\begin{array} { r } { \bar { \mathbb { E } } [ \sum _ { t } \gamma ^ { t } A ^ { e } ( s _ { t } , a _ { t } ) ] } \end{array}$ is just equal to $\mathbb { E } [ \sum _ { t } \gamma ^ { t } c ( s _ { t } , a _ { t } ) - V ^ { e } ( s _ { 0 } ) ]$ , which can be easily verified using the definition of cost shaping and a telescoping sum trick.
68
+
69
+ As directly optimizing Eq 2 is as difficult as policy search in the original MDP, previous $\mathrm { I L }$ algorithms such as AGGREVATE essentially ignore temporal correlations between states and actions along the planning horizon and directly perform a policy iteration over the expert policy at every state, i.e., they are greedy with respect to $A ^ { e }$ as $\begin{array} { r } { \hat { \pi } ( s ) = \arg \operatorname* { m i n } _ { a } A ^ { e } ( s , a ) , \forall s \in \mathcal { S } } \end{array}$ . The policy iteration theorem guarantees that such a greedy policy $\hat { \pi }$ performs at least as well as the expert. Hence, when the expert is optimal, the greedy policy $\hat { \pi }$ is guaranteed to be optimal. However when $V ^ { e }$ is not the optimal value function, the greedy policy $\hat { \pi }$ over $A ^ { e }$ is a one-step deviation improvement over the expert but is not guaranteed to be close to the optimal $\pi ^ { * }$ . We analyze in detail how poor the policy resulting from such a greedy policy improvement method could be when $V ^ { e }$ is far away from the optimal value function in Sec. 3.
70
+
71
+ # 3 EFFECTIVENESS OF COST-TO-GO ORACLE ON PLANNING HORIZON
72
+
73
+ In this section we study the dependency of effective planning horizon on the cost-to-go oracle. We focus on the setting where we have access to an oracle $\hat { V } ^ { e } ( s )$ which approximates the cost-to-go of some expert policy $\pi ^ { e }$ (e.g., $V ^ { e }$ could be designed by domain knowledge $\mathrm { N g }$ et al., 1999) or learned from a set of expert demonstrations). We assume the oracle is close to $V _ { \mathcal { M } _ { 0 } } ^ { * }$ , but imperfect: $| \hat { V } ^ { e } - V _ { \mathcal { M } _ { 0 } } ^ { * } | = \epsilon$ for some $\epsilon \in \mathbb { R } ^ { + }$ . We first show that with such an imperfect oracle, previous $\mathrm { I L }$ algorithms AGGREVATE and AGGREVATE D (Ross & Bagnell, 2014; Sun et al., 2017) are only guaranteed to learn a policy that is $\gamma \epsilon / ( 1 - \gamma )$ away from the optimal. Let us define the expected total cost for any policy $\pi$ as $J ( \pi ) = \mathbb { E } _ { s _ { 0 } \sim v } \left[ V _ { \mathcal { M } _ { 0 } } ^ { \pi } ( s _ { 0 } ) \right]$ , measured under some initial state distribution $v$ and the original MDP $\mathcal { M } _ { 0 }$ .
74
+
75
+ Theorem 3.1. There exists an MDP and an imperfect oracle $\hat { V } ^ { e } ( s )$ with $| \hat { V } ^ { e } ( s ) - V _ { \mathcal { M } _ { 0 } , h } ^ { * } ( s ) | =$ , such that the performance of the induced policy from the cost-to-go oracle $\hat { \pi } ^ { * } =$ $\arg \operatorname* { m i n } _ { a } \Big [ c ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim P _ { s a } } [ \hat { V } ^ { e } ( s ^ { \prime } ) ] \Big ]$ is at least $\Omega ( \gamma \epsilon / ( 1 - \gamma ) )$ away from the optimal policy $\pi ^ { * }$ :
76
+
77
+ $$
78
+ J ( \hat { \pi } ^ { * } ) - J ( \pi ^ { * } ) \geq \Omega \left( \frac { \gamma } { 1 - \gamma } \epsilon \right) .
79
+ $$
80
+
81
+ The proof with the constructed example can be found in Appendix A. Denote $\hat { Q } ^ { e } ( s , a ) = c ( s , a ) +$ $\gamma \mathbb { E } _ { s ^ { \prime } } [ \hat { V } ^ { e } ( s ^ { \prime } ) ]$ , in high level, we construct an example where $\hat { Q } ^ { e }$ is close to $Q ^ { * }$ in terms of $\| \hat { Q } ^ { e } - $ $Q ^ { * } \| _ { \infty }$ , but the order of the actions induced by $\hat { Q } ^ { e }$ is different from the order of the actions from $Q ^ { * }$ , hence forcing the induced policy $\hat { \pi } ^ { * }$ to make mistakes.
82
+
83
+ As AGGREVATE at best computes a policy that is one-step improvement over the oracle, i.e., $\hat { \pi } ^ { * } =$ $\arg \operatorname* { m i n } _ { a } \Big [ c ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim P _ { s a } } \bar { [ V ^ { e } ( { s ^ { \prime } } ) ] } \Big ]$ , it eventually has to suffer from the above lower bound. This $\epsilon$ gap in fact is not surprising as AGGREVATE is a one-step greedy algorithm in a sense that it is only optimizing the one-step cost function $c ^ { \prime }$ from the reshaped MDP $\mathcal { M }$ . To see this, note that the cost of the reshaped MDP $\mathcal { M }$ is $\mathbb { E } [ c ^ { \prime } ( s , a ) ] = [ c ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim P _ { s a } } \hat { V } ^ { e } ( s ^ { \prime } ) - \hat { V } ^ { e } ( s ) ]$ , and we have $\begin{array} { r } { \hat { \pi } ^ { * } ( s ) = \arg \operatorname* { m i n } _ { a } \mathbb { E } [ c ^ { \prime } ( s , a ) ] } \end{array}$ . Hence AGGREVATE can be regarded as a special algorithm that aims to optimizing the one-step cost of MDP $\mathcal { M }$ that is reshaped from the original MDP $\mathcal { M } _ { 0 }$ using the cost-to-go oracle.
84
+
85
+ Though when the cost-to-go oracle is imperfect, AGGREVATE will suffer from the above lower bound due to being greedy, when the cost-to-go oracle is perfect, i.e., $\hat { V } ^ { e } = V ^ { * }$ , being greedy on one-step cost makes perfect sense. To see this, use the property of the cost shaping $\mathrm { N g }$ et al., 1999), we can verify that when $\hat { V } ^ { e } = V ^ { * }$ :
86
+
87
+ $$
88
+ V _ { \mathcal { M } } ^ { * } ( s ) = 0 , \quad \pi _ { \mathcal { M } } ^ { * } ( s ) = \arg \operatorname* { m i n } _ { a } \mathbb { E } [ c ^ { \prime } ( s , a ) ] , \quad \forall s \in \mathcal { S } .
89
+ $$
90
+
91
+ Namely the optimal policy on the reshaped MDP $\mathcal { M }$ only optimizes the one-step cost, which indicates that the optimal cost-to-go oracle shortens the planning horizon to one: finding the optimal policy on $\mathcal { M } _ { 0 }$ becomes equivalent to optimizing the immediate cost function on $\mathcal { M }$ at every state $s$ .
92
+
93
+ When the cost-to-go oracle is $\epsilon$ away from the optimality, we lose the one-step greedy property shown in Eq. 4. In the next section, we show that how we can break the lower bound $\Omega ( \epsilon / ( 1 - \gamma ) )$ only with access to an imperfect cost-to-go oracle $\hat { V } ^ { e }$ , by being less greedy and looking head for more than one-step.
94
+
95
+ # 3.1 OUTPERFORMING THE EXPERT
96
+
97
+ Given the reshaped MDP $\mathcal { M }$ with $\hat { V } ^ { e }$ as the potential function, as we mentioned in Sec. 2.2, directly optimizing Eq. 2 is as difficult as the original policy search problem, we instead propose to minimize the total cost of a policy $\pi$ over a finite $k \geq 1$ steps at any state $s \in S$ :
98
+
99
+ $$
100
+ \mathbb { E } \Big [ \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ^ { \prime } ( s _ { i } , a _ { i } ) | s _ { 1 } = s ; a \sim \pi \Big ] .
101
+ $$
102
+
103
+ Using the definition of cost shaping and telescoping sum trick,we can re-write Eq. 5 in the following format, which we define as $k$ -step disadvantage with respect to the cost-to-go oracle:
104
+
105
+ $$
106
+ \mathbb { E } \Big [ \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } \hat { V } ^ { e } ( s _ { k + 1 } ) - \hat { V } ^ { e } ( s _ { 1 } ) | s _ { 1 } = s ; a \sim \pi \Big ] , \forall s \in \mathcal { S } .
107
+ $$
108
+
109
+ We assume that our policy class $\Pi$ is rich enough that there always exists a policy $\hat { \pi } ^ { * } \in \Pi$ that can simultaneously minimizes the $k -$ step disadvantage at every state (e.g., policies in tabular representation in discrete MDPs). Note that when $k = 1$ , minimizing Eq. 6 becomes the problem of finding a policy that minimizes the disadvantage $A _ { \mathcal { M } _ { 0 } } ^ { e } ( s , a )$ with respect to the expert and reveals AGGREVATE.
110
+
111
+ The following theorem shows that to outperform expert, we can optimize Eq. 6 with $k > 1$ . Let us denote the policy that minimizes Eq. 6 in every state as $\hat { \pi } ^ { * }$ , and the value function of $\hat { \pi } ^ { * }$ as $V ^ { \hat { \pi } ^ { * } }$ .
112
+
113
+ Theorem 3.2. Assume $\hat { \pi } ^ { * }$ minimizes Eq. 6 for every state $s \in S$ with $k > 1$ and $| \hat { V } ^ { e } ( s ) - V ^ { * } ( s ) | =$ $\Theta ( \epsilon ) , \forall s$ . We have :
114
+
115
+ $$
116
+ J ( \hat { \pi } ^ { * } ) - J ( \pi ^ { * } ) \leq O \left( \frac { \gamma ^ { k } } { 1 - \gamma ^ { k } } \epsilon \right)
117
+ $$
118
+
119
+ Compare the above theorem to the lower bound shown in Theorem 3.1, we can see that when $k > 1$ , we are able to learn a policy that performs better than the policy induced by the oracle (i.e., ${ \hat { \pi } } ^ { * } ( s ) =$ $\mathrm { a r g m i n } _ { a } \hat { Q } ^ { e } ( s , a ) )$ by at least $\begin{array} { r } { \big ( \frac { \gamma } { 1 - \gamma } - \frac { \gamma ^ { k } } { 1 - \gamma ^ { k } } \big ) \epsilon } \end{array}$ . The proof can be found in Appendix B.
120
+
121
+ Theorem 3.2 and Theorem 3.1 together summarize that when the expert is imperfect, simply computing a policy that minimizes the one-step disadvantage (i.e., $k = 1 )$ ) is not sufficient to guarantee near-optimal performance; however, optimizing a $k$ -step disadvantage with $k > 1$ leads to a policy that guarantees to outperform the policy induced by the oracle (i.e., the best possible policy that can be learnt using AGGREVATE and AGGREVATED). Also our theorem provides a concrete performance gap between the policy that optimizes Eq. 6 for $k > 1$ and the policy that induced by the oracle, which is missing in previous work (e.g., (Chang et al., 2015)).
122
+
123
+ As we already showed, if we set $k = 1$ , then optimizing Eq. 6 becomes optimizing the disadvantage over the expert $A _ { \mathcal { M } _ { 0 } } ^ { e }$ , which is exactly what AGGREVATE aims for. When we set $k = \infty$ , optimizing Eq. 6 or Eq. 5 just becomes optimizing the total cost of the original MDP. Optimizing over a shorter
124
+
125
+ 1: Input: The original MDP $\mathcal { M } _ { 0 }$ . Truncation Step $k$ . Oracle $V ^ { e }$ .
126
+ 2: Initialize policy $\pi _ { \theta _ { 0 } }$ with parameter $\theta _ { 0 }$ and truncated advantage estimator $\hat { A } _ { \mathcal { M } } ^ { 0 , k }$ .
127
+ 3: for $\mathrm { \Omega } _ { \mathrm { n } } = 0$ , ... do
128
+ 4: Reset system.
129
+ 5: Execute $\pi _ { \theta _ { n } }$ to generate a set of trajectories $\{ \tau _ { i } \} _ { i = 1 } ^ { N }$ .
130
+ 6: Reshape cost $c ^ { \prime } \bar { ( s _ { t } , \underline { { { a _ { t } } } } ) } = c ( s _ { t } , a _ { t } ) + V _ { t + 1 } ^ { e } \bar { ( s _ { t + 1 } ) } \stackrel { . } { - } V _ { t } ^ { e } ( s _ { t } )$ , for every $t \in [ 1 , | \tau _ { i } | ]$ in every
131
+ trajectory $\tau _ { i } , i \in [ N ]$ .
132
+ 7: Compute gradient:
133
+
134
+ $$
135
+ \sum _ { \tau _ { i } } \sum _ { t } \nabla _ { \boldsymbol { \theta } } \big ( \ln \pi _ { \boldsymbol { \theta } } \big ( a _ { t } | s _ { t } \big ) \big ) \big | _ { { \boldsymbol \theta } = { \boldsymbol { \theta } } _ { n } } \hat { A } _ { \mathcal { M } } ^ { \pi _ { n } , k } \big ( s _ { t } , a _ { t } \big )
136
+ $$
137
+
138
+ 8: Update disadvantage estimator to $\hat { A } _ { \mathcal { M } } ^ { \pi _ { n } , k }$ using $\{ \tau _ { i } \} _ { i }$ with reshaped cost $c ^ { \prime }$
139
+
140
+ 10: end for
141
+
142
+ finite horizon is easier than optimizing over the entire infinite long horizon due to advantages such as smaller variance of the empirical estimation of the objective function, less temporal correlations between states and costs along a shorter trajectory. Hence our main theorem essentially provides a tradeoff between the optimality of the solution $\hat { \pi } ^ { * }$ and the difficulty of the underlying optimization problem.
143
+
144
+ # 4 PRACTICAL ALGORITHM
145
+
146
+ Given the original MDP $\mathcal { M } _ { 0 }$ and the cost-to-go oracle $\hat { V } ^ { e }$ , the reshaped MDP’s cost function $c ^ { \prime }$ is obtained from Eq. 1 using the cost-to-go oracle as a potential function. Instead of directly applying RL algorithms on $\mathcal { M } _ { 0 }$ , we use the fact that the cost-to-go oracle shortens the effective planning horizon of $\mathcal { M }$ , and propose THOR: Truncated HORizon Policy Search summarized in Alg. 1. The general idea of THOR is that instead of searching for policies that optimize the total cost over the entire infinitely long horizon, we focus on searching for polices that minimizes the total cost over a truncated horizon, i.e., a $k -$ step time window. Below we first show how we derive THOR from the insight we obtained in Sec. 3.
147
+
148
+ Let us define a $k$ -st truncated value function $V _ { \mathcal { M } } ^ { \pi , k }$ and similar state action value function $Q _ { \mathcal { M } } ^ { \pi , k }$ on the reshaped MDP $\mathcal { M }$
149
+
150
+ $$
151
+ \begin{array} { r l } & { V _ { \mathcal { M } } ^ { \pi , k } ( s ) = \mathbb { E } \Big [ \displaystyle \sum _ { t = 1 } ^ { k } \gamma ^ { t - 1 } c ^ { \prime } ( s _ { t } , a _ { t } ) | s _ { 1 } = s , a \sim \pi \Big ] , } \\ & { Q _ { \mathcal { M } } ^ { \pi , k } ( s , a ) = \mathbb { E } \Big [ c ^ { \prime } ( s , a ) + \displaystyle \sum _ { i = 1 } ^ { k - 1 } \gamma ^ { i } c ^ { \prime } ( s _ { i } , a _ { i } ) | s _ { i } \sim P _ { s a } , a _ { i } \sim \pi ( s _ { i } ) \Big ] , } \end{array}
152
+ $$
153
+
154
+ At any time state $s , V _ { \mathcal { M } } ^ { \pi , k }$ only considers (reshaped) cost signals $c ^ { \prime }$ from a $\mathbf { k }$ -step time window.
155
+
156
+ We are interested in searching for a policy that can optimizes the total cost over a finite $\mathbf { k }$ -step horizon as shown in Eq. 5. For MDPs with large or continuous state spaces, we cannot afford to enumerate all states $s \in { \mathcal { S } }$ to find a policy that minimizes the $k -$ step disadvantage function as in Eq. 5. Instead one can leverage the approximate policy iteration idea and minimize the weighted cost over state space using a state distribution $\nu$ (Kakade & Langford, 2002; Bagnell et al., 2004):
157
+
158
+ $$
159
+ \operatorname* { m i n } _ { \pi \in \Pi } \mathbb { E } _ { s _ { 0 } \sim \nu } \left[ \mathbb { E } \Big [ \sum _ { i = 1 } ^ { k } \gamma ^ { i } c ^ { \prime } ( s _ { i } , a _ { i } ) | a \sim \pi \Big ] \right] .
160
+ $$
161
+
162
+ For parameterized policy $\pi$ (e.g., neural network policies), we can implement the minimization in Eq. 10 using gradient-based update procedures (e.g., Stochastic Gradient Descent, Natural Gradient (Kakade, 2002; Bagnell & Schneider, 2003)) in the policy’s parameter space. In the setting where the system cannot be reset to any state, a typical choice of exploration policy is the currently learned policy (possibly mixed with a random process (Lillicrap et al., 2015) to futher encourage exploration). Denote $\pi _ { n }$ as the currently learned policy after iteration $n$ and $P r _ { \pi _ { n } } ( \cdot )$ as the average state distribution induced by executing $\pi _ { n }$ (parameterized by $\theta _ { n }$ ) on the MDP. Replacing the exploration distribution by ${ P r } _ { \pi _ { n } } ( \cdot )$ in Eq. 10, and taking the derivative with respect to the policy parameter $\theta$ , the policy gradient is:
163
+
164
+ $$
165
+ \begin{array} { r l } { { \mathbb { E } _ { s \sim P r _ { \pi _ { n } } } \Bigg [ \mathbb { E } _ { \tau ^ { k } \sim \pi _ { n } } [ \sum _ { i = 1 } ^ { k } \nabla _ { \theta } \ln \pi ( a _ { i } | s _ { i } ; \theta ) ( \sum _ { j = i } ^ { k + i } \gamma ^ { j - i } c ^ { \prime } ( s _ { j } , a _ { j } ) ) ] \Bigg ] } \Bigg ] } \\ & { \approx \mathbb { E } _ { s \sim P r _ { \pi _ { n } } } [ \mathbb { E } _ { \tau ^ { k } \sim \pi _ { n } } [ \sum _ { i = 1 } ^ { k } \nabla _ { \theta } \ln \pi ( a _ { i } | s _ { i } ; \theta ) Q _ { \mathcal { M } } ^ { \pi , k } ( s _ { i } , a _ { i } ) ] ] } \end{array}
166
+ $$
167
+
168
+ where $\tau ^ { k } \sim \pi _ { n }$ denotes a partial $k -$ step trajectory $\tau ^ { k } = \{ s _ { 1 } , a _ { 1 } , . . . , s _ { k } , a _ { k } | s _ { 1 } = s \}$ sampled from executing $\pi _ { n }$ , replacing chulman et $Q _ { \mathcal { M } } ^ { \pi , k }$ $\pi _ { n }$ on the MDP from state by a critic approximated by Generalized disadvantage Estimator (GAE) 016), we get back to the gradient used in Alg. 1: $s$ . Replacing the expectation by empirical samples from $\hat { A } _ { \mathcal { M } } ^ { \pi , k }$
169
+
170
+ $$
171
+ \begin{array} { r l } { { \mathbb { E } _ { s \sim P r _ { \pi _ { n } } } \Bigg [ \mathbb { E } _ { \tau _ { k } \sim \pi _ { n } } [ \sum _ { i = 1 } ^ { k } \nabla _ { \theta } \ln \pi ( a _ { i } | s _ { i } ; \theta ) Q _ { \mathcal { M } } ^ { \pi , k } ( s _ { i } , a _ { i } ) ] \Bigg ] } } \\ & { \approx k \sum _ { \tau } \Big ( \sum _ { t = 1 } ^ { | \tau | } \nabla _ { \theta } \ln ( \pi ( a _ { t } | s _ { t } ; \theta ) ) \hat { A } _ { \mathcal { M } } ^ { \pi , k } ( s _ { t } , a _ { t } ) \Big ) / H , } \end{array}
172
+ $$
173
+
174
+ where $| \tau |$ denotes the length of the trajectory $\tau$
175
+
176
+ # 4.1 INTERPRETATION USING TRUNCATED BACK-PROPAGATION THROUGH TIME
177
+
178
+ If using the classic policy gradient formulation on the reshaped MDP $\mathcal { M }$ we should have the following expression, which is just a re-formulation of the classic policy gradient (Williams, 1992):
179
+
180
+ $$
181
+ \mathbb { E } _ { \tau } \sum _ { t = 1 } ^ { | \tau | } \big ( c _ { t } ^ { \prime } \sum _ { i = 0 } ^ { t - 1 } ( \nabla _ { \theta } \ln \pi ( a _ { t - i } | s _ { t - i } ; \theta ) ) \big ) ,
182
+ $$
183
+
184
+ which is true since the cost $c _ { i } ^ { \prime }$ (we denote $c _ { i } ^ { \prime } ( s , a )$ as $c _ { i } ^ { \prime }$ for notation simplicity) at time step $i$ is correlated with the actions at time step $t = i$ all the way back to the beginning $t = 1$ . In other words, in the policy gradient format, the effectiveness of the cost $c _ { t }$ is back-propagated through time all the way back the first step. Our proposed gradient formulation in Alg. 1 shares a similar spirit of Truncated Back-Propagation Through Time (Zipser, 1990), and can be regarded as a truncated version of the classic policy gradient formulation: at any time step $t$ , the cost $c ^ { \prime }$ is back-propagated through time at most $k$ -steps:
185
+
186
+ $$
187
+ \mathbb { E } _ { \tau } \sum _ { t = 1 } ^ { | \tau | } \big ( c _ { t } ^ { \prime } \sum _ { i = 0 } ^ { k - 1 } ( \nabla _ { \theta } \ln \pi ( a _ { t - i } | s _ { t - i } ; \theta ) ) \big ) ,
188
+ $$
189
+
190
+ In Eq. 13, for any time step $t$ , we ignore the correlation between $c _ { t } ^ { \prime }$ and the actions that are executed $k$ -step before $t$ , hence elimiates long temporal correlations between costs and old actions. In fact, AGGREVATE D (Sun et al., 2017), a policy gradient version of AGGREVATE, sets $k = 1$ and can be regarded as No Back-Propagation Through Time.
191
+
192
+ # 4.2 CONNECTION TO IL AND RL
193
+
194
+ The above gradient formulation provides a natural half-way point between $\mathrm { I L }$ and RL. When $k = 1$ and $\hat { V } ^ { e } = V _ { \mathcal { M } _ { 0 } } ^ { * }$ (the optimal value function in the original MDP $\mathcal { M } _ { 0 }$ ):
195
+
196
+ $$
197
+ \begin{array} { r l } & { \mathbb { E } _ { \tau } \Big [ \displaystyle \sum _ { t = 1 } ^ { | \tau | } \nabla _ { \theta } ( \ln \pi _ { \theta } ( a _ { t } | s _ { t } ) ) A _ { \mathcal { M } } ^ { \pi ^ { c } , 1 } ( s _ { t } , a _ { t } ) \Big ] = \mathbb { E } _ { \tau } \Big [ \displaystyle \sum _ { t = 1 } ^ { | \tau | } \nabla _ { \theta } ( \ln \pi _ { \theta } ( a _ { t } | s _ { t } ) ) Q _ { \mathcal { M } } ^ { \pi _ { \epsilon } , 1 } ( s _ { t } , a _ { t } ) \Big ] } \\ & { = \mathbb { E } _ { \tau } \Big [ \displaystyle \sum _ { t = 1 } ^ { | \tau | } \nabla _ { \theta } ( \ln \pi _ { \theta } ( a _ { t } | s _ { t } ) ) \mathbb { E } [ c ^ { \prime } ( s _ { t } , a _ { t } ) ] \Big ] = \mathbb { E } _ { \tau } \Big [ \displaystyle \sum _ { t = 1 } ^ { | \tau | } \nabla _ { \theta } ( \ln \pi _ { \theta } ( a _ { t } | s _ { t } ) ) A _ { \mathcal { M } _ { 0 } } ^ { \pi ^ { * } } ( s _ { t } , a _ { t } ) \Big ] , } \end{array}
198
+ $$
199
+
200
+ where, for notation simplicity, we here use $\mathbb { E } _ { \tau }$ to represent the expectation over trajectories sampled from executing policy $\pi _ { \theta }$ , and $A _ { { \mathcal { M } } _ { \mathrm { . } } } ^ { \pi ^ { * } }$ is the advantage function on the original MDP $\mathcal { M } _ { 0 }$ . The fourth expression in the above equation is exactly the gradient proposed by AGGREVATED (Sun et al., 2017). AGGREVATED performs gradient descent with gradient in the format of the fourth expression in Eq. 14 to discourage the log-likelihood of an action $a _ { t }$ that has low advantage over $\pi ^ { * }$ at a given state $s _ { t }$ .
201
+
202
+ On the other hand, when we set $k = \infty$ , i.e., no truncation on horizon, then we return back to the classic policy gradient on the MDP $\mathcal { M }$ obtained from cost shaping with $\hat { V } ^ { e }$ . As optimizing $\mathcal { M }$ is the same as optimizing the original MDP $\mathcal { M } _ { 0 }$ $\mathrm { N g }$ et al., 1999), our formulation is equivalent to a pure RL approach on $\mathcal { M } _ { 0 }$ . In the extreme case when the oracle $\hat { V } ^ { e }$ has nothing to do with the true optimal oracle $V ^ { * }$ , as there is no useful information we can distill from the oracle and RL becomes the only approach to solve $\mathcal { M } _ { 0 }$ .
203
+
204
+ # 5 EXPERIMENTS
205
+
206
+ We evaluated THOR on robotics simulators from OpenAI Gym (Brockman et al., 2016). Throughout this section, we report reward instead of cost, since OpenAI Gym by default uses reward. The baseline we compare against is TRPO-GAE (Schulman et al., 2016) and AGGREVATED (Sun et al., 2017).
207
+
208
+ To simulate oracles, we first train TRPO-GAE until convergence to obtain a policy as an expert $\pi ^ { e }$ . We then collected a batch of trajectories by executing $\pi ^ { e }$ . Finally, we use TD learning Sutton (1988) to train a value function $\hat { V } ^ { e }$ that approximates $V ^ { e }$ . In all our experiments, we ignored $\pi ^ { e }$ and only used the pre-trained $\hat { V } ^ { e }$ for reward shaping. Hence our experimental setting simulates the situation where we only have a batch of expert demonstrations available, and not the experts themselves. This is a much harder setting than the interactive setting considered in previous work (Ross et al., 2011; Sun et al., 2017; Chang et al., 2015). Note that $\pi ^ { e }$ is not guaranteed to be an optimal policy, and $\hat { V } ^ { e }$ is only trained on the demonstrations from $\pi ^ { e }$ , therefore the oracle $\hat { V } ^ { e }$ is just a coarse estimator of V ∗M0 . Our goal is to show that, compared to AGGREVATED, THOR with $k > 1$ results in significantly better performance; compared to TRPO-GAE, THOR with some $k < < H$ converges faster and is more sample efficient. For fair comparison to RL approaches, we do not pre-train policy or critic $\hat { A }$ using demonstration data, though initialization using demonstration data is suggested in theory and has been used in practice to boost the performance (Ross et al., 2011; Bahdanau et al., 2016).
209
+
210
+ For all methods we report statistics (mean and standard deviation) from 25 seeds that are i.i.d generated. For trust region optimization on the actor $\pi _ { \theta }$ and GAE on the critic, we simply use the recommended parameters in the code-base from TRPO-GAE (Schulman et al., 2016). We did not tune any parameters except the truncation length $k$ .
211
+
212
+ # 5.1 DISCRETE ACTION CONTROL
213
+
214
+ We consider two discrete action control tasks with sparse rewards: Mountain-Car, Acrobot and a modified sparse reward version of CartPole. All simulations have sparse reward in the sense that no reward signal is given until the policy succeeds (e.g., Acrobot swings up). In these settings, pure RL approaches that rely on random exploration strategies, suffer from the reward sparsity. On the other hand, THOR can leverage oracle information for more efficient exploration. Results are shown in Fig. 1.
215
+
216
+ ![](images/c0dd8c50bf04b425719647bf1d59345149e20ebb18bb0691da4da5e755d46154.jpg)
217
+ Figure 1: Reward versus batch iterations of THOR with different $k$ and TRPO-GAE (blue) for Mountain car, Sparse Reward (SR) CartPole, and Acrobot with different horizon. Average rewards across 25 runs are shown in solid lines and averages $^ +$ std are shown in dotted lines.
218
+
219
+ Note that in our setting where $\hat { V } ^ { e }$ is imperfect, THOR with $k > 1$ works much better than AGGREVATED (THOR with $k = 1$ ) in Acrobot. In Mountain Car, we observe that AGGREVATED achieves good performance in terms of the mean, but THOR with $k > 1$ (especially $k = 1 0$ ) results in much higher mean $^ +$ std, which means that once THOR receives the reward signal, it can leverage this signal to perform better than the oracles.
220
+
221
+ We also show that THOR with $k > 1$ (but much smaller than $H$ ) can perform better than TRPOGAE. In general, as $k$ increases, we get better performance. We make the acrobot setting even harder by setting $H = 2 0 0$ to even reduce the chance of a random policy to receive reward signals. Compare Fig. 1 (c) to Fig. 1 (b), we can see that THOR with different settings of $k$ always learns faster than TRPO-GAE, and THOR with $k = 5 0$ and $k = 1 0 0$ significantly outperform TRPO-GAE in both mean and mean+std. This indicates that THOR can leverage both reward signals (to perform better than AGGREVATED) and the oracles (to learn faster or even outperform TRPO).
222
+
223
+ # 5.2 CONTINUOUS ACTION CONTROL
224
+
225
+ We tested our approach on simulators with continuous state and actions from MuJoCo simulators: a modified sparse reward Inverted Pendulum, a modifed sparse reward Inverted Double Pendulum, Hopper and Swimmer. Note that, compared to the sparse reward setting, Hopper and Swimmer do not have reward sparsity and policy gradient methods have shown great results (Schulman et al., 2015; 2016). Also, due to the much larger and more complex state space and control space compared to the simulations we consider in the previous section, the value function estimator $\hat { V } ^ { e }$ is much less accurate in terms of estimating $V _ { \mathcal { M } _ { 0 } } ^ { * }$ since the trajectories demonstrated from experts may only cover a very small part of the state and control space. Fig. 2 shows the results of our approach. For all simulations, we require $k$ to be around $2 0 \% \sim 3 0 \%$ of the original planning horizon $H$ to achieve good performance. AGGREVATED $k = 1$ ) learned very little due to the imperfect value function estimator $\hat { V } ^ { e }$ . We also tested $k = H$ , where we observe that reward shaping with $\hat { V } ^ { e }$ gives better performance than TRPO-GAE. This empirical observation is consistent with the observation from $\mathrm { N g }$ et al., 1999) ( $\mathrm { N g }$ et al. (1999) used SARSA (Sutton, 1988), not policy gradient based methods). This indicates that even when $\hat { V } ^ { e }$ is not close to $V ^ { * }$ , policy gradient methods can still employ the oracle $\hat { V } ^ { e }$ just via reward shaping.
226
+
227
+ ![](images/0a60fc25dd766e79cb183aadac82633c14d2c1ceb105e6f8c393a19d9cb3e718.jpg)
228
+ Figure 2: Reward versus batch iterations of THOR with different $k$ and TRPO-GAE (blue) for Sparse Reward (SR) Inverted Pendulum, Sparse Reward Inverted-Double Pendulum, Swimmer and Hopper. Average rewards across 25 runs are shown in solid lines and averages $^ +$ std are shown in dotted lines.
229
+
230
+ Finally, we also observed that our approach significantly reduces the variance of the performance of the learned polices (e.g., Swimmer in Fig. 2(a)) in all experiments, including the sparse reward setting. This is because truncation can significantly reduce the variance from the policy gradient estimation when $k$ is small compared to $H$ .
231
+
232
+ # 6 CONCLUSION
233
+
234
+ We propose a novel way of combining $\mathrm { I L }$ and RL through the idea of cost shaping with an expert oracle. Our theory indicates that cost shaping with the oracle shortens the learner’s planning horizon as a function of the accuracy of the oracle compared to the optimal policy’s value function. Specifically, when the oracle is the optimal value function, we show that by setting $k = 1$ reveals previous imitation learning algorithm AGGREVATED. On the other hand, we show that when the oracle is imperfect, using planning horizon $k > 1$ can learn a policy that outperforms a policy that would been learned by AGGREVATE and AGGREVATED (i.e., $k = 1$ ). With this insight, we propose
235
+
236
+ THOR (Truncated HORizon policy search), a gradient based policy search algorithm that explicitly focusing on minimizing the total cost over a finite planning horizon. Our formulation provides a natural half-way point between IL and RL, and experimentally we demonstrate that with a reasonably accurate oracle, our approach can outperform RL and IL baselines.
237
+
238
+ We believe our high-level idea of shaping the cost with the oracle and then focusing on optimizing a shorter planning horizon is not limited to the practical algorithm we proposed in this work. In fact our idea can be combined with other RL techniques such as Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015), which has an extra potential advantage of storing extra information from the expert such as the offline demonstrations in its replay buffer (Vecer ˇ ´ık et al. (2017)). Though in our experiments, we simply used some expert’s demonstrations to pre-train $\hat { V } ^ { e }$ using TD learning, there are other possible ways to learn a more accurate $\hat { V } ^ { e }$ . For instance, if an expert is available during training (Ross et al., 2011), one can online update $\hat { V } ^ { e }$ by querying expert’s feedback.
239
+
240
+ # ACKNOWLEDGEMENT
241
+
242
+ Wen Sun is supported in part by Office of Naval Research contract N000141512365. The authors also thank Arun Venkatraman and Geoff Gordon for value discussion.
243
+
244
+ # REFERENCES
245
+
246
+ Pieter Abbeel and Andrew Y Ng. Apprenticeship learning via inverse reinforcement learning. In ICML, pp. 1. ACM, 2004.
247
+
248
+ J Andrew Bagnell and Jeff Schneider. Covariant policy search. In IJCAI, 2003.
249
+
250
+ J Andrew Bagnell, Sham M Kakade, Jeff G Schneider, and Andrew Y Ng. Policy search by dynamic programming. In Advances in neural information processing systems, pp. 831–838, 2004.
251
+
252
+ Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. arXiv preprint arXiv:1607.07086, 2016.
253
+
254
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016.
255
+
256
+ Kai-wei Chang, Akshay Krishnamurthy, Alekh Agarwal, Hal Daume, and John Langford. Learning to search better than your teacher. In ICML, 2015.
257
+
258
+ Sanjiban Choudhury, Ashish Kapoor, Gireeja Ranade, and Debadeepta Dey. Learning to gather information via imitation. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pp. 908–915. IEEE, 2017.
259
+
260
+ Hal Daume III, John Langford, and Daniel Marcu. Search-based structured prediction. ´ Machine learning, 2009.
261
+
262
+ Amir-massoud Farahmand, Daniel Nikolaev Nikovski, Yuji Igarashi, and Hiroki Konaka. Truncated approximate dynamic programming with task-dependent terminal value. In AAAI, pp. 3123–3129, 2016.
263
+
264
+ Victor Gabillon, Alessandro Lazaric, Mohammad Ghavamzadeh, and Bruno Scherrer. Classification-based policy iteration with a critic. 2011.
265
+
266
+ Sham Kakade. A natural policy gradient. NIPS, 2002.
267
+
268
+ Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In ICML, 2002.
269
+
270
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
271
+
272
+ Volodymyr Mnih et al. Human-level control through deep reinforcement learning. Nature, 2015.
273
+
274
+ Ashvin Nair, Bob McGrew, Marcin Andrychowicz, Wojciech Zaremba, and Pieter Abbeel. Overcoming exploration in reinforcement learning with demonstrations. arXiv preprint arXiv:1709.10089, 2017.
275
+
276
+ Andrew Y Ng. Shaping and policy search in reinforcement learning. PhD thesis, University of California, Berkeley, 2003.
277
+
278
+ Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ , Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In ICML, volume 99, pp. 278–287, 1999.
279
+
280
+ Yunpeng Pan, Ching-An Cheng, Kamil Saigol, Keuntaek Lee, Xinyan Yan, Evangelos Theodorou, and Byron Boots. Agile off-road autonomous driving using end-to-end deep imitation learning. arXiv preprint arXiv:1709.07174, 2017.
281
+
282
+ Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, John Schulman, Emanuel Todorov, and Sergey Levine. Learning complex dexterous manipulation with deep reinforcement learning and demonstrations. arXiv preprint arXiv:1709.10087, 2017.
283
+
284
+ Stephane Ross and J Andrew Bagnell. Reinforcement and imitation learning via interactive no-regret learning. arXiv preprint arXiv:1406.5979, 2014.
285
+
286
+ Stephane Ross, Geoffrey J Gordon, and J.Andrew Bagnell. A reduction of imitation learning and ´ structured prediction to no-regret online learning. In AISTATS, 2011.
287
+
288
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael I Jordan, and Philipp Moritz. Trust region policy optimization. In ICML, pp. 1889–1897, 2015.
289
+
290
+ John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. ICLR, 2016.
291
+
292
+ David Silver et al. Mastering the game of go with deep neural networks and tree search. Nature, 2016.
293
+
294
+ Wen Sun, Arun Venkatraman, Byron Boots, and J Andrew Bagnell. Learning to filter with predictive state inference machines. In ICML, 2016.
295
+
296
+ Wen Sun, Arun Venkatraman, Geoffrey J Gordon, Byron Boots, and J Andrew Bagnell. Deeply aggrevated: Differentiable imitation learning for sequential prediction. 2017.
297
+
298
+ Richard S Sutton and Andrew G Barto. Introduction to reinforcement learning, volume 135. MIT Press Cambridge, 1998.
299
+
300
+ RichardS. Sutton. Learning to predict by the methods of temporal differences. Machine Learning, 3:9–44, 1988.
301
+
302
+ Matej Vecer ˇ ´ık, Todd Hester, Jonathan Scholz, Fumin Wang, Olivier Pietquin, Bilal Piot, Nicolas Heess, Thomas Rothorl, Thomas Lampe, and Martin Riedmiller. Leveraging demonstra-¨ tions for deep reinforcement learning on robotics problems with sparse rewards. arXiv preprint arXiv:1707.08817, 2017.
303
+
304
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 1992.
305
+
306
+ David Zipser. Subgrouping reduces complexity and speeds up learning in recurrent networks. In Advances in neural information processing systems, pp. 638–641, 1990.
307
+
308
+ A PROOF OF THEOREM 3.1
309
+
310
+ ![](images/295b509937dcbf68cc1cd4cda5591b7c5d36d809fa772174a33d31a34978ef68.jpg)
311
+ Figure 3: The special MDP we constructed for theorem 3.1
312
+
313
+ Proof. We prove the theorem by constructing a special MDP shown in Fig 3, where $H = \infty$ . The MDP has deterministic transition, $2 H + 2$ states, and each state has two actions $a _ { 1 }$ and $a _ { 2 }$ as shown in Fig. 3. Every episode starts at state $s _ { 0 }$ . For state $s _ { i }$ (states on the top line), we have $c ( s _ { i } ) = 0$ and for state $s _ { i } ^ { \prime }$ (states at the bottom line) we have $c ( s _ { i } ) = 1$ .
314
+
315
+ It is clear that for any state $s _ { i }$ , we have $Q ^ { * } ( s _ { i } , a _ { 1 } ) ~ = ~ 0$ , $Q ^ { * } ( s _ { i } , a _ { 2 } ) \ = \ \gamma$ , $Q ^ { * } ( s _ { i } ^ { \prime } , a _ { 1 } ) \ = \ 1$ and $Q ^ { * } ( s _ { i } ^ { \prime } , a _ { 2 } ) = 1 + \gamma _ { \mathrm { { } } }$ , for $i \geq 1$ . Let us assume that we have an oracle $\hat { V } ^ { e }$ such that $\hat { V } ^ { e } ( s _ { i } ) = 0 . 5 + \delta$ and $V ^ { e } ( s _ { i } ^ { \prime } ) = 0 . 5 - \delta$ , for some positive real number $\delta$ . Hence we can see that $| \hat { V } ^ { e } ( s ) - V ^ { * } ( s ) | =$ $0 . 5 + \delta$ , for all $s$ . Denote $\hat { Q } ^ { e } ( s , a ) = c ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim P _ { s a } } [ \hat { V } ^ { e } ( s ^ { \prime } ) ]$ , we know that ${ \hat { Q } } ^ { e } ( s _ { i } , a _ { 1 } ) =$ $\gamma ( 0 . 5 + \delta )$ $. 5 + \delta ) , \hat { Q } ^ { e } ( s _ { i } , a _ { 2 } ) = \gamma ( 0 . 5 - \delta ) , \hat { Q } ^ { e } ( s _ { i } ^ { \prime } , a _ { 1 } ) = 1 + \gamma ( 0 . 5 + \delta )$ and $\hat { Q } ^ { e } ( s _ { i } ^ { \prime } , a _ { 2 } ) = 1 + \gamma ( 0 . 5 - \delta )$ . It is clear that the optimal policy $\pi ^ { * }$ has cost $J ( \pi ^ { * } ) = 0$ . Now let us compute the cost of the induced policy from oracle $\hat { Q } ^ { e }$ : ${ \hat { \pi } } ( s ) = \arg \operatorname* { m i n } _ { a } { \hat { Q } } ^ { e } ( s , a )$ . As we can see $\hat { \pi }$ makes a mistake at every state as $\operatorname { a r g m i n } _ { a } \hat { Q } ^ { e } ( s , a ) \neq \operatorname { a r g m i n } _ { a } Q ^ { * } ( s , a )$ . Hence we have $\begin{array} { r } { J ( \hat { \pi } ) = \frac { \gamma } { 1 - \gamma } } \end{array}$ . Recall that in our constructed example, we have $\epsilon = 0 . 5 + \delta$ . Now let $\delta 0 ^ { + }$ (by $\delta 0 ^ { + }$ we mean $\delta$ approaches to zero from the right side), we have $\epsilon 0 . 5$ , hence $\begin{array} { r } { J ( \hat { \pi } ) = \frac { \gamma } { 1 - \gamma } \to \frac { 2 \gamma } { 1 - \gamma } \epsilon } \end{array}$ (due to the fact $2 \epsilon 1$ ). Hence we have $\begin{array} { r } { J ( \hat { \pi } ) - J ( \pi ^ { * } ) = \Omega \left( \frac { \gamma } { 1 - \gamma } \epsilon \right) } \end{array}$
316
+
317
+ # B PROOF OF THEOREM 3.2
318
+
319
+ Below we prove Theorem 3.2.
320
+
321
+ Proof of Theorem 3.2. In this proof, for notation simplicity, we denote $V _ { \mathcal { M } _ { 0 } } ^ { \pi }$ as $V ^ { \pi }$ for any $\pi$ . Using the definition of value function $V ^ { \pi }$ , for any state $s _ { 1 } \in { \mathcal { S } }$ we have:
322
+
323
+ $$
324
+ \begin{array} { r l } & { \boldsymbol { V } ^ { * * } ( s _ { 1 } ) - \boldsymbol { V } ^ { * * } ( s _ { 1 } ) } \\ & { = \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \boldsymbol { \hat { \tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \boldsymbol { \gamma } ^ { k } \boldsymbol { V } ^ { * * } ( s _ { k + 1 } ) | \boldsymbol { \hat { \pi } } ^ { * } \Big ] - \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \boldsymbol { \hat { \tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \boldsymbol { \gamma } ^ { k } \boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \boldsymbol { \hat { \pi } } ^ { * } \Big ] } \\ & { = \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \boldsymbol { \hat { \tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \boldsymbol { \gamma } ^ { k } \boldsymbol { V } ^ { * * } ( s _ { k + 1 } ) | \boldsymbol { \hat { \pi } } ^ { * } \Big ] - \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \boldsymbol { \hat { \tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \boldsymbol { \gamma } ^ { k } \boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \boldsymbol { \hat { \pi } } ^ { * } \Big ] } \\ & { \qquad + \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \boldsymbol { \hat { \tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \boldsymbol { \gamma } ^ { k } \boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \boldsymbol { \hat { \pi } } ^ { * } \Big ] - \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \boldsymbol { \hat { \tau } } ^ { i - 1 } c ( s _ { i } , a _ { k } ) + \boldsymbol { \gamma } ^ { k } \boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \boldsymbol { \hat { \pi } } ^ { * } \Big ] } \\ & \qquad + \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \boldsymbol { \hat { \tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \boldsymbol { \gamma } ^ { k } \boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \boldsymbol { \hat { \pi } } ^ { * } \Big ] - \mathbb { E } \Big \end{array}
325
+ $$
326
+
327
+ Using the fact that $\| V ^ { * } ( s ) - { \hat { V } } ^ { e } ( s ) \| \leq \epsilon$ , we have that:
328
+
329
+ $$
330
+ \begin{array} { r l } & { \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } V ^ { * } ( s _ { k + 1 } ) | \hat { \pi } ^ { * } \Big ] \leq \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } \hat { V } ^ { e } ( s _ { k + 1 } ) | \hat { \pi } ^ { * } \Big ] + \gamma ^ { k } \epsilon , } \\ & { \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } V ^ { * } ( s _ { k + 1 } ) | \pi ^ { * } \Big ] \geq \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } \hat { V } ^ { e } ( s _ { k + 1 } ) | \pi ^ { * } \Big ] - \gamma ^ { k } \epsilon . } \end{array}
331
+ $$
332
+
333
+ Substitute the above two inequality into Eq. 15, we have:
334
+
335
+ $$
336
+ \begin{array} { r l r } { { V ^ { \tilde { \pi } ^ { * } } ( s _ { 1 } ) - V ^ { * } ( s _ { 1 } ) \leq \gamma ^ { k } \mathbb { E } [ V ^ { \tilde { \pi } ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } ) ] + 2 \gamma ^ { k } \epsilon } } \\ & { } & { + \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } \hat { V } ^ { e } ( s _ { k + 1 } ) | \hat { \pi } ^ { * } \Big ] - \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } \hat { V } ^ { e } ( s _ { k + 1 } ) | \pi ^ { * } \Big ] } \\ & { \leq \gamma ^ { k } \mathbb { E } [ V ^ { \tilde { \pi } ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } ) ] + 2 \gamma ^ { k } \epsilon } \\ & { } & { + \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } \hat { V } ^ { e } ( s _ { k + 1 } ) | \hat { \pi } ^ { * } \Big ] - \mathbb { E } \Big [ \displaystyle \sum _ { i = 1 } ^ { k } \gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \gamma ^ { k } \hat { V } ^ { e } ( s _ { k + 1 } ) | \hat { \pi } ^ { * } \Big ] } \\ & { = \gamma ^ { k } \mathbb { E } [ V ^ { \tilde { \pi } ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } ) ] + 2 \gamma ^ { k } \epsilon , } \end{array}
337
+ $$
338
+
339
+ where the second inequality comes from the fact that $\hat { \pi } ^ { * }$ is the minimizer from Eq. 6. Recursively expand $V ^ { \pi ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } )$ using the above procedure, we can get:
340
+
341
+ $$
342
+ V ^ { \hat { \pi } ^ { * } } ( s _ { 1 } ) - V ^ { * } ( s _ { 1 } ) \leq 2 \gamma ^ { k } \epsilon ( 1 + \gamma ^ { k } + \gamma ^ { 2 k } + \ldots ) \leq \frac { 2 \gamma ^ { k } } { 1 - \gamma ^ { k } } \epsilon = O ( \frac { \gamma ^ { k } } { 1 - \gamma ^ { k } } \epsilon ) .
343
+ $$
344
+
345
+ Since the above inequality holds for any $s _ { 1 } \in S$ , for any initial distribution $v$ over state space $s$ , we will have $\begin{array} { r } { J ( \hat { \pi } ^ { * } ) - J ( \pi ^ { * } ) \leq O ( \frac { \gamma ^ { k } } { 1 - \gamma ^ { k } } \epsilon ) } \end{array}$ . □
parse/train/ryUlhzWCZ/ryUlhzWCZ_content_list.json ADDED
@@ -0,0 +1,1747 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "TRUNCATED HORIZON POLICY SEARCH: COMBINING REINFORCEMENT LEARNING & IMITATION LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Wen Sun ",
17
+ "text_level": 1,
18
+ "bbox": [
19
+ 184,
20
+ 171,
21
+ 250,
22
+ 184
23
+ ],
24
+ "page_idx": 0
25
+ },
26
+ {
27
+ "type": "text",
28
+ "text": "Byron Boots ",
29
+ "text_level": 1,
30
+ "bbox": [
31
+ 596,
32
+ 171,
33
+ 684,
34
+ 184
35
+ ],
36
+ "page_idx": 0
37
+ },
38
+ {
39
+ "type": "text",
40
+ "text": "J. Andrew Bagnell Robotics Institute Carnegie Mellon University Pittsburgh, PA, USA dbagnell@cs.cmu.edu ",
41
+ "bbox": [
42
+ 387,
43
+ 171,
44
+ 575,
45
+ 239
46
+ ],
47
+ "page_idx": 0
48
+ },
49
+ {
50
+ "type": "text",
51
+ "text": "Robotics Institute Carnegie Mellon University Pittsburgh, PA, USA wensun@cs.cmu.edu ",
52
+ "bbox": [
53
+ 184,
54
+ 185,
55
+ 367,
56
+ 239
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "School of Interactive Computing Georgia Institute of Technology Atlanta, GA, USA bboots@cc.gatech.edu ",
63
+ "bbox": [
64
+ 596,
65
+ 185,
66
+ 812,
67
+ 239
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "ABSTRACT ",
74
+ "text_level": 1,
75
+ "bbox": [
76
+ 454,
77
+ 276,
78
+ 544,
79
+ 291
80
+ ],
81
+ "page_idx": 0
82
+ },
83
+ {
84
+ "type": "text",
85
+ "text": "In this paper, we propose to combine imitation and reinforcement learning via the idea of reward shaping using an oracle. We study the effectiveness of the nearoptimal cost-to-go oracle on the planning horizon and demonstrate that the costto-go oracle shortens the learner’s planning horizon as function of its accuracy: a globally optimal oracle can shorten the planning horizon to one, leading to a onestep greedy Markov Decision Process which is much easier to optimize, while an oracle that is far away from the optimality requires planning over a longer horizon to achieve near-optimal performance. Hence our new insight bridges the gap and interpolates between imitation learning and reinforcement learning. Motivated by the above mentioned insights, we propose Truncated HORizon Policy Search (THOR), a method that focuses on searching for policies that maximize the total reshaped reward over a finite planning horizon when the oracle is sub-optimal. We experimentally demonstrate that a gradient-based implementation of THOR can achieve superior performance compared to RL baselines and IL baselines even when the oracle is sub-optimal. ",
86
+ "bbox": [
87
+ 233,
88
+ 309,
89
+ 764,
90
+ 516
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "1 INTRODUCTION ",
97
+ "text_level": 1,
98
+ "bbox": [
99
+ 176,
100
+ 542,
101
+ 336,
102
+ 559
103
+ ],
104
+ "page_idx": 0
105
+ },
106
+ {
107
+ "type": "text",
108
+ "text": "Reinforcement Learning (RL), equipped with modern deep learning techniques, has dramatically advanced the state-of-the-art in challenging sequential decision problems including high-dimensional robotics control tasks as well as video and board games (Mnih et al., 2015; Silver et al., 2016). However, these approaches typically require a large amount of training data and computational resources to succeed. In response to these challenges, researchers have explored strategies for making RL more efficient by leveraging additional information to guide the learning process. Imitation learning (IL) is one such approach. In IL, the learner can reference expert demonstrations (Abbeel & $\\mathrm { N g }$ , 2004), or can access a cost-to-go oracle (Ross & Bagnell, 2014), providing additional information about the long-term effects of learner decisions. Through these strategies, imitation learning lowers sample complexity by reducing random global exploration. For example, Sun et al. (2017) shows that, with access to an optimal expert, imitation learning can exponentially lower sample complexity compared to pure RL approaches. Experimentally, researchers also have demonstrated sample efficiency by leveraging expert demonstrations by adding demonstrations into a replay buffer (Vecer ˇ ´ık et al., 2017; Nair et al., 2017), or mixing the policy gradient with a behavioral cloning-related gradient (Rajeswaran et al., 2017). ",
109
+ "bbox": [
110
+ 174,
111
+ 574,
112
+ 825,
113
+ 782
114
+ ],
115
+ "page_idx": 0
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "Although imitating experts can speed up the learning process in RL tasks, the performance of the learned policies are generally limited to the performance of the expert, which is often sub-optimal in practice. Previous imitation learning approaches with strong theoretical guarantees such as Data Aggregation (DAgger) (Ross et al., 2011) and Aggregation with Values (AGGREVATE) (Ross & Bagnell, 2014) can only guarantee a policy which performs as well as the expert policy or a one-step deviation improvement over the expert policy.1 Unfortunately, this implies that imitation learning with a sub-optimal expert will often return a sub-optimal policy. Ideally, we want the best of both ",
120
+ "bbox": [
121
+ 174,
122
+ 790,
123
+ 825,
124
+ 887
125
+ ],
126
+ "page_idx": 0
127
+ },
128
+ {
129
+ "type": "text",
130
+ "text": "IL and RL: we want to use the expert to quickly learn a reasonable policy by imitation, while also exploring how to improve upon the expert with RL. This would allow the learner to overcome the sample inefficiencies inherent in a pure RL strategy while also allowing the learner to eventually surpass a potentially sub-optimal expert. Combining RL and IL is, in fact, not new. Chang et al. (2015) attempted to combine IL and RL by stochastically interleaving incremental RL and IL updates. By doing so, the learned policy will either perform as well as the expert policy–the property of IL (Ross & Bagnell, 2014), or eventually reach a local optimal policy–the property of policy iteration-based RL approaches. Although, when the expert policy is sub-optimal, the learned locally optimal policy could potentially perform better than the expert policy, it is still difficult to precisely quantify how much the learner can improve over the expert. ",
131
+ "bbox": [
132
+ 174,
133
+ 103,
134
+ 825,
135
+ 242
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "In this work, we propose a novel way of combining IL and RL through the idea of Reward Shaping $\\mathrm { N g }$ et al., 1999). Throughout our paper we use cost instead of reward, and we refer to the concept of reward shaping with costs as cost shaping. We assume access to a cost-to-go oracle that provides an estimate of expert cost-to-go during training. The key idea is that the cost-to-go oracle can serve as a potential function for cost shaping. For example, consider a task modeled by a Markov Decision Process (MDP). Cost shaping with the cost-to-go oracle produces a new MDP with an optimal policy that is equivalent to the optimal policy of the original MDP $\\mathrm { N g }$ et al., 1999). The idea of cost shaping naturally suggests a strategy for IL: pick a favourite RL algorithm and run it on the new MDP reshaped using expert’s cost-to-go oracle. In fact, $\\mathrm { N g }$ et al. (1999) demonstrated that running SARSA (Sutton & Barto, 1998) on an MDP reshaped with a potential function that approximates the optimal policy’s value-to-go, is an effective strategy. ",
142
+ "bbox": [
143
+ 174,
144
+ 250,
145
+ 825,
146
+ 402
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "We take this idea one step further and study the effectiveness of the cost shaping with the expert’s cost-to-go oracle, with a focus on the setting where we only have an imperfect estimator $\\hat { V } ^ { e }$ of the cost-to-go of some expert policy $\\pi ^ { e }$ , i.e., $\\tilde { V } ^ { e } \\ne V ^ { * }$ , where $V ^ { * }$ is the optimal policy’s cost-to-go in the original MDP. We show that cost shaping with the cost-to-go oracle shortens the learner’s planning horizon as a function of the accuracy of the oracle $\\hat { V } ^ { e }$ compared to $V ^ { * }$ . Consider two extremes. On one hand, when we reshape the cost of the original MDP with $V ^ { * }$ (i.e., $\\hat { V } ^ { e } = V ^ { * }$ ), the reshaped MDP has an effective planning horizon of one: a policy that minimizes the one-step cost of the reshaped MDP is in fact the optimal policy (hence the optimal policy of the original MDP). On the other hand, when the cost-to-go oracle provides no information regarding $V ^ { * }$ , we have no choice but simply optimize the reshaped MDP (or just the original MDP) using RL over the entire planning horizon. ",
153
+ "bbox": [
154
+ 173,
155
+ 410,
156
+ 825,
157
+ 569
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "With the above insight, we propose the high-level strategy for combining IL and RL, which we name Truncated HORizon Policy Search with cost-to-go oracle (THOR). The idea is to first shape the cost using the expert’s cost-to-go oracle $\\hat { V } ^ { e }$ , and then truncate the planning horizon of the new MDP and search for a policy that optimizes over the truncated planning horizon. For discrete MDPs, we mathematically formulate this strategy and guarantee that we will find a policy that performs better than the expert with a gap that can be exactly quantified (which is missing in the previous work of Chang et al. (2015)). In practice, we propose a gradient-based algorithm that is motivated from this insight. The practical algorithm allows us to leverage complex function approximators to represent policies and can be applied to continuous state and action spaces. We verify our approach on several MDPs with continuous state and action spaces and show that THOR can be much more sample efficient than strong RL baselines (we compared to Trust Region Policy Optimization with Generalized Advantage Estimation (TRPO-GAE) (Schulman et al., 2016)), and can learn a significantly better policy than AGGREVATE (we compared to the policy gradient version of AGGREVATE from (Sun et al., 2017)) with access only to an imperfect cost-to-go oracle. ",
164
+ "bbox": [
165
+ 174,
166
+ 577,
167
+ 825,
168
+ 773
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "1.1 RELATED WORK AND OUR CONTRIBUTION ",
175
+ "text_level": 1,
176
+ "bbox": [
177
+ 176,
178
+ 797,
179
+ 514,
180
+ 811
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "Previous work has shown that truncating the planning horizon can result in a tradeoff between accuracy and computational complexity. Farahmand et al. (2016) proposed a model-based RL approach that focuses on a search for policies that maximize a sum of $k$ -step rewards with a termination value that approximates the optimal value-to-go. Their algorithm focuses on the model-based setting and the discrete state and action setting, as the algorithm needs to perform $k$ -step value iteration to compute the policy. Another use of the truncated planning horizon is to trade off bias and variance. When the oracle is an approximation of the value function of the agent’s current policy, by using kstep rollouts bottomed up by the oracle’s return, truncating the planning horizon trades off bias and variance of the estimated reward-to-go. The bias-variance tradeoff has been extensively studied in Temporal Difference Learning literature (Sutton, 1988) and policy iteration literature as well (Gabillon et al., 2011). $\\mathrm { N g }$ (2003) is perhaps the closest to our work. In Theorem 5 in the Appendix of $\\mathrm { N g }$ ’s dissertation, $\\mathrm { N g }$ considers the setting where the potential function for reward shaping is close to the optimal value function and suggests that if one performs reward shaping with the potential function, then one can decrease the discount factor of the original MDP without losing the optimality that much. Although in this work we consider truncating the planning steps directly, Theorem 5 in $\\mathrm { N g }$ ’s dissertation and our work both essentially considers trading off between the hardness of the reshaped MDP (the shorter the planning horizon, the easier the MDP to optimize) and optimality of the learned policy. In addition to this tradeoff, our work suggests a path toward understanding previous imitation learning approaches through reward shaping, and tries to unify IL and RL by varying the planning horizon from 1 to infinity, based on how close the expert oracle is to the optimal value function. Another contribution of our work is a lower bound analysis that shows that performance limitation of AGGREVATE with an imperfect oracle, which is missing in previous work (Ross & Bagnell, 2014). The last contribution of our work is a model-free, actor-critic style algorithm that can be used for continuous state and action spaces. ",
187
+ "bbox": [
188
+ 174,
189
+ 827,
190
+ 823,
191
+ 924
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "",
198
+ "bbox": [
199
+ 174,
200
+ 103,
201
+ 825,
202
+ 340
203
+ ],
204
+ "page_idx": 2
205
+ },
206
+ {
207
+ "type": "text",
208
+ "text": "2 PRELIMINARIES ",
209
+ "text_level": 1,
210
+ "bbox": [
211
+ 176,
212
+ 359,
213
+ 339,
214
+ 376
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "We consider the problem of optimizing Markov Decision Process defined as $\\mathcal { M } _ { 0 } = ( S , \\mathcal { A } , P , C , \\gamma )$ . Here, $s$ is a set of $S$ states and $\\mathcal { A }$ is a set of $A$ actions; $P$ is the transition dynamics at such that for any $s \\in { \\mathcal { S } } , s ^ { \\prime } \\in { \\mathcal { S } } , a \\in { \\mathcal { A } }$ , $P ( s ^ { \\prime } | s , a )$ is the probability of transitioning to state $s ^ { \\prime }$ from state $s$ by taking action $a$ . For notation simplicity, in the rest of the paper, we will use short notation $P _ { s a }$ to represent the distribution $P ( \\cdot | s , a )$ . The cost for a given pair of $s$ and $a$ is $c ( s , a )$ , which is sampled from the cost distribution $C ( s , a )$ with mean value $\\textstyle { \\bar { c } } ( s , a )$ . A stationary stochastic policy $\\pi ( a | s )$ computes the probability of generating action $a$ given state $s$ . ",
221
+ "bbox": [
222
+ 173,
223
+ 390,
224
+ 825,
225
+ 489
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "The value function $V _ { \\mathcal { M } _ { 0 } } ^ { \\pi }$ and the state action cost-to-go $Q _ { \\mathcal { M } _ { 0 } , h } ^ { \\pi } ( s , a )$ of $\\pi$ on $\\mathcal { M } _ { 0 }$ are defined as: ",
232
+ "bbox": [
233
+ 173,
234
+ 494,
235
+ 802,
236
+ 512
237
+ ],
238
+ "page_idx": 2
239
+ },
240
+ {
241
+ "type": "equation",
242
+ "img_path": "images/9dd5bee0a660b49f2853e3c3224939397ea9ec85ae2177e1015eb63cd45b64e2.jpg",
243
+ "text": "$$\nV _ { M _ { 0 } } ^ { \\pi } ( s ) = \\mathbb { E } \\big [ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } c ( s _ { t } , a _ { t } ) | s _ { 0 } = s , a \\sim \\pi \\big ] , \\quad Q _ { \\mathcal { M } _ { 0 } } ^ { \\pi } ( s , a ) = \\mathbb { E } \\big [ c ( s , a ) + \\gamma \\mathbb { E } _ { s ^ { \\prime } \\sim P _ { s a } } \\big [ V _ { M _ { 0 } } ^ { \\pi } ( s ^ { \\prime } ) \\big ] \\big ] ,\n$$",
244
+ "text_format": "latex",
245
+ "bbox": [
246
+ 181,
247
+ 516,
248
+ 812,
249
+ 558
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "where the expectation is taken with respect to the randomness of $\\mathcal { M } _ { 0 }$ and the stochastic policy $\\pi$ . With $V _ { \\mathcal { M } _ { 0 } } ^ { \\pi }$ and $Q _ { { \\mathcal { M } } _ { 0 } } ^ { \\pi }$ , we define the disadvantage2 function $A _ { \\mathcal { M } _ { 0 } } ^ { \\pi } ( s , a ) = Q _ { \\mathcal { M } _ { 0 } } ^ { \\pi } ( s , a ) - V _ { \\mathcal { M } _ { 0 } } ^ { \\pi } ( s )$ The objective is to search for the optimal policy $\\pi ^ { * }$ such that $\\begin{array} { r } { \\pi ^ { * } = \\arg \\operatorname* { m i n } _ { \\pi } V ^ { \\pi } ( s ) , \\forall s \\in \\mathcal { S } } \\end{array}$ . ",
256
+ "bbox": [
257
+ 176,
258
+ 560,
259
+ 823,
260
+ 606
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "Throughout this work, we assume access to an cost-to-go oracle ${ \\hat { V } } ^ { e } ( s ) : { \\mathcal { S } } \\mathbb { R }$ . Note that we do not require $\\hat { V } ^ { e } ( s )$ to be equal to $V _ { \\mathcal { M } _ { 0 } } ^ { * }$ . For example, $\\hat { V } ^ { e } ( s )$ could be obtained by learning from trajectories demonstrated by the expert $\\pi ^ { e }$ (e.g., Temporal Difference Learning (Sutton & Barto, 1998)), or $\\hat { V } ^ { e }$ could be computed by near-optimal search algorithms via access to ground truth information (Daume III et al., 2009; Chang et al., 2015; Sun et al., 2016) or via access to a simulator ´ using Dynamic Programming (DP) techniques (Choudhury et al., 2017; Pan et al., 2017). In our experiment, we focus on the setting where we learn a $\\hat { V } ^ { e } ( s )$ using TD methods from a set of expert demonstrations. ",
267
+ "bbox": [
268
+ 174,
269
+ 613,
270
+ 825,
271
+ 733
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "2.1 COST SHAPING ",
278
+ "text_level": 1,
279
+ "bbox": [
280
+ 174,
281
+ 748,
282
+ 321,
283
+ 762
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "Given the original MDP $\\mathcal { M } _ { 0 }$ and any potential functions $\\Phi : S \\mathbb { R }$ , we can reshape the cost $c ( s , a )$ sampled from $C ( s , a )$ to be: ",
290
+ "bbox": [
291
+ 173,
292
+ 773,
293
+ 823,
294
+ 803
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "equation",
300
+ "img_path": "images/abc9d244711254b2baf3dfe3303685c997a82425b0ddb8e784d78475440af170.jpg",
301
+ "text": "$$\nc ^ { \\prime } ( s , a ) = c ( s , a ) + \\gamma \\Phi ( s ^ { \\prime } ) - \\Phi ( s ) , ~ s ^ { \\prime } \\sim P _ { s a } .\n$$",
302
+ "text_format": "latex",
303
+ "bbox": [
304
+ 339,
305
+ 806,
306
+ 658,
307
+ 825
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "Denote the new MDP $\\mathcal { M }$ as the MDP obtained by replacing $c$ by $c ^ { \\prime }$ in $\\mathcal { M } _ { 0 }$ : $\\mathcal { M } = ( \\mathcal { S } , \\mathcal { A } , P , c ^ { \\prime } , \\gamma )$ . $\\mathrm { N g }$ et al. (1999) showed that the optimal policy $\\pi _ { \\mathcal { M } } ^ { * }$ on $\\mathcal { M }$ and the optimal policy $\\pi _ { \\mathcal { M } _ { 0 } } ^ { * }$ on the original MDP are the same: $\\pi _ { \\mathcal M } ^ { * } ( s ) = \\pi _ { \\mathcal M _ { 0 } } ^ { * } ( s ) , \\forall s$ . In other words, if we can successfully find $\\pi _ { \\mathcal { M } } ^ { * }$ on $\\mathcal { M }$ , then we also find $\\pi _ { \\mathcal { M } _ { 0 } } ^ { * }$ , the optimal policy on the original MDP $\\mathcal { M } _ { 0 }$ that we ultimately want to optimize. ",
314
+ "bbox": [
315
+ 174,
316
+ 828,
317
+ 825,
318
+ 901
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "2.2 IMITATION LEARNING ",
325
+ "text_level": 1,
326
+ "bbox": [
327
+ 174,
328
+ 103,
329
+ 369,
330
+ 118
331
+ ],
332
+ "page_idx": 3
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "In $\\mathrm { I L }$ , when given a cost-to-go oracle $V ^ { e }$ , we can use it as a potential function for cost shaping. Specifically let us define the disadvantage $A ^ { e } ( s , a ) = c ( s , a ) ^ { \\circ } + \\gamma \\mathbb { E } _ { s ^ { \\prime } \\sim P _ { s a } } [ V ^ { e } ( s ^ { \\prime } ) ] - V ^ { e } ( s )$ . As cost shaping does not change the optimal policy, we can rephrase the original policy search problem using the shaped cost: ",
337
+ "bbox": [
338
+ 174,
339
+ 128,
340
+ 825,
341
+ 186
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "equation",
347
+ "img_path": "images/9eeeab7e50421a167ecbb633d84fb8ef142c374ed98765d8096f78a25c91b62d.jpg",
348
+ "text": "$$\n\\pi ^ { * } = \\arg \\operatorname* { m i n } _ { \\pi } \\mathbb { E } [ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } A ^ { e } ( s _ { t } , a _ { t } ) | s _ { 0 } = s , a \\sim \\pi ] ,\n$$",
349
+ "text_format": "latex",
350
+ "bbox": [
351
+ 334,
352
+ 193,
353
+ 661,
354
+ 234
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "for all $s \\in S$ . Though Eq. 2 provides an alternative objective for policy search, it could be as hard as the original problem as $\\begin{array} { r } { \\bar { \\mathbb { E } } [ \\sum _ { t } \\gamma ^ { t } A ^ { e } ( s _ { t } , a _ { t } ) ] } \\end{array}$ is just equal to $\\mathbb { E } [ \\sum _ { t } \\gamma ^ { t } c ( s _ { t } , a _ { t } ) - V ^ { e } ( s _ { 0 } ) ]$ , which can be easily verified using the definition of cost shaping and a telescoping sum trick. ",
361
+ "bbox": [
362
+ 174,
363
+ 241,
364
+ 823,
365
+ 284
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "As directly optimizing Eq 2 is as difficult as policy search in the original MDP, previous $\\mathrm { I L }$ algorithms such as AGGREVATE essentially ignore temporal correlations between states and actions along the planning horizon and directly perform a policy iteration over the expert policy at every state, i.e., they are greedy with respect to $A ^ { e }$ as $\\begin{array} { r } { \\hat { \\pi } ( s ) = \\arg \\operatorname* { m i n } _ { a } A ^ { e } ( s , a ) , \\forall s \\in \\mathcal { S } } \\end{array}$ . The policy iteration theorem guarantees that such a greedy policy $\\hat { \\pi }$ performs at least as well as the expert. Hence, when the expert is optimal, the greedy policy $\\hat { \\pi }$ is guaranteed to be optimal. However when $V ^ { e }$ is not the optimal value function, the greedy policy $\\hat { \\pi }$ over $A ^ { e }$ is a one-step deviation improvement over the expert but is not guaranteed to be close to the optimal $\\pi ^ { * }$ . We analyze in detail how poor the policy resulting from such a greedy policy improvement method could be when $V ^ { e }$ is far away from the optimal value function in Sec. 3. ",
372
+ "bbox": [
373
+ 173,
374
+ 289,
375
+ 825,
376
+ 429
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "3 EFFECTIVENESS OF COST-TO-GO ORACLE ON PLANNING HORIZON",
383
+ "text_level": 1,
384
+ "bbox": [
385
+ 171,
386
+ 449,
387
+ 761,
388
+ 467
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "In this section we study the dependency of effective planning horizon on the cost-to-go oracle. We focus on the setting where we have access to an oracle $\\hat { V } ^ { e } ( s )$ which approximates the cost-to-go of some expert policy $\\pi ^ { e }$ (e.g., $V ^ { e }$ could be designed by domain knowledge $\\mathrm { N g }$ et al., 1999) or learned from a set of expert demonstrations). We assume the oracle is close to $V _ { \\mathcal { M } _ { 0 } } ^ { * }$ , but imperfect: $| \\hat { V } ^ { e } - V _ { \\mathcal { M } _ { 0 } } ^ { * } | = \\epsilon$ for some $\\epsilon \\in \\mathbb { R } ^ { + }$ . We first show that with such an imperfect oracle, previous $\\mathrm { I L }$ algorithms AGGREVATE and AGGREVATE D (Ross & Bagnell, 2014; Sun et al., 2017) are only guaranteed to learn a policy that is $\\gamma \\epsilon / ( 1 - \\gamma )$ away from the optimal. Let us define the expected total cost for any policy $\\pi$ as $J ( \\pi ) = \\mathbb { E } _ { s _ { 0 } \\sim v } \\left[ V _ { \\mathcal { M } _ { 0 } } ^ { \\pi } ( s _ { 0 } ) \\right]$ , measured under some initial state distribution $v$ and the original MDP $\\mathcal { M } _ { 0 }$ . ",
395
+ "bbox": [
396
+ 173,
397
+ 481,
398
+ 826,
399
+ 614
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "Theorem 3.1. There exists an MDP and an imperfect oracle $\\hat { V } ^ { e } ( s )$ with $| \\hat { V } ^ { e } ( s ) - V _ { \\mathcal { M } _ { 0 } , h } ^ { * } ( s ) | =$ \u000f, such that the performance of the induced policy from the cost-to-go oracle $\\hat { \\pi } ^ { * } =$ $\\arg \\operatorname* { m i n } _ { a } \\Big [ c ( s , a ) + \\gamma \\mathbb { E } _ { s ^ { \\prime } \\sim P _ { s a } } [ \\hat { V } ^ { e } ( s ^ { \\prime } ) ] \\Big ]$ is at least $\\Omega ( \\gamma \\epsilon / ( 1 - \\gamma ) )$ away from the optimal policy $\\pi ^ { * }$ : ",
406
+ "bbox": [
407
+ 173,
408
+ 619,
409
+ 825,
410
+ 674
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "equation",
416
+ "img_path": "images/ba6421da7be698d6baace476cad143acaf089c7de27ddcbf16cea74dd708fbc5.jpg",
417
+ "text": "$$\nJ ( \\hat { \\pi } ^ { * } ) - J ( \\pi ^ { * } ) \\geq \\Omega \\left( \\frac { \\gamma } { 1 - \\gamma } \\epsilon \\right) .\n$$",
418
+ "text_format": "latex",
419
+ "bbox": [
420
+ 388,
421
+ 681,
422
+ 609,
423
+ 717
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "The proof with the constructed example can be found in Appendix A. Denote $\\hat { Q } ^ { e } ( s , a ) = c ( s , a ) +$ $\\gamma \\mathbb { E } _ { s ^ { \\prime } } [ \\hat { V } ^ { e } ( s ^ { \\prime } ) ]$ , in high level, we construct an example where $\\hat { Q } ^ { e }$ is close to $Q ^ { * }$ in terms of $\\| \\hat { Q } ^ { e } - $ $Q ^ { * } \\| _ { \\infty }$ , but the order of the actions induced by $\\hat { Q } ^ { e }$ is different from the order of the actions from $Q ^ { * }$ , hence forcing the induced policy $\\hat { \\pi } ^ { * }$ to make mistakes. ",
430
+ "bbox": [
431
+ 173,
432
+ 732,
433
+ 825,
434
+ 795
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "As AGGREVATE at best computes a policy that is one-step improvement over the oracle, i.e., $\\hat { \\pi } ^ { * } =$ $\\arg \\operatorname* { m i n } _ { a } \\Big [ c ( s , a ) + \\gamma \\mathbb { E } _ { s ^ { \\prime } \\sim P _ { s a } } \\bar { [ V ^ { e } ( { s ^ { \\prime } } ) ] } \\Big ]$ , it eventually has to suffer from the above lower bound. This $\\epsilon$ gap in fact is not surprising as AGGREVATE is a one-step greedy algorithm in a sense that it is only optimizing the one-step cost function $c ^ { \\prime }$ from the reshaped MDP $\\mathcal { M }$ . To see this, note that the cost of the reshaped MDP $\\mathcal { M }$ is $\\mathbb { E } [ c ^ { \\prime } ( s , a ) ] = [ c ( s , a ) + \\gamma \\mathbb { E } _ { s ^ { \\prime } \\sim P _ { s a } } \\hat { V } ^ { e } ( s ^ { \\prime } ) - \\hat { V } ^ { e } ( s ) ]$ , and we have $\\begin{array} { r } { \\hat { \\pi } ^ { * } ( s ) = \\arg \\operatorname* { m i n } _ { a } \\mathbb { E } [ c ^ { \\prime } ( s , a ) ] } \\end{array}$ . Hence AGGREVATE can be regarded as a special algorithm that aims to optimizing the one-step cost of MDP $\\mathcal { M }$ that is reshaped from the original MDP $\\mathcal { M } _ { 0 }$ using the cost-to-go oracle. ",
441
+ "bbox": [
442
+ 173,
443
+ 800,
444
+ 825,
445
+ 924
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "Though when the cost-to-go oracle is imperfect, AGGREVATE will suffer from the above lower bound due to being greedy, when the cost-to-go oracle is perfect, i.e., $\\hat { V } ^ { e } = V ^ { * }$ , being greedy on one-step cost makes perfect sense. To see this, use the property of the cost shaping $\\mathrm { N g }$ et al., 1999), we can verify that when $\\hat { V } ^ { e } = V ^ { * }$ : ",
452
+ "bbox": [
453
+ 173,
454
+ 102,
455
+ 825,
456
+ 162
457
+ ],
458
+ "page_idx": 4
459
+ },
460
+ {
461
+ "type": "equation",
462
+ "img_path": "images/4d73247096383f71927694671b41d4f4a200910e3625be0b760d4e293fc8936e.jpg",
463
+ "text": "$$\nV _ { \\mathcal { M } } ^ { * } ( s ) = 0 , \\quad \\pi _ { \\mathcal { M } } ^ { * } ( s ) = \\arg \\operatorname* { m i n } _ { a } \\mathbb { E } [ c ^ { \\prime } ( s , a ) ] , \\quad \\forall s \\in \\mathcal { S } .\n$$",
464
+ "text_format": "latex",
465
+ "bbox": [
466
+ 312,
467
+ 169,
468
+ 686,
469
+ 191
470
+ ],
471
+ "page_idx": 4
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "Namely the optimal policy on the reshaped MDP $\\mathcal { M }$ only optimizes the one-step cost, which indicates that the optimal cost-to-go oracle shortens the planning horizon to one: finding the optimal policy on $\\mathcal { M } _ { 0 }$ becomes equivalent to optimizing the immediate cost function on $\\mathcal { M }$ at every state $s$ . ",
476
+ "bbox": [
477
+ 174,
478
+ 196,
479
+ 825,
480
+ 239
481
+ ],
482
+ "page_idx": 4
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "When the cost-to-go oracle is $\\epsilon$ away from the optimality, we lose the one-step greedy property shown in Eq. 4. In the next section, we show that how we can break the lower bound $\\Omega ( \\epsilon / ( 1 - \\gamma ) )$ only with access to an imperfect cost-to-go oracle $\\hat { V } ^ { e }$ , by being less greedy and looking head for more than one-step. ",
487
+ "bbox": [
488
+ 173,
489
+ 246,
490
+ 825,
491
+ 306
492
+ ],
493
+ "page_idx": 4
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "3.1 OUTPERFORMING THE EXPERT ",
498
+ "text_level": 1,
499
+ "bbox": [
500
+ 176,
501
+ 321,
502
+ 429,
503
+ 337
504
+ ],
505
+ "page_idx": 4
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "Given the reshaped MDP $\\mathcal { M }$ with $\\hat { V } ^ { e }$ as the potential function, as we mentioned in Sec. 2.2, directly optimizing Eq. 2 is as difficult as the original policy search problem, we instead propose to minimize the total cost of a policy $\\pi$ over a finite $k \\geq 1$ steps at any state $s \\in S$ : ",
510
+ "bbox": [
511
+ 174,
512
+ 347,
513
+ 825,
514
+ 390
515
+ ],
516
+ "page_idx": 4
517
+ },
518
+ {
519
+ "type": "equation",
520
+ "img_path": "images/dfaff605ea378a79cac5754dabdf9e9e7ea742c1d70e71fc43491097dde6bba1.jpg",
521
+ "text": "$$\n\\mathbb { E } \\Big [ \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ^ { \\prime } ( s _ { i } , a _ { i } ) | s _ { 1 } = s ; a \\sim \\pi \\Big ] .\n$$",
522
+ "text_format": "latex",
523
+ "bbox": [
524
+ 372,
525
+ 396,
526
+ 624,
527
+ 439
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "Using the definition of cost shaping and telescoping sum trick,we can re-write Eq. 5 in the following format, which we define as $k$ -step disadvantage with respect to the cost-to-go oracle: ",
534
+ "bbox": [
535
+ 174,
536
+ 444,
537
+ 825,
538
+ 473
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "equation",
544
+ "img_path": "images/609a929f379d237d60d4984ff8ab90798a726d06ad088233ddce9c5ae2512fda.jpg",
545
+ "text": "$$\n\\mathbb { E } \\Big [ \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } \\hat { V } ^ { e } ( s _ { k + 1 } ) - \\hat { V } ^ { e } ( s _ { 1 } ) | s _ { 1 } = s ; a \\sim \\pi \\Big ] , \\forall s \\in \\mathcal { S } .\n$$",
546
+ "text_format": "latex",
547
+ "bbox": [
548
+ 261,
549
+ 478,
550
+ 735,
551
+ 521
552
+ ],
553
+ "page_idx": 4
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "We assume that our policy class $\\Pi$ is rich enough that there always exists a policy $\\hat { \\pi } ^ { * } \\in \\Pi$ that can simultaneously minimizes the $k -$ step disadvantage at every state (e.g., policies in tabular representation in discrete MDPs). Note that when $k = 1$ , minimizing Eq. 6 becomes the problem of finding a policy that minimizes the disadvantage $A _ { \\mathcal { M } _ { 0 } } ^ { e } ( s , a )$ with respect to the expert and reveals AGGREVATE. ",
558
+ "bbox": [
559
+ 173,
560
+ 525,
561
+ 825,
562
+ 597
563
+ ],
564
+ "page_idx": 4
565
+ },
566
+ {
567
+ "type": "text",
568
+ "text": "The following theorem shows that to outperform expert, we can optimize Eq. 6 with $k > 1$ . Let us denote the policy that minimizes Eq. 6 in every state as $\\hat { \\pi } ^ { * }$ , and the value function of $\\hat { \\pi } ^ { * }$ as $V ^ { \\hat { \\pi } ^ { * } }$ . ",
569
+ "bbox": [
570
+ 171,
571
+ 603,
572
+ 825,
573
+ 633
574
+ ],
575
+ "page_idx": 4
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Theorem 3.2. Assume $\\hat { \\pi } ^ { * }$ minimizes Eq. 6 for every state $s \\in S$ with $k > 1$ and $| \\hat { V } ^ { e } ( s ) - V ^ { * } ( s ) | =$ $\\Theta ( \\epsilon ) , \\forall s$ . We have : ",
580
+ "bbox": [
581
+ 174,
582
+ 638,
583
+ 823,
584
+ 667
585
+ ],
586
+ "page_idx": 4
587
+ },
588
+ {
589
+ "type": "equation",
590
+ "img_path": "images/565f0feca138756b6e8195f96957546a08f1d5dfedf6e40b3b99903e70b71efd.jpg",
591
+ "text": "$$\nJ ( \\hat { \\pi } ^ { * } ) - J ( \\pi ^ { * } ) \\leq O \\left( \\frac { \\gamma ^ { k } } { 1 - \\gamma ^ { k } } \\epsilon \\right)\n$$",
592
+ "text_format": "latex",
593
+ "bbox": [
594
+ 387,
595
+ 672,
596
+ 611,
597
+ 709
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "Compare the above theorem to the lower bound shown in Theorem 3.1, we can see that when $k > 1$ , we are able to learn a policy that performs better than the policy induced by the oracle (i.e., ${ \\hat { \\pi } } ^ { * } ( s ) =$ $\\mathrm { a r g m i n } _ { a } \\hat { Q } ^ { e } ( s , a ) )$ by at least $\\begin{array} { r } { \\big ( \\frac { \\gamma } { 1 - \\gamma } - \\frac { \\gamma ^ { k } } { 1 - \\gamma ^ { k } } \\big ) \\epsilon } \\end{array}$ . The proof can be found in Appendix B. ",
604
+ "bbox": [
605
+ 173,
606
+ 720,
607
+ 825,
608
+ 772
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "Theorem 3.2 and Theorem 3.1 together summarize that when the expert is imperfect, simply computing a policy that minimizes the one-step disadvantage (i.e., $k = 1 )$ ) is not sufficient to guarantee near-optimal performance; however, optimizing a $k$ -step disadvantage with $k > 1$ leads to a policy that guarantees to outperform the policy induced by the oracle (i.e., the best possible policy that can be learnt using AGGREVATE and AGGREVATED). Also our theorem provides a concrete performance gap between the policy that optimizes Eq. 6 for $k > 1$ and the policy that induced by the oracle, which is missing in previous work (e.g., (Chang et al., 2015)). ",
615
+ "bbox": [
616
+ 173,
617
+ 776,
618
+ 825,
619
+ 876
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "As we already showed, if we set $k = 1$ , then optimizing Eq. 6 becomes optimizing the disadvantage over the expert $A _ { \\mathcal { M } _ { 0 } } ^ { e }$ , which is exactly what AGGREVATE aims for. When we set $k = \\infty$ , optimizing Eq. 6 or Eq. 5 just becomes optimizing the total cost of the original MDP. Optimizing over a shorter ",
626
+ "bbox": [
627
+ 174,
628
+ 881,
629
+ 825,
630
+ 924
631
+ ],
632
+ "page_idx": 4
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "1: Input: The original MDP $\\mathcal { M } _ { 0 }$ . Truncation Step $k$ . Oracle $V ^ { e }$ . \n2: Initialize policy $\\pi _ { \\theta _ { 0 } }$ with parameter $\\theta _ { 0 }$ and truncated advantage estimator $\\hat { A } _ { \\mathcal { M } } ^ { 0 , k }$ . \n3: for $\\mathrm { \\Omega } _ { \\mathrm { n } } = 0$ , ... do \n4: Reset system. \n5: Execute $\\pi _ { \\theta _ { n } }$ to generate a set of trajectories $\\{ \\tau _ { i } \\} _ { i = 1 } ^ { N }$ . \n6: Reshape cost $c ^ { \\prime } \\bar { ( s _ { t } , \\underline { { { a _ { t } } } } ) } = c ( s _ { t } , a _ { t } ) + V _ { t + 1 } ^ { e } \\bar { ( s _ { t + 1 } ) } \\stackrel { . } { - } V _ { t } ^ { e } ( s _ { t } )$ , for every $t \\in [ 1 , | \\tau _ { i } | ]$ in every \ntrajectory $\\tau _ { i } , i \\in [ N ]$ . \n7: Compute gradient: ",
637
+ "bbox": [
638
+ 181,
639
+ 122,
640
+ 823,
641
+ 236
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "equation",
647
+ "img_path": "images/c63faf26a3cfaa525a8154d21c312c4d8a5e620a82d5e88f156179828b2a7d30.jpg",
648
+ "text": "$$\n\\sum _ { \\tau _ { i } } \\sum _ { t } \\nabla _ { \\boldsymbol { \\theta } } \\big ( \\ln \\pi _ { \\boldsymbol { \\theta } } \\big ( a _ { t } | s _ { t } \\big ) \\big ) \\big | _ { { \\boldsymbol \\theta } = { \\boldsymbol { \\theta } } _ { n } } \\hat { A } _ { \\mathcal { M } } ^ { \\pi _ { n } , k } \\big ( s _ { t } , a _ { t } \\big )\n$$",
649
+ "text_format": "latex",
650
+ "bbox": [
651
+ 372,
652
+ 242,
653
+ 666,
654
+ 277
655
+ ],
656
+ "page_idx": 5
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "8: Update disadvantage estimator to $\\hat { A } _ { \\mathcal { M } } ^ { \\pi _ { n } , k }$ using $\\{ \\tau _ { i } \\} _ { i }$ with reshaped cost $c ^ { \\prime }$ ",
661
+ "bbox": [
662
+ 178,
663
+ 286,
664
+ 702,
665
+ 304
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "10: end for ",
672
+ "bbox": [
673
+ 176,
674
+ 318,
675
+ 253,
676
+ 330
677
+ ],
678
+ "page_idx": 5
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "finite horizon is easier than optimizing over the entire infinite long horizon due to advantages such as smaller variance of the empirical estimation of the objective function, less temporal correlations between states and costs along a shorter trajectory. Hence our main theorem essentially provides a tradeoff between the optimality of the solution $\\hat { \\pi } ^ { * }$ and the difficulty of the underlying optimization problem. ",
683
+ "bbox": [
684
+ 174,
685
+ 359,
686
+ 825,
687
+ 430
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "4 PRACTICAL ALGORITHM ",
694
+ "text_level": 1,
695
+ "bbox": [
696
+ 176,
697
+ 450,
698
+ 413,
699
+ 467
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "Given the original MDP $\\mathcal { M } _ { 0 }$ and the cost-to-go oracle $\\hat { V } ^ { e }$ , the reshaped MDP’s cost function $c ^ { \\prime }$ is obtained from Eq. 1 using the cost-to-go oracle as a potential function. Instead of directly applying RL algorithms on $\\mathcal { M } _ { 0 }$ , we use the fact that the cost-to-go oracle shortens the effective planning horizon of $\\mathcal { M }$ , and propose THOR: Truncated HORizon Policy Search summarized in Alg. 1. The general idea of THOR is that instead of searching for policies that optimize the total cost over the entire infinitely long horizon, we focus on searching for polices that minimizes the total cost over a truncated horizon, i.e., a $k -$ step time window. Below we first show how we derive THOR from the insight we obtained in Sec. 3. ",
706
+ "bbox": [
707
+ 173,
708
+ 479,
709
+ 826,
710
+ 593
711
+ ],
712
+ "page_idx": 5
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "Let us define a $k$ -st truncated value function $V _ { \\mathcal { M } } ^ { \\pi , k }$ and similar state action value function $Q _ { \\mathcal { M } } ^ { \\pi , k }$ on the reshaped MDP $\\mathcal { M }$ ",
717
+ "bbox": [
718
+ 173,
719
+ 599,
720
+ 823,
721
+ 631
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "equation",
727
+ "img_path": "images/dcba1130782b5b067ab41d949d07adec8498cba0f3b77cc86058d74972d02453.jpg",
728
+ "text": "$$\n\\begin{array} { r l } & { V _ { \\mathcal { M } } ^ { \\pi , k } ( s ) = \\mathbb { E } \\Big [ \\displaystyle \\sum _ { t = 1 } ^ { k } \\gamma ^ { t - 1 } c ^ { \\prime } ( s _ { t } , a _ { t } ) | s _ { 1 } = s , a \\sim \\pi \\Big ] , } \\\\ & { Q _ { \\mathcal { M } } ^ { \\pi , k } ( s , a ) = \\mathbb { E } \\Big [ c ^ { \\prime } ( s , a ) + \\displaystyle \\sum _ { i = 1 } ^ { k - 1 } \\gamma ^ { i } c ^ { \\prime } ( s _ { i } , a _ { i } ) | s _ { i } \\sim P _ { s a } , a _ { i } \\sim \\pi ( s _ { i } ) \\Big ] , } \\end{array}\n$$",
729
+ "text_format": "latex",
730
+ "bbox": [
731
+ 281,
732
+ 637,
733
+ 717,
734
+ 727
735
+ ],
736
+ "page_idx": 5
737
+ },
738
+ {
739
+ "type": "text",
740
+ "text": "At any time state $s , V _ { \\mathcal { M } } ^ { \\pi , k }$ only considers (reshaped) cost signals $c ^ { \\prime }$ from a $\\mathbf { k }$ -step time window. ",
741
+ "bbox": [
742
+ 173,
743
+ 733,
744
+ 789,
745
+ 750
746
+ ],
747
+ "page_idx": 5
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "We are interested in searching for a policy that can optimizes the total cost over a finite $\\mathbf { k }$ -step horizon as shown in Eq. 5. For MDPs with large or continuous state spaces, we cannot afford to enumerate all states $s \\in { \\mathcal { S } }$ to find a policy that minimizes the $k -$ step disadvantage function as in Eq. 5. Instead one can leverage the approximate policy iteration idea and minimize the weighted cost over state space using a state distribution $\\nu$ (Kakade & Langford, 2002; Bagnell et al., 2004): ",
752
+ "bbox": [
753
+ 173,
754
+ 755,
755
+ 825,
756
+ 825
757
+ ],
758
+ "page_idx": 5
759
+ },
760
+ {
761
+ "type": "equation",
762
+ "img_path": "images/b65f759e13c3bfec893e23678eadf2206468017f9d2ceb6c81ab620d6c642b7d.jpg",
763
+ "text": "$$\n\\operatorname* { m i n } _ { \\pi \\in \\Pi } \\mathbb { E } _ { s _ { 0 } \\sim \\nu } \\left[ \\mathbb { E } \\Big [ \\sum _ { i = 1 } ^ { k } \\gamma ^ { i } c ^ { \\prime } ( s _ { i } , a _ { i } ) | a \\sim \\pi \\Big ] \\right] .\n$$",
764
+ "text_format": "latex",
765
+ "bbox": [
766
+ 357,
767
+ 832,
768
+ 638,
769
+ 876
770
+ ],
771
+ "page_idx": 5
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "For parameterized policy $\\pi$ (e.g., neural network policies), we can implement the minimization in Eq. 10 using gradient-based update procedures (e.g., Stochastic Gradient Descent, Natural Gradient (Kakade, 2002; Bagnell & Schneider, 2003)) in the policy’s parameter space. In the setting where the system cannot be reset to any state, a typical choice of exploration policy is the currently learned policy (possibly mixed with a random process (Lillicrap et al., 2015) to futher encourage exploration). Denote $\\pi _ { n }$ as the currently learned policy after iteration $n$ and $P r _ { \\pi _ { n } } ( \\cdot )$ as the average state distribution induced by executing $\\pi _ { n }$ (parameterized by $\\theta _ { n }$ ) on the MDP. Replacing the exploration distribution by ${ P r } _ { \\pi _ { n } } ( \\cdot )$ in Eq. 10, and taking the derivative with respect to the policy parameter $\\theta$ , the policy gradient is: ",
776
+ "bbox": [
777
+ 174,
778
+ 882,
779
+ 825,
780
+ 924
781
+ ],
782
+ "page_idx": 5
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "",
787
+ "bbox": [
788
+ 173,
789
+ 102,
790
+ 826,
791
+ 188
792
+ ],
793
+ "page_idx": 6
794
+ },
795
+ {
796
+ "type": "equation",
797
+ "img_path": "images/bd3928672cc4b735dc03d3fb2c9ed432af6e6e76fa64eecccc0191ac26689f85.jpg",
798
+ "text": "$$\n\\begin{array} { r l } { { \\mathbb { E } _ { s \\sim P r _ { \\pi _ { n } } } \\Bigg [ \\mathbb { E } _ { \\tau ^ { k } \\sim \\pi _ { n } } [ \\sum _ { i = 1 } ^ { k } \\nabla _ { \\theta } \\ln \\pi ( a _ { i } | s _ { i } ; \\theta ) ( \\sum _ { j = i } ^ { k + i } \\gamma ^ { j - i } c ^ { \\prime } ( s _ { j } , a _ { j } ) ) ] \\Bigg ] } \\Bigg ] } \\\\ & { \\approx \\mathbb { E } _ { s \\sim P r _ { \\pi _ { n } } } [ \\mathbb { E } _ { \\tau ^ { k } \\sim \\pi _ { n } } [ \\sum _ { i = 1 } ^ { k } \\nabla _ { \\theta } \\ln \\pi ( a _ { i } | s _ { i } ; \\theta ) Q _ { \\mathcal { M } } ^ { \\pi , k } ( s _ { i } , a _ { i } ) ] ] } \\end{array}\n$$",
799
+ "text_format": "latex",
800
+ "bbox": [
801
+ 289,
802
+ 205,
803
+ 705,
804
+ 301
805
+ ],
806
+ "page_idx": 6
807
+ },
808
+ {
809
+ "type": "text",
810
+ "text": "where $\\tau ^ { k } \\sim \\pi _ { n }$ denotes a partial $k -$ step trajectory $\\tau ^ { k } = \\{ s _ { 1 } , a _ { 1 } , . . . , s _ { k } , a _ { k } | s _ { 1 } = s \\}$ sampled from executing $\\pi _ { n }$ , replacing chulman et $Q _ { \\mathcal { M } } ^ { \\pi , k }$ $\\pi _ { n }$ on the MDP from state by a critic approximated by Generalized disadvantage Estimator (GAE) 016), we get back to the gradient used in Alg. 1: $s$ . Replacing the expectation by empirical samples from $\\hat { A } _ { \\mathcal { M } } ^ { \\pi , k }$ ",
811
+ "bbox": [
812
+ 174,
813
+ 318,
814
+ 825,
815
+ 378
816
+ ],
817
+ "page_idx": 6
818
+ },
819
+ {
820
+ "type": "equation",
821
+ "img_path": "images/10b4958a755369c971b6faa6833f7e329f47fec23a64c101e7215c0b06062cb6.jpg",
822
+ "text": "$$\n\\begin{array} { r l } { { \\mathbb { E } _ { s \\sim P r _ { \\pi _ { n } } } \\Bigg [ \\mathbb { E } _ { \\tau _ { k } \\sim \\pi _ { n } } [ \\sum _ { i = 1 } ^ { k } \\nabla _ { \\theta } \\ln \\pi ( a _ { i } | s _ { i } ; \\theta ) Q _ { \\mathcal { M } } ^ { \\pi , k } ( s _ { i } , a _ { i } ) ] \\Bigg ] } } \\\\ & { \\approx k \\sum _ { \\tau } \\Big ( \\sum _ { t = 1 } ^ { | \\tau | } \\nabla _ { \\theta } \\ln ( \\pi ( a _ { t } | s _ { t } ; \\theta ) ) \\hat { A } _ { \\mathcal { M } } ^ { \\pi , k } ( s _ { t } , a _ { t } ) \\Big ) / H , } \\end{array}\n$$",
823
+ "text_format": "latex",
824
+ "bbox": [
825
+ 316,
826
+ 395,
827
+ 678,
828
+ 486
829
+ ],
830
+ "page_idx": 6
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "where $| \\tau |$ denotes the length of the trajectory $\\tau$ ",
835
+ "bbox": [
836
+ 174,
837
+ 502,
838
+ 485,
839
+ 518
840
+ ],
841
+ "page_idx": 6
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "4.1 INTERPRETATION USING TRUNCATED BACK-PROPAGATION THROUGH TIME",
846
+ "text_level": 1,
847
+ "bbox": [
848
+ 173,
849
+ 546,
850
+ 738,
851
+ 563
852
+ ],
853
+ "page_idx": 6
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "If using the classic policy gradient formulation on the reshaped MDP $\\mathcal { M }$ we should have the following expression, which is just a re-formulation of the classic policy gradient (Williams, 1992): ",
858
+ "bbox": [
859
+ 171,
860
+ 578,
861
+ 825,
862
+ 608
863
+ ],
864
+ "page_idx": 6
865
+ },
866
+ {
867
+ "type": "equation",
868
+ "img_path": "images/cf1bceb0e6c2cb9f812301b70a8c77a35fa7fd5e4afe66e08c868fa77f7877af.jpg",
869
+ "text": "$$\n\\mathbb { E } _ { \\tau } \\sum _ { t = 1 } ^ { | \\tau | } \\big ( c _ { t } ^ { \\prime } \\sum _ { i = 0 } ^ { t - 1 } ( \\nabla _ { \\theta } \\ln \\pi ( a _ { t - i } | s _ { t - i } ; \\theta ) ) \\big ) ,\n$$",
870
+ "text_format": "latex",
871
+ "bbox": [
872
+ 367,
873
+ 626,
874
+ 629,
875
+ 670
876
+ ],
877
+ "page_idx": 6
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "which is true since the cost $c _ { i } ^ { \\prime }$ (we denote $c _ { i } ^ { \\prime } ( s , a )$ as $c _ { i } ^ { \\prime }$ for notation simplicity) at time step $i$ is correlated with the actions at time step $t = i$ all the way back to the beginning $t = 1$ . In other words, in the policy gradient format, the effectiveness of the cost $c _ { t }$ is back-propagated through time all the way back the first step. Our proposed gradient formulation in Alg. 1 shares a similar spirit of Truncated Back-Propagation Through Time (Zipser, 1990), and can be regarded as a truncated version of the classic policy gradient formulation: at any time step $t$ , the cost $c ^ { \\prime }$ is back-propagated through time at most $k$ -steps: ",
882
+ "bbox": [
883
+ 173,
884
+ 688,
885
+ 825,
886
+ 787
887
+ ],
888
+ "page_idx": 6
889
+ },
890
+ {
891
+ "type": "equation",
892
+ "img_path": "images/0c62ed8c17a2404928864988ea594fcdb1fa14001a5a9833fc8e6fd30ad1fa01.jpg",
893
+ "text": "$$\n\\mathbb { E } _ { \\tau } \\sum _ { t = 1 } ^ { | \\tau | } \\big ( c _ { t } ^ { \\prime } \\sum _ { i = 0 } ^ { k - 1 } ( \\nabla _ { \\theta } \\ln \\pi ( a _ { t - i } | s _ { t - i } ; \\theta ) ) \\big ) ,\n$$",
894
+ "text_format": "latex",
895
+ "bbox": [
896
+ 366,
897
+ 804,
898
+ 629,
899
+ 849
900
+ ],
901
+ "page_idx": 6
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "In Eq. 13, for any time step $t$ , we ignore the correlation between $c _ { t } ^ { \\prime }$ and the actions that are executed $k$ -step before $t$ , hence elimiates long temporal correlations between costs and old actions. In fact, AGGREVATE D (Sun et al., 2017), a policy gradient version of AGGREVATE, sets $k = 1$ and can be regarded as No Back-Propagation Through Time. ",
906
+ "bbox": [
907
+ 173,
908
+ 867,
909
+ 825,
910
+ 924
911
+ ],
912
+ "page_idx": 6
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "4.2 CONNECTION TO IL AND RL ",
917
+ "text_level": 1,
918
+ "bbox": [
919
+ 174,
920
+ 103,
921
+ 415,
922
+ 118
923
+ ],
924
+ "page_idx": 7
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "The above gradient formulation provides a natural half-way point between $\\mathrm { I L }$ and RL. When $k = 1$ and $\\hat { V } ^ { e } = V _ { \\mathcal { M } _ { 0 } } ^ { * }$ (the optimal value function in the original MDP $\\mathcal { M } _ { 0 }$ ): ",
929
+ "bbox": [
930
+ 174,
931
+ 128,
932
+ 823,
933
+ 161
934
+ ],
935
+ "page_idx": 7
936
+ },
937
+ {
938
+ "type": "equation",
939
+ "img_path": "images/6d6900d2126ea36c2e5ff17408f2e38d32ea900734bd973331775adcf1588471.jpg",
940
+ "text": "$$\n\\begin{array} { r l } & { \\mathbb { E } _ { \\tau } \\Big [ \\displaystyle \\sum _ { t = 1 } ^ { | \\tau | } \\nabla _ { \\theta } ( \\ln \\pi _ { \\theta } ( a _ { t } | s _ { t } ) ) A _ { \\mathcal { M } } ^ { \\pi ^ { c } , 1 } ( s _ { t } , a _ { t } ) \\Big ] = \\mathbb { E } _ { \\tau } \\Big [ \\displaystyle \\sum _ { t = 1 } ^ { | \\tau | } \\nabla _ { \\theta } ( \\ln \\pi _ { \\theta } ( a _ { t } | s _ { t } ) ) Q _ { \\mathcal { M } } ^ { \\pi _ { \\epsilon } , 1 } ( s _ { t } , a _ { t } ) \\Big ] } \\\\ & { = \\mathbb { E } _ { \\tau } \\Big [ \\displaystyle \\sum _ { t = 1 } ^ { | \\tau | } \\nabla _ { \\theta } ( \\ln \\pi _ { \\theta } ( a _ { t } | s _ { t } ) ) \\mathbb { E } [ c ^ { \\prime } ( s _ { t } , a _ { t } ) ] \\Big ] = \\mathbb { E } _ { \\tau } \\Big [ \\displaystyle \\sum _ { t = 1 } ^ { | \\tau | } \\nabla _ { \\theta } ( \\ln \\pi _ { \\theta } ( a _ { t } | s _ { t } ) ) A _ { \\mathcal { M } _ { 0 } } ^ { \\pi ^ { * } } ( s _ { t } , a _ { t } ) \\Big ] , } \\end{array}\n$$",
941
+ "text_format": "latex",
942
+ "bbox": [
943
+ 204,
944
+ 169,
945
+ 767,
946
+ 261
947
+ ],
948
+ "page_idx": 7
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "where, for notation simplicity, we here use $\\mathbb { E } _ { \\tau }$ to represent the expectation over trajectories sampled from executing policy $\\pi _ { \\theta }$ , and $A _ { { \\mathcal { M } } _ { \\mathrm { . } } } ^ { \\pi ^ { * } }$ is the advantage function on the original MDP $\\mathcal { M } _ { 0 }$ . The fourth expression in the above equation is exactly the gradient proposed by AGGREVATED (Sun et al., 2017). AGGREVATED performs gradient descent with gradient in the format of the fourth expression in Eq. 14 to discourage the log-likelihood of an action $a _ { t }$ that has low advantage over $\\pi ^ { * }$ at a given state $s _ { t }$ . ",
953
+ "bbox": [
954
+ 173,
955
+ 265,
956
+ 825,
957
+ 351
958
+ ],
959
+ "page_idx": 7
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "On the other hand, when we set $k = \\infty$ , i.e., no truncation on horizon, then we return back to the classic policy gradient on the MDP $\\mathcal { M }$ obtained from cost shaping with $\\hat { V } ^ { e }$ . As optimizing $\\mathcal { M }$ is the same as optimizing the original MDP $\\mathcal { M } _ { 0 }$ $\\mathrm { N g }$ et al., 1999), our formulation is equivalent to a pure RL approach on $\\mathcal { M } _ { 0 }$ . In the extreme case when the oracle $\\hat { V } ^ { e }$ has nothing to do with the true optimal oracle $V ^ { * }$ , as there is no useful information we can distill from the oracle and RL becomes the only approach to solve $\\mathcal { M } _ { 0 }$ . ",
964
+ "bbox": [
965
+ 174,
966
+ 357,
967
+ 825,
968
+ 444
969
+ ],
970
+ "page_idx": 7
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "5 EXPERIMENTS ",
975
+ "text_level": 1,
976
+ "bbox": [
977
+ 176,
978
+ 464,
979
+ 326,
980
+ 479
981
+ ],
982
+ "page_idx": 7
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "We evaluated THOR on robotics simulators from OpenAI Gym (Brockman et al., 2016). Throughout this section, we report reward instead of cost, since OpenAI Gym by default uses reward. The baseline we compare against is TRPO-GAE (Schulman et al., 2016) and AGGREVATED (Sun et al., 2017). ",
987
+ "bbox": [
988
+ 174,
989
+ 496,
990
+ 825,
991
+ 551
992
+ ],
993
+ "page_idx": 7
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "To simulate oracles, we first train TRPO-GAE until convergence to obtain a policy as an expert $\\pi ^ { e }$ . We then collected a batch of trajectories by executing $\\pi ^ { e }$ . Finally, we use TD learning Sutton (1988) to train a value function $\\hat { V } ^ { e }$ that approximates $V ^ { e }$ . In all our experiments, we ignored $\\pi ^ { e }$ and only used the pre-trained $\\hat { V } ^ { e }$ for reward shaping. Hence our experimental setting simulates the situation where we only have a batch of expert demonstrations available, and not the experts themselves. This is a much harder setting than the interactive setting considered in previous work (Ross et al., 2011; Sun et al., 2017; Chang et al., 2015). Note that $\\pi ^ { e }$ is not guaranteed to be an optimal policy, and $\\hat { V } ^ { e }$ is only trained on the demonstrations from $\\pi ^ { e }$ , therefore the oracle $\\hat { V } ^ { e }$ is just a coarse estimator of V ∗M0 . Our goal is to show that, compared to AGGREVATED, THOR with $k > 1$ results in significantly better performance; compared to TRPO-GAE, THOR with some $k < < H$ converges faster and is more sample efficient. For fair comparison to RL approaches, we do not pre-train policy or critic $\\hat { A }$ using demonstration data, though initialization using demonstration data is suggested in theory and has been used in practice to boost the performance (Ross et al., 2011; Bahdanau et al., 2016). ",
998
+ "bbox": [
999
+ 173,
1000
+ 559,
1001
+ 825,
1002
+ 761
1003
+ ],
1004
+ "page_idx": 7
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "For all methods we report statistics (mean and standard deviation) from 25 seeds that are i.i.d generated. For trust region optimization on the actor $\\pi _ { \\theta }$ and GAE on the critic, we simply use the recommended parameters in the code-base from TRPO-GAE (Schulman et al., 2016). We did not tune any parameters except the truncation length $k$ . ",
1009
+ "bbox": [
1010
+ 174,
1011
+ 768,
1012
+ 825,
1013
+ 824
1014
+ ],
1015
+ "page_idx": 7
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "5.1 DISCRETE ACTION CONTROL ",
1020
+ "text_level": 1,
1021
+ "bbox": [
1022
+ 176,
1023
+ 842,
1024
+ 418,
1025
+ 856
1026
+ ],
1027
+ "page_idx": 7
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "We consider two discrete action control tasks with sparse rewards: Mountain-Car, Acrobot and a modified sparse reward version of CartPole. All simulations have sparse reward in the sense that no reward signal is given until the policy succeeds (e.g., Acrobot swings up). In these settings, pure RL approaches that rely on random exploration strategies, suffer from the reward sparsity. On the other hand, THOR can leverage oracle information for more efficient exploration. Results are shown in Fig. 1. ",
1032
+ "bbox": [
1033
+ 174,
1034
+ 867,
1035
+ 825,
1036
+ 924
1037
+ ],
1038
+ "page_idx": 7
1039
+ },
1040
+ {
1041
+ "type": "image",
1042
+ "img_path": "images/c0dd8c50bf04b425719647bf1d59345149e20ebb18bb0691da4da5e755d46154.jpg",
1043
+ "image_caption": [
1044
+ "Figure 1: Reward versus batch iterations of THOR with different $k$ and TRPO-GAE (blue) for Mountain car, Sparse Reward (SR) CartPole, and Acrobot with different horizon. Average rewards across 25 runs are shown in solid lines and averages $^ +$ std are shown in dotted lines. "
1045
+ ],
1046
+ "image_footnote": [],
1047
+ "bbox": [
1048
+ 236,
1049
+ 113,
1050
+ 767,
1051
+ 497
1052
+ ],
1053
+ "page_idx": 8
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "",
1058
+ "bbox": [
1059
+ 173,
1060
+ 580,
1061
+ 823,
1062
+ 609
1063
+ ],
1064
+ "page_idx": 8
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "Note that in our setting where $\\hat { V } ^ { e }$ is imperfect, THOR with $k > 1$ works much better than AGGREVATED (THOR with $k = 1$ ) in Acrobot. In Mountain Car, we observe that AGGREVATED achieves good performance in terms of the mean, but THOR with $k > 1$ (especially $k = 1 0$ ) results in much higher mean $^ +$ std, which means that once THOR receives the reward signal, it can leverage this signal to perform better than the oracles. ",
1069
+ "bbox": [
1070
+ 174,
1071
+ 617,
1072
+ 823,
1073
+ 688
1074
+ ],
1075
+ "page_idx": 8
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "We also show that THOR with $k > 1$ (but much smaller than $H$ ) can perform better than TRPOGAE. In general, as $k$ increases, we get better performance. We make the acrobot setting even harder by setting $H = 2 0 0$ to even reduce the chance of a random policy to receive reward signals. Compare Fig. 1 (c) to Fig. 1 (b), we can see that THOR with different settings of $k$ always learns faster than TRPO-GAE, and THOR with $k = 5 0$ and $k = 1 0 0$ significantly outperform TRPO-GAE in both mean and mean+std. This indicates that THOR can leverage both reward signals (to perform better than AGGREVATED) and the oracles (to learn faster or even outperform TRPO). ",
1080
+ "bbox": [
1081
+ 174,
1082
+ 694,
1083
+ 825,
1084
+ 792
1085
+ ],
1086
+ "page_idx": 8
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "5.2 CONTINUOUS ACTION CONTROL ",
1091
+ "text_level": 1,
1092
+ "bbox": [
1093
+ 176,
1094
+ 811,
1095
+ 441,
1096
+ 825
1097
+ ],
1098
+ "page_idx": 8
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "We tested our approach on simulators with continuous state and actions from MuJoCo simulators: a modified sparse reward Inverted Pendulum, a modifed sparse reward Inverted Double Pendulum, Hopper and Swimmer. Note that, compared to the sparse reward setting, Hopper and Swimmer do not have reward sparsity and policy gradient methods have shown great results (Schulman et al., 2015; 2016). Also, due to the much larger and more complex state space and control space compared to the simulations we consider in the previous section, the value function estimator $\\hat { V } ^ { e }$ is much less accurate in terms of estimating $V _ { \\mathcal { M } _ { 0 } } ^ { * }$ since the trajectories demonstrated from experts may only cover a very small part of the state and control space. Fig. 2 shows the results of our approach. For all simulations, we require $k$ to be around $2 0 \\% \\sim 3 0 \\%$ of the original planning horizon $H$ to achieve good performance. AGGREVATED $k = 1$ ) learned very little due to the imperfect value function estimator $\\hat { V } ^ { e }$ . We also tested $k = H$ , where we observe that reward shaping with $\\hat { V } ^ { e }$ gives better performance than TRPO-GAE. This empirical observation is consistent with the observation from $\\mathrm { N g }$ et al., 1999) ( $\\mathrm { N g }$ et al. (1999) used SARSA (Sutton, 1988), not policy gradient based methods). This indicates that even when $\\hat { V } ^ { e }$ is not close to $V ^ { * }$ , policy gradient methods can still employ the oracle $\\hat { V } ^ { e }$ just via reward shaping. ",
1103
+ "bbox": [
1104
+ 174,
1105
+ 838,
1106
+ 825,
1107
+ 924
1108
+ ],
1109
+ "page_idx": 8
1110
+ },
1111
+ {
1112
+ "type": "image",
1113
+ "img_path": "images/0a60fc25dd766e79cb183aadac82633c14d2c1ceb105e6f8c393a19d9cb3e718.jpg",
1114
+ "image_caption": [
1115
+ "Figure 2: Reward versus batch iterations of THOR with different $k$ and TRPO-GAE (blue) for Sparse Reward (SR) Inverted Pendulum, Sparse Reward Inverted-Double Pendulum, Swimmer and Hopper. Average rewards across 25 runs are shown in solid lines and averages $^ +$ std are shown in dotted lines. "
1116
+ ],
1117
+ "image_footnote": [],
1118
+ "bbox": [
1119
+ 233,
1120
+ 114,
1121
+ 776,
1122
+ 503
1123
+ ],
1124
+ "page_idx": 9
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "",
1129
+ "bbox": [
1130
+ 174,
1131
+ 577,
1132
+ 825,
1133
+ 708
1134
+ ],
1135
+ "page_idx": 9
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Finally, we also observed that our approach significantly reduces the variance of the performance of the learned polices (e.g., Swimmer in Fig. 2(a)) in all experiments, including the sparse reward setting. This is because truncation can significantly reduce the variance from the policy gradient estimation when $k$ is small compared to $H$ . ",
1140
+ "bbox": [
1141
+ 174,
1142
+ 715,
1143
+ 825,
1144
+ 771
1145
+ ],
1146
+ "page_idx": 9
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "6 CONCLUSION ",
1151
+ "text_level": 1,
1152
+ "bbox": [
1153
+ 174,
1154
+ 792,
1155
+ 318,
1156
+ 809
1157
+ ],
1158
+ "page_idx": 9
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "We propose a novel way of combining $\\mathrm { I L }$ and RL through the idea of cost shaping with an expert oracle. Our theory indicates that cost shaping with the oracle shortens the learner’s planning horizon as a function of the accuracy of the oracle compared to the optimal policy’s value function. Specifically, when the oracle is the optimal value function, we show that by setting $k = 1$ reveals previous imitation learning algorithm AGGREVATED. On the other hand, we show that when the oracle is imperfect, using planning horizon $k > 1$ can learn a policy that outperforms a policy that would been learned by AGGREVATE and AGGREVATED (i.e., $k = 1$ ). With this insight, we propose ",
1163
+ "bbox": [
1164
+ 174,
1165
+ 825,
1166
+ 825,
1167
+ 924
1168
+ ],
1169
+ "page_idx": 9
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "THOR (Truncated HORizon policy search), a gradient based policy search algorithm that explicitly focusing on minimizing the total cost over a finite planning horizon. Our formulation provides a natural half-way point between IL and RL, and experimentally we demonstrate that with a reasonably accurate oracle, our approach can outperform RL and IL baselines. ",
1174
+ "bbox": [
1175
+ 176,
1176
+ 103,
1177
+ 823,
1178
+ 159
1179
+ ],
1180
+ "page_idx": 10
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "We believe our high-level idea of shaping the cost with the oracle and then focusing on optimizing a shorter planning horizon is not limited to the practical algorithm we proposed in this work. In fact our idea can be combined with other RL techniques such as Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015), which has an extra potential advantage of storing extra information from the expert such as the offline demonstrations in its replay buffer (Vecer ˇ ´ık et al. (2017)). Though in our experiments, we simply used some expert’s demonstrations to pre-train $\\hat { V } ^ { e }$ using TD learning, there are other possible ways to learn a more accurate $\\hat { V } ^ { e }$ . For instance, if an expert is available during training (Ross et al., 2011), one can online update $\\hat { V } ^ { e }$ by querying expert’s feedback. ",
1185
+ "bbox": [
1186
+ 174,
1187
+ 166,
1188
+ 825,
1189
+ 284
1190
+ ],
1191
+ "page_idx": 10
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "ACKNOWLEDGEMENT ",
1196
+ "text_level": 1,
1197
+ "bbox": [
1198
+ 176,
1199
+ 306,
1200
+ 354,
1201
+ 320
1202
+ ],
1203
+ "page_idx": 10
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "Wen Sun is supported in part by Office of Naval Research contract N000141512365. The authors also thank Arun Venkatraman and Geoff Gordon for value discussion. ",
1208
+ "bbox": [
1209
+ 173,
1210
+ 337,
1211
+ 823,
1212
+ 364
1213
+ ],
1214
+ "page_idx": 10
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "REFERENCES ",
1219
+ "text_level": 1,
1220
+ "bbox": [
1221
+ 174,
1222
+ 386,
1223
+ 285,
1224
+ 401
1225
+ ],
1226
+ "page_idx": 10
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "Pieter Abbeel and Andrew Y Ng. Apprenticeship learning via inverse reinforcement learning. In ICML, pp. 1. ACM, 2004. ",
1231
+ "bbox": [
1232
+ 176,
1233
+ 409,
1234
+ 825,
1235
+ 438
1236
+ ],
1237
+ "page_idx": 10
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "J Andrew Bagnell and Jeff Schneider. Covariant policy search. In IJCAI, 2003. ",
1242
+ "bbox": [
1243
+ 173,
1244
+ 446,
1245
+ 694,
1246
+ 463
1247
+ ],
1248
+ "page_idx": 10
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "J Andrew Bagnell, Sham M Kakade, Jeff G Schneider, and Andrew Y Ng. Policy search by dynamic programming. In Advances in neural information processing systems, pp. 831–838, 2004. ",
1253
+ "bbox": [
1254
+ 173,
1255
+ 470,
1256
+ 825,
1257
+ 501
1258
+ ],
1259
+ "page_idx": 10
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. arXiv preprint arXiv:1607.07086, 2016. ",
1264
+ "bbox": [
1265
+ 173,
1266
+ 508,
1267
+ 825,
1268
+ 553
1269
+ ],
1270
+ "page_idx": 10
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016. ",
1275
+ "bbox": [
1276
+ 173,
1277
+ 561,
1278
+ 823,
1279
+ 590
1280
+ ],
1281
+ "page_idx": 10
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "Kai-wei Chang, Akshay Krishnamurthy, Alekh Agarwal, Hal Daume, and John Langford. Learning to search better than your teacher. In ICML, 2015. ",
1286
+ "bbox": [
1287
+ 173,
1288
+ 599,
1289
+ 823,
1290
+ 628
1291
+ ],
1292
+ "page_idx": 10
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "Sanjiban Choudhury, Ashish Kapoor, Gireeja Ranade, and Debadeepta Dey. Learning to gather information via imitation. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pp. 908–915. IEEE, 2017. ",
1297
+ "bbox": [
1298
+ 173,
1299
+ 638,
1300
+ 823,
1301
+ 681
1302
+ ],
1303
+ "page_idx": 10
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Hal Daume III, John Langford, and Daniel Marcu. Search-based structured prediction. ´ Machine learning, 2009. ",
1308
+ "bbox": [
1309
+ 171,
1310
+ 689,
1311
+ 823,
1312
+ 719
1313
+ ],
1314
+ "page_idx": 10
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Amir-massoud Farahmand, Daniel Nikolaev Nikovski, Yuji Igarashi, and Hiroki Konaka. Truncated approximate dynamic programming with task-dependent terminal value. In AAAI, pp. 3123–3129, 2016. ",
1319
+ "bbox": [
1320
+ 176,
1321
+ 728,
1322
+ 823,
1323
+ 771
1324
+ ],
1325
+ "page_idx": 10
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Victor Gabillon, Alessandro Lazaric, Mohammad Ghavamzadeh, and Bruno Scherrer. Classification-based policy iteration with a critic. 2011. ",
1330
+ "bbox": [
1331
+ 173,
1332
+ 781,
1333
+ 821,
1334
+ 809
1335
+ ],
1336
+ "page_idx": 10
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Sham Kakade. A natural policy gradient. NIPS, 2002. ",
1341
+ "bbox": [
1342
+ 173,
1343
+ 819,
1344
+ 529,
1345
+ 833
1346
+ ],
1347
+ "page_idx": 10
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In ICML, 2002. ",
1352
+ "bbox": [
1353
+ 171,
1354
+ 843,
1355
+ 825,
1356
+ 871
1357
+ ],
1358
+ "page_idx": 10
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. ",
1363
+ "bbox": [
1364
+ 176,
1365
+ 882,
1366
+ 823,
1367
+ 922
1368
+ ],
1369
+ "page_idx": 10
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Volodymyr Mnih et al. Human-level control through deep reinforcement learning. Nature, 2015. ",
1374
+ "bbox": [
1375
+ 171,
1376
+ 103,
1377
+ 807,
1378
+ 119
1379
+ ],
1380
+ "page_idx": 11
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Ashvin Nair, Bob McGrew, Marcin Andrychowicz, Wojciech Zaremba, and Pieter Abbeel. Overcoming exploration in reinforcement learning with demonstrations. arXiv preprint arXiv:1709.10089, 2017. ",
1385
+ "bbox": [
1386
+ 176,
1387
+ 127,
1388
+ 820,
1389
+ 170
1390
+ ],
1391
+ "page_idx": 11
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Andrew Y Ng. Shaping and policy search in reinforcement learning. PhD thesis, University of California, Berkeley, 2003. ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 178,
1399
+ 823,
1400
+ 208
1401
+ ],
1402
+ "page_idx": 11
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Andrew $\\mathrm { ~ Y ~ N ~ g ~ }$ , Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In ICML, volume 99, pp. 278–287, 1999. ",
1407
+ "bbox": [
1408
+ 173,
1409
+ 215,
1410
+ 823,
1411
+ 246
1412
+ ],
1413
+ "page_idx": 11
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "Yunpeng Pan, Ching-An Cheng, Kamil Saigol, Keuntaek Lee, Xinyan Yan, Evangelos Theodorou, and Byron Boots. Agile off-road autonomous driving using end-to-end deep imitation learning. arXiv preprint arXiv:1709.07174, 2017. ",
1418
+ "bbox": [
1419
+ 176,
1420
+ 253,
1421
+ 823,
1422
+ 297
1423
+ ],
1424
+ "page_idx": 11
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, John Schulman, Emanuel Todorov, and Sergey Levine. Learning complex dexterous manipulation with deep reinforcement learning and demonstrations. arXiv preprint arXiv:1709.10087, 2017. ",
1429
+ "bbox": [
1430
+ 174,
1431
+ 305,
1432
+ 823,
1433
+ 349
1434
+ ],
1435
+ "page_idx": 11
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "Stephane Ross and J Andrew Bagnell. Reinforcement and imitation learning via interactive no-regret learning. arXiv preprint arXiv:1406.5979, 2014. ",
1440
+ "bbox": [
1441
+ 174,
1442
+ 357,
1443
+ 821,
1444
+ 387
1445
+ ],
1446
+ "page_idx": 11
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "Stephane Ross, Geoffrey J Gordon, and J.Andrew Bagnell. A reduction of imitation learning and ´ structured prediction to no-regret online learning. In AISTATS, 2011. ",
1451
+ "bbox": [
1452
+ 174,
1453
+ 395,
1454
+ 823,
1455
+ 425
1456
+ ],
1457
+ "page_idx": 11
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "John Schulman, Sergey Levine, Pieter Abbeel, Michael I Jordan, and Philipp Moritz. Trust region policy optimization. In ICML, pp. 1889–1897, 2015. ",
1462
+ "bbox": [
1463
+ 174,
1464
+ 433,
1465
+ 821,
1466
+ 463
1467
+ ],
1468
+ "page_idx": 11
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. ICLR, 2016. ",
1473
+ "bbox": [
1474
+ 173,
1475
+ 469,
1476
+ 823,
1477
+ 501
1478
+ ],
1479
+ "page_idx": 11
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "David Silver et al. Mastering the game of go with deep neural networks and tree search. Nature, 2016. ",
1484
+ "bbox": [
1485
+ 173,
1486
+ 508,
1487
+ 823,
1488
+ 537
1489
+ ],
1490
+ "page_idx": 11
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "Wen Sun, Arun Venkatraman, Byron Boots, and J Andrew Bagnell. Learning to filter with predictive state inference machines. In ICML, 2016. ",
1495
+ "bbox": [
1496
+ 174,
1497
+ 546,
1498
+ 821,
1499
+ 575
1500
+ ],
1501
+ "page_idx": 11
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "Wen Sun, Arun Venkatraman, Geoffrey J Gordon, Byron Boots, and J Andrew Bagnell. Deeply aggrevated: Differentiable imitation learning for sequential prediction. 2017. ",
1506
+ "bbox": [
1507
+ 173,
1508
+ 583,
1509
+ 820,
1510
+ 613
1511
+ ],
1512
+ "page_idx": 11
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "Richard S Sutton and Andrew G Barto. Introduction to reinforcement learning, volume 135. MIT Press Cambridge, 1998. ",
1517
+ "bbox": [
1518
+ 173,
1519
+ 621,
1520
+ 821,
1521
+ 651
1522
+ ],
1523
+ "page_idx": 11
1524
+ },
1525
+ {
1526
+ "type": "text",
1527
+ "text": "RichardS. Sutton. Learning to predict by the methods of temporal differences. Machine Learning, 3:9–44, 1988. ",
1528
+ "bbox": [
1529
+ 173,
1530
+ 659,
1531
+ 821,
1532
+ 689
1533
+ ],
1534
+ "page_idx": 11
1535
+ },
1536
+ {
1537
+ "type": "text",
1538
+ "text": "Matej Vecer ˇ ´ık, Todd Hester, Jonathan Scholz, Fumin Wang, Olivier Pietquin, Bilal Piot, Nicolas Heess, Thomas Rothorl, Thomas Lampe, and Martin Riedmiller. Leveraging demonstra-¨ tions for deep reinforcement learning on robotics problems with sparse rewards. arXiv preprint arXiv:1707.08817, 2017. ",
1539
+ "bbox": [
1540
+ 173,
1541
+ 696,
1542
+ 825,
1543
+ 753
1544
+ ],
1545
+ "page_idx": 11
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 1992. ",
1550
+ "bbox": [
1551
+ 173,
1552
+ 762,
1553
+ 821,
1554
+ 792
1555
+ ],
1556
+ "page_idx": 11
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "David Zipser. Subgrouping reduces complexity and speeds up learning in recurrent networks. In Advances in neural information processing systems, pp. 638–641, 1990. ",
1561
+ "bbox": [
1562
+ 173,
1563
+ 800,
1564
+ 825,
1565
+ 830
1566
+ ],
1567
+ "page_idx": 11
1568
+ },
1569
+ {
1570
+ "type": "text",
1571
+ "text": "A PROOF OF THEOREM 3.1 ",
1572
+ "bbox": [
1573
+ 176,
1574
+ 101,
1575
+ 415,
1576
+ 118
1577
+ ],
1578
+ "page_idx": 12
1579
+ },
1580
+ {
1581
+ "type": "image",
1582
+ "img_path": "images/295b509937dcbf68cc1cd4cda5591b7c5d36d809fa772174a33d31a34978ef68.jpg",
1583
+ "image_caption": [
1584
+ "Figure 3: The special MDP we constructed for theorem 3.1 "
1585
+ ],
1586
+ "image_footnote": [],
1587
+ "bbox": [
1588
+ 313,
1589
+ 146,
1590
+ 683,
1591
+ 229
1592
+ ],
1593
+ "page_idx": 12
1594
+ },
1595
+ {
1596
+ "type": "text",
1597
+ "text": "Proof. We prove the theorem by constructing a special MDP shown in Fig 3, where $H = \\infty$ . The MDP has deterministic transition, $2 H + 2$ states, and each state has two actions $a _ { 1 }$ and $a _ { 2 }$ as shown in Fig. 3. Every episode starts at state $s _ { 0 }$ . For state $s _ { i }$ (states on the top line), we have $c ( s _ { i } ) = 0$ and for state $s _ { i } ^ { \\prime }$ (states at the bottom line) we have $c ( s _ { i } ) = 1$ . ",
1598
+ "bbox": [
1599
+ 173,
1600
+ 290,
1601
+ 825,
1602
+ 348
1603
+ ],
1604
+ "page_idx": 12
1605
+ },
1606
+ {
1607
+ "type": "text",
1608
+ "text": "It is clear that for any state $s _ { i }$ , we have $Q ^ { * } ( s _ { i } , a _ { 1 } ) ~ = ~ 0$ , $Q ^ { * } ( s _ { i } , a _ { 2 } ) \\ = \\ \\gamma$ , $Q ^ { * } ( s _ { i } ^ { \\prime } , a _ { 1 } ) \\ = \\ 1$ and $Q ^ { * } ( s _ { i } ^ { \\prime } , a _ { 2 } ) = 1 + \\gamma _ { \\mathrm { { } } }$ , for $i \\geq 1$ . Let us assume that we have an oracle $\\hat { V } ^ { e }$ such that $\\hat { V } ^ { e } ( s _ { i } ) = 0 . 5 + \\delta$ and $V ^ { e } ( s _ { i } ^ { \\prime } ) = 0 . 5 - \\delta$ , for some positive real number $\\delta$ . Hence we can see that $| \\hat { V } ^ { e } ( s ) - V ^ { * } ( s ) | =$ $0 . 5 + \\delta$ , for all $s$ . Denote $\\hat { Q } ^ { e } ( s , a ) = c ( s , a ) + \\gamma \\mathbb { E } _ { s ^ { \\prime } \\sim P _ { s a } } [ \\hat { V } ^ { e } ( s ^ { \\prime } ) ]$ , we know that ${ \\hat { Q } } ^ { e } ( s _ { i } , a _ { 1 } ) =$ $\\gamma ( 0 . 5 + \\delta )$ $. 5 + \\delta ) , \\hat { Q } ^ { e } ( s _ { i } , a _ { 2 } ) = \\gamma ( 0 . 5 - \\delta ) , \\hat { Q } ^ { e } ( s _ { i } ^ { \\prime } , a _ { 1 } ) = 1 + \\gamma ( 0 . 5 + \\delta )$ and $\\hat { Q } ^ { e } ( s _ { i } ^ { \\prime } , a _ { 2 } ) = 1 + \\gamma ( 0 . 5 - \\delta )$ . It is clear that the optimal policy $\\pi ^ { * }$ has cost $J ( \\pi ^ { * } ) = 0$ . Now let us compute the cost of the induced policy from oracle $\\hat { Q } ^ { e }$ : ${ \\hat { \\pi } } ( s ) = \\arg \\operatorname* { m i n } _ { a } { \\hat { Q } } ^ { e } ( s , a )$ . As we can see $\\hat { \\pi }$ makes a mistake at every state as $\\operatorname { a r g m i n } _ { a } \\hat { Q } ^ { e } ( s , a ) \\neq \\operatorname { a r g m i n } _ { a } Q ^ { * } ( s , a )$ . Hence we have $\\begin{array} { r } { J ( \\hat { \\pi } ) = \\frac { \\gamma } { 1 - \\gamma } } \\end{array}$ . Recall that in our constructed example, we have $\\epsilon = 0 . 5 + \\delta$ . Now let $\\delta 0 ^ { + }$ (by $\\delta 0 ^ { + }$ we mean $\\delta$ approaches to zero from the right side), we have $\\epsilon 0 . 5$ , hence $\\begin{array} { r } { J ( \\hat { \\pi } ) = \\frac { \\gamma } { 1 - \\gamma } \\to \\frac { 2 \\gamma } { 1 - \\gamma } \\epsilon } \\end{array}$ (due to the fact $2 \\epsilon 1$ ). Hence we have $\\begin{array} { r } { J ( \\hat { \\pi } ) - J ( \\pi ^ { * } ) = \\Omega \\left( \\frac { \\gamma } { 1 - \\gamma } \\epsilon \\right) } \\end{array}$ ",
1609
+ "bbox": [
1610
+ 169,
1611
+ 353,
1612
+ 826,
1613
+ 549
1614
+ ],
1615
+ "page_idx": 12
1616
+ },
1617
+ {
1618
+ "type": "text",
1619
+ "text": "B PROOF OF THEOREM 3.2 ",
1620
+ "text_level": 1,
1621
+ "bbox": [
1622
+ 176,
1623
+ 568,
1624
+ 415,
1625
+ 584
1626
+ ],
1627
+ "page_idx": 12
1628
+ },
1629
+ {
1630
+ "type": "text",
1631
+ "text": "Below we prove Theorem 3.2. ",
1632
+ "bbox": [
1633
+ 174,
1634
+ 601,
1635
+ 372,
1636
+ 616
1637
+ ],
1638
+ "page_idx": 12
1639
+ },
1640
+ {
1641
+ "type": "text",
1642
+ "text": "Proof of Theorem 3.2. In this proof, for notation simplicity, we denote $V _ { \\mathcal { M } _ { 0 } } ^ { \\pi }$ as $V ^ { \\pi }$ for any $\\pi$ . Using the definition of value function $V ^ { \\pi }$ , for any state $s _ { 1 } \\in { \\mathcal { S } }$ we have: ",
1643
+ "bbox": [
1644
+ 173,
1645
+ 640,
1646
+ 823,
1647
+ 670
1648
+ ],
1649
+ "page_idx": 12
1650
+ },
1651
+ {
1652
+ "type": "equation",
1653
+ "img_path": "images/80284d922486510af6d136e0fd21e498f9a1d1fc21c4950a523676fa0f7afdd7.jpg",
1654
+ "text": "$$\n\\begin{array} { r l } & { \\boldsymbol { V } ^ { * * } ( s _ { 1 } ) - \\boldsymbol { V } ^ { * * } ( s _ { 1 } ) } \\\\ & { = \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\boldsymbol { \\hat { \\tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\boldsymbol { \\gamma } ^ { k } \\boldsymbol { V } ^ { * * } ( s _ { k + 1 } ) | \\boldsymbol { \\hat { \\pi } } ^ { * } \\Big ] - \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\boldsymbol { \\hat { \\tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\boldsymbol { \\gamma } ^ { k } \\boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \\boldsymbol { \\hat { \\pi } } ^ { * } \\Big ] } \\\\ & { = \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\boldsymbol { \\hat { \\tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\boldsymbol { \\gamma } ^ { k } \\boldsymbol { V } ^ { * * } ( s _ { k + 1 } ) | \\boldsymbol { \\hat { \\pi } } ^ { * } \\Big ] - \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\boldsymbol { \\hat { \\tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\boldsymbol { \\gamma } ^ { k } \\boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \\boldsymbol { \\hat { \\pi } } ^ { * } \\Big ] } \\\\ & { \\qquad + \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\boldsymbol { \\hat { \\tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\boldsymbol { \\gamma } ^ { k } \\boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \\boldsymbol { \\hat { \\pi } } ^ { * } \\Big ] - \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\boldsymbol { \\hat { \\tau } } ^ { i - 1 } c ( s _ { i } , a _ { k } ) + \\boldsymbol { \\gamma } ^ { k } \\boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \\boldsymbol { \\hat { \\pi } } ^ { * } \\Big ] } \\\\ & \\qquad + \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\boldsymbol { \\hat { \\tau } } ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\boldsymbol { \\gamma } ^ { k } \\boldsymbol { V } ^ { * } ( s _ { k + 1 } ) | \\boldsymbol { \\hat { \\pi } } ^ { * } \\Big ] - \\mathbb { E } \\Big \\end{array}\n$$",
1655
+ "text_format": "latex",
1656
+ "bbox": [
1657
+ 200,
1658
+ 679,
1659
+ 799,
1660
+ 906
1661
+ ],
1662
+ "page_idx": 12
1663
+ },
1664
+ {
1665
+ "type": "text",
1666
+ "text": "Using the fact that $\\| V ^ { * } ( s ) - { \\hat { V } } ^ { e } ( s ) \\| \\leq \\epsilon$ , we have that: ",
1667
+ "bbox": [
1668
+ 173,
1669
+ 102,
1670
+ 540,
1671
+ 119
1672
+ ],
1673
+ "page_idx": 13
1674
+ },
1675
+ {
1676
+ "type": "equation",
1677
+ "img_path": "images/618cef080b7db9a9ac2eceafa3462d4095d5c0079c8dbaf8a00be6d51632f671.jpg",
1678
+ "text": "$$\n\\begin{array} { r l } & { \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } V ^ { * } ( s _ { k + 1 } ) | \\hat { \\pi } ^ { * } \\Big ] \\leq \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } \\hat { V } ^ { e } ( s _ { k + 1 } ) | \\hat { \\pi } ^ { * } \\Big ] + \\gamma ^ { k } \\epsilon , } \\\\ & { \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } V ^ { * } ( s _ { k + 1 } ) | \\pi ^ { * } \\Big ] \\geq \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } \\hat { V } ^ { e } ( s _ { k + 1 } ) | \\pi ^ { * } \\Big ] - \\gamma ^ { k } \\epsilon . } \\end{array}\n$$",
1679
+ "text_format": "latex",
1680
+ "bbox": [
1681
+ 194,
1682
+ 125,
1683
+ 803,
1684
+ 214
1685
+ ],
1686
+ "page_idx": 13
1687
+ },
1688
+ {
1689
+ "type": "text",
1690
+ "text": "Substitute the above two inequality into Eq. 15, we have: ",
1691
+ "bbox": [
1692
+ 173,
1693
+ 218,
1694
+ 549,
1695
+ 234
1696
+ ],
1697
+ "page_idx": 13
1698
+ },
1699
+ {
1700
+ "type": "equation",
1701
+ "img_path": "images/a7356ecb2f2a9f5b2dcdc25bf44f13f253b43e9c2308ab5be079eab9b73cd49d.jpg",
1702
+ "text": "$$\n\\begin{array} { r l r } { { V ^ { \\tilde { \\pi } ^ { * } } ( s _ { 1 } ) - V ^ { * } ( s _ { 1 } ) \\leq \\gamma ^ { k } \\mathbb { E } [ V ^ { \\tilde { \\pi } ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } ) ] + 2 \\gamma ^ { k } \\epsilon } } \\\\ & { } & { + \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } \\hat { V } ^ { e } ( s _ { k + 1 } ) | \\hat { \\pi } ^ { * } \\Big ] - \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } \\hat { V } ^ { e } ( s _ { k + 1 } ) | \\pi ^ { * } \\Big ] } \\\\ & { \\leq \\gamma ^ { k } \\mathbb { E } [ V ^ { \\tilde { \\pi } ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } ) ] + 2 \\gamma ^ { k } \\epsilon } \\\\ & { } & { + \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } \\hat { V } ^ { e } ( s _ { k + 1 } ) | \\hat { \\pi } ^ { * } \\Big ] - \\mathbb { E } \\Big [ \\displaystyle \\sum _ { i = 1 } ^ { k } \\gamma ^ { i - 1 } c ( s _ { i } , a _ { i } ) + \\gamma ^ { k } \\hat { V } ^ { e } ( s _ { k + 1 } ) | \\hat { \\pi } ^ { * } \\Big ] } \\\\ & { = \\gamma ^ { k } \\mathbb { E } [ V ^ { \\tilde { \\pi } ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } ) ] + 2 \\gamma ^ { k } \\epsilon , } \\end{array}\n$$",
1703
+ "text_format": "latex",
1704
+ "bbox": [
1705
+ 197,
1706
+ 241,
1707
+ 799,
1708
+ 412
1709
+ ],
1710
+ "page_idx": 13
1711
+ },
1712
+ {
1713
+ "type": "text",
1714
+ "text": "where the second inequality comes from the fact that $\\hat { \\pi } ^ { * }$ is the minimizer from Eq. 6. Recursively expand $V ^ { \\pi ^ { * } } ( s _ { k + 1 } ) - V ^ { * } ( s _ { k + 1 } )$ using the above procedure, we can get: ",
1715
+ "bbox": [
1716
+ 171,
1717
+ 416,
1718
+ 825,
1719
+ 448
1720
+ ],
1721
+ "page_idx": 13
1722
+ },
1723
+ {
1724
+ "type": "equation",
1725
+ "img_path": "images/a0594bc31da2ab8bbaec0336684d89314745224541705d890fbbc61d5f28327b.jpg",
1726
+ "text": "$$\nV ^ { \\hat { \\pi } ^ { * } } ( s _ { 1 } ) - V ^ { * } ( s _ { 1 } ) \\leq 2 \\gamma ^ { k } \\epsilon ( 1 + \\gamma ^ { k } + \\gamma ^ { 2 k } + \\ldots ) \\leq \\frac { 2 \\gamma ^ { k } } { 1 - \\gamma ^ { k } } \\epsilon = O ( \\frac { \\gamma ^ { k } } { 1 - \\gamma ^ { k } } \\epsilon ) .\n$$",
1727
+ "text_format": "latex",
1728
+ "bbox": [
1729
+ 246,
1730
+ 453,
1731
+ 751,
1732
+ 488
1733
+ ],
1734
+ "page_idx": 13
1735
+ },
1736
+ {
1737
+ "type": "text",
1738
+ "text": "Since the above inequality holds for any $s _ { 1 } \\in S$ , for any initial distribution $v$ over state space $s$ , we will have $\\begin{array} { r } { J ( \\hat { \\pi } ^ { * } ) - J ( \\pi ^ { * } ) \\leq O ( \\frac { \\gamma ^ { k } } { 1 - \\gamma ^ { k } } \\epsilon ) } \\end{array}$ . □ ",
1739
+ "bbox": [
1740
+ 171,
1741
+ 493,
1742
+ 828,
1743
+ 530
1744
+ ],
1745
+ "page_idx": 13
1746
+ }
1747
+ ]
parse/train/ryUlhzWCZ/ryUlhzWCZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryUlhzWCZ/ryUlhzWCZ_model.json ADDED
The diff for this file is too large to render. See raw diff