Risk-Averse Offline Reinforcement Learning

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

TL;DR

O-RAAC (Offline Risk-Averse Actor-Critic) is the first model-free reinforcement learning algorithm designed to learn risk-averse policies entirely from pre-collected, offline data. By combining a distributional critic with a VAE-constrained actor, it successfully avoids catastrophic "tail-end" risks while remaining robust to the distribution shifts that typically plague offline learning.

What Problem Does This Paper Address?

Reinforcement Learning (RL) has shown incredible promise, but deploying it in high-stakes real-world applications—like medical treatment or autonomous robotics—remains dangerous. The standard RL paradigm relies on "exploration," which in a high-stakes setting might mean a robot breaking itself or a system making a fatal error just to see what happens.

To solve this, researchers use Offline RL, where an agent learns from a fixed dataset of past experiences without ever interacting with the environment during training. However, two major hurdles remain:

  1. Bootstrapping Error: Offline agents often "hallucinate" high rewards for actions not present in the dataset, leading to disastrous performance when actually deployed.
  2. Risk-Neutrality: Most RL algorithms aim to maximize average performance. In high-stakes scenarios, we care less about the average and more about avoiding the worst-case scenarios (the "tail" of the reward distribution).

Methods

The authors introduce Offline Risk-Averse Actor-Critic (O-RAAC), which integrates three key components to handle these challenges:

  • Distributional Critic: Instead of learning a single expected value ($Q$-value), the critic learns the entire distribution of potential future returns ($Z$-value). It uses an extension of Implicit Quantile Networks (IQN) to represent this distribution efficiently for continuous action spaces.
  • Risk-Averse Actor: Rather than maximizing the expected return, the actor optimizes a "distortion" of the return distribution. Specifically, it focuses on the Conditional Value-at-Risk (CVaR)—essentially the average of the worst $X\%$ of outcomes.
  • VAE-based Imitation Learning: To combat bootstrapping error, the actor is constrained to stay near the "behavior policy" (the policy that originally collected the data). This is implemented using a Variational Auto-Encoder (VAE) that models the data distribution, ensuring the agent doesn't pick actions the critic hasn't seen enough of to evaluate reliably.
Figure 1: Visualization of the algorithm components. Solid lines indicate the forward flow of data whereas dashed lines indicate the backward flow of gradients. Data is stored in the fixed buffer. The VAE, in blue, learns a generative model of the behavior policy. The actor, in green, perturbs the VAE and outputs a policy. The critic, learns the Z-value distribution of the policy. The actor optimizes a risk-averse distortion of the Z-value distribution, which we denote by DZ. On the right, we show a typical probability density function of Z learned by the critic in red. In dashed black we indicate the expected value of Z, which a risk-neutral actor intends to maximize. Instead, a risk-averse actor intends to maximize a distortion DZ, shown in dashed green. In this particular visualization, we show the ubiquitous Conditional Value at Risk (CVaR).

Datasets

The algorithm was evaluated using the D4RL benchmark, a standard for offline RL. The authors focused on three MuJoCo continuous control tasks: HalfCheetah, Walker2D, and Hopper.

Crucially, they modified these environments to include "risk events." For example, in the HalfCheetah task, if the robot exceeds a certain velocity, it receives a large negative reward with a 10% probability, simulating a mechanical failure. This makes the standard "maximize average reward" objective dangerous and highlights the need for risk-aversion.

Key Insights and Ideas

  • The Gaussian Trap: Many previous risk-sensitive methods assumed reward distributions were Gaussian. O-RAAC demonstrates that in RL, return distributions are often multi-modal or heavy-tailed, and learning the full distribution is vital for accurate risk assessment.
  • Risk-Aversion as Robustness: A fascinating theoretical insight highlighted is that optimizing for a risk-averse criterion like CVaR is mathematically equivalent to optimizing for a pessimistic estimate of average performance. This makes risk-averse agents naturally more robust to "natural" distribution shifts (changes in the environment) compared to risk-neutral agents.
  • Balancing Act: The paper shows that the hyperparameter $\lambda$ (which controls how much the actor can deviate from the VAE's imitation) is critical. Too low, and the agent just copies a mediocre behavior policy; too high, and it suffers from offline bootstrapping errors.

Key Results

O-RAAC consistently outperformed both risk-neutral (D4PG, BEAR) and existing risk-averse (WCPG) benchmarks in terms of CVaR.

  • Safety: In the toy car example, O-RAAC learned to saturate its velocity just below the "risky" threshold, achieving 0 risky steps, while benchmarks regularly triggered penalties.
  • MuJoCo Performance: In the "Expert" Walker2D dataset, O-RAAC achieved a CVaR of 1172, significantly higher than the risk-neutral O-D4PG (773) and the behavior policy (1028).
  • Distribution Shifting: As shown in Figure 2, O-RAAC successfully shifts the probability mass of its outcomes away from the "risky region" (red) and into the "safe region" (green), whereas risk-neutral agents often ignore these rare but catastrophic events.
Figure 2: Empirical distribution of the risk-event of O-RAAC, O-D4PG, and the behavior policies. O-RAAC shifts the support towards the risk-free region (green area). On the other hand, O-D4PG ignores the risk-related rewards and imitates the behavior distribution.

Limitations and Future Work

  • Hyperparameter Sensitivity: The performance is quite sensitive to the $\lambda$ parameter, which currently requires manual tuning or environment-specific knowledge.
  • Computational Overhead: Learning a full distribution via IQN is more computationally intensive than standard Q-learning.
  • Future Directions: The authors suggest exploring automated ways to tune the trade-off between imitation and risk-averse optimization, as well as applying these methods to even more complex, real-world datasets where data diversity is low.

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