Venue: NeurIPS 2021 Conference

Reviews:

final_score: rating: 6: Marginally above the acceptance threshold
review_content: summary: The paper considers the problem of generalization in contextual MDPs, where the state of the environment consists of a context that remains fairly constant throughout an episode of the MDP. In such a setting the problem of generalization arises when an RL agent learns on a set of training MDPs (MDPs with contexts sampled from a set of training contexts) and then this trained RL agent must perform well on an unseen context test MDP. This paper underlines the challenges of learning and generalizing in such settings, namely, that methods that are not able to handle epistemic uncertainty fail at generalizing in such settings. The paper formulates this problem of generalization as a special POMDP and proposes a new sampling-based method for approximately solving this POMDP. Experimental results show that the proposed methods beats other baselines on a benchmark suite. 
main_review: Originality: To my knowledge the paper is original

Clarity: The paper is clear and well-written

Significance/Contributions: I think the paper makes significant theoretical, algorithmic and experimental contributions. It highlights the challenges of generalization for an RL agent and formulates the problem as a POMDP, then proposes a new method based on optimizing a proven lower bound on the original objective. The experiments are supportive of the method's ability to generalize on a benchmark suite. 

Relevance: Generalization in RL is an important problem to Neurips community and I think the paper is relevant to the Neurips community.

Comments: 
- The paper presents a very nice zookeeper example as motivation. Next, the paper also presents a very convincing RL as a classification task as an example. I was looking forward to see the results on the RL as a classification. I dont understand why the paper decided to experiment on a separate benchmark suite. It would have been interesting to see the performance of RL algorithm on the fashion MNIST classification task and to see if the proposed methods is able to come up with a policy that behaves as desired (that is after making an incorrect prediction first the agent changes its prediction) 
I think this is a major weakness of the paper since this exactly is the argument used by the paper to show that shortcoming of the current state of the art RL methods. Once this shortcoming is highlighted it is natural for the reader to expect that proposed method will address these shortcomings, but the paper fails to deliver on that. 

- Epistemic POMDP: What exactly are the key features of an epistemic POMDP that separates it from the a usual POMDP. Is it s sub-class of a general class of POMDPs or a super-class? A minor point here is that it seems that epistemic POMDP has an underlying policy where the agent predicts the hidden state of the world, specifically for the RL as a classification task. There already exists a class of POMDPs: POMDP with Information reward (and rhoPOMDP) that specifically address this issue. The paper might want to cite and contrast this sub-class of POMDPs. 

- I find it a bit surprising that in the experiments a very small value of n = 4 is used. In general, it is normal to use a large value of n for an ensemble method. It would have been nice to see how n matters for this method, even if not on a big deep RL task, but on a small task. 

- The paper also introduces a new parameter $alpha$ that balance the trade-off between generalization and overfitting on a context MDP. How to determine this hyperparameter. Experiments studying these hyperparameters are also missing. 


limitations_and_societal_impact: The main limitation of the paper is that it highlights a weakness in the existing method, but then lacks experiments to support that motivation that the proposed method addresses these weaknesses. The paper currently is applied on a benchmark suite of games which I feel does not have a big negative societal impact.
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: The paper investigates the topic of generalization in reinforcement learning. It starts from the observation that even in fully observed environments, a kind of partial observability arises from epistemic uncertainty about the true MDP the agent faces at test time. This observation gives rise to what the paper calls an epistemic POMDP, which has the property that expected return in the epistemic POMDP equals test time agent performance in expectation over the posterior distribution of MDPs (given the prior is accurate). 

This insight is used to point out that, being a POMDP, the optimal policy of the epistemic POMDP is in general memory-based, and in the class of memoryless policies, stochastic. In the same vein, even a policy that is optimal on all training contexts can have very poor generalization performance, and the optimal policy for the epistemic POMDP might not be optimal in any single MDP.

The remainder of the paper focuses on memoryless policies in the empirical epistemic POMDP, where the latter arises from a finite number of samples from the MDP posterior. It is shown that one can lower-bound the performance of an ensemble of policies on the empirical epistemic POMDP by their average performance minus a disagreement penalty to the combined policy \pi and that optimizing this bound gives the optimal policy for the empirical epistemic POMDP.

