Distributionally Robust Reinforcement Learning

Elena Smirnova, Elvis Dohmatob, Jérémie MaryarXiv 2019

Abstract

Real-world applications require RL algorithms to act safely. During the learning process, it is likely that the agent executes sub-optimal actions that may lead to unsafe/poor states of the system. Exploration is particularly brittle in high-dimensional state/action space due to the increased number of low-performing actions. In this work, we consider risk-averse exploration in the approximate RL setting. To ensure safety during learning, we propose the distributionally robust policy iteration scheme that provides lower bound guarantees on state-values. Our approach induces a dynamic level of risk to prevent poor decisions and yet preserves convergence to the optimal policy. Our formulation results in an efficient algorithm that accounts for a simple re-weighting of policy actions in the standard policy iteration scheme. We extend our approach to continuous state/action space and present a practical algorithm, distributionally robust soft actor-critic (DR-SAC), that implements a different exploration strategy: it acts conservatively in the short-term and explores optimistically in the long-run. We provide promising experimental results on continuous control tasks.

Introduction

Reinforcement Learning (RL) typically relies on a trial-and-error process. While acceptable in simulation, "errors" in real-world applications like robotics or autonomous driving can lead to catastrophic hardware failures. A primary driver of this risk is estimation error: when an agent has limited experience with a state-action pair, its value estimate is noisy. Standard exploration might inadvertently select a high-risk action because its negative consequences haven't been fully learned. This paper introduces a framework for "Distributionally Robust" RL to mitigate these risks by providing mathematical lower-bound guarantees on performance during exploration.

Methodology

The proposed framework centers on Distributionally Robust Policy Iteration (DRPI). Unlike standard RL which optimizes for expected rewards, DRPI utilizes a Distributionally Robust Bellman Operator. This operator considers an "uncertainty set" of possible outcomes—defined by KL-divergence—and optimizes for the worst-case scenario.

Through Legendre-Fenchel duality, the authors demonstrate that this optimization can be solved analytically, leading to an Adversarial Re-weighting of actions. Actions associated with high uncertainty or poor potential outcomes are suppressed. For continuous control tasks, this is implemented as DR-SAC (Distributionally Robust Soft Actor-Critic). By approximating Q-value variance, the robustness requirement is transformed into a manageable reward shaping term: the agent is penalized for entering states with high predicted reward variance. Crucially, this conservatism is adaptive; as the agent gains experience, the uncertainty set shrinks, allowing the policy to transition from cautious exploration to optimistic exploitation of the optimal path.

Experimental Results

The performance of DR-SAC was evaluated against standard SAC using the PyBullet simulation suite, specifically the HopperBulletEnv and Walker2DBulletEnv. These environments are known for being noisier and more challenging than their MuJoCo counterparts.

Performance metrics for HopperBulletEnv, showing average episode length, return, and their respective standard deviations.
Performance metrics for Walker2DBulletEnv, comparing SAC and DR-SAC across return and episode length stability.

The results demonstrate that DR-SAC achieves a 76% to 78% reduction in the standard deviation of returns across both tasks. Similarly, variance in episode length—a proxy for how long the robot remains upright—decreased by approximately 77%. Importantly, this stability did not come at the cost of final performance; DR-SAC's average returns remained comparable to standard SAC, but with a significantly smoother learning curve and more cautious qualitative behavior.

Discussion and Limitations

The "safe-to-optimistic" pipeline effectively balances the need for safety early in training with the requirement to find optimal policies. By treating safety as a lower-bound guarantee rather than a hard constraint, the algorithm remains computationally efficient.

However, some limitations remain. The current implementation relies on state discretization to track visitation counts, which may not scale to extremely high-dimensional inputs like raw pixels. Additionally, the hyperparameters governing the rate at which the uncertainty set shrinks require careful tuning. Future work may explore more scalable ways to estimate state uncertainty and automate parameter selection across diverse tasks.

Summary updated

BibTeX
@misc{smirnova2019distributionally,
  author = {Elena Smirnova and Elvis Dohmatob and Jérémie Mary},
  title = {{Distributionally Robust Reinforcement Learning}},
  year = {2019},
  eprint = {1902.08708},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.08708},
}
Figure