Hessian Aided Policy Gradient

Zebang Shen, Alejandro Ribeiro, Hamed Hassani, Hui Qian, Chao Mi

Introduction

This paper introduces Hessian Aided Policy Gradient (HAPG), the first reinforcement learning algorithm to provably improve the sample complexity of policy gradient methods from $O(1/\epsilon^4)$ to $O(1/\epsilon^3)$. By cleverly utilizing second-order (Hessian) information to reduce variance—while maintaining a linear computation cost—HAPG achieves significantly higher sample efficiency on complex control tasks.

The Problem: High Variance and Non-Oblivious Distributions

In Reinforcement Learning (RL), policy gradient methods like REINFORCE are popular but notoriously "sample-hungry," often requiring millions of interactions with an environment to learn effectively. This inefficiency is largely due to the high variance of gradient estimators.

While variance reduction (VR) techniques have revolutionized supervised learning, they do not translate easily to RL. In supervised learning, the data distribution is "oblivious" (fixed). In RL, however, the distribution is non-oblivious: as the policy changes, the trajectories the agent experiences also change. Previous attempts to apply VR to RL (like SVRPG) failed to improve the theoretical sample complexity because they couldn't efficiently account for how the gradient shifts as the policy evolves.

Methodology: Hessian Aided Policy Gradient

The authors propose a recursive gradient estimator that tracks the gradient across iterations:

$$g^t = g^{t-1} + \Delta^t$$

Where $\Delta^t$ is an estimate of the difference between the current gradient and the previous one.

The "secret sauce" of HAPG is how it estimates $\Delta^t$. Instead of just sampling two independent gradients (which would result in high variance), the authors use a Taylor expansion. They demonstrate that the gradient difference can be expressed as an integral of the Policy Hessian along the path between two policy parameters.

Key Technical Innovations

  • Hessian-Vector Products: To avoid the prohibitive $O(d^2)$ cost of computing a full Hessian matrix, the authors use Hessian-vector products. This allows the algorithm to run in $O(d)$ time (linear with respect to parameters), making it highly compatible with large neural networks.
  • Finite Differences: They provide a method to approximate these products using finite differences of gradients, which is computationally efficient and easy to implement.
  • Normalized Updates: The algorithm uses a normalized gradient ascent step, which helps stabilize training when using variance-reduced estimates.

Datasets and Evaluation

The algorithm was evaluated on six standard continuous control benchmarks from the MuJoCo physics engine (accessed via the garage library):

  1. CartPole (Classic control)
  2. Swimmer
  3. Walker2d
  4. Reacher
  5. Humanoid
  6. HumanoidStandup

These tasks range from simple balancing to highly complex, high-dimensional locomotion.

Key Insights

  • The Non-Oblivious Hurdle: The paper clarifies why standard variance reduction fails in RL. Because the trajectory distribution depends on the policy, a simple difference of two stochastic gradients at different points is either biased or suffers from high variance.
  • Curvature as a Bridge: By using the Hessian, the authors essentially use the "curvature" of the reward landscape to predict how the gradient will shift as the policy moves. This "look-ahead" significantly dampens the noise.
  • Efficiency without Sacrifice: The most impressive breakthrough is demonstrating that you can get the benefits of second-order information (the Hessian) without the quadratic computational blowup. By focusing only on the direction the policy is moving, the Hessian-vector product provides exactly what is needed for variance reduction at a first-order cost.

Key Results

Theoretical Breakthrough

HAPG is the first algorithm to achieve a sample complexity of $O(1/\epsilon^3)$ to find an $\epsilon$-approximate first-order stationary point. This is a significant theoretical improvement over the standard $O(1/\epsilon^4)$ complexity associated with traditional policy gradient methods.

Empirical Performance

In the MuJoCo experiments, HAPG consistently outperformed REINFORCE across the board.

Performance of HAPG vs REINFORCE across six MuJoCo environments.
  • On complex tasks like Walker2d and Humanoid, HAPG reached higher average rewards using significantly fewer "system probes" (state-action transitions).
  • The advantage was most pronounced in difficult environments where REINFORCE typically requires very large mini-batches to converge. HAPG's variance reduction allowed it to work effectively with much smaller interior mini-batches, proving its superior sample efficiency.

Limitations and Future Work

  • Local Optima: Like all policy gradient methods, HAPG aims for a first-order stationary point (a local maximum or saddle point), not necessarily the global optimum.
  • Integration with Natural Gradients: The current version uses standard gradient ascent. The authors suggest that combining HAPG with Natural Policy Gradient or TRPO (which uses the Fisher Information Matrix) could yield even better results by correcting the update direction.
  • Baseline Sensitivity: While the paper uses a standard linear baseline, the authors note that more sophisticated advantage estimators (like Generalized Advantage Estimation, or GAE) could be integrated to further boost performance.

Summary updated

BibTeX
@inproceedings{shen2019hessian,
  author = {Zebang Shen and Alejandro Ribeiro and Hamed Hassani and Hui Qian and Chao Mi},
  title = {{Hessian Aided Policy Gradient}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure