Regret, Bandits, and Guarantees
Chapter 12 left us with a shelf of acquisition functions, each a reasonable answer to the question of where to evaluate next. Choosing among them, or proposing a new one, needs a way to say that one optimizer is better than another. The everyday answer is a benchmark plot: the best value found against the number of evaluations, on a handful of test functions. Later chapters use such plots. This chapter asks for something sturdier: a score that is defined for every problem, and statements about that score that hold for every problem in a stated class.
The score is called regret, and its theory grew up around a problem simpler than Bayesian optimization: the multi-armed bandit, in which a gambler chooses again and again among a few slot machines with unknown payout rates. The bandit strips the exploration and exploitation trade-off of Section 11.3 down to its bones. In that setting we can count how much exploring an algorithm does, show that the best algorithms explore only logarithmically often, and prove that no algorithm can explore less. We then carry the analysis back to functions, where a Gaussian process turns infinitely many correlated arms into a problem with a measurable complexity, and the GP-UCB algorithm comes with a bound in terms of it.
The last section is the one to read even if you skip the proofs. A regret bound is a precise statement about a stylized problem. It says some useful things about practice and is silent about others, and the figures in this chapter let you see how far apart a bound and an algorithm's behavior can be.
13.1 Scoring an optimizer #
Picture two optimizers working on the running objective of Chapter 11. The first spends most of its evaluations near the taller peak. The second wanders over the whole domain for most of its budget and, at the end, recommends the same peak. Which one did better? It depends on whether the evaluations along the way cost something beyond their price: whether we care about the journey or only the destination. Two kinds of regret make the two answers precise.
We maximize an unknown function over a domain . Write for the best value and for an input that attains it, as in Equation (11.1). An optimizer evaluates at , possibly with noise, and after evaluations it recommends an input , usually the best one observed or the maximizer of the posterior mean.
The instantaneous regret of the -th evaluation is the shortfall of the input chosen,
The cumulative regret after evaluations adds up the shortfalls along the way, and the simple regret scores only the recommendation:
Regret is measured with the true at the chosen inputs, not with the noisy observations, and the optimizer can never compute it, because it does not know . Regret is the analyst's score: computable on a benchmark whose maximum is known, and the quantity that theorems bound.
Let . Optimizer A evaluates three inputs with values , , and . Its instantaneous regrets are , , and , so , and if it recommends its best input, . Optimizer B evaluates three inputs worth each. It has the same simple regret, , and a quarter of the cumulative regret, .
Since every is at most the range of , cumulative regret can grow at most linearly in . An optimizer that never learns, such as one that queries uniformly at random forever, does grow linearly: each evaluation costs the same amount on average. An optimizer is called no-regret when its cumulative regret grows sublinearly, more slowly than any straight line, so that the average regret tends to zero. A bound of the form says the average regret falls like ; a bound of the form says almost all late evaluations are spent at nearly optimal inputs.
A bound on cumulative regret also bounds the simple regret of the best input visited. The smallest of numbers is at most their average, so
This is how cumulative regret bounds become convergence rates for optimization (Srinivas et al., 2010). Two caveats come with it. With noisy observations, the optimizer does not know which of its inputs had the largest , so the best input visited is not the same as the best input it can identify; choosing what to report is a practical problem of its own (Section 14.2). And the converse fails: an optimizer that explores evenly can have small simple regret and linear cumulative regret. In the bandit problems of the next section the gap is sharp. On a fixed problem, the simple regret of uniform exploration falls exponentially with the budget, while algorithms that keep cumulative regret low have simple regret that falls only polynomially, because they stop sampling the near-best competitors as soon as they can (Bubeck et al., 2009; Lattimore and Szepesvári, 2020, ch. 33).
Which score to use depends on who pays for the evaluations. When tuning the hyperparameters of a model, or searching for a material, only the final recommendation is used; the evaluations along the way are a cost measured in compute or lab time, and simple regret is the right score. In an online experiment, every evaluation is a product variant shown to real users, and in a preference study, every option is something a person has to look at, wear, or listen to; there the path matters and cumulative regret is the right score. Section 19.6 describes a preference method with the better final answer and more than 2.5 times the cumulative regret of its competitor (Xu et al., 2024b).
A last distinction concerns what a bound quantifies over. A frequentist bound holds for every function in a stated class, such as all functions of a given smoothness. A Bayesian bound holds on average, or with high probability, over functions drawn from a prior. Both kinds appear in Section 13.4.
Simple regret scores the final recommendation; cumulative regret scores every evaluation along the way. Low cumulative regret implies low simple regret for the best input visited, but not the other way around.
Sources cited in Section 13.1 4
- Srinivas et al. (2010) Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design
- Bubeck et al. (2009) Pure Exploration in Multi-armed Bandits Problems
- Lattimore and Szepesvári (2020) Bandit Algorithms
- Xu et al. (2024b) Principled Preferential Bayesian Optimization
13.2 Multi-armed bandits #
Counting exploration requires a setting simple enough to count in. The multi-armed bandit is that setting. There are actions, called arms after the lever of a slot machine. Pulling arm returns a random reward whose distribution is fixed but unknown, with mean . A player pulls one arm per round for rounds and wants the largest total reward. The earliest rule for such a problem is Thompson's, from 1933 (Thompson, 1933); Robbins stated the problem formally in 1952, as a question in the sequential design of experiments, and introduced the notion of regret (Robbins, 1952; Lattimore and Szepesvári, 2020, ch. 4).
A bandit is Bayesian optimization with two simplifications. The domain is a finite set of inputs, and the inputs are unrelated: pulling arm 3 says nothing about arm 4. Everything else carries over, including the noise, the budget, and the tension between trying the arm that looks best and checking the ones that might be better.
In this section each reward is a coin flip: a pull of arm pays 1 with probability and 0 otherwise. Write for the best arm's mean and for the gap of arm , how much is lost on average each time it is pulled instead of the best arm. (In this section is an arm's mean reward; the symbol stays reserved for the posterior mean of a Gaussian process.)
The regret of a bandit algorithm is cumulative regret with the arm means in the role of : , where is the arm pulled in round . Because it uses the means rather than the coin flips that happened, it is sometimes called the pseudo-regret. Let count the pulls of arm in the first rounds. Grouping the sum by arm gives
The decomposition turns the problem into bookkeeping. Regret is the number of times each worse arm is pulled, weighted by how much worse it is. An algorithm keeps regret low by pulling bad arms rarely, but it can only learn that an arm is bad by pulling it. The whole subject is the question of how many pulls are enough.
Before reading about algorithms, try it yourself. The figure below hides the payout rates of five arms; you have 50 pulls.
You probably formed a favorite after two or three pulls per arm. Did you go back to an arm that started with two losses? With payout rates between 0.15 and 0.6, two losses in a row happen for the best arm 16% of the time, so abandoning an arm that early is a gamble. Each algorithm below is a rule for that decision.
13.2.1 Greedy and epsilon-greedy #
The simplest rule is greedy: pull every arm once, then always pull the arm with the highest average reward so far. It fails in an instructive way. If the best arm happens to pay 0 on its first pull, its average is 0, some worse arm's average is positive, and greedy may never pull the best arm again. That happens with a fixed positive probability, and when it does the regret grows linearly forever.
Epsilon-greedy repairs this by forcing exploration: in each round, with probability pull an arm chosen uniformly at random, and otherwise pull the greedy arm. Every arm is now pulled infinitely often, so every average converges to its mean. But the repair has a price that never stops being paid. With constant , every round spends probability on a uniformly random arm, which costs in expected regret per round, so regret grows linearly with slope at least that (Exercise 13.1). Auer, Cesa-Bianchi, and Fischer showed that letting decay as in round gives logarithmic regret, but only if (written in their paper) is a lower bound on the gap between the best and the second-best arm, which a player does not know. In their experiments no value of worked well for all the reward distributions they tried (Auer et al., 2002).
13.2.2 Where confidence bounds come from #
Forcing exploration at a fixed rate keeps pulling arms that are already known to be bad. A better rule explores an arm only while the evidence about it is still weak, and for that it needs a number: after pulls, how far from the arm's mean can its average plausibly be? The answer comes from concentration inequalities, bounds on the probability that an average strays from its mean by more than a given distance. Every upper bound on regret in this chapter rests on one, and the choice of inequality decides the constants and the logarithms in the algorithms built on it.
Fix one arm with mean , and let be of its rewards, independent and each in , with average . The question is how large the tail probability can be for a deviation . The lower tail, , works the same way, so we treat only the upper one.
Markov's inequality. A quantity that is never negative and has a small mean cannot often be large: if it were at least more than a fraction of the time, those occasions alone would push its mean above . For and ,
To see it, note that is at least times the indicator of the event (1 when the event happens, 0 when not), and take expectations of both sides. The average is never negative and has mean , so . For a fair coin and that is , and it stays however many rewards are averaged. Markov's inequality knows only the mean, and the mean of an average does not change with .
Chebyshev's inequality. The cure is to apply Markov's inequality to something that does shrink with . The squared deviation has mean , because the variance of a sum of independent terms is the sum of their variances (Section 2.7) and dividing a sum by divides its variance by . The event implies , so
(Chebyshev's inequality bounds both tails together, and so each one.) For a coin, , at most (Section 2.6.2). The bound now falls like , but turned around it is expensive. Setting the right side to a target failure probability gives the width , which grows like . Bandit algorithms need very small failure probabilities, as small as in round for the algorithm of the next subsection, and a width that grows like would keep every arm in play forever. The truth is much better. By the central limit theorem an average of many independent terms is close to Gaussian (Section 4.1.2), and a Gaussian's tail falls like in the number of standard deviations, not like .
The Chernoff method. Markov's inequality applied to an exponential captures that behavior (Lattimore and Szepesvári, 2020, ch. 5). For any , the event is the same as the event , and the exponential turns the sum inside the average into a product, . The expectation of a product of independent factors is the product of their expectations, because their joint distribution factorizes (Definition 2.8). What remains is a bound on one factor, and the condition that supplies it has a name.
A random variable with mean zero is -sub-Gaussian if, for every real ,
A Gaussian with mean zero and standard deviation satisfies this with equality, so the condition says that the tails of are no heavier than that Gaussian's. Bounded variables qualify too. By Hoeffding's lemma, a variable with mean zero that always lies in an interval is -sub-Gaussian (Lattimore and Szepesvári, 2020, ch. 5). A reward in minus its mean is therefore -sub-Gaussian, and noise with mean zero that is never larger than in absolute value is -sub-Gaussian. (The letter follows the papers cited below; it is not the regret .)
With this condition the Chernoff method gives Hoeffding's inequality, which Hoeffding proved for sums of bounded random variables (Hoeffding, 1963): for rewards in ,
- By Equation (13.4) applied to with , and the product above, for every .
- Each is -sub-Gaussian, so each factor is at most , and the bound becomes .
- The exponent is a parabola in , smallest at , where it equals . Step 1 holds for every , so it holds for this one: .
- Rewards in have , which gives Equation (13.6).
Turned around, Hoeffding's inequality says that with probability at least , the average is below . The failure probability now enters through its logarithm. Shrinking from 0.05 to widens a Hoeffding interval by a factor of 2.1 and a Chebyshev interval by a factor of 224. Applied to a Gaussian with standard deviation 1, the same method gives , and a direct calculation halves this (Srinivas et al., 2010, Lemma 5.1), so both tails together have probability at most . That is the Gaussian bound in step 1 of the GP-UCB proof in Section 13.4.3.
The union bound. An algorithm does not use one interval. It uses one per arm in every round, and its analysis needs them all to hold, or at least needs to count how often one fails. The tool is elementary: the probability that at least one of several events happens is at most the sum of their probabilities,
because an outcome in which any of the events happens is counted at least once on the right. This union bound asks nothing about how the events depend on one another. To make intervals hold together with probability at least , give each the failure probability . With Hoeffding's inequality the width becomes
so the number of intervals enters as an additive under the square root. With Chebyshev's inequality the width would grow like . An exponential tail is what makes many simultaneous intervals affordable.
This is where the logarithms in bandit algorithms come from. An interval that must hold in every round up to a horizon needs and pays ; one for each of arms in every round pays . When the horizon is not known in advance, the budget can be spread unevenly instead, giving round the share . The shares add up to because , and the width in round has in place of , so it grows like . GP-UCB's is this construction with one more union, over the inputs (Section 13.4.3). UCB1, in the next subsection, sets the failure probability of each interval to in round . Solving for gives , the bonus of Equation (13.9). The exponent 4 pays for a union of its own: in round two arms being compared can have been pulled any numbers of times up to , about combinations of counts, and still adds up to a finite total over all rounds.
When the data choose the sample size. Hoeffding's inequality is about an average of rewards with fixed before the rewards are seen. A bandit algorithm decides how often to pull an arm from the rewards it has seen, and an arm that starts badly is pulled less. A reader may wonder whether that matters, since each reward is still an honest draw. It does. Flip a fair coin and stop as soon as heads lead tails. The average at the moment of stopping is always above one half, and stopping is likely: it happens within 100 flips with probability 0.92, and within 1000 flips with probability 0.97. For every fixed , Hoeffding's inequality still holds for the average of the first flips; it says nothing about the average at an chosen by looking at the flips.
The bandit analyses repair this with the union bound. Picture each arm's rewards as a list drawn before play begins, with the algorithm choosing only how far down each list to read; this model gives the same probabilities to everything the algorithm sees (Lattimore and Szepesvári, 2020, sec. 4.6). For each fixed , the first entries of a list are independent rewards, so Hoeffding's inequality applies to every separately, and a union over covers whichever count the algorithm reaches. That union is the above. It is not a formality. If the single-round width is used at every count, the interval of a fair coin with fails at least once within 1000 pulls with probability 0.11, more than twice , and within 10,000 pulls with probability 0.15, because the largest swings of a running average shrink slightly more slowly than (see Lattimore and Szepesvári, 2020, ex. 20.9). With the width of the uneven split above, the same probability within 1000 pulls is : the union bound is safe, and here very cautious. (These probabilities, like those for the fair coin above, are computed exactly, by tracking the distribution of the number of heads flip by flip.) A Gaussian process is harder still, because each evaluation changes the estimate everywhere, with weights that depend on where the algorithm chose to look; Section 13.4.5 gives the tool for that case.
The figure puts the three inequalities side by side for a coin.
Some things to try.
Read the default. For a fair coin and , the chance that 100 flips average 0.6 or more is 0.028. Hoeffding's inequality bounds it by 0.14, Chebyshev's by 0.25, and Markov's by 0.83. The readout gives the number of flips from which each curve stays below 0.05: 76 for the exact probability, 150 for Hoeffding's bound, 500 for Chebyshev's, and never for Markov's.
Move the marker to . The exact probability is and Hoeffding's bound , while Chebyshev's is still 0.025. The exact curve and Hoeffding's fall at nearly the same exponential rate, and the gap between them grows only slowly, from a factor of about 5 at to 15 at ; Chebyshev's is a straight line on these axes, falling only like .
Set the union to 1000. Every bound is multiplied by 1000. Hoeffding's now stays below 0.05 from 496 flips instead of 150, an extra ; Chebyshev's from 500,000 instead of 500, a thousand times as many. The exact probability for 1000 independent averages needs 381 flips. This is the of Equation (13.8), seen from the side of the sample size.
Move the mean to 0.1, with the union back at 1. A coin that rarely pays has variance 0.09 instead of 0.25, and its exact probability stays below 0.05 from 36 flips. Chebyshev's bound, which uses the variance, improves to 180 flips; Hoeffding's, which knows only that rewards lie in , stays at 150, and at it gives 0.14 against an exact 0.002. Inequalities that use the variance as well, such as Bernstein's, recover much of this gap (Lattimore and Szepesvári, 2020, ex. 5.14).
A confidence width pays for two things: how fast the tail of an average falls, which for bounded rewards Hoeffding's inequality bounds by , and how many intervals must hold at once, which the union bound charges as an additive logarithm. UCB1's bonus, , is both prices together.
13.2.3 Optimism: UCB1 #
A better rule follows from the principle that Section 12.4 called optimism in the face of uncertainty. For each arm, compute the largest mean that is still plausible given its rewards so far, and pull the arm whose plausible best is largest. An arm pulled often has a tight interval, so its plausible best is close to its average. An arm pulled rarely has a wide interval and a generous plausible best, so it gets another look. A clearly bad arm stops being pulled once its interval has shrunk below the best arm's mean.
How wide should the interval be? For rewards in , Hoeffding's inequality (Equation (13.6)) says that the average of independent rewards overestimates the mean by more than with probability at most , and likewise underestimates it. Choosing the width so that this probability is in round , for the reason given in Section 13.2.2, gives the UCB1 rule of Auer et al. (2002): after pulling each arm once, pull
where is the number of times arm has been pulled so far and is its average reward. The bonus shrinks like as an arm is pulled and grows like for arms left alone, so no arm is abandoned for good, yet a bad arm is revisited only rarely.
For any arms with reward distributions supported in , the expected regret of UCB1 after any number of rounds is at most
The proof is worth seeing in outline, because the same three moves reappear in the Gaussian process bound of Section 13.4: a confidence interval that holds with high probability, an argument that optimism costs at most the width of the interval, and a count of how often intervals can be wide.
Fix a suboptimal arm and write for the bonus of an arm pulled times by round . This is a sketch of the proof of Theorem 1 in Auer et al. (2002).
- By Hoeffding's inequality, an average of rewards misses its mean by more than in a given direction with probability at most .
- Suppose arm has already been pulled times. Then for every , by solving the inequality for .
- If neither interval fails, the best arm's index is at least , and arm 's index is at most . So arm cannot win the comparison, and it is pulled only when one of the two intervals has failed.
- In round each arm can have been pulled any number of times up to . By the union bound (Equation (13.7)), adding the failure probability of step 1 over both arms' possible counts gives at most , and summing over all rounds gives at most extra pulls in expectation.
- Together, . Multiplying by and summing over arms, as Equation (13.3) says, gives the theorem.
The bound depends on the problem through the gaps. Arms that are much worse than the best are discarded quickly and contribute little; arms that are nearly as good contribute each, which is large for small . The upper confidence bound rule of Section 12.4 is the same idea with the posterior standard deviation of a Gaussian process in place of the Hoeffding width.
13.2.4 Thompson sampling #
The oldest rule is Bayesian. Treat each unknown mean as a random quantity with a prior, keep its posterior up to date, and in each round pull each arm with the probability that it is the best one. Thompson's trick is that this probability never has to be computed: draw one plausible mean from each arm's posterior, and pull the arm whose draw is largest (Thompson, 1933).
For coin-flip rewards the posterior is a Beta distribution. Starting from a uniform prior, an arm with wins and losses has posterior , the conjugate update of Section 5.2. Its mean is close to the arm's average, and its spread shrinks as the arm is pulled.
Input: arms, horizon .
- Set and for every arm.
- In each round , draw independently for each arm.
- Pull and observe the reward .
- If , increase by one; otherwise increase by one.
Exploration comes from the randomness of the draws. An arm with few pulls has a wide posterior and sometimes produces a high draw; an arm with many pulls and a low average almost never does. Thompson's rule was not widely circulated, and it became popular only after several groups rediscovered it around 2010 and found it strong in experiments, before any proof existed (Lattimore and Szepesvári, 2020, ch. 36). Agrawal and Goyal (2012) then gave the first proof that its expected regret grows logarithmically, and Kaufmann et al. (2012) and Agrawal and Goyal (2013) showed that for Bernoulli rewards its leading constant is the best possible, the constant of the lower bound in the next section. The Gaussian process version of the rule, which draws a whole function from the posterior and evaluates where the draw is largest, is the Thompson sampling of Section 12.5.
13.2.5 Watching them play #
The figure below runs the three algorithms on the same arms many times and plots the average cumulative regret of each, with a band covering the middle 80% of runs. All three start from the same payout sequences in each run, so the differences come from the rules and not from luck.
Some things to try.
Switch on the log time axis. On a logarithmic time axis, regret that grows like is a straight line, and regret that grows linearly curves sharply upward. Thompson sampling settles onto a straight line after a few hundred rounds, and ε-greedy turns upward. UCB1 is still in between at this horizon: with a gap of 0.1, its cautious bonus keeps the second-best arm in play for thousands of rounds, and its curve straightens only later.
Set ε to 0. This is the greedy rule. The band widens: most runs settle on the best arm, and a few lock onto a worse arm and stay there. Set the runs to 1 and press New arms a few times to see individual outcomes.
Compare UCB1 and ε-greedy at the default horizon. With these arms, ε-greedy with has lower regret than UCB1 after 1000 rounds: UCB1's bonus is conservative and buys its guarantee with extra exploration. Raise the gap to 0.3 and the horizon to 5000. The straight line of ε-greedy eventually overtakes the logarithm of UCB1.
Show the UCB1 guarantee. The scale stretches to hold it. At the default settings, the bound of Theorem 13.1 is about 1100 at , more than twice the 450 that the worst possible play, always pulling the worst arm, would lose. The guarantee is true and, at this horizon, uninformative.
Watch Thompson sampling. It has the lowest regret here, and for most settings its curve sits below the dashed Lai-Robbins line. The next section explains why this is not a contradiction.
Sources cited in Section 13.2 9
- Thompson (1933) On the Likelihood that One Unknown Probability Exceeds Another in View of the Evidence of Two Samples
- Robbins (1952) Some Aspects of the Sequential Design of Experiments
- Lattimore and Szepesvári (2020) Bandit Algorithms
- Auer et al. (2002) Finite-time Analysis of the Multiarmed Bandit Problem
- Hoeffding (1963) Probability Inequalities for Sums of Bounded Random Variables
- Srinivas et al. (2010) Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design
- Agrawal and Goyal (2012) Analysis of Thompson Sampling for the Multi-armed Bandit Problem
- Kaufmann et al. (2012) Thompson Sampling: An Asymptotically Optimal Finite-Time Analysis
- Agrawal and Goyal (2013) Further Optimal Regret Bounds for Thompson Sampling
13.3 Lower bounds #
UCB1 and Thompson sampling both have regret that grows like . Could a cleverer algorithm do better, with regret bounded by a constant? Lai and Robbins (1985) answered no.
The intuition is about evidence. To stop pulling a worse arm, an algorithm must be confident that the arm is not secretly the best. Abandoning the best arm by mistake costs on the order of over the remaining rounds, so the probability of that mistake must be of order . The amount of evidence needed to rule out an alternative at that level grows like , and every pull of arm adds a fixed expected amount of evidence: the Kullback-Leibler divergence , the average log-likelihood ratio per pull between the hypothesis that the arm pays at rate and the hypothesis that it pays at rate . For coins,
which is zero when and grows as the two coins become easier to tell apart (Section 6.2 treats the divergence in general). Dividing the evidence needed by the evidence per pull gives about pulls of arm .
To make this a theorem, one has to exclude algorithms that are lucky on one problem by being terrible on others, such as the rule that always pulls arm 1, which has zero regret whenever arm 1 is best. An algorithm is consistent if on every bandit in the class its regret grows more slowly than every power of : for every .
For every consistent algorithm and every Bernoulli bandit with ,
This is the special case of a general result for reward distributions in a parametric family; Lattimore and Szepesvári state and prove the modern form (Lai and Robbins, 1985; Lattimore and Szepesvári, 2020, Thm. 16.2).
Three remarks connect the theorem to the algorithms above. First, UCB1 is logarithmic but not optimal. Pinsker's inequality gives , so each term of is at most , while the corresponding term of Theorem 13.1 is , at least 16 times larger. Thompson sampling with Beta posteriors attains exactly, in the limit (Kaufmann et al., 2012; Agrawal and Goyal, 2013).
Second, the theorem is about the limit, and the is doing real work. It says that the ratio of regret to cannot stay below forever. It does not say that at every finite , and an algorithm whose lower-order terms are negative can sit below that curve for a long time. That is what Thompson sampling does in Figure 13.3. The comparison the theorem licenses is between slopes on a logarithmic time axis, as grows large.
Third, the bound depends on the instance through its gaps, and it blows up as a gap shrinks. That does not mean regret becomes large when arms are nearly equal, since each pull of a nearly equal arm costs little. The worst case over all instances is a different quantity: for any algorithm and any $T \ge K
- 1$ there is a -armed bandit with Gaussian rewards on which its regret is at least (Lattimore and Szepesvári, 2020, Thm. 15.2). The gap that does the damage shrinks with , like : large enough to matter, small enough to be hard to detect. Instance-dependent bounds grow like with a problem-dependent constant; worst-case bounds grow like . Both views return for functions.
Sources cited in Section 13.3 4
- Lai and Robbins (1985) Asymptotically Efficient Adaptive Allocation Rules
- Lattimore and Szepesvári (2020) Bandit Algorithms
- Kaufmann et al. (2012) Thompson Sampling: An Asymptotically Optimal Finite-Time Analysis
- Agrawal and Goyal (2013) Further Optimal Regret Bounds for Thompson Sampling
13.4 From arms to functions #
Bayesian optimization has an arm for every input, infinitely many on a continuous domain. The bandit bounds above grow with the number of arms, either through the sum over gaps or through the of the worst case, and they say nothing when is infinite. What rescues the analysis is that the arms are no longer independent. A Gaussian process prior says that nearby inputs have similar values, so evaluating one input teaches about its neighbors. The number of arms has to be replaced by a measure of how many effectively different arms there are, and the maximum information gain is that measure.
13.4.1 The setting #
The analysis of Srinivas et al. (2010), which this section follows, takes the model of Section 8.3 at face value. The function is a draw from a Gaussian process, , with so that the prior standard deviation is at most 1 everywhere. Each evaluation returns with independent noise of known variance. For now the domain is finite, for instance a fine grid (the paper writes for this set); Section 13.4.4 relaxes this. A -armed bandit with Gaussian rewards is the special case of a kernel that is 1 on the diagonal and 0 elsewhere.
After evaluations, the posterior has mean and standard deviation , computed as in Equation (8.6). The GP-UCB rule is the optimism of UCB1 with the posterior in place of the Hoeffding interval:
The posterior mean plays the part of the empirical average, the posterior standard deviation plays the part of the bonus, and sets how many standard deviations of optimism to allow. This is the rule of Equation (11.3) with a weight that may change from round to round. As there and in Srinivas et al. (2010), multiplies the variance, so its square root multiplies the standard deviation; some texts and libraries call the multiplier of the standard deviation itself .
13.4.2 Maximum information gain #
How much can noisy evaluations teach about ? Section 6.5 answered this question, and the bound needs three facts from there. First, the mutual information between the observations at a set of inputs and the function, the part of the observations' uncertainty that reflects and not the noise, is
where is the kernel matrix of (Equation (6.15)). It depends on where we evaluate, not on what we observe, because the posterior variance of a Gaussian process does not depend on the observed values (Section 8.1). Second, the most that any evaluations could teach is the largest value this quantity can take.
The maximum information gain after evaluations is
is a property of the kernel, the domain, and the noise level, fixed before any data arrive.
Two extreme cases show its range. If all evaluations are made at the same input, they gain , which grows only logarithmically: repeating an evaluation teaches less and less, as Exercise 8.2 showed. If the kernel is diagonal, as in a -armed bandit, spreading the evaluations evenly over the arms is best, and grows like (Exercise 13.3). A smooth kernel lies between these: observations at nearby inputs are largely redundant, so the information grows much more slowly than for independent arms. A short lengthscale, a rough kernel, a high dimension, or low noise each make more of the domain distinguishable and increase .
Third, although computing the maximum exactly is intractable, it is easy to approximate. A new evaluation at adds exactly to the information (Equation (6.16)), so the greedy rule of always evaluating where the posterior variance is largest (uncertainty sampling, Section 6.5.1) reaches at least a fraction of (Srinivas et al., 2010). That is how the figure in Section 13.5 estimates .
13.4.3 The GP-UCB bound #
With in hand, the bound reads like a bandit bound with replaced.
Let be finite, , and
If is a draw from with and the noise is , GP-UCB with this satisfies, with probability at least ,
The proof follows the same three moves as the UCB1 sketch, and every step is elementary.
These are Lemmas 5.1 to 5.4 of the extended version of Srinivas et al. (2010).
- Confidence. Given the data, is Gaussian with mean and standard deviation , and a Gaussian lands more than standard deviations from its mean with probability at most (Section 13.2.2). A union bound over the inputs and over all rounds, with as in the theorem, makes hold for every and at once, with probability at least . The is , which spreads over the rounds.
- Optimism costs at most twice the width. On that event, since maximizes the upper bound, . Subtracting gives .
- The run's information. By Equation (6.16), the information gained by the inputs GP-UCB actually chose is a sum over rounds, . This is at most , the best any inputs could do.
- Variance into information. Write , which lies in because . On that interval the concave function lies above its chord, so with . Squaring step 2 and using , , with . Summing over rounds and using step 3, .
- Cauchy-Schwarz. . Taking square roots gives Equation (13.14).
Reading the result: grows like (and ), and grows sublinearly for the kernels used in practice, so grows like times slowly growing factors. GP-UCB is therefore no-regret, and by Equation (13.2), with probability at least , the best input it has evaluated is within of the maximum.
A finite domain is not only a mathematical convenience. In the experiments of Srinivas et al. (2010), the inputs were the 46 temperature sensors of a sensor network at Intel Research Berkeley, and in a second test the 357 traffic sensors along a stretch of the I-880 highway in California, where the goal was to find the most congested point. The kernel matrix was not a formula: it was the empirical covariance of the sensors' readings over the first two thirds of the recorded data, and the functions to optimize were snapshots from the remaining third. On the temperature data GP-UCB and expected improvement clearly outperformed the other heuristics, with no significant difference between the two; the authors summarize that GP-UCB performed at least on par with existing approaches that had no regret bounds. The bound also connects two traditions. Step 4 says that a GP-UCB step can be expensive only when it is informative, so an optimizer's regret is controlled by how much there is to learn about , which is the currency of experimental design (Section 6.4).
How fast grows decides how good the bound is. Table 13.1 collects the known rates for a domain in dimensions, which follow from how fast the eigenvalues of the kernel decay (Section 10.5); is the smoothness parameter of the Matérn kernel (Section 9.1).
| Kernel | Source | |
|---|---|---|
| Linear | Srinivas et al. (2010) | |
| RBF (squared exponential) | Srinivas et al. (2010) | |
| Matérn, | Srinivas et al. (2010) | |
| Matérn, | Vakili et al. (2021a) |
For the RBF kernel, the dimension appears only as the exponent of , so the bound grows like (a factor from and one more from ): very smooth functions are learned quickly even in several dimensions (Srinivas et al., 2010). For Matérn kernels the original rate was loose; the 2021 rate of Vakili et al. (2021a) matches the known lower bounds up to logarithmic factors.
13.4.4 Other settings #
The finite-domain theorem extends in three directions, each with its own assumptions. This subsection is a map of results for readers who will meet them in papers. It can be skipped on a first reading; the one idea used later, the reproducing kernel Hilbert space, is explained again in Section 21.3, and Chapter 10 treats it in depth.
Continuous domains. For a compact, convex domain in dimensions, such as a box, Srinivas et al. (2010) prove a bound of the same form, with gaining a term of order and the bound gaining an additive constant. The proof discretizes the domain more finely as grows, which requires sample paths smooth enough that values at nearby grid points are close. The RBF kernel and Matérn kernels with qualify. The rough Matérn 1/2 kernel violates the assumption, and the authors conjecture that no result of this form holds for it.
Fixed functions. The theorems above are Bayesian: they hold with high probability for functions drawn from the prior. A frequentist version asks for a guarantee for one fixed function from a class. The natural class is the reproducing kernel Hilbert space (RKHS) of the kernel, a space of functions built from sums of kernel bumps like Equation (8.4), whose norm measures how rough is relative to the kernel (Section 10.2 constructs the space and its norm). (Sample paths of the Gaussian process itself are rougher than this, with infinite norm, so neither setting contains the other.) If and the noise is bounded, GP-UCB with has regret of order up to logarithmic factors (Srinivas et al., 2010). Chowdhury and Gopalan (2017) sharpened this analysis and proved a regret bound for a Gaussian process version of Thompson sampling. Section 13.4.5 shows where widths of this kind come from.
Lower bounds. In the RKHS setting, Scarlett et al. (2017) proved that every algorithm has cumulative regret of at least order on some function in the Matérn class. For the RBF kernel they showed that cumulative regret is at least of order , which matches the upper bounds up to replacing by in the exponent of under the square root. The lower bounds play the role of Lai and Robbins for functions: they say how much exploring the class forces on any algorithm.
The same machinery, with comparisons in place of evaluations, gives the kernelized dueling bandit bounds of Section 21.3 and the theory of Chapter 29, where some of the basic lower bounds are still missing (Section 29.7).
13.4.5 Confidence for a fixed function #
The confidence step of Theorem 13.3 used two tools from Section 13.2.2. A Gaussian lands more than standard deviations from its mean with probability at most , and a union bound over the inputs and over rounds, giving round the share of , asks for . Solving for gives the theorem's . The adaptive choice of inputs did no harm there: given the observations so far, the inputs chosen from them are fixed, and is Gaussian with mean and standard deviation whatever rule chose them (Srinivas et al., 2010, Lemma 5.1).
The frequentist results of Section 13.4.4 remove that support. There is one fixed function with , and the only randomness is the noise. The error is a bias, from the prior pulling the estimate toward zero, plus a weighted sum of the noise terms , and the weights depend on where the algorithm chose to look, which depended on earlier noise. That is not a sum of independent terms with weights fixed in advance, so Hoeffding's inequality does not apply, and on a continuous domain there is no finite list of inputs to take a union over. This subsection shows the tool that replaces both and how it produces a width that grows with and . Like the map above, it can be skipped on a first reading.
Martingales. Consider a running sum in which each weight may depend on everything observed before round but is fixed before is drawn, and each has mean zero given everything before it. Such a sum is a martingale: the fortune of a gambler in a fair game who chooses each stake by looking at the history. The stakes are adaptive, and the game is still fair. The Chernoff method survives the adaptivity. Given the past, is a fixed number and is -sub-Gaussian (Definition 13.2), so . Peeling off one round at a time, starting from the last, shows that
has expectation at most 1 for every . Where the derivation of Equation (13.6) factored an expectation over independent terms, this one factors it over rounds, each conditioned on the rounds before. More is true: is never negative and does not drift upward on average from one round to the next, and for such a process Markov's inequality holds in a stronger form, the maximal inequality: the probability that ever reaches is at most (Lattimore and Szepesvári, 2020, Thm. 3.9). A bound for all rounds at once then needs no union over rounds.
Two problems remain. The best depends on , which is random. And a Gaussian process estimate is not of the form : its weight on the observation depends on inputs chosen after round . The first problem is solved by averaging over instead of choosing it, the method of mixtures.
- For each fixed , is never negative, starts at 1, and does not drift upward. An average of such processes over is another one (Lattimore and Szepesvári, 2020, Lemma 20.3).
- Average over for a constant . The density of is , so . Completing the square in , as in Section 4.1, leaves times a Gaussian integral equal to , so .
- By the maximal inequality, with probability at least , for every . Taking logarithms and rearranging, for every .
The result reads as a statement in standard deviations. plays the role of the variance of , so the sum stays within about one standard deviation, , times . The is the price of confidence that every Chernoff bound pays. The is the price of not knowing in advance how large the variance would be, and it grows only like the logarithm of the variance. A bound of this kind is called self-normalized: the sum is measured against its own accumulated variance.
The second problem is solved by working with vectors. Write the kernel through features, , the weight-space view of Section 5.4.2 with the prior covariance of the weights set to . Two quantities summarize the first rounds: the posterior precision of the weights, and the noise pushed along the features of the inputs that received it,
Each term of has its weight vector fixed before its noise is drawn, so is a martingale with vector values. Averaging over a Gaussian distribution of directions, in place of the Gaussian distribution of in the box above, gives the following bound.
Let the features have finitely many entries. Suppose each input is chosen from the observations before round , and each noise term , given everything before it, is -sub-Gaussian. Then for any , with probability at least ,
This is Theorem 1 of Abbasi-Yadkori et al. (2011) with their regularizer set to , so that their matrix is . Lattimore and Szepesvári prove the case , to which any reduces by rescaling the noise, with the method of mixtures (Lattimore and Szepesvári, 2020, Thm. 20.4). With a single feature the theorem is the box above with .
The log-determinant is the information gain. By the matrix determinant lemma (Equation (B.7)), , where is the kernel matrix of the first inputs, so is the information of Equation (13.12) gathered by the inputs the algorithm chose, and at most . The union bound charged a logarithm per input; this bound charges per direction the data have measured.
On a finite domain, as in Theorem 13.3, features with finitely many entries always exist, and the theorem turns into a confidence bound for a fixed function.
Take to be the column of that belongs to , where is the kernel matrix of the whole domain. Then , and every function in the RKHS is with . With the matrix whose rows are , the posterior of Equation (5.7) and Equation (5.9) is with , and .
- Split the error. Substituting and gives , so .
- Separate the input from the rest. By the Cauchy-Schwarz inequality in the inner product , for any vector , .
- Bias. is plus positive semidefinite terms, so , and the first term of step 1 is at most .
- Noise. By Equation (13.15), the second term is at most .
- Information. .
Together, with probability at least , for every input and every at once,
GP-UCB in round uses the posterior after observations, so Equation (13.16) gives it a valid confidence bound with
The first term is the bias: a function of large norm can sit far from what the prior expects, but by at most posterior standard deviations. The second is the noise. It grows with because every direction the data have measured is a direction in which the noise could have pushed the estimate, and with as every Chernoff bound does. The number of inputs does not appear: step 2 covers every input at once, where the Bayesian width took a union over them. That is why bounds of this kind carry over to continuous domains.
The width agrees with the frequentist statement of Section 13.4.4. There the noise is bounded by in absolute value and the model's noise variance is (Srinivas et al., 2010, Thm. 3), so , and squaring Equation (13.17) with gives . The schedule of Srinivas et al. (2010) has the same term from the norm of , and the same information gain for the noise, multiplied by . Their proof applies Freedman's inequality, a martingale version of Bernstein's inequality that uses the conditional variances, and a union bound over rounds (Srinivas et al., 2010, app. B); the factor 300 and the cube of the logarithm come from that route (inference).
For a general domain the features can have infinitely many entries, and the argument of Abbasi-Yadkori et al. (2011) breaks down. Chowdhury and Gopalan (2017) proved a self-normalized bound that holds in that case. With and noise that is -sub-Gaussian given the past, their Theorem 2 states that with probability at least ,
for every input and every round up to the horizon , where the posterior and are computed with noise variance in place of . (They write for the norm itself, and their is the multiplier of , our .) The extra 1 pays for that slightly inflated noise variance, which adds , at most 2, to the log-determinant. Their algorithm, IGP-UCB, uses this width, which is narrower than that of GP-UCB by a factor that grows like .
Steps 2 to 5 of the GP-UCB proof in Section 13.4.3 use nothing about except the confidence statement and . With the width of Equation (13.17) on a finite domain, they give again, now with probability at least for every fixed with . Since , the regret for a fixed is of order , the order stated in Section 13.4.4, now without hidden logarithmic factors. Chowdhury and Gopalan (2017) state their bound, in this notation, as .
When the inputs are chosen from the noise that came before, a confidence bound for a fixed function must hold in every direction the data could have measured. The self-normalized bound pays for that with the log-determinant of the posterior precision, twice the information gain, so the width grows like instead of with the number of inputs.
Sources cited in Section 13.4 6
- Srinivas et al. (2010) Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design
- Vakili et al. (2021a) On Information Gain and Regret Bounds in Gaussian Process Bandits
- Chowdhury and Gopalan (2017) On Kernelized Multi-armed Bandits
- Scarlett et al. (2017) Lower Bounds on Regret for Noisy Gaussian Process Bandit Optimization
- Lattimore and Szepesvári (2020) Bandit Algorithms
- Abbasi-Yadkori et al. (2011) Improved Algorithms for Linear Stochastic Bandits
13.5 What bounds say about practice #
Theorem 13.3 gives a number. It is worth computing it on a problem where every assumption holds: a function drawn from the Gaussian process that GP-UCB uses, on a finite grid, with the noise level the algorithm is told. The figure below does that, and runs GP-UCB twice on the same function and noise, once with the theorem's and once with a constant multiplier of the kind practitioners use.
Some things to try.
Read the default. At the default settings and , the bound is several hundred, larger than the regret that uniformly random queries would incur, while GP-UCB with the theorem's has regret below 20 and GP-UCB with about half of that. On this problem the theorem is true and, at this horizon, weaker than the trivial bound of doing nothing clever.
Drag the noise. As goes from 0.1 to 1, grows from 1.73 to 11.5, while falls, because noisy evaluations teach less. The bound moves much less than either constant. Both runs suffer more from noise than the bound does.
Switch the kernel to Matérn 1/2. Rough functions have many more distinguishable regions, grows several times faster, and both runs take longer to find the peak.
Set the practical multiplier to 0. This is pure exploitation: evaluate wherever the posterior mean is highest. Starting from a mean of zero everywhere, the rule keeps evaluating the first input whose value comes out above zero, because nothing else ever looks better. Unless that input happens to be the peak, its regret grows in a straight line, as it does for the default function. Press New function to see both cases. Notice also that the bound does not move when the function changes: it depends only on the kernel, the noise, and .
Switch to 3-D, then 6-D. The domain still has 160 inputs, but they are now scattered through a cube, and at lengthscale 0.1 almost no two of them are close enough to be correlated. Each input is effectively its own arm: jumps from about 42 to about 350 in three dimensions and 380 in six, close to the value for 160 independent arms, and both runs lose much more. Raise the lengthscale to 0.5 and the information gain falls again, because a longer lengthscale lets each evaluation speak for more of the cube. How to choose the lengthscale as the dimension grows is a practical question of its own (Section 14.6).
Compare the multipliers. The readout shows , about 6 at (Exercise 13.4). Six standard deviations of optimism is far more than the error of a well-specified posterior requires, which is why the theorem's run keeps exploring long after the practical run has settled.
13.5.1 What the bounds do say #
The bounds of this chapter establish that sublinear regret is possible for black-box optimization at all, under stated assumptions, and they identify what governs its rate. For bandits, it is the gaps and the number of arms; for Gaussian processes, it is the maximum information gain, a property of the prior and the noise rather than of any algorithm. The rates in Table 13.1 rank problems sensibly: smoother kernels are easier than rough ones, and dimension hurts most where smoothness is low.
The proofs also explain why particular design choices matter. Exploration must never switch off entirely: greedy and constant-ε rules fail for structural reasons, and the confidence parameter grows, slowly, for the same reason that the UCB1 bonus contains . Optimism, posterior sampling, and information-seeking are the mechanisms with guarantees, and several of the acquisition functions of Chapter 12 are built from them.
13.5.2 What the bounds do not say #
The constants matter at practical horizons. Bounds are proved with whatever constants make the proof go through, and they are rarely tight. The authors of GP-UCB found, by cross-validation (trying each scaling on data held out from the fit), that their algorithm improved when was scaled down by a factor of 5 from the theorem's value, and noted that they did not optimize the constants of their bounds (Srinivas et al., 2010). Auer and colleagues' variant UCB1-TUNED performed substantially better than UCB1 in essentially all their experiments, and they could not prove a regret bound for it (Auer et al., 2002). Figure 13.3 and Figure 13.4 both show bounds that are true and, at the horizons a practitioner has, larger than the regret of naive play.
The model is assumed correct. Theorem 13.3 assumes that the kernel, its hyperparameters, and the noise level are known, and that was drawn from exactly that prior; the RKHS version assumes a known bound on the norm. In practice hyperparameters are fitted to the data as they arrive (Section 9.4), and that changes the algorithm. Bull (2011) proved convergence rates for expected improvement with a fixed prior, and showed that with standard sequential estimates of the prior's parameters the procedure may never find the optimum; alternative estimators restore the rates. Berkenkamp et al. (2019) gave the first algorithm that is provably no-regret without knowing the hyperparameters, by slowly enlarging the function class it considers.
The score may not be yours. The GP-UCB bound is about cumulative regret. When only the final recommendation matters, Equation (13.2) turns it into a guarantee, but an algorithm tuned for cumulative regret can be needlessly cautious about exploring (Bubeck et al., 2009). Expected improvement, which Bull (2011) calls perhaps the most popular method for this problem, was analyzed there for simple regret with noise-free evaluations. Bounds proved in different settings and for different scores do not rank the acquisition functions of Section 12.8 against each other (inference).
The acquisition function is assumed maximized exactly. The theorems take to be the exact maximizer of Equation (13.11). On a continuous domain that maximization is itself a hard, multimodal problem, solved approximately by the methods of Section 12.9 (Srinivas et al., 2010). No bound in this chapter accounts for the error.
Dimension enters through exponents. The three- and six-dimensional settings of Figure 13.4 show the effect at small scale. The RBF rate is mild in but not in : for and , is about , so unless the constant hidden in the is minute, a bound of order exceeds the trivial bound, linear in , by orders of magnitude (inference). For Matérn kernels in the RKHS setting, combining the regret of order for GP-UCB with the rate of Vakili et al. (2021a) gives an exponent of , which reaches 1, and so says nothing at all, once (inference). How Bayesian optimization copes with many dimensions in practice is the subject of Section 14.6 and Chapter 30.
A bound is about a class, not about your function. A worst-case bound holds for every function in the class, and a Bayesian bound for most functions drawn from the prior. The function you face is one particular function, and neither kind of bound predicts how a method will rank on it. Benchmarks answer that question, with their own limits (Section 31.4).
The useful stance is to treat regret bounds as design principles and as sanity checks rather than as forecasts. An algorithm with a guarantee is built from mechanisms that cannot get permanently stuck; its constants are then tuned empirically, as the authors of the guarantees did themselves. The next chapter turns to those empirical decisions.
Sources cited in Section 13.5 6
- Srinivas et al. (2010) Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design
- Auer et al. (2002) Finite-time Analysis of the Multiarmed Bandit Problem
- Bull (2011) Convergence Rates of Efficient Global Optimization Algorithms
- Berkenkamp et al. (2019) No-Regret Bayesian Optimization with Unknown Hyperparameters
- Bubeck et al. (2009) Pure Exploration in Multi-armed Bandits Problems
- Vakili et al. (2021a) On Information Gain and Regret Bounds in Gaussian Process Bandits
13.6 Exercises #
Show that ε-greedy with constant on arms has expected regret at least after rounds (ignoring the initial round in which each arm is pulled once). Evaluate the slope for the default arms of Figure 13.3, whose means are , , , , and , with , and compare it with the figure.
Solution
In each round, with probability the algorithm pulls an arm chosen uniformly, which has expected gap ; with probability it pulls the greedy arm, whose gap is at least 0. So the expected regret of every round is at least , and summing over rounds gives the bound. For the default arms the gaps are , with sum , so the slope is at least per round, or 22 over 1000 rounds. The figure shows ε-greedy at about 60 after 1000 rounds: the rest comes from rounds in which the greedy arm is not the best one, because the averages of rarely explored arms are still noisy.
Two Bernoulli arms have means and . Compute the Lai-Robbins constant of Equation (13.10) and the coefficient of in Theorem 13.1. What do the two numbers predict for the number of pulls of the worse arm after rounds?
Solution
. With , , and the asymptotic number of pulls of the worse arm is . UCB1's coefficient is , about 16 times , and its bound on the pulls of the worse arm is , which says little when the budget is pulls in total. Pinsker's inequality, , is nearly tight here, so the factor of 16 is close to the worst case.
For a diagonal kernel on arms (each , all other entries 0) and a multiple of , show that . What does Theorem 13.3 then say about the growth of in and , and how does it compare with the worst-case lower bound of Section 13.3?
Solution
With independent arms, is block diagonal: if arm is evaluated times, its block is an matrix of ones, . The corresponding block of is , which has the eigenvalue (eigenvector ) and all others equal to 1, so its determinant is (a case of the matrix determinant lemma, Equation (B.7)), and the information is subject to . The logarithm is concave, so the sum is largest when the are equal, , which gives the formula. Then grows like times logarithmic factors in and . The worst-case lower bound is , so in this special case the GP-UCB bound is tight up to logarithmic factors, as Srinivas et al. (2010) note.
Compute the theorem's and for the setting of Figure 13.4: , , . How does change if the grid is refined to points, and what does that say about the role of ?
Solution
, whose natural logarithm is , so and . A grid 100 times finer adds to , giving and . The dependence on is logarithmic, but it never disappears on a finite grid, and it is why the continuous-domain version needs a separate argument: refining the grid without limit would make infinite.
Rewards lie in . How many pulls does an arm need before the probability that its average exceeds its mean by 0.1 or more is at most 0.05, according to Chebyshev's inequality (with the largest possible variance, ) and according to Hoeffding's? Repeat for the probability , and for an interval that must hold in each of 1000 rounds with total failure probability 0.05. Compare the last answers with Figure 13.2 with the union set to 1000.
Solution
Chebyshev's inequality, Equation (13.5), needs . Hoeffding's, Equation (13.6), needs , so 150. For , Chebyshev needs 250,000 pulls and Hoeffding , so 461. Shrinking by a factor of 500 multiplies Chebyshev's answer by 500 and Hoeffding's by about 3.1. For 1000 rounds the union bound gives each round : Chebyshev needs 500,000 pulls and Hoeffding , so 496, the numbers in the figure's readout. The extra pulls Hoeffding needs, (346 after rounding both answers up), come from the of Equation (13.8).
For the linear kernel in dimensions, with features and inputs of length at most 1, show that for any inputs, so that their information gain is at most . What does Equation (13.17) then say about how grows, and what plays the role that plays in Theorem 13.3? Evaluate the bound on the information gain for , , and .
Solution
is a matrix with positive eigenvalues . Its determinant is their product, which by the inequality between the geometric and the arithmetic mean is at most . The trace is , so , and half of it bounds the information gain, as in step 5 of the derivation of Equation (13.16). This is the of Table 13.1. The features have entries however many inputs the domain holds, so the self-normalized bound applies directly, and since obeys the same bound, Equation (13.17) gives , which grows like : the dimension takes the place of , and the domain may be infinite. For , , and , the bound is nats, against the nats that 1000 evaluations at completely unrelated inputs would gather.
Sources cited in Section 13.6 1
- Srinivas et al. (2010) Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design
Further reading #
- Lattimore and Szepesvári (2020) is the reference on bandit theory: concentration inequalities in chapter 5, UCB in chapters 7 and 8, self-normalized bounds and the method of mixtures in chapter 20, the lower bounds in chapters 15 and 16, simple regret and pure exploration in chapter 33, and Thompson sampling in chapter 36. The book is free online.
- Auer et al. (2002) is short and readable, with the UCB1 proof sketched above, the decaying ε-greedy rule, and experiments that compare them.
- Russo et al. (2018) is a practical tutorial on Thompson sampling, with many worked examples beyond Bernoulli arms.
- Srinivas et al. (2010) introduced GP-UCB, the maximum information gain, and the regret bounds of Section 13.4; the extended arXiv version has the proofs.
- Abbasi-Yadkori et al. (2011) prove the self-normalized bound of Theorem 13.4 for linear bandits, and Chowdhury and Gopalan (2017) extend it to kernels on general domains, with the confidence width and regret bound of Section 13.4.5.
- Garnett (2023), chapter 10, surveys the theoretical analysis of Bayesian optimization, including results for expected improvement and information-based policies.
- Lai and Robbins (1985) is the original lower bound; most readers will find the modern statement in Lattimore and Szepesvári (2020) easier to read first.
References
- (2011). Improved Algorithms for Linear Stochastic Bandits. Advances in Neural Information Processing Systems. Cited in §13.4
- (2012). Analysis of Thompson Sampling for the Multi-armed Bandit Problem. Conference on Learning Theory. Cited in §13.2
- (2013). Further Optimal Regret Bounds for Thompson Sampling. International Conference on Artificial Intelligence and Statistics. Cited in §13.2 §13.3
- (2002). Finite-time Analysis of the Multiarmed Bandit Problem. Machine Learning. Cited in §13.2 §13.5
- (2019). No-Regret Bayesian Optimization with Unknown Hyperparameters. Journal of Machine Learning Research. Cited in §13.5
- (2009). Pure Exploration in Multi-armed Bandits Problems. Algorithmic Learning Theory (ALT 2009). Cited in §13.1 §13.5
- (2011). Convergence Rates of Efficient Global Optimization Algorithms. Journal of Machine Learning Research. Cited in §13.5
- (2017). On Kernelized Multi-armed Bandits. International Conference on Machine Learning. Cited in §13.4
- (2023). Bayesian Optimization. Cambridge University Press.
- (1963). Probability Inequalities for Sums of Bounded Random Variables. Journal of the American Statistical Association. Cited in §13.2
- (2012). Thompson Sampling: An Asymptotically Optimal Finite-Time Analysis. Algorithmic Learning Theory (ALT 2012). Cited in §13.2 §13.3
- (1985). Asymptotically Efficient Adaptive Allocation Rules. Advances in Applied Mathematics. Cited in §13.3
- (2020). Bandit Algorithms. Cambridge University Press. doi:10.1017/9781108571401. Cited in §13.1 §13.2 §13.3 §13.4
- (1952). Some Aspects of the Sequential Design of Experiments. Bulletin of the American Mathematical Society. Cited in §13.2
- (2018). A Tutorial on Thompson Sampling. Foundations and Trends in Machine Learning.
- (2017). Lower Bounds on Regret for Noisy Gaussian Process Bandit Optimization. Conference on Learning Theory. Cited in §13.4
- (2010). Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design. ICML 2010. Cited in §13.1 §13.2 §13.4 §13.5 §13.6
- (1933). On the Likelihood that One Unknown Probability Exceeds Another in View of the Evidence of Two Samples. Biometrika. Cited in §13.2
- (2021a). On Information Gain and Regret Bounds in Gaussian Process Bandits. International Conference on Artificial Intelligence and Statistics. Cited in §13.4 §13.5
- (2024b). Principled Preferential Bayesian Optimization. International Conference on Machine Learning. Cited in §13.1