We study stochastic contextual bandits with an unknown context-lumpable structure. The S contexts are partitioned into r blocks, and every arm has the same mean reward across contexts in the same block. Under arbitrary context distributions and without separation assumptions, we design an algorithm with expected regret O(r(S+K)T), matching the lower bound of Lee et al. (2023) up to logarithmic factors and improving their previous upper bound by a factor of r.
The algorithm operates over dyadic accuracy levels, using a baseline policy and confidence-based early stopping to control exploration. It then performs cross-context elimination: since rewards are identical within a block, one selected arm eliminates all surviving records from that block, requiring at most r selections at each level. Multi-scale exploration assigns finer accuracies to frequent blocks and coarser accuracies to rare blocks, yielding a near-optimal arm for every block while keeping the weighted policy error small.
1 Introduction
In contextual bandits, the learner observes a context, selects an arm, and receives feedback only for that arm. In recommendation, for example, feedback is observed only for displayed items (Li et al. 2010). Sharing observations across contexts can reduce learning cost, but the relation between their rewards may be unknown.
In context-lumpable stochastic bandits (Lee et al. 2023), S contexts form r≤min{S,K} unknown blocks. Each of the K arms has the same mean reward within a block. Observations can thus be shared within blocks, but the learner sees context identities without their block assignments. It must find useful arms and learn where they perform well from bandit feedback. Running a separate bandit for each context gives expected regret O(SKT) over T rounds (Lattimore and Szepesvári 2020), which can be wasteful when r is small. Yet exploration across contexts incurs regret: an informative arm may be poor where it is sampled. Finding a good policy and minimizing regret are therefore distinct challenges. Lee et al. (2023) established nearly optimal sample complexity for finding a near-optimal policy of O(ϵ2r(S+K)), while a sub-optimal regret bound of O(r3(S+K)T). Their
*Email: cluba@connect.ust.hk regret algorithm refines a context partition while eliminating arms; ensuring that refinements do not split a true block incurs an extra factor of r. They left O(r(S+K)T) regret open. We attain this rate by controlling exploration during candidate-arm selection, without recovering the partition.
1.1 Our Results
For every context distribution ν and its induced block distribution ω, our algorithm achieves expected regret
RegT=O(r(S+K)T),
where O(⋅) hides polylogarithmic factors in S, K, r, and T. For a known horizon, this guarantee is achieved by Algorithm 4; a standard doubling restart gives the same order without knowing T.
This rate matches the Ω(r(S+K)T) lower bound of Lee et al. (2023) up to logarithmic factors. It improves their online upper bound O(r3(S+K)T) to O(r(S+K)T), removing an additional factor of r. The guarantee holds for arbitrary block and context distributions and does not require any separation between the reward vectors of different blocks. Conceptually, the algorithm exploits the equality of mean rewards within each block without first recovering the unknown context partition: it constructs a shared set of candidate arms that contains a sufficiently good arm for every block and then selects among these candidates separately at each context.
The first technical ingredient is a phased exploration procedure with geometrically decreasing accuracy levels. In phase h, the algorithm targets accuracy εh and first estimates the preceding policy πh−1 at every context, obtaining a context-wise baseline Bh(i). It then runs the COLLECT procedure at levels εn=2−n/2 for n=0,…,h. At level n, each context receives qh,n≍rKεn/(Sεh) random arm assignments, and each assignment is sampled up to mh,n≍1/εn2 times. Sampling stops as soon as the arm's upper confidence bound falls below the baseline by a margin of order εn. On the joint concentration event, every arm stopped in this way is worse than the preceding policy by a constant multiple of εn, whereas every arm that completes its budget has an εn-accurate estimate. Thus, the algorithm avoids repeatedly paying for assignments that have already been certified to be harmful, while the multiple accuracy levels allow it to search for good arms at a scale adapted to the frequency of each block.
The second ingredient is a multi-scale, cross-context elimination rule. At each level, the algorithm selects the surviving context-arm record with the largest estimated reward, evaluates the selected arm across all contexts, and removes every record for which the selected arm or the preceding policy is sufficiently better. Since all contexts in the selected arm's true block have the same mean reward, one selection removes all remaining records from that block; consequently, at most r selections are needed at any level, even though the block partition is never identified. In the uniform-context analysis, define
εh,b=max{1,rω(b)1}εh.
For every block with εh,b≤1, the assignment budget ensures that its optimal arm is represented at some level satisfying εh,b≤εn<2εh,b. The elimination step then leaves the candidate set with an arm whose gap on block b is O(εh,b). The final finest-scale update, which retains πh−1 as a fallback, therefore satisfies
Although small blocks are learned only at coarser accuracy, their errors are weighted by their smaller arrival probabilities:
b=1∑rω(b)εh,b=εhb=1∑rmax{ω(b),r1}≤2εh.
Hence the phase policy has average gap O(εh), while early stopping and the at most r eliminations per level keep the exploration cost at O(r(S+K)/εh). Balancing this cost with phases of length O(r(S+K)/εh2) and summing over the geometric sequence of phases yields the stated regret bound. For an arbitrary context distribution, Algorithm 4 first groups contexts with comparable estimated arrival probabilities, applies the same procedure separately within each approximately uniform group, discards only a low-frequency set of small total probability mass, and combines the group guarantees by Cauchy–Schwarz inequality.
1.2 Related Work
Contextual and latent bandits. Linear contextual bandits share reward parameters through known features (Chu et al. 2011), whereas Maillard and Mannor (2014) studied latent bandits with clustered rewards. Online clustering for linear bandits has been studied under parameter separation (Gentile et al. 2014) and with item-dependent groups (Gentile et al. 2017). Kausik et al. (2025) learned a shared reward-parameter subspace from offline data for online linear latent contextual bandits. We assume neither such features nor offline data.
Bandits with identical reward vectors. Pal et al. (2023) combined clustering and matrix completion for identical within-cluster reward vectors under a uniform context distribution. Their near-optimal regret guarantee assumes incoherence, bounded condition number, and a column-subset condition; their main presentation treats the number of clusters and their size ratio as constants. Lee et al. (2023) studied context lumpability without these matrix conditions. We follow this setting, with explicit dependence on the number of blocks and arbitrary block and context distributions.
Low-rank bandits. A reward matrix with at most r distinct rows has rank at most r, so context lumpability is a special case of low-rank structure. Jun et al. (2019) studied bilinear bandits with known features. Lu et al. (2021) and Kang et al. (2022) considered low-rank generalized linear bandits, where actions have known matrix features and the unknown parameter is low-rank. For linear rewards, Jang et al. (2024) used experimental design to obtain regret bounds that depend on the geometry of the arm set. Other work addresses heavy-tailed rewards (Kang et al. 2024) and minimax lower bounds for low-rank matrix parameters (Zeng and Honorio 2025).
For low-rank reward matrices, Stojanovic et al. (2023) combined spectral estimation with arm elimination when the learner can choose any matrix entry. Closer to our setting, Jedra et al. (2024) studied randomly arriving contexts using singular-subspace estimation and a reduction to misspecified linear bandits. Our analysis instead exploits equality of mean rewards within each block, a stronger assumption than low rank alone, without estimating a factorization or singular subspaces.
2 Notation and problem formulation
Write [n]={1,…,n}, and take all logarithms to be natural. A context-lumpable bandit (Lee et al. 2023) has S contexts, K arms, and r nonempty blocks, where 1≤r≤min{S,K}. An unknown map g:[S]→[r] defines the blocks B(b)={i∈[S]:g(i)=b}. For an unknown μ:[r]×[K]→R, the mean reward matrix satisfies
A(i,j)=μ(g(i),j),(i,j)∈[S]×[K].
The learner knows S, K, r, but not g or A. No positive separation between the mean-reward vectors of distinct blocks is assumed.
At round t, a context it is drawn from an unknown, fixed context distribution ν on [S], independently of the preceding history. The learner observes it, chooses jt∈[K], and receives yt=A(it,jt)+ηt. We assume, almost surely,
Here and below, conditioning also includes the learner's randomness revealed before the current reward. Thus, ηt is conditionally 1-sub-Gaussian given the information available immediately before yt. The mean rewards have unit span:
j∈[K]maxA(i,j)−j∈[K]minA(i,j)≤1,i∈[S].(2)
Consequently, every play incurs at most one unit of regret, including rounds used only for initial exploration.
The block distribution is given by ω(b)=∑i∈B(b)ν(i); it is unknown to the learner. Under a uniform context distribution, ω(b)=∣B(b)∣/S. We impose no restriction on the block distribution.
The arrival probability ν(i) controls how often an arm can be tested at context i, whereas ω(b) controls how often a choice on block b affects expected regret. Under a uniform context distribution, a smaller block offers fewer opportunities to find a good arm, but choosing a suboptimal arm there also has less influence on regret. This balance motivates the use of multiple sampling accuracies below.
A policy is a map π:[S]→[K]. For each block b, fix jb⋆∈argmaxj∈[K]μ(b,j). The expected regret over T≥1 rounds is
RegT=E[t=1∑T(j∈[K]maxA(it,j)−A(it,jt))].
The expectation includes contexts, rewards, and the learner's randomness. The notation O(⋅) hides universal constants and factors polylogarithmic in S,K,r,T. Algorithm 1 does not require T; Algorithm 4 uses T, while Theorem 2 also gives a horizon-free version.
3 Regret under a Uniform Context Distribution
3.1 Online Algorithm
We now describe our algorithm in detail. As shown in Algorithm 1, it proceeds in phases indexed by dyadic precision levels. Each phase consists of the following four steps.
Parameter settings. Set εn=2−n/2 for n≥0. In phase h≥1, we use βh=20log(16SKr2h), assignment counts qh,n=⌈βhrKεn/(Sεh)⌉ and sample budgets mh,n=⌈8βh/εn2⌉ for n∈{0,…,h}, and Lh(k)=⌈128S(k+βh)⌉. Write mh=mh,h for the finest-level sample budget.
Step 1. We first estimate the mean reward of the preceding policy at each context using Baseline. These estimates provide a reference for Collect to stop sampling an arm when its reward is sufficiently below the baseline, avoiding unnecessary regret (Lemma 1).
Step 2. Since the block distribution is unknown, we explore all accuracy levels n=0,…,h. Coarser levels assign more arms to each context but collect fewer rewards per arm, increasing the chance of sampling an optimal arm from a small block. Finer levels provide more accurate estimates. For each level, Dh,n records the context-arm pairs that complete sampling without being stopped. This allows optimal arms from different blocks to be sampled at suitable levels (Lemmas 2–4).
Step 3. For each level, we select the arm j∗ with the largest estimated reward in Dh,n and evaluate it across all contexts. We remove records for which either j∗ or the preceding policy achieves a reward sufficiently close to the selected estimate. Since contexts in the same block have identical mean rewards, each iteration removes all remaining records from at least one true block. Thus, at most r iterations are needed per level, and the resulting candidate set Wh contains a near-optimal arm for every block at an accuracy depending on its size, without recovering the block partition (Lemma 6).
Step 4. Finally, we evaluate the arms in Wh at the finest level and select the arm with the largest estimated reward for each context, retaining the preceding policy as an option. Although smaller blocks may have larger estimation errors, they also appear less frequently. Consequently, the resulting
Algorithm 1 Online Algorithm for Arbitrary Block Distributions
Let t denote the current time and initialize W0←{1}, π0(i)←1 for i∈[S]
for phase h=1,2,… do
th←t, Wh←Wh−1
Step 1. Baseline estimation
Bh←Baseline(h,πh−1)
Step 2. Random arm exploration
for n=0,…,h do
Qh,n(i)∼i.i.d.Unif([K]qh,n) for i∈[S](Dh,n,Ah,n)←Collect(h,n,Qh,n,πh−1,Bh)
Step 3. Candidate selection
for n=0,…,h do
for ℓ=1,…,r do
if Dh,n=∅ then
break
(i⋆,j⋆)∈argmax(i,j)∈Dh,nAh,n(i,j), Wh←Wh∪{j⋆}
Set Q(i)={j⋆} for all i; (D,A)←Collect(h,n,Q,πh−1,Bh)V(i,j⋆)={max{Bh(i),A(i,j⋆)},Bh(i),(i,j⋆)∈D,(i,j⋆)∈/D,i∈[S]Dh,n←{(i,j)∈Dh,n:V(i,j⋆)<Ah,n(i⋆,j⋆)−4εn}
Step 4. Policy update
Set Q(i)=Wh for all i; (D,A)←Collect(h,h,Q,πh−1,Bh)D←D∪{(i,πh−1(i)):i∈[S]}, A(i,πh−1(i))←Bh(i) for all iπh(i)←argmaxj:(i,j)∈DA(i,j) for all i
while t−th<⌈216βh3r(S+K)/εh2⌉ do
Receive it; play πh(it)
policy satisfies
S1i=1∑S[jmaxA(i,j)−A(i,πh(i))]≤20εh
on the event guaranteed by Lemma 5 (Lemma 7). Together with early stopping, this allows us to control the exploration regret in each phase and obtain the bound in Theorem 1.
3.2 Subroutines
The online algorithm uses two subroutines, Baseline and Collect, described below.
Baseline. In phase h, Baseline plays the preceding policy πh−1 for Lh(mh) rounds. Under a uniform context distribution, this duration ensures that every context appears at least mh times with probability at least 1−Se−8βh. Averaging the first mh observed rewards at each context i gives
Bh(i), an estimate of A(i,πh−1(i)). Since mh=⌈8βh/εh2⌉, concentration guarantees
∣Bh(i)−A(i,πh−1(i))∣≤εh/2,i∈[S],
with high probability (Lemma 1).
Algorithm 2 Baseline(h, π)
ni←0, Bh(i)←0 for i∈[S]
for τ=1,…,Lh(mh) do
Receive it; play π(it) and observe yt
if nit<mh then Bh(it)←nit+1nitBh(it)+yt, nit←nit+1
if j=π(it) and Anit(it,j)+2βh/nit<Bh(it)−3εn then
ait←ait+1, nit←0
else
if nit=mh,n then
D←D∪{(it,j)}, A(it,j)←Amh,n(it,j)
ait←ait+1, nit←0
end
end
return (D,A)
Collect. At level n, Collect samples the arms in Q(i) one by one, with at most mh,n observations per arm. The stopping rule ensures that whenever an arm j is stopped early at context i, A(i,j)≤A(i,πh−1(i))−25εn on the event Ωh (Lemmas 1–2). Thus, early stopping avoids further regret from arms that perform substantially worse than the preceding policy. Arms that are not stopped are recorded in D, together with their estimated mean rewards A(i,j), after mh,n observations. The duration Lh(mh,nmaxi∣Q(i)∣) ensures that every context appears sufficiently often to process all arms in Q(i), with probability at least 1−Se−8βh (Lemma 3). Once all arms in Q(i) have been processed, Collect plays πh−1(i) whenever context i appears.
3.3 Regret Analysis
We now state our main result.
Theorem 1. Under a uniform context distribution ν and an arbitrary induced block distribution ω, Algorithm 1 requires no knowledge of T and satisfies RegT=O(r(S+K)T).
Proof sketch. The key is to bound the regret incurred by Collect. If an arm is much worse than the preceding policy, Collect stops sampling it early. Otherwise, its reward is not much lower than that of the preceding policy. Since πh−1 has an average gap of O(εh) (Lemma 7), sampling one arm at every context at level n incurs at most O(Sβh/εn) regret. Summing over the arms sampled in Steps 2–4 gives O(βh3r(S+K)/εh).
The remaining rounds play either πh−1 or πh, both with average gap O(εh) (Lemma 7). Since phase h lasts O(βh3r(S+K)/εh2) rounds, these rounds contribute the same regret order. Lemma 5 bounds the regret from the events where these guarantees fail. Finally, using εh=2−h/2 and summing over phases yields RegT=O(r(S+K)T). The full proof is in Appendix A.
4 General Context Distributions
In this section we extend the result for a uniform context distribution to arbitrary context distributions in two steps.
4.1 Approximately Uniform Context Distributions
Corollary 1. Suppose 1/(8S)≤ν(i)≤8/S for all i∈[S] and the induced block distribution is arbitrary. Algorithm 1 satisfies RegT=O(r(S+K)T). The same holds when r≤min{S,K} is only an upper bound on the number of nonempty blocks; neither ν nor T need be known.
Corollary 1 extends Theorem 1 to approximately uniform context distributions. The lower bound on ν(i) ensures that Baseline and Collect receive sufficiently many observations, while the upper bound allows the average policy regret to remain O(εh). Thus, the same regret rate is preserved up to constant factors. This extension allows Algorithm 1 to be applied to groups of contexts with similar probabilities, which will be used to handle general context distributions.
The proof is in Appendix B.1.
4.2 Arbitrary Context Distributions
For an arbitrary context distribution ν, we adapt the frequency-based grouping approach of Lee et al. (2023, Algorithm 3 and Appendix F). Algorithm 4 partitions contexts according to their estimated arrival probabilities and runs Algorithm 1 separately within each retained group. With probability at least 1−(T+1)−2, each group's conditional context distribution satisfies the assumptions of
Corollary 1, while the remaining low-frequency contexts have total probability at most 2S/T. For a given horizon T, define J=⌈32STlog(2S(T+1)2)⌉. We may assume J≤T.
Algorithm 4 Online Algorithm for General Context Distributions
Let t denote the current time and initialize J←⌈32STlog(2S(T+1)2)⌉, L←1+⌈log2ST⌉
Play arm 1 for J rounds
ν(i)←J−1∑t=1J1{it=i} for i∈[S]
Xℓ←{i∈[S]:2−ℓ−1<ν(i)≤2−ℓ,ν(i)≥1/ST} for ℓ=0,…,L−1
XL←{i∈[S]:ν(i)<1/ST}
for each nonempty Xℓ with ℓ<L do
Initialize Algorithm 1 on Xℓ, using
S=∣Xℓ∣ and r=min{r,∣Xℓ∣}
for t=J+1,…,T do
Receive it
if it∈XL then
Play arm 1
else
Find ℓ<L such that it∈Xℓ
Use Algorithm 1 for Xℓ to select an arm
Play the selected arm and observe the reward
Update only Algorithm 1 for Xℓ
Theorem 2. For an arbitrary context distribution ν and its induced block distribution ω, Algorithm 4 satisfies RegT=O(r(S+K)T). Restarting Algorithm 4 on intervals of lengths 1,2,4,… gives the same bound without knowing T.
The initial estimation rounds and the discarded contexts each contribute at most O(ST) expected regret. Applying Corollary 1 within each remaining group and summing by Cauchy–Schwarz gives the stated rate; see Appendix B.
5 Conclusions and Future Directions
We establish expected regret O(r(S+K)T) for context-lumpable stochastic bandits under arbitrary block and context distributions, matching the lower bound up to logarithmic factors. Rather than recovering the unknown block partition, our approach constructs a shared candidate set Wh containing a near-optimal arm for each block, and then selects a near-optimal arm for each context from this set. Together with early stopping to control exploration regret, this improves the dependence on r in the previous online regret bound without requiring separation between blocks.
Context-lumpable bandits can be viewed as a special case of lumpable Markov decision processes (MDPs) with i.i.d. state transitions. Extending our approach to general lumpable MDPs, where transitions may depend on the state and action, is a natural direction for future work.
AI Disclosure
OpenAI's ChatGPT and Codex were used to assist with language polishing, LaTeX formatting, compilation error checking. The authors take full responsibility for all theoretical results, proofs, and the final manuscript.
References
Wei Chu, Lihong Li, Lev Reyzin, and Robert Schapire. Contextual bandits with linear payoff functions. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, volume 15 of Proceedings of Machine Learning Research, pages 208–214. PMLR, 2011.
Claudio Gentile, Shuai Li, and Giovanni Zappella. Online clustering of bandits. In Proceedings of the 31st International Conference on Machine Learning, volume 32 of Proceedings of Machine Learning Research, pages 757–765. PMLR, 2014.
Claudio Gentile, Shuai Li, Purushottam Kar, Alexandros Karatzoglou, Giovanni Zappella, and Evans Etrue. On context-dependent clustering of bandits. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1253–1262. PMLR, 2017.
Kyoungseok Jang, Chicheng Zhang, and Kwang-Sung Jun. Efficient low-rank matrix estimation, experimental design, and arm-set-dependent low-rank bandits. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 21329–21372. PMLR, 2024.
Yassir Jedra, William Réveillard, Stefan Stojanovic, and Alexandre Proutiere. Low-rank bandits via tight two-to-infinity singular subspace recovery. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 21430–21485. PMLR, 2024.
Kwang-Sung Jun, Rebecca Willett, Stephen Wright, and Robert Nowak. Bilinear bandits with low-rank structure. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 3163–3172. PMLR, 2019.
Yue Kang, Cho-Jui Hsieh, and Thomas Chun Man Lee. Efficient frameworks for generalized low-rank matrix bandit problems. In Advances in Neural Information Processing Systems, volume 35, pages 19971–19983. Curran Associates, Inc., 2022. doi: 10.52202/068431-1452.
Yue Kang, Cho-Jui Hsieh, and Thomas Chun Man Lee. Low-rank matrix bandits with heavy-tailed rewards. In Proceedings of the Fortieth Conference on Uncertainty in Artificial Intelligence, volume 244 of Proceedings of Machine Learning Research, pages 1863–1889. PMLR, 2024.
Chinmaya Kausik, Kevin Tan, and Ambuj Tewari. Leveraging offline data in linear latent contextual bandits. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 29345–29389. PMLR, 2025.
Tor Lattimore and Csaba Szepesvári. Bandit Algorithms. Cambridge University Press, 2020. doi: 10.1017/9781108571401.
Chung-Wei Lee, Qinghua Liu, Yasin Abbasi-Yadkori, Chi Jin, Tor Lattimore, and Csaba Szepesvári. Context-lumpable stochastic bandits. In Advances in Neural Information Processing Systems, volume 36, pages 77915–77941. Curran Associates, Inc., 2023. doi: 10.52202/075280-3404.
Lihong Li, Wei Chu, John Langford, and Robert E. Schapire. A contextual-bandit approach to personalized news article recommendation. In Proceedings of the 19th International Conference on World Wide Web, WWW '10, pages 661–670. ACM, 2010. doi: 10.1145/1772690.1772758.
Yangyi Lu, Amirhossein Meisami, and Ambuj Tewari. Low-rank generalized linear bandit problems. In Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, volume 130 of Proceedings of Machine Learning Research, pages 460–468. PMLR, 2021.
Odalric-Ambrym Maillard and Shie Mannor. Latent bandits. In Proceedings of the 31st International Conference on Machine Learning, volume 32 of Proceedings of Machine Learning Research, pages 136–144. PMLR, 2014.
Soumyabrata Pal, Arun Sai Suggala, Karthikeyan Shanmugam, and Prateek Jain. Optimal algorithms for latent bandits with cluster structure. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics, volume 206 of Proceedings of Machine Learning Research, pages 7540–7577. PMLR, 2023.
Stefan Stojanovic, Yassir Jedra, and Alexandre Proutiere. Spectral entry-wise matrix estimation for low-rank reinforcement learning. In Advances in Neural Information Processing Systems, volume 36, pages 77056–77070. Curran Associates, Inc., 2023. doi: 10.52202/075280-3369.
Guo Zeng and Jean Honorio. A novel general framework for sharp lower bounds in succinct stochastic bandits. In Advances in Neural Information Processing Systems, volume 38, Main Conference, pages 26678–26699. Curran Associates, Inc., 2025. doi: 10.52202/085713-0898.
A Uniform Context Distribution and Arbitrary Block Distributions
All phase-h probability bounds below also hold conditional on the observations and learner's random choices before round th. The letter C denotes an absolute constant that may change between inequalities. For the analysis, recall
εh,b=max{1,r∣B(b)∣S}εh=max{1,rω(b)1}εh.(3)
The second equality uses ω(b)=∣B(b)∣/S. This choice follows Lee et al. (2023, Appendix G); Algorithm 1 does not use εh,b or the block distribution.
In Collect at level n≤h, fix one entry j of Q(i) that receives k≥1 samples. If k≥2 and j=πh−1(i), the stopping inequality was false after sample k−1. On Ωh, Lemmas 1–2 give
This bounds the plays of πh−1 after dropping 1Ωh and including all rounds of the phase. In the final loop, Ωh and πh are determined before the next context arrives. The same calculation with Lemma 7 bounds those plays by 20εh(th+1−th). Therefore
The sum is zero for H=1. By (7), 2H≤2(T+1), so βH≤40log(16SKr(T+1)). Thus
RegT≤Clog3/2(16SKr(T+1))r(S+K)T=O(r(S+K)T).
A.3 Proofs of the Lemmas
Proof of Lemma 1. Suppose Baseline or Collect begins at round τ; condition on the observations and learner's random choices before iτ is drawn. Fix i and j=π(i) for Baseline, or one entry j of Q(i) for Collect. For k≥1, let It indicate whether yt is among the first k rewards recorded for this choice; sums below run over that algorithm's rounds.
Whether It=1 is determined before observing yt. By (1) and iterated expectations,
Eexp(λt∑Itηt−2λ2t∑It)≤1.
With λ=2βh/k, Markov's inequality gives
Pr(t∑It=k,t∑Itηt>2βhk)≤e−βh.
When ∑tIt=k, ∑tItηt=k(Ak(i,j)−A(i,j)). Applying the same bound with −λ yields
Here 1−e−1>1/2 and Lh(k)≥128S(k+βh). For Baseline, use k=mh and 2βh/mh≤εh/2. Equations (11)–(12) and a union bound give
Pr(∃i:∣Bh(i)−A(i,π(i))∣>εh/2)≤2Se−βh+Se−8βh.
Proof of Lemma 2. Conditional on the choices of Q(i), (11) applies to every entry and each k≤mh,n. Counting repeated arms separately, Steps 2–4 compute at most
An optimal arm cannot satisfy this inequality. By (iii)-(iv), whenever εn≥εh,b, Step 2 records (i,jb⋆)∈Dh,n for some i∈B(b).
In Step 3, (i,j⋆)∈/D implies A(i,j⋆)<A(i,πh−1(i)) by (iii) and (13). Since completed estimates and Bh have error at most εn/2, the definition of V gives
All remaining records from this block are deleted. No records are added during Step 3, so each Dh,n becomes empty within r iterations.
For εh,b≤1, choose the largest n≤h with εn≥εh,b. Since ε0=1 and εh,b≥εh, εh,b≤εn<2εh,b. Choose (i,jb⋆)∈Dh,n with i∈B(b). When this record is deleted,
The gap is also at most one by (2). For εh,b>1, this alone suffices.
Proof of Lemma 7. In Step 4, (iii) and (13) ensure that every j∈Wh with A(i,j)≥A(i,πh−1(i)) is recorded in D. Since πh−1(i)∈Wh, this includes an arm maximizing A(i,j) over Wh. Using the error bound εh/2 for all estimates, including Bh,
For h≥2, use (9) for assigned plays. For plays of πh−1, drop 1Ωh and condition at each call's start; for πh, condition at the final loop's start. By (4) and (7),
On E, condition on the initial history and subsequent group memberships until we average below; each Tℓ is then fixed. For i∈Xℓ at a round assigned to copy ℓ<L, independence of context arrivals gives
Future memberships are independent of preceding rewards, and the current membership is fixed by it. Thus (1) remains valid, also for each copy's local history by iterated conditioning. Each nonempty group has at most min{r,∣Xℓ∣} blocks, so Corollary 1 gives (trivially if Tℓ=0)