Title: PROMP: PROXIMAL META-POLICY SEARCH

Abstract: Credit assignment in Meta-reinforcement learning (Meta-RL) is still poorly understood. Existing methods either neglect credit assignment to pre-adaptation behavior or implement it naively. This leads to poor sample-efficiency during metatraining as well as ineffective task identification strategies. This paper provides a theoretical analysis of credit assignment in gradient-based Meta-RL. Building on the gained insights we develop a novel meta-learning algorithm that overcomes both the issue of poor credit assignment and previous difficulties in estimating meta-policy gradients. By controlling the statistical distance of both pre-adaptation and adapted policies during meta-policy search, the proposed algorithm endows efficient and stable meta-learning. Our approach leads to superior pre-adaptation policy behavior and consistently outperforms previous Meta-RL algorithms in sample-efficiency, wall-clock time, and asymptotic performance.

1. INTRODUCTION:

A remarkable trait of human intelligence is the ability to adapt to new situations in the face of limited experience. In contrast, our most successful artificial agents struggle in such scenarios. While achieving impressive results, they suffer from high sample complexity in learning even a single task, fail to generalize to new situations, and require large amounts of additional data to successfully adapt to new environments. Meta-learning addresses these shortcomings by learning how to learn. Its objective is to learn an algorithm that allows the artificial agent to succeed in an unseen task when only limited experience is available, aiming to achieve the same fast adaptation that humans possess (Schmidhuber, 1987; Thrun & Pratt, 1998) .

Despite recent progress, deep reinforcement learning (RL) still relies heavily on hand-crafted features and reward functions as well as engineered problem specific inductive bias. Meta-RL aims to forego such reliance by acquiring inductive bias in a data-driven manner. Recent work proves this approach to be promising, demonstrating that Meta-RL allows agents to obtain a diverse set of skills, attain better exploration strategies, and learn faster through meta-learned dynamics models or synthetic returns (Duan et al., 2016; Xu et al., 2018; Gupta et al., 2018b; Saemundsson et al., 2018) .

Meta-RL is a multi-stage process in which the agent, after a few sampled environment interactions, adapts its behavior to the given task. Despite its wide utilization, little work has been done to promote theoretical understanding of this process, leaving Meta-RL grounded on unstable foundations. Although the behavior prior to the adaptation step is instrumental for task identification, the interplay between pre-adaptation sampling and posterior performance of the policy remains poorly understood. In fact, prior work in gradient-based Meta-RL has either entirely neglected credit assignment to the pre-update distribution (Finn et al., 2017) or implemented such credit assignment in a naive way (Al-Shedivat et al., 2018; Stadie et al., 2018) .

To our knowledge, we provide the first formal in-depth analysis of credit assignment w.r.t. preadaptation sampling distribution in Meta-RL. Based on our findings, we develop a novel Meta-RL algorithm. First, we analyze two distinct methods for assigning credit to pre-adaptation behavior.

of MAML, was first introduced by Finn et al. (2017) . We refer to it as formulation I which can be expressed as maximizing the objective

J I (θ) = E T ∼ρ(T ) E τ ∼P T (τ |θ ) [R(τ )] with θ := U (θ, T ) = θ + α∇ θ E τ ∼P T (τ |θ) [R(τ )]

In that U denotes the update function which depends on the task T , and performs one VPG step towards maximizing the performance of the policy in T . For national brevity and conciseness we assume a single policy gradient adaptation step. Nonetheless, all presented concepts can easily be extended to multiple adaptation steps.

Later work proposes a slightly different notion of gradient-based Meta-RL, also known as E-MAML, that attempts to circumvent issues with the meta-gradient estimation in MAML (Al-Shedivat et al., 2018; Stadie et al., 2018) :

J II (θ) = E T ∼ρ(T ) E τ 1:N ∼P T (τ 1:N |θ) τ ∼P T (τ |θ ) R(τ ) with θ := U (θ, τ 1:N ) = θ + α∇ θ N n=1 R(τ (n) )

Formulation II views U as a deterministic function that depends on N sampled trajectories from a specific task. In contrast to formulation I, the expectation over pre-update trajectories τ is applied outside of the update function. Throughout this paper we refer to π θ as pre-update policy, and π θ as post-update policy.

4. SAMPLING DISTRIBUTION CREDIT ASSIGNMENT:

This section analyzes the two gradient-based Meta-RL formulations introduced in Section 3. Figure 1 illustrates the stochastic computation graphs (Schulman et al., 2015b ) of both formulations.

The red arrows depict how credit assignment w.r.t the pre-update sampling distribution P T (τ |θ) is propagated. Formulation I (left) propagates the credit assignment through the update step, thereby exploiting the full problem structure. In contrast, formulation II (right) neglects the inherent structure, directly assigning credit from post-update return R to the pre-update policy π θ which leads to noisier, less effective credit assignment. Both formulations optimize for the same objective, and are equivalent at the 0 th order. However, because of the difference in their formulation and stochastic computation graph, their gradients and the resulting optimization step differs. In the following, we shed light on how and where formulation II loses signal by analyzing the gradients of both formulations, which can be written as (see Appendix A for more details and derivations)

EQUATION

The first term ∇ θ J post (τ , τ ) is equal in both formulations, but the second term, ∇ θ J pre (τ , τ ), differs between them. In particular, they correspond to ∇ θ J post (τ , τ ) simply corresponds to a policy gradient step on the post-update policy π θ w.r.t θ , followed by a linear transformation from post-to pre-update parameters. It corresponds to increasing the likelihood of the trajectories τ that led to higher returns. However, this term does not optimize for the pre-update sampling distribution, i.e., which trajectories τ led to better adaptation steps.

The credit assignment w.r.t. the pre-updated sampling distribution is carried out by the second term.

In formulation II, ∇ θ J II pre can be viewed as standard reinforcement learning on π θ with R(τ ) as reward signal, treating the update function U as part of the unknown dynamics of the system. This shifts the pre-update sampling distribution to better adaptation steps.

Formulation I takes the causal dependence of P T (τ |θ ) on P T (τ |θ) into account. It does so by maximizing the inner product of pre-update and post-update policy gradients (see Eq. 4) . This steers the pre-update policy towards 1) larger post-updates returns 2) larger adaptation steps α∇ θ J inner , 3) better alignment of pre-and post-update policy gradients (Li et al., 2017; Nichol et al., 2018) . When combined, these effects directly optimize for adaptation. As a result, we expect the first meta-policy gradient formulation, J I , to yield superior learning properties.

5. LOW VARIANCE CURVATURE ESTIMATOR:

