Online Bayesian Risk-Averse Reinforcement Learning

Yuhao Wang, Enlu ZhouarXiv 2025 · DOI

Introduction

Reinforcement Learning (RL) agents often struggle in environments where data is scarce, leading to significant "epistemic uncertainty"—the uncertainty stemming from a lack of knowledge about the environment's underlying dynamics. While standard RL focuses on maximizing expected rewards (addressing aleatory uncertainty), it often fails to account for the risks associated with model mismatch. This paper introduces a framework for Online Bayesian Risk-Averse Reinforcement Learning, integrating Conditional Value at Risk (CVaR) into the Bayesian posterior sampling process. This approach creates agents that are naturally cautious when data is limited but adaptively confident as they learn, achieving sub-linear regret in both bandit and full Markov Decision Process (MDP) settings.

The Challenge of Epistemic Uncertainty

In RL, we distinguish between two types of randomness:

  1. Aleatory Uncertainty: The inherent noise of the world (e.g., the roll of a die).
  2. Epistemic Uncertainty: Our lack of knowledge about the world's rules (e.g., not knowing if the die is weighted).

Traditional "Robust RL" methods attempt to solve this by planning for the absolute worst-case scenario. However, this extreme pessimism can lead to overly conservative behavior—analogous to refusing to drive because of the infinitesimal chance of a meteor strike. This research explores Bayesian Risk Optimization (BRO) as a flexible middle ground. While BRO has been applied to offline settings, this work extends it to the online setting, where an agent must interact with the environment and update its risk-averse beliefs in real-time.

The Bayesian Risk Markov Decision Process (BRMDP)

The core of the proposed framework is the Bayesian Risk Markov Decision Process (BRMDP). Unlike standard Bellman equations that utilize expected rewards, the BRMDP applies a risk measure—specifically Conditional Value at Risk (CVaR)—over the posterior distribution of the model parameters.

Asymptotic Normality and Vanishing Pessimism

A significant theoretical contribution of this work is the proof that the Bayesian risk value function acts as a "pessimistic" version of the true value function. Specifically, it underestimates the true value by a factor of $O(1/\sqrt{N})$, where $N$ is the amount of data collected.

This "pessimism bias" is a deliberate safety feature: it ensures the agent avoids states it does not yet understand, effectively hedging against its own ignorance. As $N$ increases and the posterior distribution narrows, this bias vanishes. This allows the agent to transition seamlessly from cautious exploration to confident exploitation as it gains more information about the environment.

Algorithms: BRPS-RL and BRPS-CMAB

The authors propose two primary algorithms to implement this framework:

  • BRPS-RL (Bayesian Risk Posterior Sampling for RL): A general posterior sampling algorithm that draws samples from the model posterior to estimate the risk-averse Bellman operator.
  • BRPS-CMAB (Bayesian Risk Posterior Sampling for Contextual Multi-Arm Bandits): A specialized version for linear payoffs using Normal-Normal conjugate priors for computational efficiency.

Both algorithms are mathematically proven to achieve sub-linear regret, meaning the performance gap between the agent and an optimal, all-knowing strategy shrinks toward zero over time.

Experimental Evaluation

The framework was tested in two primary environments designed to highlight the management of epistemic uncertainty:

  1. Linear Contextual Bandit: A 10-arm simulation with 3-dimensional contexts and Gaussian noise.
  2. Modified Frozen Lake: An OpenAI Gym variant where transition probabilities (slippery ice) and the probability of escaping "holes" are unknown to the agent.

Key Results

  • Superiority over Thompson Sampling: In the Frozen Lake experiments, the risk-averse BRPS-RL agent consistently outperformed standard Thompson Sampling by avoiding high-risk, low-knowledge states that could lead to failure.
  • Adaptive Risk Aversion: The optimal risk level ($\alpha$) was found to be environment-dependent. In "dangerous" scenarios (where falling into a hole is catastrophic), high risk-aversion ($\alpha=0.99$) was most effective. In "safer" environments, moderate risk-aversion performed better.
  • Computational Trade-offs: High risk-aversion comes at a cost. Estimating the tail of the distribution for CVaR requires more samples. For instance, $\alpha=0.99$ required approximately 253 seconds to run, compared to just 10 seconds for standard Thompson Sampling.

Conclusion and Future Directions

The BRMDP framework provides a mathematically sound method for balancing exploration and safety. By treating pessimism as a vanishing bias, agents can navigate uncertain environments without the crippling conservatism of traditional robust methods.

Future work will focus on improving the scalability of the sampling-based approach to reduce computational overhead, extending these proofs to Deep RL environments requiring neural network function approximation, and exploring methods for agents to dynamically adjust their own risk-aversion levels based on observed posterior volatility.

Summary updated

BibTeX
@misc{wang2025online,
  author = {Yuhao Wang and Enlu Zhou},
  title = {{Online Bayesian Risk-Averse Reinforcement Learning}},
  year = {2025},
  eprint = {2509.14077},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.14077},
}
Figure