PARAMETER-BASED VALUE FUNCTIONS
Year: 2021

Abstract:
Traditional off-policy actor-critic Reinforcement Learning (RL) algorithms learn value functions of a single target policy. However, when value functions are updated to track the learned policy, they forget potentially useful information about old policies. We introduce a class of value functions called Parameter-Based Value Functions (PBVFs) whose inputs include the policy parameters. They can generalize across different policies. PBVFs can evaluate the performance of any policy given a state, a state-action pair, or a distribution over the RL agent’s initial states. First we show how PBVFs yield novel off-policy policy gradient theorems. Then we derive off-policy actor-critic algorithms based on PBVFs trained by Monte Carlo or Temporal Difference methods. We show how learned PBVFs can zeroshot learn new policies that outperform any policy seen during training. Finally our algorithms are evaluated on a selection of discrete and continuous control tasks using shallow policies and deep neural networks. Their performance is comparable to state-of-the-art methods.

heading: 1 INTRODUCTION
text: Value functions are central to Reinforcement Learning (RL). For a given policy, they estimate the value of being in a specific state (or of choosing a particular action in a given state). Many RL breakthroughs were achieved through improved estimates of such values, which can be used to find optimal policies (Tesauro, 1995; Mnih et al., 2015). However, learning value functions of arbitrary policies without observing their behavior in the environment is not trivial. Such off-policy learning requires to correct the mismatch between the distribution of updates induced by the behavioral policy and the one we want to learn. Common techniques include Importance Sampling (IS) (Hesterberg, 1988) and deterministic policy gradient methods (DPG) (Silver et al., 2014), which adopt the actorcritic architecture (Sutton, 1984; Konda & Tsitsiklis, 2001; Peters & Schaal, 2008).
Unfortunately, these approaches have limitations. IS suffers from large variance (Cortes et al., 2010; Metelli et al., 2018; Wang et al., 2016) while traditional off-policy actor-critic methods introduce off-policy objectives whose gradients are difficult to follow since they involve the gradient of the action-value function with respect to the policy parameters∇θQπθ (s, a) (Degris et al., 2012; Silver et al., 2014). This term is usually ignored, resulting in biased gradients for the off-policy objective. Furthermore, off-policy actor-critic algorithms learn value functions of a single target policy. When value functions are updated to track the learned policy, the information about old policies is lost.
We address the problem of generalization across many value functions in the off-policy setting by introducing a class of parameter-based value functions (PBVFs) defined for any policy. PBVFs are value functions whose inputs include the policy parameters, the PSSVF V (θ), PSVF V (s, θ), and PAVF Q(s, a, θ). PBVFs can be learned using Monte Carlo (MC) (Metropolis & Ulam, 1949) or Temporal Difference (TD) (Sutton, 1988) methods. The PAVF Q(s, a, θ) leads to a novel stochastic and deterministic off-policy policy gradient theorem and, unlike previous approaches, can directly compute∇θQπθ (s, a). Based on these results, we develop off-policy actor-critic methods and compare our algorithms to two strong baselines, ARS and DDPG (Mania et al., 2018; Lillicrap et al., 2015), outperforming them in some environments.
We make theoretical, algorithmic, and experimental contributions: Section 2 introduces the standard MDP setting; Section 3 formally presents PBVFs and derive algorithms for V (θ), V (s, θ) and Q(s, a, θ); Section 4 describes the experimental evaluation using shallow and deep policies; Sections 5 and 6 discuss related and future work. Proofs and derivations can be found in Appendix A.2.

heading: 2 BACKGROUND
text: We consider a Markov Decision Process (MDP) (Stratonovich, 1960; Puterman, 2014) M = (S,A, P,R, γ, µ0) where at each step an agent observes a state s ∈ S , chooses action a ∈ A, transitions into state s′ with probability P (s′|s, a) and receives a reward R(s, a). The agent starts from an initial state, chosen with probability µ0(s). It is represented by a parametrized stochastic policy πθ : S → ∆(A), which provides the probability of performing action a in state s. Θ is the space of policy parameters. The policy is deterministic if for each state s there exists an action a such that πθ(a|s) = 1. The return Rt is defined as the cumulative discounted reward from time step t: Rt = ∑T−t−1 k=0 γ
kR(st+k+1, at+k+1), where T denotes the time horizon and γ a realvalued discount factor. The performance of the agent is measured by the cumulative discounted expected reward (expected return), defined as J(πθ) = Eπθ [R0]. Given a policy πθ, the state-value function V πθ (s) = Eπθ [Rt|st = s] is defined as the expected return for being in a state s and following policy πθ. By integrating over the state space S, we can express the maximization of the expected cumulative reward in terms of the state-value function J(πθ) = ∫ S µ0(s)V
πθ (s) ds. The action-value function Qπθ (s, a), which is defined as the expected return for performing action a in state s, and following the policy πθ, is Qπθ (s, a) = Eπθ [Rt|st = s, at = a], and it is related to the state-value function by V πθ (s) = ∫ A πθ(a|s)Qπθ (s, a) da. We define as dπθ (s′) the discounted weighting of states encountered starting at s0 ∼ µ0(s) and following the policy πθ: dπθ (s′) = ∫ S ∑∞ t=1 γ
t−1µ0(s)P (s → s′, t, πθ) ds, where P (s → s′, t, πθ) is the probability of transitioning to s′ after t time steps, starting from s and following policy πθ. Sutton et al. (1999) showed that, for stochastic policies, the gradient of J(πθ) does not involve the derivative of dπθ (s) and can be expressed in a simple form:
∇θJ(πθ) = ∫ S dπθ (s) ∫ A ∇θπθ(a|s)Qπθ (s, a) dads. (1)
Similarly, for deterministic policies Silver et al. (2014) obtained the following: ∇θJ(πθ) = ∫ S dπθ (s)∇θπθ(s)∇aQπθ (s, a)|a=πθ(s) ds. (2)
Off-policy RL In off-policy policy optimization, we seek to find the parameters of the policy maximizing a performance index Jb(πθ) using data collected from a behavioral policy πb. Here the objective function Jb(πθ) is typically modified to be the value function of the target policy, integrated over dπb∞(s) = limt→∞ P (st = s|s0, πb), the limiting distribution of states under πb (assuming it exists) (Degris et al., 2012; Imani et al., 2018; Wang et al., 2016). Throughout the paper we assume that the support of dπb∞ includes the support of µ0 so that the optimal solution for Jb is also optimal for J . Formally, we want to find:
Jb(πθ∗) = max θ ∫ S dπb∞(s)V πθ (s) ds = max θ ∫ S dπb∞(s) ∫ A πθ(a|s)Qπθ (s, a) da ds. (3)
Unfortunately, in the off-policy setting, the states are obtained from dπb∞ and not from d πθ ∞ , hence the gradients suffer from a distribution shift (Liu et al., 2019; Nachum et al., 2019). Moreover, since we have no access to dπθ∞ , a term in the policy gradient theorem corresponding to the gradient of the action value function with respect to the policy parameters needs to be estimated. This term is usually ignored in traditional off-policy policy gradient theorems1. In particular, when the policy is stochastic, Degris et al. (2012) showed that:
∇θJb(πθ) = ∫ S dπb∞(s) ∫ A πb(a|s) πθ(a|s) πb(a|s) (Qπθ (s, a)∇θ log πθ(a|s) +∇θQπθ (s, a)) da ds (4)
≈ ∫ S dπb∞(s) ∫ A πb(a|s) πθ(a|s) πb(a|s) (Qπθ (s, a)∇θ log πθ(a|s)) da ds. (5)
Analogously, Silver et al. (2014) provided the following approximation for deterministic policies 2: ∇θJb(πθ) = ∫ S dπb∞(s) ( ∇θπθ(s)∇aQπθ (s, a)|a=πθ(s) +∇θQπθ (s, a)|a=πθ(s) ) ds (6)
≈ ∫ S dπb∞(s) ( ∇θπθ(s)∇aQπθ (s, a)|a=πθ(s) ) ds. (7)
1With tabular policies, dropping this term still results in a convergent algorithm (Degris et al., 2012). 2In the original formulation of Silver et al. (2014) dπb∞ (s) is replaced by dπb(s).
Although the term ∇θQπθ (s, a) is dropped, there might be advantages in using the approximate gradient of Jb in order to find the maximum of the original RL objective J . Indeed, if we were on-policy, the approximated off-policy policy gradients by Degris et al. (2012); Silver et al. (2014) would revert to the on-policy policy gradients, while an exact gradient for Jb would necessarily introduce a bias. However, when we are off-policy, it is not clear whether this would be better than using the exact gradient of Jb in order to maximize J . In this work, we assume that Jb can be considered a good objective for off-policy RL and we derive an exact gradient for it.

heading: 3 PARAMETER-BASED VALUE FUNCTIONS
text: In this section, we introduce our parameter-based value functions, the PSSVF V (θ), PSVF V (s, θ), and PAVF Q(s, a, θ) and their corresponding learning algorithms. First, we augment the state and action-value functions, allowing them to receive as an input also the weights of a parametric policy. The parameter-based state-value function (PSVF) V (s, θ) = E[Rt|st = s, θ] is defined as the expected return for being in state s and following policy parameterized by θ. Similarly, the parameter-based action-value function (PAVF) Q(s, a, θ) = E[Rt|st = s, at = a, θ] is defined as the expected return for being in state s, taking action a and following policy parameterized by θ. Using PBVFs, the RL objective becomes: J(πθ) = ∫ S µ0(s)V
π(s, θ) ds. Maximizing this objective leads to on-policy policy gradient theorems that are analogous to the traditional ones (Sutton et al., 1999; Silver et al., 2014): Theorem 3.1. Let πθ be stochastic. For any Markov Decision Process, the following holds: ∇θJ(πθ) = Es∼dπθ (s),a∼πθ(.|s) [(Q(s, a, θ)∇θ log πθ(a|s))] . (8) Theorem 3.2. Let πθ be deterministic. Under standard regularity assumptions (Silver et al., 2014), for any Markov Decision Process, the following holds:
∇θJ(πθ) = Es∼dπθ (s) [ ∇aQ(s, a, θ)|a=πθ(s)∇θπθ(s) ] . (9)
Parameter-based value functions allow us also to learn a function of the policy parameters that directly approximates J(πθ). In particular, the parameter-based start-state-value function (PSSVF) is defined as:
V (θ) := Es∼µ0(s)[V (s, θ)] = ∫ S µ0(s)V (s, θ) ds = J(πθ). (10)
Off-policy RL In the off-policy setting, the objective to be maximized becomes:
Jb(πθ∗) = max θ ∫ S dπb∞(s)V (s, θ) ds = max θ ∫ S ∫ A dπb∞(s)πθ(a|s)Q(s, a, θ) dads. (11)
By taking the gradient of the performance Jb with respect to the policy parameters θ we obtain novel policy gradient theorems. Since θ is continuous, we need to use function approximators Vw(θ) ≈ V (θ), Vw(s, θ) ≈ V (s, θ) and Qw(s, a, θ) ≈ Q(s, a, θ). Compatible function approximations can be derived to ensure that the approximated value function is following the true gradient. Like in previous approaches, this would result in linearity conditions. However, here we consider nonlinear function approximation and we leave the convergence analysis of linear PBVFs as future work. In episodic settings, we do not have access to dπb∞ , so in the algorithm derivations and in the experiments we approximate it by sampling trajectories generated by the behavioral policy. In all cases, the policy improvement step can be very expensive, due to the computation of the arg max over a continuous space Θ. Actor-critic methods can be derived to solve this optimization problem, where the critic (PBVFs) can be learned using TD or MC methods, while the actor is updated following the gradient with respect to the critic. Although our algorithms on PSSVF and PSVF can be used with both stochastic and deterministic policies, removing the stochasticity of the action-selection process might facilitate learning the value function. All our algorithms make use of a replay buffer.
3.1 PARAMETER-BASED START-STATE-VALUE FUNCTION V (θ)
We first derive the PSSVF V (θ). Given the original performance index J , and taking the gradient with respect to θ, we obtain:
∇θJ(πθ) = ∫ S µ0(s)∇θV (s, θ) ds = Es∼µ0(s)[∇θV (s, θ)] = ∇θV (θ). (12)
In Algorithm 1, the critic Vw(θ) is learned using MC to estimate the value of any policy θ. The actor is then updated following the direction of improvement suggested by the critic. Since the main application of PSSVF is in episodic tasks3, we optimize for the undiscounted objective.
Algorithm 1 Actor-critic with Monte Carlo prediction for V (θ) Input: Differentiable critic Vw : Θ → R with parameters w; deterministic or stochastic actor πθ with parameters θ; empty replay buffer D Output : Learned Vw ≈ V (θ)∀θ, learned πθ ≈ πθ∗
Initialize critic and actor weights w, θ repeat:
Generate an episode s0, a0, r1, s1, a1, r2, . . . , sT−1, aT−1, rT with policy πθ Compute return r = ∑T k=1 rk Store (θ, r) in the replay buffer D for many steps do:
Sample a batch B = {(r, θ)} from D Update critic by stochastic gradient descent: ∇w E(r,θ)∈B [r − Vw(θ)]2
end for for many steps do:
Update actor by gradient ascent: ∇θVw(θ) end for
until convergence
3.2 PARAMETER-BASED STATE-VALUE FUNCTION V (s, θ)
Learning the value function using MC approaches can be difficult due to the high variance of the estimate. Furthermore, episode-based algorithms like Algorithm 1 are unable to credit good actions in bad episodes. Gradient methods based on TD updates provide a biased estimate of V (s, θ) with much lower variance and can credit actions at each time step. Taking the gradient of Jb(πθ) in the PSVF formulation4, we obtain:
∇θJb(πθ) = ∫ S dπb∞(s)∇θV (s, θ) ds = Es∼dπb∞ (s)[∇θV (s, θ)]. (13)
Algorithm 2 (Appendix) uses the actor-critic architecture, where the critic is learned via TD5.
3.3 PARAMETER-BASED ACTION-VALUE FUNCTION Q(s, a, θ)
The introduction of the PAVF Q(s, a, θ) allows us to derive new policy gradients theorems when using a stochastic or deterministic policy.
Stochastic policy gradients We want to use data collected from some stochastic behavioral policy πb in order to learn the action-value of a target policy πθ. Traditional off-policy actor-critic algorithms only approximate the gradient of Jb, since they do not estimate the gradient of the actionvalue function with respect to the policy parameters ∇θQπθ (s, a) (Degris et al., 2012; Silver et al., 2014). With PBVFs, we can directly compute this contribution to the gradient. This yields an exact policy gradient theorem for Jb: Theorem 3.3. For any Markov Decision Process, the following holds:
∇θJb(πθ) = Es∼dπb∞ (s),a∼πb(.|s) [ πθ(a|s) πb(a|s) (Q(s, a, θ)∇θ log πθ(a|s) +∇θQ(s, a, θ)) ] . (14)
Algorithm 3 (Appendix) uses an actor-critic architecture and can be seen as an extension of OffPAC (Degris et al., 2012) to PAVF.
3Alternatives include regenerative method for MC estimation (Rubinstein & Kroese, 2016). 4Compared to standard methods based on the state-value function, we can directly optimize the policy
following the performance gradient of the PSVF, obtaining a policy improvement step in a model-free way. 5Note that the differentiability of the policy πθ is never required in PSSVF and PSVF.
Deterministic policy gradients Estimating Q(s, a, θ) is in general a difficult problem due to the stochasticity of the policy. Deterministic policies of the form π : S → A can help improving the efficiency in learning value functions, since the expectation over the action space is no longer required. Using PBVFs, we can write the performance of a policy πθ as:
Jb(πθ) = ∫ S dπb∞(s)V (s, θ) ds = ∫ S dπb∞(s)Q(s, πθ(s), θ) ds. (15)
Taking the gradient with respect to θ we obtain a deterministic policy gradient theorem: Theorem 3.4. Under standard regularity assumptions (Silver et al., 2014), for any Markov Decision Process, the following holds:
∇θJb(πθ) = Es∼dπb∞ (s) [ ∇aQ(s, a, θ)|a=πθ(s)∇θπθ(s) +∇θQ(s, a, θ)|a=πθ(s) ] . (16)
Algorithm 4 (Appendix) uses an actor-critic architecture and can be seen as an extension of DPG (Silver et al., 2014) to PAVF. Despite the novel formulation of algorithm 3, we decided to avoid the stochasticity of the policy and to implement and analyze only the deterministic PAVF.