In the previous section we show that the formulation introduced by Finn et al. (2017) results in superior meta-gradient updates, which should in principle lead to improved convergence properties. However, obtaining correct and low variance estimates of the respective meta-gradients proves challenging. As discussed by Foerster et al. (2018) , and shown in Appendix B.3, the score function surrogate objective approach is ill suited for calculating higher order derivatives via automatic differentiation toolboxes. This important fact was overlooked in the original RL-MAML implementation (Finn et al., 2017) leading to incorrect meta-gradient estimates1 . As a result, ∇ θ J pre does not appear in the gradients of the meta-objective (i.e. ∇ θ J = ∇ θ J post ). Hence, MAML does not perform any credit assignment to pre-adaptation behavior.

But, even when properly implemented, we show that the meta-gradients exhibit high variance. Specifically, the estimation of the hessian of the RL-objective, which is inherent in the metagradients, requires special consideration. In this section, we motivate and introduce the low variance curvature estimator (LVC): an improved estimator for the hessian of the RL-objective which promotes better meta-policy gradient updates. As we show in Appendix A.1, we can write the gradient of the meta-learning objective as

EQUATION

Since the update function U resembles a policy gradient step, its gradient ∇ θ U (θ, T ) involves computing the hessian of the reinforcement learning objective, i.e., ∇ 2 θ E τ ∼P T (τ |θ) [R(τ )]. Estimating this hessian has been discussed in Baxter & Bartlett (2001) and Furmston et al. (2016) . In the infinite horizon MDP case, Baxter & Bartlett (2001) derived a decomposition of the hessian. We extend their finding to the finite horizon case, showing that the hessian can be decomposed into three matrix terms (see Appendix B.2 for proof):

EQUATION

whereby

H 1 = E τ ∼P T (τ |θ) H-1 t=0 ∇ θ log π θ (a t , s t )∇ θ log π θ (a t , s t ) H-1 t =t r(s t , a t ) H 2 = E τ ∼P T (τ |θ) H-1 t=0 ∇ 2 θ log π θ (a t , s t ) H-1 t =t r(s t , a t ) H 12 = E τ ∼P T (τ |θ) H-1 t=0 ∇ θ log π θ (a t , s t )∇ θ Q π θ t (s t , a t ) Here Q π θ t (s t , a t ) = E τ t+1:H-1 ∼P T (•|θ)

H-1 t =t r(s t , a t )|s t , a t denotes the expected state-action value function under policy π θ at time t.

Computing the expectation of the RL-objective is in general intractable. Typically, its gradients are computed with a Monte Carlo estimate based on the policy gradient theorem (Eq. 82). In practical implementations, such an estimate is obtained by automatically differentiating a surrogate objective (Schulman et al., 2015b) . However, this results in a highly biased hessian estimate which just computes H 2 , entirely dropping the terms H 1 and H 12 +H 12 . In the notation of the previous section, it leads to neglecting the ∇ θ J pre term, ignoring the influence of the pre-update sampling distribution.

The issue can be overcome using the DiCE formulation, which allows to compute unbiased higherorder Monte Carlos estimates of arbitrary stochastic computation graphs (Foerster et al., 2018) . The DiCE-RL objective can be rewritten as follows

EQUATION

EQUATION

In that, ⊥ denotes the "stop gradient" operator, i.e., ⊥(

f θ (x)) → f θ (x) but ∇ θ ⊥(f θ (x)) → 0.

The sequential dependence of π θ (a t |s t ) within the trajectory, manifesting itself through the product of importance weights in (7), results in high variance estimates of the hessian

∇ 2 θ E τ ∼P T (τ |θ) [R(τ )].

As noted by Furmston et al. (2016) , H 12 is particularly difficult to estimate, since it involves three nested sums along the trajectory. In section 7.2 we empirically show that the high variance estimates of the DiCE objective lead to noisy meta-policy gradients and poor learning performance.

To facilitate a sample efficient meta-learning, we introduce the low variance curvature (LVC) estimator: 

EQUATION

EQUATION

[∇ 2 θ J LVC ] → E τ [∇ 2 θ J DiCE ] as θ → θ * .

Hence, the bias of the LVC estimator becomes negligible close to local optima. The experiments in section 7.2 underpin the theoretical findings, showing that the low variance hessian estimates obtained through J LVC improve the sample-efficiency of meta-learning by a significant margin when compared to J DiCE . We refer the interested reader to Appendix B for derivations and a more detailed discussion.

6. PROMP: PROXIMAL META-POLICY SEARCH:

Building on the previous sections, we develop a novel meta-policy search method based on the low variance curvature objective which aims to solve the following optimization problem:

max θ E T ∼ρ(T ) E τ ∼P T (τ |θ ) [R(τ )] with θ := θ + α ∇ θ E τ ∼P T (τ |θ) J LVC (τ ) (11)

Prior work has optimized this objective using either vanilla policy gradient (VPG) or TRPO (Schulman et al., 2015a) . TRPO holds the promise to be more data efficient and stable during the learning process when compared to VPG. However, it requires computing the Fisher information matrix (FIM). Estimating the FIM is particularly problematic in the meta-learning set up. The meta-policy gradients already involve second order derivatives; as a result, the time complexity of the FIM estimate is cubic in the number of policy parameters. Typically, the problem is circumvented using finite difference methods, which introduce further approximation errors.

The recently introduced PPO algorithm (Schulman et al., 2017) achieves comparable results to TRPO with the advantage of being a first order method. PPO uses a surrogate clipping objective which allows it to safely take multiple gradient steps without re-sampling trajectories. for step n = 0, ..., N -1 do 5:

J CLIP T (θ) = E τ ∼PT (τ ,θo) H-1 t=0 min π θ (at|st) π θo (at|st) A π θo (s t , a t ) , clip 1+ 1- π θ (at|st) π θo (at|st) A π θo (

if n = 0 then 6: Set θ o ← θ 7:

for all T i ∼ ρ(T ) do 8:

Sample pre-update trajectories D i = {τ i } from T i using π θ 9:

Compute adapted parameters

θ o,i ← θ + α ∇ θ J LR Ti (θ) with D i = {τ i } 10:

Sample post-update trajectories

D i = {τ i } from T i using π θ o,i 11: Update θ ← θ + β Ti ∇ θ J ProMP Ti (θ) using each D i = {τ i }

In case of Meta-RL, it does not suffice to just replace the post-update reward objective with J CLIP

T:

. In order to safely perform multiple meta-gradient steps based on the same sampled data from a recent policy π θo , we also need to 1) account for changes in the pre-update action distribution π θ (a t |s t ), and 2) bound changes in the pre-update state visitation distribution (Kakade & Langford, 2002) .

