{'fraction_non_alphanumeric': 0.03970944309927361, 'fraction_numerical': 0.012458727712965, 'mean_word_length': 4.6788125, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
What About Inputing Policy in Value Function: Policy Representation and Policy-extended Value Function Approximator

We study Policy-extended Value Function Approximator (PeVFA) in Reinforcement Learning (RL), which extends conventional value function approximator (VFA) to take as input not only the state (and action) but also an explicit policy representation. Such an extension enables PeVFA to preserve values of multiple policies at the same time and brings an appealing characteristic, i.e., \emph{value generalization among policies}. We formally analyze the value generalization under Generalized Policy Iteration (GPI). From theoretical and empirical lens, we show that generalized value estimates offered by PeVFA may have lower initial approximation error to true values of successive policies, which is expected to improve consecutive value approximation during GPI. Based on above clues, we introduce a new form of GPI with PeVFA which leverages the value generalization along policy improvement path. Moreover, we propose a representation learning framework for RL policy, providing several approaches to learn effective policy embeddings from policy network parameters or state-action pairs. In our experiments, we evaluate the efficacy of value generalization offered by PeVFA and policy representation learning in several OpenAI Gym continuous control tasks. For a representative instance of algorithm implementation, Proximal Policy Optimization (PPO) re-implemented under the paradigm of GPI with PeVFA achieves about 40\% performance improvement on its vanilla counterpart in most environments.


Introduction
Reinforcement Learning (RL) has been widely considered as a promising way to learn optimal policies in many decisionmaking problems (Mnih et al. 2015;Lillicrap et al. 2015;You et al. 2018;Schreck, Coley, and Bishop 2019;Vinyals et al. 2019;Hafner et al. 2020). One fundamental element of RL is value function which defines the long-term evaluation of a policy. With function approximation (e.g., deep neural networks), a value function approximator (VFA) is able to approximate the values of a policy under large and continuous state spaces. As commonly recognized, most RL algorithms can be described as Generalized Policy Iteration (GPI) (Sutton and Barto 1998). As illustrated on the left of Fig.1, at each iteration the VFA is trained to approximate the true values of current policy (i.e., policy evaluation), regarding which the policy is further improved (i.e., policy improvement). The value function approximation error hinders the effectiveness of policy improvement and then the overall optimality of GPI (Bertsekas and Tsitsiklis 1996;Scherrer et al. 2015). Unfortunately, such errors are inevitable under function approximation. A large number of samples are usually required to ensure high-quality value estimates, resulting in the sample-inefficiency of deep RL algorithms. Therefore, this raises an urgent need for more efficient value approximation methods (v. Hasselt 2010;Bellemare, Dabney, and Munos 2017;Fujimoto, v. Hoof, and Meger 2018;Kuznetsov et al. 2020).
An intuitive idea to improve the efficiency value approximation is to leverage the knowledge on the values of previous encountered policies. However, a conventional VFA usually approximates the values of one policy and values learned from old policies are over-written gradually during the learning process. This means that the previously learned knowledge cannot be preserved and utilized with one conventional VFA. Thus, such limitations prevent the potentials to leverage the previous knowledge for future learning. In this paper, we study Policy-extended Value Function Approximator (PeVFA), which additionally takes an explicit policy representation as input in contrast to conventional VFA. Thanks to the policy representation input, PeVFA is able to approximate values for multiple policies and induces value generalization among policies. We formally analyze the generalization of approximate values among policies in a general form. From both theoretical and empirical lens, we show that the generalized value estimates can be closer to the true values of the successive policy, which can be beneficial to consecutive value approximation along the policy improvement path, called local generalization. Based on above clues, we introduce a new form of GPI with PeVFA (the right of Fig.1) that leverages the local generalization to improve the efficiency of consecutive value approximation along the policy improvement path.
One key point of GPI with PeVFA is the representation of policy since it determines how PeVFA generalizes the values. For this, we propose a framework to learn effective low-dimensional embedding of RL policy. We use network parameters or state-action pairs as policy data and encode them into low-dimensional embeddings; then the embeddings are trained to capture the effective information through contrastive learning and policy recovery. Finally, we evaluate the efficacy of GPI with PeVFA and our policy representations. In principle, GPI with PeVFA is general and can be implemented in different ways. As a practical instance, we re-implement Proximal Policy Optimization (PPO) with PeVFA and propose PPO-PeVFA algorithm. Our experimental results on several OpenAI Gym continuous control tasks demonstrate the effectiveness of both value generalization offered by PeVFA and learned policy representations, with an about 40% improvement in average returns achieved by our best variants on standard PPO in most tasks. We summarize our main contributions below. 1) We study the value generalization among policies induced by PeVFA. From both theoretical and empirical aspects, we shed the light on the situations where the generalization can be beneficial to the learning along policy improvement path. 2) We propose a framework for policy representation learning. To our knowledge, we make the first attempt to learn a low-dimensional embedding of over 10k network parameters for an RL policy. 3) We introduce GPI with PeVFA that leverages the value generalization in a general form. Our experimental results demonstrate the potential of PeVFA in deriving practical and more effective RL algorithms.