heading: 4 EXPERIMENTS6
text: Applying algorithms 1, 2 and 4 directly can lead to convergence to local optima, due to the lack of exploration. In practice, like in standard deterministic actor-critic algorithms, we use a noisy version of the current learned policy in order to act in the environment and collect data to encourage exploration. More precisely, at each episode we use πθ̃ with θ̃ = θ+ , ∼ N (0, σ2I) instead of πθ and then store θ̃ in the replay buffer. In our experiments, we report both for our methods as well as the baselines the performance of the policy without parameter noise.

heading: 4.1 VISUALIZING PBVFS USING LQRS
text: We start with an illustrative example that allows us to visualize how PBVFs are learning to estimate the expected return over the parameter space. For this purpose, we use an instance of the 1D Linear Quadratic Regulator (LQR) problem and a linear deterministic policy with bias. In figure 1, we plot the episodic J(θ), the cumulative return that an agent would obtain by acting in the environment using policy πθ for a single episode, and the cumulative return predicted by the PSSVF V (θ) for two different times during learning. At the beginning of the learning process, the PSSVF is able to provide just a local estimation of the performance of the agent, since only few data have been observed. However, after 1000 episodes, it is able to provide a more accurate global estimate over the parameter space. Appendix A.4.1 contains a similar visualization for PSVF and PAVF, environment details and hyperparameters used.

heading: 4.2 MAIN RESULTS
text: Given the similarities between our PAVF and DPG, Deep Deterministic Policy Gradients (DDPG) is a natural choice for the baseline. Additionally, the PSSVF V (θ) resembles evolutionary methods as the critic can be interpreted as a global fitness function. Therefore, we decided to include in the comparison Augmented Random Search (ARS) which is known for its state-of-the-art performance using only linear policies in continuous control tasks. For the policy, we use a 2-layer MLP (64,64) with tanh activations and a linear policy followed by a tanh nonlinearity. Figure 2 shows results for deterministic policies with both architectures. In all the tasks the PSSVF is able to achieve at least the same performance compared to ARS, often outperforming it. In the Inverted Pendulum environment, PSVF and PAVF with deep policy are very slow to converge, but they excel in the Swimmer task and MountainCarContinuous. In Reacher, all PBVFs fail to learn the task, while DDPG converges quickly to the optimal policy. We conjecture that for this task it is difficult to perform a search in parameter space. On the other hand, in MountainCarContinuous, the reward is more sparse and DDPG only rarely observes positive reward when exploring in action space. In Appendix A.4 we include additional results for PSSVF and PSVF with stochastic policies and hyperparameters. We analyze the sensitivity of the algorithms on the choice of hyperparameters in Appendix A.4.4.
6Code is available at: https://github.com/FF93/Parameter-based-Value-Functions

heading: 4.3 ZERO-SHOT LEARNING
text: In order to test whether PBVFs are generalizing across the policy space, we perform the following experiment with shallow deterministic policies: while learning using algorithm 1, we stop training and randomly initialize 5 policies. Then, without interacting with the environment, we train these policies offline, in a zero-shot manner, following only the direction of improvement suggested by ∇θVw(θ), whose weights w remain frozen. We observe that shallow policies can be effectively trained from scratch. Results for PSSVFs in Swimmer-v3 are displayed in figure 3. In particular, we compare the performance of the policy learned, the best perturbed policy for exploration seen during training and five policies learned from scratch at three different stages in training. We note that after the PSSVF has been trained for 100,000 time steps interactions with the environment (first snapshot), these policies are already able to outperform both the current policy and any policy seen while training the PSSVF. They achieve an average return of 297, while the best observed return was 225. We include additional results for PSVF and PAVF in different environments, using shallow and deep policies in Appendix A.4.2. When using deep policies, we obtain similar results only for the simplest environments. For this task, we use the same hyperparameters as in figure 2.