Based on these insights, the paper proposes a practical algorithm (LEEP) that combines bootstrap sampling from the training contexts, choosing max for combining the individual policies, PPO as the base algorithm, and the derived regularization term into an algorithm where the n individual policies are optimized in a round-robin fashion.

The proposed algorithm is evaluated on the procgen benchmark, where it compares favorably to pure PPO and Distral. The algorithm is also shown to avoid overfitting when only few training contexts are available. Finally, an ablation study shows that both the agreement penalty term and the max link function contribute to the performance advantage of LEEP.
main_review: First up, I would like to congratulate the authors on their clear writing. The paper is very easy to follow and especially the first half of the paper is a really enjoyable read. The topic of the paper, generalization, is important to the community and, as far as I know, the challenges faced in generalization settings have not been spelled out this clearly previously.

The paper is split into two parts - a motivational overview part up to and including page 6, while the remaining three pages propose a concrete algorithm based on theoretical insights and evaluate it in experiments.

For me the first half leaves little to be desired. Examples are clearly motivated and illustrative. Using a POMDP perspective to study generalization is an interesting perspective. My only nit-pick would be that the difference to Bayesian RL is over-emphasized. In particular in line L217 the paper seems to imply that Bayesian RL methods are not appropriate because they typically evaluate performance over multiple episodes. However, showing that a method performs well over multiple episodes does not imply that it doesn't on a single one.

The second part suffers as a consequence of the limited space and moves at a fast pace. One large concern is that it seems to me that Proposition 6.1 is over-interpreted. My understanding of (4) is that for any two policies $| J(\pi) - J(\pi_i) | \leq \alpha \mathbb{E}[\mathrm{KL}(\pi, \pi_i)]$. That is, any improvement that a policy $\pi_i$ could have over $\pi$ is smaller than the scaled, average KL. While this is a good motivation for trust-regions, in Proposition 6.1 this is exploited to conclude that by training on (5) we get a Bayes-optimal policy for the epistemic POMDP. However, from my understanding the only reason that we retrieve the optimal policy for the epistemic POMDP is that any improvement on $J_{M_i}(\pi_i)$ by having $\pi_i$ deviate from $f({\pi_i})$ is necessarily smaller than the penalty term. As such, Proposition 6.1 does not make a statement about generalization, but a statement about the strength of the constraint and is largely equivalent to solving $\mathrm{argmax}_{\pi_i} sum J_{M_i}(\pi_i)$ subject to the constraint $\pi_i = f({\pi_i})$. It would be great if the authors could comment on this as part of their rebuttal, since it is a key part of the motivation for LEEP.

A critical component of LEEP seems to be the bootstrap sampling of the contexts. However, the discussion is limited to a single paragraph and there is no ablation study to determine its impact. It would be valueable to elaborate on the importance of this sampling and how the choice $n=4$ for the number of policies impacts experiments.

In general, the experiments focus mostly on a comparison with PPO. While this is in line with the main story about generalization, it would be really interesting how other methods cope with this setting to get an intuition of what the performance limits are here. E.g., including domain randomization (with access to more samples than the finite count) and stateful policies would be very valueable to determine the relative performance of LEEP and how much is (not) lost by focusing exclusively on static policies. After motivating stateful or stochastic policies, it would be great to see the tradeoff analyzed in more detail as part of the experiments. I also find it curious that a method like Distral performs worse, given its similarities to LEEP. Could you hypothesize about why this happens / what the crucial difference is? 


### Summary

In summary, I really like the presentation and perspective in the first half, but unfortunately this comes at a cost to the amount of information provided in the second part that proposes an algorithm. I would encourage the authors to trim down the first half (e.g., removing the otter example and focus on the example in Sec. 4) in order to give more room for explanations/interpretations in the second half of the paper. While I do have some concerns about the theoretical motivation and the depth of the experiments that will hopefully be addressed as part of the author feedback, I still think this could make a good paper for NeurIPS.


### Minor & notational comments

