                                  Policy Gradient with Tree Expansion


                   Gal Dalal * 1 Assaf Hallak * 1 Gugan Thoppe 2 Shie Mannor 1 3 Gal Chechik 1 4


                         Abstract                                     Despite these positive features, PG algorithms are also no-
     Policy gradient methods are notorious for hav-                   toriously unstable due to the high variance of the gradients
     ing a large variance and high sample complexity.                 computed over entire trajectories (Liu et al., 2020; Xu et al.,
     To mitigate this, we introduce SoftTreeMax—a                     2020). As a result, PG algorithms tend to be highly ineffi-
     generalization of softmax that employs planning.                 cient in terms of sample complexity. Several solutions have
     In SoftTreeMax, we extend the traditional logits                 been proposed to mitigate the high variance issue, including
     with the multi-step discounted cumulative reward,                baseline subtraction (Greensmith et al., 2004; Thomas &
     topped with the logits of future states. We an-                  Brunskill, 2017; Wu et al., 2018), anchor-point averaging
     alyze SoftTreeMax and explain how tree expan-                    (Papini et al., 2018), and other variance reduction techniques
     sion helps to reduce its gradient variance. We                   (Zhang et al., 2021; Shen et al., 2019; Pham et al., 2020).
     prove that the variance depends on the chosen                    A second family of algorithms that achieved state-of-the-art
     tree-expansion policy. Specifically, we show that                results in several domains is based on planning. Planning
     the closer the induced transitions are to being                  is exercised primarily in the context of value-based RL and
     state-independent, the stronger the variance decay.              is usually implemented using a Tree Search (TS) (Silver
     With approximate forward models, we prove that                   et al., 2016; Schrittwieser et al., 2020). In this work, we
     the resulting gradient bias diminishes with the                  combine PG with TS by introducing a parameterized differ-
     approximation error while retaining the same vari-               entiable policy that incorporates tree expansion. Namely,
     ance reduction. Ours is the first result to bound                our SoftTreeMax policy replaces the standard policy logits
     the gradient bias for an approximate model. In                   of a state and action, with the expected value of trajectories
     a practical implementation of SoftTreeMax, we                    that originate from these state and action. We consider two
     utilize a parallel GPU-based simulator for fast and              variants of SoftTreeMax, one for cumulative reward and one
     efficient tree expansion. Using this implementa-                 for exponentiated reward.
     tion in Atari, we show that SoftTreeMax reduces
     the gradient variance by three orders of magni-                  Unlike approaches that incorporate multi-step returns for
     tude. This leads to better sample complexity and                 value function estimation (e.g., n-step TD methods), our
     improved performance compared to distributed                     work explicitly integrates planning into the policy parame-
     PPO.                                                             terization itself. This distinction is crucial—while n-step re-
                                                                      turns serve as a Monte Carlo estimation technique for the ad-
                                                                      vantage function A in the gradient estimator E[(∇ log π)A],
1. Introduction                                                       our SoftTreeMax affects the policy π directly. This enables
                                                                      us to obtain fundamentally different variance reduction prop-
Policy Gradient (PG) methods (Sutton et al., 1999) for Re-            erties while keeping the policy gradient framework intact.
inforcement Learning (RL) are often the first choice for
environments that allow numerous interactions at a fast pace          Combining TS and PG should be done with care given the
(Schulman et al., 2017). Their success is attributed to sev-          biggest downside of PG—its high gradient variance. This
eral factors: they are easy to distribute to multiple workers,        raises questions that were ignored until this work: (i) How
require no assumptions on the underlying value function,              to design a PG method based on tree-expansion that is sta-
and have both on-policy and off-policy variants.                      ble and performs well in practice? and (ii) How does the
                                                                      tree-expansion policy affect the PG variance? Here, we
   *
     Equal contribution 1 NVIDIA Research 2 Indian Institute of       analyze SoftTreeMax, and provide a practical methodology
Science 3 Technion University 4 Bar-Ilan University. Correspon-       to choose the expansion policy to minimize the resulting
dence to: Gal dalal <gdalal@nvidia.com>, Assaf Hallak <ahal-          variance. Our main result shows that a desirable expansion
lak@nvidia.com>.
                                                                      policy is one, under which the induced transition probabili-
Proceedings of the 42 nd International Conference on Machine          ties are similar for each starting state. More generally, we
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025           show that the gradient variance of SoftTreeMax decays at a
by the author(s).

                                                                  1
                                              Policy Gradient with Tree Expansion

rate of |λ2 |d , where d is the depth of the tree and λ2 is the       state distribution. We denote the transition matrix starting
second eigenvalue of the transition matrix induced by the             from state s by Ps ∈ [0, 1]A×S , i.e., [Ps ]a,s′ = P (s′ |a, s).
tree expansion policy. This work is the first to prove such a         Similarly, let Rs = r(s, ·) ∈ RA denote the correspond-
relation between PG variance and tree expansion policy. In            ing reward vector. Separately, let π : S → ∆A be a sta-
addition, we prove that with an approximate forward model,            tionary policy. Let P π and Rπ be the induced transition
                                                                                                                          π ′
the bias of the gradient is bounded proportionally to the                                                    P i.e., P (s |s) =
                                                                      matrix and reward function, respectively,
                                                                      P                 ′
approximation error of the model.                                        a π(a|s) Pr(s |s, a) and Rπ (s) =      a π(a|s)r(s, a). De-
                                                                      note the stationary distribution of P π by µπ ∈ RS s.t.
To verify our results, we implemented a practical version of
                                                                      µ⊤πP
                                                                            π
                                                                                = P π , and the discounted state P∞visitation     fre-
SoftTreeMax that exhaustively searches the entire tree and
                                                                      quency by dπ so that d⊤    π = (1 − γ)
                                                                                                                         t ⊤     π t
                                                                                                                    t=0 γ ν (P ) .
applies a neural network on its leaves. We test our algorithm
                                                                      Also, let V π ∈ RP     S
                                                                                               be the value function of π defined
on a parallelized Atari GPU simulator (Dalton et al., 2020).                                   ∞
                                                                             π           π
                                                                      by V (s) = E [ t=0 γ t r (st , π(st )) | s0 = s], and let
To enable a tractable deep search, up to depth eight, we
                                                                      Qπ ∈ RS×A be the Q-function such that Qπ (s, a) =
also introduce a pruning technique that limits the width of
                                                                      Eπ [r(s, a) + γV π (s′ )]. Our goal is to find an optimal pol-
the tree. We do so by sampling only the most promising                                               ⋆
                                                                      icy π ⋆ such that V ⋆ (s) ≡ V π (s) = maxπ V π (s), ∀s ∈ S.
nodes at each level. We integrate our SoftTreeMax GPU im-
plementation into the popular PPO (Schulman et al., 2017)             For the analysis in Section 4, we introduce the following
and compare it to the flat distributed variant of PPO. This           notation. Denote by Θ ∈ RS the vector representation
allows us to demonstrate the potential benefit of utilizing           of θ(s) ∀s ∈ S. For a vector u, denote by exp(u) the
learned models while isolating the fundamental properties             coordinate-wise exponent of u and by D(u) the diagonal
of TS without added noise. In all tested Atari games, our             square matrix with u in its diagonal. For a matrix A, denote
results outperform the baseline and obtain up to 5x more              its i-th eigenvalue by λi (A). Denote the k-dimensional iden-
reward. We further show in Section 6 that the associated              tity matrix and all-ones vector by Ik and 1k , respectively.
gradient variance is smaller by three orders of magnitude in          Also, denote the trace operator by Tr . Finally, we treat all
all games, demonstrating the relation between low gradient            vectors as column vectors.
variance and high reward.
We summarize our key contributions. (i) We show how to                2.1. Policy Gradient
combine two families of SoTA approaches: PG and TS by                 PG schemes seek to maximize the cumulative reward as a
introducing SoftTreeMax: a novel parametric policy that               function of the policy πθ (a|s) by performing gradient steps
generalizes softmax to planning. Specifically, we propose             on θ. The celebrated Policy Gradient Theorem (Sutton et al.,
two variants based on cumulative and exponentiated rewards.           1999) states that
(ii) We prove that the gradient variance of SoftTreeMax
                                                                      ∂ ⊤ πθ
in its two variants decays with its tree depth. Our analysis             ν V = Es∼dπθ ,a∼πθ (·|s) [∇θ log πθ (a|s)Qπθ (s, a)] ,
sheds new light on the choice of tree expansion policy. It            ∂θ
raises the question of optimality in terms of variance versus         where ν and d⊤ πθ are as defined above. The variance of the
the traditional regret; e.g., in UCT (Kocsis & Szepesvári,           gradient is thus
2006). (iii) We prove that with an approximate forward
model, the gradient bias is proportional to the approx-                     Vars∼dπθ ,a∼πθ (·|s) (∇θ log πθ (a|s)Qπθ (s, a)) .    (1)
imation error, while retaining the variance decay. This
quantifies the accuracy required from a learned forward               In the notation above, we denote the variance of a vector
model. (iv) We implement a differentiable deep version of             random variable X by
SoftTreeMax that employs a parallelized GPU tree expan-                                  h h
                                                                                                          ⊤
                                                                                                                        ii
                                                                         Varx (X) = Tr Ex (X − Ex X) (X − Ex X) ,
sion. We demonstrate how its gradient variance is reduced
by three orders of magnitude over PPO while obtaining up              similarly as in (Greensmith et al., 2004). From now on, we
to 5x reward.                                                         drop the subscript from Var in (1) for brevity. When the
                                                                      action space is discrete, a commonly used parameterized
2. Preliminaries                                                      policy is softmax: πθ (a|s) ∝ exp (θ(s, a)) , where θ : S ×
                                                                      A → R is a state-action parameterization.
Let ∆U denote simplex over the set U. Throughout, we con-
sider a discounted Markov Decision Process (MDP) M =
(S, A, P, r, γ, ν), where S is a finite state space of size S,        3. SoftTreeMax: Exponent of trajectories
A is a finite action space of size A, r : S × A → [0, 1] is the       We introduce a new family of policies called SoftTreeMax,
reward function, P : S ×A → ∆S is the transition function,            which are a model-based generalization of the popu-
γ ∈ (0, 1) is the discount factor, and ν ∈ RS is the initial          lar softmax. We propose two variants: Cumulative

                                                                  2
                                             Policy Gradient with Tree Expansion

(C-SoftTreeMax) and Exponentiated (E-SoftTreeMax). In                the best trajectory is defined in expectation, while for
both variants, we replace the generic softmax logits θ(s, a)         E-SoftTreeMax it is defined in terms of the best sample
with the score of a trajectory of horizon d starting from            path.
(s, a), generated by applying a behavior policy πb . In
                                                                     SoftTreeMax behavior policy selection. The choice of
C-SoftTreeMax, we exponentiate the expectation of the log-
                                                                     behavior policy πb plays a crucial role in the performance
its. In E-SoftTreeMax, we first exponentiate the logits and
                                                                     of SoftTreeMax. As we show in Section 4, the gradient vari-
then only compute their expectation.
                                                                     ance is minimized when the transitions induced by πb result
Logits. We define the SoftTreeMax logit ℓs,a (d; θ) to be            in similar distributions across states, which is achieved when
the random variable depicting the score of a trajectory of           the second eigenvalue of P πb is small. Without specific as-
horizon d starting from (s, a) and following the policy πb :         sumptions on the MDP, a uniform policy that smoothens
                            "d−1                #                    transition probabilities across all actions serves as a reason-
                         −d
                             X
                                  t      d                           able approximation to this goal. In practice, this leads to
         ℓs,a (d; θ) = γ         γ rt + γ θ(sd ) .       (2)         better mixing properties in the associated Markov chain.
                             t=0
                                                                     SoftTreeMax convergence. Under regularity conditions,
In the above expression, note that s0 = s, a0 = a, at ∼              for any parametric policy, PG converges to local optima
πb (·|st ) ∀t ≥ 1, and rt ≡ r (st , at ) . For brevity of the        (Bhatnagar et al., 2009), and thus also SoftTreeMax. For
analysis, we let the parametric score θ in (2) be state-based,       softmax PG, asymptotic (Agarwal et al., 2021) and rate re-
similarly to a value function. Instead, one could use a state-       sults (Mei et al., 2020b) were recently obtained, by showing
action input analogous to a Q-function. Thus, SoftTreeMax            that the gradient is strictly positive everywhere (Mei et al.,
can be integrated into the two types of implementation of RL         2020b, Lemmas 8-9). We conjecture that SoftTreeMax sat-
algorithms in standard packages. Lastly, the preceding γ −d          isfies the same property, being a generalization of softmax,
scales the θ parametrization to correspond to its softmax            but formally proving it is subject to future work.
counerpart.
                                                                     SoftTreeMax gradient. The two variants of SoftTreeMax
C-SoftTreeMax. Given an inverse temperature parameter                involve an expectation taken over S d many trajectories from
β, we let C-SoftTreeMax be                                           the root state s and weighted according to their probability.
                                                                     Thus, during the PG training process, the gradient ∇θ log πθ
             C
            πd,θ (a|s) ∝ exp [βEπb ℓs,a (d; θ)] .         (3)
                                                                     is calculated using a weighted sum of gradients over all
C-SoftTreeMax gives higher weight to actions that result             reachable states starting from s. Our method exploits the
in higher expected returns. While standard softmax relies            exponential number of trajectories to reduce the variance
entirely on parametrization θ, C-SoftTreeMax also interpo-           while improving performance. Indeed, in the next section
lates a Monte-Carlo portion of the reward.                           we prove that the gradient variance of SoftTreeMax decays
                                                                     exponentially fast as a function of the behavior policy πb and