heading: 4.4 OFFLINE LEARNING WITH FRAGMENTED BEHAVIORS
text: In our last experiment, we investigate how PSVFs are able to learn in a completely offline setting. The goal is to learn a good policy in Swimmer-v3 given a fixed dataset containing 100,000 transitions, without additional environment interactions. Furthermore, the policy generating the data is perturbed every 200 time steps, for a total of 5 policies per episode. Observing only incomplete trajectories for each policy parameter makes TD bootstrapping harder: In order to learn, the PSVF needs to generalize across both the state and the parameter space. Given the fixed dataset, we first train the PSVF, minimizing the TD error. Then, at different stages during learning, we train 5 new shallow deterministic policies. Figure 4 describes this process. We note that at the beginning of training, when the PSVF V (s, θ) has a larger TD error, these policies have poor performance. However, after 7000 gradient updates, they are able to achieve a reward of 237, before eventually degrading to 167. They outperform the best policy in the dataset used to train the PSVF, whose return is only of 58.

heading: 5 RELATED WORK
text: There are two main classes of similar algorithms performing search in policy parameter space. Evolutionary algorithms (Wierstra et al., 2014; Salimans et al., 2017; Mania et al., 2018) iteratively estimate a fitness function evaluating the performance of a population of policies and then perform gradient ascent in parameter space, often estimating the gradient using finite difference approximation. By replacing the performance of a population through a likelihood estimation, evolutionary algorithms become a form of Parameter Exploring Policy Gradients (Sehnke et al., 2008; 2010). Our methods are similar to evolution since our value function can be seen as a fitness. Unlike evolution, however, our approach allows for obtaining the fitness gradient directly and is more suitable for reusing past data. While direct V (θ) optimization is strongly related to evolution, our more informed algorithms optimize V (s, θ) and Q(s, a, θ). That is, ours both perform a search in policy parameter space AND train the value function and the policy online, without having to wait for the ends of trials or episodes.
The second related class of methods involves surrogate functions (Box & Wilson, 1951; Booker et al., 1998; Moore & Schneider, 1996). They often use local optimizers for generalizing across fitness functions. In particular, Bayesian Optimization (BO) (Snoek et al., 2012; 2015) uses a surrogate function to evaluate the performance of a model over a set of hyperparameters and follows the uncertainty on the surrogate to query the new data to sample. Unlike BO, we do not build a probabilistic model and we use the gradient of the value function instead of a sample from the posterior to decide which policy parameters to use next in the policy improvement step.
The possibility of augmenting the value functions with auxiliary parameters was already
considered in work on General Value Functions (Sutton et al., 2011), where the return is defined with respect to an arbitrary reward function. Universal Value Function Approximators (Schaul et al., 2015) extended this approach to learn a single value function V πθ (s, g), representing the value, given possible agent goals g. In particular, they learn different embeddings for states and goals, exploiting their common structure, and they show generalization to new unseen goals. Similarly, our PSVF V (s, θ) is able to generalize to unseen policies, observing data for only a few (s, θ) pairs. General and Universal Value Functions have not been applied to learn a single value function for every possible policy.
Policy Evaluation Networks (PENs) (Harb et al., 2020) are closely related to our work and share the same motivation. PENs focus on the simplest PSSVF V (θ) trained without an actor-critic architecture. Like in some of our experiments, the authors show how following the direction of improvement suggested by V (θ) leads to an increase in policy performance. They also suggest to explore in future work a more complex setting where a PSVF V (s, θ) is learned using an actor-critic
architecture. Our work directly introduces the PSVF V (s, θ) and PAVF Q(s, a, θ) and presents novel policy gradient theorems for PAVFs when stochastic or deterministic policies are used. There are many differences between our approach to learning V (θ) and theirs. For example, we do not use a fingerprint mechanism (Harb et al., 2020) for embedding the weights of complex policies. Instead, we simply parse all the policy weights as inputs to the value function, even in the nonlinear case. Fingerprinting may be important for representing nonlinear policies without losing information about their structure and for saving memory required to store the weights. Harb et al. (2020) focus on the offline setting. They first use randomly initialized policies to perform rollouts and collect reward from the environment. Then, once V (θ) is trained using the data collected, many gradient ascent steps through V yield new, unseen, randomly initialized policies in a zero-shot manner, exhibiting improved performance. They train their value function using small nonlinear policies of one hidden layer and 30 neurons on Swimmer-v3. They evaluate 2000 deterministic policies on 500 episodes each (1 million policy evaluations), achieving a final expected return of ≈ 180 on new policies trained from scratch through V. On the other hand, in our zero-shot learning experiment using a linear PSSVF, after only 100 policy evaluations, we obtain a return of 297. In our main experiments, we showed that a fingerprint mechanism is not necessary for the tasks we analyzed: even when using a much bigger 2-layers MLP policy, we are able to outperform the results in PEN. Although Harb et al. (2020) use Swimmer-v3 “to scale up their experiments”, our results suggest that Swimmer-v3 does not conclusively demonstrate possible benefits of their policy embedding.
Gradient Temporal Difference (Sutton et al., 2009a;b; Maei et al., 2009; 2010; Maei, 2011) and Emphatic Temporal Difference methods (Sutton et al., 2016) were developed to address convergence under on-policy and off-policy (Precup et al., 2001) learning with function approximation. The first attempt to obtain a stable off-policy actor-critic algorithm under linear function approximation was called Off-PAC (Degris et al., 2012), where the critic is updated using GTD(λ) (Maei, 2011) to estimate the state-value function. This algorithm converges when using tabular policies. However, in general, the actor does not follow the true gradient direction for Jb. A paper on DPG (Silver et al., 2014) extended the Off-PAC policy gradient theorem (Degris et al., 2012) to deterministic policies. This was coupled with a deep neural network to solve continuous control tasks through Deep Deterministic Policy Gradients (Lillicrap et al., 2015). Imani et al. (2018) used emphatic weights to derive an exact off-policy policy gradient theorem for Jb. Differently from Off-PAC, they do not ignore the gradient of the action-value function with respect to the policy, which is incorporated in the emphatic weighting: a vector that needs to be estimated. Our off-policy policy gradients provide an alternative approach that does not need emphatic weights.
The widely used off-policy objective function Jb suffers the distribution shift problem. Liu et al. (2019) provided an off-policy policy gradient theorem which is unbiased for the true RL objective J(πθ), introducing a term dπθ∞/d πb ∞ that corrects the mismatch between the states distributions. Despite their sound off-policy formulation, estimating the state weighting ratio remains challenging. All our algorithms are based on the off-policy actor-critic architecture. The two algorithms based on Q(s, a, θ) can be viewed as analogous to Off-PAC and DPG where the critic is defined for all policies and the actor is updated following the true gradient with respect to the critic.

