Introduction
In the standard Multi-Armed Bandit (MAB) framework, an agent selects arms to maximize cumulative rewards while balancing exploration and exploitation. The Bandits with Knapsacks (BwK) extension introduces resource constraints, where pulling an arm consumes a budget that cannot be exceeded over a horizon $T$. However, many practical applications—such as inventory management or daily advertising spend—require a stricter "anytime" constraint. In these scenarios, an agent cannot go into "debt" or borrow from future budgets; the average cost constraint must be satisfied at every single time step.
This paper formalizes the Bandits with Anytime Knapsacks (BwAK) problem. Unlike standard BwK, where constraints are evaluated at the end of the run, BwAK imposes a hard constraint on the average cost at every round. Naive adaptations of existing BwK algorithms to this setting typically result in high $O(\sqrt{KT})$ regret due to excessive "skipping" when the budget becomes tight. We propose SUAK (Strategic Under-utilization for Anytime Knapsacks), an algorithm designed to maintain this strict anytime constraint while achieving optimal long-term performance.
The SUAK Algorithm
SUAK introduces a novel approach to budget management through three primary mechanisms:
- The Null Arm: The algorithm incorporates a "null arm" with zero cost and zero reward. Selecting this arm allows the agent to effectively skip a round, lowering the average cost to remain within the budget $c$.
- Strategic Under-utilization: The core innovation of SUAK is targeting a budget slightly lower than the actual limit ($c - \text{margin}$). This intentional buffer absorbs the variance of stochastic arm costs, preventing the algorithm from being forced into emergency skips due to short-term bad luck.
- LP-Based Mixture Strategies: SUAK employs a two-phase approach. It first explores arms to estimate their mean costs relative to the budget. It then solves a Linear Program (LP) using Upper Confidence Bounds (UCB) for rewards and Lower Confidence Bounds (LCB) for costs to find an optimal mixture of arms (typically a high-reward arm and a low-cost arm) that maximizes reward while respecting the under-utilized budget.
Key Results and Empirical Evaluation
Theoretical analysis proves that SUAK achieves an instance-dependent regret upper bound of $O(K \log T)$. This matches the performance of algorithms in simpler, less constrained BwK settings and represents the first such bound for the BwAK problem.
Empirical evaluations were conducted using synthetic simulations with 9 arms over 2.5 million rounds. SUAK was compared against several baselines, including Primal Dual Skip, UCB Simplex Skip, and One Phase Skip.
As shown in the experimental results, SUAK significantly outperforms naive adaptations. While baseline algorithms like Primal Dual Skip exhibit linear regret growth, SUAK's regret grows sublinearly. Crucially, the number of skipped rounds in SUAK plateaus or grows very slowly compared to the baselines, confirming that the strategic under-utilization strategy effectively stabilizes the budget without sacrificing long-term reward accumulation.
Conclusion
SUAK demonstrates that "anytime" constraints in bandit problems can be managed efficiently without falling into the $\sqrt{T}$ regret trap. By intentionally under-budgeting, the algorithm provides a robust safety margin against stochastic volatility. Future work includes extending this framework to multi-dimensional cost constraints and exploring more conservative strategies for highly volatile environments.
Summary updated