Related Work
Extensions of Conventional Value Function Sutton et al. (2011) propose General Value Functions (GVFs) as a general form of knowledge representation of rewards and arbitrary cumulants. Later, conventional value functions are extended to take extra inputs for different purposes of generalization. One notable work is Universal Value Function Approximator (UVFA) (Schaul et al. 2015), which is proposed to generalize values among different goals for goal-conditioned RL. UVFA is further developed in (Andrychowicz et al. 2017;Nachum et al. 2018;Eysenbach et al. 2020) and influences the occurrence of other value function extensions in context-based Meta-RL (Rakelly et al. 2019;, Hierarchical RL (Wang et al. 2020) and multiagent RL (He and Boyd-Graber 2016;Grover et al. 2018) and etc. Most of the above works study how to generalize the policy or value function among extrinsic factors, i.e., environments, tasks and opponents; while we mainly study the value generalization among policies along policy improvement path, an intrinsic learning process of the agent itself.
Policy Embedding and Representation. Although not well studied, representation (or embedding) learning for RL policies is involved in a few works (Hausman et al. 2018;Grover et al. 2018;Arnekvist, Kragic, and Stork 2019). The most common way to learn a policy representation is to extract from interaction experiences. As a representative,  propose learning the representation of opponent policy from interaction trajectories with a generative policy recovery loss and a discriminative triplet loss. These losses are later adopted in (Wang et al. 2020;Raileanu et al. 2020). Another straightforward idea is to represent policy parameters. Network Fingerprint (Harb et al. 2020) is such a differentiable representation that uses the concatenation of the vectors of action distribution outputted by policy network on a set of probing states. The probing state set is co-optimized along with the primary learning objective, which can be non-trivial especially when the dimensionality of the set is high. Besides, some early attempts in learning low-dimensional embedding of policy parameters are studies in Evolutionary Algorithms (Gaier, Asteroth, and Mouret 2020;Rakicevic, Cully, and Kormushev 2021), mainly with the help of VAE (Kingma and Welling 2014). Our work introduce a learning framework of policy representation including both above two perspectives.

PVN and PVFs
Recently, several works study the generalization among policy space. (Harb et al. 2020) propose Policy Evaluation Network (PVN) to directly approximate the distribution of policy π's objective function J(π) = E ρ0 [v π (s 0 )] with initial state s 0 ∼ ρ 0 . PVN takes as input Network Fingerprint (mentioned above) of policy network. After training on a pre-collected set of policies, a random initialized policy can be optimized in a zero-shot manner with the policy gradients of PVN by backpropagting through the differentiable policy input. We call such gradients GTPI for short below. Similar ideas are later integrated with task-specific context learning in multi-task RL (Raileanu et al. 2020), leveraging the generalization among policies and tasks for fast policy adaptation on new tasks. In PVN (Harb et al. 2020), as an early attempt, the generalization among policies is studied with small policy network and simple tasks; besides, the most regular online learning setting is not studied. Concurrent to our work, (Faccio and Schmidhuber 2020) propose a class of Parameter-based Value Functions (PVFs) that take vectorized policy parameters as inputs. Based on PVFs, new policy gradient algorithms are introduced in the form of a combi-nation of conventional policy gradients and GTPI (i.e., by backpropagating through policy parameters in PVFs). Except for zero-shot policy optimization as conducted in PVN, PVFs are also evaluated for online policy learning. Due to directly taking parameters as input, PVFs suffer from the curse of dimensionality when the number of parameters is high. Besides, GTPI can be non-trivial to rein since policy parameter space are complex and extrapolation generalization error can be large when the value function is only trained on finite policies (usually much fewer than state-action samples) thus further resulting in erroneous policy gradients. We provide more discussions on GTPI in Appendix E.4.
Our work differs with PVFs from several aspects. First, we make use of learned policy representation rather than policy network parameters. Second, we do not resort to GTPI for the policy update in our algorithms but focus on utilizing value generalization for more efficient value estimation in GPI. Furthermore, we shed the light on two important problemshow value generalization among policies can happen formally and whether it is beneficial to learning or not -which are neglected in in previous works from both theoretical and empirical lens. We refer one to read the original papers and our Appendix E.3 for better understandings of the differences.

Policy-extended Value Function Approximator
In this section, we propose Policy-extended Value Function Approximator (PeVFA), an extension of conventional VFA that explicitly takes as input a policy representation. First, we introduce the formulation (Sec. 3.1), then we study value generalization among policies theoretically (Sec. 3.2) along with some empirical evidences (Sec. 3.3). Finally, we derive a new form of GPI (Sec. 3.4).

Formulation
Consider a Markov Decision Process (MDP) defined as S, A, r, P, γ where S is the state space, A is the action space, r is the (bounded) reward function, P is the transition function and γ ∈ [0, 1) is the discount factor. A policy π ∈ P (A) |S| defines the distribution over all actions for each state. The goal of an RL agent is to find an optimal policy π * that maximizes the expected long-term discounted return. The state-value function v π (s) is defined as the expected discounted return obtained through following the policy π from a state s: v π (s) = E π [ ∞ t=0 γ t r t+1 |s 0 = s] for where r t+1 = r(s t , a t ). We use V π to denote the vectorized form of value function.
In a general form, we define policy-extended value function V : S × Π → R over state and policy space: V(s, π) = v π (s) for all s ∈ S and π ∈ Π. In this paper, we focus on V(s, π) and policy-extended action-value function Q(s, a, π) can be obtained similarly. We use V(π) to denote the value vector for all states in the following. The key point is that V is able to preserve the values of multiple policies. With function approximation, a PeVFA is expected to approximate the values of policies among policy space, i.e., {V π } π∈Π then enable value generalization among policies.
Formally, given a function g : Π → X ⊆ R n that maps any policy π to an n-dimensional representation χ π = g(π) ∈ X , a PeVFA V θ with parameter θ ∈ Θ is to minimize the approximation error over all possible states and policies generally: F µ,p,ρ (θ, g, Π) = π∈Π µ(π) V θ (χ π ) −V π p,ρ , where µ, ρ are distributions over policies and states respectively, f p,ρ = ( s ρ(ds)|f (s)| p ) 1/p is ρ-weighted L pnorm (Lagoudakis and Parr 2003;Scherrer et al. 2015) for any f : S → R. The policy distribution µ of interest depends on the scenario where value generalization is considered. As illustrated in Fig.2, we provide two value generalization scenarios. In the global generalization scenario, a uniform distribution over known policy set may be considered with a general purpose of value generalization for unknown policies. For the specific local generalization scenario along policy improvement path during GPI, a sophisticated distribution that adaptively weights recent policies more during the learning process may be more suitable in this case. In the following, we care more about the local generalization scenario and use uniform state distribution ρ and L 2 -norm for demonstration. The subscripts are omitted and we use · for clarity.

Insights on Generalization among Policies
In this part, we provide preliminary theoretical analysis on value generalization among policies induced by PeVFA, to shed some light on whether the generalization can be beneficial to conventional RL under GPI paradigm. We start from a two-policy case and study whether the value approximation learned for one policy can be generalized to the other one. Later, we study the local generalization scenario ( Fig.2(b)) and shed the light on the superiority of PeVFA for GPI. All the proofs are provided in Appendix A.
With Definition 1, the consecutive value approximation for the policies along policy improvement path during GPI can be described as: . . , as the green arrows illustrated in Fig.1. One may refer to Appendix A.1 for a discussion on the rationality of the two definitions.
Lemma 1 shows that the post-P π1 approximation loss for π 2 is upper bounded by a generalized contraction of prior loss plus a locality margin term M which is related to π 1 , π 2 and the locality property of fθ. In general, the form of M depends on the local property assumed. Some higher-order variants are provided in Appendix A.2. For a step further, Corollary 1 reveals the condition where a contraction on value approximation loss for π 2 is achieved when PeVFA is only trained to approximate the values of π 1 . Concretely, such a condition is apt to reach with tighter contraction for policy π 1 is, closer two policies, or smoother approximation loss function fθ.
Then we consider the local generalization scenario as illustrated in Fig.2(b). For any iteration t of GPI, the values of current policy π t are approximated by PeVFA, followed by a improved policy π t+1 whose values are to be approximated in the next iteration. The value generalization from each π t and π t+1 can be similarly considered as the two-policy case. In addition to the former results, we shed the light on the value generalization loss of PeVFA along policy improvement path below: The above results indicate that the value generalization loss can be recursively bounded and has a upper bound formed by a repeated contraction on initial loss plus the accumulation of locality margins induced from each local generalization. An infinity-case discussionis in Appendix A.5.
Although value generalization among policies demonstrated above is also intuitive, it is not necessarily useful to conventional RL under GPI paradigm. Therefore, the next question is naturally whether PeVFA with value generalization among policies is preferable to the conventional VFA; if yes, what the case is to be like. To this end, we introduce a desirable condition which reveals the superiority of PeVFA during consecutive value approximation along the policy improvement path: Theorem 1 shows that the generalized value estimates V θt (π t+1 ) can be closer to the true values of policy π t+1 than V θt (π t ). Note that V θt (π t ) is the value approximation for π t which is equivalent to the counterpart V φt for a conventional VFA as value generalization among policies does not exist. To consecutive value approximation along policy improvement path, this means that the value generalization of PeVFA has the potential to offer closer start points at each iteration. If such closer start points can often exist, we expect PeVFA to be preferable to conventional VFA since value approximation can be more efficient with PeVFA and it in turn facilitates the overall GPI process.
However, the condition in Theorem 1 is not necessarily met in practice. It depends on the locality margins that may be related to function family and optimization method of PeVFA, as well as the scale of policy improvement. We conjecture that there are many looser sufficient conditions that lead to the consequence of Theorem 1, and the presented condition is the strictest one among them to achieve. This can be interpreted by considering the geometrical relationship between V πt , V πt+1 , V θt (π t ) and V θt (π t+1 ). One special case that requires the sufficient condition presented in Theorem 1 is where V θt (π t ) and V θt (π t+1 ) and lie on the line segment between V πt and V πt+1 . We leave these further theoretical investigations for future work. Instead, we empirically examine the existence of such desirable generalization results in the following.

Empirical Evidences
We empirically investigate the value generalization of PeVFA with didactic environments. In this section, PeVFA V θ is parameterized by neural network and we use the concatenation of all weights and biases of the policy network as a straightforward representation χ π for each policy, called Raw Policy Representation (RPR). Experimental details are provided in Appendix B.
First, we demonstrate the global generalization (illustrated in Fig.2(a)) in a continuous 2D Point Walker environment. We build the policy set Π with synthetic policies, each of which is a randomly initialized 2-layer tanh-activated neural   Figure 3: Empirical evidences of two kinds of generalization of PeVFA. (a) Global generalization: PeVFA shows comparable value estimation performance on testing policy set (red) after learning on training policy set (blue). (b) Local generalization: PeVFA (V θ (χ π )) shows lower losses than conventional VFA (V φ ) before and after the value approximation training for successive policies along policy improvement path. In (b), the left axis is for approximation loss (lower is better) and the right axis is for average return as a reference of the policy learning process (green curve).
network with 2 units for each layer. The size of Π is 20k and the behavioral diversity of synthetic policies is verified (see Fig.6(b) in Appendix). We divide Π into training set (i.e., known policies Π 0 ) and testing set (i.e., unseen policies Π 1 ). We rollout the policies in the environment to collect trajectories, based on which we perform value approximation training. Fig.3(a) shows the value predictions for policies from training and testing set (100 for each). Our results show that a PeVFA trained on Π 0 achieves reasonable generalization performance when evaluating on Π 1 . The average losses on training and testing set are 1.782 and 2.071 over 6 trials. Next, we investigate the value generalization along policy improvement path, i.e., local generalization as in Fig.2(b). We use a 2-layer 8-unit policy network trained by standard PPO algorithm (Schulman et al. 2017) in MuJoCo continuous control tasks. Parallel to the conventional value network V φ (s) (i.e., VFA) in PPO, we set a PeVFA network V θ (s, χ π ) as a reference for the comparison on value approximation loss. Compared to V φ , PeVFA V θ (s, χ π ) takes RPR as input and approximates the values of all historical policies ({π i } t i=0 ) in addition. We compare the value approximation losses of V φ (red) and V θ (blue) before (solid) and after (dashed) updating with on-policy samples collected by the improved policy π t+1 at each iteration. Fig.3(b) shows the results for InvertedPendulum-v1. Results for all 7 MuJoCo tasks can be found in Appendix B.2. By comparing approximation losses before updating (red and blue solid curves), we can observe that the approximation loss of V θt (χ πt+1 ) is almost consistently lower than that of V φt . This means that the generalized value estimates offered by PeVFA are usually closer to the true values of π t+1 , demonstrating the consequence arrived in Theorem 1. For the dashed curves, it shows that PeVFA V θt+1 (χ πt+1 ) can achieve lower approximation loss for π t+1 than conventional VFA V φt+1 after the same number of training with the same on-policy samples. The empirical evidence above indicates that PeVFA can be preferable to the conventional VFA for consecutive value approximation. The generalized value estimates along policy improvement path have the potential to expedite the process of GPI.

Reinforcement Learning with PeVFA
Based on the results above, we expect to leverage the value generalization of PeVFA to facilitate RL. In Algorithm 1, we propose a general description of RL algorithm under the paradigm of GPI with PeVFA. For each iteration, the interaction experiences of current policy and the policy representation are stored in a buffer (line 3-4). At an interval of M iterations, PeVFA is trained via value approximation for previous policies with the stored data and the policy representation model is updated according to the method used (line 5-8). This part is unique to PeVFA for preservation and generalization of knowledge of historical policies. Next, value approximation for current policy is performed with PeVFA (line 9). A key difference here is that the generalized value estimates (i.e., V t−1 (χ πt )) are used as start points. Afterwards, a successive policy is obtained from typical policy improvement (line 10). Algorithm 1 can be implemented in different ways and we propose an instance implemented based on PPO (Schulman et al. 2017) in our experiments later. We refer the readers to Appendix C for more discussions on GPI with PeVFA. In the next section, we introduce our methods for policy representation learning.

Policy Representation Learning
To derive practical deep RL algorithms, one key point is policy representation, i.e., a low-dimensional embedding of RL policy. Intuitively, policy representation influences the approximation and generalization of PeVFA. Thus, it is of interest to find an effective policy representation based on which the superiority of PeVFA can be leveraged to improve RL algorithms. To our knowledge, policy representation is not well studied and it remains unclear on how to obtain an effective representation for an RL policy in a general case in practice. In previous section, we demonstrate the effectiveness of using policy parameters as a naive representation when policy network is small, called RPR. However, a usual policy network may have large number of parameters, thus making it inefficient and even irrational to use RPR for ap-  Figure 4: The framework of policy representation training. Policy network parameters used for OPR or policy stateaction pairs used for SPR are fed into policy encoder with permutation-invariant (PI) transformations followed by an MLP, producing the representation χ π . Afterwards, χ π can be trained by gradients from the value approximation loss of PeVFA (i.e., End-to-End), as well as the auxiliary loss of policy recovery or contrastive learning (i.e., InfoNCE) loss.
proximation and generalization (Harb et al. 2020;Faccio and Schmidhuber 2020). More generally, policy parameters of the policy we wish to represent may not be accessible.
To this end, we propose a general framework of policy representation learning as illustrated in Fig.4. The first thing to consider is data source, i.e., from which we can extract the information for an effective policy representation. Recall that the policy is a distribution over state and action space of high dimensionality. The features of such a distribution is not directly available. Therefore, we consider two kinds of data source below that indirectly contains the information of policies: 1) Surface Policy Representation (SPR): The first data source is state-action pairs (or trajectories ), since they reflect how policy may behave under such states. This data source is general since no explicit form of policy is assumed. In a geometric view, learning policy representation from state-action pairs can be viewed as capturing the features of policy via scattering sample points on the curved surface of policy distribution. 2) Origin Policy Representation (OPR): The other data source is parameters of policy since they determine the underlying form of policy distribution. Such a data source is often available during the learning process of deep RL algorithms when policy is parameterized by neural networks. Generally, we consider a policy network to be an MLP with well represented state features (e.g., features extracted by CNN for pixels or by LSTM for sequences) as input.
The remaining question is how we extract the policy representation from the data sources mentioned above. As shown in Fig.4, we use permutation-invariant (PI) transformations followed by an MLP to encode the data of policy π into an embedding χ π for both SPR and OPR. For SPR, each stateaction pair of {(s i , a i )} k i=1 is fed into a common MLP, followed by a Mean-Reduce operation on the outputted features across k. For OPR, we perform PI transformation (similar as done for state-action pairs) inner-layer weights and biases for each layer first, where h denotes the number of nodes in this layer and w i , b i is the income weight vector from previous layer and the bias of ith node; then we concatenate encoding of layers and obtain the OPR. An illustration for the encoding of OPR is in Fig.12 of Appendix.
To train the policy embedding χ π obtained above, the most straightforward way is to backpropagate the value approximation loss of PeVFA in an End-to-End (E2E) fashion as illustrated on the lower-right of Fig.4. In addition, we provide two self-supervised training losses for both OPR and SPR, as illustrated on the upper-right of Fig.4. The first one is an auxiliary loss (AUX) of policy recovery , i.e., to recover the action distributions of π from χ π under different states. To be specific, an auxiliary policy decoderπ(·|s, χ π ) is trained through behavioral cloning, formally to minimize cross-entropy objective . For the second one, we propose to train χ π by Contrastive Learning (CL) (Srinivas, Laskin, and Abbeel 2020; Schwarzer et al. 2020): policies are encouraged to be close to similar ones (i.e., positive samples π + ), and to be apart from different ones (i.e., negative samples π − ) in representation space. For each policy, we construct positive samples by data augmentation on policy data, depending on SPR or OPR considered; and different policies along the policy improvement path naturally provide negative samples for each other. Finally, the embedding χ π is optimized through minimizing the In-foNCE loss (Oord, Li, and Vinyals 2018) . Now, the training of policy representation in Algorithm 1 can be performed with any combination of data sources and training losses provided above. The pseudo-code of the overall policy representation training framework is shown in Algorithm 4 in Appendix D.4. In addition, complete implementation details and more discussions (e.g., on the scalability, representation criteria) are provided in Appendix D.

