NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Conditional Kernel Imitation Learning for Continuous State Environments

Rishabh Agrawal, Nathan Dahlin, Rahul Jain, Ashutosh Nayyar

TL;DR

This paper introduces Conditional Kernel Imitation Learning (CKIL), a novel offline imitation learning framework for continuous state environments. CKIL leverages the Markov balance equation and conditional kernel density estimation to learn policies directly from expert demonstrations without needing reward functions or online interaction, achieving state-of-the-art performance.

What Problem Does This Paper Address?

Imitation Learning (IL) aims to teach an agent to perform a task by observing expert demonstrations, offering an alternative to Reinforcement Learning (RL) when reward functions are hard to define. However, traditional IL methods like Behavioral Cloning struggle with "covariate shift" (generalizing to unseen states) and sequential decision-making. Inverse Reinforcement Learning (IRL) methods try to infer a reward function first, but are sensitive to estimation errors and can be computationally expensive. More recent methods, like Adversarial Imitation Learning (AIL), often require online interaction with the environment, making them unsuitable for "offline" scenarios where only a fixed dataset of expert trajectories is available. This paper tackles the challenge of learning effective policies from offline expert data in continuous state spaces, without access to reward signals or the ability to interact further with the environment.

Methods

The core of CKIL lies in two key components:

  • Markov Balance Equation: The authors leverage the principle that expert demonstrations should satisfy a "Markov balance equation." This equation relates the demonstrator's policy, the environment's transition dynamics, and the induced Markov chain on the state-action space. By satisfying this equation, the learned policy implicitly mimics the expert's behavior.
  • Conditional Kernel Density Estimation (CKDE): To estimate the unknown transition dynamics (how the environment changes state given an action) and the induced Markov chain, CKIL employs CKDE. This is a non-parametric method that can estimate probability distributions without assuming a specific parametric form, making it suitable for complex, continuous state spaces. CKDE is used to estimate both the joint and marginal densities required for the balance equation.

The optimization problem in CKIL aims to minimize a loss function that includes a term enforcing the Markov balance equation and an entropy regularization term to encourage more robust policies. The algorithm is designed for batch processing of offline data, making it computationally efficient.

Datasets

The paper evaluates CKIL on several standard continuous control environments from OpenAI Gym:

  • MountainCar (discretized for initial evaluation)
  • Acrobot
  • CartPole
  • LunarLander

Demonstration datasets were generated using pre-trained agents from the RL Baselines Zoo, specifically PPO for LunarLander-v2, DQN for CartPole-v1, and A2C for Acrobot-v1.

Key Insights and Ideas

  • Offline IL in Continuous Spaces is Hard: The paper highlights the inherent difficulties of learning from static datasets in continuous environments, where states are rarely revisited exactly.
  • Markov Balance as a Guiding Principle: Using the Markov balance equation as the primary objective for imitation learning, rather than directly mimicking actions (like BC) or inferring rewards (like IRL), proves to be a powerful approach for offline IL.
  • CKDE for Robust Dynamics Estimation: CKDE provides a flexible and effective way to estimate the necessary transition dynamics without strong prior assumptions, which is crucial for continuous state spaces.
  • Minimal Hyperparameter Tuning: The authors note that CKIL requires minimal hyperparameter tuning, making it more practical than some other complex IL methods.
  • Computational Efficiency: CKIL demonstrates significantly faster training times compared to other SOTA offline IL algorithms.

Key Results

  • Superior Performance: CKIL consistently outperforms several state-of-the-art offline IL, IRL, and AIL baselines across Acrobot, CartPole, and LunarLander environments.
  • Data Efficiency: CKIL achieves expert-level performance with as few as three demonstration trajectories in some environments, showcasing remarkable sample efficiency.
  • Robustness to Scarce Data: The paper emphasizes CKIL's strong performance, especially when demonstration data is scarce, a common challenge in real-world applications.
  • Theoretical Guarantees: The paper provides theoretical guarantees for the asymptotic consistency of CKDE estimates and offers sample complexity bounds.

Limitations and Future Work

  • Computational Cost of CKDE: While CKDE is effective, it can still be computationally intensive, especially for very high-dimensional state spaces.
  • Continuous Action Spaces: While the framework is conceptually extendable to continuous action spaces, additional effort is needed for numerical robustness.
  • Future Work: The authors suggest exploring scalable density estimation techniques, such as normalizing flows, to further improve efficiency and handle more complex scenarios. They also mention the potential for using this approach in real-world applications like healthcare, robotics, and autonomous vehicles where data collection is costly or unsafe.

Summary updated

BibTeX
@inproceedings{agrawal2025conditional,
  author = {Rishabh Agrawal and Nathan Dahlin and Rahul Jain and Ashutosh Nayyar},
  title = {{Conditional Kernel Imitation Learning for Continuous State Environments}},
  booktitle = {Proceedings of the 7th Annual Learning for Dynamics \& Control Conference},
  year = {2025},
  url = {https://openreview.net/forum?id=z5m2xEZ1Kx},
}
Figure