A Nonparametric Off-Policy Policy Gradient

Samuele Tosatto, João Carvalho, Hany Abdulsamad, Jan Peters

Abstract

Reinforcement learning (RL) algorithms still suffer from high sample complexity despite outstanding recent successes. The need for intensive interactions with the environment is especially observed in physical systems like robotics, where data collection is slow and costly. This paper introduces the Nonparametric Off-Policy Policy Gradient (NOPG), a novel algorithm designed to solve the "sample hunger" problem by leveraging nonparametric models to derive a closed-form, full-gradient estimate from offline data.

The Challenge of Sample Complexity

While RL has triumphed in simulated environments and games, its transition to the physical world is hindered by the sheer volume of data required. Most popular policy gradient methods are "on-policy," requiring fresh interactions every time the agent's strategy is updated. This is often impractical for real hardware.

Existing off-policy alternatives, which learn from logged data, typically fall into two categories, both with significant flaws:

  1. Semi-gradient methods (e.g., DDPG): These use a mathematical shortcut that ignores how the value function changes with the policy. This "semi-gradient" bias can lead to sub-optimal convergence or divergence when the data is strongly off-policy.
  2. Importance Sampling (e.g., PWIS): These re-weight trajectories to correct for data mismatch but often suffer from "variance explosion," making the resulting gradients too noisy for stable learning.

The NOPG Approach: Full Gradients via Nonparametrics

The core innovation of NOPG is the Nonparametric Bellman Equation (NPBE). Instead of approximating the value function globally with a neural network, the authors employ nonparametric techniques:

  • Nadaraya-Watson Regression to estimate the mean reward function.
  • Kernel Density Estimation (KDE) to model transition dynamics.

By substituting these kernels into the Bellman equation, the authors derive an analytical, closed-form solution for the value function. This allows for the calculation of the full gradient of the objective function with respect to policy parameters, effectively eliminating the bias found in semi-gradient methods.

Figure 3: Comparison of gradient trajectories in a 2D LQR environment. NOPG variants (D and S) closely follow the True Gradient (TG), while DPG and PWIS diverge as they move away from the data distribution.

Key Insights and Theoretical Robustness

One of the most significant theoretical findings is that the bias of the NOPG estimator does not depend directly on the sampling distribution. This makes it uniquely robust for learning from "unstructured" data or human demonstrations, where the underlying behavioral policy is unknown. Furthermore, unlike other nonparametric methods like PILCO, NOPG can handle multimodal state transitions, which are common in complex physical interactions.

Experimental Results

The authors evaluated NOPG against state-of-the-art baselines across several benchmarks, including the Swing-Up Pendulum and the Quanser Cart-Pole system.

Sample Efficiency and Stability

In both the Pendulum and Cart-Pole tasks, NOPG demonstrated a massive leap in efficiency, outperforming DDPG and PWIS by more than one order of magnitude in the number of samples required to reach an optimal policy. While baseline methods often required tens of thousands of samples to begin converging, NOPG reached high return values with significantly smaller datasets.

Figure 4: Performance curves showing Return vs. Sample Size for Pendulum and Cart-Pole tasks, alongside the physical Quanser Cart-Pole system used for validation.

Real-World and Sub-optimal Data

The policy learned by NOPG in simulation was successfully deployed on a physical Quanser Cart-Pole system, proving its "sim-to-real" viability. Additionally, in tests using human demonstrations (Mountain Car), NOPG was able to learn a policy that significantly outperformed the sub-optimal human operator who provided the initial data.

Conclusion and Future Work

NOPG provides a mathematically principled and highly efficient framework for off-policy learning. By avoiding the pitfalls of semi-gradient bias and importance sampling variance, it opens new doors for applying RL to data-constrained physical systems. While the current $O(n^2)$ complexity presents a challenge for massive datasets, future work focusing on parametric models and Bayesian frameworks promises to further scale this robust approach.

Summary updated

BibTeX
@inproceedings{tosatto2020nonparametric,
  author = {Samuele Tosatto and João Carvalho and Hany Abdulsamad and Jan Peters},
  title = {{A Nonparametric Off-Policy Policy Gradient}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2020},
  url = {https://openreview.net/forum?id=G1VhxbZMpaG},
}
Figure