heading: 6 LIMITATIONS AND FUTURE WORK
text: We introduced PBVFs, a novel class of value functions which receive as input the parameters of a policy and can be used for off-policy learning. We showed that PBVFs are competitive to ARS and DDPG (Mania et al., 2018; Lillicrap et al., 2015) while generalizing across policies and allowing for zero-shot training in an offline setting. Despite their positive results on shallow and deep policies, PBVFs suffer the curse of dimensionality when the number of policy parameters is high. Embeddings similar to those used in PENs (Harb et al., 2020) may be useful not only for saving memory and computational time, but also for facilitating search in parameter space. We intend to evaluate the benefits of such embeddings and other dimensionality reduction techniques. We derived off-policy policy gradient theorems, showing how PBVFs follow the true gradient of the performance Jb. With these results, we plan to analyze the convergence of our algorithms using stochastic approximation techniques (Borkar, 2009) and test them on environments where traditional methods are known to diverge (Baird, 1995). Finally, we want to investigate how PBVFs applied to supervised learning tasks or POMDPs, can avoid BPTT by mapping the weights of an RNN to its loss.

heading: ACKNOWLEDGMENTS
text: We thank Paulo Rauber, Imanol Schlag, Miroslav Strupl, Róbert Csordás, Aleksandar Stanić, Anand Gopalakrishnan, Sjoerd Van Steenkiste and Julius Kunze for their feedback. This work was supported by the ERC Advanced Grant (no: 742870). We also thank NVIDIA Corporation for donating a DGX-1 as part of the Pioneers of AI Research Award and to IBM for donating a Minsky machine.

heading: A APPENDIX

heading: INDEX OF THE APPENDIX
text: In the following, we briefly recap the contents of the appendix.
• Appendix A.1 contains additional related works
• Appendix A.2 reports all proofs and derivations.
• Appendix A.3 illustrates implementation details and pseudocode.
• Appendix A.4 provides the hyperparameters used in the experiments and further results.

heading: A.1 ADDITIONAL RELATED WORKS
text: Recent work (Unterthiner et al., 2020) shows how to map the weights of a trained Convolutional Neural Network to its accuracy. Experiments show how these predictions allow for performance rankings of neural networks on new unseen tasks. These maps are either learned by taking the flattened weights as input or using simple statistics. However, these predictions do not guide the training process of CNNs.
In 1990, adaptive critics trained by TD were used to predict the gradients of an RNN from its activations (Schmidhuber, 1990), avoiding backpropagation through time (BPTT) (Werbos, 1990). This idea was later used to update the weights of a neural network asynchronously (Jaderberg et al., 2017). In our work, the critic is predicting errors instead of gradients. If applied to POMDPs, or supervised learning tasks involving long time lags between relevant events, the PSSVF could avoid BPTT by viewing the parameters of an RNN as a static object and mapping them to their loss (negative reward).
Additional differences between our work and Policy Evaluation Networks (PENs) (Harb et al., 2020) concern the optimization problem: we do not predict a bucket index for discretized reward, but perform a regression task. Therefore our loss is simply the mean squared error between the prediction of V (θ) and the reward obtained by πθ, while their loss (Harb et al., 2020) is the KL divergence between the predicted and target distributions. Both approaches optimize the undiscounted objective when learning V (θ).

