Constrained Linear Thompson Sampling

Aditya Gangrade, Venkatesh Saligrama

Introduction

In many real-world decision-making scenarios—such as clinical drug trials, micro-grid power control, or fair recommendation systems—a learner aims to maximize a reward while strictly adhering to safety limits. This is the Safe Linear Bandit (SLB) problem. The primary challenge is that both the reward function and the safety constraints are initially unknown and must be learned through interaction.

While frequentist algorithms exist for SLB, they are often computationally prohibitive, requiring the solution of complex Second-Order Conic Programs (SOCPs) or even NP-hard problems in every round. This paper introduces COLTS (COnstrained Linear Thompson Sampling), a framework that replaces these expensive optimizations with simple perturbed linear programs and a novel coupled noise design.

The COLTS Framework

COLTS leverages Thompson Sampling (TS) to handle uncertainty. While standard TS adds random noise to the objective estimate, COLTS perturbs both the objective and the constraint estimates. The framework offers two primary variants:

  1. s-colts (Scaling-COLTS): Designed for "Hard Safety," assuming the learner knows at least one safe starting action. It solves a perturbed linear program and then scales the result toward the known safe action to ensure zero risk.
  2. r-colts (Resampling-COLTS): Designed for "Soft Safety" where a safe action is not known a priori. It samples multiple perturbed programs and selects the most optimistic one, ensuring the learner eventually identifies and remains within the feasible region.
Geometric intuition of the COLTS framework, illustrating the relationship between perturbed models and safe action sets.

The Coupled Noise Design

The "secret sauce" of COLTS is its Coupled Noise Design. Instead of adding independent noise to the objective and constraints—which causes the probability of the true optimal action remaining feasible to drop exponentially with the number of constraints—COLTS uses a single random vector to perturb both. This "aligns" the perturbations, ensuring the true optimum is frequently considered "safe and great" by the algorithm, a property termed "local optimism."

Theoretical and Empirical Performance

COLTS achieves theoretical parity with the best-known efficient frequentist algorithms while offering significant computational advantages. By using point-sampling, COLTS reduces the optimization problem to Linear Programming (LP), which is significantly faster and better supported than the SOCPs required by confidence-ellipsoid methods.

Comparison of COLTS variants with state-of-the-art algorithms in terms of regret, risk, and computational complexity.

Key results from evaluations on synthetic environments (such as the Cage4 Matrix and high-dimensional polygonal constraints) include:

  • Theoretical Parity: COLTS matches the $\tilde{O}(\sqrt{d^3 T})$ regret bound of state-of-the-art efficient methods.
  • Massive Speedups: In simulations, s-colts demonstrated a 5.1x speedup over safe-LTS in 9-dimensional settings. As the number of constraints increased to 100, this speedup grew to over 18x.
  • Practical Efficiency: Despite the theoretical $O(\sqrt{d^3 T})$ bound, COLTS often performed closer to $O(\sqrt{d^2 T})$ in practice, outperforming frequentist methods in total reward.

Conclusion and Future Work

COLTS provides a scalable and efficient solution for safe exploration in linear bandits. Future research directions include extending the full scaling analysis to highly adversarial contextual settings and closing the $\sqrt{d}$ gap between the regret of computationally inefficient ($d^2$) and efficient ($d^3$) methods. Additionally, the empirical success of "decoupled" noise in certain scenarios remains a theoretical mystery that warrants further investigation.

Summary updated

BibTeX
@inproceedings{gangrade2025constrained,
  author = {Aditya Gangrade and Venkatesh Saligrama},
  title = {{Constrained Linear Thompson Sampling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=daZ5x88IiE},
}
Figure