We propose Proximal Meta-Policy Search (ProMP) which incorporates both the benefits of proximal policy optimization and the low variance curvature objective (see Alg. 1.) In order to comply with requirement 1), ProMP replaces the "stop gradient" importance weight π θ (at|st) ⊥(π θ (at|st)) by the likelihood ratio π θ (at|st) π θo (at|st)) , which results in the following objective

EQUATION

An important feature of this objective is that its derivatives w.r.t θ evaluated at θ o are identical to those of the LVC objective, and it additionally accounts for changes in the pre-update action distribution. To satisfy condition 2) we extend the clipped meta-objective with a KL-penalty term between π θ and π θo . This KL-penalty term enforces a soft local "trust region" around π θo , preventing the shift in state visitation distribution to become large during optimization. This enables us to take multiple meta-policy gradient steps without re-sampling. Altogether, ProMP optimizes

EQUATION

ProMP consolidates the insights developed throughout the course of this paper, while at the same time making maximal use of recently developed policy gradients algorithms. First, its meta-learning formulation exploits the full structural knowledge of gradient-based meta-learning. Second, it incorporates a low variance estimate of the RL-objective hessian. Third, ProMP controls the statistical distance of both pre-and post-adaptation policies, promoting efficient and stable meta-learning. All in all, ProMP consistently outperforms previous gradient-based meta-RL algorithms in sample complexity, wall clock time, and asymptotic performance (see Section 7.1).

7. EXPERIMENTS:

In order to empirically validate the theoretical arguments outlined above, this section provides a detailed experimental analysis that aims to answer the following questions: (i) How does ProMP perform against previous Meta-RL algorithms? (ii) How do the lower variance but biased LVC gradient estimates compare to the high variance, unbiased DiCE estimates? (iii) Do the different formulations result in different pre-update exploration properties? (iv) How do formulation I and formulation II differ in their meta-gradient estimates and convergence properties?

To answer the posed questions, we evaluate our approach on six continuous control Meta-RL benchmark environments based on OpenAI Gym and the Mujoco simulator (Brockman et al., 2016; Todorov et al., 2012) . A description of the experimental setup is found in Appendix D. In all experiments, the reported curves are averaged over at least three random seeds. Returns are estimated based on sampled trajectories from the adapted post-update policies and averaged over sampled tasks. The source code and the experiment data are available on our supplementary website.2 

7.1. META-GRADIENT BASED COMPARISON:

We compare our method, ProMP, in sample complexity and asymptotic performance to the gradientbased meta-learning approaches MAML-TRPO (Finn et al., 2017 ) and E-MAML-TRPO (see Fig. 2 ). Note that MAML corresponds to the original implementation of RL-MAML by (Finn et al., 2017) where no credit assignment to the pre-adaptation policy is happening (see Appendix B.3 for details). Moreover, we provide a second study which focuses on the underlying meta-gradient estimator. Specifically, we compare the LVC, DiCE, MAML and E-MAML estimators while optimizing meta-learning objective with vanilla policy gradient (VPG) ascent. This can be viewed as an ablated version of the algorithms which tries to eliminate the influences of the outer optimizers on the learning performance (see Fig. 3 ).

These algorithms are benchmarked on six different locomotion tasks that require adaptation: the half-cheetah and walker must switch between running forward and backward, the high-dimensional agents ant and humanoid must learn to adapt to run in different directions in the 2D-plane, and the hopper and walker have to adapt to different configuration of their dynamics. The introduced LVC approach consistently outperforms the other estimators. The results in Figure 2 highlight the strength of ProMP in terms of sample efficiency and asymptotic performance. In the meta-gradient estimator study in Fig. 3 , we demonstrate the positive effect of the LVC objective, as it consistently outperforms the other estimators. In contrast, DiCE learns only slowly when compared to the other approaches. As we have motivated mathematically and substantiate empirically in the following experiment, the poor performance of DiCE may be ascribed to the high variance of its meta-gradient estimates. The fact that the results of MAML and E-MAML are comparable underpins the ineffectiveness of the naive pre-update credit assignment (i.e. formulation II), as discussed in section 4.

Results for four additional environments are displayed in Appendix D along with hyperparameter settings, environment specifications and a wall-clock time comparison of the algorithms.

7.2. GRADIENT ESTIMATOR VARIANCE AND ITS EFFECT ON META-LEARNING:

In Section 5 we discussed how the DiCE formulation yields unbiased but high variance estimates of the RL-objective hessian and served as motivation for the low variance curvature (LVC) estimator. Here we investigate the meta-gradient variance of both estimators as well as its implication on the learning performance. Specifically, we report the relative standard deviation of the metapolicy gradients as well as the average return throughout the learning process in three of the metaenvironments.

The results, depicted in Figure 4 , highlight the advantage of the low variance curvature estimate. The trajectory level dependencies inherent in the DiCE estimator leads to a meta-gradient standard deviation that is on average 60% higher when compared to LVC. As the learning curves indicate, the noisy gradients may be a driving factor for the poor performance of DiCE, impeding sample efficient meta-learning. Meta-policy search based on the LVC estimator leads to substantially better sample-efficiency and asymptotic performance.

In case of HalfCheetahFwdBack, we observe some unstable learning behavior of LVC-VPG which is most likely caused by the bias of LVC in combination with the naive VPG optimizer. However, the mechanisms in ProMP that ensure proximity w.r.t. to the policys KL-divergence seem to counteract these instabilities during training, giving us a stable and efficient meta-learning algorithm.

7.3. COMPARISON OF INITIAL SAMPLING DISTRIBUTIONS:

Here we evaluate the effect of the different objectives on the learned pre-update sampling distribution. We compare the low variance curvature (LVC) estimator with TRPO (LVC-TRPO) against MAML (Finn et al., 2017 ) and E-MAML-TRPO (Stadie et al., 2018 ) in a 2D environment on which the exploration behavior can be visualized. Each task of this environment corresponds to reaching a different corner location; however, the 2D agent only experiences reward when it is sufficiently close to the corner (translucent regions of Figure 5 ). Thus, to successfully identify the task, the agent must explore the different regions. We perform three inner adaptation steps on each task, allowing the agent to fully change its behavior from exploration to exploitation. functions. Through its superior credit assignment, the LVC objective learns a pre-update policy that is able to identify the current task and respectively adapt its policy, successfully reaching the goal (dark green circle).

2 1 0 1 2 2 1 0 1 2 LVC 2 1 0 1 2 2 1 0 1 2 MAML 2 1 0 1 2 2 1 0 1 2 E-MAML Pre-update Post-update

