Functional Wasserstein Variational Policy Optimization

Junyu Xuan, Mengjing Wu, Zihe Liu, Jie LuUAI 2024

TL;DR

This paper introduces Functional Wasserstein Variational Policy Optimization (FWVPO), a novel approach for reinforcement learning that addresses limitations of existing methods. By using Wasserstein distance in function space instead of KL divergence in weight space, FWVPO offers improved robustness, better uncertainty modeling, and guarantees monotonic policy improvement, leading to more stable and effective learning.

What Problem Does This Paper Address?

Reinforcement learning (RL) aims to train agents to make optimal decisions in an environment to maximize cumulative rewards. A key challenge in RL is effectively modeling uncertainty and generalizing to unseen situations. While variational policy optimization (VPO) has shown promise by incorporating Bayesian neural networks (BNNs) for uncertainty, most existing VPO methods rely on the Kullback-Leibler (KL) divergence. The KL divergence has several drawbacks: it can be ill-defined in certain scenarios (e.g., when probability distributions don't overlap), it can lead to policies collapsing into local optima, and optimizing it in the "weight space" of BNNs can introduce bias and complexity. This paper tackles these issues by proposing a new VPO framework that operates in "function space" and uses the Wasserstein distance, which is more robust and well-behaved than KL divergence.

Methods

The core innovation is Functional Wasserstein Variational Policy Optimization (FWVPO). Instead of parameterizing policies in the traditional "weight space" of neural networks, FWVPO treats the policy as a function in "function space." This is achieved by using a Bayesian neural network (BNN) where the distribution is placed over the functions the network can represent, rather than just its weights.

Key methodological components include:

  • Functional Policy Representation: Policies are modeled as distributions over functions, induced by parameterized BNNs. This allows for a richer representation of policy uncertainty.
  • Wasserstein Distance for Policy Optimization: FWVPO replaces the problematic KL divergence with the 1-Wasserstein distance between the policy's functional prior and its posterior. The Wasserstein distance is known to be better-behaved, especially when distributions have non-overlapping supports, and is less prone to collapsing into local optima.
  • Variational Bayesian Objective: The paper proves that FWVPO provides a valid and tighter variational Bayesian objective compared to KL divergence.
  • Monotonic Improvement Guarantee: FWVPO is shown to guarantee monotonic expected reward improvement under certain conditions, which is crucial for stable RL training.
  • Multi-Term Regularization: The final FWVPO objective incorporates three regularization terms:
  • A term to ensure monotonic improvement (based on Wasserstein distance between consecutive policies).
  • A term to enforce the functional prior constraint (using Wasserstein distance between the posterior and prior).
  • A term to enhance marginalization consistency, ensuring the policy generalizes well across different states.

Datasets

The paper evaluates FWVPO on standard reinforcement learning benchmarks:

  • CartPole: A classic control task.
  • Acrobot: Another classic control task.
  • MuJoCo: A suite of more complex physics-based environments (Hopper, Walker2d, Humanoid, HalfCheetah).

No new datasets or benchmarks were introduced.

Key Insights and Ideas

  • Function Space is Key: Moving policy optimization from "weight space" to "function space" with BNNs unlocks richer uncertainty modeling and better generalization.
  • Wasserstein Distance is a Superior Divergence: For policy optimization, especially with BNNs, the Wasserstein distance is a more robust and reliable choice than KL divergence, avoiding issues like ill-definition and mode collapse.
  • Monotonicity is Achievable: The proposed FWVPO framework not only improves performance but also provides theoretical guarantees for monotonic improvement, leading to more stable learning.
  • Robustness to Noise and Variations: FWVPO demonstrates superior performance in noisy environments and when faced with unseen environmental variations, highlighting the benefit of its uncertainty modeling capabilities.

Key Results

  • Improved Performance: FWVPO consistently outperformed baseline methods (PPO, BNN-PPO, BNN-KL-PPO, fBNN-KL-PPO) across various MuJoCo environments, achieving higher cumulative rewards.
  • Robustness to Noise: In noisy environments, FWVPO showed significantly more stable performance compared to PPO, which experienced dramatic reward drops.
  • Generalization: FWVPO maintained stable performance on variated environments without retraining, while PPO's performance degraded substantially.
  • Faster Convergence (in some cases): While BNN-based methods generally require more samples, FWVPO showed competitive or faster convergence rates than other BNN approaches in complex MuJoCo tasks.
  • Theoretical Guarantees: The paper provides theoretical proofs for FWVPO being a valid variational objective and guaranteeing monotonic reward improvement.

Limitations and Future Work

  • Computational Cost: While FWVPO offers advantages, the use of Wasserstein distance and function-space optimization can be computationally more intensive than standard KL-based methods.
  • Hyperparameter Tuning: The FWVPO objective includes several hyperparameters (e.g., weighting for the three regularization terms) that require careful tuning.
  • Future Directions: The authors suggest exploring FWVPO in model-based RL settings, using functional BNNs as environment models. They also aim to investigate the possibility of more explicitly expressing the "probability density" for function distributions.

Summary updated

BibTeX
@inproceedings{xuan2024functional,
  author = {Junyu Xuan and Mengjing Wu and Zihe Liu and Jie Lu},
  title = {{Functional Wasserstein Variational Policy Optimization}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=8m7MSD7dEF},
}
Figure