Introduction
Within reinforcement learning [RL, 55] approaches, policy optimization [PO, 9] methods have proved to be highly effective for solving complex, large-scale sequential decision-making problems, both in simulated [11 ] and real-world [7 , 32 , 59 ] environments. Their success is attributable to several desirable properties: applicability to continuous settings [43 ] , robustness to noise [18 ] , resilience to partial observability [5 ] , and possibility of incorporating the expert domain knowledge during the policy design phase [17 ] . Taken together, these properties have established PO as the dominant paradigm for continuous control, robot locomotion, and complex simulated tasks.
A key distinction among PO methods is between off-policy and on-policy approaches. Off-policy methods require an RL agent to update its target policy using interaction data collected under a different behavioral policy , including data gathered across multiple past policies. Notable representatives of this family include SAC [21 ] , DDPG [29 ] , and TD3 [16 ] . These methods are known for their sample efficiency, as they can store and reuse past experience via a replay buffer, and often achieve strong final performance. However, they tend to be computationally intensive, frequently requiring careful implementation choices and extensive tuning. On-policy methods, by contrast, restrict updates to fresh interaction data collected under the current target policy, discarding those samples after one or a few gradient steps. This family includes REINFORCE [64 ] , GPOMDP [6 ] , TRPO [50 ] , PPO [52 ] , POIS [34 ] , and GRPO [53 ] . By construction, on-policy methods offer stable training dynamics and admit meaningful theoretical guarantees, ranging from convergence results [68 , 15 ] to policy improvement bounds [23 , 44 , 1 ] . Their main drawback, however, is poor sample efficiency: each collected trajectory contributes to only a single round of updates before being discarded.1
Given the sample efficiency of off-policy methods and the stability and theoretical foundations of on-policy ones, an active research direction pursues methods that exhibit the best of both worlds. Most efforts have focused on augmenting on-policy methods with off-policy data [20 , 40 , 14 ] , enabling the reuse of samples collected under past policies. This is commonly achieved via importance weighting [37 ] , a technique that corrects for the distributional mismatch between the behavioral and target policies by reweighting samples by the ratio of their likelihoods under the two policies. Since these weights can exhibit high variance when the two policies are dissimilar, some corrections have been proposed to make their use more reliable, including the balance heuristic [BH, 58, 35] estimator. In the context of policy gradient methods [43 ] , substantial work has analyzed whether reusing either past gradients [40 , 65 , 67 , 39 ] or past trajectories [42 , 30 , 36 ] can yield faster convergence rates, with affirmative results in both cases, that, however, remain tied to theoretical settings.
These findings have motivated the investigation of similar gains in practical deep on-policy algorithms [63 , 19 , 20 , 14 ] . Much of this effort has concentrated on PPO, which has become the de facto standard deep on-policy method thanks to its strong empirical performance across application domains ranging from robot locomotion [27 , 7 , 32 , 59 ] to LLM fine-tuning [62 , 66 ] . This success has, in turn, motivated deep investigation of PPO from multiple standpoints, including theoretical convergence guarantees [22 , 10 ] , implementation best practices [12 , 4 , 24 ] , and algorithmic variants [60 , 61 , 54 , 8 ] . Among the latter, several works have specifically targeted the incorporation of off-policy data into PPO. Queeney et al. [46 ] derive an off-policy policy improvement lower bound from the performance difference lemma [23 ] , proposing GePPO, a PPO variant that reuses data from a window of recent iterations. GePPO requires re-evaluating advantages on past samples via V-Trace [13 ] , incurring additional computation, and employs a modified clipping mechanism together with an adaptive learning rate based on the total variation between the current and behavioral policies. Zhao et al. [69 ] propose SARD-PPO, a sample reuse PPO variant that adaptively discards samples and re-evaluates past data under the current critic, employing a modified dual clipping mechanism. Liang et al. [28 ] incorporate prioritized experience replay [49 ] into PPO, proposing PTR-PPO and studying different priority assignment strategies. Meng et al. [33 ] introduce Off-Policy PPO, which also requires re-evaluating past trajectories under the current critic to obtain fresh advantage estimates, alongside a heuristic clipping mechanism. Recently, Liu et al. [31 ] proposed HP3O, a sample reuse PPO variant maintaining a FIFO trajectory replay buffer, re-evaluates past samples under the current critic, and retains the best-performing trajectory in each optimization batch. Finally, Lin et al. [30 ] provide an initial experimental exploration of RPO, a PPO variant that reuses samples from recent policies without re-evaluating advantages under the new critic. All these methods confirm both the ongoing research interest in PPO and the practical benefits of past-data reuse. However, most approaches require re-evaluation of stored samples under the current critic, rely on heuristics or modified clipping mechanisms, and are presented as standalone methods with tuned configurations rather than as controlled studies of the reuse mechanism itself. To the best of our knowledge, a systematic investigation of when, how, and why data reuse in PPO is beneficial remains unaddressed.
Original Contribution. In this paper, we aim to conduct a controlled study of the effects of sample reuse in PPO. To preserve the core functioning of PPO and isolate the effect of data reuse from other factors, we consider the incorporation of past collected data within the standard multiple importance weighting [MIW, 38, 35] framework. This amounts to the simplest possible form of sample reuse for PPO: augmenting its on-policy dataset by retaining data collected over a window of the ω \omega ω most recent iterations, optionally correcting the vanilla importance weights [IWs, 38]. Specifically, our main contributions can be summarized as follows:
Uniform Sample Reuse. We study the straightforward MIW instantiation of PPO, which we term ω \omega ω PPO-U. Similarly to [30 ] , it uniformly weights all samples in the composite dataset using vanilla IWs between the target and behavioral policies, and employs advantage estimates computed under the critic available at collection time. To ground this approach, we derive a policy improvement lower bound that accounts for stale advantages. Beyond validating the ω \omega ω PPO-U loss, the bound reveals a penalty term independent of the optimization variable, which therefore cannot be controlled by actor updates, suggesting that the policies within the considered window should be close (§ 3.1 ).
BH-Corrected Sample Reuse. Motivated by the usual inefficiency of uniform weighting in MIW, we additionally study a PPO instantiation employing BH-corrected IWs, which we term ω \omega ω PPO-BH. This consists of weighting each sample via the ratio between the target policy and the uniform mixture of behavioral policies in the window. ω \omega ω PPO-BH inherits all properties of ω \omega ω PPO-U and is similarly grounded by a policy improvement lower bound, whose uncontrollable penalty terms are non-decreasing in ω \omega ω , reinforcing the recommendation for keeping the policies within the window close (§ 3.2 ).
Systematic Empirical Study. We compare ω \omega ω PPO-U and ω \omega ω PPO-BH with standard PPO on MuJoCo [57 ] tasks under controlled settings that vary how updates and data collection are matched between methods. We study whether reuse helps convergence speed, final performance, or both, whether the benefit grows indefinitely with larger windows, and when excessive reuse becomes harmful. Finally, we study the differences between the two considered weightings (§ 4 ).
Proofs, experimental details, and additional experiments are in Appendices B, C, and D, respectively.
Preliminaries
Notation. For n , m ∈ N n,m \in\mathbb{N} n , m ∈ N with n ≥ m n \ge m n ≥ m , we denote [ m , n ] : = { m , m + 1 , … , n } [m,n] := \{m,m+1,\ldots,n\} [ m , n ] := { m , m + 1 , … , n } and [ n ] : = [ 1 , n ] [n] := [1,n] [ n ] := [ 1 , n ] . We denote by Δ ( X ) \Delta(\mathcal{X}) Δ ( X ) the set of probability measures over the measurable set X \mathcal{X} X . For P ∈ Δ ( X ) P \in\Delta(\mathcal{X}) P ∈ Δ ( X ) , we denote by p p p its density function w.r.t. a reference measure that we assume to exist whenever needed. The total variation (TV) distance is defined as D T V ( P , Q ) : = 1 2 ∫ X ∣ p ( x ) − q ( x ) ∣ d x D_{\mathrm{TV}}(P,Q) := \frac{1}{2}\int_{\mathcal{X}} |p(x)-q(x)|\mathrm{d}x D TV ( P , Q ) := 2 1 ∫ X ∣ p ( x ) − q ( x ) ∣ d x .
Markov Decision Processes. A Markov Decision Process [45 ] is represented by M : = ( S , A , p , r , d 0 , γ , T ) \mathcal{M} := (\mathcal{S},\mathcal{A},p,r,d_0,\gamma,T) M := ( S , A , p , r , d 0 , γ , T ) , where S ⊆ R d s \mathcal{S} \subseteq\mathbb{R}^{d_s} S ⊆ R d s and A ⊆ R d a \mathcal{A} \subseteq\mathbb{R}^{d_a} A ⊆ R d a are the measurable state and action spaces; p : S × A → Δ ( S ) p:\mathcal{S}\times\mathcal{A}\to\Delta(\mathcal{S}) p : S × A → Δ ( S ) is the transition model, where p ( s ′ ∣ s , a ) p(s'|s,a) p ( s ′ ∣ s , a ) is the probability density of landing in state s ′ ∈ S s' \in\mathcal{S} s ′ ∈ S by playing action a ∈ A a \in\mathcal{A} a ∈ A in state s ∈ S s \in\mathcal{S} s ∈ S ; r : S × A → [ − R max , R max ] r:\mathcal{S}\times\mathcal{A}\to[-R_{\max},R_{\max}] r : S × A → [ − R m a x , R m a x ] is the reward function, where r ( s , a ) r(s,a) r ( s , a ) is the reward the agent gets when playing action a a a in state s s s ; d 0 ∈ Δ ( S ) d_0 \in\Delta(\mathcal{S}) d 0 ∈ Δ ( S ) is the initial-state distribution; γ ∈ [ 0 , 1 ] \gamma\in[0,1] γ ∈ [ 0 , 1 ] is the discount factor. A trajectory τ = ( s 1 , a 1 , … , s T , a T ) \tau=(s_1,a_1,\ldots,s_T,a_T) τ = ( s 1 , a 1 , … , s T , a T ) of length T ∈ N ∪ { ∞ } T \in\mathbb{N}\cup\{\infty\} T ∈ N ∪ { ∞ } is a sequence of T T T state-action pairs. The set of all trajectories. The discounted return of a trajectory τ ∈ T \tau\in\mathcal{T} τ ∈ T is given by R ( τ ) : = ∑ t = 1 T γ t − 1 r ( s t , a t ) R(\tau):=\sum_{t=1}^{T}\gamma^{t-1}r(s_t,a_t) R ( τ ) := ∑ t = 1 T γ t − 1 r ( s t , a t ) .2
Policy Optimization. We consider parametric stochastic policies π θ : S → Δ ( A ) \pi_\theta:\mathcal{S}\to\Delta(\mathcal{A}) π θ : S → Δ ( A ) with parameters θ ∈ Θ ⊆ R d θ \theta\in\Theta\subseteq\mathbb{R}^{d_\theta} θ ∈ Θ ⊆ R d θ . The policy π θ \pi_\theta π θ is used to sample actions at each interaction instant t t t as a t ∼ π θ ( ⋅ ∣ s t ) a_t\sim\pi_\theta(\cdot|s_t) a t ∼ π θ ( ⋅ ∣ s t ) , where s t s_t s t is the state observed at time t t t . The performance of a policy π θ \pi_\theta π θ is assessed via the expected return J : Θ → R J:\Theta\to\mathbb{R} J : Θ → R , defined as:
J ( θ ) : = E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ r ( s , a ) ] . J(\theta):=\mathbb{E}_{\substack{s\sim d_{\theta}\\a\sim\pi_\theta(\cdot|s)}}[r(s,a)]. J ( θ ) := E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ r ( s , a )] .
where, with an abuse of notation, the expectation is taken over d θ ( s ) : = ∑ t = 1 T γ t − 1 Pr ( s t = s ∣ s 1 ∼ d 0 , π θ ) d_\theta(s):=\sum_{t=1}^{T}\gamma^{t-1}\Pr(s_t=s\mid s_1\sim d_0,\pi_\theta) d θ ( s ) := ∑ t = 1 T γ t − 1 Pr ( s t = s ∣ s 1 ∼ d 0 , π θ ) , the γ \gamma γ -discounted state occupancy under π θ \pi_\theta π θ , which is not a proper probability distribution. Moreover, the γ \gamma γ -discounted state-action occupancy under π θ \pi_\theta π θ is defined as μ θ ( s , a ) : = d θ ( s ) π θ ( a ∣ s ) \mu_\theta(s,a):=d_\theta(s)\pi_\theta(a\mid s) μ θ ( s , a ) := d θ ( s ) π θ ( a ∣ s ) , for every s ∈ S s\in\mathcal{S} s ∈ S and a ∈ A a\in\mathcal{A} a ∈ A . Two additional performance indices are the value function V π θ : S → R V^{\pi_\theta}:\mathcal{S}\to\mathbb{R} V π θ : S → R and the action-value function Q π θ : S × A → R Q^{\pi_\theta}:\mathcal{S}\times\mathcal{A}\to\mathbb{R} Q π θ : S × A → R , defined respectively as:
V π θ ( s ) : = E [ ∑ t = 1 T γ t − 1 r ( s t , a t ) ∣ s 1 = s , π θ ] V^{\pi_\theta}(s):=\mathbb{E}\left[\sum_{t=1}^{T}\gamma^{t-1}r(s_t,a_t)\mid s_1=s,\pi_\theta\right] V π θ ( s ) := E [ t = 1 ∑ T γ t − 1 r ( s t , a t ) ∣ s 1 = s , π θ ]
and
Q π θ ( s , a ) : = E [ ∑ t = 1 T γ t − 1 r ( s t , a t ) ∣ s 1 = s , a 1 = a , π θ ] . Q^{\pi_\theta}(s,a):=\mathbb{E}\left[\sum_{t=1}^{T}\gamma^{t-1}r(s_t,a_t)\mid s_1=s,a_1=a,\pi_\theta\right]. Q π θ ( s , a ) := E [ t = 1 ∑ T γ t − 1 r ( s t , a t ) ∣ s 1 = s , a 1 = a , π θ ] .
The goal of PO is to find θ ⋆ ∈ arg max θ ∈ Θ J ( θ ) \theta^\star\in\arg\max_{\theta\in\Theta}J(\theta) θ ⋆ ∈ arg max θ ∈ Θ J ( θ ) .
Trust Region Methods and Proximal Policy Optimization. To learn θ ⋆ \theta^\star θ ⋆ in an on-policy fashion, one can either follow the policy gradient theorem [56 ] or one can build surrogate losses allowing for using multiple times the same collected data while constraining the target policy to remain inside a trust region , meaning that the target policy is kept near the behavioral one, ensuring the sampled data remain trustworthy. This approach is grounded in the following policy improvement lower bound [1 ] :
J ( θ ′ ) − J ( θ ) ≥ E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ π θ ′ ( a ∣ s ) π θ ( a ∣ s ) A π θ ( s , a ) ] − 2 γ C ( θ ′ , θ ) ( 1 − γ ) 2 E s ∼ d θ [ D T V ( π θ ′ ( ⋅ ∣ s ) , π θ ( ⋅ ∣ s ) ) ] . J(\theta') - J(\theta) \ge\mathbb{E}_{\substack{s \sim d_{\theta}\\a\sim\pi_{\theta}(\cdot\mid s)}}\left[\frac{\pi_{\theta'}(a\mid s)}{\pi_{\theta}(a\mid s)}A^{\pi_{\theta}}(s,a)\right] - \frac{2\gamma C(\theta',\theta)}{(1-\gamma)^2}\mathbb{E}_{s\sim d_{\theta}}\left[D_{\mathrm{TV}}\left(\pi_{\theta'}(\cdot\mid s),\pi_{\theta}(\cdot\mid s)\right)\right]. J ( θ ′ ) − J ( θ ) ≥ E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ ′ ( a ∣ s ) A π θ ( s , a ) ] − ( 1 − γ ) 2 2 γ C ( θ ′ , θ ) E s ∼ d θ [ D TV ( π θ ′ ( ⋅ ∣ s ) , π θ ( ⋅ ∣ s ) ) ] .
where A π θ ( s , a ) : = Q π θ ( s , a ) − V π θ ( s ) A^{\pi_{\theta}}(s,a) := Q^{\pi_{\theta}}(s,a) - V^{\pi_{\theta}}(s) A π θ ( s , a ) := Q π θ ( s , a ) − V π θ ( s ) is the advantage function , π θ ′ ( a ∣ s ) π θ ( a ∣ s ) \frac{\pi_{\theta'}(a\mid s)}{\pi_{\theta}(a\mid s)} π θ ( a ∣ s ) π θ ′ ( a ∣ s ) is the importance weight [IW, [37 ] ], and C ( θ ′ , θ ) : = sup s ∈ S ∣ E a ∼ π θ ′ ( ⋅ ∣ s ) [ A π θ ( s , a ) ] ∣ C(\theta',\theta) := \sup_{s\in\mathcal{S}}\left|\mathbb{E}_{a\sim\pi_{\theta'}(\cdot\mid s)}[A^{\pi_{\theta}}(s,a)]\right| C ( θ ′ , θ ) := sup s ∈ S E a ∼ π θ ′ ( ⋅ ∣ s ) [ A π θ ( s , a )] . The bound reveals that the closer π θ ′ \pi_{\theta'} π θ ′ and π θ \pi_{\theta} π θ are in TV, the tighter the bound. TRPO [50 ] operationalizes this by maximizing the importance-weighted surrogate subject to a KL constraint, at the cost of requiring second-order information in practice. PPO [52 ] replaces this constraint with a clipping heuristic, optimizing:
L P P O ( θ ′ ) : = E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ min { π θ ′ ( a ∣ s ) π θ ( a ∣ s ) A π θ ( s , a ) , clip ( π θ ′ ( a ∣ s ) π θ ( a ∣ s ) , 1 − ϵ , 1 + ϵ ) A π θ ( s , a ) } ] . L^{\mathrm{PPO}}(\theta') := \mathbb{E}_{\substack{s\sim d_{\theta}\\a\sim\pi_{\theta}(\cdot\mid s)}}\left[\min\left\{\frac{\pi_{\theta'}(a\mid s)}{\pi_{\theta}(a\mid s)}A^{\pi_{\theta}}(s,a),\operatorname{clip}\left(\frac{\pi_{\theta'}(a\mid s)}{\pi_{\theta}(a\mid s)},1-\epsilon,1+\epsilon\right)A^{\pi_{\theta}}(s,a)\right\}\right]. L PPO ( θ ′ ) := E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ min { π θ ( a ∣ s ) π θ ′ ( a ∣ s ) A π θ ( s , a ) , clip ( π θ ( a ∣ s ) π θ ′ ( a ∣ s ) , 1 − ϵ , 1 + ϵ ) A π θ ( s , a ) } ] .
where clip ( a , b , c ) = min { max { a , b } , c } \operatorname{clip}(a,b,c)=\min\{\max\{a,b\},c\} clip ( a , b , c ) = min { max { a , b } , c } . In practice, this loss is approximated using a parameterized critic V w ( s ) ≈ V π θ ( s ) V_w(s)\approx V^{\pi_{\theta}}(s) V w ( s ) ≈ V π θ ( s ) with parameters w ∈ W ⊆ R d W w\in\mathcal{W}\subseteq\mathbb{R}^{d_W} w ∈ W ⊆ R d W . The policy π θ \pi_{\theta} π θ is used to collect a dataset of transitions D θ = { ( s t , a t , π θ ( a t ∣ s t ) , A t , R t ) } t = 1 H D_{\theta}=\{(s_t,a_t,\pi_{\theta}(a_t\mid s_t),A_t,R_t)\}_{t=1}^{H} D θ = {( s t , a t , π θ ( a t ∣ s t ) , A t , R t ) } t = 1 H , where H H H is the number of samples, A t ≈ A π θ ( s t , a t ) A_t\approx A^{\pi_{\theta}}(s_t,a_t) A t ≈ A π θ ( s t , a t ) is estimated via generalized advantage estimation [GAE, [51 ] ], and R t ≈ V π θ ( s t ) R_t\approx V^{\pi_{\theta}}(s_t) R t ≈ V π θ ( s t ) . The surrogate is then approximated as L P P O ( θ ′ , D ) L^{\mathrm{PPO}}(\theta',\mathcal{D}) L PPO ( θ ′ , D ) and the critic is fitted via mean squared error minimization over R t R_t R t . Further details on the practical functioning of PPO are deferred to Appendix § 6 .
Multiple Importance Weighting. Let x ∈ X x\in\mathcal{X} x ∈ X be a random variable and let f : X → R f:\mathcal{X}\to\mathbb{R} f : X → R be a function. Consider the goal of estimating the expected value of f f f under a target distribution P P P , but only having samples coming from ω \omega ω behavioral distributions { Q i } i = 1 ω \{Q_i\}_{i=1}^{\omega} { Q i } i = 1 ω . Specifically, for each i ∈ [ ω ] i\in[\omega] i ∈ [ ω ] consider to have access to a dataset D i = { x i , j } j = 1 N D_i=\{x_{i,j}\}_{j=1}^{N} D i = { x i , j } j = 1 N of N N N independent samples drawn from Q i Q_i Q i . Assuming for every i ∈ [ ω ] i\in[\omega] i ∈ [ ω ] that P ≪ Q i P\ll Q_i P ≪ Q i (P P P is absolutely continuous w.r.t. Q i Q_i Q i ), the multiple importance weighting (MIW) estimator of the expected value of f f f can be written as [38 ] :
μ ^ P / { Q i } i = 1 ω = ∑ i = 1 ω 1 N ∑ j = 1 N α i ( x i , j ) p ( x i , j ) q i ( x i , j ) f ( x i , j ) . \widehat{\mu}_{P/\{Q_i\}_{i=1}^{\omega}}=\sum_{i=1}^{\omega}\frac{1}{N}\sum_{j=1}^{N}\alpha_i(x_{i,j})\frac{p(x_{i,j})}{q_i(x_{i,j})}f(x_{i,j}). μ P / { Q i } i = 1 ω = i = 1 ∑ ω N 1 j = 1 ∑ N α i ( x i , j ) q i ( x i , j ) p ( x i , j ) f ( x i , j ) .
where the coefficients α i \alpha_i α i are a partition of the unit, i.e., for every i ∈ [ ω ] i\in[\omega] i ∈ [ ω ] and x ∈ X x\in\mathcal{X} x ∈ X we have that α i ( x ) ∈ R ≥ 0 \alpha_i(x)\in\mathbb{R}_{\ge0} α i ( x ) ∈ R ≥ 0 and ∑ i = 1 ω α i ( x ) = 1 \sum_{i=1}^{\omega}\alpha_i(x)=1 ∑ i = 1 ω α i ( x ) = 1 . Notice that μ ^ \widehat{\mu} μ is unbiased. Among the choices for the α i \alpha_i α i coefficients the most simple but inefficient choice is the uniform weighting, meaning for each i ∈ [ ω ] i\in[\omega] i ∈ [ ω ] and x ∈ X x\in\mathcal{X} x ∈ X we select α i ( x ) = 1 / ω \alpha_i(x)=1/\omega α i ( x ) = 1/ ω , thus giving equal weight to all the samples [35 ] . Among the various choices for the α i \alpha_i α i coefficients, the most studied one is the balance heuristic [BH, [58 ] ], provably nearly optimal in terms of variance within the class of MIW estimators. The BH prescribes to select the weights as: α i B H ( x ) = q i ( x ) ∑ ℓ = 1 ω q ℓ ( x ) \alpha_i^{\mathrm{BH}}(x)=\frac{q_i(x)}{\sum_{\ell=1}^{\omega}q_\ell(x)} α i BH ( x ) = ∑ ℓ = 1 ω q ℓ ( x ) q i ( x ) , leading to the following unbiased estimator:
μ ^ P / { Q i } i = 1 ω B H = 1 ω N ∑ i = 1 ω ∑ j = 1 N p ( x i , j ) 1 ω ∑ ℓ = 1 ω q ℓ ( x i , j ) f ( x i , j ) , \widehat{\mu}^{\mathrm{BH}}_{P/\{Q_i\}_{i=1}^{\omega}}=\frac{1}{\omega N}\sum_{i=1}^{\omega}\sum_{j=1}^{N}\frac{p(x_{i,j})}{\frac{1}{\omega}\sum_{\ell=1}^{\omega}q_\ell(x_{i,j})}f(x_{i,j}), μ P / { Q i } i = 1 ω BH = ω N 1 i = 1 ∑ ω j = 1 ∑ N ω 1 ∑ ℓ = 1 ω q ℓ ( x i , j ) p ( x i , j ) f ( x i , j ) ,
that, whenever P ∈ { Q i } i = 1 ω P\in\{Q_i\}_{i=1}^{\omega} P ∈ { Q i } i = 1 ω , makes the BH-corrected ratio bounded by ω \omega ω .
Sample Reuse in PPO
In this section, we first revisit the functioning of PPO and the data reuse mechanism already implicit in its design. We then instantiate two PPO variants within a MIW framework [38 , 35 ] that incorporate past collected data from a window of at most ω \omega ω recent iterations, without re-evaluating the advantage signals under the current critic. The first, ω \omega ω PPO–U, employs uniform weighting across the window; the second, ω \omega ω PPO–BH, applies a BH [58 ] correction to the IWs. For both, we derive a policy improvement lower bound that accounts for stale advantages: beyond providing theoretical grounding for the losses optimized by the reuse variants, the bounds reveal penalty terms independent of the optimization variable, suggesting that the policies in the reuse window should remain close to each other, while the target policy should remain close to the behavioral ones.
Native PPO’s Sample Reuse. PPO already incorporates a form of sample reuse. However, this is limited in two ways: (i ) it only considers data collected under the same policy, and (ii ) it only considers data from the most recent behavior policy. Specifically, at iteration k ∈ N k \in\mathbb{N} k ∈ N , policy π θ k \pi_{\theta_k} π θ k and critic V w k V_{w_k} V w k are used to build dataset D k D_k D k by interacting with the environment for H H H steps, so that ∣ D k ∣ = D |D_k| = D ∣ D k ∣ = D . For K ~ \widetilde{K} K epochs, D k D_k D k is shuffled and divided into N B N_B N B mini-batches of size B B B , each used to perform one update of both actor and critic. After performing K ~ N B \widetilde{K}N_B K N B updates, D k D_k D k is discarded.
Cross-Iteration Sample Reuse Framework. As highlighted above, one of the causes of PPO’s sample inefficiency lies in the fact that the dataset D k D_k D k is discarded after a few updates. Instead, past samples could be retained and reused in future iterations, increasing sample efficiency as done in related work [46 , 33 , 69 , 31 ] . Specifically, suppose we have access to a window of ω k : = min { k , ω } \omega_k := \min\{k,\omega\} ω k := min { k , ω } recent iterations, where ω \omega ω is the maximum window size. When updating the actor and critic, we consider the composite dataset D ( ω k ) : = ⋃ i = 0 ω k − 1 D k − i \mathcal{D}(\omega_k) := \bigcup_{i=0}^{\omega_k-1} D_{k-i} D ( ω k ) := ⋃ i = 0 ω k − 1 D k − i , which we shuffle and from which we sample mini-batches, equally representing all the iterations in the window. We assume each policy performs H H H interaction steps with the environment, so that all the datasets will have the same cardinality, i.e., ∣ D k − i ∣ = D |D_{k-i}| = D ∣ D k − i ∣ = D for every i ∈ ⟦ 0 , ω k − 1 ⟧ i \in\llbracket0,\omega_k-1\rrbracket i ∈ [ [ 0 , ω k − 1 ] ] and ∣ D ( ω k ) ∣ = ∑ i = 0 ω k − 1 ∣ D k − i ∣ = ω k D |\mathcal{D}(\omega_k)| = \sum_{i=0}^{\omega_k-1}|D_{k-i}| = \omega_k D ∣ D ( ω k ) ∣ = ∑ i = 0 ω k − 1 ∣ D k − i ∣ = ω k D . Moreover, for each i ∈ ⟦ 0 , ω k − 1 ⟧ i \in\llbracket0,\omega_k-1\rrbracket i ∈ [ [ 0 , ω k − 1 ] ] let D k − i = { ( s i , j , a i , j , π θ k − i ( a i , j ∣ s i , j ) , A i , j , R i , j ) } j = 1 D D_{k-i} = \{(s_{i,j},a_{i,j},\pi_{\theta_{k-i}}(a_{i,j}\mid s_{i,j}),A_{i,j},R_{i,j})\}_{j=1}^{D} D k − i = {( s i , j , a i , j , π θ k − i ( a i , j ∣ s i , j ) , A i , j , R i , j ) } j = 1 D , where A i , j A_{i,j} A i , j and R i , j R_{i,j} R i , j are obtained with the critic available at iteration k − i k-i k − i . The key difference with respect to the native PPO reuse is that the data buffer now contains samples from multiple behavioral policies rather than from a single, most recent one. Next, we discuss two MIW instantiations of PPO for exploiting D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) .
Cross-Iteration Uniform Sample Reuse in PPO
Within the described reuse framework , the simplest form of reuse consists of uniformly weighting all the samples in D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) . While uniform weighting is known to be inefficient in MIW frameworks [38 , 35 ] , it may nevertheless be meaningful in the PPO setting, where the clipping mechanism already limits the contribution of samples far from the target policy. A first empirical hint of this approach is discussed in [30 ] . We refer to the PPO variant employing this weighting scheme as ω \omega ω PPO-U, whose empirical loss is:
L ^ U ( θ , D ( ω k ) ) = 1 ω k D ∑ i = 0 ω k − 1 ∑ j = 1 D min { π θ ( a i , j ∣ s i , j ) π θ k − i ( a i , j ∣ s i , j ) A i , j , clip ( π θ ( a i , j ∣ s i , j ) π θ k − i ( a i , j ∣ s i , j ) , 1 − ϵ , 1 + ϵ ) A i , j } . \widehat{L}^{\mathrm{U}}(\theta,\mathcal{D}(\omega_k)) = \frac{1}{\omega_k D}\sum_{i=0}^{\omega_k-1}\sum_{j=1}^{D}\min\left\{\frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\theta_{k-i}}(a_{i,j}\mid s_{i,j})}A_{i,j},\operatorname{clip}\left(\frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\theta_{k-i}}(a_{i,j}\mid s_{i,j})},1-\epsilon,1+\epsilon\right)A_{i,j}\right\}. L U ( θ , D ( ω k )) = ω k D 1 i = 0 ∑ ω k − 1 j = 1 ∑ D min { π θ k − i ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) A i , j , clip ( π θ k − i ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) , 1 − ϵ , 1 + ϵ ) A i , j } .
where θ \theta θ is the target actor parameter vector. Some comments are in order. First, in line with our goal of preserving the core PPO functioning, we deliberately use stale advantages , i.e., advantage estimates computed at data collection time under the critic available at that iteration, rather than re-evaluating past samples under the most recent critic V w k V_{w_k} V w k [e.g., [46 , 33 , 69 ] ], a practice typically carried out via V-Trace [13 ] and incurring additional computation. Second, without re-evaluating past data under the current critic, updating the critic on stale returns from distant iterations would mean to update the critic on increasingly stale values, especially for large ω \omega ω and K ~ \widetilde{K} K values. We therefore restrict critic updates to the most recent dataset D k D_k D k only, using past samples exclusively to produce additional actor updates. Third, this loss can be easily employed in mini-batch stochastic gradient ascent as soon as each mini-batch equally represents the full dataset D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) , meaning that each window of reuse should have the same amount of data inside each mini-batch.
Now, we show a policy improvement lower bound providing the theoretical grounding for L ^ U \widehat{L}^{\mathrm{U}} L U .
Theorem 3.1. Let ω k ∈ N ≥ 1 \omega_k \in\mathbb{N}_{\geq1} ω k ∈ N ≥ 1 . Having access to { π θ k − i } i = 0 ω k − 1 \{\pi_{\theta_{k-i}}\}_{i=0}^{\omega_k-1} { π θ k − i } i = 0 ω k − 1 , for any target π θ \pi_\theta π θ , the following holds:
J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i E a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ k − i ( a ∣ s ) A π θ k − i ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) ] − 4 R max ( 1 + γ ) ( 1 − γ ) ω k ∑ i = 0 ω k − 1 sup s ∈ S D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) . \begin{aligned}
J(\theta)-J(\theta_k) \geq{}& \frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}\mathbb{E}_{a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}
\left[\frac{\pi_\theta(a\mid s)}{\pi_{\theta_{k-i}}(a\mid s)}A^{\pi_{\theta_{k-i}}}(s,a)\right]\\
&-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}
\left[D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)\right)\right]\\
&-\frac{4R_{\max}(1+\gamma)}{(1-\gamma)\omega_k}\sum_{i=0}^{\omega_k-1}\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}\left(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)\right).
\end{aligned} J ( θ ) − J ( θ k ) ≥ ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i E a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ k − i ( a ∣ s ) π θ ( a ∣ s ) A π θ k − i ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) ] − ( 1 − γ ) ω k 4 R m a x ( 1 + γ ) i = 0 ∑ ω k − 1 s ∈ S sup D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) .
Several remarks are in order. First, unlike prior work [46 , 33 , 69 ] , this bound accounts for stale advantages : it features A π θ k − i A^{\pi_{\theta_{k-i}}} A π θ k − i rather than A π θ k A^{\pi_{\theta_k}} A π θ k , and therefore does not require access to advantage values under the current policy π θ k \pi_{\theta_k} π θ k for samples collected under past behavioral policies π θ k − i \pi_{\theta_{k-i}} π θ k − i . Second, compared to the standard policy improvement lower bound [44 , 1 ] , recovered when ω = 1 \omega=1 ω = 1 , the factor C ( θ , θ k ) C(\theta,\theta_k) C ( θ , θ k ) is unchanged, while two additional averaged TV penalty terms appear. The first, involving D T V ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) D_{\mathrm{TV}}(\pi_\theta(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)) D TV ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) , already appears in [46 , 69 , 31 ] and accounts for sampling ( s , a ) (s,a) ( s , a ) from μ θ k − i \mu_{\theta_{k-i}} μ θ k − i . The second, involving D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) D_{\mathrm{TV}}(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)) D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) , is the price paid for considering stale advantages. Crucially, the latter does not depend on the target policy θ \theta θ , so it vanishes when taking the gradient of the surrogate loss, leaving the optimization unaffected and thus grounding L ^ U \hat{L}^{U} L ^ U . However, since it cannot be controlled by the actor update, it suggests that the policies belonging to the reuse window ω \omega ω should remain close to each other. Additionally, the first penalty, which depends on θ \theta θ , requires the target policy to remain close to all the behavioral policies in the window. In PPO-like methods, this is partially enforced by the clipping mechanism, which limits how far consecutive policies can drift.
Cross-Iteration Balance-Heuristic-Corrected Sample Reuse in PPO
As the balance heuristic [BH, 58] is the most studied MIW weighting due to its desirable theoretical properties [35 ] and effectiveness [41 , 36 ] over uniform weighting, here we study its instantiation in PPO, which we term ω P P O \omega\mathrm{PPO} ω PPO -BH. Specifically, we replace the vanilla IWs in the actor loss with per-step BH-corrected ones. To do so, for every s ∈ S s \in\mathcal{S} s ∈ S and a ∈ A a \in\mathcal{A} a ∈ A , let π ω k B H ( a ∣ s ) : = 1 ω k ∑ i = 0 ω k − 1 π θ k − i ( a ∣ s ) \pi_{\omega_k}^{\mathrm{BH}}(a\mid s) := \frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\pi_{\theta_{k-i}}(a\mid s) π ω k BH ( a ∣ s ) := ω k 1 ∑ i = 0 ω k − 1 π θ k − i ( a ∣ s ) be the uniform mixture of policies in the window. The empirical loss of ω P P O \omega\mathrm{PPO} ω PPO -BH is:
L ^ B H ( θ , D ( ω k ) ) = 1 ω k D ∑ i = 0 ω k − 1 ∑ j = 1 D min { π θ ( a i , j ∣ s i , j ) π ω k B H ( a i , j ∣ s i , j ) A i , j , clip ( π θ ( a i , j ∣ s i , j ) π ω k B H ( a i , j ∣ s i , j ) , 1 − ϵ , 1 + ϵ ) A i , j } . \hat{L}^{\mathrm{BH}}(\theta,\mathcal{D}(\omega_k))=\frac{1}{\omega_k D}\sum_{i=0}^{\omega_k-1}\sum_{j=1}^{D}\min\left\{\frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\omega_k}^{\mathrm{BH}}(a_{i,j}\mid s_{i,j})}A_{i,j},\operatorname{clip}\left(\frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\omega_k}^{\mathrm{BH}}(a_{i,j}\mid s_{i,j})},1-\epsilon,1+\epsilon\right)A_{i,j}\right\}. L ^ BH ( θ , D ( ω k )) = ω k D 1 i = 0 ∑ ω k − 1 j = 1 ∑ D min { π ω k BH ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) A i , j , clip ( π ω k BH ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) , 1 − ϵ , 1 + ϵ ) A i , j } .
Some comments are in order. First, we highlight that L ^ B H \hat{L}^{\mathrm{BH}} L ^ BH retains most of the features already discussed for L ^ U \hat{L}^{U} L ^ U including exploiting stale advantages, without re-evaluating past samples under the most recent critic. Also in this case, we consider fitting the critic over D k \mathcal{D}_k D k only, thus employing older data exclusively for additional actor updates. Second, the BH correction weights each sample with all behavioral policies in the window jointly, rather than only its own. As a consequence, unlike ω P P O \omega\mathrm{PPO} ω PPO -U, where the IWs of samples in D k \mathcal{D}_k D k equal 1 at the beginning of each iteration, the BH ratio π θ k / π ω k B H \pi_{\theta_k}/\pi_{\omega_k}^{\mathrm{BH}} π θ k / π ω k BH generally differs from 1 whenever ω k > 1 \omega_k>1 ω k > 1 , so that even the most recent samples may be clipped from the first update. Third, the BH is known to reduce the variance of the IWs compared to uniform weighting [58 , 35 ] . Moreover, since π θ k \pi_{\theta_k} π θ k is a component of the mixture at the beginning of each iteration, the BH ratios are bounded by ω k \omega_k ω k , whereas the vanilla ratios π θ k / π θ k − i \pi_{\theta_k}/\pi_{\theta_{k-i}} π θ k / π θ k − i of older samples are unbounded. Fourth, when updating, the target policy π θ \pi_\theta π θ is pushed towards the boundary of the trust region of π ω k B H \pi_{\omega_k}^{\mathrm{BH}} π ω k BH , rather than towards the individual trust regions around each π θ k − i \pi_{\theta_{k-i}} π θ k − i , as in ω P P O \omega\mathrm{PPO} ω PPO -U. This provides a single trust region centered at the mixture of the policies in the window. Finally, it is worth noting that ω P P O \omega\mathrm{PPO} ω PPO -BH incurs a higher computational cost than ω P P O \omega\mathrm{PPO} ω PPO -U. Specifically, evaluating the BH-corrected loss requires evaluating all samples in D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) under all policies { π θ k − i } i = 0 ω k − 1 \{\pi_{\theta_{k-i}}\}_{i=0}^{\omega_k-1} { π θ k − i } i = 0 ω k − 1 in the window. However, this cost of 2 ( ω k − 1 ) D 2(\omega_k-1)D 2 ( ω k − 1 ) D evaluations is paid once per data collection step .
Now, we show a policy improvement lower bound serving as a theoretical grounding of L ^ B H \hat{L}^{\mathrm{BH}} L ^ BH .
Theorem 3.2. Let ω k ∈ N ≥ 1 \omega_k\in\mathbb{N}_{\ge1} ω k ∈ N ≥ 1 . Having access to { π θ k − i } i = 0 ω k − 1 \{\pi_{\theta_{k-i}}\}_{i=0}^{\omega_k-1} { π θ k − i } i = 0 ω k − 1 , let d k B H ( s ) : = 1 ω k ∑ i = 0 ω k − 1 d θ k − i ( s ) d_k^{\mathrm{BH}}(s):=\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}d_{\theta_{k-i}}(s) d k BH ( s ) := ω k 1 ∑ i = 0 ω k − 1 d θ k − i ( s ) be the uniform mixture of the discounted state occupancies. Then, for any θ \theta θ , the following holds:
J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i , a ∼ π θ k − i [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k − i ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) ] J(\theta)-J(\theta_k)\ge
\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}},\,a\sim\pi_{\theta_{k-i}}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_{k-i}}}(s,a)\right]
-\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}\left[D_{\mathrm{TV}}(\pi_\theta(\cdot\mid s),\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s))\right] J ( θ ) − J ( θ k ) ≥ ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i , a ∼ π θ k − i [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k − i ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s )) ] − 4 R max ( 1 + γ ) 1 − γ ω k − 1 ω k ∑ i = 0 ω k − 1 sup s ∈ S D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) − ( 4 R max 1 − γ + 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ) ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) . -\frac{4R_{\max}(1+\gamma)}{1-\gamma}\frac{\omega_k-1}{\omega_k}\sum_{i=0}^{\omega_k-1}\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s))
-\left(\frac{4R_{\max}}{1-\gamma}+\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\right)\sum_{i=0}^{\omega_k-1}D_{\mathrm{TV}}(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}). − 1 − γ 4 R m a x ( 1 + γ ) ω k ω k − 1 i = 0 ∑ ω k − 1 s ∈ S sup D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) − ( 1 − γ 4 R m a x + ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) ) i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) .
Several remarks are in order. First, as for Theorem 3.1, this bound accounts for stale advantages and recovers the standard policy improvement lower bound [1 , 44 ] when ω = 1 \omega=1 ω = 1 . Second, the bound features three TV-based penalty terms. The first involves an average of D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) D_{\mathrm{TV}}(\pi_\theta(\cdot\mid s),\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s)) D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s )) over the state occupancies in the window, suggesting that the effective trust region should be defined with respect to π ω k B H \pi_{\omega_k}^{\mathrm{BH}} π ω k BH rather than any individual behavioral policy; note that C ( θ , θ k ) C(\theta,\theta_k) C ( θ , θ k ) remains unchanged relative to Theorem 3.1 and prior work [1 , 46 , 69 ] . The second penalty, involving sup s D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) \sup_s D_{\mathrm{TV}}(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)) sup s D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) , arises from window-specific stale advantages and, unlike the analogous term in Theorem 3.1, is non-decreasing in ω \omega ω . The third, involving D T V ( d ω k B H , d θ k − i ) D_{\mathrm{TV}}(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}) D TV ( d ω k BH , d θ k − i ) , captures the mismatch between the mixture state occupancy and the individual occupancies and similarly is non-decreasing in ω \omega ω . Crucially, both the second and third penalties are independent of θ \theta θ and vanish when taking the gradient of the surrogate loss, thus (i) grounding L B H L^{\mathrm{BH}} L BH and (ii) suggesting that the policies in the window should remain close to each other, while the first penalty, which depends on θ \theta θ , requires the target policy to remain close to the mixture π ω k B H \pi_{\omega_k}^{\mathrm{BH}} π ω k BH .
Experiments
We provide an experimental validation of the effects of sample reuse, implemented via ω \omega ω PPO-U and ω \omega ω PPO-BH, on PPO. Here, we report only the most interesting results; an extended experimental campaign across diverse MuJoCo [57 ] tasks is provided in Appendix § 9 . To ensure a fair comparison, we always start from the tuned PPO configuration of [47 ] , and the reuse variants all share common hyperparameters unless otherwise specified. All experimental details are deferred to Appendix § 8 .
Comparison Settings. When comparing ω \omega ω PPO-U and ω \omega ω PPO-BH against PPO, several experimental settings are possible. In this section we consider the following two:
Fixed mini-batch size: the reuse variants share all hyperparameters with PPO (K ~ \widetilde{K} K , B B B , and N E H N_{\mathrm{EH}} N EH ). Since ∣ D ( ω k ) ∣ = ω k D \lvert\mathcal{D}(\omega_k)\rvert= \omega_k D ∣ D ( ω k )∣ = ω k D , fixing B B B means the reuse variants perform ω k \omega_k ω k times as many actor updates per iteration as PPO, with each datum having a maximum life cycle of ω k K ~ \omega_k\widetilde{K} ω k K actor updates. Each mini-batch contains B / ω k B/\omega_k B / ω k samples per window, so each update sees a smaller fraction of fresh data than PPO. To isolate the effect of data reuse from the effect of additional updates, we also run PPO with ω k K ~ \omega_k\widetilde{K} ω k K epochs per iteration, matching the total update count of the reuse variants.
Fixed mini-batch count: ω \omega ω PPO-U and ω \omega ω PPO-BH keep the same number of mini-batches N B N_B N B as PPO, yielding larger mini-batches of size ω k B \omega_k B ω k B . Each update thus sees the same amount of fresh data as PPO, while the reuse variants additionally incorporate past samples into each mini-batch. All methods therefore perform the same number of updates per iteration, isolating the effect of additional data from that of additional gradient steps.
These settings directly measure sample efficiency: given the same number of environment interactions, they test how well each method exploits the available information. Both settings are designed to maintain fairness with respect to PPO and to isolate distinct aspects of the data reuse mechanism.
Fixed B B B . Figure 1 shows training evaluation curves across four tasks, comparing PPO, ω \omega ω PPO-U, ω \omega ω PPO-BH, and a PPO variant running ω K ~ \omega\widetilde{K} ω K epochs per iteration. The latter collapses in almost every setting, while the reuse variants, whose mini-batches come from D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) , do not exhibit the same instability. At ω = 4 \omega=4 ω = 4 , both ω \omega ω PPO-U and ω \omega ω PPO-BH consistently outperform PPO in terms of final performance of the deployed policy (Table 1 ), suggesting that the benefit of data reuse is not merely due to performing more updates. However, this trend does not hold uniformly across tasks when enlarging ω \omega ω . The Hopper-v5 environment is a pathological case: at ω = 8 \omega=8 ω = 8 , the reuse variants not only fail to outperform PPO but exhibit degraded training. We conjecture this results from several compounding factors, amplified by this environment’s configuration (H = 2048 H = 2048 H = 2048 , B = 64 B = 64 B = 64 , K ~ = 10 \tilde{K} = 10 K ~ = 10 ). First, at ω = 8 \omega= 8 ω = 8 the reuse variants perform 2560 updates per iteration against the 320 of PPO, potentially amplifying the bias introduced by stale advantages across many gradient steps. Second, with B / ω = 8 B/\omega= 8 B / ω = 8 fresh samples per mini-batch, the fraction of on-policy signal per update is particularly small. Third, since all hyperparameters are inherited from PPO, the larger number of updates may increase the drift between consecutive policies and hence the diversity of the policies in the window, possibly making past samples falling outside the clipping range more frequently. All in all, in this setting PPO consistently benefits from data reuse when the reuse variants are allowed to perform ω \omega ω times as many updates as PPO, up to a moderate window size, beyond which the factors above may hinder training.
Figure 1. PPO, ω \omega ω PPO-U, and ω \omega ω PPO-BH in the fixed B B B setting (10 runs, mean ± \pm ± 95% C.I.).
Table 1. Mean final performance (average of last 10 evaluations, 10 runs ± 95 % \pm95\% ± 95% C.I.) for the settings of Figures 1–2. Colored cells: best mean performance; bold: methods whose C.I. intersects the best.
Fixed N B N_B N B . Figure 2 shows training evaluation curves across the same four environments, comparing PPO, ω \omega ω PPO-U, and ω \omega ω PPO-BH. We recall that in this setting all methods perform the same number of updates per iteration and each update sees the same amount of fresh data, while the reuse variants employ mini-batches of size ω B \omega B ω B . A consistent trend is easier to identify here: PPO benefits from sample reuse across all environments, despite the update count being matched. Most of the benefits are observable at ω = 4 \omega= 4 ω = 4 , particularly under ω \omega ω PPO-BH, as further confirmed by Table 1 . Increasing to ω = 8 \omega= 8 ω = 8 yields diminishing returns, with the reuse variants either matching or only marginally improving over PPO. We conjecture this is due to the increasing proportion of stale advantages and of samples collected under increasingly distant policies within each mini-batch, which gradually offsets the benefit of additional data as the window grows.
Figure 2. PPO, ω \omega ω PPO-U, and ω \omega ω PPO-BH in the fixed N B N_B N B setting (10 runs, mean ± 95 % \pm95\% ± 95% C.I.). (a) Reacher-v5. (b) Walker2d-v5. (c) Hopper-v5. (d) HalfCheetah-v5.
ω \omega ω PPO-U vs. ω \omega ω PPO-BH. In general, neither weighting scheme consistently dominates the other: the best-performing policy is achievable with both, given an appropriate ω \omega ω and environment (Table 1). However, the two schemes exploit past data differently. In ω \omega ω PPO-U, each sample is weighted against its own behavioral policy π θ k − i \pi_{\theta_{k-i}} π θ k − i , so the ratio deviates further from 1 for older window indices, causing ω P P O - U \omega\mathrm{PPO\text{-}U} ω PPO - U to clip an increasing fraction of past data as ω \omega ω grows. In ω P P O - B H \omega\mathrm{PPO\text{-}BH} ω PPO - BH , the mixture denominator π ω k B H \pi^{\mathrm{BH}}_{\omega k} π ω k BH has two consequences: (i) at the beginning of each iteration, the IWs are bounded by ω k \omega_k ω k , which limits how far above the clipping range older samples can start; and (ii) the IWs of the most recent samples generally differ from 1, so that, at small and large ω \omega ω , part of the fresh data may be clipped from the first update. Figure 3 reports the average pre-optimization clip fractions, grouped by window index: ω P P O - B H \omega\mathrm{PPO\text{-}BH} ω PPO - BH maintains a lower pre-optimization clip fraction for older windows, consistently with (i), while ω P P O - U \omega\mathrm{PPO\text{-}U} ω PPO - U exhibits pre-optimization clip fractions that grow with the window index, confirming that older samples contribute increasingly less.
Figure 3. Clip ratio diagnostics (10 runs, mean ± \pm ± 95% C.I.).
Main Takeaways. We now summarize when and how PPO may benefit from data reuse, based on the results of this section and of Appendix § 9 . We recall that this paper studies data reuse per se: feeding PPO with a composite buffer D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) from the most recent ω \omega ω iterations, either with vanilla importance weights (ω P P O - U \omega\mathrm{PPO\text{-}U} ω PPO - U ) or with a BH correction (ω P P O - B H \omega\mathrm{PPO\text{-}BH} ω PPO - BH ). First, PPO benefits from sample reuse in both considered settings (fixed B B B and fixed N B N_B N B ) and the benefit stems from the additional data rather than from the increased number of updates alone. Second, the impact of reuse manifests primarily in the final performance of the deployed policy, while improvements in convergence speed also occur but are closely tied to the environment and hyperparameter configuration, appearing consistently only in Reacher-v5, the simplest here, and Ant-v5 (see Appendix § 9 ). Third, in most environments, reuse is most effective at moderate window sizes (e.g., ω = 4 \omega= 4 ω = 4 ). With larger windows, particularly in the fixed B B B setting, stale advantages, the increased diversity of the policies in the window, and the dilution of fresh data may offset the benefits of the additional data. Finally, while both ω \omega ω PPO-U and ω \omega ω PPO-BH are beneficial depending on the task and hyperparameters, they exploit past data differently: ω \omega ω PPO-BH clips a smaller fraction of older samples thanks to its mixture denominator but may clip part of the most recent ones from the start, while ω \omega ω PPO-U fully exploits fresh data at the cost of clipping a larger fraction of older samples.
Conclusion
We studied sample reuse in PPO within a MIW framework, deliberately preserving its core mechanics to isolate the effect of data reuse from other factors. We instantiated ω \omega ω PPO-U and ω \omega ω PPO-BH, employing uniform and BH-corrected IWs, respectively, and derived policy improvement lower bounds for both. Beyond grounding their losses, the bounds reveal penalties uncontrollable by the actor updates, suggesting that the policies in the reuse window should remain close to each other. Empirically, we found that moderate data reuse consistently improves the final performances across diverse control tasks, while excessive reuse can be harmful. Neither ω \omega ω PPO-U nor ω \omega ω PPO-BH consistently dominates the other, though ω \omega ω PPO-BH may better exploit older samples at the cost of potentially clipping part of the fresh data. Future work should extend this analysis to other deep on-policy methods [e.g., 56, 53], and systematically isolate the individual contributions of advantage re-evaluation, modified clipping, and other heuristics introduced by existing PPO reuse variants [e.g., 46, 33, 69].
Algorithmic Details: PPO and Data Collection
In this section, we provide details on PPO, remaining tied to its common practical implementation [e.g., 48].
Algorithm 1: On-Policy Data Collection.
Input: Actor $\pi_\theta$, critic $V_w$, interaction length $H$, environments $\{E_e\}_{e=1}^{N_E}$, GAE parameter $\lambda$, discount factor $\gamma$.
1 Initialize global buffer $\mathcal{D} \gets \varnothing$;
2 for $e \in [N_E]$ do
3 Initialize local buffer $\mathcal{D}_{\mathrm{local}} \gets \varnothing$;
4 Receive initial state $s \gets s_1$ from $E_e$;
// Interaction
5 for $h \in [H]$ do
6 Set $s_h \gets s$;
7 Sample $a_h \sim \pi_\theta(\cdot \mid s_h)$ and execute it in $E_e$;
8 Observe $r_h$, $s_{h+1}$, and done flag $\xi_h$;
9 Compute value estimate $v_h = V_w(s_h)$ and $\rho_h = \pi_\theta(a_h \mid s_h)$;
10 Store tuple $(s_h, a_h, r_h, v_h, \rho_h, \xi_h)$ in $\mathcal{D}_{\mathrm{local}}$;
11 if $\xi_h$ is True then
12 Reset $E_e$ and receive new $s_{h+1}$;
13 end
14 Set $s \gets s_{h+1}$;
15 end
// GAE Calculation taking samples from $\mathcal{D}_{\mathrm{local}}$
16 Compute the last value function $v_{H+1} = V_w(s_{H+1})$;
17 Initialize next advantage $A_{H+1} = 0$;
18 for $h \in [H]_{\downarrow}$ do
19 $\delta_h = r_h + \gamma(1-\xi_h)v_{h+1} - v_h$;
20 $A_h = \delta_h + \gamma\lambda(1-\xi_h)A_{h+1}$;
21 $R_h = A_h + v_h$;
22 Add $(s_h, a_h, \rho_h, A_h, R_h)$ to $\mathcal{D}$;
23 end
24 end
Output: Buffer $\mathcal{D}$.
On-Policy Data Collection
We begin by detailing the data collection process. Unlike the theoretical formulation based on complete episodes, practical implementations [48 ] interact with the environment for a fixed number of timesteps H ∈ N H \in\mathbb{N} H ∈ N , regardless of the task’s actual horizon. This fixed-length rollout is adopted primarily for computational efficiency and memory management. To handle episode termination, we employ a boolean flag ξ h \xi_h ξ h , which is true if the environment enters an absorbing state at timestep h h h . Crucially, if the rollout ends at timestep H H H without reaching an absorbing state (truncation), the value of the last state is used for bootstrapping.
For the sake of generality, we consider a set of parallel environments { E e } e = 1 N E \{E_e\}_{e=1}^{N_E} { E e } e = 1 N E collecting independent trajectory segments of length H H H . During interaction, the agent stores the essential data required for the optimization phase: the state-action pairs ( s h , a h ) (s_h, a_h) ( s h , a h ) , the rewards r h r_h r h , the value estimates V w ( s h ) V_w(s_h) V w ( s h ) , and the probabilities π θ ( a h ∣ s h ) \pi_\theta(a_h \mid s_h) π θ ( a h ∣ s h ) . After collection, the algorithm computes the advantage estimates A h A_h A h and the return targets R h R_h R h . The standard approach is Generalized Advantage Estimation [GAE, 51], which balances the bias-variance trade-off akin to TD( λ ) (\lambda) ( λ ) . While a Monte Carlo estimate is unbiased but suffers from high variance, a TD( 0 ) (0) ( 0 ) approach has low variance but introduces significant bias due to bootstrapping. GAE interpolates between these regimes. Formally, let δ h = r h + γ ( 1 − ξ h ) V w ( s h + 1 ) − V w ( s h ) \delta_h = r_h + \gamma(1-\xi_h)V_w(s_{h+1}) - V_w(s_h) δ h = r h + γ ( 1 − ξ h ) V w ( s h + 1 ) − V w ( s h ) be the TD-error at step h h h . The GAE estimate is defined as the exponentially weighted sum of these errors:
A h = ∑ k = 0 H − h − 1 ( γ λ ) k δ h + k . A_h = \sum_{k=0}^{H-h-1}(\gamma\lambda)^k\delta_{h+k}. A h = k = 0 ∑ H − h − 1 ( γ λ ) k δ h + k .
where λ ∈ [ 0 , 1 ] \lambda\in[0,1] λ ∈ [ 0 , 1 ] controls the trade-off, and the sum is truncated at the rollout boundary H H H (handling the last state via bootstrapping as previously described). Algorithm 1 details the data collection. There, for n , m ∈ N n,m \in\mathbb{N} n , m ∈ N with n ≥ m n \ge m n ≥ m , we denote [ n , m ] ↓ : = { n , n − 1 , … , m } [n,m]_{\downarrow} := \{n,n-1,\ldots,m\} [ n , m ] ↓ := { n , n − 1 , … , m } and [ n ] ↓ : = [ n , 1 ] ↓ [n]_{\downarrow} := [n,1]_{\downarrow} [ n ] ↓ := [ n , 1 ] ↓ .
Algorithm 2: PPO [52 ] .
Input: Initial parameters θ 0 \theta_0 θ 0 and w 0 w_0 w 0 , iterations K K K , epochs per iteration K ~ \widetilde{K} K , batch size B B B , environments { E e } e = 1 N E \{E_e\}_{e=1}^{N_E} { E e } e = 1 N E , GAE parameter λ \lambda λ , interaction length H H H , discount factor γ \gamma γ , loss coefficients c 1 c_1 c 1 and c 2 c_2 c 2 , learning rate α \alpha α , clipping parameter ϵ \epsilon ϵ .
Initialize optimization variables: θ ← θ 0 \theta\gets\theta_0 θ ← θ 0 , w ← w 0 w \gets w_0 w ← w 0 .
for k ∈ [ 1 , K ] k \in[1,K] k ∈ [ 1 , K ] do
// Data Collection
D k ← \mathcal{D}_k \gets D k ← Run Algorithm 1;
// Multi-Epoch Optimization
for j ∈ [ K ~ ] j \in[\widetilde{K}] j ∈ [ K ] do
Shuffle D k \mathcal{D}_k D k ;
Create D ~ k = { B z } z = 1 N B \widetilde{\mathcal{D}}_k = \{\mathcal{B}_z\}_{z=1}^{N_B} D k = { B z } z = 1 N B , where N B = ⌈ ∣ D k ∣ B ⌉ N_B = \left\lceil\frac{|\mathcal{D}_k|}{B} \right\rceil N B = ⌈ B ∣ D k ∣ ⌉ , such that ∀ z ∈ [ N B ] : ∣ B z ∣ = B \forall z \in[N_B] : |\mathcal{B}_z| = B ∀ z ∈ [ N B ] : ∣ B z ∣ = B ;
for B ∈ D ~ k \mathcal{B} \in\widetilde{\mathcal{D}}_k B ∈ D k do
// Compute Loss
L ^ P P O ( θ , w , B ) = 1 ∣ B ∣ ∑ i ∈ B L i c l i p ( θ ) − c 1 L i v f ( w ) + c 2 H ( π θ ( ⋅ ∣ s i ) ) , \widehat{L}^{\mathrm{PPO}}(\theta,w,\mathcal{B}) = \frac{1}{|\mathcal{B}|}\sum_{i\in\mathcal{B}}L_i^{\mathrm{clip}}(\theta)-c_1L_i^{\mathrm{vf}}(w)+c_2\mathcal{H}(\pi_\theta(\cdot\mid s_i)), L PPO ( θ , w , B ) = ∣ B ∣ 1 i ∈ B ∑ L i clip ( θ ) − c 1 L i vf ( w ) + c 2 H ( π θ ( ⋅ ∣ s i )) ,
where
L i c l i p ( θ ) = min { π θ ( a i ∣ s i ) π θ i ( a i ∣ s i ) A i , clip ( π θ ( a i ∣ s i ) π θ i ( a i ∣ s i ) , 1 − ϵ , 1 + ϵ ) A i } ; L_i^{\mathrm{clip}}(\theta)=\min\left\{\frac{\pi_\theta(a_i\mid s_i)}{\pi_{\theta_i}(a_i\mid s_i)}A_i,\operatorname{clip}\left(\frac{\pi_\theta(a_i\mid s_i)}{\pi_{\theta_i}(a_i\mid s_i)},1-\epsilon,1+\epsilon\right)A_i\right\}; L i clip ( θ ) = min { π θ i ( a i ∣ s i ) π θ ( a i ∣ s i ) A i , clip ( π θ i ( a i ∣ s i ) π θ ( a i ∣ s i ) , 1 − ϵ , 1 + ϵ ) A i } ;
L i v f ( w ) = 1 2 ( V w ( s i ) − R i ) 2 . L_i^{\mathrm{vf}}(w)=\frac{1}{2}\left(V_w(s_i)-R_i\right)^2. L i vf ( w ) = 2 1 ( V w ( s i ) − R i ) 2 .
// Update
θ ← θ + α ∇ θ L ^ ( θ , w ) \theta\gets\theta+\alpha\nabla_\theta\widehat{L}(\theta,w) θ ← θ + α ∇ θ L ( θ , w ) and w ← w + α ∇ w L ^ ( θ , w ) w\gets w+\alpha\nabla_w\widehat{L}(\theta,w) w ← w + α ∇ w L ( θ , w ) .
end
end
end
Output: θ K \theta_K θ K .
PPO Details
As highlighted in § 1 , PPO [52 ] is one of the most used and successful RL methods. In order to extend it in a meaningful way, we detail here an (almost) practical version of it. Before proceeding, we need to introduce additional notation. Let L P P O : Θ × W → R L^{\mathrm{PPO}}:\Theta\times\mathcal{W}\to\mathbb{R} L PPO : Θ × W → R be a joint loss for both the actor and the critic, defined as:
L P P O ( θ , w ) = E s ∼ d θ b a ∼ π θ b ( ⋅ ∣ s ) [ min { π θ ( a ∣ s ) π θ b ( a ∣ s ) A π θ b ( s , a ) , clip ( π θ ( a ∣ s ) π θ b ( a ∣ s ) , 1 − ϵ , 1 + ϵ ) A π θ b ( s , a ) } ] − c 1 2 E s ∼ d θ b [ ( V w ( s ) − V π θ b ( s ) ) 2 ] + c 2 E s ∼ d θ b [ H ( π θ ( ⋅ ∣ s ) ) ] , \begin{aligned}
L^{\mathrm{PPO}}(\theta,w)
={}&\mathbb{E}_{\substack{s\sim d_{\theta_b}\\a\sim\pi_{\theta_b}(\cdot\mid s)}}\left[\min\left\{\frac{\pi_\theta(a\mid s)}{\pi_{\theta_b}(a\mid s)}A^{\pi_{\theta_b}}(s,a),\operatorname{clip}\left(\frac{\pi_\theta(a\mid s)}{\pi_{\theta_b}(a\mid s)},1-\epsilon,1+\epsilon\right)A^{\pi_{\theta_b}}(s,a)\right\}\right]\\
&-\frac{c_1}{2}\mathbb{E}_{s\sim d_{\theta_b}}\left[(V_w(s)-V^{\pi_{\theta_b}}(s))^2\right]\\
&+c_2\mathbb{E}_{s\sim d_{\theta_b}}\left[\mathcal{H}(\pi_\theta(\cdot\mid s))\right],
\end{aligned} L PPO ( θ , w ) = E s ∼ d θ b a ∼ π θ b ( ⋅ ∣ s ) [ min { π θ b ( a ∣ s ) π θ ( a ∣ s ) A π θ b ( s , a ) , clip ( π θ b ( a ∣ s ) π θ ( a ∣ s ) , 1 − ϵ , 1 + ϵ ) A π θ b ( s , a ) } ] − 2 c 1 E s ∼ d θ b [ ( V w ( s ) − V π θ b ( s ) ) 2 ] + c 2 E s ∼ d θ b [ H ( π θ ( ⋅ ∣ s )) ] ,
where π θ b \pi_{\theta_b} π θ b is a behavioral policy used to collect data, where H ( π θ ( ⋅ ∣ s ) ) : = E a ∼ π θ [ − log π θ ( a ∣ s ) ] \mathcal{H}(\pi_\theta(\cdot\mid s)):=\mathbb{E}_{a\sim\pi_\theta}[-\log\pi_\theta(a\mid s)] H ( π θ ( ⋅ ∣ s )) := E a ∼ π θ [ − log π θ ( a ∣ s )] is the entropy of the policy π θ \pi_\theta π θ in state s s s , and where c 1 , c 2 ∈ R ≥ 0 c_1,c_2\in\mathbb{R}_{\ge0} c 1 , c 2 ∈ R ≥ 0 are weighting constants.
Now, let B = { ( s i , a i , ρ i , A i , R i ) } i = 1 M \mathcal{B}=\{(s_i,a_i,\rho_i,A_i,R_i)\}_{i=1}^{M} B = {( s i , a i , ρ i , A i , R i ) } i = 1 M be a batch of M M M interaction tuples, where A i A_i A i and R i R_i R i are estimates of the advantage function and the return-to-go, both w.r.t. the policy used to collect data, respectively. We can define the sample-based version of L P P O L^{\mathrm{PPO}} L PPO as follows:
L ^ P P O ( θ , w , B ) = 1 ∣ B ∣ ∑ i ∈ B min { π θ ( a i ∣ s i ) π θ i ( a i ∣ s i ) A i , clip ( π θ ( a i ∣ s i ) π θ i ( a i ∣ s i ) , 1 − ϵ , 1 + ϵ ) A i } − c 1 2 ( V w ( s i ) − R i ) 2 + c 2 H ( π θ ( ⋅ ∣ s i ) ) . \hat{L}^{\mathrm{PPO}}(\theta,w,\mathcal{B})=\frac{1}{|\mathcal{B}|}\sum_{i\in\mathcal{B}}\min\left\{\frac{\pi_\theta(a_i\mid s_i)}{\pi_{\theta_i}(a_i\mid s_i)}A_i,\operatorname{clip}\left(\frac{\pi_\theta(a_i\mid s_i)}{\pi_{\theta_i}(a_i\mid s_i)},1-\epsilon,1+\epsilon\right)A_i\right\}-\frac{c_1}{2}\left(V_w(s_i)-R_i\right)^2+c_2\mathcal{H}(\pi_\theta(\cdot\mid s_i)). L ^ PPO ( θ , w , B ) = ∣ B ∣ 1 i ∈ B ∑ min { π θ i ( a i ∣ s i ) π θ ( a i ∣ s i ) A i , clip ( π θ i ( a i ∣ s i ) π θ ( a i ∣ s i ) , 1 − ϵ , 1 + ϵ ) A i } − 2 c 1 ( V w ( s i ) − R i ) 2 + c 2 H ( π θ ( ⋅ ∣ s i )) .
That being said, the parameters can then be updated as:
θ ← θ + α ∇ θ L ^ P P O ( θ , w , B ) and w ← w + α ∇ w L ^ P P O ( θ , w , B ) , \theta\leftarrow\theta+\alpha\nabla_\theta\hat{L}^{\mathrm{PPO}}(\theta,w,\mathcal{B})\quad\text{and}\quad w\leftarrow w+\alpha\nabla_w\hat{L}^{\mathrm{PPO}}(\theta,w,\mathcal{B}), θ ← θ + α ∇ θ L ^ PPO ( θ , w , B ) and w ← w + α ∇ w L ^ PPO ( θ , w , B ) ,
where α \alpha α is the step size, usually managed by Adam [25 ] or by other schedulers (e.g., by linearly decreasing the step size or adapting the step size in order to maintain a certain KL divergence among policies across iterations [48 , 3 , 46 ] ). Notice that, in many implementations, the critic loss is clipped too. The detailed pseudo-code is reported in Algorithm 2.
Proofs
Lemma B.1 (Performance Difference Lemma [Lemma 6.1, 23]). For every θ 1 , θ 2 ∈ Θ \theta_1,\theta_2\in\Theta θ 1 , θ 2 ∈ Θ , the following holds:
J ( θ 1 ) − J ( θ 2 ) = E s ∼ d θ 1 a ∼ π θ 1 ( ⋅ ∣ s ) [ A π θ 2 ( s , a ) ] . J(\theta_1)-J(\theta_2)=\mathbb{E}_{\substack{s\sim d_{\theta_1}\\a\sim\pi_{\theta_1}(\cdot\mid s)}}\left[A^{\pi_{\theta_2}}(s,a)\right]. J ( θ 1 ) − J ( θ 2 ) = E s ∼ d θ 1 a ∼ π θ 1 ( ⋅ ∣ s ) [ A π θ 2 ( s , a ) ] .
Lemma B.2 (Policy Improvement Lower Bound [Corollary 1, 1]). For every θ 1 , θ 2 ∈ Θ \theta_1,\theta_2\in\Theta θ 1 , θ 2 ∈ Θ , the following holds:
J ( θ 1 ) − J ( θ 2 ) ≥ E s ∼ d θ 2 a ∼ π θ 2 ( ⋅ ∣ s ) [ π θ 1 ( a ∣ s ) π θ 2 ( a ∣ s ) A π θ 2 ( s , a ) ] − 2 γ C ( θ 1 , θ 2 ) ( 1 − γ ) 2 E s ∼ d θ 2 [ D T V ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) ] , J(\theta_1)-J(\theta_2)\ge\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta_2}(\cdot\mid s)}}\left[\frac{\pi_{\theta_1}(a\mid s)}{\pi_{\theta_2}(a\mid s)}A^{\pi_{\theta_2}}(s,a)\right]-\frac{2\gamma C(\theta_1,\theta_2)}{(1-\gamma)^2}\mathbb{E}_{s\sim d_{\theta_2}}\left[D_{\mathrm{TV}}\left(\pi_{\theta_1}(\cdot\mid s),\pi_{\theta_2}(\cdot\mid s)\right)\right], J ( θ 1 ) − J ( θ 2 ) ≥ E s ∼ d θ 2 a ∼ π θ 2 ( ⋅ ∣ s ) [ π θ 2 ( a ∣ s ) π θ 1 ( a ∣ s ) A π θ 2 ( s , a ) ] − ( 1 − γ ) 2 2 γ C ( θ 1 , θ 2 ) E s ∼ d θ 2 [ D TV ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) ] , where C ( θ 1 , θ 2 ) : = sup s ∈ S ∣ E a ∼ π θ 1 ( ⋅ ∣ s ) [ A π θ 2 ( s , a ) ] ∣ C(\theta_1,\theta_2):=\sup_{s\in S}\left|\mathbb{E}_{a\sim\pi_{\theta_1}(\cdot\mid s)}\left[A^{\pi_{\theta_2}}(s,a)\right]\right| C ( θ 1 , θ 2 ) := sup s ∈ S E a ∼ π θ 1 ( ⋅ ∣ s ) [ A π θ 2 ( s , a ) ] .
Lemma B.3. For every θ , θ 1 , θ 2 ∈ Θ \theta,\theta_1,\theta_2\in\Theta θ , θ 1 , θ 2 ∈ Θ , the following holds:
∣ E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ] ∣ ≤ 4 R max ( 1 + γ ) 1 − γ sup s ∈ S D T V ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) . \left|\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta}(\cdot\mid s)}}\left[A^{\pi_{\theta_1}}(s,a)-A^{\pi_{\theta_2}}(s,a)\right]\right|\le\frac{4R_{\max}(1+\gamma)}{1-\gamma}\sup_{s\in S}D_{\mathrm{TV}}\left(\pi_{\theta_1}(\cdot\mid s),\pi_{\theta_2}(\cdot\mid s)\right). E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ] ≤ 1 − γ 4 R m a x ( 1 + γ ) s ∈ S sup D TV ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) .
Proof. To start the proof, we can simply note that:
∣ E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ] ∣ ≤ E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ ∣ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ∣ ] ≤ E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ ∣ Q π θ 1 ( s , a ) − Q π θ 2 ( s , a ) ∣ ] + E s ∼ d θ 2 [ ∣ V π θ 1 ( s ) − V π θ 2 ( s ) ∣ ] . \begin{aligned}
\left|\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta}(\cdot\mid s)}}\left[A^{\pi_{\theta_1}}(s,a)-A^{\pi_{\theta_2}}(s,a)\right]\right|
&\le\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta}(\cdot\mid s)}}\left[\left|A^{\pi_{\theta_1}}(s,a)-A^{\pi_{\theta_2}}(s,a)\right|\right]\\
&\le\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta}(\cdot\mid s)}}\left[\left|Q^{\pi_{\theta_1}}(s,a)-Q^{\pi_{\theta_2}}(s,a)\right|\right]+\mathbb{E}_{s\sim d_{\theta_2}}\left[\left|V^{\pi_{\theta_1}}(s)-V^{\pi_{\theta_2}}(s)\right|\right].
\end{aligned} E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ] ≤ E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ ∣ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ∣ ] ≤ E s ∼ d θ 2 a ∼ π θ ( ⋅ ∣ s ) [ ∣ Q π θ 1 ( s , a ) − Q π θ 2 ( s , a ) ∣ ] + E s ∼ d θ 2 [ ∣ V π θ 1 ( s ) − V π θ 2 ( s ) ∣ ] .
where we employed the Jensen’s inequality, then the advantage function definition, and finally we used the triangular inequality and the linearity of the expectation. Notice that in the B term we lose the action sampling from π θ \pi_\theta π θ .
Bounding the Term B. We now focus on term B. Before starting with this part, let us define for every s , s 0 ∈ S s,s_0\in S s , s 0 ∈ S and θ ∈ Θ \theta\in\Theta θ ∈ Θ the following:
d θ s 0 ( s ) : = ∑ t = 1 T γ t − 1 Pr ( s t = s ∣ s 1 = s 0 , π θ ) , d_\theta^{s_0}(s):=\sum_{t=1}^{T}\gamma^{t-1}\Pr(s_t=s\mid s_1=s_0,\pi_\theta), d θ s 0 ( s ) := t = 1 ∑ T γ t − 1 Pr ( s t = s ∣ s 1 = s 0 , π θ ) ,
which is the γ \gamma γ -discounted state s s s visitation under policy π θ \pi_\theta π θ and starting from state s 0 s_0 s 0 . Notice that it holds d θ ( s ) = E s 0 ∼ d 0 [ d θ s 0 ( s ) ] d_\theta(s)=\mathbb{E}_{s_0\sim d_0}[d_\theta^{s_0}(s)] d θ ( s ) = E s 0 ∼ d 0 [ d θ s 0 ( s )] . Specifically, considering the argument of the expectation, we have the following:
V π θ 1 ( s ) − V π θ 2 ( s ) = E s ′ ∼ d θ 1 s 0 a ∼ π θ 1 ( ⋅ ∣ s ′ ) [ A π θ 2 ( s ′ , a ) ] = E s ′ ∼ d θ 1 s 0 [ E a ∼ π θ 1 ( ⋅ ∣ s ′ ) [ A π θ 2 ( s ′ , a ) ] − E a ∼ π θ 2 ( ⋅ ∣ s ′ ) [ A π θ 2 ( s ′ , a ) ] ] = E s ′ ∼ d θ 1 s 0 [ ∫ ( π θ 1 ( a ∣ s ′ ) − π θ 2 ( a ∣ s ′ ) ) A π θ 2 ( s ′ , a ) d a ] , \begin{aligned}
V^{\pi_{\theta_1}}(s)-V^{\pi_{\theta_2}}(s)
=
\mathbb{E}_{\substack{s'\sim d_{\theta_1}^{s_0}\\a\sim\pi_{\theta_1}(\cdot\mid s')}}\left[A^{\pi_{\theta_2}}(s',a)\right] \\
&=
\mathbb{E}_{s'\sim d_{\theta_1}^{s_0}}\left[
\mathbb{E}_{a\sim\pi_{\theta_1}(\cdot\mid s')}\left[A^{\pi_{\theta_2}}(s',a)\right]
-
\mathbb{E}_{a\sim\pi_{\theta_2}(\cdot\mid s')}\left[A^{\pi_{\theta_2}}(s',a)\right]
\right] \\
&=
\mathbb{E}_{s'\sim d_{\theta_1}^{s_0}}\left[
\int\left(\pi_{\theta_1}(a\mid s')-\pi_{\theta_2}(a\mid s')\right)A^{\pi_{\theta_2}}(s',a)\,\mathrm{d}a
\right],
\end{aligned} V π θ 1 ( s ) − V π θ 2 ( s ) = E s ′ ∼ d θ 1 s 0 a ∼ π θ 1 ( ⋅ ∣ s ′ ) [ A π θ 2 ( s ′ , a ) ] = E s ′ ∼ d θ 1 s 0 [ E a ∼ π θ 1 ( ⋅ ∣ s ′ ) [ A π θ 2 ( s ′ , a ) ] − E a ∼ π θ 2 ( ⋅ ∣ s ′ ) [ A π θ 2 ( s ′ , a ) ] ] = E s ′ ∼ d θ 1 s 0 [ ∫ ( π θ 1 ( a ∣ s ′ ) − π θ 2 ( a ∣ s ′ ) ) A π θ 2 ( s ′ , a ) d a ] ,
where we applied Lemma B.1 (see also Lemma 1.16, Lemma 2) and then we exploited the fact that, for every θ ∈ Θ \theta\in\Theta θ ∈ Θ and s ∈ S s\in\mathcal{S} s ∈ S , it holds that E a ∼ π θ ( ⋅ ∣ s ) [ A π θ ( s , a ) ] = 0 \mathbb{E}_{a\sim\pi_\theta(\cdot\mid s)}[A^{\pi_\theta}(s,a)]=0 E a ∼ π θ ( ⋅ ∣ s ) [ A π θ ( s , a )] = 0 (as similarly done in Lemma 2, Lemma 50). Thus, by considering the absolute value of the interested quantity, we have the following:
∣ V π θ 1 ( s ) − V π θ 2 ( s ) ∣ ≤ E s ′ ∼ d θ 1 s 0 [ ∫ ∣ π θ 1 ( a ∣ s ′ ) − π θ 2 ( a ∣ s ′ ) ∣ ∣ A π θ 2 ( s ′ , a ) ∣ d a ] ≤ 2 R max 1 − γ E s ′ ∼ d θ 1 s 0 [ ∫ ∣ π θ 1 ( a ∣ s ′ ) − π θ 2 ( a ∣ s ′ ) ∣ d a ] = 4 R max 1 − γ E s ′ ∼ d θ 1 s 0 [ D T V ( π θ 1 ( ⋅ ∣ s ′ ) , π θ 2 ( ⋅ ∣ s ′ ) ) ] ≤ 4 R max 1 − γ sup s ∈ S D T V ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) , \begin{aligned}
\left|V^{\pi_{\theta_1}}(s)-V^{\pi_{\theta_2}}(s)\right|
\le
\mathbb{E}_{s'\sim d_{\theta_1}^{s_0}}\left[
\int\left|\pi_{\theta_1}(a\mid s')-\pi_{\theta_2}(a\mid s')\right|\left|A^{\pi_{\theta_2}}(s',a)\right|\,\mathrm{d}a
\right] \\
&\le
\frac{2R_{\max}}{1-\gamma}
\mathbb{E}_{s'\sim d_{\theta_1}^{s_0}}\left[
\int\left|\pi_{\theta_1}(a\mid s')-\pi_{\theta_2}(a\mid s')\right|\,\mathrm{d}a
\right] \\
&=
\frac{4R_{\max}}{1-\gamma}
\mathbb{E}_{s'\sim d_{\theta_1}^{s_0}}\left[
D_{\mathrm{TV}}\left(\pi_{\theta_1}(\cdot\mid s'),\pi_{\theta_2}(\cdot\mid s')\right)
\right] \\
&\le
\frac{4R_{\max}}{1-\gamma}\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}\left(\pi_{\theta_1}(\cdot\mid s),\pi_{\theta_2}(\cdot\mid s)\right),
\end{aligned} ∣ V π θ 1 ( s ) − V π θ 2 ( s ) ∣ ≤ E s ′ ∼ d θ 1 s 0 [ ∫ ∣ π θ 1 ( a ∣ s ′ ) − π θ 2 ( a ∣ s ′ ) ∣ ∣ A π θ 2 ( s ′ , a ) ∣ d a ] ≤ 1 − γ 2 R m a x E s ′ ∼ d θ 1 s 0 [ ∫ ∣ π θ 1 ( a ∣ s ′ ) − π θ 2 ( a ∣ s ′ ) ∣ d a ] = 1 − γ 4 R m a x E s ′ ∼ d θ 1 s 0 [ D TV ( π θ 1 ( ⋅ ∣ s ′ ) , π θ 2 ( ⋅ ∣ s ′ ) ) ] ≤ 1 − γ 4 R m a x s ∈ S sup D TV ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) ,
for which we just employed the Jensen’s inequality, the fact that, for every θ ∈ Θ \theta\in\Theta θ ∈ Θ , s ∈ S s\in\mathcal{S} s ∈ S , and a ∈ A a\in\mathcal{A} a ∈ A , it holds that ∣ A π θ ( s , a ) ∣ ≤ 2 R max 1 − γ \left|A^{\pi_\theta}(s,a)\right|\le\frac{2R_{\max}}{1-\gamma} ∣ A π θ ( s , a ) ∣ ≤ 1 − γ 2 R m a x , and finally the TV definition. We can finally bound the B quantity, by exploiting this last obtained result. Specifically, we have:
B = E s ∼ d θ 2 [ ∣ V π θ 1 ( s ) − V π θ 2 ( s ) ∣ ] ≤ 4 R max 1 − γ sup s ∈ S D T V ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) . \begin{aligned}
\mathrm{B}
=
\mathbb{E}_{s\sim d_{\theta_2}}\left[\left|V^{\pi_{\theta_1}}(s)-V^{\pi_{\theta_2}}(s)\right|\right] \\
&\le
\frac{4R_{\max}}{1-\gamma}\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}\left(\pi_{\theta_1}(\cdot\mid s),\pi_{\theta_2}(\cdot\mid s)\right).
\end{aligned} B = E s ∼ d θ 2 [ ∣ V π θ 1 ( s ) − V π θ 2 ( s ) ∣ ] ≤ 1 − γ 4 R m a x s ∈ S sup D TV ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) .
Bounding the Term A. To bound the term A, we will exploit what done for the term B, by exploiting the following:
Q π θ 1 ( s , a ) − Q π θ 2 ( s , a ) = γ ∫ p ( x ∣ s , a ) ( V π θ 1 ( x ) − V π θ 2 ( x ) ) d x , Q^{\pi_{\theta_1}}(s,a)-Q^{\pi_{\theta_2}}(s,a)
=
\gamma\int p(x\mid s,a)\left(V^{\pi_{\theta_1}}(x)-V^{\pi_{\theta_2}}(x)\right)\,\mathrm{d}x, Q π θ 1 ( s , a ) − Q π θ 2 ( s , a ) = γ ∫ p ( x ∣ s , a ) ( V π θ 1 ( x ) − V π θ 2 ( x ) ) d x ,
just by exploiting the action-value function definition. Thus, we have the following:
A = E s ∼ d θ 2 a ∼ π θ 1 ( ⋅ ∣ s ) [ ∣ Q π θ 1 ( s , a ) − Q π θ 2 ( s , a ) ∣ ] = γ E s ∼ d θ 2 a ∼ π θ 1 ( ⋅ ∣ s ) [ E x ∼ p ( ⋅ ∣ s , a ) [ ∣ V π θ 1 ( x ) − V π θ 2 ( x ) ∣ ] ] ≤ 4 γ R max 1 − γ sup s ∈ S D T V ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) . \begin{aligned}
\mathrm{A}
=
\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta_1}(\cdot\mid s)}}\left[\left|Q^{\pi_{\theta_1}}(s,a)-Q^{\pi_{\theta_2}}(s,a)\right|\right] \\
&=
\gamma\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta_1}(\cdot\mid s)}}\left[
\mathbb{E}_{x\sim p(\cdot\mid s,a)}\left[\left|V^{\pi_{\theta_1}}(x)-V^{\pi_{\theta_2}}(x)\right|\right]
\right] \\
&\le
\frac{4\gamma R_{\max}}{1-\gamma}\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}\left(\pi_{\theta_1}(\cdot\mid s),\pi_{\theta_2}(\cdot\mid s)\right).
\end{aligned} A = E s ∼ d θ 2 a ∼ π θ 1 ( ⋅ ∣ s ) [ ∣ Q π θ 1 ( s , a ) − Q π θ 2 ( s , a ) ∣ ] = γ E s ∼ d θ 2 a ∼ π θ 1 ( ⋅ ∣ s ) [ E x ∼ p ( ⋅ ∣ s , a ) [ ∣ V π θ 1 ( x ) − V π θ 2 ( x ) ∣ ] ] ≤ 1 − γ 4 γ R m a x s ∈ S sup D TV ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) .
Final Result. Putting all together, we can conclude that:
∣ E s ∼ d θ 2 a ∼ π θ 1 ( ⋅ ∣ s ) [ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ] ∣ ≤ 4 R max ( 1 + γ ) 1 − γ sup s ∈ S D T V ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) . \left|
\mathbb{E}_{\substack{s\sim d_{\theta_2}\\a\sim\pi_{\theta_1}(\cdot\mid s)}}\left[A^{\pi_{\theta_1}}(s,a)-A^{\pi_{\theta_2}}(s,a)\right]
\right|
\le
\frac{4R_{\max}(1+\gamma)}{1-\gamma}
\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}\left(\pi_{\theta_1}(\cdot\mid s),\pi_{\theta_2}(\cdot\mid s)\right). E s ∼ d θ 2 a ∼ π θ 1 ( ⋅ ∣ s ) [ A π θ 1 ( s , a ) − A π θ 2 ( s , a ) ] ≤ 1 − γ 4 R m a x ( 1 + γ ) s ∈ S sup D TV ( π θ 1 ( ⋅ ∣ s ) , π θ 2 ( ⋅ ∣ s ) ) .
Theorem B.4. Consider to have access to ω ∈ N ≥ 1 \omega\in\mathbb{N}_{\ge1} ω ∈ N ≥ 1 policies Π ω = { π θ i } i = 1 ω \Pi_\omega= \{\pi_{\theta_i}\}_{i=1}^{\omega} Π ω = { π θ i } i = 1 ω and to a distribution ν \nu ν over the policies into Π ω \Pi_\omega Π ω . Then, for every θ , θ ˉ ∈ Θ \theta, \bar{\theta} \in\Theta θ , θ ˉ ∈ Θ , the following holds:
J ( θ ) − J ( θ ˉ ) ≥ E i ∼ ν [ E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) A π θ i ( s , a ) ] ] − 2 γ C ( θ , θ ˉ ) ( 1 − γ ) 2 E i ∼ ν [ E s ∼ d θ i [ D T V ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] ] − 4 R max ( 1 + γ ) 1 − γ E i ∼ ν [ sup s ∈ S D T V ( π θ ˉ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] . \begin{aligned}
J(\theta)-J(\bar{\theta}) \ge{}&
\mathbb{E}_{i\sim\nu}\left[
\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}
A^{\pi_{\theta_i}}(s,a)
\right]\right]\\
&-\frac{2\gamma C(\theta,\bar{\theta})}{(1-\gamma)^2}
\mathbb{E}_{i\sim\nu}\left[
\mathbb{E}_{s\sim d_{\theta_i}}
\left[
D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi_{\theta_i}(\cdot\mid s)\right)
\right]\right]\\
&-\frac{4R_{\max}(1+\gamma)}{1-\gamma}
\mathbb{E}_{i\sim\nu}\left[
\sup_{s\in S}D_{\mathrm{TV}}\left(\pi_{\bar{\theta}}(\cdot\mid s),\pi_{\theta_i}(\cdot\mid s)\right)
\right].
\end{aligned} J ( θ ) − J ( θ ˉ ) ≥ E i ∼ ν [ E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) A π θ i ( s , a ) ] ] − ( 1 − γ ) 2 2 γ C ( θ , θ ˉ ) E i ∼ ν [ E s ∼ d θ i [ D TV ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] ] − 1 − γ 4 R m a x ( 1 + γ ) E i ∼ ν [ s ∈ S sup D TV ( π θ ˉ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] .
Proof. We start the proof from Lemma B.1 [23 ] . For every θ , θ ˉ ∈ Θ \theta,\bar{\theta}\in\Theta θ , θ ˉ ∈ Θ the following holds:
J ( θ ) − J ( θ ˉ ) = E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ A π θ ˉ ( s , a ) ] = E s ∼ d θ ˉ a ∼ π θ ˉ ( ⋅ ∣ s ) [ d θ ( s ) π θ ( a ∣ s ) d θ ˉ ( s ) π θ ˉ ( a ∣ s ) A π θ ˉ ( s , a ) ] . \begin{aligned}
J(\theta)-J(\bar{\theta})
&=\mathbb{E}_{\substack{s\sim d_\theta\\a\sim\pi_\theta(\cdot\mid s)}}\left[A^{\pi_{\bar{\theta}}}(s,a)\right]\\
&=\mathbb{E}_{\substack{s\sim d_{\bar{\theta}}\\a\sim\pi_{\bar{\theta}}(\cdot\mid s)}}\left[
\frac{d_\theta(s)\pi_\theta(a\mid s)}
{d_{\bar{\theta}}(s)\pi_{\bar{\theta}}(a\mid s)}
A^{\pi_{\bar{\theta}}}(s,a)
\right].
\end{aligned} J ( θ ) − J ( θ ˉ ) = E s ∼ d θ a ∼ π θ ( ⋅ ∣ s ) [ A π θ ˉ ( s , a ) ] = E s ∼ d θ ˉ a ∼ π θ ˉ ( ⋅ ∣ s ) [ d θ ˉ ( s ) π θ ˉ ( a ∣ s ) d θ ( s ) π θ ( a ∣ s ) A π θ ˉ ( s , a ) ] .
Now, by following the same procedure as Lemma B.2 [44 , 1 ] and [Lemma 7, 46], for every π θ i ∈ Π ω \pi_{\theta_i}\in\Pi_\omega π θ i ∈ Π ω we have the following:
J ( θ ) − J ( θ ˉ ) ≥ E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) A π θ ˉ ( s , a ) ] ⏟ = : A − 2 γ C ( θ , θ ˉ ) ( 1 − γ ) 2 E s ∼ d θ i [ D T V ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] , \begin{aligned}
J(\theta)-J(\bar{\theta})\ge{}&
\underbrace{
\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}
A^{\pi_{\bar{\theta}}}(s,a)
\right]}_{=:A}\\
&-\frac{2\gamma C(\theta,\bar{\theta})}{(1-\gamma)^2}
\mathbb{E}_{s\sim d_{\theta_i}}
\left[
D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi_{\theta_i}(\cdot\mid s)\right)
\right],
\end{aligned} J ( θ ) − J ( θ ˉ ) ≥ =: A E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) A π θ ˉ ( s , a ) ] − ( 1 − γ ) 2 2 γ C ( θ , θ ˉ ) E s ∼ d θ i [ D TV ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] ,
where C ( θ , θ ˉ ) : = sup s ∈ S ∣ E a ∼ π θ ( ⋅ ∣ s ) [ A π θ ˉ ( s , a ) ] ∣ C(\theta,\bar{\theta}):=\sup_{s\in S}\left|\mathbb{E}_{a\sim\pi_\theta(\cdot\mid s)}\left[A^{\pi_{\bar{\theta}}}(s,a)\right]\right| C ( θ , θ ˉ ) := sup s ∈ S E a ∼ π θ ( ⋅ ∣ s ) [ A π θ ˉ ( s , a ) ] is the same as in Lemma B.2, depending just on the policies appearing on the left-hand side of the policy improvement lower bound. Stopping here, we would have the policy improvement bound of [46 , 33 , 69 , 31 ] which would require to have access to advantages relative to policy π θ ˉ \pi_{\bar{\theta}} π θ ˉ in every sampled state-action pairs from policies in Π ω \Pi_\omega Π ω . To fix this, we would leverage Lemma B.3.3
To continue the proof, let us sum and subtract A π θ i ( s , a ) A^{\pi_{\theta_i}}(s,a) A π θ i ( s , a ) into the argument of the expectation of term A:
A = E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) A π θ ˉ ( s , a ) ] = E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) A π θ i ( s , a ) ] + E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) ( A π θ ˉ ( s , a ) − A π θ i ( s , a ) ) ] ⏟ = : B . \begin{aligned}
A={}&
\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}
A^{\pi_{\bar{\theta}}}(s,a)
\right]\\
={}&
\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}
A^{\pi_{\theta_i}}(s,a)
\right]
+
\underbrace{
\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}
\left(
A^{\pi_{\bar{\theta}}}(s,a)-A^{\pi_{\theta_i}}(s,a)
\right)
\right]}_{=:B}.
\end{aligned} A = = E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) A π θ ˉ ( s , a ) ] E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) A π θ i ( s , a ) ] + =: B E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) ( A π θ ˉ ( s , a ) − A π θ i ( s , a ) ) ] .
Now, we just need to bound term B, that can be easily done thanks to Lemma B.3. Specifically, we have the following:
B = E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) ( A π θ ˉ ( s , a ) − A π θ i ( s , a ) ) ] = E s ∼ d θ i a ∼ π θ ( ⋅ ∣ s ) [ A π θ ˉ ( s , a ) − A π θ i ( s , a ) ] . \begin{aligned}
B={}&
\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}
\left(
A^{\pi_{\bar{\theta}}}(s,a)-A^{\pi_{\theta_i}}(s,a)
\right)
\right]\\
={}&
\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_\theta(\cdot\mid s)}}
\left[
A^{\pi_{\bar{\theta}}}(s,a)-A^{\pi_{\theta_i}}(s,a)
\right].
\end{aligned} B = = E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) ( A π θ ˉ ( s , a ) − A π θ i ( s , a ) ) ] E s ∼ d θ i a ∼ π θ ( ⋅ ∣ s ) [ A π θ ˉ ( s , a ) − A π θ i ( s , a ) ] .
By noting that B ≥ − ∣ B ∣ B \ge-|B| B ≥ − ∣ B ∣ and then applying Lemma B.3 , we can conclude that:
J ( θ ) − J ( θ ˉ ) ≥ E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) A π θ i ( s , a ) ] − 2 γ C ( θ , θ ˉ ) ( 1 − γ ) 2 E s ∼ d θ i [ D T V ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] − 4 R max ( 1 + γ ) 1 − γ sup s ∈ S D T V ( π θ ˉ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) . J(\theta)-J(\bar{\theta}) \ge\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}A^{\pi_{\theta_i}}(s,a)\right]-\frac{2\gamma\mathcal{C}(\theta,\bar{\theta})}{(1-\gamma)^2}\mathbb{E}_{s\sim d_{\theta_i}}\left[D_{\mathrm{TV}}(\pi_\theta(\cdot\mid s),\pi_{\theta_i}(\cdot\mid s))\right]
-\frac{4R_{\max}(1+\gamma)}{1-\gamma}\sup_{s\in S}D_{\mathrm{TV}}(\pi_{\bar{\theta}}(\cdot\mid s),\pi_{\theta_i}(\cdot\mid s)). J ( θ ) − J ( θ ˉ ) ≥ E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) A π θ i ( s , a ) ] − ( 1 − γ ) 2 2 γ C ( θ , θ ˉ ) E s ∼ d θ i [ D TV ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s )) ] − 1 − γ 4 R m a x ( 1 + γ ) s ∈ S sup D TV ( π θ ˉ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s )) .
Finally, as done in Theorem 1 [46 ] , since the previous bound is holding for every π θ i ∈ Π ω \pi_{\theta_i}\in\Pi_\omega π θ i ∈ Π ω , then for any choice of distribution ν \nu ν over the policies in Π ω \Pi_\omega Π ω we have the following:
J ( θ ) − J ( θ ˉ ) ≥ E i ∼ ν [ E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ i ( a ∣ s ) A π θ i ( s , a ) ] ] − 2 γ C ( θ , θ ˉ ) ( 1 − γ ) 2 E i ∼ ν [ E s ∼ d θ i [ D T V ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] ] − 4 R max ( 1 + γ ) 1 − γ E i ∼ ν [ sup s ∈ S D T V ( π θ ˉ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s ) ) ] . J(\theta)-J(\bar{\theta})\ge\mathbb{E}_{i\sim\nu}\left[\mathbb{E}_{\substack{s\sim d_{\theta_i}\\a\sim\pi_{\theta_i}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\theta_i}(a\mid s)}A^{\pi_{\theta_i}}(s,a)\right]\right]
-\frac{2\gamma\mathcal{C}(\theta,\bar{\theta})}{(1-\gamma)^2}\mathbb{E}_{i\sim\nu}\left[\mathbb{E}_{s\sim d_{\theta_i}}\left[D_{\mathrm{TV}}(\pi_\theta(\cdot\mid s),\pi_{\theta_i}(\cdot\mid s))\right]\right]
-\frac{4R_{\max}(1+\gamma)}{1-\gamma}\mathbb{E}_{i\sim\nu}\left[\sup_{s\in S}D_{\mathrm{TV}}(\pi_{\bar{\theta}}(\cdot\mid s),\pi_{\theta_i}(\cdot\mid s))\right]. J ( θ ) − J ( θ ˉ ) ≥ E i ∼ ν [ E s ∼ d θ i a ∼ π θ i ( ⋅ ∣ s ) [ π θ i ( a ∣ s ) π θ ( a ∣ s ) A π θ i ( s , a ) ] ] − ( 1 − γ ) 2 2 γ C ( θ , θ ˉ ) E i ∼ ν [ E s ∼ d θ i [ D TV ( π θ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s )) ] ] − 1 − γ 4 R m a x ( 1 + γ ) E i ∼ ν [ s ∈ S sup D TV ( π θ ˉ ( ⋅ ∣ s ) , π θ i ( ⋅ ∣ s )) ] .
Theorem 3.1. Let ω k ∈ N ≥ 1 \omega_k\in\mathbb{N}_{\ge1} ω k ∈ N ≥ 1 . Having access to { π θ k − i } i = 0 ω k − 1 \{\pi_{\theta_{k-i}}\}_{i=0}^{\omega_k-1} { π θ k − i } i = 0 ω k − 1 , for any target π θ \pi_\theta π θ , the following holds:
J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ k − i ( a ∣ s ) A π θ k − i ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) ] − 4 R max ( 1 + γ ) ( 1 − γ ) ω k ∑ i = 0 ω k − 1 sup s ∈ S D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) . J(\theta)-J(\theta_k)\ge\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\theta_{k-i}}(a\mid s)}A^{\pi_{\theta_{k-i}}}(s,a)\right]
-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}\left[D_{\mathrm{TV}}(\pi_\theta(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s))\right]
-\frac{4R_{\max}(1+\gamma)}{(1-\gamma)\omega_k}\sum_{i=0}^{\omega_k-1}\sup_{s\in S}D_{\mathrm{TV}}(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)). J ( θ ) − J ( θ k ) ≥ ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ k − i ( a ∣ s ) π θ ( a ∣ s ) A π θ k − i ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) ] − ( 1 − γ ) ω k 4 R m a x ( 1 + γ ) i = 0 ∑ ω k − 1 s ∈ S sup D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) .
Proof. The proof straightforwardly follows from Theorem B.4 . In particular, setting Π ω = { π ω k − i } i = 0 ω k − 1 \Pi_\omega=\{\pi_{\omega_{k-i}}\}_{i=0}^{\omega_k-1} Π ω = { π ω k − i } i = 0 ω k − 1 , θ ˉ = θ k \bar{\theta}=\theta_k θ ˉ = θ k , and by considering a uniform distribution ν \nu ν over the policies in the window. Thus, we have the following:
J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π θ k − i ( a ∣ s ) A π θ k − i ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) ] − 4 R max ( 1 + γ ) ( 1 − γ ) ω k ∑ i = 0 ω k − 1 sup s ∈ S D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) . J(\theta)-J(\theta_k)\ge\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\theta_{k-i}}(a\mid s)}A^{\pi_{\theta_{k-i}}}(s,a)\right]
-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}\left[D_{\mathrm{TV}}(\pi_\theta(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s))\right]
-\frac{4R_{\max}(1+\gamma)}{(1-\gamma)\omega_k}\sum_{i=0}^{\omega_k-1}\sup_{s\in S}D_{\mathrm{TV}}(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)). J ( θ ) − J ( θ k ) ≥ ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ k − i ( a ∣ s ) π θ ( a ∣ s ) A π θ k − i ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) ] − ( 1 − γ ) ω k 4 R m a x ( 1 + γ ) i = 0 ∑ ω k − 1 s ∈ S sup D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s )) .
Theorem 3.2. Let ω k ∈ N ≥ 1 \omega_k \in\mathbb{N}_{\ge1} ω k ∈ N ≥ 1 . Having access to { π θ k − i } i = 0 ω k − 1 \{\pi_{\theta_{k-i}}\}_{i=0}^{\omega_k-1} { π θ k − i } i = 0 ω k − 1 , let d ω k B H ( s ) : = 1 ω k ∑ i = 0 ω k − 1 d θ k − i ( s ) d^{\mathrm{BH}}_{\omega_k}(s) := \frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1} d_{\theta_{k-i}}(s) d ω k BH ( s ) := ω k 1 ∑ i = 0 ω k − 1 d θ k − i ( s ) be the uniform mixture of the discounted state occupancies. Then, for any π θ \pi_\theta π θ , the following holds:
J ( θ ) − J ( θ k ) ≥ J(\theta)-J(\theta_k) \ge J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k − i ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) ] \frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi^{\mathrm{BH}}_{\omega_k}(a\mid s)}A^{\pi_{\theta_{k-i}}}(s,a)\right]-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}\left[D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)\right)\right] ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k − i ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s ) ) ] − 4 R max ( 1 + γ ) 1 − γ ∑ i = 0 ω k − 1 sup s ∈ S D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) − ( 4 R max 1 − γ + 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ) ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) . -\frac{4R_{\max}(1+\gamma)}{1-\gamma}\sum_{i=0}^{\omega_k-1}\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}\left(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)\right)-\left(\frac{4R_{\max}}{1-\gamma}+\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\right)\sum_{i=0}^{\omega_k-1}D_{\mathrm{TV}}\left(d^{\mathrm{BH}}_{\omega_k},d_{\theta_{k-i}}\right). − 1 − γ 4 R m a x ( 1 + γ ) i = 0 ∑ ω k − 1 s ∈ S sup D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) − ( 1 − γ 4 R m a x + ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) ) i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) .
Proof. To start the proof, let us start from Lemma B.1:
J ( θ ) − J ( θ k ) = E s ∼ d θ k a ∼ π θ k ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] ± E s ∼ d ω k B H a ∼ π θ ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] = E s ∼ d ω k B H a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − ∫ ( d ω k B H ( s ) − d θ ( s ) ) E a ∼ π θ ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] d s , \begin{aligned}
J(\theta)-J(\theta_k)
=\mathbb{E}_{\substack{s\sim d_{\theta_k}\\a\sim\pi_{\theta_k}(\cdot\mid s)}}\left[A^{\pi_{\theta_k}}(s,a)\right]\pm\mathbb{E}_{\substack{s\sim d^{\mathrm{BH}}_{\omega_k}\\a\sim\pi_{\theta}(\cdot\mid s)}}\left[A^{\pi_{\theta_k}}(s,a)\right] \\
&=\mathbb{E}_{\substack{s\sim d^{\mathrm{BH}}_{\omega_k}\\a\sim\pi^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi^{\mathrm{BH}}_{\omega_k}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]-\int\left(d^{\mathrm{BH}}_{\omega_k}(s)-d_{\theta}(s)\right)\mathbb{E}_{a\sim\pi_\theta(\cdot\mid s)}\left[A^{\pi_{\theta_k}}(s,a)\right]\,\mathrm{d}s,
\end{aligned} J ( θ ) − J ( θ k ) = E s ∼ d θ k a ∼ π θ k ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] ± E s ∼ d ω k BH a ∼ π θ ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] = E s ∼ d ω k BH a ∼ π ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − ∫ ( d ω k BH ( s ) − d θ ( s ) ) E a ∼ π θ ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] d s ,
where we just changed, applying the needed importance weight correction, the state and action sampling distributions.
Now, let us introduce the BH state-action occupancy. Specifically, for every s ∈ S s\in\mathcal{S} s ∈ S and a ∈ A a\in\mathcal{A} a ∈ A , let μ ω k B H ( s , a ) : = 1 ω k ∑ i = 0 ω k − 1 d θ k − i ( s ) π θ k − i ( a ∣ s ) \mu^{\mathrm{BH}}_{\omega_k}(s,a):=\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}d_{\theta_{k-i}}(s)\pi_{\theta_{k-i}}(a\mid s) μ ω k BH ( s , a ) := ω k 1 ∑ i = 0 ω k − 1 d θ k − i ( s ) π θ k − i ( a ∣ s ) . Notice that d ω k B H d^{\mathrm{BH}}_{\omega_k} d ω k BH is the discounted state occupancy induced by μ ω k B H \mu^{\mathrm{BH}}_{\omega_k} μ ω k BH and that:
∫ μ ω k B H ( s , a ) d a = 1 ω k ∑ i = 0 ω k − 1 ∫ d θ k − i ( s ) π θ k − i ( a ∣ s ) d a = d ω k B H ( s ) . \int\mu^{\mathrm{BH}}_{\omega_k}(s,a)\,\mathrm{d}a=\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\int d_{\theta_{k-i}}(s)\pi_{\theta_{k-i}}(a\mid s)\,\mathrm{d}a=d^{\mathrm{BH}}_{\omega_k}(s). ∫ μ ω k BH ( s , a ) d a = ω k 1 i = 0 ∑ ω k − 1 ∫ d θ k − i ( s ) π θ k − i ( a ∣ s ) d a = d ω k BH ( s ) .
Letting μ ω k B H ( a ∣ s ) : = μ ω k B H ( s , a ) / d ω k B H ( s ) \mu^{\mathrm{BH}}_{\omega_k}(a\mid s):=\mu^{\mathrm{BH}}_{\omega_k}(s,a)/d^{\mathrm{BH}}_{\omega_k}(s) μ ω k BH ( a ∣ s ) := μ ω k BH ( s , a ) / d ω k BH ( s ) we note that, in general, we have the following:
μ ω k B H ( a ∣ s ) = ∑ i = 0 ω k − 1 d θ k − i ( s ) π θ k − i ( a ∣ s ) ∑ i = 0 ω k − 1 d θ k − i ( s ) ≠ 1 ω k ∑ i = 0 ω k − 1 π θ k − i ( a ∣ s ) = π ω k B H ( a ∣ s ) . \mu^{\mathrm{BH}}_{\omega_k}(a\mid s)=\frac{\sum_{i=0}^{\omega_k-1}d_{\theta_{k-i}}(s)\pi_{\theta_{k-i}}(a\mid s)}{\sum_{i=0}^{\omega_k-1}d_{\theta_{k-i}}(s)}\ne\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\pi_{\theta_{k-i}}(a\mid s)=\pi^{\mathrm{BH}}_{\omega_k}(a\mid s). μ ω k BH ( a ∣ s ) = ∑ i = 0 ω k − 1 d θ k − i ( s ) ∑ i = 0 ω k − 1 d θ k − i ( s ) π θ k − i ( a ∣ s ) = ω k 1 i = 0 ∑ ω k − 1 π θ k − i ( a ∣ s ) = π ω k BH ( a ∣ s ) .
That being said, by applying the argument of [1 ] , the following holds:
J ( θ ) − J ( θ k ) = E s ∼ d ω k B H a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − ∫ ( d ω k B H ( s ) − d θ ( s ) ) E a ∼ π θ ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] d s ≥ E s ∼ d ω k B H a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 E s ∼ d ω k B H [ D T V ( π θ ( ⋅ ∣ s ) , μ ω k B H ( ⋅ ∣ s ) ) ] = E s ∼ d ω k B H a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , μ ω k B H ( ⋅ ∣ s ) ) ] . \begin{aligned}
J(\theta)-J(\theta_k)
=\mathbb{E}_{\substack{s\sim d^{\mathrm{BH}}_{\omega_k}\\a\sim\pi^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi^{\mathrm{BH}}_{\omega_k}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]-\int\left(d^{\mathrm{BH}}_{\omega_k}(s)-d_{\theta}(s)\right)\mathbb{E}_{a\sim\pi_\theta(\cdot\mid s)}\left[A^{\pi_{\theta_k}}(s,a)\right]\,\mathrm{d}s \\
&\ge\mathbb{E}_{\substack{s\sim d^{\mathrm{BH}}_{\omega_k}\\a\sim\pi^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi^{\mathrm{BH}}_{\omega_k}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2}\mathbb{E}_{s\sim d^{\mathrm{BH}}_{\omega_k}}\left[D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\mu^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)\right)\right] \\
&=\mathbb{E}_{\substack{s\sim d^{\mathrm{BH}}_{\omega_k}\\a\sim\pi^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi^{\mathrm{BH}}_{\omega_k}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}\left[D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\mu^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)\right)\right].
\end{aligned} J ( θ ) − J ( θ k ) = E s ∼ d ω k BH a ∼ π ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − ∫ ( d ω k BH ( s ) − d θ ( s ) ) E a ∼ π θ ( ⋅ ∣ s ) [ A π θ k ( s , a ) ] d s ≥ E s ∼ d ω k BH a ∼ π ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − ( 1 − γ ) 2 2 γ C ( θ , θ k ) E s ∼ d ω k BH [ D TV ( π θ ( ⋅ ∣ s ) , μ ω k BH ( ⋅ ∣ s ) ) ] = E s ∼ d ω k BH a ∼ π ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , μ ω k BH ( ⋅ ∣ s ) ) ] .
Now, by triangular inequality we have that:
D T V ( π θ ( ⋅ ∣ s ) , μ ω k B H ( ⋅ ∣ s ) ) ≤ D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) + D T V ( π ω k B H ( ⋅ ∣ s ) , μ ω k B H ( ⋅ ∣ s ) ) . D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\mu^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)\right)\le D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)\right)+D_{\mathrm{TV}}\left(\pi^{\mathrm{BH}}_{\omega_k}(\cdot\mid s),\mu^{\mathrm{BH}}_{\omega_k}(\cdot\mid s)\right). D TV ( π θ ( ⋅ ∣ s ) , μ ω k BH ( ⋅ ∣ s ) ) ≤ D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s ) ) + D TV ( π ω k BH ( ⋅ ∣ s ) , μ ω k BH ( ⋅ ∣ s ) ) .
Furthermore, note that:
∣ π ω k B H ( a ∣ s ) − μ ω k B H ( a ∣ s ) ∣ = 1 ω k ∣ ∑ i = 0 ω k − 1 π θ k − i ( a ∣ s ) − d θ k − i ( s ) π θ k − i ( a ∣ s ) d ω k B H ( s ) ∣ ≤ 1 ω k ∑ i = 0 ω k − 1 ∣ 1 − d θ k − i ( s ) d ω k B H ( s ) ∣ π θ k − i ( a ∣ s ) ≤ 1 ω k ∑ i = 0 ω k − 1 ∣ d ω k B H ( s ) − d θ k − i ( s ) ∣ d ω k B H ( s ) π θ k − i ( a ∣ s ) , (1) \begin{aligned}
\left|\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)-\mu_{\omega_k}^{\mathrm{BH}}(a\mid s)\right|&=\frac{1}{\omega_k}\left|\sum_{i=0}^{\omega_k-1}\pi_{\theta_{k-i}}(a\mid s)-\frac{d\theta_{k-i}(s)\pi_{\theta_{k-i}}(a\mid s)}{d\omega_k^{\mathrm{BH}}(s)}\right|\\
&\leq\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\left|1-\frac{d\theta_{k-i}(s)}{d\omega_k^{\mathrm{BH}}(s)}\right|\pi_{\theta_{k-i}}(a\mid s)\\
&\leq\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\frac{\left|d_{\omega_k}^{\mathrm{BH}}(s)-d_{\theta_{k-i}}(s)\right|}{d_{\omega_k}^{\mathrm{BH}}(s)}\pi_{\theta_{k-i}}(a\mid s), \tag*{(1)}
\end{aligned} π ω k BH ( a ∣ s ) − μ ω k BH ( a ∣ s ) = ω k 1 i = 0 ∑ ω k − 1 π θ k − i ( a ∣ s ) − d ω k BH ( s ) d θ k − i ( s ) π θ k − i ( a ∣ s ) ≤ ω k 1 i = 0 ∑ ω k − 1 1 − d ω k BH ( s ) d θ k − i ( s ) π θ k − i ( a ∣ s ) ≤ ω k 1 i = 0 ∑ ω k − 1 d ω k BH ( s ) d ω k BH ( s ) − d θ k − i ( s ) π θ k − i ( a ∣ s ) , (1)
which simply follows from the triangular inequality and from algebraic manipulations taking into account the d ω k B H d_{\omega_k}^{\mathrm{BH}} d ω k BH definition. Equipped with these two arguments, we have that:
E s ∼ d ω k B H [ D T V ( π ω k B H ( ⋅ ∣ s ) , μ ω k B H ( ⋅ ∣ s ) ) ] ≤ 1 2 ω k ∑ i = 0 ω k − 1 ∫ S d ω k B H ( s ) ∣ d ω k B H ( s ) − d θ k − i ( s ) ∣ d ω k B H ( s ) ∫ A π θ k − i ( a ∣ s ) d a d s = 1 ω k ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) , \begin{aligned}
\mathop{\mathbb{E}}_{s\sim d_{\omega_k}^{\mathrm{BH}}}\left[D_{\mathrm{TV}}\left(\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s),\mu_{\omega_k}^{\mathrm{BH}}(\cdot\mid s)\right)\right]
&\leq\frac{1}{2\omega_k}\sum_{i=0}^{\omega_k-1}\int_{\mathcal{S}}d_{\omega_k}^{\mathrm{BH}}(s)\frac{\left|d_{\omega_k}^{\mathrm{BH}}(s)-d_{\theta_{k-i}}(s)\right|}{d_{\omega_k}^{\mathrm{BH}}(s)}\int_{\mathcal{A}}\pi_{\theta_{k-i}}(a\mid s)\,da\,ds\\
&=\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}D_{\mathrm{TV}}\left(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}\right),
\end{aligned} E s ∼ d ω k BH [ D TV ( π ω k BH ( ⋅ ∣ s ) , μ ω k BH ( ⋅ ∣ s ) ) ] ≤ 2 ω k 1 i = 0 ∑ ω k − 1 ∫ S d ω k BH ( s ) d ω k BH ( s ) d ω k BH ( s ) − d θ k − i ( s ) ∫ A π θ k − i ( a ∣ s ) d a d s = ω k 1 i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) ,
thus leading to the following intermediate form of the performance improvement lower bound we aim to reach:
J ( θ ) − J ( θ k ) ≥ E s ∼ d ω k B H a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) . (2) \begin{aligned}
J(\theta)-J(\theta_k)&\geq\underset{\substack{s\sim d_{\omega_k}^{\mathrm{BH}}\\a\sim\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s)}}{\mathbb{E}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]\\
&\quad-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\underset{s\sim d_{\theta_{k-i}}}{\mathbb{E}}\left[D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s)\right)\right]\\
&\quad-\frac{2\gamma\mathcal{C}(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}D_{\mathrm{TV}}\left(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}\right). \tag*{(2)}
\end{aligned} J ( θ ) − J ( θ k ) ≥ s ∼ d ω k BH a ∼ π ω k BH ( ⋅ ∣ s ) E [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 s ∼ d θ k − i E [ D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s ) ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) . (2)
In order to carry on with the derivation, we introduce the following quantity:
A : = E ( s , a ) ∼ μ ω k B H [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] = 1 ω k ∑ i = 0 ω k − 1 ∬ d θ k − i ( s ) π θ k − i ( a ∣ s ) π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) d s d a = 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] , \begin{aligned}
\mathrm{A}&:=\underset{(s,a)\sim\mu_{\omega_k}^{\mathrm{BH}}}{\mathbb{E}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]\\
&=\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\iint d_{\theta_{k-i}}(s)\pi_{\theta_{k-i}}(a\mid s)\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\,ds\,da\\
&=\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\underset{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}{\mathbb{E}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right],
\end{aligned} A := ( s , a ) ∼ μ ω k BH E [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] = ω k 1 i = 0 ∑ ω k − 1 ∬ d θ k − i ( s ) π θ k − i ( a ∣ s ) π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) d s d a = ω k 1 i = 0 ∑ ω k − 1 s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) E [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] ,
where we just exploited the μ ω k B H \mu_{\omega_k}^{\mathrm{BH}} μ ω k BH definition.
Notice that the next steps are to make A appear into (2) , then employing Lemma B.3 to finally have the stale advantages. That being said, we proceed by adding and subtracting A into Equation (2), obtaining the following:
J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i B H a ∼ π θ k − i B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i B H [ D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) + E s ∼ d ω k B H a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − E ( s , a ) ∼ μ ω k B H [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] ⏟ = : B . (3) \begin{aligned}
J(\theta)-J(\theta_k) \geq{} & \frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}^{\mathrm{BH}}\\a\sim\pi_{\theta_{k-i}}^{\mathrm{BH}}(\cdot|s)}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]\\
&-\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}^{\mathrm{BH}}}\left[D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s)\right)\right]\\
&-\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}D_{\mathrm{TV}}\left(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}\right)\\
&+\underbrace{\mathbb{E}_{s\sim d_{\omega_k}^{\mathrm{BH}}\\a\sim\pi_{\omega_k}^{\mathrm{BH}}(\cdot|s)}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]-\mathbb{E}_{(s,a)\sim\mu_{\omega_k}^{\mathrm{BH}}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]}_{=:B}. \tag*{(3)}
\end{aligned} J ( θ ) − J ( θ k ) ≥ ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i BH a ∼ π θ k − i BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i BH [ D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s ) ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) + =: B E s ∼ d ω k BH a ∼ π ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − E ( s , a ) ∼ μ ω k BH [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] . (3)
Next, we have to treat B. To do so, we can exploit the fact that ∫ μ ω k B H ( s , a ) d a = d ω k B H ( s ) \int\mu_{\omega_k}^{\mathrm{BH}}(s,a)\mathrm{d}a=d_{\omega_k}^{\mathrm{BH}}(s) ∫ μ ω k BH ( s , a ) d a = d ω k BH ( s ) for every s ∈ S s\in\mathcal{S} s ∈ S . Then, the following holds:
B = E s ∼ d ω k B H a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − E ( s , a ) ∼ μ ω k B H [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] = E s ∼ d ω k B H [ E a ∼ π ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − E a ∼ μ ω k B H ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] ] = E s ∼ d ω k B H [ ∫ ( π ω k B H ( a ∣ s ) − μ ω k B H ( a ∣ s ) ) π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) d a ] . \begin{aligned}
B={}&\mathbb{E}_{s\sim d_{\omega_k}^{\mathrm{BH}}\\a\sim\pi_{\omega_k}^{\mathrm{BH}}(\cdot|s)}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]-\mathbb{E}_{(s,a)\sim\mu_{\omega_k}^{\mathrm{BH}}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]\\
={}&\mathbb{E}_{s\sim d_{\omega_k}^{\mathrm{BH}}}\left[\mathbb{E}_{a\sim\pi_{\omega_k}^{\mathrm{BH}}(\cdot|s)}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]-\mathbb{E}_{a\sim\mu_{\omega_k}^{\mathrm{BH}}(\cdot|s)}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\right]\right]\\
={}&\mathbb{E}_{s\sim d_{\omega_k}^{\mathrm{BH}}}\left[\int\left(\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)-\mu_{\omega_k}^{\mathrm{BH}}(a\mid s)\right)\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_k}}(s,a)\mathrm{d}a\right].
\end{aligned} B = = = E s ∼ d ω k BH a ∼ π ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − E ( s , a ) ∼ μ ω k BH [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] E s ∼ d ω k BH [ E a ∼ π ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − E a ∼ μ ω k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] ] E s ∼ d ω k BH [ ∫ ( π ω k BH ( a ∣ s ) − μ ω k BH ( a ∣ s ) ) π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) d a ] .
Because of the presence of the BH-corrected ratio π θ ( a ∣ s ) π ω k B H ( a ∣ s ) \frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)} π ω k BH ( a ∣ s ) π θ ( a ∣ s ) , we cannot directly bound ∣ B ∣ |B| ∣ B ∣ with a standard TV argument. Thus, we first note that:
B ≤ E s ∼ d ω k B H [ ∫ ∣ π ω k B H ( a ∣ s ) − μ ω k B H ( a ∣ s ) ∣ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) ∣ A π θ k ( s , a ) ∣ d a ] ≤ 2 R max 1 − γ E s ∼ d ω k B H [ ∣ π ω k B H ( a ∣ s ) − μ ω k B H ( a ∣ s ) ∣ π ω k B H ( a ∣ s ) ] , \begin{aligned}
B\leq\mathbb{E}_{s\sim d_{\omega_k}^{\mathrm{BH}}}\left[\int\left|\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)-\mu_{\omega_k}^{\mathrm{BH}}(a\mid s)\right|\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}\left|A^{\pi_{\theta_k}}(s,a)\right|\mathrm{d}a\right] \\
&\leq\frac{2R_{\max}}{1-\gamma}\mathbb{E}_{s\sim d_{\omega_k}^{\mathrm{BH}}}\left[\frac{\left|\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)-\mu_{\omega_k}^{\mathrm{BH}}(a\mid s)\right|}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}\right],
\end{aligned} B ≤ E s ∼ d ω k BH [ ∫ π ω k BH ( a ∣ s ) − μ ω k BH ( a ∣ s ) π ω k BH ( a ∣ s ) π θ ( a ∣ s ) ∣ A π θ k ( s , a ) ∣ d a ] ≤ 1 − γ 2 R m a x E s ∼ d ω k BH [ π ω k BH ( a ∣ s ) π ω k BH ( a ∣ s ) − μ ω k BH ( a ∣ s ) ] ,
where we exploited the fact that for every s ∈ S s\in\mathcal{S} s ∈ S , a ∈ A a\in\mathcal{A} a ∈ A , and θ ∈ Θ \theta\in\Theta θ ∈ Θ it holds that ∣ A π θ ( s , a ) ∣ ≤ 2 R max 1 − γ |A^{\pi_\theta}(s,a)|\leq\frac{2R_{\max}}{1-\gamma} ∣ A π θ ( s , a ) ∣ ≤ 1 − γ 2 R m a x and we used π θ \pi_\theta π θ as an action-sampling distribution.
Exploiting Equation (1), we can finally conclude the ∣ B ∣ |B| ∣ B ∣ bound as:
B ≤ 2 R max 1 − γ E s ∼ d ω k B H a ∼ π θ k B H ( ⋅ ∣ s ) [ ∣ π ω k B H ( a ∣ s ) − μ ω k B H ( a ∣ s ) ∣ π ω k B H ( a ∣ s ) ] ≤ 2 R max ( 1 − γ ) ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i B H a ∼ π θ k B H ( ⋅ ∣ s ) [ ∣ d ω k B H ( s ) − d θ k − i ( s ) ∣ d ω k B H ( s ) π θ k − i ( a ∣ s ) π ω k B H ( a ∣ s ) ] ≤ 2 R max 1 − γ ∑ i = 0 ω k − 1 E s ∼ d θ k − i B H [ ∣ d ω k B H ( s ) − d θ k − i ( s ) ∣ d ω k B H ( s ) ] = 4 R max 1 − γ ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) , \begin{aligned}
B\leq\frac{2R_{\max}}{1-\gamma}\mathbb{E}_{s\sim d_{\omega_k}^{\mathrm{BH}}\\a\sim\pi_{\theta_k}^{\mathrm{BH}}(\cdot|s)}\left[\frac{\left|\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)-\mu_{\omega_k}^{\mathrm{BH}}(a\mid s)\right|}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}\right] \\
&\leq\frac{2R_{\max}}{(1-\gamma)\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}^{\mathrm{BH}}\\a\sim\pi_{\theta_k}^{\mathrm{BH}}(\cdot|s)}\left[\frac{\left|d_{\omega_k}^{\mathrm{BH}}(s)-d_{\theta_{k-i}}(s)\right|}{d_{\omega_k}^{\mathrm{BH}}(s)}\frac{\pi_{\theta_{k-i}}(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}\right] \\
&\leq\frac{2R_{\max}}{1-\gamma}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}^{\mathrm{BH}}}\left[\frac{\left|d_{\omega_k}^{\mathrm{BH}}(s)-d_{\theta_{k-i}}(s)\right|}{d_{\omega_k}^{\mathrm{BH}}(s)}\right] \\
&= \frac{4R_{\max}}{1-\gamma}\sum_{i=0}^{\omega_k-1}D_{\mathrm{TV}}\left(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}\right),
\end{aligned} B ≤ 1 − γ 2 R m a x E s ∼ d ω k BH a ∼ π θ k BH ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π ω k BH ( a ∣ s ) − μ ω k BH ( a ∣ s ) ] ≤ ( 1 − γ ) ω k 2 R m a x i = 0 ∑ ω k − 1 E s ∼ d θ k − i BH a ∼ π θ k BH ( ⋅ ∣ s ) [ d ω k BH ( s ) d ω k BH ( s ) − d θ k − i ( s ) π ω k BH ( a ∣ s ) π θ k − i ( a ∣ s ) ] ≤ 1 − γ 2 R m a x i = 0 ∑ ω k − 1 E s ∼ d θ k − i BH [ d ω k BH ( s ) d ω k BH ( s ) − d θ k − i ( s ) ] = 1 − γ 4 R m a x i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) ,
where: (i) we applied the previous bound on ∣ π ω k B H ( a ∣ s ) − μ ω k B H ( a ∣ s ) ∣ \left|\pi_{\omega_k}^{\mathrm{BH}}(a \mid s)-\mu_{\omega_k}^{\mathrm{BH}}(a \mid s)\right| π ω k BH ( a ∣ s ) − μ ω k BH ( a ∣ s ) from Equation (1) ; (ii) we exploited the fact that π θ k − i ( a ∣ s ) π ω k B H ( a ∣ s ) ≤ ω k \frac{\pi_{\theta_{k-i}}(a \mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a \mid s)} \leq\omega_k π ω k BH ( a ∣ s ) π θ k − i ( a ∣ s ) ≤ ω k for every s ∈ S s \in\mathcal{S} s ∈ S , a ∈ A a \in\mathcal{A} a ∈ A , and i ∈ [ 0 , ω k − 1 ] i \in[0,\omega_k-1] i ∈ [ 0 , ω k − 1 ] ; and (iii) we exploited the TV definition. Notice that, when exploiting the specific structure of the BH importance weight with π θ k − i \pi_{\theta_{k-i}} π θ k − i at the numerator, we lose the dependence on π θ \pi_\theta π θ in the inner expectation term.
We can now plug this result into Equation (3) , obtaining:
J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) ] − ( 4 R max 1 − γ + 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ) ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) . (4) \begin{aligned}
J(\theta)-J(\theta_k) \geq{}&
\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}
\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}
A^{\pi_{\theta_k}}(s,a)
\right] \\
&-\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}
\sum_{i=0}^{\omega_k-1}
\mathbb{E}_{s\sim d_{\theta_{k-i}}}
\left[
D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s)\right)
\right] \\
&-\left(\frac{4R_{\max}}{1-\gamma}
+\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\right)
\sum_{i=0}^{\omega_k-1}
D_{\mathrm{TV}}\left(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}\right). \tag*{(4)}
\end{aligned} J ( θ ) − J ( θ k ) ≥ ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s ) ) ] − ( 1 − γ 4 R m a x + ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) ) i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) . (4)
The last thing to do to conclude the proof is to substitute in C C C the fresh advantage A π θ k ( s , a ) A^{\pi_{\theta_k}}(s,a) A π θ k ( s , a ) with the stale one A π θ k − i ( s , a ) A^{\pi_{\theta_{k-i}}}(s,a) A π θ k − i ( s , a ) , for every i ∈ [ 0 , ω k − 1 ] i \in[0,\omega_k-1] i ∈ [ 0 , ω k − 1 ] . To do so, we will proceed as done in Theorem 3.1, adding and subtracting the expectation term with the stale advantage, then resorting to Lemma B.3 . Specifically, the following holds
C = E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k ( s , a ) ] = E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k − i ( s , a ) ] + E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) ( A π θ k ( s , a ) − A π θ k − i ( s , a ) ) ] . \begin{aligned}
C={}&
\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}
A^{\pi_{\theta_k}}(s,a)
\right] \\
={}&
\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}
A^{\pi_{\theta_{k-i}}}(s,a)
\right]
+
\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}
\left(A^{\pi_{\theta_k}}(s,a)-A^{\pi_{\theta_{k-i}}}(s,a)\right)
\right].
\end{aligned} C = = E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k ( s , a ) ] E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k − i ( s , a ) ] + E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) ( A π θ k ( s , a ) − A π θ k − i ( s , a ) ) ] .
So now, it suffices to apply Lemma B.3 to D D D , thus having:
D = E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) ( A π θ k ( s , a ) − A π θ k − i ( s , a ) ) ] = E s ∼ d θ k − i a ∼ π θ ( ⋅ ∣ s ) [ π θ k − i ( a ∣ s ) π ω k B H ( a ∣ s ) ( A π θ k ( s , a ) − A π θ k − i ( s , a ) ) ] ≤ ω k E s ∼ d θ k − i a ∼ π θ ( ⋅ ∣ s ) [ ∣ A π θ k ( s , a ) − A π θ k − i ( s , a ) ∣ ] ≤ ω k 4 R max ( 1 + γ ) 1 − γ sup s ∈ S D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) , \begin{aligned}
D={}&
\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}
\left[
\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}
\left(A^{\pi_{\theta_k}}(s,a)-A^{\pi_{\theta_{k-i}}}(s,a)\right)
\right] \\
={}&
\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_\theta(\cdot\mid s)}}
\left[
\frac{\pi_{\theta_{k-i}}(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}
\left(A^{\pi_{\theta_k}}(s,a)-A^{\pi_{\theta_{k-i}}}(s,a)\right)
\right] \\
\leq{}&
\omega_k\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_\theta(\cdot\mid s)}}
\left[
\left|A^{\pi_{\theta_k}}(s,a)-A^{\pi_{\theta_{k-i}}}(s,a)\right|
\right] \\
\leq{}&
\omega_k\frac{4R_{\max}(1+\gamma)}{1-\gamma}
\sup_{s\in\mathcal{S}}D_{\mathrm{TV}}\left(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)\right),
\end{aligned} D = = ≤ ≤ E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) ( A π θ k ( s , a ) − A π θ k − i ( s , a ) ) ] E s ∼ d θ k − i a ∼ π θ ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ k − i ( a ∣ s ) ( A π θ k ( s , a ) − A π θ k − i ( s , a ) ) ] ω k E s ∼ d θ k − i a ∼ π θ ( ⋅ ∣ s ) [ ∣ A π θ k ( s , a ) − A π θ k − i ( s , a ) ∣ ] ω k 1 − γ 4 R m a x ( 1 + γ ) s ∈ S sup D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) ,
where (i) we changed the action sampling distribution from π θ k − i \pi_{\theta_{k-i}} π θ k − i to π θ \pi_\theta π θ ; (ii) we exploited π θ k − i ( a ∣ s ) π ω k B H ( a ∣ s ) ≤ ω k \frac{\pi_{\theta_{k-i}}(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}\leq\omega_k π ω k BH ( a ∣ s ) π θ k − i ( a ∣ s ) ≤ ω k for every s ∈ S s\in\mathcal{S} s ∈ S , a ∈ A a\in\mathcal{A} a ∈ A , and i ∈ [ 0 , ω k − 1 ] i\in[0,\omega_k-1] i ∈ [ 0 , ω k − 1 ] ; (iii) we used the fact that D ≥ − ∣ D ∣ D\geq-|D| D ≥ − ∣ D ∣ , then applying the Jensen’s inequality; and (iv) we employed Lemma B.3 .
We can finally put all together, thus having the following final policy improvement bound:
J ( θ ) − J ( θ k ) ≥ 1 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π θ ( a ∣ s ) π ω k B H ( a ∣ s ) A π θ k − i ( s , a ) ] − 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ∑ i = 0 ω k − 1 E s ∼ d θ k − i [ D T V ( π θ ( ⋅ ∣ s ) , π ω k B H ( ⋅ ∣ s ) ) ] − 4 R max ( 1 + γ ) 1 − γ ∑ i = 0 ω k − 1 sup s ∈ S D T V ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) − ( 4 R max 1 − γ + 2 γ C ( θ , θ k ) ( 1 − γ ) 2 ω k ) ∑ i = 0 ω k − 1 D T V ( d ω k B H , d θ k − i ) . \begin{aligned}
J(\theta)-J(\theta_k) \ge{}& \frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{\substack{s\sim d_{\theta_{k-i}}\\a\sim\pi_{\theta_{k-i}}(\cdot\mid s)}}\left[\frac{\pi_\theta(a\mid s)}{\pi_{\omega_k}^{\mathrm{BH}}(a\mid s)}A^{\pi_{\theta_{k-i}}}(s,a)\right]\\
&-\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\sum_{i=0}^{\omega_k-1}\mathbb{E}_{s\sim d_{\theta_{k-i}}}\left[D_{\mathrm{TV}}\left(\pi_\theta(\cdot\mid s),\pi_{\omega_k}^{\mathrm{BH}}(\cdot\mid s)\right)\right]\\
&-\frac{4R_{\max}(1+\gamma)}{1-\gamma}\sum_{i=0}^{\omega_k-1}\sup_{s\in S}D_{\mathrm{TV}}\left(\pi_{\theta_k}(\cdot\mid s),\pi_{\theta_{k-i}}(\cdot\mid s)\right)\\
&-\left(\frac{4R_{\max}}{1-\gamma}+\frac{2\gamma C(\theta,\theta_k)}{(1-\gamma)^2\omega_k}\right)\sum_{i=0}^{\omega_k-1}D_{\mathrm{TV}}\left(d_{\omega_k}^{\mathrm{BH}},d_{\theta_{k-i}}\right).
\end{aligned} J ( θ ) − J ( θ k ) ≥ ω k 1 i = 0 ∑ ω k − 1 E s ∼ d θ k − i a ∼ π θ k − i ( ⋅ ∣ s ) [ π ω k BH ( a ∣ s ) π θ ( a ∣ s ) A π θ k − i ( s , a ) ] − ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) i = 0 ∑ ω k − 1 E s ∼ d θ k − i [ D TV ( π θ ( ⋅ ∣ s ) , π ω k BH ( ⋅ ∣ s ) ) ] − 1 − γ 4 R m a x ( 1 + γ ) i = 0 ∑ ω k − 1 s ∈ S sup D TV ( π θ k ( ⋅ ∣ s ) , π θ k − i ( ⋅ ∣ s ) ) − ( 1 − γ 4 R m a x + ( 1 − γ ) 2 ω k 2 γ C ( θ , θ k ) ) i = 0 ∑ ω k − 1 D TV ( d ω k BH , d θ k − i ) .
Experimental Details
To help with reproducibility, we provide all the necessary implementation and experimental details we used for conducting the experiments presented in § 4 and Appendix § 9 .
Environments. We conducted our numerical evaluation on six continuous control environments leveraging the MuJoCo [57 ] control suite. Specifically, we considered: Reacher-v5 , Swimmer-v5 , Hopper-v5 , Walker2d-v5 , HalfCheetah-v5 , and Ant-v5 . Observations are normalized online using a running mean and variance estimate.
Implementation. For implementing ω \omega ω PPO-U and ω \omega ω PPO-BH we extended the PPO implementation of [48 ] with the following modifications. First, the rollout buffer is extended to hold the most recent ω k \omega_k ω k rollouts (see Algorithm 1 describing the data collection phase): at each iteration k k k , the oldest rollout D k − ω k \mathcal{D}_{k-\omega_k} D k − ω k is discarded and the new one D k \mathcal{D}_k D k is appended. Second, mini-batches { B j } j = 1 N B \{\mathcal{B}_j\}_{j=1}^{N_B} { B j } j = 1 N B are sampled uniformly at random from the full buffer D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) , with the constraint that each B j \mathcal{B}_j B j contains the same number of transitions for every window index (B / ω k B/\omega_k B / ω k in the fixed B B B setting, B B B in the fixed N B N_B N B setting). Third, ω \omega ω PPO-BH additionally stores the parameters of the ω k − 1 \omega_k-1 ω k − 1 most recent past policies, which are used to evaluate the BH mixture denominator on every stored transition in D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) . Specifically, after every data collection phase, ω \omega ω PPO-BH requires to evaluate all the samples in D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) coming from past policies { π θ k − i } i = 1 ω k − 1 \{\pi_{\theta_{k-i}}\}_{i=1}^{\omega_k-1} { π θ k − i } i = 1 ω k − 1 under π θ k \pi_{\theta_k} π θ k , as well as evaluating newer samples in D k \mathcal{D}_k D k under the past policies { π θ k − i } i = 1 ω k − 1 \{\pi_{\theta_{k-i}}\}_{i=1}^{\omega_k-1} { π θ k − i } i = 1 ω k − 1 . This requires to perform additional 2 D ( ω k − 1 ) 2D(\omega_k-1) 2 D ( ω k − 1 ) evaluations, once per data collection. Finally, the ratio in the actor loss is replaced by the per-policy ratio for ω \omega ω PPO-U or the BH-corrected ratio ω \omega ω PPO-BH, as defined in § 3 . All remaining implementation details are shared with standard PPO. The pseudo-code of the considered PPO sample reuse variants is presented in Algorithm 3.
Hyperparameters. For each environment, in order to conduct a fair comparison, we adopt the tuned PPO hyperparameters from [47 ] as our baseline configuration, with the exception of Hopper-v5 , for which the provided configuration did not yield the expected performance and hyperparameters were selected manually. The full set of hyperparameters for each environment is reported in Table 2 . For the networks’ activation functions we used tanh \tanh tanh ones. ω \omega ω PPO-U and ω \omega ω PPO-BH share all common hyperparameters with PPO, with only the parameters specific to each comparison setting varied as described in § 4 and D. This choice reflects our goal of providing a controlled comparison: by evaluating the reuse variants against a strongly tuned PPO baseline, any observed improvement can be attributed to the data reuse mechanism itself rather than to a suboptimal baseline.
Table 2. Employed hyperparameters values for conducting the experimental validation shown in § 4 and D.
Evaluation Protocol. Each method is evaluated over 10 independent runs using the same set of fixed random seeds across all compared methods. Specifically, we employed seeds in [ 0 , 9 ] [0,9] [ 0 , 9 ] . Policy performance is assessed every 10000 environment steps by running 50 complete episodes under the current deterministic policy, and the evaluation metric is the mean episodic return, computed as the undiscounted sum of rewards over a complete episode. For plotting purposes, the resulting mean return is smoothed via a moving average with a window of 10 evaluation points, and all plots report Algorithm 3: ω \omega ω PPO-U and ω \omega ω PPO-BH.
Input : Initial parameters θ 0 \theta_0 θ 0 and w 0 w_0 w 0 , iterations K K K , epochs per iteration K ~ \tilde{K} K ~ , batch size B B B , environments { E e } e = 1 N E \{E_e\}_{e=1}^{N_E} { E e } e = 1 N E , GAE parameter λ \lambda λ , interaction length H H H , discount factor γ \gamma γ , loss coefficients c 1 c_1 c 1 and c 2 c_2 c 2 , learning rate α \alpha α , clipping parameter ϵ \epsilon ϵ , and window size ω \omega ω .
Initialize optimization variables: θ ← θ 0 \theta\leftarrow\theta_0 θ ← θ 0 , w ← w 0 w \leftarrow w_0 w ← w 0 ; initialize buffer D ( ω 0 ) ← ∅ \mathcal{D}(\omega_0) \leftarrow\varnothing D ( ω 0 ) ← ∅ .
for k ∈ [ 1 , K ] k \in[1,K] k ∈ [ 1 , K ] do // Data Collection D k ← \mathcal{D}_k \leftarrow D k ← Run Algorithm 1; // Buffer Update if ω k < ω \omega_k < \omega ω k < ω then D ( ω k ) ← D ( ω k − 1 ) ∪ D k \mathcal{D}(\omega_k) \leftarrow\mathcal{D}(\omega_{k-1}) \cup\mathcal{D}_k D ( ω k ) ← D ( ω k − 1 ) ∪ D k ; else D ( ω k ) ← D ( ω k − 1 ) ∖ D k − ω ∪ D k \mathcal{D}(\omega_k) \leftarrow\mathcal{D}(\omega_{k-1}) \setminus\mathcal{D}_{k-\omega} \cup\mathcal{D}_k D ( ω k ) ← D ( ω k − 1 ) ∖ D k − ω ∪ D k ; end
// [ω \omega ω PPO-BH only] Precompute mixture denominator π ω k B H ( a ∣ s ) ← 1 ω k ∑ i = 0 ω k − 1 π θ k − i ( a ∣ s ) \pi_{\omega_k}^{\mathrm{BH}}(a\mid s) \leftarrow\frac{1}{\omega_k}\sum_{i=0}^{\omega_k-1}\pi_{\theta_{k-i}}(a\mid s) π ω k BH ( a ∣ s ) ← ω k 1 ∑ i = 0 ω k − 1 π θ k − i ( a ∣ s ) for all ( s , a ) ∈ D ( ω k ) (s,a)\in\mathcal{D}(\omega_k) ( s , a ) ∈ D ( ω k ) ;
// Multi-Epoch Optimization for l ∈ [ K ~ ] l \in[\tilde{K}] l ∈ [ K ~ ] do Shuffle D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) ; Create D ~ k = { B z } z = 1 N B \tilde{\mathcal{D}}_k=\{B_z\}_{z=1}^{N_B} D ~ k = { B z } z = 1 N B , where N B = ⌈ ∣ D ( ω k ) ∣ B ⌉ N_B=\left\lceil\frac{|\mathcal{D}(\omega_k)|}{B}\right\rceil N B = ⌈ B ∣ D ( ω k ) ∣ ⌉ , such that ∀ z ∈ [ N B ] : ∣ B z ∣ = B \forall z\in[N_B]: |B_z|=B ∀ z ∈ [ N B ] : ∣ B z ∣ = B equally represents all ω k \omega_k ω k iterations; for B ∈ D ~ k \mathcal{B}\in\tilde{\mathcal{D}}_k B ∈ D ~ k do // Actor Loss ω \omega ω PPO-U: ρ i , j ← π θ ( a i , j ∣ s i , j ) π θ k − i ( a i , j ∣ s i , j ) \rho_{i,j}\leftarrow\frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\theta_{k-i}}(a_{i,j}\mid s_{i,j})} ρ i , j ← π θ k − i ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) ; ω \omega ω PPO-BH: ρ i , j ← π θ ( a i , j ∣ s i , j ) π ω k B H ( a i , j ∣ s i , j ) \rho_{i,j}\leftarrow\frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\omega_k}^{\mathrm{BH}}(a_{i,j}\mid s_{i,j})} ρ i , j ← π ω k BH ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) ;
L ^ a c t o r ( θ , B ) = 1 ∣ B ∣ ∑ ( i , j ) ∈ B min { ρ i , j A i , j , clip ( ρ i , j , 1 − ϵ , 1 + ϵ ) A i , j } \hat{L}^{\mathrm{actor}}(\theta,\mathcal{B})=\frac{1}{|\mathcal{B}|}\sum_{(i,j)\in\mathcal{B}}\min\{\rho_{i,j}A_{i,j},\operatorname{clip}(\rho_{i,j},1-\epsilon,1+\epsilon)A_{i,j}\} L ^ actor ( θ , B ) = ∣ B ∣ 1 ( i , j ) ∈ B ∑ min { ρ i , j A i , j , clip ( ρ i , j , 1 − ϵ , 1 + ϵ ) A i , j } // Critic Loss (on D k \mathcal{D}_k D k samples only)
L ^ v f ( w , B ) = 1 ∣ B ∩ D k ∣ ∑ ( 0 , j ) ∈ B 1 2 ( V w ( s 0 , j ) − R 0 , j ) 2 \hat{L}^{\mathrm{vf}}(w,\mathcal{B})=\frac{1}{|\mathcal{B}\cap\mathcal{D}_k|}\sum_{(0,j)\in\mathcal{B}}\frac{1}{2}(V_w(s_{0,j})-R_{0,j})^2 L ^ vf ( w , B ) = ∣ B ∩ D k ∣ 1 ( 0 , j ) ∈ B ∑ 2 1 ( V w ( s 0 , j ) − R 0 , j ) 2 // Update
θ ← θ + α ∇ θ [ L ^ a c t o r ( θ , B ) + c 2 1 ∣ B ∣ ∑ ( i , j ) ∈ B H ( π θ ( ⋅ ∣ s i , j ) ) ] \theta\leftarrow\theta+\alpha\nabla_\theta\left[\hat{L}^{\mathrm{actor}}(\theta,\mathcal{B})+c_2\frac{1}{|\mathcal{B}|}\sum_{(i,j)\in\mathcal{B}}H(\pi_\theta(\cdot\mid s_{i,j}))\right] θ ← θ + α ∇ θ L ^ actor ( θ , B ) + c 2 ∣ B ∣ 1 ( i , j ) ∈ B ∑ H ( π θ ( ⋅ ∣ s i , j )) w ← w − α c 1 ∇ w L ^ v f ( w , B ) w\leftarrow w-\alpha c_1\nabla_w\hat{L}^{\mathrm{vf}}(w,\mathcal{B}) w ← w − α c 1 ∇ w L ^ vf ( w , B ) end end end
Output : θ K \theta_K θ K .
the mean and 95% confidence interval across runs. Final performance values reported in tables are computed as the mean over the last 10 evaluation points of each run, prior to smoothing.
Diagnostics. To monitor the distributional shift induced by data reuse, we track two complementary diagnostics at every iteration. Each diagnostic is computed independently for every window index i ∈ [ 0 , ω k − 1 ] i\in[0,\omega_k-1] i ∈ [ 0 , ω k − 1 ] over the corresponding rollout set D k − i \mathcal{D}_{k-i} D k − i , and is evaluated before the optimization phase to distinguish the shift present at the start of each iteration. Specifically, the two diagnostics are:
C F i ω = 1 D ∑ j = 1 D 1 [ w i , j ω ∉ [ 1 − ϵ , 1 + ϵ ] ] , \mathrm{CF}_{i}^{\omega} = \frac{1}{D} \sum_{j=1}^{D} \mathbb{1}\left[w_{i,j}^{\omega} \notin[1-\epsilon,1+\epsilon]\right], CF i ω = D 1 j = 1 ∑ D 1 [ w i , j ω ∈ / [ 1 − ϵ , 1 + ϵ ] ] ,
where for ω P P O − U \omega_{\mathrm{PPO-U}} ω PPO − U we have w i , j U = π θ ( a i , j ∣ s i , j ) π θ k − i ( a i , j ∣ s i , j ) w_{i,j}^{\mathrm{U}} = \frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\theta_{k-i}}(a_{i,j}\mid s_{i,j})} w i , j U = π θ k − i ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) while for ω P P O − B H \omega_{\mathrm{PPO-BH}} ω PPO − BH we have w i , j B H = π θ ( a i , j ∣ s i , j ) π θ k B H ( a i , j ∣ s i , j ) w_{i,j}^{\mathrm{BH}} = \frac{\pi_\theta(a_{i,j}\mid s_{i,j})}{\pi_{\theta_{k}^{\mathrm{BH}}}(a_{i,j}\mid s_{i,j})} w i , j BH = π θ k BH ( a i , j ∣ s i , j ) π θ ( a i , j ∣ s i , j ) . C F i ω \mathrm{CF}_{i}^{\omega} CF i ω is the fraction of transitions in D k − i D_{k-i} D k − i whose weight w i , j ω w_{i,j}^{\omega} w i , j ω falls outside [ 1 − ϵ , 1 + ϵ ] [1-\epsilon,1+\epsilon] [ 1 − ϵ , 1 + ϵ ] . It measures how frequently the clipping mechanism is active for data from window index i i i , and therefore how often those samples are effectively excluded from the gradient signal. However, it is insensitive to the magnitude of deviations among clipped transitions.
E S S i ω = ( ∑ j w i , j ω ) 2 D ⋅ ∑ j ( w i , j ω ) 2 ∈ [ 0 , 1 ] . \mathrm{ESS}_{i}^{\omega} = \frac{\left(\sum_j w_{i,j}^{\omega}\right)^2}{D \cdot\sum_j \left(w_{i,j}^{\omega}\right)^2} \in[0,1]. ESS i ω = D ⋅ ∑ j ( w i , j ω ) 2 ( ∑ j w i , j ω ) 2 ∈ [ 0 , 1 ] .
In a standard importance weighting setting, the effective sample size [ESS, 26] is the number of samples drawn directly from P P P for which the Monte Carlo estimator of the mean has approximately the same variance as the self-normalized importance weighting estimator employing D D D samples from Q Q Q [35 ] . So, the normalized ESS is 1 whenever P = Q P=Q P = Q , while it decreases as the dissimilarity of the two distributions enlarges.
Each metric is averaged across all iterations of a single training run, reported for the pre-optimization phase. Plots show the mean and 95% confidence interval over 10 independent runs.
Computational Resources All experiments were conducted on a machine equipped with an AMD Ryzen Threadripper PRO 9965WX CPU (24 cores, 48 threads) and an NVIDIA RTX A1000 GPU (8 GB VRAM), running Ubuntu 24.04 LTS. A single run of PPO in HalfCheetah-v5 considering the hyperparameters of Table 2 takes ≈ 25 \approx25 ≈ 25 minutes. Additionally, in the same setting, a run of ω P P O − B H \omega_{\mathrm{PPO-BH}} ω PPO − BH and ω P P O − U \omega_{\mathrm{PPO-U}} ω PPO − U with ω = 4 \omega=4 ω = 4 in the fixed B B B scenario takes ≈ 50 \approx50 ≈ 50 minutes, while for fixed N B N_B N B scenario it takes ≈ 35 \approx35 ≈ 35 minutes.
LLMs Usage. We employed LLMs mainly as aid for editing purposes, for checking proof correctness, and for assistance with code.
Additional Experiments
In this section, we provide the complete experimental campaign conducted for this work, of which § 4 presents a subset. Our experiments aim to empirically understand when and how PPO can benefit from sample reuse. All experiments are designed to maintain fairness with respect to PPO, as detailed in Appendix § 8 .
PPO Mechanics and Update Accounting. Before starting, we recall that at each iteration k ∈ ⟦ K ⟧ k \in\llbracket K \rrbracket k ∈ [ [ K ] ] , PPO collects a dataset D k \mathcal{D}_k D k of ∣ D k ∣ = N E H = D 4 |\mathcal{D}_k| = N_EH = D^4 ∣ D k ∣ = N E H = D 4 samples under π θ k \pi_{\theta_k} π θ k . For K ~ \widetilde{K} K epochs, D k \mathcal{D}_k D k is shuffled and divided into N B N_B N B mini-batches of size B B B , each used to perform one parameter update, so PPO performs K ~ N B \widetilde{K}N_B K N B actor and critic updates per iteration. Each datum therefore has an update life cycle of K ~ \widetilde{K} K updates before being discarded.
ω \omega ω PPO–U and ω \omega ω PPO–BH Mechanics and Update Accounting. As detailed in § 3 , rather than discarding D k \mathcal{D}_k D k after each iteration, ω \omega ω PPO–U and ω \omega ω PPO–BH maintain a sliding window of the ω k : = min { k , ω } \omega_k := \min\{k,\omega\} ω k := min { k , ω } most recent datasets, forming the composite buffer D ( ω k ) = ⋃ i = 0 ω k − 1 D k − i \mathcal{D}(\omega_k) = \bigcup_{i=0}^{\omega_k-1} \mathcal{D}_{k-i} D ( ω k ) = ⋃ i = 0 ω k − 1 D k − i of total size ω k D \omega_kD ω k D .4 As in PPO, K ~ \widetilde{K} K epochs are performed per iteration, while the number and size of mini-batches depend on the comparison setting (see below and Table 3 ). Because each datum remains in the buffer for ω k \omega_k ω k iterations and is replayed for K ~ \widetilde{K} K epochs per iteration, its update life cycle extends to ω k K ~ \omega_k\widetilde{K} ω k K epochs.
Table 3. Summary of the main features of the considered comparison setting. Highlighted cells mark values that differ from the PPO baseline.
Comparison Settings. The mini-batch sampling strategy from D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) governs how the reuse variants differ from PPO in terms of update count, mini-batch composition, and data collection cost. We consider three settings, each designed to isolate a distinct aspect of the reuse mechanism.
Fixed mini-batch size (Fixed B B B ). The reuse variants share the same B B B and K ~ \widetilde{K} K as PPO. Since ∣ D ( ω k ) ∣ = ω k D |\mathcal{D}(\omega_k)| = \omega_kD ∣ D ( ω k ) ∣ = ω k D , this yields ω k N B \omega_kN_B ω k N B mini-batches per epoch, so the reuse variants perform ω k K ~ N B \omega_k\widetilde{K}N_B ω k K N B actor updates per iteration, exactly ω k \omega_k ω k times as many as PPO, with each mini-batch containing B / ω k B/\omega_k B / ω k samples per window index. This setting investigates whether a larger buffer, made of fresh and past data, can support more gradient steps without additional environment interaction, and whether keeping B B B fixed is sufficient to avoid update instability. To isolate the effect of reuse from the increased update count, we also run a PPO baseline with ω k K ~ \omega_k\widetilde{K} ω k K epochs per iteration, matching the total actor updates of the reuse variants.
Fixed mini-batch count (Fixed N B N_B N B ). The reuse variants keep the same N B N_B N B as PPO, yielding larger mini-batches of size ω k B \omega_kB ω k B . All methods therefore perform K ~ N B \widetilde{K}N_B K N B actor updates per iteration, with each update seeing the same amount of fresh data as in PPO while additionally drawing on past samples. This setting investigates whether keeping the update count fixed while enriching each mini-batch with historical data is sufficient to improve learning, and whether mixing current and past samples within a larger mini-batch provides a benefit over using fresh data alone.
Reduced data collection (H / ω H/\omega H / ω Steps). The reuse variants collect only H / ω k H/\omega_k H / ω k new environment steps per iteration, keeping B B B , N B N_B N B , and K ~ \widetilde{K} K fixed at their PPO values. The composite buffer therefore has the same total size D \mathcal{D} D as PPO’s dataset, but only a fraction 1 / ω k 1/\omega_k 1/ ω k of it consists of fresh transitions, and all methods perform K ~ N B \widetilde{K}N_B K N B actor updates per iteration. This setting investigates whether stored historical data can compensate for a reduced fresh signal, allowing the policy to advance more rapidly relative to environment interaction. Among the three settings, it poses the most stringent test of sample efficiency.
Table 3 summarizes the main characteristics of the discussed comparison settings. In the following, we analyze all three settings and use diagnostic tools to investigate when and how data reuse helps in PPO.
Fixed Mini-Batch Size and Increased PPO Epochs Settings
Here, we analyze the behavior of ω \omega ω PPO–U and ω \omega ω PPO–BH when sharing all hyperparameters with the tuned PPO baseline (Appendix § 8 ). Specifically, the reuse variants retain the same mini-batch size B B B , so each mini-batch contains B / ω k B/\omega_k B / ω k samples per reuse window and the reuse variants perform ω k \omega_k ω k times as many actor updates per iteration as PPO. To isolate the effect of sample reuse from the increased number of updates alone, we also include a PPO baseline running ω k K ~ \omega_k\widetilde{K} ω k K epochs per iteration, matching the total update count of the reuse variants.
Figure 4 and Figure 5 show training evaluation curves across the considered MuJoCo [57 ] environments and Table 4 reports final performance achieved by all methods, clustered by environment. All experiments consider three window sizes, ω ∈ { 2 , 4 , 8 } \omega\in\{2, 4, 8\} ω ∈ { 2 , 4 , 8 } . Overall, this set of experiments supports five conclusions: (i) PPO may truly benefit from sample reuse; (ii) this benefit is not merely attributable to performing more gradient updates; (iii) in this setting, data reuse does not always accelerate convergence but leads to higher final performance in most cases; (iv) neither ω \omega ω PPO-U nor ω \omega ω PPO-BH consistently dominates the other, with both methods behaving similarly across environments; and (v) it appears that in this setting there exists a window value for which the reuse variants exhibit most of the benefit, although this window value is environment-dependent. We now detail the results for each environment in turn.
Table 4. Average of the last 10 final performance values of the curves shown in the fixed B B B setting (Figure 4 and Figure 5 ). Each cell shows the mean ± \pm ± 95% C.I. edges (10 runs).
Figure 4. Comparison among PPO, ω \omega ω PPO-BH, and ω \omega ω PPO-U in various MuJoCo environments under different window values in the fixed B B B setting, showing the PPO version with increased epochs to match the number of updates performed by the reuse variants (10 runs, mean ± \pm ± 95% C.I.).
Figure 5. Comparison among PPO, ω \omega ω PPO-BH, and ω \omega ω PPO-U in various MuJoCo environments under different window values in the fixed B B B setting, showing the PPO version with increased epochs to match the number of updates performed by the reuse variants (10 runs, mean ± \pm ± 95% C.I.).
Figure 4 a reports the evaluation curves on the Reacher-v5 environment. Even a reuse window of ω = 2 \omega= 2 ω = 2 yields a clear improvement in sample efficiency, with most of the gain exhibited at ω = 4 \omega= 4 ω = 4 . Further increasing to ω = 8 \omega= 8 ω = 8 continues to improve sample efficiency, though with diminishing returns relative to the ω = 2 \omega= 2 ω = 2 to ω = 4 \omega= 4 ω = 4 step. Notably, data reuse not only accelerates learning but also leads to higher final performance (Table 4 ), with ω \omega ω PPO-BH consistently achieving the best results across window sizes. As expected, more updates also increase wall-clock training time. The comparison against the ω K ~ \omega\tilde{K} ω K ~ -epoch PPO baseline is particularly informative. While this baseline initially matches the sample efficiency of the reuse variants, it becomes unstable at larger values of ω \omega ω , a phenomenon that does not affect ω \omega ω PPO-U or ω \omega ω PPO-BH. This suggests that the benefits of data reuse do not stem solely from performing more updates, but from the additional data itself.
Similar observations hold for the Swimmer-v5 environment, shown in Figure 4 b. Data reuse consistently benefits PPO, though the improvement at ω = 2 \omega= 2 ω = 2 is mild and the advantage over the ω K ~ \omega\tilde{K} ω K ~ -epoch PPO baseline is not clearly separable at this window size. The benefit becomes more pronounced at ω = 4 \omega= 4 ω = 4 and ω = 8 \omega= 8 ω = 8 , where the reuse variants reach higher final performances while the ω K ~ \omega\tilde{K} ω K ~ -epoch PPO baseline saturates early. Notably, unlike in Reacher-v5 , increasing the window size does not accelerate convergence. Instead, data reuse allows the agent to extract more information from the available samples, translating into higher final performance, as also confirmed by Table 4 , rather than faster initial learning.
One of the most instructive scenarios is the Hopper-v5 environment, shown in Figure 4 c. Data reuse is beneficial for ω ∈ { 2 , 4 } \omega\in\{2, 4\} ω ∈ { 2 , 4 } : in both cases, ω \omega ω PPO-U and ω \omega ω PPO-BH behave similarly and outperform both PPO and its ω K ~ \omega\tilde{K} ω K ~ -epoch variant, with the latter improving over PPO at ω = 2 \omega= 2 ω = 2 but collapsing at ω = 4 \omega= 4 ω = 4 due to the increased number of updates. For ω = 8 \omega= 8 ω = 8 , however, both ω \omega ω PPO-U and ω \omega ω PPO-BH degrade significantly, with only ω \omega ω PPO-BH eventually recovering to match PPO performance given its wide confidence interval. The ω K ~ \omega\tilde{K} ω K ~ -epoch PPO baseline collapses early in this regime. This setting clearly demonstrates that an optimal window size exists and that excessive reuse can actively harm performance. We conjecture this results from several compounding factors, amplified by this environment’s configuration (H = 2048 H = 2048 H = 2048 , B = 64 B = 64 B = 64 , K ~ = 10 \tilde{K} = 10 K ~ = 10 ). First, at ω = 8 \omega= 8 ω = 8 the reuse variants perform 2560 updates per iteration against the 320 of PPO, amplifying the bias introduced by stale advantages across many gradient steps. Second, each window contributes only B / ω = 8 B/\omega= 8 B / ω = 8 samples per mini-batch, meaning that just 12.5% of each actor update is driven by fresh data and that each critic update employs only 8 samples. Third, since all hyperparameters are inherited from PPO, the larger number of updates may increase the drift between consecutive policies and hence the diversity of the policies in the window. Past samples falling outside the clipping range contribute no gradient. In Appendix § 9 .§ 2 , we investigate what happens when PPO and its reuse variants are instead constrained to perform the same number of updates per iteration while matching the number of mini-batches N B N_B N B .
Figure 4 d shows the same evaluation conducted in the Walker2d-v5 environment. The results are broadly consistent with the other environments: data reuse is beneficial, especially for ω ∈ { 2 , 4 } \omega\in\{2, 4\} ω ∈ { 2 , 4 } . The ω K ~ \omega\widetilde{K} ω K -epoch PPO variant slightly improves over PPO at ω = 2 \omega= 2 ω = 2 but fails to match the reuse variants, while for ω ∈ { 4 , 8 } \omega\in\{4, 8\} ω ∈ { 4 , 8 } it collapses entirely. Notably, the BH correction does not appear to offer a clear advantage over uniform weighting in this environment, particularly at ω = 8 \omega= 8 ω = 8 . Finally, while larger windows do not consistently accelerate convergence, they allow the reuse variants to reach higher final performances, as confirmed by Table 4 .
Figure 5 a reports the evaluation curves on the HalfCheetah-v5 environment. Data reuse consistently leads to higher final performance across all window sizes ω ∈ { 2 , 4 , 8 } \omega\in\{2, 4, 8\} ω ∈ { 2 , 4 , 8 } , as confirmed also by Table 4 . There is a visible improvement from ω = 2 \omega= 2 ω = 2 to ω = 4 \omega= 4 ω = 4 , while the gain from ω = 4 \omega= 4 ω = 4 to ω = 8 \omega= 8 ω = 8 is negligible, suggesting that most of the benefit is already captured at moderate window sizes. ω \omega ω PPO-U and ω \omega ω PPO-BH perform comparably throughout, with neither variant offering a clear advantage over the other. The ω K ~ \omega\widetilde{K} ω K -epoch PPO baseline exhibits faster initial learning but fails to reach the final performance of the reuse variants, and shows increased instability, possibly due to overexploiting a fixed data batch. In contrast, ω \omega ω PPO-U and ω \omega ω PPO-BH perform the same number of updates while leveraging a larger and more diverse composite buffer, which appears to stabilize training and support more effective policy improvement.
Figure 5 b reports the evaluation curves on the Ant-v5 environment. Unlike the other environments, data reuse does not yield a clear improvement in final performance, as confirmed by Table 4 ; instead, the primary benefit lies in the speed at which the agent reaches that performance. At ω = 2 \omega= 2 ω = 2 , the ω K ~ \omega\widetilde{K} ω K -epoch PPO baseline achieves a convergence speed comparable to the reuse variants without exhibiting instability. However, at ω ∈ { 4 , 8 } \omega\in\{4, 8\} ω ∈ { 4 , 8 } , this baseline learns faster initially but then diverges, whereas ω \omega ω PPO-U and ω \omega ω PPO-BH remain stable and they reach the final performance level sooner than the baseline PPO.
Fixed Mini-Batch Count Setting
Here, we analyze the behavior of ω \omega ω PPO-U and ω \omega ω PPO-BH when sharing all hyperparameters with the tuned PPO baseline (Appendix § 8 ), but, in contrast to Appendix § 9 .§ 1 , we keep fixed the number of mini-batches per epoch N B N_B N B rather than the mini-batch size B B B . By design, the reuse variants perform the same number of updates per epoch as PPO, but leverage mini-batches of size ω B \omega B ω B , thereby preserving the same amount of fresh information per update, i.e., the same number of samples from the most recent policy π θ k \pi_{\theta_k} π θ k .
Figure 6 and Figure 7 show training evaluation curves across the considered MuJoCo [57 ] environments and Table 5 reports the final performance reached by the considered methods. All experiments consider three window sizes, ω ∈ { 2 , 4 , 8 } \omega\in\{2, 4, 8\} ω ∈ { 2 , 4 , 8 } . The results of this setting can be summarized as follows: (i) PPO consistently benefits from sample reuse; (ii) in this setting the benefit manifests in both faster convergence and higher final performance, as further confirmed by Table 5 ; (iii) ω \omega ω PPO-BH tends to reach higher final performances with tighter confidence intervals, particularly for ω ∈ { 4 , 8 } \omega\in\{4, 8\} ω ∈ { 4 , 8 } ; and (iv) across environments, ω = 4 \omega= 4 ω = 4 appears to offer the best trade-off, with larger windows providing diminishing returns.
Table 5. Average of the last 10 final performance values of the curves shown in the fixed N B N_B N B setting (Figure 6 and Figure 7 ). Each cell shows the mean ± \pm ± 95% C.I. edges (10 runs).
Figure 6. Comparison among PPO, ω \omega ω PPO-BH, and ω \omega ω PPO-U in various MuJoCo environments under different window values in the fixed N B N_B N B setting (10 runs, mean ± \pm ± 95%). (a) Reacher-v5. (b) Swimmer-v5. (c) Hopper-v5. (d) Walker2d-v5.
Figure 7. Comparison among PPO, ω \omega ω PPO-BH, and ω \omega ω PPO-U in various MuJoCo environments under different window values in the Fixed N B N_B N B setting (10 runs, mean ± \pm ± 95%).
In Figure 6 a, we show results for the Reacher-v5 environment, the simplest in our experimental campaign. The results are consistent with those of Appendix § 9 .§ 1 , where the baseline setting is considered. The benefit of data reuse increases with ω \omega ω : larger windows yield both faster convergence and higher final performance, with ω \omega ω PPO-BH performing slightly better throughout. Importantly, all methods here perform the same number of updates, confirming that the gains are not an artifact of additional gradient steps.
For the other environments, similar conclusions can be drawn. At ω = 2 \omega= 2 ω = 2 , data reuse provides a marginal improvement, while most of the benefit is observed at ω = 4 \omega= 4 ω = 4 , particularly for ω \omega ω PPO-BH. At ω = 8 \omega= 8 ω = 8 , the pathological collapse seen in the baseline setting for Hopper-v5 (Figure 4 c) disappears, suggesting that larger mini-batches and reduced update count stabilize training. However, a hindered early convergence speed remains visible. We conjecture this is due to the larger policy changes occurring during early training: consecutive policies differ the most in this phase, so that, with a large reuse window, older samples carry the most stale advantages and come from the most distant behavioral policies.
The exception in this setting is the Ant-v5 environment, the most complex among the ones considered. Unlike what is observed with fixed B B B (Appendix § 9 .§ 1 ), data reuse does not appear to help with convergence speed here and provides only a marginal improvement in final performance, with ω \omega ω PPO-BH at ω = 4 \omega= 4 ω = 4 being the best-performing variant (Table 5 ), though the PPO baseline’s confidence interval slightly overlaps with it.
Reduced Data Collection Setting
Here, we analyze ω \omega ω PPO-U and ω \omega ω PPO-BH under the most aggressive sample efficiency setting: in contrast to Appendices D.1 and D.2, we keep both N B N_B N B and B B B fixed at their PPO values but allow the reuse variants to collect only H / ω H/\omega H / ω new samples per iteration. The reuse variants therefore perform the same number of updates as PPO over a composite dataset of the same total size, but with a fresh data fraction of 1 / ω 1/\omega 1/ ω per iteration.
Table 6. Average of the last 10 final performance values of the curves shown in the H / ω H/\omega H / ω steps setting (Figures 8 and 9). Each cell shows the mean ± \pm ± 95% C.I. edges (10 runs).
Figures 8 and 9 show training evaluation curves and Table 6 reports final performance. All experiments consider ω ∈ { 2 , 4 , 8 } \omega\in\{2, 4, 8\} ω ∈ { 2 , 4 , 8 } . In this setting the results are unambiguous: the considered sample reuse does not help. We conjecture that the primary cause is the severely reduced amount of fresh data available to the critic. Since the critic is updated exclusively on the most recent dataset D k \mathcal{D}_k D k , reducing new interactions to H / ω H/\omega H / ω may directly hinder it, possibly leading to degraded advantage estimates that in turn corrupt actor updates. We anticipate that this is not mitigated by fitting the critic on the whole D p ( ω k ) \mathcal{D}_{p(\omega k)} D p ( ω k ) (see Appendix § 9 .§ 5 ). The single exception is Hopper-v5 at ω = 2 \omega= 2 ω = 2 (Figure 8 c), where both ω \omega ω PPO-U and ω \omega ω PPO-BH still collect 1024 fresh samples per iteration, appearing to be sufficient to maintain critic quality in this environment. In all other environments, where PPO collects only H = 512 H = 512 H = 512 samples, the reuse variants are forced to operate with as few as 64 fresh samples at ω = 8 \omega= 8 ω = 8 , falling below what appears to be the minimum threshold for stable learning.
Figure 8. Comparison among PPO, ω \omega ω PPO-BH, and ω \omega ω PPO-U in various MuJoCo environments under different window values in the H / ω H/\omega H / ω steps setting (10 runs, mean ± 95 % \pm95\% ± 95% ).
PPO-U vs. PPO-BH
In this experiment, we aim to understand how the two importance weighting schemes adopted by ω \omega ω PPO-U and ω \omega ω PPO-BH differ in practice in their treatment of on and off-policy data. To this end, we present for all the considered environments and for all the comparison settings, the clip fraction and ESS diagnostics described in Appendix § 8 . Each metric is evaluated before the optimization phase at every iteration, allowing us to distinguish the distributional shift already present at the start of each iteration.
Before presenting the results, we recall that:
The clip fraction C F i l \mathrm{CF}_{i}^{l} CF i l (l ∈ { U , B H } l \in\{\mathrm{U}, \mathrm{BH}\} l ∈ { U , BH } ) captures how frequently the clipping mechanism is active for data from window index i i i . A high value indicates that a large fraction of transitions are effectively excluded from the gradient signal, suggesting a significant distributional shift between the current policy π θ \pi_{\theta} π θ and the one at the denominator of the importance weight, i.e., either the policy under which samples have been collected or the uniform mixture policy.
Figure 9. Comparison among PPO, ω \omega ω PPO-BH, and ω \omega ω PPO-U in various MuJoCo environments under different window values in the H / ω H/\omega H / ω steps setting (10 runs, mean ± \pm ± 95%).
The normalized ESS i l ∈ [ 0 , 1 ] \operatorname{ESS}_{i}^{l} \in[0,1] ESS i l ∈ [ 0 , 1 ] (l ∈ { U , B H } l \in\{\mathrm{U},\mathrm{BH}\} l ∈ { U , BH } ) measures the statistical efficiency of the importance weights: it equals 1 when the current policy matches the sampling distribution exactly, and decreases as the two distributions diverge.
Together, these two metrics provide complementary views of how stale the reused data is and how each method manages the resulting off-policy correction. Specifically, we group the plots of these metrics per environment:
Figure 10 shows the metrics for the Reacher-v5 environment;
Figure 11 shows the metrics for the Swimmer-v5 environment;
Figure 12 shows the metrics for the Hopper-v5 environment;
Figure 13 shows the metrics for the Walker2d-v5 environment;
Figure 14 shows the metrics for the HalfCheetah-v5 environment;
Figure 15 shows the metrics for the Ant-v5 environment.
Figure 10. Clip Fraction and ESS diagnostics in Reacher-v5 (10 runs, mean ± \pm ± 95% C.I.).
Figure 11. (a) Clip Fraction diagnostic: Fixed B B B . (b) ESS diagnostic: Fixed B B B . (c) Clip Fraction diagnostic: Fixed N B N_{\mathcal{B}} N B . (d) ESS diagnostic: Fixed N B N_{\mathcal{B}} N B . (e) Clip Fraction diagnostic: Fixed H / ω H/\omega H / ω Steps. (f) ESS diagnostic: Fixed H / ω H/\omega H / ω Steps. Figure 11: Clip Fraction and ESS diagnostics in Swimmer-v5 (10 runs, mean ± \pm ± 95% C.I.).
Figure 12. Clip Fraction and ESS diagnostics in Hopper -v5 (10 runs, mean ± \pm ± 95% C.I.).
Figure 13. Clip Fraction and ESS diagnostics in Walker2d-v5 (10 runs, mean ± \pm ± 95% C.I.).
Figure 14. (a) Clip Fraction diagnostic: Fixed B B B . (b) ESS diagnostic: Fixed B B B . (c) Clip Fraction diagnostic: Fixed N B N_{\mathcal{B}} N B . (d) ESS diagnostic: Fixed N B N_{\mathcal{B}} N B . (e) Clip Fraction diagnostic: Fixed H / ω H/\omega H / ω Steps. (f) ESS diagnostic: Fixed H / ω H/\omega H / ω Steps. Figure 14: Clip Fraction and ESS diagnostics in HalfCheetah-v5 (10 runs, mean ± \pm ± 95% C.I.).
(a) Clip Fraction diagnostic: Fixed B B B .
(b) ESS diagnostic: Fixed B B B .
(c) Clip Fraction diagnostic: Fixed N β N_{\beta} N β .
(d) ESS diagnostic: Fixed N β N_{\beta} N β .
(e) Clip Fraction diagnostic: Fixed H / ω H/\omega H / ω Steps.
(f) ESS diagnostic: Fixed H / ω H/\omega H / ω Steps.
Figure 15. Clip Fraction and ESS diagnostics in Ant -v5 (10 runs, mean ± \pm ± 95% C.I.).
Each figure reports the metric at hand averaged over the entire training and grouped by window index.
Window Index Effect Under ω \omega ω PPO-U. Under the vanilla uniform weighting scheme, older data corresponding to larger window indices i i i consistently exhibit higher CF i U \operatorname{CF}_{i}^{\mathrm{U}} CF i U and lower ESS i U \operatorname{ESS}_{i}^{\mathrm{U}} ESS i U , before optimization. This is expected: since the policy has already been updated on those samples in previous iterations, the importance ratio w i , j U w_{i,j}^{\mathrm{U}} w i , j U for older transitions deviates more from 1 than for recently collected data, reflecting the growing distributional shift between the current policy and the one that generated them. This is also reflected by the ESS i U \operatorname{ESS}_{i}^{\mathrm{U}} ESS i U which decreases monotonically with window index.
The Effect of the BH Correction. Since ω \omega ω PPO-BH weights all samples w.r.t. the mixture policy π ˉ ω k \bar{\pi}_{\omega_k} π ˉ ω k , both CF i B H \operatorname{CF}_{i}^{\mathrm{BH}} CF i BH and ESS i B H \operatorname{ESS}_{i}^{\mathrm{BH}} ESS i BH are approximately constant across all window indices before optimization, effectively equalizing the distribution of the IWs across window indices (the advantages of older samples, however, remain stale). Crucially, ω \omega ω PPO-BH also maintains a substantially higher and more uniform ESS i B H \operatorname{ESS}_{i}^{\mathrm{BH}} ESS i BH across all window indices compared to ω \omega ω PPO-U. This may allow ω \omega ω PPO-BH to extract more reliable gradient signal from samples coming from older iterations. It is worth noting, however, that this equalization comes at a cost: since the BH ratios of the most recent data (window index i = 0 i=0 i = 0 ) generally differ from 1, a fraction of new transitions already falls outside the clipping range before any gradient update, conversely to what happens in both PPO and ω \omega ω PPO-U.
Ablation: Training the Critic on D k D_k D k vs. on D ( ω k ) \mathcal{D}(\omega_k) D ( ω k )
In this section, we conduct an ablation on whether to fit the critic on the full composite buffer D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) rather than on the most recent dataset D k D_k D k alone, as done in all other experiments and motivated in § 3 . We consider Reacher-v5 , Swimmer-v5 , and Hopper-v5 across the three comparison settings. Training evaluation curves are reported in Figure 16 , 17, and 18, with overall performance in Table 7 . We denote by ω \omega ω PPO-U Off and ω \omega ω PPO-BH Off the variants fitting the critic on D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) .
Table 7. Average of the last 10 final performance values of the curves shown in the critic fitting ablation (Figure 16 , Figure 17 , and Figure 18 ). Each cell shows the mean ± \pm ± 95% C.I. edges (10 runs).
Figure 16. Ablation on training the critic on on-policy data only vs. on off-policy data too. Evaluation conducted in the Reacher-v5 environment, considering all the presented comparison settings (10 runs, mean ± \pm ± 95%).
In general, by looking at Table 7 only and if the aim is just to find the best-performing configuration of ω \omega ω PPO-U and ω \omega ω PPO-BH (relative to our controlled scenarios), then one could treat the fitting of the critic of the whole buffer D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) as an additional hyperparameter to explore. However, results appear to be tied to the specific starting hyperparameter configuration, considered control task, and considered comparison setting. For instance, in Reacher-v5 fitting the critic on D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) delivers the best performance across all the comparison settings, as well as in Hopper-v5 , but for the sole fixed N B N_B N B scenario. Otherwise, results may vary and often there is not a clear distinction in achieved final performance and in many cases, as ω \omega ω enlarges, final and training performances tends to degrade when fitting the critic on D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) . Next, we comment the comparison settings separately, considering to group them by ω \omega ω .
In the fixed B B B setting (Figure 16 a, 17a, and 18a), results are nearly identical at ω = 2 \omega= 2 ω = 2 , but as ω \omega ω increases, fitting on D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) either worsens performance or leaves it unchanged across all environments. The only exception is in Reacher-v5 , where past data yields a marginal improvement in final performance, particularly for ω \omega ω PPO-BH, though the gain is negligible relative to fitting on D k D_k D k only.
In the fixed N B N_B N B setting (Figure 16 b, 17b, and 18b), performance in Reacher-v5 is comparable across both strategies for all window sizes, while in Swimmer-v5 fitting on the full D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) appears to hinder training, particularly at ω ∈ { 4 , 8 } \omega\in\{4, 8\} ω ∈ { 4 , 8 } . A notable exception is Hopper-v5 , where fitting on D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) improves final performance for both variants and all window sizes.
In the H / ω H/\omega H / ω steps setting (Figure 16 c, Figure 17 c, and Figure 18 c), the choice of critic fitting strategy has no discernible effect across all window sizes, as all methods perform poorly regardless.
Figure 17. Ablation on training the critic on on-policy data only vs. on off-policy data too. Evaluation conducted in the Swimmer-v5 environment, considering all the presented comparison settings (10 runs, mean ± \pm ± 95%).
Figure 18. Ablation on training the critic on on-policy data only vs. on off-policy data too. Evaluation conducted in the Hopper-v5 environment, considering all the presented comparison settings (10 runs, mean ± 95 % \pm95\% ± 95% ).
Overall, fitting the critic on, as ω \omega ω enlarges, D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) either shows no clear advantage or actively worsens learning, with the exceptions of Reacher-v5 (all settings) and Hopper-v5 in the fixed N B N_{\mathcal{B}} N B setting only. As discussed in § 3 , past windows in D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) contain return estimates computed under the critic available at collection time; without re-evaluation under the current critic [e.g., 46, 33, 69], stale returns may introduce a bias accumulating with the window size. This paragraph confirms that such bias may be harmful, though its magnitude appears to depend on both the environment and the comparison setting and, as previously said, when the goal is just to find the best reuse configuration, then fitting the critic on the whole D ( ω k ) \mathcal{D}(\omega_k) D ( ω k ) could be considered as an additional exploring dimension. However, for the purpose of this work and given this ablation, we decided to conduct the controlled study on reusing fitting the critic on D k \mathcal{D}_k D k only.