The Best of Both Worlds: Stochastic and Adversarial Bandits: SAO Has Pseudo-Regret O(K log K log²β/Δ) on Stochastic Rewards and Regret Õ(√(nK)) Against Adaptive AdversariesResearch Paper
Motivation
In a multi-armed bandit problem a learner chooses one of actions in each of rounds and observes only the reward of the chosen action. Two models of the rewards have separate theories. In the stochastic model, each arm pays independent draws from a fixed distribution; algorithms such as UCB1 (Auer, Cesa-Bianchi & Fischer 2002) have regret of order , logarithmic in . In the adversarial model, an adversary chooses the rewards; Exp3 and its variants (Auer, Cesa-Bianchi, Freund & Schapire 2002) have regret of order , which is optimal there. An algorithm tuned for one model fails in the other: stochastic algorithms can suffer linear regret against an adversary, and adversarial algorithms pay even when the rewards are i.i.d.
Bubeck and Slivkins (arXiv:1202.4473, COLT 2012) asked whether one algorithm can be near-optimal in both models without knowing which one it faces. They answered yes with the algorithm SAO. This result started the "best of both worlds" line of work on bandits. Later contributions include EXP3++ (Seldin & Slivkins 2014) and Tsallis-INF (Zimmert & Seldin 2021).
Setting
There are arms and rounds. On round the algorithm draws an arm from a probability vector computed from the history it has observed. At the same time a reward vector is fixed, and the algorithm observes only .
- Adversarial model. The vector is chosen by an adaptive adversary: a function of the arms played earlier, but not of . The regret is .
- Stochastic model. There are distributions on with means , and all are independent. The pseudo-regret is . The gap of arm is , and the minimal gap is .
The analysis uses importance-weighted estimates , the sample means , the averages , and the play counts .
SAO (Algorithm 1 of the paper) takes a parameter . It keeps a set of active arms, initially all arms, and samples them uniformly at first. On each round it applies a test, (12), that deactivates an arm whose estimate falls far below the best active one. The probability of a deactivated arm then decays as , where is the deactivation time and the arm's probability at that moment. Three further tests, (13)–(15), check that the observations stay consistent with stochastic rewards. If any of them fails on round , SAO switches permanently to the adversarial algorithm Exp3.P (Bubeck & Cesa-Bianchi 2012, Fig. 3.1) for the remaining rounds.
Formalization targets
Goal: Theorem 4.1, high-probability form
For every let . With probability at least , SAO with parameter satisfies, in the stochastic model (whenever some arm has ),
and, against every adaptive adversary with rewards in ,
Milestones
The milestones follow the paper's proof in order:
- Freedman's inequality (Theorem 4.3) in the paper's two-sided form, and its variance-adaptive form, Lemma 4.4.
- The concentration lemmas for SAO's estimates (Lemmas 4.5, 4.6, 4.7) and the Exp3.P phase (Lemma 4.8).
- The two good events of §4.1, (21)–(25).
- The deterministic consequences on those events: Exp3.P is never started in the stochastic model; suboptimal arms are deactivated by time ; , (27); and the adversarial regret bound of §4.3.
- The two halves of Theorem 4.1.
Significance
The theorem shows that the stochastic and adversarial regret rates are not in conflict. A single algorithm, with no information about the model, gets pseudo-regret on stochastic rewards and regret against adaptive adversaries. Each rate is within polylogarithmic factors of optimal for its model. Later algorithms improved the logarithmic factors and removed the explicit switching, but they are compared against this result.
The theorem is proved in the paper. It is not known to have a machine-checked proof. Formalizing it requires a precise model of an adaptive adversary interacting with a randomized algorithm, martingale concentration with random variance (Lemma 4.4), and an exact statement of SAO including its boundary cases. The pieces are reusable: the interaction model, the estimators, Exp3.P and its high-probability guarantee all apply to other adversarial bandit results.
Difficulty
Neither standard analysis carries over. In the stochastic model, SAO's sampling probabilities are random and depend on the past, and a deactivated arm's probability keeps changing. Hoeffding-type bounds for a fixed sampling scheme therefore do not apply to . The variance of the importance-weighted estimate grows like , which is controlled only through the algorithm's own schedule (16). This is why Lemma 4.5 has the two-part radius with . In the adversarial model, the deterministic argument has to show that whenever the consistency tests pass, the regret accumulated before the switch is already small, for an adversary that adapts to the arms played. A union bound over all quantities, all arms and all times (§4.1) is needed before any deterministic reasoning, so every constant in the event matters.
Formalization scope
All declarations live in the namespace BestBothWorlds.SAO.
- Arms and paths. Arms are
Fin Kand rounds are . An arm path isFin n → Fin K. - Algorithms and adversaries. An algorithm is a deterministic map from the observed history to a probability vector. A deterministic adaptive adversary is a map from the list of earlier arms to a reward vector; randomized adversaries are mixtures of these.
- Probabilities. For a fixed adversary, the probability of an event is . In the stochastic model this is integrated against the product law of the reward table.
- Logarithms and constants.
Real.logis the natural logarithm. All constants of Theorem 4.1 are explicit, with . - SAO. It is defined exactly as Algorithm 1. Arms are tested in order within a round, and the active set changes during the loop. Test (13) is false when , and test (14) is false when .
- Exp3.P. After the switch, Exp3.P runs from scratch for rounds. Its parameters are those of Bubeck–Cesa-Bianchi Theorem 3.2 with confidence , and and are clipped at .
- §4 notation. , and are computed from the run, never assumed.
A trivializing formalization is ruled out. The goal's hypotheses concern only the instance (, , , the distributions or the adversary). The algorithm's quantities (, , , the sampling probabilities) are computed by the definition of SAO and are never free variables or hypotheses. The adversarial half covers adaptive adversaries, not only oblivious reward tables.
The expectation form of Theorem 4.1 ( bounds with ), Theorem 1.1 and the two-armed warm-up of §3 are out of scope. Proofs of any milestone are welcome, as are alternative proofs of the concentration lemmas from Mathlib's martingale library.
Selected references
- S. Bubeck and A. Slivkins, The best of both worlds: stochastic and adversarial bandits, COLT 2012; arXiv:1202.4473v1. https://arxiv.org/abs/1202.4473
- S. Bubeck and N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012. https://doi.org/10.1561/2200000024
- D. A. Freedman, On tail probabilities for martingales, Annals of Probability 3(1), 1975. https://doi.org/10.1214/aop/1176996452
- P. Auer, N. Cesa-Bianchi and P. Fischer, Finite-time analysis of the multiarmed bandit problem, Machine Learning 47, 2002. https://doi.org/10.1023/A:1013689704352
- P. Auer, N. Cesa-Bianchi, Y. Freund and R. E. Schapire, The nonstochastic multiarmed bandit problem, SIAM Journal on Computing 32(1), 2002. https://doi.org/10.1137/S0097539701398375
- Y. Seldin and A. Slivkins, One practical algorithm for both stochastic and adversarial bandits, ICML 2014. https://proceedings.mlr.press/v32/seldinb14.html
- J. Zimmert and Y. Seldin, Tsallis-INF: an optimal algorithm for stochastic and adversarial bandits, JMLR 22, 2021. https://jmlr.org/papers/v22/19-753.html