Experiments
In this section, we conduct experimental study with focus on the following questions: Question 1 Can value generalization offered by PeVFA improve a deep RL algorithm in practice? Question 2 Can our proposed framework to learn effective policy representation? Our experiments are conducted in several OpenAI Gym continuous control tasks (1 from Box2D and 5 from MuJoCo) (Brockman et al. 2016;Todorov, Erez, and Tassa 2012). All experimental details and curves can be found in Appendix B.
Algorithm Implementation. We use PPO (Schulman et al. 2017) as the basic algorithm and propose a representative implementation of Algorithm 1, called PPO-PeVFA. PPO is a policy optimization algorithm that follows the paradigm of GPI (Fig.1, left). A value network V φ (s) with parameters φ (i.e., conventional VFA) is trained to approximate the value of current policy π; while π is optimized with respect to a surrogate objective (Schulman et al. 2015) using advantages calculated by V φ and GAE . Compared with original PPO, PPO-PeVFA makes use of a PeVFA network V θ (s, χ π ) with parameters θ rather than the conventional VFA V φ (s), and follows the training scheme as in Algorithm 1. Note PPO-PeVFA uses the same policy optimization method as original PPO and only differs at value approximation.  Baselines and Variants. Except for original PPO as a default baseline, we use another two baselines: 1) PPO-PeVFA with randomly generated policy representation for each policy, denoted by Ran PR; 2) PPO-PeVFA with Raw Policy Representation (RPR), i.e., use the vector of all parameters of policy network as representation as adopted in PVFs (Faccio and Schmidhuber 2020). Our variants of PPO-PeVFA differ at the policy representation used. In total, we consider 6 variants denoted by the combination of the policy data choice (i.e., OPR, SPR) and representation principle choice (i.e., E2E, CL, AUX).
Experimental Details. For all baselines and variants, we use a normal-scale policy network with 2 layers and 64 units for each layer, resulting in over 3k to 10k (e.g., Ant-v1) policy parameters depending on the environments. We do not assume the access to pre-collected policies. Thus the size of policy set increases from 1 (i.e., the initial policy) during the learning process, to about 1k to 2 for a single trial. The dimensionality of all kinds of policy representation expect for RPR is set to 64. The buffer D maintains recent 200k steps of interaction experience and the policy data of corresponding policy. The number of interaction step of each trial is 1M for InvDouPend-v1 and LunarLander-v2, 4M for Ant-v1 and 2M for the others.
Results. The overall experimental results are summarized in Tab.1. In Fig.5(a), we provide aggregated results across all environments expect for InvDouPend-v1 and LunarLander-v2 (since most algorithms achieve near-optimal results), where all returns are normalized by the results of PPO in Tab.1. Full learning curves are omitted and can be found in Appendix F.2.
To Question 1. From Tab.1, we can find that both PPO-PeVFA w/ OPR (E2E) and PPO-PeVFA w/ SPR (E2E) outperforms PPO in all 6 tasks, and achieve over 20% improvement in Fig.5(a). This demonstrates the effectiveness of PeVFA. Moreover, the improvement is further enlarged (to about 40%) by CL and AUX for both OPR and SPR. This indicates that the superiority of PeVFA can be further utilized with better policy representation that offers a more suitable space for value generalization.
To Question 2. In Tab.1, consistent degeneration is observed for PPO-PeVFA w/ Ran PR due to the negative effects on generalization caused by the randomness and disorder of policy representation. This phenomenon seems to be more severe for PPO-PeVFA w/ RPR due to the complexity of high-dimensional parameter space. In contrast, the improvement achieved by our proposed PPO-PeVFA variants shows that effective policy representation can be learned from policy parameters (OPR) and state-action pairs (SPR) though value approximation loss (i.e., E2E) and further improved when additional self-supervised representation learning is involved as CL and AUX. Overall, OPR slightly outperforms SPR as CL does over AUX. We hypothesize that it is due to the stochasticity of state-action pairs which serve as inputs of SPR and training samples for AUX. This reveals the space for future improvement. In addition, we visualize the learned representation in Fig.5(b). We can observe that policies from different trials are locally continuous and show different modes of embedding trajectories due to random initialization and optimization; while a global evolvement among trials emerges with respect to policy performance.

