Simple Algorithm
Machine Learning · Convergence · 28 min

Online Learning & Regret

Learning from a stream, even against an adversary.

What if there is no distribution at all? In online learning, examples arrive one at a time, possibly chosen by an adversary who knows your algorithm, and every prediction counts. Remarkably, you can still guarantee to do almost as well as the best expert, the best linear predictor or the best slot machine in hindsight. This lesson proves the classic regret bounds and connects them back to learning from i.i.d. data.

What you’ll learn

  • Prove the mistake bounds of the halving algorithm (log⁡2∣H∣\log_2\abs{\mathcal H}) and the perceptron ((R/γ)2(R/\gamma)^2), and explain why the Littlestone dimension, not the VC dimension, governs online learnability.
  • Prove that exponential weights with η=8ln⁡N/T\eta=\sqrt{8\ln N/T} has regret at most (T/2)ln⁡N\sqrt{(T/2)\ln N} against NN experts, and explain why randomization is necessary.
  • Derive the 32DGT\tfrac32DG\sqrt T regret of online gradient descent and the O(log⁡T)\order{\log T} rate under strong convexity, and convert regret into risk for i.i.d. data.
  • State and compare the regret bounds of UCB1 and EXP3, and check them against a simulation.

The protocol, mistake bounds and the Littlestone dimension

In online learning the protocol runs for rounds t=1,…,Tt=1,\dots,T: the learner receives xt\mathbf x_t, predicts y^t\hat y_t, sees the true yty_t and pays ℓ(y^t,yt)\ell(\hat y_t,y_t). No distribution is assumed: the sequence may be chosen by an adversary, even adaptively. Performance is measured by the regret against a class H\mathcal H, ∑tℓ(y^t,yt)−min⁡h∈H∑tℓ(h(xt),yt)\sum_t\ell(\hat y_t,y_t)-\min_{h\in\mathcal H}\sum_t\ell(h(\mathbf x_t),y_t).

Start with the realizable mistake-bound model: binary labels, 0–1 loss, and the promise that some h⋆∈Hh^\star\in\mathcal H labels every round correctly. Then the regret is just the number of mistakes MM. The halving algorithm keeps the version space VtV_t of hypotheses consistent so far and predicts with its majority vote. Every mistake means at least half of VtV_t voted wrong and is eliminated, and h⋆h^\star is never eliminated, so 1≤∣VT+1∣≤∣H∣ 2−M1\le\abs{V_{T+1}}\le\abs{\mathcal H}\,2^{-M}, that is M≤log⁡2∣H∣M\le\log_2\abs{\mathcal H}, on every sequence.

The gap between the two dimensions can be infinite. Thresholds on [0,1][0,1] have VC dimension 1 and are PAC learnable from about 1εln⁡1δ\tfrac1\varepsilon\ln\tfrac1\delta examples, but an online adversary can always offer the midpoint of the interval of thresholds still consistent with the labels and declare the learner wrong: the interval halves, a consistent threshold survives, and the mistakes never stop. Online learnability is strictly harder than PAC learnability. Ben-David, Pál & Shalev-Shwartz (2009) showed that finite Littlestone dimension also characterizes learnability in the agnostic online setting, and Alon, Livni, Malliaris & Moran (2019) and Bun, Livni & Moran (2020) proved that it characterizes PAC learnability under approximate differential privacy too.