E-SoftTreeMax.      The second operator we propose is                trajectory length d. In the experiments in Section 6, we also
E-SoftTreeMax:                                                       show how the practical version of SoftTreeMax achieves
                                                                     a significant reduction in the noise of the PG process and
            E
           πd,θ (a|s) ∝ Eπb exp [(βℓs,a (d; θ))] ;        (4)
                                                                     leads to faster convergence and higher reward.
here, the expectation is taken outside the exponent. This
objective corresponds to the exponentiated reward objec-             4. Theoretical Analysis
tive which is often used for risk-sensitive RL (Howard
& Matheson, 1972; Fei et al., 2021; Noorani & Baras,                 In this section, we first bound the variance of PG when
2021). The common risk-sensitive objective is of the form            using the SoftTreeMax policy. Later, we discuss how the
log E[exp(δR)], where δ is the risk parameter and R is the           gradient bias resulting due to approximate forward models
cumulative reward. Similarly to that literature, the exponent        diminishes as a function of the approximation error, while
in (4) emphasizes the most promising trajectories.                   retaining the same variance decay.

SoftTreeMax properties. SoftTreeMax is a natural model-              We show that the variance decreases with the tree depth,
based generalization of softmax. For d = 0, both variants            and the rate is determined by the second eigenvalue of the
above coincide since (2) becomes deterministic. In that case,        transition kernel induced by πb . Specifically, we bound the
for a state-action parametrization, they reduce to standard          same expression for variance as appears in (Greensmith
softmax. When β → 0, both variants again coincide and                et al., 2004, Sec. 3.5) and (Wu et al., 2018, Sec. A, Eq. (21)).
sample actions uniformly (exploration). When β → ∞,                  Other types of analysis could instead have focused on the
the policies become deterministic and greedily optimize              estimation aspect in the context of sampling (Zhang et al.,
for the best trajectory (exploitation). For C-SoftTreeMax,           2021; Shen et al., 2019; Pham et al., 2020). Indeed, in

                                                                 3
                                            Policy Gradient with Tree Expansion

our implementation in Section 5, we manage to avoid sam-            Lemma 4.2 (Vector form of C-SoftTreeMax). For d ≥ 1,
pling and directly compute the expectations in Eqs. (3) and         (3) is given by
(4). As we show later, we do so by leveraging efficient                                  h                       i
                                                                                                            d−1
parallel simulation on the GPU in feasible run-time. In our                          exp β Cs,d + Ps (P πb )    Θ
                                                                         C
application, due to the nature of the finite action space and          πd,θ (·|s) =       h                       i , (5)
                                                                                    1⊤                    πb d−1 Θ
quasi-deterministic Atari dynamics (Bellemare et al., 2013),                         A exp β Cs,d + Ps (P )
our expectation estimator is noiseless. We encourage future
work to account for the finite-sample variance component.           where
We defer all the proofs to Appendix A.                                                             "d−1                           #
                                                                                                    X
                                                                                    −d                        h−d        πb h−1
We begin with a general variance bound that holds for any                Cs,d = γ        Rs + Ps          γ         (P    )           Rπb .
parametric policy.                                                                                  h=1

Lemma 4.1 (Bound on the policy gradient variance). Let
∇θ log πθ (·|s) ∈ RA×dim(θ) be a matrix whose a-th row is           The vector Cs,d ∈ RA represents the cumulative discounted
∇θ log πθ (a|s)⊤ . For any parametric policy πθ and func-           reward in expectation along the trajectory of horizon d.
tion Qπθ : S × A → R,                                               This trajectory starts at state s, involves an initial reward
                                                                    dictated by Rs and an initial transition as per Ps . Thereafter,
   Var (∇θ log πθ (a|s)Qπθ (s, a)) ≤                                it involves rewards and transitions specified by Rπb and
                               2                                    P πb , respectively. Once the trajectory reaches depth d, the
              max [Qπθ (s, a)] max∥∇θ log πθ (·|s)∥2F .
               s,a                 s                                score function θ(sd ) is applied,.
                                                                    Lemma 4.3 (Gradient of C-SoftTreeMax). The
