Confidence Aware Inverse Constrained Reinforcement Learning

Sriram Ganapathi Subramanian, Guiliang Liu, Mohammed Elmahgiubi, Kasra Rezaee, Pascal Poupart

Introduction

In real-world applications of Reinforcement Learning (RL)—such as autonomous driving or robotics—unrestricted trial-and-error can be catastrophic. To operate safely, agents must adhere to constraints. However, manually specifying every complex rule (e.g., "maintain a specific distance from the curb during heavy rain") is often impossible.

Inverse Constrained Reinforcement Learning (ICRL) addresses this by observing expert demonstrations and inferring the underlying safety rules they follow. Yet, existing ICRL methods have a critical flaw: they provide a "best guess" point-estimate of constraints without indicating their certainty. If an agent learns from only a handful of expert demonstrations, this point-estimate might be dangerously loose.

To solve this, researchers have developed Confidence Aware Inverse Constrained Reinforcement Learning (CA-ICRL). This framework allows users to specify a desired confidence level when learning safety constraints, modeling uncertainty to ensure the learned constraints are at least as strict as the ground truth.

Methodology: The CA-ICRL Framework

Instead of relying on point-estimates, CA-ICRL models a distribution over constraints. This approach captures epistemic uncertainty—the uncertainty arising from a lack of data.

  1. Beta Distribution Modeling: The core innovation is using a Beta distribution to represent the probability that a given trajectory is "safe." The Beta distribution naturally models probabilities on a $[0, 1]$ interval and effectively captures uncertainty.
  2. The Confidence Parameter ($\lambda$): Users provide a desired confidence level, $\lambda$. The algorithm then selects a constraint based on the $(1-\lambda)$ quantile of the learned Beta distribution. This guarantees that the learned constraint is "at least as constraining" as the true underlying constraint with the specified probability.
  3. Neural Architecture: The framework employs an encoder-based architecture (utilizing Transformers) that takes expert trajectories as input and outputs the hyperparameters ($\alpha_1, \alpha_2$) of the Beta distribution.
CA-ICRL Iterative Loop

As shown above, the system relies on Iterative Refinement. It alternates between a "Forward Step" (updating the agent's policy to satisfy the current constraints) and an "Inverse Step" (adjusting the constraint distribution based on how the agent's behavior compares to the expert demonstrations).

The Data Sufficiency Loop

A major advantage of CA-ICRL is its ability to answer a critical question for practitioners: "Do I have enough expert demonstrations?"

Data Sufficiency Loop

If the agent cannot reach a target reward level (performance threshold $\delta$) while strictly maintaining the required confidence in its constraints, the system terminates its optimization and signals that more expert data is required. This principled data collection loop ensures that users can simultaneously learn constraints with the desired confidence and achieve the necessary policy performance.

Experimental Setup and Key Results

The researchers evaluated CA-ICRL across seven distinct domains, including stochastic MuJoCo robotics environments (e.g., Half-Cheetah, Ant, Walker) with spatial constraints, and the HighD dataset featuring real-world human driving trajectories on German highways.

  • Conservative is Faster: Surprisingly, being conservative early in training accelerates learning. Because CA-ICRL starts with a high confidence threshold, the agent is cautious. It spends less time "unlearning" aggressive, unsafe behaviors that baseline algorithms might accidentally encourage.
  • Lower Violations & Higher Rewards: In MuJoCo environments, CA-ICRL consistently maintained lower constraint violation rates than baselines like VICRL or GACL. For instance, in a "Blocked Walker" task, violations dropped below 20% when an 80% confidence level was requested. Despite this conservatism, CA-ICRL often achieved higher cumulative rewards by converging to a stable, safe policy more efficiently.
  • Better Calibration: CA-ICRL achieves a significantly lower Expected Calibration Error (ECE). When the model predicts an 80% chance that a state is safe, it is genuinely safe roughly 80% of the time—a mandatory requirement for trust in safety-critical systems.
  • Robustness to Data Volume: As the number of expert trajectories increases, the learned constraints naturally become less "overly conservative," allowing the agent to achieve higher performance while still respecting the strict confidence bounds.

Limitations and Future Work

While CA-ICRL introduces a vital safety dial for RL, the authors note several areas for future improvement:

  • Known Rewards: The algorithm currently assumes the underlying task reward function is known, focusing solely on learning constraints. In many real-world scenarios, both must be inferred simultaneously.
  • Online Training Dependency: Like most ICRL methods, CA-ICRL requires an active simulator for the "Forward Step." Transitioning to purely offline learning from static datasets is a crucial next step.
  • Computational Complexity: The algorithm computes similarity by comparing the agent's current trajectories against every expert trajectory. This may not scale efficiently to massive datasets without further optimization.
  • Perfect Experts Assumption: The model assumes all expert demonstrations are infallible. Future iterations will need to account for noisy, sub-optimal, or contradictory expert data.

Summary updated

BibTeX
@inproceedings{subramanian2024confidence,
  author = {Sriram Ganapathi Subramanian and Guiliang Liu and Mohammed Elmahgiubi and Kasra Rezaee and Pascal Poupart},
  title = {{Confidence Aware Inverse Constrained Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=6TCeizkLJV},
}
Figure