Optimistic Pessimistic Exploration for Safe Reinforcement Learning

67 concepts55 papers1 proposal

In standard reinforcement learning (RL), agents navigate the exploration-exploitation dilemma using the principle of Optimism Under Uncertainty. If an agent is unsure how rewarding an action is, it assumes the best-case scenario—the upper confidence bound (UCB) of the reward. This optimistic bias is highly effective because it forces the agent to try unknown actions, either gathering a high reward or learning that the action is suboptimal, thus systematically dissolving its own ignorance.

However, this classic paradigm breaks down catastrophically in safety-critical environments. In a Constrained Markov Decision Process (CMDP), an agent must maximize rewards while strictly keeping safety costs below a specified threshold. If an agent applies standard optimism to an unknown safety cost, it will assume the cost is low, leading it to take dangerous actions that violate constraints during training. Conversely, if the agent is uniformly pessimistic about everything, it becomes paralyzed—refusing to leave a narrow, known safe zone and failing to discover the optimal policy.

To resolve this tension, a powerful framework has emerged: decoupling the agent's attitude toward uncertainty by combining optimism for rewards with pessimism for safety.

Decoupling Reward and Risk

The core insight of this research direction is that an agent should maintain two distinct, asymmetric postures toward the unknown. It should remain highly optimistic about what it might gain, but deeply conservative about what it might lose.

As formalized by Ruida Zhou et al. in Learning Policies with Zero or Bounded Constraint Violation for Constrained MDPs, the agent constructs high-confidence uncertainty intervals for both rewards and safety costs. When evaluating an action, the agent uses the upper confidence bound for rewards (driving exploration) but the upper confidence bound for costs (ensuring safety pessimism).

Uncertainty Interval Evaluation:
Reward: [ Lower Bound -------- Optimistic Estimate (UCB) ]  --> Drive Exploration
Cost:   [ Lower Bound -------- Pessimistic Estimate (UCB) ]  --> Enforce Safety Filter

By evaluating safety through a worst-case lens, the agent ensures that it only ventures into unknown states when it is statistically confident that the worst-case cost will not violate the safety budget. Kihyun Yu et al. demonstrate in Improved Regret Bound for Safe Reinforcement Learning via Tighter Cost Pessimism and Reward Optimism that by tightening these estimators using variance bounds, agents can achieve optimal reward learning rates while guaranteeing strictly zero constraint violations throughout the entire learning process.

The Geometry of Safe Action Selection

How does this dual-estimation mechanism operate during action selection? Geometrically, the agent uses its pessimistic cost estimates to carve out a conservative, verifiably safe subset of the action or policy space.

In a single-author work, Spencer Hutchinson describes this in Optimistic Safety for Online Convex Optimization with Unknown Linear Constraints as maintaining two distinct approximations of the feasible region:

  1. An outer approximation based on optimistic performance assumptions, used to identify where the global optimum might lie.
  2. An inner approximation based on pessimistic constraint bounds, which contains only actions that are guaranteed to be safe under current epistemic uncertainty.

The agent restricts its optimization strictly to this inner, safe approximation. Within this verifiably safe zone, it then acts optimistically to maximize rewards. As shown by Sanae Amani et al. in Linear Stochastic Bandits Under Safety Constraints, if the agent begins with a small "safe seed set," it can safely collect data to shrink its uncertainty intervals. As uncertainty shrinks, the pessimistic cost bounds relax, allowing the inner safe region to expand organically until it encompasses the true optimal safe policy.

Countering Conservatism with Double Optimism

While safety pessimism prevents catastrophic failures, it introduces a secondary problem: over-conservatism. If the safety constraints are highly restrictive, a purely pessimistic view of costs might completely block the agent from exploring transitions that lead to high-reward regions, trapping it in a safe but low-performing local optimum.

To counteract this paralyzing effect, Archana Bura et al. introduce a "double dose" of optimism in DOPE: Doubly Optimistic and Pessimistic Exploration for Safe Reinforcement Learning. Their algorithm, DOPE, pairs pessimistic constraint estimation with optimism in both the reward function and the environmental transition dynamics. By selecting the most favorable transition model from a confidence set, the agent remains motivated to expand its horizons. This model-based optimism provides the necessary push to overcome the restrictive pull of safety constraints, ensuring the agent continues to explore unknown states that are verifiably safe but highly uncertain.

Architectural Variations of Decoupling

The principle of asymmetric exploration manifests in several other elegant architectural variations depending on the feedback structure of the environment:

  • Direction vs. Scale: Instead of treating an action as a single choice, Spencer Hutchinson et al. show in Directional Optimism for Safe Linear Bandits that an agent can decouple the direction of an action from its magnitude. The direction is chosen optimistically to maximize potential reward, while the scaling factor is computed pessimistically based on current constraint estimates to ensure the action does not cross the safety boundary.
  • Aggressive Boundary Mapping: In scenarios where no prior safe actions are known, an agent may temporarily need to invert this logic to discover where the boundaries even lie. Honghao Wei et al. demonstrate in Safe Reinforcement Learning with Instantaneous Constraints: The Role of Aggressive Exploration that an initial phase of aggressive cost optimism allows the agent to test environment boundaries and map out hard instantaneous constraints efficiently, proving that early risk-taking within bounded limits can be necessary to establish long-term safety guarantees.
  • Primal-Dual Dynamics: In non-stationary environments, the balance is often maintained via online primal-dual optimization. As explored by Yuhao Ding et al. in Provably Efficient Primal-Dual Reinforcement Learning for CMDPs with Non-stationary Objectives and Constraints, the primal step uses UCB value estimation to aggressively pursue rewards, while the dual step dynamically adjusts penalties based on pessimistic cost estimates, allowing the agent to adapt its safety margins on the fly as the environment changes.

Key Foundational Work

Safe Exploration in Markov Decision Processes (2012) — contributed 1 concept elements to this direction.
Reinforcement Learning in Robust Markov Decision Processes (2013) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_optimistic_pessimistic_exploration_ea06d2f5,
  title = {optimistic-pessimistic exploration},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/optimistic-pessimistic-exploration/rdr_ea06d2f57722422fa4a497a45aa1ef4a},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-26},
}

This exact version (version 1, frozen text):

@misc{lacuna_optimistic_pessimistic_exploration_ea06d2f5_v1,
  title = {optimistic-pessimistic exploration},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/optimistic-pessimistic-exploration/rdr_ea06d2f57722422fa4a497a45aa1ef4a/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-26},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake