Resourceful Contextual Bandits

Ashwinkumar Badanidiyuru, John Langford, Aleksandrs SlivkinsarXiv 2014

Abstract

We study contextual bandits with ancillary constraints on resources, which are common in real-world applications such as choosing ads or dynamic pricing of items. We design the first algorithm for solving these problems that handles constrained resources other than time, and improves over a trivial reduction to the non-contextual case. We consider very general settings for both contextual bandits (arbitrary policy sets) and bandits with resource constraints (bandits with knapsacks), and prove a regret guarantee with near-optimal statistical properties.

Introduction

In the standard contextual bandit setting, a learner observes a context (e.g., a user profile), selects an action (e.g., an advertisement), and receives a reward (e.g., a click). The objective is to maximize the cumulative reward over a fixed time horizon. However, many practical scenarios involve finite resources beyond just time. For instance, a digital advertiser operates under a daily budget, and an e-commerce platform has limited inventory. These constraints transform the problem into a "Bandits with Knapsacks" (BwK) scenario, but with the added complexity of side information (contexts).

This paper introduces the Resourceful Contextual Bandit (RCB) framework, bridging the gap between contextual bandits and BwK. Prior to this work, algorithms either ignored budgets or failed to scale efficiently with the complexity of the policy space. We provide a new algorithm, Mixture Elimination, which achieves regret that scales logarithmically with the number of policies, offering an exponential improvement over previous naive reductions.

The Resourceful Contextual Bandit Framework

The RCB problem is defined by a set of actions $K$, a set of resources $d$, and a policy class $\Pi$. In each round $t$:

  1. A context $x_t$ is revealed.
  2. The algorithm chooses an action $a_t$.
  3. A reward $r_t$ and a resource consumption vector $c_t \in [0, 1]^d$ are observed.
  4. The process terminates if any resource budget $B_i$ is exhausted or the time horizon $T$ is reached.

The challenge lies in the trade-off: an action might yield a high immediate reward but consume a disproportionate amount of a scarce resource. A "resourceful" algorithm must learn to reserve limited resources for contexts where they provide the highest relative value.

The Mixture Elimination Algorithm

The core of our approach is the Mixture Elimination algorithm. Unlike traditional bandit algorithms that search for a single optimal "arm" or policy, resourceful bandits often require a distribution (mixture) over policies to balance rewards and resource consumption optimally.

Key Components:

  • Linear Programming Relaxation: We model the optimal strategy as a distribution over policies. By solving a linear program (LP) based on current estimates of rewards and costs, the algorithm identifies the most promising mixtures.
  • Confidence Regions: The algorithm maintains high-confidence intervals for the expected reward and resource consumption of every policy in $\Pi$.
  • Policy Pruning: In each epoch, the algorithm eliminates any policy distribution that is statistically guaranteed to be suboptimal. This pruning ensures the search space narrows as more data is collected.
  • Balanced Exploration: To refine estimates, the algorithm selects a distribution that ensures sufficient exploration across all relevant actions, preventing "data starvation" for any specific policy.

Theoretical Guarantees

The primary contribution of this work is a rigorous regret analysis. We prove that Mixture Elimination achieves an expected total reward: $$REW \ge OPT(\Pi) - O\left(\left(1 + \frac{OPT(\Pi)}{B_{min}}\right) \sqrt{dKT \log(dKT|\Pi|)}\right)$$ where $B_{min}$ is the minimum initial budget across all resources.

Key Insights:

  1. Logarithmic Scaling: The regret scales with $\sqrt{\log |\Pi|}$. This allows the algorithm to compete against exponentially large policy sets, a critical requirement for complex real-world applications.
  2. The "Hopeless" Regime: We identify a fundamental limit: if the total potential reward is small relative to the budget and time horizon ($OPT \le B \le \sqrt{KT}/2$), no algorithm can significantly outperform a random strategy.
  3. Dynamic Pricing: The framework naturally extends to continuous action spaces like dynamic pricing. By discretizing the price space and applying a "skipping" mechanism to match expected consumption, we achieve near-optimal regret of $O((TB)^{1/3} \log(TB|\Pi|))$.

Conclusion

Resourceful Contextual Bandits provide a robust framework for decision-making under constraints. While Mixture Elimination provides strong theoretical guarantees, it is an information-theoretic algorithm that may be computationally expensive for very large policy sets. Future work involves integrating these techniques with efficient policy oracles to enable real-time deployment in large-scale systems.

Summary updated

BibTeX
@misc{badanidiyuru2014resourceful,
  author = {Ashwinkumar Badanidiyuru and John Langford and Aleksandrs Slivkins},
  title = {{Resourceful Contextual Bandits}},
  year = {2014},
  eprint = {1402.6779},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1402.6779},
}
Figure