Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

Bandit Algorithms

51 missions · 33 completed

Missions

Open18Completed33All51
🏆Completed
Algorithmic Game TheoryMachine LearningOperations Research+1·Captain: naimengye

Introduction to Multi-Armed Bandits XI: Bandits and Agents, Incentivized Exploration via Hidden ExplorationTextbook

Motivation

A recommendation system learns from the users it serves: the diner who tries a restaurant produces the review the next diner reads. Each user would rather exploit what is already known than explore for the benefit of those who come later, so a population of self-interested agents under-explores, and an alternative that looks bad on sparse early evidence may never be tried again even when it is the best. Chapter 11 of Slivkins, Introduction to Multi-Armed Bandits (arXiv:1904.07272), treats incentivized exploration: a principal who cannot force the agents but can recommend, and who, because it aggregates what earlier agents observed, knows more than any one of them. The question is whether recommendations alone can induce enough exploration to learn as fast as an ordinary bandit algorithm. The model is that of Kremer, Mansour and Perry (JPE 2014) and the results are those of Mansour, Slivkins and Syrgkanis (EC 2015, Operations Research 2020), specialized to two arms; the single-round problem is Bayesian persuasion in the sense of Kamenica and Gentzkow (AER 2011).

Setting

There are KKK arms and TTT rounds. A mean reward vector μ∈[0,1]K\mu \in [0,1]^Kμ∈[0,1]K is drawn from a known prior PPP, and each pull of arm aaa yields a reward drawn from a known family DμaD_{\mu_a}Dμa​​ with mean μa\mu_aμa​. In round ttt the principal recommends an arm rect\mathrm{rec}_trect​; agent ttt, who knows the prior, the family, the algorithm and the round but not the past, sees only rect\mathrm{rec}_trect​, chooses ata_tat​, collects rt∼Dμatr_t \sim D_{\mu_{a_t}}rt​∼Dμat​​​ and leaves; the principal observes (at,rt)(a_t, r_t)(at​,rt​). The chapter works with two arms, ordered so that the prior means satisfy μ10≥μ20\mu^0_1 \ge \mu^0_2μ10​≥μ20​, with a prior of finite support and finitely many reward values.

An algorithm is Bayesian incentive-compatible (BIC, Definition 11.4) if following its recommendation is in every agent's interest given what the agent knows: for every round ttt and arms a≠a′a \ne a'a=a′ with Pr⁡[rect=a,Et−1]>0\Pr[\mathrm{rec}_t = a, E_{t-1}] > 0Pr[rect​=a,Et−1​]>0,