The different exploration-exploitation strategies are displayed in Figure 5 . Since the MAML implementation does not assign credit to the pre-update sampling trajectory, it is unable to learn a sound exploration strategy for task identification and thus fails to accomplish the task. On the other hand, E-MAML, which corresponds to formulation II, learns to explore in long but random paths: because it can only assign credit to batches of pre-update trajectories, there is no notion of which actions in particular facilitate good task adaptation. As consequence the adapted policy slightly misses the task-specific target. The LVC estimator, instead, learns a consistent pattern of exploration, visiting each of the four regions, which it harnesses to fully solve the task. To shed more light on the differences of the gradients of formulation I and formulation II, we evaluate the meta-gradient updates and the corresponding convergence to the optimum of both formulations in a simple 1D environment. In this environment, the agent starts in a random position in the real line and has to reach a goal located at the position 1 or -1. In order to visualize the convergence, we parameterize the policy with only two parameters θ 0 and θ 1 . We employ formulation I by optimizing the DiCE objective with VPG, and formulation II by optimizing its (E-MAML) objective with VPG.

Figure 6 depicts meta-gradient updates of the parameters θ i for both formulations. Formulation I (red) exploits the internal structure of the adaptation update yielding faster and steadier convergence to the optimum. Due to its inferior credit assignment, formulation II (green) produces noisier gradient estimates leading to worse convergence properties.

8. CONCLUSION:

In this paper we propose a novel Meta-RL algorithm, proximal meta-policy search (ProMP), which fully optimizes for the pre-update sampling distribution leading to effective task identification. Our method is the result of a theoretical analysis of gradient-based Meta-RL formulations, based on which we develop the low variance curvature (LVC) surrogate objective that produces low variance meta-policy gradient estimates. Experimental results demonstrate that our approach surpasses previous meta-reinforcement learning approaches in a diverse set of continuous control tasks. Finally, we underpin our theoretical contributions with illustrative examples which further justify the soundness and effectiveness of our method.

A TWO META-POLICY GRADIENT FORMULATIONS:

In this section we discuss two different gradient-based meta-learning formulations, derive their gradients and analyze the differences between them.

A.1 META-POLICY GRADIENT FORMULATION I:

The first meta-learning formulation, known as MAML (Finn et al., 2017) , views the inner update rule U (θ, T ) as a mapping from the pre-update parameter θ and the task T to an adapted policy parameter θ . The update function can be viewed as stand-alone procedure that encapsulates sampling from the task-specific trajectory distribution P T (τ |π θ ) and updating the policy parameters. Building on this concept, the meta-objective can be written as

EQUATION

The task-specific gradients follow as

EQUATION

In order to derive the gradients of the inner update ∇ θ θ = ∇ θ U (θ, T ) it is necessary to know the structure of U . The main part of this paper assumes the inner update rule to be a policy gradient descent step

EQUATION

EQUATION

Thereby the second term in ( 19) is the local curvature (hessian) of the inner adaptation objective function. The correct hessian of the inner objective can be derived as follows:

EQUATION

EQUATION

A.2 META-POLICY GRADIENT FORMULATION II

The second meta-reinforcement learning formulation views the the inner update θ = U (θ, τ 1:N ) as a deterministic function of the pre-update policy parameters θ and N trajectories τ 1:N ∼ P T (τ 1:N |θ) sampled from the pre-update trajectory distribution. This formulation was introduced in Al-Shedivat et al. ( 2018) and further discussed with respect to its exploration properties in Stadie et al. (2018) .

Viewing U as a function that adapts the policy parameters θ to a specific task T given policy rollouts in this task, the corresponding meta-learning objective can be written as

J II (θ) = E T ∼ρ(T ) E τ 1:N ∼P T (τ 1:N |θ) E τ ∼P T (τ |θ ) R(τ ) with θ := U (θ, τ 1:N ) (25)

Since the first part of the gradient derivation is agnostic to the inner update rule U (θ, τ 1:N ), we only assume that the inner update function U is differentiable w.r.t. θ. First we rewrite the meta-objective J(θ) as expectation of task specific objectives J II T (θ) under the task distribution. This allows us to express the meta-policy gradients as expectation of task-specific gradients:

EQUATION

The task specific gradients can be calculated as follows

∇ θ J II T (θ) = ∇ θ E τ ∼P T (τ 1:N |θ) E τ ∼P T (τ |θ ) R(τ ) = ∇ θ R(τ ) P T (τ |θ ) P T (τ 1:N |θ) dτ dτ = R(τ ) P T (τ |θ ) ∇ θ log P T (τ 1:N |θ)P T (τ 1:N |θ)+ R(τ ) ∇ θ log P T (τ |θ )P T (τ |θ ) P T (τ 1:N |θ) dτ dτ = E τ 1:N ∼P T (τ 1:N |θ) τ ∼P T (τ |θ ) R(τ ) ∇ θ log P T (τ |θ ) + N i=1 ∇ θ log P T (τ (n) |θ) = E τ 1:N ∼P T (τ 1:N |θ) τ ∼P T (τ |θ ) R(τ ) ∇ θ log P T (τ |θ )∇ θ θ + N n=1 ∇ θ log P T (τ (n) |θ)

As in A.1 the structure of U (θ, τ 1:N ) must be known in order to derive the gradient ∇ θ θ . Since we assume the inner update to be vanilla policy gradient, the respective gradient follows as

U (θ, τ 1:N ) = θ+α 1 N N n=1 ∇ θ log π θ (τ (n) ))R(τ (n) ) with ∇ θ log π θ (τ ) = H-1 t=0 ∇ θ log π θ (a t |s t )

The respective gradient of U (θ, τ 1:N ) follows as

EQUATION

EQUATION

A.3 COMPARING THE GRADIENTS OF THE TWO FORMULATIONS:

In the following we analyze the differences between the gradients derived for the two formulations.

To do so, we begin with ∇ θ J I T (θ) by inserting the gradient of the inner adaptation step ( 19) into (17):

EQUATION

We can substitute the hessian of the inner objective by its derived expression from (24) and then rearrange the terms. Also note that

∇ θ log P T (τ |θ) = ∇ θ log π θ (τ ) = H-1 t=1 log π θ (a t |s t )

where H is the MDP horizon.

EQUATION

Next, we rearrange the gradient of J II into a similar form as ∇ θ J I T (θ). For that, we start by inserting (28) for ∇ θ θ and replacing the expectation over pre-update trajectories τ 1:N by the expectation over a single trajectory τ .

EQUATION

+R(τ )∇ θ log π θ (τ )

EQUATION

While the first part of the gradients match (( 32) and ( 34)), the second part (( 33) and ( 35)) differs.