heading: A.2 PROOFS AND DERIVATIONS
text: Theorem 3.1. Let πθ be stochastic. For any Markov Decision Process, the following holds:
∇θJ(πθ) = Es∼dπθ (s),a∼πθ(.|s) [(Q(s, a, θ)∇θ log πθ(a|s))] . (8)
Proof. The proof follows the standard approach by Sutton et al. (1999) and we report it for completeness. We start by deriving an expression for∇θV (s, θ):
∇θV (s, θ) = ∇θ ∫ A πθ(a|s)Q(s, a, θ) da = ∫ A ∇θπθ(a|s)Q(s, a, θ) + πθ(a|s)∇θQ(s, a, θ) da
= ∫ A ∇θπθ(a|s)Q(s, a, θ) + πθ(a|s)∇θ ( R(s, a) + γ ∫ S P (s′|s, a)V (s′, θ) ds′ ) da
= ∫ A ∇θπθ(a|s)Q(s, a, θ) + πθ(a|s)γ ∫ S P (s′|s, a)∇θV (s′, θ) ds′ da
= ∫ A ∇θπθ(a|s)Q(s, a, θ) + πθ(a|s)γ ∫ S P (s′|s, a)×
× ∫ A ∇θπθ(a′|s′)Q(s′, a′, θ) + πθ(a′|s′)γ ∫ S P (s ′′ |s′, a′)∇θV (s ′′ , θ) ds ′′ da′ ds′ da
= ∫ S ∞∑ t=0 γtP (s→ s′, t, πθ) ∫ A ∇θπθ(a|s′)Q(s′, a, θ) da ds′.
Taking the expectation with respect to s0 ∼ µ0(s) we have: ∇θJ(θ) = ∇θ ∫ S µ0(s)V (s, θ) ds = ∫ S µ0(s)∇θV (s, θ) ds
= ∫ S µ0(s) ∫ S ∞∑ t=0 γtP (s→ s′, t, πθ) ∫ A ∇θπθ(a|s)Q(s, a, θ) ds′ da ds
= ∫ S dπθ (s) ∫ A ∇θπθ(a|s)Q(s, a, θ) da ds = Es∼dπθ (s),a∼πθ(.|s) [(Q(s, a, θ)∇θ log πθ(a|s))] .
Theorem 3.2. Let πθ be deterministic. Under standard regularity assumptions (Silver et al., 2014), for any Markov Decision Process, the following holds:
∇θJ(πθ) = Es∼dπθ (s) [ ∇aQ(s, a, θ)|a=πθ(s)∇θπθ(s) ] . (9)
Proof. The proof follows the standard approach by Silver et al. (2014) and we report it for completeness. We start by deriving an expression for∇θV (s, θ):
∇θV (s, θ) = ∇θQ(s, πθ(s), θ) = ∇θ ( R(s, πθ(s)) + γ ∫ S P (s′|s, πθ(s))V (s′, θ) ds′ ) = ∇θπθ(s)∇aR(s, a)|a=πθ(s)+
+ γ ∫ S P (s′|s, πθ(s))∇θV (s′, θ) +∇θπθ(s)∇aP (s′|s, a)|a=πθ(s) ds′
= ∇θπθ(s)∇a ( R(s, a) + γ ∫ S P (s′|s, a)V (s′, θ) ds′ ) |a=πθ(s)+
+ γ ∫ S P (s′|s, πθ(s))∇θV (s′, θ) ds′
= ∇θπθ(s)∇aQ(s, a, θ)|a=πθ(s) + γ ∫ S P (s′|s, πθ(s))∇θV (s′, θ) ds′ = ∇θπθ(s)∇aQ(s, a, θ)|a=πθ(s)+
+ γ ∫ S P (s′|s, πθ(s))∇θπθ(s′)∇aQ(s′, a, θ)|a=πθ(s′) ds′+
+ γ ∫ S P (s′|s, πθ(s))γ ∫ S P (s ′′ |s′, πθ(s′))∇θV (s ′′ , θ) ds ′′ ds′
= ∫ S ∞∑ t=0 γtP (s→ s′, t, πθ)∇θπθ(s′)∇aQ(s′, a, θ)|a=πθ(s′) ds′
Taking the expectation with respect to s0 ∼ µ0(s) we have: ∇θJ(θ) = ∇θ ∫ S µ0(s)V (s, θ) ds = ∫ S µ0(s)∇θV (s, θ) ds
= ∫ S µ0(s) ∫ S ∞∑ t=0 γtP (s→ s′, t, πθ)∇θπθ(s′)∇aQ(s′, a, θ)|a=πθ(s′) ds′ ds
= ∫ S dπθ (s)∇θπθ(s)∇aQ(s, a, θ)|a=πθ(s) ds
= Es∼dπθ (s) [ ∇θπθ(s)∇aQ(s, a, θ)|a=πθ(s) ]
Theorem 3.3. For any Markov Decision Process, the following holds: ∇θJb(πθ) = Es∼dπb∞ (s),a∼πb(.|s) [ πθ(a|s) πb(a|s) (Q(s, a, θ)∇θ log πθ(a|s) +∇θQ(s, a, θ)) ] . (14)
Proof. ∇θJb(πθ) = ∇θ ∫ S dπb∞(s)V (s, θ) ds (17)
= ∇θ ∫ S dπb∞(s) ∫ A πθ(a|s)Q(s, a, θ) da ds (18)
= ∫ S dπb∞(s) ∫ A [Q(s, a, θ)∇θπθ(a|s) + πθ(a|s)∇θQ(s, a, θ)] dads (19)
= ∫ S dπb∞(s) ∫ A πb(a|s) πb(a|s) πθ(a|s)[Q(s, a, θ)∇θ log πθ(a|s) +∇θQ(s, a, θ)] dads (20)
= Es∼dπb∞ (s),a∼πb(.|s) [ πθ(a|s) πb(a|s) (Q(s, a, θ)∇θ log πθ(a|s) +∇θQ(s, a, θ)) ]
(21)
Theorem 3.4. Under standard regularity assumptions (Silver et al., 2014), for any Markov Decision Process, the following holds:
∇θJb(πθ) = Es∼dπb∞ (s) [ ∇aQ(s, a, θ)|a=πθ(s)∇θπθ(s) +∇θQ(s, a, θ)|a=πθ(s) ] . (16)
Proof. ∇θJb(πθ) = ∫ S dπb∞(s)∇θQ(s, πθ(s), θ) ds (22)
= ∫ S dπb∞(s) [ ∇aQ(s, a, θ)|a=πθ(s)∇θπθ(s) +∇θQ(s, a, θ)|a=πθ(s) ] ds (23)
= Es∼dπb∞ (s) [ ∇aQ(s, a, θ)|a=πθ(s)∇θπθ(s) +∇θQ(s, a, θ)|a=πθ(s) ] (24)
A.3 IMPLEMENTATION DETAILS
A.3.1
In this appendix, we report the implementation details for PSSVF, PSVF, PAVF and the baselines. We specify for each hyperparameter, which algorithms and tasks are sharing them.
Shared hyperparameters:
• Deterministic policy architecture (continuous control tasks): We use three different deterministic policies: a linear mapping between states and actions; a single-layer MLP with 32 neurons and tanh activation; a 2-layers MLP (64,64) with tanh activations. All policies contain a bias term and are followed by a tanh nonlinearity in order to bound the action. • Deterministic policy architecture (discrete control tasks): We use three different determin-
istic policies: a linear mapping between states and a probability distribution over actions; a single-layer MLP with 32 neurons and tanh activation; a 2-layers MLP (64,64) with tanh activations. The deterministic action a is obtained choosing a = arg maxπθ(a|s). All policies contain a bias term. • Stochastic policy architecture (continuous control tasks): We use three different stochastic
policies: a linear mapping; a single-layer MLP with 32 neurons and tanh activation; a 2- layers MLP (64,64) with tanh activations all mapping from states to the mean of a Normal distribution. The variance is state-independent and parametrized as e2Ω with diagonal Ω. All policies contain a bias term. Actions sampled are given as input to a tanh nonlinearity in order to bound them in the action space. • Stochastic policy architecture (discrete control tasks): We use three different deterministic
policies: a linear mapping between states and a probability distribution over actions; a single-layer MLP with 32 neurons and tanh activation; a 2-layers MLP (64,64) with tanh activations. All policies contain a bias term. • Policy initialization: all weights and biases are initialized using the default Pytorch initial-
ization for PBVFs and DDPG and are set to zero for ARS. • Critic architecture: 2-layers MLP (512,512) with bias and ReLU activation functions for
PSVF, PAVF; 2-layers MLP (256,256) with bias and ReLU activation functions for DDPG. • Critic initialization: all weights and biases are initialized using the default Pytorch initial-
ization for PBVFs and DDPG. • Batch size: 128 for DDPG, PSVF, PAVF; 16 for PSSVF. • Actor’s frequency of updates: every episode for PSSVF; every batch of episodes for ARS;
every 50 time steps for DDPG, PSVF, PAVF. • Critic’s frequency of updates: every episode for PSSVF; every 50 time steps for DDPG,
PSVF, PAVF. • Replay buffer: the size is 100k; data are sampled uniformly. • Optimizer: Adam for PBVFs and DDPG.
Tuned hyperparameters:
• Number of directions and elite directions for ARS ([directions, elite directions]): tuned with values in [[1, 1], [4, 1], [4, 4], [16, 1], [16, 4], [16, 16]]. • Policy’s learning rate: tuned with values in [1e− 2, 1e− 3, 1e− 4]. • Critic’s learning rate: tuned with values in [1e− 2, 1e− 3, 1e− 4]. • Noise for exploration: the perturbation for the action (DDPG) or the parameter is sampled
from N (0, σI) with σ tuned with values in [1, 1e − 1] for PSSVF, PSVF, PAVF; [1e − 1, 1e− 2] for DDPG; [1, 1e− 1, 1e− 2, 1e− 3] for ARS. For stochastic PSSVF and PSVF we include also the value σ = 0, although it almost never results optimal.
Environment hyperparameters:
• Environment interactions: 1M time steps for Swimmer-v3 and Hopper-v3; 100k time steps for all other environments.
• Discount factor for TD algorithms: 0.999 for Swimmer; 0.99 for all other environments. • Survival reward in Hopper: True for DDPG, PSVF, PAVF; False for ARS, PSSVF.
Algorithm-specific hyperparameters:
• Critic’s number of updates: 50 for DDPG, 5 for PSVF and PAVF; 10 for PSSVF.
• Actor’s number of updates: 50 for DDPG, 1 for PSVF and PAVF; 10 for PSSVF. • Observation normalization: False for DDPG; True for all other algorithms. • Starting steps in DDPG (random actions and no training): first 1%. • Polyak parameter in DDPG: 0.995.
PAVF ∇θQ(s, a, θ) ablation We investigate the effect of the term ∇θQ(s, a, θ) in the off-policy policy gradient theorem for deterministic PAVF. We follow the same methodology as in our main experiments to find the optimal hyperparameters when updating using the now biased gradient:
∇θJb(πθ) ≈ Es∼dπb∞ (s) [ ∇aQ(s, a, θ)|a=πθ(s)∇θπθ(s) ] , (25)
which corresponds to the gradient that DDPG is following. Figure 5 reports the results for Hopper and Swimmer using shallow and deep policies. We observe a significant drop in performance in Swimmer when removing part of the gradient. In Hopper the loss of performance is less significant, possibly because both algorithms tend to converge to the same sub-optimal behavior.
ARS For ARS, we used the official implementation provided by the authors and we modified it in order to use nonlinear policies. More precisely, we used the implementation of ARSv2-t (Mania et al., 2018), which uses observation normalization, elite directions and an adaptive learning rate based on the standard deviation of the return collected. To avoid divisions by zero, which may happen if all data sampled have the same return, we perform the standardization only in case the standard deviation is not zero. In the original implementation of ARS (Mania et al., 2018), the survival bonus for the reward in the Hopper environment is removed to avoid local minima. Since we wanted our PSSVF to be close to their setting, we also applied this modification. We did not remove the survival bonus from all TD algorithms and we did not investigate how this could affect their performance. We provide a comparison of the performance of PSSVF with and without the bonus in figure 6 using deterministic policies.
DDPG For DDPG, we used the Spinning Up implementation provided by OpenAI (Achiam, 2018), which includes target networks for the actor and the critic and no learning for a fixed set of time steps, called starting steps. We did not include target networks and starting steps in our PBVFs, although they could potentially help stabilizing training. The implementation of DDPG that we used (Achiam, 2018) does not use observation normalization. In preliminary experiments we observed that it failed to significantly increase or decrease performance, hence we did not use it. Another difference between our TD algorithms and DDPG consists in the number of updates of the actor and the critic. Since DDPG’s critic needs to keep track of the current policy, the critic and the actor are updated in a nested form, with the first’s update depending on the latter and vice versa. Our PSVF and PAVF do not need to track the policy learned, hence, when it is time to update, we need only to train once the critic for many gradient steps and then train the actor for many gradient steps. This requires less compute. On the other hand, when using nonlinear policies, our PBVFs suffer the curse of dimensionality. For this reason, we profited from using a bigger critic. In preliminary experiments, we observed that DDPG’s performance did not change significantly through a bigger critic. We show differences in performance for our methods when removing observation normalization and when using a smaller critic (MLP(256,256)) in figure 7. We observe that the performance is decreasing if observation normalization is removed. However, only for shallow policies in Swimmer and deep policies in Hopper there seems to be a significant benefit. Future work will assess when bigger critics help.
Discounting in Swimmer For TD algorithms, we chose a fixed discount factor γ = 0.99 for all environments but Swimmer-v3. This environment is known to be challenging for TD based algorithms because discounting causes the agents to become too short-sighted. We observed that, with the standard discounting, DDPG, PSVF and PAVF were not able to learn the task. However, making the algorithms more far-sighted greatly improved their performance. In figure 8 we report the return obtained by DDPG, PSVF and PAVF for different values of the discount factor in Swimmer when using deterministic policies.

