Noise-Adaptive Thompson Sampling for Linear Contextual Bandits

Ruitu Xu, Yifei Min, Tianhao Wang

TL;DR

This paper introduces LinNATS, the first Thompson Sampling-style algorithm for linear contextual bandits that automatically adapts to varying noise levels (heteroscedasticity). By utilizing a clever "stratified sampling" approach, it achieves a regret bound that scales with the actual cumulative variance of the noise. This allows the algorithm to perform significantly better in low-noise or deterministic environments compared to standard algorithms, smoothly interpolating between worst-case and best-case scenarios.

What Problem Does This Paper Address?

In the world of online decision-making—such as displaying targeted ads or recommending movies—Linear Contextual Bandits (LCB) serve as a foundational framework. The primary goal is to learn a linear relationship between a "context" (e.g., user data) and a "reward" (e.g., a click) while carefully balancing exploration (trying new things) and exploitation (picking what is known to work).

Algorithm 1: Standard Linear Thompson Sampling

Most existing algorithms, particularly the widely used Thompson Sampling (TS) shown above, assume the "noise" in the reward is constant. In reality, noise is often heteroscedastic, meaning its variance changes depending on the context or the time. Standard TS is "too conservative"—it explores as if the noise is always at its worst-case level. This leads to a "performance chasm": even if the environment becomes perfectly predictable (zero noise), standard TS still incurs a high "regret" (the cost of learning) that grows at a rate of $\sqrt{T}$.

The authors set out to bridge this gap by creating a TS algorithm that is noise-adaptive: it should work robustly in high-noise settings but become much faster and more efficient when the noise is low, all without needing to know the noise variance in advance.

Methods

The authors propose two algorithms, building from a preliminary concept to a sophisticated, high-probability solution:

1. LinVDTS (Preliminary)

As a stepping stone, the authors introduce Linear Variance-Dependent Thompson Sampling (LinVDTS). This approach combines Thompson Sampling with weighted ridge regression. Instead of treating all data points equally, it weights them by the inverse of their variance.

Algorithm 2: Linear Variance-Dependent Thompson Sampling (LinVDTS)

While LinVDTS works well for bounding "expected regret," it struggles to provide "high-probability" guarantees. The inherent randomness of posterior sampling can occasionally lead to very poor arm selections, making it mathematically difficult to bound worst-case scenarios tightly.

2. LinNATS (The Main Contribution)

To solve the high-probability issue, the authors introduce LinNATS, which leverages Uncertainty Stratification.

  • Layered Exploration: It segments context vectors into $L$ different "layers" based on their uncertainty levels.
  • Cascading Selection: It filters out unlikely arms layer-by-layer. This "stratified" approach allows the algorithm to exert much tighter control over the uncertainty of its estimates.
  • On-the-fly Variance Estimation: Since the true noise variance ($\sigma_t^2$) is usually unknown in practice, LinNATS estimates it empirically using past rewards, allowing it to adapt to the environment dynamically.

Key Insights and Ideas

  • The "Optimism" Trap: Standard Thompson Sampling is often praised for its simplicity, but its "optimism" is mathematically difficult to control. The authors identified that the lack of "exact optimism" (unlike UCB-style algorithms) is what prevents standard TS from being variance-aware.
  • Stratification as a Scalpel: Instead of using a blunt "anti-concentration" argument (a common tool in TS proofs), the authors use stratification to "slice" the uncertainty. This allows them to bypass the technical barriers that previously made variance-dependent high-probability bounds for TS seem impossible.
  • Smooth Interpolation: The resulting regret bound, $\widetilde O(d^{3/2} \sqrt{\sum \sigma_t^2})$, is a "best of both worlds" result. If the noise is constant, you get the standard $\sqrt{T}$ rate. If the noise is zero, the $\sqrt{T}$ term vanishes, leaving a much smaller regret that doesn't grow with time.

Experimental Results

The researchers evaluated their algorithms using synthetic simulations, which allow for precise control over noise dynamics ($T = 2000$ rounds, context dimension $d = 25$, and $K = 50$ possible arms per round). They tested two main regimes: Constant Variance and Quadratically Decaying Variance.

  • Theoretical Superiority: LinNATS is the first TS-style algorithm to achieve a high-probability, variance-dependent regret bound. It effectively "interpolates" between the noisy and deterministic regimes.
  • Empirical Performance: In simulations where noise decayed over time, LinNATS significantly outperformed vanilla Thompson Sampling.
  • Adaptivity: Remarkably, LinNATS (which doesn't know the variance) performed nearly as well as LinVDTS (which is given the true variance), proving that its empirical variance estimation is highly effective.

Limitations and Future Work

  • Dimension Dependency: The regret bound still scales with $d^{3/2}$. In contrast, some UCB-style algorithms achieve a better dependency of $d$. The authors suggest that integrating their noise-adaptive approach with "Feel-Good Thompson Sampling" might help close this gap.
  • Beyond Linear Models: The current work is limited to linear contextual bandits. Extending these noise-adaptive techniques to Generalized Linear Bandits (like logistic regression for binary clicks) or full Reinforcement Learning with linear function approximation is a promising next step.
  • Computational Complexity: The stratified sampling and cascading selection add some computational overhead compared to the "draw-and-pick" simplicity of vanilla TS.

Summary updated

BibTeX
@inproceedings{xu2023noise,
  author = {Ruitu Xu and Yifei Min and Tianhao Wang},
  title = {{Noise-Adaptive Thompson Sampling for Linear Contextual Bandits}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=BnV2M2WFaY},
}
Figure