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.
Figures & tables
Method
Function classes
Regression
Constraint
Feedback for constraints
ED
Regret
Amani et al. (2019)
Linear
Ridge LS
Stage-wise
Loss; shared parameter
–
O(T2/3)
Pacchiano et al. (2021)
Linear
Ridge LS
Stage-wise
Selected-action cost
–
O(T)
Slivkins et al. (2023)
Regression classes
Online oracle
Packing/covering
Selected-action consumption
–
Problem dependent
Deb et al. (2025)
Nonlinear
Online oracle
Cumulative baseline
Loss; known baseline
–
O(T)
Pacchiano et al. (2025)
Finite nonlinear
Offline LS
Stage-wise
Selected-action cost
Yes
O(TdE+dE)
This work
General reward; convex cost
Offline oracle
Stage-wise
Selected-action cost
No
O(T)
Table 1: Comparison under each work’s assumptions and feedback model. Rates suppress logarithms and fixed safety and complexity parameters, with polylogarithmic regression error where applicable. We show the general rate of Amani et al. (2019) , without an additional known positive optimal-action safety gap. Our rate uses the stated reward covering profile and convex cost entropy assumptions. ED denotes an explicit eluder-dimension term; dE abbreviates its combined reward and cost dependence.
St={c∈C:∑i=1t−1(c(Zi)−ct(Zi))2≤BtC}.
Algorithm 2 Cost Confidence Set Construction
Figure 1: CS-UCCB with selected-action cost feedback. The current offline fit defines a convex confidence set. Its upper costs certify feasible policies, and its widths enter the UCCB objective. The selected action supplies the observations for the next update.
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
We propose an algorithmic framework, Offline Estimation to Decisions (OE2D), that efficiently reduces contextual bandit learning with general reward function approximation to offline regression. The framework allows near-optimal regret for contextual bandits with large action spaces with O(logT) calls to an offline regression oracle over T rounds, and makes O(loglogT) calls when T is known. The design of OE2D algorithm generalizes Falcon~\citep{simchi2022bypassing} and its linear reward version~\citep[][Section 4]{xu2020upper} in that it finds an action distribution that we term ``exploitative F-design'' that simultaneously guarantees low regret and good coverage, striking a balance between exploration and exploitation. Central to our regret analysis is a new complexity measure, the Decision-Offline Estimation Coefficient (DOEC), which we show is small in many settings, including bounded Eluder dimension per-context and the smoothed regret setting. We also establish a relationship between DOEC and Decision Estimation Coefficient (DEC)~\citep{foster2021statistical}, bridging the design principles of offline- and online-oracle efficient contextual bandit algorithms for the first time.
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