heading: A.3.2 PSEUDOCODE
text: Algorithm 2 Actor-critic with TD prediction for V (s, θ) Input: Differentiable critic Vw : S × Θ → R with parameters w; deterministic or stochastic actor πθ with parameters θ; empty replay buffer D Output : Learned Vw ≈ V (s, θ), learned πθ ≈ πθ∗
Initialize critic and actor weights w, θ repeat:
Observe state s, take action a = πθ(s), observe reward r and next state s′ Store (s, θ, r, s′) in the replay buffer D if it’s time to update then:
for many steps do: Sample a batch B1 = {(s, θ̃, r, s′)} from D Update critic by stochastic gradient descent: ∇w 1|B1| E(s,θ̃,r,s′)∈B1 [Vw(s, θ̃)− (r + γVw(s ′, θ̃))]2 end for for many steps do:
Sample a batch B2 = {(s)} from D Update actor by stochastic gradient ascent: ∇θ 1|B2| Es∈B2 [Vw(s, θ)]
end for end if
until convergence
Algorithm 3 Stochastic actor-critic with TD prediction for Q(s, a, θ) Input: Differentiable critic Qw : S ×A×Θ→ R with parameters w; stochastic differentiable actor πθ with parameters θ; empty replay buffer D Output : Learned Qw ≈ Q(s, a, θ), learned πθ ≈ πθ∗
Initialize critic and actor weights w, θ repeat:
Observe state s, take action a = πθ(s), observe reward r and next state s′ Store (s, a, θ, r, s′) in the replay buffer D if it’s time to update then:
for many steps do: Sample a batch B1 = {(s, a, θ̃, r, s′)} from D Update critic by stochastic gradient descent: ∇w 1|B1| E(s,a,θ̃,r,s′)∈B1 [Qw(s, a, θ̃)− (r + γQw(s
′, a′ ∼ πθ̃(s′), θ̃))]2 end for for many steps do:
Sample a batch B2 = {(s, a, θ̃)} from D Update actor by stochastic gradient ascent:
1 |B2| E(s,a,θ̃)∈B2 [ πθ(a|s) πθ̃(a|s) (Q(s, a, θ)∇θ log πθ(a|s) +∇θQ(s, a, θ)) ]
end for end if
until convergence
Algorithm 4 Deterministic actor-critic with TD prediction for Q(s, a, θ) Input: Differentiable critic Qw : S ×A×Θ→ R with parameters w; differentiable deterministic actor πθ with parameters θ; empty replay buffer D Output : Learned Qw ≈ Q(s, a, θ), learned πθ ≈ πθ∗
Initialize critic and actor weights w, θ repeat:
Observe state s, take action a = πθ(s), observe reward r and next state s′ Store (s, a, θ, r, s′) in the replay buffer D if it’s time to update then:
for many steps do: Sample a batch B1 = {(s, a, θ̃, r, s′)} from D Update critic by stochastic gradient descent: ∇w 1|B1| E(s,a,θ̃,r,s′)∈B1 [Qw(s, a, θ̃)− (r + γQw(s ′, πθ̃(s ′), θ̃))]2 end for for many steps do:
Sample a batch B2 = {(s)} from D Update actor by stochastic gradient ascent:
1 |B2| Es∈B2 [∇θπθ(s)∇aQw(s, a, θ)|a=πθ(s) +∇θQw(s, a, θ)|a=πθ(s)]
end for end if
until convergence

