Policy Gradient with Tree Expansion

Gal Dalal, Assaf Hallak, Gugan Thoppe, Shie Mannor, Gal Chechik

TL;DR

Policy Gradient (PG) methods are powerful reinforcement learning tools but are notoriously plagued by high gradient variance and poor sample complexity. This paper introduces SoftTreeMax, a novel, differentiable policy parameterization that embeds multi-step tree lookahead directly into the policy's logits. By doing so, the authors mathematically guarantee and empirically demonstrate an exponential decay in gradient variance as tree depth increases, yielding up to a 1000x variance reduction and up to 5x higher rewards compared to standard PPO.

What Problem Does This Paper Address?

In reinforcement learning, Policy Gradient (PG) methods like Proximal Policy Optimization (PPO) are highly favored because they are easy to distribute and don't require strict architectural assumptions about underlying value functions. However, their biggest Achilles' heel is high gradient variance. Because gradients are calculated over entire, often noisy trajectories, training can be highly unstable and sample-inefficient.

While value-based methods frequently use Tree Search (TS) to plan ahead (think AlphaGo or MuZero), directly integrating planning into the policy parameterization of PG methods to mitigate variance has remained an open challenge. This paper bridges that gap by exploring how explicit tree expansion within the policy parameterization affects gradient variance and stability.

Methods

The authors propose SoftTreeMax, a model-based generalization of the standard softmax policy. Instead of using a neural network to output static logits for a state-action pair, SoftTreeMax computes logits by looking ahead $d$ steps into a search tree.

Specifically, the logit is defined as the expected discounted cumulative reward over a horizon $d$, topped with the policy network's evaluation of the future leaf states:

Figure 2. SoftTreeMax policy. Our exhaustive parallel tree expansion iterates on all actions at each state up to depth d (= 2 here). The leaf state of every trajectory is used as input to the policy network. The output is then added to the trajectory’s cumulative reward as described in (2). I.e., instead of the standard softmax logits, we add the cumulative discounted reward to the policy network output. This policy is differentiable and can be easily integrated into any PG algorithm. In this work, we build on PPO and use its loss function to train the policy network.

The paper introduces two variants:

  1. Cumulative (C-SoftTreeMax): Exponentiates the expected trajectory score, favoring actions with higher expected returns.
  2. Exponentiated (E-SoftTreeMax): Takes the expectation outside the exponent, making it highly suitable for risk-sensitive objectives.

To make deep lookahead (up to depth 8) computationally viable, the authors implement a parallel GPU-based simulator (leveraging breadth-first expansion) and introduce a tree-pruning technique. Pruning caps the maximum tree width at 1024 nodes by sub-sampling only the most promising branches at each level, keeping memory consumption within GPU limits.

Datasets

The method was evaluated on the Atari simulation suite using Atari-CuLE, a CUDA-based Atari emulator that runs entirely on the GPU. The authors benchmarked their approach across eight distinct games: Asteroids, Breakout, Gopher, Krull, KungFuMaster, NameThisGame, Phoenix, and VideoPinball.

Key Insights and Ideas

  • Variance Decay via Mixing: The core theoretical contribution proves that gradient variance decays exponentially at a rate of $|\lambda_2|^{2(d-1)}$, where $\lambda_2$ is the second highest eigenvalue of the transition matrix induced by the tree-expansion policy. Crucially, this means an expansion policy that induces state-independent transitions (i.e., uniform mixing) yields the sharpest variance reduction.
  • The Bias-Variance Trade-off: If you don't have a perfect simulator and must use an approximate forward model, lookahead introduces a gradient bias that grows exponentially with depth ($O(d\gamma^{-d}\epsilon)$). This reveals a clear optimization sweet spot: deeper trees reduce variance but accumulate model errors.
  • Policy vs. Advantage Modification: Unlike $n$-step returns or GAE, which use lookahead solely to improve the advantage estimate ($A$) in the objective $\mathbb{E}[(\nabla \log \pi)A]$, SoftTreeMax alters the policy parameterization ($\pi$) directly. This fundamentally changes how gradients scale and flow along different eigenvectors during backpropagation.

Key Results

  • Three Orders of Magnitude Variance Drop: Empirical evaluations on Atari games confirmed that SoftTreeMax reduces gradient variance by three orders of magnitude (1000x) compared to standard PPO.
  • Outperforming Distributed Baselines with a Single Worker: Over a fixed one-week wall-clock training period, a single worker running SoftTreeMax consistently outperformed a distributed PPO baseline running 256 parallel GPU workers, achieving up to 5x higher rewards in games like Gopher.
Figure 3. Reward and Gradient variance: GPU SoftTreeMax (single worker) vs PPO (256 GPU workers). The blue reward plots show the average of 50 evaluation episodes. The red variance plots show the average gradient variance of the corresponding training runs, averaged over five seeds. The dashed lines represent the same for PPO. Note that the variance y-axis is in log-scale.
  • Theory Matches Practice: Simulated experiments on random MDPs verified that the empirical variance decay perfectly matches the predicted theoretical bounds across uniform, random, and permutation dynamics.
Empirical Variance vs Bound

Limitations and Future Work

  • Dependence on Determinism: The practical implementation relies heavily on the quasi-deterministic nature of Atari games. In highly stochastic environments, the exponential growth of tree width would present severe scaling challenges, even with pruning.
  • Discrete Action Spaces Only: The current formulation is restricted to finite, discrete action spaces. Extending SoftTreeMax to continuous domains (e.g., robotics) will require maintaining parametric distributions over actions, akin to tree-adapted Model Predictive Path Integral (MPPI) methods.
  • Learned Forward Models: While the paper provides a tight theoretical bound for gradient bias given an approximate model, the empirical validation was conducted using a true simulator. Future work will focus on integrating SoftTreeMax with learned world models to bridge the gap with fully model-based RL pipelines.

Summary updated

BibTeX
@inproceedings{dalal2025policy,
  author = {Gal Dalal and Assaf Hallak and Gugan Thoppe and Shie Mannor and Gal Chechik},
  title = {{Policy Gradient with Tree Expansion}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=yiZtLtvW9S},
}
Figure