q-Munchausen Reinforcement Learning

Lingwei Zhu, Zheng Chen, Eiji Uchibe, Takamitsu MatsubaraarXiv 2022

Abstract

The recently successful Munchausen Reinforcement Learning (M-RL) features implicit Kullback-Leibler (KL) regularization by augmenting the reward function with the logarithm of the current stochastic policy. Though significant improvement has been shown with the Boltzmann softmax policy, when the Tsallis sparsemax policy is considered, the augmentation leads to a flat learning curve for almost every problem considered. We show that it is due to the mismatch between the conventional logarithm and the non-logarithmic (generalized) nature of Tsallis entropy. Drawing inspiration from the Tsallis statistics literature, we propose to correct the mismatch of M-RL with the help of $q$-logarithm/exponential functions. The proposed formulation leads to implicit Tsallis KL regularization under the maximum Tsallis entropy framework. We show such formulation of M-RL again achieves superior performance on benchmark problems and sheds light on more general M-RL with various entropic indices $q$.

Introduction

Reinforcement Learning (RL) agents often employ entropy regularization to encourage exploration. While standard RL typically uses Shannon entropy, leading to "softmax" policies, many applications benefit from Sparse Policies (via Tsallis entropy) that assign zero probability to suboptimal or unsafe actions. Munchausen RL (M-RL) is a recent advancement that stabilizes learning by adding a "Munchausen bonus"—the logarithm of the agent's own policy—to the reward function. This acts as implicit KL regularization.

However, a significant challenge arises: when the Munchausen bonus is applied to sparse policies, agents fail to learn, resulting in flat learning curves. This paper identifies the root cause as a mathematical mismatch between the standard natural logarithm ($\ln$) and the power-law nature of Tsallis entropy.

Methods: Tsallis Entropy Munchausen DQN (TEMDQN)

To resolve this mismatch, the authors introduce TEMDQN. The core innovation is replacing the standard natural logarithm with the $q$-logarithm ($\ln_q$) and $q$-exponential functions from Tsallis statistics.

The $q$-logarithm is defined as: $$\ln_q(x) = \frac{x^{1-q}-1}{1-q}$$ When $q=1$, this recovers the standard $\ln(x)$. By utilizing a specific $2-q$ duality from statistical physics, TEMDQN ensures the Munchausen augmentation correctly performs "Tsallis KL regularization." This formulation provides an averaging effect over past value estimates, smoothing updates and enhancing stability for sparse agents.

Experimental Results

The authors evaluated TEMDQN across several benchmarks, including OpenAI Gym, MiniGrid, and Atari 2600.

MiniGrid and Gridworld Performance

In MiniGrid environments like "Empty-16x16" and "Dynamic-Obstacles-16x16," TEMDQN demonstrated significantly faster convergence compared to standard TsallisDQN and other baselines like SQL and MoVI. Crucially, it succeeded where the naive Munchausen implementation (MDQN $\ln \pi$) failed, which typically produced flat learning curves.

Learning curves on MiniGrid environments showing TEMDQN's superior convergence speed and stability compared to naive Munchausen RL and other baselines.

Atari Benchmarks

On full-scale Atari 2600 games, TEMDQN integrated with a distributional RL backbone (QR-DQN) outperformed standard sparse agents. In games requiring significant exploration, such as Freeway and Seaquest, TEMDQN maintained high performance while the naive log-augmented version remained at near-zero return.

Performance of TEMDQN compared to standard Munchausen RL (MDQN ln pi) and TsallisDQN across five Atari benchmarks, highlighting the resolution of the learning mismatch.

Conclusion

The "q-Munchausen" framework generalizes Munchausen RL to the Tsallis entropy family. By aligning the mathematical "decoder" (the log function) with the policy type, TEMDQN provides a robust safety net for sparse policies, making them as stable as their softmax counterparts. Future work includes exploring non-closed-form solutions for arbitrary $q$ values and further hyperparameter optimization.

Summary updated

BibTeX
@misc{zhu2022q,
  author = {Lingwei Zhu and Zheng Chen and Eiji Uchibe and Takamitsu Matsubara},
  title = {{q-Munchausen Reinforcement Learning}},
  year = {2022},
  eprint = {2205.07467},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.07467},
}
Figure