Since the second gradient term can be viewed as responsible for shifting the pre-update sampling distribution P T (τ |θ) towards higher post-update returns, we refer to it as ∇ θ J pre (τ , τ ) . To further analyze the difference between ∇ θ J I pre and ∇ θ J II pre we slightly rearrange (33) and put both gradient terms next to each other:

EQUATION

In the following we interpret and and compare of the derived gradient terms, aiming to provide intuition for the differences between the formulations:

The first gradient term J post that matches in both formulations corresponds to a policy gradient step on the post-update policy π θ . Since θ itself is a function of θ, the term I + αR(τ )∇ 2 θ log π θ (τ )) can be seen as linear transformation of the policy gradient update R(τ )∇ θ log π θ (τ ) from the post-update parameter θ into θ. Although J post takes into account the functional relationship between θ and θ, it does not take into account the pre-update sampling distribution P T (τ |θ). This is where ∇ θ J pre comes into play: ∇ θ J I pre can be viewed as policy gradient update of the preupdate policy π θ w.r.t. to the post-update return R(τ ). Hence this gradient term aims to shift the pre-update sampling distribution so that higher post-update returns are achieved. However, ∇ θ J II pre does not take into account the causal dependence of the post-update policy on the pre-update policy. Thus a change in θ due to ∇ θ J II pre may counteract the change due to ∇ θ J II post . In contrast, ∇ θ J I pre takes the dependence of the the post-update policy on the pre-update sampling distribution into account. Instead of simply weighting the gradients of the pre-update policy ∇ θ log π θ (τ ) with R(τ ) as in ∇ θ J I post , ∇ θ J I post weights the gradients with inner product of the pre-update and post-update policy gradients. This inner product can be written as

∇ θ J inner ∇ θ J outer = ||∇ θ J inner || 2 • ||∇ θ J outer || 2 • cos(δ)

(38) wherein δ denotes the angle between the the inner and outer pre-update and post-update policy gradients. Hence, ∇ θ J I post steers the pre-update policy towards not only towards larger post-updates returns but also towards larger adaptation steps α∇ θ J inner , and better alignment of pre-and postupdate policy gradients. This directly optimizes for maximal improvement / adaptation for the respective task. See Li et al. (2017) ; Nichol et al. (2018) for a comparable analysis in case of domain generalization and supervised meta-learning. Also note that (38) allows formulation I to perform credit assignment on the trajectory level whereas formulation II can only assign credit to entire batches of N pre-update trajectories τ 1:N .

As a result, we expect the first meta-policy gradient formulation to learn faster and more stably since the respective gradients take the dependence of the pre-update returns on the pre-update sampling distribution into account while this causal link is neglected in the second formulation.

B ESTIMATING THE META-POLICY GRADIENTS:

When employing formulation I for gradient-based meta-learning, we aim maximize the loss

EQUATION

by performing a form of gradient-descent on J(θ). Note that we, from now on, assume J := J I and thus omit the superscript indicating the respective meta-learning formulation. As shown in A.2 the gradient can be derived as

EQUATION

)

where ) ] denotes hessian of the inner adaptation objective w.r.t. θ. This section concerns the question of how to properly estimate this hessian.

∇ 2 θ J inner (θ) := ∇ 2 θ E τ ∼P T (τ |θ) [R(τ

B.1 ESTIMATING GRADIENTS OF THE RL REWARD OBJECTIVE:

Since the expectation over the trajectory distribution P T (τ |θ) is in general intractable, the score function trick is typically used to used to produce a Monte Carlo estimate of the policy gradients. Although the gradient estimate can be directly defined, when using a automatic-differentiation toolbox it is usually more convenient to use an objective function whose gradients correspond to the policy gradient estimate. Due to the Policy Gradient Theorem (PGT) Sutton et al. (2000) such a "surrogate" objective can be written as:

EQUATION

While ( 41) and ( 42) are equivalent (Peters & Schaal, 2006) , the more popular formulation formulation (41) can be seen as forward looking credit assignment while (42) can be interpreted as backward looking credit assignment (Foerster et al., 2018) . A generalized procedure for constructing "surrogate" objectives for arbitrary stochastic computation graphs can be found in Schulman et al. (2015a) .

B.2 A DECOMPOSITION OF THE HESSIAN:

Estimating the the hessian of the reinforcement learning objective has been discussed in Furmston et al. (2016) and Baxter & Bartlett (2001) with focus on second order policy gradient methods. In the infinite horizon MDP case, Baxter & Bartlett (2001) derive a decomposition of the hessian. In the following, we extend their finding to the finite horizon case.

Proposition. The hessian of the RL objective can be decomposed into four matrix terms:

EQUATION

)

where

EQUATION

EQUATION

EQUATION

Here

Q π θ t (s t , a t ) = E τ t+1:H-1 ∼P T (•|θ)

H-1 t =t r(s t , a t )|s t , a t denotes the expected state-action value function under policy π θ at time t.

Proof. As derived in ( 24), the hessian of J inner (θ) follows as:

∇ 2 θ J inner = E τ ∼P T (τ |θ) R(τ ) ∇ 2 θ log π θ (τ ) + ∇ θ log π θ (τ )∇ θ log π θ (τ ) (47) = E τ ∼P T (τ |θ) H-1 t=0 t t =0

∇ 2 θ log π θ (a t , s t ) r(s t , a t ) (48)

EQUATION

)

EQUATION

The term in ( 50) is equal to H 2 . We continue by showing that the remaining term in ( 51) is equivalent to H 1 + H 12 + H 12 . For that, we split the inner double sum in ( 51) into three components:

EQUATION

EQUATION

By changing the backward looking summation over outer products into a forward looking summation of rewards, (53) can be shown to be equal to H 1 :

EQUATION

By simply exchanging the summation indices t and h in (55) it is straightforward to show that ( 55) is the transpose of (54). Hence it is sufficient to show that ( 54) is equivalent to H 12 . However, instead of following the direction of the previous proof we will now start with the definition of H 12 and derive the expression in (54).

EQUATION

The gradient of Q π θ t can be expressed recursively:

EQUATION

By induction, it follows that

EQUATION

When inserting ( 63) into (59) and swapping the summation, we are able to show that H 12 is equivalent to (54).

EQUATION

This concludes the proof that the hessian of the expected sum of rewards under policy π θ and an MDP with finite time horizon H can be decomposed into 2018), simply differentiating through the gradient of surrogate objective J PGT as done in the original MAML version (Finn et al., 2017) leads to biased hessian estimates. Specifically, when compared with the unbiased estimate, as derived in ( 24) and decomposed in Appendix B.2, both H 1 and H 12 + H 12 are missing. Thus, ∇ θ J pre does not appear in the gradients of the meta-objective (i.e. ∇ θ J = ∇ θ J post ).

