Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits I: The Regret Bound of ILOVETOCONBANDITSResearch Paper
Motivation
In a contextual bandit problem a learner repeatedly observes a context (a user, a patient, a query), chooses one of actions, and observes the reward of the chosen action only. It competes with the best policy of a fixed class of maps from contexts to actions. This is the standard model for news and advertisement recommendation, adaptive clinical assignment and other interactive decision problems in which counterfactual rewards are never observed.
Two requirements pull against each other. Statistically, the optimal regret against a finite class is of order , attained by the exponential-weights algorithm Exp4 (Auer et al. 2002), whose running time is linear in per round. Computationally, practical policy classes are exponentially large and are accessed only through a supervised learning routine. Agarwal, Hsu, Kale, Langford, Li and Schapire (2014) give ILOVETOCONBANDITS, which reaches the optimal regret while touching only through an arg-max oracle, and only times in rounds.
Timeline. Exp4 (2002) attains against adversarial rewards with running time . Epsilon-greedy and Epoch-Greedy (Langford and Zhang 2007) are oracle-efficient but have regret of order . Exp4.P (Beygelzimer et al. 2011) proves the optimal bound with high probability. RandomizedUCB (Dudík et al. 2011) is the first oracle-based algorithm with optimal regret in the i.i.d. model, but its number of oracle calls is a large polynomial in . ILOVETOCONBANDITS (2014) keeps the regret and reduces the calls to .
Setting
There are actions, a measurable context space , and a finite nonempty policy class of measurable maps . A distribution on generates context/reward-vector pairs , , independently. In round the learner sees , draws an action with probability , and observes only . The history is the list of records , .
The expected reward of a policy is , is any maximizer over , and . The regret after rounds is the empirical cumulative quantity .
The inverse propensity scoring estimate is , and . For nonnegative weights on with total mass at most one, the smoothed projection is .
ILOVETOCONBANDITS takes an epoch schedule and , sets and . At the end of epoch (round ) it chooses weights solving the optimization problem (OP): with ,
During epoch it puts the leftover mass on the empirical maximizer , obtaining a distribution , and draws .
Formalization targets
Goal: Theorem 2 in the explicit form of Lemma 17
Assume for and let , , , , and . For every , with probability at least ,
It holds for every (OP)-solution selection and every tie-breaking rule. Since once , this is the paper's .
Milestones
Freedman's inequality (Lemma 9); the uniform deviation of true from empirical variances (Lemma 10); the deviation of the IPS estimates (Lemma 11); on the event where both deviations hold, the variance bound (Lemma 12), the two-sided comparison of and (Lemma 13), and the low regret of the sampling distribution (Lemma 14); and the deterministic sums of the (Lemmas 15, 16).
Significance
The theorem shows that optimal regret in the i.i.d. contextual bandit problem does not require enumerating the policy class: a sequence of convex feasibility problems, each solvable with few oracle calls (Theorem 3, the companion mission), suffices. The inverse-propensity variance constraint of (OP) and the epoch-and-warm-start structure became the template for later oracle-based methods, and the paper's Online Cover variant is implemented in the Vowpal Wabbit learning system.
The result is proved in the paper; none of it is formalized. The platform holds Exp4 (Bandit Algorithms VIII, adversarial rewards and expert advice) and SquareCB (Foundations of RL II, regression oracles), both different algorithms in different models, and Azuma–Hoeffding (bounded_diff_martingale_two_sided), which the proof of Lemma 17 uses. This mission adds the first inverse-propensity estimator, the first oracle-based policy-class bandit algorithm, and Freedman's inequality with a conditional-variance sum. Several statements are proved in the paper only in outline: Lemma 10 has a proof sketch that defers to Dudík et al. (2011), and the paper asserts without spelling out how the first case of (14) follows from Lemma 11.
Difficulty
The regret of the algorithm depends on the quality of its own data. The estimates have variance governed by the distributions the algorithm chose earlier, and those distributions were chosen from the estimates. A direct union bound over with the worst-case variance gives regret of order , the Epoch-Greedy rate. The argument that avoids this must show that a policy with large variance was already known to be bad, and the estimated and true regrets must be compared inductively over epochs with constants that do not grow (). The inequality must also hold for every solution of (OP), not a particular one.
The martingale structure requires care: the action of round is drawn from a distribution that depends on the whole past and must not look at , and Lemma 10 must hold uniformly over all distributions on , not just finitely supported ones.
Formalization scope
The formalization commits to the following representation and conventions.
- Actions are
Fin Kwith0 < K(NeZero K); is a nonemptyFinset (X → Fin K)of measurable maps; weights on are real functions on its subtype. is a probability measure onX × (Fin K → ℝ)with rewards in almost surely. - The run lives on a probability space carrying i.i.d. with law and i.i.d. uniform on , independent of the 's. The action is the inverse distribution function of at , so it has the right law and is independent of given the past and . The tie-breaking rule and the (OP)-selection are arbitrary measurable functions of the observable history (a list of records). The selection must return an (OP) solution for every history of length ; such selections exist by Theorem 3.
- Rounds and epochs are as in the paper; is
Real.log. - . The printed formula is at , and the proofs of Lemmas 12 and 14 use this value.
- The goal and Lemmas 13–14 assume , i.e. , which holds e.g. for . It replaces the paper's "". It makes finite and , so is a genuine real supremum.
- Explicit constants: , , , , , , , , , . is not replaced by .
- Where the paper allows or (Lemmas 9–11), the bound is . These cases are excluded (, ) because in Lean. Lemma 9 adds measurability and integrability of and .
- Probability statements bound the (outer) measure of the failure event by .
A statement about "a policy mixture with small regret", about the pseudo-regret of the chosen policies, about a specially chosen (OP) solution, or about actions that may depend on is not Theorem 2; none of these is accepted. With these constants the bound exceeds unless is very large, which is a property of the paper's constants, not of the encoding.
Needed infrastructure: Freedman's inequality for the natural filtration, a uniform-over-distributions concentration argument (the probabilistic method of Dudík et al.), measurability of the algorithm's run, and Azuma–Hoeffding. Freedman's inequality and the IPS estimator are reusable beyond this mission. Proofs of any milestone, and sharper or cleaner restatements proved as separate lemmas, are welcome.
Selected references
- A. Agarwal, D. Hsu, S. Kale, J. Langford, L. Li, R. E. Schapire, Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits, ICML 2014; arXiv:1402.0555v2. https://arxiv.org/abs/1402.0555
- P. Auer, N. Cesa-Bianchi, Y. Freund, R. E. Schapire, The nonstochastic multiarmed bandit problem, SIAM J. Comput. 32(1), 2002. https://doi.org/10.1137/S0097539701398375
- A. Beygelzimer, J. Langford, L. Li, L. Reyzin, R. E. Schapire, Contextual bandit algorithms with supervised learning guarantees, AISTATS 2011. https://arxiv.org/abs/1002.4058
- M. Dudík, D. Hsu, S. Kale, N. Karampatziakis, J. Langford, L. Reyzin, T. Zhang, Efficient optimal learning for contextual bandits, UAI 2011. https://arxiv.org/abs/1106.2369
- J. Langford, T. Zhang, The epoch-greedy algorithm for contextual multi-armed bandits, NIPS 2007. https://papers.nips.cc/paper/3178-the-epoch-greedy-algorithm-for-multi-armed-bandits-with-side-information
- D. A. Freedman, On tail probabilities for martingales, Ann. Probab. 3(1), 1975. https://doi.org/10.1214/aop/1176996452