Papers
Topics
Authors
Recent
Search
2000 character limit reached

Trust-PCL Off-Policy RL Algorithm

Updated 8 February 2026
  • Trust-PCL is an off-policy reinforcement learning algorithm that uses KL-regularization and pathwise consistency to balance reward optimization and policy similarity.
  • It minimizes a squared-error loss over full trajectories, enabling off-policy updates that achieve trust-region-like stability and high sample efficiency.
  • Its equivalence to Relative Trajectory Balance (RTB) connects RL fine-tuning with generative modeling, enhancing energy-based marginal matching.

Trust-PCL is an off-policy reinforcement learning (RL) algorithm that optimizes a KL-regularized objective via squared-error minimization of a pathwise consistency loss, unifying trust-region policy optimization (TRPO-style stability) with high sample efficiency. Trust-PCL emerged as an extension of maximum-entropy RL frameworks, introducing a relative-entropy (KL) penalty to enforce closeness to a reference policy and enable off-policy learning, with guarantees rooted in soft Bellman fixed-point equations (Nachum et al., 2017). Recent research has established an exact equivalence between Trust-PCL and the Relative Trajectory Balance (RTB) objective proposed for Generative Flow Networks (GFlowNets), further situating Trust-PCL at the intersection of generative modeling, RL fine-tuning, and KL-regularized objectives (Deleu et al., 1 Sep 2025).

1. KL-Regularized RL Objective and Pathwise Consistency

Trust-PCL arises from a KL-regularized RL objective designed to balance reward maximization against policy proximity to a reference ("prior") policy. In a finite-horizon Markov Decision Process (MDP) M=(S{},A,P,r)M=(S\cup\{\bot\},A,P,r), the goal is to solve

π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],

where α>0\alpha>0 controls the reward/KL tradeoff. The soft-optimal policy is given by

π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},

with associated soft Bellman equations

Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).

A crucial insight underlying Trust-PCL is that (π,V)(\pi^*, V^*) satisfy a multi-step pathwise consistency: for any sampled trajectory, a Bellman-like consistency relation holds at all sub-intervals, providing the foundation for off-policy updates (Nachum et al., 2017, Deleu et al., 1 Sep 2025).

2. Trust-PCL Squared-Error Loss and Algorithm

Trust-PCL operationalizes the KL-regularized objective by defining a per-trajectory residual and minimizing its squared expectation over off-policy data. Given policy parameters ϕ\phi and value parameters ψ\psi, for a trajectory τ=(s0,...,sT,)\tau = (s_0, ..., s_T, \bot),

ΔT(τ;ϕ,ψ)=Vψ(s0)+t=0Tr(st,st+1)+αt=0Tlogπprior(st+1st)πϕ(st+1st)\Delta_T(\tau; \phi, \psi) = -V^\psi(s_0) + \sum_{t=0}^T r(s_t, s_{t+1}) + \alpha \sum_{t=0}^T \log \frac{\pi_{\mathrm{prior}}(s_{t+1}|s_t)}{\pi_\phi(s_{t+1}|s_t)}

The learning objective is

π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],0

where π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],1 denotes the behavior policy (typically using a replay buffer) (Deleu et al., 1 Sep 2025). In every training iteration, a minibatch of trajectories is sampled, π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],2 computed for each, and stochastic gradients taken with respect to both policy and value parameters. The method does not require explicit discounting for finite-horizon tasks (π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],3).

3. Connection to Relative Trajectory Balance (RTB)

RTB, introduced for GFlowNets but equivalent to Trust-PCL under reparameterization, defines its residual for a trajectory as

π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],4

with loss

π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],5

By identifying the per-step policy π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],6 with π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],7, value π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],8, and outcome reward π=argmaxπ  Eτπ[t=0Tr(st,st+1)αKL(π(st)    πprior(st))],\pi^* = \arg\max_\pi\;\mathbb{E}_{\tau\sim\pi}\left[\sum_{t=0}^T r(s_t,s_{t+1}) - \alpha\,\mathrm{KL}(\pi(\cdot|s_t)\;\|\;\pi_{\mathrm{prior}}(\cdot|s_t))\right],9 at the terminal step, one obtains α>0\alpha>00 and α>0\alpha>01 (Proposition 1, (Deleu et al., 1 Sep 2025)). Thus, Trust-PCL and RTB are the same algorithm up to a scale factor and parameterization of the value function.

4. Practical Implementation and Hyperparameters