H 1 + H 2 + H 12 + H 12 .

Only performing gradient descent with ∇ θ J post entirely neglects influences of the pre-update sampling distribution. This issue was overseen in the RL-MAML implementation of Finn et al. (2017) .

As discussed in Stadie et al. (2018) this leads to poor performance in meta-learning problems that require exploration during the pre-update sampling.

B.3.1 THE DICE MONTE-CARLO ESTIMATOR:

Addressing the issue of incorrect higher-order derivatives of monte-carlo estimators, Foerster et al. (2018) propose DICE which mainly builds upon an newly introduced MagicBox( ) operator. This operator allows to formulate monte-carlo estimators with correct higher-order derivatives. A DICE formulation of a policy gradient estimator reads as:

EQUATION

In that, ⊥ denotes a "stop gradient" operator (i.e. ⊥(

f θ (x)) → f θ (x) but ∇ θ ⊥(f θ (x)) → 0).

Note that → denotes a "evaluates to" and does not necessarily imply equality w.r.t. to gradients. Hence, J DICE (θ) evaluates to the sum of rewards at 0th order but produces the unbiased gradients ∇ n θ J DICE (θ) when differentiated n-times (see Foerster et al. (2018) for proof). To shed more light on the maverick DICE formulation, we rewrite (67) as follows:

EQUATION

Interpreting this novel formulation, the MagicBox operator θ ({a t ≤t }) can be understood as "dry" importance sampling weight. At 0th order it evaluates to 1 and leaves the objective function unaffected, but when differentiated once it yields an estimator for the marginal rate of return due to a change in the policy-implied trajectory distribution.

EQUATION

EQUATION

In expectation, E τ ∼P T (τ |θ) [∇ 2 θ J DICE ] the DICE monte carlo estimate of the hessian is equivalent to the hessian of the inner objective. To show this, we use the expression of ∇ 2 θ J inner (49):

EQUATION

B.4 BIAS AND VARIANCE OF THE CURVATURE ESTIMATE:

As shown in the previous section, ∇ 2 θ J DICE provides an unbiased estimate of the hessian of the inner objective

J inner = E τ ∼P T (τ |θ) [R(τ )].

However, recall the DICE objective involves a product of importance weights along the trajectory.

EQUATION

Taking the 2nd derivative of this product leads to the outer product of sums in (74) which is of high variance w.r.t to τ . Specifically, this outer product of sums can be decomposed into three terms H 1 + H 12 + H 12 (see Appendix B.2). As noted by Furmston et al. (2016) , H 12 + H 12 is particularly difficult to estimate. In section 7.2 we empirically show that the high variance curvature estimates obtained with the DICE objective require large batch sizes and impede sample efficient learning.

In the following we develop a low variance curvature (LVC) estimator J LVC which matches J DICE at the gradient level and yields lower-variance estimates of the hessian by neglecting H 12 + H 12 .

Before formally introducing J LVC , we motivate such estimator starting with the policy gradient estimate that was originally derived in Sutton et al. (2000) , followed by marginalizing the trajectory level distribution P T (τ |θ) over states s t and actions a t . Note that we omit reward baselines for notational simplicity.

EQUATION

In that, p π θ t (s t ) denotes the state visitation frequency at time step t, i.e. the probability density of being in s t after t steps under the policy π θ . In the general case p π θ t (s t ) is intractable but depends on the policy parameter θ. We make the simplifying assumption that p π θ t (s t ) is fixed in a local region of θ. Since we make this assumption at the gradient level, this corresponds to a 1st order Taylor expansion of p π θ t (s t ) in θ. Note that this assumption is also used in the Monotonic Policy Improvement Theory (Kakade & Langford, 2002; Schulman et al., 2015a) . Based on this condition, the hessian follows as derivative of (83) whereby a "stop gradient" expression around the state visitation frequency p π θ t (s t ) resembles the 1st order Taylor approximation:

EQUATION

Since the expectation in ( 84) is intractable it must be evaluated by a monte carlo estimate. However, simply replacing the expectation with an average of samples trajectories induces a wrong hessian that does not correspond to (86) since outer product of log-gradients would be missing when differentiated. To ensure that automatic differentiation still yields the correct hessian, we add a "dry" importance weight comparable to DICE:

EQUATION

When integrated this resembles the LVC "surrogate" objective J LVC .

EQUATION

The gradients of J LVC match ∇ θ J DICE and resemble an unbiased policy gradient estimate:

EQUATION

The respective Hessian can be obtained by differentiating (90): 

