No-Regret is not enough! Bandits with General Constraints through Adaptive Regret Minimization

Martino Bernasconi, Matteo Castiglioni, Andrea Celli

Introduction

In the classic Bandits with Knapsacks (BwK) problem, an agent aims to maximize its cumulative reward over time while strictly adhering to resource-consumption constraints (e.g., a fixed budget). This paper investigates a generalization of BwK where constraints are arbitrary and long-term, extending beyond simple resource depletion.

Typically, these problems are solved using a primal-dual framework, where the algorithm balances maximizing rewards (the primal task) and penalizing constraint violations (using dual variables or Lagrange multipliers). To prevent the dual variables from exploding, standard algorithms require prior knowledge of the "Slater's parameter" ($\rho$)—a measure of how strictly feasible the safest action is. However, in general constraint settings, the agent rarely knows $\rho$ in advance. The authors demonstrate that if $\rho$ is unknown, especially in adversarial environments, standard "no-regret" algorithms can fail catastrophically.

The Pitfall of Standard No-Regret Algorithms

A key insight of this paper is that simply achieving "no-regret" is insufficient to guarantee that constraints are met. Standard algorithms can exhibit "laziness": if they accumulate a large amount of negative regret early on, they can afford to make terrible, constraint-violating decisions later while technically maintaining an overall sublinear regret. Because they only optimize for the global average, they fail to adapt to late-stage environmental changes, leading to linear constraint violations.

Proposed Method: Weakly Adaptive Primal-Dual Framework

To overcome the "laziness" of standard algorithms, the authors propose a modular primal-dual Lagrangian framework that requires both the primal and dual algorithms to be weakly adaptive.

Primal-Dual Algorithm

An algorithm is weakly adaptive if it achieves sublinear regret not just over the entire time horizon, but over any sub-interval of time. This strict requirement forces the algorithm to constantly adapt to changing environments rather than resting on its early successes.

The core technical contribution enabling this is the Self-Bounding Lemma. The authors prove that if the primal algorithm is weakly adaptive and "scale-free" (meaning its regret scales naturally with the unknown range of the rewards), and the dual algorithm uses Online Gradient Descent (OGD) with a carefully tuned learning rate, the dual variables naturally bound themselves. This interaction completely eliminates the need to know the Slater parameter ($\rho$) or to explicitly project the dual variables into a safe range, allowing the algorithm to operate blindly without knowing the environment's feasibility parameters.

Key Theoretical Results

The proposed framework achieves optimal "best-of-both-worlds" guarantees. It does not need to know whether the environment is stochastic (drawn from a random distribution) or adversarial (actively chosen to thwart the learner); the exact same algorithm achieves optimal theoretical guarantees in both scenarios:

  • Stochastic Setting: The algorithm achieves sublinear regret $\tilde{O}(\sqrt{T})$ against the best fixed randomized strategy that satisfies the constraints in expectation, alongside sublinear constraint violations.
  • Adversarial Setting: The algorithm achieves a tight competitive ratio of $\rho/(1+\rho)$ against the strongest baseline (the best unconstrained strategy in hindsight), with sublinear constraint violations $\tilde{O}(\sqrt{T})$. The authors also provide a mathematical lower bound proving that this competitive ratio is the absolute best possible if constraint violations must remain sublinear.

Extension to Contextual Bandits

By plugging in specific algorithms (like EXP3-SIX or regression oracles), the authors extend their framework to Contextual Bandits with Linear Constraints (CBwLC).

Primal-Dual Algorithm for Contextual Bandits

This extension yields the very first no-$\alpha$-regret guarantees for contextual bandits operating in adversarial contexts, significantly broadening the applicability of their approach.

Limitations and Future Work

The framework requires the primal algorithm to be "2-scale-free" (its regret scales quadratically with the unknown range of rewards). While the authors identify existing algorithms that meet this criterion (like EXP3-SIX), finding strictly "1-scale-free" algorithms is much harder. Using 1-scale-free algorithms would yield even tighter mathematical bounds. Future research should focus on characterizing and discovering more scale-free algorithms, which would expand the practical applicability of this framework to a wider variety of complex bandit problems.

Summary updated

BibTeX
@inproceedings{bernasconi2025no,
  author = {Martino Bernasconi and Matteo Castiglioni and Andrea Celli},
  title = {{No-Regret is not enough! Bandits with General Constraints through Adaptive Regret Minimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=vxM49M5B4s},
}
Figure