Abstract
Online Learning with Knapsacks (BwK) models decision-making under uncertainty where an agent seeks to maximize rewards subject to strict, long-term resource constraints. Historically, algorithms for BwK have been specialized for either stochastic or adversarial environments, with little overlap in performance guarantees. This paper introduces a novel primal-dual meta-algorithm that achieves "best-of-both-worlds" performance. It provides optimal regret in stochastic settings and a groundbreaking constant competitive ratio in adversarial settings, all while remaining robust to non-stationary inputs. By operating over strategy mixtures, the framework recovers strong duality even in non-convex settings, offering a modular solution for complex constrained optimization problems.
Introduction
In many real-world online systems, agents must make sequential decisions to maximize utility while adhering to rigid resource budgets. A classic example is online advertising: an advertiser bids on ad slots to maximize clicks (reward) but is limited by a fixed daily budget (resource). This problem is formally known as Bandits with Knapsacks (BwK).
Traditionally, the BwK literature has been divided into two distinct silos:
- Stochastic Environments: Rewards and costs are drawn from stable, unknown probability distributions. The goal is to minimize "regret"—the difference between the algorithm's performance and that of the optimal stationary policy.
- Adversarial Environments: Rewards and costs are chosen by a malicious adversary. In this setting, sublinear regret is often impossible, so researchers focus on the "competitive ratio," comparing the algorithm's performance to the best fixed strategy in hindsight.
Until now, algorithms were specialized for one setting or the other. Furthermore, adversarial BwK algorithms typically suffered from competitive ratios that degraded logarithmically with time ($T$) and the number of resources ($m$). This paper bridges this gap, providing a single algorithm that handles both environments optimally.
The Primal-Dual Framework
The authors propose a meta-algorithm based on a primal-dual optimization framework. In this setup, the problem is viewed as a game between a "primal" player (who attempts to maximize rewards) and a "dual" player (who penalizes the primal player for resource consumption using Lagrange multipliers).
Strategy Mixtures and Strong Duality
A significant hurdle in online learning is non-convexity. Real-world reward and cost functions are often messy and non-compact, which typically breaks the mathematical tools used for convex optimization. The authors overcome this by shifting the optimization from specific actions to strategy mixtures—probability distributions over the action space. By lifting the problem into this space, they guarantee "strong duality" for the Lagrangian relaxation, allowing the use of powerful convex optimization techniques regardless of the underlying function's shape.
Modular Architecture
The framework is designed as a modular wrapper. It pairs a primal regret minimizer (responsible for learning high-reward actions) with a dual regret minimizer (such as Online Mirror Descent, which learns the optimal penalties for budget consumption). This "plug-and-play" architecture allows researchers to convert any unconstrained online learning solver into a budget-constrained solver.
Theoretical Guarantees
The algorithm provides robust guarantees across three primary environmental types without requiring prior knowledge of which environment it is operating in:
- Adversarial Settings: In the regime where the budget grows linearly with time ($B = \Omega(T)$), the algorithm achieves a constant competitive ratio of $\alpha = 1/\rho$ (where $\rho$ is the per-iteration budget). This is the first constant-factor guarantee for adversarial BwK in this regime, improving upon previous $O(\log m \log T)$ bounds.
- Stochastic Settings: The algorithm matches the performance of specialized stochastic solvers, achieving an optimal regret bound of $O(\frac{1}{ ho} \sqrt{T \log(mT/\delta)})$.
- Non-Stationary Settings: The framework is robust to "adversarial corruptions," where the data is mostly i.i.d. but contains some malicious noise. The performance degrades gracefully based on the total variation distance from a stable distribution.
Applications
The versatility of the framework is demonstrated through two complex applications:
- Repeated Stackelberg Security Games: The algorithm can optimally allocate defensive resources against strategic attackers when the defender's total budget is strictly capped over time.
- Budget-Pacing in First-Price Auctions: The paper provides the first theoretical guarantees for budget pacing in repeated first-price auctions without requiring structural assumptions about the inputs. This is a significant advancement over previous work, which was largely restricted to second-price auction formats.
Conclusion and Future Work
This research provides a unified approach to Online Learning with Knapsacks, proving that one does not need to sacrifice stochastic optimality to achieve adversarial robustness. By leveraging strategy mixtures and primal-dual dynamics, the authors provide a framework that is both theoretically powerful and modular.
A remaining challenge lies in computational efficiency for specific complex settings. For instance, in continuous first-price auctions, the current proof of existence for a primal regret minimizer relies on a hierarchical structure that is computationally expensive. Future work will focus on developing more efficient primal solvers that can be integrated into this meta-algorithm to handle high-dimensional or continuous action spaces in real-time.
Summary updated