Skip to main content
QUICK REVIEW

[Paper Review] Thompson Sampling in Switching Environments with Bayesian Online Change Point Detection

Joseph Mellor, Jonathan Shapiro|arXiv (Cornell University)|Feb 15, 2013
Advanced Bandit Algorithms ResearchDecision Sciences10 references35 citations
TL;DR

This paper proposes Change-Point Thompson Sampling (CTS), a novel algorithm that combines Thompson Sampling with Bayesian online change point detection to address non-stationary multi-armed bandit problems with abrupt distribution shifts. It models switching environments using latent runlengths and posterior inference over change points, demonstrating superior performance on real-world datasets like Yahoo! news click-through and foreign exchange rates compared to baseline bandit algorithms.

ABSTRACT

Thompson Sampling has recently been shown to be optimal in the Bernoulli Multi-Armed Bandit setting[Kaufmann et al., 2012]. This bandit problem assumes stationary distributions for the rewards. It is often unrealistic to model the real world as a stationary distribution. In this paper we derive and evaluate algorithms using Thompson Sampling for a Switching Multi-Armed Bandit Problem. We propose a Thompson Sampling strategy equipped with a Bayesian change point mechanism to tackle this problem. We develop algorithms for a variety of cases with constant switching rate: when switching occurs all arms change (Global Switching), switching occurs independently for each arm (Per-Arm Switching), when the switching rate is known and when it must be inferred from data. This leads to a family of algorithms we collectively term Change-Point Thompson Sampling (CTS). We show empirical results of the algorithm in 4 artificial environments, and 2 derived from real world data; news click-through[Yahoo!, 2011] and foreign exchange data[Dukascopy, 2012], comparing them to some other bandit algorithms. In real world data CTS is the most effective.

Motivation & Objective

  • Address the limitation of standard Thompson Sampling in non-stationary environments where reward distributions change over time.
  • Develop a robust method for multi-armed bandits under abrupt switching, modeling both global and per-arm switching dynamics.
  • Integrate Bayesian online change point detection with Thompson Sampling to enable adaptive learning in time-varying environments.
  • Evaluate the proposed algorithm on synthetic and real-world datasets, including Yahoo! news click-through and foreign exchange rates.
  • Demonstrate that CTS achieves lower regret and error rates than competing algorithms in switching environments.

Proposed method

  • Model the environment as a switching system where reward distributions change abruptly, governed by a hazard function with known or inferred switching rates.
  • Introduce a latent runlength variable $ r_t $ representing the time since the last change point, and marginalize over it to compute $ P( heta|D_{t-1}) $.
  • Use conjugate priors (Beta distributions) for Bernoulli rewards and update posterior beliefs over $ heta_j $ based on rewards since the last change point.
  • Apply Bayesian online change point detection (Fearnhead & Liu, 2007; Adams & MacKay, 2007) to estimate the posterior over runlengths $ P(r_t|D_{t-1}) $.
  • Sample from $ P(r_t|D_{t-1}) $, then from $ P( heta|D_{t-1}, r_t) $, and select the arm with the highest sampled $ heta_j $, enabling Thompson Sampling in non-stationary settings.
  • Extend the framework to handle both global switching (all arms change simultaneously) and per-arm switching (arms change independently), with variants for known vs. inferred switching rates.

Experimental results

Research questions

  • RQ1How can Thompson Sampling be adapted to maintain performance in environments with abrupt, unknown changes in reward distributions?
  • RQ2What is the impact of modeling switching dynamics via Bayesian online change point detection on regret and learning efficiency in non-stationary bandits?
  • RQ3How do global versus per-arm switching models affect algorithmic performance in time-varying environments?
  • RQ4Can the proposed Change-Point Thompson Sampling (CTS) framework outperform standard bandit algorithms like UCB and discounted UCB on real-world, non-stationary data?
  • RQ5How does the performance of CTS vary when switching rates are known versus inferred from data?

Key findings

  • On the Yahoo! Front Page Click Log dataset, Global-CTS2 achieved the lowest regret of $ 0.443 imes 10^{-3} $ (±0.031), outperforming UCB ($ 0.526 imes 10^{-3} $) and DiscountedUCB ($ 0.568 imes 10^{-3} $).
  • In the foreign exchange rate bandit environment, NP Global-CTS achieved the lowest error rate of $ 348.2 imes 10^{-3} $ (±13.7), significantly below UCB ($ 613.9 imes 10^{-3} $) and Random ($ 623.3 imes 10^{-3} $).
  • The variant Global-CTS2, which tracks changes in the best arm without explicit change detection, performed best on Yahoo! data, suggesting that simple adaptation to switching can be effective.
  • CTS variants with non-parametric priors (NP) showed strong performance on both synthetic and real-world datasets, indicating robustness to model misspecification.
  • The algorithm maintained low regret and error across all test environments, demonstrating effectiveness in both artificial and real-world non-stationary bandit problems.
  • Despite underperforming on the PASCAL challenge dataset, CTS showed strong results on real-world data, validating its practical utility in dynamic environments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.