Improving Exploration in Soft-Actor-Critic with Normalizing Flows Policies

Patrick Nadeem Ward, Ariella Smofsky, Avishek Joey BosearXiv 2019

Abstract

Standard Deep Reinforcement Learning (DRL) algorithms for continuous action spaces often rely on simple Gaussian distributions to represent policies. While mathematically convenient, these distributions lack the expressivity required to capture complex, multi-modal behaviors necessary for efficient exploration in sparse reward environments. This paper introduces Flow-SAC, an extension of the Soft-Actor-Critic (SAC) framework that utilizes Normalizing Flow (NF) policies. By employing a sequence of invertible transformations, Flow-SAC enables the learning of highly expressive policy distributions, significantly improving performance and exploration stability in challenging continuous control tasks.

The Modeling Bottleneck in Continuous RL

In continuous action space DRL, the "default" policy choice is typically a factored Gaussian distribution. This choice is driven by mathematical convenience: Gaussians are easy to sample from and differentiate using the reparameterization trick. However, this simplicity acts as a modeling bottleneck. Real-world optimal policies may be skewed, multi-modal, or otherwise complex—shapes a standard bell curve cannot represent. This lack of expressivity often leads to brittle performance and sample inefficiency, particularly in environments where rewards are sparse and the agent must navigate complex paths to receive feedback.

Methods: The Flow-SAC Framework

The proposed Flow-SAC replaces the standard Gaussian policy in SAC with a Normalizing Flow. An NF takes a sample from a simple base distribution (e.g., a standard Gaussian) and passes it through a series of invertible, differentiable transformations. This allows for the computation of exact probability densities for complex resulting distributions via the change of variables formula.

Architecture of Flow-SAC showing the transformation of a base Gaussian distribution into a complex, multi-modal policy through a sequence of invertible layers.

A key insight of this work is that the standard SAC implementation already utilizes a one-layer Normalizing Flow in the form of a tanh squashing function used to bound actions. Flow-SAC extends this by adding multiple RealNVP layers before the final squash. To stabilize training within the RL loop, the authors implemented weight clipping to enforce 1-Lipschitzness and removed BatchNorm layers, which were found to cause numerical instabilities in the RL setting.

Experimental Setup

The approach was evaluated using a Continuous 2D Grid World (150x150 units) featuring both dense and sparse reward configurations. In the sparse version, the agent only receives a reward upon reaching a distant goal, making exploration the primary challenge.

Visualization of the Continuous GridWorld environment, showing trajectories, obstacles, and the sparse reward goal (red).

Key Results and Insights

  • Expressivity Drives Exploration: More expressive policies allow agents to represent diverse search patterns. In sparse reward settings, Flow-SAC explored regions closer to the goal significantly faster than Gaussian policies, which often failed to find solutions within 100k steps.
  • No Performance Penalty: In dense reward settings where simple Gaussians are typically sufficient, Flow-SAC achieved comparable performance, suggesting that increased model complexity does not necessarily come at the cost of efficiency.
  • Distributional Impact: The choice of distribution is a fundamental constraint on agent behavior. The authors demonstrated that even switching to an Exponential distribution altered performance, confirming that the policy distribution itself is a critical design choice.

Conclusion and Future Work

Flow-SAC demonstrates that Normalizing Flows can effectively overcome the expressivity limitations of standard Gaussian policies in SAC. While currently validated on 2D grid worlds, future work includes scaling this approach to high-dimensional robotics benchmarks like MuJoCo. Additionally, exploring more advanced flow architectures such as Glow or Neural Autoregressive Flows (NAF) may further enhance the agent's ability to represent complex action distributions.

Summary updated

BibTeX
@misc{ward2019improving,
  author = {Patrick Nadeem Ward and Ariella Smofsky and Avishek Joey Bose},
  title = {{Improving Exploration in Soft-Actor-Critic with Normalizing Flows Policies}},
  year = {2019},
  eprint = {1906.02771},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.02771},
}
Figure