Rethinking Population-assisted Off-policy Reinforcement Learning

Bowen Zheng, Ran Cheng

TL;DR

This paper investigates the surprising downside of combining population-based methods with off-policy reinforcement learning (RL): population data can actually harm RL performance due to distribution mismatches. The authors propose a simple "double replay buffer" solution to mitigate this issue, offering practical insights for building more robust hybrid RL systems.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents learn by trial and error, often using a replay buffer to store past experiences for efficient learning. However, standard RL can get stuck in suboptimal solutions due to limited exploration. Population-based methods, like evolutionary algorithms (EAs), offer a natural way to explore a wider range of solutions by maintaining a diverse population of agents.

Recent research has tried to combine the strengths of both by having EAs generate data that's fed into an off-policy RL agent's replay buffer. The idea is that the diverse exploration from the population can guide the RL agent to better solutions. However, this paper points out a critical, overlooked problem: when the data generated by the population (the "behavior policy") is significantly different from what the RL agent is trying to learn (the "target policy"), it can introduce errors into the RL agent's updates, leading to unstable training and even degraded performance. This is particularly problematic for off-policy RL, which relies on data from potentially different policies.

Methods

The authors first analyze the theoretical underpinnings of why population data can cause issues for off-policy RL. They show that a mismatch between the population's data distribution and the target policy's distribution can effectively add a regularization term to the policy gradient, potentially biasing the learning process.

To empirically test this, they introduce a uniform and scalable training design. This design ensures that RL and EA components are compared fairly by aligning their training steps and update intervals, removing confounding factors from previous hybrid methods.

They then propose a "double replay buffer" design as a remedy. Instead of a single shared buffer, they use two: one for the target RL agent's own experiences and another for the population's experiences. During updates, they mix data from both buffers at a controlled ratio. This allows them to increase the proportion of "near-on-policy" data from the target agent, which theoretically helps stabilize off-policy learning.

Finally, they develop a tailored Evolutionary Reinforcement Learning (ERL) framework using an Evolution Strategy (ES) instead of a traditional Genetic Algorithm (GA). This ES is simpler, more scalable, and designed to generate higher-quality population data, further isolating the effect of distribution mismatch.

Datasets

The experiments were conducted on standard Mujoco locomotion tasks from OpenAI Gym, including HalfCheetah-v3, Hopper-v3, Ant-v3, and Walker2d-v3. These are common benchmarks for continuous control problems in robotics. No new datasets were introduced.

Key Insights and Ideas

  • Population data isn't always helpful: The core insight is that simply feeding population data into an off-policy RL agent's replay buffer can be detrimental if the data distributions don't align. This challenges the common assumption that more diverse data is always better.
  • Distribution mismatch is the culprit: The paper pinpoints the difference in state-action distributions between the population and the target RL agent as the source of performance degradation.
  • On-policy data is crucial for stability: The proposed "double replay buffer" method highlights the importance of near-on-policy data for stabilizing off-policy RL updates, especially when dealing with external, potentially off-policy, data sources.
  • Careful experimental design matters: The authors emphasize the need for uniform training designs to fairly compare hybrid RL algorithms, as differences in sampling and update strategies can mask or exaggerate underlying issues.
  • Evolutionary strategies can be simpler and better: Their tailored ERL framework using ES demonstrates that simpler, more scalable evolutionary methods can be effective and easier to analyze than traditional GAs in this context.

Key Results

  • In robot locomotion tasks, using population data with off-policy RL (specifically, the original ERL framework) led to instability and degraded performance, particularly when the action discrepancy between the population and the target agent was significant (e.g., in Hopper-v3 and Walker2d-v3).
  • The proposed double replay buffer design significantly improved performance and stability. By increasing the proportion of near-on-policy data (m=0.75), they were able to mitigate the negative effects of population data and achieve performance comparable to or better than the pure off-policy RL baseline (no-pop).
  • For some tasks (e.g., Ant-v3), hybrid methods with a small proportion of population data (low m) outperformed pure off-policy RL, suggesting that controlled exploration from the population can still be beneficial.
  • The population mean often achieved higher returns than the target actor in the ERL settings, indicating that the population was indeed learning useful policies, but the target actor struggled to effectively utilize this information.

Limitations and Future Work

  • Fixed mixing ratio: The proposed double replay buffer uses a fixed ratio (m) for mixing data. The authors suggest that dynamically adjusting this ratio based on the current state of training or the degree of distribution mismatch could lead to further improvements.
  • Task dependency: The effectiveness of the mixing ratio varied across tasks. For instance, in HalfCheetah-v3, pure off-policy RL performed best, suggesting that broad exploration might not always be beneficial. Future work could explore task-specific adaptation strategies.
  • New off-policy RL methods: The authors call for the development of new off-policy RL algorithms specifically designed to handle deviated population experiences more effectively.
  • Population strategy: They also suggest that the population-based part of hybrid methods should consider its "off-policy degree" relative to the RL policy and aim to generate data that is less likely to cause mismatches.

Summary updated

Abstract

While off-policy reinforcement learning (RL) algorithms are sample efficient due to gradient-based updates and data reuse in the replay buffer, they struggle with convergence to local optima due to limited exploration. On the other hand, population-based algorithms offer a natural exploration strategy, but their heuristic black-box operators are inefficient. Recent algorithms have integrated these two methods, connecting them through a shared replay buffer. However, the effect of using diverse data from population optimization iterations on off-policy RL algorithms has not been thoroughly investigated. In this paper, we first analyze the use of off-policy RL algorithms in combination with population-based algorithms, showing that the use of population data could introduce an overlooked error and harm performance. To test this, we propose a uniform and scalable training design and conduct experiments on our tailored framework in robot locomotion tasks from the OpenAI gym. Our results substantiate that using population data in off-policy RL can cause instability during training and even degrade performance. To remedy this issue, we further propose a double replay buffer design that provides more on-policy data and show its effectiveness through experiments. Our results offer practical insights for training these hybrid methods.
BibTeX
@inproceedings{zheng2023rethinking,
  author = {Bowen Zheng and Ran Cheng},
  title = {{Rethinking Population-assisted Off-policy Reinforcement Learning}},
  booktitle = {GECCO},
  year = {2023},
  url = {https://openreview.net/forum?id=uEdkKhiF1d},
}
Figure