Posterior Sampling for Deep Reinforcement Learning

Remo Sasso, Michelangelo Conserva, Paulo Rauber

Introduction

Posterior Sampling for Deep Reinforcement Learning (PSDRL) is the first algorithm to successfully scale the theoretically elegant "Posterior Sampling" framework to complex, high-dimensional environments like Atari. By combining latent state-space models with a novel "continual planning" value network, PSDRL achieves state-of-the-art sample efficiency. It outperforms previous attempts to scale posterior sampling and rivals top-tier model-based methods like DreamerV2.

The Challenge of Sample Inefficiency

Deep Reinforcement Learning (RL) has achieved incredible feats, from mastering Go to playing complex video games. However, these successes usually come at a massive cost: sample inefficiency. Agents often require millions of "trial and error" interactions to learn a decent policy, making them impractical for real-world applications like robotics or healthcare where data is expensive or risky to collect.

A major cause of this inefficiency is the exploration-exploitation trade-off. How does an agent decide whether to stick with a known reward source (exploit) or try something new (explore)? In simple "tabular" settings (where states are finite and countable), an algorithm called Posterior Sampling for Reinforcement Learning (PSRL) is the gold standard. It maintains a distribution over possible environment models, samples one, and acts as if that model is the absolute truth.

The challenge is that PSRL is notoriously difficult to scale to "non-tabular" settings, such as games played from raw pixels. Maintaining a full Bayesian distribution over a complex neural network's parameters is computationally crushing and often leads to poor planning.

The PSDRL Architecture

The authors introduce PSDRL to bridge the gap between the theoretical rigor of PSRL and the representational power of Deep RL. Its architecture consists of three main pillars:

The PSDRL architecture combining a latent autoencoder and a recurrent forward model.
  1. Latent State Space Model: Instead of planning directly in high-dimensional pixel space, PSDRL uses a convolutional autoencoder to compress images into a compact "latent" vector. A recurrent forward model then predicts how these latent states evolve based on the agent's actions.
  2. Neural-Linear Uncertainty: To keep the "Posterior" in PSDRL, the agent needs to know what it doesn't know. The authors use a "neural-linear" approach, treating the last layer of the forward model as a Bayesian linear regression problem. This allows for mathematically precise and computationally efficient uncertainty quantification over the environment's transitions.
  3. Continual Planning: This is the paper's most significant practical contribution. In standard PSRL, you sample a model and solve it from scratch, which is too slow for deep RL. PSDRL maintains a Value Network that is updated continually. It "remembers" planning results from previous sampled models, helping the agent avoid forgetting useful strategies when it shifts its belief about the environment.

Experimental Results

The researchers evaluated PSDRL on the Atari 2600 benchmark, specifically a suite of 55 games. They restricted the agents to 1 million environment steps (4 million frames)—a "low-data" regime designed to rigorously test sample efficiency compared to standard RL papers that train for 50 to 200 million steps.

Learning curves demonstrating the superiority of Posterior Sampling over purely exploitative or explorative strategies on Atari games.
  • Superiority over Baselines: PSDRL significantly outperformed previous attempts to scale posterior sampling (like Bootstrapped DQN and Successor Uncertainties) in almost every game.
  • Competitive with SOTA: PSDRL achieved a 23% Gamer Median score, outperforming the state-of-the-art model-based method DreamerV2 (18%) at the 1 million step mark.
  • Sparse Reward Success: In games like Freeway, where rewards are rare and exploration is hard, PSDRL learned the optimal policy much faster than standard epsilon-greedy (random) exploration methods.
  • Computational Efficiency: PSDRL proved to be highly computationally efficient. Its "neural-linear" trick provides a "good enough" approximation of uncertainty that allows it to run on a single GPU in about 9 hours per game, requiring less wall-clock time than DreamerV2 while maintaining higher or equal performance.

Limitations and Future Work

While PSDRL is a major step forward, it has limitations:

  • Hard Exploration: Like most RL agents, PSDRL still struggles with traditionally hard environments (e.g., Montezuma’s Revenge) that require very long sequences of specific actions with no intermediate rewards.
  • Resolution Loss: Because the autoencoder downscales images to 64x64, the agent sometimes misses tiny details, like small projectiles in certain games.
  • Deterministic Assumption: The current version assumes a deterministic environment. Extending the model to handle stochastic environments is a vital next step.
  • Replay Buffer Bias: The model can suffer from "Recency Bias" tied to the size of the replay buffer. Finding ways to perform incremental posterior updates without re-scanning the whole buffer could further improve the algorithm.

Summary updated

BibTeX
@inproceedings{sasso2023posterior,
  author = {Remo Sasso and Michelangelo Conserva and Paulo Rauber},
  title = {{Posterior Sampling for Deep Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=ZwjSECgl6p},
}
Figure