Introduction
Multi-Armed Bandit (MAB) problems are a cornerstone of decision-making under uncertainty, where an agent must balance exploring new actions with exploiting known high-reward actions. While standard algorithms excel in stationary environments where reward distributions are fixed, they often struggle in real-world scenarios where rewards are non-stationary—changing over time or depending on the sequence of past actions. This paper introduces a novel Recurrent Bandit Algorithm that leverages Recurrent Neural Networks (RNNs) and a unique "energy regularization" term to maintain robust exploration in highly dynamic environments.
The Challenge of Non-Stationarity
In many practical applications, such as ad-tech or recommendation systems, the environment is rarely static. Two common challenges include:
- Rotting Bandits: The reward of an arm decreases the more frequently it is pulled.
- History-Dependent Rewards: Optimal actions may depend on the specific sequence of past contexts or external temporal shifts (e.g., periodic changes in user preferences).
Standard neural network-based agents often fall into the "overconfidence trap": once they identify a reasonably good arm, the Softmax output collapses toward that action, causing the agent to stop exploring. If the environment shifts and a previously sub-optimal arm becomes the new best choice, the overconfident agent fails to adapt.
The Recurrent Bandit Algorithm
The authors propose a two-part solution to address these challenges:
1. RNN Architecture for Temporal Memory
To model history-dependent rewards, the agent utilizes a Gated Recurrent Unit (GRU). This allows the model to maintain a latent state representing the environment's history. The GRU processes the sequence of past contexts and actions, outputting logits ($z_i$) for each arm. These logits are converted into action probabilities ($p_i$) via a Softmax function.
2. Energy Regularization ($\mathcal{L}_{EC}$)
The core innovation is the introduction of an energy-based regularization term. Drawing an analogy to the Boltzmann distribution, the logits are treated as energy levels. The regularization term minimizes the square of the mean energy: $$\mathcal{L}_{EC} = \left(\sum_{i} p_i z_i\right)^2$$
This term prevents any single action from having a logit significantly higher than the others. Mathematically, it places a hard upper bound on the ratio between the maximum and minimum probabilities assigned to any arm, ensuring the agent always maintains a baseline level of exploration without requiring manual tuning of an $\epsilon$-greedy parameter.
Experimental Benchmarks
The method was evaluated against several challenging synthetic environments designed to test adaptation:
- Time-Dependent MAB: Rewards follow a mirrored sine function, causing the optimal arm to change periodically.
- Wheel Bandit: A contextual problem where the optimal action depends on a 2D context vector. The "Rotating Wheel" variant introduces non-stationarity by rotating these reward regions over time.
- Rotting Bandits: Rewards decay with each pull, forcing the agent to switch arms to maintain performance.
Key Results and Insights
The proposed Energy Regularized RNN demonstrated superior performance across all non-stationary benchmarks compared to traditional baselines like Sliding Window Average (SWA) and state-of-the-art contextual solvers like NeuralLinear.
- Adaptability: In drifting environments (Time-Dependent MAB), the agent successfully tracked the shifting optimal arm, whereas baselines often converged to a sub-optimal average policy.
- Exploration Stability: Ablation studies confirmed that the energy regularization term outperformed standard Softmax smoothing and $\epsilon$-greedy strategies, providing a more principled way to prevent policy collapse.
- Fast Convergence: On the Rotting Bandit task, the model converged to the optimal switching policy significantly faster than specialized frequentist algorithms.
Conclusion and Future Work
By combining the temporal modeling capabilities of RNNs with a novel energy-based constraint, the authors have developed a general-purpose learner for complex bandit problems. While the agent maintains a constant level of exploration—which may lead to slightly higher regret in perfectly stationary environments—its ability to adapt to sudden or gradual shifts makes it highly suitable for real-world dynamic systems. Future work may explore dynamic scaling of the regularization parameter to balance long-term convergence with short-term adaptability.
Summary updated