Maximum Entropy Reinforcement Learning with Diffusion Policy

Xiaoyi Dong, Jian Cheng, Xi Sheryl Zhang

Introduction

Modern Reinforcement Learning (RL) algorithms, such as Soft Actor-Critic (SAC), typically rely on Gaussian policies for continuous control. While Gaussian distributions are mathematically tractable, they are fundamentally unimodal. This limitation becomes a significant bottleneck in complex environments where multiple optimal or sub-optimal strategies exist. In such "multi-goal" scenarios, a Gaussian policy may attempt to average disparate paths—potentially leading the agent into obstacles—or prematurely collapse onto a single local optimum, severely limiting exploration.

The MaxEntDP Framework

To overcome these limitations, we introduce MaxEntDP (Maximum Entropy Reinforcement Learning with Diffusion Policy). By replacing the standard Gaussian policy with a high-capacity diffusion model, MaxEntDP can represent complex, multi-modal distributions. However, integrating diffusion models into the Maximum Entropy RL framework presents two primary challenges: the lack of an explicit log-probability for entropy calculation and the difficulty of training on a non-stationary Q-function target.

MaxEntDP addresses these through two key technical innovations:

  1. Q-weighted Noise Estimation (QNE): Instead of relying on potentially unstable Q-function gradients, MaxEntDP uses importance sampling. It weights the noise prediction during diffusion training by the exponential of the Q-value, allowing the model to learn the Q-function's shape robustly.
  2. Numerical Integration for Log-Probability: The authors developed a technique to efficiently approximate the log-likelihood of a diffusion policy. By transforming the integration variable to a bounded domain, the agent can calculate the entropy term required for the SAC objective.

Additionally, for environments with bounded action spaces, the framework utilizes Truncated Gaussian Noise to ensure the agent remains within legal operational limits.

Key Insights and Ideas

The core philosophy of MaxEntDP is that expressiveness is exploration. Exploration is not merely the addition of stochastic noise; it is the capacity of a policy to maintain and track multiple promising strategies simultaneously.

Visualization of multi-modal exploration where the agent successfully navigates toward multiple goals.

As shown in the 2D toy environment above, MaxEntDP avoids the "mode collapse" typical of Gaussian policies. By using a diffusion model, the agent can explore all available paths to a goal. Furthermore, the inclusion of the policy entropy term acts as a catalyst, encouraging the model to fill the action space effectively before converging on the most rewarding modes.

Key Results

MaxEntDP was evaluated against standard benchmarks including MuJoCo, AntMaze, and the DeepMind Control Suite.

Comparative performance of MaxEntDP across standard MuJoCo continuous control benchmarks.

In the MuJoCo suite, MaxEntDP consistently outperformed or matched state-of-the-art baselines like SAC, TD3, and MEow (which uses Normalizing Flows). Notably, in the Ant-v3 task, MaxEntDP achieved higher returns with significantly lower variance, demonstrating the stability provided by the Q-weighted weighting scheme. Despite the inherent complexity of diffusion models, the JAX-based implementation ensures competitive training times, such as 5.5 hours for a 1-million step run on HalfCheetah.

Limitations and Future Directions

While MaxEntDP represents a significant step forward, several challenges remain:

  • Inference Latency: The iterative denoising process of diffusion models is slower than the single forward pass of a Gaussian policy, which may impact real-time robotics.
  • Hyperparameter Sensitivity: The temperature coefficient $\beta$, which balances reward and entropy, currently requires manual tuning.
  • Sample Complexity: The increased expressiveness of diffusion policies may require more environment interactions to fully map out complex distributions in certain tasks.

Future work will focus on automating temperature adjustment and optimizing the number of denoising steps to reduce inference overhead.

Summary updated

BibTeX
@inproceedings{dong2025maximum,
  author = {Xiaoyi Dong and Jian Cheng and Xi Sheryl Zhang},
  title = {{Maximum Entropy Reinforcement Learning with Diffusion Policy}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=CpjKXe9rY7},
}
Figure