Causally Correct Partial Models for Reinforcement Learning

Danilo J. Rezende, Ivo Danihelka, George Papamakarios, Nan Rosemary Ke, Ray Jiang, Theophane Weber, Karol Gregor, Hamza Merzic, Fabio Viola, Jane Wang, Jovana Mitrovic, Frederic Besse, Ioannis Antonoglou, Lars BuesingarXiv 2020

TL;DR

This paper tackles a critical issue in model-based reinforcement learning (MBRL): partial models, which only predict a subset of future observations, can lead to causally incorrect planning due to confounding variables. The authors introduce a novel family of "causally correct partial models" (CPM) that are provably robust to policy changes and significantly improve planning performance, especially in stochastic environments, without the computational burden of full models.

What Problem Does This Paper Address?

Model-based reinforcement learning (MBRL) agents learn a model of their environment to predict future states and rewards, enabling them to plan optimal actions. However, modeling high-dimensional observations (like images) is computationally expensive and often intractable. To circumvent this, researchers have developed "partial models" that predict only a subset of observations. The core problem this paper addresses is that these partial models, by design, ignore certain parts of the environment's state. This omission can lead to a causal fallacy: the model learns correlations rather than true causal relationships, making it susceptible to errors when the agent's behavior policy changes. This can result in suboptimal or even incorrect planning, as the model is "confounded" by the unmodeled observations.

Methods

The authors propose a general family of "Causally Correct Partial Models" (CPM). The key innovation lies in identifying and leveraging a "backdoor" variable within the agent's computational graph. This backdoor variable, chosen to be conditionally independent of the agent's internal state given the partial view, effectively breaks the confounding path. By conditioning the partial model on this backdoor variable (e.g., the "intended action" before exploration), the model becomes causally correct. This means its predictions remain accurate even when the agent's behavior policy changes. The paper provides theoretical derivations and empirical validation, showing that CPMs can be trained efficiently and lead to more robust planning, particularly when combined with search algorithms like MCTS.

Datasets

The paper uses several environments for training and evaluation:

  • FuzzyBear MDP: A simple, illustrative Markov Decision Process (MDP) used to demonstrate the core concepts of causal correctness and the pitfalls of non-causal partial models.
  • AvoidFuzzyBear MDP: An extension of FuzzyBear with an additional "stay home" option, used to test planning under sub-optimal policies.
  • MiniPacman: A 2D environment used to evaluate learned models with search algorithms like Expectimax and MCTS.
  • 3D T-Maze Environment: A visually rich 3D environment used to demonstrate the effectiveness of CPMs in complex, high-dimensional settings.

Key Insights and Ideas

  • Partial models are causally incorrect: Ignoring parts of the observation creates confounders, leading models to learn spurious correlations instead of causal relationships. This is a fundamental issue that impacts planning robustness.
  • Backdoor variables are key: By identifying and incorporating a suitable backdoor variable (e.g., intended action) into the partial model, we can break the confounding path and achieve causal correctness.
  • Causal correctness enables robust planning: CPMs allow agents to plan effectively under new policies, unlike non-causal partial models which can become overly optimistic or pessimistic.
  • Efficiency is maintained: CPMs achieve causal correctness without the need to model the entire observation space, thus retaining computational efficiency.
  • Intended action as a backdoor: Using the intended action (before exploration) as the partial view is a practical and effective choice for CPMs, especially in discrete action spaces, as it provides a low-dimensional, informative backdoor.

Key Results

  • Improved Planning in MDPs: In the FuzzyBear MDP, CPMs consistently produced more realistic and achievable optimal values compared to non-causal models, especially when learning from sub-optimal policies. Non-causal models showed unrealistic optimism.
  • Enhanced Performance in Search: When combined with search algorithms like Expectimax and MCTS on MiniPacman, CPMs led to significantly better performance (higher rewards) than non-causal models.
  • Robustness to Policy Changes: Experiments showed that CPMs maintain their performance and predictive accuracy even when the behavior policy used for training differs from the policy used for evaluation.
  • Qualitative Improvements in 3D Environments: In a 3D T-Maze, CPM rollouts were more realistic and aligned with the environment's dynamics, correctly predicting the presence or absence of food, whereas non-causal models exhibited over-optimism.

Limitations and Future Work

  • Scope of Interventions: The proposed CPMs address correctness with respect to changes in the behavior policy. However, they do not yet address robustness against other types of environmental interventions. Future work will explore these aspects.
  • Choice of Backdoor: While the paper suggests several choices for the backdoor variable (e.g., intended action, policy probabilities), identifying the optimal backdoor in complex environments might require further investigation.
  • Model Complexity: For very high-dimensional states, learning the distribution of the backdoor variable $p(z_t|h_t)$ might still be challenging.
  • Generalization to Other Interventions: The authors plan to explore how CPMs can be extended to handle a broader range of interventions beyond policy changes.

Summary updated

BibTeX
@misc{rezende2020causally,
  author = {Danilo J. Rezende and Ivo Danihelka and George Papamakarios and Nan Rosemary Ke and Ray Jiang and Theophane Weber and Karol Gregor and Hamza Merzic and Fabio Viola and Jane Wang and Jovana Mitrovic and Frederic Besse and Ioannis Antonoglou and Lars Buesing},
  title = {{Causally Correct Partial Models for Reinforcement Learning}},
  year = {2020},
  eprint = {2002.02836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.02836},
}
Figure