Hypergradient-based Bilevel Reinforcement Learning with Improved Sample Complexity

Naman Saxena, Mudit Gaur, Vaneet AggarwalarXiv 2026

TL;DR

This paper introduces Approximate Hypergradient Optimization (AHO), a scalable, Hessian-free algorithm for bilevel reinforcement learning (RL). By leveraging the mathematical optimality of the Boltzmann policy, AHO achieves a state-of-the-art sample complexity of $\tilde{O}(\epsilon^{-2})$ while completely eliminating the restrictive Polyak-Łojasiewicz (PL) condition on the outer-level objective function.

What Problem Does This Paper Address?

Bilevel reinforcement learning is a powerful framework used to model complex hierarchical problems, such as Meta-RL, hierarchical task decomposition, and Reinforcement Learning from Human Feedback (RL-HF). In RL-HF, for instance, the problem is split into two levels: an outer-level problem that optimizes reward parameters based on human preferences, and an inner-level problem that optimizes the actual policy parameters based on those rewards.

However, existing bilevel RL algorithms face a frustrating trade-off:

  1. Scalability Issues: Exact hypergradient methods rely on computing and inverting a Hessian matrix, which becomes computationally intractable when using deep neural networks with millions of parameters.
  2. Sample Inefficiency: To avoid Hessians, some recent methods use penalty-based approximations, but these suffer from poor sample complexity (typically $\tilde{O}(\epsilon^{-3})$) and require strict theoretical assumptions, such as the Polyak-Łojasiewicz (PL) condition on the outer objective.

This paper tackles this gap by designing an algorithm that is both Hessian-free (scalable) and sample-efficient, without requiring the outer-level PL condition.

Methods

The authors propose Approximate Hypergradient Optimization (AHO). The key technical innovation lies in exploiting the entropy-regularized discounted RL objective, where the optimal policy naturally takes the form of a Boltzmann policy.

Because the Boltzmann policy has a known closed-form expression, the authors can mathematically eliminate the troublesome Hessian inverse term from the hypergradient formulation.

Crucially, in practical deep RL, a neural network's policy class is often unrealizable—meaning it cannot perfectly represent every possible Boltzmann policy. To overcome this, the authors introduce gradient-shifted value functions ($U^\pi$ and $W^\pi$) to serve as surrogates for the true gradients of the Q-value and value functions. This allows them to compute an approximate hypergradient that bypasses the Hessian while maintaining strict error bounds.

Datasets

The algorithm was evaluated on two continuous-control benchmarks from the DeepMind Control Suite:

  • walker-walk: A planar bipedal robot learning to walk.
  • cheetah-run: A planar cheetah learning to run.

The authors adapted these standard single-level benchmarks into preference-based bilevel RL tasks to simulate an RL-HF environment, utilizing a scripted teacher to provide pairwise preference feedback.

Key Insights and Ideas

  • Bypassing the Hessian via Policy Structure: Instead of treating the inner-level optimization as a black box, leveraging the specific entropy-regularized structure of the RL objective allows the authors to replace a massive matrix inversion with a closed-form policy expression.
  • Embracing Non-Realizability: Most theoretical works assume a "perfect" policy class (realizability). This paper provides explicit conditions and surrogate functions to make the math work for realistic, limited-capacity neural network architectures.
  • Ditching the Outer PL Assumption: Prior state-of-the-art sample complexity bounds relied on the outer objective satisfying the PL condition. AHO removes this assumption, making its convergence guarantees applicable to a much wider array of non-convex optimization landscapes.

Key Results

The theoretical and empirical advantages of AHO are summarized below:

  • State-of-the-Art Complexity: AHO achieves an iteration complexity of $O(\epsilon^{-1})$ and improves the sample complexity bound to $\tilde{O}(\epsilon^{-2})$, outperforming the previous best penalty-based method ($\tilde{O}(\epsilon^{-3})$).
  • True Scalability: The authors note that for a standard inner policy network (e.g., two MLPs with $\sim 2.6 \times 10^6$ parameters), a Hessian-based method like PARL would require storing and inverting a matrix with $\sim 7 \times 10^{12}$ entries—an impossibility on modern hardware. AHO runs efficiently because its outer step only requires a standard backward pass through the reward network.
  • Superior Performance: In empirical tests on walker-walk and cheetah-run, AHO achieved higher total evaluation rewards faster than the leading Hessian-free baseline.

A detailed comparison of how AHO stacks up against prior literature can be seen in Table 1:

Table 1: Comparison of Bilevel RL works

Limitations and Future Work

While AHO successfully removes the PL condition assumption from the outer level, it still requires the inner-level objective function to satisfy the PL condition to ensure geometric convergence of the inner loop. Additionally, the approximation error of the hypergradient is inherently tied to the representational capacity of the chosen policy class; if the network architecture is too restrictive, approximation errors ($\epsilon_{kl}$ and $\epsilon_{fd}$) will persist. Future work could explore relaxing the inner-level PL requirement or optimizing the surrogate functions for even tighter error bounds.

Summary updated

BibTeX
@misc{saxena2026hypergradient,
  author = {Naman Saxena and Mudit Gaur and Vaneet Aggarwal},
  title = {{Hypergradient-based Bilevel Reinforcement Learning with Improved Sample Complexity}},
  year = {2026},
  eprint = {2607.28849},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.28849},
}
Figure