Fast EXP3 Algorithms

Ryoma Sato, Shinji ItoarXiv 2025 · DOI

Abstract

The EXP3 algorithm is the standard solution for adversarial multi-armed bandits, yet its $O(K)$ per-round computational cost—where $K$ is the number of arms—limits its applicability in large-scale systems. This paper introduces optimized implementations that achieve $O(\log K)$ worst-case and $O(1)$ expected time per round. Crucially, these speedups do not compromise the algorithm's theoretical performance, maintaining the optimal regret coefficient of 2.

Introduction

In the adversarial bandit setting, a learner must choose one of $K$ arms in each round to minimize cumulative regret against the best fixed arm in hindsight. The EXP3 (Exponential-weight algorithm for Exploration and Exploitation) algorithm achieves the minimax optimal regret of $O(\sqrt{TK \ln K})$. However, the traditional implementation requires maintaining and sampling from a probability distribution over all $K$ arms, leading to a linear time complexity per round. For modern applications like recommendation systems with millions of items, this $O(K)$ overhead is prohibitive. This research addresses the challenge: can we accelerate EXP3 without sacrificing regret performance?

Methods

The Binary Tree Approach

The first optimization involves organizing arm weights into a balanced binary tree (segment tree). Each leaf node represents an arm's weight, while internal nodes store the sum of their children's weights. This structure allows for both sampling and weight updates in $O(\log K)$ time.

Sampling an arm in the binary tree approach involves a top-down traversal based on a random value $r$.

As shown in the figure above, sampling is performed by generating a random value $r \in [0, W_G)$ and traversing the tree. If $r$ is less than the left child's weight, the search continues in the left subtree; otherwise, $r$ is decremented by the left child's weight and the search moves to the right. Updates are similarly efficient, requiring a bottom-up propagation from the leaf to the root.

Constant Time via the Alias Method

To achieve $O(1)$ expected time, the authors utilize the Alias Method, a technique for constant-time sampling from discrete distributions. Because the weights in EXP3 change every round, a static Alias table is insufficient. The authors solve this by combining the Alias Method with rejection sampling to correct for weight changes between periodic reconstructions. To prevent computational spikes, a double buffering strategy is employed, where a background process builds the next Alias table while the current one remains in use.

Delayed Parameter Updates

For "anytime" scenarios where the horizon $T$ is unknown, the learning rate $\eta$ must be updated. Standard "doubling tricks" often double the regret constant. The authors propose "delayed updates," synchronizing learning rate adjustments with the $K$-round reconstruction cycle of the Alias table, which preserves the optimal regret constant.

Key Results

The proposed methods significantly outperform previous state-of-the-art fast EXP3 variants. While earlier work by Chewi et al. (2022) achieved $O(\log^2 K)$ complexity, it did so at the cost of doubling the regret coefficient from 2 to 4.

Comparison of EXP3 implementations showing time complexity and regret coefficients.

As summarized in the table above, both the Binary Tree and Alias Method implementations maintain the optimal regret coefficient of 2. For a system with one million arms, the $O(1)$ approach offers a million-fold speedup over the naive implementation while remaining theoretically superior to previous logarithmic attempts.

Conclusion

This work demonstrates that the computational bottlenecks of adversarial bandit algorithms can be overcome through sophisticated data structures. By achieving $O(1)$ expected time per round without increasing regret, these fast EXP3 variants enable the use of optimal adversarial bandit strategies in massive-scale real-world applications. Future research may extend these techniques to other online learning frameworks like Mirror Descent.

Summary updated

BibTeX
@misc{sato2025fast,
  author = {Ryoma Sato and Shinji Ito},
  title = {{Fast EXP3 Algorithms}},
  year = {2025},
  eprint = {2512.11201},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.11201},
}
Figure