DerivationThe perceptron's mistake bound (Novikoff, 1962)
  1. u⊤(w+ytxt)=u⊤w+yt u⊤xt ≥ u⊤w+γ⟹u⊤wM≥Mγ\mathbf u^\top(\mathbf w+y_t\mathbf x_t)=\mathbf u^\top\mathbf w+y_t\,\mathbf u^\top\mathbf x_t\ \ge\ \mathbf u^\top\mathbf w+\gamma\quad\Longrightarrow\quad\mathbf u^\top\mathbf w_{M}\ge M\gamma

    Labels yt∈{−1,+1}y_t\in\{-1,+1\} and inputs with ∥xt∥≤R\norm{\mathbf x_t}\le R. Suppose some unit vector u\mathbf u separates every example with margin γ>0\gamma>0: yt u⊤xt≥γy_t\,\mathbf u^\top\mathbf x_t\ge\gamma. The perceptron starts at w=0\mathbf w=\mathbf 0 and, after each mistake (yt w⊤xt≤0y_t\,\mathbf w^\top\mathbf x_t\le0), updates w←w+ytxt\mathbf w\leftarrow\mathbf w+y_t\mathbf x_t. Each update gains at least γ\gamma along u\mathbf u:

  2. ∥w+ytxt∥2=∥w∥2+2yt w⊤xt+∥xt∥2≤∥w∥2+R2⟹∥wM∥2≤MR2\norm{\mathbf w+y_t\mathbf x_t}^2=\norm{\mathbf w}^2+2y_t\,\mathbf w^\top\mathbf x_t+\norm{\mathbf x_t}^2\le\norm{\mathbf w}^2+R^2\quad\Longrightarrow\quad\norm{\mathbf w_M}^2\le MR^2

    But the squared norm grows by at most R2R^2 per update, because the update happens only when yt w⊤xt≤0y_t\,\mathbf w^\top\mathbf x_t\le0:

  3. M≤(Rγ)2M\le\Big(\frac R\gamma\Big)^2

    Cauchy–Schwarz joins the two: Mγ≤u⊤wM≤∥wM∥≤RMM\gamma\le\mathbf u^\top\mathbf w_M\le\norm{\mathbf w_M}\le R\sqrt M. The bound holds for every sequence, does not depend on the dimension or on TT, and the perceptron never needs to know γ\gamma:

Check your understanding

Thresholds on [0,1][0,1] have VC dimension 1. Against an adaptive adversary in the realizable setting, how many mistakes can a deterministic online learner be forced to make in TT rounds?

  1. At most 1, since the VC dimension is 1
  2. At most log⁡2T\log_2T, by binary search
  3. All TT: the adversary keeps offering the midpoint of the consistent interval and answering the opposite label
  4. At most T\sqrt T, since regret is sublinear
Show the answer

C. All TT: the adversary keeps offering the midpoint of the consistent interval and answering the opposite label

After any finite sequence of answers, the thresholds consistent with them form an interval. The adversary offers its midpoint and reveals the label opposite to the prediction; half the interval stays consistent, so the answers remain realizable while the learner errs every round. Thresholds have infinite Littlestone dimension. Randomizing does not rescue the learner: the adversary reveals the label it is less likely to predict, so the expected number of mistakes is still at least T/2T/2.

Experts and exponential weights

Now drop realizability. NN experts each predict every round, and the learner wants to do nearly as well as the best of them in hindsight. Weighted majority (Littlestone & Warmuth, 1994) predicts with a weighted vote and halves the weight of each expert that errs; it makes at most 2.41 (m⋆+log⁡2N)2.41\,(m^\star+\log_2N) mistakes, where m⋆m^\star is the best expert's count. The factor in front of m⋆m^\star cannot drop below 2 for any deterministic learner: with two experts who always disagree, the adversary makes the learner wrong every round, while one of the two experts is right at least half the time.

So the learner must randomize, or equivalently play a mixture when the loss is convex. Exponential weights, also called Hedge (Freund & Schapire, 1997), handles losses ℓt,i∈[0,1]\ell_{t,i}\in[0,1] of expert ii in round tt: it puts weight wt,i=e−ηLt−1,iw_{t,i}=e^{-\eta L_{t-1,i}} on each expert, where Lt−1,iL_{t-1,i} is that expert's total loss so far, follows the distribution pt=wt/∑iwt,i\mathbf p_t=\mathbf w_t/\sum_iw_{t,i}, and pays pt⊤ℓt\mathbf p_t^\top\boldsymbol\ell_t in expectation.

