Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

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

Bandit Algorithms

43 missions · 33 completed

Missions

Open10Completed33All43
Operations ResearchOptimizationProbability·Captain: naimengye

Multi-armed Bandit Allocation Indices III: Superprocesses, Condition D and the Index Theorem for a SFASTextbook

Motivation

The index theorem says that among several Markov reward processes, of which one may be advanced at each decision time, the right one to advance is the one of greatest Gittins index. Chapter 4 of Gittins, Glazebrook and Weber, Multi-armed Bandit Allocation Indices (2nd ed., doi:10.1002/9780470980033), asks how far this extends when the constituents are not reward processes but decision processes, each with its own controls: a research project that can be run in several ways, a job that can be processed at different speeds, a sampling process that may be stopped and exploited. A family of such superprocesses requires two choices at every decision time, which superprocess to continue and with which control, and an index policy in the sense of Chapter 2 need not be optimal (Example 4.1). Whittle (1980) identified the condition under which it is: Condition D, that when a superprocess is played against a standard bandit process paying a constant rent, the control one should apply to it does not depend on the rent. Under that condition the index theorem survives (Theorem 4.3), the index is characterized (Note 4.2), stoppable bandit processes with improving stopping options satisfy the condition (Lemma 4.4), and the chapter adds two results about indices themselves: any index that works for all bandit processes is a strictly increasing function of the Gittins index (Theorem 4.8), and a policy that is within ε\varepsilonε of the index policy loses at most εγ−1(1−e−γ)−1\varepsilon\gamma^{-1}(1-e^{-\gamma})^{-1}εγ−1(1−e−γ)−1 (Theorem 4.18).

Setting

A decision process DDD on a countable state space SSS has in each state xxx a nonempty finite set Γ(x)\Gamma(x)Γ(x) of controls; applying uuu yields the reward r(x,u)r(x, u)r(x,u) and moves the state by P(⋅∣x,u)P(\cdot \mid x, u)P(⋅∣x,u). Adding the freeze control, which leaves the state unchanged and yields nothing, makes DDD a superprocess SSS. Operating DDD under a feasible deterministic stationary Markov policy ggg (that is, g(x)∈Γ(x)g(x) \in \Gamma(x)g(x)∈Γ(x)) gives an ordinary bandit process DgD_gDg​, and the superprocess index is

ν(S,x,u)=sup⁡g:g(x)=uν(Dg,x),ν(S,x)=max⁡u∈Γ(x)ν(S,x,u),(4.1)\nu(S, x, u) = \sup_{g : g(x) = u} \nu(D_g, x), \qquad \nu(S, x) = \max_{u \in \Gamma(x)} \nu(S, x, u), \tag{4.1}ν(S,x,u)=g:g(x)=usup​ν(Dg​,x),ν(S,x)=u∈Γ(x)max​ν(S,x,u),(4.1)

with ν(Dg,x)\nu(D_g, x)ν(Dg​,x) the Gittins index of the Bandit Algorithms model. A simple family of alternative superprocesses (SFAS) is nnn superprocesses on a common (S,U)(S, U)(S,U); at each decision time 0,1,2,…0, 1, 2, \dots0,1,2,… exactly one is continued, with a control from its control set, the others being frozen, and rewards are discounted by ata^tat. A policy is a Markov kernel per decision time from the history to the pair (superprocess, control); it is optimal if it is feasible and attains the supremum of the discounted payoff over feasible policies from every initial state-vector, and it is an index policy if it always continues a superprocess and control of maximal ν(Si,xi,u)\nu(S_i, x_i, u)ν(Si​,xi​,u).

Condition D. Let Λ\LambdaΛ be a standard bandit process with parameter λ\lambdaλ (one state, reward λ\lambdaλ). SSS satisfies Condition D if there is a function ggg such that, for every xxx and λ\lambdaλ for which it is optimal in the family {S,Λ}\{S, \Lambda\}{S,Λ} to select SSS in state xxx, it is optimal to apply the control g(x)g(x)g(x). A stoppable bandit process is a bandit process with a stop control that makes it behave as a standard bandit process with parameter μ(x)\mu(x)μ(x); its stopping option is improving if μ(x(t))\mu(x(t))μ(x(t)) is almost surely nondecreasing in process time.

Formalization targets

Goal: Theorem 4.3

For a decision process with bounded rewards and a Condition-D control ggg, every index policy with respect to ν(D,⋅,⋅)\nu(D, \cdot, \cdot)ν(D,⋅,⋅) that applies g(xi)g(x_i)g(xi​) to the superprocess iii it continues is optimal for the family of nnn superprocesses:

index policy π  ⟹  π feasible and Rπ(x)=sup⁡π′ feasibleRπ′(x)  for every x∈Sn.\text{index policy } \pi \implies \pi \text{ feasible and } R_\pi(x) = \sup_{\pi' \text{ feasible}} R_{\pi'}(x)\ \text{ for every } x \in S^n.index policy π⟹π feasible and Rπ​(x)=π′ feasiblesup​Rπ′​(x)  for every x∈Sn.

Milestones

Note 4.2 (under Condition D, SSS is selected in {S,Λ(λ)}\{S, \Lambda(\lambda)\}{S,Λ(λ)} iff ν(S,x)≥λ\nu(S, x) \ge \lambdaν(S,x)≥λ, and at λ=ν(S,x)\lambda = \nu(S, x)λ=ν(S,x) a control uuu is optimal iff ν(S,x,u)=ν(S,x)\nu(S, x, u) = \nu(S, x)ν(S,x,u)=ν(S,x); the printed equivalence fails for λ<ν(S,x)\lambda < \nu(S, x)λ<ν(S,x)); Lemma 4.4 (Condition D for stoppable bandit processes with improving stopping options); Theorem 4.8 (an index for the bandit processes with discount factor aaa is strictly increasing in ν\nuν); Theorem 4.18 (the ε\varepsilonε-index bound, ε/(1−a)2\varepsilon/(1-a)^2ε/(1−a)2 for the discrete-time index).

Significance

Theorem 4.3 is the widest form in which the index theorem holds without further structure, and Condition D is exactly the right hypothesis: it says the superprocess has a canonical control, and once it does the family reduces to a family of bandit processes and the prevailing-charge argument goes through. Lemma 4.4 gives the model where the condition is known to hold, a research project that may be exploited at any time; the buyer's problem of Bergman and Bather is the case where it fails. Theorem 4.8 explains why every index theorem in the book is about the Gittins index: any function that orders bandit processes optimally must order them as ν\nuν does. Theorem 4.18 is the quantitative version of the index theorem that heuristics and computations rely on.

Nothing here is machine-checked. The mission builds the first controlled multi-armed model on the platform, a run law for families of decision processes with an explicit feasibility constraint, and states Whittle's condition as a property of the two-member family, which is how the literature uses it. Theorems 4.8 and 4.18 are statements about the existing Bandit Algorithms model and are usable by any later work on that model.

Difficulty

The obvious attack on Theorem 4.3, "replace each superprocess by the bandit process DgD_{g}Dg​ for its Condition-D policy ggg and apply the index theorem", is the second half of the book's proof; the first half is to show that an optimal policy never gains by applying a control other than g(xi)g(x_i)g(xi​) to a superprocess it continues, and that uses the prevailing-stake accounting of §4.3 with the other superprocesses treated as one bandit process, plus the observation that the class of policies deviating at most kkk times is ε\varepsilonε-exhaustive. Both halves require the whole run law of the family to be related to the run laws of its constituents, which is where a formalization spends its effort. Note 4.2 is short on the page but needs the optimal-stopping characterization of Chapter 2 for the bandit process DgD_gDg​ under charge λ\lambdaλ. Theorem 4.8 is elementary given the value of {B,Λ}\{B, \Lambda\}{B,Λ} under a freezing rule, Rf(B)+λγ−1−λWf(B)R_f(B) + \lambda\gamma^{-1} - \lambda W_f(B)Rf​(B)+λγ−1−λWf​(B), but that identity is itself a computation on the run law. Theorem 4.18 has no proof in the book (Glazebrook 1982c); the natural route is the prevailing-charge upper bound with the charges perturbed by ε\varepsilonε.

Formalization scope

