Provable Optimal Algorithms for Generalized Linear Contextual Bandits

Lihong Li, Yu Lu, Dengyong ZhouarXiv 2017

Abstract

Contextual bandits are widely used in Internet services from news recommendation to advertising, and to Web search. Generalized linear models (logistical regression in particular) have demonstrated stronger performance than linear models in many applications where rewards are binary. However, most theoretical analyses on contextual bandits so far are on linear bandits. In this work, we propose an upper confidence bound based algorithm for generalized linear contextual bandits, which achieves an $\tilde{O}(\sqrt{dT})$ regret over $T$ rounds with $d$ dimensional feature vectors. This regret matches the minimax lower bound, up to logarithmic terms, and improves on the best previous result by a $\sqrt{d}$ factor, assuming the number of arms is fixed. A key component in our analysis is to establish a new, sharp finite-sample confidence bound for maximum-likelihood estimates in generalized linear models, which may be of independent interest. We also analyze a simpler upper confidence bound algorithm, which is useful in practice, and prove it to have optimal regret for certain cases.

Introduction

Contextual bandit algorithms serve as the decision-making engines for modern digital ecosystems, powering everything from personalized news feeds to real-time ad auctions. In these settings, an agent selects an action (an arm) based on observed context to maximize a cumulative reward. While linear models are the traditional theoretical benchmark due to their mathematical tractability, they often fall short in real-world applications where rewards are binary, such as a user clicking or not clicking a link.

Generalized Linear Models (GLMs), particularly logistic regression, are the industry standard for these binary outcomes. However, a significant gap has existed between the practical success of GLMs and their theoretical guarantees. Previous analyses of GLM bandits often resulted in "loose" regret bounds or required computationally prohibitive projection steps. This research bridges that gap by introducing algorithms that achieve the minimax optimal regret bound, effectively reaching the physical limits of learning efficiency for this class of problems.

The Challenge of GLM Bandits

The primary metric for evaluating bandit algorithms is regret: the difference between the reward the algorithm actually collected and the reward it could have collected by always choosing the best possible arm. For a problem with $d$ features and $T$ time steps, the theoretical goal is to minimize this regret.

Previous state-of-the-art bounds for GLM bandits were typically $O(d\sqrt{T})$. However, the known minimax lower bound—the absolute best any algorithm could theoretically do—is $\Omega(\sqrt{dT})$. The discrepancy of a $\sqrt{d}$ factor is significant in high-dimensional settings where $d$ (the number of features) can be in the thousands or millions. Furthermore, existing algorithms often relied on complex projection steps to keep parameter estimates within a bounded region, which is difficult to implement efficiently in practice.

Mathematical Innovation: Sharp MLE Confidence Bounds

The core contribution of this work is a new mathematical proof regarding the Maximum Likelihood Estimator (MLE) for GLMs. In classical statistics, the MLE is known to be "asymptotically normal," meaning it behaves predictably as the sample size approaches infinity. However, bandit algorithms must make decisions with limited, finite samples.

This paper establishes a sharp finite-sample confidence bound (Theorem 1). The authors prove that the error in the estimated parameters is small in every direction of the feature space, not just on average. This non-asymptotic normality result allows for the construction of tighter confidence ellipsoids around the estimated parameters, which is the key to shaving off the $\sqrt{d}$ factor in the regret analysis.

Proposed Algorithms

The paper introduces two distinct approaches to the GLM bandit problem:

1. UCB-GLM (Algorithm 1)

This is a practical, intuitive algorithm based on the "Optimism in the Face of Uncertainty" principle. For each arm, it calculates a reward estimate using the current MLE and adds an exploration bonus based on the uncertainty of that estimate. While simple and highly effective in empirical settings, proving its optimality for a small number of arms remains a complex theoretical challenge.

2. SupCB-GLM (Algorithm 3)

To achieve the provably optimal regret bound, the authors developed SupCB-GLM. This algorithm utilizes a "staged" approach, grouping trials into specific blocks. By carefully managing which data is used to update the model at each stage, the algorithm ensures statistical independence between the contexts encountered and the rewards previously observed. This independence is what allows the authors to mathematically guarantee the $\tilde{O}(\sqrt{dT})$ regret rate.

Key Results and Impact

The theoretical results presented in this paper represent a significant advancement in bandit theory:

  • Minimax Optimality: SupCB-GLM achieves a regret of $\tilde{O}(\sqrt{dT \log K})$, matching the minimax lower bound. This proves that no algorithm can fundamentally outperform this approach for GLMs when the number of arms $K$ is fixed.
  • Efficiency Gains: By improving the regret bound by a factor of $\sqrt{d}$, the authors demonstrate that learning in high-dimensional GLMs is more efficient than previously thought. This has direct implications for how quickly a recommendation system can "learn" a user's preferences.
  • Theoretical Validation of Practice: Theorem 1 provides a rigorous mathematical foundation for the heuristic confidence bounds that practitioners have used for years, confirming that these intuitions are grounded in sound statistical principles.

Limitations and Future Directions

While the paper solves a major theoretical hurdle, it opens new avenues for research:

  1. Computational Scaling: Both proposed algorithms require inverting a $d \times d$ covariance matrix and solving an MLE optimization at each step. In massive-scale systems, this is computationally expensive. Future work may focus on integrating first-order optimization methods (like online gradient descent) to maintain these optimal bounds with less overhead.
  2. The Small K Gap: It remains an open question whether the simpler, more practical UCB-GLM can be proven to achieve the same $\sqrt{dT}$ rate as the staged SupCB-GLM when the number of actions is small.
  3. Randomized Exploration: The current work focuses on deterministic UCB methods. Exploring whether randomized strategies, such as Thompson Sampling, can achieve similar optimal rates for GLMs is a promising next step.

Summary updated

BibTeX
@misc{li2017provable,
  author = {Lihong Li and Yu Lu and Dengyong Zhou},
  title = {{Provable Optimal Algorithms for Generalized Linear Contextual Bandits}},
  year = {2017},
  eprint = {1703.00048},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1703.00048},
}
Figure