DerivationRegret of exponential weights
  1. ln⁡WT+1W1 ≥ ln⁡e−ηLT⋆N=−ηLT⋆−ln⁡N\ln\frac{W_{T+1}}{W_1}\ \ge\ \ln\frac{e^{-\eta L^\star_T}}N=-\eta L^\star_T-\ln N

    Track Wt=∑iwt,iW_t=\sum_iw_{t,i}, with W1=NW_1=N. Keeping only the best expert's term bounds the final total from below, with LT⋆=min⁡iLT,iL^\star_T=\min_iL_{T,i}:

  2. ln⁡Wt+1Wt=ln⁡∑ipt,i e−ηℓt,i ≤ −η pt⊤ℓt+η28\ln\frac{W_{t+1}}{W_t}=\ln\sum_ip_{t,i}\,e^{-\eta\ell_{t,i}}\ \le\ -\eta\,\mathbf p_t^\top\boldsymbol\ell_t+\frac{\eta^2}8

    Each round multiplies WW by the average of e−ηℓt,Ie^{-\eta\ell_{t,I}} over I∼ptI\sim\mathbf p_t. Hoeffding's lemma (for a variable in [0,1][0,1], ln⁡EesX≤sEX+s2/8\ln\E e^{sX}\le s\E X+s^2/8) bounds it from above:

  3. L^T−LT⋆ ≤ ln⁡Nη+ηT8\hat L_T-L^\star_T\ \le\ \frac{\ln N}\eta+\frac{\eta T}8

    Sum over tt, compare with step 1 and divide by η\eta. With L^T=∑tpt⊤ℓt\hat L_T=\sum_t\mathbf p_t^\top\boldsymbol\ell_t the learner's expected loss:

  4. RegretT ≤ T2ln⁡N\mathrm{Regret}_T\ \le\ \sqrt{\tfrac T2\ln N}

    The two terms balance at η=8ln⁡N/T\eta=\sqrt{8\ln N/T}. Lower bounds in Cesa-Bianchi & Lugosi (2006, chapter 3) show that the constant cannot be improved asymptotically as TT and NN grow; if TT is unknown, restarting with doubled horizons costs a factor 2/(2−1)≈3.41\sqrt2/(\sqrt2-1)\approx3.41.

Predict before you look

N=100N=100 experts, T=10,000T=10{,}000 rounds, losses in [0,1][0,1], and the tuned learning rate. What is the regret bound (T/2)ln⁡N\sqrt{(T/2)\ln N}?

Show the answer

152 loss

5000⋅ln⁡100=5000⋅4.605≈151.7\sqrt{5000\cdot\ln100}=\sqrt{5000\cdot4.605}\approx151.7, at η=8ln⁡100/104≈0.061\eta=\sqrt{8\ln100/10^4}\approx0.061. Per round, the learner is within 0.0150.015 of the best expert, on every possible sequence of losses. A hundred times more experts would add only ln⁡100\ln100 to the logarithm.

Online convex optimization and online-to-batch conversion

In online convex optimization the learner picks xt\mathbf x_t from a convex set K\mathcal K of diameter DD, then an adversary reveals a convex loss ftf_t with gradients bounded by GG, and the learner pays ft(xt)f_t(\mathbf x_t). Online gradient descent (Zinkevich, 2003) steps against the revealed gradient and projects back: xt+1=ΠK(xt−ηt∇ft(xt))\mathbf x_{t+1}=\Pi_{\mathcal K}\big(\mathbf x_t-\eta_t\nabla f_t(\mathbf x_t)\big).

DerivationRegret of online gradient descent
  1. ∥xt+1−x⋆∥2≤∥xt−x⋆∥2−2ηt gt⊤(xt−x⋆)+ηt2G2\norm{\mathbf x_{t+1}-\mathbf x^\star}^2\le\norm{\mathbf x_t-\mathbf x^\star}^2-2\eta_t\,\mathbf g_t^\top(\mathbf x_t-\mathbf x^\star)+\eta_t^2G^2

    Fix any comparator x⋆∈K\mathbf x^\star\in\mathcal K and write gt=∇ft(xt)\mathbf g_t=\nabla f_t(\mathbf x_t). Projection onto a convex set never increases distances to points of the set, so

  2. ∑t=1T(ft(xt)−ft(x⋆))≤∑t=1T∥xt−x⋆∥2−∥xt+1−x⋆∥22ηt+G22∑t=1Tηt≤D22ηT+G22∑t=1Tηt\sum_{t=1}^{T}\big(f_t(\mathbf x_t)-f_t(\mathbf x^\star)\big)\le\sum_{t=1}^{T}\frac{\norm{\mathbf x_t-\mathbf x^\star}^2-\norm{\mathbf x_{t+1}-\mathbf x^\star}^2}{2\eta_t}+\frac{G^2}2\sum_{t=1}^{T}\eta_t\le\frac{D^2}{2\eta_T}+\frac{G^2}2\sum_{t=1}^{T}\eta_t

    Convexity gives ft(xt)−ft(x⋆)≤gt⊤(xt−x⋆)f_t(\mathbf x_t)-f_t(\mathbf x^\star)\le\mathbf g_t^\top(\mathbf x_t-\mathbf x^\star). Rearrange and sum; with nonincreasing ηt\eta_t the distance terms telescope to at most D2/(2ηT)D^2/(2\eta_T):

  3. RegretT≤DGT2+DGT=32 DGT\mathrm{Regret}_T\le\frac{DG\sqrt T}2+DG\sqrt T=\tfrac32\,DG\sqrt T

    Take ηt=D/(Gt)\eta_t=D/(G\sqrt t) and use ∑t≤T1/t≤2T\sum_{t\le T}1/\sqrt t\le2\sqrt T. A fixed η=D/(GT)\eta=D/(G\sqrt T) gives DGTDG\sqrt T when TT is known.

  4. RegretT≤G22α∑t=1T1t≤G22α (1+ln⁡T)\mathrm{Regret}_T\le\frac{G^2}{2\alpha}\sum_{t=1}^{T}\frac1t\le\frac{G^2}{2\alpha}\,(1+\ln T)

    If every ftf_t is α\alpha-strongly convex, the inequality of step 2 gains a term −α2∥xt−x⋆∥2-\tfrac\alpha2\norm{\mathbf x_t-\mathbf x^\star}^2. With ηt=1/(αt)\eta_t=1/(\alpha t) the distance terms cancel exactly, leaving a harmonic sum (Hazan, Agarwal & Kale, 2007):