Key hyperparameters and implementation protocols include:

  • α>0\alpha>02 (KL-regularization weight/temperature, equivalent to α>0\alpha>03 in RTB);
  • α>0\alpha>04 (learning rates for policy and value networks);
  • Minibatch size α>0\alpha>05, replay buffer size, trajectory rollout length α>0\alpha>06;
  • Behavior policy α>0\alpha>07 (commonly an α>0\alpha>08-greedy or delayed copy of α>0\alpha>09);
  • Optional annealing schedule for π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},0, or stepwise clipping of policy updates (cf. PPO);
  • Importance sampling or self-normalized IS if π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},1;
  • Baseline subtraction is automatically handled via π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},2;
  • For finite horizon, set discount π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},3 (Deleu et al., 1 Sep 2025).

A typical Trust-PCL training loop involves rolling out π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},4 trajectories under π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},5, storing them in a buffer, sampling π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},6 for updates, computing the residuals and squared-error loss, and applying gradient updates separately to π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},7 and π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},8.

5. Theoretical Guarantees and Pathwise Consistency

Trust-PCL leverages the contractive property of the soft-Bellman operator for existence and uniqueness of the fixed point π(ss)    πprior(ss)  exp{Qsoft(s,s)Vsoft(s)α},\pi^*(s'|s)\;\propto\;\pi_{\mathrm{prior}}(s'|s)\; \exp\left\{\frac{Q^*_{\mathrm{soft}}(s,s')-V^*_{\mathrm{soft}}(s)}{\alpha}\right\},9 under bounded rewards and compact policy classes (Nachum et al., 2017). Minimizing the squared pathwise consistency error by gradient descent converges to a local stationary point according to standard SGD guarantees for nonconvex objectives. By annealing Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).0 to satisfy a fixed KL constraint, Trust-PCL achieves trust-region-like stability corresponding to a chosen KL radius Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).1.

No importance sampling weights are required in the standard KL-regularized objective when using off-policy data, as pathwise consistency holds for all samples. The use of a recency-weighted replay buffer (with priority proportional to Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).2 for sub-episode insertion time Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).3) further accelerates learning.

6. Empirical Performance and Applications

On standard continuous control benchmarks (Acrobot, HalfCheetah, Swimmer, Hopper, Walker2d, Ant in MuJoCo), Trust-PCL matches or exceeds the final reward achieved by TRPO while requiring Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).4–Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).5 fewer environment steps (Nachum et al., 2017). Ablation studies show that removing the KL penalty (Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).6, Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).7) triggers instability, while strict on-policy sampling drives up sample cost. Off-policy Trust-PCL with recency-weighted buffer achieves both stability and superior sample efficiency.

In generative modeling contexts, Trust-PCL’s equivalence to RTB provides a unified perspective. For example, in the 2D Gaussian mixture experiment of (Deleu et al., 1 Sep 2025), both RTB and properly configured off-policy Trust-PCL recover the full multimodal distribution, provided the reward matches the target energy function Qsoft(s,s)=r(s,s)+Vsoft(s),Vsoft(s)=αlogsπprior(ss)exp(Qsoft(s,s)α).Q^*_{\mathrm{soft}}(s,s') = r(s,s') + V^*_{\mathrm{soft}}(s'),\qquad V^*_{\mathrm{soft}}(s) = \alpha \log \sum_{s'} \pi_{\mathrm{prior}}(s'|s) \exp\left(\frac{Q^*_{\mathrm{soft}}(s,s')}{\alpha}\right).8. This demonstrates that prior reports of RTB’s superiority reflected reward mismatch and sampling protocol, not an intrinsic algorithmic difference.

7. Impact, Implications, and Research context

Trust-PCL unifies off-policy sample efficiency with the robust convergence properties of trust-region optimization, making it a central tool in KL-regularized RL for both RL control and generative modeling applications. Its equivalence to the RTB objective situates it as the canonical off-policy squared-error algorithm for energy-based marginal matching, directly extending to GFlowNets and beyond (Deleu et al., 1 Sep 2025). The use of off-policy data, automatic KL control, and pathwise consistency positions Trust-PCL as a foundational reference in both continuous RL and sequential generative model fine-tuning.

A plausible implication is that, under proper reward and policy update design, off-policy KL-regularized RL objectives provide a flexible, expressive, and stable optimization family for energy-based modeling and generative flow networks, obviating the need for distinct new objectives for finetuning in sequential settings.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Trust-PCL Algorithm.