- There is some notational confusion between \mathcal{M} and M. In the remainder of the notation sets/spaces are caligraphic, while instances are not, while for the MDP it is flipped. Also in 5.1 \mathcal{M} is defined as a single MDP, while in 6.2 \mathcal{M}_i is a distribution over MDPs. Being clear about what is meant where and being notationally consistent would make the paper more accessible.
limitations_and_societal_impact: Limitations are adequately presented, although it might make sense to be explicit in Proposition 6.1 that "optimal" means "optimal memoryless". 

As a very general problem class, RL can be used for both benign and nefarious purposes. Better generalization would make RL better suited for both, but there don't seem to be any points that particularly emphasize the latter.
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: The paper addresses the problem of a reinforcement learning generalizing across different dynamics (with the same state/action space). Specifically, the paper frames this problem as a POMDP, where the properties of the environment are encoded as hidden information. An algorithm LEEP is introduced, which learns different policies for different sampled environments, regularized to make the policies similar, and then combines the policy into a single, hopefully robust policy.

main_review: ---Update After Author Response---

Much of my original review can be safely ignored, as I had a significant misunderstanding of the premise of the work. It is still included below for the sake of transparency. I have since carefully read the other reviews, the authors' responses to all reviews, and I have carefully re-read the paper.

I now understand that the novel contribution of this paper is the development of a special case of Bayesian RL to the problem of generalizing to unseen states in an MDP. The main insight is that, when the agent has insufficient evidence to extrapolate its policy to unseen states, the agent effectively faces a partially observable problem where the partial observability results from the distribution of possible dynamics at the unknown state, based on the observed evidence. This is indeed, as far as I know, a clever and novel formulation of this issue. For instance, it happens to retroactively justify the common practice of random tie-breaking for action selection. In many typical implementations, if a state is completely unknown, with Q-values all 0, then the agent will act uniformly randomly, which this framework may very well recommend from a more principled position.

Based on my initial confusion, I think I am qualified to suggest that the authors take great care in distinguishing their setting from the better studied setting of generalizing with unobserved context. Even in my re-read, I got tripped up in places and had to take some time to figure out how to reconcile what I was reading with what I understood to be the premise. I think one place where this is particularly important are in Section 5.1, where I think some bigger ballyhoo could be made of the fact that there is only one underlying MDP, that context is observable, and that this distribution is purely a result of the agent's beliefs about the dynamics of that one MDP. Another place where I got tripped up was in Section 4. For a bit I was not sure that the problem is actually fully observable -- I thought that perhaps the fact that the agent has already taken a particular action and received some feedback should be contained in the state description. It took me some time to convince myself that, in the traditional MDP formulation, this problem is simply multiple disconnected single state loops. Perhaps just a diagram of this MDP would make this more immediately clear to readers like myself?

Beyond that, I think the current discussion between the authors and the other reviews covers other suggestions I would make.

---Original Review Below---

---Originality---

This is the area that I am most concerned about with this paper. There are two main contributions here: describing the dynamics generalization problem as a POMDP and the LEEP algorithm. Neither one of them seems particularly novel. 

While I can't off the top of my head point to a specific paper that explicitly formulates the generalization problem as a POMDP, it is my impression that it is pretty common to represent the "context" as hidden information. As one example, in "Context-aware Dynamics Model for Generalization in Model-Based Reinforcement Learning" (Lee et al. 2020) they learn a dynamics model that attempts to extract hidden/latent contextual information from recent history and then to use that contextual information to inform decision-making and predictions. They cite prior work that operates on similar ideas and there may be follow-up work as well. They narrow their focus to this particular setting of hidden contextual information, and give that special case its own name (CaDM) rather than casting it in the much broader POMDP framework, but it seems to me that the insight gain from the presentation in this paper is minimal.

The paper seems to suggest that casting this problem as a POMDP offers novel insight into how difficult the dynamics generalization problem is. It even goes so far as to say that there was an "open question" about whether it is difficult to generalize to new dynamics in RL and that this paper provides the answer. I don't find that to be the case. Again, existing work addressing this problem already treats context as hidden state information and already learns policies that are history dependent or stochastic, so noting that this may be necessary seems like old news.