Conclusion and Future Work
In this paper, we propose Policy-extended Value Function Approximator (PeVFA) and study value generalization among policies. We propose a new form of GPI based on PeVFA which is potentially preferable to conventional VFA for value approximation. Moreover, we propose a general framework to learn low-dimensional embedding of RL policy. Our experiments demonstrate the effectiveness of the generalization characteristic of PeVFA and our proposed policy representation learning methods.
Our work opens up some research directions on value generalization among policies and policy representation. A possible future study on the theory of value generalization among policies is to consider the interplay between approximation error, policy improvement and local generalization during GPI with PeVFA. Besides, analysis on influence factors of value generalization among policies (e.g., policy representation, architecture of PeVFA) and other utilization of PeVFA are expected. For better policy representation, inspirations on OPR may be got from studies on Manifold Hypothesis of neural network; the selection of more informative state-action pairs for SPR is also worth research. In Definition 1, we use Pπ for a formal description of value approximation process, i.e., the learning process of a parametrized PeVFA V θ with parameters θ ∈ Θ to approximate the values of policy π. For a usual example, one can consider Pπ as multiple times of parameter update via gradient descent with respect to f θ (π) = V θ (π) − V π . Note that f θ (π) can be equivalent to a common value approximation loss with some unbiased estimatesV π from experiences stored, when the same state distribution ρ(s) is considered. Thus, with sufficient capacity of function approximation and certain number of training, we can expect a contraction of approximation loss for policy π obtained by Pπ.
We use Definition 2 to characterize the local smoothness of approximation loss f θ near policy π with Lipschitz continuity. Consider a typical PeVFA V θ parameterized by an MLP with finite weights, biases and non-linear activation. Such a V θ is Lipschitz continuity with a bounded Lipschitz constant, as it is made up of function transformations that individually have bounded Lipschitz constants, e.g., weight matrix w of some layer has bounded Lipschitz constant to be the operator norm of matrix w and ReLU activation has Lipschitz constant of 1. Further, easily we have for any π and π , As mentioned above, V θ is Lipschitz continuity with a bounded Lipschitz constant; and the norm of true value vector of two policies is also finite. Thus, f θ in this case can also have a bounded Lipschitz constant L.
A.2 Proof of Lemma 1 Proof. For the clarity, we also use f andf as abbreviations of f θ and fθ in the following. Start from theL-continuity off (θ) (recall Definition 2), we have the upper bound off (π2) below: (2) The second term in Eq.2 is decided by the two policies we considered and a Lipschitz constantL. Moreover, the constantL (i.e., locality property) is related to the parametersθ of PeVFA. In general, we denote the above term as M(π1, π2,L) called locality margin. The locality margin M(π1, π2,L) can have different forms that depends on the specific locality property, for examples: x, y, z correspond to Lipschitz Continuous, Lipschitz Gradients and Lipschitz Hessian (Nesterov and Polyak 2006), which are conisdered in previous works on generalization studies (Keskar et al. 2017;Wang et al. 2018). Further, apply the Definition 1 and consider the case f (π1) ≤ f (π2), Eq.2 can be further transformed as follows: which yields the generalization upper bound in Lemma 1. We note the first term of RHS of Eq.3 as generalized contraction term since it is from the contraction on f (π1) caused by the value approximation operator Pπ 1 , and the second term as locality margin since it is determined by specific local property.
Remark 1 Since value approximation is only performed for π1, the condition f θ (π1) ≤ f θ (π2) can usually exist after a certain number of training; in turn, the complementary case f θ (π1) > f θ (π2) is acceptable since the unoptimized approximation loss is already lower than the optimized one.
A.3 Proof of Corollary 1 Proof. Following Lemma 1, consider Lipschitz continuity for a concrete locality property of fθ, we have, Then we get the contraction condition of value generalization on π2 in Corollary 1, by letting the RHS of Eq.4 be smaller than f (π2): Remark 2 From the generalization contraction condition provided in Corollary 1, we can find that: as i. γ → 0, or ii. d(π1, π2) → 0, or iii. L → 0, the contraction condition is easier to achieve (or the contraction gets tighter), i.e., the generalization on unlearned policy π2 is better.
In another word, the tighter the contraction on learned policy π1 is, the closer the two policies are, the smoother the approximation loss function f is, the generalization on unlearned policy π2 is better. Corollary 1 provides the generalization contraction condition on f (π2), under the assumptions that Pπ 1 is γ-contraction and f (π1) < f (π2) (as in Lemma 1). In below, we discuss a more general condition for generalization contraction on f (π2) which indicates more possible cases: that is to let, Since d(π1, π2) is constant in the two-policy case considered, the condition in Corollary 3 is associated to the value approximation losses on π1 and π2 before applying the value approximation operator Pπ, as well as theL-continuity ofθ after applying Pπ. We can find similar conclusions as mentioned in Remark 2. However, Corollary 3 indicates some more cases that the condition of generalization contraction can be satisfied. For example, it can happen in the complementary cases as we assumed in Lemma 1, i.e., 1) when Proof. Consider any t ≥ 0 and θt−1 then due to the definition of the value approximation process Pπ t , where Mt = Lt · d(πt, πt+1). Intuitively, such a recursive relation between the generalized approximation loss of two consecutive steps, i.e., f θ t−1 (πt) and f θ t (πt+1), are chained by the assumed continuity of the loss function f θ t and the definition of value approximation process.
A.5 Proof of Corollary 2 Proof. Consider the consecutive value approximation process θ−1 . . , following the recursive relation in Lemma 2, we have the inequality below by induction, where Mt = Lt · d(πt, πt+1). We use to denote the term for accumulated generalized contraction of initial approximation loss and use to denote the term for accumulated locality margin.
Towards the infinity case i.e., t → ∞, if we assume that (i) maxt d(πt, πt+1) < ∞ and (ii) h 2 That is because the sequence {Mi} t i=0 has a public upper bound Mmax = Lmax · maxt d(πt, πt+1) where Lmax denotes the upper bound of Lipschitz constant (recall the discussion in Appendix A.1), and by (ii) Note that we consider a really loose bound in the infinity case above with Mmax, therefore the condition (ii) may be unnecessarily strict when the dynamics of Lt and d(πt, πt+1) are considered. Intuitively, the evolvement of Lt during learning process is related to function family and optimization method of θt; and for d(πt, πt+1), this is related to value approximation error (f θ t (π t ) and policy improvement method (i.e., how πt is improved to be πt+1). We leave these further analysis for future work.
A.6 Proof of Theorem 1 Proof. By the condition in Theorem 1, we have where the second inequality comes from Triangle Inequality. Then it is straightforward that which means that with local generalization of values for successive policy πt+1, the value approximation distance (VAD) can be closer in contrast to the conventional one (RHS of Eq.12).
In practice, we consider that it is also possible for farther distance to exist, e.g., the condition in above Theorem 1 is not satisfied. Moreover, under nonlinear function approximation, it is not necessary that a closer approximation distance (induced by Theorem 1) ensures easier approximation or optimization process. This can be associated to many factors, e.g., the underlying function space, the optimization landscape, the learning algorithm used and etc. In this paper, we provide a condition for potentially beneficial local generalization and we resort to empirical examination as shown in Sec. 3.3. Further investigation on the interplay between value generalization and policy learning especially under nonlinear function approximation is planned for future work.

B.1 Global Generalization in 2D Point Walker
Global generalization denotes the generalization scenario that values can generalize to unlearned policies (π ∈ Π1) from already learned policies (π ∈ Π0). We conduct the following experiments to demonstrate global generalization in a 2D continuous Point Walker environment with synthetic simple policies.
Environment. We consider a point walker on a 2D continuous plane with: • state: (x, y, sin(θ), cos(θ), cos(x), cos(y)), where θ is the angle of the polar coordinates, • action: 2D displacement, a ∈ R 2 [−1,1] , • a deterministic transition function that describes the locomotion of the point walker, depending on the current position and displacement issued by agent, i.e., x , y = x, y + a, • a reward function: rt = u t+1 −u t 10 with utility ut = x 2 t − y 2 t , as illustrated in Fig.6(a).
Synthetic Policy. We build the policy sets Π = Π0 ∪ Π1 and Π0 ∩ Π1 = ∅ with synthetic policies. Each synthetic policy is a 2-layer tanh-activated neural policy network with 2 nodes for each layer. The weights are initialized by sampling from a uniform distribution U (−1, 1) and the biases are initialized by U (−0.2, 0.2). Each policy is deterministic, taking an environmental state as input and outputting a displacement in the plane. We find that the synthetic population generated by such a simple way can show diverse behaviors. Fig.6(b) shows the motion patterns of an example of such a synthetic population. Note that the synthetic policies are not trained in this experiment.
Policy Dataset. We rollout each policy in environment to collect trajectories T = {τi} k i=0 . For such small synthetic policies, it is convenient to obtain policy representation. Here we use the concatenation of all weights and biases of the policy network (26 in total) as representation χπ for each policy π, called raw policy representation (RPR). Therefore, combined with the trajectories collected, we obtain the policy dataset, i.e., {(χπ j , Tπ j )} n j=0 . In total, 20k policies are synthesized in our experiments and we collected 50 trajectories with horizon 10 for each policy. We separate the synthetic policies into training set (i.e., unknown policies Π0) and testing set (i.e., unseen policies Π1) in a proportion of 8 : 2. We set a PeVFA network V θ (s, χπ) to approximate the values of training policies (i.e., π ∈ Π0), and then conduct evaluation on testing policies (i.e., π ∈ Π1). We use Monte Carlo return (Sutton and Barto 1998) of collected trajectories as approximation target (true value of policies) in this experiment. The network architecture of V θ (s, χπ) is illustrated in Fig.7(a). The learning rate is 0.005, batch size is 256. K-fold validation is performed through shuffling training and testing sets. For each trajectory (the same color in one subplot), transparency represents the dynamics along timesteps, i.e., fully transparent and non-transparent denotes the positions at first and last timesteps. Fig.7(b) shows the curves of training loss and testing loss. The average losses on training and testing set are 1.782 and 2.071 over 6 trials. Fig.2(a) plots the value predictions for policies from training and testing set (100 for each). This demonstrates that a PeVFA trained with data collected by training set Π0 achieves reasonable value prediction of unseen testing policies in Π1. Our results indicate that value generalization can exist among policy space with a properly trained PeVFA. RPR can also be one alternative of policy representation when policy network is of small scale.

B.2 Local Generalization in MuJoCo Continuous Control Tasks
We demonstrate local generalization of PeVFA, especially to examine the existence of Theorem 1, i.e., PeVFA can induce closer approximation distance (i.e., lower approximation error) than conventional VFA along the policy improvement path.
We use a 2-layer 8-unit policy network trained by PPO (Schulman et al. 2017) algorithm in OpenAI MuJoCo continuous control tasks. As in previous section, using a very small policy network is for the convenience of training and acquisition of policy representation in this demonstrative experiment. We use all weights and biases of the small policy network (also called raw policy representation, RPR), whose number is about 10 to 100 in our experiments, depending on the specific environment (i.e., the state and action dimensions). We train the Steps (  Each plot has two vertical axes, the left one for approximation error (red and blue curves) and the right one for average return (green curves). Red and blue denotes the approximation error of conventional VFA (V φ (s)) and of PeVFA (V θ (s, χ π )) respectively; solid and dashed curves denote the approximation error before and after the training for values of successive policy (i.e., policy evaluation) with conventional VFA and PeVFA, averaged over 6 trials. The shaded region denotes half a standard deviation of average evaluation. PeVFA consistently shows lower losses (i.e., closer to approximation target) across all tasks than conventional VFA before and after policy evaluation along policy improvement path, which demonstrates Theorem 1. Steps (  small policy network as commonly done with PPO (Schulman et al. 2017) and GAE . The conventional value network V φ (s) (VFA), is a 2-layer 128-unit ReLU-activated MLP with state as input and value as output. Parallel to the conventional VFA in PPO, we set a PeVFA network V θ (s, χπ) with RPR as additional input. The structure of PeVFA differs at the first hidden layer which has two input streams and each of them has 64 units, as illustrated in Fig.7(a), so that making VFA and PeVFA have similar scales of parameter number. In contrast to conventional VFA V φ which approximates the value of current policy (e.g., Algorithm 2), PeVFA V θ (s, χπ) has the capacity to preserve values of multiple policies and thus is additionally trained to approximate the values of all historical policies ({πi} t i=0 ) along the policy improvement path (e.g., Algorithm 3). The learning rate of policy is 0.0001 and the learning rate of value function approximators (V φ (s) and V θ (s, χπ)) is 0.001. The training scheme of PPO policy here is the same as that described in Appendix F.1 and Tab.2.
Note that V θ (χπ) does not interfere with PPO training here, and is only referred as a comparison with V φ on the approximation error to the true values of successive policy πt+1. We use the MC returns of on-policy data (i.e., trajectories) collected by current successive policy as unbiased estimates of true values, similarly done in (v. Hasselt 2010;Fujimoto, v. Hoof, and Meger 2018). Then we calculate the approximation error for VFA V φ and PeVFA V θ (χπ) to the approximation target before and after value network training of current iteration. Finally, we compare the approximation error between VFA and PeVFA to approximately examine local generalization and closer approximation target in Theorem 1. Complete results of local generalization across all 7 MuJoCo tasks are show in Fig.8. The results show that PeVFA consistently shows lower losses (i.e., closer to approximation target) across all tasks than conventional VFA before and after policy evaluation along policy improvement path, which demonstrates Theorem 1. Moreover, we also provide similar empirical evidence when policy is updated with larger learning rates in {0.0001, 0.001, 0.005}, as in Fig.9.
A common observation across almost all results in Fig.8 and in Fig.9 is that the larger the extent of policy change (see the regions with a sheer slope on green curves), the higher the losses of conventional VFA tend to be (see the peaks of red curves), where the generalization tends to be better and more significant (see the blue curves). Since InvertedPendulum-v1 is a simple task while the complexity of the solution for Ant-v1 is higher, the difference between value approximation losses of PeVFA and VFA is more significant at the regions with fast policy improvement. Besides, the Raw Policy Representation (RPR) we used here does not necessarily induce a smooth and efficient policy representation space, among which policy values are easy to generalize and optimize. Thus, RPR may be sufficient for a good generalization in InvertedPendulum-v1 but may be not in Ant-v1. Overall, we think that the quantity of value approximation loss is related to several factors of the environment such as the reward scale, the extent of policy change, the complexity of underlying solution (e.g., value function space) and some others. A further investigation on this can be interesting.

C.1 Comparison between Conventional GPI and GPI with PeVFA
A graphical comparison of conventional GPI and GPI with PeVFA is shown in Fig.1. Here we provide another comparison with pseudo-codes.
From the lens of Generalized Policy Iteration (Sutton and Barto 1998), for most model-free policy-based RL algorithms, the approximation of value function and the update of policy through policy gradient theorem are usually conducted iteratively. Representative examples are REINFORCE (Sutton and Barto 1998), Advantage Actor-Critic (Mnih et al. 2016), Deterministic Policy Gradient (DPG) (Silver et al. 2014) and Proximal Policy Optimization (PPO) (Schulman et al. 2017). With conventional value function (approximator), policy evaluation is usually performed in an on-policy or off-policy fashion. We provide a general GPI description of model-free policy-based RL algorithm with conventional value functions in Algorithm 2.
Algorithm 2: Generalized policy iteration for model-free policy-based RL algorithm with conventional value functions (V π (s) or Q π (s, a)) 1: Initialize policy π 0 and V π −1 (s) or Q π −1 (s, a) 2: Initialize experience buffer D 3: for iteration t = 0, 1, 2, . . . do 14: # Generalized Policy Improvement 15: Update policy π t with regard to V π t (s) or Q π t (s, a) through some policy gradient theorem, i.e., π t+1 ←− π t 16: end for Note that we use subscript t − 1 → t (Line 13 in Algorithm 2) to let the updated value functions to correspond to the evaluated policy πt during policy evaluation process in current iteration.
As a comparison, a new form of GPI with PeVFA is shown in Algorithm 3. Except for the different parameterization of value function, PeVFA can perform additionally training on historical policy experiences at each iteration (Line 7-8). This is naturally compatible with PeVFA since it develops the capacity of conventional value function to preserve the values of multiple policies. Such a training is to improve the value generalization of PeVFA among a policy set or policy space. Note that for value approximation of current policy πt (Line 10-14), the start points are generalized values of πt from historical approximation, i.e., Vt−1(s, χπ t ) and Qt−1(s, a, χπ t ). In another word, this is the place where local generalization steps (illustrated in Fig.2(b)) are. One may compare with conventional start points (V π t−1 (s) and Q π t−1 (s, a), Line 13 in Algorithm 2) and see the difference, e.g., V π t−1 (s) ⇔ V π t−1 (s) ⇔ Vt−1(s, χπ t−1 ) is different with Vt−1(s, χπ t ), where ⇔ is used to denote an equivalence in definition. As discussed in Sec. 3.3 and 3.4, we suggest that such local generalization steps help to reduce approximation error and thus improve efficiency during the learning process.

12:
else if off-policy update then 13: Update policy π t with regard to V t (s, χ πt ) or Q t (s, a, χ πt ) through some policy gradient theorem, i.e., π t+1 ←− π t 17: end for C.2 More Discussions on GPI with PeVFA Off-Policy Learning. Off-policy Value Estimation (Sutton and Barto 1998) denotes to evaluate the values of some target policy from data collected by some behave policy. As commonly seen in RL (also shown in Line 6-10 in Algorithm 2), different algorithms adopt on-policy or Figure 10: PPO with different epoch settings. For example, c20a10 denotes 20 epochs for VFA and 10 epochs for policy training at each iteration. The number of epochs for VFA is set to 10 commonly for MuJoCo tasks. Fewer or more training of VFA in conventional PPO is not beneficial.
off-policy methods. For GPI with PeVFA, especially for the value estimation of historical policies (Line 8 in Algorithm 3), on-policy and off-policy methods can also be considered here. One interesting thing is, in off-policy case, one can use experiences from any policy for the learning of another one, which can be appealing since the high data efficiency of value estimation of each policy can strengthen value generalization among themselves with PeVFA, which further improve the value estimation process.
Convergence of GPI with PeVFA. Convergence of GPI is usually discussed in some ideal cases, e.g., with small and finite state action spaces and with sufficient function approximation ability. In this paper, we focus on the comparison between conventional VFA and PeVFA in value estimation, i.e., Policy Evaluation, and we make no assumption on the Policy Improvement part. We conjecture that with the same policy improvement algorithm and sufficient function approximation ability, GPI with conventional VFA and GPI with PeVFA finally converge to the same policy. Moreover, based on Theorem 1 and our empirical evidence in Sec. 3.3, GPI with PeVFA can be more efficient in some cases: with local generalization, it could take less experiences (training) for PeVFA to reach the same level of approximation error than conventional VFA, or with the same amount of experience (training), PeVFA could achieve lower approximation error than conventional VFA. We believe that a deeper dive in convergence analysis is worth further investigation.
PeVFA with TD Value Estimation. In this paper, we propose PPO-PeVFA as a representative instance of re-implementing DRL algorithms with PeVFA. Our theoretical results and algorithm 3 proposed under the general policy iteration (GPI) paradigm are suitable for TD value estimation as well in principle. One potential thing that deserves further investigation is that, it can be a more complex generalization problem since the approximation target of TD learning is moving (in contrast to the stationary target when unbiased Monte Carlo estimates are used). The non-stationarity induced by TD is recognized to hamper the generalization performance in RL as pointed out in recent work (Igl et al. 2020). Further study on PeVFA with TD learning (e.g., TD3 and SAC) is planned in the future as mentioned in Sec. 6.
PeVFA and value-based RL. We found it is interesting to consider the integration of PeVFA and value-based RL, e.g., Q-Learning, since no explicit policy exists in these cases The main two different things to consider when we try to apply PeVFA with value-based RL, are 1) the policy representation of an implicit policy and 2) the backup of bellman optimality equation. We can handle the former with SPR in principle. For the later, due to bellman optimality equation, the LHS and RHS of the typical Q-Learning backup may need to have different policy representations in PeVFA version. This may be intriguing and more complex especially when bootstrapping is involved. We leave it for future work.

C.3 More Discussions on PeVFA, Training VFA of PPO More and PPG
One key characteristic of PeVFA is that it performs on-policy value training for the policies along policy improvement path that are previous to the current one, with corresponding historical data collected.
In principle, we can do more training on on-policy data in conventional PPO by increase the epoch of VFA training (10 commonly used for MuJoCo tasks). Actually, we had made a study on this and we provide the results in Figure 10 below. Fewer or more training of VFA in conventional PPO is not beneficial.
Besides, we can also do more training on off-policy data (i.e., historical experience) in conventional PPO. This can be approximately evaluated according to PPO-PeVFA with Random Policy Representation (Ran PR) in our experiments, since the meaningless policy representation can be viewed as noise input.
In Phasic Policy Gradient (PPG) (Cobbe et al. 2021), it makes use of near on-policy data for more training of VFA. In their paper, this is also demonstrated to be not necessary and can be achieved by increasing the epoch number for VFA (see their Figure 9 and the sentence 'Although it is convenient to optimize L value during the auxiliary phase as well, it is not strictly necessary').

D.1 Policy Geometry
A policy π ∈ Π = P(A) S , defines the behavior (action distribution) of the agent under each state. For a more intuitive view, we consider the geometrical shape of a policy: all state s ∈ S and all action a ∈ A are arranged along the x-axis and y-axis of a 2-dimensional plane, and the probability (density) π(a|s) is the value of z-axis over the 2-dimensional plane. Note that for finite state space and finite action space (discrete action space), the policy can be viewed as a |S| × |A| table with each entry in it is the probability of the corresponding state-action case. Without loss of generality, we consider the continuous state and action space and the policy geometry here. Illustrations of policy geometry examples are shown in Fig.11. Fig.11(a) shows the policy geometry in a general case, where the policy can be defined arbitrarily. Generally, the policy geometry can be any possible geometrical shape (s.t. ∀s ∈ S, a∈A π(a|s) = 1). This means that the policy geometry is not necessarily continuous or differentiable in a general case. Specially, one can imagine that the geometry of a deterministic policy consists of peak points (z = 1) for each state and other flat regions (z = 0). Fig.11(b) shows an example of synthetic continuous policy which can be viewed as a 3D curved surface. In Deep RL, a policy may usually be modeled as a deep neural network. Assume that the neural policy is a function that is almost continuous and differentiable everywhere, the geometry of such a neural policy can also be continuous and differentiable almost everywhere. As shown in Fig.11(c), we provide a demo of neural policy by smoothing an arbitrary policy along both state and action axes.

D.2 Implementation Details of Surface Policy Representation (SPR) and Origin Policy Representation (OPR)
Here we provide a detailed description of how to encode different policy data for Surface Policy Representation (SPR) and Origin Policy Representation (OPR) we introduced in Sec. 4.
Encoding of State-action Pairs for SPR. Given a set of state-action pairs {si, ai} n i=1 (with size [n, s dim + a dim]) generated by policy π (i.e., ai ∼ π(·|si)), we concatenate each state-action pair and obtain an embedding of it by feeding it into an MLP, resulting in a stack of state-action embedding with size [n, e dim]. After this, we perform a mean-reduce operator on the stack and obtain an SPR with size [1, e dim]. A similar permutation-invariant transformation is previously adopted to encode trajectories in ).
Encoding of Network Parameters for OPR. We propose a novel way to learn low-dimensional embedding from policy network parameters directly. To our knowledge, we are the first to learn policy embedding from neural network parameters in RL. Note that latent space of neural networks are also studied in differentiable Network Architecture Search (NAS) (Liu, Simonyan, and Yang 2019;Luo et al. 2018), where architecture-level embedding are usually considered. In contrast, OPR cares about parameter-level embedding with a given architecture.
Consider a policy network to be an MLP with well-represented state (e.g., CNN for pixels, LSTM for sequences) as input and deterministic or stochastic policy output. We compress all the weights and biases of the MLP to obtain an OPR that represents the decision function. The encoding process of an MLP with two hidden layers is illustrated in Fig.12. The main idea is to perform permutation-invariant transformation for inner-layer weights and biases for each layer first. For each unit of some layer, we view the unit as a non-linear function of all outputs, determined by weights, a bias term and activation function. Thus, the whole layer can be viewed as a batch of operations of previous outputs, e.g., with the shape [ht, ht−1 + 1] for t ≥ 1 and t = 0 is also for the input layer. Note that we neglect activation function in the encoding since we consider the policy network structure is given. That is also why we call OPR as parameter-level embedding in contrast to architecture-level enbedding in NAS (mentioned in the last paragraph). We then feed the operation batch in an MLP and perform mean-reduce to outputs. Finally we concatenate encoding of layers and obtain the OPR.
We use permutation-invariant transformation for OPR because that we suggest the operation batch introduced in the last paragraph can be permutation-invariant. Actually, our encoding shown in Fig.12 is not strict to obtain permutation-invariant representation since inter-layer dependencies are not included during the encoding process. We also tried to incorporate the order information during OPR encoding and we found similar results with the way we present in Fig.12, which we adopt in our experiments.

