Bandits with Replenishable Knapsacks: the Best of both Worlds

Martino Bernasconi, Matteo Castiglioni, Andrea Celli, Federico Fusco

Introduction

The classic "Bandits with Knapsacks" (BwK) framework models online decision-making scenarios where an agent seeks to maximize rewards subject to strict resource consumption constraints. A standard example is an online advertising platform with a fixed daily budget: every ad displayed consumes a portion of that budget, and the process halts once the budget is depleted.

However, many real-world environments allow for replenishment. A retail store consumes inventory when selling products but replenishes it through supplier shipments. A high-frequency trader buys and sells assets, causing their cash balance to fluctuate in both directions. To capture these dynamics, this paper introduces Bandits with Replenishable Knapsacks (BwRK), a natural generalization of BwK where actions can have "negative costs"—effectively refilling the budget.

The core challenge in BwRK is designing an algorithm that achieves "best-of-both-worlds" guarantees: it must perform optimally in stochastic environments (where rewards and costs follow fixed distributions) while remaining robust in adversarial environments (where an opponent actively manipulates the inputs to thwart the algorithm).

Methodology: A Primal-Dual Template

To tackle the BwRK problem, the authors propose a flexible Primal-Dual template. This approach frames the optimization as a dynamic game between two internal players:

  1. The Primal Player: Aims to select actions that maximize immediate rewards plus a "bonus" for conserving or replenishing resources.
  2. The Dual Player: Manages a set of penalties (Lagrange multipliers) for each resource. As a resource dwindles, the dual player increases the penalty for consuming it, forcing the primal player to adopt a more conservative strategy or choose replenishing actions.

Key Algorithmic Innovations

  • The "Void Action": The framework introduces a safety mechanism. If any resource budget drops below a critical threshold, the algorithm automatically executes a "void action" (analogous to closing a store for a day to restock) that is guaranteed to replenish resources.
  • Weakly Adaptive Regret Minimizers: Standard online learning algorithms often fail to adapt when the optimal strategy shifts abruptly, such as during a budget crisis. By employing "weakly adaptive" algorithms (like Online Gradient Descent or Fixed Share) for the dual player, the system can react swiftly to sudden resource depletion.
  • Handling Unknown Replenishment: The template is highly robust, functioning effectively even if the learner does not know in advance exactly how much a void action will replenish the budget.

Applications in Economic Modeling

Because this is a theoretical machine learning paper, it does not rely on standard empirical datasets (like image or text corpora). Instead, the authors validate their framework by applying it to three modeled economic scenarios:

  1. General BwRK: A synthetic setup featuring $K$ actions and $m$ resources.
  2. Inventory Management: A scenario where a shopkeeper must decide between opening for business (consuming stock to gain revenue) or visiting a supplier (replenishing stock).
  3. Bilateral Trade: A market-making scenario where a merchant sets prices for buyers and sellers. Buying goods increases inventory but depletes cash, while selling does the reverse.

Key Results and Theoretical Guarantees

The introduction of replenishment fundamentally changes the theoretical baseline. Unlike standard BwK where resources inevitably run out, a strong BwRK strategy can potentially operate indefinitely. The paper provides several landmark guarantees:

  • Adversarial Robustness: The authors provide the first positive results for BwRK in adversarial settings, proving a constant competitive ratio ($\alpha$). This guarantees that even against a malicious environment, the algorithm secures a fixed fraction of the best possible reward, provided the initial budget is sufficiently large ($B=\Omega(T)$) or the per-round replenishment is a positive constant.
  • Stochastic Efficiency: In stable, stochastic environments, the algorithm achieves an instance-independent regret bound of $\tilde{\mathcal{O}}(T^{1/2})$. This is the theoretical gold standard for online learning, demonstrating that the algorithm's average error vanishes rapidly as the time horizon ($T$) grows, regardless of the gap between the best and second-best actions.
  • Universality: The proposed template is modular. Practitioners can plug in existing primal and dual regret minimizers tailored to specific replenishment problems and immediately inherit these theoretical guarantees.

Limitations and Future Directions

While the framework provides robust theoretical foundations, the authors note a few limitations:

  • Negative Rewards: The current proofs assume rewards are non-negative (bounded in $[0, 1]$). In adversarial settings, if an action can result in a strict loss (negative reward), the existing proof techniques break down. Handling adversarial negative rewards remains an open problem.
  • Knowledge of the Void Action: The algorithm relies on the existence of a known "void action" that safely replenishes resources. In complex, real-world systems, identifying a single action or combination of actions that guarantees replenishment may be difficult.
  • Simplified Models: The inventory and trade applications, while illustrative, are simplified abstractions. Future research could extend this framework to more intricate supply chain networks or multi-agent market simulations.

Summary updated

BibTeX
@inproceedings{bernasconi2024bandits,
  author = {Martino Bernasconi and Matteo Castiglioni and Andrea Celli and Federico Fusco},
  title = {{Bandits with Replenishable Knapsacks: the Best of both Worlds}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=yBIJRIYTqa},
}
Figure