Parallel bootstrap-based on-policy deep reinforcement learning for continuous flow control applications

Jonathan Viquerat, Elie HachemarXiv 2023 · OpenReview

TL;DR

This paper tackles the challenge of efficiently training deep reinforcement learning (DRL) agents for complex, computationally expensive fluid flow control problems. They introduce a novel "bootstrapped partial-trajectory" approach that allows for massive parallelization of environments while preserving the on-policy nature of the learning algorithm, leading to significantly faster training times and improved performance.

What Problem Does This Paper Address?

Deep reinforcement learning (DRL) has shown great promise in controlling fluid dynamics, but these simulations are notoriously computationally intensive. To speed up the learning process, researchers often use parallel environments to collect data faster. However, a common issue with on-policy DRL algorithms (which are preferred for their stability in this domain) is that massively parallel data collection can lead to "off-policy" updates, breaking theoretical assumptions and resulting in suboptimal control. This paper addresses the gap between the need for parallelization and the constraints of on-policy learning, aiming to enable efficient DRL for high-fidelity fluid flow control.

Methods

The core contribution is a new parallelism strategy called bootstrapped partial-trajectory learning. This method combines two key ideas:

  • End-of-Episode (EOE) Bootstrapping: Traditionally, when an episode ends (either naturally or due to a time limit), the value function estimate for the final state is used to bootstrap the advantage calculation. This paper extends this by explicitly handling time-out terminations, ensuring that the value function accurately reflects the potential future rewards even when an episode is cut short. This helps address credit assignment issues and smooths the learning process for the critic.
  • Partial-Trajectory Bootstrapping (PT Bootstrapping): Instead of waiting for full episodes to complete in each parallel environment, this method uses partial trajectories. These partial trajectories are also terminated with bootstrapping. This allows the agent to perform updates more frequently, even when only a fraction of an episode has been collected across all parallel environments. Crucially, this approach is designed to maintain the "on-policiness" of the updates, meaning the agent is trained on data generated by its current policy, avoiding the bias introduced by off-policy methods.

The authors illustrate this with a synchronous parallel paradigm, contrasting it with traditional sequential and asynchronous parallel approaches.

Datasets

The paper uses a specific CPU-intensive continuous flow control problem from the literature: the control of instabilities in a 1D falling fluid film, based on the Shkadov model. This environment is chosen because the fluid dynamics solver (environment stepping) accounts for a very high percentage (around 96%) of the total computational time, making parallelization of the environment crucial.

The authors also mention using standard GYM and MUJOCO environments (PENDULUM-V1, BIPEDALWALKER-V3, HALFCHEETAH-V4, ANT-V4) to further validate the benefits of EOE bootstrapping.

Key Insights and Ideas

  • Massive Parallelism Doesn't Have to Break On-Policy Learning: The paper demonstrates that with careful design, one can achieve significant speedups from parallel environments without sacrificing the stability and theoretical guarantees of on-policy algorithms like PPO.
  • Bootstrapping is Key for Time-Limited Environments: Explicitly handling time-out terminations with bootstrapping is crucial for learning effective policies in continuous control tasks where episodes are often artificially terminated. It helps the critic learn a more accurate value function.
  • Partial Trajectories Unlock True Parallelism: The ability to use partial trajectories, combined with bootstrapping, liberates the learning process from the constraint of waiting for full episodes. This allows for much more flexible and efficient utilization of a large number of parallel environments.
  • Flow Control is a Prime Candidate for This Technique: The computational demands of fluid dynamics simulations make them ideal testbeds for methods that accelerate DRL training through parallelization.

Key Results

  • Faster Convergence: EOE bootstrapping alone significantly accelerates convergence on the Shkadov environment, cutting the number of required transitions by nearly half.
  • Improved Performance with Parallelism: For the Shkadov environment, the proposed bootstrapped partial-trajectory approach allows for the safe exploitation of significantly more parallel environments (up to 4x more) compared to the vanilla parallel approach, while achieving similar or better final performance.
  • Dramatic Speedups: The method reduces the resolution time of the Shkadov environment from nearly 1.5 hours to approximately 2 minutes.
  • Significant Speedup Metrics: For higher numbers of parallel environments (e.g., 32 and 64), speedups of 25.4x and 42.4x were measured for the proposed method compared to the regular approach.
  • Reduced Variability: Bootstrapping also leads to lower variability in performance between different training runs.

Limitations and Future Work

  • Value Function Accuracy is Crucial: The effectiveness of the bootstrapping method relies on a reasonably accurate value function. The authors note that learning the value function in the early stages of training is sufficient for the method to provide benefits.
  • Implementation Complexity: While EOE bootstrapping requires minimal modifications, PT bootstrapping involves more significant changes to the unrolling process.
  • Future Work: The authors suggest that combining their approach with efficient parallelism at the solver level could enable DRL for even more complex and resource-demanding environments. They also note that pre-computing initial states for environments could further improve speedups.

Summary updated

Abstract

The coupling of deep reinforcement learning to numerical flow control problems has recently received a considerable attention, leading to groundbreaking results and opening new perspectives for the domain. Due to the usually high computational cost of fluid dynamics solvers, the use of parallel environments during the learning process represents an essential ingredient to attain efficient control in a reasonable time. Yet, most of the deep reinforcement learning literature for flow control relies on on-policy algorithms, for which the massively parallel transition collection may break theoretical assumptions and lead to suboptimal control models. To overcome this issue, we propose a parallelism pattern relying on partial-trajectory buffers terminated by a return bootstrapping step, allowing a flexible use of parallel environments while preserving the on-policiness of the updates. This approach is illustrated on a CPU-intensive continuous flow control problem from the literature.
BibTeX
@misc{viquerat2023parallel,
  author = {Jonathan Viquerat and Elie Hachem},
  title = {{Parallel bootstrap-based on-policy deep reinforcement learning for continuous flow control applications}},
  year = {2023},
  eprint = {2304.12330},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.12330},
}
Figure