cs.LGJan 30, 2025

Bandits with Anytime Knapsacks

Authors: Eray Can Elumar, Cem Tekin, Osman Yagan

Organizations: Dept. of Electrical and Computer Engineering Carnegie Mellon University Pittsburgh, PA · Dept. of Electrical Engineering Bilkent University Ankara, Turkey

Abstract

We consider bandits with anytime knapsacks (BwAK), a novel version of the BwK problem where there is an anytime cost constraint instead of a total cost budget. This problem setting introduces additional complexities as it mandates adherence to the constraint throughout the decision-making process. We propose SUAK (Strategic Under-utilization for Anytime Knapsacks), an algorithm that utilizes upper confidence bounds to identify the optimal mixture of arms while maintaining a balance between exploration and exploitation. SUAK is an adaptive algorithm that strategically utilizes the available budget in each round in the decision-making process and skips a round when it is possible to violate the anytime cost constraint. In particular, SUAK slightly under-utilizes the available cost budget to reduce the need for skipping rounds. We show that SUAK attains the same problem-dependent regret upper bound of O(Klog⁡T) O(K \log T) established in prior work under the simpler BwK framework, where KK denotes the number of arms, and TT denotes the time horizon. We also establish an instance-dependent lower bound showing that the O(Klog⁡T)O(K\log T) dependence is unavoidable. Finally, we show via extensive simulations that SUAK achieves considerably higher rewards than naive adaptations of BwK algorithms that do not optimize learning under anytime cost constraints.

Figures & tables

Explore similar work

May 7, 2026

Constrained Contextual Bandits with Adversarial Contexts

We study constrained contextual bandits with adversarial contexts, where each action yields a random reward and incurs a random cost. The conditional mean reward and cost belong to known function classes and are learned through online regression oracles. The benchmark is a stationary randomized policy whose expected cost is non-positive at every observed context. We extend the seminal SquareCB\mathsf{SquareCB} algorithm of Foster and Rakhlin (2020), which reduces the contextual bandits to a regression problem, to the constrained setting. A surrogate reward function is constructed which penalizes the positive part of the expected cost of an action distribution, and an auxiliary variable accumulates its predicted value. Then we use an exponential Lyapunov function to control both regret and cumulative constraint violation via a single inequality. If the cumulative squared prediction error is at most UTU_T, our algorithm achieves O(KTUT)O(\sqrt{KTU_T}) regret and O(KTUTlog⁡T)O(\sqrt{KTU_T}\log T) cumulative expected cost, with high probability, improving upon the previous O(T3/4)O(T^{3/4}) type bounds obtained in stochastic contextual settings with an unknown context distribution. Our results require neither additional margin conditions nor probabilistic assumptions on the context sequence.
Sep 29, 2026

Bandits with Multiple Optimal Arms: Minimax Regret and Non-Adaptivity

We study multi-armed bandits (MAB) with multiple optimal arms, motivated by the fact that many practical decision making problems admit multiple correct answers. For KK-armed bandits with AA optimal arms, we first provide a sharper analysis of previous sub-sampling algorithms (De Heide et al., 2021; Zhu and Nowak, 2020), establishing a O~(K−AKAT)\tilde{O}\Big(\frac{K-A}{\sqrt{KA}}\sqrt{T} \Big) minimax regret, where TT is the total number of interactions and O~(⋅)\tilde O(\cdot) drops all constant and logarithmic factors, improving the previous O~(KT/A)\tilde{O}(\sqrt{KT/A}) regret. We then provide a matching lower bound up to logarithmic factors, indicating that our established rate is nearly minimax-optimal. We further show that the knowledge of AA up to O~(1)\tilde{O}(1) factors is necessary to achieve near-optimal regret, as near-optimal algorithms for one number of optimal arms must incur substantially larger regret than optimal regret for a smaller number. Overall, our results provide a comprehensive minimax characterization of KK-armed bandits with AA over the entire range of 1≤A≤K−11 \leq A \leq K-1.
Aug 11, 2026

Reoptimization Algorithms for Contextual Bandits with Knapsack Constraints

We study new algorithms for Contextual Bandits with Knapsack. In these problems, there are finitely many types of customers, products, and resources. Each product is made from a fixed combination of resources, and resources have finite capacity. A decision maker must assign each arriving customer one out of a set of multiple possible products. Every assignment of a customer to a product will generate a random reward, which equals an unknown linear function of customer and product features, plus a noise term. The objective is to jointly learn the mean reward function, and to make online assignments to minimize the expected revenue loss relative to an optimal policy that knows the reward function. We propose a natural and simple extension of the Upper-Confidence-Bound (UCB) family of algorithms and apply re-optimization techniques. We show that by taking advantage of re-optimization, our algorithm achieves an average regret of O((ln⁡T)3T)O(\frac{(\ln T)^3}{T}) where TT is the horizon length. Our bound significantly reduces the O(1T)O(\frac{1}{\sqrt{T}}) bound in the literature for closely related dynamic-pricing problems that are based on re-optimization.