Decision processes carry their control sets as finsets with a nonemptiness proof and their kernels as Markov kernels; the state space is countable with measurable singletons (so stationary kernels and control-dependent maps are measurable without side conditions) and the control type is finite with measurable singletons. The family's run law is built decision time by decision time as the Bandit Algorithms model builds markovBanditMeasure, with the policy's kernel producing the pair (superprocess, control). Feasibility is an almost-sure condition on the policy kernel, and optimality is the book's: feasible, and the supremum from every initial state-vector. The superprocess index is a real supremum over feasible stationary policies with g(x)=ug(x) = ug(x)=u, bounded by the reward bound and nonempty for u∈Γ(x)u \in \Gamma(x)u∈Γ(x); for an unavailable uuu it is a default value that no index policy consults. Condition D is stated on the family {S,Λ}\{S, \Lambda\}{S,Λ} on S⊕UnitS \oplus \mathrm{Unit}S⊕Unit, where the standard state has every control available, all equivalent. A stoppable bandit process is the decision process with control type Bool. Theorem 4.8 quantifies over index functions defined on every measurable state space and takes as hypothesis only what its proof uses, optimality of μ\muμ-index policies for the families {B,Λ}\{B, \Lambda\}{B,Λ}. Theorem 4.18 is on the kkk-armed Bandit Algorithms model with ε≥0\varepsilon \ge 0ε≥0 and the bound ε/(1−a)2\varepsilon/(1-a)^2ε/(1−a)2: the book's εγ−1(1−e−γ)−1\varepsilon\gamma^{-1}(1 - e^{-\gamma})^{-1}εγ−1(1−e−γ)−1 is in continuous-time index units, γ/(1−a)\gamma/(1-a)γ/(1−a) times the discrete-time index used here, and read with the discrete index it is false for a<1/ea < 1/ea<1/e. Theorem 4.3's index policy applies the Condition-D control ggg to the superprocess it continues, as the book's proof does; an index policy that breaks ties among controls otherwise need not be optimal.

Trivializing readings are excluded: index policies must be feasible, optimality is required from every initial state, and Condition D is a statement about optimal policies of a genuine two-member family, not about a chosen policy. Welcome contributions: the relation between the family's run law and the constituents' chain laws, the freezing-rule value identity behind Theorem 4.8, and the prevailing-stake accounting of §4.3.

Selected references

  • J. Gittins, K. Glazebrook, R. Weber, Multi-armed Bandit Allocation Indices, 2nd ed., Wiley, 2011, Chapter 4. doi:10.1002/9780470980033
  • P. Whittle, Multi-armed bandits and the Gittins index, Journal of the Royal Statistical Society B 42(2), 1980. doi:10.1111/j.2517-6161.1980.tb01111.x
  • K. D. Glazebrook, Stoppable families of alternative bandit processes, Journal of Applied Probability 16(4), 1979. doi:10.2307/3213152
  • K. D. Glazebrook, On the evaluation of suboptimal strategies for families of alternative bandit processes, Journal of Applied Probability 19(3), 1982. doi:10.2307/3213524
  • T. Lattimore, C. Szepesvári, Bandit Algorithms, Cambridge University Press, 2020, Chapter 35. doi:10.1017/9781108571401
10 thms4 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 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
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
Machine LearningOperations ResearchProbability·Captain: mikedeng1

Online Network Revenue Management Using Thompson Sampling: Bayesian Regret of TS-fixedResearch Paper

Motivation

A retailer who sells several products from shared, non-replenishable inventory over a finite season must set prices without knowing how demand responds to them. Every price posted is both a sale and an experiment. This is the network revenue management problem with demand learning, and it sits between two literatures: dynamic pricing with inventory, where demand is known and the fluid linear program of Gallego and van Ryzin (1997) is the standard benchmark, and multi-armed bandits, where learning is the whole problem but there are no resource constraints.

Ferreira, Simchi-Levi and Wang (Oper. Res. 2018) combine Thompson sampling with a linear-programming step: sample a demand model from the posterior, solve the fluid LP for that model, and randomize prices according to its solution. The same paper extends the scheme to continuous price sets, contextual pricing and bandits with knapsacks.

Timeline of the relevant results:

  • 1997: Gallego and van Ryzin introduce the fluid LP upper bound for network revenue management with known demand.
  • 2012: Besbes and Zeevi give a non-Bayesian network pricing algorithm with worst-case regret O(K5/3T2/3log⁡T)O(K^{5/3}T^{2/3}\sqrt{\log T})O(K5/3T2/3logT​).
  • 2013: Badanidiyuru, Kleinberg and Slivkins (bandits with knapsacks) give worst-case regret O(KTlog⁡T)O(\sqrt{KT\log T})O(KTlogT​).
  • 2013–2014: Bubeck and Liu and Russo and Van Roy give prior-free Bayesian regret bounds for Thompson sampling in unconstrained bandits.
  • 2018: Ferreira, Simchi-Levi and Wang prove the O(TKlog⁡K)O(\sqrt{TK\log K})O(TKlogK​) Bayesian regret bound for TS-fixed (Theorem 1), the target of this mission.

