PAC-Bayesian Reinforcement Learning Trains Generalizable Policies

Abdelkrim Zitouni, Mehdi hennequin, Juba Agoun, Ryan Horache, Nadia Kabachi, Omar Rivasplata

The Challenge of Generalization in Reinforcement Learning

In standard machine learning, statistical learning theory relies heavily on the assumption that data is independent and identically distributed (i.i.d.). Reinforcement Learning (RL), however, fundamentally breaks this assumption: an agent’s next state depends entirely on its current state and action. This inherent "temporal correlation" makes it notoriously difficult to prove that a policy learned during training will generalize well to unseen trajectories.

Previous attempts to apply PAC-Bayesian theory—a framework that provides high-confidence bounds on a model's error—to RL have largely resulted in "vacuous" bounds. While mathematically sound, these bounds were practically useless, often predicting error margins so large they exceeded the maximum possible reward. Furthermore, they scaled poorly with the task horizon, becoming exponentially looser as the discount factor ($\gamma$) approached 1.

This paper introduces a novel theoretical framework and a practical algorithm, PB-SAC, that explicitly accounts for temporal correlations in RL data. By doing so, it transforms generalization theory from a passive evaluation tool into an active training objective that guides exploration and ensures reliable performance.

A New Theoretical Framework: The Mixing-Time Bound

To overcome the limitations of the i.i.d. assumption, the authors propose a new mathematical bound leveraging Paulin’s concentration inequality for Markov chains.

Instead of assuming independence, this approach quantifies the dependence in the data using mixing time ($\tau_{min}$)—the time it takes for the agent's state distribution to become independent of its starting point.

Crucially, the researchers achieved a breakthrough by bounding the value error directly, rather than indirectly through Bellman residuals. This direct bounding improves the mathematical scaling of the bound from a loose $O((1-\gamma)^{-4})$ to a much tighter $O((1-\gamma)^{-1})$, finally making the bounds non-vacuous and practically informative.

PB-SAC: Putting Theory into Practice

The authors integrate this new bound into the popular Soft Actor-Critic (SAC) algorithm, creating PB-SAC (PAC-Bayes Soft Actor-Critic). This algorithm uses the theoretical bound not just as a post-training report card, but as a direct optimization objective.

Key innovations in PB-SAC include:

  • Posterior-Guided Exploration (PGE): Instead of injecting random noise into actions for exploration, the agent samples several candidate policies from its "posterior" (its current belief space) and selects the one the critic evaluates highest. This provides theoretically-justified exploration.
  • Adaptive Sampling: To prevent the "sawtooth" performance drops that often occur when a policy is suddenly updated, PB-SAC employs a high-rate sampling phase to recalibrate the critic to the new policy distribution.
  • Variational Optimization: The authors utilize a "PAC-Bayes-$\lambda$" trick to transform a complex, non-convex bound into a simpler objective that can be efficiently optimized using standard gradient descent.

Experimental Validation and Key Results

The researchers evaluated PB-SAC on standard high-dimensional continuous control benchmarks from the MuJoCo suite, including HalfCheetah-v5, Hopper-v5, Walker2d-v5, and Ant-v5 (including a "very delayed" sparse-reward variant).

  • Competitive Performance: PB-SAC matches or exceeds the performance of vanilla SAC across all dense-reward tasks, with the significant added benefit of providing a mathematical performance certificate.
  • Superior Exploration: In sparse-reward settings, such as the highly delayed Ant task, PB-SAC outperformed both standard SAC and previous state-of-the-art PAC-Bayes methods.
  • Meaningful Certificates: The "Certified Discounted Return" (the theoretical lower bound on performance) consistently tightened as training progressed. For instance, in the HalfCheetah task, the bound became informative (non-negative) within the first 100,000 steps and closely tracked actual performance.
  • Robustness: The framework proved robust to overestimation. Even if the mixing time is overestimated (resulting in a overly cautious assumption about data correlation), the algorithm still learns effectively and provides valid, albeit more conservative, certificates.

Limitations and Future Directions

While PB-SAC represents a significant step forward for trustworthy RL, the authors note a few limitations:

  1. Mixing Time Estimation: The current method uses the autocorrelation of rewards to estimate mixing time. Underestimating this value can lead to overconfident, invalid bounds. Developing more robust, fully empirical estimators for mixing time in continuous spaces remains an open challenge.
  2. Posterior Expressiveness: The implementation relies on a diagonal Gaussian distribution for the policy posterior, which may be too simplistic to capture the complex geometry of neural network parameter spaces.
  3. Beyond Actor-Critic: The current framework is tailored specifically to actor-critic architectures. Extending these tight Markovian bounds to other paradigms, such as model-based RL, is a promising avenue for future research.

Summary updated

BibTeX
@inproceedings{zitouni2026pac,
  author = {Abdelkrim ZITOUNI and Mehdi hennequin and Juba Agoun and Ryan Horache and NADIA KABACHI and Omar Rivasplata},
  title = {{PAC-Bayesian Reinforcement Learning Trains Generalizable Policies}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=5Zwnr6uSlv},
}
Figure