Risk-Averse Offline Reinforcement Learning

Núria Armengol Urpí, Sebastian Curi, Andreas Krause

TL;DR

This paper introduces O-RAAC (Offline Risk-Averse Actor-Critic), the first reinforcement learning algorithm designed to learn risk-averse policies entirely from fixed, pre-collected datasets. By combining distributional reinforcement learning with imitation learning, O-RAAC avoids the "catastrophic tails" of performance, marking a significant step toward deploying RL in high-stakes, real-world applications like robotics and healthcare.

The Challenge of Risk in Offline RL

Reinforcement Learning (RL) is powerful but notoriously "risky" during its active learning phase. In high-stakes environments—such as autonomous driving or medical treatment—we cannot afford the trial-and-error of online exploration. This limitation has led to the rise of Offline RL, where agents learn exclusively from a static "buffer" of past experiences.

However, most existing offline RL methods are risk-neutral: they aim to maximize average performance. In the real world, a policy that is great on average but occasionally causes a total system failure is unacceptable. We need risk-averse agents that prioritize avoiding worst-case scenarios.

Developing these agents presents a twofold challenge:

  1. Bootstrapping Error: In offline RL, agents often "hallucinate" high rewards for actions not present in the dataset, leading to dangerous overconfidence.
  2. Risk Assessment: To be genuinely risk-averse, an agent needs to understand the entire distribution of possible outcomes, not just the expected mean.

Methods: The O-RAAC Architecture

The authors propose O-RAAC, which integrates three core components to tackle these challenges:

O-RAAC Architecture and Risk Distribution
  1. Distributional Critic: Instead of learning a single expected value (the Q-value), O-RAAC learns the full distribution of future returns (the Z-value). It uses an extension of Implicit Quantile Networks (IQN) to handle continuous actions, allowing the agent to "see" the probability of low-reward (risky) events.
  2. Risk-Averse Actor: The actor doesn't just maximize the mean of the Z-distribution. Instead, it applies a distortion operator (like Conditional Value-at-Risk, or CVaR). This mathematically "weights" the bottom tail of the distribution more heavily, forcing the agent to choose actions that are safe even when things go wrong.
  3. VAE-based Imitation Learner: To solve the bootstrapping error, the authors use a Variational Auto-Encoder (VAE) to model the behavior policy that originally collected the data. The RL agent is only allowed to "perturb" the actions suggested by this VAE. This keeps the agent's choices grounded in the reality of the available data.

Datasets and Evaluation

The researchers evaluated O-RAAC on several environments:

  • A 1-D Car Toy Example: A simple environment where an agent must reach a goal without exceeding a speed limit that carries a random, heavy penalty.
  • D4RL Benchmarks: They used the standard "Medium" and "Expert" variants of MuJoCo tasks (HalfCheetah, Walker2D, and Hopper).
  • Stochastic Modifications: Since the original MuJoCo tasks are deterministic, the authors added stochasticity to the rewards (e.g., a "speeding fine" or a "falling penalty") to create meaningful risk-aversion scenarios.

Key Insights

  • Risk-Aversion as Robustness: Optimizing for risk-aversion (like CVaR) is mathematically equivalent to distributional robustness. By preparing for the worst-case outcomes in the training data, the agent becomes naturally more resilient to "distribution shifts" (changes in the environment) during deployment.
  • Pessimism is a Feature: In offline RL, being "pessimistic" about unknown actions is a common strategy to avoid errors. O-RAAC shows that risk-aversion provides a principled, distribution-aware way to incorporate this pessimism.
  • Deterministic vs. Stochastic Policies: The authors argue that for risk-averse applications, we generally prefer deterministic policies. Adding randomness to an agent's behavior is itself a form of risk that high-stakes applications should avoid.

Key Results

O-RAAC demonstrated superior risk management across the board. In the 1-D car example, O-RAAC successfully learned to saturate its velocity just below the "risky" threshold, whereas risk-neutral baselines (like O-D4PG) consistently triggered heavy penalties.

Performance Distributions on MuJoCo Tasks
  • Better "Tails": On the D4RL MuJoCo tasks, O-RAAC consistently achieved higher 0.1-CVaR (the average of the worst 10% of outcomes) compared to state-of-the-art offline learners like BEAR and O-D4PG. The distributions clearly show O-RAAC staying within designated safe regions.
  • Survival Time: In environments that terminate upon failure (like Walker and Hopper), O-RAAC policies lasted significantly longer than their competitors, proving they had learned to avoid the "death" states present in the data.
  • Competitive Means: Surprisingly, even though O-RAAC wasn't explicitly trying to maximize the average return, it often performed as well as or better than risk-neutral agents on average, especially in "expert" datasets where data diversity is low.

Limitations and Future Work

While promising, O-RAAC has a few limitations:

  • Hyperparameter Sensitivity: The performance depends heavily on a parameter ($\lambda$) that controls how much the agent can deviate from the safe "imitation" policy. Finding the optimal balance between imitation and RL remains a challenge.
  • Dataset Quality: Like all offline methods, O-RAAC is limited by the "coverage" of the dataset. If the data lacks examples of safe behavior in certain states, the agent cannot invent them.
  • Computational Complexity: Learning a full distribution via quantiles is more computationally expensive than learning a single mean value, which might limit its use in extremely high-dimensional state spaces without further optimization.

Summary updated

BibTeX
@inproceedings{urpi2021risk,
  author = {Núria Armengol Urpí and Sebastian Curi and Andreas Krause},
  title = {{Risk-Averse Offline Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
}
Figure