Setting

There are NNN products and MMM resources. One unit of product iii consumes aij≥0a_{ij}\ge0aij​≥0 units of resource jjj, and resource jjj starts with inventory Ij≥0I_j\ge0Ij​≥0 that is never replenished. The season has TTT periods. In each period the retailer posts one of KKK price vectors pk=(p1k,…,pNk)p_k=(p_{1k},\dots,p_{Nk})pk​=(p1k​,…,pNk​) or a shut-off price p∞p_\inftyp∞​ under which demand is zero.

Given the posted price pkp_kpk​, the demand vector D(t)∈R+ND(t)\in\mathbb R^N_+D(t)∈R+N​ has law F(⋅ ;pk,θ)F(\cdot\,;p_k,\theta)F(⋅;pk​,θ), where θ∈Θ\theta\in\Thetaθ∈Θ is unknown and drawn from a known, arbitrary prior μ0\mu_0μ0​. Demand is independent of the past given the posted price and θ\thetaθ, and is bounded: Di(t)∈[0,dˉi]D_i(t)\in[0,\bar d_i]Di​(t)∈[0,dˉi​]. Write dik(ρ)d_{ik}(\rho)dik​(ρ) for the mean demand of product iii under pkp_kpk​ and parameter ρ\rhoρ, and d=d(θ)d=d(\theta)d=d(θ).

When inventory covers all demand, all demand is sold. Otherwise the satisfied demand D~(t)\tilde D(t)D~(t) satisfies 0≤D~i(t)≤Di(t)0\le\tilde D_i(t)\le D_i(t)0≤D~i​(t)≤Di​(t), leaves every inventory nonnegative, and leaves at least one resource at zero; no other rule is imposed. Revenue is Rev(T)=∑t∑iD~i(t)Pi(t)\mathrm{Rev}(T)=\sum_t\sum_i\tilde D_i(t)P_i(t)Rev(T)=∑t​∑i​D~i​(t)Pi​(t).

For a mean-demand matrix ddd and capacities cj=Ij/Tc_j=I_j/Tcj​=Ij​/T, the linear program LP(d)\mathrm{LP}(d)LP(d) is

max⁡x≥0 ∑k=1K(∑i=1Npikdik)xks.t.∑k=1K(∑i=1Naijdik)xk≤cj  ∀j,∑k=1Kxk≤1,\max_{x\ge0}\ \sum_{k=1}^K\Bigl(\sum_{i=1}^N p_{ik}d_{ik}\Bigr)x_k\quad\text{s.t.}\quad\sum_{k=1}^K\Bigl(\sum_{i=1}^N a_{ij}d_{ik}\Bigr)x_k\le c_j\ \ \forall j,\qquad\sum_{k=1}^K x_k\le1,x≥0max​ k=1∑K​(i=1∑N​pik​dik​)xk​s.t.k=1∑K​(i=1∑N​aij​dik​)xk​≤cj​  ∀j,k=1∑K​xk​≤1,

with optimal value OPT(d)\mathrm{OPT}(d)OPT(d).

TS-fixed (Algorithm 1): in each period, sample θ(t)\theta(t)θ(t) from the posterior of θ\thetaθ given the history of posted prices and observed demands; let x(t)x(t)x(t) be an optimal solution of LP(d(θ(t)))\mathrm{LP}(d(\theta(t)))LP(d(θ(t))); post pkp_kpk​ with probability xk(t)x_k(t)xk​(t) and p∞p_\inftyp∞​ with the remaining probability; observe demand and update the posterior.

Finally pmax⁡=max⁡k∑ipikdˉip_{\max}=\max_k\sum_ip_{ik}\bar d_ipmax​=maxk​∑i​pik​dˉi​ and pmax⁡j=max⁡i:aij≠0, kpik/aijp^j_{\max}=\max_{i:a_{ij}\neq0,\,k}p_{ik}/a_{ij}pmaxj​=maxi:aij​=0,k​pik​/aij​.

Formalization targets

Goal: Theorem 1 against the LP benchmark

For K≥2K\ge2K≥2, T≥1T\ge1T≥1, every prior, every bounded demand family, every admissible fulfilment rule and every run of TS-fixed,

