Learning to Be Cautious

Montaser Mohammedalamen, Dustin Morrill, Alexander Sieusahai, Yash Satsangi, Michael BowlingarXiv 2021

Abstract

Deploying autonomous systems in open-ended environments requires agents that can recognize and respond cautiously to out-of-distribution scenarios. This paper presents a framework for reinforcement learning agents to autonomously discover cautious behaviors without pre-defined safety constraints. By leveraging neural network ensembles to estimate epistemic uncertainty and employing $k$-of-$N$ Counterfactual Regret Minimization, agents learn to adopt robust strategies, such as "asking for help" or reducing speed, when encountering unfamiliar situations.

Introduction

A major hurdle in deploying autonomous systems, such as self-driving cars, is their behavior in "out-of-distribution" or novel scenarios—situations they did not encounter during training. Traditional safety methods usually rely on Constrained Markov Decision Processes (CMDPs), where engineers pre-define "safe" states or "forbidden" actions. However, it is impossible to anticipate every hazardous situation in complex, open-ended worlds. This research asks: Can an agent learn to be cautious on its own? The goal is to move away from hard-coded safety and toward agents that recognize their own ignorance (epistemic uncertainty) and act robustly because of it.

Methods

The authors propose a system with two main components:

  1. Characterizing Uncertainty: Instead of a single reward model, the system trains an ensemble of neural networks. Because each network has a different initialization and sees data in a different order, they tend to agree on familiar states but produce wildly different predictions for novel ones. This variance serves as a proxy for "epistemic uncertainty."
  2. Robust Optimization ($k$-of-$N$ CFR): The agent does not just maximize the average predicted reward. Instead, it uses a subroutine called $k$-of-$N$ Counterfactual Regret Minimization. In each step, it samples $N$ reward functions from its ensemble and optimizes against the average of the $k$-worst outcomes. This is a smooth generalization of the Conditional Value at Risk (CVaR) measure.

Historically, $k$-of-$N$ CFR was only defined for finite-horizon tasks. The authors extend this to continuing MDPs (infinite-horizon tasks), proving that the algorithm remains efficient and theoretically sound in these more complex settings.

Experimental Setup

The framework was evaluated using a progression of tasks designed to test responses to novelty:

  • MNIST (Familiar): The environment where the agent learns to classify digits 0-9.
  • MNIST Fashion & EMNIST Letters (Novel): Used as deployment environments to test zero-shot cautious behavior.
  • Driving Gridworld: A sequential decision-making benchmark where an agent must manage speed and lane changes. In the "familiar" version, obstacles only appear off-road; in the "novel" version, obstacles appear on the road.
The experimental setup involves training on familiar digits (a) and testing on novel datasets such as fashion items (b) and letters (c).

Key Results

The experiments demonstrate that caution can be operationalized as risk aversion to ignorance. In the MNIST experiments, the authors added an 11th action that always gave a small, constant reward (+0.25). Robust agents learned to pick this "ask for help" action when shown novel images because their reward models were too uncertain about the standard digit classification actions.

Distribution of action indices for novel fashion (f) and letter (alpha) datasets. Robust configurations (blue) show a clear shift toward the "ask for help" action compared to standard baselines.

In the "single-image" regime, the most robust policy (1-of-20) chose the "ask for help" action 89% of the time for fashion images and 68% for letters. In contrast, standard RL baselines chose it less than 2% of the time, instead "guessing" a digit class. Similarly, in the Driving Gridworld, robust agents slowed down significantly when encountering novel on-road obstacles, hitting them much less frequently than non-robust agents.

Conclusion and Future Work

This work demonstrates that robust optimization over epistemic uncertainty can lead to the emergence of cautious behaviors without explicit safety constraints. However, limitations remain regarding scalability to high-dimensional state spaces and the assumption of transition certainty. Future research will focus on integrating these methods with deep function approximation and addressing uncertainty in environment dynamics (e.g., how a car skids on ice).

Summary updated

BibTeX
@misc{mohammedalamen2021learning,
  author = {Montaser Mohammedalamen and Dustin Morrill and Alexander Sieusahai and Yash Satsangi and Michael Bowling},
  title = {{Learning to Be Cautious}},
  year = {2021},
  eprint = {2110.15907},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.15907},
}
Figure