Leveraging exploration in off-policy algorithms via normalizing flows

Bogdan Mazoure, Thang Doan, Audrey Durand, Joelle Pineau, R. Devon Hjelm

Abstract

The ability to discover approximately optimal policies in domains with sparse rewards is crucial to applying reinforcement learning (RL) in many real-world scenarios. Approaches such as neural density estimation can enhance exploration by allowing agents to model complex, multimodal action distributions. This paper introduces SAC-NF, which replaces the standard Gaussian policy in Soft Actor-Critic (SAC) with Normalizing Flows, significantly boosting performance in environments with sparse or deceptive rewards while maintaining high parameter efficiency.

Introduction

In reinforcement learning (RL), exploration is the "bread and butter" of finding optimal policies. However, most state-of-the-art off-policy algorithms, like Soft Actor-Critic (SAC), rely on unimodal Gaussian policies. This reliance often acts as a bottleneck in high-dimensional robotics tasks where environments may contain multiple distinct "good" paths separated by "bad" regions or local minima. A Gaussian policy is forced to pick a single mode; if it attempts to cover multiple paths, the resulting "average" action often leads to failure. To solve complex coordination tasks, agents need the flexibility to represent multimodal distributions—enabling them to consider multiple distinct strategies simultaneously.

Methods: SAC-NF

The authors introduce SAC-NF, which augments the SAC framework with Normalizing Flows (NF).

The SAC-NF architecture transforms a simple Gaussian distribution into a complex target policy through a series of invertible transformations.

Instead of outputting the parameters of a simple Gaussian, the policy starts with a simple noise distribution and passes it through a sequence of invertible, differentiable mappings. These flows "warp" the simple initial distribution into a much more complex shape, allowing for multimodality and non-symmetry. Because the mappings are invertible and have tractable Jacobians, the algorithm can still calculate the exact log-probability of an action, which is crucial for the entropy bonus SAC uses to encourage exploration. The researchers specifically experimented with Radial and Planar flows, which are computationally lighter than more complex architectures like Inverse Autoregressive Flows (IAF).

Experimental Evaluation

The authors evaluated SAC-NF across several challenging continuous control benchmarks:

  • MuJoCo: Standard locomotion tasks like Ant-v2, HalfCheetah-v2, and Humanoid-v2.
  • PyBullet Roboschool: Realistic physics simulations including Humanoid Flagrun.
  • Sparse Reward Environments: A custom "Sparse Humanoid" task where rewards are only granted after crossing a specific distance threshold.
  • Toy Navigation: A synthetic 2D environment with four distinct goals to test multimodality.

Key Results

SAC-NF outperformed or matched standard SAC and TD3 across almost all MuJoCo and PyBullet tasks.

Comparison of SAC and SAC-NF average returns across various MuJoCo environments, showing significant performance gains in tasks like Hopper, Walker2d, and Ant.

In the Sparse Humanoid task, where standard SAC and TD3 struggled to even "take off," SAC-NF successfully discovered the reward signal and learned a functional gait. On Humanoid (PyBullet), SAC-NF with radial flows achieved a maximal average return of 1755, compared to 1263 for standard SAC. The authors also observed faster convergence in complex tasks, suggesting that the richer policy representation helps the agent find "good" regions of the state-action space more quickly.

Insights and Discussion

  • Efficiency through Geometry: SAC-NF is significantly smaller than standard SAC. Because the flow layers handle the complexity of the distribution, the neural network requires fewer parameters. In Hopper-v2, SAC-NF achieved better results using only 5.5% of the parameters of the baseline.
  • Breaking Symmetry: In "deceptive" reward environments, Gaussian policies often fail due to their inherent symmetry. Radial flows allow the agent to maintain probability mass on safe, non-symmetric paths, effectively "walking around" failure zones.
  • Learned Multimodality: Using the gap statistic, the authors proved that SAC-NF naturally learns to use multiple modes. In the Walker task, the policy evolved to have multiple distinct "peaks" of action, whereas standard SAC remained stuck in a single, less-effective mode.

Conclusion

By replacing simple Gaussian policies with expressive Normalizing Flows, SAC-NF provides a powerful mechanism for exploration in complex environments. The approach is not only more performant but also more parameter-efficient, making it a promising direction for high-dimensional robotic control.

Summary updated

BibTeX
@inproceedings{mazoure2019leveraging,
  author = {Bogdan Mazoure and Thang Doan and Audrey Durand and Joelle Pineau and R. Devon Hjelm},
  title = {{Leveraging exploration in off-policy algorithms via normalizing flows}},
  booktitle = {Conference on Robot Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=fNeW72V1su},
}
Figure