E[OPT(d)]⋅T−E[Rev(T)] ≤ (18 pmax⁡+37∑i=1N∑j=1Mpmax⁡jaijdˉi)TKlog⁡K.\mathbb E\bigl[\mathrm{OPT}(d)\bigr]\cdot T-\mathbb E\bigl[\mathrm{Rev}(T)\bigr]\ \le\ \Bigl(18\,p_{\max}+37\sum_{i=1}^N\sum_{j=1}^M p^j_{\max}a_{ij}\bar d_i\Bigr)\sqrt{TK\log K}.E[OPT(d)]⋅T−E[Rev(T)] ≤ (18pmax​+37i=1∑N​j=1∑M​pmaxj​aij​dˉi​)TKlogK​.

The paper prints this bound for BayesRegret(T)=E[Rev∗(T)]−E[Rev(T)]\mathrm{BayesRegret}(T)=\mathbb E[\mathrm{Rev}^*(T)]-\mathbb E[\mathrm{Rev}(T)]BayesRegret(T)=E[Rev∗(T)]−E[Rev(T)], where Rev∗\mathrm{Rev}^*Rev∗ is the revenue of the optimal policy that knows θ\thetaθ; see Formalization scope for why the LP benchmark is stated instead.

Milestones

The article states Theorem 1 and says that its proof is in the online appendix (Supplemental Material at the DOI). The article itself contains no numbered lemma. The milestone list is therefore empty; the appendix's lemmas will be added as milestones once the appendix is held.

Significance

The bound is prior-free and has explicit constants that depend only on prices, consumption rates and demand bounds. Its dependence on TTT matches the Ω(KT)\Omega(\sqrt{KT})Ω(KT​) lower bound for Bayesian regret in unconstrained bandits with rewards in [0,1][0,1][0,1], a special case of the model with no inventory constraints (Bubeck and Cesa-Bianchi 2012, Theorem 3.5). It shows that the posterior-sampling principle survives the addition of resource constraints, lost sales and randomized LP-based pricing, and it is the template for the paper's later results (TS-update, contextual pricing, bandits with knapsacks).

The theorem is proved on paper but, as far as a platform search shows, not formalized anywhere. The platform has a formal proof of the unconstrained Bayesian Thompson sampling bound knlog⁡k/2\sqrt{kn\log k/2}knlogk/2​ (BanditAlgorithm.thompson_sampling_bayesian_regret, Lattimore–Szepesvári Theorem 36.5) and an open single-product deterministic upper bound in revenue management (RevenueManagement.deterministic_upper_bound). Neither has inventory, an LP subroutine, or lost sales. A formal proof here would supply the first machine-checked analysis of Thompson sampling under resource constraints and would check the paper's constants.

Difficulty

In an unconstrained bandit, Thompson sampling's regret reduces to a sum of per-period gaps between an upper confidence bound and the sampled reward, because the sampled optimal arm and the true optimal arm are identically distributed given the history. Here the action is a randomized mixture x(t)x(t)x(t) from an LP, the reward is not additive in the prices chosen, and revenue is lost when inventory runs out. Two quantities must be controlled: the revenue the algorithm would collect if all demand could be served, and the revenue lost to stock-outs. The second depends on the random time at which each resource is exhausted under a pricing rule that was optimized for a sampled, not the true, demand, and on an arbitrary fulfilment rule once some resource is empty. Standard bandit arguments do not bound such lost sales, which are a nonlinear function of the whole trajectory.

Formalization scope