E[μa−μa′∣rect=a, Et−1]≥0,(11.1)\mathbb{E}[\mu_a - \mu_{a'} \mid \mathrm{rec}_t = a,\ E_{t-1}] \ge 0, \tag{11.1}E[μa​−μa′​∣rect​=a, Et−1​]≥0,(11.1)

where Et−1E_{t-1}Et−1​ is the event that all previous agents complied. A BIC algorithm is then an ordinary bandit algorithm whose recommendations are followed, and the run has the law of the Bayesian bandit of Chapter 3. Two contrasting policies frame the chapter. GREEDY reveals the history and lets agents exploit, at∈arg⁡max⁡aE[μa∣Ht]a_t \in \arg\max_a \mathbb{E}[\mu_a \mid H_t]at​∈argmaxa​E[μa​∣Ht​] (11.2); it is BIC and it fails. HiddenExploration (Algorithm 11.1) hides a little exploration in a lot of exploitation: on a signal sig\mathrm{sig}sig, with probability ε\varepsilonε it recommends a target arm atrg(sig)a_{\mathrm{trg}}(\mathrm{sig})atrg​(sig), otherwise the arm maximizing E[μa∣sig]\mathbb{E}[\mu_a \mid \mathrm{sig}]E[μa​∣sig], ties to arm 1. Its posterior gap is G=E[μ2−μ1∣sig]G = \mathbb{E}[\mu_2 - \mu_1 \mid \mathrm{sig}]G=E[μ2​−μ1​∣sig]. RepeatedHE (Algorithm 11.2) runs it round after round with an arbitrary bandit algorithm ALG\mathrm{ALG}ALG as the target: N0N_0N0​ initial rounds recommend arm 1; afterwards, with probability ε\varepsilonε the round is an exploration round in which ALG\mathrm{ALG}ALG chooses (and is fed the reward), and otherwise the exploitation branch recommends min⁡arg⁡max⁡aE[μa∣St]\min\arg\max_a \mathbb{E}[\mu_a \mid S_t]minargmaxa​E[μa​∣St​], where StS_tSt​ is the data of all exploration rounds so far (11.10). The quantity that governs everything is G1,n=E[μ2−μ1∣S1,n]G_{1,n} = \mathbb{E}[\mu_2 - \mu_1 \mid S_{1,n}]G1,n​=E[μ2​−μ1​∣S1,n​] (11.11), the posterior gap after nnn samples of arm 1, and Property (11.12), that Pr⁡[G1,n>0]>0\Pr[G_{1,n} > 0] > 0Pr[G1,n​>0]>0 for some nnn: arm 2 can appear better after enough samples of arm 1.

Formalization targets

Goal: Theorem 11.15

RepeatedHE with exploration probability ε>0\varepsilon > 0ε>0 and N0N_0N0​ initial samples of arm 1 is BIC as long as

ε<13 E[G⋅1{G>0}],G=GN0+1=E[μ2−μ1∣S1,N0],\varepsilon < \tfrac13\,\mathbb{E}\big[G \cdot \mathbf 1\{G > 0\}\big], \qquad G = G_{N_0+1} = \mathbb{E}[\mu_2 - \mu_1 \mid S_{1,N_0}],ε<31​E[G⋅1{G>0}],G=GN0​+1​=E[μ2​−μ1​∣S1,N0​​],

for any bandit algorithm ALG\mathrm{ALG}ALG and any horizon. The threshold depends on the prior alone.

Milestones

Theorem 11.7 (GREEDY never chooses arm 2 with probability at least μ10−μ20\mu^0_1 - \mu^0_2μ10​−μ20​) and Corollary 11.8 (linear Bayesian regret of GREEDY under independent priors); Lemma 11.10 (HiddenExploration is BIC when ε≤13E[G1{G>0}]\varepsilon \le \frac13\mathbb{E}[G\mathbf 1\{G > 0\}]ε≤31​E[G1{G>0}]) with Claim 11.12 (the arm-2 side of the constraint suffices); Corollary 11.14 (RepeatedHE is BIC under the round-by-round condition); Theorem 11.19 (without Property (11.12) no BIC algorithm ever plays arm 2, ties to arm 1).

Significance

The results say when exploration can be incentivized at all and how. Theorem 11.7 shows that revealing everything is not a solution: the greedy dynamics gets stuck on arm 1 with a probability that does not shrink with TTT, and Corollary 11.8 turns that into Ω(T)\Omega(T)Ω(T) Bayesian regret. Theorem 11.15 shows that a recommendation-only principal can induce any amount of exploration it wants, with ALG\mathrm{ALG}ALG arbitrary, at a per-round rate ε\varepsilonε fixed by the prior; Theorem 11.17 (stated with a proof sketch, and omitted here) then transfers ALG\mathrm{ALG}ALG's regret to RepeatedHE up to the prior-dependent factors N0N_0N0​ and 1/ε1/\varepsilon1/ε, so O~(T)\tilde O(\sqrt T)O~(T​) regret is attainable subject to incentives. Theorem 11.19 closes the picture: Property (11.12) is necessary as well as sufficient. Together they characterize which priors admit incentivized exploration and give an algorithm that works for all of them.

Nothing of this is machine-checked. The mission adds to the Bayesian layer of mission III (prior, posterior by Bayes' rule, Bayesian regret) the BIC constraint on a joint law, GREEDY as a policy, the single-round HiddenExploration on an abstract finite signal, and the law of RepeatedHE; all of it is reusable for the KKK-arm and the "explore all explorable arms" extensions of the literature review.

Difficulty

Theorem 11.7 is a martingale argument: the posterior gap along the history is a Doob martingale, the first round in which arm 2 is chosen is a bounded stopping time, and optional stopping gives E[Zτ]=μ10−μ20\mathbb{E}[Z_\tau] = \mu^0_1 - \mu^0_2E[Zτ​]=μ10​−μ20​; all of this has to be set up on the joint law of (μ,HT)(\mu, H_T)(μ,HT​) of mission III, where the posterior is defined by Bayes' rule and the identification with a conditional expectation is itself a theorem (posterior_eq_condProb). Lemma 11.10 is the heart of the chapter and is not a computation about rec\mathrm{rec}rec: it works with F(E)=E[G1E]F(E) = \mathbb{E}[G\mathbf 1_E]F(E)=E[G1E​], splits along the two branches, uses that the exploitation branch recommends arm 2 exactly when G>0G > 0G>0, and closes with F(G>0)+F(G<0)=E[μ2−μ1]≤0F(G > 0) + F(G < 0) = \mathbb{E}[\mu_2 - \mu_1] \le 0F(G>0)+F(G<0)=E[μ2​−μ1​]≤0; the only place where the analysis uses that both branches are functions of the signal is the step E[μ2−μ1∣rec=2]=E[G∣rec=2]\mathbb{E}[\mu_2 - \mu_1 \mid \mathrm{rec} = 2] = \mathbb{E}[G \mid \mathrm{rec} = 2]E[μ2​−μ1​∣rec=2]=E[G∣rec=2], and a formalization has to make that step explicit. Theorem 11.15 requires seeing each later round of RepeatedHE as a HiddenExploration with signal StS_tSt​, where ALG\mathrm{ALG}ALG's choice is a randomized function of StS_tSt​, and then the monotonicity of E[Gt1{Gt>0}]\mathbb{E}[G_t\mathbf 1\{G_t > 0\}]E[Gt​1{Gt​>0}] in ttt, a two-line consequence of St+1S_{t+1}St+1​ determining StS_tSt​ that presupposes the posterior given StS_tSt​ is the Bayes posterior of the exploration data alone, which is true because the exploration decisions do not depend on μ\muμ given that data. Corollary 11.8 needs the independence of the event "μ1<1−2α\mu_1 < 1 - 2\alphaμ1​<1−2α and arm 2 is never chosen" from μ2\mu_2μ2​. Theorem 11.19 is an induction in which the inductive hypothesis is a probability-zero statement about all earlier rounds.

Formalization scope

Arms are Fin 2, the book's arm 1 being index 0; rounds are Fin T. The prior is a probability measure on mean vectors supported on a finite set F⊆[0,1]2F \subseteq [0,1]^2F⊆[0,1]2, with μ10≥μ20\mu^0_1 \ge \mu^0_2μ10​≥μ20​ as a hypothesis; the reward family is mission III's RewardFamily (finitely many values, mean ν\nuν for ν∈[0,1]\nu \in [0,1]ν∈[0,1]). BIC is defined on a joint law of (μ,record)(\mu, \text{record})(μ,record) of the run in which every agent complies, with the recommendation of each round read off the record; the compliance event Et−1E_{t-1}Et−1​ of (11.1) is the sure event of that law, which is the standard reading of "the agents believe all previous agents complied". For a bandit policy the law is mission III's jointMeasure. Conditional expectations are written as finite sums over FFF, so there are no integrals and no integrability side conditions; a posterior mean off the support is a junk 000 that never enters a theorem. GREEDY allows arbitrary tie-breaking; HiddenExploration's exploitation branch breaks ties toward arm 1 as Algorithm 11.1 does; the tie convention of Theorem 11.19 is the strict form of BIC for arm 2. The law of RepeatedHE is an explicit finitely supported measure, μ\muμ and record weighted by the prior times the product of the round probabilities (initial rounds forced to arm 1, then the ε\varepsilonε-coin, ALG\mathrm{ALG}ALG's kernel on its own history, or the exploitation arm, then DμatD_{\mu_{a_t}}Dμat​​​); it is written this way because ALG\mathrm{ALG}ALG is fed a history of variable length. Two conditions are stated exactly as printed: Lemma 11.10 with ε≤13E[G1{G>0}]\varepsilon \le \frac13\mathbb{E}[G\mathbf 1\{G > 0\}]ε≤31​E[G1{G>0}] (non-strict, checked at equality) and Theorem 11.15 with the strict inequality.

Trivializations are excluded: ε>0\varepsilon > 0ε>0 throughout; the BIC condition is asserted only where the recommendation has positive probability, and the sums in it are over the finite support, so an unsatisfiable hypothesis cannot hide in a measure-zero set. Welcome contributions: the optional-stopping argument on jointMeasure, the identification of explPostMean with the conditional expectation given the exploration data, the Bayes-rule algebra behind Lemma 11.10, and the counting lemmas on heRecords.

Selected references

  • A. Slivkins, Introduction to Multi-Armed Bandits, Foundations and Trends in Machine Learning 12(1-2), 2019, Chapter 11. arXiv:1904.07272, doi:10.1561/2200000068
  • I. Kremer, Y. Mansour, M. Perry, Implementing the "Wisdom of the Crowd", Journal of Political Economy 122(5), 2014. doi:10.1086/676597
  • Y. Mansour, A. Slivkins, V. Syrgkanis, Bayesian Incentive-Compatible Bandit Exploration, Operations Research 68(4), 2020 (EC 2015). doi:10.1287/opre.2019.1919
  • E. Kamenica, M. Gentzkow, Bayesian Persuasion, American Economic Review 101(6), 2011. doi:10.1257/aer.101.6.2590
  • M. Sellke, A. Slivkins, The Price of Incentivizing Exploration: A Characterization via Thompson Sampling and Sample Complexity, Operations Research 71(5), 2023. doi:10.1287/opre.2022.2401
10 thms3 active usersReviewed
🏆Completed
Machine LearningOperations Research·Captain: Shuze Chen

Bandit Algorithms I: Concentration of MeasureTextbook

How quickly does the empirical mean of independent random variables concentrate around the true mean? This question is the analytic engine of the entire theory of stochastic bandits: every optimistic algorithm (Explore-Then-Commit, UCB and its relatives) is calibrated by a tail bound on the sample mean. This mission formalizes the subgaussian framework of Chapter 5 of Lattimore–Szepesvári's Bandit Algorithms: a random variable XXX is σ\sigmaσ-subgaussian when E[eλX]≤eλ2σ2/2\mathbb{E}[e^{\lambda X}] \le e^{\lambda^2\sigma^2/2}E[eλX]≤eλ2σ2/2 for all λ\lambdaλ, and the Cramér–Chernoff method converts this moment-generating-function control into the exponential tail P(X≥ε)≤e−ε2/(2σ2)\mathbb{P}(X \ge \varepsilon) \le e^{-\varepsilon^2/(2\sigma^2)}P(X≥ε)≤e−ε2/(2σ2). The goal theorem is the Hoeffding-type bound: the sample mean of nnn independent σ\sigmaσ-subgaussian deviations exceeds the true mean by ε\varepsilonε with probability at most exp⁡(−nε2/(2σ2))\exp(-n\varepsilon^2/(2\sigma^2))exp(−nε2/(2σ2)), together with its confidence form P(μ^+2σ2log⁡(1/δ)/n≤μ)≤δ\mathbb{P}\big(\hat\mu + \sqrt{2\sigma^2\log(1/\delta)/n} \le \mu\big) \le \deltaP(μ^​+2σ2log(1/δ)/n​≤μ)≤δ — the exact bound every UCB index is built from. These few lines of analysis are cited by every regret bound in the series.

2 thms3 active usersReviewed
Operations ResearchProbabilityStatistics·Captain: mikedeng1

Dynamic Pricing Without Knowing the Demand Function: Risk Bounds and Near-Optimal Algorithms I: The Nonparametric Learn-then-Price Policy Has Regret at Most C(log n)^{1/2}/n^{1/4}Research Paper

Why price without knowing demand

A seller with a fixed stock of a single product and a finite selling season has to set prices without knowing how demand responds to them. This is the standard situation in revenue management: airline seats, hotel rooms, fashion goods and event tickets. The classical theory of dynamic pricing (Gallego and van Ryzin, 1994) assumes that the demand function λ(p)\lambda(p)λ(p), the rate of purchase requests at price ppp, is known. In practice it has to be learned from sales, while the season runs and the stock is consumed.

Besbes and Zeevi (2009) asked how much revenue is lost for not knowing λ\lambdaλ. They answered it with explicit policies and matching-order bounds. Their setting differs from the multi-armed bandit literature it borrows from in three ways:

  • the problem is constrained by an initial inventory;
  • the set of prices is a continuum;
  • the set of possible demand functions is a nonparametric class.

This mission formalizes their first main result, Proposition 1: a simple learn-then-price policy has worst-case relative regret of order (log⁡n)1/2n−1/4(\log n)^{1/2}n^{-1/4}(logn)1/2n−1/4 in a market of size nnn.

Setting

Prices. Fix 0<p‾<p‾<∞0<\underline p<\overline p<\infty0<p​<p​<∞ and an off price p∞>0p_\infty>0p∞​>0 outside [p‾,p‾][\underline p,\overline p][p​,p​]. The seller may charge any price in [p‾,p‾]∪{p∞}[\underline p,\overline p]\cup\{p_\infty\}[p​,p​]∪{p∞​}; charging p∞p_\inftyp∞​ stops demand.

Demand. Requests arrive as a Poisson process whose intensity at time ttt is λ(p(t))\lambda(p(t))λ(p(t)). Let NNN be a unit-rate Poisson process. By the time change (1), the cumulative requests up to time ttt under a price path p(⋅)p(\cdot)p(⋅) are N(∫0tλ(p(s)) ds)N\big(\int_0^t\lambda(p(s))\,ds\big)N(∫0t​λ(p(s))ds). The seller starts with inventory xxx and sells until either the horizon TTT ends or the stock runs out. The expected revenue of a policy π\piπ is Jπ(x,T;λ)J^\pi(x,T;\lambda)Jπ(x,T;λ).

Demand class. L=L(M,K‾,K‾,m)\mathcal L=\mathcal L(M,\underline K,\overline K,m)L=L(M,K​,K,m) is the set of regular demand functions satisfying Assumption 1. Regular means:

  • λ≥0\lambda\ge0λ≥0 and λ(p∞)=0\lambda(p_\infty)=0λ(p∞​)=0;
  • λ\lambdaλ is non-increasing on [p‾,p‾][\underline p,\overline p][p​,p​], with inverse γ\gammaγ;
  • the revenue rate r(l)=lγ(l)r(l)=l\gamma(l)r(l)=lγ(l) is concave.

Assumption 1 requires:

  • (i) λ≤M\lambda\le Mλ≤M on [p‾,p‾][\underline p,\overline p][p​,p​];
  • (ii) λ\lambdaλ is K‾\overline KK-Lipschitz and γ\gammaγ is K‾−1\underline K^{-1}K​−1-Lipschitz;
  • (iii) max⁡ppλ(p)≥m\max_p p\lambda(p)\ge mmaxp​pλ(p)≥m.

Benchmark. The deterministic relaxation (5) replaces the random demand by its mean:

JD(x,T∣λ)=sup⁡{∫0Tp(s)λ(p(s)) ds:∫0Tλ(p(s)) ds≤x}.J^D(x,T\mid\lambda)=\sup\Big\{\int_0^T p(s)\lambda(p(s))\,ds:\int_0^T\lambda(p(s))\,ds\le x\Big\}.JD(x,T∣λ)=sup{∫0T​p(s)λ(p(s))ds:∫0T​λ(p(s))ds≤x}.

The regret of a policy is Rπ=1−Jπ/JD\mathcal R^\pi=1-J^\pi/J^DRπ=1−Jπ/JD.

Scaling. In a market of size nnn the inventory is nxnxnx and the demand function is nλn\lambdanλ, as in (11). The corresponding quantities are JnπJ^\pi_nJnπ​, JnD=nJDJ^D_n=nJ^DJnD​=nJD and Rnπ\mathcal R^\pi_nRnπ​.

Algorithm 1, π(τ,κ)\pi(\tau,\kappa)π(τ,κ). The policy has three phases.

  1. Learning. On [0,τ][0,\tau][0,τ] it tests κ\kappaκ equally spaced prices pi=p‾+(i−1)(p‾−p‾)/κp_i=\underline p+(i-1)(\overline p-\underline p)/\kappapi​=p​+(i−1)(p​−p​)/κ, each for Δ=τ/κ\Delta=\tau/\kappaΔ=τ/κ time units. It estimates λ(pi)\lambda(p_i)λ(pi​) by the normalized request counts λ^(pi)\hat\lambda(p_i)λ^(pi​).
  2. Optimization. It chooses p^u=arg⁡max⁡ipiλ^(pi)\hat p^u=\arg\max_i p_i\hat\lambda(p_i)p^​u=argmaxi​pi​λ^(pi​) and p^c=arg⁡min⁡i∣λ^(pi)−x/T∣\hat p^c=\arg\min_i|\hat\lambda(p_i)-x/T|p^​c=argmini​∣λ^(pi​)−x/T∣, and sets p^=max⁡{p^u,p^c}\hat p=\max\{\hat p^u,\hat p^c\}p^​=max{p^​u,p^​c}.
  3. Pricing. It charges p^\hat pp^​ on (τ,T](\tau,T](τ,T] until the stock runs out.

Formalization targets

Goal: Proposition 1

Let τn≍n−1/4\tau_n\asymp n^{-1/4}τn​≍n−1/4 and κn≍n1/4\kappa_n\asymp n^{1/4}κn​≍n1/4, and let πn=π(τn,κn)\pi_n=\pi(\tau_n,\kappa_n)πn​=π(τn​,κn​). Then there is a finite constant CCC, independent of λ\lambdaλ and nnn, such that

sup⁡λ∈LRnπ(x,T;λ)≤C(log⁡n)1/2n1/4(n≥2).\sup_{\lambda\in\mathcal L}\mathcal R^{\pi}_n(x,T;\lambda)\le\frac{C(\log n)^{1/2}}{n^{1/4}}\qquad(n\ge2).λ∈Lsup​Rnπ​(x,T;λ)≤n1/4C(logn)1/2​(n≥2).

The constant is left unspecified, as in the paper. Its dependence on the class parameters, xxx and TTT is "somewhat complex" (p. 12), and the order (log⁡n)1/2n−1/4(\log n)^{1/2}n^{-1/4}(logn)1/2n−1/4 is the content of the result.

Milestones

The milestones follow the proof in the appendix, in order:

  • the scaling JnD=nJDJ^D_n=nJ^DJnD​=nJD (p. 12);
  • Fact 1, JD≥mmin⁡{T,x/M}J^D\ge m\min\{T,x/M\}JD≥mmin{T,x/M} on L\mathcal LL;
  • Lemma 1, the solution of (5): charge pD=max⁡{pu,pc}p^D=\max\{p^u,p^c\}pD=max{pu,pc} until the stock runs out;
  • Lemma 2, a Poisson deviation bound;
  • the revenue lower bound (A-2);
  • Lemma 3, the learned price is near pDp^DpD with high probability;
  • Lemma 4 and the Case 1 bound (A-11), for λ(p‾)≤x/T\lambda(\overline p)\le x/Tλ(p​)≤x/T;
  • Lemma 5 and the Case 2 bound (A-15), for λ(p‾)>x/T\lambda(\overline p)>x/Tλ(p​)>x/T;
  • the Step 4 bound Rnπ≤C12(un+τn)\mathcal R^\pi_n\le C_{12}(u_n+\tau_n)Rnπ​≤C12​(un​+τn​), where un=(log⁡n)1/2max⁡{1/κn,(nΔn)−1/2}u_n=(\log n)^{1/2}\max\{1/\kappa_n,(n\Delta_n)^{-1/2}\}un​=(logn)1/2max{1/κn​,(nΔn​)−1/2}.

Significance

Proposition 1 shows that a seller who knows only a nonparametric class of demand functions can approach the full-information revenue uniformly over the class. Learning costs a vanishing fraction of revenue, and the policy needs no parametric model. Together with the paper's lower bound of order n−1/2n^{-1/2}n−1/2 for every admissible policy (Proposition 2, not in this mission), it brackets the minimax regret of nonparametric pricing under an inventory constraint. The result is a reference point for the learning-and-earning literature in operations management that followed it.

The result is proved in the paper; to our knowledge, it has no machine-checked proof. Formalizing it requires:

  • a working theory of policies driven by a time-changed Poisson process, with sales capped by an inventory;
  • the deterministic relaxation of Gallego and van Ryzin for a continuum of prices with an off price;
  • uniform (over the class) Poisson concentration bounds.

The mission produces Lean statements of all of these. A proof would also check every constant chain of the appendix, where the argument uses some displays in a form slightly different from their printed statement (see the scope section).

Difficulty

The obvious argument controls the estimation error at the tested prices and concludes that p^\hat pp^​ is close to the optimal price. It breaks in two places.

First, pDp^DpD is the larger of two prices, the revenue maximizer and the price that sells the inventory exactly. Near the boundary between these regimes, the revenue rate at p^\hat pp^​ is not controlled by the error in p^\hat pp^​ alone: it needs the concavity of the revenue rate and the inverse Lipschitz bound on γ\gammaγ.

Second, when demand at the highest price exceeds the inventory rate (λ(p‾)>x/T\lambda(\overline p)>x/Tλ(p​)>x/T), the revenue is limited by stock-outs rather than by the price. The bound must then show that nearly all of the inventory is sold during the pricing phase, uniformly over the class.

Throughout, every constant must be independent of the demand function, so the estimates have to hold uniformly over an infinite-dimensional class.

Formalization scope

  • Poisson process. The demand is driven by IsPoissonProcess N 1 on a probability space (Ω,P)(\Omega,\mathbb P)(Ω,P), a published platform definition: ℕ-valued, N(0)=0N(0)=0N(0)=0, monotone paths, independent Poisson increments. The time change (1) is rendered by evaluating NNN at cumulative intensities.
  • Inventory. The inventory of the market of size nnn is ⌊nx⌋\lfloor nx\rfloor⌊nx⌋ units, and sales are min⁡{N(⋅),⌊nx⌋}\min\{N(\cdot),\lfloor nx\rfloor\}min{N(⋅),⌊nx⌋}. The cap is never dropped.
  • Revenue. JnπJ^\pi_nJnπ​ is the Bochner expectation of a bounded, finitely-valued revenue, so it is a genuine integral.
  • Demand functions. A demand function is a map R→R\mathbb R\to\mathbb RR→R, nonnegative, with λ(p∞)=0\lambda(p_\infty)=0λ(p∞​)=0. Regularity and Assumption 1 are imposed on [p‾,p‾][\underline p,\overline p][p​,p​], and the inverse γ\gammaγ is Function.invFunOn.
  • Benchmark. JDJ^DJD is a supremum over measurable price paths with integrable demand rate. The supremum is genuine: the set of path revenues is nonempty and bounded.
  • Algorithm. The grid excludes p‾\overline pp​, as in the paper. Ties in the grid argmax and argmin go to the smallest index. The estimates compare λ^(pi)\hat\lambda(p_i)λ^(pi​) with x/Tx/Tx/T.
  • Tuning. τn≍n−1/4\tau_n\asymp n^{-1/4}τn​≍n−1/4 and κn≍n1/4\kappa_n\asymp n^{1/4}κn​≍n1/4 are encoded with explicit constants 0<c≤c′0<c\le c'0<c≤c′, with τn∈(0,T]\tau_n\in(0,T]τn​∈(0,T] and κn≥1\kappa_n\ge1κn​≥1. Constants may depend on c,c′c,c'c,c′, the class parameters, the prices, xxx and TTT, but never on λ\lambdaλ or nnn.
  • Range of nnn. Bounds whose right side vanishes at n=1n=1n=1 because log⁡1=0\log1=0log1=0 are stated for n≥2n\ge2n≥2: the goal and (A-15).
  • Typo correction. Lemma 5's event uses nx−C9nunnx-C_9nu_nnx−C9​nun​, as in its proof, not the printed nx−C9unnx-C_9u_nnx−C9​un​.
  • Ruled out. A specific demand curve, a fixed nnn, deterministic demand, a finite price set, a known λ\lambdaλ, constants depending on λ\lambdaλ, or dropping the inventory cap would each make the statement a different and easier theorem. None is used.
  • Not included. The lower bound of Proposition 2 and the second assertion of Lemma 1 (Jπ≤JDJ^\pi\le J^DJπ≤JD for all admissible policies) are not included.

Contributions are welcome at any level: proofs of the milestones (Fact 1, Lemma 1 and Lemma 2 are self-contained), measurability and integrability lemmas for the revenue functional, and a reusable Poisson concentration library built on Mathlib's poissonMeasure.

Selected references

  • O. Besbes and A. Zeevi, Dynamic Pricing Without Knowing the Demand Function: Risk Bounds and Near-Optimal Algorithms, Operations Research 57(6):1407–1420, 2009. https://doi.org/10.1287/opre.1080.0640
  • G. Gallego and G. van Ryzin, Optimal Dynamic Pricing of Inventories with Stochastic Demand over Finite Horizons, Management Science 40(8):999–1020, 1994. https://doi.org/10.1287/mnsc.40.8.999
  • K. Talluri and G. van Ryzin, The Theory and Practice of Revenue Management, Springer, 2005. https://doi.org/10.1007/b139000
15 thms2 active usersReviewed
Machine LearningOperations ResearchProbability·Captain: mikedeng1

Analysis of Thompson Sampling for the Multi-armed Bandit Problem 2: Logarithmic Regret for N ArmsResearch Paper

Motivation

Thompson Sampling is the oldest heuristic for the multi-armed bandit problem: proposed by Thompson in 1933, it plays each arm with the posterior probability that the arm is the best one. It is simple to implement, performs well empirically (Chapelle and Li, NIPS 2011), and has been used in production systems such as click-through-rate prediction for search advertising. For a long time, however, no finite-time regret guarantee was known for it: the analyses available before 2012 gave only o(T)o(T)o(T) regret.

Agrawal and Goyal (arXiv:1111.1797, COLT 2012) gave the first logarithmic bounds on the expected regret of Thompson Sampling. This mission formalizes their bound for the general case of NNN arms (their Theorem 2). A companion mission of the same series formalizes their two-armed bound (Theorem 1), whose proof is independent.

Timeline. Lai and Robbins (1985) proved that every consistent algorithm has regret at least of order ∑iΔiD(μi∥μ1)ln⁡T\sum_i \frac{\Delta_i}{D(\mu_i\|\mu_1)}\ln T∑i​D(μi​∥μ1​)Δi​​lnT. Auer, Cesa-Bianchi and Fischer (2002) showed that UCB1 achieves O(∑iln⁡T/Δi)O(\sum_i \ln T/\Delta_i)O(∑i​lnT/Δi​) in finite time. Agrawal and Goyal (2012) proved O((∑a1/Δa2)2ln⁡T)O((\sum_a 1/\Delta_a^2)^2\ln T)O((∑a​1/Δa2​)2lnT) for Thompson Sampling with NNN arms; Kaufmann, Korda and Munos (2012) and Agrawal and Goyal (2013) later proved the asymptotically optimal constant for Bernoulli rewards.

Setting

A stochastic NNN-armed bandit has arms 1,…,N1,\dots,N1,…,N. Arm iii, when played, yields a random reward drawn from a fixed distribution νi\nu_iνi​ supported in [0,1][0,1][0,1], with mean μi\mu_iμi​; rewards of an arm are i.i.d. and independent of the other arms. Arm 111 is assumed to be the unique optimal arm, μ1>μi\mu_1>\mu_iμ1​>μi​ for i≠1i\ne1i=1, and Δi=μ1−μi>0\Delta_i=\mu_1-\mu_i>0Δi​=μ1​−μi​>0 is the gap of arm iii.

Thompson Sampling for general stochastic bandits (Algorithm 2 of the paper) keeps, for each arm iii, a count SiS_iSi​ of successes and FiF_iFi​ of failures, both starting at 000. In each round ttt it draws θi(t)∼Beta(Si+1,Fi+1)\theta_i(t)\sim\mathrm{Beta}(S_i+1,F_i+1)θi​(t)∼Beta(Si​+1,Fi​+1) independently for every arm, plays i(t)=arg⁡max⁡iθi(t)i(t)=\arg\max_i\theta_i(t)i(t)=argmaxi​θi​(t), observes a reward r~t∼νi(t)\tilde r_t\sim\nu_{i(t)}r~t​∼νi(t)​, performs a Bernoulli trial with success probability r~t\tilde r_tr~t​, and increments Si(t)S_{i(t)}Si(t)​ on success and Fi(t)F_{i(t)}Fi(t)​ on failure.

The expected regret in time TTT is

E[R(T)]=E[∑t=1T(μ∗−μi(t))],μ∗=max⁡iμi,\mathbb E[\mathcal R(T)]=\mathbb E\Big[\sum_{t=1}^T(\mu^*-\mu_{i(t)})\Big],\qquad \mu^*=\max_i\mu_i,E[R(T)]=E[t=1∑T​(μ∗−μi(t)​)],μ∗=imax​μi​,

the expectation being over the rewards, the Bernoulli trials and the posterior samples.

The proof works with the reward stacks Zi,mZ_{i,m}Zi,m​: the outcome of the mmm-th Bernoulli trial of arm iii, all independent. Then s(j)=∑m≤jZ1,ms(j)=\sum_{m\le j}Z_{1,m}s(j)=∑m≤j​Z1,m​, the number of successes in the first jjj plays of arm 111, is a Binomial(j,μ1)\mathrm{Binomial}(j,\mu_1)Binomial(j,μ1​) random variable. The other objects of the proof are the threshold Li=24ln⁡T/Δi2L_i=24\ln T/\Delta_i^2Li​=24lnT/Δi2​, the saturated set C(t)C(t)C(t) of suboptimal arms with at least LiL_iLi​ plays before round ttt, the intervals IjI_jIj​ between the jjj-th and (j+1)(j+1)(j+1)-th plays of arm 111, and the counts γj\gamma_jγj​ and Vjℓ,aV_j^{\ell,a}Vjℓ,a​ defined in §4.

Formalization targets

Goal: Theorem 2

There is an absolute constant C>0C>0C>0 such that for every N≥2N\ge2N≥2, every instance as above and every horizon T≥2T\ge2T≥2,

E[R(T)]≤C(∑a=2N1Δa2)2ln⁡T.\mathbb E[\mathcal R(T)]\le C\Big(\sum_{a=2}^N\frac{1}{\Delta_a^2}\Big)^2\ln T .E[R(T)]≤C(a=2∑N​Δa2​1​)2lnT.

CCC does not depend on NNN, on the reward distributions or on TTT.

Milestones

  1. Lemma 4: with E(t)E(t)E(t) the event that every saturated arm's sample lies within Δi/2\Delta_i/2Δi​/2 of its mean, Pr⁡(E(t))≥1−4(N−1)/T2\Pr(E(t))\ge1-4(N-1)/T^2Pr(E(t))≥1−4(N−1)/T2, also conditionally on s(j)=ss(j)=ss(j)=s.
  2. Lemma 5 (Eq. (7)): the expected regret from saturated arms inside IjI_jIj​ is at most E[E[γj+1∣s(j)]∑aΔaE[min⁡{X(j,s(j),μa+Δa/2),T}∣s(j)]]\mathbb E\big[\mathbb E[\gamma_j+1\mid s(j)]\sum_a\Delta_a\mathbb E[\min\{X(j,s(j),\mu_a+\Delta_a/2),T\}\mid s(j)]\big]E[E[γj​+1∣s(j)]∑a​Δa​E[min{X(j,s(j),μa​+Δa​/2),T}∣s(j)]].
  3. Lemma 1: E[X(j,s,y)]=1/Fj+1,yB(s)−1\mathbb E[X(j,s,y)]=1/F^B_{j+1,y}(s)-1E[X(j,s,y)]=1/Fj+1,yB​(s)−1, where X(j,s,y)X(j,s,y)X(j,s,y) counts the trials before an independent Beta(s+1,j−s+1)\mathrm{Beta}(s+1,j-s+1)Beta(s+1,j−s+1) sample exceeds yyy.
  4. Lemma 3: a three-case bound on E[E[min⁡{X(j,s(j),y),T}∣s(j)]]\mathbb E[\mathbb E[\min\{X(j,s(j),y),T\}\mid s(j)]]E[E[min{X(j,s(j),y),T}∣s(j)]] in terms of the Bernoulli KL divergence DDD between yyy and μ1\mu_1μ1​.

Significance

The result. Theorem 2 shows that Thompson Sampling, a randomized Bayesian heuristic, achieves regret logarithmic in the horizon for any number of arms with bounded rewards, matching the order in TTT of the Lai–Robbins lower bound. Its dependence on the gaps, (∑aΔa−2)2(\sum_a\Delta_a^{-2})^2(∑a​Δa−2​)2, is worse than UCB1's; the paper's own Remark 1 and later work improve it. The proof introduced the device of bounding the waiting time between plays of the optimal arm through geometric variables with Beta-cdf parameters (Lemmas 1 and 3), which reappears in later analyses of Thompson Sampling.

Formalizing it. The theorem is proved on paper; it has not been machine-checked. Bandit theory in Lean (bandit environments, regret, UCB-type analyses) is still young, and no Beta–Bernoulli Thompson Sampling result is formalized. The mission produces a Lean model of Algorithm 2 for general [0,1][0,1][0,1] rewards with the paper's stack coupling, the §4 bookkeeping of saturated arms and intervals, and the paper's lemmas as separate targets.

Difficulty

Two difficulties are specific to the NNN-armed analysis. First, the arm that competes with arm 111 changes over time: the set of saturated arms grows, and which saturated arm is "best" depends on the history, so the waiting time between plays of arm 111 cannot be compared with a single geometric variable as in the two-armed case. Second, the number γj\gamma_jγj​ of rounds at which arm 111's sample is large but arm 111 is not played is not independent of the counts Vjℓ,aV_j^{\ell,a}Vjℓ,a​: both depend on the same posterior samples, and Lemma 5 needs a careful conditioning on the history to separate them. The obvious union bound over arms, treating each suboptimal arm as in the two-armed proof, fails because it ignores the interruptions by unsaturated arms, whose number is the source of the squared sum in the bound.

Formalization scope

  • Probability space. Algorithm 2 is realized on a product of three independent i.i.d. tables: Beta draws indexed by (arm, round, successes, failures), rewards indexed by (arm, round) and uniform variables indexed by (arm, round); the Bernoulli trial of a round succeeds when the played arm's uniform variable is below its reward. The law of the run is that of Algorithm 2, which runs for every round t=1,2,…t=1,2,\dotst=1,2,…. s(j)s(j)s(j) is the number of successful trials among the first jjj plays of arm 111 in this infinite run (possibly after the horizon TTT), so it is a Binomial(j,μ1)\mathrm{Binomial}(j,\mu_1)Binomial(j,μ1​) random variable for every jjj, as the paper's independent Z1,mZ_{1,m}Z1,m​ make it. Ties in the arg max (probability 000) go to the smallest index.
  • Indexing. Arms are Fin N, and Lean arm 0 is the paper's arm 111. Rounds are 0,…,T−10,\dots,T-10,…,T−1; Lean round ttt is the paper's round t+1t+1t+1. Sums over a=2,…,Na=2,\dots,Na=2,…,N are sums over a≠0a\ne0a=0.
  • Expectations are lower Lebesgue integrals in [0,∞][0,\infty][0,∞], which has no junk value for non-integrable functions. Conditional expectations given s(j)s(j)s(j) are written as finite sums over the values of s(j)s(j)s(j).
  • The O(⋅)O(\cdot)O(⋅). The paper writes O(⋅)O(\cdot)O(⋅) in the sense of its footnote 1 (f(n)≤c g(n)f(n)\le c\,g(n)f(n)≤cg(n) for n≥n0n\ge n_0n≥n0​). The goal states it with one universal constant CCC, quantified before NNN, the instance and TTT, for every T≥2T\ge2T≥2. The explicit constants printed in App. D are not formalized: expanding the paper's Eq. (21) gives terms 288(N−1)(ln⁡T)∑aΔa−2288(N-1)(\ln T)\sum_a\Delta_a^{-2}288(N−1)(lnT)∑a​Δa−2​ and 48(N−1)248(N-1)^248(N−1)2 where the paper prints 288(ln⁡T)∑iΔi−2288(\ln T)\sum_i\Delta_i^{-2}288(lnT)∑i​Δi−2​, and Eq. (22) drops a factor ln⁡T\ln TlnT in its 192/Δa2192/\Delta_a^2192/Δa2​ term. The O(⋅)O(\cdot)O(⋅) claim does not depend on these slips; a statement pinned to the printed numerals might be false.
  • Ruled out. A constant depending on NNN, on the means or on TTT; a fixed number of arms; Bernoulli rewards only; or any algorithm other than Algorithm 2 would each make the goal a different and weaker theorem. The statement quantifies over all N≥2N\ge2N≥2 and all reward distributions on [0,1][0,1][0,1].
  • Not included. Eq. (8), the bound ∑jE[γj∣s(j)]≤∑uLu+4(N−1)\sum_{j}\mathbb E[\gamma_j\mid s(j)]\le\sum_uL_u+4(N-1)∑j​E[γj​∣s(j)]≤∑u​Lu​+4(N−1) "for all instantiations", is not a milestone: each term is conditioned on a different s(j)s(j)s(j), and the pointwise reading does not follow from the argument given. Remark 1 (an alternate bound) and App. A (several optimal arms) are not part of this mission.
  • Contributions welcome: Beta–Binomial identities, geometric waiting times, Hoeffding bounds for binomial cdfs, and the stopping-time arguments behind Lemma 5. Lemma 1 and Lemma 3 are shared with the two-armed mission of this series.

Selected references

  • S. Agrawal and N. Goyal, Analysis of Thompson Sampling for the Multi-armed Bandit Problem, COLT 2012; arXiv:1111.1797v3, 2012. https://arxiv.org/abs/1111.1797
  • W. R. Thompson, On the likelihood that one unknown probability exceeds another in view of the evidence of two samples, Biometrika 25, 1933. https://doi.org/10.1093/biomet/25.3-4.285
  • T. L. Lai and H. Robbins, Asymptotically efficient adaptive allocation rules, Advances in Applied Mathematics 6, 1985. https://doi.org/10.1016/0196-8858(85)90002-8
  • P. Auer, N. Cesa-Bianchi and P. Fischer, Finite-time analysis of the multiarmed bandit problem, Machine Learning 47, 2002. https://doi.org/10.1023/A:1013689704352
  • O. Chapelle and L. Li, An empirical evaluation of Thompson Sampling, NIPS 2011. https://papers.nips.cc/paper/4321-an-empirical-evaluation-of-thompson-sampling
  • E. Kaufmann, N. Korda and R. Munos, Thompson Sampling: an asymptotically optimal finite-time analysis, ALT 2012. https://arxiv.org/abs/1205.4217
  • S. Agrawal and N. Goyal, Further optimal regret bounds for Thompson Sampling, AISTATS 2013. https://arxiv.org/abs/1209.3353
11 thms2 active usersReviewed
Machine LearningOperations ResearchStatistics·Captain: mikedeng1

Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems III: Contextual Bandits and the Banditron Mistake BoundTextbook

Motivation

In many sequential decision problems the learner sees side information before acting. A news site chooses an article for a visitor whose history and location it knows; an ad server chooses an advertisement for a query. Only the reward of the chosen action is observed. These are contextual bandit problems, and Chapter 4 of Bubeck and Cesa-Bianchi's monograph Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems (arXiv:1204.5721v2) surveys several of their formal versions. In a contextual problem the learner is compared with the best policy, a map from contexts to arms, rather than with the best single arm.

This mission covers three of the chapter's models. The first marks each round with a context from a finite set. In the second, NNN experts give advice, as in prediction with expert advice. The third is the bandit multiclass problem: a linear classifier predicts one of KKK labels and then learns only whether its prediction was right. The goal is the mistake bound of the Banditron (Kakade, Shalev-Shwartz and Tewari, ICML 2008). The bound shows that one bit of feedback per round suffices to compete with every linear classifier, at regret O(n2/3)O(n^{2/3})O(n2/3).

Setting

There are K≥2K \ge 2K≥2 arms (or labels) {1,…,K}\{1,\dots,K\}{1,…,K} and rounds t=1,…,nt = 1, \dots, nt=1,…,n.

Adversarial losses. At round ttt an adversary assigns losses ℓi,t∈[0,1]\ell_{i,t} \in [0,1]ℓi,t​∈[0,1] to the arms and may adapt to the forecaster's past plays I1,…,It−1I_1, \dots, I_{t-1}I1​,…,It−1​. The forecaster draws ItI_tIt​ at random from a distribution ptp_tpt​ that depends on what it has observed, and it observes only ℓIt,t\ell_{I_t,t}ℓIt​,t​. Expectations E\mathbb EE are over the forecaster's draws.

Side information. Each round carries a context sts_tst​ from a finite set S\mathcal SS, and the sequence s1,s2,…s_1, s_2, \dotss1​,s2​,… is fixed in advance. The pseudo-regret against context-to-arm maps is

R‾nS=max⁡g:S→{1,…,K}E[∑t=1nℓIt,t−∑t=1nℓg(st),t].\overline R^{\mathcal S}_n = \max_{g:\mathcal S\to\{1,\dots,K\}} \mathbb E\Big[\sum_{t=1}^n \ell_{I_t,t} - \sum_{t=1}^n \ell_{g(s_t),t}\Big].RnS​=g:S→{1,…,K}max​E[t=1∑n​ℓIt​,t​−t=1∑n​ℓg(st​),t​].

The S-Exp3 forecaster runs one instance of Exp3 (Section 3.1 of the book) on each context.

Expert advice. At each round each of NNN experts jjj proposes a distribution ξtj\xi^j_tξtj​ over arms, which may depend on the forecaster's past plays. The contextual pseudo-regret is

R‾nctx=max⁡k=1,…,NE[∑t=1nℓIt,t−∑t=1nEi∼ξtkℓi,t].\overline R^{\mathrm{ctx}}_n = \max_{k=1,\dots,N}\mathbb E\Big[\sum_{t=1}^n \ell_{I_t,t} - \sum_{t=1}^n \mathbb E_{i\sim\xi^k_t}\ell_{i,t}\Big].Rnctx​=k=1,…,Nmax​E[t=1∑n​ℓIt​,t​−t=1∑n​Ei∼ξtk​​ℓi,t​].

Exp4 (Fig. 4.1) runs exponential weights over the experts with importance-weighted loss estimates.

Bandit multiclass. The examples (xt,yt)∈Rd×{1,…,K}(x_t, y_t) \in \mathbb R^d \times \{1,\dots,K\}(xt​,yt​)∈Rd×{1,…,K} are fixed in advance, with ∥xt∥=1\|x_t\| = 1∥xt​∥=1 (Euclidean). A K×dK\times dK×d matrix UUU classifies xxx by arg⁡max⁡i(Ux)i\arg\max_i (Ux)_iargmaxi​(Ux)i​. Its multiclass hinge loss on round ttt is ℓt(U)=[1−(Uxt)yt+max⁡i≠yt(Uxt)i]+\ell_t(U) = [1 - (Ux_t)_{y_t} + \max_{i\neq y_t}(Ux_t)_i]_+ℓt​(U)=[1−(Uxt​)yt​​+maxi=yt​​(Uxt​)i​]+​. Write Ln(U)=∑t≤nℓt(U)L_n(U) = \sum_{t\le n}\ell_t(U)Ln​(U)=∑t≤n​ℓt​(U) for the cumulative hinge loss, Lˉn(U)=Ln(U)/n\bar L_n(U) = L_n(U)/nLˉn​(U)=Ln​(U)/n for its average, and ∥U∥\|U\|∥U∥ for the Frobenius norm. The multiclass Perceptron predicts y^t=arg⁡max⁡i(Wtxt)i\hat y_t = \arg\max_i (W_tx_t)_iy^​t​=argmaxi​(Wt​xt​)i​ and, after seeing yty_tyt​, adds xtx_txt​ to row yty_tyt​ and subtracts it from row y^t\hat y_ty^​t​. The Banditron (p. 58) predicts YtY_tYt​ from pi,t=(1−γ)1y^t=i+γ/Kp_{i,t} = (1-\gamma)\mathbb 1_{\hat y_t = i} + \gamma/Kpi,t​=(1−γ)1y^​t​=i​+γ/K. It observes only 1Yt=yt\mathbb 1_{Y_t = y_t}1Yt​=yt​​ and updates Wt+1=Wt+X~tW_{t+1} = W_t + \widetilde X_tWt+1​=Wt​+Xt​, where (X~t)i,j=xt,j(1Yt=yt1Yt=i/pi,t−1y^t=i)(\widetilde X_t)_{i,j} = x_{t,j}\big(\mathbb 1_{Y_t=y_t}\mathbb 1_{Y_t=i}/p_{i,t} - \mathbb 1_{\hat y_t=i}\big)(Xt​)i,j​=xt,j​(1Yt​=yt​​1Yt​=i​/pi,t​−1y^​t​=i​). Its number of mistakes is Mn=∑t≤n1Yt≠ytM_n = \sum_{t\le n}\mathbb 1_{Y_t\neq y_t}Mn​=∑t≤n​1Yt​=yt​​.

Formalization targets

Goal: Theorem 4.7 (Banditron)

For n≥8Kn \ge 8Kn≥8K, γ=(K/n)1/3\gamma = (K/n)^{1/3}γ=(K/n)1/3, every example sequence as above and every K×dK\times dK×d matrix UUU,

E Mn≤Ln(U)+(1+∥U∥2Lˉn(U))K1/3n2/3+2∥U∥2K2/3n1/3+2 ∥U∥K1/6n1/3.\mathbb E\,M_n \le L_n(U) + \Big(1 + \|U\|\sqrt{2\bar L_n(U)}\Big)K^{1/3}n^{2/3} + 2\|U\|^2K^{2/3}n^{1/3} + \sqrt2\,\|U\|K^{1/6}n^{1/3}.EMn​≤Ln​(U)+(1+∥U∥2Lˉn​(U)​)K1/3n2/3+2∥U∥2K2/3n1/3+2​∥U∥K1/6n1/3.

Milestones

  1. Multiclass Perceptron bound (Section 4.4, p. 57). For every n≥1n \ge 1n≥1 and UUU, ∑t≤n1y^t≠yt≤Ln(U)+2∥U∥2+∥U∥2nLˉn(U)\sum_{t\le n}\mathbb 1_{\hat y_t\ne y_t} \le L_n(U) + 2\|U\|^2 + \|U\|\sqrt{2n\bar L_n(U)}∑t≤n​1y^​t​=yt​​≤Ln​(U)+2∥U∥2+∥U∥2nLˉn​(U)​.
  2. Theorem 4.1 (p. 44). S-Exp3 satisfies R‾nS≤2n∣S∣Kln⁡K\overline R^{\mathcal S}_n \le \sqrt{2n|\mathcal S|K\ln K}RnS​≤2n∣S∣KlnK​.
  3. Theorem 4.2 (p. 46), with corrected constants. Exp4 without mixing satisfies R‾nctx≤2nKln⁡N\overline R^{\mathrm{ctx}}_n \le \sqrt{2nK\ln N}Rnctx​≤2nKlnN​ for ηt=2ln⁡N/(nK)\eta_t = \sqrt{2\ln N/(nK)}ηt​=2lnN/(nK)​, and R‾nctx≤2nKln⁡N\overline R^{\mathrm{ctx}}_n \le 2\sqrt{nK\ln N}Rnctx​≤2nKlnN​ for ηt=ln⁡N/(tK)\eta_t = \sqrt{\ln N/(tK)}ηt​=lnN/(tK)​.
  4. Theorem 4.3 (p. 50), with corrected learning rate. Let the plays be drawn from distributions qtq_tqt​ with qi,t≥ε>0q_{i,t}\ge\varepsilon > 0qi,t​≥ε>0, and let Exp3 run on the estimates ℓi,t1It=i/qi,t\ell_{i,t}\mathbb 1_{I_t=i}/q_{i,t}ℓi,t​1It​=i​/qi,t​ with η=2εln⁡K/n\eta = \sqrt{2\varepsilon\ln K/n}η=2εlnK/n​. Then max⁡kE[∑tEi∼ptℓi,t−∑tℓk,t]≤(2n/ε)ln⁡K\max_k \mathbb E\big[\sum_t \mathbb E_{i\sim p_t}\ell_{i,t} - \sum_t\ell_{k,t}\big] \le \sqrt{(2n/\varepsilon)\ln K}maxk​E[∑t​Ei∼pt​​ℓi,t​−∑t​ℓk,t​]≤(2n/ε)lnK​.

Significance

Theorem 4.7 shows that, on any sequence of examples, the bandit version of online multiclass classification costs at most O(K1/3n2/3)O(K^{1/3}n^{2/3})O(K1/3n2/3) mistakes beyond the hinge loss of the best linear classifier. The full-information Perceptron, by comparison, pays O(n)O(\sqrt n)O(n​). The bound has no stochastic assumption and has explicit constants. Theorems 4.1–4.3 are the basic regret guarantees for side information and expert advice. Theorem 4.3 in particular lets learning algorithms serve as experts inside Exp4, which is the construction behind Theorem 4.5.

The mission produces machine-checked statements, and eventually proofs, of these results with fully explicit constants and an explicit model of adaptive adversaries and adaptive advice. To the curators' knowledge none of the Banditron, the multiclass Perceptron bound, S-Exp3 or Theorem 4.3 is formalized anywhere. The platform's Bandit Algorithms series has a proved Exp4 bound, but only for advice and rewards fixed in advance. The book proves all four milestones and the goal; two printed statements (4.2 and 4.3) contain misprints that this mission corrects.

Difficulty

The Banditron bound concerns a randomized process whose weight matrix depends on all earlier random predictions. The Perceptron argument tracks ⟨U,Wn+1⟩\langle U, W_{n+1}\rangle⟨U,Wn+1​⟩ and ∥Wn+1∥2\|W_{n+1}\|^2∥Wn+1​∥2. It carries over only in conditional expectation, and the second moment of the importance-weighted update is of order K/γK/\gammaK/γ on rounds where y^t≠yt\hat y_t \neq y_ty^​t​=yt​ and of order γ\gammaγ otherwise. Combining these into one inequality for ∑tP(y^t≠yt)\sum_t\mathbb P(\hat y_t\neq y_t)∑t​P(y^​t​=yt​) and then for EMn\mathbb E M_nEMn​ requires solving a quadratic inequality in the presence of expectations, and the constants must come out as printed. For the Exp3/Exp4 results, the obstacle is that losses and advice adapt to past plays. The standard potential argument has to be run conditionally on the history, and a version that fixes the losses in advance proves a weaker theorem.

Formalization scope

  • Rounds and laws. Rounds are numbered from 000 in Lean (Lean round ttt is the book's round t+1t+1t+1). Every forecaster is a sampling rule from past plays to weights on Fin K. The law of the first nnn plays is the product ∏tpt(ωt∣ω<t)\prod_t p_t(\omega_t\mid\omega_{<t})∏t​pt​(ωt​∣ω<t​) over sequences ω:Fin n→Fin K\omega : \mathrm{Fin}\,n\to\mathrm{Fin}\,Kω:Finn→FinK, and expectations are finite sums against it. The adversary and the experts are deterministic functions of past plays; an independent randomized adversary is a mixture of these. The examples of the Banditron are fixed.
  • Argmax. y^t\hat y_ty^​t​ uses any argmax selector; all tie-breaking rules are covered.
  • Norms. ∥xt∥=1\|x_t\| = 1∥xt​∥=1 is the Euclidean condition ∑jxt,j2=1\sum_j x_{t,j}^2 = 1∑j​xt,j2​=1; ∥U∥\|U\|∥U∥ is the Frobenius norm written out explicitly.
  • Infima and maxima. Each "inf⁡U\inf_UinfU​" and "max⁡k\max_kmaxk​" of the book is stated as "for every UUU" or "for every kkk", which is equivalent.
  • Explicit constants. Every bound is the one printed or, for the corrected items, the one the proof yields. No O(⋅)O(\cdot)O(⋅) appears.
  • Corrected misprints. Theorem 4.7 prints the examples in Rd×{−1,+1}\mathbb R^d\times\{-1,+1\}Rd×{−1,+1}; labels are in {1,…,K}\{1,\dots,K\}{1,…,K}. Theorem 4.2 prints 2nNln⁡K\sqrt{2nN\ln K}2nNlnK​ and 2nNln⁡K2\sqrt{nN\ln K}2nNlnK​; the proof gives 2nKln⁡N\sqrt{2nK\ln N}2nKlnN​ and 2nKln⁡N2\sqrt{nK\ln N}2nKlnN​. Theorem 4.3 prints η=2ln⁡K/(nK)\eta = \sqrt{2\ln K/(nK)}η=2lnK/(nK)​; (4.7) follows from the proof with η=2εln⁡K/n\eta = \sqrt{2\varepsilon\ln K/n}η=2εlnK/n​.
  • Parameter range. At n=8Kn = 8Kn=8K the Banditron's γ\gammaγ equals 1/21/21/2, outside the box's open interval (0,1/2)(0,1/2)(0,1/2). The proof uses only γ≤1/2\gamma\le 1/2γ≤1/2, so n=8Kn = 8Kn=8K is included.
  • Ruling out trivial forms. Theorem 4.1 is stated for the explicit S-Exp3 forecaster, not as an existence claim, so no forecaster tuned to the losses can witness it. The losses and the advice are allowed to adapt, so a proof for oblivious sequences does not suffice.
  • Left out. Theorem 4.4 (Exp4 with mixing) is proved in the book only by reference. The argument that reference suggests yields 32γn+Kln⁡N/γ\tfrac32\gamma n + K\ln N/\gamma23​γn+KlnN/γ, not the printed γn/2+Kln⁡N/γ\gamma n/2 + K\ln N/\gammaγn/2+KlnN/γ. Theorem 4.5 is stated with O(⋅)O(\cdot)O(⋅), Theorem 4.6 "for some constant ccc", and Eq. (4.8) is left to the reader.

Useful reusable infrastructure: the path-law expectation for history-dependent sampling, the exponential-weights potential argument under adaptive losses, and Perceptron-type inner-product arguments for matrices. Proofs of any milestone and of the goal are welcome.

Selected references

  • S. Bubeck, N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012. arXiv:1204.5721v2. https://arxiv.org/abs/1204.5721 ; https://doi.org/10.1561/2200000024
  • S. M. Kakade, S. Shalev-Shwartz, A. Tewari, Efficient Bandit Algorithms for Online Multiclass Prediction, ICML 2008. https://doi.org/10.1145/1390156.1390212
  • P. Auer, N. Cesa-Bianchi, Y. Freund, R. E. Schapire, The Nonstochastic Multiarmed Bandit Problem, SIAM Journal on Computing 32(1), 2002. https://doi.org/10.1137/S0097539701398375
  • O.-A. Maillard, R. Munos, Adaptive Bandits: Towards the Best History-Dependent Strategy, AISTATS 2011. https://proceedings.mlr.press/v15/maillard11a.html
11 thms2 active usersReviewed
Convex OptimizationMachine LearningOperations Research+1·Captain: mikedeng1

Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems V: Bandit Convex Optimization with One-Point FeedbackTextbook

Motivation

In bandit convex optimization a forecaster repeatedly picks a point xtx_txt​ of a convex set K⊆Rd\mathcal K\subseteq\mathbb R^dK⊆Rd, and an adversary picks a convex loss ℓt\ell_tℓt​. The forecaster pays ℓt(xt)\ell_t(x_t)ℓt​(xt​) and observes only that number: it never sees the function, its gradient, or its value elsewhere. This is the model of online optimization with only function-value access, as in tuning a system online from measured costs, dynamic pricing with an unknown convex demand-cost curve, or routing with path costs observed only on the route taken. The question is how fast the forecaster can approach the best fixed point in hindsight.

Chapter 6 of Bubeck and Cesa-Bianchi's monograph (arXiv:1204.5721v2, Foundations and Trends in Machine Learning 5(1), 2012) treats the problem through spherical gradient estimates fed to projected gradient descent. The one-point method is due to Flaxman, Kalai and McMahan (SODA 2005, arXiv:cs/0408007), who obtained an O(n3/4)\mathcal O(n^{3/4})O(n3/4) regret bound. Agarwal, Dekel and Xiao (COLT 2010) showed that two function evaluations per round allow O(n)\mathcal O(\sqrt n)O(n​). Whether one-point feedback admits n\sqrt nn​ regret was open when the monograph was written (p. 94); Bubeck, Eldan and Lee (STOC 2017, arXiv:1607.03084) later obtained n\sqrt nn​ regret up to logarithmic and polynomial-in-ddd factors for convex losses, with a different and much more involved algorithm.

Setting

Let B={x∈Rd:∥x∥≤1}\mathbb B=\{x\in\mathbb R^d:\|x\|\le1\}B={x∈Rd:∥x∥≤1} be the closed Euclidean unit ball and S={x:∥x∥=1}\mathbb S=\{x:\|x\|=1\}S={x:∥x∥=1} the unit sphere, with unnormalized spherical measure σ\sigmaσ, so that σ(S)=d Vol(B)\sigma(\mathbb S)=d\,\mathrm{Vol}(\mathbb B)σ(S)=dVol(B). Fix δ>0\delta>0δ>0. For a loss ℓ\ellℓ, the smoothed loss is ℓ~(x)=E ℓ(x+δB)\widetilde\ell(x)=\mathbb E\,\ell(x+\delta B)ℓ(x)=Eℓ(x+δB) with BBB uniform on B\mathbb BB.

The set K\mathcal KK is closed and convex with rB⊆K⊆RBr\mathbb B\subseteq\mathcal K\subseteq R\mathbb BrB⊆K⊆RB. The losses ℓ1,ℓ2,⋯:Rd→R\ell_1,\ell_2,\dots:\mathbb R^d\to\mathbb Rℓ1​,ℓ2​,⋯:Rd→R are GGG-Lipschitz, differentiable and convex, and are fixed before the game (an oblivious adversary).

OSGD (Online Stochastic Gradient Descent) on a set K′\mathcal K'K′ with learning rate η\etaη starts at x1=0x_1=0x1​=0 and sets xt+1=argmin⁡y∈K′∥y−(xt−ηg~t(xt))∥x_{t+1}=\operatorname{argmin}_{y\in\mathcal K'}\|y-(x_t-\eta\widetilde g_t(x_t))\|xt+1​=argminy∈K′​∥y−(xt​−ηg​t​(xt​))∥, where g~t\widetilde g_tg​t​ is a gradient estimate. With S1,S2,…S_1,S_2,\dotsS1​,S2​,… independent and uniform on S\mathbb SS:

  • the two-point estimate (6.1) is g~t(xt)=d2δ(ℓt(Xt+)−ℓt(Xt−))St\widetilde g_t(x_t)=\frac d{2\delta}\big(\ell_t(X_t^+)-\ell_t(X_t^-)\big)S_tg​t​(xt​)=2δd​(ℓt​(Xt+​)−ℓt​(Xt−​))St​ with Xt±=xt±δStX_t^\pm=x_t\pm\delta S_tXt±​=xt​±δSt​; the played point is Xt+X_t^+Xt+​ or Xt−X_t^-Xt−​ by a fair coin;
  • the one-point estimate (6.3) is g~t(xt)=dδ ℓt(X~t)St\widetilde g_t(x_t)=\frac d\delta\,\ell_t(\widetilde X_t)S_tg​t​(xt​)=δd​ℓt​(Xt​)St​ with played point X~t=xt+δSt\widetilde X_t=x_t+\delta S_tXt​=xt​+δSt​.

OSGD runs on the shrunken set K′=(1−δ/r)K\mathcal K'=(1-\delta/r)\mathcal KK′=(1−δ/r)K, so that the perturbed points stay in K\mathcal KK. The pseudo-regret is

R‾n=E∑t=1nℓt(X~t)−min⁡x∈K∑t=1nℓt(x).\overline R_n=\mathbb E\sum_{t=1}^n\ell_t(\widetilde X_t)-\min_{x\in\mathcal K}\sum_{t=1}^n\ell_t(x).Rn​=Et=1∑n​ℓt​(Xt​)−x∈Kmin​t=1∑n​ℓt​(x).

Formalization targets

Goal: Theorem 6.2, tuned

If in addition ∣ℓt∣≤L|\ell_t|\le L∣ℓt​∣≤L on K\mathcal KK, and δ=(2n)−1/4RdL/((3+R/r)G)\delta=(2n)^{-1/4}\sqrt{RdL/((3+R/r)G)}δ=(2n)−1/4RdL/((3+R/r)G)​, η=(2n)−3/4R3/(dL(3+R/r)G)\eta=(2n)^{-3/4}\sqrt{R^3/(dL(3+R/r)G)}η=(2n)−3/4R3/(dL(3+R/r)G)​, then one-point OSGD satisfies

R‾n≤4n3/4RdL (3+R/r) G.\overline R_n\le 4n^{3/4}\sqrt{RdL\,(3+R/r)\,G}.Rn​≤4n3/4RdL(3+R/r)G​.

Milestones

  1. Lemma 6.1: ∇∫Bℓ(x+δb) db=1δ∫Sℓ(x+δs)s dσ(s)\nabla\int_{\mathbb B}\ell(x+\delta b)\,db=\frac1\delta\int_{\mathbb S}\ell(x+\delta s)s\,d\sigma(s)∇∫B​ℓ(x+δb)db=δ1​∫S​ℓ(x+δs)sdσ(s).
  2. Lemma 6.2: dδE[ℓ(x+δS)S]=∇E ℓ(x+δB)\frac d\delta\mathbb E[\ell(x+\delta S)S]=\nabla\mathbb E\,\ell(x+\delta B)δd​E[ℓ(x+δS)S]=∇Eℓ(x+δB).
  3. Eq. (6.2): ∣ℓ(x)−ℓ~(x)∣≤δG|\ell(x)-\widetilde\ell(x)|\le\delta G∣ℓ(x)−ℓ(x)∣≤δG.
  4. Lemma 6.3: the queried points' regret against xxx is at most the smoothed regret of the iterates against (1−ξ)x(1-\xi)x(1−ξ)x, plus 3δGn+ξGRn3\delta Gn+\xi GRn3δGn+ξGRn.
  5. Theorem 6.1: two-point OSGD has R‾n≤R2/η+η(Gd)2n+δ(3+R/r)Gn\overline R_n\le R^2/\eta+\eta(Gd)^2n+\delta(3+R/r)GnRn​≤R2/η+η(Gd)2n+δ(3+R/r)Gn, and R‾n≤2RGdn+δ(3+R/r)Gn\overline R_n\le 2RGd\sqrt n+\delta(3+R/r)GnRn​≤2RGdn​+δ(3+R/r)Gn for η=R/(Gdn)\eta=R/(Gd\sqrt n)η=R/(Gdn​).
  6. Theorem 6.2, first display: one-point OSGD has R‾n≤R2/η+(dL)2δ2ηn+δ(3+R/r)Gn\overline R_n\le R^2/\eta+\frac{(dL)^2}{\delta^2}\eta n+\delta(3+R/r)GnRn​≤R2/η+δ2(dL)2​ηn+δ(3+R/r)Gn for every 0<δ≤r0<\delta\le r0<δ≤r and η>0\eta>0η>0.

Significance

The n3/4n^{3/4}n3/4 bound shows that a single function value per round suffices for sublinear regret against any oblivious sequence of Lipschitz convex losses, with a forecaster whose only operations are a random perturbation and a Euclidean projection. The smoothing identity of Lemmas 6.1–6.2 is the basic tool of zeroth-order (derivative-free) optimization, used well beyond bandits, and Theorem 6.1 is the n\sqrt nn​ benchmark for two-point methods.

All results are proved in the source. To the best of current knowledge none is formalized: the related items of the Introduction to Online Convex Optimization series on Prove2Me (Hazan's Lemma 6.7 and Theorem 6.9) were formalized with missing hypotheses and are recorded as disproved. This mission produces machine-checked statements with every hypothesis explicit, and the formal infrastructure (sphere measure calculus, a projected stochastic gradient analysis) for later zeroth-order results.

Difficulty

Two steps resist a direct formal treatment. First, Lemma 6.1 is a divergence-theorem identity on the ball; Mathlib has the sphere measure and polar coordinates, but its divergence theorem covers boxes rather than balls, so differentiating the ball average in xxx requires either such a theorem or a direct argument about translates of the ball. Second, the regret analysis takes expectations of quantities that depend on the whole past: the iterate xtx_txt​ is a function of S1,…,St−1S_1,\dots,S_{t-1}S1​,…,St−1​, and unbiasedness E[g~t∣xt]=∇ℓ~t(xt)\mathbb E[\widetilde g_t\mid x_t]=\nabla\widetilde\ell_t(x_t)E[g​t​∣xt​]=∇ℓt​(xt​) holds only conditionally, via independence of StS_tSt​ from the past. A pathwise gradient-descent inequality must be combined with this conditional expectation round by round, with measurability of the projected iterates established along the way. The naive approach of treating the estimate as the true gradient of ℓt\ell_tℓt​ fails: it is a gradient of ℓ~t\widetilde\ell_tℓt​, and the gap is handled only by Eq. (6.2) and Lemma 6.3.

Formalization scope

Points are in EuclideanSpace ℝ (Fin d) with d≥1d\ge1d≥1; rounds are t=1,2,…t=1,2,\dotst=1,2,…, sums run over Finset.Icc 1 n. σ\sigmaσ is Mathlib's Measure.toSphere of Lebesgue measure; the uniform laws are normalized restrictions. Randomness lives on an arbitrary probability space; the directions StS_tSt​ are measurable, mutually independent (iIndepFun) and uniform on S\mathbb SS, and in Theorem 6.1 the pairs (St,Ct)(S_t,C_t)(St​,Ct​) are independent with CtC_tCt​ a fair sign independent of StS_tSt​. A run of OSGD is a predicate (start at 000, each iterate a Euclidean projection onto (1−δ/r)K(1-\delta/r)\mathcal K(1−δ/r)K), which determines the run uniquely, so the forecaster uses only observed values and its own randomness. The losses are Lipschitz, differentiable and convex on all of Rd\mathbb R^dRd; the bound ∣ℓt∣≤L|\ell_t|\le L∣ℓt​∣≤L is on K\mathcal KK, because a convex function bounded on Rd\mathbb R^dRd is constant. The minimum over K\mathcal KK is an infimum over the subtype K\mathcal KK, attained in every theorem.

Conventions and corrections, each stated in the item's Formalization Note:

  • Lemma 6.1 carries the factor 1/δ1/\delta1/δ that the printed statement omits and the proof contains (corrected misprint).
  • Theorem 6.1's second display prints η=R/(GDn)\eta=R/(GD\sqrt n)η=R/(GDn​) and a limit "for δ→0\delta\to0δ→0"; the item states R‾n≤2RGdn+δ(3+R/r)Gn\overline R_n\le 2RGd\sqrt n+\delta(3+R/r)GnRn​≤2RGdn​+δ(3+R/r)Gn for η=R/(Gdn)\eta=R/(Gd\sqrt n)η=R/(Gdn​) and every admissible δ\deltaδ, which implies the limit (corrected misprint).
  • Theorems 6.1 and 6.2 add 0<δ≤r0<\delta\le r0<δ≤r, which the proofs need for Xt±,X~t∈KX_t^\pm,\widetilde X_t\in\mathcal KXt±​,Xt​∈K; for the tuned δ\deltaδ of the goal it is a condition on nnn.
  • The goal adds G,L>0G,L>0G,L>0 and n≥1n\ge1n≥1, which its formulas for δ,η\delta,\etaδ,η need; the constant 444 is the book's rounding of 2⋅23/42\cdot2^{3/4}2⋅23/4 and is kept, as is the form R2/ηR^2/\etaR2/η.

The statements cannot be satisfied trivially: the run is pinned by its recursion, the losses are fixed before the randomness, the expectations are of bounded measurable functions (no zero-valued Bochner integrals), and the minimum is over the nonempty compact K\mathcal KK. Section 6.3 (Lemma 6.4, Theorem 6.3) is not included, because its algorithm box and proof use different stage lengths and its unimodality condition is stated on a smaller set than the proof uses.

Needed infrastructure: calculus of ball averages and sphere integrals, symmetry of the uniform sphere law, nonexpansiveness of projections onto closed convex sets, and conditional-expectation bookkeeping for adapted iterates. Each is reusable for zeroth-order optimization; contributions of any of them as separate lemmas are welcome.

Selected references

  • S. Bubeck, N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012. arXiv:1204.5721v2, doi:10.1561/2200000024
  • A. Flaxman, A. Kalai, H. B. McMahan, Online convex optimization in the bandit setting: gradient descent without a gradient, SODA 2005. arXiv:cs/0408007
  • A. Agarwal, O. Dekel, L. Xiao, Optimal algorithms for online convex optimization with multi-point bandit feedback, COLT 2010. link
  • S. Bubeck, R. Eldan, Y. T. Lee, Kernel-based methods for bandit convex optimization, STOC 2017. arXiv:1607.03084
10 thms2 active usersReviewed
Machine LearningOperations ResearchProbability·Captain: mikedeng1

Analysis of Thompson Sampling for the Multi-armed Bandit Problem 1: Logarithmic Regret for Two ArmsResearch Paper

Motivation

Thompson Sampling (TS) is the oldest heuristic for the stochastic multi-armed bandit problem: it was proposed by Thompson in 1933 (Biometrika 25) and is used in practice for online advertising and recommendation, where it often performs as well as or better than upper-confidence-bound methods (Chapelle and Li, NIPS 2011; Scott 2010). Until 2012 its theoretical guarantees for the frequentist regret were weak: earlier analyses gave only o(T)o(T)o(T) regret in time TTT (Granmo 2010; May, Korda, Lee and Leslie 2011).

Agrawal and Goyal, Analysis of Thompson Sampling for the Multi-armed Bandit Problem (arXiv:1111.1797v3, COLT 2012), gave the first logarithmic finite-time bound on the expected regret of TS. This mission formalizes their two-armed result, Theorem 1. A companion mission covers the NNN-armed bound, Theorem 2.

Timeline. Lai and Robbins (1985) proved that every consistent algorithm has regret at least [∑iΔi/D(μi∥μ∗)+o(1)]ln⁡T\big[\sum_i \Delta_i/D(\mu_i\|\mu^*)+o(1)\big]\ln T[∑i​Δi​/D(μi​∥μ∗)+o(1)]lnT. Auer, Cesa-Bianchi and Fischer (2002) gave UCB1 with an O(∑iln⁡T/Δi)O(\sum_i \ln T/\Delta_i)O(∑i​lnT/Δi​) finite-time bound. Agrawal and Goyal (2012) proved O(ln⁡T/Δ+1/Δ3)O(\ln T/\Delta+1/\Delta^3)O(lnT/Δ+1/Δ3) for two-armed TS. Kaufmann, Korda and Munos (ALT 2012) and Agrawal and Goyal (AISTATS 2013) later proved asymptotically optimal bounds for Bernoulli TS.

Setting

There are two arms. Arm i∈{1,2}i\in\{1,2\}i∈{1,2} has a fixed, unknown reward distribution DiD_iDi​ supported in [0,1][0,1][0,1], with mean μi\mu_iμi​. Plays of an arm give i.i.d. rewards, independent of the other arm. Arm 1 is the unique optimal arm, μ1>μ2\mu_1>\mu_2μ1​>μ2​, and Δ=μ1−μ2\Delta=\mu_1-\mu_2Δ=μ1​−μ2​ is the gap.

Thompson Sampling for general stochastic bandits (Algorithm 2 of the paper) keeps, for each arm iii, a success count SiS_iSi​ and a failure count FiF_iFi​, both starting at 000. In each round t=1,2,…t=1,2,\dotst=1,2,… it

  1. samples, independently for each arm, θi(t)∼Beta(Si+1,Fi+1)\theta_i(t)\sim\mathrm{Beta}(S_i+1,F_i+1)θi​(t)∼Beta(Si​+1,Fi​+1);
  2. plays i(t)=arg⁡max⁡iθi(t)i(t)=\arg\max_i\theta_i(t)i(t)=argmaxi​θi​(t) and observes a reward r~t∼Di(t)\tilde r_t\sim D_{i(t)}r~t​∼Di(t)​;
  3. performs a Bernoulli trial with success probability r~t\tilde r_tr~t​, with outcome rt∈{0,1}r_t\in\{0,1\}rt​∈{0,1};
  4. increments Si(t)S_{i(t)}Si(t)​ if rt=1r_t=1rt​=1 and Fi(t)F_{i(t)}Fi(t)​ otherwise.

ki(t)k_i(t)ki​(t) is the number of plays of arm iii before round ttt. The expected regret in time TTT is

E[R(T)]=E[∑t=1T(μ1−μi(t))],\mathbb E[\mathcal R(T)]=\mathbb E\Big[\sum_{t=1}^T(\mu_1-\mu_{i(t)})\Big],E[R(T)]=E[t=1∑T​(μ1​−μi(t)​)],

the expectation being over the rewards and the algorithm's randomness.

The analysis uses the Beta cdf Fα,βbetaF^{beta}_{\alpha,\beta}Fα,βbeta​, the binomial cdf Fn,pBF^B_{n,p}Fn,pB​, and the random variable X(j,s,y)X(j,s,y)X(j,s,y): the number of independent Beta(s+1,j−s+1)\mathrm{Beta}(s+1,j-s+1)Beta(s+1,j−s+1) draws made before one exceeds yyy.

Formalization targets

Goal: Theorem 1 (p. 3)

There is an absolute constant C>0C>0C>0 such that for every two-armed instance with rewards in [0,1][0,1][0,1] and μ1>μ2\mu_1>\mu_2μ1​>μ2​, and every T≥2T\ge 2T≥2,

E[R(T)]≤C(ln⁡TΔ+1Δ3).\mathbb E[\mathcal R(T)]\le C\Big(\frac{\ln T}{\Delta}+\frac1{\Delta^3}\Big).E[R(T)]≤C(ΔlnT​+Δ31​).

The constant is not fixed numerically: the paper states the theorem in O(⋅)O(\cdot)O(⋅) form (footnote 1), and the explicit display it reports on p. 8, 40ln⁡T/Δ+48/Δ3+18Δ40\ln T/\Delta+48/\Delta^3+18\Delta40lnT/Δ+48/Δ3+18Δ, is not the formal claim.

Milestones

  • Fact 1 (p. 12): Fα,βbeta(y)=1−Fα+β−1,yB(α−1)F^{beta}_{\alpha,\beta}(y)=1-F^B_{\alpha+\beta-1,y}(\alpha-1)Fα,βbeta​(y)=1−Fα+β−1,yB​(α−1) for positive integers α,β\alpha,\betaα,β.
  • Lemma 1 (p. 6): E[X(j,s,y)]=1/Fj+1,yB(s)−1\mathbb E[X(j,s,y)]=1/F^B_{j+1,y}(s)-1E[X(j,s,y)]=1/Fj+1,yB​(s)−1.
  • Lemma 6 (p. 13): Hoeffding-type bounds (10)–(11) on binomial cdfs.
  • Fact 2 (p. 13): every median of Binomial(n,p)\mathrm{Binomial}(n,p)Binomial(n,p) is ⌊np⌋\lfloor np\rfloor⌊np⌋ or ⌈np⌉\lceil np\rceil⌈np⌉.
  • Lemma 2 (p. 7): Pr⁡(E2(t))≥1−2/T2\Pr(E_2(t))\ge 1-2/T^2Pr(E2​(t))≥1−2/T2, where E2(t)={θ2(t)≤μ2+Δ/2 or k2(t)<24ln⁡T/Δ2}E_2(t)=\{\theta_2(t)\le\mu_2+\Delta/2\ \text{or}\ k_2(t)<24\ln T/\Delta^2\}E2​(t)={θ2​(t)≤μ2​+Δ/2 or k2​(t)<24lnT/Δ2}.
  • Lemma 3 (p. 7): a three-case bound on E[E[min⁡{X(j,s(j),y),T}∣s(j)]]\mathbb E\big[\mathbb E[\min\{X(j,s(j),y),T\}\mid s(j)]\big]E[E[min{X(j,s(j),y),T}∣s(j)]] for s(j)∼Binomial(j,μ1)s(j)\sim\mathrm{Binomial}(j,\mu_1)s(j)∼Binomial(j,μ1​).
  • Eq. (1) (p. 7): E[k2(T)]≤C(ln⁡T/Δ2+1/Δ4)\mathbb E[k_2(T)]\le C(\ln T/\Delta^2+1/\Delta^4)E[k2​(T)]≤C(lnT/Δ2+1/Δ4).

Significance

The result. Theorem 1 shows that TS, a randomized Bayesian heuristic with no explicit confidence bonus, has regret logarithmic in TTT on every two-armed instance, matching the order in TTT of the Lai–Robbins lower bound. The proof introduced a way to control the optimal arm's waiting time between plays through the Beta–Binomial duality, and later analyses of TS reuse that device.

Formalizing it. The result is proved on paper and has no machine-checked proof that we know of. The platform's existing TS results concern Gaussian TS (Lattimore and Szepesvári, Ch. 36) and Bayesian regret, which are different algorithms or regret notions. A formalization adds a reusable Lean model of Algorithm 2 on [0,1][0,1][0,1]-valued rewards, Beta–Binomial facts (Fact 1, Lemma 1), a binomial-median theorem, and binomial Hoeffding bounds. It also produces a proof with a constant that has been checked, since the printed constants contain an arithmetic slip.

Difficulty

The standard UCB argument does not transfer to TS. For UCB, the optimal arm's index exceeds its mean with high probability however often the arm has been played, because the exploration bonus is deterministic; the analysis then only has to count plays of the suboptimal arm until its own index concentrates, after Θ(ln⁡T/Δ2)\Theta(\ln T/\Delta^2)Θ(lnT/Δ2) plays. Under TS the optimal arm's sample θ1(t)\theta_1(t)θ1​(t) is random and, if the arm has been played rarely or its early rewards were poor, it falls below μ2\mu_2μ2​ with constant probability. The optimal arm may then wait a long, random time between plays, and the length of that wait depends on the arm's posterior, which in turn depends on how long it has waited. Counting plays of the suboptimal arm with a union bound over rounds, under the assumption that the optimal arm is already concentrated, therefore does not work; controlling these waiting times is the central difficulty and is where the 1/Δ31/\Delta^31/Δ3 dependence enters.

Formalization scope

  • Model. The instance is the platform's StochasticBandit 2 (a probability measure on R\mathbb RR per arm, mean banditArmMean), with the hypothesis that each reward law gives mass 111 to [0,1][0,1][0,1]. Lean arm 0 is the paper's arm 1 and Lean arm 1 the paper's arm 2. Lean rounds are indexed from 000.
  • Algorithm. Algorithm 2 is realized on one probability space with three independent i.i.d. tables: Beta draws W(i,t,a,b)∼Beta(a+1,b+1)W(i,t,a,b)\sim\mathrm{Beta}(a+1,b+1)W(i,t,a,b)∼Beta(a+1,b+1), rewards X(i,t)∼DiX(i,t)\sim D_iX(i,t)∼Di​, and uniforms V(i,t)V(i,t)V(i,t). Round ttt uses θi(t)=W(i,t,Si(t),Fi(t))\theta_i(t)=W(i,t,S_i(t),F_i(t))θi​(t)=W(i,t,Si​(t),Fi​(t)), r~t=X(i(t),t)\tilde r_t=X(i(t),t)r~t​=X(i(t),t) and rt=1{V(i(t),t)<r~t}r_t=\mathbf 1\{V(i(t),t)<\tilde r_t\}rt​=1{V(i(t),t)<r~t​}. Ties in the arg max go to the smaller index (a null event).
  • Values. Regret and expectations are lower Lebesgue integrals in [0,∞][0,\infty][0,∞]. X(j,s,y)X(j,s,y)X(j,s,y) is N∪{∞}\mathbb N\cup\{\infty\}N∪{∞}-valued, so Lemma 1 at y=1y=1y=1 reads ∞=∞\infty=\infty∞=∞, as in the paper.
  • O(·). The paper's O(⋅)O(\cdot)O(⋅) (footnote 1: f≤cgf\le cgf≤cg for n≥n0n\ge n_0n≥n0​) is stated with one universal constant C>0C>0C>0, quantified before the instance, the means and the horizon, for all T≥2T\ge 2T≥2. Eq. (1) is stated the same way, without its printed numerals.
  • Not trivial. The goal is about Algorithm 2 itself, with fresh Beta samples, fresh rewards and the Bernoulli coin. A statement about "any policy satisfying Lemma 2's event bound", or one whose constant depends on Δ\DeltaΔ, the reward laws or TTT, would not be Theorem 1.
  • Edge cases. μ1<1\mu_1<1μ1​<1 is assumed only in Lemma 3, where the paper's RRR and DDD require it. It is not a hypothesis of the goal.
  • Infrastructure. A complete proof needs: inverse-transform or order-statistics facts for Beta laws (Fact 1); geometric expectations; Hoeffding's inequality for sums of Bernoulli variables (Mathlib has Hoeffding/Azuma); the binomial median theorem (Jogdeo–Samuels; Kaas–Buhrman); and the coupling from the reward tables to the per-arm i.i.d. output stacks the paper reasons with. Fact 1, Lemma 6 and Fact 2 are reusable beyond this mission. Contributions to any milestone are welcome, and so is a direct proof of the regret bound with an explicit constant.

Selected references

  • S. Agrawal and N. Goyal, Analysis of Thompson Sampling for the Multi-armed Bandit Problem, COLT 2012; arXiv:1111.1797v3. https://arxiv.org/abs/1111.1797
  • W. R. Thompson, On the likelihood that one unknown probability exceeds another in view of the evidence of two samples, Biometrika 25 (1933) 285–294. https://doi.org/10.2307/2332286
  • T. L. Lai and H. Robbins, Asymptotically efficient adaptive allocation rules, Advances in Applied Mathematics 6 (1985) 4–22. https://doi.org/10.1016/0196-8858(85)90002-8
  • P. Auer, N. Cesa-Bianchi and P. Fischer, Finite-time analysis of the multiarmed bandit problem, Machine Learning 47 (2002) 235–256. https://doi.org/10.1023/A:1013689704352
  • K. Jogdeo and S. M. Samuels, Monotone convergence of binomial probabilities and a generalization of Ramanujan's equation, Annals of Mathematical Statistics 39 (1968) 1191–1195. https://doi.org/10.1214/aoms/1177698243
  • R. Kaas and J. M. Buhrman, Mean, median and mode in binomial distributions, Statistica Neerlandica 34 (1980) 13–18. https://doi.org/10.1111/j.1467-9574.1980.tb00681.x
  • O. Chapelle and L. Li, An empirical evaluation of Thompson Sampling, NIPS 2011. https://papers.nips.cc/paper/4321-an-empirical-evaluation-of-thompson-sampling
11 thms2 active usersReviewed
Machine LearningOptimizationReinforcement Learning·Captain: mikedeng1

Reinforcement Learning: An Introduction I: The Gradient Bandit Algorithm Is Stochastic Gradient AscentTextbook

Motivation

The multi-armed bandit is the simplest setting in which a learner must trade off exploiting what it knows against exploring what it does not: one situation, kkk actions, and a reward drawn from an unknown distribution each time an action is taken. Chapter 2 of Sutton and Barto's Reinforcement Learning: An Introduction (2nd ed., MIT Press, 2018) uses it to introduce, in the smallest possible setting, ideas that run through the rest of the book: incremental estimation with a step size, the bias introduced by the initial estimate, soft-max policies over learned preferences, and learning by following the gradient of expected reward.

The chapter ends with the gradient bandit algorithm (§2.8), which learns a numerical preference for each action instead of a value estimate. A shaded box on pp. 38–40 shows that its expected update is exactly a gradient-ascent step on the expected reward, so the algorithm is an instance of stochastic gradient ascent. The same argument, a score-function (likelihood-ratio) identity with a baseline, reappears in Chapter 13 as the REINFORCE algorithm and the policy gradient theorem. The bandit case is where the book first carries it out in full.

Setting

Actions are 1,…,k1, \dots, k1,…,k. Each action xxx has a reward distribution νx\nu_xνx​ on R\mathbb RR with finite mean q∗(x)q_*(x)q∗​(x), the true action value. At each step the learner holds a vector of action preferences H=(H(1),…,H(k))∈RkH = (H(1), \dots, H(k)) \in \mathbb R^kH=(H(1),…,H(k))∈Rk and selects action AAA with the soft-max probability

π(a)=eH(a)∑b=1keH(b)(2.11).\pi(a) = \frac{e^{H(a)}}{\sum_{b=1}^k e^{H(b)}} \qquad (2.11).π(a)=∑b=1k​eH(b)eH(a)​(2.11).

Given A=xA = xA=x, a reward R∼νxR \sim \nu_xR∼νx​ is received. The expected reward is E[R]=∑xπ(x) q∗(x)\mathbb E[R] = \sum_x \pi(x)\, q_*(x)E[R]=∑x​π(x)q∗​(x), a smooth function of HHH. With a step size α>0\alpha > 0α>0 and a baseline B∈RB \in \mathbb RB∈R, the gradient bandit update (2.12) is

H′(A)=H(A)+α(R−B)(1−π(A)),H′(a)=H(a)−α(R−B) π(a)  (a≠A).H'(A) = H(A) + \alpha (R - B)(1 - \pi(A)), \qquad H'(a) = H(a) - \alpha (R - B)\,\pi(a) \ \ (a \ne A).H′(A)=H(A)+α(R−B)(1−π(A)),H′(a)=H(a)−α(R−B)π(a)  (a=A).

The chapter's estimation sections use a single action's rewards R1,R2,…R_1, R_2, \dotsR1​,R2​,…. The sample average after n−1n-1n−1 selections is Qn=(R1+⋯+Rn−1)/(n−1)Q_n = (R_1 + \cdots + R_{n-1})/(n-1)Qn​=(R1​+⋯+Rn−1​)/(n−1), with an arbitrary initial value Q1Q_1Q1​. A constant step size α∈(0,1]\alpha \in (0,1]α∈(0,1] updates Qn+1=Qn+α[Rn−Qn]Q_{n+1} = Q_n + \alpha [R_n - Q_n]Qn+1​=Qn​+α[Rn​−Qn​] (2.5). The trace of one oˉ0=0\bar o_0 = 0oˉ0​=0, oˉn=oˉn−1+α(1−oˉn−1)\bar o_n = \bar o_{n-1} + \alpha (1 - \bar o_{n-1})oˉn​=oˉn−1​+α(1−oˉn−1​) defines the step size βn=α/oˉn\beta_n = \alpha / \bar o_nβn​=α/oˉn​ (2.8)–(2.9).

Formalization targets

Goal: the expected update is the gradient step

For every action aaa, with A∼πA \sim \piA∼π and R∣A=x∼νxR \mid A = x \sim \nu_xR∣A=x∼νx​,

E[H′(a)]=H(a)+α ∂ E[R]∂H(a),\mathbb E\bigl[H'(a)\bigr] = H(a) + \alpha\, \frac{\partial\, \mathbb E[R]}{\partial H(a)} ,E[H′(a)]=H(a)+α∂H(a)∂E[R]​,

that is, the update (2.12) equals the exact gradient-ascent step (2.13) in expected value, for every baseline BBB that does not depend on the selected action.

Milestones

  1. (2.3): Qn+1=Qn+1n[Rn−Qn]Q_{n+1} = Q_n + \tfrac1n [R_n - Q_n]Qn+1​=Qn​+n1​[Rn​−Qn​] for n≥1n \ge 1n≥1, including Q2=R1Q_2 = R_1Q2​=R1​ for arbitrary Q1Q_1Q1​.
  2. (2.6): Qn+1=(1−α)nQ1+∑i=1nα(1−α)n−iRiQ_{n+1} = (1-\alpha)^n Q_1 + \sum_{i=1}^n \alpha(1-\alpha)^{n-i} R_iQn+1​=(1−α)nQ1​+∑i=1n​α(1−α)n−iRi​, with weights summing to one.
  3. Exercise 2.7: with βn=α/oˉn\beta_n = \alpha/\bar o_nβn​=α/oˉn​, Qn+1=∑i=1nα(1−α)n−ioˉnRiQ_{n+1} = \sum_{i=1}^n \frac{\alpha(1-\alpha)^{n-i}}{\bar o_n} R_iQn+1​=∑i=1n​oˉn​α(1−α)n−i​Ri​ for n≥1n \ge 1n≥1, weights summing to one, and no dependence on Q1Q_1Q1​.
  4. Shift invariance (p. 37): adding a constant ccc to every preference leaves π\piπ unchanged.
  5. Exercise 2.9: for k=2k = 2k=2, π(1)=σ(H(1)−H(2))\pi(1) = \sigma(H(1) - H(2))π(1)=σ(H(1)−H(2)) with σ(x)=1/(1+e−x)\sigma(x) = 1/(1+e^{-x})σ(x)=1/(1+e−x).
  6. Soft-max derivative (p. 40): ∂π(x)/∂H(a)=π(x)(1a=x−π(a))\partial \pi(x)/\partial H(a) = \pi(x)(\mathbb 1_{a=x} - \pi(a))∂π(x)/∂H(a)=π(x)(1a=x​−π(a)).
  7. Zero-sum gradient (p. 39): ∑x∂π(x)/∂H(a)=0\sum_x \partial \pi(x)/\partial H(a) = 0∑x​∂π(x)/∂H(a)=0.
  8. Performance gradient as an expectation (p. 39): ∂E[R]/∂H(a)=E[(R−B)(1a=A−π(a))]\partial \mathbb E[R]/\partial H(a) = \mathbb E[(R - B)(\mathbb 1_{a=A} - \pi(a))]∂E[R]/∂H(a)=E[(R−B)(1a=A​−π(a))].

Significance

The result. The identity makes a model-free algorithm, which uses only the sampled action and reward, an unbiased estimator of the gradient of a quantity that depends on the unknown q∗q_*q∗​. It therefore places the gradient bandit algorithm within stochastic approximation, where convergence theory for stochastic gradient methods applies. It also explains the role of the baseline: any baseline independent of the action leaves the expected update unchanged, so the choice of baseline can only affect the variance of the update, as Figure 2.5 shows empirically. The estimation milestones make precise two claims the chapter uses repeatedly: sample averages can be maintained incrementally, and constant step sizes produce an exponentially recency-weighted average biased by Q1Q_1Q1​. Exercise 2.7 removes that bias.

Formalizing it. All of these results are elementary and proved (or left as routine exercises) in the book. None of them is formalized on Prove2Me or, as far as is known, in Mathlib. What this mission adds is a machine-checked version of the book's argument with the reward model and baseline condition stated precisely, and a reusable soft-max layer (definition, partial derivatives, shift invariance) for later missions of this series, in particular the policy gradient theorem of Chapter 13.

Difficulty

The mathematics is beginning calculus, as the book says. The formal difficulty lies elsewhere. The goal is an identity between an expectation over a two-stage random experiment (an action from π\piπ, then a reward from νA\nu_AνA​) and a partial derivative in one coordinate of a vector-valued parameter. A proof has to justify exchanging the finite sum with the derivative and splitting the reward integral, and it has to use integrability of each νx\nu_xνx​. It also needs the fact that the baseline term vanishes because ∑x∂π(x)/∂H(a)=0\sum_x \partial\pi(x)/\partial H(a) = 0∑x​∂π(x)/∂H(a)=0. A scalar-parameter version of the log-sum-exp derivative does not suffice: the book differentiates in one coordinate H(a)H(a)H(a) while all other preferences are held fixed. For Exercise 2.7 the obvious unrolling of (2.6) does not apply directly, because the step size βn\beta_nβn​ varies with nnn and the book states neither the weights nor the range of α\alphaα.

Formalization scope

  • Actions are Fin k. Every statement quantifies over some action, so k≥1k \ge 1k≥1 whenever it has content. Preferences are vectors Fin k → ℝ. The partial derivative in coordinate aaa is the derivative of h↦f(update H a h)h \mapsto f(\text{update } H\ a\ h)h↦f(update H a h) at H(a)H(a)H(a). The soft-max derivative milestone is stated with HasDerivAt, so it also asserts differentiability.
  • Rewards: each νx\nu_xνx​ is a probability measure on R\mathbb RR with Integrable identity and mean q∗(x)q_*(x)q∗​(x). The expectation of a function of (A,R)(A, R)(A,R) is ∑xπ(x)∫⋅ dνx\sum_x \pi(x) \int \cdot \, d\nu_x∑x​π(x)∫⋅dνx​. The book's normal-distribution testbed is only an example.
  • The baseline is a fixed real BBB, the book's "any scalar that does not depend on" the action (pp. 39–40). The book's Bt=RˉtB_t = \bar R_tBt​=Rˉt​, the average of past rewards, is covered once one conditions on the past. Footnote 1 on p. 37 states that the chapter's experiments used a Rˉt\bar R_tRˉt​ that also included RtR_tRt​. That baseline depends on AtA_tAt​, and the identity does not cover it.
  • Rewards of one action are a sequence indexed from 111. Q1Q_1Q1​ is arbitrary, and 00=10^0 = 100=1 as in the book (p. 33), so α=1\alpha = 1α=1 is included in (2.6).
  • Exercise 2.7 speaks of "a conventional constant step size α>0\alpha > 0α>0". The formalization takes α∈(0,1]\alpha \in (0,1]α∈(0,1], the range of the constant step size in (2.5). For α=2\alpha = 2α=2 the trace oˉn\bar o_noˉn​ vanishes at every even nnn and βn\beta_nβn​ is undefined. "Without initial bias" is read as "for n≥1n \ge 1n≥1, Qn+1Q_{n+1}Qn+1​ is the displayed weighted average of R1,…,RnR_1, \dots, R_nR1​,…,Rn​ with weights summing to one", which in particular does not involve Q1Q_1Q1​.
  • Exercise 2.9 is read as the two equalities π(1)=σ(H(1)−H(2))\pi(1) = \sigma(H(1)-H(2))π(1)=σ(H(1)−H(2)) and π(2)=σ(H(2)−H(1))\pi(2) = \sigma(H(2)-H(1))π(2)=σ(H(2)−H(1)).
  • A trivializing formalization is ruled out: the goal is about the expected value of the algorithm's update (2.12) under the joint law of action and reward, not the soft-max derivative alone and not a version in which the reward is replaced by its mean or the expectation is taken over AAA only.
  • Not formalized: the UCB rule (2.10) and the 10-armed testbed, which carry no provable claim in the chapter, and the stochastic-approximation conditions (2.7), which the book cites without proof.
  • Welcome contributions: a general soft-max library (derivatives, Jacobian, log-sum-exp) over a finite type, reusable for Chapter 13, and proofs of the milestones in the listed order.

Selected references

  • R. S. Sutton, A. G. Barto, Reinforcement Learning: An Introduction, 2nd ed., MIT Press, 2018, ISBN 9780262039246, Chapter 2, pp. 25–46. http://incompleteideas.net/book/the-book-2nd.html
  • R. J. Williams, Simple statistical gradient-following algorithms for connectionist reinforcement learning, Machine Learning 8 (1992) 229–256. https://doi.org/10.1007/BF00992696
  • H. Robbins, S. Monro, A stochastic approximation method, Annals of Mathematical Statistics 22 (1951) 400–407. https://doi.org/10.1214/aoms/1177729586
11 thms2 active usersReviewed
🏆Completed
Machine LearningOperations ResearchStatistics·Captain: mikedeng1

Optimal Best Arm Identification with Fixed Confidence II: Characterization of the Optimal Proportions of Arm DrawsResearch Paper

Motivation

In best arm identification with fixed confidence, a learner samples KKK unknown distributions ("arms") sequentially and must name the arm with the largest mean, with error probability at most a prescribed δ\deltaδ, using as few samples as possible. Garivier and Kaufmann (arXiv:1602.04589, COLT 2016) showed that every δ\deltaδ-PAC strategy needs, in expectation, at least T∗(μ) kl(δ,1−δ)T^*(\boldsymbol\mu)\,\mathrm{kl}(\delta,1-\delta)T∗(μ)kl(δ,1−δ) samples, where the characteristic time T∗(μ)T^*(\boldsymbol\mu)T∗(μ) is the value of a max–min optimization problem over the proportions of draws allocated to the arms. The maximizer of that problem, w∗(μ)w^*(\boldsymbol\mu)w∗(μ), is the allocation any asymptotically optimal strategy must follow; the Track-and-Stop algorithm of the same paper computes w∗(μ^)w^*(\hat{\boldsymbol\mu})w∗(μ^​) at plug-in estimates and tracks it.

A strategy can only track w∗w^*w∗ if w∗w^*w∗ can be computed. This mission formalizes the part of the paper (Section 2.2 and Appendix A) that turns the abstract max–min problem into an explicit recipe: a closed form for the inner infimum, and a characterization of w∗w^*w∗ through the root of one increasing scalar function. The problem had been solved in closed form before only for special cases, such as Poisson rewards with all suboptimal arms equal (Vaidhyan and Sundaresan, 2015); the paper's result covers every one-parameter exponential family.

Setting

A canonical one-parameter exponential family is a family of laws νθ\nu_\thetaνθ​, θ∈Θ\theta\in\Thetaθ∈Θ, on R\mathbb RR with density exp⁡(θx−b(θ))\exp(\theta x-b(\theta))exp(θx−b(θ)) with respect to a reference measure ξ\xiξ. The law νθ\nu_\thetaνθ​ has mean b˙(θ)\dot b(\theta)b˙(θ); the set of attainable means is the mean space b˙(Θ)\dot b(\Theta)b˙(Θ). For means μ=b˙(θ)\mu=\dot b(\theta)μ=b˙(θ) and μ′=b˙(θ′)\mu'=\dot b(\theta')μ′=b˙(θ′) the Kullback–Leibler divergence is

d(μ,μ′)=KL(νθ,νθ′)=b(θ′)−b(θ)−b˙(θ)(θ′−θ).d(\mu,\mu')=\mathrm{KL}(\nu_\theta,\nu_{\theta'})=b(\theta')-b(\theta)-\dot b(\theta)(\theta'-\theta).d(μ,μ′)=KL(νθ​,νθ′​)=b(θ′)−b(θ)−b˙(θ)(θ′−θ).

Bernoulli laws and Gaussian laws with known variance are the standard examples.

A bandit model is identified with its vector of means μ=(μ1,…,μK)∈b˙(Θ)K\boldsymbol\mu=(\mu_1,\dots,\mu_K)\in\dot b(\Theta)^Kμ=(μ1​,…,μK​)∈b˙(Θ)K. S\mathcal SS is the set of models with a unique optimal arm a∗(μ)a^*(\boldsymbol\mu)a∗(μ), and Alt(μ)={λ∈S:a∗(λ)≠a∗(μ)}\mathrm{Alt}(\boldsymbol\mu)=\{\boldsymbol\lambda\in\mathcal S:a^*(\boldsymbol\lambda)\ne a^*(\boldsymbol\mu)\}Alt(μ)={λ∈S:a∗(λ)=a∗(μ)} is the set of alternatives. ΣK\Sigma_KΣK​ is the probability simplex. The transportation cost of proportions w∈ΣKw\in\Sigma_Kw∈ΣK​ and the objects of the paper are

cμ(w)=inf⁡λ∈Alt(μ)∑a=1Kwa d(μa,λa),T∗(μ)−1=sup⁡w∈ΣKcμ(w),w∗(μ)=argmax⁡w∈ΣKcμ(w).c_{\boldsymbol\mu}(w)=\inf_{\boldsymbol\lambda\in\mathrm{Alt}(\boldsymbol\mu)}\sum_{a=1}^Kw_a\,d(\mu_a,\lambda_a),\qquad T^*(\boldsymbol\mu)^{-1}=\sup_{w\in\Sigma_K}c_{\boldsymbol\mu}(w),\qquad w^*(\boldsymbol\mu)=\operatorname*{argmax}_{w\in\Sigma_K}c_{\boldsymbol\mu}(w).cμ​(w)=λ∈Alt(μ)inf​a=1∑K​wa​d(μa​,λa​),T∗(μ)−1=w∈ΣK​sup​cμ​(w),w∗(μ)=w∈ΣK​argmax​cμ​(w).

The arms are sorted so that μ1>μ2≥⋯≥μK\mu_1>\mu_2\ge\dots\ge\mu_Kμ1​>μ2​≥⋯≥μK​. The parameterized Jensen–Shannon divergence is, for α∈[0,1]\alpha\in[0,1]α∈[0,1],

Iα(μ1,μ2)=α d(μ1,αμ1+(1−α)μ2)+(1−α) d(μ2,αμ1+(1−α)μ2).I_\alpha(\mu_1,\mu_2)=\alpha\,d\big(\mu_1,\alpha\mu_1+(1-\alpha)\mu_2\big)+(1-\alpha)\,d\big(\mu_2,\alpha\mu_1+(1-\alpha)\mu_2\big).Iα​(μ1​,μ2​)=αd(μ1​,αμ1​+(1−α)μ2​)+(1−α)d(μ2​,αμ1​+(1−α)μ2​).

For a∈{2,…,K}a\in\{2,\dots,K\}a∈{2,…,K} let ga(x)=(1+x)I1/(1+x)(μ1,μa)g_a(x)=(1+x)I_{1/(1+x)}(\mu_1,\mu_a)ga​(x)=(1+x)I1/(1+x)​(μ1​,μa​) for x≥0x\ge0x≥0, let xa=ga−1x_a=g_a^{-1}xa​=ga−1​, and let x1≡1x_1\equiv1x1​≡1. Finally

Fμ(y)=∑a=2Kd(μ1,ma(y))d(μa,ma(y)),ma(y)=μ1+xa(y)μa1+xa(y).F_{\boldsymbol\mu}(y)=\sum_{a=2}^K\frac{d\big(\mu_1,m_a(y)\big)}{d\big(\mu_a,m_a(y)\big)},\qquad m_a(y)=\frac{\mu_1+x_a(y)\mu_a}{1+x_a(y)}.Fμ​(y)=a=2∑K​d(μa​,ma​(y))d(μ1​,ma​(y))​,ma​(y)=1+xa​(y)μ1​+xa​(y)μa​​.

Formalization targets

Goal: Theorem 5 (p. 5)

With D=d(μ1,μ2)D=d(\mu_1,\mu_2)D=d(μ1​,μ2​): FμF_{\boldsymbol\mu}Fμ​ is continuous and strictly increasing on [0,D[[0,D[[0,D[, Fμ(0)=0F_{\boldsymbol\mu}(0)=0Fμ​(0)=0, Fμ(y)→∞F_{\boldsymbol\mu}(y)\to\inftyFμ​(y)→∞ as y→Dy\to Dy→D, the equation Fμ(y)=1F_{\boldsymbol\mu}(y)=1Fμ​(y)=1 has a unique solution y∗∈[0,D[y^*\in[0,D[y∗∈[0,D[, and

w∈w∗(μ)  ⟺  wa=xa(y∗)∑i=1Kxi(y∗)for every arm a.w\in w^*(\boldsymbol\mu)\iff w_a=\frac{x_a(y^*)}{\sum_{i=1}^Kx_i(y^*)}\quad\text{for every arm }a.w∈w∗(μ)⟺wa​=∑i=1K​xi​(y∗)xa​(y∗)​for every arm a.

The equivalence says at once that the argmax exists, that it is a single point, and that it is given by eq. (5).

Milestones

  1. Lemma 3 (p. 5): for every w∈ΣKw\in\Sigma_Kw∈ΣK​,
cμ(w)=min⁡a≠1(w1+wa) Iw1w1+wa(μ1,μa).c_{\boldsymbol\mu}(w)=\min_{a\ne1}(w_1+w_a)\,I_{\frac{w_1}{w_1+w_a}}(\mu_1,\mu_a).cμ​(w)=a=1min​(w1​+wa​)Iw1​+wa​w1​​​(μ1​,μa​).
  1. Claim after eq. (4) (p. 5): gag_aga​ is a strictly increasing one-to-one mapping from [0,+∞[[0,+\infty[[0,+∞[ onto [0,d(μ1,μa)[[0,d(\mu_1,\mu_a)[[0,d(μ1​,μa​)[.
  2. Lemma 4 (p. 5): for every maximizer w∗w^*w∗ and all a,b∈{2,…,K}a,b\in\{2,\dots,K\}a,b∈{2,…,K},
(w1∗+wa∗)Iw1∗w1∗+wa∗(μ1,μa)=(w1∗+wb∗)Iw1∗w1∗+wb∗(μ1,μb).(w^*_1+w^*_a)I_{\frac{w^*_1}{w^*_1+w^*_a}}(\mu_1,\mu_a)=(w^*_1+w^*_b)I_{\frac{w^*_1}{w^*_1+w^*_b}}(\mu_1,\mu_b).(w1∗​+wa∗​)Iw1∗​+wa∗​w1∗​​​(μ1​,μa​)=(w1∗​+wb∗​)Iw1∗​+wb∗​w1∗​​​(μ1​,μb​).

Significance

The result. Theorem 5 reduces a (K−1)(K-1)(K−1)-dimensional non-smooth max–min problem to finding the root of one continuous increasing function on a bounded interval, each evaluation of which requires K−1K-1K−1 scalar inversions. It gives existence and uniqueness of w∗(μ)w^*(\boldsymbol\mu)w∗(μ), which the paper's lower bound only presupposes, and it is the computational core of Track-and-Stop: without an explicit, well-posed w∗w^*w∗ the tracking strategy is not defined. Lemma 3 alone gives the closed form of the inner infimum used again in the analysis of the stopping rule.

Formalizing it. The results are proved in the paper; nothing here is open. To the best of our knowledge none of them has a machine-checked proof: the platform's existing best-arm-identification rows concern Gaussian arms and state the characteristic time at the level of measures, without this characterization. The mission produces a checked reduction for general one-parameter exponential families, including the edge cases the text passes over (ties among suboptimal arms, zero weights, the behaviour of xax_axa​ near the end of its domain).

Difficulty

The infimum in Lemma 3 ranges over Alt(μ)\mathrm{Alt}(\boldsymbol\mu)Alt(μ), a set of models with a unique best arm, so it is an open condition: the minimizing configuration, in which λ1\lambda_1λ1​ and λa\lambda_aλa​ coincide, lies outside Alt(μ)\mathrm{Alt}(\boldsymbol\mu)Alt(μ) and is only approached. Other arms may also compete for the best position. A statement in which the infimum is taken over the closed relaxation {λa≥λ1}\{\lambda_a\ge\lambda_1\}{λa​≥λ1​} is a lemma of the proof, not Lemma 3.

For Theorem 5, the equalization in Lemma 4 needs an argument that holds for every maximizer, not only for one found by a first-order condition, because the objective is a minimum of functions and is not differentiable. The monotonicity of FμF_{\boldsymbol\mu}Fμ​ needs the monotonicity of each xax_axa​ and of each ratio in the moving point mam_ama​, and the limit at DDD rests on the second-best arm(s) only, which is where the ordering μ1>μ2≥…\mu_1>\mu_2\ge\dotsμ1​>μ2​≥… enters. Finally the analytic facts about ddd (continuity, positivity off the diagonal, monotonicity in each argument) must be derived from the exponential family itself.

Formalization scope

Lean represents a model by μ : Fin K → ℝ with 2 ≤ K and every μ a in the mean space deriv F.b '' F.Θ. The paper's arm 111 is index 0, arm 222 is index 1. The exponential family is a structure ExpFamily whose parameter set is a nonempty open interval and whose b is twice continuously differentiable with b¨>0\ddot b>0b¨>0 on Θ\ThetaΘ. These two conditions are added to the paper's "convex, twice differentiable" and are disclosed: strict convexity is what makes the mean parameterization unique, and openness is what lets alternatives approach the boundary of Alt(μ)\mathrm{Alt}(\boldsymbol\mu)Alt(μ). The reference measure and normalization are part of the structure but unused here.

The transportation cost is an infimum in EReal, so it is the true infimum of the set of values rather than a default 0. w∗(μ)w^*(\boldsymbol\mu)w∗(μ) is never defined by choice: "www is optimal" is a predicate, and Theorem 5 characterizes the set of such www. The functions xax_axa​ are the inverse of gag_aga​ on [0,+∞[[0,+\infty[[0,+∞[ and are evaluated only on [0,d(μ1,μ2)[[0,d(\mu_1,\mu_2)[[0,d(μ1​,μ2​)[. "Increasing" in Theorem 5 is stated as strictly increasing, as proved in Appendix A.2. Lemmas 3 and 4 and the claim on gag_aga​ assume only that arm 111 is the unique best arm, which is weaker than the paper's standing ordering.

A formalization that replaces Alt(μ)\mathrm{Alt}(\boldsymbol\mu)Alt(μ) by {λa≥λ1}\{\lambda_a\ge\lambda_1\}{λa​≥λ1​}, assumes the maximizer exists and is unique, or asserts only existence of some y∗y^*y∗ without the formula for w∗w^*w∗, does not state these results and is ruled out.

A complete development needs: basic calculus of exponential families (the Bregman form of ddd, its continuity and strict positivity off the diagonal, its monotonicity in the second argument), the inverse function of a continuous strictly monotone map on an interval, and compactness of the simplex. The divergence facts are reusable in every bandit mission built on exponential families. Proofs of the milestones, of auxiliary facts about ddd and IαI_\alphaIα​, and a sorry-free instance of ExpFamily (Bernoulli or unit-variance Gaussian) are welcome.

Selected references

  • A. Garivier, E. Kaufmann, Optimal Best Arm Identification with Fixed Confidence, COLT 2016 (JMLR W&CP 49), arXiv:1602.04589v2. https://arxiv.org/abs/1602.04589
  • E. Kaufmann, O. Cappé, A. Garivier, On the Complexity of Best-Arm Identification in Multi-Armed Bandit Models, JMLR 17, 2016. https://arxiv.org/abs/1407.4443
  • N. K. Vaidhyan, R. Sundaresan, Learning to detect an oddball target, arXiv:1508.05572, 2015. https://arxiv.org/abs/1508.05572
  • O. Cappé, A. Garivier, O.-A. Maillard, R. Munos, G. Stoltz, Kullback–Leibler upper confidence bounds for optimal sequential allocation, Annals of Statistics 41(3), 2013. https://arxiv.org/abs/1210.1136
6 thms2 active usersReviewed
🏆Completed
Machine LearningOptimization·Captain: mikedeng1

Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits II: The Iteration Bound of Coordinate DescentResearch Paper

Motivation

In the contextual bandit problem a learner repeatedly observes a context, picks one of KKK actions, and sees the reward of that action only. Against a finite class Π\PiΠ of policies, statistically optimal regret of order KTln⁡∣Π∣\sqrt{KT\ln|\Pi|}KTln∣Π∣​ has been known since EXP4 (Auer et al., 2002), but EXP4 maintains a weight per policy and costs Ω(∣Π∣)\Omega(|\Pi|)Ω(∣Π∣) time per round. For the large policy classes used in practice (linear classifiers, trees), that is prohibitive.

The oracle-efficient line of work accesses Π\PiΠ only through a cost-sensitive classification oracle (an arg max oracle, AMO). The RandomizedUCB algorithm of Dudík et al. (2011) obtains optimal regret with polynomially many oracle calls by solving a convex program in each round, but the number of calls is large. Agarwal, Hsu, Kale, Langford, Li and Schapire (2014) replace that solver by a coordinate descent method whose number of iterations, and hence of oracle calls, is bounded independently of ∣Π∣|\Pi|∣Π∣. Their algorithm, ILOVETOCONBANDITS, and its practical variant are now standard references for oracle-based exploration.

This mission formalizes the optimization half of that paper: Algorithm 2 solves the per-epoch problem (OP) after at most 4ln⁡(1/(Kμ))/μ4\ln(1/(K\mu))/\mu4ln(1/(Kμ))/μ coordinate steps.

Setting

Let A={0,…,K−1}A=\{0,\dots,K-1\}A={0,…,K−1} be the actions, XXX any set of contexts, and Π⊆AX\Pi\subseteq A^XΠ⊆AX a finite nonempty set of policies. A history HtH_tHt​ is a sequence of t≥1t\ge1t≥1 records (xi,ai,ri(ai),pi(ai))(x_i,a_i,r_i(a_i),p_i(a_i))(xi​,ai​,ri​(ai​),pi​(ai​)) with ri(ai)∈[0,1]r_i(a_i)\in[0,1]ri​(ai​)∈[0,1] the observed reward and pi(ai)∈(0,1]p_i(a_i)\in(0,1]pi​(ai​)∈(0,1] the probability with which aia_iai​ was chosen. Write E^x∼Ht[f(x)]=1t∑if(xi)\widehat{\mathbb E}_{x\sim H_t}[f(x)]=\frac1t\sum_i f(x_i)Ex∼Ht​​[f(x)]=t1​∑i​f(xi​).

The inverse propensity scoring estimate (Eq. (1)) is

R^t(π)=1t∑i=1tri(ai) 1{π(xi)=ai}pi(ai),\widehat{\mathcal R}_t(\pi)=\frac1t\sum_{i=1}^t\frac{r_i(a_i)\,\mathbb 1\{\pi(x_i)=a_i\}}{p_i(a_i)},Rt​(π)=t1​i=1∑t​pi​(ai​)ri​(ai​)1{π(xi​)=ai​}​,

the estimated regret is Reg^t(π)=max⁡π′∈ΠR^t(π′)−R^t(π)\widehat{\mathrm{Reg}}_t(\pi)=\max_{\pi'\in\Pi}\widehat{\mathcal R}_t(\pi')-\widehat{\mathcal R}_t(\pi)Reg​t​(π)=maxπ′∈Π​Rt​(π′)−Rt​(π), and for a minimum probability μ\muμ one sets bπ=Reg^t(π)/(ψμ)b_\pi=\widehat{\mathrm{Reg}}_t(\pi)/(\psi\mu)bπ​=Reg​t​(π)/(ψμ) with ψ=100\psi=100ψ=100.

Weights are vectors Q∈RΠQ\in\mathbb R^\PiQ∈RΠ; ΔΠ\Delta^\PiΔΠ is the set of nonnegative QQQ with ∑πQ(π)≤1\sum_\pi Q(\pi)\le1∑π​Q(π)≤1. The smoothed projection of QQQ is

Qμ(a∣x)=(1−Kμ)∑π: π(x)=aQ(π)+μ.Q^\mu(a\mid x)=(1-K\mu)\sum_{\pi:\ \pi(x)=a}Q(\pi)+\mu .Qμ(a∣x)=(1−Kμ)π: π(x)=a∑​Q(π)+μ.

The optimization problem (OP) asks for Q∈ΔΠQ\in\Delta^\PiQ∈ΔΠ with

∑π∈ΠQ(π)bπ≤2K(2),E^x∼Ht[1Qμ(π(x)∣x)]≤2K+bπ  ∀π∈Π(3).\sum_{\pi\in\Pi}Q(\pi)b_\pi\le2K\quad(2),\qquad \widehat{\mathbb E}_{x\sim H_t}\Bigl[\frac1{Q^\mu(\pi(x)\mid x)}\Bigr]\le2K+b_\pi\ \ \forall\pi\in\Pi\quad(3).π∈Π∑​Q(π)bπ​≤2K(2),Ex∼Ht​​[Qμ(π(x)∣x)1​]≤2K+bπ​  ∀π∈Π(3).

Algorithm 2 starts from QinitQ_{\mathrm{init}}Qinit​ and loops. With Vπ(Q)=E^[1/Qμ(π(x)∣x)]V_\pi(Q)=\widehat{\mathbb E}[1/Q^\mu(\pi(x)\mid x)]Vπ​(Q)=E[1/Qμ(π(x)∣x)], Sπ(Q)=E^[1/Qμ(π(x)∣x)2]S_\pi(Q)=\widehat{\mathbb E}[1/Q^\mu(\pi(x)\mid x)^2]Sπ​(Q)=E[1/Qμ(π(x)∣x)2] and Dπ(Q)=Vπ(Q)−(2K+bπ)D_\pi(Q)=V_\pi(Q)-(2K+b_\pi)Dπ​(Q)=Vπ​(Q)−(2K+bπ​): if ∑πQ(π)(2K+bπ)>2K\sum_\pi Q(\pi)(2K+b_\pi)>2K∑π​Q(π)(2K+bπ​)>2K it rescales QQQ by c=2K/∑πQ(π)(2K+bπ)c=2K/\sum_\pi Q(\pi)(2K+b_\pi)c=2K/∑π​Q(π)(2K+bπ​) (Eq. (4)); then, if some π\piπ has Dπ(Q)>0D_\pi(Q)>0Dπ​(Q)>0, it adds

απ(Q)=Vπ(Q)+Dπ(Q)2(1−Kμ)Sπ(Q)\alpha_\pi(Q)=\frac{V_\pi(Q)+D_\pi(Q)}{2(1-K\mu)S_\pi(Q)}απ​(Q)=2(1−Kμ)Sπ​(Q)Vπ​(Q)+Dπ​(Q)​

to Q(π)Q(\pi)Q(π) (Step 8) and repeats; otherwise it halts and outputs QQQ.

The analysis uses the potential (Eq. (6)), with τ=t\tau=tτ=t and UA\mathcal U_AUA​ uniform on AAA,

Φm(Q)=τμ(E^x[RE(UA ∥ Qμ(⋅∣x))]1−Kμ+∑πQ(π)bπ2K),RE(p∥q)=∑a(paln⁡paqa+qa−pa).\Phi_m(Q)=\tau\mu\left(\frac{\widehat{\mathbb E}_x[\mathrm{RE}(\mathcal U_A\,\|\,Q^\mu(\cdot\mid x))]}{1-K\mu}+\frac{\sum_\pi Q(\pi)b_\pi}{2K}\right),\qquad \mathrm{RE}(p\|q)=\sum_a\bigl(p_a\ln\tfrac{p_a}{q_a}+q_a-p_a\bigr).Φm​(Q)=τμ(1−KμEx​[RE(UA​∥Qμ(⋅∣x))]​+2K∑π​Q(π)bπ​​),RE(p∥q)=a∑​(pa​lnqa​pa​​+qa​−pa​).

Formalization targets

Goal: Theorem 3 (p. 6)

For 0<μ≤1/(2K)0<\mu\le1/(2K)0<μ≤1/(2K), Algorithm 2 with Qinit=0Q_{\mathrm{init}}=\mathbf 0Qinit​=0 satisfies: every run executes Step 8 at most

4ln⁡(1/(Kμ))μ\frac{4\ln(1/(K\mu))}{\mu}μ4ln(1/(Kμ))​

times, whatever policy each Step 8 chooses among those with Dπ>0D_\pi>0Dπ​>0; and when it halts, its output solves (OP). The bound depends on KμK\muKμ only, not on ∣Π∣|\Pi|∣Π∣ or ttt.

Milestones

  1. Lemma 5 (p. 10). If Algorithm 2 halts and outputs QQQ, then QQQ satisfies (2), (3) and ∑πQ(π)≤1\sum_\pi Q(\pi)\le1∑π​Q(π)≤1.
  2. Lemma 6 (p. 10). If ∑πQ(π)(2K+bπ)>2K\sum_\pi Q(\pi)(2K+b_\pi)>2K∑π​Q(π)(2K+bπ​)>2K and ccc is as in Eq. (4), then Φm(cQ)≤Φm(Q)\Phi_m(cQ)\le\Phi_m(Q)Φm​(cQ)≤Φm​(Q).
  3. Lemma 7 (p. 10). If Dπ(Q)>0D_\pi(Q)>0Dπ​(Q)>0 and Q′Q'Q′ adds απ(Q)\alpha_\pi(Q)απ​(Q) to Q(π)Q(\pi)Q(π), then
Φm(Q)−Φm(Q′)≥τμ24(1−Kμ).\Phi_m(Q)-\Phi_m(Q')\ge\frac{\tau\mu^2}{4(1-K\mu)}.Φm​(Q)−Φm​(Q′)≥4(1−Kμ)τμ2​.

Significance

The result. Theorem 3 is what makes ILOVETOCONBANDITS computationally efficient: each call of Algorithm 2 is implemented with one AMO call per iteration (Lemma 1 of the paper), so the oracle complexity of an epoch is O(ln⁡(1/(Kμ))/μ)O(\ln(1/(K\mu))/\mu)O(ln(1/(Kμ))/μ). Combined with the epoch schedule and warm start, this gives the paper's total of O~(KT/ln⁡(∣Π∣/δ))\tilde O(\sqrt{KT/\ln(|\Pi|/\delta)})O~(KT/ln(∣Π∣/δ)​) oracle calls over TTT rounds. Theorem 3 also gives a constructive proof that (OP) is feasible for every history, which the regret analysis (a separate mission in this series) assumes.

Formalizing it. The result is proved in the paper, with complete proofs of Lemmas 5–7 in Appendix D. No machine-checked version is known. The formalization would give a checked termination bound for a coordinate descent method on a non-smooth feasibility problem, with a fully explicit constant, and a verified definition of the unnormalized relative entropy potential that is reusable for other smoothed-projection analyses (e.g. RandomizedUCB-type convex programs).

Difficulty

Termination cannot be read off the constraints. Step 8 raises one weight and can push the total weight above 1, after which Step 5 shrinks every coordinate, so no constraint and no single weight moves monotonically along a run. The number of policies that violate (3) can also go up after a step. Bounding the number of iterations therefore needs a global quantity that tracks progress through both kinds of step. The rescaling step is the harder of the two: it lowers every Qμ(a∣x)Q^\mu(a\mid x)Qμ(a∣x) at once, which pushes the relative-entropy term the wrong way, and it must be offset by the drop in the regret term. Knowing that (OP) is feasible, or that some convex function has a minimizer, bounds nothing about how many steps a particular method takes; that is the obvious approach, and it gives no count.

Formalization scope

  • Actions are Fin K with K≥1K\ge1K≥1; contexts form an arbitrary type (no measure is needed: Theorem 3 is deterministic). Π\PiΠ is a nonempty Finset (X → Fin K); weights are real functions on its subtype.
  • Histories are indexed by Fin t with t≥1t\ge1t≥1 (0-based indices). The paper allows pi(ai)∈[0,1]p_i(a_i)\in[0,1]pi​(ai​)∈[0,1]; the formalization requires pi(ai)∈(0,1]p_i(a_i)\in(0,1]pi​(ai​)∈(0,1], since Eq. (1) divides by it.
  • Reg^t(π)\widehat{\mathrm{Reg}}_t(\pi)Reg​t​(π) is written as max⁡π′R^t(π′)−R^t(π)\max_{\pi'}\widehat{\mathcal R}_t(\pi')-\widehat{\mathcal R}_t(\pi)maxπ′​Rt​(π′)−Rt​(π), which equals R^t(πt)−R^t(π)\widehat{\mathcal R}_t(\pi_t)-\widehat{\mathcal R}_t(\pi)Rt​(πt​)−Rt​(π) for any maximizer πt\pi_tπt​; ψ=100\psi=100ψ=100 is hard-wired in bπb_\pibπ​.
  • QμQ^\muQμ, VπV_\piVπ​, SπS_\piSπ​, (OP) and Φm\Phi_mΦm​ all use the smoothed projection of the unnormalized weights; there is no default policy in this mission.
  • μ\muμ ranges over (0,1/(2K)](0,1/(2K)](0,1/(2K)], the range of μm\mu_mμm​ in Algorithm 1 that the printed theorem refers to. τ\tauτ in Φm\Phi_mΦm​ is the history length ttt.
  • Algorithm 2 is encoded relationally. A run of length nnn from QinitQ_{\mathrm{init}}Qinit​ is a sequence Q(0)=Qinit,…,Q(n)Q^{(0)}=Q_{\mathrm{init}},\dots,Q^{(n)}Q(0)=Qinit​,…,Q(n) in which each Q(k+1)Q^{(k+1)}Q(k+1) is Step 8, for some policy with Dπ>0D_\pi>0Dπ​>0, applied to the rescaled Q(k)Q^{(k)}Q(k). It halts at Q(n)Q^{(n)}Q(n) when no policy has Dπ>0D_\pi>0Dπ​>0 after rescaling, and it then outputs the rescaled Q(n)Q^{(n)}Q(n). "Iterations" means executions of Step 8. The last pass, which halts at Step 10, is not counted: the paper's proof bounds "the number of times Step 8 is executed". The bound is compared in R\mathbb RR, without rounding.
  • Lemmas 5–7 are stated for nonnegative weight vectors without a bound on their sum, because Algorithm 2 rescales vectors whose sum may exceed 1. Lemma 7's "α=απ(Q)>0\alpha=\alpha_\pi(Q)>0α=απ​(Q)>0" is part of its conclusion.
  • A trivializing formalization is ruled out: the goal quantifies over every run from 0\mathbf 00 and every choice in Step 8, not over some run, and the potential, bπb_\pibπ​ and DπD_\piDπ​ are computed from the history rather than taken as free parameters.
  • The auxiliary facts Φm≥0\Phi_m\ge0Φm​≥0 and Φm(0)≤τμln⁡(1/(Kμ))/(1−Kμ)\Phi_m(\mathbf 0)\le\tau\mu\ln(1/(K\mu))/(1-K\mu)Φm​(0)≤τμln(1/(Kμ))/(1−Kμ) are inline claims in the paper and are not stated separately; contributions stating and proving them are welcome, as are general lemmas on the unnormalized relative entropy.
  • Out of scope: the regret bound (Theorem 2) and the probabilistic model (mission I of this series), the AMO implementation (Lemma 1), warm start and epoch-level oracle counts (Lemmas 2, 3, 8), and the support lower bound (Theorem 4).

Selected references

  • A. Agarwal, D. Hsu, S. Kale, J. Langford, L. Li, R. E. Schapire, Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits, ICML 2014; arXiv:1402.0555v2. https://arxiv.org/abs/1402.0555
  • M. Dudík, D. Hsu, S. Kale, N. Karampatziakis, J. Langford, L. Reyzin, T. Zhang, Efficient Optimal Learning for Contextual Bandits, UAI 2011. https://arxiv.org/abs/1106.2369
  • P. Auer, N. Cesa-Bianchi, Y. Freund, R. E. Schapire, The Nonstochastic Multiarmed Bandit Problem, SIAM J. Comput. 32(1), 2002. https://doi.org/10.1137/S0097539701398375
7 thms2 active usersReviewed
Machine LearningOperations ResearchStatistics·Captain: mikedeng1

Online Decision Making with High-Dimensional Covariates: Regret Bound of the LASSO BanditResearch Paper

Motivation

Many sequential decisions are personalised: a physician chooses a drug dose for each arriving patient, a platform chooses which offer to show each arriving user. Each decision is made after observing a vector of covariates describing the individual, and its outcome is observed only for the option chosen. This is the contextual (covariate) bandit problem, studied in operations research and machine learning since Auer (JMLR 2002) and Goldenshluger and Zeevi (Stochastic Systems 2013).

In medical and e-commerce applications the covariate vector is often high-dimensional: the number of covariates ddd is comparable to or larger than the number of decisions that will ever be made, while the outcome of each option depends on a few of them. Low-dimensional bandit algorithms then incur regret that grows polynomially with ddd. Bastani and Bayati (Operations Research 2020) proposed the LASSO Bandit, which estimates each option's reward model with the LASSO, and proved a regret bound that grows only logarithmically in ddd. The paper evaluates the method on warfarin dosing data.

Timeline:

  • 2002–2003: Auer introduces linear-reward contextual bandits with confidence bounds.
  • 2013: Goldenshluger and Zeevi give a forced-sampling algorithm for two arms in low dimension with O(log⁡T)O(\log T)O(logT) regret under a margin condition and an arm-optimality condition, and an information-theoretic lower bound of the same order.
  • 2020: Bastani and Bayati extend the forced-sampling scheme to KKK arms and high-dimensional sparse parameters, with regret O(s02[log⁡T+log⁡d]2)O(s_0^2[\log T+\log d]^2)O(s02​[logT+logd]2).

Setting

There are KKK arms with unknown parameters β1,…,βK∈Rd\beta_1,\dots,\beta_K\in\mathbb R^dβ1​,…,βK​∈Rd. At each time t=1,2,…,Tt=1,2,\dots,Tt=1,2,…,T a covariate vector Xt∈RdX_t\in\mathbb R^dXt​∈Rd arrives; the XtX_tXt​ are i.i.d. with law PX\mathcal P_XPX​ and take values in a fixed set X\mathcal XX. If arm iii is pulled, the reward is Xt⊤βi+εi,tX_t^\top\beta_i+\varepsilon_{i,t}Xt⊤​βi​+εi,t​, where the noises εi,t\varepsilon_{i,t}εi,t​ are independent, σ\sigmaσ-subgaussian (E[esε]≤eσ2s2/2\mathbb E[e^{s\varepsilon}]\le e^{\sigma^2s^2/2}E[esε]≤eσ2s2/2 for all sss), and independent of the covariates. A policy chooses the arm πt\pi_tπt​ from XtX_tXt​ and the past covariates, arms and observed rewards. Its cumulative expected regret is

RT=∑t=1TE[max⁡jXt⊤βj−Xt⊤βπt].R_T=\sum_{t=1}^T\mathbb E\Big[\max_jX_t^\top\beta_j-X_t^\top\beta_{\pi_t}\Big].RT​=t=1∑T​E[jmax​Xt⊤​βj​−Xt⊤​βπt​​].

The sparsity s0s_0s0​ is the smallest integer s0≥1s_0\ge1s0​≥1 with ∥βi∥0≤s0\|\beta_i\|_0\le s_0∥βi​∥0​≤s0​ for all iii.

The four assumptions are: (1) ∥x∥∞≤xmax⁡\|x\|_\infty\le x_{\max}∥x∥∞​≤xmax​ on X\mathcal XX and ∥βi∥1≤b\|\beta_i\|_1\le b∥βi​∥1​≤b; (2) a margin condition Pr⁡[0<∣X⊤(βi−βj)∣≤κ]≤C0κ\Pr[0<|X^\top(\beta_i-\beta_j)|\le\kappa]\le C_0\kappaPr[0<∣X⊤(βi​−βj​)∣≤κ]≤C0​κ; (3) arm optimality: every arm is either suboptimal by a margin hhh at every covariate, or optimal by margin hhh on a region UiU_iUi​ of probability at least p∗p_*p∗​; (4) a compatibility condition: the conditional second-moment matrix Σi=E[XX⊤∣X∈Ui]\Sigma_i=\mathbb E[XX^\top\mid X\in U_i]Σi​=E[XX⊤∣X∈Ui​] of each optimal arm lies in the set C(supp(βi),ϕ0)\mathcal C(\mathrm{supp}(\beta_i),\phi_0)C(supp(βi​),ϕ0​) of matrices M⪰0M\succeq0M⪰0 with ∥vI∥12≤∣I∣ v⊤Mv/ϕ02\|v_I\|_1^2\le|I|\,v^\top Mv/\phi_0^2∥vI​∥12​≤∣I∣v⊤Mv/ϕ02​ whenever ∥vIc∥1≤3∥vI∥1\|v_{I^c}\|_1\le3\|v_I\|_1∥vIc​∥1​≤3∥vI​∥1​.

The LASSO estimator on nnn samples is any minimizer of ∥Y−Xβ′∥22/n+λ∥β′∥1\|Y-\mathbf X\beta'\|_2^2/n+\lambda\|\beta'\|_1∥Y−Xβ′∥22​/n+λ∥β′∥1​. The LASSO Bandit forces arm iii at the prescribed times Ti={(2n−1)Kq+j:n≥0, q(i−1)<j≤qi}\mathcal T_i=\{(2^n-1)Kq+j : n\ge0,\ q(i-1)<j\le qi\}Ti​={(2n−1)Kq+j:n≥0, q(i−1)<j≤qi}. At every other time it keeps the arms whose forced-sample estimate β^(Ti,t−1,λ1)\hat\beta(\mathcal T_{i,t-1},\lambda_1)β^​(Ti,t−1​,λ1​) is within h/2h/2h/2 of the best. Among them it plays the arm with the largest all-sample estimate β^(Si,t−1,λ2,t−1)\hat\beta(\mathcal S_{i,t-1},\lambda_{2,t-1})β^​(Si,t−1​,λ2,t−1​), trained on every past pull of the arm, with λ2,t=λ2,0(log⁡t+log⁡d)/t\lambda_{2,t}=\lambda_{2,0}\sqrt{(\log t+\log d)/t}λ2,t​=λ2,0​(logt+logd)/t​.

Formalization targets

Goal: Theorem 1 (regret of the LASSO Bandit)

For q≥4⌈q0⌉q\ge4\lceil q_0\rceilq≥4⌈q0​⌉, K≥2K\ge2K≥2, d>2d>2d>2, T≥C5T\ge C_5T≥C5​, λ1=ϕ02p∗h/(64s0xmax⁡)\lambda_1=\phi_0^2p_*h/(64s_0x_{\max})λ1​=ϕ02​p∗​h/(64s0​xmax​) and λ2,0=[ϕ02/(2s0)]1/(p∗C1)\lambda_{2,0}=[\phi_0^2/(2s_0)]\sqrt{1/(p_*C_1)}λ2,0​=[ϕ02​/(2s0​)]1/(p∗​C1​)​,

RT≤C3(log⁡T)2+[2Kbxmax⁡(6q+4)+C3log⁡d]log⁡T+(2bxmax⁡C5+2Kbxmax⁡+C4),R_T\le C_3(\log T)^2+\big[2Kbx_{\max}(6q+4)+C_3\log d\big]\log T+\big(2bx_{\max}C_5+2Kbx_{\max}+C_4\big),RT​≤C3​(logT)2+[2Kbxmax​(6q+4)+C3​logd]logT+(2bxmax​C5​+2Kbxmax​+C4​),

with the explicit constants C1,…,C5C_1,\dots,C_5C1​,…,C5​, q0q_0q0​ of the paper (p. 285).

Milestones

  1. Proposition 1: a LASSO tail inequality for adaptively collected rows with conditionally subgaussian noise.
  2. Lemma 1: a LASSO tail inequality when a constant fraction of the rows is i.i.d. with a compatible second-moment matrix.
  3. Proposition 2: the forced-sample estimator of an optimal arm is within h/(4xmax⁡)h/(4x_{\max})h/(4xmax​) of βi\beta_iβi​ except with probability 5/t45/t^45/t4.
  4. Proposition 3: the all-sample estimator of an optimal arm is within 16(log⁡t+log⁡d)/(p∗3C1t)16\sqrt{(\log t+\log d)/(p_*^3C_1t)}16(logt+logd)/(p∗3​C1​t)​ of βi\beta_iβi​ except with probability 2/t+2e−p∗2C22t/322/t+2e^{-p_*^2C_2^2t/32}2/t+2e−p∗2​C22​t/32.

Significance

The theorem shows that exploiting sparsity makes the regret depend on the ambient dimension only through log⁡d\log dlogd, while its dependence on the horizon is within one log⁡T\log TlogT factor of the Ω(log⁡T)\Omega(\log T)Ω(logT) lower bound known in low dimension. Proposition 1 is a LASSO oracle inequality for adapted designs, where each row may depend on earlier observations. It applies whenever a LASSO is fitted to data gathered by a feedback policy: adaptive experiments, dynamic pricing, sequential treatment assignment.

The results are proved in the paper and its online appendix; none of them has a machine-checked proof. This mission produces a formal model of the covariate bandit with a non-anticipating algorithm, a formal LASSO for adapted designs, and, when complete, a verified regret bound with every constant explicit. Proposition 1 and Lemma 1 are reusable beyond bandits.

Difficulty

The all-sample estimator is trained on the times at which the algorithm chose an arm, and those choices depend on earlier estimates. Its design rows are therefore neither independent nor identically distributed, and the standard LASSO analysis, which starts from i.i.d. rows and a restricted-eigenvalue bound on their population covariance, does not apply. The forced samples are i.i.d. but only O(log⁡t)O(\log t)O(logt) in number, too few for the log⁡t/t\sqrt{\log t/t}logt/t​ rate the regret bound needs. Controlling the compatibility constant of the adaptively selected sample covariance, and the martingale noise term, is where the naive argument breaks.

Formalization scope

Arms are Fin K (paper arm iii is i.val + 1), coordinates Fin d, times are natural numbers from 111. The model is a structure IsCovariateNoiseModel on a probability space: i.i.d. measurable covariates in a measurable set X\mathcal XX, independent subgaussian noises (Mathlib's HasSubgaussianMGF with parameter σ2\sigma^2σ2), noise independent of covariates. Assumptions 1–4 are separate predicates. ∥x∥∞\|x\|_\infty∥x∥∞​ is Mathlib's sup norm, logarithms are natural, and Σi\Sigma_iΣi​ is the uncentred conditional second moment.

The LASSO minimizer and the arg max need not be unique, so the algorithm takes a selection rule and a tie-breaking rule as parameters, and the theorems hold for all of them. Each round reads only the current covariate, the past covariates, the past arms and their observed rewards. The regret theorem and Proposition 3, whose data set Si,t\mathcal S_{i,t}Si,t​ is chosen by the algorithm, require both rules to be measurable. Otherwise the trajectory would not be a random variable, and the expectations in RTR_TRT​ could be integrals of non-measurable functions, which Lean evaluates to 000 and which would make the goal trivially true. For the same reason every assumption constant is required to be positive, and T≥C5T\ge C_5T≥C5​ is imposed on the horizon. Only the explicit inequality of Theorem 1 is stated, not the trailing O(s02[log⁡T+log⁡d]2)O(s_0^2[\log T+\log d]^2)O(s02​[logT+logd]2) or q0=O(s02log⁡d)q_0=O(s_0^2\log d)q0​=O(s02​logd). Proposition 2 is stated for optimal arms (see its note).

A complete development needs matrix concentration for bounded i.i.d. rows, the Azuma–Hoeffding inequality, and the deterministic LASSO basic inequality under a compatibility condition. Contributions of any of these as standalone lemmas are welcome.

Selected references

  • H. Bastani and M. Bayati, Online Decision Making with High-Dimensional Covariates, Operations Research 68(1):276–294, 2020. https://doi.org/10.1287/opre.2019.1902
  • A. Goldenshluger and A. Zeevi, A Linear Response Bandit Problem, Stochastic Systems 3(1):230–261, 2013. https://doi.org/10.1287/11-SSY032
  • P. Auer, Using Confidence Bounds for Exploitation-Exploration Trade-offs, Journal of Machine Learning Research 3:397–422, 2002. https://www.jmlr.org/papers/v3/auer02a.html
  • P. Bühlmann and S. van de Geer, Statistics for High-Dimensional Data, Springer, 2011. https://doi.org/10.1007/978-3-642-20192-9
9 thms2 active usersReviewed
Machine LearningProbability·Captain: mikedeng1

Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits I: The Regret Bound of ILOVETOCONBANDITSResearch Paper

Motivation

In a contextual bandit problem a learner repeatedly observes a context (a user, a patient, a query), chooses one of KKK actions, and observes the reward of the chosen action only. It competes with the best policy of a fixed class Π\PiΠ of maps from contexts to actions. This is the standard model for news and advertisement recommendation, adaptive clinical assignment and other interactive decision problems in which counterfactual rewards are never observed.

Two requirements pull against each other. Statistically, the optimal regret against a finite class is of order KTln⁡∣Π∣\sqrt{KT\ln|\Pi|}KTln∣Π∣​, attained by the exponential-weights algorithm Exp4 (Auer et al. 2002), whose running time is linear in ∣Π∣|\Pi|∣Π∣ per round. Computationally, practical policy classes are exponentially large and are accessed only through a supervised learning routine. Agarwal, Hsu, Kale, Langford, Li and Schapire (2014) give ILOVETOCONBANDITS, which reaches the optimal regret while touching Π\PiΠ only through an arg-max oracle, and only O~(KT/ln⁡∣Π∣)\tilde O(\sqrt{KT/\ln|\Pi|})O~(KT/ln∣Π∣​) times in TTT rounds.

Timeline. Exp4 (2002) attains O(KTln⁡∣Π∣)O(\sqrt{KT\ln|\Pi|})O(KTln∣Π∣​) against adversarial rewards with running time Ω(∣Π∣)\Omega(|\Pi|)Ω(∣Π∣). Epsilon-greedy and Epoch-Greedy (Langford and Zhang 2007) are oracle-efficient but have regret of order T2/3T^{2/3}T2/3. Exp4.P (Beygelzimer et al. 2011) proves the optimal bound with high probability. RandomizedUCB (Dudík et al. 2011) is the first oracle-based algorithm with optimal regret in the i.i.d. model, but its number of oracle calls is a large polynomial in TTT. ILOVETOCONBANDITS (2014) keeps the regret and reduces the calls to O~(KT/ln⁡(∣Π∣/δ))\tilde O(\sqrt{KT/\ln(|\Pi|/\delta)})O~(KT/ln(∣Π∣/δ)​).

Setting

There are KKK actions, a measurable context space XXX, and a finite nonempty policy class Π\PiΠ of measurable maps X→{0,…,K−1}X\to\{0,\dots,K-1\}X→{0,…,K−1}. A distribution D\mathcal DD on X×[0,1]KX\times[0,1]^KX×[0,1]K generates context/reward-vector pairs (xt,rt)(x_t,r_t)(xt​,rt​), t=1,2,…t=1,2,\dotst=1,2,…, independently. In round ttt the learner sees xtx_txt​, draws an action ata_tat​ with probability pt(at)p_t(a_t)pt​(at​), and observes only rt(at)r_t(a_t)rt​(at​). The history HtH_tHt​ is the list of records (xi,ai,ri(ai),pi(ai))(x_i,a_i,r_i(a_i),p_i(a_i))(xi​,ai​,ri​(ai​),pi​(ai​)), i≤ti\le ti≤t.

The expected reward of a policy is R(π)=E(x,r)∼D[r(π(x))]\mathcal R(\pi)=\mathbb E_{(x,r)\sim\mathcal D}[r(\pi(x))]R(π)=E(x,r)∼D​[r(π(x))], π⋆\pi_\starπ⋆​ is any maximizer over Π\PiΠ, and Reg(π)=R(π⋆)−R(π)\mathrm{Reg}(\pi)=\mathcal R(\pi_\star)-\mathcal R(\pi)Reg(π)=R(π⋆​)−R(π). The regret after TTT rounds is the empirical cumulative quantity ∑t=1T(rt(π⋆(xt))−rt(at))\sum_{t=1}^T\bigl(r_t(\pi_\star(x_t))-r_t(a_t)\bigr)∑t=1T​(rt​(π⋆​(xt​))−rt​(at​)).

The inverse propensity scoring estimate is R^t(π)=1t∑i≤tri(ai)1{π(xi)=ai}/pi(ai)\widehat{\mathcal R}_t(\pi)=\frac1t\sum_{i\le t}r_i(a_i)\mathbb 1\{\pi(x_i)=a_i\}/p_i(a_i)Rt​(π)=t1​∑i≤t​ri​(ai​)1{π(xi​)=ai​}/pi​(ai​), and Reg^t(π)=max⁡π′R^t(π′)−R^t(π)\widehat{\mathrm{Reg}}_t(\pi)=\max_{\pi'}\widehat{\mathcal R}_t(\pi')-\widehat{\mathcal R}_t(\pi)Reg​t​(π)=maxπ′​Rt​(π′)−Rt​(π). For nonnegative weights QQQ on Π\PiΠ with total mass at most one, the smoothed projection is Qμ(a∣x)=(1−Kμ)∑π:π(x)=aQ(π)+μQ^\mu(a\mid x)=(1-K\mu)\sum_{\pi:\pi(x)=a}Q(\pi)+\muQμ(a∣x)=(1−Kμ)∑π:π(x)=a​Q(π)+μ.

ILOVETOCONBANDITS takes an epoch schedule 0=τ0<τ1<⋯0=\tau_0<\tau_1<\cdots0=τ0​<τ1​<⋯ and δ∈(0,1)\delta\in(0,1)δ∈(0,1), sets dt=ln⁡(16t2∣Π∣/δ)d_t=\ln(16t^2|\Pi|/\delta)dt​=ln(16t2∣Π∣/δ) and μm=min⁡{1/(2K),dτm/(Kτm)}\mu_m=\min\{1/(2K),\sqrt{d_{\tau_m}/(K\tau_m)}\}μm​=min{1/(2K),dτm​​/(Kτm​)​}. At the end of epoch mmm (round τm\tau_mτm​) it chooses weights QmQ_mQm​ solving the optimization problem (OP): with bπ=Reg^τm(π)/(100μm)b_\pi=\widehat{\mathrm{Reg}}_{\tau_m}(\pi)/(100\mu_m)bπ​=Reg​τm​​(π)/(100μm​),

∑πQ(π)bπ≤2K,E^x∼Hτm[1/Qμm(π(x)∣x)]≤2K+bπ  ∀π∈Π.\sum_\pi Q(\pi)b_\pi\le2K,\qquad \widehat{\mathbb E}_{x\sim H_{\tau_m}}\bigl[1/Q^{\mu_m}(\pi(x)\mid x)\bigr]\le2K+b_\pi\ \ \forall\pi\in\Pi.π∑​Q(π)bπ​≤2K,Ex∼Hτm​​​[1/Qμm​(π(x)∣x)]≤2K+bπ​  ∀π∈Π.

During epoch m+1m+1m+1 it puts the leftover mass on the empirical maximizer πτm\pi_{\tau_m}πτm​​, obtaining a distribution Q~m\widetilde Q_mQ​m​, and draws at∼Q~mμm(⋅∣xt)a_t\sim\widetilde Q_m^{\mu_m}(\cdot\mid x_t)at​∼Q​mμm​​(⋅∣xt​).

Formalization targets

Goal: Theorem 2 in the explicit form of Lemma 17

Assume τm+1≤2τm\tau_{m+1}\le2\tau_mτm+1​≤2τm​ for m≥1m\ge1m≥1 and let m0=min⁡{m≥1:dτm/τm≤1/(4K)}m_0=\min\{m\ge1:d_{\tau_m}/\tau_m\le1/(4K)\}m0​=min{m≥1:dτm​​/τm​≤1/(4K)}, ρ=sup⁡m≥m0τm/τm−1\rho=\sup_{m\ge m_0}\sqrt{\tau_m/\tau_{m-1}}ρ=supm≥m0​​τm​/τm−1​​, c0=4ρ(1+94.1)c_0=4\rho(1+94.1)c0​=4ρ(1+94.1), C0=400+c0C_0=400+c_0C0​=400+c0​, and m(T)=min⁡{m:T≤τm}m(T)=\min\{m:T\le\tau_m\}m(T)=min{m:T≤τm​}. For every TTT, with probability at least 1−δ1-\delta1−δ,

∑t=1T(rt(π⋆(xt))−rt(at))≤C0(4Kdτm0−1+8Kdτm(T)τm(T))+8Tln⁡(2/δ).\sum_{t=1}^T\bigl(r_t(\pi_\star(x_t))-r_t(a_t)\bigr)\le C_0\Bigl(4Kd_{\tau_{m_0-1}}+\sqrt{8Kd_{\tau_{m(T)}}\tau_{m(T)}}\Bigr)+\sqrt{8T\ln(2/\delta)}.t=1∑T​(rt​(π⋆​(xt​))−rt​(at​))≤C0​(4Kdτm0​−1​​+8Kdτm(T)​​τm(T)​​)+8Tln(2/δ)​.

It holds for every (OP)-solution selection and every tie-breaking rule. Since τm(T)≤2(T−1)\tau_{m(T)}\le2(T-1)τm(T)​≤2(T−1) once τm(T)−1≥1\tau_{m(T)-1}\ge1τm(T)−1​≥1, this is the paper's O(KTln⁡(T∣Π∣/δ)+Kln⁡(T∣Π∣/δ))O\bigl(\sqrt{KT\ln(T|\Pi|/\delta)}+K\ln(T|\Pi|/\delta)\bigr)O(KTln(T∣Π∣/δ)​+Kln(T∣Π∣/δ)).

Milestones

Freedman's inequality (Lemma 9); the uniform deviation of true from empirical variances (Lemma 10); the deviation of the IPS estimates (Lemma 11); on the event E\mathcal EE where both deviations hold, the variance bound (Lemma 12), the two-sided comparison of Reg\mathrm{Reg}Reg and Reg^t\widehat{\mathrm{Reg}}_tReg​t​ (Lemma 13), and the low regret of the sampling distribution (Lemma 14); and the deterministic sums of the μm\mu_mμm​ (Lemmas 15, 16).

Significance

The theorem shows that optimal regret in the i.i.d. contextual bandit problem does not require enumerating the policy class: a sequence of convex feasibility problems, each solvable with few oracle calls (Theorem 3, the companion mission), suffices. The inverse-propensity variance constraint of (OP) and the epoch-and-warm-start structure became the template for later oracle-based methods, and the paper's Online Cover variant is implemented in the Vowpal Wabbit learning system.

The result is proved in the paper; none of it is formalized. The platform holds Exp4 (Bandit Algorithms VIII, adversarial rewards and expert advice) and SquareCB (Foundations of RL II, regression oracles), both different algorithms in different models, and Azuma–Hoeffding (bounded_diff_martingale_two_sided), which the proof of Lemma 17 uses. This mission adds the first inverse-propensity estimator, the first oracle-based policy-class bandit algorithm, and Freedman's inequality with a conditional-variance sum. Several statements are proved in the paper only in outline: Lemma 10 has a proof sketch that defers to Dudík et al. (2011), and the paper asserts Pr⁡(E)≥1−δ/2\Pr(\mathcal E)\ge1-\delta/2Pr(E)≥1−δ/2 without spelling out how the first case of (14) follows from Lemma 11.

Difficulty

The regret of the algorithm depends on the quality of its own data. The estimates R^t\widehat{\mathcal R}_tRt​ have variance governed by the distributions Q~m\widetilde Q_mQ​m​ the algorithm chose earlier, and those distributions were chosen from the estimates. A direct union bound over Π\PiΠ with the worst-case variance 1/μ1/\mu1/μ gives regret of order T2/3T^{2/3}T2/3, the Epoch-Greedy rate. The argument that avoids this must show that a policy with large variance was already known to be bad, and the estimated and true regrets must be compared inductively over epochs with constants that do not grow (θ2≥8ρ\theta_2\ge8\rhoθ2​≥8ρ). The inequality must also hold for every solution of (OP), not a particular one.

The martingale structure requires care: the action of round ttt is drawn from a distribution that depends on the whole past and must not look at rtr_trt​, and Lemma 10 must hold uniformly over all distributions PPP on Π\PiΠ, not just finitely supported ones.

Formalization scope

The formalization commits to the following representation and conventions.

  • Actions are Fin K with 0 < K (NeZero K); Π\PiΠ is a nonempty Finset (X → Fin K) of measurable maps; weights on Π\PiΠ are real functions on its subtype. D\mathcal DD is a probability measure on X × (Fin K → ℝ) with rewards in [0,1][0,1][0,1] almost surely.
  • The run lives on a probability space carrying Zt=(xt,rt)Z_t=(x_t,r_t)Zt​=(xt​,rt​) i.i.d. with law D\mathcal DD and UtU_tUt​ i.i.d. uniform on [0,1][0,1][0,1], independent of the ZZZ's. The action is the inverse distribution function of Q~μ(⋅∣xt)\widetilde Q^{\mu}(\cdot\mid x_t)Q​μ(⋅∣xt​) at UtU_tUt​, so it has the right law and is independent of rtr_trt​ given the past and xtx_txt​. The tie-breaking rule and the (OP)-selection are arbitrary measurable functions of the observable history (a list of records). The selection must return an (OP) solution for every history of length τm\tau_mτm​; such selections exist by Theorem 3.
  • Rounds and epochs are 1,2,…1,2,\dots1,2,… as in the paper; ln⁡\lnln is Real.log.
  • μ0:=1/(2K)\mu_0:=1/(2K)μ0​:=1/(2K). The printed formula is 0/00/00/0 at τ0=0\tau_0=0τ0​=0, and the proofs of Lemmas 12 and 14 use this value.
  • The goal and Lemmas 13–14 assume m0≥2m_0\ge2m0​≥2, i.e. dτ1/τ1>1/(4K)d_{\tau_1}/\tau_1>1/(4K)dτ1​​/τ1​>1/(4K), which holds e.g. for τ1=1\tau_1=1τ1​=1. It replaces the paper's "τ1=O(1)\tau_1=O(1)τ1​=O(1)". It makes dτm0−1d_{\tau_{m_0-1}}dτm0​−1​​ finite and ρ≤2\rho\le\sqrt2ρ≤2​, so ρ\rhoρ is a genuine real supremum.
  • Explicit constants: ψ=100\psi=100ψ=100, θ1=94.1\theta_1=94.1θ1​=94.1, θ2=ψ/6.4\theta_2=\psi/6.4θ2​=ψ/6.4, c0=4ρ(1+θ1)c_0=4\rho(1+\theta_1)c0​=4ρ(1+θ1​), C0=4ψ+c0C_0=4\psi+c_0C0​=4ψ+c0​, 6.46.46.4, 757575, 6.36.36.3, 81.381.381.3, e−2e-2e−2. ρ\rhoρ is not replaced by 2\sqrt22​.
  • Where the paper allows λ=0\lambda=0λ=0 or μm=0\mu_m=0μm​=0 (Lemmas 9–11), the bound is +∞+\infty+∞. These cases are excluded (λ>0\lambda>0λ>0, μm>0\mu_m>0μm​>0) because x/0=0x/0=0x/0=0 in Lean. Lemma 9 adds measurability and integrability of XtX_tXt​ and Xt2X_t^2Xt2​.
  • Probability statements bound the (outer) measure of the failure event by δ\deltaδ.

A statement about "a policy mixture with small regret", about the pseudo-regret ∑tReg\sum_t\mathrm{Reg}∑t​Reg of the chosen policies, about a specially chosen (OP) solution, or about actions that may depend on rtr_trt​ is not Theorem 2; none of these is accepted. With these constants the bound exceeds TTT unless TTT is very large, which is a property of the paper's constants, not of the encoding.

Needed infrastructure: Freedman's inequality for the natural filtration, a uniform-over-distributions concentration argument (the probabilistic method of Dudík et al.), measurability of the algorithm's run, and Azuma–Hoeffding. Freedman's inequality and the IPS estimator are reusable beyond this mission. Proofs of any milestone, and sharper or cleaner restatements proved as separate lemmas, are welcome.

Selected references

  • A. Agarwal, D. Hsu, S. Kale, J. Langford, L. Li, R. E. Schapire, Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits, ICML 2014; arXiv:1402.0555v2. https://arxiv.org/abs/1402.0555
  • P. Auer, N. Cesa-Bianchi, Y. Freund, R. E. Schapire, The nonstochastic multiarmed bandit problem, SIAM J. Comput. 32(1), 2002. https://doi.org/10.1137/S0097539701398375
  • A. Beygelzimer, J. Langford, L. Li, L. Reyzin, R. E. Schapire, Contextual bandit algorithms with supervised learning guarantees, AISTATS 2011. https://arxiv.org/abs/1002.4058
  • M. Dudík, D. Hsu, S. Kale, N. Karampatziakis, J. Langford, L. Reyzin, T. Zhang, Efficient optimal learning for contextual bandits, UAI 2011. https://arxiv.org/abs/1106.2369
  • J. Langford, T. Zhang, The epoch-greedy algorithm for contextual multi-armed bandits, NIPS 2007. https://papers.nips.cc/paper/3178-the-epoch-greedy-algorithm-for-multi-armed-bandits-with-side-information
  • D. A. Freedman, On tail probabilities for martingales, Ann. Probab. 3(1), 1975. https://doi.org/10.1214/aop/1176996452
12 thms2 active usersReviewed
🏆Completed
Machine LearningOperations ResearchProbability·Captain: mikedeng1

Stochastic Linear Optimization under Bandit Feedback 2: A Regret Lower Bound on the CircleResearch Paper

Motivation

In stochastic linear optimization under bandit feedback a learner repeatedly chooses a point xtx_txt​ from a compact decision set D⊂RnD\subset\mathbb R^nD⊂Rn and observes only the random cost ℓt\ell_tℓt​ of that point, whose mean is μ⋅xt\mu\cdot x_tμ⋅xt​ for an unknown vector μ\muμ. The problem models online routing, ad placement and other sequential decisions with linearly structured costs. The quality of a learner is measured by its regret against the best fixed decision.

For the KKK-armed bandit the achievable regret for a fixed instance is logarithmic in the horizon TTT (Lai and Robbins 1985; Auer, Cesa-Bianchi and Fischer 2002). Dani, Hayes and Kakade (COLT 2008) showed that for linear costs the picture depends on the geometry of DDD. Their Theorem 1 gives polylogarithmic regret when the decision set has a positive gap between the best and second-best extreme point (a polytope, for instance), and their Theorem 2 gives O∗(nT)O^*(n\sqrt T)O∗(nT​) regret for every decision set. Their Theorem 3 shows that the second rate cannot be improved in general: on a decision set with zero gap, every algorithm pays Ω(T)\Omega(\sqrt T)Ω(T​) in expectation.

Timeline:

  • 2002: Auer, Using confidence bounds for exploitation–exploration trade-offs (JMLR 3), introduces confidence-bound algorithms for linear bandits on finite decision sets.
  • 2008: Dani, Hayes and Kakade prove the O∗(nT)O^*(n\sqrt T)O∗(nT​) upper bound for ConfidenceBall₂ and the Ω(T)\Omega(\sqrt T)Ω(T​) lower bound on a product of circles, the subject of this mission. A hypercube lower bound for the adversarial setting appears in their NIPS 2007 paper.
  • 2010: Rusmevichientong and Tsitsiklis, Linearly parameterized bandits (Math. OR 35), give Ω(nT)\Omega(n\sqrt T)Ω(nT​) lower bounds on the unit sphere.
  • 2020: Lattimore and Szepesvári, Bandit Algorithms, Theorems 24.1 and 24.2, give minimax lower bounds on the hypercube and the unit ball with Gaussian noise.

Setting

The decision set is the unit circle D2=S1={x∈R2:x12+x22=1}D_2=S^1=\{x\in\mathbb R^2: x_1^2+x_2^2=1\}D2​=S1={x∈R2:x12​+x22​=1}. An unknown mean vector μ∈R2\mu\in\mathbb R^2μ∈R2 is drawn once, uniformly from the circle D2/2D_2/2D2​/2 of radius 1/21/21/2; concretely μ=μ(θ)=12(cos⁡θ,sin⁡θ)\mu=\mu(\theta)=\tfrac12(\cos\theta,\sin\theta)μ=μ(θ)=21​(cosθ,sinθ) with θ\thetaθ uniform on [0,2π)[0,2\pi)[0,2π).

On each round t=1,…,Tt=1,\dots,Tt=1,…,T the algorithm plays xt∈D2x_t\in D_2xt​∈D2​ and observes a cost ℓt∈{−1,+1}\ell_t\in\{-1,+1\}ℓt​∈{−1,+1} with Pr⁡(ℓt=+1)=(1+μ⋅xt)/2\Pr(\ell_t=+1)=(1+\mu\cdot x_t)/2Pr(ℓt​=+1)=(1+μ⋅xt​)/2, so that E[ℓt]=μ⋅xt\mathbb E[\ell_t]=\mu\cdot x_tE[ℓt​]=μ⋅xt​. Given the decision, the cost is independent of the past.

An algorithm may be randomised. It draws a seed sss once from a probability measure ρ\rhoρ on a measurable space SSS, and chooses xtx_txt​ as a function of sss and the costs ℓ1,…,ℓt−1\ell_1,\dots,\ell_{t-1}ℓ1​,…,ℓt−1​ observed so far, measurably in sss.

The regret over TTT rounds is

R=∑t=1T(μ⋅xt−μ⋅x∗),μ⋅x∗=min⁡x∈D2μ⋅x,R=\sum_{t=1}^T(\mu\cdot x_t-\mu\cdot x^*),\qquad \mu\cdot x^*=\min_{x\in D_2}\mu\cdot x,R=t=1∑T​(μ⋅xt​−μ⋅x∗),μ⋅x∗=x∈D2​min​μ⋅x,

so each round costs rt=μ⋅xt+12≥0r_t=\mu\cdot x_t+\tfrac12\ge0rt​=μ⋅xt​+21​≥0 when ∥μ∥=1/2\|\mu\|=1/2∥μ∥=1/2. The expected regret ER=Eμ E(R∣μ)\mathbb E R=\mathbb E_\mu\,\mathbb E(R\mid\mu)ER=Eμ​E(R∣μ) averages over the seed, the prior and the costs.

In the Lean development these objects are unitCircle, meanVec, optCost, RandomizedPolicy and expectedRegret in the namespace StochLinOpt.LowerBound.

Formalization targets

Goal: Theorem 3 for n=2n=2n=2

There is a universal constant c>0c>0c>0 such that for every randomised algorithm and every T≥1T\ge1T≥1,

ER ≥ cT.\mathbb E R\ \ge\ c\sqrt T.ER ≥ cT​.

The constant is left existential, which is the form that survives any later improvement of the constant; it is chosen before the algorithm and before TTT.

Milestones

  1. Section 6.1, Eq. (3). For ∥μ1∥=∥μ2∥=1/2\|\mu_1\|=\|\mu_2\|=1/2∥μ1​∥=∥μ2​∥=1/2, x∈S1x\in S^1x∈S1, a posterior probability p∈[0,1]p\in[0,1]p∈[0,1] of μ=μ1\mu=\mu_1μ=μ1​ and a cost ℓ∈{±1}\ell\in\{\pm1\}ℓ∈{±1}, the Bayes-updated bias bt+1b_{t+1}bt+1​ satisfies ∣bt+1−bt∣≤∣(μ1−μ2)⋅x∣|b_{t+1}-b_t|\le|(\mu_1-\mu_2)\cdot x|∣bt+1​−bt​∣≤∣(μ1​−μ2​)⋅x∣, where bt=2p−1b_t=2p-1bt​=2p−1.
  2. Lemma 15. With ε=∥μ1−μ2∥>0\varepsilon=\|\mu_1-\mu_2\|>0ε=∥μ1​−μ2​∥>0 and the same data,
Eμ(rt∣Ht)≥116(ε2+∣bt+1−bt∣2ε2)1{∣bt∣≤1/2}.\mathbb E_\mu(r_t\mid\mathcal H_t)\ge\frac1{16}\Big(\varepsilon^2+\frac{|b_{t+1}-b_t|^2}{\varepsilon^2}\Big)\mathbf 1\{|b_t|\le1/2\}.Eμ​(rt​∣Ht​)≥161​(ε2+ε2∣bt+1​−bt​∣2​)1{∣bt​∣≤1/2}.
  1. Theorem 4 (Freedman). For a martingale difference sequence X1,…,XTX_1,\dots,X_TX1​,…,XT​ bounded above by bbb, with conditional variance sum VVV, and all a,v>0a,v>0a,v>0,
Pr⁡(∑iXi≥a, V≤v)≤exp⁡(−a22v+2ab/3).\Pr\Big(\sum_i X_i\ge a,\ V\le v\Big)\le\exp\Big(\frac{-a^2}{2v+2ab/3}\Big).Pr(i∑​Xi​≥a, V≤v)≤exp(2v+2ab/3−a2​).

Significance

The lower bound shows that the T\sqrt TT​ dependence of the problem-independent upper bound (Theorem 2 of the same paper) is necessary. It also shows that the gap-dependent polylogarithmic rate of Theorem 1 cannot extend to decision sets without a gap, such as the sphere. Together with the upper bound it characterises the minimax regret of stochastic linear bandits in TTT up to logarithmic factors, and in the paper's general-nnn form it also underlies the claim that the price of bandit information is Θ∗(n)\Theta^*(\sqrt n)Θ∗(n​).

The result is proved in the paper for n=2n=2n=2 and has not been machine-checked. The mission produces a checked Bayesian lower bound over all randomised algorithms, with an explicit probability model for the protocol. Two related platform results are different theorems: BanditAlgorithm.linear_bandit_unit_ball_minimax_lower_bound (Lattimore–Szepesvári Theorem 24.2: unit ball, Gaussian noise, a worst-case μ\muμ) and BanditAlgorithm.linear_bandit_hypercube_minimax_lower_bound (Theorem 24.1: hypercube). The {−1,+1}\{-1,+1\}{−1,+1} costs, the circle and the uniform prior used here are not covered by either.

Difficulty

The obvious attempt is a two-point change-of-measure argument with a fixed pair of means at distance ε\varepsilonε. It fails as stated because the decision set has no gap: an algorithm that plays close to the optimum of both candidates learns slowly but also pays little. The per-round trade-off between regret and information (Lemma 15) is exact only while the posterior is undecided, ∣bt∣≤1/2|b_t|\le1/2∣bt​∣≤1/2. Turning it into a bound on the whole horizon requires controlling how long the posterior stays undecided, which is a statement about a martingale whose step sizes are chosen by the algorithm; a concentration bound that ignores the accumulated conditional variance (Azuma–Hoeffding with worst-case steps) is too weak for this. The averaging step from a two-point prior to the uniform prior on the circle is also part of the formal work.

Formalization scope

Vectors are Fin 2 → ℝ with the dot product ⬝ᵥ; Euclidean norms are written through dot products, never with Lean's sup norm. Rounds are 0-indexed internally: the Lean index ttt is the paper's round t+1t+1t+1. The expected regret is the exact finite expectation

ER=∫S12π∫02π∑ℓ∈{±1}T∏t=1T1+ℓt μ(θ)⋅xt2  R  dθ dρ(s),\mathbb E R=\int_S\frac1{2\pi}\int_0^{2\pi}\sum_{\ell\in\{\pm1\}^T}\prod_{t=1}^T\frac{1+\ell_t\,\mu(\theta)\cdot x_t}{2}\;R\;d\theta\,d\rho(s),ER=∫S​2π1​∫02π​ℓ∈{±1}T∑​t=1∏T​21+ℓt​μ(θ)⋅xt​​Rdθdρ(s),

so no infinite product of measures is needed. A randomised algorithm is a seeded policy, which covers every randomised algorithm. The optimal cost is the infimum of μ⋅x\mu\cdot xμ⋅x over the compact circle and is attained. Every junk value in the model (a non-integrable integrand) could only make the lower bound harder to prove, never easier.

A statement over deterministic algorithms only, over a worst-case μ\muμ instead of the uniform prior, or with the constant allowed to depend on the algorithm or on TTT would be a weaker theorem. The goal quantifies ∃c>0\exists c>0∃c>0 before the algorithm and TTT, and fixes the prior.

Corrections relative to the printed paper:

  • General nnn is not stated. Theorem 3 as printed claims ER≥110nT\mathbb E R\ge\frac1{10}n\sqrt TER≥101​nT​ for every even nnn. It is false for n>10n>10n>10: on DnD_nDn​ with μ∈Dn/n\mu\in D_n/nμ∈Dn​/n each round has regret at most 111, so at T=1T=1T=1 the claim would need ER≥n/10>1\mathbb E R\ge n/10>1ER≥n/10>1. The general case rests on Lemma 16, which has no proof. The goal is the n=2n=2n=2 case, which Section 6.1 proves.
  • The constant. For n=2n=2n=2 the paper prints 15T\frac15\sqrt T51​T​; its proof gives c=116min⁡(12−1e,164)=11024c=\frac1{16}\min(\frac12-\frac1e,\frac1{64})=\frac1{1024}c=161​min(21​−e1​,641​)=10241​. The proof's Freedman step prints 2exp⁡(−1/41/8+ε/3)≤2/e22\exp(-\frac{1/4}{1/8+\varepsilon/3})\le 2/e^22exp(−1/8+ε/31/4​)≤2/e2; with v=1/32v=1/32v=1/32 the denominator is 1/16+ε/31/16+\varepsilon/31/16+ε/3, and the bound 2/e22/e^22/e2 then needs ε=T−1/4≤3/16\varepsilon=T^{-1/4}\le3/16ε=T−1/4≤3/16. Small TTT is covered by the first round, whose expected regret is 1/21/21/2. The goal leaves ccc existential.
  • Theorem 4. The printed variance sum runs to nnn; it runs to TTT. The conditioning is on a general filtration, and square-integrability of the steps is assumed so that the conditional variance is defined.
  • Lemma 15. Its right side depends on the round-ttt cost ℓt\ell_tℓt​, which is not part of Ht\mathcal H_tHt​; the Lean statement holds for either value of ℓt\ell_tℓt​.

Welcome contributions: a Lean proof of Freedman's inequality (reusable across the bandit and concentration missions on the platform); the averaging argument from two-point priors to the uniform prior; and the stopped-martingale bookkeeping for the bias sequence.

Selected references

  • Varsha Dani, Thomas P. Hayes, Sham M. Kakade, Stochastic Linear Optimization under Bandit Feedback, Proceedings of the 21st Annual Conference on Learning Theory (COLT), 2008.
  • David A. Freedman, On tail probabilities for martingales, The Annals of Probability 3(1):100–118, 1975. https://doi.org/10.1214/aop/1176996452
  • Colin McDiarmid, Concentration, in Probabilistic Methods for Algorithmic Discrete Mathematics, Springer, 1998. https://doi.org/10.1007/978-3-662-12788-9_6
  • Peter Auer, Using confidence bounds for exploitation–exploration trade-offs, JMLR 3:397–422, 2002. https://www.jmlr.org/papers/v3/auer02a.html
  • Paat Rusmevichientong, John N. Tsitsiklis, Linearly parameterized bandits, Mathematics of Operations Research 35(2):395–411, 2010. https://doi.org/10.1287/moor.1100.0446
  • Tor Lattimore, Csaba Szepesvári, Bandit Algorithms, Cambridge University Press, 2020, Chapter 24. https://doi.org/10.1017/9781108571401
5 thms2 active usersReviewed
🏆Completed
Machine LearningReinforcement LearningStatistics·Captain: mikedeng1

Foundations of Reinforcement Learning II: Contextual Bandits and Inverse Gap WeightingTextbook

Motivation

Decision-making problems rarely present the same fixed choice twice. A doctor prescribing a treatment sees each patient's medical history and symptoms before deciding; a website choosing which article to show sees the visitor's profile first. The multi-armed bandit model — where the learner repeatedly picks from a fixed set of arms with no side information — cannot express this: it is blind to the covariates that any real decision-maker actually observes. The contextual bandit model closes this gap by letting the learner see a context before acting, and asks for a decision rule that generalizes across contexts rather than memorizing a policy per context. Foster and Rakhlin's Foundations of Reinforcement Learning and Interactive Decision Making (arXiv:2312.16730v1, Section 3, pp. 38–53) develops this model and its algorithms as the bridge between supervised learning and sequential decision making, en route to general reinforcement learning. Contextual bandits with a learned reward-function class underlie production systems for content recommendation, online advertising, and adaptive clinical trial design (Li et al., A Contextual-Bandit Approach to Personalized News Article Recommendation, 2010, https://arxiv.org/abs/1003.0146; Agarwal et al., Making Contextual Decisions with Low Technical Debt, 2016, https://arxiv.org/abs/1606.03966).

The algorithmic history in this chapter runs through two distinct principles. The optimism principle (LinUCB, Section 3.2) generalizes the UCB algorithm to contexts under a linear reward model, but the chapter's own Example 3.1 (Section 3.3) shows optimism fails outside such structured classes, incurring regret linear in the size of the context space or the class. Foster and Rakhlin then present two "black-box" alternatives that use any function class FFF through an abstract regression subroutine: the naive ε\varepsilonε-Greedy method (Section 3.4), and the Inverse Gap Weighting (IGW) strategy underlying the SquareCB algorithm (Bietti, Agarwal & Langford, A Contextual Bandit Bake-off, 2018, https://arxiv.org/abs/1802.04064; Foster & Rakhlin, Beyond UCB: Optimal and Efficient Contextual Bandits with Regression Oracles, 2020, https://arxiv.org/abs/2002.04926). SquareCB attains a regret rate that both generalizes across contexts (no dependence on the size of the context space) and matches the optimal T\sqrt{T}T​ rate — improving on ε\varepsilonε-Greedy's T2/3T^{2/3}T2/3 rate — while remaining agnostic to the internal structure of FFF.

Setting

Over TTT rounds, a decision-maker faces the contextual bandit protocol: at each round ttt, it observes a context xt∈Xx_t \in Xxt​∈X, selects a decision πt\pi_tπt​ from a finite action set Π={1,…,A}\Pi = \{1,\dots,A\}Π={1,…,A}, and observes a reward rt∈Rr_t \in \mathbb{R}rt​∈R. Rewards are generated independently as rt∼M⋆(⋅∣xt,πt)r_t \sim M^\star(\cdot \mid x_t, \pi_t)rt​∼M⋆(⋅∣xt​,πt​) for a fixed, unknown conditional model M⋆M^\starM⋆; write f⋆(x,π):=E[r∣x,π]f^\star(x,\pi) := \mathbb{E}[r \mid x, \pi]f⋆(x,π):=E[r∣x,π] for the mean reward function and π⋆(x):=arg⁡max⁡πf⋆(x,π)\pi^\star(x) := \arg\max_\pi f^\star(x,\pi)π⋆(x):=argmaxπ​f⋆(x,π) for the optimal, context-dependent policy. The context sequence x1,…,xTx_1,\dots,x_Tx1​,…,xT​ is arbitrary — fixed in advance or adversarially chosen — while rewards remain stochastic. Performance is measured by regret against π⋆\pi^\starπ⋆:

Reg:=∑t=1Tf⋆(xt,π⋆(xt))−∑t=1TEπt∼pt[f⋆(xt,πt)],\mathrm{Reg} := \sum_{t=1}^T f^\star(x_t,\pi^\star(x_t)) - \sum_{t=1}^T \mathbb{E}_{\pi_t\sim p_t}[f^\star(x_t,\pi_t)],Reg:=t=1∑T​f⋆(xt​,π⋆(xt​))−t=1∑T​Eπt​∼pt​​[f⋆(xt​,πt​)],

where ptp_tpt​ is the learner's (possibly randomized) action distribution at round ttt.

To generalize across contexts, the learner is given a class F⊆{f:X×Π→R}F \subseteq \{f : X\times\Pi \to \mathbb{R}\}F⊆{f:X×Π→R} with f⋆∈Ff^\star \in Ff⋆∈F, and aims for regret scaling with the statistical complexity log⁡∣F∣\log|F|log∣F∣ rather than with ∣X∣|X|∣X∣. Both algorithms in this mission access FFF only through an online regression oracle (Definition 3, p. 47): given the history (x1,π1,r1),…,(xt−1,πt−1,rt−1)(x_1,\pi_1,r_1),\dots,(x_{t-1},\pi_{t-1},r_{t-1})(x1​,π1​,r1​),…,(xt−1​,πt−1​,rt−1​), it returns an estimate f^t:X×Π→R\hat f_t : X\times\Pi\to\mathbb{R}f^​t​:X×Π→R satisfying, with probability at least 1−δ1-\delta1−δ, ∑t=1TEπt∼pt[(f^t(xt,πt)−f⋆(xt,πt))2]≤EstSq(F,T,δ)\sum_{t=1}^T \mathbb{E}_{\pi_t\sim p_t}[(\hat f_t(x_t,\pi_t)-f^\star(x_t,\pi_t))^2] \le \mathrm{EstSq}(F,T,\delta)∑t=1T​Eπt​∼pt​​[(f^​t​(xt​,πt​)−f⋆(xt​,πt​))2]≤EstSq(F,T,δ) — for instance, exponential weights on a finite class FFF achieves EstSq(F,T,δ)=log⁡(∣F∣/δ)\mathrm{EstSq}(F,T,\delta) = \log(|F|/\delta)EstSq(F,T,δ)=log(∣F∣/δ). SquareCB (p. 50–51) then samples its action from the Inverse Gap Weighting distribution (Definition 4, p. 50): given a vector of estimated values f^∈RA\hat f \in \mathbb{R}^Af^​∈RA with greedy action πˉ=arg⁡max⁡πf^(π)\bar\pi = \arg\max_\pi \hat f(\pi)πˉ=argmaxπ​f^​(π), and an exploration parameter γ≥0\gamma \ge 0γ≥0, p=IGWγ(f^)p = \mathrm{IGW}_\gamma(\hat f)p=IGWγ​(f^​) is p(π)=1/(λ+2γ(f^(πˉ)−f^(π)))p(\pi) = 1/(\lambda + 2\gamma(\hat f(\bar\pi)-\hat f(\pi)))p(π)=1/(λ+2γ(f^​(πˉ)−f^​(π))) for the unique λ∈[1,A]\lambda \in [1,A]λ∈[1,A] making ppp a probability distribution.

Formalization targets

Milestone — Proposition 9 (IGW estimation-to-regret inequality)

Eπ∼p[f⋆(π⋆)−f⋆(π)]≤Aγ+γ⋅Eπ∼p[(f^(π)−f⋆(π))2],p=IGWγ(f^).\mathbb{E}_{\pi\sim p}[f^\star(\pi^\star)-f^\star(\pi)] \le \frac{A}{\gamma} + \gamma\cdot\mathbb{E}_{\pi\sim p}[(\hat f(\pi)-f^\star(\pi))^2], \qquad p = \mathrm{IGW}_\gamma(\hat f).Eπ∼p​[f⋆(π⋆)−f⋆(π)]≤γA​+γ⋅Eπ∼p​[(f^​(π)−f⋆(π))2],p=IGWγ​(f^​).

This holds for any f^,f⋆∈RA\hat f, f^\star \in \mathbb{R}^Af^​,f⋆∈RA and any γ>0\gamma>0γ>0, with no reference to FFF or to how f^\hat ff^​ was produced — it is the purely algebraic core the goal theorem invokes at every round.

Goal — Proposition 10 (SquareCB regret bound)

Reg≤2A T EstSq(F,T,δ)\mathrm{Reg} \le 2\sqrt{A\,T\,\mathrm{EstSq}(F,T,\delta)}Reg≤2ATEstSq(F,T,δ)​

with probability at least 1−δ1-\delta1−δ, for SquareCB run with γ=TA/EstSq(F,T,δ)\gamma = \sqrt{TA/\mathrm{EstSq}(F,T,\delta)}γ=TA/EstSq(F,T,δ)​, for any context sequence x1,…,xTx_1,\dots,x_Tx1​,…,xT​. This is the weakest stable target level in the chapter's oracle-based development: it is stated for an arbitrary class FFF and oracle, so it survives any future improvement to the oracle's own EstSq\mathrm{EstSq}EstSq bound, unlike a version hard-coded to a specific class or oracle.

Significance

Proposition 10 shows that Inverse Gap Weighting converts any estimation-error guarantee into a regret guarantee with the same statistical rate, with no algorithm-side dependence on the structure of FFF or the size of XXX: the same SquareCB template, driven by a plug-in regression oracle, is minimax optimal whenever the oracle itself is. When FFF is finite, this yields Reg≲ATlog⁡(∣F∣/δ)\mathrm{Reg} \lesssim \sqrt{AT\log(|F|/\delta)}Reg≲ATlog(∣F∣/δ)​, matching the optimal rate for stochastic multi-armed bandits (Section 2) while generalizing across contexts — a guarantee that optimism (Proposition 7) provably cannot deliver outside linear classes (Example 3.1), and that the simpler ε\varepsilonε-Greedy baseline (Proposition 8) only delivers at a slower T2/3T^{2/3}T2/3 rate. Foster and Rakhlin describe Proposition 9 itself as being "at the core of the development for the rest of the course": the same IGW mechanism reappears, generalized, in the book's treatment of general decision-making and the Decision-Estimation Coefficient.

Both propositions are proved results, not open questions; this mission's contribution is a machine-checked formalization of their exact statements and hypotheses — the precise OracleGuarantee hypothesis Proposition 10 requires, the exact constant (222, not a bare ≲\lesssim≲) its proof yields at the stated optimal γ\gammaγ, and the universally-quantified form of the IGW inequality (Proposition 9) that makes it reusable independently of any particular oracle or class.

Difficulty

The obvious first idea for exploiting an estimator f^t\hat f_tf^​t​ is a UCB-style optimism approach: build a confidence set around f^t\hat f_tf^​t​ and act greedily on its upper envelope, as in LinUCB (Proposition 7). Example 3.1 shows this fails in general: a class FFF can force the confidence set to remain wide on a fresh action at every new context, driving regret linear in min⁡{∣F∣,∣X∣}\min\{|F|,|X|\}min{∣F∣,∣X∣} — the confidence width in the regret bound does not shrink merely because the oracle's cumulative estimation error is small, since that error is not localized to the specific action the confidence-set approach tries next. Uniform exploration (ε\varepsilonε-Greedy) sidesteps this but wastes exploration budget on actions already known to be far from optimal, which is what caps its rate at T2/3T^{2/3}T2/3 (Proposition 8). Inverse Gap Weighting instead ties the sampling probability itself to the estimated gap from the greedy action, so cheap-to-rule-out actions are down-weighted continuously rather than either fully explored (ε-Greedy) or trusted outright (optimism); the technical content of Proposition 9 is showing this specific reciprocal-gap form gives a bound with no hidden dependence on FFF or XXX, for every pair (f^,f⋆)(\hat f, f^\star)(f^​,f⋆) simultaneously — a guarantee optimism cannot match because its confidence sets are class-dependent by construction.

Formalization scope

Contexts form an arbitrary type X; actions are Fin A for A : ℕ. A finite probability distribution over Fin A is represented directly as p : Fin A → ℝ with ∀ π, 0 ≤ p π and ∑ π, p π = 1, and Eπ∼p[g]\mathbb{E}_{\pi\sim p}[g]Eπ∼p​[g] as the finite sum ∑ π, p π * g π, rather than via Mathlib's PMF (which is ℝ≥0∞-valued) — an equivalent and lighter-weight representation of a distribution on a finite type. The normalizing constant λ\lambdaλ of Definition 4 and the optimal actions π⋆\pi^\starπ⋆, πˉ\bar\piπˉ are each specified by their defining property (existence of λ∈[1,A]\lambda \in [1,A]λ∈[1,A] realizing the IGW formula; ∀π,f(π)≤f(argmax)\forall\pi, f(\pi)\le f(\text{argmax})∀π,f(π)≤f(argmax)) rather than constructed explicitly via an intermediate-value or Finset.argmax argument, avoiding committing to one choice function for a value the book itself leaves implicit. The class FFF enters neither proposition's statement directly: it appears in the source only through the abstract bound EstSq(F,T,δ)\mathrm{EstSq}(F,T,\delta)EstSq(F,T,δ), which is carried as an explicit real-valued parameter and hypothesis (OracleGuarantee) rather than as a literal subset of a function space, since no property of FFF beyond producing this bound is ever used. The probability-(1−δ)(1-\delta)(1−δ) qualifier attached to the online regression oracle's guarantee is likewise the explicit hypothesis OracleGuarantee ... EstSq on a fixed realized run, rather than a statement quantified over an underlying probability space of histories — every subsequent step in both propositions' proofs is deterministic given that this event holds, so this does not weaken either conclusion. A trivializing formalization would fix A=1A=1A=1 (a single ever-optimal action, making both Reg and the IGW inequality vacuous) or take EstSq as an unconstrained free variable with no positivity hypothesis (making γ\gammaγ in Proposition 10 undefined); this mission's statements require 0 < EstSq and leave AAA, TTT, XXX, FFF-via-EstSq fully general.

This mission omits Proposition 7 (LinUCB): its proof rests on an entirely disjoint apparatus (finite linear parameter sets, least-squares confidence sets, the elliptic potential lemma) that neither Proposition 9 nor 10 requires, and Example 3.1 (the failure of optimism) is a worked example rather than a numbered, formalizable claim. It also omits Proposition 8 (ε\varepsilonε-Greedy): the source leaves the optimal ε\varepsilonε unspecified ("choosing ε\varepsilonε appropriately"), and deriving its own optimal value and matching constant independently — rather than reusing the book's own explicit constant, as Rule 7 of this formalization effort requires — was judged too likely to introduce an unfaithful, invented constant within this mission's time budget; both are natural extensions for a follow-up mission or contribution. Reusable infrastructure: the Fin A-indexed finite-distribution convention and the OracleGuarantee/optimal-action-by-property pattern extend directly to any later chapter built on the same online-regression-oracle abstraction.

Selected references

  • Foster, D. J. and Rakhlin, A. Foundations of Reinforcement Learning and Interactive Decision Making. 2023. https://arxiv.org/abs/2312.16730
  • Foster, D. J. and Rakhlin, A. Beyond UCB: Optimal and Efficient Contextual Bandits with Regression Oracles. ICML 2020. https://arxiv.org/abs/2002.04926
  • Bietti, A., Agarwal, A., and Langford, J. A Contextual Bandit Bake-off. JMLR 2021 (arXiv 2018). https://arxiv.org/abs/1802.04064
  • Li, L., Chu, W., Langford, J., and Schapire, R. E. A Contextual-Bandit Approach to Personalized News Article Recommendation. WWW 2010. https://arxiv.org/abs/1003.0146
  • Agarwal, A. et al. Making Contextual Decisions with Low Technical Debt. 2016. https://arxiv.org/abs/1606.03966
5 thms2 active usersReviewed
🏆Completed
Machine LearningReinforcement Learning·Captain: mikedeng1

Foundations of Reinforcement Learning I: Multi-Armed Bandits and the UCB AlgorithmTextbook

Motivation

The multi-armed bandit is the simplest model of sequential decision-making under partial feedback: a learner repeatedly picks one of finitely many options and observes a reward only for the option chosen, never for the alternatives. It formalizes problems ranging from clinical trial design (which treatment to offer a patient) to online advertising (which ad to show) and A/B testing more generally. The framework dates to Robbins' 1952 paper on sequential design, and the algorithm this mission's goal theorem concerns — the Upper Confidence Bound (UCB) algorithm of Lai and Robbins [1985] and Auer, Cesa-Bianchi and Fischer [2002] — is the canonical answer to how to explore efficiently: instead of exploring uniformly at random, act optimistically with respect to the current uncertainty about each option's value. This mission draws its formalization from Chapter 2 of Foster and Rakhlin's 2023 lecture notes, Foundations of Reinforcement Learning and Interactive Decision Making, which develops the bandit problem as the first rung of a ladder of increasingly general interactive decision-making settings (contextual bandits, structured bandits, reinforcement learning) that the book's later chapters build.

Setting

Fix a finite decision (action) space Π={1,…,A}\Pi = \{1,\dots,A\}Π={1,…,A}. In the multi-armed bandit protocol, for each round t=1,…,Tt = 1,\dots,Tt=1,…,T the learner selects a decision πt∈Π\pi_t \in \Piπt​∈Π, possibly at random according to a distribution ptp_tpt​ depending on the history Ht−1=((π1,r1),…,(πt−1,rt−1))H_{t-1} = ((\pi_1,r_1),\dots,(\pi_{t-1},r_{t-1}))Ht−1​=((π1​,r1​),…,(πt−1​,rt−1​)) observed so far, and then observes a reward rt∈Rr_t \in \mathbb{R}rt​∈R drawn independently from a fixed conditional distribution M⋆(⋅∣πt)M^\star(\cdot \mid \pi_t)M⋆(⋅∣πt​) (the stochastic rewards assumption). Writing f⋆(π):=E[r∣π]f^\star(\pi) := \mathbb{E}[r \mid \pi]f⋆(π):=E[r∣π] for the mean reward function and π⋆:=arg⁡max⁡πf⋆(π)\pi^\star := \arg\max_\pi f^\star(\pi)π⋆:=argmaxπ​f⋆(π) for an optimal decision, the learner's performance is measured by the regret

Reg:=∑t=1Tf⋆(π⋆)−∑t=1TEπt∼pt[f⋆(πt)].\mathrm{Reg} := \sum_{t=1}^T f^\star(\pi^\star) - \sum_{t=1}^T \mathbb{E}_{\pi_t \sim p_t}[f^\star(\pi_t)].Reg:=t=1∑T​f⋆(π⋆)−t=1∑T​Eπt​∼pt​​[f⋆(πt​)].

Because the learner observes a reward only for the action played (bandit feedback), a purely greedy strategy that always plays the current empirical maximizer can commit to a suboptimal action forever, incurring linear regret; some form of deliberate exploration is necessary. The chapter's central construction is the confidence interval: a pair of functions f‾t,fˉt:Π→R\underline{f}_t, \bar f_t : \Pi \to \mathbb{R}f​t​,fˉ​t​:Π→R such that, with probability at least 1−δ1-\delta1−δ, f⋆(π)∈[f‾t(π),fˉt(π)]f^\star(\pi) \in [\underline{f}_t(\pi), \bar f_t(\pi)]f⋆(π)∈[f​t​(π),fˉ​t​(π)] for every round ttt and decision π\piπ simultaneously. The UCB algorithm plays the optimistic action πt=arg⁡max⁡πfˉt(π)\pi_t = \arg\max_\pi \bar f_t(\pi)πt​=argmaxπ​fˉ​t​(π) at every round, using the confidence interval built from Hoeffding's inequality around the empirical mean f^t(π)\hat f_t(\pi)f^​t​(π).

Formalization targets

Goal — Proposition 5 (UCB regret)

Reg  ≲  ATlog⁡(AT/δ)\mathrm{Reg} \;\lesssim\; \sqrt{AT\log(AT/\delta)}Reg≲ATlog(AT/δ)​

holding with probability at least 1−δ1-\delta1−δ, for the UCB algorithm using the confidence radius 2log⁡(2T2A/δ)/nt(π)\sqrt{2\log(2T^2A/\delta)/n_t(\pi)}2log(2T2A/δ)/nt​(π)​ of Eq. (2.19). This is the weakest stable statement the chapter proves: it is optimal up to the log factor, and strengthening it (e.g. to the sharper instance-dependent bound of Remark 10) is explicitly left to later work by the book itself.

Milestones

  • Proposition 4 (ε-Greedy regret): Reg≲A1/3T2/3log⁡1/3(AT/δ)\mathrm{Reg} \lesssim A^{1/3}T^{2/3}\log^{1/3}(AT/\delta)Reg≲A1/3T2/3log1/3(AT/δ) — the book's preceding, weaker result, establishing that naive forced exploration already gives sublinear regret, and motivating why an adaptive strategy (UCB) does better.
  • Lemma 7 (Optimism): the per-round regret of the optimistic action is bounded by the confidence width at that action.
  • Lemma 8 (Confidence width potential lemma): ∑t=1T(1/nt(πt)∧1)≲AT\sum_{t=1}^T (1/\sqrt{n_t(\pi_t)} \wedge 1) \lesssim \sqrt{AT}∑t=1T​(1/nt​(πt​)​∧1)≲AT​, a pigeonhole bound on how often any one action's confidence interval can still be wide.

Significance

UCB is the prototype of the "optimism in the face of uncertainty" principle that recurs, in increasingly abstract form, throughout the rest of the book: the same two-step argument (Lemma 7 + Lemma 8) reappears for linear bandits, structured bandits via the Decision-Estimation Coefficient, and UCB-VI for tabular reinforcement learning. Formalizing Chapter 2 in full therefore front-loads the proof pattern every later chapter in this series specializes. The result itself is also of standalone interest: the AT\sqrt{AT}AT​ minimax rate is the benchmark every subsequent bandit algorithm in the literature is compared against, and the A1/3T2/3A^{1/3}T^{2/3}A1/3T2/3-vs-AT\sqrt{AT}AT​ contrast between ε-Greedy and UCB is the standard illustration, in any course on the subject, of why adaptive exploration matters.

No formalization of this exact statement — realizability with respect to a function class f⋆∈F=RΠf^\star \in \mathcal{F} = \mathbb{R}^\Pif⋆∈F=RΠ and a generic confidence interval, rather than a per-arm sub-Gaussian empirical mean — currently exists on the platform (see Formalization scope below); the mission both proves this specific regret bound and seeds the generic optimism/potential lemma pair (Lemma 7, Lemma 8) that the book's later, more structured settings specialize.

Difficulty

The natural first attempt — bound the regret of the empirical-mean-greedy algorithm directly — fails outright: on a two-armed instance where one arm is deterministic and the other only slightly better in expectation, the greedy algorithm can commit to the worse arm forever with constant probability, giving linear, not sublinear, regret (§2.1). The obvious fix, ε-Greedy, forces exploration uniformly across all actions regardless of how much is already known about each, so the exploration cost scales with εT\varepsilon TεT even for actions whose value is already well determined — this is exactly what caps ε-Greedy at the T2/3T^{2/3}T2/3 rate. UCB's optimism principle resolves this by exploring an action only in proportion to how uncertain it still is; the technical core, isolated in Lemma 7 and Lemma 8, is disentangling "the algorithm made a mistake" from "the algorithm is still uncertain," which are conflated in the naive per-round regret decomposition used for ε-Greedy.

Formalization scope

Both the goal and the milestones fix a finite decision space Fin A, a mean reward function fStar : Fin A → ℝ with fStar π ∈ [0,1], and an optimal decision piStar. Regret is defined generically (Eq. (2.3)) via per-round decision weights p : ℕ → Fin A → ℝ, so it applies uniformly to a randomized algorithm (ε-Greedy) and a deterministic one (UCB, via the point mass at the played action). The book's "with probability at least 1−δ1-\delta1−δ" qualifier on both Proposition 4 and Proposition 5 is formalized as the deterministic consequence of the underlying concentration event (Eq. (2.9) and Eq. (2.18) respectively) holding — exactly the move the book's own proofs make ("Let us condition on the event in (2.18) ... "). The concentration events themselves rest on Hoeffding's inequality for adaptive stopping times (Lemma 33) and Bernstein's inequality (Lemma 5), both stated in the book's technical appendix outside this chapter, and are not drafted here; a solver may either take them as a hypothesis (as this mission's statements do) or import/prove them separately. A trivializing formalization is ruled out explicitly: taking δ outside (0,1)(0,1)(0,1), or dropping the fStar π ∈ [0,1] hypothesis, would make the stated constants vacuous or false, so both are retained as explicit hypotheses in every theorem. In every ≲ statement (Prop. 4, Lemma 8, Prop. 5) the witnessed constant C is quantified before the instance parameters (A, T, δ, and the realized sequences): ∃ C, 0 < C ∧ ∀ A T δ ..., Reg ≤ C * (rate), not the other order. This is deliberate, not stylistic: quantifying C after the instance lets it depend on A, T, δ, making the bound satisfiable by an arbitrarily large C chosen per instance and hence content-free, which is not what the book's ≲ means (a single constant working uniformly over all instances). Proposition 5's UCB decision rule is stated in the book's own two clauses, not collapsed into a single "maximize the upper confidence bound" rule: the confidence radius of Eq. (2.19) is +∞+\infty+∞ at nt(π)=0n_t(\pi)=0nt​(π)=0 (an action never yet sampled), so the book's UCB always plays an unsampled action before ever comparing indices, and only compares finite upper confidence bounds once every action has been sampled at least once; the confidence event of Eq. (2.18) is correspondingly assumed only at sampled actions, since the book's own bound is vacuous otherwise. An earlier draft instead capped the radius at 111 when nt(π)=0n_t(\pi)=0nt​(π)=0, which is a true statement about a different algorithm (a sampled action can have index above the capped unsampled index), and was corrected to the book's own rule after moderation. Reuse from the platform's existing bandit library (BanditAlgorithm, Lattimore & Szepesvári) is deliberately avoided: that library's UCB (bandit_ucb_regret_bound, bandit_ucb_minimax_regret_bound) is stated for per-arm 1-sub-Gaussian rewards with δ=1/n2\delta = 1/n^2δ=1/n2 fixed by the horizon, whereas this chapter's UCB is stated for a free failure probability δ\deltaδ and a generic confidence-interval abstraction (the multi-armed case being F=RΠ\mathcal{F} = \mathbb{R}^\PiF=RΠ of the book's general realizability framework) — the two are related but not the same statement. Contributions extending the mission with the generic confidence-interval form of Lemma 7/8 applied to other chapters in this series (contextual and structured bandits) are welcome.

Selected references

  • T. Lai and H. Robbins, Asymptotically Efficient Adaptive Allocation Rules, Advances in Applied Mathematics, 1985.
  • P. Auer, N. Cesa-Bianchi, and P. Fischer, Finite-time Analysis of the Multiarmed Bandit Problem, Machine Learning, 2002.
  • D. Foster and A. Rakhlin, Foundations of Reinforcement Learning and Interactive Decision Making, arXiv:2312.16730, 2023. https://arxiv.org/abs/2312.16730
  • T. Lattimore and C. Szepesvári, Bandit Algorithms, Cambridge University Press, 2020.
7 thms2 active usersReviewed
🏆Completed
Machine LearningOperations Research·Captain: Shuze Chen

Bandit Algorithms XII: Follow-the-Regularised-Leader and Mirror DescentTextbook

Beneath Exp3, Exp4 and their relatives lies one algorithm: minimize past losses plus a convex regularizer. Chapters 26–28 of Lattimore–Szepesvári develop this unifying view. For a Legendre potential FFF with Bregman divergence DFD_FDF​, both mirror descent and follow-the-regularised-leader satisfy the master bound Rn(a)≤F(a)−F(a1)η+1η∑tDF(at,a~t+1)R_n(a) \le \frac{F(a) - F(a_1)}{\eta} + \frac{1}{\eta}\sum_t D_F(a_t, \tilde a_{t+1})Rn​(a)≤ηF(a)−F(a1​)​+η1​∑t​DF​(at​,a~t+1​); the negentropy potential on the simplex recovers Exp3 exactly. The goal theorem is the payoff for adversarial linear bandits: FTRL on the unit ball with the self-concordant-flavoured potential F(a)=−log⁡(1−∥a∥)−∥a∥F(a) = -\log(1-\|a\|) - \|a\|F(a)=−log(1−∥a∥)−∥a∥ achieves Rn≤23ndlog⁡nR_n \le 2\sqrt{3nd\log n}Rn​≤23ndlogn​ — improving the d\sqrt{d}d​ factor over the Exp3-style approach of Chapter 27 and matching the Ω(dn)\Omega(d\sqrt{n})Ω(dn​) lower bound of Mission XI up to logarithms.

5 thms2 active users
🏆Completed
Machine LearningOperations Research·Captain: Shuze Chen

Bandit Algorithms VIII: Contextual Bandits and Exp4Textbook

Real decisions come with context: a news site chooses an article for a particular user. Competing with the single best arm is then meaningless; the right benchmark is the best mapping from contexts to arms, or more generally the best of MMM expert policies. Chapter 18 of Lattimore–Szepesvári formalizes this via Exp4 — exponential weighting over experts, fed by the importance-weighted estimator of Mission V. The goal theorem: with learning rate η=2log⁡(M)/(nk)\eta = \sqrt{2\log(M)/(nk)}η=2log(M)/(nk)​, Exp4 satisfies Rn≤2nklog⁡MR_n \le \sqrt{2nk\log M}Rn​≤2nklogM​ against the best of MMM experts. Since MMM enters only logarithmically, the learner can compete with exponentially large policy classes — the conceptual gateway from bandits to reinforcement learning with function approximation.

9 thms2 active usersReviewed
Operations ResearchProbabilityStatistics·Captain: mikedeng1

Dynamic Pricing Without Knowing the Demand Function: Risk Bounds and Near-Optimal Algorithms III: With One Unknown Parameter, Staged Re-estimation Has Regret O((log log n)(log n)^{1/2}/n^{1/2})Research Paper

Motivation

A seller with a fixed stock of a single product and a finite selling season must post prices without knowing how demand responds to price. Revenue management treats this as a constrained stochastic control problem; with the demand curve known, the problem was solved by Gallego and van Ryzin (Management Science, 1994). When the curve is unknown, every price posted also serves as an experiment, so the seller faces an exploration–exploitation trade-off. Unlike a multi-armed bandit, this problem has a continuum of actions and a hard inventory constraint.

Besbes and Zeevi (Operations Research, 2009) measure a pricing policy by its worst-case relative revenue loss against a full-information benchmark, in an asymptotic regime where inventory and demand grow together. They give three upper bounds. This mission takes the third, Proposition 5: when the demand model has a single unknown scalar parameter, a policy that keeps re-estimating that parameter in stages of growing length has regret O((log⁡log⁡n)(log⁡n)1/2/n1/2)O\big((\log\log n)(\log n)^{1/2}/n^{1/2}\big)O((loglogn)(logn)1/2/n1/2). The paper's lower bound for parametric families (Proposition 4) is of order n−1/2n^{-1/2}n−1/2, so the rate is optimal up to logarithmic factors.

Setting

Market. Prices lie in [p‾,p‾]∪{p∞}[\underline p,\overline p]\cup\{p_\infty\}[p​,p​]∪{p∞​} with 0<p‾<p‾<p∞0<\underline p<\overline p<p_\infty0<p​<p​<p∞​. Posting the off price p∞p_\inftyp∞​ stops demand. The seller starts with inventory x>0x>0x>0 and sells over the horizon [0,T][0,T][0,T], T>0T>0T>0.

Demand. A demand function λ\lambdaλ maps a price to a demand rate. The class L(M,K‾,K‾,m)\mathcal L(M,\underline K,\overline K,m)L(M,K​,K,m) consists of the functions that are non-increasing with an inverse γ\gammaγ on [p‾,p‾][\underline p,\overline p][p​,p​], have a concave revenue rate r(l)=lγ(l)r(l)=l\gamma(l)r(l)=lγ(l), are bounded by MMM, are K‾\overline KK-Lipschitz with a K‾−1\underline K^{-1}K​−1-Lipschitz inverse, and attain a revenue rate max⁡ppλ(p)≥m\max_p p\lambda(p)\ge mmaxp​pλ(p)≥m. The parametric family is λ(p;θ)\lambda(p;\theta)λ(p;θ), θ∈Θ=[θlo,θhi]\theta\in\Theta=[\theta_{\mathrm{lo}},\theta_{\mathrm{hi}}]θ∈Θ=[θlo​,θhi​], with every member in the class (Assumption 1). Assumption 2 adds a test price p1p_1p1​, differentiability of λ(p1;⋅)\sqrt{\lambda(p_1;\cdot)}λ(p1​;⋅)​ and the Lipschitz bound ∣λ(p;θ)−λ(p;θ′)∣≤K‾2∣θ−θ′∣|\lambda(p;\theta)-\lambda(p;\theta')|\le\overline K_2|\theta-\theta'|∣λ(p;θ)−λ(p;θ′)∣≤K2​∣θ−θ′∣. Assumption 3 requires inf⁡p,θλ(p;θ)>l0>0\inf_{p,\theta}\lambda(p;\theta)>l_0>0infp,θ​λ(p;θ)>l0​>0 and an α\alphaα-Lipschitz solution map d↦g(p,d)d\mapsto g(p,d)d↦g(p,d) of the equation λ(p;⋅)=d\lambda(p;\cdot)=dλ(p;⋅)=d.

Demand process. Let NNN be a unit-rate Poisson process. Under a price path p(⋅)p(\cdot)p(⋅) and parameter θ∗\theta^*θ∗, the cumulative demand up to time ttt is N(∫0tλ(p(s);θ∗) ds)N\big(\int_0^t\lambda(p(s);\theta^*)\,ds\big)N(∫0t​λ(p(s);θ∗)ds). Sales stop when the inventory runs out.

Benchmark and regret. The deterministic relaxation JD(x,T∣θ)J^D(x,T\mid\theta)JD(x,T∣θ) is the supremum of ∫0Tp(s)λ(p(s);θ) ds\int_0^T p(s)\lambda(p(s);\theta)\,ds∫0T​p(s)λ(p(s);θ)ds over price paths with ∫0Tλ(p(s);θ) ds≤x\int_0^T\lambda(p(s);\theta)\,ds\le x∫0T​λ(p(s);θ)ds≤x. In the market of size nnn the inventory is nxnxnx and the demand nλn\lambdanλ. If Jnπ(x,T;θ)J^\pi_n(x,T;\theta)Jnπ​(x,T;θ) is the expected revenue of a policy π\piπ, its regret is Rnπ=1−Jnπ/JnD\mathcal R^\pi_n=1-J^\pi_n/J^D_nRnπ​=1−Jnπ​/JnD​.

Algorithm 3. Start from p^1=p1\hat p_1=p_1p^​1​=p1​ and use stages of lengths Δn(1),…,Δn(ℓn)\Delta^{(1)}_n,\dots,\Delta^{(\ell_n)}_nΔn(1)​,…,Δn(ℓn​)​ summing to TTT. Stage iii applies p^i\hat p_ip^​i​, estimates the demand rate d^i\hat d_id^i​ from the stage's demand, solves for θ^i=g(p^i,d^i)\hat\theta_i=g(\hat p_i,\hat d_i)θ^i​=g(p^​i​,d^i​), and sets p^i+1=max⁡{pu(θ^i),pc(θ^i)}\hat p_{i+1}=\max\{p^u(\hat\theta_i),p^c(\hat\theta_i)\}p^​i+1​=max{pu(θ^i​),pc(θ^i​)}. Here pu(θ)p^u(\theta)pu(θ) maximizes pλ(p;θ)p\lambda(p;\theta)pλ(p;θ) and pc(θ)p^c(\theta)pc(θ) minimizes ∣λ(p;θ)−x/T∣|\lambda(p;\theta)-x/T|∣λ(p;θ)−x/T∣. The tuning (19)–(20) is ℓn=(log⁡2)−1log⁡log⁡n\ell_n=(\log2)^{-1}\log\log nℓn​=(log2)−1loglogn stages with Δn(m)=βnn(aℓn/am)−1\Delta^{(m)}_n=\beta_n n^{(a_{\ell_n}/a_m)-1}Δn(m)​=βn​n(aℓn​​/am​)−1 and am=2m−1/(2m−1)a_m=2^{m-1}/(2^m-1)am​=2m−1/(2m−1).

Formalization targets

Goal: Proposition 5

∃ C>0, ∃ n0,∀n≥n0, ∀θ∈Θ:Rnπn(x,T;θ)≤C (log⁡log⁡n)(log⁡n)1/2n1/2.\exists\,C>0,\ \exists\,n_0,\quad \forall n\ge n_0,\ \forall\theta\in\Theta:\qquad \mathcal R^{\pi_n}_n(x,T;\theta)\le C\,\frac{(\log\log n)(\log n)^{1/2}}{n^{1/2}} .∃C>0, ∃n0​,∀n≥n0​, ∀θ∈Θ:Rnπn​​(x,T;θ)≤Cn1/2(loglogn)(logn)1/2​.

The constants are uniform in θ\thetaθ and nnn. This is the paper's (21): sup⁡θRnπ=O(⋅)\sup_\theta\mathcal R^{\pi}_n=O(\cdot)supθ​Rnπ​=O(⋅).

Milestones, in proof order

  1. Fact 1: JnD=nJDJ^D_n=nJ^DJnD​=nJD and JD≥mmin⁡{T,x/M}J^D\ge m\min\{T,x/M\}JD≥mmin{T,x/M} on the class.
  2. Lemma 1: the deterministic relaxation is solved by the fixed price pD=max⁡{pu,pc}p^D=\max\{p^u,p^c\}pD=max{pu,pc}.
  3. Lemma 2: Poisson deviation bounds at scale (log⁡n/rn)1/2(\log n/r_n)^{1/2}(logn/rn​)1/2.
  4. (A-27): a revenue lower bound that splits the loss into stage-wise terms and an overflow term.
  5. The per-stage revenue gap r(pD)−E r(p^i)≤C2(nΔn(i−1))−1/2r(p^D)-\mathbb E\,r(\hat p_i)\le C_2(n\Delta^{(i-1)}_n)^{-1/2}r(pD)−Er(p^​i​)≤C2​(nΔn(i−1)​)−1/2.
  6. (A-30): the stage-iii demand rate rarely exceeds the run-out rate.
  7. The overflow bound E[(Yn−nx)+]≤nC8(log⁡n)1/2naℓn−1\mathbb E[(Y_n-nx)^+]\le nC_8(\log n)^{1/2}n^{a_{\ell_n}-1}E[(Yn​−nx)+]≤nC8​(logn)1/2naℓn​​−1.
  8. (A-31): the revenue ratio before the exponents are evaluated.
  9. The rate estimate naℓn−1≤e n−1/2n^{a_{\ell_n}-1}\le e\,n^{-1/2}naℓn​​−1≤en−1/2.

Milestones 6–8 hold in the case λ(p‾;θ∗)≤x/T\lambda(\overline p;\theta^*)\le x/Tλ(p​;θ∗)≤x/T, the only case the paper's proof treats in detail.

Significance

Proposition 5 shows that with one unknown parameter, learning while earning reaches the n−1/2n^{-1/2}n−1/2 rate, up to logarithms. The learn-then-price policies of Propositions 1 and 3 stop learning after an initial phase and reach only n−1/4n^{-1/4}n−1/4 and n−1/3n^{-1/3}n−1/3. The paper leaves open whether the multi-parameter case attains the lower bound.

The analysis combines a continuous-time controlled Poisson model, an inventory constraint and a staged estimator, which also appear in later work on dynamic pricing with learning. A formal development would provide a time-changed Poisson demand model with random stage boundaries, a deterministic-relaxation benchmark, and concentration bounds stated for the scales this literature uses.

The result is proved in the paper, but parts of the proof are only sketched. The case λ(p‾;θ∗)>x/T\lambda(\overline p;\theta^*)>x/Tλ(p​;θ∗)>x/T is dismissed with "a similar result holds". The per-stage gap is obtained "by parallel reasoning". Display (A-30) has a typographical error in its threshold. To our knowledge, none of these results has been machine-checked.

Difficulty

The naive argument conditions each stage on its start time, as if that time were deterministic. It is not: the stage boundaries Λi=∑j≤inλ(p^j;θ∗)Δn(j)\Lambda_i=\sum_{j\le i}n\lambda(\hat p_j;\theta^*)\Delta^{(j)}_nΛi​=∑j≤i​nλ(p^​j​;θ∗)Δn(j)​ depend on all earlier observations, so every per-stage estimate needs the strong Markov property of the Poisson process at a random time. The inventory constraint makes the revenue a nonlinear function of the whole demand path. Bounding the loss therefore means controlling estimation error and overflow at the same time. The geometric stage lengths (20) are chosen so that the stage losses Δn(i)/(nΔn(i−1))1/2\Delta^{(i)}_n/(n\Delta^{(i-1)}_n)^{1/2}Δn(i)​/(nΔn(i−1)​)1/2 are all of the same order. That balance has to be checked exactly, including the rounding of ℓn\ell_nℓn​ to an integer.

Formalization scope

  • Poisson process. A structure on an arbitrary probability space: N(0)=0N(0)=0N(0)=0, monotone right-continuous paths, measurable marginals, Poisson increments, and independent increments over finite partitions. No process is published on the platform.
  • Class and family. Conditions on λ\lambdaλ are imposed on [p‾,p‾]∪{p∞}[\underline p,\overline p]\cup\{p_\infty\}[p​,p​]∪{p∞​}, the only prices a path uses. The inverse γ\gammaγ is Function.invFunOn. Θ\ThetaΘ is a nonempty closed interval of R\mathbb RR.
  • Assumption 3. As printed it cannot hold for d>sup⁡θλ(p;θ)d>\sup_\theta\lambda(p;\theta)d>supθ​λ(p;θ). It is read as an α\alphaα-Lipschitz map g(p,⋅):[0,∞)→Θg(p,\cdot):[0,\infty)\to\Thetag(p,⋅):[0,∞)→Θ that inverts λ(p;⋅)\lambda(p;\cdot)λ(p;⋅) on Θ\ThetaΘ. ggg is jointly measurable, so that estimates at random prices are random variables.
  • Selections. pu,pcp^u,p^cpu,pc are any measurable selections of the maximizer and minimizer; the statements hold for each.
  • Inventory. The inventory is ⌊nx⌋\lfloor nx\rfloor⌊nx⌋ units, and sales are capped cumulative counts.
  • Time change. Eq. (1) is applied stage by stage with random stage boundaries.
  • Typos. In Algorithm 3, "λ(pi,θ)\lambda(p_i,\theta)λ(pi​,θ)" is read as λ(p^i;θ)\lambda(\hat p_i;\theta)λ(p^​i​;θ) and "x/tx/tx/t" as x/Tx/Tx/T.
  • Stages. ℓn=⌈log⁡2log⁡n⌉\ell_n=\lceil\log_2\log n\rceilℓn​=⌈log2​logn⌉.
  • Integrals. Expectations are lower Lebesgue integrals of nonnegative quantities, converted to reals. The relaxation is a real supremum over measurable paths.
  • Asymptotics. The O(⋅)O(\cdot)O(⋅) is rendered with an explicit n0n_0n0​. The clause "asymptotically optimal" is omitted, since it needs the second half of Lemma 1.
  • Ruled out. Each of the following would trivialize the statement: removing the inventory cap, replacing the random stage boundaries by deterministic ones, fixing θ\thetaθ, letting CCC depend on θ\thetaθ, or using a non-measurable selection (whose expectation would be a junk value).

Contributions are welcome on every milestone. The Poisson process structure, its strong Markov property at stage boundaries, and Lemma 2 can be reused in other Poisson-demand pricing and queueing missions. Lemma 1 and Fact 1 are deterministic, and the rate estimate already has a local proof.

Selected references

  • O. Besbes and A. Zeevi, Dynamic Pricing Without Knowing the Demand Function: Risk Bounds and Near-Optimal Algorithms, Operations Research 57(6):1407–1420, 2009. https://doi.org/10.1287/opre.1080.0640
  • G. Gallego and G. van Ryzin, Optimal Dynamic Pricing of Inventories with Stochastic Demand over Finite Horizons, Management Science 40(8):999–1020, 1994. https://doi.org/10.1287/mnsc.40.8.999
  • K. Talluri and G. van Ryzin, The Theory and Practice of Revenue Management, Springer, 2005. https://doi.org/10.1007/b139000
15 thms1 active userReviewed
Operations ResearchProbabilityStatistics·Captain: mikedeng1

Dynamic Pricing Without Knowing the Demand Function: Risk Bounds and Near-Optimal Algorithms II: The Parametric Learn-then-Price Policy Has Regret at Most C(log n)^{1/2}/n^{1/3}Research Paper

Why learn demand while pricing?

A seller with a fixed inventory must choose prices before knowing how customers respond to them. A price that earns a high margin can sell too slowly; a price that sells quickly can exhaust stock before the selling season ends. Learning demand uses time and inventory, so the seller must account for the cost of its own experiments. This mission formalizes the parametric policy and regret bound of Besbes and Zeevi (2009), Proposition 3. Their setting differs from a finite-arm bandit: the permitted ordinary prices form an interval, customer arrivals are random, and the available stock caps total sales.

The paper first analyzes a nonparametric class with a slower upper bound in Proposition 1, then imposes a known finite-dimensional form on the unknown demand curve in Section 5. Proposition 3 shows how that additional information improves the regret rate for its Algorithm 2. The authors also prove a lower bound for a suitable parametric family in Proposition 4; that result is outside this mission's capstone, which concerns the performance guarantee of the concrete policy.

Market, demand, and policy

The selling horizon has length T>0T>0T>0, and the initial stock is x>0x>0x>0. An ordinary price ppp lies in [p‾,p‾][\underline p,\overline p][p​,p​], with 0<p‾<p‾0<\underline p<\overline p0<p​<p​. The special price p∞>0p_\infty>0p∞​>0 stops demand. At parameter θ∈Θ⊆Rk\theta\in\Theta\subseteq\mathbb R^kθ∈Θ⊆Rk, the demand rate is λ(p;θ)≥0\lambda(p;\theta)\ge0λ(p;θ)≥0. The parameter set Θ\ThetaΘ is nonempty, compact, and convex; kkk is positive. The seller knows the family λ(⋅;θ)\lambda(\cdot;\theta)λ(⋅;θ) but does not know the true parameter θ∗\theta^*θ∗.

For each parameter, demand is nonincreasing in the price and has an inverse γ(⋅;θ)\gamma(\cdot;\theta)γ(⋅;θ) on the attainable rate interval. The rate revenue is r(ℓ;θ)=ℓγ(ℓ;θ)r(\ell;\theta)=\ell\gamma(\ell;\theta)r(ℓ;θ)=ℓγ(ℓ;θ), a concave function of the rate. Every member of the family satisfies Assumption 1 with the same positive constants M,K‾,K‾,mM,\underline K,\overline K,mM,K​,K,m: demand is at most MMM, its price variation is at most K‾\overline KK times the price difference, its inverse is K‾−1\underline K^{-1}K​−1-Lipschitz, and some ordinary price earns revenue rate at least mmm. These conditions define the class in which the bound is uniform. See §§3–4.2 of the source.

Customer requests follow a unit-rate Poisson process NNN run on a demand-dependent clock. Under price p(t)p(t)p(t), cumulative requests at time ttt equal N(∫0tλ(p(s);θ∗) ds)N(\int_0^t\lambda(p(s);\theta^*)\,ds)N(∫0t​λ(p(s);θ∗)ds). The market of size nnn has stock nxnxnx and rate nλn\lambdanλ. Sales stop when stock runs out. The deterministic relaxation JnDJ_n^DJnD​ is the best integrated rate revenue over measurable price paths satisfying the expected-demand stock constraint, with the same scaling. The policy revenue JnπJ_n^\piJnπ​ is its expected sales revenue, and its relative regret is Rnπ=1−Jnπ/JnDR_n^\pi=1-J_n^\pi/J_n^DRnπ​=1−Jnπ​/JnD​. Fact 1 states JnD=nJDJ_n^D=nJ^DJnD​=nJD and gives a positive uniform lower bound on JDJ^DJD.

Assumption 2 selects kkk distinct ordinary test prices. Their mean rates identify the parameter through a Lipschitz inverse map ggg, and demand changes at most K‾2∥θ−θ′∥∞\overline K_2\|\theta-\theta'\|_\inftyK2​∥θ−θ′∥∞​ as the parameter varies. The square root of each test-price rate is differentiable on Θ\ThetaΘ. Algorithm 2 spends τn\tau_nτn​ time units testing these prices in equal subintervals, estimates each rate from its Poisson count increment, and sets θ^=g(d^)\widehat\theta=g(\widehat d)θ=g(d). It then posts p^=max⁡{pu(θ^),pc(θ^)}\widehat p=\max\{p^u(\widehat\theta),p^c(\widehat\theta)\}p​=max{pu(θ),pc(θ)}, where pup^upu maximizes revenue rate and pcp^cpc minimizes the distance of demand to x/Tx/Tx/T. It keeps that price until time TTT or stock-out. See §5.1–5.2.

Formalization targets

The capstone is the uniform bound in Proposition 3, equation (17). With τn≍n−1/3\tau_n\asymp n^{-1/3}τn​≍n−1/3, the mission asks for one constant C>0C>0C>0, independent of nnn, θ∗\theta^*θ∗, the optimizer choices, and the probability space, such that

∀θ∗∈Θ,Rnπ(x,T;θ∗)≤Clog⁡nn1/3(n≥2).\forall\theta^*\in\Theta,\qquad R_n^\pi(x,T;\theta^*)\le C\frac{\sqrt{\log n}}{n^{1/3}}\quad(n\ge2).∀θ∗∈Θ,Rnπ​(x,T;θ∗)≤Cn1/3logn​​(n≥2).

The intermediate quantitative target is equation (A-25), which retains the learning time:

Rnπ≤C3mD(τn+log⁡nnτn),mD=mmin⁡{T,x/M}.R_n^\pi\le\frac{C_3}{m^D}\left(\tau_n+\frac{\sqrt{\log n}}{\sqrt{n\tau_n}}\right),\qquad m^D=m\min\{T,x/M\}.Rnπ​≤mDC3​​(τn​+nτn​​logn​​),mD=mmin{T,x/M}.

The milestone list also carries Fact 1, the optimal deterministic price path and value from the first assertion of Lemma 1, both Poisson tails of Lemma 2, the pricing-phase revenue bound (A-17), the deterministic stability bounds (A-19), (A-22), and (A-23), and the parameter-estimation bound of Lemma 6. The paper's assertion that the policy is “asymptotically optimal” follows from the displayed regret estimate together with nonnegative regret; the displayed numerical estimate is the formal goal.

What the result provides

A finite-dimensional demand model lets the seller learn from a fixed set of kkk prices rather than probing an increasingly fine price grid. Proposition 3 quantifies the resulting revenue loss at O(log⁡n n−1/3)O(\sqrt{\log n}\,n^{-1/3})O(logn​n−1/3), compared with the paper's O(log⁡n n−1/4)O(\sqrt{\log n}\,n^{-1/4})O(logn​n−1/4) upper bound for its nonparametric learn-then-price policy. Both guarantees compare actual expected revenue with the full-information deterministic benchmark, including stock-out. These rates are proved in the article; the mission seeks machine-checked Lean proofs of the stated model, auxiliary bounds, and capstone. No such proof is claimed here.

The formalization would also provide reusable interfaces for a unit-rate Poisson counting process, deterministic inventory-constrained revenue optimization, measurable price selectors, and a random price chosen from normalized count observations. The later single-parameter policy in the paper uses related ideas but is a separate mission with different stages and a different rate.

Main difficulty

A rate estimate can be close to the true rate while the selected price changes between two different optimizers: the unconstrained revenue maximizer and the price that matches inventory to expected demand. A bound for only one optimizer does not control the maximum of the two. The learning price is random, and the number of requests in the pricing phase is evaluated at a random Poisson clock. Stock-out further couples the learning phase to the amount available for later sales. These features prevent a direct substitution of an ordinary parameter-estimation bound into the final revenue formula.

Formalization scope

Lean uses Fin(k)→R\mathrm{Fin}(k)\to\mathbb RFin(k)→R with its sup norm for parameter vectors, a finite positive off price, and a Poisson process on an arbitrary probability space. Each demand curve is defined on all real prices but is constrained on [p‾,p‾][\underline p,\overline p][p​,p​] and at p∞p_\inftyp∞​; the inverse and concavity conditions apply on the attainable rate interval. The deterministic benchmark is a real supremum over measurable, integrable admissible price paths. The class assumptions make its value nonempty and bounded. Policy revenue uses a nonnegative integral of pathwise revenue, avoiding a default zero from a nonintegrable signed expectation.

Inventory is measured in whole units, so the cap is ⌊nx⌋\lfloor nx\rfloor⌊nx⌋, equal to the paper's nxnxnx when that quantity is integral. Test-price observations remain uncapped in the formula for d^\widehat dd; if stock runs out during learning, capped later sales are already zero. The continuous optimizer choices are measurable selections satisfying the actual max/min properties for every member of Θ\ThetaΘ. The bound is uniform over these choices and over all unit-rate Poisson processes.

The printed Assumption 2(i)b asks for a solution to the test-rate equations for every vector in Rk\mathbb R^kRk. Such a solution cannot always lie in compact Θ\ThetaΘ, although the proof applies Assumption 2(ii) to θ^\widehat\thetaθ. Here ggg is a Lipschitz map into Θ\ThetaΘ that recovers each true parameter from its test-rate vector; it can be viewed as the unconstrained inverse followed by a nonexpansive projection in the paper's box example. This explicit convention is required to make the estimate and subsequent use of Assumption 2(ii) coherent. It is an interpretive repair of the printed condition.

The paper prints the regret bound for n≥1n\ge1n≥1, where log⁡1=0\sqrt{\log1}=0log1​=0. The exploration policy can lose revenue at n=1n=1n=1, so the formal theorem starts at n≥2n\ge2n≥2. The comparison τn≍n−1/3\tau_n\asymp n^{-1/3}τn​≍n−1/3 is encoded by positive lower and upper multipliers after a fixed threshold, with 0<τn≤T0<\tau_n\le T0<τn​≤T for all relevant market sizes. This admits the usual finite initial adjustments and leaves the bound uniform over the sequence. No fixed demand curve, known parameter, finite price grid, or uncapped sales model can satisfy this target by substitution.

Selected references

  • Omar Besbes and Assaf Zeevi, Dynamic Pricing Without Knowing the Demand Function: Risk Bounds and Near-Optimal Algorithms, Operations Research 57(6), 2009, authors' final manuscript revised December 16, 2007. DOI: 10.1287/opre.1080.0640.
13 thms1 active userReviewed
Convex OptimizationMachine Learning·Captain: mikedeng1

Online Convex Optimization in the Bandit Setting: Gradient Descent without a Gradient: Bandit Gradient Descent Has Expected Regret ≤ 3Cn^{5/6}∛(12dR/r)Research Paper

Motivation

In online convex optimization a decision maker picks points x1,x2,…,xnx_1,x_2,\dots,x_nx1​,x2​,…,xn​ in a convex set S⊆RdS\subseteq\mathbb R^dS⊆Rd, and after each choice pays ct(xt)c_t(x_t)ct​(xt​) for a convex cost function ctc_tct​ chosen in advance by an adversary. Performance is measured by regret: the total cost paid minus the cost of the best fixed point in hindsight. Zinkevich (ICML 2003) showed that projected gradient descent has regret O(n)O(\sqrt n)O(n​) when the whole function ctc_tct​, or at least its gradient at xtx_txt​, is revealed after each round.

In many applications only the number ct(xt)c_t(x_t)ct​(xt​) is observed: a seller sets a price and sees revenue, a router picks a path and sees its delay, an advertiser places a bid and sees the cost. This is the bandit setting. Flaxman, Kalai and McMahan (arXiv:cs/0408007, SODA 2005) gave the first simple algorithm for bandit convex optimization against an oblivious adversary with general bounded convex costs: a randomized gradient descent that estimates the gradient from a single function value, with expected regret O(n5/6)O(n^{5/6})O(n5/6). The same one-point gradient estimate is the starting point of later work on bandit convex optimization and on zeroth-order (derivative-free) stochastic optimization; see, e.g., Bubeck and Cesa-Bianchi's survey (arXiv:1204.5721, Ch. 6) and Hazan's textbook (arXiv:1909.05207, Ch. 6).

Timeline. Zinkevich (2003): O(n)O(\sqrt n)O(n​) regret with full gradient feedback. Kleinberg (NIPS 2004), independently: O(n3/4)O(n^{3/4})O(n3/4) bandit regret for Lipschitz costs by a different reduction. Flaxman, Kalai, McMahan (2004/2005): O(n5/6)O(n^{5/6})O(n5/6) for bounded convex costs and O(n3/4)O(n^{3/4})O(n3/4) for Lipschitz costs, with one function value per round. Later work (Bubeck, Lee, Eldan 2017 and others) reached O~(n)\tilde O(\sqrt n)O~(n​) with more complex algorithms.

Setting

Let B={x∈Rd:∣x∣≤1}\mathbb B=\{x\in\mathbb R^d : |x|\le1\}B={x∈Rd:∣x∣≤1} and S={x:∣x∣=1}\mathbb S=\{x : |x|=1\}S={x:∣x∣=1} be the closed unit ball and the unit sphere, d≥1d\ge1d≥1. The feasible set SSS is closed and convex with

rB⊆S⊆RB,r>0.r\mathbb B\subseteq S\subseteq R\mathbb B,\qquad r>0 .rB⊆S⊆RB,r>0.

The costs c1,c2,…c_1,c_2,\dotsc1​,c2​,… are fixed before play (an oblivious adversary); each is convex on SSS with ∣ct(x)∣≤C|c_t(x)|\le C∣ct​(x)∣≤C for x∈Sx\in Sx∈S, where C>0C>0C>0. For K⊆RdK\subseteq\mathbb R^dK⊆Rd, PK(z)P_K(z)PK​(z) is the nearest point of KKK to zzz.

The bandit gradient descent algorithm BGD(α,δ,ν)\mathrm{BGD}(\alpha,\delta,\nu)BGD(α,δ,ν) (Figure 1 of the paper) keeps an iterate yty_tyt​ with y1=0y_1=0y1​=0. At period ttt it draws a unit vector utu_tut​ uniformly from S\mathbb SS, independently of the past, plays

xt=yt+δut,x_t=y_t+\delta u_t ,xt​=yt​+δut​,

observes only ct(xt)c_t(x_t)ct​(xt​), and updates

yt+1=P(1−α)S(yt−ν ct(xt) ut).y_{t+1}=P_{(1-\alpha)S}\big(y_t-\nu\,c_t(x_t)\,u_t\big).yt+1​=P(1−α)S​(yt​−νct​(xt​)ut​).

The smoothed cost is c^t(x)=Ev∈B[ct(x+δv)]\hat c_t(x)=\mathbb E_{v\in\mathbb B}[c_t(x+\delta v)]c^t​(x)=Ev∈B​[ct​(x+δv)] with vvv uniform on B\mathbb BB. The expected regret after nnn rounds is

E[∑t=1nct(xt)]−min⁡x∈S∑t=1nct(x).\mathbb E\Big[\sum_{t=1}^n c_t(x_t)\Big]-\min_{x\in S}\sum_{t=1}^n c_t(x).E[t=1∑n​ct​(xt​)]−x∈Smin​t=1∑n​ct​(x).

Formalization targets

Goal: Theorem 1 (p. 8)

For every n≥(3Rd/2r)2n\ge(3Rd/2r)^2n≥(3Rd/2r)2, with ν=R/(Cn)\nu=R/(C\sqrt n)ν=R/(Cn​), δ=rR2d2/(12n)3\delta=\sqrt[3]{rR^2d^2/(12n)}δ=3rR2d2/(12n)​ and α=3Rd/(2rn)3\alpha=\sqrt[3]{3Rd/(2r\sqrt n)}α=33Rd/(2rn​)​,

E[∑t=1nct(xt)]−min⁡x∈S∑t=1nct(x)≤3Cn5/612 dRr3.\mathbb E\Big[\sum_{t=1}^n c_t(x_t)\Big]-\min_{x\in S}\sum_{t=1}^n c_t(x)\le 3Cn^{5/6}\sqrt[3]{\frac{12\,dR}{r}} .E[t=1∑n​ct​(xt​)]−x∈Smin​t=1∑n​ct​(x)≤3Cn5/63r12dR​​.

The paper prints the constant 3Cn5/6dR/r33Cn^{5/6}\sqrt[3]{dR/r}3Cn5/63dR/r​. Its own last step bounds the regret by a/δ+bδ/α+cαa/\delta+b\delta/\alpha+c\alphaa/δ+bδ/α+cα with a=RdCna=RdC\sqrt na=RdCn​, b=6Cn/rb=6Cn/rb=6Cn/r, c=2Cnc=2Cnc=2Cn, and with the stated δ\deltaδ and α\alphaα this equals 3abc3=3Cn5/612dR/r33\sqrt[3]{abc}=3Cn^{5/6}\sqrt[3]{12dR/r}33abc​=3Cn5/6312dR/r​. The goal states the bound the proof establishes.

Milestones

  1. Lemma 1 (p. 5): Eu∈S[f(x+δu)u]=δd∇f^(x)\mathbb E_{u\in\mathbb S}[f(x+\delta u)u]=\frac\delta d\nabla\hat f(x)Eu∈S​[f(x+δu)u]=dδ​∇f^​(x), the one-point gradient estimate.
  2. Lemma 2 (p. 6): gradient descent with conditionally unbiased gradient estimates of norm at most GGG has expected regret at most RGnRG\sqrt nRGn​ for η=R/(Gn)\eta=R/(G\sqrt n)η=R/(Gn​).
  3. Observations 1–3 (pp. 7–8): the comparator over (1−α)S(1-\alpha)S(1−α)S is within 2αCn2\alpha Cn2αCn of that over SSS; balls of radius αr\alpha rαr around (1−α)S(1-\alpha)S(1−α)S lie in SSS; on (1−α)S(1-\alpha)S(1−α)S the costs satisfy ∣ct(x)−ct(y)∣≤2Cαr∣x−y∣|c_t(x)-c_t(y)|\le\frac{2C}{\alpha r}|x-y|∣ct​(x)−ct​(y)∣≤αr2C​∣x−y∣.
  4. The played points are feasible (p. 8).
  5. Regret against the smoothed costs (p. 9): at most RdCn/δRdC\sqrt n/\deltaRdCn​/δ.
  6. Display (10) (p. 9): regret at most RdCn/δ+3δLn+2αCnRdC\sqrt n/\delta+3\delta Ln+2\alpha CnRdCn​/δ+3δLn+2αCn with L=2C/(αr)L=2C/(\alpha r)L=2C/(αr).

Companion items

The tuning identity (p. 9): a/δ+bδ/α+cα=3abc3a/\delta+b\delta/\alpha+c\alpha=3\sqrt[3]{abc}a/δ+bδ/α+cα=33abc​ at δ=a2/bc3\delta=\sqrt[3]{a^2/bc}δ=3a2/bc​, α=ab/c23\alpha=\sqrt[3]{ab/c^2}α=3ab/c2​, for a,b,c>0a,b,c>0a,b,c>0.

Theorem 2 (p. 9). If each ctc_tct​ is LLL-Lipschitz on SSS, then with ν=R/(Cn)\nu=R/(C\sqrt n)ν=R/(Cn​), δ=n−1/4RdCr/(3(Lr+C))\delta=n^{-1/4}\sqrt{RdCr/(3(Lr+C))}δ=n−1/4RdCr/(3(Lr+C))​, α=δ/r\alpha=\delta/rα=δ/r, and nnn large enough that δ<r\delta<rδ<r,

E[∑t=1nct(xt)]−min⁡x∈S∑t=1nct(x)≤2n3/43RdC(L+C/r).\mathbb E\Big[\sum_{t=1}^n c_t(x_t)\Big]-\min_{x\in S}\sum_{t=1}^n c_t(x)\le 2n^{3/4}\sqrt{3RdC\big(L+C/r\big)} .E[t=1∑n​ct​(xt​)]−x∈Smin​t=1∑n​ct​(x)≤2n3/43RdC(L+C/r)​.

Significance

The theorem shows that bandit feedback costs only a polynomial factor in regret for arbitrary bounded convex costs, with an algorithm that is gradient descent plus one random perturbation per round. Lemma 1 is the general tool behind it: an unbiased estimate of the gradient of a smoothed function from one function value. It is reused across zeroth-order optimization, bandit learning and stochastic approximation. Lemma 2 is a self-contained regret bound for projected gradient descent with noisy gradients, the shape in which Zinkevich's analysis is most often applied.

The results are proved in the paper and are standard. To the platform's knowledge none of them has a machine-checked proof. Related statements from Bubeck and Cesa-Bianchi's survey, for differentiable Lipschitz losses, are open on the platform, and two earlier formalizations of the textbook versions were disproved because of missing regularity or independence hypotheses. Formalizing this mission produces a checked one-point gradient identity for continuous (not differentiable) functions on the sphere, a measure-theoretic regret bound for stochastic projected gradient descent, and the corrected constant of Theorem 1.

Difficulty

The bandit algorithm itself is simple; the difficulty sits in Lemma 1 and in the measure theory around it. The paper derives Lemma 1 from Stokes' theorem, ∇∫δBf(x+v) dv=∫δSf(x+u)u∣u∣ du\nabla\int_{\delta\mathbb B}f(x+v)\,dv=\int_{\delta\mathbb S}f(x+u)\frac{u}{|u|}\,du∇∫δB​f(x+v)dv=∫δS​f(x+u)∣u∣u​du, and the ratio δ/d\delta/dδ/d of the volume to the surface area of a ball. Mathlib has neither this divergence identity on balls in Rd\mathbb R^dRd nor the explicit link between its spherical measure and the surface integral needed here. The identity must hold for functions that are merely continuous near the ball, since convex costs need not be differentiable.

The obvious first idea, differentiating under the integral sign in f^(x)=Ev[f(x+δv)]\hat f(x)=\mathbb E_v[f(x+\delta v)]f^​(x)=Ev​[f(x+δv)], fails because fff is not differentiable. The second obvious idea, applying Lemma 1 to ctc_tct​ as given, fails at the boundary of SSS, where ctc_tct​ is unconstrained. Lemma 2's conditional expectation E[gt∣xt]\mathbb E[g_t\mid x_t]E[gt​∣xt​] requires that the direction utu_tut​ be independent of the iterate yty_tyt​, and the integrability and measurability of the played points come from continuity of convex functions in the interior of SSS.

Formalization scope

Points are EuclideanSpace ℝ (Fin d) with d≥1d\ge1d≥1, and rounds are numbered 1,…,n1,\dots,n1,…,n. The costs are functions on Rd\mathbb R^dRd, and no statement assumes anything about them outside SSS: no global convexity, continuity, differentiability or Lipschitz bound. The standing model is part of the goal's hypotheses: SSS is convex with rB⊆S⊆RBr\mathbb B\subseteq S\subseteq R\mathbb BrB⊆S⊆RB, the costs are convex on SSS with values in [−C,C][-C,C][−C,C] there, and C>0C>0C>0. Additions and conventions:

  • SSS is assumed closed. The paper's projection oracle PS(x)=arg⁡min⁡z∈S∣x−z∣P_S(x)=\arg\min_{z\in S}|x-z|PS​(x)=argminz∈S​∣x−z∣ presupposes that the minimum is attained.
  • The directions utu_tut​ are measurable, independent, and each uniform on S\mathbb SS (the published uniformSphere d). Uniform marginals alone are not enough.
  • The BGD run is a relation (IsBGDRun) required for every outcome. Projection uses the published predicate IsNearestPoint, and regret the published pseudoRegret, whose minimum is an infimum over the subtype; it is attained in every use here.
  • Lemma 1 adds continuity of fff on an open set containing x+δBx+\delta\mathbb Bx+δB. As printed ("for any function fff") it is false. The application in Theorem 1 supplies this hypothesis.
  • The smoothed-regret and (10) milestones use the strict δ<αr\delta<\alpha rδ<αr (the page has δ/r≤α\delta/r\le\alphaδ/r≤α), which keeps every smoothing ball in the interior of SSS. They use α≤1\alpha\le1α≤1 in place of α<1\alpha<1α<1; Theorem 1's α\alphaα equals 111 at n=(3Rd/2r)2n=(3Rd/2r)^2n=(3Rd/2r)2.
  • Theorem 2's "for nnn sufficiently large" is the hypothesis δ<r\delta<rδ<r, the only place the proof uses it.

A formalization that assumed integrability of the costs along the run, assumed differentiable or globally Lipschitz costs, dropped the independence of the directions, or stated ∇f^\nabla\hat f∇f^​ through Mathlib's gradient (which is 000 off differentiability) would trivialize or change the result. All of these are ruled out.

Needed infrastructure: the divergence identity for the ball average (Lemma 1), conditional expectation given σ(xt)\sigma(x_t)σ(xt​) for vector-valued variables, continuity of convex functions on the interior of a convex set, and nearest-point projection onto closed convex sets. The first two are reusable well beyond this mission. Contributions toward Lemma 1 in particular are welcome.

Selected references

  • A. D. Flaxman, A. T. Kalai, H. B. McMahan, Online convex optimization in the bandit setting: gradient descent without a gradient, SODA 2005; arXiv:cs/0408007v1, 2004. https://arxiv.org/abs/cs/0408007
  • M. Zinkevich, Online convex programming and generalized infinitesimal gradient ascent, ICML 2003. https://www.cs.cmu.edu/~maz/publications/ICML03.pdf
  • R. Kleinberg, Nearly tight bounds for the continuum-armed bandit problem, NIPS 2004. https://papers.nips.cc/paper/2634-nearly-tight-bounds-for-the-continuum-armed-bandit-problem
  • S. Bubeck, N. Cesa-Bianchi, Regret analysis of stochastic and nonstochastic multi-armed bandit problems, Foundations and Trends in ML, 2012. https://arxiv.org/abs/1204.5721
  • E. Hazan, Introduction to online convex optimization, 2nd ed., 2019. https://arxiv.org/abs/1909.05207
  • S. Bubeck, Y. T. Lee, R. Eldan, Kernel-based methods for bandit convex optimization, STOC 2017. https://arxiv.org/abs/1607.03084
12 thms1 active userReviewed
Machine LearningProbabilityStatistics·Captain: mikedeng1

Kullback–Leibler Upper Confidence Bounds for Optimal Sequential Allocation I: kl-UCB Draws a Suboptimal Arm log(T)/d(μ_a, μ*) + O(√log T) Times in One-Parameter Exponential FamiliesResearch Paper

Motivation

In a stochastic multi-armed bandit a player repeatedly chooses one of KKK distributions ("arms") and observes a reward drawn from it; the goal is to collect as much reward as possible, which amounts to pulling suboptimal arms as rarely as possible. Lai and Robbins (1985) showed that any reasonable strategy must pull a suboptimal arm aaa at least log⁡T/KL\log T / \mathrm{KL}logT/KL times up to horizon TTT, where KL\mathrm{KL}KL is a Kullback–Leibler divergence between arm aaa and the best arm, and Burnetas and Katehakis (1996) extended the bound to general models. Strategies matching this rate are called asymptotically optimal.

The popular UCB algorithms of Auer, Cesa-Bianchi and Fischer (2002) use Hoeffding-type confidence bounds and are not asymptotically optimal outside special cases. Cappé, Garivier, Maillard, Munos and Stoltz (Ann. Statist. 41(3), 2013; arXiv:1210.1136) analyse kl-UCB, which replaces the Hoeffding radius by a Kullback–Leibler confidence region, and prove a finite-horizon bound whose leading term is exactly the Lai–Robbins constant. This mission formalizes that result for one-parameter exponential families (Theorem 1), the main-text steps of its proof skeleton, and its two corollaries for bounded rewards.

Timeline: Lai and Robbins (1985) lower bound and asymptotically optimal index policies; Agrawal (1995) sample-mean based index policies; Auer, Cesa-Bianchi and Fischer (2002) finite-time analysis of UCB1; Garivier and Cappé (2011) kl-UCB for bounded rewards; Cappé et al. (2013) the unified analysis formalized here.

Setting

A canonical exponential family D={νθ:θ∈Θ}\mathcal D = \{\nu_\theta : \theta\in\Theta\}D={νθ​:θ∈Θ} is given by a dominating measure ρ\rhoρ on R\mathbb RR and a function bbb, with densities dνθdρ(x)=exp⁡(xθ−b(θ))\frac{d\nu_\theta}{d\rho}(x) = \exp(x\theta - b(\theta))dρdνθ​​(x)=exp(xθ−b(θ)). The parameter set Θ\ThetaΘ is the natural parameter space {θ:∫exθ dρ(x)<∞}\{\theta : \int e^{x\theta}\,d\rho(x) < \infty\}{θ:∫exθdρ(x)<∞}, assumed to be an open interval (the family is regular), and bbb is twice differentiable. The mean of νθ\nu_\thetaνθ​ is b˙(θ)\dot b(\theta)b˙(θ), an increasing function, so νθ\nu_\thetaνθ​ is determined by its mean μ\muμ in the open interval I=b˙(Θ)=(μ−,μ+)I = \dot b(\Theta) = (\mu_-,\mu_+)I=b˙(Θ)=(μ−​,μ+​). The divergence (11) is

d(μ,μ′)=KL(νb˙−1(μ),νb˙−1(μ′))=(b˙−1(μ)−b˙−1(μ′))μ−b(b˙−1(μ))+b(b˙−1(μ′)),d(\mu,\mu') = \mathrm{KL}(\nu_{\dot b^{-1}(\mu)},\nu_{\dot b^{-1}(\mu')}) = (\dot b^{-1}(\mu)-\dot b^{-1}(\mu'))\mu - b(\dot b^{-1}(\mu)) + b(\dot b^{-1}(\mu')),d(μ,μ′)=KL(νb˙−1(μ)​,νb˙−1(μ′)​)=(b˙−1(μ)−b˙−1(μ′))μ−b(b˙−1(μ))+b(b˙−1(μ′)),

extended by continuity to the closure Iˉ=[μ−,μ+]\bar I = [\mu_-,\mu_+]Iˉ=[μ−​,μ+​], possibly with the value +∞+\infty+∞.

There are K≥2K\ge2K≥2 arms with laws νθ1,…,νθK∈D\nu_{\theta_1},\dots,\nu_{\theta_K}\in\mathcal Dνθ1​​,…,νθK​​∈D and means μ1,…,μK\mu_1,\dots,\mu_Kμ1​,…,μK​; μ⋆=max⁡aμa\mu^\star = \max_a \mu_aμ⋆=maxa​μa​. At each round t≥1t\ge1t≥1 the player picks an arm AtA_tAt​ based on the past and receives a reward drawn from νAt\nu_{A_t}νAt​​. Na(t)N_a(t)Na​(t) is the number of pulls of arm aaa in rounds 1,…,t1,\dots,t1,…,t, and μ^a(t)\hat\mu_a(t)μ^​a​(t) the mean of the rewards obtained from arm aaa so far.

kl-UCB (Algorithm 2) with a nondecreasing exploration function fff pulls each arm once and then, for t≥Kt\ge Kt≥K, pulls an arm maximizing the index

Ua(t)=sup⁡{μ∈Iˉ:d(μ^a(t),μ)≤f(t)Na(t)}.(12)U_a(t) = \sup\Bigl\{\mu\in\bar I : d(\hat\mu_a(t),\mu) \le \frac{f(t)}{N_a(t)}\Bigr\}. \tag{12}Ua​(t)=sup{μ∈Iˉ:d(μ^​a​(t),μ)≤Na​(t)f(t)​}.(12)

Formalization targets

Goal: Theorem 1 (p. 14)

With f(t)=log⁡t+3log⁡log⁡tf(t) = \log t + 3\log\log tf(t)=logt+3loglogt for t≥3t\ge3t≥3 and f(1)=f(2)=f(3)f(1)=f(2)=f(3)f(1)=f(2)=f(3), for every suboptimal arm aaa and every horizon T≥3T\ge3T≥3,

E[Na(T)]≤log⁡Td(μa,μ⋆)+22πσa,⋆2(d′(μa,μ⋆))2(d(μa,μ⋆))3log⁡T+3log⁡log⁡T+(4e+3d(μa,μ⋆))log⁡log⁡T+8σa,⋆2(d′(μa,μ⋆)d(μa,μ⋆))2+6,\mathbb E[N_a(T)] \le \frac{\log T}{d(\mu_a,\mu^\star)} + 2\sqrt{\frac{2\pi\sigma^2_{a,\star}(d'(\mu_a,\mu^\star))^2}{(d(\mu_a,\mu^\star))^3}}\sqrt{\log T+3\log\log T} + \Bigl(4e+\frac{3}{d(\mu_a,\mu^\star)}\Bigr)\log\log T + 8\sigma^2_{a,\star}\Bigl(\frac{d'(\mu_a,\mu^\star)}{d(\mu_a,\mu^\star)}\Bigr)^2 + 6,E[Na​(T)]≤d(μa​,μ⋆)logT​+2(d(μa​,μ⋆))32πσa,⋆2​(d′(μa​,μ⋆))2​​logT+3loglogT​+(4e+d(μa​,μ⋆)3​)loglogT+8σa,⋆2​(d(μa​,μ⋆)d′(μa​,μ⋆)​)2+6,

where σa,⋆2=max⁡{Var(νθ):μa≤E(νθ)≤μ⋆}\sigma^2_{a,\star} = \max\{\mathrm{Var}(\nu_\theta) : \mu_a\le \mathrm E(\nu_\theta)\le\mu^\star\}σa,⋆2​=max{Var(νθ​):μa​≤E(νθ​)≤μ⋆} and d′d'd′ is the derivative in the first argument.

Milestones

  1. The decomposition (5) of the event {At+1=a}\{A_{t+1}=a\}{At+1​=a} (p. 9).
  2. The split of E[Na(T)]\mathbb E[N_a(T)]E[Na​(T)] after (7) (p. 9).
  3. The passage to local times (8) (pp. 9–10): the overestimation term is bounded by ∑n=1T−KP{ν^a,n∈Cμ†,f(T)/n}\sum_{n=1}^{T-K}\mathbb P\{\hat\nu_{a,n}\in\mathcal C_{\mu^\dagger,f(T)/n}\}∑n=1T−K​P{ν^a,n​∈Cμ†,f(T)/n​}, a sum over fixed sample sizes.
  4. The general bound (10) with n0n_0n0​ of (9) (p. 10).
  5. The deviation bound (13) for an empirical mean with a random number of summands (p. 14).
  6. Lemma 1 (p. 17): the moment-generating function of a distribution on [0,1][0,1][0,1] is dominated by Bernoulli and Gaussian ones.

Companions

Corollary 1 (p. 17, kl-UCB with the Bernoulli divergence for arbitrary rewards in [0,1][0,1][0,1]) and Corollary 2 (p. 18, UCB with radius f(t)/(2Na(t))\sqrt{f(t)/(2N_a(t))}f(t)/(2Na​(t))​), stated as separate theorems.

Significance

Theorem 1 shows that kl-UCB is asymptotically optimal in every regular one-parameter exponential family (Bernoulli, Poisson, Gaussian with known variance, exponential, Gamma with known shape), and it does so with an explicit bound valid at every horizon, not only in the limit. Corollary 2 improves the constants of the classical UCB1 analysis, and Corollary 1 shows that the Bernoulli kl-UCB index is uniformly better than UCB for all bounded rewards.

The result is proved in the paper; its proofs are in the supplemental article (DOI 10.1214/13-AOS1119SUPP, Appendix A), not in the main text. No machine-checked version exists. The platform has a formal analysis of a Bernoulli KL-UCB variant with another exploration function (Lattimore–Szepesvári's Theorem 10.6), which is a different statement. The formalization adds the general exponential-family index, the random-sample-size deviation bound (13) and the full finite-time constant.

Difficulty

The obvious argument bounds P{μ⋆≥Ua⋆(t)}\mathbb P\{\mu^\star \ge U_{a^\star}(t)\}P{μ⋆≥Ua⋆​(t)} by a union bound over the possible values of Na⋆(t)N_{a^\star}(t)Na⋆​(t), which costs a factor ttt and destroys the logarithmic rate. The deviation bound (13) has to control an empirical mean whose number of summands is chosen by the algorithm itself, losing only a factor e⌈εlog⁡t⌉e\lceil\varepsilon\log t\rceile⌈εlogt⌉ over the fixed-sample Chernoff bound; this is the step that needs the strategy to be non-anticipating. The second-order terms depend on the curvature of ddd between μa\mu_aμa​ and μ⋆\mu^\starμ⋆, measured by σa,⋆2\sigma^2_{a,\star}σa,⋆2​ and d′d'd′, and the explicit constants must be tracked through every step. The empirical mean can be an endpoint of Iˉ\bar IIˉ (Bernoulli rewards at small sample sizes), where ddd is only defined as a limit.

Formalization scope

The rewards are a stack Xa,kX_{a,k}Xa,k​ (the (k+1)(k+1)(k+1)-st reward of arm aaa), mutually independent and i.i.d. per arm, the representation of §2.2; this is the platform's RegretBandits.Stochastic.IsStochasticBandit, and the law of Xa,0X_{a,0}Xa,0​ is pinned to νθa\nu_{\theta_a}νθa​​. Arms are Fin K. The exponential family is the platform's OptimalBAI.OptProportions.ExpFamily (with b¨>0\ddot b>0b¨>0, i.e. strict convexity, which the page derives); the natural-parameter-space condition is a separate hypothesis. A run of kl-UCB is a pathwise predicate: rounds 1,…,K1,\dots,K1,…,K pull every arm once and later rounds pull an argmax of the index, ties broken by any rule. The arm choices are measurable and non-anticipating (a measurable function of the arms and rewards already observed). The index (12) is a real supremum over a set containing the empirical mean, so it is never a junk value, and the divergence at an empirical mean on the boundary of Iˉ\bar IIˉ is computed in [0,+∞][0,+\infty][0,+∞]. Statement (13) is made for t≥2t\ge2t≥2: at t=1t=1t=1 its printed right-hand side is 000.

A trivializing formalization is ruled out: the run predicate forces both initialization and argmax, the index sets are nonempty and bounded, the reward stack is independent under the probability measure, and the Bernoulli divergence is never evaluated at 000 or 111.

A complete development needs exponential-family calculus (convex conjugate of bbb, continuity of ddd up to the boundary), Chernoff bounds for exponential families, a peeling/maximal inequality for random sample sizes, and the counting arguments of §3.1. The deviation bound and the counting arguments are reusable for every index policy on the platform.

Selected references

  • O. Cappé, A. Garivier, O.-A. Maillard, R. Munos, G. Stoltz, Kullback–Leibler upper confidence bounds for optimal sequential allocation, Ann. Statist. 41(3):1516–1541, 2013. https://doi.org/10.1214/13-AOS1119 ; arXiv:1210.1136v4, https://arxiv.org/abs/1210.1136
  • T. L. Lai, H. Robbins, Asymptotically efficient adaptive allocation rules, Adv. Appl. Math. 6:4–22, 1985. https://doi.org/10.1016/0196-8858(85)90002-8
  • P. Auer, N. Cesa-Bianchi, P. Fischer, Finite-time analysis of the multiarmed bandit problem, Mach. Learn. 47:235–256, 2002. https://doi.org/10.1023/A:1013689704352
  • A. Garivier, O. Cappé, The KL-UCB algorithm for bounded stochastic bandits and beyond, COLT 2011. https://arxiv.org/abs/1102.2490
  • R. Agrawal, Sample mean based index policies with O(log n) regret for the multi-armed bandit problem, Adv. Appl. Probab. 27:1054–1078, 1995. https://doi.org/10.2307/1427934
12 thms1 active userReviewed
Machine LearningOperations ResearchProbability·Captain: mikedeng1

The Best of Both Worlds: Stochastic and Adversarial Bandits: SAO Has Pseudo-Regret O(K log K log²β/Δ) on Stochastic Rewards and Regret Õ(√(nK)) Against Adaptive AdversariesResearch Paper

Motivation

In a multi-armed bandit problem a learner chooses one of KKK actions in each of nnn rounds and observes only the reward of the chosen action. Two models of the rewards have separate theories. In the stochastic model, each arm pays independent draws from a fixed distribution; algorithms such as UCB1 (Auer, Cesa-Bianchi & Fischer 2002) have regret of order ∑ilog⁡(n)/Δi\sum_i \log(n)/\Delta_i∑i​log(n)/Δi​, logarithmic in nnn. In the adversarial model, an adversary chooses the rewards; Exp3 and its variants (Auer, Cesa-Bianchi, Freund & Schapire 2002) have regret of order nK\sqrt{nK}nK​, which is optimal there. An algorithm tuned for one model fails in the other: stochastic algorithms can suffer linear regret against an adversary, and adversarial algorithms pay n\sqrt nn​ even when the rewards are i.i.d.

Bubeck and Slivkins (arXiv:1202.4473, COLT 2012) asked whether one algorithm can be near-optimal in both models without knowing which one it faces. They answered yes with the algorithm SAO. This result started the "best of both worlds" line of work on bandits. Later contributions include EXP3++ (Seldin & Slivkins 2014) and Tsallis-INF (Zimmert & Seldin 2021).

Setting

There are K≥2K\ge2K≥2 arms and n≥Kn\ge Kn≥K rounds. On round ttt the algorithm draws an arm ItI_tIt​ from a probability vector pt=(p1,t,…,pK,t)p_t=(p_{1,t},\dots,p_{K,t})pt​=(p1,t​,…,pK,t​) computed from the history it has observed. At the same time a reward vector gt∈[0,1]Kg_t\in[0,1]^Kgt​∈[0,1]K is fixed, and the algorithm observes only gIt,tg_{I_t,t}gIt​,t​.

  • Adversarial model. The vector gtg_tgt​ is chosen by an adaptive adversary: a function of the arms I1,…,It−1I_1,\dots,I_{t-1}I1​,…,It−1​ played earlier, but not of ItI_tIt​. The regret is Rn=max⁡i∑t=1ngi,t−∑t=1ngIt,tR_n=\max_i\sum_{t=1}^n g_{i,t}-\sum_{t=1}^n g_{I_t,t}Rn​=maxi​∑t=1n​gi,t​−∑t=1n​gIt​,t​.
  • Stochastic model. There are distributions ν1,…,νK\nu_1,\dots,\nu_Kν1​,…,νK​ on [0,1][0,1][0,1] with means μi\mu_iμi​, and all gi,t∼νig_{i,t}\sim\nu_igi,t​∼νi​ are independent. The pseudo-regret is R‾n=∑t=1n(max⁡iμi−μIt)\overline R_n=\sum_{t=1}^n(\max_i\mu_i-\mu_{I_t})Rn​=∑t=1n​(maxi​μi​−μIt​​). The gap of arm iii is Δi=max⁡jμj−μi\Delta_i=\max_j\mu_j-\mu_iΔi​=maxj​μj​−μi​, and the minimal gap is Δ=min⁡i:Δi>0Δi\Delta=\min_{i:\Delta_i>0}\Delta_iΔ=mini:Δi​>0​Δi​.

The analysis uses importance-weighted estimates H~i,t=1t∑s≤tgi,s1{Is=i}/pi,s\widetilde H_{i,t}=\frac1t\sum_{s\le t}g_{i,s}\mathbb 1_{\{I_s=i\}}/p_{i,s}Hi,t​=t1​∑s≤t​gi,s​1{Is​=i}​/pi,s​, the sample means H^i,t\widehat H_{i,t}Hi,t​, the averages Hi,t=1t∑s≤tgi,sH_{i,t}=\frac1t\sum_{s\le t}g_{i,s}Hi,t​=t1​∑s≤t​gi,s​, and the play counts Ti(t)T_i(t)Ti​(t).

SAO (Algorithm 1 of the paper) takes a parameter β>1\beta>1β>1. It keeps a set of active arms, initially all arms, and samples them uniformly at first. On each round it applies a test, (12), that deactivates an arm whose estimate H~i,t\widetilde H_{i,t}Hi,t​ falls far below the best active one. The probability of a deactivated arm then decays as qiτi/tq_i\tau_i/tqi​τi​/t, where τi\tau_iτi​ is the deactivation time and qiq_iqi​ the arm's probability at that moment. Three further tests, (13)–(15), check that the observations stay consistent with stochastic rewards. If any of them fails on round τ0\tau_0τ0​, SAO switches permanently to the adversarial algorithm Exp3.P (Bubeck & Cesa-Bianchi 2012, Fig. 3.1) for the remaining rounds.

Formalization targets

Goal: Theorem 4.1, high-probability form

For every δ∈(0,1)\delta\in(0,1)δ∈(0,1) let β=10Kn3δ−1\beta=10Kn^3\delta^{-1}β=10Kn3δ−1. With probability at least 1−δ1-\delta1−δ, SAO with parameter β\betaβ satisfies, in the stochastic model (whenever some arm has Δi>0\Delta_i>0Δi​>0),

R‾n≤260K(1+log⁡K)log⁡2(β)Δ,\overline R_n\le\frac{260K(1+\log K)\log^2(\beta)}{\Delta},Rn​≤Δ260K(1+logK)log2(β)​,

and, against every adaptive adversary with rewards in [0,1][0,1][0,1],

Rn≤60(1+log⁡K)(1+log⁡n)nKlog⁡(β)+5K2log⁡2(β)+200K2log⁡2(β).R_n\le60(1+\log K)(1+\log n)\sqrt{nK\log(\beta)+5K^2\log^2(\beta)}+200K^2\log^2(\beta).Rn​≤60(1+logK)(1+logn)nKlog(β)+5K2log2(β)​+200K2log2(β).

Milestones

The milestones follow the paper's proof in order:

  • Freedman's inequality (Theorem 4.3) in the paper's two-sided form, and its variance-adaptive form, Lemma 4.4.
  • The concentration lemmas for SAO's estimates (Lemmas 4.5, 4.6, 4.7) and the Exp3.P phase (Lemma 4.8).
  • The two good events of §4.1, (21)–(25).
  • The deterministic consequences on those events: Exp3.P is never started in the stochastic model; suboptimal arms are deactivated by time 260Klog⁡(β)/Δi2260K\log(\beta)/\Delta_i^2260Klog(β)/Δi2​; ∑iqi≤1+log⁡K\sum_iq_i\le1+\log K∑i​qi​≤1+logK, (27); and the adversarial regret bound of §4.3.
  • The two halves of Theorem 4.1.

Significance

The theorem shows that the stochastic and adversarial regret rates are not in conflict. A single algorithm, with no information about the model, gets O(Klog⁡Klog⁡2(n/δ)/Δ)O(K\log K\log^2(n/\delta)/\Delta)O(KlogKlog2(n/δ)/Δ) pseudo-regret on stochastic rewards and O~(nK)\tilde O(\sqrt{nK})O~(nK​) regret against adaptive adversaries. Each rate is within polylogarithmic factors of optimal for its model. Later algorithms improved the logarithmic factors and removed the explicit switching, but they are compared against this result.

The theorem is proved in the paper. It is not known to have a machine-checked proof. Formalizing it requires a precise model of an adaptive adversary interacting with a randomized algorithm, martingale concentration with random variance (Lemma 4.4), and an exact statement of SAO including its boundary cases. The pieces are reusable: the interaction model, the estimators, Exp3.P and its high-probability guarantee all apply to other adversarial bandit results.

Difficulty

Neither standard analysis carries over. In the stochastic model, SAO's sampling probabilities are random and depend on the past, and a deactivated arm's probability keeps changing. Hoeffding-type bounds for a fixed sampling scheme therefore do not apply to H~i,t\widetilde H_{i,t}Hi,t​. The variance of the importance-weighted estimate grows like ∑s1/pi,s\sum_s1/p_{i,s}∑s​1/pi,s​, which is controlled only through the algorithm's own schedule (16). This is why Lemma 4.5 has the two-part radius with max⁡(t−τi,0)/(qiτit)\max(t-\tau_i,0)/(q_i\tau_it)max(t−τi​,0)/(qi​τi​t). In the adversarial model, the deterministic argument has to show that whenever the consistency tests pass, the regret accumulated before the switch is already small, for an adversary that adapts to the arms played. A union bound over all quantities, all arms and all times (§4.1) is needed before any deterministic reasoning, so every constant in the event matters.

Formalization scope

All declarations live in the namespace BestBothWorlds.SAO.

  • Arms and paths. Arms are Fin K and rounds are 1,…,n1,\dots,n1,…,n. An arm path is Fin n → Fin K.
  • Algorithms and adversaries. An algorithm is a deterministic map from the observed history to a probability vector. A deterministic adaptive adversary is a map from the list of earlier arms to a reward vector; randomized adversaries are mixtures of these.
  • Probabilities. For a fixed adversary, the probability of an event is ∑I∈E∏tpIt,t\sum_{I\in E}\prod_tp_{I_t,t}∑I∈E​∏t​pIt​,t​. In the stochastic model this is integrated against the product law of the reward table.
  • Logarithms and constants. Real.log is the natural logarithm. All constants of Theorem 4.1 are explicit, with β=10Kn3δ−1\beta=10Kn^3\delta^{-1}β=10Kn3δ−1.
  • SAO. It is defined exactly as Algorithm 1. Arms are tested in order within a round, and the active set changes during the loop. Test (13) is false when Ti(t)=0T_i(t)=0Ti​(t)=0, and test (14) is false when τi=1\tau_i=1τi​=1.
  • Exp3.P. After the switch, Exp3.P runs from scratch for n−τ0n-\tau_0n−τ0​ rounds. Its parameters are those of Bubeck–Cesa-Bianchi Theorem 3.2 with confidence K/βK/\betaK/β, and γ\gammaγ and βP\beta_{\mathrm P}βP​ are clipped at 111.
  • §4 notation. τ0\tau_0τ0​, τi←min⁡(τi,τ0)\tau_i\leftarrow\min(\tau_i,\tau_0)τi​←min(τi​,τ0​) and qi=pi,min⁡(τi,τ0)q_i=p_{i,\min(\tau_i,\tau_0)}qi​=pi,min(τi​,τ0​)​ are computed from the run, never assumed.

A trivializing formalization is ruled out. The goal's hypotheses concern only the instance (KKK, nnn, δ\deltaδ, the distributions or the adversary). The algorithm's quantities (τ0\tau_0τ0​, τi\tau_iτi​, qiq_iqi​, the sampling probabilities) are computed by the definition of SAO and are never free variables or hypotheses. The adversarial half covers adaptive adversaries, not only oblivious reward tables.

The expectation form of Theorem 4.1 (O(⋅)O(\cdot)O(⋅) bounds with β=n4\beta=n^4β=n4), Theorem 1.1 and the two-armed warm-up of §3 are out of scope. Proofs of any milestone are welcome, as are alternative proofs of the concentration lemmas from Mathlib's martingale library.

Selected references

  • S. Bubeck and A. Slivkins, The best of both worlds: stochastic and adversarial bandits, COLT 2012; arXiv:1202.4473v1. https://arxiv.org/abs/1202.4473
  • S. Bubeck and N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012. https://doi.org/10.1561/2200000024
  • D. A. Freedman, On tail probabilities for martingales, Annals of Probability 3(1), 1975. https://doi.org/10.1214/aop/1176996452
  • P. Auer, N. Cesa-Bianchi and P. Fischer, Finite-time analysis of the multiarmed bandit problem, Machine Learning 47, 2002. https://doi.org/10.1023/A:1013689704352
  • P. Auer, N. Cesa-Bianchi, Y. Freund and R. E. Schapire, The nonstochastic multiarmed bandit problem, SIAM Journal on Computing 32(1), 2002. https://doi.org/10.1137/S0097539701398375
  • Y. Seldin and A. Slivkins, One practical algorithm for both stochastic and adversarial bandits, ICML 2014. https://proceedings.mlr.press/v32/seldinb14.html
  • J. Zimmert and Y. Seldin, Tsallis-INF: an optimal algorithm for stochastic and adversarial bandits, JMLR 22, 2021. https://jmlr.org/papers/v22/19-753.html
20 thms1 active userReviewed
Machine LearningOperations Research·Captain: mikedeng1

Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems I: Pseudo-Regret of (α, ψ)-UCBTextbook

Motivation

The stochastic multi-armed bandit is the basic model of sequential decisions under uncertainty with partial feedback: a forecaster repeatedly picks one of KKK options and observes only the reward of the option it picked. It models clinical trials, ad placement, routing and dynamic pricing, and is the building block of many reinforcement-learning algorithms. The question is how much reward is lost, compared with always playing the best option, through having to learn which option is best.

Chapter 2 of Bubeck and Cesa-Bianchi's monograph (arXiv:1204.5721v2) answers this for upper confidence bound (UCB) strategies.

  • Lai and Robbins (1985) introduced upper confidence bounds and proved that the number of pulls of a suboptimal arm must grow at least logarithmically, with an explicit constant, for consistent strategies (doi:10.1016/0196-8858(85)90002-8).
  • Agrawal (1995) gave simpler sample-mean-based index policies with logarithmic regret (doi:10.2307/1427934).
  • Auer, Cesa-Bianchi and Fischer (2002) gave the finite-time analysis of UCB1 for bounded rewards (doi:10.1023/A:1013689704352).
  • Bubeck and Cesa-Bianchi (2012) present the (α,ψ)(\alpha,\psi)(α,ψ)-UCB family, whose analysis needs only a bound ψ\psiψ on the cumulant generating function of the rewards, and the Lai–Robbins lower bound for Bernoulli rewards.

Setting

There are K≥2K\ge2K≥2 arms. Arm iii has an unknown reward distribution νi\nu_iνi​ with mean μi\mu_iμi​. At each round t=1,2,…t=1,2,\dotst=1,2,… the forecaster selects an arm ItI_tIt​ based on the past and receives a reward drawn from νIt\nu_{I_t}νIt​​, independently of the past. Write μ∗=max⁡iμi\mu^*=\max_i\mu_iμ∗=maxi​μi​, Δi=μ∗−μi\Delta_i=\mu^*-\mu_iΔi​=μ∗−μi​ for the gap of arm iii, and Ti(n)T_i(n)Ti​(n) for the number of times arm iii is selected in rounds 1,…,n1,\dots,n1,…,n. The pseudo-regret is

R‾n=nμ∗−E∑t=1nμIt=∑i=1KΔi E Ti(n).\overline R_n=n\mu^*-\mathbb E\sum_{t=1}^n\mu_{I_t}=\sum_{i=1}^K\Delta_i\,\mathbb E\,T_i(n).Rn​=nμ∗−Et=1∑n​μIt​​=i=1∑K​Δi​ETi​(n).

Moment condition (2.2). There is a convex ψ:R→R\psi:\mathbb R\to\mathbb Rψ:R→R with ln⁡E eλ(X−EX)≤ψ(λ)\ln\mathbb E\,e^{\lambda(X-\mathbb EX)}\le\psi(\lambda)lnEeλ(X−EX)≤ψ(λ) and ln⁡E eλ(EX−X)≤ψ(λ)\ln\mathbb E\,e^{\lambda(\mathbb EX-X)}\le\psi(\lambda)lnEeλ(EX−X)≤ψ(λ) for all λ≥0\lambda\ge0λ≥0 and every arm's reward XXX. Its Legendre–Fenchel transform is ψ∗(ε)=sup⁡λ∈R(λε−ψ(λ))\psi^*(\varepsilon)=\sup_{\lambda\in\mathbb R}(\lambda\varepsilon-\psi(\lambda))ψ∗(ε)=supλ∈R​(λε−ψ(λ)). For [0,1][0,1][0,1] rewards one may take ψ(λ)=λ2/8\psi(\lambda)=\lambda^2/8ψ(λ)=λ2/8, for which ψ∗(ε)=2ε2\psi^*(\varepsilon)=2\varepsilon^2ψ∗(ε)=2ε2.

(α,ψ)(\alpha,\psi)(α,ψ)-UCB. With μ^i,s\hat\mu_{i,s}μ^​i,s​ the mean of the first sss rewards of arm iii, at round ttt select

It∈argmax⁡i[μ^i,Ti(t−1)+(ψ∗)−1(αln⁡tTi(t−1))].I_t\in\operatorname*{argmax}_{i}\Big[\hat\mu_{i,T_i(t-1)}+(\psi^*)^{-1}\Big(\frac{\alpha\ln t}{T_i(t-1)}\Big)\Big].It​∈iargmax​[μ^​i,Ti​(t−1)​+(ψ∗)−1(Ti​(t−1)αlnt​)].

Formalization targets

Goal: Theorem 2.1 (p. 11)

If the rewards satisfy (2.2), then (α,ψ)(\alpha,\psi)(α,ψ)-UCB with α>2\alpha>2α>2 satisfies, for every nnn,

R‾n≤∑i:Δi>0Δi(αln⁡nψ∗(Δi/2)+αα−2).\overline R_n\le\sum_{i:\Delta_i>0}\Delta_i\Big(\frac{\alpha\ln n}{\psi^*(\Delta_i/2)}+\frac{\alpha}{\alpha-2}\Big).Rn​≤i:Δi​>0∑​Δi​(ψ∗(Δi​/2)αlnn​+α−2α​).

This is the bound the book's proof establishes. The printed statement has α/(α−2)\alpha/(\alpha-2)α/(α−2) in place of Δi α/(α−2)\Delta_i\,\alpha/(\alpha-2)Δi​α/(α−2); see Formalization scope.

Milestones

  • The decomposition R‾n=∑iΔi E Ti(n)\overline R_n=\sum_i\Delta_i\,\mathbb E\,T_i(n)Rn​=∑i​Δi​ETi​(n) (p. 9).
  • The Cramér–Chernoff bound (2.3): P(μi−μ^i,s>ε)≤e−sψ∗(ε)\mathbb P(\mu_i-\hat\mu_{i,s}>\varepsilon)\le e^{-s\psi^*(\varepsilon)}P(μi​−μ^​i,s​>ε)≤e−sψ∗(ε).
  • The three-event lemma (2.5)–(2.7) from the proof of Theorem 2.1.
  • The bounded-reward bound (2.4): R‾n≤∑i:Δi>0(2αΔiln⁡n+αα−2)\overline R_n\le\sum_{i:\Delta_i>0}\big(\frac{2\alpha}{\Delta_i}\ln n+\frac{\alpha}{\alpha-2}\big)Rn​≤∑i:Δi​>0​(Δi​2α​lnn+α−2α​).
  • The comparison (2.8): 2(p−q)2≤kl(p,q)≤(p−q)2/(q(1−q))2(p-q)^2\le\mathrm{kl}(p,q)\le(p-q)^2/(q(1-q))2(p−q)2≤kl(p,q)≤(p−q)2/(q(1−q)).
  • Theorem 2.2: for every strategy with E Ti(n)=o(na)\mathbb E\,T_i(n)=o(n^a)ETi​(n)=o(na) on all Bernoulli instances, lim inf⁡nR‾n/ln⁡n≥∑i:Δi>0Δi/kl(μi,μ∗)\liminf_n\overline R_n/\ln n\ge\sum_{i:\Delta_i>0}\Delta_i/\mathrm{kl}(\mu_i,\mu^*)liminfn​Rn​/lnn≥∑i:Δi​>0​Δi​/kl(μi​,μ∗).

Significance

Theorem 2.1 says that the cost of learning grows only logarithmically in the horizon, with a constant set by how well each suboptimal arm can be told apart from the best one. Theorem 2.2 shows that, up to constants, this cannot be improved: for Bernoulli rewards any strategy that is good on every instance must pay ln⁡n\ln nlnn per suboptimal arm, with constant Δi/kl(μi,μ∗)\Delta_i/\mathrm{kl}(\mu_i,\mu^*)Δi​/kl(μi​,μ∗). By (2.8) this constant is at least of order 1/Δi1/\Delta_i1/Δi​, matching (2.4). Together they are the template for the analysis of most optimistic algorithms: KL-UCB, linear and contextual UCB, and UCB-style reinforcement learning.

All results of the chapter are classical and proved on paper. This mission makes them machine-checked in a common model. That model has an explicit pseudo-regret, an explicit (generalized) inverse of ψ∗\psi^*ψ∗, an explicit initialization rule for the algorithm, and a randomized-strategy model for the lower bound. Later chapters of the series and later papers on optimistic algorithms can build on it.

Difficulty

The deterministic part of the upper bound is short, so the main difficulty is probabilistic. The sample mean μ^i,Ti(t−1)\hat\mu_{i,T_i(t-1)}μ^​i,Ti​(t−1)​ is taken over a random number of samples that depends on the algorithm's past. A Chernoff bound for a fixed sample size does not apply to it directly. The proof needs a union bound over all possible sample sizes, together with the representation in which the sss-th reward of each arm is a fixed random variable. Summing the resulting tail t1−αt^{1-\alpha}t1−α over rounds is where α>2\alpha>2α>2 enters.

The lower bound needs a change-of-measure argument between two Bernoulli instances, applied to a forecaster that may be randomized and never knows the horizon. Expressing "the forecaster cannot distinguish the instances" requires the law of the whole interaction under two environments.

Formalization scope

Model. Arms are Fin K with 2≤K2\le K2≤K, rounds are 1,2,…1,2,\dots1,2,…, and the natural logarithm is used. Rewards are a stack: Xi,kX_{i,k}Xi,k​ is the reward of the (k+1)(k+1)(k+1)-st pull of arm iii, all mutually independent, identically distributed per arm. For every strategy this gives the same law of arms and rewards as the book's protocol. μ∗\mu^*μ∗, Δi\Delta_iΔi​ and Ti(t)T_i(t)Ti​(t) are the published definitions of ImprovedLinBandits.UCBDelta.armModel. The pseudo-regret is (2.1), nμ∗−E∑tμItn\mu^*-\mathbb E\sum_t\mu_{I_t}nμ∗−E∑t​μIt​​, not the expected regret. The arms played are measurable random variables, so that every expectation is genuine.

ψ∗\psi^*ψ∗ and its inverse. ψ∗\psi^*ψ∗ takes values in the extended reals. (ψ∗)−1(y)=inf⁡{ε≥0:ψ∗(ε)≥y}(\psi^*)^{-1}(y)=\inf\{\varepsilon\ge0:\psi^*(\varepsilon)\ge y\}(ψ∗)−1(y)=inf{ε≥0:ψ∗(ε)≥y}.

Algorithm. The index is undefined while Ti(t−1)=0T_i(t-1)=0Ti​(t−1)=0. Unplayed arms are therefore played first, so each arm is played once in rounds 1,…,K1,\dots,K1,…,K. Ties are broken arbitrarily.

Corrected misprint. The book prints Theorem 2.1 with constant term α/(α−2)\alpha/(\alpha-2)α/(α−2). Its proof yields Δi α/(α−2)\Delta_i\,\alpha/(\alpha-2)Δi​α/(α−2) (bound on E Ti(n)\mathbb E\,T_i(n)ETi​(n) times Δi\Delta_iΔi​). The printed form is false for Gaussian rewards with large gaps. The goal states the proof's version. (2.4) is correct as printed because Δi≤1\Delta_i\le1Δi​≤1.

Constants. No O(·) appears in the chapter's statements. The constants are the book's: α/(α−2)\alpha/(\alpha-2)α/(α−2) in Theorem 2.1 and (2.4), and the factor 222 in (2.4) and (2.8).

Conventions made explicit.

  1. ψ(λ)≥ψ(0)\psi(\lambda)\ge\psi(0)ψ(λ)≥ψ(0) for λ≤0\lambda\le0λ≤0. Condition (2.2) constrains ψ\psiψ only on λ≥0\lambda\ge0λ≥0, while ψ∗\psi^*ψ∗ takes the supremum over all of R\mathbb RR. Without this convention, (2.3) and Theorem 2.1 are false (for example ψ(λ)=cλ+λ2/8\psi(\lambda)=c\lambda+\lambda^2/8ψ(λ)=cλ+λ2/8 with large ccc).
  2. ψ∗\psi^*ψ∗ is finite on [0,∞)[0,\infty)[0,∞).
  3. ψ∗(Δi/2)>0\psi^*(\Delta_i/2)>0ψ∗(Δi​/2)>0 for suboptimal arms.
  4. ε≥0\varepsilon\ge0ε≥0 in (2.3).
  5. q∈(0,1)q\in(0,1)q∈(0,1) in (2.8).

Conventions 1–3 hold for every ψ\psiψ the book uses.

Theorem 2.2. The forecaster is a measurable rule from the history and a fresh uniform seed to an arm. It does not depend on the horizon. Consistency is required on every Bernoulli instance, every suboptimal arm and every a>0a>0a>0. A term with μ∗=1\mu^*=1μ∗=1 (kl=+∞\mathrm{kl}=+\inftykl=+∞) is 000, and the lim inf⁡\liminfliminf is taken in the extended reals. The book proves only K=2K=2K=2.

Ruled out. The algorithm cannot see unplayed rewards (its index uses only the sample means of rewards already received). Non-measurable arm choices, which would make the expectations vanish in Lean, are excluded. Consistency cannot be assumed only on the instance of the conclusion.

Needed infrastructure. Cramér–Chernoff bounds for sums of i.i.d. variables, Hoeffding's lemma, the stack representation of bandit interactions, and the divergence decomposition for randomized strategies. All are reusable beyond this mission, and contributions of any of them are welcome.

Selected references

  • S. Bubeck, N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012. arXiv:1204.5721v2, doi:10.1561/2200000024
  • T. L. Lai, H. Robbins, Asymptotically efficient adaptive allocation rules, Advances in Applied Mathematics 6, 1985. doi:10.1016/0196-8858(85)90002-8
  • R. Agrawal, Sample mean based index policies with O(log n) regret for the multi-armed bandit problem, Advances in Applied Probability 27, 1995. doi:10.2307/1427934
  • P. Auer, N. Cesa-Bianchi, P. Fischer, Finite-time analysis of the multiarmed bandit problem, Machine Learning 47, 2002. doi:10.1023/A:1013689704352
12 thms1 active userReviewed
Convex OptimizationMachine LearningOperations Research+1·Captain: mikedeng1

Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems IV: Online Stochastic Mirror Descent for Combinatorial Semi-BanditsTextbook

Motivation

Many sequential decision problems ask a learner to choose, round after round, a combination of items: a set of mmm ads out of ddd, a path in a network, a matching. After each choice the learner sees the loss of the items it used, not of those it did not. This is online combinatorial optimization with semi-bandit feedback. It contains the classical adversarial multi-armed bandit (choose one of ddd arms) and is a standard model in online advertising, routing and ranking.

Chapter 5 of Bubeck and Cesa-Bianchi's monograph arXiv:1204.5721v2 treats this problem with one algorithm, Online Stochastic Mirror Descent (OSMD). Every regret bound in the chapter comes from a single mirror-descent inequality, specialized through the choice of a convex "regularizer". The chapter's capstone, Theorem 5.7, shows that a polynomial regularizer gives pseudo-regret O(mdn)O(\sqrt{mdn})O(mdn​) with no logarithmic factor. For m=1m=1m=1 this is the minimax-optimal rate of the adversarial bandit, first attained by the INF strategy of Audibert and Bubeck (2009). The semi-bandit version is due to Audibert, Bubeck and Lugosi (2014).

Setting

Vectors live in Rd\mathbb R^dRd. The arm set is a nonempty C⊆{0,1}d\mathcal C\subseteq\{0,1\}^dC⊆{0,1}d with ∥v∥1=m\|v\|_1=m∥v∥1​=m for every v∈Cv\in\mathcal Cv∈C, and K=Conv(C)\mathcal K=\mathrm{Conv}(\mathcal C)K=Conv(C). An oblivious adversary fixes loss vectors ℓ1,…,ℓn∈[0,1]d\ell_1,\dots,\ell_n\in[0,1]^dℓ1​,…,ℓn​∈[0,1]d. In round ttt the learner plays a random arm vt∈Cv_t\in\mathcal Cvt​∈C, pays ℓt⊤vt\ell_t^\top v_tℓt⊤​vt​, and observes (ℓt(1)vt(1),…,ℓt(d)vt(d))(\ell_t(1)v_t(1),\dots,\ell_t(d)v_t(d))(ℓt​(1)vt​(1),…,ℓt​(d)vt​(d)). The pseudo-regret is

Rˉn=E∑t=1nℓt⊤vt−min⁡x∈K∑t=1nℓt⊤x.\bar R_n=\mathbb E\sum_{t=1}^n\ell_t^\top v_t-\min_{x\in\mathcal K}\sum_{t=1}^n\ell_t^\top x .Rˉn​=Et=1∑n​ℓt⊤​vt​−x∈Kmin​t=1∑n​ℓt⊤​x.

A Legendre function on Dˉ\bar DDˉ, for a nonempty open convex DDD, is a continuous F:Dˉ→RF:\bar D\to\mathbb RF:Dˉ→R that is strictly convex and C1C^1C1 on DDD and whose gradient norm tends to +∞+\infty+∞ at Dˉ∖D\bar D\setminus DDˉ∖D. Its Bregman divergence is DF(x,y)=F(x)−F(y)−(x−y)⊤∇F(y)D_F(x,y)=F(x)-F(y)-(x-y)^\top\nabla F(y)DF​(x,y)=F(x)−F(y)−(x−y)⊤∇F(y), and its Legendre–Fenchel transform is F∗(u)=sup⁡x∈Dˉ(x⊤u−F(x))F^*(u)=\sup_{x\in\bar D}(x^\top u-F(x))F∗(u)=supx∈Dˉ​(x⊤u−F(x)).

Online Mirror Descent with learning rate η>0\eta>0η>0 and vectors gtg_tgt​ starts at x1∈arg⁡min⁡KFx_1\in\arg\min_{\mathcal K}Fx1​∈argminK​F. It then sets ∇F(wt+1)=∇F(xt)−ηgt\nabla F(w_{t+1})=\nabla F(x_t)-\eta g_t∇F(wt+1​)=∇F(xt​)−ηgt​ and xt+1=arg⁡min⁡y∈KDF(y,wt+1)x_{t+1}=\arg\min_{y\in\mathcal K}D_F(y,w_{t+1})xt+1​=argminy∈K​DF​(y,wt+1​). OSMD uses a random estimate gt=ℓ~tg_t=\tilde\ell_tgt​=ℓ~t​ of the loss. In the semi-bandit case it plays vtv_tvt​ with E[vt∣xt]=xt\mathbb E[v_t\mid x_t]=x_tE[vt​∣xt​]=xt​ and uses

ℓ~t(i)=ℓt(i) vt(i)xt(i).(5.5)\tilde\ell_t(i)=\frac{\ell_t(i)\,v_t(i)}{x_t(i)}. \tag{5.5}ℓ~t​(i)=xt​(i)ℓt​(i)vt​(i)​.(5.5)

A 000-potential is a convex, C1C^1C1, increasing ψ:(−∞,a)→(0,∞)\psi:(-\infty,a)\to(0,\infty)ψ:(−∞,a)→(0,∞) with ψ(−∞)=0\psi(-\infty)=0ψ(−∞)=0, ψ(a−)=+∞\psi(a^-)=+\inftyψ(a−)=+∞ and ∫01∣ψ−1∣<∞\int_0^1|\psi^{-1}|<\infty∫01​∣ψ−1∣<∞. It defines the Legendre function Fψ(x)=∑i∫0xiψ−1(s) dsF_\psi(x)=\sum_i\int_0^{x_i}\psi^{-1}(s)\,dsFψ​(x)=∑i​∫0xi​​ψ−1(s)ds on [0,∞)d[0,\infty)^d[0,∞)d. With ψ=exp⁡\psi=\expψ=exp this is the negative entropy.

Formalization targets

Goal: Theorem 5.7 (p. 80)

For every 000-potential ψ\psiψ and non-negative unbiased estimates,

Rˉn≤sup⁡KFψ−Fψ(x1)η+η2∑t=1n∑i=1dE[ℓ~t(i)2(ψ−1)′(xt(i))].\bar R_n\le\frac{\sup_{\mathcal K}F_\psi-F_\psi(x_1)}{\eta}+\frac\eta2\sum_{t=1}^n\sum_{i=1}^d\mathbb E\left[\frac{\tilde\ell_t(i)^2}{(\psi^{-1})'(x_t(i))}\right].Rˉn​≤ηsupK​Fψ​−Fψ​(x1​)​+2η​t=1∑n​i=1∑d​E[(ψ−1)′(xt​(i))ℓ~t​(i)2​].

For ψ(x)=(−x)−q\psi(x)=(-x)^{-q}ψ(x)=(−x)−q with q>1q>1q>1, the estimate (5.5) and η=2q−1 m1−2/q/(n d1−2/q)\eta=\sqrt{\tfrac{2}{q-1}\,m^{1-2/q}/(n\,d^{1-2/q})}η=q−12​m1−2/q/(nd1−2/q)​,

Rˉn≤q2q−1 mdn,and  Rˉn≤22mdn  at q=2.\bar R_n\le q\sqrt{\tfrac{2}{q-1}\,mdn},\qquad\text{and }\ \bar R_n\le2\sqrt{2mdn}\ \text{ at }q=2.Rˉn​≤qq−12​mdn​,and  Rˉn​≤22mdn​  at q=2.

Milestones

  1. Lemma 5.1: F∗∗=FF^{**}=FF∗∗=F, ∇F∗=(∇F)−1\nabla F^*=(\nabla F)^{-1}∇F∗=(∇F)−1 on D∗D^*D∗, and DF(x,y)=DF∗(∇F(y),∇F(x))D_F(x,y)=D_{F^*}(\nabla F(y),\nabla F(x))DF​(x,y)=DF∗​(∇F(y),∇F(x)).
  2. Lemma 5.2: existence, uniqueness and the Pythagorean inequality of Bregman projections.
  3. Theorem 5.3: ∑tℓt(xt)−∑tℓt(x)≤F(x)−F(x1)η+1η∑tDF∗(∇F(xt)−η∇ℓt(xt),∇F(xt))\sum_t\ell_t(x_t)-\sum_t\ell_t(x)\le\frac{F(x)-F(x_1)}\eta+\frac1\eta\sum_tD_{F^*}(\nabla F(x_t)-\eta\nabla\ell_t(x_t),\nabla F(x_t))∑t​ℓt​(xt​)−∑t​ℓt​(x)≤ηF(x)−F(x1​)​+η1​∑t​DF∗​(∇F(xt​)−η∇ℓt​(xt​),∇F(xt​)).
  4. Theorem 5.5, linear losses, and its corrected general form.
  5. Lemma 5.3: FψF_\psiFψ​ is Legendre and DFψ∗(u,v)≤12∑iψ′(vi)(ui−vi)2D_{F_\psi^*}(u,v)\le\frac12\sum_i\psi'(v_i)(u_i-v_i)^2DFψ∗​​(u,v)≤21​∑i​ψ′(vi​)(ui​−vi​)2 for u≤vu\le vu≤v.
  6. Theorem 5.6: with the negative entropy, Rˉn≤2mdnln⁡(d/m)\bar R_n\le\sqrt{2mdn\ln(d/m)}Rˉn​≤2mdnln(d/m)​.

Significance

Theorem 5.7 is the sharpest semi-bandit bound in the monograph. It shows that removing the ln⁡(d/m)\sqrt{\ln(d/m)}ln(d/m)​ factor of the exponential-weights analysis (Theorem 5.6) is a matter of the regularizer, not of a new algorithm. The same OSMD template gives the Euclidean-ball bound of Theorem 5.8 and is reused for bandit convex optimization in Chapter 6. Lemma 5.1, Lemma 5.2 and Theorem 5.3 are the standard mirror-descent toolkit, used throughout online learning and optimization.

All results of the chapter are proved in the book. Lemmas 5.1 and 5.2 are cited from Cesa-Bianchi and Lugosi (2006). None of them is formalized on Prove2Me. The published mirror-descent bound of Bandit Algorithms XII treats linear losses with a comparator inside DDD and Euclidean-space vectors; it is not Theorem 5.3. The mission adds a machine-checked version of the whole chain, from Legendre duality to the explicit constant q2mdn/(q−1)q\sqrt{2mdn/(q-1)}q2mdn/(q−1)​, with two of the printed statements corrected (below).

Difficulty

The pathwise mirror-descent inequality is a telescoping argument, but several of its steps rest on convex analysis that Mathlib does not package. One is the existence and interior location of Bregman projections onto a set that touches the boundary of DDD. Another is the differentiability of F∗F^*F∗ on the open dual space and the identity ∇F∗=(∇F)−1\nabla F^*=(\nabla F)^{-1}∇F∗=(∇F)−1. A third is the closed form of Fψ∗F_\psi^*Fψ∗​ for a potential defined through an improper integral of ψ−1\psi^{-1}ψ−1.

The probabilistic step is not a martingale argument. Only conditioning on the current iterate xtx_txt​ is available. The estimate (5.5) divides by xt(i)x_t(i)xt​(i), so its integrability and unbiasedness have to be derived from the fact that the iterates stay in the open orthant. Finally, the explicit constant requires a Hölder step, ∑ix1(i)1−1/q≤m(q−1)/qd1/q\sum_ix_1(i)^{1-1/q}\le m^{(q-1)/q}d^{1/q}∑i​x1​(i)1−1/q≤m(q−1)/qd1/q, and the matching bound ∑ixt(i)1/q≤m1/qd1−1/q\sum_ix_t(i)^{1/q}\le m^{1/q}d^{1-1/q}∑i​xt​(i)1/q≤m1/qd1−1/q.

Formalization scope

Vectors are Fin d → ℝ. The arm set is a Set of 0/10/10/1 vectors with coordinate sum mmm, and K\mathcal KK is convexHull ℝ C. Rounds are t=1,…,nt=1,\dots,nt=1,…,n, sums run over Finset.Icc 1 n, and index 000 is unused. A randomized run is a family of measurable processes xt,vt,ℓ~t,wtx_t, v_t, \tilde\ell_t, w_txt​,vt​,ℓ~t​,wt​ on a probability space, with the deterministic OMD recursion holding on every sample path. E[⋅∣xt]\mathbb E[\cdot\mid x_t]E[⋅∣xt​] is the coordinatewise conditional expectation given σ(xt)\sigma(x_t)σ(xt​), which is exactly what the book's proofs use. Losses are oblivious, so Rˉn≤B\bar R_n\le BRˉn​≤B is stated as "for every x∈Kx\in\mathcal Kx∈K, E∑tℓt⊤vt−∑tℓt⊤x≤B\mathbb E\sum_t\ell_t^\top v_t-\sum_t\ell_t^\top x\le BE∑t​ℓt⊤​vt​−∑t​ℓt⊤​x≤B". F∗F^*F∗ is valued in EReal, and DF∗D_{F^*}DF∗​ is evaluated only on the open dual space, where F∗F^*F∗ is finite. Wherever an expectation of a possibly non-integrable quantity appears on a right-hand side, its integrability is assumed: the book's bound is then +∞+\infty+∞ and trivial, while Lean's integral would be 000.

Corrections and instantiations, each labelled in the item's Formalization Note:

  • Theorem 5.7, corrected misprint. The book prints η=2q−1m1−2/qd1−2/q\eta=\sqrt{\frac2{q-1}\frac{m^{1-2/q}}{d^{1-2/q}}}η=q−12​d1−2/qm1−2/q​​. The proof (p. 81) gives the stated bound only for η=2q−1m1−2/qn d1−2/q\eta=\sqrt{\frac2{q-1}\frac{m^{1-2/q}}{n\,d^{1-2/q}}}η=q−12​nd1−2/qm1−2/q​​, which is stated. At q=2q=2q=2 this is η=2/n\eta=\sqrt{2/n}η=2/n​.
  • Theorem 5.5, corrected misprint. In the first bound the book prints E[∥xt−x~t∥ ∥g~t∥∗]\mathbb E[\|x_t-\tilde x_t\|\,\|\tilde g_t\|_*]E[∥xt​−x~t​∥∥g~​t​∥∗​]. That statement fails for ℓt(x)=x2\ell_t(x)=x^2ℓt​(x)=x2 on [−1,1][-1,1][−1,1] with F=x2/2F=x^2/2F=x2/2 and x~t=±1\tilde x_t=\pm1x~t​=±1. The version stated uses ∥∇ℓt(x~t)∥∗\|\nabla\ell_t(\tilde x_t)\|_*∥∇ℓt​(x~t​)∥∗​, as the proof's first inequality does. The linear-loss bound is stated as printed.
  • Lemma 5.2. "For all z∈K∩Dz\in K\cap Dz∈K∩D" is read as "for the projection zzz", which lies in K∩DK\cap DK∩D.
  • Hypotheses made explicit: q>1q>1q>1; non-negativity of the estimates in Theorem 5.6 (used in its proof); unbiasedness E[ℓ~t∣xt]=ℓt\mathbb E[\tilde\ell_t\mid x_t]=\ell_tE[ℓ~t​∣xt​]=ℓt​ in the general parts of Theorems 5.6 and 5.7; K∩(0,∞)d≠∅\mathcal K\cap(0,\infty)^d\ne\emptysetK∩(0,∞)d=∅ (OMD's requirement K∩D≠∅K\cap D\ne\emptysetK∩D=∅); a subgradient selection as an explicit input.
  • Theorem 5.6's particular bound uses the book's η=2mndln⁡dm\eta=\sqrt{\frac{2m}{nd}\ln\frac dm}η=nd2m​lnmd​​ as printed. There are no O(·) constants in the chapter's statements.

A trivializing formalization would let η\etaη, xtx_txt​ or the estimate be junk values: an OSMD step at η=0\eta=0η=0, a Lean division x/0=0x/0=0x/0=0, or a regret written as a real infimum over an unbounded set. Here every run is the book's algorithm on the open orthant, and each bound is stated against every comparator in K\mathcal KK.

Reusable beyond this mission: the Legendre/Bregman layer, the OMD run predicate and the ω\omegaω-potential layer. Proofs of Lemmas 5.1 and 5.2 in this generality would be welcome additions to the library.

Selected references

  • S. Bubeck, N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012; arXiv:1204.5721v2. https://arxiv.org/abs/1204.5721
  • N. Cesa-Bianchi, G. Lugosi, Prediction, Learning, and Games, Cambridge University Press, 2006. https://doi.org/10.1017/CBO9780511546921
  • J.-Y. Audibert, S. Bubeck, Regret bounds and minimax policies under partial monitoring, Journal of Machine Learning Research 11, 2010. https://www.jmlr.org/papers/v11/audibert10a.html
  • J.-Y. Audibert, S. Bubeck, G. Lugosi, Regret in online combinatorial optimization, Mathematics of Operations Research 39(1), 2014. https://doi.org/10.1287/moor.2013.0598
12 thms1 active userReviewed
Machine LearningOperations Research·Captain: mikedeng1

Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems II: High-Probability and Expected Regret of Exp3.PTextbook

Motivation

In the adversarial (non-stochastic) multi-armed bandit problem a forecaster repeatedly chooses one of KKK actions while an opponent sets the rewards, and only the reward of the chosen action is revealed. The model was proposed as a way of playing an unknown repeated game: Baños (1968) studied the repeated game in which the player observes only its own payoff, which is exactly the bandit problem against an opponent who reacts to the player's past moves. It is the basic model of online decision making under partial feedback without statistical assumptions, and it underlies regret minimization in games, adversarial routing and online advertising. Chapter 3 of Bubeck and Cesa-Bianchi's monograph (arXiv:1204.5721v2) collects its fundamental results: the Exp3 forecaster of Auer, Cesa-Bianchi, Freund and Schapire (SIAM J. Comput. 2002), its high-probability variant Exp3.P, and the nK\sqrt{nK}nK​ minimax lower bound.

Setting

There are K≥2K \ge 2K≥2 arms and rounds t=1,2,…,nt = 1, 2, \dots, nt=1,2,…,n. At each round an adversary assigns a gain gi,t∈[0,1]g_{i,t} \in [0,1]gi,t​∈[0,1] to every arm iii; the forecaster picks an arm ItI_tIt​, possibly at random, and observes only gIt,tg_{I_t,t}gIt​,t​. The adversary may be non-oblivious (adaptive): gi,t=gi,t(I1,…,It−1)g_{i,t} = g_{i,t}(I_1,\dots,I_{t-1})gi,t​=gi,t​(I1​,…,It−1​) may depend on the forecaster's past actions. A forecaster rule maps the past actions to a probability vector ptp_tpt​ on the arms, and a run is a sequence of random arms with It∼ptI_t \sim p_tIt​∼pt​ given the past. The regret is the random variable

Rn=max⁡i=1,…,K∑t=1ngi,t−∑t=1ngIt,t,R_n = \max_{i=1,\dots,K}\sum_{t=1}^n g_{i,t} - \sum_{t=1}^n g_{I_t,t},Rn​=i=1,…,Kmax​t=1∑n​gi,t​−t=1∑n​gIt​,t​,

and, in the loss version ℓi,t∈[0,1]\ell_{i,t} \in [0,1]ℓi,t​∈[0,1], the pseudo-regret is R‾n=E∑tℓIt,t−min⁡iE∑tℓi,t\overline R_n = \mathbb E\sum_t \ell_{I_t,t} - \min_i \mathbb E\sum_t \ell_{i,t}Rn​=E∑t​ℓIt​,t​−mini​E∑t​ℓi,t​. Since the maximum sits inside the expectation, R‾n≤ERn\overline R_n \le \mathbb E R_nRn​≤ERn​ in the gain version, and against an adaptive adversary the two can differ.

Exp3 draws ItI_tIt​ from exponential weights pi,t+1∝exp⁡(−ηtL~i,t)p_{i,t+1} \propto \exp(-\eta_t \tilde L_{i,t})pi,t+1​∝exp(−ηt​L~i,t​) of importance-weighted cumulative loss estimates L~i,t=∑s≤tℓi,s1Is=i/pi,s\tilde L_{i,t} = \sum_{s \le t} \ell_{i,s}\mathbb 1_{I_s = i}/p_{i,s}L~i,t​=∑s≤t​ℓi,s​1Is​=i​/pi,s​. Exp3.P uses biased gain estimates g~i,t=(gi,t1It=i+β)/pi,t\tilde g_{i,t} = (g_{i,t}\mathbb 1_{I_t=i} + \beta)/p_{i,t}g~​i,t​=(gi,t​1It​=i​+β)/pi,t​ and mixes in the uniform distribution:

pi,t+1=(1−γ)exp⁡(ηG~i,t)∑kexp⁡(ηG~k,t)+γK,G~i,t=∑s=1tg~i,s.p_{i,t+1} = (1-\gamma)\frac{\exp(\eta\tilde G_{i,t})}{\sum_k \exp(\eta \tilde G_{k,t})} + \frac{\gamma}{K}, \qquad \tilde G_{i,t} = \sum_{s=1}^t \tilde g_{i,s}.pi,t+1​=(1−γ)∑k​exp(ηG~k,t​)exp(ηG~i,t​)​+Kγ​,G~i,t​=s=1∑t​g~​i,s​.

Formalization targets

Goal: Theorem 3.3 (expected regret of Exp3.P)

With β=ln⁡K/(nK)\beta = \sqrt{\ln K/(nK)}β=lnK/(nK)​, η=0.95ln⁡K/(nK)\eta = 0.95\sqrt{\ln K/(nK)}η=0.95lnK/(nK)​, γ=1.05Kln⁡K/n\gamma = 1.05\sqrt{K\ln K/n}γ=1.05KlnK/n​, against every adaptive adversary,

ERn≤5.15nKln⁡K+nKln⁡K.\mathbb E R_n \le 5.15\sqrt{nK\ln K} + \sqrt{\frac{nK}{\ln K}}.ERn​≤5.15nKlnK​+lnKnK​​.

Milestones

  • Lemma 3.1: for β∈(0,1]\beta \in (0,1]β∈(0,1] and a fixed arm iii, with probability at least 1−δ1-\delta1−δ, ∑tgi,t≤∑tg~i,t+ln⁡(δ−1)/β\sum_t g_{i,t} \le \sum_t \tilde g_{i,t} + \ln(\delta^{-1})/\beta∑t​gi,t​≤∑t​g~​i,t​+ln(δ−1)/β.
  • Eq. (3.12): if γ≤1/2\gamma \le 1/2γ≤1/2 and (1+β)Kη≤γ(1+\beta)K\eta \le \gamma(1+β)Kη≤γ, then with probability at least 1−δ1-\delta1−δ,
Rn≤βnK+γn+(1+β)ηKn+ln⁡(Kδ−1)β+ln⁡Kη.R_n \le \beta nK + \gamma n + (1+\beta)\eta Kn + \frac{\ln(K\delta^{-1})}{\beta} + \frac{\ln K}{\eta}.Rn​≤βnK+γn+(1+β)ηKn+βln(Kδ−1)​+ηlnK​.
  • Theorem 3.2: with β=ln⁡(Kδ−1)/(nK)\beta = \sqrt{\ln(K\delta^{-1})/(nK)}β=ln(Kδ−1)/(nK)​, Rn≤5.15nKln⁡(Kδ−1)R_n \le 5.15\sqrt{nK\ln(K\delta^{-1})}Rn​≤5.15nKln(Kδ−1)​ (3.10); with β=ln⁡K/(nK)\beta = \sqrt{\ln K/(nK)}β=lnK/(nK)​, Rn≤nK/ln⁡K ln⁡(δ−1)+5.15nKln⁡KR_n \le \sqrt{nK/\ln K}\,\ln(\delta^{-1}) + 5.15\sqrt{nK\ln K}Rn​≤nK/lnK​ln(δ−1)+5.15nKlnK​ (3.11), each with probability at least 1−δ1-\delta1−δ.
  • Theorem 3.1: Exp3 with η=2ln⁡K/(nK)\eta = \sqrt{2\ln K/(nK)}η=2lnK/(nK)​ has R‾n≤2nKln⁡K\overline R_n \le \sqrt{2nK\ln K}Rn​≤2nKlnK​ (3.2); with ηt=ln⁡K/(tK)\eta_t = \sqrt{\ln K/(tK)}ηt​=lnK/(tK)​, R‾n≤2nKln⁡K\overline R_n \le 2\sqrt{nK\ln K}Rn​≤2nKlnK​ (3.3).
  • Lemma 3.2 and Theorem 3.4: for n≥K≥2n \ge K \ge 2n≥K≥2 and every forecaster there is a Bernoulli instance with max⁡iE∑tYi,t−E∑tYIt,t≥nK/20\max_i \mathbb E\sum_t Y_{i,t} - \mathbb E\sum_t Y_{I_t,t} \ge \sqrt{nK}/20maxi​E∑t​Yi,t​−E∑t​YIt​,t​≥nK​/20.

Significance

The goal bounds the expected regret, not the pseudo-regret, against an opponent that adapts to the forecaster's randomized past choices. A pseudo-regret bound says nothing about ERn\mathbb E R_nERn​ in that setting, and the book obtains the expected-regret bound by first proving a high-probability bound valid at every confidence level, (3.11), and integrating its tail. Together with Theorem 3.4 the chapter shows that nK\sqrt{nK}nK​ is the minimax rate of adversarial bandits up to a ln⁡K\sqrt{\ln K}lnK​ factor. Lemma 3.1, the concentration of biased importance-weighted estimates, holds for any forecaster rule and is the step that turns exponential weights into a high-probability guarantee.

All results are proved in the book. On the formal side, the platform has the pseudo-regret bound of Exp3 against an oblivious adversary (a fixed reward table, Bandit Algorithms V) and an Exp3-IX high-probability bound; it has no Exp3.P, no regret bound against adaptive adversaries and no Bernoulli nK/20\sqrt{nK}/20nK​/20 lower bound. This mission adds an explicit model of adaptive adversaries and randomized forecaster runs, and the chapter's statements with the book's exact constants.

Difficulty

Against an adaptive adversary the gains are random and depend on the forecaster's own past draws, so the argument used for a fixed reward table (take expectations of an inequality that holds for every fixed sequence) does not control ERn\mathbb E R_nERn​: the maximum over arms does not commute with the expectation. Unbiased estimates do not help either, because the variance of ℓi,t/pi,t\ell_{i,t}/p_{i,t}ℓi,t​/pi,t​ is of order 1/pi,t1/p_{i,t}1/pi,t​, which can be arbitrarily large; even with uniform mixing at rate n−1/2n^{-1/2}n−1/2 the cumulative variance is of order n3/2n^{3/2}n3/2. The bias β\betaβ and the mixing γ\gammaγ have to be tuned jointly so that the estimate concentrates while the exponential-weights analysis survives, and the constants 0.950.950.95, 1.051.051.05 and 5.155.155.15 come out of that tuning. The lower bound needs an information-theoretic comparison of a forecaster's behaviour on K+1K+1K+1 Bernoulli instances, against forecasters that may be randomized.

Formalization scope

Arms are Fin K with K≥2K \ge 2K≥2; rounds are numbered 1,…,n1,\dots,n1,…,n; logarithms are natural. Action sequences are functions N→\mathbb N \toN→ Fin K whose entry 000 is ignored. An adversary is a structure holding values in [0,1][0,1][0,1] that may depend on the past actions only (gains for Exp3.P, losses for Exp3); a randomized adversary with independent external randomness reduces to this case by conditioning. A run of a forecaster rule ppp on a probability space is pinned down by the cylinder identity P(I1=h1,…,It=ht)=P(I1=h1,…,It−1=ht−1) pt(h)(ht)\mathbb P(I_1 = h_1,\dots,I_t = h_t) = \mathbb P(I_1=h_1,\dots,I_{t-1}=h_{t-1})\,p_t(h)(h_t)P(I1​=h1​,…,It​=ht​)=P(I1​=h1​,…,It−1​=ht−1​)pt​(h)(ht​), which determines the law of (I1,…,In)(I_1,\dots,I_n)(I1​,…,In​). "With probability at least 1−δ1-\delta1−δ" is P(event)≥1−δ\mathbb P(\text{event}) \ge 1-\deltaP(event)≥1−δ for δ∈(0,1)\delta \in (0,1)δ∈(0,1), and ERn\mathbb E R_nERn​ is the Bochner integral of the bounded, measurable regret. The lower bounds use a stochastic model in which the forecaster sees past actions and the rewards of the played arms, and rewards are i.i.d. product Bernoulli.

Constants and conventions:

  • Every constant is the book's exact one: 0.950.950.95, 1.051.051.05, 5.155.155.15, 1/201/201/20. No O(⋅)O(\cdot)O(⋅) is involved.
  • Exp3.P with 1.05Kln⁡K/n>11.05\sqrt{K\ln K/n} > 11.05KlnK/n​>1 is outside the box's range γ∈[0,1]\gamma \in [0,1]γ∈[0,1]; its vector can then have negative entries, and if it does on a history of positive probability no run exists. This happens only when n<1.11 Kln⁡Kn < 1.11\,K\ln Kn<1.11KlnK, where the printed bounds already follow from Rn≤nR_n \le nRn​≤n, so the statements are true there whether or not a run exists.
  • Corrected misprints: the Exp3 box's ℓ~i,s\tilde\ell_{i,s}ℓ~i,s​ is ℓ~i,t\tilde\ell_{i,t}ℓ~i,t​; the sign in (3.16) is the box's exp⁡(+ηG~)\exp(+\eta\tilde G)exp(+ηG~); the proof of (3.10) says the bound is trivial "if n≥5.15⋯n \ge 5.15\sqrt{\cdots}n≥5.15⋯​", which should be n≤n \len≤. The statements carry no lower bound on nnn.
  • Added standing hypotheses: K≥2K \ge 2K≥2 everywhere, n≥Kn \ge Kn≥K in Theorem 3.4 (from the protocol box, p. 6; Theorem 3.4 is false without it), β>0\beta > 0β>0 and pi,t>0p_{i,t} > 0pi,t​>0 in Lemma 3.1.
  • Theorem 3.4 is stated as "for every forecaster there is a Bernoulli instance with regret at least nK/20\sqrt{nK}/20nK​/20", which implies the book's inf⁡sup⁡\inf\supinfsup (3.18).

A trivializing formalization is ruled out: the forecasters are fixed rules of the observed history drawn with fresh randomness, the adversary is not restricted to a fixed sequence, and the lower bounds quantify over all forecasters and exhibit the instance.

Welcome contributions: a reusable construction of runs (existence of a probability space carrying a run for every rule), the supermartingale form of Lemma 3.1, the exponential-weights potential argument, a tail-integration lemma EW≤∫01δ−1P(W>ln⁡δ−1) dδ\mathbb E W \le \int_0^1 \delta^{-1}\mathbb P(W > \ln\delta^{-1})\,d\deltaEW≤∫01​δ−1P(W>lnδ−1)dδ, and a KL/Pinsker comparison for bandit runs.

Selected references

  • S. Bubeck, N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012. arXiv:1204.5721v2, doi:10.1561/2200000024
  • P. Auer, N. Cesa-Bianchi, Y. Freund, R. E. Schapire, The nonstochastic multiarmed bandit problem, SIAM Journal on Computing 32(1), 2002. doi:10.1137/S0097539701398375
  • J.-Y. Audibert, S. Bubeck, Regret bounds and minimax policies under partial monitoring, Journal of Machine Learning Research 11, 2010. jmlr.org/papers/v11/audibert10a
  • N. Cesa-Bianchi, G. Lugosi, Prediction, Learning, and Games, Cambridge University Press, 2006. doi:10.1017/CBO9780511546921
13 thms1 active userReviewed
PreviousPage 2 of 3Next

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me