∇ 2 θ J LVC = ∇ θ H-1 t=0 π θ (

EQUATION

In expectation ∇ 2 θ J LVC is equivalent to

EQUATION

+ E τ ∼P T (τ |θ) H-1 t=0 t t =0

∇ 2 θ log π θ (a t |s t ) r(s t , a t ) (100)

EQUATION

The Hessian ∇ 2 θ J LVC no longer provides an unbiased estimate of ∇ 2 θ J inner since neglects the matrix term H 12 + H 12 . This approximation is based on the assumption that the state visitation distribution is locally unaffected by marginal changes in θ and leads to a substantial reduction of variance in the hessian estimate. Furmston et al. (2016) show that under certain conditions (i.e. infinite horizon MDP, sufficiently rich policy parameterisation) the term H 12 +H 12 vanishes around a local optimum θ * . Given that the conditions hold, this implies that

E τ [∇ 2 θ J LVC ] → E τ [∇ 2 θ J DICE ] as θ → θ * , i.

e. the bias of the LCV estimator becomes negligible close to the local optimum. The experiments in section 7.2 confirm this theoretical argument empirically and show that using the low variance curvature estimates obtained through J LVC improve the sample-efficiency of meta-learning by a significant margin.

C PROXIMAL POLICY SEARCH METHODS:



C.1 MONOTONIC POLICY IMPROVEMENT THEORY:

This section provides a brief introduction to policy performance bounds and the theory of monotonic policy improvement in the setting of reinforcement learning. While Section 6 discusses the extension of this theory to meta learning, the following explanations assume a standard RL setting where T is exogenously given. Hence, we will omit mentioning the dependence on T for notational brevity. Since the monotonic policy improvement frameworks relies on infinite-time horizon MDPs, we assume H → ∞ for the remainder of this chapter.

In addition to the expected reward J(π) under policy π, we will use the state value function V π , the state-action value function Q π as well as the advantage function A π :

V π (s) = E a0,s1,... ∞ t=0 γ t r(s t , a t ) s t = s Q π (s, a) = E s1,a1,... ∞ t=0 γ t r(s t , a t ) s t = s, a 0 = a = r(s, a) + γE s ∼p(s |s,a) [V π (s )] A π (s, a) = Q π (s, a) -V π (s)

with a t ∼ π(a t |s t ) and s t+1 ∼ p(s t+1 |s t , a t ).

The expected return under a policy π can be expressed as the sum of the expected return of another policy π and the expected discounted advantage of π over π (see Schulman et al. (2015a) for proof).

J(π) = J(π) + E τ ∼P (τ ,π) ∞ t=0 γ t A π (s t , a t )

Let d π denote the discounted state visitation frequency:

d π (s) = γ t ∞ t=0 p(s t = s|π)

We can use d π to express the expectation over trajectories τ ∼ p π (τ ) in terms of states and actions:

EQUATION

Local policy search aims to find a policy update π → π in the proximity of π so that J(π) is maximized. Since J(π) is not affected by the policy update π → π, it is sufficient to maximize the expected advantage under π. However, the complex dependence of d π (s) on π makes it hard to directly maximize the objective in (102). Using a local approximation of (102) where it is assumed that the state visitation frequencies d π and d π are identical, the optimization can be phrased as

EQUATION

In the following we refer to J(π) as surrogate objective. It can be shown that the surrogate objective J matches J to first order when π = π (see Kakade & Langford (2002) ). If π θ is a parametric and differentiable function with parameter vector θ, this means that for any θ o :

EQUATION

When π = π, an approximation error of the surrogate objective J w.r.t. to the true objective J is introduced. Achiam et al. ( 2017) derive a lower bound for the true expected return of π:

J(π) ≥ J π (π) -C E s∼dπ [D KL [π(•|s)||π(•|s)]] = J π (π) -C DKL [π||π] (105) with C = √ 2γ 1-γ max s |E a∼π(a,s) [A π (s, a)]| C.2 TRUST REGION POLICY OPTIMIZATION (TRPO)

Trust region policy optimization (TPRO) (Schulman et al., 2015a) Thereby the KL-constraint δ induces a local trust region around the current policy π θo . A practical implementation of TPRO uses a quadratic approximation of the KL-constraint which leads to the following update rule:

EQUATION

with g := ∇ θ E s∼dπ θo (s)

a∼π θo (a|s) π θ (a|s)

π θo (a|s) A π θo (s, a) being the gradient of the objective and F = ∇ 2 θ DKL [π θo ||π θ ] the Fisher information matrix of the current policy π θo . In order to avoid the cubic time complexity that arise when inverting F , the Conjugate Gradient (CG) algorithm is typically used to approximate the Hessian vector product F -1 g.

C.3 PROXIMAL POLICY OPTIMIZATION (PPO):

While TPRO is framed as constrained optimization, the theory discussed in Appendix C.1 suggest to optimize the lower bound. Based on this insight, Schulman et al. (2017) propose adding a KL penalty to the objective and solve the following unconstrained optimization problem:

EQUATION

However, they also show that it is not sufficient to set a fixed penalty coefficient β and propose two alternative methods, known as Proximal Policy Optimization (PPO) that aim towards alleviating this issue:

1) Adapting the KL coefficient β so that a desired target KL-divergence DKL [π θo ||π θ ] between the policy before and after the parameter update is achieved 2) Clipping the likelihood ratio so that the optimization has no incentive to move the policy π θ too far away from the original policy π θo . A corresponding optimization objective reads as:

J CLIP = E s∼dπ θo (s)

a∼π θo (a|s) min π θ (a|s) π θo (a|s) A π θo (s, a) , clip 1+ 1-π θ (a|s) π θo (a|s) A π θo (s, a)

Empirical results show that the latter approach leads to better learning performance (Schulman et al., 2017) .

Since PPO objective keeps π θ in proximity of π θo , it allows to perform multiple gradient steps without re-sampling trajectories from the updated policy. This property substantially improves the data-efficiency of PPO over vanilla policy gradient methods which need to re-estimate the gradients after each step.

D EXPERIMENTS D.1 HYPERPARAMETER CHOICE:

The optimal hyperparameter for each algorithm was determined using parameter sweeps. In this environment, each task corresponds to one corner of the area. The point mass must reach the goal by applying directional forces. The agent only experiences a reward when within a certain radius of the goal, and the magnitude of the reward is equal to the distance to the goal.

HalfCheetahFwdBack, AntFwdBack, WalkerFwdBack, HumanoidFwdBack

• Trajectory Length : 100 (HalfCheetah, Ant); 200 (Humanoid, Walker)

• Num Adapt Steps: 1

The task is chosen between two directions -forward and backward. Each agent must run along the goal direction as far as possible, with reward equal to average velocity minus control costs.

AntRandDirec, HumanoidRandDirec:

• Trajectory Length : 100 (Ant); 200 (Humanoid)

• Num Adapt Steps: 1

Each task corresponds to a random direction in the XY plane. As above, each agent must learn to run in that direction as far as possible, with reward equal to average velocity minus control costs.

AntRandGoal:

• Trajectory Length : 200

• Num Adapt Steps: 2

In this environment, each task is a location randomly chosen from a circle in the XY plane. The goal is not given to the agent -it must learn to locate, approach, and stop at the target. The agent receives a penalty equal to the distance from the goal.

HopperRandParams, WalkerRandParams:

• Trajectory Length : 200

• Inner LR : 0.05

• Num Adapt Steps: 1

The agent must move forward as quickly as it can. Each task is a different randomization of the simulation parameters, including friction, joint mass, and inertia. The agent receives a reward equal to its velocity.

D.3 FURTHER EXPERIMENTS RESULTS:

In addition to the six environments displayed in 2, we ran experiments on the other four continuous control environments described above. The results are displayed in 7. In addition to the improved sample complexity and better asymptotic performance, another advantage of ProMP is its computation time. Figure 8 shows the average time spent per iteration throughout the learning process in the humanoid environment differences of ProMP, LVC-VPG, and MAML-TRPO. Due to the expensive conjugate gradient steps used in TRPO, MAML takes far longer than either first order method. Since ProMP takes multiple stochastic gradient descent steps per iteration, it leads to longer outer update times compared to VPG, but in both cases the update time is a fraction of the time spent sampling from the environment.

The difference in sampling time is due to the reset process: resetting the environment when the agent "dies" is an expensive operation. ProMP acquires better performance quicker, and as a result the agent experiences longer trajectories and the environment is reset less often. In our setup, instances of the environment are run in parallel and performing a reset blocks all environments. 

:

