We study constrained contextual bandits, in which a learner chooses one of K actions in each round to minimize loss while keeping the expected cost of its play below a budget. Existing reductions to online regression weight the cost by a Lagrange multiplier learned from past constraint residuals, so slack in some rounds can offset violations in others. We instead run SquareCB proposed in \citep{foster2020beyond} with a rectified weight on the cost: it is zero when the estimated cost is within the budget, and otherwise just large enough to bring it back to the budget. Under realizability and Slater's condition with margin δ, the algorithm attains regret O(KTRegSq(T)/δ) and cancellation-free violation ∑t(Vcpt−b)+=O(KTRegSq(T)), where RegSq is the error of the regression oracle. The same bounds hold when the budget must be met in every context, potentially adversarially chosen contexts. In controller selection for a safe-control-gym quadrotor and a BOPTEST building, the violation is 6 to 9 times lower than that of primal-dual and virtual-queue baselines, with a lower or comparable regret.
Figures & tables
Figure 1: Quadrotor:cumulative regret and violation (both cancellation-free) averaged over 10 runs.
Figure 2: Building:cumulative regret and violation (left and right, respectively) averaged over 10 runs.
gt monotone with downward jumps; rectified weight exists, computable
Lem. 9
composite SquareCB: ≤RT=O(ΛKTRegSq)
Lem. 24
saddle: Vrπ−Vrπ∗≥−λ∗(Vcπ−b)+
Lem. 10
∑tμt(Vcpt−b)≥ΛViol(T)−2ΛEc
Lem. 12
∑t(Vrpt−Vrπ∗)+ΛViol(T)≤RT+2ΛEc
Table 3
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 4Figure 5
Figure 3: Running average of the expected loss (left) and cost (right) of our method for Λ∈{0.1,5,10,100} , on the building with b=10 K ⋅ h/day (top) and the quadrotor with b=1.75 cm (bottom). Dashed lines: loss of π∗ and budget b . Overlapping curves are drawn thinner on top. Mean ±2 s.e. over 5 runs.
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 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 UT, our algorithm achieves O(KTUT) regret and O(KTUTlogT) cumulative expected cost, with high probability, improving upon the previous O(T3/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.
Dhruv Sarkar, Abhishek Sinha
Indian Institute of Technology Kharagpur, India · Tata Institute of Fundamental Research, Mumbai, India
Contextual bandits are a standard framework for sequential decision-making under uncertainty, with applications in clinical trials, dosage selection, recommendation systems, and autonomous systems. Safety is central in many of these applications, since a single unsafe decision in settings such as dosage selection or autonomous driving can have catastrophic consequences. A common way to model safety in bandit problems is to associate each action with both a reward signal and a cost signal, and to optimize reward subject to constraints on cost. Most existing safety-constrained bandit models enforce safety by requiring the expected cost of each action to remain below a prescribed threshold. However, this may be insufficient in heteroscedastic settings, where the chosen action affects not only the expected reward and cost, but also the variability of the observed outcomes. We study contextual bandits with one-dimensional continuous actions and stage-wise high-probability constraints on the realized cost. We propose High-Probability Constrained UCB, an optimistic-pessimistic algorithm that explores for reward while conservatively estimating the safe action set. For linear reward and cost models, we prove a tight O~(dT) regret bound, and we extend the analysis to general function classes using the eluder dimension. Experiments show that enforcing realized-cost safety substantially reduces violations compared with expected-cost constrained baselines.
Spyros Dragazis, Aldo Pacchiano
Boston University · Broad Institute of MIT and Harvard
Contextual bandits with stage-wise constraints model decisions that must control risk while learning from their outcomes. We study this problem when only the selected action's reward and cost are observed, with a general reward class and a convex class of nonlinear cost functions. We propose CS-UCCB, which combines offline regression, cost confidence sets, and upper counterfactual confidence bounds. Each regression fit defines a valid cost confidence set, while a geometry derived from covering entropy controls cumulative cost uncertainty along the sampled decisions. Under polylogarithmic covering entropy for both classes and polylogarithmic offline estimation error, the finite-action algorithm guarantees, with high probability, feasibility at every round and O(T) regret without an eluder-dimension term. We also extend the analysis to infinite actions under an explicit reward-design condition and compare our bound with existing eluder-dimension bounds.