On Pathologies in KL-Regularized Reinforcement Learning from Expert Demonstrations

Tim G. J. Rudner, Cong Lu, Michael Osborne, Yarin Gal, Yee Whye Teh

TL;DR

This paper identifies a critical "pathology" in reinforcement learning: when using expert demonstrations to guide an agent via KL-regularization, standard neural network models often suffer from "variance collapse." By replacing these parametric models with non-parametric Gaussian Processes, the authors eliminate exploding gradients and achieve state-of-the-art performance on complex robotic tasks.

What Problem Does This Paper Address?

Reinforcement Learning (RL) is notoriously sample-inefficient, often requiring millions of trials to learn simple tasks. To speed this up, researchers often use KL-regularization. In this setup, the agent is penalized (using Kullback-Leibler divergence) if its policy strays too far from a "reference policy" derived from expert demonstrations.

The goal is to "pull" the agent toward proven expert behavior while still allowing it to explore and improve. However, the authors noticed that this often leads to unstable training and sub-optimal performance. They discovered that the culprit isn't the expert's advice itself, but how we model the expert's uncertainty. Standard parametric models (like neural networks) tend to become "overconfident" in regions of the state space they haven't seen, causing the KL-regularized objective to break down mathematically.

Methods: Fixing Variance Collapse

The authors propose Non-Parametric Prior Actor-Critic (N-PPAC). The core innovation lies in how the behavioral reference policy ($\pi_0$) is constructed.

First, they identified the pathology: if the reference policy's predictive variance is too small in regions away from the expert data, the gradients of the RL objective will explode. Parametric neural networks trained via Maximum Likelihood Estimation (MLE) are prone to this "variance collapse"—they predict low variance even in unfamiliar states.

Parametric vs. Non-Parametric Uncertainty

Instead of a neural network, N-PPAC uses a Gaussian Process (GP) to model the expert demonstrations. Unlike neural networks, GPs are "well-calibrated": their uncertainty (variance) naturally increases as the agent moves further away from the expert's demonstrated states.

This GP-based reference policy is integrated into a standard actor-critic framework. When the agent is near expert states, the low GP variance forces it to mimic the expert. When it wanders into unknown territory, the high GP variance relaxes the KL penalty, allowing the agent to explore freely without numerical instability.

Datasets

The researchers evaluated their approach on two major suites of continuous control tasks:

  • MuJoCo Locomotion: Standard benchmarks including Ant-v2, HalfCheetah-v2, and Walker2d-v2.
  • ADROIT Dexterous Manipulation: Significantly more challenging tasks involving a 28-degree-of-freedom robotic hand. Specifically, they tested pen-binary-v0 (rotating a pen) and door-binary-v0 (unlatching and opening a door) using sparse binary rewards.

Key Insights

  • The Variance Trap: The KL penalty is a denominator-heavy calculation. If your reference model is overconfident (low variance) in a state it actually knows nothing about, the math forces the agent's gradient to infinity. This explains why many KL-regularized agents "plateau" or become unstable.
  • Uncertainty as a Safety Valve: High uncertainty in the reference policy acts as a "permission slip" for the agent to explore. By using a GP, the authors ensure the agent is only constrained when the expert's data is actually relevant.
  • Parametric Regularization Fails: Common tricks—like adding entropy regularization or using ensembles of neural networks—don't actually fix the variance collapse off-trajectory. Only the non-parametric approach provided the necessary calibration.

Key Results

N-PPAC consistently outperformed state-of-the-art baselines like AWAC, ABM, and BRAC across both MuJoCo and ADROIT tasks.

Training Curves on MuJoCo Tasks
  • Efficiency: On the difficult "door opening" task, N-PPAC achieved a 90% success rate within just 100,000 environment interactions. For comparison, the previous best method (AWAC) required 4x as many interactions to reach the same level.
  • Data Sparsity: Remarkably, N-PPAC can accelerate learning even with a single expert demonstration (1,000 data points), whereas parametric models often require much larger datasets to avoid falling into pathological training dynamics.
  • Stability: The training curves for N-PPAC are significantly smoother, showing that fixing the gradient explosion leads to much more reliable convergence.

Limitations and Future Work

  • Computational Complexity: Gaussian Processes traditionally scale poorly with the number of data points ($\mathcal{O}(N^3)$). While the authors used exact inference tricks to handle up to 15,000 points, scaling to millions of expert transitions would require sparse GP approximations or other acceleration techniques.
  • Kernel Selection: The choice of GP kernel matters. The authors found that non-smooth tasks (like those with frequent contacts) required different kernels to model the expert behavior accurately.
  • High-Dimensional Inputs: The current work focuses on state-vector inputs. Extending this to pixel-based (image) observations would likely require combining GPs with deep feature extractors (Deep Kernel Learning).

Summary updated

BibTeX
@inproceedings{rudner2021pathologies,
  author = {Tim G. J. Rudner and Cong Lu and Michael Osborne and Yarin Gal and Yee Whye Teh},
  title = {{On Pathologies in KL-Regularized Reinforcement Learning from Expert Demonstrations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=sS8rRmgAatA},
}
Figure