cs.LGAug 11, 2026

Reoptimization Algorithms for Contextual Bandits with Knapsack Constraints

Authors: Zhen Xu

Abstract

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((lnT)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.

Explore similar work

May 7, 2026cs.LG

Constrained Contextual Bandits with Adversarial Contexts

We study budget-constrained contextual bandits with adversarial contexts, where each action yields a random reward and incurs a random cost. We adopt the standard realizability assumption: conditioned on the observed context, rewards and costs are drawn independently from fixed distributions whose expectations belong to known function classes. We focus on the continuing setting, in which the algorithm operates over the entire horizon even after the budget for cumulative cost is exhausted. In this setting, the objective is to simultaneously control regret and the violation of the budget constraint. Building on the seminal SquareCB\mathsf{SquareCB} framework of Foster et al. [2018], we propose a simple and modular framework that leverages online regression oracles to reduce the constrained problem to a standard unconstrained contextual bandit problem with adaptively defined surrogate reward functions. In contrast to prior works, which focus on stochastic contexts, our reduction yields improved guarantees for more general adversarial contexts, together with an efficient algorithm with a compact and transparent analysis.
Dhruv Sarkar, Abhishek Sinha
May 31, 2026stat.ML

Practical and Optimal Algorithm for Linear Contextual Bandits with Rare Parameter Updates

We study linear contextual bandits under rare parameter updates: the learner may incorporate reward feedback into its parameter estimate only at a small number of update times, while still observing contexts online and selecting actions sequentially. This viewpoint clarifies a practical distinction that is often blurred in the literature: many "strictly batched" methods additionally restrict within-interval context adaptivity, meaning that the action rule inside an interval cannot depend on the sequence of realized contexts/actions in that interval (beyond the current round's context). For linear contextual bandits, we propose two practical algorithms with only O(loglogT)O(\log\log T) parameter updates. Our first algorithm BLCE-G attains minimax-optimal regret (up to polylogarithmic factors in TT) simultaneously in both the small-KK and large-KK regimes under a static schedule. Our second algorithm BLCE removes the near G-optimal design step -- a dominant computational bottleneck in prior strictly batched static-grid methods -- yet preserves minimax-optimal regret and achieves the lowest known runtime complexity among optimal algorithms. We further extend these rare-update and computational principles to generalized linear contextual bandits. Overall, our results yield statistically optimal algorithms under O(loglogT)O(\log\log T) parameter updates that are also computationally efficient in practice.
Sanghoon Yu, Min-hwan Oh
May 19, 2026cs.LG

Active Context Selection Improves Simple Regret in Contextual Bandits

We study the contextual multi-armed bandit problem with a finite context space (a.k.a. subpopulations), where the learner recommends a best action for each context and is evaluated by context-weighted simple regret. Our guarantees are worst-case over the reward distributions, while remaining instance-dependent with respect to the context distribution vector pp. Akin to experimental design problems where the population of interest is fixed but the sampled subpopulation can be controlled, we allow the learner to actively choose which context to sample from. For a known pp, we characterize tight regret rates: passive sampling where contexts are randomly revealed achieves regret of order n/Tp1/2\sqrt{n/T \, \lVert p \rVert_{1/2}}, whereas active sampling with allocation qjpj2/3q_j \propto p_j^{2/3} achieves the tight rate n/Tp2/3\sqrt{n/T} \, \lVert p \rVert_{2/3}. The resulting improvement can be as large as Θ(k1/4)Θ(k^{1/4}), where kk is the number of contexts. We further extend the analysis to budgeted active sampling, characterize the corresponding tight rate, and identify when a limited active budget suffices to recover the fully active rate. When pp is unknown, we propose the Explore-Explore-Then-Commit (EETC) algorithm, which optimally balances estimating the context distribution and the time to switch to active allocation, such that for large horizons, it matches the known-pp active rate up to constants. Experiments on synthetic and real-world data support our theoretical findings.
Mohammad Shahverdikondori, Jalal Etesami, Negar Kiyavash