Operations Preprocess
Permutation-Invariant Transform Figure 12: An illustration for policy encoder of Origin Policy Representation (OPR) for a two-layer MLP. h 1 , h 2 denotes the numbers of hidden units for the first and second hidden layers respectively. The main idea is to perform permutation-invariant transformation for inner-layer weights and biases for each layer first and then concatenate encoding of layers.
Towards more sophisticated RL policy that operates images. Our proposed two policy representations (i.e., OPR and SPR) can basically be applied to encode policies that operate images, with the support of advanced image-based state representation. For OPR, a policy network with image input usually has a pixel feature extractor like Convolutional Neural Networks (CNNs) followed by a decision model (e.g., an MLP). With effective features extracted, the decision model can be of moderate (or relatively small) scale. Recent works on unsupervised representation learning like MoCo (He et al. 2020), SimCLR , CURL  also show that a linear classifier or a simple MLP which takes compact representation of images learned in an unsupervised fashion is capable of solving image classification and image-based continuous control tasks. In another direction, it is promising to develop more efficient even gradient-free OPR, for example using the statistics of network parameters in some way instead of all parameters as similarly considered in (Unterthiner et al. 2020). For SPR, to encode state-action pairs (or sequences) with image states can be converted to the encoding in the latent space. The construction of latent space usually involves self-supervised representation learning, e.g., image reconstruction, dynamics prediction. A similar scenario can be found in recent model-based RL like Dreamer (Hafner et al. 2020), where the imagination is efficiently carried out in the latent state space rather than among original image observations.
Overall, we believe that there remain more effective approaches to represent RL policy to be developed in the future in a general direction of OPR and SPR, which are expected to induce better value generalization in a different RL problems.

