Executive Summary
This paper introduces a computationally efficient "pessimistic-optimistic" algorithm for stochastic linear bandits facing general, anytime cumulative constraints (such as safety, fairness, or budget limits). By combining an optimistic reward estimator (LinUCB) with a pessimistic dual update that tracks constraint violations, the algorithm achieves sublinear regret and guarantees zero constraint violations after a constant number of rounds. This approach drastically reduces the computational overhead compared to prior constrained bandit methods.
The Challenge: Constrained Sequential Decision-Making
Stochastic linear bandits provide a popular framework for sequential decision-making problems like online recommendations, crowdsourcing, and clinical trials. However, standard bandit algorithms are primarily designed for unconstrained optimization. In the real world, decisions are almost always bound by operational constraints: a clinical trial must remain safe, a recommendation system must be fair, and a routing system must respect capacity limits.
Prior attempts to solve constrained bandits generally fall into two traps: they either only enforce constraints at the very end of the time horizon, or they suffer from massive computational bottlenecks. For example, existing algorithms that enforce strict "anytime" constraints require the agent to calculate and construct a "safe policy set" at every single step. This is computationally prohibitive. The authors tackle this gap by designing an algorithm that strictly respects anytime cumulative constraints while maintaining the lightweight computational nature of standard unconstrained algorithms.
The Pessimistic-Optimistic Algorithm
The authors frame the constrained bandit problem using a primal-dual optimization approach, leading to their novel Pessimistic-Optimistic Algorithm:
- The Primal Component (Optimistic): To handle the unknown reward function, the algorithm uses the standard Linear Upper Confidence Bound (LinUCB) method. It is "optimistic" because it uses upper confidence bounds to encourage the exploration of actions with uncertain but potentially high rewards.
- The Dual Component (Pessimistic): To handle constraints, the algorithm maintains a set of virtual queues (Lagrange multipliers), denoted as $Q^{(k)}(t)$, for each of the $K$ constraints. If a constraint is violated, the queue grows; if satisfied, it shrinks. It is "pessimistic" because it strictly penalizes actions that might violate constraints based on accumulated historical costs.
- Action Selection: In each round, the algorithm selects the action that maximizes a "pseudo-action-value"—essentially the optimistic reward estimate minus the pessimistic constraint penalty.
Crucially, updating these dual variables only depends on the number of constraints $K$. It completely bypasses the need to compute complex safe action sets, making the algorithm's complexity comparable to standard, unconstrained LinUCB.
Evaluation Environments
The authors evaluate their algorithm on two distinct environments:
- Synthetic Constrained MAB: A 4-arm multi-armed bandit environment with Bernoulli rewards and costs, introduced in prior work, used to benchmark against the existing OPA algorithm.
- Inpatient Flow Routing (Real-world): A healthcare dataset where incoming patients (contexts with features like age and medical history) must be assigned to different wards (actions). The system must maximize "rewards" (optimal care) while strictly adhering to three types of constraints: capacity, fairness, and resource limits.
Core Insights
- Zero Violations After a Warm-up: The most striking theoretical guarantee is that constraint violations become strictly zero after a constant number of rounds ($\tau'$). This $\tau'$ is independent of the total time horizon $T$. After this brief initial period, the system is perfectly safe.
- Decoupling Complexity: By shifting the constraint management to a dual variable (the virtual queues), the computational complexity is decoupled from the size of the context, action, and feature spaces. It scales only with the number of constraints, solving the primary bottleneck of previous methods.
- The Role of Slater's Constant ($\delta$): The theoretical bounds rely heavily on a "tightness" parameter $\delta$, known as Slater's constant. This value represents how much "wiggle room" the optimal safe policy has. A larger $\delta$ means a larger safe feasible set, which makes the environment more forgiving, leading to faster learning, lower regret, and fewer early-stage constraint violations.
Empirical and Theoretical Results
- Theoretical Regret: The algorithm achieves a pseudo-regret of $\tilde{O}((\frac{K^{0.75}}{\delta} + d)\sqrt{\tau})$ at any round $\tau \le T$ (where $d$ is the feature dimension and $K$ is the number of constraints). In terms of the time horizon $T$, this matches the optimal $\Omega(\sqrt{T})$ lower bound for unconstrained bandits up to logarithmic factors.
- Theoretical Safety: The cumulative constraint violation is bounded by a constant for early rounds and drops exactly to $0$ for any round $\tau > \tau'$.
- Empirical Performance: In the synthetic MAB task, the proposed algorithm achieved significantly lower regret than the baseline OPA algorithm while perfectly satisfying the cost constraints. In the real-world healthcare routing task, it maintained exactly $0$ constraint violations across all tested horizons (up to 62,500 steps) while successfully minimizing regret.
Limitations and Future Directions
While the bounds are sharp with respect to the time horizon $T$, the authors acknowledge that it remains an open question whether their bounds are optimally sharp with respect to the number of constraints $K$, the feature dimension $d$, and Slater's constant $\delta$. The performance degrades (regret and early violations increase) as the constraints become extremely tight ($\delta \to 0$).
For future work, the authors provide an extension in the appendix for scenarios where the constraint costs are not general, but rather linearly parameterized and revealed after an action is taken. They suggest that applying LinUCB to estimate these costs as well yields similar theoretical guarantees, opening the door for fully linear constrained environments.
Summary updated