[Paper Review] Thompson Sampling for Contextual Bandit Problems with Auxiliary Safety Constraints
This paper proposes Thompson Sampling with Auxiliary Safety Constraints (TS-ASC), a novel contextual bandit algorithm that optimizes a primary reward while enforcing stochastic safety constraints on auxiliary metrics relative to a baseline policy. It enables safe exploration in multi-objective settings—demonstrated on a real-world video transcoding task—where policies must improve quality without degrading upload reliability, achieving gains in both metrics simultaneously through Bayesian optimization of safety and reward parameters.
Recent advances in contextual bandit optimization and reinforcement learning have garnered interest in applying these methods to real-world sequential decision making problems. Real-world applications frequently have constraints with respect to a currently deployed policy. Many of the existing constraint-aware algorithms consider problems with a single objective (the reward) and a constraint on the reward with respect to a baseline policy. However, many important applications involve multiple competing objectives and auxiliary constraints. In this paper, we propose a novel Thompson sampling algorithm for multi-outcome contextual bandit problems with auxiliary constraints. We empirically evaluate our algorithm on a synthetic problem. Lastly, we apply our method to a real world video transcoding problem and provide a practical way for navigating the trade-off between safety and performance using Bayesian optimization.
Motivation & Objective
- To address real-world sequential decision-making problems where multiple competing objectives exist alongside safety constraints relative to a baseline policy.
- To develop a practical and robust method for balancing exploration-exploitation trade-offs while ensuring auxiliary metrics (e.g., reliability) do not degrade below baseline levels.
- To generalize existing contextual bandit frameworks beyond single-objective optimization to settings with stochastic, unknown safety constraints.
- To provide a scalable, Bayesian optimization-driven approach for tuning safety and reward trade-offs in production systems.
- To demonstrate the method’s effectiveness in a real-world video transcoding application where quality and reliability are in conflict.
Proposed method
- Proposes a Thompson sampling-based algorithm, TS-ASC, that incorporates auxiliary safety constraints by modeling the probability of success (e.g., reliable upload) as a function of context and action.
- Uses a shared two-layer fully-connected neural network to extract features from context-action pairs, followed by a Gaussian Process with a linear kernel and Bernoulli likelihood to model success probabilities.
- Introduces a reward shaping mechanism that combines a primary objective (e.g., 1080p quality preservation) with a safety threshold parameterized by α, which controls the allowable drop in auxiliary metric performance.
- Employs Bayesian optimization with a noisy Expected Improvement acquisition function to jointly tune the reward function parameters (Ω) and the safety threshold (α) under noisy, constrained outcomes.
- Models the auxiliary safety constraint as a stochastic, time-varying baseline, ensuring policies do not degrade reliability below the current status quo across subpopulations.
- Validates the method via A/B testing and response surface modeling to visualize trade-offs between quality and reliability across different α and reward parameter settings.
Experimental results
Research questions
- RQ1Can a contextual bandit algorithm effectively optimize a primary reward metric while ensuring that an auxiliary metric does not degrade below a baseline policy’s performance in a stochastic, context-dependent environment?
- RQ2How can safety constraints be modeled and enforced when the baseline performance is time-varying and unknown a priori?
- RQ3What is the impact of the safety threshold parameter α on the trade-off between performance improvement and reliability preservation in real-world systems?
- RQ4Can Thompson sampling be extended to handle auxiliary safety constraints in multi-objective bandit problems with noisy, binary outcomes?
- RQ5How does the proposed TS-ASC method compare to vanilla Thompson sampling in terms of both performance and safety in production-scale applications?
Key findings
- TS-ASC successfully maintains or improves upload reliability while increasing the fraction of 1080p videos preserved at 1080p quality, achieving a simultaneous improvement in both metrics.
- When α is set close to 0, the policy ensures no degradation in reliability relative to the baseline, demonstrating strong safety enforcement.
- As α increases, the policy becomes more permissive, allowing for higher-quality uploads even with small, acceptable drops in reliability, which is reflected in the response surface analysis.
- Vanilla Thompson sampling consistently degrades reliability across all tested parameterizations, highlighting the necessity of the auxiliary safety constraint.
- Bayesian optimization effectively identifies parameter configurations (α and Ω) that yield favorable trade-offs, with TS-ASC policies outperforming vanilla TS in both quality and reliability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.