| Bandit and strategy | |
|---|---|
| number of arms | |
| an arm, one of | |
| a second arm, compared with arm (as in ) | |
| reward distribution of arm , a member of a one-parameter exponential family, so fixed by its mean | |
| mean reward of arm | |
| vector of means ; a bandit is identified with it | |
| an alternative bandit, given by its vector of means | |
| common variance of Gaussian arms, known to the experimenter | |
| standard deviations of the two arms' Gaussian rewards in the two-arm results, known and possibly different | |
| best arm of the bandit , , assumed unique | |
| gap of arm , with arms sorted, and | |
| a round, equal to the number of samples taken so far | |
| arm sampled at round , chosen from the data of rounds | |
| number of samples of arm in rounds | |
| average of the rewards of arm seen up to round | |
| error level: the largest allowed probability of naming an arm that is not the best | |
| stopping time: the round at which the strategy stops, decided by the data up to that round | |
| arm the strategy names when it stops | |
| expectation when the arms have means | |
| probability when the arms have means | |
| Information and the lower bound | |
| Kullback-Leibler divergence, | |
| KL divergence from the family member with mean to the member with mean ; for Gaussian arms, for Bernoulli arms | |
| binary relative entropy, : the divergence between Bernoulli laws with means and | |
| set of alternative bandits whose best arm differs from | |
| sampling proportions: is the fraction of samples given to arm , and , so lies in the simplex | |
| optimal sampling proportions, the attaining the supremum that defines ; is the long-run share of arm under an optimal strategy | |
| characteristic time, : the minimal expected cost is as | |
| weighted mean of arm 1 and arm under the plan , (Step 3) | |
| ratio of arm 's share to the best arm's (Step 3) | |
| with : arm 's bracket divided by , at the ratio (Step 3) | |
| common value of the brackets divided by at the optimal plan (Step 3) | |
| log-likelihood ratio of the data up to a stopping time under one bandit against another (Step 1) | |
| Stopping and tracking | |
| log generalized likelihood ratio of against at round , when | |
| Chernoff's stopping statistic, : the evidence for the empirical best arm against its closest rival | |
| pooled mean of arms and , | |
| stopping threshold: the rule stops once exceeds it; for Bernoulli arms | |
| minimum share in C-tracking at round , : each target is projected so every arm gets at least this | |
| Tolerance | |
| tolerance: any arm whose mean is at least the best mean minus is acceptable | |
| LUCB's problem complexity, | |
| Constants | |
| constant in , which makes the lower bounds non-asymptotic | |
| exponent of the threshold for general exponential families, , Main results (b) | |
| constant of the threshold for general exponential families, , Main results (b) | |
| in Step 6, how far may move from for bandits in the small box around | |
| in Step 6, the rate at which grows inside the box around , ; it tends to as | |
| Paper symbols | |
| Garivier and Kaufmann write for the alternative | |
| Kaufmann et al.'s symbol for a stopping time ; the same paper writes for | |
Context. An A/B test, a treatment comparison, or a choice among simulation settings aims to name a winner; the rewards collected along the way serve only as data. Bandit theory calls this best arm identificationa bandit problem whose goal is to name the arm with the highest mean reward; rewards matter only as information. The experimenter chooses which arm to sample next, when to stop, and which arm to name. In the fixed-confidencethe error probability is fixed in advance and the number of samples is random; in the other setting, fixed budget, the number of samples is fixed and the error probability is minimized setting, the named arm may be wrong with probability at most the error level, the largest allowed probability of naming an arm that is not the best, and the cost is the expected sample count. Before 2016, elimination and confidence-bound algorithms such as LUCBlower and upper confidence bounds: sample the empirical best arm and its strongest rival, and stop once the leader's lower confidence bound clears every other arm's upper bound (Kalyanakrishnan et al., 2012) were proved optimal only up to constant factors. The exact cost was known only for two arms (Kaufmann et al., 2016).
On a bandit with the number of arms arms and mean vector , the mean rewards of the arms; a bandit is identified with this vector, every strategy with error at most needs at least the characteristic time of the bandit : is the smallest expected number of samples any strategy with error at most can achieve, as samples on average as . Here is the value of a game in which the experimenter chooses sampling proportions and an adversary picks the hardest-to-distinguish bandit with a different best arm. The maximizing proportions the optimal sampling proportions: is the long-run fraction of samples that an optimal strategy gives arm put most samples on the best arm and its closest rivals. They differ from uniform sampling and from reward-maximizing rules that pull the best arm almost every time. Garivier and Kaufmann's Track-and-Stop estimates from the data, steers the sample shares to follow that estimate, and stops once a generalized likelihood ratio testa test with statistic , the likelihood maximized over the parameters allowed by one hypothesis against the maximum over those allowed by the other; it rejects the second hypothesis when the statistic exceeds a threshold. Here the hypotheses are that one arm's mean is above, or below, another's separates the empirical best arm from every rival. Its expected sample count is .
Setting. Arm gives independent rewards from a distribution the reward distribution of arm , with mean with mean . Each belongs to a one-parameter exponential familydensities with respect to a fixed measure, one for each real ; each member is determined by its mean, so its mean fixes the distribution; the main examples are Bernoulli arms and Gaussian arms with a known variance the common variance of Gaussian arms, known to the experimenter. Write the Kullback-Leibler divergence from the family member with mean to the member with mean ; for Gaussian arms for the Kullback-Leibler divergence from the family member with mean to the one with mean . For Gaussian arms , and for Bernoulli arms , where the binary relative entropy , the divergence between Bernoulli laws with means and . The best arm , the arm with the highest mean is assumed uniquewhy: with two arms tied for the top, no amount of data names one of them with confidence , and the cost of separating the top two arms grows like as their means approach each other. When convenient, the arms are sorted as , with gaps the gap between the best mean and arm 's, for ; for the best arm, for and .
A strategy picks an arm the arm sampled at round , chosen from the data of rounds at round the round, equal to the number of samples taken so far from past data, stops at a stopping time the round at which the strategy stops; a stopping time, so whether it has occurred is decided by the data up to that round, and names an arm the arm the strategy names when it stops. Write expectation when the arms have means ; is the matching probability and for expectation and probability under . A strategy is -PACprobably approximately correct at level : on every bandit with a unique best arm it stops with probability 1 and names a wrong arm with probability at most if, on every bandit with a unique best arm, it stops with probability 1 and satisfies . Write the number of samples of arm in rounds for arm 's sample count through round , the average of the rewards of arm seen up to round ; is the vector of these averages for its sample average, and for the vector of averages. The lower bound tests against the bandits whose best arm differs from , the set of alternative bandits an alternative bandit, identified with its vector of means whose best arm differs from . A sampling plan is a probability vector sampling proportions: is the fraction of samples given to arm , and in the simplex the probability vectors on the arms, on the arms.
Main results. (a) The minimal cost (Garivier and Kaufmann, Theorem 1). Each sample of arm yields nats of expected evidence against an alternative . A plan collects nats per sample, and the adversary picks the alternative minimizing that rate. Define the characteristic time bySo counts the minimum samples per nat of evidence. For every , every -PAC strategy, and every with a unique best arm, . Since and , the expected stopping time is at least . The optimal proportions attain the supremum.
(b) Track-and-Stop attains it (Garivier and Kaufmann, Theorems 10 and 14 and Proposition 12). Track-and-Stop keeps close to while forcing about samples on every arm (Step 5). It stops at and names the empirical best arm. Here Chernoff's statistic , with the log generalized likelihood ratio of against : the evidence, in nats, by which the data favor the empirical best arm over its closest rival (Step 4) is the log generalized likelihood ratio testing that leader against its closest rival (Step 4), and the stopping threshold: the strategy stops once exceeds it; of order , for example on Bernoulli arms; a larger threshold lowers the error and costs samples is a stopping threshold. On Bernoulliwhy: the proof of correctness (Step 4) bounds the maximized Bernoulli likelihood by a mixture code for binary sequences; for other families a slightly larger threshold is proved instead arms, makes any sampling rule -PAC. Paired with the tracking rule, it givesmatching (a) asymptotically. For other exponential families, with why: the error bound sums, over all rounds , a term of order times powers of , which is finite only for and a constant a constant large enough that the error bound's sum over rounds is at most ; it depends only on and keeps the rule -PAC. For , the paper proves the same limit is at most .
(c) How big is. In general, has no closed form and does not decompose across arms. For Gaussian arms with variance , it matches the sum of inverse squared gaps within a factor of 2:Because , the term enters twice, giving . The cost therefore grows without bound as the top two means approach each other. To get the lower bound, apply Step 1 to alternatives that move a single arm: lift arm just past , or drop arm 1 just below . Each alternative bounds that arm's expected sample count, and summing over all arms yields the left inequality.
(d) Two arms (Kaufmann et al., Sections 3 and 4). For two arms, the cheapest alternative moves both arms to a common point between their means with equal divergence to , so in a common family. The minimal cost is about divided by that common divergence. For Gaussian arms with known, possibly unequal standard deviations the standard deviations of the two arms' Gaussian rewards, known and possibly different, equalizing gives and cost . The matching rule samples arm 1 on the fraction of rounds. That puts more samples on the noisier arm and minimizes , the variance of , for a fixed total. It stops once exceeds . With , this rule is -PAC and attains that cost. Equal sampling costs a factor . When the variances match, that factor is 1 and the rule reduces to Robbins' (1970) sequential test.
For two Bernoulli arms, equal sampling is nearly optimal; the stopping rule carries the gain. At conversion rates 0.2 and 0.1, a likelihood ratio test needs about half the samples of a mean-difference test with a sub-Gaussianwith tails at least as light as a Gaussian's: for every real , with the variance proxy; rewards in qualify with , which gives Hoeffding's inequality confidence width (computed here from the paper's formulas). That width assumes the worst-case variance 1/4 on , whereas a Bernoulli reward with mean 0.15 has variance about 0.13.
Garivier and Kaufmann's simulations separate both halves of Track-and-Stop. They averaged 3,000 runs at on two Bernoulli bandits, with means (0.5, 0.45, 0.43, 0.4) and (0.3, 0.21, 0.2, 0.19, 0.18). With direct tracking (D-tracking, Step 5), Track-and-Stop averaged 4,052 and 1,406 samples, against 8,437 and 2,716 for KL-LUCBLUCB (sample the empirical leader and its strongest rival, stop once the leader's lower bound clears every other arm's upper bound) with confidence bounds built from the Bernoulli divergence in place of LUCB's Hoeffding radius (Kaufmann and Kalyanakrishnan, 2013), the strongest earlier method. Two racingsampling all arms still in the race once per round and dropping the empirically worst arm when a test allows methods isolate the stopping and sampling gains. Chernoff-Racing replaces KL-Racing's confidence-interval elimination with the likelihood ratio test. On four arms that cut the cost from 9,590 to 4,516, halving it by the stopping rule alone. Tracking added little on four arms, where the top two shares nearly match (Step 3), but on five arms it dropped the cost from Chernoff-Racing's 3,078 to 1,406. There gives the top two arms shares of 0.336 and 0.251. A race instead splits samples equally between its last two arms, which is suboptimal whenever . A heuristic best-challengera heuristic rule that samples the empirical leader or its closest challenger so that their sample ratio follows ; it has no proof rule slightly beat D-tracking, without a proof. The authors report that in their simulations the threshold , which the proofs do not cover, stayed conservative in practice.
Consequences and limits. Wrong sampling proportions carry a permanent multiplicative penalty. On the four-arm bandit above, equal sampling raises the small- cost to 1.61 times (computed here). Reward-maximizing algorithms are likewise poor identifiers with a fixed budget (Bubeck et al., 2011, cited by Kaufmann et al.). Even with optimal tracking, the guarantee is asymptotic in . At on the four-arm problem, (computed here), just over half of what Track-and-Stop used. Because grows like (Step 6), the rule stops near the solving . For at a few thousand samples, nearly matches . That raises to about 4.5 and puts the predicted stop at samples (computed here), close to what Track-and-Stop used. Provably safe thresholds cost even more. On a hard two-arm Gaussian problem, Kaufmann et al.'s elimination rule ran about three times longer with the provably safe than with , while the smaller threshold still kept the error below . The fixed-time threshold let the error exceed .
The theory covers one-parameter families with a known variance and a unique best arm. By (c), the cost grows like , so when several arms nearly match the best, the fixed-confidence problem becomes very expensive. A tolerance the tolerance: any arm whose mean is at least the best mean minus is acceptable keeps it finite. For rewards in , LUCB accepts any arm within of the best and needs samples (Kalyanakrishnan et al., Theorem 6), with LUCB's problem complexity , the sum of inverse squared gaps with each gap raised to at least . Each arm's term is capped at . Track-and-Stop also has to recompute as estimates evolve and relies on forced exploration to recover from bad early estimates.
Any event a strategy can decide costs expected evidence at least the binary divergence of its two probabilities. Kaufmann et al.'s change-of-measure inequality (Lemma 1) drives every lower bound here. Let and be two bandits with mutually absolutely continuous arm distributions. Take an almost surely finite stopping time and an event decided by the data up to . Write the log-likelihood ratio of the data up to the stopping time : the sum over samples of , with the densities of arm under and for the log-likelihood ratio of those data under against , and the Kullback-Leibler divergence for the Kullback-Leibler divergence, equal to in the exponential family. ThenWald's identityfor i.i.d. increments summed up to a stopping time with finite mean, the expected sum is the increments' mean times (Wald, 1944) gives the equality, since each sample of arm adds an increment to with mean . For the inequality, , so Jensen's inequality given yields . The same bound holds on the complement of . Averaging both with weights and produces . For a -PAC strategy, take and an alternative with a different best arm. Then and , so the right side is at least . Pinsker's inequality, , gives only a constant here because and are at most 1 apart.
Applying Step 1 to all alternatives at once gives , and only a strategy that samples in the proportions can attain it. Garivier and Kaufmann apply Step 1 with to every . Write for arm 's expected share. Dividing by and taking the infimum over givesusing . Since , replacing by the supremum over yields the second inequality. The second inequality is tight only at , so any strategy attaining the lower bound must sample in those proportions.
The cheapest alternative moves the best arm and one rival to their weighted mean, so solves a single scalar equation. Sort the arms so . An alternative in need only lift some rival to at least arm 1's level, leaving every other arm unchanged at zero cost. Minimizing over is a convex problem; in a one-parameter exponential family, the minimum puts both arms at their weighted mean the weighted mean of the best arm and arm ; it depends on the plan . The inner infimum over therefore reduces to a minimum over the rivals:
At the maximizer the brackets must match; otherwise shifting weight from larger brackets to the smallest raises the minimum. Write and , with , so each bracket is . Since minimizes the bracket, the envelope theorem gives . Setting therefore determines each uniquely, with . Since , the common bracket is , and maximizing over givessubstituting and canceling for the last line. Because moves with through , the left side increases in . Bisection on , with one scalar inversion per arm, computes in time roughly proportional to .
The solution gives every arm positive weight, assigns smaller shares to worse rivals , and is continuous in , as Step 5 requires. For equal-variance Gaussian arms, splits in the ratio . Each divergence ratio is then , so the equation becomesThe best arm's share is the Euclidean norm of the rival shares. It is at least the largest rival share, at most their sum, and times each rival's share against equally good rivals. Its samples enter every comparison, while each rival's enter only its own. Bernoulli arms near 1/2 nearly obey this Gaussian rule. On the four-arm bandit above, and . Far from 1/2, the Bernoulli divergence is asymmetric, so the best arm need not get the largest share. Means 0.5, 0.1, and 0.02 give shares of about 39%, 42%, and 19%.
Chernoff's stopping rule is a likelihood ratio test whose statistic is the lower bound's objective evaluated on the data. For any two arms , let the log of the generalized likelihood ratio of against at round , each likelihood maximized over the means; be the log generalized likelihood ratio of against , each likelihood maximized over the means. Write for their pooled mean, with every quantity on the right evaluated at round . When ,and . Because precisely when , the empirical best arm attains the outer maximum in . The rule stops once and names that arm. By Step 3's closed form,the objective of (a) evaluated at the empirical means and sample proportions. The rule thus stops once the data hold about nats of evidence against every alternative, the amount Step 2 requires.
The threshold must keep the test valid under adaptive sampling. An error requires at some round for a suboptimal arm with . By a union bound over the suboptimal arms, it suffices to show that the probability of ever crossing is at most whenever . Let be the event that first crosses at round . On , . Because lies in the denominator's hypothesis, the maximized denominator is at least the true likelihood, so is at most times the integral of the maximized numerator over . That maximized likelihood is not a probability density, so the proof bounds it by a mixture density. On Bernoulli arms, the Krichevsky-Trofimov mixturethe Bernoulli likelihood averaged over a Beta(1/2,1/2) prior on the mean; it is a probability distribution on binary sequences (Krichevsky and Trofimov, 1981) lies within a factor of the maximized likelihood for samples, giving a joint factor . Summing over the disjoint events giveswhere draws the two arms' means from that prior while keeping the same sampling rule. With , the prefactor equals , and bounds the sum by . For other exponential families, a self-normalized deviation bounda bound on a sum of deviations divided by its own standard deviation that holds for all sample counts at once, so it survives adaptive sampling (Magureanu et al., 2014) replaces the mixture at the cost of the threshold .
Tracking the estimated proportions makes the sampling shares converge to , provided every arm is sampled about times. Tracking alone can starve an arm that looks poor early, leaving its estimate uncorrected. D-trackingthe direct tracking rule: sample the least-sampled arm if some arm has fewer than samples, otherwise the arm with the largest deficit pulls the least-sampled arm whenever any arm has fewer than samples; otherwise it picks the arm with the largest deficit . C-trackingthe cumulative tracking rule: sample the arm furthest behind the running sum of past targets, each target first projected so that every arm gets at least the share projects each round- target so every arm gets share at least , then at round pulls the arm furthest behind the running sum of past targets. C-tracking guarantees and keeps within of . Under either rule, every , so . Continuity of from Step 3 then makes the targets converge, so almost surely. Forced exploration rarely triggers once estimates settle, yet it is necessary. When , tracking without it can fail to stop with positive probability.
On a likely event the statistic grows like , which gives the expected stopping time . To bound , fix and a small box around where arm 1 stays best and stays within of . At horizon , forced exploration gives each arm at least about samples for every round . Let the good event be that stays in the box for all . Its failure probability is at most of order for a constant depending on and , a summable tail in . On this good event, tracking keeps within of for all . Continuity of Step 4's empirical objective then yields , with as .
For large enough that the tracking bound holds, evaluating at on the good event forces stopping by round whenever . With , the smallest satisfying is up to lower-order terms. Once passes both that crossing time and the tracking threshold, stopping after requires the good event at to fail. Summing therefore bounds by that crossing time plus a -free constant from the tracking threshold and the summed failure probabilities. Letting gives . The paper solves with a looser explicit bound, which introduces the factor in (b).
Terms
- Fixed confidence
- error at most guaranteed; minimize the expected number of samples
- Characteristic time
- ; minimal cost
- Optimal proportions
- the maximizing plan; any optimal strategy samples in these proportions
- Change of measure
- Chernoff stopping rule
- stop when the GLR statistic exceeds ; valid for any sampling
- Track-and-Stop
- track with forced exploration, stop by Chernoff's rule; asymptotically optimal
- Gaussian size of
- between and twice that, with
- Two Gaussian arms
- minimal cost ; sample arm 1 a fraction
- Two Bernoulli arms
- equal sampling nearly optimal; stop by a likelihood ratio test
- Tolerance
- accept any arm within of the best; LUCB needs , each gap raised to at least
Sources
- Aurélien Garivier and Emilie Kaufmann. Optimal Best Arm Identification with Fixed Confidence. COLT, 2016.
- Emilie Kaufmann, Olivier Cappé, and Aurélien Garivier. On the Complexity of Best-Arm Identification in Multi-Armed Bandit Models. Journal of Machine Learning Research, 2016.
- Shivaram Kalyanakrishnan, Ambuj Tewari, Peter Auer, and Peter Stone. PAC Subset Selection in Stochastic Multi-armed Bandits. ICML, 2012.
- Abraham Wald. On Cumulative Sums of Random Variables. Annals of Mathematical Statistics, 1944.
- R. Krichevsky and V. Trofimov. The performance of universal encoding. IEEE Transactions on Information Theory, 1981.
- Emilie Kaufmann and Shivaram Kalyanakrishnan. Information Complexity in Bandit Subset Selection. COLT, 2013.
Connected notes
- Stein's paradox and the James-Stein estimatorBenign overfitting · Comparing noisy runs is an estimation problem
With effects spread around a common mean, the posterior mean pulls each raw estimate toward that mean, and Lindley's version of James-Stein estimates both the mean and the amount of pulling from the spread of the estimates themselves. It beats the raw estimates in total squared error for every configuration of the once there are four or more, and in Efron's batting example it cuts the total prediction error to 0.28 of that of the raw batting averages.
- Direct preference optimizationLearning from human preferences · Aiming at many good answers
Expected reward is linear in the policy, so its maximum is a vertex of the simplex, all mass on the best sequence, even for a reward that ranks every sequence correctly; the KL penalty makes the target the tilt , which puts mass wherever the reference does and concentrates on the best sequences only as .
- Learned KV-cache evictionEfficient sequence models · Comparing noisy runs is an estimation problem
By the note's rough estimate the difference between two average pass@1 scores, over about 120 problems with 16 samples each, has a standard deviation of at most about 0.016 before any training-seed variation, so gaps of 0.01 to 0.02 between eviction methods are not resolved.
- RL and the set of solvable problemsReinforcement learning for reasoning · Aiming at many good answers
On a 0/1 reward, RL raises the chance of solving problems the model often solves and can push it to zero on problems it rarely solves; in Yue et al.'s runs the starting model overtakes the trained one in pass@ as grows, and longer training raises pass@1 while pass@256 falls.