Kernel Density Bayesian Inverse Reinforcement Learning

Aishwarya Mandyam, Didong Li, Diana Cai, Andrew Jones, Barbara E. Engelhardt · DOI

TL;DR

This paper introduces KD-BIRL, a novel Bayesian Inverse Reinforcement Learning (IRL) method that uses kernel density estimation to directly approximate the likelihood function. This allows KD-BIRL to leverage existing training data with known reward functions to improve posterior contraction rates, especially when expert demonstrations for a new task are scarce. The method is shown to be effective even in high-dimensional and continuous state spaces, offering theoretical guarantees for posterior consistency.

What Problem Does This Paper Address?

Inverse Reinforcement Learning (IRL) aims to infer an agent's underlying reward function by observing its behavior. While traditional IRL methods often infer a single "best" reward function, this can be problematic due to the non-identifiability of reward functions (multiple reward functions can explain the same behavior). Bayesian IRL addresses this by learning a distribution over possible reward functions, capturing uncertainty. However, existing Bayesian IRL methods often rely on approximating the likelihood function using the optimal Q-value function. This approach is computationally expensive, lacks theoretical guarantees, and the Q-value function can be a poor proxy for the true likelihood. Furthermore, these methods typically require large amounts of expert demonstration data, which are often unavailable in practical scenarios like clinical or biological applications. The paper addresses the challenge of learning reward functions with limited expert demonstrations by effectively utilizing supplementary data from related "training tasks" where both demonstrations and their corresponding reward functions are known.

Methods

The core innovation of KD-BIRL is its use of Conditional Kernel Density Estimation (CKDE) to approximate the likelihood function in Bayesian IRL. Instead of relying on the Q-value function, KD-BIRL directly models the probability of observing a state-action pair given a reward function. This CKDE approach allows the incorporation of information from training tasks, where known reward functions are available.

Specifically, KD-BIRL:

  • Approximates the Likelihood: Uses CKDE to estimate $p(\text{state, action} | \text{reward})$. This involves estimating the joint distribution of state-action pairs and rewards, and the marginal distribution of rewards, using kernel density estimation.
  • Leverages Training Data: The CKDE formulation naturally incorporates the training dataset, which consists of demonstrations and their associated reward functions. This allows the model to learn a more informed likelihood estimate.
  • Feature-Based Reward Parameterization: To handle high-dimensional and continuous state spaces where direct kernel density estimation becomes computationally prohibitive, KD-BIRL adopts a feature-based reward function. Here, the reward is represented as a linear combination of a weight vector and a low-dimensional feature encoding of the state ($R(s, a) = w^T \phi(s, a)$). The goal then becomes learning the posterior distribution over the weight vector $w$.
  • Theoretical Guarantees: The paper provides theoretical guarantees of asymptotic posterior consistency, demonstrating that as the number of test and training samples increases, the posterior distribution converges to the true reward function (or its equivalence class).

Datasets

The paper does not introduce new benchmark datasets. Instead, it utilizes:

  • Gridworld Environments: Standard Gridworld environments of varying sizes (2x2, 5x5, 10x10) are used to evaluate the method's performance in discrete state spaces.
  • Simulated Sepsis Treatment Environment: A continuous state-space environment simulating sepsis treatment is used to test KD-BIRL's applicability to more complex, real-world scenarios. This environment involves 46 physiological covariates and 24 possible treatment actions.

Key Insights and Ideas

  • Direct Likelihood Approximation is Key: Directly approximating the likelihood function using kernel density estimation, rather than relying on Q-values, is crucial for improving posterior contraction and enabling theoretical guarantees.
  • Training Data is a Powerful Prior: The ability to incorporate known reward functions from training tasks acts as a powerful form of prior information, significantly improving posterior concentration compared to methods that only use a standard informative prior.
  • Feature Engineering for Scalability: The feature-based reward function parameterization is essential for extending KD-BIRL to high-dimensional and continuous state spaces, where direct kernel density estimation would be intractable.
  • Bayesian IRL for Scarce Data: KD-BIRL demonstrates that Bayesian IRL can be made more practical and effective even with limited expert demonstrations, by intelligently leveraging related data.

Key Results

  • Faster Posterior Contraction: KD-BIRL consistently shows more concentrated posterior distributions compared to baseline methods (single-task Bayesian IRL, AVRIL, and AVRIL with an informative prior), especially in low expert demonstration data regimes. This is quantified by lower Expected Value Difference (EVD) scores.
  • Improved Performance in Low Data Regimes: In sepsis treatment settings with few test demonstrations ($n < 1000$), KD-BIRL achieves lower EVD and standard error than baselines, indicating more accurate and reliable reward inference.
  • Effective in High-Dimensional Spaces: The feature-based reward function parameterization allows KD-BIRL to perform reward inference in a 10x10 Gridworld (high-dimensional state space) and the sepsis environment, accurately recovering weight vectors and capturing key characteristics of the reward function.
  • Theoretical Guarantees: The paper provides theoretical proof that KD-BIRL's posterior distribution asymptotically contracts to the true reward function's equivalence class, ensuring theoretical soundness.

Limitations and Future Work

  • Assumption of High-Quality Demonstrations: The current KD-BIRL formulation assumes that expert demonstrations are of high quality. The performance might degrade if training task demonstrations are suboptimal.
  • Feature Completeness: The feature-based reward function assumes that the chosen features fully capture the relevant information in the state-action tuple. Further work is needed to analyze the impact of less representative features.
  • Choice of Distance Metrics and Hyperparameters: The performance of CKDE can be sensitive to the choice of distance metrics and hyperparameters. Future work could explore optimal choices for these parameters.
  • Exploring Alternative Density Estimators: The paper suggests exploring other nonparametric conditional density estimators (e.g., Gaussian processes, diffusion models) as alternatives to CKDE.
  • Efficiency Improvements: Investigating methods to speed up CKDE computation, as suggested by prior work, could further enhance KD-BIRL's efficiency.

Summary updated

BibTeX
@article{mandyam2024kernel,
  author = {Aishwarya Mandyam and Didong Li and Diana Cai and Andrew Jones and Barbara E. Engelhardt},
  title = {{Kernel Density Bayesian Inverse Reinforcement Learning}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=B80WUNhTAw},
}
Figure