Provably Efficient Exploration in Inverse Constrained Reinforcement Learning

Bo Yue, Jian Li, Guiliang Liu

Introduction

In many real-world scenarios—such as autonomous driving or robotic surgery—we want artificial agents to follow strict safety rules. However, these rules (or constraints) are often difficult to define manually. Inverse Constrained Reinforcement Learning (ICRL) addresses this by observing an expert and inferring the underlying constraints guiding their behavior.

A significant limitation in existing ICRL research is the reliance on generative models. These models assume the agent already possesses perfect knowledge of the environment's transition dynamics or can "teleport" to any state to test a hypothesis. In reality, a robot must physically navigate its environment to learn. Without strategic exploration, an agent might require millions of trials to deduce why an expert avoids a specific area. This paper tackles the critical challenge of efficient exploration: enabling an agent to learn hidden constraints as quickly as possible without a prior map of the environment.

Methods: Strategic Exploration for ICRL

To move away from unrealistic "teleportation" assumptions, the authors propose a theoretical framework for online exploration, introducing two primary algorithms designed to actively recover hidden safety constraints with mathematical guarantees on sample efficiency.

Illustration of different exploration trajectories around a hidden constraint.
  1. BEAR (Bounded Error Aggregate Reduction): This algorithm acts as a cautious cartographer. It calculates the uncertainty (error bounds) of its current cost estimates and selects exploration policies specifically designed to shrink these bounds across the entire environment. By systematically reducing uncertainty, BEAR ensures the agent eventually uncovers the true constraints.

  2. PCSE (Policy-Constrained Strategic Exploration): PCSE represents a more targeted approach. Instead of attempting to reduce uncertainty everywhere, it focuses exclusively on "plausibly optimal" policies. If a specific path yields a demonstrably low reward, PCSE avoids wasting exploration steps there. Instead, it concentrates on areas where a hidden constraint is the most likely explanation for why the expert did not take an otherwise high-reward shortcut.

Crucially, both algorithms are backed by PAC (Probably Approximately Correct) bounds, providing a theoretical guarantee that the agent will find a highly accurate set of constraints within a predictable number of steps.

Experimental Setup and Datasets

The researchers evaluated BEAR and PCSE across two distinct types of simulated environments:

  • Discrete Gridworlds: Four distinct 7x7 maps where an agent must navigate from a start state to a goal. Each map features different hidden constraint layouts (e.g., walls or traps) that the agent must infer purely by watching expert demonstrations.
  • Continuous Point Maze: A more complex, stochastic environment where a ball-shaped agent navigates a continuous 2D space, testing the algorithms' robustness to noisy sensors and non-grid movements.
Example of a 7x7 discrete Gridworld environment used to evaluate the algorithms.

Key Insights and Results

The study yields several important insights into how agents can efficiently learn rules from experts:

  • The Minimalist Approach: The framework demonstrates that recovering the exact ground-truth constraints is unnecessary. The goal is to find the minimal set of constraints that makes the expert's behavior appear optimal. If an expert avoids a corner with no rewards, a safety rule isn't needed to explain that behavior—the lack of reward suffices.
  • Reward Advantages as a Compass: The difference between the expert's reward and a potential shortcut's reward (the "reward advantage") serves as a critical signal. If a shortcut offers 10 more points than the expert's chosen path, the hidden constraint blocking that shortcut must "cost" at least 10 points.
  • Superior Speed and Accuracy: In both Gridworld and Point Maze evaluations, PCSE converged significantly faster than standard baselines (such as random exploration, $\epsilon$-greedy, or maximum-entropy exploration). Using the Weighted Generalized Intersection over Union (WGIoU) metric to measure constraint similarity, PCSE consistently achieved high accuracy much earlier in training.
  • Sample Complexity: The paper establishes the first explicit upper bound on sample complexity for this problem class, proving that the required number of exploration steps scales predictably with the state space size and desired accuracy.

Limitations and Future Work

While the theoretical foundations are strong, the sample complexity still scales with the number of states, making massive, high-dimensional real-world environments (like city-wide autonomous driving) a persistent challenge due to the curse of dimensionality.

Furthermore, the current framework assumes the expert is perfectly optimal. In reality, human experts make mistakes. Future research will need to explore "Robust ICRL" capable of handling sub-optimal or noisy demonstrations. Finally, investigating how learned constraints can transfer between different environments (e.g., applying rules learned on a sunny road to a snowy one) could further accelerate the learning process.

Summary updated

BibTeX
@inproceedings{yue2025provably,
  author = {Bo Yue and Jian Li and Guiliang Liu},
  title = {{Provably Efficient Exploration in Inverse Constrained Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=eLTPkGGHum},
}
Figure