Lean representation. Products, resources and price vectors are indexed by Fin N, Fin M, Fin K; the posted price is an Option (Fin K) with none the shut-off price. Periods are 0-based (t=0,…,T−1t=0,\dots,T-1t=0,…,T−1 stands for the paper's 1,…,T1,\dots,T1,…,T). Θ\ThetaΘ is a standard Borel space with a probability measure μ0\mu_0μ0​; demand is a Markov kernel FFF from Θ×\Theta\timesΘ×Fin K to RN\mathbb R^NRN, bounded in [0,dˉi][0,\bar d_i][0,dˉi​] for every parameter. A run of TS-fixed is a family of random variables on a probability space satisfying, almost surely and via conditional expectations: θ∼μ0\theta\sim\mu_0θ∼μ0​; the posterior-sampling property of θ(t)\theta(t)θ(t) given everything before period ttt; the price draw with probabilities x(θ(t))x(\theta(t))x(θ(t)) for a measurable optimal LP selection xxx; the demand law given the past, θ(t)\theta(t)θ(t) and the posted price; and fulfilment rules (a)/(b). The logarithm is natural. Prices, consumption and inventory are nonnegative (implicit in the paper). OPT(d)\mathrm{OPT}(d)OPT(d) is a supremum over a nonempty bounded feasible set, so it has no junk value.

Corrections to the printed statement.

  1. K≥2K\ge2K≥2 is added. At K=1K=1K=1 the printed right-hand side is 000, yet on a one-price instance with Bernoulli(0.8)(0.8)(0.8) demand, I=T/2I=T/2I=T/2 and a point-mass prior, TS-fixed loses about 0.2pT0.2p\sqrt T0.2pT​ in expectation.
  2. The LP benchmark replaces E[Rev∗(T)]\mathbb E[\mathrm{Rev}^*(T)]E[Rev∗(T)]. Section 3.1.1 bounds E[Rev∗(T)∣d]\mathbb E[\mathrm{Rev}^*(T)\mid d]E[Rev∗(T)∣d] by OPT(d)⋅T\mathrm{OPT}(d)\cdot TOPT(d)⋅T, citing Gallego–van Ryzin. Under the paper's fulfilment rule this fails when products use disjoint resources: with two products, I=(T,1)I=(T,1)I=(T,1), p1=(1,0)p_1=(1,0)p1​=(1,0), p2=(1/2,0)p_2=(1/2,0)p2​=(1/2,0) and deterministic demand (1,1)(1,1)(1,1), the known-θ\thetaθ policy earns at least TTT while OPT(d)⋅T=1\mathrm{OPT}(d)\cdot T=1OPT(d)⋅T=1. The paper states that its proof bounds the gap to "the LP benchmark defined in Section 3.1.1" (p. 1594), and the last display of Section 3.1.1 bounds BayesRegret(T)\mathrm{BayesRegret}(T)BayesRegret(T) by exactly E[OPT(d)]⋅T−E[Rev(T)]\mathbb E[\mathrm{OPT}(d)]\cdot T-\mathbb E[\mathrm{Rev}(T)]E[OPT(d)]⋅T−E[Rev(T)]. Wherever the Gallego–van Ryzin bound holds, the corrected goal implies the printed one.

Ruled out. A bound for the "ideal" revenue ∑iDi(t)Pi(t)\sum_iD_i(t)P_i(t)∑i​Di​(t)Pi​(t) instead of the satisfied revenue, or for an arbitrary policy whose prices are merely close to the LP solution, is not Theorem 1; the goal carries the full TS-fixed run and the lost-sales accounting.

Infrastructure needed. Posterior-sampling identities for general (standard Borel) priors, a Hoeffding/Azuma-type concentration for bounded demand along the price-selection process, LP sensitivity with respect to the mean-demand matrix, and a pathwise bound on lost sales under an arbitrary fulfilment rule. The LP and fluid-benchmark definitions are reusable for later missions on TS-update (Theorem 2), contextual pricing (Theorem 4) and bandits with knapsacks (Theorem 5). Contributions welcome: proofs of the goal, and formal statements of the online appendix's lemmas.

Selected references

  • K. J. Ferreira, D. Simchi-Levi, H. Wang, Online Network Revenue Management Using Thompson Sampling, Operations Research 66(6):1586–1602, 2018. https://doi.org/10.1287/opre.2018.1755
  • G. Gallego, G. van Ryzin, A Multiproduct Dynamic Pricing Problem and Its Applications to Network Yield Management, Operations Research 45(1):24–41, 1997. https://doi.org/10.1287/opre.45.1.24
  • O. Besbes, A. Zeevi, Blind Network Revenue Management, Operations Research 60(6):1537–1550, 2012. https://doi.org/10.1287/opre.1120.1057
  • A. Badanidiyuru, R. Kleinberg, A. Slivkins, Bandits with Knapsacks, FOCS 2013. https://arxiv.org/abs/1305.2545
  • S. Bubeck, C.-Y. Liu, Prior-free and Prior-dependent Regret Bounds for Thompson Sampling, NeurIPS 2013. https://arxiv.org/abs/1311.0466
  • D. Russo, B. Van Roy, Learning to Optimize via Posterior Sampling, Mathematics of Operations Research 39(4):1221–1243, 2014. https://doi.org/10.1287/moor.2014.0650
  • S. Bubeck, N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Foundations and Trends in Machine Learning 5(1), 2012. https://arxiv.org/abs/1204.5721
  • T. Lattimore, C. Szepesvári, Bandit Algorithms, Cambridge University Press, 2020, Chapter 36. https://doi.org/10.1017/9781108571401
3 thms1 active userReviewed

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