Abstract
Standard Thompson Sampling (TS) is a powerful algorithm for maximizing rewards in multi-armed bandit problems, but its adaptive nature produces "unstable" data that violates the assumptions of classical statistical inference. This instability leads to non-normal sample mean distributions and under-covering confidence intervals, particularly when arm means are similar. We present Stable Thompson Sampling, a variant that employs posterior variance inflation to satisfy the Lai and Wei stability condition. This modification restores asymptotic normality and ensures valid statistical inference with a negligible, logarithmic increase in regret.
Introduction
In a multi-armed bandit (MAB) problem, an agent must choose between several actions to maximize cumulative rewards. Thompson Sampling is a popular Bayesian approach known for its excellent empirical performance. However, because the algorithm is adaptive—changing its behavior based on observed data—the resulting data sequence is not independent and identically distributed (i.i.d.).
This adaptivity breaks the Central Limit Theorem. When two arms have very similar or equal means ($\Delta \approx 0$), standard TS becomes "unstable." Instead of pulling both arms equally, the ratio of pulls fluctuates wildly, often following a uniform distribution rather than converging to a stable value. Consequently, sample means do not converge to a normal distribution, and standard confidence intervals end up under-covering the true value.
Methods
The proposed Stable Thompson Sampling algorithm introduces a deceptively simple modification: Variance Inflation. In standard TS, parameters are sampled from the posterior distribution $\mathcal{N}(\hat{\mu}_{a,t-1}, \frac{1}{n_{a,t-1}})$. In the stable version, the posterior variance is inflated by a tuning parameter $\gamma_T$:
$$\theta_{a,t} \sim \mathcal{N}\left(\hat{\mu}_{a,t-1}, \frac{\gamma_T}{n_{a,t-1}}\right)$$
By ensuring $\gamma_T$ grows slowly with time (specifically, $\gamma_T \gg 2 \log \log T$), the algorithm maintains a sufficient level of exploration to satisfy the Lai and Wei stability condition. This mathematical safeguard prevents the sampling process from becoming too aggressive, ensuring that sample means eventually behave like a normal distribution.
Key Results
Theoretical analysis and Monte Carlo simulations on synthetic Gaussian bandits demonstrate that Stable TS successfully restores valid inference. While standard TS produces skewed error distributions and confidence intervals that significantly under-cover (e.g., achieving only ~75% coverage for a nominal 95% interval), Stable TS aligns almost perfectly with target coverage levels.
Crucially, this stability comes at a low cost. The regret of Stable TS is bounded by $O(\gamma_T \log T)$. Since $\gamma_T$ can be as small as $(\log T)^\epsilon$, the performance remains near-optimal while enabling scientific validity in critical applications like adaptive clinical trials.
Conclusion
Stable Thompson Sampling addresses the fundamental trade-off between reward maximization and statistical inference. By intentionally "wasting" a small amount of exploration through variance inflation, it stabilizes the sampling process and allows researchers to use standard statistical tools reliably. Future work includes extending these stability proofs to cases with more than two arms and non-Gaussian reward models.
Summary updated