Furthermore, in this paper the formulation as a POMDP doesn't seem to actually go very far. If I am understanding correctly, LEEP is still learning a memoryless policy and does not do any of the Bayesian reasoning about the hidden information that a solution to the POMDP would do. Existing work (e.g. that Lee et al. paper above) seems to already attack this in a more sophisticated way, where the policy can react and change when recent observations offer evidence about what context it might be operating in.

LEEP itself is, as the paper acknowledges, very similar to existing multi-task RL and meta-RL approaches. In a vacuum, I think LEEP does not really add much to what is already out there. The paper suggests that LEEP is notable because it is motivated by this POMDP formulation, but, again, that connection seems tenuous at best.

So I am not sure what this paper substantively adds to the body of work already out there on dynamics generalization in RL. If I am underestimating the novel contribution, then I think the paper needs to be far more explicit about contrasting this formulation/approach with similar, existing ideas.

---Quality---

I don't detect any technical flaws in the theoretical work and the experiments seem well-designed.

As described above, I do think the connection between the POMDP formulation and the algorithm itself is overstated. I don't really see where in this algorithm POMDP-ish inference is supposed to be occurring. For instance, the way the final policy is construction from individual policies is not really ever justified, especially not as a policy that would be suitable for this POMDP.

The experiments do a good job of empirically answering the questions posed. However, a big remaining empirical and conceptual question mark is what are LEEP's relative strengths and weaknesses, compared to existing approaches that aim to improve dynamics generalization in RL?

---Clarity---

I found the paper to be well-written and clearly presented.

---Significance---

Given that I don't see a lot of novel insight in this paper, and given that the algorithm is not adequately contextualized in the related literature on this problem, I would say that the likely impact of this paper would be low.

---Summary of the Review---

The paper is well-written and technically sound, but it seems to me that its main contributions and insights are not sufficiently novel with respect to work already published in this area.

limitations_and_societal_impact: The paper does not discuss negative societal impact, but I do not expect this work to have significant societal impact in the foreseeable future.
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: * This paper uses the insights from Bayesian RL to solve the problem of generalization in RL. In particular, the authors formulated the generalization problem as an epistemic POMDP and proposed an ensemble-based algorithm, called LEEP, to approximately solve the problem.

* The authors empirically demonstrated the performance of LEEP in generalizing to unseen contexts in the Procgen benchmark. They have shown that:
  * LEEP performed better than PPO in Maze, Heist, BigFish, and Dodgeball.
  * An ablation study to show that the better generalization performance of LEEP does not only come from the use of ensembles.
  * An ablation study to show that the better generalization performance of LEEP does come from the inductive bias conferred by the `max_i π_i` link function proposed by the authors.

main_review: * This paper proposes a novel problem: the problem of generalization in RL.
  * This problem is closely related to the problem of *Bayesian RL*.
  * However, the difference is that in the authors' problem, the RL agent is **not** allowed to update its belief / posterior after collecting new data. By contrast, a Bayesian RL agent updates its belief / posterior at every iteration.
  * Therefore, Bayesian RL focuses on improving the performance in unseen situations by optimally trading off between exploration vs. exploitation. In contrast, the authors' problem focuses on improving the performance in unseen situations by **exploitation only**.
  * Based on this problem definition, the authors proposed an algorithm to train a policy in a certain way such that this policy can do well in unseen situations even **without any exploration**.


* I think the problem formulation and the algorithm are sound.
  * In line 105, the authors briefly discuss the similarity between domain randomization and the proposed approach. It could make the paper stronger to compare the proposed algorithm with domain randomization in the Procgen benchmark.
  * In line 78, the author says that `Our work highlights the importance of not only (1) finding ways to help neural networks in RL generalize better, but also (2) on learning policies that degrade gracefully when the underlying neural network eventually does fail to generalize.`
    * I am not sure about the difference between (1) and (2). If they are indeed different, has (2) been demonstrated in the results? (it is clear that (1) has been shown in the results).



* I have not seen many other works solving this problem.



