An Efficient Pessimistic-Optimistic Algorithm for Stochastic Linear Bandits with General Constraints

Xin Liu, Bin Li, Pengyi Shi, Lei Ying

This paper, titled "An Efficient Pessimistic-Optimistic Algorithm for Stochastic Linear Bandits with General Constraints," tackles the challenge of making sequential decisions under uncertainty when real-world safety, budget, or fairness rules must be strictly followed. The authors propose a new algorithm that is both mathematically robust and computationally practical.

TL;DR

The authors present a primal-dual algorithm for constrained linear bandits that achieves near-optimal reward regret while guaranteeing zero constraint violation after a short, fixed period. By combining optimistic reward estimation with pessimistic constraint tracking, the algorithm remains as computationally efficient as standard unconstrained methods, making it viable for complex real-world tasks like healthcare resource routing.

What Problem Does This Paper Address?

In a standard stochastic linear bandit problem, an agent chooses actions to maximize a reward based on some observed context (like a user's profile). However, real-world applications—such as clinical trials or job assignments—often have "operational constraints." You can't just maximize clicks if it violates fairness, and you can't just maximize patient outcomes if you exceed a hospital's budget or capacity.

Most existing research either ignores these constraints or uses formulations that are either too loose (only caring about the total cost at the very end) or too restrictive (demanding every single action be safe from day one). This paper focuses on anytime cumulative constraints, ensuring that the time-average cost remains below a threshold throughout the entire process.

Figure 1: A conceptual description of feasible policy sets under different constraint formula- tions.

As shown in Figure 1, this "anytime cumulative" approach occupies a middle ground, offering more flexibility than per-action constraints while being safer than simple end-of-horizon cumulative constraints.

Methods

The authors propose a Pessimistic-Optimistic Algorithm based on a primal-dual optimization framework:

  • The Optimistic Primal Component: To maximize rewards, the algorithm uses LinUCB (Linear Upper Confidence Bound). It builds a confidence set around the unknown reward parameters and chooses the "best-case scenario" to encourage exploration.
  • The Pessimistic Dual Component: To handle constraints, the algorithm maintains Lagrangian multipliers (denoted as $Q^{(k)}(t)$). These act like "virtual queues" that track how much a constraint has been violated. If a cost exceeds the budget, the multiplier increases, making the algorithm more "pessimistic" and less likely to choose that action again.
  • Balancing Act: A key innovation is the use of a time-varying tightness constant ($\epsilon_t$) and a scaling parameter ($V_t$). These allow the algorithm to gradually tighten its safety requirements as it learns more about the environment.

Crucially, the algorithm does not require cost functions to be linear, and its computational complexity is independent of the size of the action or feature spaces—making it as fast as standard unconstrained LinUCB.

Datasets

The algorithm was evaluated using two primary methods:

  1. Synthetic Multi-Armed Bandit (MAB): A benchmark comparison against the OPA (Optimistic Pessimistic Algorithm) from prior literature to demonstrate superior reward performance.
  2. Real-world Healthcare Dataset: An inpatient flow routing simulation. The goal was to assign patients to hospital wards to minimize 30-day readmissions (the reward) while respecting constraints on ward capacity, fairness, and nursing resources.

Key Insights and Ideas

  • Zero Violation Guarantee: Unlike previous methods that only guarantee safety with high probability over a long horizon, this algorithm proves that after a constant number of rounds ($\tau'$), the constraints are satisfied with probability one.
  • Lyapunov Drift Analysis: The authors borrow techniques from queueing theory (Lyapunov drift) to analyze the dual variables. This allows them to bound the "backlog" of constraint violations effectively.
  • General Cost Functions: The algorithm is robust enough to handle nonlinear cost functions, which is a significant departure from many existing "linear-only" bandit models.
  • Slater’s Condition: The performance depends on a "Slater’s constant" ($\delta$), which represents how much "breathing room" exists in the feasible solution space. A larger $\delta$ makes the problem easier to solve safely.

Key Results

  • Regret: The algorithm achieves a pseudo-regret of $\tilde{O}(\sqrt{\tau})$, which matches the theoretical lower bounds for unconstrained bandits up to logarithmic factors.
  • Safety: In the healthcare simulation, constraint violations for capacity, fairness, and resources dropped to zero very quickly (within 32 to 54 time slots).
  • Efficiency: The algorithm significantly outperformed the OPA baseline in terms of cumulative reward while maintaining the same level of safety.

Limitations and Future Work

While the algorithm is highly efficient, the authors note that the "sharpness" of their mathematical bounds regarding the number of constraints ($K$) and the feature dimension ($d$) remains an open question. Future work could investigate if these dependencies can be further optimized. Additionally, while the paper provides an extension for cases where costs are revealed after an action is taken (linear costs), exploring more complex, non-linear delayed cost feedback remains a promising direction.

Summary updated

BibTeX
@inproceedings{liu2021efficient,
  author = {Xin Liu and Bin Li and Pengyi Shi and Lei Ying},
  title = {{An Efficient Pessimistic-Optimistic Algorithm for Stochastic Linear Bandits with General Constraints}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=yDV4rpRk85f},
}
Figure