From regret to risk. Suppose the examples zt=(xt,yt)z_t=(\mathbf x_t,y_t) are in fact i.i.d. from PP, and run any online learner with a loss ℓ(h,z)\ell(h,z) that is convex in hh. Cesa-Bianchi, Conconi & Gentile (2004) showed that the average of its hypotheses generalizes. The argument takes three lines: hth_t depends only on z1,…,zt−1z_1,\dots,z_{t-1}, so E[ℓ(ht,zt)∣z<t]=R(ht)\E[\ell(h_t,z_t)\mid z_{<t}]=R(h_t); the expected cumulative loss is at most E[min⁡h∑tℓ(h,zt)]+E[RegretT]≤T R(h⋆)+E[RegretT]\E\big[\min_h\sum_t\ell(h,z_t)\big]+\E[\mathrm{Regret}_T]\le T\,R(h^\star)+\E[\mathrm{Regret}_T]; and Jensen's inequality moves the average inside the risk:

hˉ=1T∑t=1Tht⟹E[R(hˉ)]−R(h⋆) ≤ E[RegretT]T\bar h=\frac1T\sum_{t=1}^{T}h_t\qquad\Longrightarrow\qquad\E\big[R(\bar h)\big]-R(h^\star)\ \le\ \frac{\E[\mathrm{Regret}_T]}T
With bounded losses, a martingale version (Azuma–Hoeffding) gives the same with probability at least 1−δ1-\delta, up to an extra term of order ln⁡(1/δ)/T\sqrt{\ln(1/\delta)/T}. One pass of stochastic gradient descent over i.i.d. data is online gradient descent, so this is also a proof that averaged SGD reaches excess risk O(DG/T)\order{DG/\sqrt T} on convex Lipschitz problems.
Think first In the online-to-batch argument, why is E[ℓ(ht,zt)∣z1,…,zt−1]\E[\ell(h_t,z_t)\mid z_1,\dots,z_{t-1}] exactly the risk R(ht)R(h_t), with no uniform-convergence argument over H\mathcal H?

Because hth_t is chosen before ztz_t is seen, and ztz_t is a fresh draw independent of z1,…,zt−1z_1,\dots,z_{t-1}: the online protocol makes every example a test point before it becomes a training point. If hth_t were allowed to depend on ztz_t, as an empirical risk minimizer on z1,…,ztz_1,\dots,z_t would, ℓ(ht,zt)\ell(h_t,z_t) would be an optimistic in-sample loss. Convexity enters only afterwards, in Jensen's step for the averaged hypothesis, and the regret bound in the step between.

Bandits: learning from partial feedback

In a KK-armed bandit the learner sees only the reward of the arm it pulls. In the stochastic version arm ii pays i.i.d. rewards in [0,1][0,1] with mean μi\mu_i; with gaps Δi=μ⋆−μi\Delta_i=\mu^\star-\mu_i and Ni(T)N_i(T) the number of pulls of arm ii, the expected regret is ∑iΔi E[Ni(T)]\sum_i\Delta_i\,\E[N_i(T)].

UCB1 (Auer, Cesa-Bianchi & Fischer, 2002) pulls the arm with the largest optimistic index xˉi+2ln⁡t/ni\bar x_i+\sqrt{2\ln t/n_i}, its average reward plus a confidence bonus that shrinks as it is pulled nin_i times. Its expected regret after TT pulls satisfies, for every TT,

E[RegretT] ≤ 8∑i: Δi>0ln⁡TΔi+(1+π23)∑j=1KΔj.\E[\mathrm{Regret}_T]\ \le\ 8\sum_{i:\,\Delta_i>0}\frac{\ln T}{\Delta_i}+\Big(1+\frac{\pi^2}3\Big)\sum_{j=1}^{K}\Delta_j.

Lai & Robbins (1985) proved that no consistent policy can pull a suboptimal arm fewer than about ln⁡T/DKL(μi ∥ μ⋆)\ln T/\KL(\mu_i\,\|\,\mu^\star) times asymptotically, so logarithmic regret is the best possible rate; UCB1's constant 8/Δi28/\Delta_i^2 per arm is larger than the optimal 1/DKL(μi ∥ μ⋆)1/\KL(\mu_i\,\|\,\mu^\star), which refined indices and Thompson sampling attain.

EXP3 (Auer, Cesa-Bianchi, Freund & Schapire, 2002) drops the stochastic assumption. It runs exponential weights on importance-weighted estimates x^t,i=xt,i1{It=i}/pt,i\hat x_{t,i}=x_{t,i}\mathbf 1\{I_t=i\}/p_{t,i}, unbiased for every arm, the same trick as in Active Learning, and mixes in a little uniform exploration. Against any reward sequence its expected regret relative to the best arm is at most 2e−1TKln⁡K≤2.63TKln⁡K2\sqrt{e-1}\sqrt{TK\ln K}\le2.63\sqrt{TK\ln K}, and no algorithm can guarantee less than 120min⁡(KT,T)\tfrac1{20}\min(\sqrt{KT},T).

Think first Before running UCB1: what does its theorem promise for these five arms at T=500T=500? And what does the Lai–Robbins lower bound say?

The gaps are 0.45, 0.2, 0.55 and 0.3, so the bound is 8ln⁡500 (1/0.45+1/0.2+1/0.55+1/0.3)+(1+π2/3)⋅1.5≈6228\ln500\,(1/0.45+1/0.2+1/0.55+1/0.3)+(1+\pi^2/3)\cdot1.5\approx622, more than the largest regret any policy can incur here, 0.55×500=2750.55\times500=275. The guarantee is vacuous at this horizon even though UCB1's actual average is 57.5. The Lai–Robbins constant for these arms is ∑iΔi/DKL(μi ∥ μ⋆)≈5.44\sum_i\Delta_i/\KL(\mu_i\,\|\,\mu^\star)\approx5.44, so roughly 5.44ln⁡500≈345.44\ln500\approx34; Thompson sampling's 18.6 sits below it without contradiction, because the lower bound is asymptotic: it governs how regret grows, not its value at a fixed TT. Worst-case bounds describe rates; simulations show constants.

Key takeaways

  • Online learning assumes no distribution and measures regret against the best fixed comparator in hindsight. In the realizable case the halving algorithm makes at most log⁡2∣H∣\log_2\abs{\mathcal H} mistakes, the optimum is the Littlestone dimension, and the perceptron makes at most (R/γ)2(R/\gamma)^2.
  • Thresholds on [0,1][0,1] have VC dimension 1 but infinite Littlestone dimension: online learnability is strictly harder than PAC learnability, and finite Littlestone dimension also characterizes agnostic online and private learnability.
  • Exponential weights has regret at most ln⁡N/η+ηT/8\ln N/\eta+\eta T/8, hence (T/2)ln⁡N\sqrt{(T/2)\ln N} at η=8ln⁡N/T\eta=\sqrt{8\ln N/T}; against an adaptive adversary with 0–1 loss, randomization is necessary.
  • Online gradient descent has regret 32DGT\tfrac32DG\sqrt T, or G22α(1+ln⁡T)\tfrac{G^2}{2\alpha}(1+\ln T) under α\alpha-strong convexity. On i.i.d. data the averaged hypothesis has excess risk at most E[RegretT]/T\E[\mathrm{Regret}_T]/T.
  • UCB1 has regret O(∑iln⁡T/Δi)\order{\sum_i\ln T/\Delta_i}, matching the Lai–Robbins rate up to constants; EXP3 has O(TKln⁡K)\order{\sqrt{TK\ln K}} against any reward sequence, within ln⁡K\sqrt{\ln K} of the Ω(KT)\Omega(\sqrt{KT}) lower bound.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