D.3 Data Augmentation for SPR and OPR in Contrastive Learning
Data augmentation is studied to be an important component in contrastive learning in deep RL recently (Kostrikov, Yarats, and Fergus 2020;Laskin et al. 2020). Contrastive learning usually resorts to data augmentation to build positive samples. Data augmentation is typically performed on pixel inputs (e.g., images) problems (He et al. 2020;Chen et al. 2020). In our work, we train policy representation with contrastive learning where data augmentation is performed on policy data. For SPR, i.e., state-action pairs as policy data, there is no need to perform data augmentation since different batches of randomly sampled state-action pairs naturally forms positive samples, since they all reflect the behavior of the same policy. A similar idea can also be found in (Fu et al. 2020) when dealing with task context in Meta-RL.
For OPR, i.e., policy network parameters as policy data, it is unclear how to perform data augmentation on them. In this work, we consider two kinds of data augmentation for policy network parameters as shown in Fig.13. We found similar results for both random mask and noise corruption, and we use random mask as default data augmentation in our experiments.
As an unsupervised representation learning method, contrastive Learning encourages policies to be close to similar ones (i.e., positive samples π + ) and to be apart from different ones (i.e., negative samples π − ) in policy representation space. The policy representation network is then trained with InfoNCE loss (Oord, Li, and Vinyals 2018), i.e., to minimize the cross-entropy loss below:

D.4 Pseudo-code of Policy Representation Learning Framework
The pseudo-code of the overall framework of policy representation learning is in Algorithm 4. The policy representation learning is conducted base on a policy dataset, which stores the policy data, i.e., interaction trajectories generated by policies and the parameters of policy networks. Such a dataset can be obtained in different ways, e.g., pre-collected, online collected and etc. In our experiments, we do not assume the access to pre-collected or given policy data; instead, we use the data of all historical policies met along the policy improvement path during the online learning process. Different kinds of policy data (i.e., state-action pairs or policy parameters) are used depending on the policy representation adopted (i.e., SPR or OPR). For policy representation learning, the value function approximation loss (E2E) is used as a default choice of training loss in our framework. In addition, the auxiliary loss (AUX) of policy recovery and contrastive learning (CL) serve as another two options to be optimized for representation learning. Note that in Line 21, the positive samples χ π + i is obtained from a momentum policy encoder (He et al. 2020) with another augmentation for corresponding policy data, while negative samples χ π − i are other policy embeddings in the same batch, i.e., χ π − i ∈ B\{χπ i }.