Note that MAML is theoretically sound, but does not attend to correctly estimating the meta-policy gradients. As consequence, the gradients in the corresponding implementation do not comply with the theory.

https://sites.google.com/view/pro-mp

Figures and Tables:

Figure 1: Stochastic computation graphs of meta-learning formulation I (left) and formulation II (right). The red arrows illustrate the credit assignment from the post-update returns R to the pre-update policy π θ through ∇ θ Jpre. (Deterministic nodes: Square; Stochastic nodes: Circle)

Figure 2: Meta-learning curves of ProMP and previous gradient-based meta-learning algorithms in six different MuJoCo environments. ProMP outperforms previous work in all the the environments.

Figure 3: Meta-learning curves corresponding to different meta-gradient estimators in conjunction with VPG.

Figure4: Top: Relative standard deviation of meta-policy gradients. Bottom: Returns in the respective environments throughout the learning process. LVC exhibits less variance in its meta-gradients which may explain its superior performance when compared to DiCE.

Figure 5: Exploration patterns of the pre-update policy and exploitation post-update with different update

Figure 6: Meta-gradient updates of policy parameters θ0 and θ1 in a 1D environment w.r.t Formulation I (red) and Formulation II (green).

ESTIMATING THE HESSIAN OF THE RL REWARD OBJECTIVE As pointed out by Al-Shedivat et al. (2018); Stadie et al. (2018) and Foerster et al. (

Figure 7: Meta-learning curves of ProMP and four other gradient-based meta-learning algorithms in four new Mujoco environments

Figure 8: Comparison of wall clock time with different algorithms on HumanoidRandDirec, averaged over all iterations

s t , a t )

Table content: <table><tr><td colspan="2">Algorithm 1 Proximal Meta-Policy Search (ProMP)</td></tr><tr><td colspan="2">Require: Task distribution ρ, step sizes α, β, KL-penalty coefficient η, clipping range</td></tr><tr><td colspan="2">1: Randomly initialize θ</td></tr><tr><td colspan="2">2: while θ not converged do</td></tr><tr><td>3:</td><td>Sample batch of tasks T i ∼ ρ(T )</td></tr><tr><td>4:</td><td/></tr></table>

a t |s t ) ⊥(π θ (a t |s t )) ∇ θ log π θ (a t |s t ) (a t |s t ) ⊥(π θ (a t |s t )) ∇ θ log π θ (a t |s t )∇ θ log π θ (a t |s t ) log π θ (a t |s t )∇ θ log π θ (a t |s t ) θ log π θ (a t |s t )∇ θ log π θ (a t |s t ) r(s t , a t ) (97)

Table content: <table><tr><td/><td/><td/><td/><td/><td/><td>H-1</td></tr><tr><td/><td/><td/><td/><td/><td/><td>r(s t , a t )</td><td>(92)</td></tr><tr><td/><td/><td/><td/><td/><td/><td>t =t</td></tr><tr><td>=</td><td>H-1</td><td colspan="5">π θ H-1</td><td>r(s t , a t )</td><td>(93)</td></tr><tr><td/><td>t=0</td><td/><td/><td/><td/><td>t =t</td></tr><tr><td/><td/><td>+</td><td>π θ (a t |s t ) ⊥(π θ (a t |s t ))</td><td colspan="2">∇ 2 θ log π θ (a t |s t )</td><td>H-1 t =t</td><td>r(s t , a t )</td><td>(94)</td></tr><tr><td>→</td><td>H-1</td><td colspan="5">∇ H-1</td><td>r(s t , a t )</td><td>(95)</td></tr><tr><td/><td>t=0</td><td/><td/><td/><td/><td>t =t</td></tr><tr><td/><td/><td/><td/><td>H-1</td><td/></tr><tr><td/><td/><td colspan="3">+ ∇ 2 θ log π θ (a t |s t )</td><td colspan="2">r(s t , a t )</td><td>(96)</td></tr><tr><td/><td/><td/><td/><td>t =t</td><td/></tr><tr><td/><td>H-1</td><td>t</td><td/><td/><td/></tr><tr><td>=</td><td/><td/><td/><td/><td/></tr><tr><td/><td>t=0</td><td colspan="2">t =0</td><td/><td/></tr></table>

Table 1 contains the hyperparameter settings used for the different algorithms. Any environment specific modifications are noted in the respective paragraph describing the environment. Hyperparameter settings used in each algorithm

Table content: <table><tr><td>D.2 ENVIRONMENT SPECIFICATIONS</td></tr><tr><td>PointEnv (used in the experiment in 7.3)</td></tr><tr><td>• Trajectory Length : 100</td></tr><tr><td>• Num Adapt Steps : 3</td></tr></table>

Peer review (iclr2019):
 In this paper, the authors investigate the gradient calculation in the original MAML (Finn et al. 2017) and E-MAML (Al-Shedivat et al. 2018). By comparing the differences in the gradients of these two algorithms, the authors demonstrate the advantages of the original MAML in taking the casual dependence into account. To obtain the correct estimation of the gradient through auto-differentiation, the authors exploit the DiCE formulation. Considering the variance in the DiCE objective formulation, the authors finally propose an objective which leads to low-variance but biased gradient. The authors verify the proposed methods in meta-RL tasks and achieves comparable performances to MAML and E-MAML. Although the ultimate algorithm proposed by this paper is not far away from MAML and E-MAML, they did a quite good job in clarify the differences in the existing variants of MAML from the gradient computation perspective and reveal the potential error due to the auto-differentiation. The proposed new objective and the surrogate is well-motivated from such observation and the trade-off between variance and bias. My major concern is how big the effect is if we use (3) comparing to (4) in calculate the gradient. As the authors showed, the only difference between (3) and (4) is the weights in front of the term .nabla_.theta.log.pi_.theta: the E-MAML is a fixed weight and the MAML is using a adaptive through the inner product. Whether the final difference in Figure 4 between MAML and E-MAML is all caused by such difference in gradient estimation is not clearly. In fact, based on the other large-scale high-dimension empirical experiments in Figure 2, it seems the difference in gradient estimator (3) and (4) does not induced too much difference in final performances between MAML and E-MAML. Based on such observation, I was wondering the consistent better performance of the proposed algorithm might not because the corrected gradient computation from the proposed objective. It might because the clip operation or other components in the algorithm. To make a more convincing argument, it will be better if the authors can evaluate different gradient within the same updates. I am willing to raise my score if the author can address the question. minor: The gradients calculation in Eq (2) and (3) are not consistent with the Algorithm and the appendix. The notation is not consistent with common usage: .nabla^2 is actually used for denoting the Laplace operator, i.e., .nabla^2 = .nabla .cdot .nable, which is a scalar.