TL;DR
This paper introduces Behavior Policy Optimization (BPO), a novel technique for online reinforcement learning that uses a specially designed "behavior policy" to collect data. This approach provably reduces the variance of return estimates, leading to more stable and sample-efficient learning compared to standard on-policy methods.
What Problem Does This Paper Address?
Reinforcement learning (RL) algorithms often struggle with high-variance return estimates, which can lead to unstable training and poor sample efficiency. This is particularly true in off-policy RL, where data is collected by one policy (the behavior policy) but used to train another (the target policy). While importance sampling can correct for this mismatch, it can lead to variance explosion if the policies differ significantly. Existing methods often focus on offline RL or parallel data collection. This paper addresses the challenge of improving sample efficiency and stability in online RL by optimizing the behavior policy itself to minimize variance in return estimates, even when only a single agent is collecting data.
Methods
The core of BPO is to optimize a behavior policy ($\mu$) that is specifically designed to collect data that yields low-variance return estimates for the target policy ($\pi$). This is inspired by recent work in off-policy evaluation that showed well-designed behavior policies can be variance-optimal.
Key methodological contributions include:
- Behavior Policy Optimization (BPO): Instead of collecting data with the current target policy, BPO uses a separate, optimized behavior policy to gather experience. This behavior policy is trained to match a distribution derived from the target policy's value function, aiming to minimize the variance of importance sampling ratios.
- Truncated IS-TD($\lambda$) Returns: To handle the potential for high variance in return estimates, especially in online settings where full Monte Carlo returns can be problematic, the authors introduce a new estimator called truncated IS-weighted TD($\lambda$) returns. This estimator balances bias and variance by using truncated importance sampling ratios and a TD($\lambda$) framework.
- Integration with Policy Gradient Methods: BPO is designed to be integrated with existing policy gradient algorithms like REINFORCE and PPO. The behavior policy is trained concurrently with the target policy, and its data is used to compute the return estimates for updating the target policy.
- Auxiliary Q-Networks: To design the optimal behavior policy, BPO requires estimates of the target policy's state-action value function ($q_\pi$). This is achieved by training two auxiliary Q-networks using Fitted Q-Evaluation (FQE) on data collected by the behavior policy.
- Symlog Targets: To stabilize the training of the auxiliary Q-networks and prevent overestimation issues, the authors employ symlog (symmetric log) transformations for targets and symexp (symmetric exponential) for predictions.
Datasets
The paper evaluates BPO on the following environments:
- ShortCorridor grid world: A toy example used to demonstrate the method's applicability.
- MuJoCo environments: A suite of standard continuous control tasks (Ant-v5, HalfCheetah-v5, Hopper-v5, Walker2d-v5) provided by Gymnasium.
No new datasets were introduced.
Key Insights and Ideas
- On-policy is not necessarily variance-optimal: A surprising finding is that collecting data on-policy might not be the most variance-optimal strategy for learning. A carefully designed off-policy behavior policy can yield lower variance estimates.
- Optimizing the data collection strategy is crucial: Instead of just optimizing the policy parameters, BPO also optimizes how data is collected, leading to more stable and efficient learning.
- The behavior policy acts as a variance reducer: By designing the behavior policy to align with the target policy's value function, BPO effectively reduces the variance of importance sampling ratios, which are a major source of instability in off-policy RL.
- Symlog targets are vital for stability: The use of symlog transformations for Q-network targets is shown to be critical for preventing overestimation and ensuring stable learning, especially when dealing with large value discrepancies.
Key Results
- Improved Sample Efficiency and Performance: BPO consistently demonstrated better sample efficiency and achieved higher final returns compared to standard REINFORCE and PPO across various MuJoCo environments.
- Faster Convergence and Increased Stability: Experiments showed that BPO often leads to faster convergence and more stable learning curves, particularly in the later stages of training.
- Ablation Studies Confirm Design Choices: Removing the auxiliary Q-network from the behavior policy loss or disabling symlog targets led to significantly worse performance, validating the importance of these components.
- Marginal Gains on Simple Tasks: While BPO showed clear benefits on complex MuJoCo tasks, the gains on the simpler ShortCorridor environment were marginal, suggesting its primary impact is on problems with higher variance.
Limitations and Future Work
- Increased Computational Cost: BPO requires training three additional networks (behavior policy and two Q-networks) in parallel with the actor and value networks, leading to a significant increase in training time (approximately 2x slower than PPO in their experiments).
- Hyperparameter Tuning: While BPO reduces variance, it introduces new hyperparameters (e.g., truncation parameters $\bar{c}$ and $\rho$) that require tuning.
- Future Work: The authors suggest extending BPO to other policy gradient algorithms (e.g., A2C), exploring its applicability to value-based methods (e.g., DDPG, TD3, SAC), and investigating the use of model-based RL to design globally optimal behavior policies. Further ablations on other stabilization techniques are also mentioned.
Summary updated