heading: A.4 EXPERIMENTAL DETAILS
text: A.4.1 LQR
For our visualization experiment, we employ an instance of the Linear Quadratic Regulator. Here, the agent observes a 1-D state, corresponding to its position and chooses a 1-D action. The transitions are s′ = s + a and there is a quadratic negative term for the reward: R(s, a) = −s2 − a2. The agent starts in state s0 = 1 and acts in the environment for 50 time steps. The state space is bounded in [-2,2]. The goal of the agent is to reach and remain in the origin. The agent is expected to perform small steps towards the origin when it uses the optimal policy. For this task, we use a
deterministic policy without tanh nonlinearity and we do not use observation normalization. Below additional details and plots for different algorithms.
PSSVF We use a learning rate of 1e − 3 for the policy and 1e − 2 for the PSSVF. Weights are perturbed every episode using σ = 0.5. The policy is initialized with weight 3.2 and bias −3.5. All the other hyperparameters are set to their default. The true episodic J(θ) is computed by running 10,000 policies in the environment with parameters in [−5, 5] × [−5, 5]. Vw(θ) is computed by measuring the output of the PSSVF on the same set of policies. Each red arrow in figure 1 represents 200 update steps of the policy.
PSVF ad PAVF Using the exact same setting, we run PSVF and PAVF in LQR environment and we compare learned V (s0, θ) andQ(s0, πθ(s0), θ) with the true PSVF and PAVF over the parameter space. Computing the value of the true PSVF and PAVF requires computing the infinite sum of discounted reward obtained by the policy. Here we approximate it by running 10,000 policies in the environment with parameters in [−5,−5] × [−5, 5] for 500 time steps. This, setting γ = 0.99, provides a good approximation of their true values, since further steps in the environment result in almost zero discounted reward from s0. We use a learning rate of 1e − 2 for the policy and 1e − 1 for the PSVF and PAVF. Weights are perturbed every episode using σ = 0.5. The policy is updated every 10 time steps using 2 gradient steps; the PSVF and PAVF are updated every 10 time steps using 10 gradient updates. The critic is a 1-layer MLP with 64 neurons and tanh nonlinearity.
In Figures 9 and 10 we report J(θ), the cumulative discounted reward that an agent would obtain by acting in the environment for infinite time steps using policy πθ and the cumulative return predicted by the PSVF and PAVF for two different times during learning. Like in the PSSVF experiment, the critic is able improve its predictions over the parameter space. Since in the plots V (s, θ) and Q(s, πθ(s), θ) are evaluated only in s0, the results show that PBVFs are able to effectively bootstrap the values of future states. Each red arrow in Figures 9 and 10 represents 50 update steps of the policy.

heading: A.4.2 OFFLINE EXPERIMENTS
text: Zero-shot learning We evaluate the performance of the policies learned from scratch evaluating them with 5 test trajectories every 5 gradient steps. In addition to the results in the main paper, we report in Figures 11 and 12 a comparison of zero-shot performance between PSSVF, PSVF and PAVF in three different environments using deterministic shallow and deep policies (2-layers MLP(64,64)). In this task we use the same hyperparameters found in tables 4, 6 and 8. One additional hyperparameter needs to be considered: the learning rate of the policies trained from scratch. In Figure 3 of the main paper, we use a tuned learning rate of 0.02 that we found working particularly well for PSSVF in the Swimmer environment. In the additional experiments in Figures 11 and 12, we use a learning rate of 0.05 that we found working well across all policies, environments and algorithms when learning zero-shot.
We observe that, using shallow policies, PBVFs can effectively zero-shot learn policies with performance comparable to the policy learned in the environment without additional tuning for the learning rate. We note the regular presence of a spike in performance followed by a decline due to the policy going to regions of the parameter space never observed. This suggests that there is a trade-off between exploiting the generalization of the critic and remaining in the part of the parameter space where the critic is accurate. Measuring the width of these spikes can be useful for determining the number of offline gradient steps to perform in the general algorithm. When using deep policies the results become much worse and zero-shot learned policies can recover the performance of the main policy being learned only in simple environments and at beginning of training (eg. MountainCarContinuous). We observe that, when the critic is trained (last column), the replay buffer contains policies that are very distant to policies randomly initialized. This might explain why the zero-shot performance is better sometimes at the beginning of training (eg. second column). However, since PBVFs in practice perform mostly local off-policy evaluation around the learned policy, this problem is less prone to arise in our main experiments.
Offline learning with fragmented behaviors In this task, data are generated by perturbing a randomly initialized deterministic policy every 200 time steps and using it to act in the environment.
We use σ = 0.5 for the perturbations. After the dataset is collected, the PSVF is trained using a learning rate of 1e − 3 with a batch size of 128. When the policy is learned, we use a learning rate of 0.02. All other hyperparameters are set to default values.

heading: A.4.3 FULL EXPERIMENTAL RESULTS
text: Methodology In order to ensure a fair comparison of our methods and the baselines, we adopt the following procedure. For each hyperparameter configuration, for each environment and policy architecture, we run 5 instances of the learning algorithm using different seeds. We measure the learning progress by running 100 evaluations while learning the deterministic policy (without action or parameter noise) using 10 test trajectories. We use two metrics to determine the best hyperparameters: the average return over policy evaluations during the whole training process and the average return over policy evaluations during the last 20% time steps. For each algorithm, environment and policy architecture, we choose the two hyperparameter configurations maximizing the performance of the two metrics and test them on 20 new seeds, reporting average and final performance in table 2 and 3 respectively.
Figures 13 and 14 report all the learning curves from the main paper and for a small non linear policy with 32 hidden neurons.
Stochastic policies We include some results for stochastic policies when using PSSVF and PSVF. Figures 15 and 16 show a comparison with the baselines when using shallow and deep policies respectively. We observe results sometimes comparable, but often inferior with respect to deterministic policies. In particular, when using shallow policies, PBVFs are able to outperform the baselines in the MountainCar environment, while obtaining comparable performance in CartPole and InvertedPendulum. Like in previous experiments, PBVFs fail to learn a good policy in Reacher. When using deep policies, the results are slightly different: PBVFs outperform ARS and DDPG in Swimmer, but fail to learn InvertedPendulum. Although the use of stochastic policies can help smoothing the
objective function and allows the agent exploring in action space, we believe that the lower variance provided by deterministic policies can facilitate learning PBVFs.

heading: A.4.4 SENSITIVITY ANALYSIS
text: In the following, we report the sensitivity plots for all algorithms, for all deterministic policy architectures and environments. In particular, figure 17, 18, 19, 20 and 21 show the performance of each algorithm given different hyperparameters tried during training. We observe that in general deep policies are more sensitive and, apart for DDPG, achieve often a better performance than smaller policies. The higher sensitivity displayed by ARS is in part caused by the higher number of hyperparameters we tried when tuning the algorithm.

heading: A.4.5 TABLE OF BEST HYPERPARAMETERS
text: We report for each algorithm, environment, and policy architecture the best hyperparameters found when optimizing for average return or final return in tables 4, 5, 6, 7, 8 and 9.

Review summaries:
On page 2, in the background section: the discounted state distribution, what you wrote is not a distribution (doesn't sum to 1). In order to define this $d^{\pi_\theta}$ properly, you can multiply everything by $1-\gamma$. The interpretation is that you "reset" in your initial distribution $\mu_0$ with probability $1 - \gamma$ at every step, or continue in the discounted stationary distribution with probability $\gamma$.