Introduction
Inverse Reinforcement Learning (IRL) typically focuses on recovering a reward function that explains an expert's behavior. However, many real-world tasks are governed by hard constraints rather than just positive or negative rewards. For instance, a vehicle stays in its lane not necessarily because it is "rewarding," but because crossing the boundary is a strictly forbidden violation of safety. Traditional IRL methods often struggle with these "hard nos," attempting to model them as extremely large negative rewards, which can lead to mathematical instability and fail to capture the underlying logic of the task.
This research, presented at ICLR 2020, introduces a probabilistic framework to infer these hard constraints from expert demonstrations. By extending Maximum Entropy (MaxEnt) IRL, the authors propose an algorithm—Maximum Likelihood Constraint Inference—that identifies the most likely set of constraints explaining why an expert avoids certain behaviors.
Methodology: Maximum Likelihood Constraint Inference
The proposed framework builds upon the Maximum Entropy (MaxEnt) IRL paradigm, which assumes experts are "noisily optimal." The core innovation lies in how constraints are identified and ranked.
Augmented Feature Space and Likelihood of Elimination
The authors treat states, actions, and environment features as binary indicators within an augmented feature space. This allows for a unified mathematical treatment of forbidden states and actions. The central concept is the Likelihood of Elimination: the most probable constraint is one that removes the most probability mass from the unconstrained model without excluding the actual expert demonstrations. Essentially, a constraint is deemed likely if it forbids a behavior that the agent would have otherwise performed with high probability.
Greedy Iterative Inference
Since finding the optimal set of constraints is NP-hard, the authors employ a greedy iterative approach. The algorithm selects the "best" constraint, incorporates it into the model, and repeats the process. To prevent overfitting and "hallucinating" constraints for minor behavioral variations, a stopping criterion based on KL Divergence is utilized.
Experimental Evaluation
The approach was evaluated using two primary setups: a synthetic grid world and a human obstacle avoidance task.
Synthetic Grid World
In a synthetic grid world environment, an agent moves from a start to a goal while avoiding hidden constraints, such as specific tiles or diagonal actions. The algorithm successfully recovered the majority of true constraints while correctly ignoring unnecessary ones that the expert would not have taken regardless.
Human Obstacle Avoidance
The researchers also tested the framework on real-world data by recording 16 human volunteers navigating a room with a central physical obstacle. By mapping these continuous paths onto a grid, the algorithm was able to accurately identify the location and shape of the obstacle solely by observing the humans' avoidance behavior.
Key Insights and Results
- The "Surprise" Factor: The algorithm distinguishes between states that are unvisited because they are inconvenient and those that are unvisited because they are forbidden. It focuses on "surprising" absences—locations the expert should have visited to optimize their path but did not.
- Data Efficiency and Overfitting: As the number of demonstrations increases, the rate of false-positive constraints decreases. The KL-divergence stopping criterion effectively manages the trade-off between explaining demonstrations and maintaining model simplicity.
- Succinct Representation: The paper demonstrates that complex behaviors can often be more elegantly represented by a simple reward (e.g., "reach the goal quickly") combined with hard constraints, rather than a complex, hand-tuned reward landscape.
Limitations and Future Directions
While effective, the current derivation primarily assumes a deterministic environment. Although a workaround for stochastic environments is provided, a full theoretical extension remains for future work. Additionally, the algorithm currently assumes a "perfect expert" who never violates a constraint; robustness to noisy experts who occasionally break rules is a necessary next step. Finally, the authors suggest that their feature accrual method could be expanded to learn non-Markovian constraints that depend on the history of actions.
Summary updated