D.5 Criteria of A Good Policy Representation
To answer the question: what is a good representation for RL policy ought to be? We assume the following criteria: • Dynamics. Intuitively, a good policy representation should contain the information of how the policy influences the environment (dynamics and rewards). • Consistency. A good policy representation should keep the consistency among both policy space and presentation space. Concretely, the policy representation should be distinguishable, i.e., different policies also differ among their representation. In contrast, the representation of similar polices should lay on the close place in the representation space. • Geometry. Additionally, from the lens of policy geometry as shown in Appendix D.1, a good policy representation should be an reflection of policy geometry. It should show a connection to the policy geometry or be interpretable from the geometric view.
From the perspective of above criteria, SPR follows Dynamics and Geometry while OPR may render them in an implicit way since network parameters determine the nonlinear function of policy. Auxiliary loss for policy recovery (AUX) is a learning objective to acquire Dynamics; Contrastive Learning (CL) is used to impose Consistency. Based on the above thoughts, we hypothesize the reasons of several findings as shown in the comparison in Tab.1. First, AUX naturally overlaps with SPR and OPR to some degree for Dynamics while CL is relatively complementary to SPR and OPR for Consistency. This may be the reason why CL improves the E2E representation more than AUX in an overall view. Second, the noise of state-action samples for SPR may be the reason to OPR's slightly better overall performance than that of SPR (similar results are also found in our visualizations as in Fig.19).
Moreover, the above criteria are mainly considered from an unsupervised or self-supervised perspective. However, a sufficiently good representation of all the above properties may not be necessary for a specific downstream generalization or learning problem which utilizes the policy representation. A problem-specific learning signal, e.g., the value approximation loss in our paper (E2E representation), can be efficient since it is to extract the most relevant information in policy representation for the problem. A recent work (Tsai et al. 2020) also studies the relation between self-supervised representation and downstream tasks from the lens of mutual information. Therefore, we suggest that a trade-off between good unsupervised properties and efficient problem-specific information of policy representation should be considered when using policy representation in a specific problem.

