{
  "File Number": "1089",
  "Title": "Constrained GPI for Zero-Shot Transfer in Reinforcement Learning",
  "Limitation": "Limitations and future directions. There may be some cases where the minimum rewards for source tasks i.e., rminw ’s are overly small, which could lead to less changes of both action-values and behaviors induced by the upper-bounding in Theorem 1 with Cw(s, a) = 11−γ r min w . An interesting direction to tackle the issue is to learn the minimum action-value function during the training and to use the approximate minimum value at each state-action pair as Cw(s, a) for deriving the upper bound in Theorem 1. It may allow computing upper bounds more tightly and adaptively for different state-action pairs. Also, if the learned successor features approximators have large errors even on source tasks, not only GPI but also constrained GPI’s bounding may not be meaningfully helpful. One idea to mitigate the issue is to take the uncertainty in the approximators and the approximation error term that appears in Theorem 1 into account, e.g., by using ensemble models. As an intriguing direction for future research, we could extend our constrained GPI to other non-linear forms of reward or value decompositions. It may also be interesting to make transfer with successor features and constrained GPI compatible with large-scale approaches for generalization such as [28]. We do not see direct negative societal impacts of this work.",
  "Reviewer Comment": "Reviewer_2: Strengths:\nThe resulting constrained GPI has good theoretical motivations\nIt exhibits better task generalization than GPI baselines\nWeaknesses:\nThe baselines used for comparisons are inadequate. For eg: recent works on bilinear decomposition of Q functions (bilinear value networks (Hong et al., 2022, https://arxiv.org/pdf/2204.13695.pdf)) showed improved generalization on novel tasks. Specifically, for goal condtitioned task with goal\ng\n, they choose the parameterization\nQ\n(\ns\n,\na\n,\ng\n)\n=\nϕ\n(\ns\n,\na\n)\nT\nw\n(\ns\n,\ng\n)\n(as opposed to\nQ\n(\ns\n,\na\n,\ng\n)\n=\nϕ\n(\ns\n,\na\n,\ng\n)\nT\nw\nor\nQ\n(\ns\n,\na\n,\ng\n)\n=\nϕ\n(\ns\n,\na\n)\nT\nw\n(\ng\n)\n. It would be nice to see comparisons to this bilinear decomposition.\nFurthermore, the domains (i.e. scavenger and reacher) on which the method is tested is limited. I would appreciate if authors can provide a more extensive evaluation on various goal conditioned tasks (such as the ones in fetch-gym (https://github.com/jmichaux/gym-fetch)).\nQuestions:\nRecommendation: I think this is a borderline paper and I am happy to increase my score if the authors can evaluate their method on more tasks (such as the ones in fetch-gym) and compare it to better baselines (such as bilinear value networks).\nLimitations:\nThe authors discuss the limitations of their work in Section 5\nEthics Flag: No\nSoundness: 4 excellent\nPresentation: 4 excellent\nContribution: 3 good\n\nReviewer_3: Strengths:\nThe paper addresses relevant and important open problem in RL (transfer learning).\nThe writing is clear, rigorous and the paper is easy to follow. A pleasant read!\nI found theoretical contribution to be main significant result, extending Nemecek and Parr result to about the value of an optimal policy for a new task beyond the conical hull is an important result.\nThe proposed method, constrained GPI, is an elegant way of improving GPI.\nWeaknesses: The limitations of the work are not really discussed, and no direction for future work is given. This make it difficult to gauge if the method and its guarantees would extend to more complex and large scale environments.\nQuestions:\nQuestions\nIs there a way to extend constrained GPI if the reward cannot be linearly decomposed (but an arbitrary non linear function of the features)?\nThe theoretical and empirical results presented rely on the prior knowledge of the feature vector\nϕ\n. How would constrained GPI perform with an unperfected (e.g. learned) feature vector instead?\nMinor clarifications and comments:\nIt would be helpful to spell out the different methods acronyms of figures 2 and 3 in the main text or in the caption.\nI did not understand caption of figure 2b\nLimitations:\nVery limited discussions on the limitations. In fact, I did not really understand the remark on not getting the \"full effectiveness\".\nNo negative societal impacts were reported, and I don't see any myself either.\nEthics Flag: No\nSoundness: 3 good\nPresentation: 4 excellent\nContribution: 3 good\n\nReviewer_4: Strengths:\nPaper is well communicated.\nPaper will be of interest to community working on successor features and related approaches.\nPaper introduces both theoretical grounding and empirical results.\nWeaknesses:\nIn common with a lot of work in SF, the test environments are \"toy\" and its unclear whether these approaches scale to more interesting tasks. For this reason, it may be of interest only to a smaller subset of the NeurIPS community.\nIt would be interesting to compare very different approaches, such as a conditional decision transformer [1] or GATO style policy distillation [2].\n[3] introduces an alternative method for improving the performance of GPI (in the max-ent RL framework) that reduces the generalization error and should be cited, and ideally compared against.\n[1] Chen, Lili, et al. \"Decision transformer: Reinforcement learning via sequence modeling.\" Advances in neural information processing systems 34 (2021): 15084-15097.\n[2] Reed, Scott, et al. \"A generalist agent.\" arXiv preprint arXiv:2205.06175 (2022).\n[3] Hunt, Jonathan, et al. \"Composing entropic policies using divergence correction.\" International Conference on Machine Learning. PMLR, 2019.\nQuestions:\nCould you comment on the scalability of this approach to larger domains and tasks?\nLimitations:\nYes although some comments (and ideally testing) on scaling to more complex domains would be useful.\nEthics Flag: No\nSoundness: 3 good\nPresentation: 3 good\nContribution: 2 fair",
  "abstractText": "For zero-shot transfer in reinforcement learning where the reward function varies between different tasks, the successor features framework has been one of the popular approaches. However, in this framework, the transfer to new target tasks with generalized policy improvement (GPI) relies on only the source successor features [6] or additional successor features obtained from the function approximators’ generalization to novel inputs [12]. The goal of this work is to improve the transfer by more tightly bounding the value approximation errors of successor features on the new target tasks. Given a set of source tasks with their successor features, we present lower and upper bounds on the optimal values for novel task vectors that are expressible as linear combinations of source task vectors. Based on the bounds, we propose constrained GPI as a simple test-time approach that can improve transfer by constraining action-value approximation errors on new target tasks. Through experiments in the Scavenger and Reacher environment with state observations as well as the DeepMind Lab environment with visual observations, we show that the proposed constrained GPI significantly outperforms the prior GPI’s transfer performance. Our code and additional information are available at https://jaekyeom.github.io/projects/cgpi/.",
  "1 Introduction": "For sequential decision making, deep reinforcement learning (RL) has been shown to be effective for various types of problems including games [31] and robotics [20, 22]. With such great successes, interest in multi-task RL has also surged, where its goal is to train a single agent that can efficiently solve multiple varying tasks. In multi-task RL, we focus on the transfer learning setting, where the agent learns shared structural knowledge from a set of source tasks during training, and exploits and generalizes them in new, unseen target tasks at test time.\nOne popular approach to transfer in RL is to leverage the successor features (SFs) framework [1, 6, 7, 12, 25], which transfers policies learned on source tasks to target tasks, where the tasks share the same environment dynamics but differ in their reward functions. Successor features build a representation of value functions decoupled from reward functions, and transfer to the tasks with arbitrary reward functions by taking an inner product with corresponding task vectors. They utilize generalized policy improvement (GPI) [6], which generalizes policy improvement with multiple policies and provides the performance lower bounds for GPI policies.\nHowever, GPI does not take into account any information from the smoothness of optimal actionvalue functions with respect to task vectors. Tackling this issue, Borsa et al. [12] propose universal successor features approximators (USFAs), which can estimate the optimal successor features for novel task vectors. Nevertheless, the function approximator can make high approximation errors on the task vectors, especially when the new task vectors are distant from the source task vectors. For instance, when USFAs are trained with source tasks to get close to given goals, they may not\n36th Conference on Neural Information Processing Systems (NeurIPS 2022).\ngeneralize well to the target tasks where the agent should get away from the given goals. That is, if the elements of target task vectors have the opposite signs from the source task vectors, USFAs could output successor features with high approximation errors.\nTo improve the successor features approximation of USFAs for the new tasks, we aim at bounding value approximation errors on the new target tasks. We first introduce a new theorem on bounding the optimal values for the tasks that are expressible as linear combinations of source tasks. Our theorem generalizes the conical combination condition used by the prior theorem by Nemecek and Parr [25]. Using our new bounds as constraints, we can train the successor features approximators whose action-value approximation errors on novel tasks are bounded. We extend this idea so that we accomplish a similar effect with no additional training; as a result, we propose constrained GPI as a test-time approach to bounding the approximation errors. Despite its simplicity and no need for modification to the training procedure, we empirically show that constrained GPI attains large performance improvements compared to the original GPI in multiple environments, including the Scavenger [8, 9] and Reacher [13] environments with state observations and the DeepMind Lab [7, 10, 12] environment with first-person visual observations.\nOur main contributions can be summarized as follows:\n• We present a novel theorem on lower- and upper-bounding optimal values for novel tasks that can be expressed as linear combinations of source tasks. It extends and generalizes the previous theorem for conical combinations by Nemecek and Parr [25], to enable a broader application of the bounds.\n• Based on our new theorem, we propose constrained GPI as a simple test-time approach that can improve transfer to novel tasks by constraining action-value approximation errors on new target tasks, with no modification to the training procedure.\n• We empirically show that our approach can improve the performance over the GPI baselines by large margins in the Scavenger, Reacher and DeepMind Lab environments. We also provide analyses for a better understanding of our results.",
  "2 Preliminaries": "We describe the problem setting and background on successor features and universal successor features approximators. We refer the reader to Appendix for an in-depth discussion of related work.",
  "2.1 The Zero-Shot Transfer Problem in RL": "We define a Markov Decision Process (MDP) as M ≡ (S,A, P,R, γ). S and A are the state and action spaces, respectively. P (·|s, a) defines the transition probability distribution of the next states given s ∈ S and a ∈ A. R(s, a, s′) is the reward for taking action a at state s resulting in s′, and γ ∈ (0, 1] is the discount factor. We assume that rewards are bounded. We consider the zero-shot transfer problem; as in [6], each task is defined by its task vector w ∈ Rd, and only the reward functions differ across tasks, being decomposed as\nRw(s, a, s ′) = φ(s, a, s′)>w, (1)\nwhere φ(s, a, s′) ∈ Rd is the features of (s, a, s′). We denote the set of source task vectors as T , which is used for training. At test time, we evaluate the transferred policy on each target taskw′ /∈ T with no additional update of pre-trained components. We examine both the possible scenarios: (i) the features φ(s, a, s′) are available to the agent [6, 12] and (ii) no pre-defined features are available and the agent needs to construct its own features and task vectors. We first introduce the formulation for (i) in Section 2.2 and then its variant for (ii) in Section 2.3.",
  "2.2 Successor Features and Universal Successor Features Approximators": "We now review successor features (SFs) [6] and how they are transferred to different tasks. Equation (1) allows expressing the action-value function for policy π on task w as\nQπw(s, a) = Eπ [ ∞∑ i=0 γirt+i ∣∣∣St= s,At= a] = Eπ [ ∞∑ i=0 γiφt+i ∣∣∣St= s,At= a]>w = ψπ(s, a)>w, (2)\nwhere φt = φ(st, at, st+1) ∈ Rd. Here, ψπ(s, a) ∈ Rd is called the SFs for policy π at (s, a), and taking its inner product with an arbitrary task w results in the action-value for π on w; i.e., Qπw(s, a). Thanks to the analogy between (rewards r, action-value functions Q) and (features φ, successor features ψ), the Bellman equation applies to SFs and thus they can be trained similarly to the way action-value functions are learned; e.g., Q-learning.\nThe policy improvement theorem [11] states that a new policy that takes a greedy action according to a given policy’s value function at each state performs at least as well as the original policy. Generalized policy improvement (GPI) [6] extends policy improvement to the case where the value functions of multiple policies are available. Given a task w′, a set of policies π1, . . . , πn, their action-value functions Qπ1w′ , . . . , Q πn w′ and their approximations Q̃ π1 w′ , . . . , Q̃ πn w′ , the GPI policy is defined as\nπGPI(s) ∈ argmax a max i Q̃πiw′(s, a). (3)\nBarreto et al. [6] suggest that QπGPIw′ (s, a) ≥ maxiQπiw′(s, a) − 21−γ maxi ∥∥∥Qπiw′ − Q̃πiw′∥∥∥∞. They also provide the upper bound on the suboptimality of the GPI policy as\n‖Q∗w′ −QπGPIw′ ‖∞ ≤ 2 1− γ { min i ‖φ‖∞‖w′ −wi‖+max i ∥∥∥Qπiw′ − Q̃πiw′∥∥∥∞} , (4) where each πi is an optimal policy for wi.\nWhile the GPI theorem allows the transfer of learned successor features to arbitrary tasks that share the same environment dynamics, it is limited in the following aspect. GPI uses the action-values for source tasks on target tasks based on the reward decomposition assumption (Equation (1)) i.e., Q̃πiw′(s, a) = ψ̃\nπi(s, a)>w′ for each i. However, it does not take any advantage of the smoothness of the optimal action-value functions with respect to different task vectors [12].\nTo overcome this limitation, Borsa et al. [12] introduce universal successor features approximators (USFAs). Inspired by universal value functions (UVFs) [30], they extend the original successor features with policy vectors z ∈ Rl as input to their approximators. More specifically, universal successor features (USFs) are defined to satisfy\nψπz (s, a) ≡ ψ(s, a,z) ≈ ψ̃(s, a,z), (5)\nwhere z is a policy vector for the policy πz , and USFAs ψ̃ are the learned approximators of USFs ψ. Naturally, the value functions are expressed as\nQ̃πzw (s, a) = ψ̃(s, a,z) >w ≈ ψ(s, a,z)>w = Qπzw (s, a). (6)\nEach reward function induces optimal policies, which can be encoded using the corresponding task vectors. That is, one can simply choose to define the policy vector space to be the same as the task vector space (l = d) and let z = w be a policy vector of an optimal policy for task w. Then, πw and Qπww denote an optimal policy for w and its action-value function, respectively.\nThe training of USFAs is similar to that of SFs, except for that it additionally involves sampling of policy vectors given task vectors. The update of USFAs at the k-th iteration is\nψ̃(k+1) ← argmin ψ\nEw∼T ,z∼Dz(·|w),(s,a,s′)∼µ [∥∥∥φ(s, a, s′) + γψ̃(k)(s′, a′, z)− ψ(s, a,z)∥∥∥2] (7)\nfor a′ = argmaxb ψ̃ (k)(s′, b,z)>z. Dz(·|w) is the policy vector distribution; for instance,N (w, σI) can be used for better training with diversified inputs. µ is the transition sampling distribution, which\ninvolves the GPI policy of the samples from Dz(·|w) or a replay buffer. We use gradient descent to update the parameters.\nUSFAs provide a benefit that they allow a GPI policy to use an arbitrary set of policies {πz}z∈C as πGPI(s) ∈ argmaxamaxz∈C Q̃πzw′(s, a). However, the generalization of USFAs to new policy vectors depends on a function approximator ψ, and thus if C contains policy vector(s) distant from source vectors, a GPI policy with C may have high approximation errors and perform poorly or even worse than a GPI policy with only source vectors [12], as will be demonstrated later in our experiments.",
  "2.3 Universal Successor Features Approximators with Learned φ": "For the scenario where features φ’s are not provided to the agent1, we adopt the problem formulation from Ma et al. [23] where for each task the task information g ∈ G is given to the agent. Although the task information g, unlike a task vector, cannot be directly combined with successor features for transfer to a novel task, zero-shot inference could still be possible by leveraging the information about the task.\nSpecifically, we not only perform the original learning of ψ̃ letting the task information induce policy vectors instead, but also train φ̃ and w̃ to approximate the reward decomposition with transition samples. As done in [23], we update ψ̃, φ̃ and w̃ using gradient descent to minimize Eg∼T g,z∼Dgz(·|g),(s,a,r,s′)∼µ [ Lψ + LQ ] for\nLψ := 1 d ∥∥∥φ̃(s, a, s′) + γψ̃(k)(s′, a′, z)− ψ̃(s, a,z)∥∥∥2 (8) LQ := { r + γψ̃(k)(s′, a′, z)>w̃(k)(z)− ψ̃(s, a,z)>w̃(z) }2 (9)\nand a′ = argmaxb ψ̃ (k)(s′, b,z)>w̃(k)(z) at the k-th iteration. The superscript (k) denotes the target, T g is the source task information set, Dgz(·|g) is the policy vector distribution conditioned on the task information and µ is the sampling distribution.\n3 Constrained GPI for Improved Zero-Shot Transfer of Successor Features\nTo mitigate the aforementioned issue of the possibly unlimited approximation errors of USFAs, we propose a simple yet effective method that improves the transfer of successor features by further leveraging the reward decomposition structure in Equation (1). We first present, under a more relaxed condition, lower and upper bounds on the optimal values for novel task vectors that are expressed as linear combinations of source task vectors (Section 3.1). Then, we propose a novel approach called constrained GPI, which effectively confines the approximated action-values inside the computed lower and upper bounds (Section 3.2).",
  "3.1 Bounding Optimal Values for New Tasks": "Theorem 1 of [25] provides the lower and upper bounds on the value of an optimal policy for a new task, whose vector w′ is a positive conical combination of source task vectors i.e., w′ = ∑ w∈T αww such that αw ≥\n0,∀w ∈ T and∑w∈T αw > 02. However, for a broad application of such bounds, the positive conical combination condition can be too restrictive, since the resulting bounds only apply to the task vectors that appear inside the conical hull of source task vectors.\nTherefore, we suggest a more relaxed theorem, which holds for an arbitrary task vector w′ that is expressed as a linear combination of the source task vectors i.e., w′ = ∑ w∈T αww for αw ∈ R,∀w ∈ T . Figure 1 shows an example that compares the task space coverage of conical [25] and 1One typical example presented later in our experiments is the case where the agent observes visual inputs. Then, it is not trivial to derive features that linearly decompose reward functions. 2We slightly abuse the notation and let αw denote the coefficient for vector w.\nour linear combinations. With our extended task space coverage, we can apply the bounds to more general target tasks outside of the conical hull, which will be further discussed in the next section.\nWe define πw1w2 to be an upper bound on the approximation error of Q̃ πw1 w2 for arbitrary tasks w1,w2 such that\n|Qπw1w2 (s, a)− Q̃ πw1 w2 (s, a)| ≤ πw1 w2 (s, a), ∀(s, a) ∈ S ×A, (10)\nand we present our theorem as follows. Theorem 1. Given a task vectorw′ = ∑ w∈T αww for αw ∈ R,∀w ∈ T , for all state-action pairs (s, a) ∈ S ×A, the action-value of πw′ , which is an optimal policy for task w′, on task w′ is lowerand upper-bounded as Lw′,T (s, a) ≤ Qπw′w′ (s, a) ≤ Uw′,T ,α(s, a) for\nLw′,T (s, a) := max w∈T\n[ Q̃πww′ (s, a)− πww′ (s, a) ] , (11)\nUw′,T ,α(s, a) := ∑ w∈T max { αw ( Q̃πww (s, a) + πw w (s, a) ) , αwCw(s, a) } , (12)\nfor someCw(s, a) ≤ minπ Qπw(s, a) such asCw(s, a) = 11−γ rminw where rminw is the minimum reward on w i.e., rminw = min(s,a)∈S×ARw(s, a) and α = {αw}w∈T .\nProof. For the derivation of the lower bound Lw′,T (s, a), since Q πw′ w′ is the optimal action-value function for task w′ and Qπw′w′ (s, a) ≥ Qπww′ (s, a) for arbitrary task w and state-action pair (s, a),\nQ πw′ w′ (s, a) ≥ max w∈T Qπww′ (s, a) ≥ max w∈T\n[ Q̃πww′ (s, a)− πww′ (s, a) ] . (13)\nFor the upper bound Uw′,T ,α(s, a), we use that Q πw′ w (s, a) ≤ Qπww (s, a) and Q πw′ w (s, a) ≥ minπ Q π w(s, a) ≥ Cw(s, a) for arbitrary task w and state-action pair (s, a), which leads to\nQ πw′ w′ (s, a) = ∑ w∈T αw (Q πw′ w (s, a)− Cw(s, a)) + ∑ w∈T αwCw(s, a) (14)\n≤ ∑ w∈T max {αw (Qπw′w (s, a)− Cw(s, a)) , 0}+ ∑ w∈T αwCw(s, a) (15)\n≤ ∑ w∈T max {αw (Qπww (s, a)− Cw(s, a)) , 0}+ ∑ w∈T αwCw(s, a) (16)\n= ∑ w∈T {max {αw (Qπww (s, a)− Cw(s, a)) , 0}+ αwCw(s, a)} (17)\n= ∑ w∈T max {αwQπww (s, a), αwCw(s, a)} (18)\n≤ ∑ w∈T max { αw ( Q̃πww (s, a) + πw w (s, a) ) , αwCw(s, a) } . (19)\nIn Equation (19), for each w ∈ T , the sign of αw determines which of the two terms in the max operator is used. If αw ≥ 0, the max operator selects the first term, whereas a negative αw lets the second term be used. Note that our Theorem 1 recovers Theorem 1 of [25] when w′ is a conical combination of w’s from T i.e., αw ≥ 0,∀w ∈ T . Intuitively, this theorem states the condition that the optimal action-value for an arbitrary target task must satisfy, given the optimal successor features for the source tasks. The theorem is applicable to different problems wherever bounding of optimal values is useful. One example is policy cache construction, where the agent should decide whether to reuse existing policies in the cache set or learn a new one given each new task [25]. As will be shown in the next section, we employ the bounding as a constraint on the action-values for novel target tasks, for the guidance of transfer. In Sections 4.1 and 4.2 and appendix B, we empirically show that the application of our Theorem 1 can significantly improve the performance in the cases where target tasks are outside the conical hull of source tasks.",
  "3.2 Constrained Training and Constrained GPI": "As described in Section 2.2, the universal successor features approximators (USFAs) [12] improve the original successor features so that arbitrary policy vectors, including the ones for target tasks, can be used for GPI. However, the use of arbitrary policy vectors with USFAs solely relies on the generalization power of the approximators (e.g., neural networks). Thus, the obtained successor features on novel tasks might contain high approximation errors, which could make the GPI policy perform poorly.\nOur high-level idea to tackle the issue is to exploit the reward decomposition structure in Equation (1) even for obtaining SFs for new tasks, instead of solely relying on the approximators. We employ the lower and upper bounds on optimal values from Theorem 1 to enforce the bounds on the approximate successor features. As a result, the approximation errors can be reduced by restricting the estimated optimal values to be inside those bounds around the optimal values, which can prevent the use of erroneous values during the transfer to unseen tasks.\nFor now, we will first introduce how to train the successor features approximators to output the successor features that satisfy the bounds on novel tasks. Then, we will point out that an analogous effect can be accomplished by modifying only the inference algorithm, and propose constrained GPI as a simple yet effective test-time approach to improving zero-shot transfer to novel tasks.\nConstrained training of SF approximators. In the original training of USFAs, the approximators are learned with a set of source tasks T in Equation (7). We propose to guide the training by employing Theorem 1; we impose constraints for the approximators using the lower and upper bounds on the optimal values for arbitrary linear combinations of source tasks. Specifically, for the training of USFAs, we use Equation (7) but with the following constraints:\nLw′,T (s, a) ≤ ψ̃(s, a,w′)>w′ ≤ Uw′,T ,ξ(w′,T ,s,a)(s, a) for w′ ∈ W, (20) where (s, a) is the same sample as the main objective of Equation (7). W is a set of task vectors for the constraints, which can be independent of the source task set T , and ξ(·) determines the coefficients α given a target taskw′ and T . We will explain later how to determine ξ(·). W can be any subset of the linear span of source task vectors, but practically, we randomly sample a number of vectors from the span at each update. Since the targets of the constraints are not fixed with respect to both w′ and (s, a) throughout the training, we use penalty terms (or soft constraints) that linearly penalize the constraint violations as\n1 |W| ∑ w′∈W ({ Lw′,T (s, a)− Q̃πw′w′ (s, a) } + + { Q̃ πw′ w′ (s, a)− Uw′,T ,ξ(w′,T ,s,a)(s, a) } + ) ,\nwhere {x}+ denotes max{x, 0}. The constrained training suggested above can make the approximators comply with the bounds for any tasks without requiring any additional interactions with the environment. However, it has some downsides. First, since it is a new training procedure, existing pre-trained models cannot be used. It requires some additional computational cost compared to the naive training of successor features approximators. Second, the enforcement of the constraints for training can introduce additional hyperparameters (e.g., the weight coefficient for the penalty terms). Thus, suboptimal hyperparameters may introduce either instability in the training or a decrease in the performance.\nTest-time constrained GPI. Our idea starts with the observation that in the constrained training, the learned successor features from source tasks are considered the “trustworthy” features for the constraints, because the USFAs are trained on the source tasks. Besides, only the source successor features are used for computing the constraints for all the other tasks. It implies that the learning of the source successor features better not be affected by other criteria, and more accurate source successor features would produce better constraints for other tasks with smaller errors.\nBased on the implication, we propose constrained GPI, which can not only overcome the limitation of USFAs as done by the aforementioned constrained training but also have two additional practical merits: (i) it is computationally simpler, and (ii) it is a test-time approach with no training. Simply put, we propose replacing the usual GPI policy with the constrained GPI policy as\nπCGPI(s) ∈ argmax a max z∈C\n[ min { max { Q̃πzw′(s, a), Lw′,T (s, a) } , Uw′,T ,ξ(w′,T ,s,a)(s, a) }] , (21)\nwhere the target task w′ is expressible as a linear combination of the source tasks and ξ(·) again outputs α given w′ and T as in Equation (20). C is a set of policies that we can freely choose when applying the constrained GPI.\nThe constrained GPI policy selects the actions that maximize the maximum action-values as the original GPI policy does but also caps the values with the lower and upper bound constraints derived from the source successor features. The upper bound constraint fixes the overestimation of values computed with approximate successor features for either the target task w′ or any other tasks used for constrained GPI. The lower bound constraint ensures that action-values on the target task for the greedy action selection are at least as close to the optimal target action-values as the lower bounds.\nThe approximation error terms in the lower and upper bounds i.e., πww′ (s, a) and πw w (s, a) in Theorem 1 could be ignored in practice, as long as the approximation errors of the source successor features are sufficiently small. Also, we can obtain the tightest upper bound by defining ξ(·) as\nξ(w′, T , s, a) := argmin {αw}w∈T Uw′,T ,{αw}w∈T (s, a) subject to w ′ = ∑ w∈T αww. (22)\nThe objective Uw′,T ,{αw}w∈T (s, a) is the sum of the piecewise linear functions. Thus, Equation (22) can be solved with linear programming.\nWe observe that using the lower bound constraint with Lw′,T (s, a) is equivalent to including the successor features for source tasks in the input to the constrained GPI; i.e., T ⊆ C. Also, since Lw′,T (s, a) ≤ Uw′,T ,ξ(w′,T ,s,a)(s, a), there would be no difference between GPI and constrained GPI when C = T . Thus, in our experiments, we mainly use C = {w′}, which is equivalent to using C = T ∪ {w′}.",
  "4.1 Scavenger Experiments": "We start our experiments in the Scavenger environment [8, 9], which can assess our approach with minimal influence from external causes. In Scavenger, the agent is positioned at one of the cells in a G×G grid, and the goal is to maximize the return by collecting objects. Both the agent and objects are spawned at random locations, and there are d classes of objects where the class determines the value of the reward. The state space is S = {0, 1}G×G×(d+1), where the first d channels describe the current locations of the objects on the map and the last channel specifies the walls where the agent cannot go and objects do not appear. There are four actions available: A = {UP, DOWN, LEFT, RIGHT}, and the agent picks up an object by visiting the cell of the object, which spawns a new object of a random class at a random location. The feature φ(s, a, s′) ∈ {0, 1}d is a one-hot vector whose element represents whether the agent picks up an object of that type or not within the transition. The task vector w ∈ Rd determines the reward values for the d different classes of objects. Please see Barreto et al. [9] for the full details.\nWe evaluate the zero-shot transfer performance of different approaches i.e., we first train USFAs as proposed in [12], and measure the performance of GPI and constrained GPI policies that use the same set of USFAs on target tasks with no further policy updates. We set G = 11 and use 20 objects in total with the different numbers of classes; d = 2 and d = 4. With d = 4, we also test the USFAs that are learned with the constrained training for a comparison. We use the standard basis vectors of Rd as the set of source tasks as done in [12], and evaluate agents on the set of target tasks defined by {−1, 1}d. Therefore, all the target tasks except for the all-ones vector 1 are not covered by the conical hull of source tasks, which requires Theorem 1 for bounding of values.\nWe train eight USFAs agents for 1M steps, and evaluate them on each target vector 10 times with a fixed set of 10 random seeds. To be invariant to the reward scale differences between different tasks, we normalize the scores (or returns) from the environment by the minimum and maximum scores with respect to all the agents’ evaluation episodes on each task.\nFigures 2 and 3 compare the performance of the USFAs agents with GPI and constrained GPI for exploitation, following the evaluation scheme suggested by [2]. Although they use the same set of trained USFAs, the constrained GPI brings a notable performance improvement in comparison with the original GPI. Also, Figure 3 suggests that the constrained GPI, the test-time method, can match\n0.40 0.45 0.50\nCGPI-T (ours) CT (ours) + GPI-ST\nCT (ours) + GPI-T CT (ours) + GPI-S\nGPI-ST GPI-T GPI-S\nMedian\n0.36 0.40 0.44 0.48\nIQM\n0.42 0.45 0.48\nMean\n0.51 0.54 0.57 0.60\nOptimality Gap\nNormalized Score\n(a) All\nMedian\nIQM\nMean\nOptimality Gap\nor even outperform the agents learned with the constrained training. One possible explanation is that the constrained training might experience some instability in learning depending on the choice of the hyperparameters, as described in Section 3.2.\nIn the first and the second columns of Table 1, we present the proportions of the action-values that are changed by the lower and upper bounds of the constrained GPI, measured for the evaluation on Scavenger. The third column shows the proportions of resulting greedy actions changed by them. It implies that USFAs i.e., the function approximators of successor features, may not satisfy the optimal value bounds presented in Theorem 1, and applying the bounds could change a fair proportion of greedy actions to improve the performance.",
  "4.2 DeepMind Lab Experiments with Learned φ": "For evaluation of our approach in a more complex and realistic setting, we employ DeepMind Lab [7, 10, 12] and conduct experiments in a first-person view 3D environment. In a single room, a goal object is placed arbitrarily, and the objective is to reach the goal before the episode ends where its location changes between tasks. Figure 4 shows an example scene that the agent sees with the goal object in red.\nAt every time step, the agent observes an 84 × 84 × 3 image from the environment and outputs one of 45 possible actions, which include 5, 3 and 3 choices for LOOK_LEFT_RIGHT_PIXELS_PER_FRAME, STRAFE_LEFT_RIGHT and MOVE_BACK_FORWARD controls, respectively. Since observations are in the firstperson view, the goal object may not be seen by the agent, which makes transfer given the task information g critical to the success of the tasks. In each task, we divide the room into an 11× 11 grid and place the goal object in one of the cells. The task information g is a two-dimensional vector that contains the coordinate of the goal in the grid. Starting at the center of the room, the agent receives a reward of one if it reaches the goal within the episode horizon or no rewards otherwise. Therefore, the reward functions are sparse.\nFor these experiments where the agent observes rendered images rather than the underlying states, it may not be viable to define features φ’s and task vectors w’s that linearly decompose reward functions. Therefore, we train agents with the learning of φ̃ and w̃ from samples from the source tasks with d = 2 as described in Section 2.3.\nInspired by Hong et al. [18], we examine zero-shot transfer with the GPI and constrained GPI using two transfer settings: “left-to-right” and “near-to-far”. In the “left-to-right” setting, the agent is trained on the source tasks whose goals are sampled from the left half of the room and is tested on the target tasks with goals from the right half. In the “near-to-far” setting, the source tasks have the goals within an L∞ = 2 distance from the center of the room, and target tasks set the goals farther than L∞ = 2.\nFor each setting, we train eight USFAs agents with different seeds for 3M environment steps on the source tasks and test them on the target tasks. Figure 5 presents the comparison of the GPI with\ndifferent C’s and the constrained GPI. Leveraging the same set of trained USFAs with learned φ̃ and w̃, the constrained GPI outperforms the GPI with the three C’s in both settings by a notable margin. Another observation is that the trained USFAs agents seem to overfit more to the source tasks in the “near-to-far” setting compared to the “left-to-right” setting. It makes the performance on the target tasks much worse. Nonetheless, the constrained GPI is still helpful in such overfitting situations.",
  "5 Conclusion and Discussion": "We presented constrained GPI, a simple yet effective test-time approach for transfer with approximate successor features. We first focused on the issue that although universal successor features approximators (USFAs) exploit the smoothness of optimal values across different tasks, their approximation errors on novel target tasks could be large especially when those tasks are quite distant from source tasks. Thus, we introduced a theorem about lower and upper bounds on the optimal values for novel task vectors that belong to the task vector space linearly spanned by the set of source task vectors, relaxing the conical combination condition used for the theorem by Nemecek and Parr [25]. We proposed a constrained training scheme making use of those bounds for reducing the action-value errors of the learned approximators on novel tasks. We then suggested constrained GPI that uses the bounds at test time to achieve an analogous effect, allowing the use of previously trained models. We empirically showed that this test-time approach can improve the zero-shot transfer performance by a large margin in multiple environments.\nLimitations and future directions. There may be some cases where the minimum rewards for source tasks i.e., rminw ’s are overly small, which could lead to less changes of both action-values and behaviors induced by the upper-bounding in Theorem 1 with Cw(s, a) = 11−γ r min w . An interesting direction to tackle the issue is to learn the minimum action-value function during the training and to use the approximate minimum value at each state-action pair as Cw(s, a) for deriving the upper bound in Theorem 1. It may allow computing upper bounds more tightly and adaptively for different state-action pairs. Also, if the learned successor features approximators have large errors even on source tasks, not only GPI but also constrained GPI’s bounding may not be meaningfully helpful. One idea to mitigate the issue is to take the uncertainty in the approximators and the approximation error term that appears in Theorem 1 into account, e.g., by using ensemble models. As an intriguing direction for future research, we could extend our constrained GPI to other non-linear forms of reward or value decompositions. It may also be interesting to make transfer with successor features and constrained GPI compatible with large-scale approaches for generalization such as [28]. We do not see direct negative societal impacts of this work.",
  "Acknowledgements": "We thank the anonymous reviewers for their valuable comments. This work was supported by Samsung Advanced Institute of Technology, and Institute of Information & communications Technology Planning & Evaluation (IITP) grants funded by the Korea government (MSIT), including (No.20190-01082, SW StarLab), (No.2022-0-00156, Fundamental research on continual meta-learning for quality enhancement of casual videos and their 3D metaverse transformation), and (No.2021-0-01343, Artificial Intelligence Graduate School Program (Seoul National University)). Jaekyeom Kim was partly supported by Google PhD Fellowship. Gunhee Kim is the corresponding author.",
  "Reviewer Summary": "Reviewer_2: The paper notes that Universal successor feature approximators (USFA)\nψ\n(\ns\n,\na\n,\nz\n)\n(here\nz\nis the policy vector) exploits the smoothness of optimal value functions across different tasks but its approximation error could be large when target task vectors are far away. To improve generalization to a new task\nw\n(which can be expressed as a linear combination of source tasks), the paper proposes constrained training of successor features that reduces its approximation error on the new task. It then shows that a similar effect can be achieved by using similar constraints at test time without changing the training of the successor features. The proposed method is able to improve task generalization on scavenger and reacher domains.\n\nReviewer_3: The paper looks at the problem of transfer in reinforcement learning from source tasks to target tasks when the reward signal changes across tasks but the state and action spaces remain the same. Authors address a limitation of a current approach in this setting: GPI with universal successor features approximators (USFAs). The works argues that USFAs can make high approximation errors on test targets if their solutions are distant from the source targets' ones, and proposes a solution to mitigate this limitation.\nThe solution involves constraining the approximation action-value error on new target task, using a lower and upper bounds introduced in the paper. The experiments show a zero-shot transfer improvement in performance compared to baselines (USFA + GPI) on synthetic scavenger tasks and robotic locomotion tasks.\n\nReviewer_4: Successor Features / Generalized Policy improvement provide a method for generalizing to new tasks that are a linear combination of existing tasks. USFA combine this approach to generalization with neural networks with also generalize by training function approximators conditioned on the task.\nThis work extends USFAs by showing that one can establish lower and upper bounds on the generalization performance. When estimating action-values on a new task, these bounds are used to constrain the function approximator estimate.\nThey test this approach (comparing to USFAs) on two simple environments and find using these constraints outperforms USFAs."
}