Reasoning about Counterfactuals to Improve Human Inverse Reinforcement Learning

Michael S. Lee, Henny Admoni, Reid G. Simmons

Introduction

As robots become increasingly integrated into human environments, it is critical that humans understand the underlying logic governing robotic behavior. This understanding is often framed through Inverse Reinforcement Learning (IRL), where a learner observes an agent's actions and infers its reward function—the internal priorities, such as avoiding obstacles or prioritizing speed, that drive its decisions.

However, a significant gap exists between algorithmic IRL and human cognition. While standard IRL models assume that any deviation from an optimal path is equally informative, humans reason contrastively. We do not just look at what a robot does; we compare what it did against what we expected it to do. This paper addresses this gap by proposing a framework for "Counterfactual Scaffolding," which selects demonstrations based on a model of the human learner’s current expectations.

The Problem: The Theory of Mind Gap

Traditional IRL models often suffer from a "theory of mind" problem. They typically assume that counterfactuals—the alternative paths an agent could have taken—are simple, one-step deviations from the optimal trajectory. In contrast, human learners bring prior beliefs and expectations to a task. If a robot provides a demonstration that is technically "optimal" but aligns perfectly with a human's existing (and potentially incorrect) beliefs, the human learns nothing new. Conversely, if a robot provides a demonstration that is highly informative but ignores the human's current mental state, it may provide redundant or confusing information.

Methodology: Counterfactual Scaffolding

The authors propose a pedagogical framework designed to maximize knowledge gain by reasoning about the human's internal state. The framework relies on several key components:

1. Behavior Equivalence Class (BEC)

The BEC is used as a mathematical representation of the information conveyed by a demonstration. It defines the set of all reward functions that would make a specific observed behavior optimal. By tracking the intersection of BECs from multiple demonstrations, the robot can estimate the human's current "belief region."

2. Belief-Based Counterfactuals

Instead of comparing the robot’s path to random algorithmic deviations, the robot simulates what the human expects it to do based on their current estimated belief. The robot then selects a demonstration that most strongly contradicts those expectations. This "counterfactual scaffolding" is designed to highlight the differences between the human's current model and the robot's true reward function.

3. Predicting Test Difficulty

The authors introduced a metric to predict how difficult a specific test environment will be for a human. This is measured by the "overlap" between the human’s current belief region and the BEC of the test demonstration. A small overlap suggests the human is likely to guess the robot's behavior incorrectly, marking it as a "high-difficulty" test.

4. Feature Scaffolding

The study also explored "Feature Scaffolding," a technique where reward features (e.g., different terrain types or battery constraints) are introduced incrementally to reduce the learner's initial cognitive load.

Experimental Design

The framework was evaluated through a user study involving 216 participants on the Prolific platform. Participants were tasked with predicting robot trajectories in three distinct grid-world domains:

  • Delivery Domain: Balancing speed, mud avoidance, and battery recharging.
  • Tiles Domain: Navigating various floor types with different movement costs.
  • Skateboard Domain: Deciding when to pick up a tool to increase efficiency versus walking directly to a goal.

The researchers collected data on participant trajectory predictions, confidence ratings, and subjective mental effort across 18 test environments.

Key Insights and Results

The "Cognitive Conflict" Trade-off

The most significant finding was that counterfactual scaffolding acts as a double-edged sword. It significantly improved performance on high-difficulty tests—increasing the success rate to 44% compared to 37% for the baseline—but it actually decreased performance on easy tests.

This suggests that by choosing maximally surprising demonstrations, the robot induces "cognitive conflict." This conflict forces users to abandon simple heuristics and rethink their entire mental model. While this helps them navigate complex edge cases, it can lead to "overthinking" in simple, intuitive scenarios where the baseline behavior would have been sufficient.

Validation of the Difficulty Metric

The proposed "overlap" metric proved to be a highly accurate predictor of human performance. There was a stark difference in accuracy between tests labeled as high ($M=0.40$), medium ($M=0.71$), and low ($M=0.86$) difficulty, validating the mathematical approach to modeling human uncertainty.

The Cost of Learning

Counterfactual scaffolding is not a "free" improvement. Participants in this condition spent significantly more time watching demonstrations and reported higher levels of mental effort. The framework essentially trades human cognitive labor for a more robust and accurate understanding of the robot's goals.

Limitations and Future Work

A primary limitation of this study is the assumption of a fixed, near-perfect learning rate. In reality, human learning is non-linear and influenced by fatigue or distraction. Furthermore, the "Feature Scaffolding" approach did not show significant benefits, likely because the experimental domains were simple enough that breaking them down was unnecessary.

Future research should explore personalized teaching strategies. A robot could potentially monitor a user's performance in real-time and switch between "challenging" counterfactual demonstrations and "easier" baseline examples depending on the user's perceived cognitive load. Additionally, applying these principles to continuous, high-stakes environments like autonomous driving remains a vital next step.

Summary updated

BibTeX
@inproceedings{lee2022reasoning,
  author = {Michael S. Lee and Henny Admoni and Reid G. Simmons},
  title = {{Reasoning about Counterfactuals to Improve Human Inverse Reinforcement Learning}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2022},
  doi = {10.1109/iros47612.2022.9982062},
}
Figure