On the Complexity of Best Arm Identification in Multi-Armed Bandit Models
Emilie Kaufmann, Olivier Cappé, Aurélien Garivier
Introduction
In order to identify , the agent must use a strategy defining which arms to sample from, when to stop sampling, and which set to choose. More precisely, its strategy consists in a triple in which :
the sampling rule determines, based on past observations, which arm is chosen at time ; in other words, is -measurable, with ;
the recommendation rule provides the arm selection and is a -measurable random subset of of size .
In order to unify and compare these approaches, we define the complexity (resp. ) of best-arm identification in the fixed-confidence (resp. fixed-budget) setting as follows:
Heuristically, on the one hand for a given bandit model , and a small value of , a fixed-confidence optimal strategy needs an average number of samples of order to identify the best arms with probability at least . On the other hand, for large values of the probability of error of a fixed-budget optimal strategy is of order , which means that a budget of approximately draws is required to ensure a probability of error of order . Most of the existing performance bounds for the fixed confidence and fixed budget settings can indeed be expressed using these complexity measures.
In this paper, we aim at evaluating and comparing these two complexities. To achieve this, two ingredients are needed: a lower bound on the sample complexity of any -PAC algorithm (resp. on the failure probability of any consistent algorithm) and a -PAC (resp. consistent) strategy whose sample complexity (resp. failure probability) attains the lower bound (often referred to as a ’matching’ strategy). We present below new lower bounds on and that feature information-theoretic quantities as well as strategies that match these lower bounds in two-armed bandit models.
A particular class of algorithms will be considered in the following: those using a uniform sampling strategy, that sample the arms in a round-robin fashion. Whereas it is well known that when uniform sampling is not desirable, it will prove efficient in some examples of two-armed bandits. This specific setting, relevant in practical applications discussed in Section 3, is studied in greater details along the paper. In this case, an algorithm using uniform sampling can be regarded as a statistical test of the hypothesis against based on paired samples () of ; namely a test based on a fixed number of samples in the fixed-budget setting, and, a sequential test in the fixed-confidence setting, in which a (random) stopping rule determines when the experiment is to be terminated.
where denotes the Kullback-Leibler divergence between distributions and . This bound was later generalized by Burnetas and Katehakis 1996 to distributions that depend on several parameters. Since then, non-asymptotic analyses of efficient algorithms matching this bound have been proposed. Optimal algorithms include the KL-UCB algorithm of Cappé et al. 2013—a variant of UCB1 (Auer et al. 2002) using informational upper bounds, Thompson Sampling (Kaufmann et al. 2012b; Agrawal and Goyal 2013), the DMED algorithm (Honda and Takemura 2011) and Bayes-UCB (Kaufmann et al. 2012a). This paper is a contribution towards similarly characterizing the complexity of pure exploration, where the goal is to determine the best arms without trying to maximize the cumulative observations.
Bubeck et al. 2011 show that in the fixed-budget setting, when , any sampling strategy designed to minimize regret performs poorly with respect to the simple regret , which is closely related to the probability of recommending the wrong arm. Therefore, good strategies for best-arm identification need to be quite different from regret-minimizing strategies. We will show below that the complexities and of best-arm identification also involve information terms, but these are different from the Kullback-Leibler divergence featured in Lai and Robbins’ lower bound on the regret.
The problem of best-arm identification has been studied since the 1950s under the name ‘ranking and identification problems’. The first advances on this topic are summarized in the monograph by Bechhofer et al. 1968 who consider the fixed-confidence setting and strategies based on uniform sampling. In the fixed confidence setting, Paulson 1964 first introduces a sampling strategy based on eliminations for single best arm identification: the arms are successively discarded, the remaining arms being sampled uniformly. This idea was later used for example by Jennison et al. 1982; Maron and Moore 1997 and by Even-Dar et al. 2006 in the context of bounded bandit models, in which each arm is a probability distribution on $mm>1$ was considered for example by Heidrich-Meisner and Igel 2009, in the context of reinforcement learning. Kalyanakrishnan et al. 2012 later proposed an algorithm that is no longer based on eliminations, called LUCB (for Lower and Upper Confidence Bounds) and still designed for bounded bandit models. Bounded distributions are in fact particular examples of distributions with subgaussian tails, to which the proposed algorithms can be easily generalized. A relevant quantity introduced in the analysis of algorithms for bounded (or subgaussian) bandit models is the ‘complexity term’
Recent works have focused on obtaining upper bounds on the number of samples whose dependency in terms of the squared-gaps (for subgaussian arms) is optimal when the ’s go to zero, and remains fixed. Karnin et al. 2013 and Jamieson et al. 2014 exhibit -PAC algorithms for which there exists a constant such that, with high probability, the number of samples used satisfies
and Jamieson et al. 2014 show that the dependency in is optimal when goes to zero. However, the constant is large and does not lead to improved upper bounds on the complexity term .
For , the work of Mannor and Tsitsiklis 2004 provides a lower bound on in the case of Bernoulli bandit models, under the following -relaxation sometimes considered in the literature. For some tolerance parameter the agent has to ensure that is included in the set of optimal arms with probability at least . This relaxation has to be considered, for example, when , but has never been considered in the literature for the fixed-budget setting. In this paper, we focus on the case that allows for a comparison between the fixed-confidence and fixed-budget settings. Mannor and Tsitsiklis 2004 show that if an algorithm is -PAC, then in the bandit model such that , for some , there exists two sets and and a positive constant such that
The fixed-budget setting has been studied by Audibert et al. 2010; Bubeck et al. 2011 for single best-arm identification in bounded bandit models. For multiple arm identification (), still in bounded bandit models, Bubeck et al. 2013b introduce the SAR (for Successive Accepts and Rejects) algorithm. An upper bound on the failure probability of the SAR algorithm yields .
For , Audibert et al. 2010 prove an asymptotic lower bound on the probability of error for Bernoulli bandit models. They state that for every algorithm and every bandit problem such that , , there exists a permutation of the arms such that
Gabillon et al. 2012 propose the UGapE algorithm for best-arm identification for . By changing only one parameter in some confidence regions, this algorithm can be adapted either to the fixed-budget or to the fixed-confidence setting. However, a careful inspection shows that UGapE cannot be used in the fixed-budget setting without the knowledge of the complexity term . This drawback is shared by other algorithms designed for the fixed-budget setting, like the UCB-E algorithm of Audibert et al. 2010 or the KL-LUCB-E algorithm of Kaufmann and Kalyanakrishnan 2013.
2 Content of the Paper
The gap between lower and upper bounds known so far does not permit to identify exactly the complexity terms and defined in (1). Not only do they involve imprecise multiplicative constants but by analogy with the Lai and Robbins’ bound for the expected regret, the quantities presented above are only expected to be relevant in the Gaussian case.
The improvements of this paper mainly concern the fixed-confidence setting, which will be considered in the next three Sections. We first propose in Section 2 a distribution-dependent lower bound on that holds for and for general classes of bandit models (Theorem 4). This information-theoretic lower bound permits to interpret the quantity defined in (2) as a subgaussian approximation.
Theorem 6 in Section 3 proposes a tighter lower bound on for general classes of two-armed bandit models, as well as a lower bound on the sample complexity of -PAC algorithms using uniform sampling. In Section 4 we propose, for Gaussian bandits with known—but possibly different—variances, an algorithm exactly matching this bound. We also consider the case of Bernoulli distributed arms, for which we show that uniform sampling is nearly optimal in most cases. We propose a new algorithm using uniform sampling and a non-trivial stopping strategy that is close to matching the lower bound.
Section 5 gathers our contributions to the fixed-budget setting. For two-armed bandits, Theorem 12 provides a lower bound on that is in general different from the lower bound obtained for in the fixed-confidence setting. Then we propose matching algorithms for the fixed-budget setting that allow for a comparison between the two settings. For Gaussian bandits, we show that , whereas for Bernoulli bandits , proving that the two complexities are not necessarily equal. As a first step towards a lower bound on when , we also give in Section 5 new lower bounds on the probability of error of any consistent algorithm, for Gaussian bandit models.
Section 6 contains numerical experiments that illustrate the performance of matching algorithms for Gaussian and Bernoulli two-armed bandits, comparing the fixed-confidence and fixed-budget settings.
Our contributions follow from two main mathematical results of more general interest. Lemma 1 provides a general relation between the expected number of draws and Kullback-Leibler divergences of the arms’ distributions, which is the key element to derive the lower bounds (it also permits, for example, to derive Lai and Robbin’s lower bound on the regret in a few lines). Lemma 7 is a tight deviation inequality for martingales with sub-Gaussian increments, in the spirit of the Law of Iterated Logarithm, that permits here to derive efficient matching algorithms for two-armed bandits.
Generic Lower Bound in the Fixed-Confidence Setting
Introducing the Kullback-Leibler divergence of any two probability distributions and :
we make the assumption that there exists a set of probability measures such that for all , for and that satisfies
A class of bandit models satisfying this property is called identifiable.
All the distribution-dependent lower bounds derived in the bandit literature (Lai and Robbins 1985; Mannor and Tsitsiklis 2004; Audibert et al. 2010, e.g.,) rely on changes of distribution, and so do ours. A change of distribution relates the probabilities of the same event under two different bandit models and . The following lemma provides a new, synthetic, inequality from which lower bounds are directly derived. This result, proved in Appendix A, encapsulates the technical aspects of the change of distribution. The main ingredient in its proof is a lower bound on the expected log-likelihood ratio of the observations under two different bandit models which is of interest on its own and is stated as Lemma 19 in Appendix A. To illustrate the interest of Lemma 1 even beyond the pure exploration framework, we give in Appendix B a new, simple proof of Burnetas and Katehakis 1996’s generalization of Lai and Robbins’ lower bound in the regret minimization framework based on Lemma 1.
Let be the number of draws of arm between the instants 1 and and be the total number of draws of arm by some algorithm .
Let and be two bandit models with arms such that for all , the distributions and are mutually absolutely continuous. For any almost-surely finite stopping time with respect to ,
where is the binary relative entropy, with the convention that .
This result can be considered as a generalization of Pinsker’s inequality to bandit models: in combination with the inequality , it yields:
However, it is important in this paper not to use this weaker form of the statement, as we will consider events of probability very close to or . In this regime, we will make use of the following inequality:
We now propose a non-asymptotic lower bound on the expected number of samples needed to identify the best arms in the fixed confidence setting, which straightforwardly yields a lower bound on .
Theorem 4 holds for an identifiable class of bandit models of the form:
such that the set of probability measures satisfies Assumption 3 below.
For all such that , for all ,
These continuity conditions are reminiscent of the assumptions of Lai and Robbins 1985; they include families of parametric bandits continuously parameterized by their means (e.g., Bernoulli, Poisson, exponential distributions).
Let , where is defined by (4), and assume that satisfies Assumption 3; any algorithm that is -PAC on satisfies, for ,
Proof. Without loss of generality, one may assume that the arms are ordered such that . Thus . Let be a -PAC algorithm and fix . For all , from Assumption 3 there exists an alternative model
in which the only arm modified is arm , and is such that:
where the last inequality follows from (3). From the definition of the alternative model, one obtains for or respectively, for every ,
This inequality can be made tighter for values of that are sufficiently close to zero, for which the right-hand-side can then be made arbitrarily close to .
Lemma 1 can also be used to improve the result of Mannor and Tsitsiklis 2004 that holds for under the -relaxation described before. Combining the changes of distribution of this paper with Lemma 1 yields, for every and ,
where denotes the cardinal of the set and the Bernoulli distribution of mean .
2 Bounds on the Complexity for Exponential Bandit Models
Theorem 4 yields the following lower bound on the complexity term:
Thus, one may want to obtain strategies whose sample complexity can be proved to be of the same magnitude. The only algorithm that has been analyzed so far with an information-theoretic perspective is the KL-LUCB algorithm of Kaufmann and Kalyanakrishnan 2013, designed for exponential bandit models: that is
where belongs to a canonical one-parameter exponential family. This means that there exists a twice differentiable strictly convex function such that has a density with respect to some reference measure given by
Distributions from a canonical one-parameter exponential family can be parameterized either by their natural parameter or by their mean. Indeed , the mean of the distribution and . The mapping is strictly increasing, and the means are ordered in the same way as the natural parameters. Exponential families include in particular Bernoulli distributions, or Gaussian distributions with common variances (see Cappé et al. 2013 for more details about exponential families).
Improved Lower Bounds for Two-Armed Bandits
Two armed-bandits are of particular interest as they offer a theoretical framework for sequential A/B Testing. A/B Testing is a popular procedure used, for instance, for website optimization: two versions of a web page, say A and B, are empirically compared by being presented to users. Each user is shown only one version and provides a real-valued index of the quality of the page, , which is modeled as a sample of a probability distribution or . For example, a standard objective is to determine which web page has the highest conversion rate (probability that a user actually becomes a customer) by receiving binary feedback from the users. In standard A/B Testing algorithms, the two versions are presented equally often. It is thus of particular interest to investigate whether uniform sampling is optimal or not.
Let be an identifiable class of two-armed bandit models and let be such that . Any algorithm that is -PAC on satisfies, for all ,
Moreover, any -PAC algorithm using a uniform sampling strategy satisfies,
Obviously, one has . Theorem 6 implies in particular that . It is possible to give explicit expressions for the quantities and for important classes of parametric bandit models that will be considered in the next section.
The class of Gaussian bandits with known variances and , further considered in Section 4.1, is
The observation that, when the variances are different , will be shown to imply that strategies based on uniform sampling are sub-optimal (by a factor ).
The more general class of two-armed exponential bandit models, further considered in Section 4.2, is
where has density given by (5). There
Appendix C provides further useful properties of these quantities and in particular Figure 7 illustrates the property that for two-armed exponential bandit models, the lower bound on provided by Theorem 6,
is indeed always tighter than the lower bound of Theorem 4,
Interestingly, the changes of distribution used to derive the two results are not the same. On the one hand, for inequality (11), the changes of distribution involved modify a single arm at a time: one of the arms is moved just below (or just above) the other (see Figure 2, left). This is the idea also used, for example, to obtain the lower bound of Lai and Robbins 1985 on the cumulative regret. On the other hand, for inequality (10), both arms are modified at the same time: they are moved close to the common intermediate value but with a reversed ordering (see Figure 2, right).
We now give the proof of Theorem 6, in order to show how easily it follows from Lemma 1.
Proof of Theorem 6. Without loss of generality, one may assume that the bandit model is such that the best arm is . Consider any alternative bandit model in which . Let be the event , which belongs to
Using moreover that , one has
The result follows by optimizing over the possible model satisfying to make the right hand side of the inequality as large as possible. More precisely, for every , from the definition of , there exists for which
Matching Algorithms for Two-Armed Bandits
For specific instances of two-armed bandit models, we now present algorithms with performance guarantees that closely match the lower bounds of Theorem 6. For Gaussian bandits with known (and possibly different) variances, we describe in Section 4.1 an algorithm termed -Elimination that is optimal and thus makes it possible to determine the complexity . For Bernoulli bandit models, we present in Section 4.2 the SGLRT algorithm that uses uniform sampling and is close to optimal.
We focus here on the class of two-armed Gaussian bandit models with known variances presented in (8), where and are fixed. We prove that
by exhibiting a strategy that reaches the performance bound of Theorem 6. This strategy uses non-uniform sampling in case where and differ. When , we provide in Theorem 8 an improved stopping rule that is -PAC and results in a significant reduction of the expected number of samples used.
The -Elimination algorithm introduced in this Section can also be used in more general two-armed bandit models, where the distribution is -subgaussian. This means that the probability distribution satisfies
This covers in particular the cases of bounded distributions with support in $1/4\delta$-PAC and its sample complexity is bounded as in Theorem 9 below.
We start with the simpler case . Thus, the quantity introduced in Theorem 6 coincides with , which suggests that uniform sampling could be optimal. A uniform sampling strategy equivalently collects paired samples from both arms. The difference is normally distributed with mean and a -PAC algorithm is equivalent to a sequential test of versus such that both type I and type II error probabilities are bounded by . Robbins 1970 proposes the stopping rule
The recommendation rule chooses the empirically best arm at time . This procedure can be seen as an elimination strategy, in the sense of Jennison et al. 1982. The authors of this paper derive a lower bound on the sample complexity of any -PAC elimination strategy (whereas our lower bound applies to any -PAC algorithm) which is matched by Robbins’ algorithm: the above stopping rule satisfies
This value coincide with the lower bound on of Theorem 6 in the case of two-armed Gaussian distributions with similar known variance . This proves that in this case, Robbins’ rule (14) is not only optimal among the class of elimination strategies, but also among the class of -PAC algorithm.
Any -PAC elimination strategy that uses a threshold function (or exploration rate) smaller than Robbins’ also matches our asymptotic lower bound, while stopping earlier than the latter. From a practical point of view, it is therefore interesting to exhibit smaller exploration rates that preserve the -PAC property. The failure probability of such an algorithm is upper bounded, for example when , by
where is a sum of i.i.d. variables of distribution . Robbins 1970 obtains a non-explicit confidence region of risk at most by choosing . The dependency in is in some sense optimal, because the Law of Iterated Logarithm (LIL) states that almost surely. In this paper, we propose a new deviation inequality for a martingale with sub-Gaussian increments, stated as Lemma 7, that permits to build an explicit confidence region reminiscent of the LIL. A related result was recently derived independently by Jamieson et al. 2014.
Lemma 7 allows to prove Theorem 8 below, as detailed in Appendix E, where we also provide a proof of Lemma 7.
the elimination strategy is -PAC.
We refer to Section 6 for numerical simulations that illustrate the significant savings (in the average number of samples needed to reach a decision) resulting from the use of the less conservative exploration rate allowed by Theorem 8.
1.2 Mismatched Variances
In the case where , we rely on the -Elimination strategy, described in Algorithm 1 below. For , denotes the empirical mean of the samples gathered from arm up to time . The algorithm is based on a non-uniform sampling strategy governed by the parameter , that maintains the proportion of draws of arm 1 close to . At the end of every round , , and (where is defined at line 6 of Algorithm 1). The sampling schedule used here is thus deterministic.
If , the -elimination strategy using the exploration rate is -PAC on and satisfies, for every , for every ,
When , -elimination reduces, up to rounding effects, to the elimination procedure described in Section 4.1.1, for which Theorem 8 suggests an exploration rate of order . As the feasibility of this exploration rate when is yet to be established, we focus on Gaussian bandits with equal variances in the numerical experiments of Section 6.
2 Bernoulli Bandit Models
We consider in this section the class of Bernoulli bandit models
where each arm can be alternatively parameterized by the natural parameter of the exponential family, . Observing that in this particular case little can be gained by departing from uniform sampling, we consider the SGLRT algorithm (to be defined below) that uses uniform sampling together with a stopping rule that is not based on the mere difference of the empirical means.
When the arms are sampled uniformly, finding an algorithm that matches the bound of (7) boils down to determining a proper stopping rule. In all the algorithms studied so far, the stopping rule was based on the difference of the empirical means of the arms. For Bernoulli arms the 1/2-Elimination procedure described in Algorithm 1 can be used, as each distribution is bounded and therefore 1/4-subgaussian. More precisely, with as in Theorem 8, the algorithm stopping at the first time such that
has its sample complexity bounded by . Yet, Pinsker’s inequality implies that and this algorithm is thus not optimal with respect to the bound (7) of Theorem 6. The approximation suggests that the loss with respect to the optimal error exponent is particularly significant when both means are close to 0 or 1.
To circumvent this drawback, we propose the SGLRT (for Sequential Generalized Likelihood Ratio Test) stopping rule, described in Algorithm 2. The appearance of in the stopping criterion of Algorithm 2 is a consequence of the observation that it is related to the generalized likelihood ratio statistic for testing the equality of two Bernoulli proportions. To test against based on paired samples of the arms , the Generalized Likelihood Ratio Test (GLRT) rejects when
where denotes the likelihood of the observations given parameters and . It can be checked that the ratio that appears in the last display is equal to . This equality is a consequence of the rewriting
where denotes the binary entropy function. Hence, Algorithm (2) can be interpreted as a sequential version of the GLRT with (varying) threshold .
For this exploration rate, we were able to obtain the following asymptotic guarantee on the stopping time of Algorithm 2:
(see Lemma 26 in Appendix F for the proof of this result). By analogy with the result of Theorem 8 we conjecture that the analysis of Kaufmann and Kalyanakrishnan 2013—on which the result of Lemma 11 is based—is too conservative and that the use of an exploration rate of order should also lead to a -PAC algorithm. This conjecture is supported by the numerical experiments reported in Section 6 below. Besides, for this choice of exploration rate, Lemma 26 also shows that
The Fixed-Budget Setting
In this section, we focus on the fixed-budget setting and we provide new upper and lower bounds on the complexity term .
For two-armed bandits, we obtain in Theorem 12 lower bounds analogous to those of Theorem 6 in the fixed-confidence setting. We present matching algorithms for Gaussian and Bernoulli bandits. This allows for a comparison between the fixed-budget and fixed-confidence setting in these specific cases. More specifically, we show that for Gaussian bandit models, whereas for Bernoulli bandit models.
When and , we present a first step towards obtaining more general results, by providing lower bounds on the probability of error for Gaussian bandits with equal variances.
We present here an asymptotic lower bound on that directly yields a lower bound on . Moreover, we provide a lower bound on the failure probability of consistent algorithms using uniform sampling. The proof of Theorem 12 bears similarities with that of Theorem 6, and we provide it in Appendix G.1. However, it is important to note that the informational quantities and defined in Theorem 12 are in general different from the quantities and previously defined for the fixed-confidence setting (see Theorem 6). Appendix C contains a few additional elements of comparison between these quantities in the case of one-parameter exponential families of distributions.
Let be a two-armed bandit model such that . In the fixed-budget setting, any consistent algorithm satisfies
Moreover, any consistent algorithm using a uniform sampling strategy satisfies
Gaussian distributions. As the Kullback-Leibler divergence between two Gaussian distributions—(9)—is symmetric with respect to the means when the variances are held fixed, it holds that . To find a matching algorithm, we introduce the simple family of static strategies that draw samples from arm 1 followed by samples of arm 2, and then choose arm 1 if , where denotes the empirical mean of the samples from arm . Assume for instance that . Since , the probability of error of such a strategy is upper bounded by
The right hand side is minimized when , and the static strategy drawing times arm 1 is such that
This shows in particular that for Gaussian distributions the two complexities are equal:
Exponential families. For exponential family bandit models, it can be observed that
Consider a two-armed exponential bandit model and be defined by
For all , the static strategy that allocates samples to arm 1, and recommends the empirical best arm, satisfies .
Theorem 13, whose proof can be found in Appendix G.2, shows in particular that for every exponential family bandit model there exists a consistent static strategy such that
For two-armed Bernoulli bandit models, .
However, Lemma 27 shows that the strategy that uses uniform sampling and recommends the empirical best-arm satisfies , and matches the bound (17) of Theorem 12 (see Remark 28 in Appendix G.2). The fact that, just as in the fixed-confidence setting is very close to shows that the problem-dependent optimal strategy described above can be approximated by a very simple, universal algorithm that samples the arms uniformly. Figure 3 represents the different informational functions and when the mean varies, for two fixed values of . It can be observed that and are almost indistinguishable from and , respectively, while there is a gap between and .
2 Lower Bound on pt(ν)p_{t}(\nu) in More General Cases
Let and be two bandit models such that . Then
Let be a Gaussian bandit model such that and let
There exists a bandit model , , (see Figure 4) which satisfies and is such that
This result is to be compared to the lower bound of Audibert et al. 2010. While Theorem 16 does not really provide a lower bound on , the complexity term is close to the quantity that appears in Theorem 4 for the fixed-confidence setting (in the Gaussian case), which improves over the term featured in Theorem 4 of Audibert et al. 2010.
For , building on the same ideas, Theorem 17 provides a first lower bound, which we believe leaves room for improvement.
Let be such that and let
There exists and such that the bandit model described on Figure 4 satisfies and is such that
The proofs of Theorem 16 and Theorem 17 are very similar. For this reason, we provide in Appendix G.3 only the latter. Introducing the gaps defined in (2), the precise definition of the modified problems and in the statement of the two results is:
Numerical Experiments
In this section, we focus on two-armed models and provide experimental experiments designed to compare the fixed-budget and fixed-confidence settings (in the Gaussian and Bernoulli cases) and to illustrate the improvement resulting from the adoption of the reduced exploration rate of Theorem 8.
In Figure 5, we consider two Gaussian bandit models with known common variance: the ‘easy’ one is , corresponding to , on the left; and the ‘difficult’ one is , that is , on the right. In the fixed-budget setting, stars (’*’) report the probability of error as a function of . In the fixed-confidence setting, we plot both the empirical probability of error by circles (’O’) and the specified maximal error probability by crosses (’X’) as a function of the empirical average of the running times. Note the logarithmic scale used for the probabilities on the y-axis. All results are averaged over independent Monte Carlo replications. For comparison purposes, a plain line represents the theoretical rate which is a straight line on the log scale.
In the fixed-confidence setting, we report results for elimination algorithms of the form (14) for three different exploration rates . The exploration rate we consider are: the provably-PAC rate of Robbins’ algorithm (large blue symbols), the conjectured optimal exploration rate , almost provably -PAC according to Theorem 8 (bold green symbols), and the rate , which would be appropriate if we were to perform the stopping test only at a single pre-specified time (orange symbols). For each algorithm, the log probability of error is approximately a linear function of the number of samples, with a slope close to , where is the complexity. A first observation is that the ’traditional’ rate of is much too conservative, with running times for the difficult problem (right plot) which are about three times longer than those of other methods for comparable error rates. As expected, the rate significantly reduces the running times while maintaining proper control of the probability of failure, with empirical error rates (’O’ symbols) below the corresponding confidence parameters (represented by ’X’ symbols). Conversely, the use of the non-sequential testing threshold seems too risky, as one can observe that the empirical probability of error may be larger than on difficult problems. To illustrate the gain in sample complexity resulting from the knowledge of the means, we also represented in red the performance of the SPRT algorithm mentioned in the introduction of Section 5 along with the theoretical relation between the probability of error and the expected number of samples, materialized as a dashed line. The SPRT stops for such that .
Robbins’ algorithm is -PAC and matches the complexity (which is illustrated by the slope of the measures), though in practice the use of the exploration rate leads to huge gain in terms of number of samples used. It is important to keep in mind that running times play the same role as error exponents and hence the threefold increase of average running times observed on the rightmost plot of Figure 5 when using is really prohibitive.
On Figure 6, we compare on two Bernoulli bandit models the performance of the SGLRT algorithm described in Section 4.2 (Algorithm 2) using two different exploration rates, and , to the 1/2-elimination stopping rule (Algorithm 1) that stops when the difference of empirical means exceeds the threshold (for the same exploration rates). Plain lines also materialize the theoretical optimal rate and the rate attained by the 1/2-Elimination algorithm , where . On the bandit model (right) these two rates are very close and SGLRT mostly coincides with Elimination, but on the bandit model (left) the practical gain of the use of a more sophisticated stopping strategy is well illustrated. Besides, our experiments show that SGLRT using is -PAC on both the (relatively) easy and difficult problems we consider, unlike the other algorithms considered.
If one compares the results for the fixed-budget setting (in purple) to those for the best -PAC algorithm (or conjectured -PAC for SGLRT in the Bernoulli case), in green, one can observe that to obtain the same probability of error, the fixed-confidence algorithm usually needs an average number of samples that is about twice larger than the deterministic number of samples required by the fixed-budget setting algorithm. This remark should be related to the fact that a -PAC algorithm is designed to be uniformly good across all problems, whereas consistency is a weak requirement in the fixed-budget setting: any strategy that draws both arm infinitely often and recommends the empirical best is consistent. Figure 5 also shows that when the values of and are unknown, the sequential version of the test is no more preferable to its batch counterpart and can even become much worse if the exploration rate is chosen too conservatively. This observation should be mitigated by the fact that the sequential (or fixed-confidence) approach is adaptive with respect to the difficulty of the problem whereas it is impossible to predict the efficiency of a batch (or fixed-budget) experiment without some prior knowledge regarding the difficulty of the problem under consideration.
Conclusion
Our aim with this paper has been to provide a framework for evaluating, in a principled way, the performance of fixed-confidence and fixed-budget algorithms designed to identify the best arm(s) in stochastic environments.
For two-armed bandits, we obtained rather complete results, identifying the complexity of both settings in important parametric families of distributions. In doing so, we observed that standard testing strategies based on uniform sampling are optimal or close to optimal for Gaussian distributions with matched variance or Bernoulli distributions but can be improved (by non-uniform sampling) for Gaussian distributions with distinct variances. This latter observation can certainly be generalized to other models, starting with the case of Gaussian distributions whose variances are a priori unknown. In the case of Bernoulli distributions, we have also shown that fixed-confidence algorithms that use the difference of the empirical means as a stopping criterion are bound to be sub-optimal. Finally, we have shown, through the comparison of the complexities and , that the behavior observed when testing fully specified alternatives where fixed confidence (or sequential) algorithms may be ‘faster on average’ than the fixed budget (or batch) ones is not true anymore when the parameters of the models are unknown.
For models with more than two arms, we obtained the first generic (i.e. not based on the sub-Gaussian tail assumption) distribution-dependent lower bound on the complexity of best-arms identification in the fixed-confidence setting (Theorem 4). Currently available performance bounds for algorithms performing best-arms identification—those of Kaufmann and Kalyanakrishnan 2013 notably—show a small gap with this result and it is certainly of interest to investigate whether those analyses and/or the bound of Theorem 4 may be improved to bridge the gap. For the fixed-budget setting we made only a small step towards the understanding of the complexity of best-arms identification and our results can certainly be greatly improved.
Appendix A Changes of Distributions
Let and be two bandit models such that for all the distributions and are mutually absolutely continuous. For each , there exists a measure such that and have a density and respectively with respect to . One can introduce the log-likelihood ratio of the observations up to time under an algorithm :
Let be any stopping time with respect to . For every event (i.e., such that ),
To prove Lemma 1, we state a first inequality on the expected log-likelihood ratio in Lemma 19, which is of independent interest.
Let be any almost surely finite stopping time with respect to . For every event ,
Lemma 1 easily follows: introducing , the sequence of i.i.d. samples successively observed from arm , the log-likelihood ratio can be rewritten
Wald’s Lemma (see e.g., Siegmund 1985) applied to yields
Combining this equality with the inequality in Lemma 19 completes the proof.
Proof of Lemma 19. Let be a stopping time with respect to .
A.2 Proof of Lemma 15
The proof bears strong similarities with that of Lemma 1, but an extra ingredient is needed: Lemma 4 of Bubeck et al. 2013a, that provides a lower bound on the sum of type I and type II probabilities of error in a statistical test.
Let , be two probability distributions supported on some set , with absolutely continuous with respect to . Then for any measurable function , one has
Let and be two bandit models that do not have the same set of optimal arms. We denote by the subsets of , ordered so that (resp. ) is the set of best arms in problem (resp. ). One has
A.3 Proof of Lemma 18
The result for follows from the following calculation:
Observing that on the event , leads to:
Hence, the statement is true for all , and we have shown that for every ,
Let be a stopping time w.r.t. and .
Appendix B A Short Proof of Burnetas and Katehakis’ Lower Bound on the Regret
In the regret minimization framework, briefly described in the Introduction, a bandit algorithm only consists in a sampling rule (there is no stopping rule nor recommendation rule). The arms must be chosen sequentially so as to minimize the regret, that is strongly related to the number of draws of the sub-optimal arms (using the notation ):
The lower bound given by Lai and Robbins 1985 on the regret holds for families of distributions parameterized by a (single) real parameter. Their result has been generalized by Burnetas and Katehakis 1996 to larger classes of parametric distributions. The version we give here deals with identifiable classes of the form , where is a set of probability measures satisfying
Let be an identifiable class of bandit models. Consider a bandit algorithm such that for all having a unique optimal arm, for all , . Then, for all ,
Clearly, . From Lemma 1, applied to the stopping time a.s.,
The event is not very likely to hold under the model , in which the optimal arm should be drawn of order times, whereas it is very likely to happen under , in which arm 1 is sub-optimal and thus only drawn little. More precisely, Markov inequality yields
From the formulation (20), every algorithm that is uniformly efficient in the above sense satisfies
Figure 7 displays the geometric constructions corresponding to the complexity terms of Theorems 4 and 6, respectively. As seen on the picture, the convexity of the function , for any value of , implies that
It is well known that in exponential families, the Kullback-Leibler divergence between distributions parameterized by their natural parameter, , may be related to the Bregman divergence associated with the log-partition function :
From this representation, its is straightforward to show that
corresponds to the dual parameter ,
Indexing the distributions in the exponential family by their mean rather than their natural parameter and using the dual representation
where is the Fenchel conjugate of , similarly yields
;
Appendix D Proof of Theorem 9
by an union bound and Chernoff bound applied to . The choice of mentioned above ensures that the series in the right hand side is upper bounded by , which shows the algorithm is -PAC:
To upper bound the expected sample complexity, we start by upper bounding the probability that exceeds some deterministic time :
The last inequality follows from Chernoff bound and holds for such that Now, for we introduce
This quantity is well defined as goes to zero when goes to infinity. Then,
The following Lemma, whose proof can be found below, helps us bound this last quantity.
For every and , the following implication is true:
Applying Lemma 22 with , and leads to
Now for fixed, choosing and small enough leads to
where is a constant independent of . It can be noted that goes to infinity when goes to zero, but for a fixed ,
Proof of Lemma 22. Lemma 22 easily follows from the fact that for and ,
Indeed, it suffices to apply this statement to and . The mapping is increasing when . As , it suffices to prove that defined above satisfies .
where we use that for all , . Then, using that ,
For , , hence
which is equivalent to and concludes the proof.
Appendix E A Refined Exploration Rate for α\alpha-Elimination
According to (15), to prove Theorem 8 it is enough to show that for
if is a sum of i.i.d random variables, one has
Let . Using Lemma 7, one can write, choosing and ,
It can be shown numerically that for ,
Thus for , inequality (24) holds.
E.2 Proof of Lemma 7.
We start by stating three technical lemmas, whose proofs are partly omitted.
For every , every positive integer , and every integer such that ,
Let be such that . Then,
We use that to obtain the last inequality since this condition implies
For , let and .
Lemma 25 shows that for every ,
One chooses for such that (which ensures ). Using Lemma 24, one obtains that . Moreover,
using the lower bound on given in Lemma 24 and the fact that is upper bounded by 1.
Appendix F Bernoulli Bandit Models
Assume that . Recall the KL-LUCB algorithm of Kaufmann and Kalyanakrishnan 2013. For two-armed bandit models, this algorithm samples the arms uniformly and builds for both arms a confidence interval based on KL-divergence , with
Additionally, as mentioned before, is very close to the quantity and one has more precisely . Using all this, we can upper bound the probability of error of Algorithm 2 in the following way.
F.2 An Asymptotic Bound for the Stopping Time
Consider a strategy that uses uniform sampling and a stopping rule of the form
where is a continuous function such that and for all . Then for all ,
We can use Lemma 22 to bound the right term in the right hand side, which shows that there exists a constant independent of such that
Appendix G Upper and Lower Bounds in the Fixed-Budget Setting
Without loss of generality, assume that the bandit model is such that . Consider any alternative bandit model in which . Let be a consistent algorithm such that and consider the event . Clearly
Lemma 1 applied to the stopping time a.s. and the event gives
Taking the limsup and letting go to zero, one can show that
Optimizing over the possible model satisfying to make the right hand side of the inequality as small as possible gives the result.
G.2 An Optimal Static Strategy for Exponential Families
Bounding the probability of error of a static strategy using samples from arm 1 and samples from arm 2 relies on the following lemma.
The function , can be maximized analytically, and the value that realizes the maximum is given by
When , applying Lemma 27 with yields
which shows that the strategy using uniform sampling and recommending the empirical best arm matches the lower bound (17) in Theorem 12.
For every , multiplying by , taking the exponential of the two sides and using Markov’s inequality (this technique is often referred to as Chernoff’s method), one gets
Using that , we can compute the derivative of and see that this function as a unique minimum in given by
using that is one-to-one. One can also show that
G.3 Proof of Theorem 17
These two cases are very similar, and the idea is to propose an easier alternative model in which we change only arm and , the arms that are less drawn among the set of good and the set of bad arms. Assume that we are in Case 1. We introduce a Gaussian bandit model such that:
In good arm becomes a bad arm and bad arm becomes a good arm. One can easily check (or convince oneself with Figure 4) that and as already explained, and do not share their optimal arms. Thus Lemma 15 yields