Contextual Bandits with Packing and Covering Constraints: A Modular Lagrangian Approach via Regression

Aleksandrs Slivkins, Dylan J. Foster, Sankararaman, Karthik Abinav, Foster, Dylan J. · DOI

TL;DR

This paper introduces the first computationally efficient, regression-based algorithm for contextual bandits with both packing and covering constraints. By elegantly combining Lagrangian duality with the SquareCB algorithm, the authors achieve statistically optimal regret bounds and provide the first vanishing-regret guarantees for non-stationary "switching" environments.

What Problem Does This Paper Address?

In the classic Contextual Bandit problem, an agent observes a context (like a user profile), chooses an action (an ad to show), and receives a reward. Bandits with Knapsacks (BwK) adds a layer of complexity: actions also consume limited resources (like a daily budget).

The authors tackle a generalized version called Contextual Bandits with Linear Constraints (CBwLC). This model moves beyond simple "don't run out of money" (packing) constraints to include:

  1. Covering Constraints: "You must spend at least $X$ amount" or "You must show this ad at least $Y$ times."
  2. Resource Replenishment: Actions can have negative consumption (e.g., a task that earns money instead of spending it).
  3. General Oracles: Moving away from computationally expensive "classification oracles," the authors seek a solution using "regression oracles"—practical tools that simply predict rewards and resource costs based on context.

Methods

The paper proposes a framework called LagrangeCBwLC, which is built on two primary pillars:

  • Lagrangian Game Theory: The problem is framed as a repeated zero-sum game between two players. The "Primal" player chooses arms to maximize a Lagrangian-relaxed reward, while the "Dual" player chooses weights for the constraints to penalize violations.
  • SquareCB Integration: For the Primal player, the authors adapt SquareCB, a popular regression-based algorithm. It uses a technique called inverse gap weighting to balance exploration and exploitation based on the predictions of the regression oracle.

The beauty of this approach is its modularity. The framework provides a "theoretical interface" where you can plug in any primal bandit algorithm and any dual learning algorithm (like Hedge or Fixed-Share) as long as they meet certain regret requirements.

Datasets

As a theoretical machine learning paper, it does not evaluate on specific empirical datasets. Instead, it provides mathematical proofs of performance across general classes of problems. It does, however, define a new benchmark for non-stationary environments called the Pacing Benchmark, which evaluates how well an algorithm keeps up with a changing environment by aiming for uniform resource consumption over time.

Key Insights and Ideas

  • The Power of Modularity: By decoupling the constraint management (the Lagrangian part) from the contextual learning (the SquareCB part), the authors solved a complex, multi-constrained problem using two well-studied building blocks.
  • Beyond Hard-Stopping: Traditional BwK algorithms usually "die" (stop) the moment a constraint is violated. This paper’s approach allows the algorithm to continue until the end of the time horizon ($T$), which is essential for handling covering constraints that might only be satisfied late in the process.
  • Side-stepping Impossibility: In adversarial (non-stationary) environments, it is mathematically impossible to achieve "vanishing regret" against the best fixed policy. The authors bypass this by identifying the "Pacing Benchmark"—a fairer, more realistic target for changing environments.

Key Results

  • Statistically Optimal Regret: Under a mild "non-degeneracy" assumption (Slater’s condition), the algorithm achieves $O(\sqrt{T})$ outcome-regret. This is the "gold standard" in bandit theory, matching the best possible rates for unconstrained bandits.
  • General Case Performance: Even without the non-degeneracy assumption, the algorithm guarantees $O(T^{3/4})$ regret.
  • First for Switching Environments: The paper provides the first vanishing-regret bounds for environments that "switch" their underlying distributions a limited number of times ($S$).
  • Computational Efficiency: The algorithm is "oracle-efficient," meaning its runtime is dominated by standard regression calls, making it practical for real-world implementation.

Limitations and Future Work

  • Known Margin Requirement: The most optimal results ($O(\sqrt{T})$) currently require the algorithm to know the "feasibility margin" ($\zeta$) of the constraints in advance. While the authors mention concurrent work attempting to relax this, it remains a technical hurdle for a fully "parameter-free" version.
  • Switching Sensitivity: While the algorithm handles environment switches, the regret bounds depend on the number of switches ($S$). Future work could focus on improving this dependence, particularly when changes are small in magnitude rather than abrupt.
  • General Regret Bound: The $T^{3/4}$ bound for the general case is theoretically sound but leaves room for improvement toward the $T^{1/2}$ mark seen in the constrained case.

Summary updated

BibTeX
@inproceedings{slivkins2023contextual,
  author = {Aleksandrs Slivkins and Dylan J. Foster and Sankararaman, Karthik Abinav and Foster, Dylan J.},
  title = {{Contextual Bandits with Packing and Covering Constraints: A Modular Lagrangian Approach via Regression}},
  booktitle = {Conference on Learning Theory},
  year = {2023},
  url = {https://openreview.net/forum?id=bgQr8Vx8HY},
}
Figure