limitations_and_societal_impact: * I was very confused at the beginning about the difference between this paper and Bayesian RL. Assuming that my understanding of this paper is correct, I think the writing could be improved. Here are my comments:
  * It might be helpful to have a clear paragraph about the `problem definition` of this paper. I have found it confusing between Bayesian RL and the problem that this paper is focusing on.
  * Line 29-45: the `zoo` example conveys the drawback of empirical risk minimization. I understand that the `map` represents empirical risk minimization. However, I am not sure what `peeking through the window` represents? The `anti-empirical risk minimization approach`?
  * Line 29-45: the `zoo` example is good. However, it is an analogy for supervised learning rather than an analogy for RL. Considering that this paper is doing RL, it might be better to use an analogy for RL.
  * Sec. 4 and Fig. 1: the authors try to explain why standard RL methods could fail to generalize. However, the example problem of shoe classification is a contextual bandit problem rather than an MDP problem. Since the authors mentioned `MDP` multiple times in Sec. 4, it might be better to give an example of an MDP rather than a bandit.
  * Sec. 4 and Fig. 1: When I first read Sec. 4 and Fig. 1, I was very confused.
    * Given that methods like UCB can solve bandit problems, when I first read it, I didn't understand why the author said `more sophisticated MDPs that use uncertainty estimates in their construction.` Later on, I understood that the authors are solving a different problem from the problem that UCB is trying to solve.
    * Therefore, I think this section could be clarified a bit to avoid this confusion.
  * Line 228-237: again, I think this is a bandit problem, not an MDP problem.
  * Line 228-237: in this paragraph, the authors use terms like `Bayes-optimal,` which is very confusing to me at first.
    * `Bayes-optimal` refers to optimally solving the trade-off between exploration and exploitation. However, in the problem that this paper is focusing on, there is no exploration.
      * It is very confusing to see `bayes-optimal` and `a = argmax p(y | x, D);` together. Because in Bayesian RL and bandits, `a = argmax p(...)` usually refers to a greedy heuristic to **approximate** the bayes-optimal policy, e.g., UCB. So `a = argmax p(...)` is **not** bayes-optimal.
    * I think maybe the author could define a new concept of optimality for the generalization problem formulated in this paper, rather than using terms in Bayesian RL.
  * Line 228-237: again, the term `POMDP` makes me confusing at first, too.
    * In a POMDP, the belief (or posterior) is updated at every iteration when a new observation comes. However, in the problem formulated in this paper, no exploration (active information gathering) is allowed, and the belief is not updated at all during testing. Thus, I am not sure whether `POMDP` is the correct term. Maybe the authors could use `POMDP` and clarify this point.
  * Line 236: the authors use the word `memoryless` without defining it. I figured it out by reading the appendix. It would be better to define it in advance.
  * Eq. 6: is the policy gradient in Eq. 6 solving the optimal problem? So after convergence, will we get the optimal solution to Eq. 5? It might be better to clarify.


* Minor
  * Line 78: `but also on learning` - `on` is unnecessary.
  * Line 132: `dπ(s) = (1−γ)...` - I don't understand why `(1−γ)` is there (I could be wrong).
  * Line 212: extra space in the beginning.
  * Line 216: extra space in the beginning.
  * Line 233: It might be better to use a larger symbol for the indicator function.

* I didn't check the proofs in Appendix.


# Post-rebuttal
Thank you for your clarification! Now I think the paper is clearer in my mind and I appreciate it more! I have raised my score by 1 point.
review_title: null

Meta-review: The paper provides a conceptually interesting perspective on dynamics generalization in RL by drawing a connection to a special subtype of the Bayesian RL formalism. The work's experiments got sufficiently beefed as a result of the discussion with the reviewers, and now the paper is strong both from the conceptual and empirical standpoints. It is important that the authors pay special attention to incorporating the clarifications they gave in response to reviewers' questions into the final paper version. The paper's impact will heavily depend on its clarity and its success in ensuring that readers will see the distinction of the paper's model from general Bayesian RL, something that initially confused several reviewers.
Decision: Accept (Poster)