A New Softmax Operator for Reinforcement Learning

Kavosh Asadi, Michael L. LittmanarXiv 2016

Introduction

In reinforcement learning (RL), agents must balance the exploitation of known high-reward actions with the exploration of potentially better alternatives. This trade-off is often managed using a "softmax" operator, which converts action-value estimates into a probability distribution. For decades, the Boltzmann operator has served as the standard choice. However, this paper identifies a fundamental theoretical flaw: the Boltzmann operator is not a non-expansion. This property is critical for ensuring that value-based learning algorithms converge to a unique fixed point.

The Boltzmann Instability

The authors demonstrate that the Boltzmann operator can lead to unstable behavior, including oscillations and multiple fixed points, even in extremely simple environments. To illustrate this, they propose a 2-state Markov Decision Process (MDP) where action selection based on the Boltzmann distribution prevents convergence.

A simple 2-state MDP designed to highlight the convergence failures of the Boltzmann operator.

In this environment, applying the Boltzmann operator results in a bifurcation of fixed points. As shown in the figure below, for certain parameter ranges, there are multiple stable values for the same state-action pair, meaning the agent's estimates may never settle on a single optimal value.

Bifurcation plots for the 2-state MDP showing that the Boltzmann operator can result in multiple distinct fixed points for action values.

The Mellowmax Operator

To address these issues, the authors introduce Mellowmax ($mm_\omega$), a new differentiable softmax operator defined as:

$$mm_\omega(\mathbf{X}) = \frac{\log(\frac{1}{n} \sum_{i=1}^n e^{\omega x_i})}{\omega}$$

Key Technical Properties

  1. Non-expansion: Mellowmax is proven to be a non-expansion under the infinity norm, guaranteeing convergence in algorithms like SARSA and Generalized Value Iteration (GVI).
  2. Smoothness: It is fully differentiable, making it compatible with policy gradient methods.
  3. Versatility: By tuning the parameter $\omega$, it can interpolate between a hard maximum, an average, and a minimum.

Furthermore, the authors derive an associated policy that maintains the Boltzmann form but utilizes an adaptive "temperature" parameter $\beta$ calculated for each state to ensure consistency with the Mellowmax value.

Experimental Results

The operator was evaluated across several domains to test its reliability and performance:

  • Convergence Reliability: In a test of 200 random MDPs, the Boltzmann operator failed to terminate in 4% of cases and exhibited multiple fixed points in 1.5% of cases. In contrast, Mellowmax converged 100% of the time.
  • Taxi Domain: In a complex grid-world task, Mellowmax achieved higher average rewards than epsilon-greedy and matched or exceeded Boltzmann's performance without its inherent instability.
  • Lunar Lander: In a deep RL setting using REINFORCE, Mellowmax outperformed the standard Boltzmann policy at its peak performance across various hyperparameter settings.

Conclusion

Mellowmax provides a mathematically sound alternative to the Boltzmann operator. By ensuring the non-expansion property, it eliminates the risk of divergence and multiple fixed points in value-based learning while remaining smooth and tunable. This makes it a robust choice for both tabular and deep reinforcement learning applications.

Summary updated

BibTeX
@misc{asadi2016new,
  author = {Kavosh Asadi and Michael L. Littman},
  title = {{A New Softmax Operator for Reinforcement Learning}},
  year = {2016},
  eprint = {1612.05628},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.05628},
}
Figure