Accelerating Policy Gradient by Estimating Value Function from Prior Computation in Deep Reinforcement Learning

Md Masudur Rahman, Yexiang Xue

TL;DR

This paper introduces a framework to improve the sample efficiency of on-policy policy gradient algorithms (like PPO and RPO) by reusing prior computation—such as pre-trained DQN $Q$-networks or existing value functions—as state-dependent baselines. Because baselines that do not depend on the current action preserve unbiased gradient estimates while reducing variance, this approach jump-starts training without compromising theoretical soundess.

What Problem Does This Paper Address?

While machine learning paradigms like NLP and computer vision heavily reuse pre-trained models, reinforcement learning (RL) frequently trains agents from scratch (tabula rasa). On-policy algorithms such as Proximal Policy Optimization (PPO) are computationally efficient and stable, but suffer from poor sample efficiency because they continually discard experience.

Off-policy data or replay buffers are difficult to directly incorporate into on-policy policy gradients without violating theoretical guarantees. The authors address this challenge: How can we reuse prior computation (even across algorithms, dynamics, or reward functions) to jump-start on-policy policy gradient methods while keeping gradient estimates theoretically unbiased?

Methods

The core idea is to leverage past computation strictly as a baseline $b(s_t)$ in the policy gradient theorem:

$$\tilde{g} = \frac{1}{m} \sum_{i=0}^m \nabla_\theta \log P(\tau^{(i)}; \theta) (R(\tau^{(i)}) - b(s_t))$$

Because any baseline independent of the action $a_t$ leaves the expected policy gradient unbiased while reducing variance, past computation can be safely plugged in.

  1. Hybrid Baseline with Weaning: The baseline linearly blends the current on-policy value function $V_\pi(s_t)$ with a prior value estimate $V_\pi^{\text{prior}}(s_t)$: $$b(s_t) = (1 - w_t) V_\pi(s_t) + w_t V_\pi^{\text{prior}}(s_t)$$ where $w_t \in [0, 1]$ is a schedule parameter that weans off over training time (e.g., decaying by 0.1 per million timesteps) so the agent eventually relies purely on its own value function.

  2. Deriving Value from Prior Computations:

  3. From Off-Policy $Q$-Networks (Discrete Actions): $$V_\pi^{\text{prior}}(s_t) = \sum_{a_i \in \mathcal{A}} \pi(a_i \mid s_t) Q(s_t, a_i)$$
  4. From Past Value Functions: $$V_\pi^{\text{prior}}(s_t) = V_{\pi_{\text{past}}}(s_t)$$ used across tasks sharing state representations (e.g., related tasks or identical runs restarted after interruption).

Datasets

(Evaluated across standard RL benchmark simulation environments; no standalone static datasets were introduced.) - OpenAI Gym: LunarLander-v2 (standard and windy generalization variant). - Atari (Arcade Learning Environment via EnvPool / Gym): BeamRiderNoFrameskip-v4 and BreakoutNoFrameskip-v4. - DeepMind Control Suite: walker-stand and walker-run (continuous action benchmarks).

Key Insights and Ideas

  • Theoretical Safety via Baselines: Rather than forcing off-policy data into the policy update or modifying transition distributions, repurposing prior computation solely through the baseline guarantees unbiased gradients while significantly mitigating early-training variance.
  • Cross-Algorithm and Cross-Library Transfer: An off-policy DQN agent trained slowly on standard Gym implementations can donate its $Q$-network to an on-policy PPO agent running high-throughput vectorized environments (via EnvPool), cutting 10M timestep runtimes from ~8 hours to ~1.5 hours while retaining sample efficiency.
  • Cross-Task and Cross-Dynamics Generalization: A value function pre-trained on an easier or alternate variant (e.g., non-windy LunarLander, or walker-stand) provides useful variance reduction for more complex downstream targets (windy LunarLander, or walker-run).

Key Results

  • Setting 1 (Same Env, Off-Policy DQN $\to$ PPO):
  • In LunarLander-v2, RRL-PPO quickly solved the task (reaching an episodic return of 200), whereas the baseline TBR-PPO (trained from scratch) failed to reach the threshold within 8M timesteps.
  • In BeamRider, RRL-PPO broke away after 2.5M timesteps to reach an average return of ~4500, compared to ~2000 for TBR-PPO.
  • Setting 2 (Different Dynamics, DQN $\to$ PPO): In windy LunarLander, transferring the $Q$-function from a non-windy environment allowed RRL-PPO to outperform TBR-PPO by a large margin across 8M timesteps.
  • Setting 3 (Different Task, PPO $\to$ PPO): Transferring a value baseline from walker-stand to walker-run yielded consistent performance improvements over scratch training.
  • Setting 4 (Run-to-Run Restart, RPO $\to$ RPO): Reusing the value function from a previous run on walker-stand allowed RRL-RPO to cross a score of 800 in just 2M timesteps, whereas baseline RPO failed to hit 800 even after 8M timesteps (a 4× sample efficiency improvement).

Limitations and Future Work

  • Discrete Action Limitation for $Q$-values: Integrating $Q(s, a)$ over continuous action spaces to form $V(s)$ is analytically intractable; thus, the $Q$-to-$V$ conversion was restricted to discrete action tasks.
  • Sensitivity to Prior Quality: Poor pre-trained value estimates can introduce high early variance or degrade learning, requiring careful tuning of the weaning schedule $w_t$.
  • Call for General Value Functions (GVFs): The authors advocate creating standardized, pre-trained "foundation" value functions for robotics and RL benchmarks (analogous to GPT or BERT) that can plug directly into downstream on-policy policy gradient training.

Summary updated

BibTeX
@inproceedings{rahman2023accelerating,
  author = {Md Masudur Rahman and Yexiang Xue},
  title = {{Accelerating Policy Gradient by Estimating Value Function from Prior Computation in Deep Reinforcement Learning}},
  booktitle = {RRL @ ICLR},
  year = {2023},
  url = {https://openreview.net/forum?id=sOgyNWyN6Gu},
}
Figure