Combining Pessimism with Optimism for Robust and Efficient Model-Based Deep Reinforcement Learning

Sebastian Curi, Ilija Bogunovic, Andreas Krause

Reinforcement Learning (RL) agents often perform brilliantly in simulations but fail spectacularly in the real world. This is usually due to the "sim-to-real" gap: training environments rarely capture the full range of unpredictable conditions an agent will face in deployment—like varying road friction for an autonomous car or mechanical wear on a robot arm.

To solve this, researchers use Robust RL, which frames the problem as a "zero-sum game" between an agent trying to succeed and an adversary trying to make it fail. However, existing robust RL methods face a difficult "trilemma":

  1. They are sample-inefficient (requiring millions of trials).
  2. They lack theoretical guarantees (you cannot mathematically prove they will work).
  3. They do not scale well to high-dimensional problems involving deep neural networks.

This paper tackles all three challenges by introducing RH-UCRL (Robust Hallucinated Upper-Confidence RL), a practical, provably robust algorithm that bridges the gap between theoretical guarantees and deep learning scalability.

The RH-UCRL Approach

The core of the paper is the RH-UCRL algorithm. It operates on a Model-Based approach, meaning the agent learns a statistical model of how the world works rather than just memorizing which actions to take.

Key technical components include:

  • Uncertainty Quantification: The algorithm uses an ensemble of neural networks to distinguish between aleatoric uncertainty (inherent randomness, like wind) and epistemic uncertainty (things the agent simply hasn't learned yet).
  • Hallucination: This is the algorithm's "secret sauce." Instead of just predicting one future, the agent "hallucinates" additional control inputs based on its epistemic uncertainty.
  • The agent hallucinates inputs that make its performance look as good as possible (optimism). This encourages active exploration of unknown states.
  • The adversary hallucinates inputs to make performance as bad as possible (pessimism).
  • Minimax Optimization: The agent selects a policy that maximizes the worst-case (pessimistic) estimate of its optimistic performance. This ensures that the agent explores aggressively but prepares for the worst.

By specifically targeting epistemic uncertainty for hallucination, the agent knows exactly where it needs more data to reduce its "fear" of the adversary. This solves a major bottleneck in robust RL: many algorithms are "too scared" to explore and settle for safe, mediocre behaviors.

Experimental Setup and Robustness Scenarios

The researchers evaluated RH-UCRL using the MuJoCo physics engine, a standard benchmark for continuous control. They tested the algorithm on several simulated robots, including locomotion tasks (HalfCheetah, Hopper, Walker2d), a stabilization task (InvertedPendulum), and fluid/precision tasks (Reacher2d, Swimmer).

They tested these environments across three distinct robust scenarios:

  1. Adversarial-Robust: An external force actively pushes the robot.
  2. Action-Robust: The agent's actions are occasionally replaced by adversarial ones.
  3. Parameter-Robust: Physical properties (like the mass of the robot's torso) change between training and testing.
Performance of RH-UCRL across Adversarial, Action, and Parameter robustness scenarios.

Key Results

RH-UCRL demonstrated significant improvements over existing methods across multiple fronts:

  • Superior Worst-Case Performance: In the MuJoCo tasks, RH-UCRL consistently outperformed state-of-the-art baselines like RARL and RAP. For example, in the Inverted Pendulum task, RH-UCRL was the only algorithm that found a policy robust enough to withstand a strong adversary.
  • Sample Efficiency: Because it is model-based, RH-UCRL learned successful strategies in significantly fewer episodes (often around 200) compared to model-free robust baselines that required 1,000+ episodes.
  • Generalization: In parameter-robust tests, RH-UCRL trained on a range of masses performed well even when tested on masses it had never seen before. In contrast, non-robust models (like standard H-UCRL) saw their performance plummet as the mass deviated from the training norm.
Worst-case and average returns across MuJoCo environments.

Furthermore, the authors provide a mathematical proof that the algorithm achieves "sublinear regret." In plain English, this means that as the agent spends more time in the environment, its performance is mathematically guaranteed to converge to the optimal robust strategy at a specific rate.

Limitations and Future Work

While highly effective, RH-UCRL does come with trade-offs:

  • Computational Overhead: Maintaining an ensemble of neural networks and solving a minimax optimization problem at every step is computationally more expensive than standard RL.
  • Model Calibration: The theoretical guarantees rely on the statistical model being "calibrated" (its uncertainty estimates must be accurate). While neural network ensembles work well in practice, they do not always provide the perfect calibration that the underlying math assumes.

Future directions for this research include extending the algorithm to "simulator-free" real-world hardware and exploring more complex adversarial models that go beyond simple force perturbations.

Summary updated

BibTeX
@inproceedings{curi2021combining,
  author = {Sebastian Curi and Ilija Bogunovic and Andreas Krause},
  title = {{Combining Pessimism with Optimism for Robust and Efficient Model-Based Deep Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure