[Paper Review] Trajectory-wise Control Variates for Variance Reduction in Policy Gradient Methods
This paper proposes TrajCV, a novel trajectory-wise control variate for variance reduction in policy gradient methods by exploiting temporal correlations across states and actions in trajectories. By recursively constructing control variates using Q-function approximators, TrajCV achieves optimal variance reduction under reasonable assumptions and significantly improves sample efficiency, especially in long-horizon tasks.
Policy gradient methods have demonstrated success in reinforcement learning tasks that have high-dimensional continuous state and action spaces. However, policy gradient methods are also notoriously sample inefficient. This can be attributed, at least in part, to the high variance in estimating the gradient of the task objective with Monte Carlo methods. Previous research has endeavored to contend with this problem by studying control variates (CVs) that can reduce the variance of estimates without introducing bias, including the early use of baselines, state dependent CVs, and the more recent state-action dependent CVs. In this work, we analyze the properties and drawbacks of previous CV techniques and, surprisingly, we find that these works have overlooked an important fact that Monte Carlo gradient estimates are generated by trajectories of states and actions. We show that ignoring the correlation across the trajectories can result in suboptimal variance reduction, and we propose a simple fix: a class of "trajectory-wise" CVs, that can further drive down the variance. We show that constructing trajectory-wise CVs can be done recursively and requires only learning state-action value functions like the previous CVs for policy gradient. We further prove that the proposed trajectory-wise CVs are optimal for variance reduction under reasonable assumptions.
Motivation & Objective
- Address the persistent issue of high variance in Monte Carlo gradient estimates for policy gradient methods, particularly in long-horizon and high-dimensional continuous control tasks.
- Identify that prior control variate methods (state-only and state-action dependent) overlook temporal correlations across trajectory steps, leading to suboptimal variance reduction.
- Propose a new class of control variates—TrajCV—that explicitly account for trajectory-level correlations to further reduce gradient variance without introducing bias.
- Demonstrate theoretically and empirically that TrajCV is optimal for variance reduction under reasonable assumptions and can be implemented recursively using standard Q-function approximators.
- Validate the effectiveness of TrajCV through simulations on long-horizon tasks, showing superior convergence speed compared to existing CV methods.
Proposed method
- Introduce TrajCV as a family of control variates that extend existing state- and state-action-dependent CVs by adding terms that capture long-term trajectory correlations.
- Construct TrajCV recursively using a Q-function approximator $\widehat{q}^{\text{(dyn)}}(s,a) = c(s,a) + \widehat{v}(\widehat{d}(s,a))$, where $\widehat{d}$ is a learned dynamics model and $\widehat{v}$ is a value function approximator.
- Leverage the conditional expectation $\mathbb{E}_{A_t|S_t}[\widehat{q}(S_t, A_t)]$ to define the control variate, using analytical approximations (e.g., linear and Gauss-Newton approximations) for computational efficiency.
- Ensure the method remains unbiased by construction, as TrajCV is a zero-mean correction term added to the policy gradient estimate.
- Prove that under reasonable assumptions (e.g., deterministic dynamics), TrajCV achieves optimal variance reduction among all possible trajectory-wise control variates.
- Implement TrajCV using on-policy value function approximators and shared function approximators with existing CV methods, enabling fair comparison without additional data or model training.
Experimental results
Research questions
- RQ1Why do existing control variate methods in policy gradients fail to fully reduce variance in long-horizon tasks?
- RQ2To what extent do temporal correlations across trajectory steps contribute to gradient variance in policy gradient methods?
- RQ3Can a control variate that explicitly models trajectory-level dependencies achieve better variance reduction than state-only or state-action-dependent CVs?
- RQ4Is there a theoretically optimal way to construct trajectory-wise control variates that minimizes gradient variance without introducing bias?
- RQ5How does the performance of TrajCV compare to prior CV methods in terms of convergence speed and sample efficiency in long-horizon reinforcement learning tasks?
Key findings
- TrajCV significantly reduces gradient variance by accounting for long-term trajectory correlations, which prior methods overlook.
- The proposed TrajCV method is proven to be optimal for variance reduction under reasonable assumptions, particularly when transition dynamics are close to deterministic.
- Empirical results show that TrajCV accelerates learning convergence, especially in long-horizon tasks where trajectory-level variance dominates.
- Using analytical approximations (e.g., Gauss-Newton) for $\mathbb{E}_{A_t|S_t}[\widehat{q}(S_t, A_t)]$ improves computational efficiency while maintaining low variance.
- The performance gap between TrajCV and previous CVs (state-only, state-action) increases with task horizon length, confirming the importance of trajectory-wise modeling.
- TrajCV can be implemented using existing Q-function approximators without requiring new data or models, enabling seamless integration into current policy gradient frameworks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.