  We investigate experiments that are designed to select a treatment arm for
population deployment. Multi-armed bandit algorithms can enhance efficiency by
dynamically allocating measurement effort towards higher performing arms based
on observed feedback. However, such dynamics can result in brittle behavior in
the face of nonstationary exogenous factors influencing arms' performance
during the experiment. To counter this, we propose deconfounded Thompson
sampling (DTS), a more robust variant of the prominent Thompson sampling
algorithm. As observations accumulate, DTS projects the population-level
performance of an arm while controlling for the context within which observed
treatment decisions were made. Contexts here might capture a comprehensible
source of variation, such as the country of a treated individual, or simply
record the time of treatment. We provide bounds on both within-experiment and
post-experiment regret of DTS, illustrating its resilience to exogenous
variation and the delicate balance it strikes between exploration and
exploitation. Our proofs leverage inverse propensity weights to analyze the
evolution of the posterior distribution, a departure from established methods
in the literature. Hinting that new understanding is indeed necessary, we show
that a deconfounded variant of the popular upper confidence bound algorithm can
fail completely.
