Model Selection in Contextual Stochastic Bandit Problems

Aldo Pacchiano, My Phan, Yasin Abbasi-Yadkori, Anup Rao, Julian Zimmert, Tor Lattimore, Csaba Szepesvári

TL;DR

This paper introduces a generic "smoothing" wrapper that allows standard stochastic bandit algorithms to be combined using adversarial "master" algorithms (like CORRAL) for on-the-fly model selection. This plug-and-play approach achieves optimal $O(\sqrt{T})$ regret across various complex environments—like unknown dimensions or misspecified models—without requiring researchers to manually rewrite the underlying base algorithms.

The Challenge of Model Selection

In bandit problems and reinforcement learning (RL), practitioners often have a toolbox of different algorithms or an algorithm with various hyperparameters (such as exploration rates or assumed feature dimensions). Model selection is the challenge of figuring out which of these "base" algorithms is best for the current environment while actively interacting with it.

Historically, researchers have used a "master" algorithm to evaluate and select the base algorithms. However, state-of-the-art master algorithms (like CORRAL) require the base algorithms to accept importance-weighted feedback. This creates a massive bottleneck: standard algorithms like UCB or LinUCB cannot be used out of the box. Researchers must manually re-derive their confidence intervals and regret proofs to handle weighted rewards. The authors tackle this gap by asking: Can we build a universal wrapper that lets any standard base algorithm work with these master algorithms without altering their internal math?

A Novel Smoothing Wrapper

The authors develop a Master-Base Algorithm Abstraction utilizing a novel Smoothing Wrapper.

Instead of forcing base algorithms to process importance-weighted rewards, the wrapper acts as a translator between the master and the base. The wrapper operates in two steps at each round:

  1. Update: It plays the base algorithm normally and uses the standard, unweighted reward to update the base's internal state.
  2. Replay & Report: It randomly selects a past policy generated by the base algorithm, plays it, and sends that unweighted reward back to the master algorithm.

Why does this work? Master algorithms require the base algorithms to be "stable," meaning their instantaneous regret shouldn't spike wildly. By randomly replaying past policies, the wrapper "smoothes" out the base algorithm's performance, guaranteeing that its expected instantaneous regret is non-increasing over time. This satisfies the master algorithm's mathematical requirements without touching a single line of the base algorithm's core logic.

Key Insights and Theoretical Limits

  • Plug-and-Play Model Selection: You no longer need to custom-build bandit algorithms to do model selection. The smoothing wrapper allows researchers to take off-the-shelf algorithms and immediately ensemble them.
  • The $O(\sqrt{T})$ Barrier: One might hope that if the best base algorithm is incredibly fast and achieves $O(\log T)$ regret, the model selection process will eventually match that. The authors prove a lower bound showing this is impossible: the sheer cost of figuring out which algorithm is best will always saddle the system with at least $\Omega(\sqrt{T})$ regret in the worst case.
  • Knowledge is a Prerequisite for Optimality: To get the absolute best performance out of the master algorithm, it must know the theoretical regret rate of the optimal base algorithm to tune its learning rate. Without this prior knowledge, any master algorithm will suffer worse regret.
  • Simultaneous Tuning: Because the wrapper is so flexible, the master algorithm can tune multiple unknown factors at once (e.g., searching for the unknown dimension of a feature space and the unknown misspecification error simultaneously), which previous specialized algorithms could not do.

Empirical Validation and Results

The authors evaluate their methods on synthetic environments to validate the theoretical claims.

Synthetic Contextual Bandits: They tested 50-arm environments with both linear and non-linear reward structures to see if the master algorithm could correctly choose between LinUCB and standard UCB.

Empirical validation on synthetic contextual bandits.

As shown above, the CORRAL master successfully identifies the correct base. If the environment has linear rewards, it shifts weight to LinUCB; if rewards are non-linear, it shifts weight to standard UCB, effectively matching the performance of the optimal choice.

Reinforcement Learning (River Swim): The authors also tested the smoothing wrapper on a classic Markov Decision Process (MDP) environment, comparing $\epsilon$-greedy, UCRL2, and PSRL.

Performance in the River Swim RL environment.

The Smooth Corral RL algorithm successfully identifies the best-performing base algorithm in the RL setting, maintaining flat regret that matches the optimal baseline.

Theoretical Guarantees

  • Using CORRAL with the smoothing wrapper achieves the optimal $O(\sqrt{T})$ regret, provided the optimal base's regret rate is known.
  • Misspecified Linear Bandits: Achieves $\tilde{O}(d\sqrt{T} + \epsilon_*\sqrt{dT})$ regret without needing to know the true misspecification error $\epsilon_*$ beforehand.
  • Unknown Dimensions: For linear bandits where the true feature dimension $d_*$ is unknown, the algorithm achieves $\tilde{O}(d_*\sqrt{T})$ regret, scaling only with the true dimension rather than the maximum possible dimension.

Limitations and Future Work

The most significant limitation—which the authors prove is mathematically unavoidable in the general case—is that the CORRAL master needs to know the regret bound of the optimal base algorithm to set its learning rate optimally. If the constant of the regret is unknown, they suggest falling back to EXP3.P, which has slightly worse bounds but requires less prior knowledge.

Additionally, the smoothing wrapper requires storing and uniformly sampling from all past policies of the base algorithms. While trivial for simple bandits, this could become memory-intensive for complex, deep-learning-based contextual bandits or RL feature maps. Future work could explore whether specific, highly structured environments might allow for bypassing the $\Omega(\sqrt{T})$ barrier or the need for prior knowledge of the base regret.

Summary updated

BibTeX
@inproceedings{pacchiano2020model,
  author = {Aldo Pacchiano and My Phan and Yasin Abbasi-Yadkori and Anup Rao and Julian Zimmert and Tor Lattimore and Csaba Szepesvári},
  title = {{Model Selection in Contextual Stochastic Bandit Problems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=pHMPI8eNnc9},
}
Figure