Feature Construction for Inverse Reinforcement Learning

Sergey Levine, Zoran Popovic, Vladlen Koltun

Introduction

Inverse Reinforcement Learning (IRL) traditionally relies on humans to hand-engineer the "features" that define a reward function. This paper introduces FIRL (Feature construction for Inverse Reinforcement Learning), an algorithm designed to automatically build complex reward features from simple environmental components using an iterative regression tree approach. By automating feature construction, FIRL enables agents to learn sophisticated, conditional behaviors—such as knowing when it is "safe" to speed on a highway—and transfer that learned knowledge to entirely new environments.

The Challenge of Feature Engineering in IRL

In IRL, the objective is to observe an expert (e.g., a human driver) and deduce their underlying reward function. Most existing IRL methods assume the availability of a perfect set of "basis functions" or features, such as "distance to the curb" or "current speed."

However, real-world rewards are rarely simple linear combinations of these basic features. They frequently involve complex logical relationships. For instance, a driver might only care about their speed if a police car is nearby. Manually defining every possible logical combination of features is an intractable feature engineering problem. The authors address this gap between raw environmental data (component features) and the high-level logical structures that actually drive expert behavior.

Methodology

FIRL bridges the gap between simple components and complex rewards using an iterative, two-step process:

  1. The Optimization Step: Given the current set of features, the algorithm solves a quadratic program to find a reward function. The goal is to identify a reward that makes the expert's demonstrated actions appear optimal while remaining as "simple" as possible (by penalizing deviation from the current feature basis). To make this computationally feasible, the authors employ a convex relaxation of the policy constraints, which they prove is mathematically equivalent to the original constraints in deterministic environments.
  2. The Fitting Step: This step handles the actual feature construction. The algorithm takes the reward function generated in the optimization step and builds a regression tree over the state space. The "splits" in the tree are selected from a large pool of simple component features. The leaves of this resulting tree then become the new, refined features for the next iteration.
Convergence analysis and constraint violation metrics for the iterative FIRL algorithm.

The algorithm repeats these steps, growing the tree and refining the reward until it discovers a concise set of logical conjunctions (the paths in the tree) that perfectly explain the expert's behavior.

Experimental Datasets

The authors evaluated FIRL across three primary simulated environments:

  • Gridworlds: Standard $N \times N$ benchmarks (ranging from $16 \times 16$ to $256 \times 256$ states) used to compare the algorithm's speed and accuracy against baseline IRL methods like MMP and LPAL.
  • Object World: A transfer learning setup featuring randomly placed objects of different colors. This tested how well a reward function learned in one layout could be "transplanted" to a completely different layout.
  • Highway Driving Simulator: A three-lane highway populated with civilian and police vehicles. This environment tested the model's ability to learn "Lawful" versus "Outlaw" driving styles based on logical conditions (e.g., speed, lane choice, and police presence).

Key Insights

  • Rewards as Logic: A primary insight of this work is treating features as logical conjunctions. By utilizing a regression tree, FIRL naturally discovers "if-then-else" reward structures (e.g., If in the left lane AND speed is high AND police are absent, THEN reward is high).
  • Portability: Because FIRL builds its features from basic environmental components, the resulting reward function is highly portable. A reward tree learned in one scenario can be applied to another, provided the basic components remain consistent.
  • Convexity in Determinism: The authors provide a theoretical result demonstrating that for deterministic Markov Decision Processes (MDPs), a specific convex relaxation of the value function is exactly equivalent to the non-convex optimal policy constraint, making the optimization step significantly more robust.

Key Results

FIRL demonstrated strong performance across multiple evaluation metrics and environments:

  • Feature Discovery: In the Gridworld tests, FIRL achieved accuracy comparable to algorithms that were provided with "perfect" hand-engineered features, despite FIRL starting with only "primitive" coordinate-based components.
  • Superior Transfer: In the "Object World" transfer task, FIRL significantly outperformed baseline methods. While other methods failed to generalize when object layouts changed, FIRL’s logical features remained valid across different environments.
  • Complex Behavior Modeling: In the highway simulation, FIRL was the only algorithm capable of successfully capturing the "Outlaw" driver's behavior. Baseline linear models could not represent the conditional logic of slowing down only when police were near, often resulting in overly conservative policies that drove at minimum speeds everywhere to avoid potential penalties.
Performance comparison of FIRL against baseline IRL algorithms across deterministic and non-deterministic environments.

Limitations and Future Work

While promising, the FIRL approach has a few notable limitations:

  • State Enumeration: The current optimization constraints require enumerating all states in the MDP. This makes the algorithm difficult to apply directly to continuous or extremely large state spaces without further approximation techniques, such as approximate linear programming.
  • Convergence Theory: Although FIRL converges quickly in practice, providing a formal theoretical proof of convergence is challenging because regression trees do not offer the same stability guarantees as linear models.
  • Fitting Step Evolution: The authors suggest that more sophisticated "fitting" methods—perhaps utilizing Bayesian approaches to penalize overly deep trees—could further improve the algorithm's ability to avoid overfitting in noisy environments.

Summary updated

BibTeX
@inproceedings{levine2010feature,
  author = {Sergey Levine and Zoran Popovic and Vladlen Koltun},
  title = {{Feature Construction for Inverse Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2010},
}
Figure