Contextual Bandits and Optimistically Universal Learning

Moïse Blanchard, Steve Hanneke, Patrick JailletarXiv 2023 · DOI

Abstract

This paper investigates the fundamental limits of learning in contextual bandits when data is non-independent and identically distributed (non-i.i.d.). By exploring the boundaries of universal consistency, the authors demonstrate that for finite action spaces, learning with bandit feedback is possible under the same broad conditions as supervised learning. The study introduces an "optimistically universal" algorithm that adaptively balances generalization and personalization to achieve vanishing regret across a wide class of stochastic processes.

Introduction

In the standard contextual bandit problem, an agent observes a context, selects an action, and receives a reward. The primary challenge lies in the exploration-exploitation trade-off: the agent must try new actions to learn their value while simultaneously choosing known high-reward actions to maximize performance. While most theoretical frameworks assume that contexts arrive in an i.i.d. fashion, real-world environments—such as recommendation systems or dynamic pricing—are often non-stationary and subject to shifts in user behavior or seasonal trends.

This research addresses a foundational question: What are the weakest possible assumptions one can make about context sequences while still guaranteeing universal consistency? Universal consistency implies that an algorithm's average regret, relative to the best fixed policy, converges to zero as time approaches infinity. Specifically, the authors seek an "optimistically universal" learning rule—one that succeeds whenever any learning rule could possibly succeed.

Methodology

The authors utilize the mathematical framework of stochastic processes, categorizing them into classes ($\mathcal{C}_1, \mathcal{C}_2, \mathcal{C}_3$) previously identified in universal learning literature. To prove that learning is possible under these conditions, they propose a novel algorithm designed to navigate the tension between generalization and personalization.

The Dual-Strategy Algorithm

The core of the proposed algorithm is a categorization mechanism based on context frequency. At each time step, the algorithm assesses how many times the current context has appeared previously:

  1. Strategy 0 (Personalization): For contexts that appear frequently (duplicates), the algorithm treats the context as a standalone multi-armed bandit problem. It employs an independent EXP3 learner specifically for that context, ignoring data from other contexts.
  2. Strategy 1 (Generalization): For contexts that are rare or unique, the algorithm employs structural risk minimization. It uses an adversarial bandit algorithm (EXP3.IX) to compete against an expanding, countable set of global policies, leveraging shared information across different contexts.
  3. Adaptive Switching: The algorithm does not commit to a strategy blindly. It uses periodic exploration to estimate the performance of both strategies for specific context categories and adaptively switches to the more effective approach.

Key Insights and Theoretical Results

The Parity of Partial and Full Feedback

One of the paper's most significant findings is that for finite action spaces, the set of learnable processes for contextual bandits (the $\mathcal{C}_2$ class) is identical to that of supervised learning. This suggests that the transition from full feedback to partial (bandit) feedback does not inherently restrict the range of environments in which an agent can learn, provided the action space is limited.

The Impact of Action Space Cardinality

The feasibility of universal learning is highly sensitive to the size of the action space:

  • Finite Actions: Learnable under the $\mathcal{C}_2$ class.
  • Countably Infinite Actions: The learnable class shrinks to $\mathcal{C}_1$, a more restrictive set of processes.
  • Uncountably Infinite Actions: Universal learning is strictly impossible without further assumptions.

Continuity and Reward Constraints

The authors demonstrate that the impossibility of learning in uncountable action spaces can be overcome if the reward function is assumed to be continuous. In such cases, similar actions yield similar rewards, allowing the agent to recover learnability for totally-bounded infinite action spaces. Conversely, if rewards are allowed to be unbounded, learning is only possible for the $\mathcal{C}_3$ class, which is restricted to processes visiting only a finite number of distinct contexts.

Discussion and Limitations

While this work provides a complete theoretical characterization of universal consistency in contextual bandits, it remains primarily asymptotic. The proofs focus on the limit as $T \to \infty$, leaving the derivation of finite-time minimax regret bounds for future research. Furthermore, the proposed optimistically universal algorithms are theoretical constructs; they require tracking infinite policy sets or exact duplicate counts, which presents significant computational challenges for practical implementation.

Despite these limitations, the paper establishes a critical link between process classes, revealing that $\mathcal{C}_2$ processes are essentially $\mathcal{C}_1$ processes with duplicates. This insight provides a rigorous foundation for future work aimed at developing computationally efficient algorithms for non-i.i.d. contextual bandit problems.

Summary updated

BibTeX
@misc{blanchard2023contextual,
  author = {Moïse Blanchard and Steve Hanneke and Patrick Jaillet},
  title = {{Contextual Bandits and Optimistically Universal Learning}},
  year = {2023},
  eprint = {2301.00241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.00241},
}
Figure