Algorithm 4: A Framework of Policy Representation Learning
, consisting of policy π i , policy parameters ω i and state-action pairs D πi = {(s j , a j )} m j=1 1: Initialize the policy encoder g α with parameters α 2: Initialize the policy decoder (or master policy) (network)π β (a|s, χ π ) for SPR and the weight matrix W for ORP respectively 3: for iteration i = 0, 1, 2, . . .
else if Use SPR then 12: if Use Contrastive Learning (CL) then 21: Calculate contrastive loss, Markov Decision Process. We consider a Markov Decision Process (MDP) defined as S, A, r, P, γ, ρ0 with S the state space, A the action space, r the reward function, P the transition function, γ ∈ [0, 1) the discount factor and ρ0 the initial state distribution. A policy π ∈ Π = P (A) |S| , defines the distribution over all actions for each state. The agent interacts with the environment with its policy, generating the trajectory s0, a0, r1, s1, a1, r2, ..., st, at, rt+1, ..., where rt+1 = r(st, at). An RL agent seeks for an optimal policy that maximizes the expected long-term discounted return, J(π) = Es 0 ∼ρ 0 ,a∼π ∞ t=0 γ t rt+1 .
Value Function. Almost all RL algorithms involve value functions (Sutton and Barto 1998), which estimate how good a state or a state-action pair is conditioned on a given policy. The state-value function v π (s) is defined in terms of the expected return obtained through following the policy π from a state s: Similarly, action-value function is defined for all state-action pairs as q π (s, a) = Eπ ∞ t=0 γ t rt+1|s0 = s, a0 = a . Typically, value functions are learned through Monte Carlo (MC) or Temporal Difference (TD) algorithms (Sutton and Barto 1998).
Bellman equations defines the recursive relationships among value functions. The Bellman Expectation equation of v π (s) has a matrix form as below (Sutton and Barto 1998): where V π is a |S|-dimensional vector, P π is the state-to-state transition matrix P π (s |s) = a∈A π(a|s)P(s |s, a) and r π is the vector of expected rewards r π (s) = a∈A π(a|s)r(s, a). Eq.13 indicates that value function is determined by policy π and environment models (i.e., P and r. For a conventional value function, all of them are modeled implicitly within a table or a function approximator, i.e., a mapping from only states (and actions) to values.
Generalized Policy Iteration. Sutton and Barto (1998) consider most RL algorithms can be described in the paradigm of Generalized Policy Iteration (GPI). In recent decade, RL algorithms usually resort to function approximation (e.g., deep neural networks) to deal with large and continuous state space. An illustration of GPI with function approximation is on the left of Fig.1. We use θ to denote the parameters of parameterized value functions. Without loss of generality, we do not plot the parameters of policy since it is not necessary for parameterized policy to exist, e.g., value-based RL algorithms (Mnih et al. 2015). For policy evaluation, value function approximators are updated in finite times to approximate the true values (i.e., V θ (s) → v π (s), Q θ (s, a) → q π (s, a)), yet can never be perfect. For policy improvement, the policy are improved with respected to the approximated value functions in an implicit (e.g., value-based RL) or explicit way (policy-based RL). In deep RL, perfect policy evaluation and effective policy improvement are non-trivial to obtain with complex non-linear function approximation from deep neural networks, thus most convergence and optimality results in conventional RL usually no longer hold. From these two aspects, many works study how to improve the value function approximation (v. Hasselt 2010;Bellemare, Dabney, and Munos 2017;Lan et al. 2020) and to propose more effective policy optimization or search algorithms (Schulman et al. 2015(Schulman et al. , 2017Haarnoja et al. 2018).

E.2 A Unified View of Extensions of Conventional Value Function from the Vector Form of Bellman Equation
Relation between PeVFA Value Approximation and Context-based Meta-RL. For a given MDP, performing a policy in the MDP actually induces a Markov Reward Process (MRP) (Sutton and Barto 1998). One can view the policy and actions are absorbed in the transition function of MRP. A value function defines the expected long-term returns starting from a state. Therefore, different policies induces different MRPs and PeVFA value approximation can be considered as a meta prediction task. In analogy to context-based Meta-RL where a task context is learned to capture the underlying transition function and reward function of a MDP (i.e., task), one can view policy representation as the context of corresponding MRP, since it is the underlying variable that determines the transition function of MRPs.

E.3 A Review of Works on Policy Representation/Embedding Learning
Recent years, a few works involve representation or embedding learning for RL policy (Hausman et al. 2018;Grover et al. 2018;Arnekvist, Kragic, and Stork 2019;Raileanu et al. 2020;Wang et al. 2020;Harb et al. 2020). We provide a brief review and summary for above works below.
The most common way to learn a policy representation is to extract from interaction trajectories through policy recovery (i.e., behavioral cloning). For Multiagent Opponent Modeling , a policy representation is learned from interaction episodes (i.e., state-action trajectories) through a generative loss and discriminate loss. Generative loss is the same as the policy recovery auxiliary loss; discriminate loss is a triplet loss that minimize the representation distance of the same policy and maximize those of different ones, which has the similar idea of Contrastive Learning (Oord, Li, and Vinyals 2018;Srinivas, Laskin, and Abbeel 2020). Such opponent policy representations are used for prediction of interaction outcomes for ad-hoc teams and are taken in policy network for some learning agent to facilitate the learning when cooperating or competing with unknown opponents. More recently, in Hierarchical RL (Wang et al. 2020), a representation is learned to model the low-level policy through generative loss mentioned above. The low-level policy representation is taken in high-level policy to counter the non-stationarity issue of co-learning of hierarchical policies. Later, Raileanu et al. (2020) resort to almost the same method and the learned policy representation is taken in their proposed PDVF. Along with a task context, the policy for a specific task can be optimized in policy representation space, inducing a fast adaptation in new tasks. In summary, such a representation learning paradigm can be considered as Surface Policy Representation (SPR) for policy data encoding (trajectories as a special form of state-action pairs) plus policy recovery auxiliary loss (AUX) as we introduced in Sec. 4.
A recent work (Harb et al. 2020) proposes Policy Evaluation Network (PVN) to approximate objective function J(π). We consider PVN as an predecessor of PDVF we mentioned above since offline policy optimization is also conducted in learned representation space in a single task after similarly well training the PVN on many policies. The authors propose Network Fingerprint to represent policy network. To circumvent the difficulty of representing the parameters directly, policy network outputs (policy distribution) under a set of probing states are concatenated and then taken as policy representation. Such probing states are randomly sampled for initialization and also optimized with gradients through PVN and policies, like a search in joint state space. In principle, we also consider this as a special instance of SPR, because network fingerprint follows the idea of reflecting the information of how policy can behave under some states. Intuitively from a geometric view, this can be viewed as using the concatenation of several representative (as denoted by the probing states) cross-sections in policy surface (e.g., Fig.11) to represent a policy. For another view, one can imagine an equivalent case between SPR and network fingerprint, when state-action pairs of a deterministic policy are processed in SPR and a representation consisting of a number of actions under some key states or representative states is used in network fingerprint. Two potential issues may exist for network fingerprint. First, the dimensionality of representation is proportional to the number of probing states (i.e., n|A|), where a dilemma exists: more probing states are more representative while dimensionality can increase correspondingly. Second, it can be non-trivial and even unpractical to optimize probing states in the case with relatively state space of high dimension, which introduces additional computational complexity and optimization difficulty.
In another concurrent work (Faccio and Schmidhuber 2020), a class of Parameter-based Value Functions (PVFs) are proposed. Instead of learning or designing a representation of policy, PVFs simply parse all the policy weights as inputs to the value function (i.e., Raw Policy Representation as also mentioned in our paper), even in the nonlinear case. Apparently, this can result in a unnecessarily large representation space which increase the difficulty of approximation and generalization. The issues of naively flattening the policy into a vector input are also pointed out in PVN (Harb et al. 2020).
Others, several works in Policy Adaptation and Transfer (Hausman et al. 2018;Arnekvist, Kragic, and Stork 2019), Gaussian policy embedding representations are construct through Variantional Inference.
Our related works, PVN (Harb et al. 2020) and PVFs (Faccio and Schmidhuber 2020) make use of the policy-based extension of conventional value function to let the extended value function be differentiable with policy parameters. We denote such new gradients as the policy gradients by backpropagting through the differentiable policy input, shortly GTPI, with a general formal definition below: Definition 3 Consider a policy-extended value function Q(s, a, χπ θ ), where χπ θ is a differentiable representation of policy π θ , obtained by representation function g, i.e., χπ θ = g(π θ ). We define GTPI to be the policy gradients ∇ θ V(s, χπ θ ) = ∇ θ π θ ∇π θ g(π θ )∇χ π θ V(s, χπ θ )| χπ θ =g(π θ ) . According to Definition 3, we can conclude the gradients used in PVN and PVFs by only considering different representation function g used. As mentioned in the main body of this paper, PVFs use policy network parameters as a straightforward representation. PVN uses Network Fingerprint, i.e., concatenation of policy distribution under a set of representative states. With GTPI, new ways of policy optimization can be obtained, as the ones proposed and evaluated in PVN and PVFs papers. In general, we view such policy optimization based on GTPI as policy optimization in policy representation space.
We can see a few connections here: • First, we can view DPG (Silver et al. 2014) ∇ θ π θ (a|s)∇aq π θ (s,a) | a=π θ (s) as a special GTPI with χπ θ (s) = a = π θ (s) as a local policy representation to optimize policy for state s. In this view, PVFs can be considered to perform a global policy update; while PVN is like to perform intermediate policy update on the states in the set of Network Fingerprint. • Policy optimization in policy representation space can have a connection to gradient-based Bayesian Optimization (BO) (Notin, Hernández-Lobato, and Gal 2021;Grosnit et al. 2021), policy (parameter) is a high-dimensional variable we want to optimize. According to the literature of BO, GTPI can face some optimization challenges. The objective function (i.e., policy-extended value function) is non-trivial to approximate due to the small number of policy samples, noisy reward signals, high-dimensional policy parameters. Without high-quality estimation of objective function, gradient optimization direction can be incorrect and noisy. A gradient issue on compatibility (Lillicrap et al. 2015;D'Oro and Jaskowski 2020) in such cases should also be considered.
Towards the scalable utilization of GTPI, an effective and efficient (e.g., low-dimensional) representation is necessary. This adds more difficulties in using GTPI for policy optimization. First, learning policy representation adds non-stationarity in the process of objective function approximation. Moreover, the extrapolation generalization desired by policy optimization is non-trivial to have any guarantee in policy representation space, especially when objective function is only trained on finite policies (usually much fewer than state-action samples) thus further resulting in erroneous policy gradients. Due to the poor knowledge on GTPI, we do not resort to GTPI for the policy update in our algorithms but focus on utilizing value generalization for more efficient value estimation in GTPI. Actually, we believe the potentials of GTPI and policy optimization in representation space, and we leave this for one of our main future direction of PeVFA.

F.1 Experimental Details
Environment. We conduct our experiments on commonly adopted OpenAI Gym 1 continuous control tasks (Brockman et al. 2016;Todorov, Erez, and Tassa 2012). We use the OpenAI Gym with version 0.9.1, the mujoco-py with version 0.5.4 and the MuJoCo products with version MJPRO131. Our codes are implemented with Python 3.6 and Tensorflow.
Resources/Equipment Used and Time/Space Cost. Our experiments are mainly conducted on a NVIDIA GeForce RTX 2080 Ti with 11 GB memory. It takes 3-4 hours for PPO-PeVFA and about 2 hours for PPO to finish a trial of 2 million steps MuJoCo training and evaluation.
In our experiments, about 6 trials are running simultaneously on the same GPU. Since PPO itself is quite light-weight (than off-policy RL agents like DDPG), computational cost is not a worry in our experiments.
For the additional space cost, PeVFA needs to store historical policies and their interaction experiences. The interaction experiences (i.e., trajectories) are stored in a replay buffer as done conventionally in an off-policy RL algorithm. Actually, we store the experiences in recent 200k time steps. For the policies, about 1k to 2k policies in total are encountered during each run, for each of which we store the network parameters, about 5k-20k parameters depends on the state dimension of the environment. In our experiments, the storage space for historical policies are negligible to the storage for experiences (e.g., 2 million interaction steps).
Overall, the time and space cost for PeVFA are influenced by the algorithm choice (e.g., policy representation training) and training scheme design. There is much room for further improvement. Implementation. We use Proximal Policy Optimization (PPO) (Schulman et al. 2017) with Generalized Advantage Estimator (GAE)  as our baseline algorithm. Recent works (Engstrom et al. 2020;Andrychowicz et al. 2020) point out code-level optimizations influence the performance of PPO a lot. For a fair comparison and clear evaluation, we perform no code-level optimization in our experiments, e.g., state standardization, reward scaling, gradient clipping, parameter sharing and etc. Our proposed algorithm PPO-PeVFA is implemented based on PPO, which only differs at the replacement for conventional value function network with PeVFA network. Policy network is a 2-layer MLP with 64 units per layer and ReLU activation, outputting a Gaussian policy, i.e., a tanh-activated mean along with a state-independent vector-parameterized log standard deviation. For PPO, the conventional value network V φ (s) (VFA) is a 2-layer 128-unit ReLU-activated MLP with state as input and value as output. For PPO-PeVFA, the PeVFA network V θ (s, χπ) takes as input state and policy representation χπ which has the dimensionality of 64, with the structure illustrated in Fig.7(a). We do not use parameter sharing between policy and value function approximators for more clear evaluation.
Training and Evaluation. We use Monte Carlo returns for value approximation. In contrast to conventional VFA V φ which approximates the value of current policy (e.g., Algorithm 2), PeVFA V θ (s, χπ) is additionally trained to approximate the values of all historical policies ({πi} t i=0 ) along the policy improvement path (e.g., Algorithm 3). The policy network parameterized by ω is then updated with following loss function: L PPO (ω) = −Eπ ω − min ρtÂ(st, at), clip(ρt, 1 − , 1 + )Â(st, at) , whereÂ(st, at) is advantage estimation of old policy π ω − , which is calculated by GAE based on conventional VFA V φ or PeVFA V θ (s, χπ) respectively, and ρt = πω (a t ,s t ) π ω − (a t ,s t ) is the importance sampling ratio. Note that both PPO and PPO-PeVFA update the policy according to Eq.15 and only differ at advantage estimation based on conventional VFA V φ or PeVFA V θ (s, χπ). This ensures that the performance difference comes only from different approximation of policy values. Common learning parameters for PPO and PPO-PeVFA are shown in Tab.2. For each iteration, we update value function approximators first and then the policy with updated values. Such a training scheme is used for both PPO and PPO-PeVFA. For evaluation, we evaluate the learning algorithm every 20k time steps, averaging the returns of 10 episodes. Fewer evaluation points are selected and smoothed over neighbors and then plotted in our learning curves below. Details for PPO-PeVFA. For PeVFA, the training process also involves value approximation of historical policies and learning of policy representation. Training details are shown in Tab.3. PeVFA V θ (s, χπ) is trained every 10 steps with a batch of 64 samples from an experience buffer with size of 200k steps. Policy representation model is trained at intervals of 10 or 20 steps depending on OPR or SPR adopted. Due to 1k -2k policies are collected in total in each trial, a relatively small batch size of policy is used. For OPR, Random Mask ( Fig.13) is performed on all weights and biases of policy network except for the output layer (i.e., mean and log-std). For SPR, two buffers of state-action pairs are maintained for each policy: a small one is sampled for calculating SPR and the relatively larger one is sampled for auxiliary training (policy recovery). Corresponding to Tab.1, an overall view of learning curves of all variants of PPO-PeVFA as well as baseline algorithms are shown in Fig.17. One can refer to Fig.14 for a clearer view of the effects of PeVFA (with E2E policy representation), and Fig.15, 16 for the effects of self-supervised policy representations, i.e., CL and AUX.

F.3 Visualization of Learned Policy Representation
To show how the learned representation is like in a low-dimensional space, we visualize the learned representation of policies encountered during the learning process. In total, about 6k policies are plotted for HalfCheetah-v1 (a-b) and 12k for Ant-v1 (c-d).
In each subplot, t-SNE and PCA 2D embeddings are at left and right respectively. In performance view, each policy (i.e., marker) is colored by its performance evaluation (averaged return). In process view, each policy is colored by its corresponding iteration ID during GPI process.  Figure 19: Visualizations of end-to-end (E2E) learned Surface Policy Representation (SPR) for policies collected during 5 trials (denoted by different kinds of markers). In performance view, each policy (i.e., marker) is colored by its performance evaluation (averaged return). In process view, each policy is colored by its corresponding iteration ID during GPI process.