Hence, to bound (1), it is sufficient to bound the Frobenius        C-SoftTreeMax gradient is given by
norm ∥∇θ log πθ (·|s)∥F for any s.
                                                                                                    C ⊤            d−1
                                                                                C
                                                                                                       ) Ps (P πb )
                                                                                                        
                                                                        ∇θ log πd,θ = β IA − 1A (πd,θ                  ,
Note that SoftTreeMax does not reduce the gradient uni-
formly, which would have been equivalent to a trivial change
                                                                    in RA×S , where for brevity, we drop the s index in the policy
in the learning rate. While the gradient norm shrinks, the                        C      C
                                                                    above, i.e., πd,θ ≡ πd,θ (·|s).
gradient itself scales differently along the different coor-
dinates. This scaling occurs along different eigenvectors,          We are now ready to present our first main result:
as a function of problem parameters (P , θ) and our choice
of behavior policy (πb ), as can be seen in the proof of the        Theorem 4.4 (Variance decay of C-SoftTreeMax). For ev-
upcoming Theorem 4.4. This allows SoftTreeMax to learn              ery Q : S × A → R, the C-SoftTreeMax policy gradient
a good “shrinkage” that, while reducing the overall gradient,       variance is bounded by
still updates the policy quickly enough. This reduction in                           C
                                                                                                    
norm and variance resembles the idea of gradient clipping               Var ∇θ log πd,θ (a|s)Q(s, a) ≤
(Zhang et al., 2019), where the gradient is scaled to reduce                                           A2 S 2 β 2
                                                                                                   2              |λ2 (P πb )|2(d−1) .
its variance, thus increasing stability and improving overall                                          (1 − γ)2
performance.
A common assumption in the RL literature (Szepesvári,              We provide the full proof in Appendix A.4, and briefly
2010) that we adopt for the remainder of the section is that        outline its essence here.
the transition matrix P πb , induced by the behavior policy
πb , is irreducible and aperiodic. Consequently, its second         Proof outline. Lemma 4.1 allows us to bound the variance
highest eigenvalue satisfies |λ2 (P πb )| < 1.                      using a direct bound on the gradient norm. The gradient is
From now on, we divide the variance results for the                 given in Lemma 4.3 as a product of three matrices, which
two variants of SoftTreeMax into two subsections. For               we now study from right to left. The matrix P πb is a row-
C-SoftTreeMax, the analysis is simpler and we provide an            stochastic matrix. Because the associated Markov chain is
exact bound. The case of E-SoftTreeMax is more involved             irreducible and aperiodic, it has a unique stationary distri-
and we provide for it a more general result. In both cases,         bution. This implies that P πb has one and only one eigen-
we show that the variance decays exponentially with the             value equal to 1; all others have magnitude strictly less
planning horizon.                                                   than 1. Let us suppose that all these other eigenvalues have
                                                                    multiplicity 1 (the general case with repeated eigenvalues
4.1. Variance of C-SoftTreeMax                                      can be handled via Jordan decompositions as in (Pelletier,
                                                                                                πb
                                                                    1998, Lemma1)). Then,  PSP has the       spectral decomposi-
We express C-SoftTreeMax in vector form as follows.                                   ⊤
                                                                    tion P = 1S µπb + i=2 λi vi u⊤
                                                                           πb
                                                                                                         i , where  λi is the i-th

                                                                4
                                              Policy Gradient with Tree Expansion

eigenvalue of P πb (ordered in descending order accord-                4.2. Variance of E-SoftTreeMax
ing to their magnitude) and ui and vi are the correspond-
                                                                       The proof of the variance bound for E-SoftTreeMax is sim-
ing left and right eigenvectors,    respectively, and therefore
                          PS      d−1                                  ilar to that of C-SoftTreeMax, but more involved. It also
(P πb )d−1 = 1S µ⊤   πb +    i=2 λi   vi u⊤
                                          i . The second matrix
                                                                       requires the assumption that the reward depends only on the
in the gradient relation in Lemma 4.3, Ps , is a rectangu-
                                                                       state, i.e. r(s, a) ≡ r(s). This is indeed the case in most
lar transition matrix that translates the vector of all ones
                                                                       standard RL environments such as Atari and Mujoco.
from dimension
        h             S to Ai : Ps 1S = 1A . Lastly, the first
matrix IA − 1A (πd,θ    C ⊤
                          ) is a projection whose null-space           Lemma 4.5 (Vector form of E-SoftTreeMax). For d ≥ 1,
                                  h                  i                 (4) is given by
                                               C ⊤
includes the vector 1A , i.e., IA − 1A (πd,θ      ) 1A = 0.
Combining the three properties above when multiplying the                              E              Es,d exp(βΘ)
                                                                                      πd,θ (·|s) =                   ,              (6)
three matrices of the gradient, it is easy to see that the first                                     1⊤
                                                                                                      A Es,d exp(βΘ)
term in the expression for (P πb )d−1 gets canceled, and we
                                                                       where
are left with bounded summands scaled by λi (P πb )d−1 .
Recalling that |λi (P πb )| < 1 and that |λ2 | ≥ |λ3 | ≥ . . .                              d−1
                                                                                            Y
                                                                                                  D exp(βγ h−d R) P πb .
                                                                                                                     
for i = 2, . . . , S, we obtain the desired result.                             Es,d = Ps
                                                                                            h=1

                                                                       The vector R above is the S-dimensional vector whose s-th
It’s important to note that SoftTreeMax does not reduce the            coordinate is r(s).
gradient uniformly, which would be equivalent to simply
decreasing the learning rate. Rather, the gradient is scaled           The matrix Es,d ∈ RA×S has a similar role to Cs,d from (5),
differently along different eigenvectors, with scaling fac-            but it represents the exponentiated cumulative discounted
tors that depend on the MDP structure and behavior policy              reward. Accordingly, it is a product of d matrices as opposed
πb . This non-uniform scaling allows the policy to continue            to a sum. It captures the expected reward sequence starting
learning effectively while reducing harmful variance. The              from s and then iteratively following P πb . After d steps, we
empirical results in Section 6 demonstrate that this variance          apply the score function on the last state as in (6).
reduction leads to faster, more stable convergence rather              Lemma 4.6 (Gradient of E-SoftTreeMax). The
than slowing it down.                                                  E-SoftTreeMax gradient is given by
Theorem 4.4 guarantees that the variance of the gradient                             E
                                                                             ∇θ log πd,θ
                                                                                                        E ⊤
                                                                                         = β IA − 1A (πd,θ
                                                                                                             
                                                                                                           ) ×
decays with d. More importantly, it also provides a novel                           −1
insight for choosing the behavior policy πb as the policy                         E
                                                                             D πd,θ      Es,d D(exp(βΘ))
that minimizes the absolute second eigenvalue of the P πb .                          ⊤
                                                                                                             ∈ RA×S ,
                                                                                    1A Es,d exp(βΘ)
Indeed, the second eigenvalue of a Markov chain relates to
its connectivity and its rate of convergence to the stationary         where for brevity, we drop the s index in the policy above,
distribution (Levin & Peres, 2017).                                           E
                                                                       i.e., πd,θ    E
                                                                                  ≡ πd,θ (·|s).
Optimal variance decay. For the strongest reduction
in variance, the behavior policy πb should be chosen                   This gradient structure is harder to handle than that of
to achieve an induced Markov chain whose transitions                   C-SoftTreeMax in Lemma 4.3, but here we also can bound
are state-independent. In that case, P πb is a rank one                the decay of the variance nonetheless.
matrix of the form 1S µ⊤                 πb
                           πb , and λ2 (P ) = 0. Then,                 Theorem 4.7 (Variance decay of E-SoftTreeMax). There
Var (∇θ log πθ (a|s)Q(s, a)) = 0. Naturally, this can only             exists α ∈ (0, 1) such that,
be done for pathological MDPs; see Appendix C.1 for a
                                                                                            E
                                                                                               (a|s)Q(s, a) ∈ O β 2 α2d ,
                                                                                                                      
more detailed discussion. Nevertheless, as we show in Sec-                    Var ∇θ log πd,θ
tion 5, we choose our tree expansion policy to reduce the
variance as best as possible.                                          for every Q. Further, if P πb is reversible or if the reward is
                                                                       constant, then α = |λ2 (P πb )|.
Worst-case variance decay. In contrast, and somewhat
surprisingly, when πb is chosen so that the dynamics is                Theory versus Practice. We demonstrate the above result in
deterministic, there is no guarantee that it will decay expo-          simulation. We draw a random finite MDP, parameter vector
nentially fast. For example, if P πb is a permutation matrix,          Θ ∈ RS+ , and behavior policy πb . We then empirically
then λ2 (P πb ) = 1, and advancing the tree amounts to only            compute the PG variance of E-SoftTreeMax as given in
updating the gradient of one state for every action, as in the         (1) and compare it to |λ2 (P πb )|d . We repeat this experiment
basic softmax.                                                         three times for different P πb : (i) close to uniform, (ii) drawn

                                                                   5
                                                     Policy Gradient with Tree Expansion

                                                                                                 C
                                                                         gradient bias due to π̂d,θ satisfies
                     102
                                                                                ∂           C
                                                                                                    ∂  ⊤ π̂d,θ C
                                                                                                                   
                     10 4                                                             ν ⊤ V πd,θ −         ν V          =              (7)
                                                                                ∂θ                   ∂θ
                    10 10
                                                                                                                              
Gradient variance



                                                                                                                1          2
                                                                                                      O                 Sβ   dϵ  .
  SoftTreeMax




                    10 16                                                                                  (1 − γ)2 γ d
                            Permutation: Empirical variance
                    10 22   Permutation: Variance bound                  Proof outline. First, we prove that max{∥Rs − R̂s ∥, ∥Ps −
                            Random: Empirical variance
                    10 28   Random: Variance bound                       P̂s ∥, ∥Rπb − R̂πb ∥, ∥P πb − P̂ πb ∥} = O(ϵ). This follows
                    10 34   Uniform: Empirical variance                  from the fact that the differences above are suitable convex
                            Uniform: Variance bound                      combinations of either the rows of P − P̂ or r − r̂. We use
                                                                                                                                 C
                                                                         the above observation along with the definitions of πd,θ    and
                            2       4       6         8       10           C                                 C     C
                                                                         π̂d,θ given in (5) to show that ∥πd,θ − π̂d,θ ∥ = O(βdϵ). The
                                          Depth d
                                                                         proof for the latter builds upon two key facts: (a) ∥(P πb )k −
                                                                                        Pk
Figure 1. A comparison of the empirical PG variance and our              (P̂ πb )k ∥ ≤             πb h−1
                                                                                           h=1 ∥P̂ ∥       ∥P̂ πb − P πb ∥∥pπb ∥k−h =
bound for E-SoftTreeMax on randomly drawn MDPs. We                       O(kϵ) for any k ≥ 0, and (b) |ex − 1| = O(x) as x → 0.
present three cases for P πb : (i) close to uniform, (ii) drawn          Next, we decompose the LHS of (7) to get
randomly, and (iii) close to a permutation matrix. This exper-                                                 !
                                                                                        4             4
iment verifies the optimal and worse-case rate decay cases.                      X Y                Y
The variance bounds here are taken from Theorem 4.7 where                                 Xi (s) −      X̂i (s) =
we substitute α = |λ2 (P πb )|. To account for the constants,                   s    i=1             i=1
we match the values for the first point in d = 1.                               4
                                                                               XX                                                
                                                                                          X̂1 (s) · · · X̂i−1 (s) Xi (s) − X̂i (s) ×
                                                                                s   i=1

randomly, and (iii) close to a permutation matrix. As seen                                            Xi+1 (s) · · · X4 (s),
in Figure 1, the empirical variance and our bound match                  where X1 (s)          =     dπd,θ
                                                                                                       C (s)      ∈     R, X2 (s)      =
almost identically. This also suggests that α = |λ2 (P πb )|                      C
                                                                         (∇θ log πd,θ (·|s))⊤ ∈ RS×A , X3 (s) = D(πd,θ
                                                                                                                   C
                                                                                                                       (·|s)) ∈
in the general case and not only when P πb is reversible or                                                C

when the reward is constant.                                             RA×A , X4 (s)            =    Qπd,θ (s, ·)  ∈   RA×A , and
                                                                                                                               C
                                                                         X̂1 (s), . . . , X̂4 (s) are similarly defined with πd,θ    re-
                                                                                          C
4.3. Bias with an Approximate Forward Model                              placed by π̂d,θ . Then, we show that, for i = 1, . . . , 4, (i)
                                                                         ∥Xi (s) − X̂i (s)∥ = O(ϵ) and (ii) max{∥Xi ∥, ∥X̂i ∥} is
The definition of the two SoftTreeMax variants involves the              bounded by problem parameters. From this, the desired
knowledge of the underlying environment, in particular the               result follows.
value of P and r. However, in practice, we often can only
learn approximations of the dynamics from interactions,
                                                                         To the best of our knowledge, Theorem 4.8 is the first re-
e.g., using NNs (Ha & Schmidhuber, 2018; Schrittwieser
                                                                         sult that bounds the bias of the gradient of a parametric
et al., 2020). Let P̂ and r̂ denote the approximate ker-
                                                                         policy due to an approximate model. This theorem reveals
nel and reward functions, respectively. In this section, we
                                                                         an intriguing trade-off in SoftTreeMax: while the variance
study the consequences of the approximation error on the
                                                                         decays exponentially with tree depth d as O(|λ2 (P πb )|d−1 )
C-SoftTreeMax gradient.
                                                                         according to Theorem 4.4, the gradient bias with an ap-
       C
Let π̂d,θ  be the C-SoftTreeMax policy defined given the                 proximate model grows as O(dγ −d ). Since γ −d grows
approximate forward model introduced above. That is, let                 exponentially with d, there exists an optimal tree depth that
  C                                                                      balances these opposing effects.
π̂d,θ be defined exactly as in (5), but using R̂s , P̂s , R̂πb
and P̂ πb , instead of their unperturbed counterparts from               The bias also depends on the temperature parameter β, with
Section 2. Then, the variance of the corresponding gradient              higher temperature (lower β) reducing bias at the expense
again decays exponentially with a decay rate of λ2 (P̂ πb ).             of more exploratory policies. In the extreme case of β = 0,
However, a gradient bias is introduced. In the following, we             the policy becomes uniform with no bias. Additionally, the
bound this bias in terms of the approximation error and other            error scales linearly with d because the policy suffers from
problem parameters. The proof is provided in Appendix                    cumulative error as it relies on further-looking states in the
A.9.                                                                     approximate model.
Theorem 4.8. Let ϵ be the maximal model mis-specification,               These results suggest that if the learned model is accurate
i.e., let max{∥P − P̂ ∥, ∥r − r̂∥} = ϵ. Then the policy                  enough, we can expect similar convergence properties for

                                                                     6
                                            Policy Gradient with Tree Expansion

C-SoftTreeMax as we would obtain with the true dynamics.            During training, the gradient propagates to the NN weights
In practice, one should adjust both d and β based on the            of Wθ . When the gradient ∇θ log πd,θ is calculated at each
estimated accuracy of the forward model to achieve the best         time step, it updates Wθ for all leaf states, similarly to
performance. This is particularly important for practitioners       Siamese networks (Bertinetto et al., 2016). An illustration
implementing SoftTreeMax with learned forward models.               of the policy is given in Figure 2.

5. SoftTreeMax: Deep Parallel                                       6. Experiments
   Implementation                                                   We conduct our experiments on multiple games from the
Following impressive successes of deep RL (Mnih et al.,             Atari simulation suite (Bellemare et al., 2013). As a baseline,
2015; Silver et al., 2016), using deep NNs in RL is standard        we train a PPO (Schulman et al., 2017) agent with 256
practice. Depending on the RL algorithm, a loss function            GPU workers in parallel (Dalton et al., 2020). For the tree
is defined and gradients on the network weights can be              expansion, we employ a GPU breadth-first as in (Dalal
calculated. In PG methods, the scoring function used in             et al., 2021). We then train C-SoftTreeMax 1 for depths
the softmax is commonly replaced by a neural network                d = 1 . . . 8, with a single worker. For depths d ≥ 3, we
Wθ : πθ (a|s) ∝ exp (Wθ (s, a)) . Similarly, we implement           limited the tree to a maximum width of 1024 nodes and
SoftTreeMax by replacing θ(s) in (2) with a neural network          pruned trajectories with low estimated weights. Since the
Wθ (s). Although both variants of SoftTreeMax from Sec-             distributed PPO baseline advances significantly faster in
tion 3 involve computing an expectation, this can be hard in        terms of environment steps, for a fair comparison, we ran all
general. One approach to handle it is with sampling, though         experiments for one week on the same machine. For more
these introduce estimation variance into the process. We            details see Appendix B.
leave the question of sample-based theory and algorithmic           In Figure 3, we plot the reward and variance of SoftTreeMax
implementations for future work.                                    for each game, as a function of depth. The dashed lines
Instead, in finite action space environments such as Atari,         are the results for PPO. Each value is taken after conver-
we compute the exact expectation in SoftTreeMax with an             gence, i.e., the average over the last 20% of the run. The
exhaustive TS of depth d. Despite the exponential computa-          numbers represent the average over five seeds per game.
tional cost of spanning the entire tree, recent advancements        The plot conveys three intriguing conclusions. First, in all
in parallel GPU-based simulation allow efficient expansion          games, SoftTreeMax achieves significantly higher reward
of all nodes at the same depth simultaneously (Dalal et al.,        than PPO. Its gradient variance is also orders of magnitude
2021; Rosenberg et al., 2022). This is possible when a simu-        lower than that of PPO. Second, the reward and variance
lator is implemented on GPU (Dalton et al., 2020; Makoviy-          are negatively correlated and mirror each other in almost
chuk et al., 2021; Freeman et al., 2021), or when a forward         all games. This phenomenon demonstrates the necessity
model is learned (Kim et al., 2020; Ha & Schmidhuber,               of reducing the variance of PG for improving performance.
2018). To reduce the complexity to be linear in depth, we           Lastly, each game has a different sweet spot in terms of
apply tree pruning to a limited width in all levels. We do so       optimal tree depth. Recall that we limit the run-time in all
by sub-sampling only the most promising branches at each            experiments to one week The deeper the tree, the slower
level. Limiting the width drastically improves runtime, and         each step and the run consists of less steps. This explains the
enables respecting GPU memory limits, with only a small             non-monotone behavior as a function of depth. For a more
sacrifice in performance.                                           thorough discussion on the sweet spot of different games,
                                                                    see Appendix B.5.
To summarize, in the practical SoftTreeMax algorithm we
perform an exhaustive tree expansion with pruning to obtain
trajectories up to depth d. We expand the tree with equal           7. Related Work
weight to all actions, which corresponds to a uniform tree          Reducing variance in PG estimates is essential for improving
expansion policy πb . We apply a neural network on the leaf         efficiency and stability. Approaches include baseline sub-
states, and accumulate the result with the rewards along each       traction (Sutton et al., 1999; Weaver & Tao, 2001), action-
trajectory to obtain the logits in (2). Finally, we aggregate       dependent baselines (Wu et al., 2018), sub-sampling tech-
the results using C-SoftTreeMax. We leave experiments               niques like SVRPG (Papini et al., 2018), and natural policy
E-SoftTreeMax for future work on risk-averse RL.
                                                                        1
                                                                          We also experimented with E-SoftTreeMax and the results
For a detailed illustration of our GPU-based tree expansion         were almost identical. This is due to the quasi-deterministic nature
implementation, see Appendix B.2. In addition, we provide           of Atari, which causes the trajectory logits (2) to have almost no
the psudeocode for C-SoftTreeMax in Algorithm 1 and                 variability. We encourage future work on E-SoftTreeMax using
its integration with PPO in Algorithm 2 in Appendix B.3.            probabilistic environments that are risk-sensitive.



                                                                7
                                                     Policy Gradient with Tree Expansion

                                                           ($)
                                                         𝑎!"$       ($,$)           Policy          $,$
                                                                  𝑆!"#             network
                                                                                               𝑊(𝑆!"# )
                                                                                                             logits
                                               ($)
                                       ($)    𝑆!"$        (()
                                                         𝑎!"$
                                                                                                                   (%)
                                                                                                             for 𝑎!"#
                                      𝑎!")                          ($,()                          $,(
                                                                                               𝑊(𝑆!"# )
                                                                  𝑆!"#
                                                           ($)
                                                          𝑎!"$      (#,$)                            #,$
                                       (#)
                                      𝑎!")                         𝑆!"#                         𝑊(𝑆!"# )
                                                (#)
                               𝑆!")           𝑆!"$                                                           logits
                                                                                                                    (')
                                                           (()                                               for 𝑎!"#
                                                          𝑎!"$     (#,()                            #,(
                                                                  𝑆!"#                          𝑊(𝑆!"# )


                                       (()                 ($)
                                      𝑎!")                𝑎!"$      ((,$)                           (,$
                                                (()
                                              𝑆!"$                 𝑆!"#                        𝑊(𝑆!"# )
                                                                                                             logits
                                                            (()                                                   (()
                                                           𝑎!"$                                              for 𝑎!"#
                                                                   ((,()                            (,(
                                                                  𝑆!"#                         𝑊(𝑆!"# )


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.




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.


gradient (Kakade, 2001). Multi-step returns for value esti-                     et al., 2021; Silva et al., 2019). It’s important to distinguish
mation, such as n-step TD (Sutton et al., 1998) and GAE                         between tree search and our approach of tree expansion.
(Schulman et al., 2015), primarily affect learning targets                      Traditional tree search methods like MCTS identify the best
rather than policy parameterization. Our approach differs by                    trajectory through a selection process, while our approach
integrating planning directly into the policy structure, mak-                   explores all possible trajectories up to a certain depth to
ing it fundamentally different from both variance reduction                     compute an improved policy. Recent work by Efroni et al.
techniques and multi-step return methods.                                       (2018) showed that multi-step greedy policies improve con-
                                                                                vergence rates, and Protopapas & Barakat (2024) combined
Softmax Operator. The softmax policy became a canonical
                                                                                policy mirror descent with lookahead planning, though us-
part of PG to the point where theoretical results of PG focus
                                                                                ing different mechanisms than our SoftTreeMax policy.
specifically on it (Zhang et al., 2021; Mei et al., 2020b; Li
et al., 2021; Ding et al., 2022). Even though we focus on                       Parallel Environments. In this work we used accurate
a tree extension to the softmax policy, our methodology is                      parallel models that are becoming more common with the
general and can be easily applied to other discrete or contin-                  increasing popularity of GPU-based simulation (Makoviy-
uous parameterized policies as in (Mei et al., 2020a; Miahi                     chuk et al., 2021; Dalton et al., 2020; Freeman et al., 2021).


                                                                            8
                                              Policy Gradient with Tree Expansion

Alternatively, in relation to Theorem 4.8, one can rely on            based approaches like MuZero and policy gradient methods.
recent works that learn the underlying model (Ha & Schmid-            Additionally, adapting the behavior policy πb over time as
huber, 2018; Schrittwieser et al., 2020) and use an approxi-          learning progresses could lead to more relevant exploration,
mation of the true dynamics. Risk Aversion. Previous work             though this requires careful management to maintain vari-
considered exponential utility functions for risk aversion            ance reduction benefits. Finally, the E-SoftTreeMax variant
(Chen et al., 2007; Garcıa & Fernández, 2015; Fei et al.,            offers potential applications in risk-sensitive RL by natu-
2021). This utility function is the same as E-SoftTreeMax             rally emphasizing exceptional trajectories through its reward
formulation from (4), but we have it directly in the policy           exponentiation structure.
instead of the objective. Reward-free RL. We showed
that the gradient variance is minimized when the transitions          Acknowledgements
induced by the behavior policy πb are uniform. This is ex-
pressed by the second eigenvalue of the transition matrix             Gugan Thoppe’s research is supported by the Walmart Cen-
P πb . This notion of uniform exploration is common to the            tre for Tech Excellence at IISc, the Indo-French Centre for
reward-free RL setup (Jin et al., 2020). Several such works           the Promotion of Advanced Research—CEFIPRA (7102-1),
also considered the second eigenvalue in their analysis (Liu          DST SERB’s Core Research Grant CRG/2021/008330, and
& Brunskill, 2018; Tarbouriech & Lazaric, 2019).                      the Pratiksha Trust Young Investigator Award.

8. Discussion and Future Work                                         Impact Statement
In this work, we introduced for the first time a differentiable       This paper presents work whose goal is to advance the field
parametric policy that combines TS with PG. We proved that            of Machine Learning. There are many potential societal
SoftTreeMax is essentially a variance reduction technique             consequences of our work, none which we feel must be
and explained how to choose the expansion policy to mini-             specifically highlighted here.
mize the gradient variance. It is an open question whether
optimal variance reduction corresponds to the appealing               Reproducibility and Limitations
regret properties the were put forward by UCT (Kocsis &
Szepesvári, 2006). We believe that this can be answered by           The code for our implementation is available at
analyzing the convergence rate of SoftTreeMax, relying on             https://github.com/NVlabs/SoftTreeMax.
the bias and variance results we obtained here.                       We provide a docker file for setting up the environment
                                                                      and a README file with instructions on how to run
As the learning process continues, the norm of the gradient
                                                                      both training and evaluation. The environment engine
and the variance both become smaller. On the face of it, one
                                                                      is an extension of Atari-CuLE (Dalton et al., 2020), a
can ask if the gradient becomes small as fast as the variance
                                                                      CUDA-based Atari emulator that runs on GPU. Our usage
or even faster can there be any meaningful learning? As
                                                                      of a GPU environment is both a novelty and a current
we showed in the experiments, learning happens because
                                                                      limitation of our work.
the variance reduces fast enough (a variance of 0 represents
deterministic learning, which is fastest).                            There are additional limitations to consider. First, our anal-
                                                                      ysis focuses on MDPs with finite state and action spaces,
Our work can be extended to infinite action spaces,
                                                                      and while we discuss theoretical extensions to continuous
where the theoretical analysis would involve transition ker-
                                                                      domains, practical implementations would require careful
nels rather than matrices while preserving the same non-
                                                                      design choices to manage the sampling process efficiently.
expansive operator properties. For implementation, the tree
                                                                      Second, while SoftTreeMax can be applied to any environ-
of continuous actions can be expanded by maintaining a
                                                                      ment, it provides most benefit in quasi-deterministic envi-
parametric distribution over actions depending on θ, similar
                                                                      ronments where accurate forward planning is possible. In
to a tree adaptation of MPPI (Williams et al., 2017) with a
                                                                      highly stochastic environments, the exponential growth of
value function. This would significantly broaden the appli-
                                                                      the tree width with depth would present challenges even
cability of SoftTreeMax to important domains like robotics
                                                                      with pruning.
and continuous control.
Further important extensions include learning the forward             References
model from interactions (Ha & Schmidhuber, 2018; Schrit-
twieser et al., 2020) rather than using the true dynamics. Our        Agarwal, A., Kakade, S. M., Lee, J. D., and Mahajan, G.
analysis in Theorem 4.8 already provides theoretical guid-              On the theory of policy gradient methods: Optimality,
ance on the resulting gradient bias, but empirical validation           approximation, and distribution shift. J. Mach. Learn.
with learned models would bridge the gap between model-                Res., 22(98):1–76, 2021.


                                                                  9
                                              Policy Gradient with Tree Expansion

Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M.                learning. Journal of Machine Learning Research, 5(9),
  The arcade learning environment: An evaluation plat-                   2004.
  form for general agents. Journal of Artificial Intelligence
                                                                       Ha, D. and Schmidhuber, J. World models. arXiv preprint
  Research, 47:253–279, 2013.
                                                                         arXiv:1803.10122, 2018.
Bertinetto, L., Valmadre, J., Henriques, J. F., Vedaldi, A.,
                                                                       Howard, R. A. and Matheson, J. E. Risk-sensitive markov
  and Torr, P. H. Fully-convolutional siamese networks for
                                                                         decision processes. Management science, 18(7):356–369,
  object tracking. In European conference on computer
                                                                        1972.
  vision, pp. 850–865. Springer, 2016.
                                                                       Jin, C., Krishnamurthy, A., Simchowitz, M., and Yu, T.
Bhatnagar, S., Sutton, R. S., Ghavamzadeh, M., and Lee,                   Reward-free exploration for reinforcement learning. In
  M. Natural actor–critic algorithms. Automatica, 45(11):                 International Conference on Machine Learning, pp. 4870–
  2471–2482, 2009.                                                        4879. PMLR, 2020.
Chatterjee, S. and Seneta, E. Towards consensus: Some                  Kakade, S. M. A natural policy gradient. Advances in neural
  convergence theorems on repeated averaging. Journal of                 information processing systems, 14, 2001.
  Applied Probability, 14(1):89–97, 1977.
                                                                       Kim, S. W., Zhou, Y., Philion, J., Torralba, A., and Fi-
Chen, X., Sim, M., Simchi-Levi, D., and Sun, P. Risk                     dler, S. Learning to simulate dynamic environments with
  aversion in inventory management. Operations Research,                 gamegan. In Proceedings of the IEEE/CVF Conference
  55(5):828–842, 2007.                                                   on Computer Vision and Pattern Recognition, pp. 1231–
                                                                         1240, 2020.
Dalal, G., Hallak, A., Dalton, S., Mannor, S., Chechik, G.,
  et al. Improve agents without retraining: Parallel tree              Kocsis, L. and Szepesvári, C. Bandit based monte-carlo
  search with off-policy correction. Advances in Neural                  planning. In European conference on machine learning,
  Information Processing Systems, 34:5518–5530, 2021.                    pp. 282–293. Springer, 2006.

Dalton, S. et al. Accelerating reinforcement learning                  Levin, D. A. and Peres, Y. Markov chains and mixing times,
  through gpu atari emulation. Advances in Neural In-                    volume 107. American Mathematical Soc., 2017.
  formation Processing Systems, 33:19773–19782, 2020.                  Li, G., Wei, Y., Chi, Y., Gu, Y., and Chen, Y. Softmax
Ding, Y., Zhang, J., and Lavaei, J. On the global optimum                policy gradient methods can take exponential time to
  convergence of momentum-based policy gradient. In                      converge. In Conference on Learning Theory, pp. 3107–
  International Conference on Artificial Intelligence and                3110. PMLR, 2021.
  Statistics, pp. 1910–1934. PMLR, 2022.                               Liu, Y. and Brunskill, E. When simple exploration is sample
                                                                         efficient: Identifying sufficient conditions for random
Efroni, Y., Dalal, G., Scherrer, B., and Mannor, S. Beyond
                                                                         exploration to yield pac rl algorithms. arXiv preprint
  the one-step greedy approach in reinforcement learning.
                                                                         arXiv:1805.09045, 2018.
  In International Conference on Machine Learning, pp.
  1387–1396. PMLR, 2018.                                               Liu, Y., Zhang, K., Basar, T., and Yin, W. An improved
                                                                         analysis of (variance-reduced) policy gradient and natural
Fei, Y., Yang, Z., Chen, Y., and Wang, Z. Exponential                    policy gradient methods. Advances in Neural Information
  bellman equation and improved regret bounds for risk-                  Processing Systems, 33:7624–7636, 2020.
  sensitive reinforcement learning. Advances in Neural
  Information Processing Systems, 34:20436–20446, 2021.                Makoviychuk, V., Wawrzyniak, L., Guo, Y., Lu, M., Storey,
                                                                        K., Macklin, M., Hoeller, D., Rudin, N., Allshire, A.,
Freeman, C. D., Frey, E., Raichuk, A., Girgin, S., Mordatch,            Handa, A., et al. Isaac gym: High performance gpu-based
  I., and Bachem, O. Brax-a differentiable physics en-                  physics simulation for robot learning. arXiv preprint
  gine for large scale rigid body simulation. In Thirty-fifth           arXiv:2108.10470, 2021.
  Conference on Neural Information Processing Systems
  Datasets and Benchmarks Track (Round 1), 2021.                       Mathkar, A. S. and Borkar, V. S. Nonlinear gossip. SIAM
                                                                        Journal on Control and Optimization, 54(3):1535–1557,
Garcıa, J. and Fernández, F. A comprehensive survey on safe            2016.
  reinforcement learning. Journal of Machine Learning
  Research, 16(1):1437–1480, 2015.                                     Mei, J., Xiao, C., Dai, B., Li, L., Szepesvári, C., and Schu-
                                                                        urmans, D. Escaping the gravitational pull of softmax.
Greensmith, E., Bartlett, P. L., and Baxter, J. Variance reduc-         Advances in Neural Information Processing Systems, 33:
  tion techniques for gradient estimates in reinforcement               21130–21140, 2020a.

                                                                  10
                                             Policy Gradient with Tree Expansion

Mei, J., Xiao, C., Szepesvari, C., and Schuurmans, D. On              Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and
 the global convergence rates of softmax policy gradient                Klimov, O. Proximal policy optimization algorithms.
 methods. In International Conference on Machine Learn-                 arXiv preprint arXiv:1707.06347, 2017.
 ing, pp. 6820–6829. PMLR, 2020b.
                                                                      Shen, Z., Ribeiro, A., Hassani, H., Qian, H., and Mi, C. Hes-
Miahi, E., MacQueen, R., Ayoub, A., Masoumzadeh, A.,                    sian aided policy gradient. In International conference
 and White, M. Resmax: An alternative soft-greedy oper-                 on machine learning, pp. 5729–5738. PMLR, 2019.
 ator for reinforcement learning. 2021.
                                                                      Silva, A., Killian, T., Rodriguez, I. D. J., Son, S.-H., and
Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness,              Gombolay, M. Optimization methods for interpretable
 J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidje-                differentiable decision trees in reinforcement learning.
 land, A. K., Ostrovski, G., et al. Human-level control                  arXiv preprint arXiv:1903.09338, 2019.
 through deep reinforcement learning. nature, 518(7540):
 529–533, 2015.                                                       Silver, D., Huang, A., Maddison, C. J., Guez, A., Sifre, L.,
                                                                        Van Den Driessche, G., Schrittwieser, J., Antonoglou, I.,
Noorani, E. and Baras, J. S. Risk-sensitive reinforce: A                 Panneershelvam, V., Lanctot, M., et al. Mastering the
  monte carlo policy gradient algorithm for exponential                  game of go with deep neural networks and tree search.
  performance criteria. In 2021 60th IEEE Conference                     nature, 529(7587):484–489, 2016.
  on Decision and Control (CDC), pp. 1522–1527. IEEE,
  2021.                                                               Sutton, R. S., Barto, A. G., et al. Reinforcement learning:
                                                                        An introduction, volume 1. MIT press Cambridge, 1998.
Papini, M., Binaghi, D., Canonaco, G., Pirotta, M., and
  Restelli, M. Stochastic variance-reduced policy gradi-              Sutton, R. S., McAllester, D., Singh, S., and Mansour, Y.
  ent. In International conference on machine learning, pp.             Policy gradient methods for reinforcement learning with
  4026–4035. PMLR, 2018.                                                function approximation. Advances in neural information
                                                                        processing systems, 12, 1999.
Pelletier, M. On the almost sure asymptotic behaviour of
  stochastic algorithms. Stochastic processes and their               Szepesvári, C. Algorithms for reinforcement learning. Syn-
  applications, 78(2):217–244, 1998.                                    thesis lectures on artificial intelligence and machine
                                                                        learning, 4(1):1–103, 2010.
Pham, N., Nguyen, L., Phan, D., Nguyen, P. H., Dijk, M.,
  and Tran-Dinh, Q. A hybrid stochastic policy gradient               Tarbouriech, J. and Lazaric, A. Active exploration in markov
  algorithm for reinforcement learning. In International                decision processes. In The 22nd International Confer-
  Conference on Artificial Intelligence and Statistics, pp.             ence on Artificial Intelligence and Statistics, pp. 974–982.
  374–385. PMLR, 2020.                                                  PMLR, 2019.

Protopapas, K. and Barakat, A. Policy mirror descent with             Thomas, P. S. and Brunskill, E. Policy gradient meth-
  lookahead. Advances in Neural Information Processing                  ods for reinforcement learning with function approxi-
  Systems, 37:26443–26481, 2024.                                        mation and action-dependent baselines. arXiv preprint
                                                                        arXiv:1706.06643, 2017.
Raffin, A., Hill, A., Ernestus, M., Gleave, A., Kanervisto,
  A., and Dormann, N. Stable baselines3, 2019.                        Weaver, L. and Tao, N. The optimal reward baseline for
                                                                       gradient-based reinforcement learning. In Proceedings
Rosenberg, A., Hallak, A., Mannor, S., Chechik, G., and                of the Seventeenth conference on Uncertainty in artificial
  Dalal, G. Planning and learning with adaptive lookahead.             intelligence, pp. 538–545, 2001.
  arXiv preprint arXiv:2201.12403, 2022.
                                                                      Williams, G., Wagener, N., Goldfain, B., Drews, P., Rehg,
Schrittwieser, J., Antonoglou, I., Hubert, T., Simonyan, K.,           J. M., Boots, B., and Theodorou, E. A. Information
  Sifre, L., Schmitt, S., Guez, A., Lockhart, E., Hassabis,            theoretic mpc for model-based reinforcement learning.
  D., Graepel, T., et al. Mastering atari, go, chess and shogi         In 2017 IEEE International Conference on Robotics and
  by planning with a learned model. Nature, 588(7839):                 Automation (ICRA), pp. 1714–1721. IEEE, 2017.
  604–609, 2020.
                                                                      Wu, C., Rajeswaran, A., Duan, Y., Kumar, V., Bayen, A. M.,
Schulman, J., Moritz, P., Levine, S., Jordan, M., and Abbeel,          Kakade, S., Mordatch, I., and Abbeel, P. Variance reduc-
  P. High-dimensional continuous control using generalized             tion for policy gradient with action-dependent factorized
  advantage estimation. arXiv preprint arXiv:1506.02438,               baselines. In International Conference on Learning Rep-
  2015.                                                                resentations, 2018.

                                                                 11
                                            Policy Gradient with Tree Expansion

Xu, P., Gao, F., and Gu, Q. An improved convergence
  analysis of stochastic variance-reduced policy gradient.
  In Uncertainty in Artificial Intelligence, pp. 541–551.
  PMLR, 2020.
Zhang, J., He, T., Sra, S., and Jadbabaie, A. Why gradient
  clipping accelerates training: A theoretical justification
  for adaptivity. arXiv preprint arXiv:1905.11881, 2019.

Zhang, J., Ni, C., Szepesvari, C., Wang, M., et al. On the
  convergence and sample efficiency of variance-reduced
  policy gradient method. Advances in Neural Information
  Processing Systems, 34:2228–2240, 2021.




                                                               12
                                               Policy Gradient with Tree Expansion

Appendix
A. Proofs
A.1. Proof of Lemma 4.1 – Bound on the policy gradient variance
For any parametric policy πθ and function Q : S × A → R,
                                                                                          2
                          Var (∇θ log πθ (a|s)Q(s, a)) ≤ max [Q(s, a)] max ∥∇θ log πθ (·|s)∥2F ,
                                                                      s,a                       s


where ∇θ log πθ (·|s) ∈ RA×dim(θ) is a matrix whose a-th row is ∇θ log πθ (a|s)⊤ .

Proof. The variance for a parametric policy πθ is given as follows:

 Var (∇θ log πθ (a|s)Q(a, s)) =Es∼dπθ ,a∼πθ (·|s) ∇θ log πθ (a|s)⊤ ∇θ log πθ (a|s)Q(s, a)2 −
                                                                                         

                                                                                                    ⊤
                                    Es∼dπθ ,a∼πθ (·|s) [∇θ log πθ (a|s)Q(s, a)] Es∼dπθ ,a∼πθ (·|s) [∇θ log πθ (a|s)Q(s, a)] ,

where Q(s, a) is the currently estimated Q-function and dπθ is the discounted state visitation frequency induced by the
policy πθ . Since the second term we subtract is always positive (it is of quadratic form v ⊤ v) we can bound the variance by
the first term:


         Var (∇θ log πθ (a|s)Q(a, s)) ≤Es∼dπθ ,a∼πθ (·|s) ∇θ log πθ (a|s)⊤ ∇θ log πθ (a|s)Q(s, a)2
                                                                                                  
                                        X         X
                                      =   dπθ (s)       πθ (a|s)∇θ log πθ (a|s)⊤ ∇θ log πθ (a|s)Q(s, a)2
                                           s               a
                                                 h             iX         X
                                                      2
                                       ≤ max [Q(s, a)] πθ (a|s)   dπθ (s)   ∇θ log πθ (a|s)⊤ ∇θ log πθ (a|s)
                                           s,a
                                                                                     s                  a
                                                               2
                                                                            X
                                       ≤ max [Q(s, a)] max                         ∇θ log πθ (a|s)⊤ ∇θ log πθ (a|s)
                                           s,a                       s
                                                                              a
                                                               2
                                       = max [Q(s, a)] max ∥∇θ log πθ (·|s)∥2F .
                                           s,a                       s




A.2. Proof of Lemma 4.2 – Vector form of C-SoftTreeMax
In vector form, (3) is given by                        h                           i
                                                                             d−1
                                                   exp β Cs,d + Ps (P πb )        Θ
                                      C
                                     πd,θ (·|s) =        h                           i ,                                 (8)
                                                  1⊤ exp  β  C     + P   (P πb )d−1 Θ
                                                   A           s,d     s

where                                                                "d−1                               #
                                                                      X
                                                 −d                                h−d        πb h−1
                                      Cs,d = γ        Rs + Ps                  γ         (P    )            Rπb .          (9)
                                                                         h=1


Proof. Consider the vector ℓs,· ∈ R|A| . Its expectation satisfies
                                                    "d−1                             #
                                                     X
                             πb                πb              t−d
                           E ℓs,· (d; θ) = E               γ         rt + θ(sd )
                                                     t=0
                                                           d−1
                                                           X
                                         = γ −d Rs +               γ t−d Ps (P πb )t−1 Rπb + Ps (P πb )d−1 Θ.
                                                           t=1

As required.

                                                                         13
                                                 Policy Gradient with Tree Expansion

A.3. Proof of Lemma 4.3 – Gradient of C-SoftTreeMax
The C-SoftTreeMax gradient of dimension A × S is given by
                                                           C ⊤             d−1
                                         C
                                                               ) Ps (P πb )
                                                                
                                 ∇θ log πd,θ = β IA − 1A (πd,θ                 ,
                                                                   C      C
where for brevity, we drop the s index in the policy above, i.e., πd,θ ≡ πd,θ (·|s).

                                      C
Proof. The (j, k)-th entry of ∇θ log πd,θ satisifes

                   C
                                       C
                                ∂ log(πd,θ (aj |s))
          [∇θ log πd,θ ]j,k =
                                      ∂θ(sk )
                                                        P h h 
                                                                                πb d−1
                                                                                            ii                  
                                                      a exp   β  C s,d + P s (P     )     Θ        β Ps (P πb )d−1 a,k
                           = β[Ps (P πb )d−1 ]j,k −                    h                        a     i
                                                               1⊤ exp   β   C     +   P   (P πb )d−1 Θ
                                                                A             s,d       s
                                                      X
                           = β[Ps (P πb )d−1 ]j,k − β    C
                                                             (a|s) Ps (P πb )d−1 a,k
                                                                                 
                                                        πd,θ
                                                           a
                                        πb d−1
                                                      C ⊤
                                                           ) Ps (P πb )d−1 k
                                                                            
                           = β[Ps (P ) ]j,k − β (πd,θ
                                                           C ⊤
                           = β[Ps (P πb )d−1 ]j,k − β 1A (πd,θ ) Ps (P πb )d−1 j,k .
                                                                             


Moving back to matrix form, we obtain the stated result.

A.4. Proof of Theorem 4.4 – Exponential variance decay of C-SoftTreeMax
The C-SoftTreeMax policy gradient is bounded by

                                                                   A2 S 2 β 2
                                              C
                                                                              |λ2 (P πb )|2(d−1) .
                                                              
                                  Var ∇θ log πd,θ (a|s)Q(s, a) ≤ 2
                                                                   (1 − γ)2

Proof. We use Lemma 4.1 directly. First of all, it is know that when the reward is bounded in [0, 1], the maximal value of
                   1
the Q-function is 1−γ as the sum as infinite discounted rewards. Next, we bound the Frobenius norm of the term achieved in
Lemma 4.3, by applying the eigen-decomposition on P πb :
                                                                          S
                                                                          X
                                                      P πb = 1S µ⊤ +            λi ui vi⊤ ,                                                (10)
                                                                          i=2

where µ is the stationary distribution of P πb , and ui and vi are left and right eigenvectors correspondingly.
                                                                                              S
                                                                                                           !
                                                                                             X
                                 ⊤         πb d−1                          ⊤            ⊤          d−1   ⊤
                                                                            
                ∥β IA,A − 1A π Ps (P ) ∥F = β∥ IA,A − 1A π Ps 1S µ +                             λi ui vi ∥F
                                                                                                             i=2
                                                                                                         S
                                                                                                                                  !
                                                                                                         X
                                                                                    ⊤
                                                                                              1A µ⊤ +           λid−1 Ps ui vi⊤
                                                                                      
                                   (Ps is stochastic)     = β∥ IA,A − 1A π                                                            ∥F
                                                                                                          i=2
                                                                                          S
                                                                                                                      !
                                                   ⊤                                ⊤
                                                                                         X
                      (projection nullifies 1A µ )        = β∥ IA,A − 1A π                          λid−1 Ps ui vi⊤       ∥F
                                                                                              i=2
                                                               S
                                                               X
                                                                     ∥ IA,A − 1A π ⊤                λid−1 Ps ui vi⊤ ∥F
                                                                                                                  
                                (triangle inequality)     ≤β
                                                               i=2
                                                                          S
                                                                          X
              (matrix norm sub-multiplicativity)          ≤ β|λd−1
                                                               2   |            ∥IA,A − 1A π ⊤ ∥F ∥Ps ∥F ∥ui vi⊤ ∥F
                                                                          i=2

                                                          = β|λd−1
                                                               2   |(S − 1)∥IA,A − 1A π ⊤ ∥F ∥Ps ∥F .

                                                                     14
                                             Policy Gradient with Tree Expansion

Now, we can bound the norm ∥IA,A − 1A π ⊤ ∥F by direct calculation:
                                                   h                           ⊤ i
                           ∥IA,A − 1A π ⊤ ∥2F = Tr IA,A − 1A π ⊤ IA,A − 1A π ⊤
                                                                    
                                                                                                               (11)
                                                   h                               i
                                              = Tr IA,A − 1A π ⊤ − π1⊤     ⊤     ⊤
                                                                      A + π π1A 1A                             (12)
                                                   = A − 1 − 1 + Aπ ⊤ π                                        (13)
                                                   ≤ 2A.                                                       (14)

From the Cauchy-Schwartz inequality,
                            XX                  2
                                                   X                 X
                  ∥Ps ∥2F =          [[Ps ]a,s ] =   ∥[Ps ]a,· ∥22 ≤   ∥[Ps ]a,· ∥1 ∥[Ps ]a,· ∥∞ ≤ A.
                                a    s                  a                 a

So,
                                                                 2
                                 C                                             C
                                                                                   (·|s)∥2F
                                                 
                     Var ∇θ log πd,θ (a|s)Q(s, a) ≤ max [Q(s, a)] max ∥∇θ log πd,θ
                                                             s,a              s
                                                              1
                                                                   ∥β IA,A − 1A π ⊤ Ps (P πb )d−1 ∥2F
                                                                                        
                                                        ≤
                                                          (1 − γ)2
                                                              1
                                                        ≤          β 2 |λ2 (P πb )|2(d−1) S 2 (2A2 ),
                                                          (1 − γ)2

which obtains the desired bound.

A.5. A lower bound on C-SoftTreeMax gradient (result not in the paper)
For completeness we also supply a lower bound on the Frobenius norm of the gradient. Note that this result does not
translate to the a lower bound on the variance since we have no lower bound equivalence of Lemma 4.1.
Lemma A.1. The Frobenius norm on the gradient of the policy is lower-bounded by:
                                                  C
                                         ∥∇θ log πd,θ (·|s)∥F ≥ C · β|λ2 (P πb )|(d−1) .                       (15)

Proof. We begin by moving to the induced l2 norm by norm-equivalence:

                     ∥β IA,A − 1A π ⊤ Ps (P πb )d−1 ∥F ≥ ∥β IA,A − 1A π ⊤ Ps (P πb )d−1 ∥2 .
                                                                        

Now, taking the vector u to be the eigenvector of the second eigenvalue of P πb :

                    ∥β IA,A − 1A π ⊤ Ps (P πb )d−1 ∥2 ≥ ∥β IA,A − 1A π ⊤ Ps (P πb )d−1 u∥2
                                                                              

                                                         = β∥ IA,A − 1A π ⊤ Ps u∥2
                                                                               

                                                         = β|λ2 (P πb )|(d−1) ∥ IA,A − 1A π ⊤ Ps u∥2 .
                                                                                             

Note that even though Ps u can be 0, that is not the common case since we can freely change πb (and therefore the
eigenvectors of P πb ).

A.6. Proof of Lemma 4.5 – Vector form of E-SoftTreeMax
For d ≥ 1, (4) is given by
                                                 E              Es,d exp(βΘ)
                                                πd,θ (·|s) =                   ,                               (16)
                                                               1⊤
                                                                A Es,d exp(βΘ)
where
                                                       d−1
                                                       Y
                                                             D exp[βγ h−d R] P πb
                                                                                 
                                           Es,d = Ps                                                           (17)
                                                       h=1

with R being the |S|-dimensional vector whose s-th coordinate is r(s).

                                                                   15
                                               Policy Gradient with Tree Expansion

Proof. Recall that                                           "                                                 #
                                                                            d−1
                                                                            X
                                                        −d                          t                d
                                      ℓs,a (d; θ) = γ            r(s) +           γ r(st ) + γ θ(sd ) .                                (18)
                                                                            t=1
and, hence,                                              "                                                          !#
                                                                                        d−1
                                                                                        X
                             exp[βℓs,a (d; θ)] = exp βγ −d              r(s) +                γ t r(st ) + γ d θ(sd )    .             (19)
                                                                                        t=1
Therefore,
                                  "        "                     d−1
                                                                                  !#                                            #
                                                                 X
                                               −d                       t
         E[exp βℓs,a (d; θ)] = E exp βγ             r(s) +             γ r(st )           E [exp [β (θ(sd ))]|s1 , . . . , sd−1 ]      (20)
                                                                 t=1
                                  "        "                     d−1
                                                                                  !#                       #
                                                                 X
                                               −d                       t                     πb
                             = E exp βγ             r(s) +             γ r(st )           P        (·|sd−1 ) exp(βΘ)                   (21)
                                                                 t=1
                                  "        "                     d−2
                                                                                  !#                                            #
                                                                 X
                             = E exp βγ −d          r(s) +             γ t r(st )         exp[βγ −1 r(sd−1 )]P πb (·|sd−1 ) exp(βΘ).   (22)
                                                                 t=1

By repeatedly using iterative conditioning as above, the desired result follows. Note that exp(βγ −d r(s)) does not depend
on the action and is therefore cancelled out with the denominator.

A.7. Proof of Lemma 4.6 – Gradient of E-SoftTreeMax
The E-SoftTreeMax gradient of dimension A × S is given by
                                                                     −1
                                                                  E
                                                               D πd,θ     Es,d D(exp(βΘ))
                                     E                 E ⊤
                                                            
                             ∇θ log πd,θ = β IA − 1A (πd,θ )          ⊤
                                                                                          ,
                                                                    1A Es,d exp(βΘ)
                                                                   E      E
where for brevity, we drop the s index in the policy above, i.e., πd,θ ≡ πd,θ (·|s).

                                      E
Proof. The (j, k)-th entry of ∇θ log πd,θ satisfies

                              E
                                                E
                                        ∂ log(πd,θ (aj |s))
                     [∇θ log πd,θ ]j,k =
                                             ∂θ(sk )
                                           ∂                  ⊤                 ⊤
                                                                                                 
                                      =           log[(E  s,d )j exp(βΘ)] − log[1A E s,d exp(βΘ)]
                                        ∂θ(sk )
                                           β(Es,d )j,k exp(βθ(sk )) β1⊤ Es,d ek exp(βθ(sk ))
                                      =              ⊤
                                                                   − A⊤
                                             (Es,d )j exp(βΘ)          1A Es,d exp(βΘ)
                                       β(Es,d ek exp(βθ(sk )))j   β1⊤                    k
                                                                     A Es,d ek exp(βθ(s ))
                                      =                         −
                                          (Es,d )⊤
                                                 j exp(βΘ)            1⊤
                                                                       A Es,d exp(βΘ)
                                        "                                       #
                                                   ⊤                  ⊤
                                                  ej                 1A
                                      =β ⊤                  −                     Es,d ek exp(βθ(sk )).
                                          ej Es,d exp(βΘ) 1⊤     E
                                                                A s,d exp(βΘ)

Hence,
                                   h                                              i
                       E
              [∇θ log πd,θ ]·,k = β D(Es,d exp(βΘ))−1 − (1⊤
                                                          A Es,d exp(βΘ))−1
                                                                            1A 1⊤                 k
                                                                                A Es,d ek exp(βθ(s ))

From this, it follows that
                                                h       −1         i E D(exp(βΘ))
                                                                       s,d
                                         E
                                 ∇θ log πd,θ        E
                                             = β D πd,θ     − 1A 1⊤
                                                                  A    ⊤
                                                                                      .                                                (23)
                                                                      1A Es,d exp(βΘ)

The desired result is now easy to see.

                                                                        16
                                              Policy Gradient with Tree Expansion

A.8. Proof of Theorem 4.7 — Exponential variance decay of E-SoftTreeMax
There exists α ∈ (0, 1) such that, for any function Q : S × A → R,
                                                     E
                                                        (a|s)Q(s, a) ∈ O β 2 α2d .
                                                                               
                                        Var ∇θ log πd,θ
If all rewards are equal (r ≡ const), then α = |λ2 (P πb )|.

Proof outline. Recall that thanks to Lemma 4.1, we can bound the PG variance using a direct bound on the gradient norm.
The definition of the induced norm is
                                                   E                    E
                                          ∥∇θ log πd,θ ∥ = max ∥∇θ log πd,θ z∥,
                                                               z:∥z∥=1
                                                                                                         PS
              E
with ∇θ log πd,θ   given in Lemma 4.6. Let z ∈ RS be an arbitrary vector such that ∥z∥ = 1. Then, z = i=1 ci zi , where ci
are scalar coefficients and zi are vectors spanning the S-dimensional space. In the full proof, we show our specific choice of
zi and prove they are linearly independent given that choice. We do note that z1 = 1S .
                                                             E
The first part of the proof relies on the fact that (∇θ log πd,θ )z1 = 0. This is easy to verify using Lemma 4.6 together with
                   h                 i
                                E ⊤
(6), and because IA − 1A (πd,θ ) is a projection matrix whose null-space is spanned by 1S . Thus,

                                                                               S
                                                                               X
                                                     E               E
                                             ∇θ log πd,θ z = ∇θ log πd,θ              ci z i .
                                                                               i=2

                                                                                           E
In the second part of the proof, we focus on Es,d from (6), which appears within ∇θ log πd,θ  . Notice that Es,d consists of
            Qd−1                h−d
                                        πb
                                            
the product h=1 D exp(βγ            R P       . Even though the elements in this product are not stochastic matrices, in the
full proof we show how to normalize each of them to a stochastic matrix Bh . We thus obtain that
                                                                         d−1
                                                                         Y
                                                  Es,d = Ps D(M1 )             Bh ,
                                                                         h=1

where M1 ∈ RS is some strictly positive vector. Then, we can apply a result by Mathkar & Borkar (2016), which itself
                                                                                                Qd−1
builds on (Chatterjee & Seneta, 1977). The result states that the product of stochastic matrices h=1 Bh of our particular
                                                                                  d−1
form converges exponentially fast to a matrix of the form 1S µ⊤ s.t. ∥1S µ⊤ − h=1 Bh ∥ ≤ Cαd for some constant C.
                                                                                Q

Lastly, 1S µ⊤
            πb gets canceled due to our choice of zi , i = 2, . . . , S. This observation along with the above fact that the
                                          E
                                             PS                d
remainder decays then shows that ∇θ log πd,θ    i=2 zi = O(α ), which gives the desired result.


Full technical proof. Let d ≥ 2. Recall that
                                                      d−1
                                                      Y
                                                            D exp[βγ h−d R] P πb ,
                                                                               
                                          Es,d = Ps                                                                      (24)
                                                      h=1

and that R refers to the S-dimensional vector whose s-th coordinate is r(s).
Define                              (
                                     P πb                                        if i = d − 1,
                               Bi =                                                                                      (25)
                                     D−1 (P πb Mi+1 )P πb D(Mi+1 )               if i = 1, . . . , d − 2,
and the vector                          (
                                            exp(βγ −1 R)                       if i = d − 1,
                                 Mi =                                                                                    (26)
                                            exp(βγ i−d R) ◦ P πb Mi+1          if i = 1, . . . , d − 2,
where ◦ denotes the element-wise product. Then,
                                                                         d−1
                                                                         Y
                                                  Es,d = Ps D(M1 )             Bi .                                      (27)
                                                                         i=1

                                                                17
                                               Policy Gradient with Tree Expansion

It is easy to see that each Bi is a row-stochastic matrix, i.e., all entries are non-negative and Bi 1S = 1S .
Next, we prove that all non-zeros entries of Bi are bounded away from 0 by a constant. This is necessary to apply the next
result from (Chatterjee & Seneta, 1977). The j-th coordinate of Mi satisfies

                                                     X
                          (Mi )j = exp[βγ i−d Rj ]    [P πb ]j,k (Mi+1 )k ≤ ∥ exp[βγ i−d R]∥∞ ∥Mi+1 ∥∞ .                     (28)
                                                      k



Separately, observe that ∥Md−1 ∥∞ ≤ ∥ exp(βγ −1 R)∥∞ . Plugging these relations in (26) gives


                  d−1                         d−1                                      Pd−1                           1
                                                                       h                       γh
                  Y                           Y
   ∥M1 ∥∞ ≤             ∥ exp[βγ h−d R]∥∞ =         ∥ exp[βγ −d R]∥γ∞ = ∥ exp[βγ −d R]∥∞ h=1        ≤ ∥ exp[βγ −d R]∥∞
                                                                                                                     1−γ
                                                                                                                         .   (29)
                  h=1                         h=1




Similarly, for every 1 ≤ i ≤ d − 1, we have that


                                               d−1                                         1
                                               Y                           h
                                    ∥Mi ∥∞ ≤          ∥ exp[βγ −d R]∥γ∞ ≤ ∥ exp[βγ −d R]∥∞
                                                                                         1−γ
                                                                                             .                               (30)
                                               h=i




The jk-th entry of Bi = D−1 (P πb Mi+1 )P πb D(Mi+1 ) is


                                         πb                     πb                    πb
                                       Pjk  [Mi+1 ]k          Pjk                   Pjk
                           (Bi )jk = P|S| π            ≥ P|S| π            ≥                 1  .                            (31)
                                      ℓ=1 Pjℓ [Mi+1 ]ℓ    ℓ=1 Pjℓ [Mi+1 ]ℓ
                                              b                  b
                                                                             ∥ exp[βγ −d R]∥∞
                                                                                            1−γ




                        πb
Hence, for non-zero Pjk    , the entries are bounded away from zero by the same. We can now proceed with applying the
following result.
                                                                                                       Qd−1
Now, by (Chatterjee & Seneta, 1977, Theorem 5) (see also (14) in (Mathkar & Borkar, 2016)), limd→∞ i=1 Bi exists and
                                                                                                            Qd−1
is of the form 1S µ⊤ for some probability vector µ. Furthermore, there is some α ∈ (0, 1) such that ε(d) :=  i=1 Bi −
1S µ⊤ satisfies


                                                          ∥ε(d)∥ = O(αd ).                                                   (32)



Pick linearly independent vectors w2 , . . . , wS such that


                                                     µ⊤ wi = 0 for i = 2, . . . , d.                                         (33)

          PS
Since i=2 αi wi is perpendicular to µ for any α2 , . . . αS and because µ⊤ exp(βΘ) > 0, there exists no choice of
                          PS
α2 , . . . , αS such that i=2 αi wi = exp(βΘ). Hence, if we let z1 = 1S and zi = D(exp(βΘ))−1 wi for i = 2, . . . , S, then
it follows that {z1 , . . . , zS } is linearly independent. In particular, it implies that {z1 , . . . , zS } spans RS .

                                                                  18
                                                  Policy Gradient with Tree Expansion
                                                        PS                  S
Now consider an arbitrary unit norm vector z :=           i=1 ci zi ∈ R         s.t. ∥z∥2 = 1. Then,

                                                       S
                                                       X
                               E               E
                       ∇θ log πd,θ z = ∇θ log πd,θ            ci zi                                                                  (34)
                                                        i=2
                                                                     −1
                                                                  E                             S
                                                            D πd,θ        Es,d D(exp(βΘ)) X
                                                    E ⊤
                                                         
                                      = β IA − 1A (πd,θ )                                          ci zi                             (35)
                                                                    1⊤
                                                                     A Es,d exp(βΘ)            i=2
                                                                     −1
                                                                  E              S
                                                            D πd,θ        Es,d X
                                                    E ⊤
                                                         
                                      = β IA − 1A (πd,θ )                          ci wi                                             (36)
                                                            1⊤
                                                             A Es,d exp(βΘ) i=2
                                                                     −1 
                                                                            1S µ⊤ + ε(d) X
                                                                  E
                                                                                          
                                                            D πd,θ                           S
                                                    E ⊤
                                                         
                                      = β IA − 1A (πd,θ )                                       ci wi                                (37)
                                                                  1⊤A Es,d exp(βΘ)          i=2
                                                                     −1
                                                                  E              S
                                                            D πd,θ        ε(d) X
                                                    E ⊤
                                                         
                                      = β IA − 1A (πd,θ )                          ci w i                                            (38)
                                                            1⊤
                                                             A Es,d exp(βΘ) i=2
                                                                     −1
                                                                  E
                                                            D   π d,θ     ε(d)D(exp(βΘ))
                                                    E ⊤
                                                         
                                      = β IA − 1A (πd,θ )                                     (z − c1 1S ),                          (39)
                                                                    1⊤
                                                                     A Es,d exp(βΘ)


                                                E                E
where (34) follows from the fact that ∇θ log πd,θ  z1 = ∇θ log πd,θ 1S = 0, (35) follows from Lemma 4.6, (36)
                              −1
holds since zi = D(exp(βΘ)) wi , (38) because µ is perpendicular wi for each i, while (39) follows by reusing
zi = D(exp(βΘ))−1 wi relation along with the fact that z1 = 1S .
From (39), it follows that

                                                                                 −1
                                                                              E
                                                                           D πd,θ
                       E                          E ⊤
                                                       
              ∥∇θ log πd,θ z∥ ≤ β∥ε(d)∥ IA − 1A (πd,θ )                                          ∥D(exp(βΘ))∥ ∥z − c1 1S ∥           (40)
                                                                      1⊤
                                                                       A Es,d exp(βΘ)

                                                                                 −1
                                                                              E
                                                                           D πd,θ
                                                     E ⊤
                                ≤ βαd (∥IA ∥ + ∥1A (πd,θ ) ∥)                                    exp(β max θ(s))∥z − c1 1S ∥         (41)
                                                                       1⊤
                                                                        A Es,d exp(βΘ)
                                                                                                         s

                                                               −1
                                                            E
                                              √          D πd,θ
                                ≤ βαd (1 +        A)                            exp(β max θ(s))∥z − c1 1S ∥                          (42)
                                                       1⊤
                                                        A Es,d exp(βΘ)
                                                                                         s

                                              √
                                ≤ βαd (1 +        A) D−1 (Es,d exp(βΘ)) exp(β max θ(s))∥z − c1 1S ∥                                  (43)
                                                                                             s
                                              √         1
                                ≤ βαd (1 +        A)              exp(β max θ(s))∥z − c1 1S ∥                                        (44)
                                              mins [Es,d exp(βΘ]s          s
                                          √        exp(β maxs θ(s))
                                ≤ βαd (1 + A)                             ∥z − c1 1S ∥                                               (45)
                                              exp(β mins θ(s)) mins |M1 |
                                          √           exp(β maxs θ(s))
                                ≤ βαd (1 + A)                                   ∥z − c1 1S ∥                                         (46)
                                              exp(β mins θ(s)) exp(β mins r(s))
                                          √
                                ≤ βαd (1 + A) exp(β[max θ(s) − min θ(s) − min r(s)])∥z − c1 1S ∥.                                    (47)
                                                                s               s            s



Lastly, we prove that ∥z−c1 1S ∥ is bounded independently of d. First, denote by c = (c1 , . . . , cS )⊤ and c̃ = (0, c2 , . . . , cS )⊤ .

                                                                      19
                                             Policy Gradient with Tree Expansion

Also, denote by Z the matrix with zi as its i-th column. Now,
                                                                          S
                                                                          X
                                                 ∥z − c1 1S ∥ = ∥               ci zi ∥                                   (48)
                                                                          i=2
                                                                   = ∥Zc̃∥                                                (49)
                                                                   ≤ ∥Z∥∥c̃∥                                              (50)
                                                                   ≤ ∥Z∥∥c∥                                               (51)
                                                                                  −1
                                                                   = ∥Z∥∥Z             z∥                                 (52)
                                                                                  −1
                                                                   ≤ ∥Z∥∥Z             ∥,                                 (53)
where the last relation is due to z being a unit vector. All matrix norms here are l2 -induced norms.
Next, denote by W the matrix with wi in its i-th column. Recall that in (33) we only defined w2 , . . . , wS . We now set
w1 = exp(βΘ). Note that w1 is linearly independent of {w2 , . . . , wS } because of (33) together with the fact that µ⊤ w1 > 0.
We can now express the relation between Z and W by Z = D−1 (exp(βΘ))W. Substituting this in (53), we have
                               ∥z − c1 1S ∥ ≤ ∥D−1 (exp(βΘ))W ∥∥W −1 D(exp(βΘ))∥                                          (54)
                                                            −1                               −1
                                            ≤ ∥W ∥∥W             ∥∥D(exp(βΘ))∥∥D                  (exp(βΘ))∥.             (55)
It further holds that
                            ∥D(exp(βΘ))∥ ≤ max exp (βθ(s)) ≤ max{1, exp[β max θ(s)])},                                    (56)
                                                   s                                                 s

where the last relation equals 1 if θ(s) < 0 for all s. Similarly,
                                                         1                      1
                          ∥D−1 (exp(βΘ))∥ ≤                        ≤                           .                          (57)
                                                  mins exp (βθ(s))   min{1, exp[β mins θ(s)])}
Furthermore, by the properties of the l2 -induced norm,
                                             √
                                 ∥W ∥2 ≤ S∥W ∥1                                                                           (58)
                                             √
                                          = S max ∥wi ∥1                                                                  (59)
                                                1≤i≤S
                                             √
                                          = S max{exp(βΘ), max ∥wi ∥1 }                                                   (60)
                                                            2≤i≤S
                                             √
                                          ≤ S max{1, exp[β max θ(s)], max ∥wi ∥1 )}.                                      (61)
                                                                          s               2≤i≤S


Lastly,
                                                              1
                                           ∥W −1 ∥ =                                                                      (62)
                                                           σmin (W )
                                                            S−1
                                                                                 !
                                                            Y    σmax (W )              1
                                                       ≤                                                                  (63)
                                                             i=1
                                                                  σi (W )            σmin (W )
                                                                          S−1
                                                        (σmax (W ))
                                                       = QS                                                               (64)
                                                           i=1 σi (W )
                                                            ∥W ∥S−1
                                                       =              .                                                   (65)
                                                           | det(W )|
The determinant of W is a sum of products involving its entries. To upper bound (65) independently of d, we lower bound
its denominator by upper and lower bounds on the entries [W ]i,1 that are independent of d, depending on their sign:
                             min{1, exp[β min θ(s)])} ≤ [W ]i,1 ≤ max{1, exp[β max θ(s)])}.                               (66)
                                             s                                                       s

Using this, together with (53), (55), (56), (57), and (61), we showed that ∥z − c1 1S ∥ is upper bounded by a constant
independent of d. This concludes the proof.

                                                                   20
                                            Policy Gradient with Tree Expansion

A.9. Bias Estimates
Lemma A.2. For any matrix A and Â,
                                                        k
                                                        X
                                           Âk − Ak =         Âh−1 (Â − A)Ak−h .
                                                        h=1


Proof. The proof follows from first principles:
                        k
                        X                             k
                                                      X                         k
                                                                                X
                              Âh−1 (Â − A)Ak−h =          Âh−1 ÂAk−h −            Âh−1 AAk−h                        (67)
                        h=1                           h=1                       h=1
                                                      k
                                                      X                   k
                                                                          X
                                                  =         Âh Ak−h −          Âh−1 Ak−h+1                             (68)
                                                      h=1                 h=1
                                                                    k−1
                                                                    X                    k
                                                                                         X
                                                  = Âk − Ak +            Âh Ak−h −           Âh−1 Ak−h+1              (69)
                                                                    h=1                  h=2

                                                  = Âk − Ak .                                                           (70)




                                                                                                       C         C
Henceforth, ∥ · ∥ will refer to ∥ · ∥∞ , i.e. the induced infinity norm. Also, for brevity, we denote πd,θ and π̂d,θ by πθ and
π̂θ , respectively. Similarly, we use dπθ and dπ̂θ to denote dπd,θ
                                                                 C         C . As for the induced norm of the matrix P and its
                                                                    and dπ̂d,θ
perturbed counterpart P̂ , which are of size S × A × S, we slightly abuse notation and denote ∥P − P̂ ∥ = maxs {∥Ps − P̂s ∥},
where Ps is as defined in Section 2.
Definition A.3. Let ϵ be the maximal model mis-specification, i.e., max{∥P − P̂ ∥, ∥r − r̂∥} = ϵ.
Lemma A.4. Recall the definitions of Rs , Ps , Rπb and P πb from Section 2, and respectively denote their perturbed
counterparts by R̂s , P̂s , R̂πb and P̂ πb . Then, for ϵ defined in Definition A.3,

                           max{∥Rs − R̂s ∥, ∥Ps − P̂s ∥, ∥Rπb − R̂πb ∥, ∥P πb − P̂ πb ∥} = O(ϵ).                         (71)

Proof. The proof follows easily from the fact that the differences above are convex combinations of P − P̂ and r − r̂.

Lemma A.5. Let πθ be as in (5), and let π̂θ also be defined as in (5), but with Rs , Ps , P πb replaced by their perturbed
counterparts R̂s , P̂s , P̂ πb throughout. Then,
                                                 C
                                               ∥πd,θ     C
                                                     − π̂d,θ ∥ = O(βdγ −d ϵ).                                            (72)

Proof. To prove the desired result, we work with (5) to bound the error between Rs , Ps , P πb , Rπb and their perturbed
versions.
First, we apply Lemma A.2 together with Lemma A.4 to obtain that ∥(P πb )k − (P̂ πb )k ∥ = O(kϵ). Next, denote by M the
argument in the exponent in (5), i.e.
                                          M := β[Cs,d + Ps (P πb )d−1 Θ].

Similarly, let M̂ be the corresponding perturbed sum that relies on P̂ and r̂. Combining the bounds from Lemma A.4, and
using the triangle inequality, we have that ∥M̂ − M ∥ = O(βdγ −d ϵ). The factor γ −d appears because Cs,d includes the
term γ −d as shown in Lemma 4.2.
Eq. (5) states that the C-SoftTreeMax policy in the true environment is πθ = exp(M )/(1⊤ exp(M )). Similarly define π̂θ
using M̂ for the approximate model. Then,

                                   π̂θ = (πθ ◦ exp(M̂ − M ))1⊤ exp(M )/(1⊤ exp(M̂ )),

                                                               21
                                                    Policy Gradient with Tree Expansion

where ◦ denotes element-wise multiplication.               Using the above relation, we have that ∥π̂θ − πθ ∥                  =
                  )1⊤ exp(M )
∥πθ ∥∥ exp(M̂1−M
              ⊤ exp(M̂ )
                              − 1∥. Using the relation |ex
                                                           − 1| = O(x) as x → 0, the desired result follows.


                                                            C
Theorem A.6. Let ϵ be as in Definition A.3. Further let π̂d,θ  being the corresponding approximate policy as given in
Lemma 4.2. Then, the policy gradient bias is bounded by
                                                                                      
                              ∂    ⊤ πθ
                                              ∂    ⊤ π̂θ
                                                                       1       2  −d
                                  ν V       −     ν V         =O             Sβ dγ ϵ .                           (73)
                              ∂θ               ∂θ                   (1 − γ)2

We first provide a proof outline for conciseness, and only after it the complete proof.

Proof outline. First, we prove that max{∥Rs − R̂s ∥, ∥Ps − P̂s ∥, ∥Rπb − R̂πb ∥, ∥P πb − P̂ πb ∥} = O(ϵ). This follows from
the fact that the differences above are suitable convex combinations of either the rows of P − P̂ or r − r̂. We use the above
                                             C
observation along with the definitions of πd,θ        C
                                                and π̂d,θ                               C
                                                          given in (5) to show that ∥πd,θ       C
                                                                                            − π̂d,θ ∥ = O(βdγ −d ϵ). The proof for
                                                                          k
the latter builds upon two key facts: (a) ∥(P πb )k − (P̂ πb )k ∥ ≤ h=1 ∥P̂ πb ∥h−1 ∥P̂ πb − P πb ∥∥pπb ∥k−h = O(kϵ) for any
                                                                       P
k ≥ 0, and (b) |ex − 1| = O(x) as x → 0. Next, we decompose the LHS of (7) to get
                    4           4
                                          !         4
            X Y                 Y              XX                                              
                       Xi (s) −    X̂i (s) =            X̂1 (s) · · · X̂i−1 (s) Xi (s) − X̂i (s) × Xi+1 (s) · · · X4 (s),
             s    i=1               i=1                s   i=1

                                                          ⊤
                 C (s) ∈ R, X2 (s) = (∇θ log π
where X1 (s) = dπd,θ                           C
                                               d,θ (·|s))   ∈ RS×A , X3 (s) = D(πd,θ
                                                                                 C
                                                                                     (·|s)) ∈ RA×A , X4 (s) =
   C
Qπd,θ (s, ·) ∈ RA×A , and X̂1 (s), . . . , X̂4 (s) are similarly defined with πd,θ
                                                                                 C                 C
                                                                                     replaced by π̂d,θ . Then, we show that, for
i = 1, . . . , 4, (i) ∥Xi (s) − X̂i (s)∥ = O(γ −d ϵ) and (ii) max{∥Xi ∥, ∥X̂i ∥} is bounded by problem parameters. From this,
the desired result follows.

Proof. We have
                 ∂                ∂  ⊤ πθ′ 
                    ν ⊤ V πθ −
                            
                                       ν V                                                                                   (74)
                 ∂θ              ∂θ
                 = Es∼dπθ ,a∼πθ (·|s) [∇θ log πθ (a|s)Qπθ (s, a)] − Es∼dπ̂θ ,a∼π̂θ (·|s) ∇θ log π̂θ (a|s)Qπ̂θ (s, a)
                                                                                                                    
                                                                                                                             (75)
                    X
                         dπθ (s)πθ (a|s)∇θ log πθ (a|s)Qπθ (s, a) − dπ̂θ (s)π̂θ (a|s)∇θ log π̂θ (a|s)Qπ̂θ (s, a)
                                                                                                                  
                 =                                                                                                           (76)
                     s,a
                     X
                 =          dπθ (s)(∇θ log πθ (·|s))⊤ D(πθ (·|s))Qπθ (s, ·)                                                  (77)
                      s
                                                                             
                   − dπ̂θ (s)(∇θ log π̂θ (·|s))⊤ D(π̂θ (·|s))Qπ̂θ (s, ·)                                                     (78)
                           4            4
                                                    !
                   X Y                 Y
                 =           Xi (s) −       X̂i (s)                                                                          (79)
                      s     i=1             i=1
                      4
                     XX                                                 
                 =               X̂1 (s) · · · X̂i−1 (s) Xi (s) − X̂i (s) Xi+1 (s) · · · X4 (s),                             (80)
                      s    i=1

where X1 (s) = dπθ (s) ∈ R, X2 (s) = (∇θ log πθ (·|s))⊤ ∈ RS×A , X3 (s) = D(πθ (·|s)) ∈ RA×A , X4 (s) = Qπθ (s, ·) ∈
RA×A , and X̂1 (s), . . . , X̂4 (s) are similarly defined with πθ replaced by π̂θ .
Therefore,
                                            ∂             ∂  ⊤ πθ′           
                                               ν ⊤ V πθ −
                                                       
                                                             ν V      ≤ max Γ(s) S,                                          (81)
                                            ∂θ            ∂θ             s

where
                                          4
                                          X                                            
                             Γ(s) = ∥           X̂1 (s) · · · X̂i−1 (s) Xi (s) − X̂i (s) Xi+1 (s) · · · X4 (s)∥.             (82)
                                          i=1

                                                                       22
                                               Policy Gradient with Tree Expansion

Next, since dπθ , dπ̂θ , πθ , and π̂θ are all distributions, we have

                                       max{|X1 (s)|, |X̂1 (s)|, |X3 (s, a)|, |X̂3 (s, a)|} ≤ 1.                      (83)

Separately, using Lemma 4.3, we have

                             ∥X2 ∥ = ∥∇θ log πθ (a|s)∥ ≤ β(∥IA ∥ + ∥1A πθ⊤ ∥)∥Ps ∥∥(P πb )d−1 ∥.                     (84)

Since all rows of the above matrices have non-negative entries that add up to 1, we get

                                                               ∥Y ∥ ≤ 2β.                                            (85)

In the rest of the proof, we bound each of ∥X1 − X̂1 ∥, . . . , ∥X4 − X̂4 ∥.
Finally,
                                                                         1
                                                           ∥X4 ∥ ≤          .                                        (86)
                                                                        1−γ
Similarly, the same bounds hold for X̂1 , X̂2 , X̂3 and X̂4 .
From, we have
                                                                ∞
                                                                X
                                    ∥X1 − X̂1 ∥ ≤ (1 − γ)             γ t ∥ν ⊤ (P πθ )t − ν ⊤ (P π̂θ )t ∥            (87)
                                                                t=0
                                                                      X
                                                  ≤ (1 − γ)∥ν∥            γ t tdϵ                                    (88)
                                                                  t=0
                                                                  ∞
                                                                  X
                                                  ≤ (1 − γ)dϵ           γtt                                          (89)
                                                                  t=0
                                                       γdϵ
                                                  =        .                                                         (90)
                                                      1−γ
                                                               P∞
The last relation follows from the fact that (1 − γ)−1 =               t
                                                                  t=0 γ , which in turn implies
                                                                            ∞
                                                      ∂         1             X
                                                    γ                     =         tγ t .                           (91)
                                                      ∂γ       1−γ            t=0


From Lemma A.5, it follows that
                                                      ∥X3 − X̂3 ∥ = O(βdϵ).                                          (92)

Next, recall that from Lemma 4.3 that
                                                                                 d−1
                                          X2 (s, ·) = β IA − 1A (πθ )⊤ Ps (P πb )
                                                                     
                                                                                     .

Then,
                                                                                               d−1
                                                                                   d−1
                         ∥X2 (s, ·) − X̂2 (s, ·)∥ ≤∥β IA − 1A (πθ )⊤ Ps ∥∥ (P πb )     − P̂ πb
                                                                   
                                                                                                      ∥              (93)
                                                                                              d−1
                                                   + ∥β IA − 1A (πθ )⊤ ∥∥Ps − P̂s ∥∥ P̂ πb
                                                                      
                                                                                                    ∥                (94)
                                                                                         d−1
                                                   + β∥1A (πθ )⊤ − 1A (π̂θ )⊤ ∥∥P̂s P̂ πb      ∥.                    (95)

Following the same argument as in (85) and applying Lemma A.2, we have that (93) is O(βdϵ). Similarly, from the argument
of (85), Eq. (94) is O(βϵ). Lastly, (95) is O(βdϵ) due to Lemma A.5. Putting the above three terms together, we have that

                                                 ∥X2 (s, ·) − X̂2 (s, ·)∥ = O(βdϵ).                                  (96)

                                                                  23
                                              Policy Gradient with Tree Expansion

Since the state-action value function satisfies the Bellman equation, we have
                                                     Qπθ = r + γP Qπθ                                                  (97)
and
                                                     Qπ̂θ = r̂ + γ P̂ Qπ̂θ .                                           (98)
Consequently,
                           ∥Qπθ − Qπ̂θ ∥ ≤ ∥r − r̂∥ + γ∥P Qπθ − P Qπ̂θ ∥ + γ∥P Qπ̂θ − P̂ Qπ̂θ ∥                        (99)
                                                           πθ        π̂θ                    π̂θ
                                           ≤ ϵ + γ∥P ∥∥Q  − Q ∥ + γ∥P − P̂ ∥∥Q ∥                                      (100)
                                                                   γ
                                           ≤ ϵ + γ∥Qπθ − Qπ̂θ ∥ +     ϵ,                                              (101)
                                                                  1−γ
which finally shows that
                                                                                   ϵ
                                           ∥X4 − X̂4 ∥ = ∥Qπθ − Qπ̂θ ∥ ≤                .                             (102)
                                                                               (1 − γ)2



B. Experiments
B.1. Implementation Details
The environment engine is the highly efficient Atari-CuLE (Dalton et al., 2020), a CUDA-based version of Atari that runs
on GPU. Similarly, we use Atari-CuLE for the GPU-based breadth-first TS as done in (Dalal et al., 2021).
We train SoftTreeMax for depths d = 1 . . . 8, with a single worker. We use five seeds for each experiment.
For the implementation, we extend Stable-Baselines3 (Raffin et al., 2019) with all parameters taken as default from the
original PPO paper (Schulman et al., 2017). For depths d ≥ 3, we limited the tree to a maximum width of 1024 nodes and
pruned non-promising trajectories in terms of estimated weights. Since the distributed PPO baseline advances significantly
faster in terms of environment steps, for a fair comparison, we ran all experiments for one week on the same machine and
use the wall-clock time as the x-axis. We use Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz equipped with one NVIDIA
Tesla V100 32GB.

B.2. GPU-Based Tree Expansion Implementation
Figure 4 illustrates the GPU-based tree expansion mechanism used in our implementation. We achieve efficient parallelization
by duplicating and concatenating all states in the current level of the tree with each possible action, then advancing them
simultaneously with a single forward pass through the simulator.
The implementation follows these steps:

  1. Start with a root state s0 and expand it across all actions a ∈ A.
  2. For each depth level t from 1 to d:
        • Collect all states st from the previous level.
        • Duplicate each state for each action to create a batch of state-action pairs.
        • Submit the entire batch to the GPU simulator in a single forward pass.
        • Collect the resulting next states and corresponding rewards.
        • If t < d and pruning is enabled, select the top-k most promising branches based on accumulated rewards.
  3. For the leaf states (at depth d), compute the neural network outputs Wθ (sd ).
  4. Combine the accumulated rewards along each trajectory with the corresponding leaf state values.
  5. Compute the final policy logits according to Equation (2) and apply the softmax operation.

This parallel implementation allows us to efficiently explore a larger number of trajectories compared to sequential tree
expansion, making deeper tree depths practically feasible.

                                                                24
                                                 Policy Gradient with Tree Expansion




Figure 4. A diagram of the tree expansion used by SoftTreeMax. In every step, the states in the current level of the tree are duplicated
and concatenated with each possible action. The resulting state-action pairs are then fed as a batch to the GPU simulator to generate the
next level of states. Finally, the states of the last level d are inserted into the neural network Wθ and the logits are computed using the
corresponding rewards along each trajectory.


Algorithm 1 C-SoftTreeMax
  Input: GPU environment G, network θ, depth d
  Init tensors: state S̄ = [s], action Ā0 = [0, 1, 2, .., A − 1], reward R̄ = [0]
  for id = 0 to d − 1 do
     S̄ ← S̄ × A, R̄ ← R̄ × A {Replicate state and reward tensors A times}
     r̄, S̄ ′ = G([S̄, Ā]) {Feed [S̄, Ā] to simulator and advance}
     R̄ ← R̄ + γ id r̄, S̄ ← S̄ ′ {Accumulate discounted reward }
     Ā ← Ā × A {Replicate action tensor A times}
  end for
                     πb
  ls,a ← AverageA       0 =a
                             (R̄ + γ d θ(S̄))/γ d {Weighted average induced by πb }
  Return π(a|s0 ) ∝ exp [βls,a (d; θ)] {Return optimal action at the root}



B.3. Algorithms
This section provides the pseudocode for our SoftTreeMax implementation. Algorithm 1 details the C-SoftTreeMax policy
computation, which efficiently utilizes GPU parallelization to perform tree expansion. Algorithm 2 shows how SoftTreeMax
integrates with the PPO algorithm, distinguishing the usage of our new policy in red.
Note that in Algorithm 2, we use Generalized Advantage Estimation (GAE) with λ = 0.95 for calculating advantage
estimates, which is the standard configuration in the stable-baselines3 PPO implementation that we build upon.

B.4. Time-Based Training Curves
We provide the training curves in Figure 5. For brevity, we exclude a few of the depths from the plots. As seen, there
is a clear benefit for SoftTreeMax over distributed PPO with the standard softmax policy. In most games, PPO with the
SoftTreeMax policy shows very high sample efficiency: it achieves higher episodic reward although it observes much less
episodes, for the same running time.

                                                                    25
                                                Policy Gradient with Tree Expansion

Algorithm 2 SoftTreeMax-PPO
 1: Initialize policy parameters θ0
 2: Initialize value function parameters ϕ
 3: for k = 0, 1, 2, . . . do
 4:    Collect set of trajectories Dk = {τi } by running policy πd,θk from Algorithm 1
 5:    Compute rewards-to-go R̂t
 6:    Compute advantage estimates Ât using GAE with λ = 0.95
 7:    for each epoch do
 8:       for each minibatch do
                                             πd,θ (at |st )
 9:          Compute policy ratio rt (θ) = πd,θ    (at |st )
                                                k
10:          Compute clipped surrogate objective:
11:          LCLIP (θ) = Et [min(rt (θ)Ât , clip(rt (θ), 1 − ϵ, 1 + ϵ)Ât )]
12:          Update θ with gradient step on LCLIP (θ)
13:          Compute value function loss: LV F (ϕ) = (Vϕ (st ) − R̂t )2
14:          Update ϕ with gradient step on LV F (ϕ)
15:       end for
16:    end for
17: end for




Figure 5. Training curves: GPU SoftTreeMax (single worker) vs PPO (256 GPU workers). The plots show average reward and
standard deviation over 5 seeds. The x-axis is the wall-clock time. The runs ended after one week with varying number of time-steps. The
training curves correspond to the evaluation runs in Figure 3.




B.5. Step-Based Training Curves
In Figure 6 we also provide the same convergence plots where the x-axis is now the number of online interactions with the
environment, thus excluding the tree expansion complexity. As seen, due to the complexity of the tree expansion, less steps
are conducted during training (limited to one week) as the depth increases. In this plot, the monotone improvement of the
reward with increasing tree depth is noticeable in most games.

                                                                  26
                                                Policy Gradient with Tree Expansion




Figure 6. Training curves: GPU SoftTreeMax (single worker) vs PPO (256 GPU workers). The plots show average reward and
standard deviation over 5 seeds. The x-axis is the number of online interactions with the environment. The runs ended after one week with
varying number of time-steps. The training curves correspond to the evaluation runs in Figure 3.


We note that not for all games we see monotonicity. Our explanation for this phenomenon relates to how immediate
reward contributes to performance compared to the value. Different games benefit differently from long-term as opposed to
short-term planning. Games that require longer-term planning need a better value estimate. A good value estimate takes
longer to obtain with larger depths, in which we apply the network to states that are very different from the ones observed so
far in the buffer (recall that as in any deep RL algorithm, we train the model only on states in the buffer). If the model hasn’t
learned a good enough value function yet, and there is no guiding dense reward along the trajectory, the policy becomes
noisier, and can take more steps to converge – even more than those we run in our week-long experiment.
For a concrete example, let us compare Breakout to Gopher. Inspecting Fig. 6, we observe that Breakout quickly (and
monotonically) gains from large depths since it relies on the short term goal of simply keeping the paddle below the moving
ball. In Gopher, however, for large depths (¿=5), learning barely started even by the end of the training run. Presumably, this
is because the task in Gopher involves multiple considerations and steps: the agent needs to move to the right spot and then
hit the mallet the right amount of times, while balancing different locations. This task requires long-term planning and thus
depends more strongly on the accuracy of the value function estimate. In that case, for depth 5 or more, we would require
more train steps for the value to “kick in” and become beneficial beyond the gain from the reward in the tree.
The figures above convey two key observations that occur for at least some non-zero depth: (1) The final performance with
the tree is better than PPO (Fig. 3); and (2) the intermediate step-based results with the tree are better than PPO (Fig. 6).
This leads to our main takeaway from this work — there is no reason to believe that the vanilla policy gradient algorithm
should be better than a multi-step variant. Indeed, we show that this is not the case.

C. Further discussion
C.1. The case of λ2 (P πb ) = 0
When P πb is rank one, it is not only its variance that becomes 0, but also the norm of the gradient itself (similarly to the case
of d → ∞). Note that such a situation will happen rarely, in degenerate MDPs. This is a local minimum for SoftTreeMax
and it would cause the PG iteration to get stuck, and to the optimum in the (desired but impractical) case where πb is the
optimal policy. However, a similar phenomenon was also discovered in the standard softmax with deterministic policies:
θ(s, a) → ∞ for one a per s. PG with softmax would suffer very slow convergence near these local equilibria, as observed
in (Mei et al., 2020a). To see this, note that the softmax gradient is ∇θ log πθ (a|s) = ea − πθ (·|s), where ea ∈ [0, 1]A is
the vector with 0 everywhere except for the a-th coordinate. I.e., it will be zero for a deterministic policy. SoftTreeMax
avoids these local optima by integrating the reward into the policy itself (but may get stuck in another, as discussed above).



                                                                   27
