Abstract
We address a generalization of the bandit with knapsacks problem, where a learner aims to maximize rewards while satisfying an arbitrary set of long-term constraints. Our goal is to design best-of-both-worlds algorithms that perform optimally under both stochastic and adversarial constraints. Previous works address this problem via primal-dual methods and require some stringent assumptions, namely Slater's condition, and in adversarial settings, they either assume knowledge of a lower bound on the Slater's parameter or impose strong requirements on the primal and dual regret minimizers. We propose an alternative and more natural approach based on optimistic estimations of the constraints. Surprisingly, we show that estimating the constraints with a UCB-like approach guarantees optimal performance. Our algorithm consists of two main components: (i) a regret minimizer working on moving strategy sets and (ii) an estimate of the feasible set as an optimistic weighted empirical mean of previous samples. The key challenge in this approach is designing adaptive weights that meet the different requirements for stochastic and adversarial constraints. Our algorithm is significantly simpler than previous approaches and has a cleaner analysis. Moreover, ours is the first best-of-both-worlds algorithm providing bounds logarithmic in the number of constraints. Additionally, in stochastic settings, it provides $\widetilde O(\sqrt{T})$ regret without Slater's condition.
Introduction
In the "Bandits with Knapsacks" (BwK) framework, a decision-maker seeks to maximize cumulative rewards over a sequence of rounds while ensuring that various resource or safety constraints are not violated in the long run. This model is essential for real-world applications like dynamic pricing, where a seller has limited inventory, or clinical trials, where patient safety must be maintained alongside treatment efficacy.
The central challenge in BwK is the nature of the environment. Constraints can be stochastic, where costs are drawn from a fixed, unknown distribution, or adversarial, where costs are chosen by an opponent to maximize the learner's difficulty. Ideally, a learner should use a "Best-of-Both-Worlds" (BoBW) algorithm that achieves optimal regret and constraint violation regardless of which environment it encounters.
The Limitations of Primal-Dual Frameworks
Historically, BoBW approaches for constrained bandits have relied on primal-dual methods. These methods use dual variables to penalize constraint violations, effectively turning a constrained problem into an unconstrained one. However, this framework introduces several significant hurdles:
- Slater’s Condition: Most existing methods require the existence of a "strictly feasible" action—one that satisfies all constraints by a specific margin (the Slater parameter $\rho$).
- Parameter Dependency: To function correctly in adversarial settings, these algorithms often require prior knowledge of $\rho$, which is rarely available in practice.
- Poor Scaling: The performance of primal-dual methods typically degrades polynomially with the number of constraints ($m$), making them impractical for high-dimensional resource management.
- Adaptivity Requirements: They often impose strict requirements on the regret minimizers, such as weak adaptivity, which complicates the algorithm design.
Methodology: Optimism Over Penalization
This paper proposes a departure from the primal-dual paradigm. Instead of using dual multipliers, the authors introduce a method based on optimistic feasible set estimation. This approach treats feasibility with the same "Optimism in the Face of Uncertainty" (OFU) principle typically reserved for reward maximization.
1. Optimistic Feasible Set Estimation
The algorithm maintains an estimate of the set of feasible strategies. Rather than a simple average of past costs, it uses a weighted empirical mean combined with an optimistic "bonus" (similar to a Upper Confidence Bound). This bonus ensures that the algorithm remains "optimistic" about which strategies might be safe, allowing it to explore the boundaries of the feasible region efficiently.
2. Regret Minimization on Moving Sets
The learner employs a modified version of the EXP-IX algorithm. Unlike standard adversarial bandit algorithms that operate on a fixed set of actions, this minimizer operates on moving strategy sets. At each round, the algorithm projects its current strategy onto the latest optimistic estimate of the feasible set. This ensures that the chosen action is likely to satisfy the constraints while still pursuing high rewards.
3. Adaptive Weighting Mechanism
The core innovation that enables BoBW performance is the Adaptive Learning Rate. To handle both stochastic and adversarial worlds, the weights used to calculate the mean costs must adapt:
- In stochastic settings, the weights should ideally be uniform, treating all past samples as equally representative of the underlying distribution.
- In adversarial settings, the weights must favor recent samples to react to changing constraint costs.
The authors design a multiplicative term $\Gamma_t^{(i)}$ that activates only when constraint violations exceed a certain threshold. This "kick-in" mechanism allows the estimator to remain stable in stochastic environments while becoming highly reactive in adversarial ones.
Key Results and Contributions
The proposed algorithm provides several theoretical breakthroughs:
- Logarithmic Scaling: This is the first BoBW algorithm where the regret and violation bounds depend on $\sqrt{\log m}$ rather than polynomial $m$. This allows the algorithm to handle thousands of constraints with minimal performance loss.
- No Slater's Condition in Stochastic Settings: In the stochastic world, the algorithm achieves $\widetilde O(\sqrt{T})$ regret even if no strictly feasible point exists (i.e., Slater's condition is violated), provided a feasible point exists. This removes a major restrictive assumption prevalent in the literature.
- Optimal Adversarial Performance: In adversarial settings, the algorithm achieves an optimal competitive ratio of $\alpha = \rho / (1+\rho)$ with $O(\sqrt{T})$ regret and violation.
- Anytime Guarantees: The algorithm does not require the time horizon $T$ to be known in advance; it maintains its performance guarantees at every time step.
Conclusion
By replacing complex dual-variable management with a more natural optimistic estimation of the feasible set, the authors have simplified the approach to constrained bandits while simultaneously improving performance. The shift to logarithmic dependence on the number of constraints and the removal of the Slater condition requirement in stochastic settings represent significant steps forward in making BoBW algorithms practical for complex, real-world resource allocation problems.
Summary updated