Policy Representation via Diffusion Probability Model for Reinforcement Learning

Long Yang, Zhixiong Huang, Fenghao Lei, Yucun Zhong, Yiming Yang, Cong Fang, Shiting Wen, Binbin Zhou, Zhouchen LinarXiv 2023

Abstract

Popular reinforcement learning (RL) algorithms tend to produce a unimodal policy distribution, which weakens the expressiveness of complicated policy and decays the ability of exploration. The diffusion probability model is powerful to learn complicated multimodal distributions, which has shown promising and potential applications to RL. In this paper, we formally build a theoretical foundation of policy representation via the diffusion probability model and provide practical implementations of diffusion policy for online model-free RL. Concretely, we character diffusion policy as a stochastic process, which is a new approach to representing a policy. Then we present a convergence guarantee for diffusion policy, which provides a theory to understand the multimodality of diffusion policy. Furthermore, we propose the DIPO which is an implementation for model-free online RL with DIffusion POlicy. To the best of our knowledge, DIPO is the first algorithm to solve model-free online RL problems with the diffusion model. Finally, extensive empirical results show the effectiveness and superiority of DIPO on the standard continuous control Mujoco benchmark.

The Unimodal Barrier in Reinforcement Learning

In standard Reinforcement Learning (RL), agents typically represent their policies using simple parametric functions, such as Gaussians, that output a mean and variance for a given state. This approach assumes that for any situation, there is a single "best" action or a single cluster of valid actions. However, complex real-world environments are often multimodal: multiple distinct, equally valid paths might exist to achieve a goal.

Standard algorithms like Soft Actor-Critic (SAC) or Proximal Policy Optimization (PPO) struggle in these scenarios. Because they are constrained to unimodal distributions, they often attempt to "average" multiple optimal actions. This can lead to the agent selecting a "middle" action that is suboptimal or even dangerous, effectively crashing into obstacles it was trying to navigate around.

Comparison of multimodal vs. unimodal policy distributions. Unimodal policies (red) often fail to capture the distinct peaks of optimal actions in complex environments, whereas multimodal policies (blue) can represent multiple high-value regions.

The DIPO Framework: Policy as a Stochastic Process

To overcome this bottleneck, the authors introduce DIPO (DIffusion POlicy), a framework that leverages Diffusion Probability Models for online, model-free RL. Unlike traditional policies, DIPO represents the policy as a stochastic process induced by a Differential Equation.

Core Methodology

  1. Diffusion-Based Sampling: To select an action, the agent begins with pure Gaussian noise and iteratively refines it through a reverse Stochastic Differential Equation (SDE) until it converges to a valid action from a potentially complex, multimodal distribution.
  2. The Action Gradient: A significant challenge in applying diffusion models to online RL is the lack of a straightforward policy gradient for optimization. DIPO addresses this by decoupling policy representation from policy improvement. Instead of updating policy parameters directly via rewards, the algorithm updates the actions stored in the replay buffer using an "Action Gradient": $$a \leftarrow a + \eta \nabla_a Q(s, a)$$ By shifting recorded actions toward higher-value regions indicated by the Critic ($Q$), the Diffusion Model can then be trained to fit these improved, high-reward action distributions.
The DIPO training loop. It utilizes an action gradient to improve actions in the dataset, which the diffusion policy then learns to represent.

Experimental Evaluation and Results

The authors evaluated DIPO against state-of-the-art baselines (SAC, TD3, PPO) on the MuJoCo continuous control benchmark (including Ant, HalfCheetah, and Humanoid tasks) and a custom Multi-goal environment.

Key Findings

  • Superior Multimodality: In the Multi-goal task, DIPO successfully learned to visit all target goals with equal probability, whereas unimodal baselines collapsed to a single goal or failed entirely.
  • Benchmark Performance: DIPO achieved the highest scores across all tested MuJoCo tasks. Notably, it demonstrated faster early-stage learning, likely due to the enhanced exploration capabilities provided by the multimodal diffusion representation.
  • Stability: The algorithm proved robust, maintaining high performance across diverse environments using a consistent set of hyperparameters.

Conclusion and Future Directions

DIPO establishes a theoretical and practical foundation for using diffusion models in online RL. While the iterative nature of diffusion sampling introduces higher computational costs during inference compared to simple MLP policies, the gains in expressiveness and exploration are substantial. Future work may involve "distillation" techniques to reduce the number of diffusion steps required, potentially enabling real-time deployment without sacrificing the benefits of multimodal policy representation.

Reference: Yang, L., Huang, Z., et al. (2023). Policy Representation via Diffusion Probability Model for Reinforcement Learning. arXiv:2305.13122v1.

Summary updated

BibTeX
@misc{yang2023policy,
  author = {Long Yang and Zhixiong Huang and Fenghao Lei and Yucun Zhong and Yiming Yang and Cong Fang and Shiting Wen and Binbin Zhou and Zhouchen Lin},
  title = {{Policy Representation via Diffusion Probability Model for Reinforcement Learning}},
  year = {2023},
  eprint = {2305.13122},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.13122},
}
Figure