A data stream is separated by a unit vector with margin γ=0.1\gamma=0.1, and every input has norm at most R=1R=1. The inputs live in R106\R^{10^6}, and the stream is 10910^9 examples long. At most how many mistakes does the perceptron make?

  1. 10
  2. 100
  3. 10610^6, one per dimension
  4. It depends on T=109T=10^9: about T\sqrt T
Show the answer

B. 100

(R/γ)2=(1/0.1)2=100(R/\gamma)^2=(1/0.1)^2=100, on every such sequence, whatever the dimension or the length of the stream. The margin, not the number of parameters, controls the difficulty, which is also why kernel perceptrons work in infinite-dimensional feature spaces.

Question 2

With the 0–1 loss and two experts, why can no deterministic online learner guarantee regret o(T)o(T) against an adaptive adversary?

  1. Because the experts might both be wrong every round
  2. Because deterministic learners cannot use weights
  3. Because the adversary can compute the learner's prediction and reveal the opposite label every round, while one of two experts who always disagree is right at least half the time
  4. Because the regret of deterministic learners is always exactly T/2T/2
Show the answer

C. Because the adversary can compute the learner's prediction and reveal the opposite label every round, while one of two experts who always disagree is right at least half the time

The learner errs TT times, the better expert at most T/2T/2 times, so the regret is at least T/2T/2. Randomizing (or predicting a probability under a convex loss) hides the learner's choice from the adversary, which is what lets exponential weights reach O(Tln⁡N)\order{\sqrt{T\ln N}}.

Question 3

Online gradient descent runs with step sizes ηt=1/(αt)\eta_t=1/(\alpha t) on α\alpha-strongly convex losses with gradients bounded by GG. How does its regret grow?

  1. Like G22α(1+ln⁡T)\tfrac{G^2}{2\alpha}(1+\ln T)
  2. Like 32DGT\tfrac32DG\sqrt T, the same as for merely convex losses
  3. It stays bounded by a constant independent of TT
  4. Linearly in TT, since the steps shrink too fast
Show the answer

A. Like G22α(1+ln⁡T)\tfrac{G^2}{2\alpha}(1+\ln T)

Strong convexity adds a term −α2∥xt−x⋆∥2-\tfrac\alpha2\norm{\mathbf x_t-\mathbf x^\star}^2 to each round's bound; with ηt=1/(αt)\eta_t=1/(\alpha t) it cancels the distance terms, and what is left is G22∑tηt=G22α∑t1/t\tfrac{G^2}2\sum_t\eta_t=\tfrac{G^2}{2\alpha}\sum_t1/t, a harmonic sum.

Question 4

EXP3 sees only the reward of the arm it pulled. Why does it divide that reward by pt,Itp_{t,I_t}, the probability with which it pulled that arm?

  1. To keep the weights from overflowing
  2. To reward exploration of rarely pulled arms with a bonus, as UCB1 does
  3. To normalize rewards to [0,1][0,1]
  4. So that every arm's reward estimate is unbiased: E[x^t,i]=pt,i⋅xt,i/pt,i=xt,i\E[\hat x_{t,i}]=p_{t,i}\cdot x_{t,i}/p_{t,i}=x_{t,i}
Show the answer

D. So that every arm's reward estimate is unbiased: E[x^t,i]=pt,i⋅xt,i/pt,i=xt,i\E[\hat x_{t,i}]=p_{t,i}\cdot x_{t,i}/p_{t,i}=x_{t,i}

An arm pulled with probability pp is observed only a fraction pp of the time; dividing by pp compensates exactly, so exponential weights can run as if it saw every arm's reward. The price is variance of order 1/p1/p, which is why EXP3 mixes in uniform exploration, and why its regret has an extra factor K\sqrt K compared with full-information experts.

Further reading

  • N. Cesa-Bianchi & G. Lugosi, Prediction, Learning, and Games (Cambridge University Press, 2006).
  • S. Shalev-Shwartz & S. Ben-David, Understanding Machine Learning: From Theory to Algorithms (Cambridge University Press, 2014), chapter 21.
  • N. Littlestone, "Learning quickly when irrelevant attributes abound: a new linear-threshold algorithm," Machine Learning 2, 285–318 (1988).
  • M. Zinkevich, "Online convex programming and generalized infinitesimal gradient ascent," Proceedings of ICML, 928–936 (2003).
  • P. Auer, N. Cesa-Bianchi & P. Fischer, "Finite-time analysis of the multiarmed bandit problem," Machine Learning 47, 235–256 (2002).