Deconfounding Reinforcement Learning in Observational Settings

Chaochao Lu, Bernhard Schölkopf, José Miguel Hernández-LobatoarXiv 2018

Abstract

Standard Reinforcement Learning (RL) typically assumes an online setting where an agent learns through direct interaction with an environment. However, in sensitive domains like healthcare or finance, learning must often occur from historical observational data. Such data frequently contains unobserved confounders that influence both actions and rewards, leading standard RL algorithms to learn biased, suboptimal policies. This paper introduces Deconfounding Reinforcement Learning (DRL), a framework that combines latent-variable modeling with Pearl’s do-calculus to disentangle causal effects from spurious correlations. By inferring hidden confounders and applying the do-operator, DRL significantly outperforms standard methods in environments with hidden biases.

Introduction: The Challenge of Confounding

In observational settings, we rely on historical records of decisions made by humans (e.g., doctors) and their subsequent outcomes. The core challenge is confounding bias: a situation where an unobserved factor influences both the treatment choice and the result. For example, in a medical dataset, a drug might appear effective because it is primarily prescribed to wealthier patients who already have better health outcomes. Without accounting for the "wealth" confounder, an RL agent might mistakenly attribute the recovery to the drug itself.

Methods: The DRL Framework

The authors propose a two-step approach to "deconfound" the learning process and recover true causal relationships:

  1. Latent-Variable Modeling: The framework uses a Variational Auto-Encoder (VAE) architecture to infer hidden confounders ($u$) from observed sequences of states, actions, and rewards. These observations act as proxies for the underlying latent factors.
  2. Causal Intervention via the Do-Operator: Rather than relying on conditional probabilities—which only capture correlations—the authors utilize the do-operator. They calculate the interventional distribution $p(r|z, do(a))$, which estimates the reward an action would produce if it were forced (as in a randomized trial), effectively blocking the influence of the confounder $u$.

The authors extend the Actor-Critic method into a "Deconfounding Actor-Critic," where the policy is optimized using these deconfounded reward estimates rather than the biased historical ones.

Experimental Evaluation

To test the framework, the authors developed three new benchmarks featuring hidden confounders: Confounding Pendulum, Confounding CartPole, and Confounding MNIST. In these tasks, a hidden factor influences both the data-collection policy and the reward signal.

Key Results

  • Superior Performance: In the Confounding Pendulum task, the Deconfounding Actor-Critic (Decon_AC) achieved significantly higher total rewards than vanilla versions (Alt_AC).
  • Decision Accuracy: DRL demonstrated much higher precision in action selection. In testing, the deconfounding agent chose the optimal action over 80% of the time, while the vanilla agent made the wrong decision more than half the time.
  • Model Quality: Qualitative analysis showed that the deconfounding model produced sharper state reconstructions. Models that ignored confounders produced blurry results because they were forced to "average" over multiple possible hidden states.

Discussion and Conclusion

DRL highlights the importance of accounting for causal structure in RL. By learning a generative model of the environment, the agent can perform counterfactual reasoning—asking "what would have happened if I took action B instead of A?"—even when action B was never taken in that specific historical context. While the current model assumes time-invariant confounders, it provides a robust foundation for applying RL to real-world observational datasets where direct experimentation is impossible.

Summary updated

BibTeX
@misc{lu2018deconfounding,
  author = {Chaochao Lu and Bernhard Schölkopf and José Miguel Hernández-Lobato},
  title = {{Deconfounding Reinforcement Learning in Observational Settings}},
  year = {2018},
  eprint = {1812.10576},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.10576},
}
Figure