Manuscript Offprint
arXiv:2611.02431A Parameter-Free Best-of-Both-Worlds Policy for Queueing Bandits
Abstract
We study online channel scheduling for a single queue served by channels under bandit feedback. We propose a simple best-of-both-worlds policy that explores when the queue is empty. During busy periods, it selects the empirical best channel while the prescribed conditions hold and, if any condition is violated, switches to a robust bandit policy to clear the queue. For arbitrary arrivals and services determined by an oblivious adversary, our policy achieves worst-case queue length regret with high probability, where is the longest busy-period length. This result improves the previous dependence and matches the worst-case lower bound up to logarithmic factors. Under bounded i.i.d. stochastic models with a unique best stabilizing channel, we show that the cumulative queue length regret converges to a finite problem-dependent constant, and further establish the logarithmic expected worst-case queue length regret bound.
1 Introduction
Bandit problems provide a fundamental framework for sequential decision-making with partial feedback (Latimore and Szepesvári, 2019). In stochastic environments, the learner seeks to identify arms with high expected rewards, whereas adversarial environments require robustness without distributional assumptions. Best-of-both-worlds policies adapt to both regimes within a single policy (Bubeck and Slivkins, 2012). For classical bandits, such policies achieve logarithmic, problem-dependent regret in stochastic environments while retaining near-optimal guarantee in adversarial environments without knowing the regime in advance (Auer and Chiang, 2016; Zimmert and Seldin, 2021; Honda et al., 2023). A natural question is whether such adaptation is possible when decisions have lasting effects on a system and performance depends on the system states induced by past decisions rather than solely on the sum of immediate outcomes.
An important example of such state-dependent decision-making arises in queueing bandits, which model scheduling systems with unknown service outcomes (Krishnasamy et al., 2016, 2021). In this problem, jobs arrive sequentially, and in each round, the scheduler selects one of the channels to serve the queue and observes only the service provided by the selected one. A poor selection may leave more work unserved in the system, inducing additional backlog in subsequent rounds, whereas the accumulated effect of earlier mistakes disappears once the queue becomes empty. Therefore, standard bandit regret does not fully characterize queueing performance since the timing of service losses and the regenerative structure of the queue are both important.
A classical objective in queueing systems is stability (Dai, 1995). One commonly used notion is mean-rate stability, which requires , where is the queue length under the policy at round (Neely, 2010). When service statistics are unknown, one should learn which channels are effective while controlling the queue lengths (Yang et al., 2023; Freund et al., 2024). Stability alone, however, does not
Table 1: Comparison of queue length regret guarantees. Here, (S) indicates that the unique best arm is stabilizing, while (E) and (P) indicate guarantees in expectation and with high-probability, respectively. The quantity denotes the length of the longest busy period and satisfies . The queue dynamics considered in Stahlbuhk et al. (2021), given in (8), differ from those considered in Krishnakumar and Sinha (2025) and ours, given in (1).
| Metric | Reference | Assumptions | Regret |
|---|---|---|---|
| (worst-case regret) | Krishnakumar and Sinha (2025) | oblivious | (P) |
| Algorithm 1 (Theorem 3) | oblivious | (P) | |
| Algorithm 1 (Corollary 5) | i.i.d. bounded , (S), (4) | (E) | |
| \sum_t \mathbb{E}[Q_t^\pi - Q_t^i^*](cumulative regret) | Stahlbuhk et al. (2021) | i.i.d. Bernoulli , (S) | |
| Algorithm 1 (Theorem 4) | i.i.d. bounded , (S), (4) |
quantify the additional backlog incurred by learning, since two policies may both stabilize the system while producing substantially different queue trajectories.
This limitation motivates finer performance metrics for queueing bandits that compare learning policies with an informed oracle. For the single queue model, Krishnasamy et al. (2016) introduce the queue length regret where the oracle knows the service statistics and always selects the best channel. They show that this quantity initially behaves similarly to classical bandit regret, but eventually decreases at rate . Subsequent work extends this analysis to multiple queues (Krishnasamy et al., 2021; Kim and Oh, 2024) and contextual systems (Bae et al., 2026).
Another criterion is the cumulative queue length regret, , which measures the backlog accumulated over the horizon. For a stochastic single queue system with at least one stabilizing channel, Stahlbuhk et al. (2021) construct queue-dependent policies with cumulative regret. This is fundamentally stronger than summing a queue length regret of order , which would yield logarithmic cumulative regret. Complementarily, Freund et al. (2023) study the maximum increase in expected time-averaged queue length.
These results rely mainly on stochastic assumptions on arrivals and services, and much less is known when both processes can vary arbitrarily. In the oblivious adversarial regime, Krishnakumar and Sinha (2025) study the largest queue length regret over the horizon relative to the best constant policy. For a single queue served by channels, they obtain a high-probability bound of . Since a reduction from adversarial bandits gives a lower bound , this result leaves a gap in the dependence on . Moreover, an adversarially robust policy is particularly desirable if it retains the stronger guarantees available in stochastic regimes. Therefore, it is desirable to design a single policy that achieves near-optimal worst-case queue length regret in adversarial regimes while retaining constant expected cumulative regret in stochastic regimes.
The main difficulty is that queue length regret is governed by service losses accumulated over the current busy period, whose endpoints depend on the policy itself and may therefore be random. Hence, a bandit regret measured over the entire horizon can be too coarse, and the analysis must instead control regret over data-dependent intervals. Exploration must also be adapted to the queue state, since repeated exploration in the presence of new arrivals can cause backlog to accumulate and persist into subsequent rounds.
We address these difficulties by a parameter-free, queue-dependent policy, which collects observations through uniform exploration when the queue is empty, exploits the resulting estimates when a new busy period begins. When a queue-dependent test indicates that continued greedy exploitation may be unsafe, it switches to a robust bandit policy, Exp3-IX (Neu, 2015).
Contributions. In the oblivious adversarial regime with non-negative arrivals and bounded services, our policy achieves worst-case queue length regret with high-probability for the length of the longest busy period . Since , this matches the lower bound up to logarithmic factors, while providing a sharper guarantee when busy periods are short. Under i.i.d. bounded arrivals and services with a unique stabilizing best channel, the same policy obtains expected cumulative regret and also expected worst-case regret. Hence, combined with the adversarial result, it establishes a best-of-both-worlds guarantee. Table 1 summarizes our results and those of prior work.
where . Following the previous work (Stahlbuhk et al., 2021; Freund et al., 2024), we assume is observable even when .
2.1 Queue length regret
In this paper, we define an empty period as a maximal consecutive interval satisfying , which is more restrictive than previous approaches based only on . A busy period begins at round with and , and consists of the rounds from up to, but not including, the next round at which . If no such round exists, the busy period continues until . We denote the busy periods chronologically by and the empty period immediately preceding by . Note that consecutive busy periods may be adjacent if the queue is cleared in one round and a positive arrival occurs in the next. In this case, they are separated only by the empty boundary state , and we set the intervening empty period for notational consistency. Thus, the sequence of periods is represented by . We define the longest length of busy period up to by
For , let be the queue length under the constant policy that always selects , so that . The worst-case queue length regret is defined by
In the adversarial regime, we assume the sequence is determined by an oblivious adversary in advance satisfying and . The following lemma shows that the queue length regret is bounded by the cumulative service regret within the current busy period rather than over the entire horizon.
Lemma 1 (Lemma 1 of Krishnakumar and Sinha (2025)). For any , let denote the first round of . Then, for any
This result also explains why no upper bound on is imposed in the adversarial regret. Although large can produce large queue lengths, these terms cancel when queue lengths are compared since the policy and every constant policy receive the same arrivals.
In the stochastic regime, we assume the sequence is i.i.d., where and , and is independent of . We allow arbitrary bounded distributions and fractional arrivals and services, which encompasses the Bernoulli model in Stahlbuhk et al. (2021). Instead, we only require
where is a problem-dependent constant unknown to the policy. We denote their expectations by
We assume that the best channel is unique and stabilizing, i.e., . We define suboptimality gaps by with . The expected cumulative queue length regret is defined as
The conditions and are needed to guarantee bounded cumulative queue length regret in general. If , a multi-armed bandit instance gives an lower bound. Without , every policy can incur cumulative regret (Stahlbuhk et al., 2021).
2.2 Previous approaches
Since each channel can be viewed as a bandit arm with loss , a natural baseline is to apply a bandit policy directly to the observed services. However, even in the stochastic regime, such queue-independent policies can incur cumulative queue length regret (Stahlbuhk et al., 2021). To exploit the queueing structure, Stahlbuhk et al. (2021) construct a queue-dependent three-phase policy whose cumulative regret is bounded uniformly over and thus converges to a finite, problem-dependent constant under Bernoulli models whenever at least one channel is stabilizing.
In particular, at the first round of each empty period, they sample an arm uniformly at random and update its empirical estimate, after which it remains idle until the queue becomes busy. During the p-th busy period, they select the empirical best arm, based on observations during empty periods, at most p times. If the queue remains busy even after these rounds, the policy enters a recovery phase that alternates between uniform-exploration rules and greedy selection based on the local estimates until the queue empties.
In contrast, Krishnakumar and Sinha (2025) study the worst-case queue length regret under arrivals and services selected by an oblivious adversary. They reduce the queueing problem to controlling adversarial bandit regret uniformly over all subintervals and introduce a queue-independent policy that combines online gradient descent with importance-weighted (IW) loss estimates and uniform exploration, using knowledge of
to tune its exploration rates. It achieves a high-probability regret bound of , leaving a gap to the lower bound.
Combining these guarantees requires controlling the backlog accumulated due to greedy exploitation in adversarial regimes while ensuring that recovery occurs sufficiently rare in stochastic regimes. The time-out rule of Stahlbuhk et al. (2021) allows increasingly long exploitation rounds as the busy period index grows, which may lead to large regret in adversarial regimes. Lemma 1 suggests that the queue state can help address these difficulties by restricting the relevant intervals to individual busy periods.
3 Proposed Policy
We propose a parameter-free, queue-dependent policy with three phases, following the structure of Stahlbuhk et al. (2021). The policy requires only the number of arms without knowledge of any environmental parameters or the horizon . Its key components are an additional queue-dependent condition for exploitation and an adversarial bandit policy for recovery. During empty periods, our policy explores arms uniformly and updates its empirical loss estimates. Then, each busy period begins by exploiting the empirical best arm identified from these observations. If the prescribed conditions fail before the queue empties, it enters the recovery phase by initializing an Exp3-IX instance (Neu, 2015), which continues until the queue becomes empty.
The queue-dependent condition is introduced to control the excess backlog before recovery, while Exp3-IX controls the additional service regret during recovery. Initializing a fresh instance in each recovery phase allows this regret to be analyzed over its local rounds within the current busy period.
3.1 Exploration phase
Whenever , the policy enters the exploration phase, where we count all exploration rounds by . At the -th exploration round, corresponding to global round , the policy draws uniformly from and observes . It then constructs an IW loss estimator by and updates the cumulative loss estimate by with . These estimates are updated only during exploration phase and subsequently used to identify the empirical best arm at the beginning of each busy period.
3.2 Exploitation phase
At the beginning of , where and , the policy enters the exploitation phase and initializes the local exploitation round to . In this phase, the policy always selects
To determine whether this greedy selection is safe, we introduce an auxiliary optimistic queue length with updated in every round according to
Since , holds. Hence, measures the excess backlog incurred by imperfect service.
At the -th exploitation round of , corresponding to global round , the policy keeps selecting if
The first condition is the time-out rule of Stahlbuhk et al. (2021), and the second controls the excess backlog, which is essential for our adversarial guarantee. Note that both conditions hold automatically at , since and . If the queue becomes empty, the exploitation phase ends, and if either condition fails while the queue remains busy, the policy transitions to the recovery phase.
Remark 2 (Observation of arrivals). Under our arrivals-first convention in discrete-time scheduling, represents the backlog carried into round before new work enters, while represents the work accumulated since the beginning of round . At the beginning of round , this work is admitted before the scheduling decision and service. We assume that the scheduler can observe whether the resulting queue is empty. In other words, our policy requires only the indicator and this is a queue-state observation at the beginning of round and does not provide any future information about arrivals or services.
This indicator distinguishes an exploration opportunity, where , from the beginning of a busy period, where and . Hence, the policy can use genuinely empty rounds to improve its estimations in preparation for the next busy period and then select the empirical best arm from its first round . In particular, the indicator allows the policy to respond to newly admitted work without a one-round delay. If the decision were based only on , the policy could not distinguish these two cases and might perform uniform exploration at round , selecting the empirical best arm only in the following round. Such unnecessary exploration can create additional queue length regret even when the optimal arm has already been identified correctly. This immediate transition from exploration to exploitation is needed for our stochastic cumulative regret guarantee. Further details are given in Appendix C.1.
Indeed, the need for this assumption in our policy depends on the queue dynamics. Our definition in (1) follows the arrivals-first convention adopted in much of the queueing bandit literature most closely related to our setting (Krishnasamy et al., 2016, 2021; Kim and Oh, 2024; Freund et al., 2024; Krishnakumar and Sinha, 2025; Bae et al., 2026). In comparison, Stahlbuhk et al. (2021) study cumulative queue length regret under the service-first convention
which is used in the stochastic network optimization literature (Neely, 2010). In their model, implies , regardless of the selected arm. Therefore, exploration during empty periods preserves the queue length difference without observing the current arrival before decision. Our arrival-observation assumption serves an analogous purpose under the dynamics in (1).
3.3 Recovery phase
Once the policy enters the recovery phase, then it remains in this phase for the rest of the current busy period. At the beginning of the recovery phase in , it initializes an Exp3-IX instance with local round counter and cumulative estimated losses . At the -th recovery round, corresponding to global round , we define for all
Algorithm 1: Best-of-Both-Worlds Bandit Scheduling
1 Input: ; Initialize , , , .
2 while True do
3 Observe the arrival .
4 if then 5 // Empty period: Exploration phase 6 Update exploration round . 7 Play and observe service . 8 Set and update .
8 else 9 if then 10 // First round of Exploitation phase 11 Set phase exploitation. 12 Increase the busy period count , reset exploitation round . 13 Take the empirical best in empty periods. 14 Play and observe service . 15 Update exploitation round .
15 else 16 if phase = exploitation then 17 // When 18 // Exploitation phase 19 if , then 20 Play , observe service , and update exploitation round . 21 else 22 Set phase recovery. 23 Initialize a new Exp3-IX instance by and . 24 25 if phase = recovery then 26 // Recovery phase: Exp3-IX 27 Set and as in (9), and . 28 Play and observe service . 29 Set as in (10) and update and recovery round .
26 Update queue length and .
27 Update global round .
The policy samples , observes , constructs the implicit-exploration loss estimator
and then updates . Here, is the implicit-exploration parameter introduced by Neu (2015). Adding introduces a controlled bias and limits the magnitude of the loss estimator for small , enabling high-probability adversarial regret guarantees without explicit uniform exploration.
The Exp3-IX instance runs until the queue becomes empty, after which its local estimates are discarded. Thus, recovery observations are not shared across busy periods and not incorporated into the exploration estimate . While Stahlbuhk et al. (2021) employed UCB-type policies in their heuristic policy, our use of Exp3-IX is designed to provide guarantees under both stochastic and adversarial regimes. Specifically, its high-probability regret bound controls the additional service regret during recovery in the adversarial regime. The complete pseudo-code is given in Algorithm 1.
4 Theoretical Guarantee
In this section, we provide the regret bounds of our policy in both adversarial and stochastic regimes, whose detailed proofs are given in Appendices A, C, and E.
Theorem 3. In the oblivious adversarial regime, for any and , Algorithm 1 satisfies
with probability at least whenever .
Note that means that the queue remains empty for all rounds, where the worst-case queue length regret is trivially zero. Moreover, since holds by and Lemma 1, setting gives an expected regret bound of the same order, up to logarithmic factors.
Proof sketch. Since threshold controls the excess backlog accumulated during exploitation and Exp3-IX controls the additional regret incurred during recovery, the analysis reduces to controlling the regret of each recovery instance at every local round.
Let be the regret of corresponding Exp3-IX instance accumulated over the first s recovery rounds during p-th busy period. Then, we establish that
The first term follows the exploitation threshold in (7), which controls the worst-case regret when the policy enters recovery. For the second term, Neu (2015) provides a high-probability regret bound of for an Exp3-IX instance over rounds. We apply this bound to each instance and take a union bound over all instance indices and local rounds . Since every recovery instance lasts at most rounds, we obtain the desired high-probability regret bound.
In the stochastic regime, the cumulative regret is finite if the unique best arm is stabilizing and both the arrivals and services are i.i.d. with support [0, 1].
Theorem 4. Suppose that is i.i.d. with , , and , and that the unique best arm is stabilizing with . Then, Algorithm 1 satisfies
where
Proof sketch. For the cumulative queue length regret, we follow the busy period decomposition of Stahlbuhk et al. (2021). We first define the good period indicator
where denotes the interval of recovery phase during the busy period . When , the policy selects throughout , including its first round . Since the empty period is determined by the queue length of the policy, can be positive and the monotonicity of the queue recursion implies throughout this period. Empty periods also contribute no positive queue length difference. Hence, it suffices to control the contributions of busy periods satisfying .
The argument combines a bound on the regret in with a bound on its probability. Since bounded arrivals imply , directly controls the queue length, while the time-out condition limits greedy exploitation to at most rounds. During the recovery phase, the Exp3-IX regret bound and the stability gap provide tail bounds on the rounds required to empty the queue. By combining these arguments, we obtain
where is polynomial in , , and .
By definition, occurs only if is incorrect or exploitation phase ends before the queue becomes empty. Since the assumption provides certain degree of exploration opportunities, combining a concentration inequality on the number of exploration rounds, with a time-uniform version of Freedman's inequality for the loss estimates, controls the probability of selecting an incorrect empirical best arm. When the empirical best arm is correct, Hoeffding's inequality and controls the probabilities of violating the queue length threshold or reaching the time-out before the queue empties. The obtained probability bound decays sufficiently fast so that
which concludes the proof.
However, Theorem 4 does not directly bound the expected worst-case queue length regret, since the maximum over time is taken before the expectation. The following corollary provides such a guarantee.
Corollary 5. Under the assumptions of Theorem 4, for any , Algorithm 1 satisfies
Thus, our policy simultaneously achieves uniformly bounded expected cumulative regret and logarithmic expected worst-case regret in the stochastic regime.
Proof Sketch. For worst-case regret, it suffices to additionally compare with every constant policy as
The expected first term is bounded by . For each suboptimal arm i, the service difference has negative mean . Applying concentration inequalities to these service differences over all relevant intervals provides the bound on the second term,
which concludes the proof.

(a) Worst-case regret.

(b) Cumulative regret.
Figure 1: Results in the adversarial regime.
5 Numerical experiments
To verify our best-of-both-worlds guarantee, we evaluate our policy in an adversarially varying environment and an i.i.d. stochastic environment, conducting 1000 independent runs of rounds in each setting. In all figures, the lines denote the empirical means and shaded regions indicate pointwise 95% confidence intervals. Further experimental details are in Appendix G.
Baselines. We compare our policy, Algorithm 1, with (i) Q-ThS (Krishnasamy et al., 2016), which is designed to minimize the queue length regret, (ii) the three phase policy of Stahlbuhk et al. (2021), which is designed for cumulative queue length regret, and (iii) OGD-based policy of Krishnakumar and Sinha (2025), which is designed to minimize worst-case queue length regret. In this section, we refer to the latter two policies as SSM-3P and KS-OGD, respectively.
Adversarial environments. In this setting, we follow the instance considered in Krishnakumar and Sinha (2025), where there are non-stationary arms and we divide the horizon into consecutive blocks of equal lengths. At the beginning of each block, we sample a coefficient from Uniform(0,1) and fix this value. Then, the services of at every in block is determined by
where is an i.i.d. additive noise. The arrivals are sampled from a uniform distribution with mean satisfying .
Figure 1 shows the empirical queue length regret in this adversarial instance. KS-OGD performs best on this instance, whereas SSM-3P performs worst, consistent with the observations in Krishnakumar and Sinha (2025). Our policy achieves performance comparable to KS-OGD and Q-ThS in both worst-case and cumulative queue length regret.
The queue length trajectories in Figure 3a explicitly show the increase after some block transitions, particularly between rounds 4000 and 6000, i.e., the fourth block. All four policies experience substantial regret increase during this interval, suggesting that these transitions introduce significant environmental changes. For our policy, such changes may make the arm selected for greedy exploitation suboptimal, resulting in additional backlog before the recovery phase.
Stochastic environments. For the stochastic regime, we follow the setting of Stahlbuhk et al. (2021), with i.i.d. Bernoulli arrivals and services of expectations and , respectively. As shown in Figure 2, our policy achieves substantially lower regret than the baselines under both regrets.

(a) Worst-case regret.

(b) Cumulative regret.
Figure 2: Results in the stochastic regime.

(a) Adversarial regime.

(b) Stochastic regime.
Figure 3: The trajectories of queue lengths .
Moreover, our policy, KS-OGD, and Q-ThS appear to converge to finite values as the horizon increases. Combined with the adversarial experiments, these results complement our theoretical analysis by illustrating the competitive performance of our policy across both regimes.
The queue length trajectories in Figure 3b provide further insight into these differences. In particular, Q-ThS and KS-OGD exhibit a clear transition from initial queue growth to subsequent stabilization, qualitatively resembling the two-stage behavior of queue length regret studied by Krishnasamy et al. (2016). During the early stage, exploration and inaccurate service estimates can lead to an increase the queue length. As the policy learns to select the best arm more often, it can stabilize the queue and thus queue length decreases.
In contrast, two phase-based policies, ours and SSM-3P, exhibit a less distinct separation between the two stages and a gradual decrease in later rounds. While our policy initially has the shortest queue and reduces it first, of KS-OGD and Q-ThS decrease rapidly and eventually fall below that of ours. The gradual decrease under our policy may result from additional explorations needed for robustness, which can select suboptimal arms and delay queue clearance in stochastic regimes.
6 Conclusion
We proposed a parameter-free policy that achieves best-of-both-worlds guarantees for single queueing bandits. Our policy achieves worst-case queue length regret with high-probability in the oblivious adversarial regime, where denotes the length of the longest busy period. Under i.i.d. bounded sequences with a unique stabilizing optimal arm, it simultaneously achieves constant expected cumulative queue length regret and logarithmic expected worst-case queue length regret. These results show that a simple policy can retain strong stochastic guarantees as well as adversarial guarantees, without knowledge of the regime. Numerical results support our analysis by showing competitive performance across both regimes.
A promising direction is to investigate whether ideas from decoupled bandits can improve the use of exploration opportunities (Rouyer and Seldin, 2020; Kim et al., 2026). Our policy already separates selections for exploration from those for exploitation, assigning these roles to empty and busy periods, respectively. This structure suggests replacing uniform exploration with adaptive sampling that accounts for uncertainty in the estimates and their importance to subsequent decisions. Such an approach may reduce the cost of initial learning and improve practical performance. Establishing whether such improvements can be achieved while preserving both the stochastic guarantee and adversarial robustness is an interesting direction for future work.
AI use statement
In this work, we used generative AI tools, Chat-GPT 5.6 Sol xHigh, to help develop the conceptual framework through a survey of the queueing bandit literature, formulate mathematical claims, particularly notation and definitions, suggest ingredients for proofs, particularly for understanding and adapting the formulation of Howard et al. (2020) to our one-dimensional notation, assist in writing proofs through choices of terminology and notation, refine research hypotheses through a survey of different queue dynamics, provide feedback on the research methodology and experimental design, implement methods in Python. We did not use generative AI tools for interpretation of results, writing the manuscript from the beginning, translation, cleaning or reformatting datasets, generating synthetic datasets, and qualitative and thematic data analysis was not applicable to this work.
Additionally, we used the tool for brainstorming, searching for related literature, identifying relevant references, suggesting experimental settings, generating and editing software code, revising the manuscript, improving readability, and suggesting the title of the paper.
We reviewed all AI-assisted work. All mathematical claims were checked and written line by line by the authors. All AI-assisted code was reviewed and tested against the stated algorithms, and the reported experimental results were generated and verified by the authors. All references and literature summaries were checked against the original sources through a manual literature review. The authors revised and approved all AI-assisted text. We take responsibility for the final content of this work, including text, claims, and artifacts produced with the aid of generative AI.
Acknowledgements
JL was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. RS-2024-00395303) and by the grant No. 2024-00460980 (IITP) funded by Korea Government (MSIT). CK was supported by the grant Nos. 2024-00460980; and 2025-02304717 (IITP) funded by the Korea government (the Ministry of Science and ICT).
Bibliography
Peter Auer and Chao-Kai Chiang. An algorithm with nearly optimal pseudo-regret for both stochastic and adversarial bandits. In Conference on Learning Theory, pages 116–120. PMLR, 2016.
Seoungbin Bae, Garyeong Kang, and Dabeen Lee. Queue length regret bounds for contextual queueing bandits. In International Conference on Learning Representations, 2026.
Allan Borodin, Jon Kleinberg, Prabhakar Raghavan, Madhu Sudan, and David P Williamson. Adversarial queuing theory. Journal of the ACM (JACM), 48(1):13–38, 2001.
Sébastien Bubeck and Aleksandrs Slivkins. The best of both worlds: Stochastic and adversarial bandits. In Conference on Learning Theory, pages 42–1. JMLR Workshop and Conference Proceedings, 2012.
Jim G Dai. On positive harris recurrence of multiclass queueing networks: a unified approach via fluid limit models. The Annals of Applied Probability, 5(1):49–77, 1995.
Daniel Freund, Thodoris Lykouris, and Wentao Weng. Quantifying the cost of learning in queueing systems. Advances in Neural Information Processing Systems, 36:6532–6544, 2023.
Daniel Freund, Thodoris Lykouris, and Wentao Weng. Efficient decentralized multi-agent learning in asymmetric bipartite queueing systems. Operations Research, 72(3):1049–1070, 2024.
Junya Honda, Shinji Ito, and Taira Tsuchiya. Follow-the-perturbed-leader achieves best-of-both-worlds for bandit problems. In International Conference on Algorithmic Learning Theory, pages 726–754. PMLR, 2023.
Steven R. Howard, Aaditya Ramdas, Jon McAuliffe, and Jasjeet Sekhon. Time-uniform chernoff bounds via nonnegative supermartingales. Probability Surveys, 17:257–317, 2020. doi: 10.1214/18-PS321.
Chaiwon Kim, Jongyeong Lee, and Min-hwan Oh. Follow-the-perturbed-leader for decoupled bandits: Best-of-both-worlds and practicality. International Conference on Machine Learning, 2026.
Jung-hun Kim and Min-hwan Oh. Queueing matching bandits with preference feedback. Advances in Neural Information Processing Systems, 37:64649–64702, 2024.
G Krishnakumar and Abhishek Sinha. Minimizing queue length regret for arbitrarily varying channels. In IEEE International Symposium on Information Theory, pages 1–6. IEEE, 2025.
Subhashini Krishnasamy, Rajat Sen, Ramesh Johari, and Sanjay Shakkottai. Regret of queueing bandits. Advances in Neural Information Processing Systems, 29, 2016.
Subhashini Krishnasamy, Rajat Sen, Ramesh Johari, and Sanjay Shakkottai. Learning unknown service rates in queues: A multiarmed bandit approach. Operations research, 69(1):315–330, 2021.
Tor Lattimore and Csaba Szepesvári. Bandit algorithms. Cambridge University, 355, 2019.
Michael Neely. Stochastic network optimization with application to communication and queueing systems. Morgan & Claypool Publishers, 2010.
Gergely Neu. Explore no more: Improved high-probability regret bounds for non-stochastic bandits. Advances in Neural Information Processing Systems, 28, 2015.
Chloé Rouyer and Yevgeny Seldin. Tsallis-inf for decoupled exploration and exploitation in multi-armed bandits. In Conference on Learning Theory, volume 125, pages 3227–3249. PMLR, 2020.
Thomas Stahlbuhk, Brooke Shrader, and Eytan Modiano. Learning algorithms for minimizing queue length regret. IEEE Transactions on Information Theory, 67(3):1759–1781, 2021.
Zixian Yang, R Srikant, and Lei Ying. Learning while scheduling in multi-server systems with unknown statistics: Maxweight with discounted ucb. In International Conference on Artificial Intelligence and Statistics, pages 4275–4312. PMLR, 2023.
Julian Zimmert and Yevgeny Seldin. Tsallis-inf: An optimal algorithm for stochastic and adversarial bandits. Journal of Machine Learning Research, 22(28):1–49, 2021.
Appendix Contents
A Proof of Theorem 3: adversarial regime 16
B Proof of Lemmas for Theorem 3 17
B.1 Proof of Lemma 7 ..... 17
B.2 Proof of Lemma 8 ..... 18
C Proof of Theorem 4: stochastic regime 18
C.1 Observation of arrivals ..... 21
D Proofs of Lemmas for Theorem 4 22
D.1 Proof of Lemma 11 ..... 22
D.2 Proof of Lemma 12 ..... 24
E Proof of Corollary 5 25
F Proofs of auxiliary lemmas 27
F.1 Proof of Lemma 9 ..... 27
F.2 Proof of Lemma 10 ..... 27
F.3 Proof of Lemma 13 ..... 27
F.4 Proof of Lemma 14 ..... 30
G Details on experiments 31
A Proof of Theorem 3: adversarial regime
For notational simplicity, we partition each busy period into two consecutive subintervals according to the phases of Algorithm 1. For each busy period , let denote its exploitation interval and be the subsequent recovery interval, during which an Exp3-IX instance is run. Thus, holds, where may be empty if the queue empties during the exploitation phase.
To quantify the contribution of the recovery phase, consider any such that , and let denote the global round of the -th recovery round in . Specifically, it satisfies
For any , define the regret of the corresponding Exp3-IX instance over its first recovery rounds by
The high-probability bound for this regret is given as follows.
Lemma 6 (Theorem 1 of Neu (2015)). Consider any oblivious loss sequence with . Then, for any fixed and any , Exp3-IX satisfies
Since the index only identifies the busy periods, it does not appear in this per-phase bound. We next express the worst-case queue length regret in terms of , whose proof is given in Appendix B.1.
Lemma 7. Algorithm 1 satisfies for any
Note that Lemma 6 considers a single Exp3-IX instance at a fixed length . Since each recovery phase initializes a fresh instance, Lemma 6 can be applied to for every fixed pair after conditioning on the history preceding the -th recovery phase. Hence, a union bound extends this guarantee to all Exp3-IX instances and their realized pairs as follows.
Lemma 8. For any and for any ,
holds with probability at least .
Proof of Theorem 3. Combining Lemmas 7 and 8 concludes the proof.
B Proof of Lemmas for Theorem 3
B.1 Proof of Lemma 7
To derive the upper bounds on the worst-case queue length regret, we first introduce the relationship between queue length and optimistic queue length defined in Section 3. Since
for any , it holds that
Define the observable excess queue length by
Then, (12) and its definition imply that
Then, we need following auxiliary lemmas to prove Lemma 7, where the proofs are postponed to Appendix F.
Lemma 9. For any , whose corresponding local exploitation round is , Algorithm 1 satisfies
where as defined in (7). Moreover, if , it holds that
where denotes the global round of the first local recovery rounds in the p-th busy period.
Lemma 10. For any , whose corresponding local recovery round is , Algorithm 1 satisfies
Proof of Lemma 7. Let for any function . Then, by Lemmas 9 and 10, we obtain
(by Lemmas 9 and 10)
(by Lemma 9)
The last inequality follows since by definition of in (2) and .
B.2 Proof of Lemma 8
Proof. For each pair , define
Since
applying Lemma 6 with and taking a union bound over all shows that
for any realized pair with probability at least . For every recovery phase, we have and , which concludes the proof.
C Proof of Theorem 4: stochastic regime
In this section, we consider primarily the loss representation to keep the notation consistent with our loss estimators. Due to the similar phase-dependent policy structure, our analysis follows the outline of Stahlbuhk et al. (2021), although the technical arguments are different.
Recall that, in the stochastic regime, and are i.i.d. across all rounds. First, for each busy period , we define the good-period indicator by
In other words, implies that the empirical best arm in exploration phases is correctly identified and the queue becomes empty without entering the recovery phase, and otherwise, . Therefore, our policy always selects throughout the busy period if . Then, we have the following lemmas, whose proofs are given in Appendix D.
Lemma 11. For and , Algorithm 1 satisfies that
where
for a universal constant c > 0.
Lemma 12. For , it holds that
Proof of Theorem 4. Recall that busy and empty periods are defined by the policy’s queue, so is possible even during an empty period. On the good busy period where , Algorithm 1 selects throughout the exploitation phase, equivalent to whole busy period, including its first round . Since , monotonicity of the queue recursion under the same arrivals and services imply that
Establishing this result for our policy requires the assumption that arrivals are observed before decision, as explained in Appendix C.1. Therefore, if , contribute no positive cumulative queue length regret so that considering the busy period with is sufficient.
Since in the empty period, we have
By Lemma 11, there exists a constant satisfying for all
Let . Then, by Lemma 12 and , it suffices to show that there exists a finite constant satisfying
For simplicity, let
First term. Consider the following term,
Then, by simple arithmetic calculation, we have
Second term. The second part is indeed negligible since is dominating, i.e.,
Third term. Similarly to the first term, we obtain
Fourth term. Finally, we have
Conclusion. In sum, by definition of , we obtain
which is finite since , , and .
Therefore, for any ,
which concludes the proof.
C.1 Observation of arrivals
Observing before selecting allows the policy to distinguish an opportunity for exploration from the first round of a new busy period. This distinction prevents the first decision of a good busy period from inducing excess backlog relative to the comparator and supports the queue comparison used in our stochastic analysis.
Let be the first round of the busy period . By definition,
Therefore, on the event , Algorithm 1 selects the optimal arm throughout , including the round . Since busy and empty periods are defined by the policy's queue, need not be empty at , which implies . Since both queues subsequently receive the same arrivals and service, monotonicity of the queue recursion preserves this ordering. Therefore,
which implies
Thus, these good busy periods contribute no positive cumulative queue length regret.
This argument relies on selecting from the first round of the busy period, where and . To see what can fail without arrival observation, consider the modification that explores uniformly whenever , before observing . If , exploration does not change the queue status regardless of the selected arm. If , however, the decision before the newly arrived data, giving
In particular, if as well, then
which can be positive. The queue comparison can therefore incur linear regret even when the empirical best arm is already correct and the policy selects it in every subsequent round. Although this discrepancy may disappear after the queue becomes empty, similar costs can incur at the start of later busy periods.
Indeed, this modification can incur linear cumulative regret on an instance satisfying our stochastic assumptions. Consider an instance
Here, , arrivals and services are independent, and is uniquely optimal and stabilizing. The comparator queue satisfies for every .
When , uniform exploration incurs one unit of backlog if and arm 2 is selected, an event with conditional probability . When , the queue is integer-valued and therefore at least one. On the event , service of at most one unit cannot empty this queue, regardless of the selected arm. Thus,
This implies that for every , we have
Therefore, uniform exploration based only on the pre-arrival condition cannot achieve a sublinear stochastic cumulative-regret guarantee in our queue recursion definition.
The corresponding issue does not arise under the queue dynamics of Stahlbuhk et al. (2021), where they use
In their model, arrivals in round become available for service only in the following round. Therefore,
holds regardless of the decision in round . Under their queue dynamics, exploration during empty periods preserves this queue comparison.
In other words, our arrivals-first assumption is introduced since we adopt the standard Lindley recursion
which is also used in prior work on stochastic and adversarial queueing bandits (Krishnasamy et al., 2016; Freund et al., 2024; Kim and Oh, 2024; Krishnakumar and Sinha, 2025; Bae et al., 2026). Under this formulation, newly arriving data can receive service in the same round.
Our additional assumption that arrivals are observed before decision allows the policy to identify rounds in which exploration cannot create backlog. Specifically, the policy explores when and begins exploitation immediately when and . Only the indicator is needed before the decision and the exact arrival amount can be revealed afterward for the queue updates.
Remark 2 (Adversarial guarantee without arrival observation). Consider a variant of Algorithm 1 that explores whenever and starts exploitation at the first round with , i.e., where its busy periods are maximal intervals on which . Let denote the longest such period up to . The bound of Theorem 3 holds for this variant with replaced by . The variant does not need to observe , since its auxiliary queue can be updated from consecutive queue lengths and the observed service of the selected channel. Thus, arrival observation is required for our stochastic cumulative-regret guarantee, but not for the adversarial guarantee.
D Proofs of Lemmas for Theorem 4
D.1 Proof of Lemma 11
To prove this lemma, we first need the following result, whose proof is given in Appendix F.
Lemma 13. Let denote the total number of local recovery rounds with the first round queue length . Then, for any and , it holds that
for . Therefore, has a finite -th moment satisfying
which implies that every fixed moment is polynomially bounded in terms of , and .
Proof. Since if satisfies as in (16), it suffices to consider the case of . Hence, we consider the exploitation phase and recovery phase, respectively.
Exploitation phase. Note that and thus in the stochastic setting with by (13). Therefore, at the -th round of exploitation phase in busy period , threshold condition implies that
Since the exploitation phase occurs at most p rounds in by time-out condition, it holds
If it does not transition to the recovery phase, holds, which concludes the proof.
Recovery phase. Therefore, we consider the case where the recovery phase exists. Let , which implies that the exploitation ends with queue length q > 0 and thus satisfies
For simplicity, we index the recovery phase from 1 so that . Since , it holds that
By applying Lemma 13 for r = 1, 2, we obtain
(by (17))
which concludes the proof.
D.2 Proof of Lemma 12
The following results are required to provide the upper bounds on the probability of , whose proofs are given in Appendix F.
Lemma 14. For any , it holds that
Note that by our index notation, , and thus the probability is for m=0 case.
Proof of Lemma 12. By definition, if its empirical best arm is incorrect or if it enters the recovery phase despite identifying the correct best arm. Let
be the number of exploration rounds up to the beginning of busy period . Since the can be empty due to positive arrivals right after the queue becomes empty, let be the first round with after the -th the busy period, with .
Therefore, implies that Algorithm 1 is in exploration phase at the round , which implies
Since is determined by the history before its arrival, i.i.d. arrival assumption implies that are independent Bernoulli random variables with success probability . Hence, its summation follows the Binomial distribution with trials and success probability. By applying multiplicative Chernoff bound, we obtain
Incorrect empirical best arm. By the definition of in (6), Lemma 14 implies that for
Recovery phase with correct best arm. Let us consider the case where holds. Then, during the exploitation phase , the policy always selects . Define the residual queue length by , which satisfies
Therefore, is of expectation zero.
Case 1: threshold violation. Consider the case the exploitation phase end because the queue length exceeds the threshold. Notice that the threshold violation cannot occur at local exploitation round since and at since by definitions.
If such threshold violation occurs at round , this means that the preceding times selecting did not empty the queue. Therefore,
By applying Hoeffding's inequality, we obtain
Since such threshold violation occur at most once for each busy period, a union bound gives
Case 2. time-out. If the recovery phase starts by the time-out after p optimal arm selections, the queue remains positive after these p rounds. Therefore,
Here, for , holds. By applying Hoeffding's inequality, we obtain
Finally, combining all the results with a union bound concludes the proof.
E Proof of Corollary 5
Proof. By definition, we have
which implies
By Theorem 4, the first term satisfies
For the second term, let us consider the busy period in terms of constant policy of selecting , with its initial round . Then, for , we have
During this period, for any , it holds that
Hence, we obtain
Let , which satisfies and . For any , Hoeffding's inequality gives that
By taking a union bound, we have for any x > 0 that
This is because the possible choices of interval pairs is . Let so that . Since for any non-negative random variable , we obtain
(by definition of )
which concludes the proof.
F Proofs of auxiliary lemmas
F.1 Proof of Lemma 9
Proof. Indeed, the lemma follows directly from the construction of the policy and the relations between , , and . Fix any , and let be its local exploitation round. Since the policy remains in the exploitation phase at round , the threshold condition in (7) ensures that
Combining this inequality with (14) concludes the first part. The second part follows from .
F.2 Proof of Lemma 10
Proof. Fix any , and let be its local recovery round, so that . Since the policy queue remains non-empty throughout the busy period, its recursion is linear between the first recovery round and round . Therefore,
where are selected by the corresponding Exp3-IX instance. In contrast, the queue length under the constant policy can be empty during this interval. Nevertheless, since , we have for any
Therefore, for any and satisfying , we obtain
(by (12))
which concludes the proof. Note that the additive constant 1 is not essential and is included only to simplify the presentation by shifting the index. □
F.3 Proof of Lemma 13
Proof. Let denote the complete history until the beginning of the recovery phase, i.e., for . Under i.i.d. stochastic model, the future observations during the recovery phase are independent of and have the same distribution as the original process.
For simplicity, we use the round index from 0, so that holds at the beginning of the recovery phase. On the event , the queue remains strictly positive throughout the first recovery rounds, i.e., for all , which implies
Note that is selected by Exp3-IX policy and
Define
so that (19) implies .
Suppose , which implies that . Then, (19) implies that holds if . In other words,
Case 1. We first control the first event related to . Let , so that . By the definition of , we have and . Therefore, Hoeffding's inequality gives
Case 2. Here, let us consider the case for . By definition of in (11), it holds that
regardless of . Therefore, by choosing in Lemma 6 for , we have
Here, by the choice of and , for and , we have and thus
Hence, if ,
which implies our choice of is valid. Moreover, for , we have
Since by definition, we obtain
Therefore,
which concludes the proof for the first part.
Set and . Then, for any , the first part shows that . For any integer , it holds that
(by mean-value theorem)
Since ,
By definition of Gamma function , we have
and
which concludes the proof.
F.4 Proof of Lemma 14
We first introduce a variant of Freedman's inequality.
Lemma 15 (Corollary 1(b) of Howard et al. (2020)). Suppose is a real-valued martingale adapted to filtration with satisfying almost surely for all . Define the predictable quadratic variation
Then, for every ,
where .
Proof. Let and define a martingale difference sequence
for the global history until -th exploration rounds. Since is IW loss estimator with the uniform exploration, we have
which implies
The last inequality follows since the variance is at most the second moment, i.e., .
By definition, it holds that
Here,
which implies
Recall that is a martingale difference sequence satisfying (22). Then, by applying the variation of Freedman's inequality in Lemma 15 , we obtain for that
Therefore, taking a union bound over the suboptimal arms conclude the proof.
G Details on experiments
As briefly discussed in Sections 2 and 3, the definitions of empty and busy periods and the queue dynamics differ across the policies considered in our experiments. Let be the queue length under the arrival-first convention in (1) and be that under the service-first convention in (8) for the same selection sequence j.
We first show by induction that
for every . The claim holds for any empty period and at since both queues are initialized at . Suppose that (23) holds at round for some and let denote the service obtained by the common arm. Then, we have
Using the induction hypothesis and , we also obtain
which proves (23). Therefore, the worst-case queue length regrets obtained by the same selection sequence under the two recursions differ by at most 1.
The above comparison holds when the action sequence is fixed across the two queue dynamics. Since queue-dependent policies may select different actions under different recursions, it does not guarantee that their worst-case regrets differ by at most 1 when they are run separately. Nevertheless, the direct discrepancy between the two queue recursions is bounded at each round, and worst-case regret takes a maximum rather than accumulating differences over time. We therefore expect the choice of queue dynamics to have a limited effect on worst-case regret. In contrast, cumulative regret aggregates roundwise differences and can be substantially more sensitive to this modeling choice.
To follow the original formulations, Section 5 reports results obtained by implementing each policy with the queue dynamics and period definitions used in the corresponding paper. For our policy, empty and busy periods are defined by and , respectively. For the baseline policies, we retain the
Notice that for . This implies that if
convention that empty and busy rounds satisfy and , respectively. In particular, our policy, Q-ThS, and KS-OGD use the arrivals-first dynamics in (1), whereas SSM-3P uses the service-first recursion in (8). This choice reproduces each policy under its original model, although cumulative-regret comparisons involving SSM-3P may partly reflect the difference in queue dynamics.
To address this difference, Figures 4 and 5 provide additional results in which all policies are run under the arrivals-first dynamics in (1) and under the service-first in (8), respectively. These figures show that the overall qualitative trends remain largely unchanged.
All baseline policies and parameter settings remain unchanged, while our policy is modified only as described below under the service-first convention. As discussed in Remark 1, under the service-first convention, our policy does not need to observe at the beginning of each round. Accordingly, we define an empty period by , matching the definition used by the baseline policies.
We implement Q-ThS, SSM-3P, and KS-OGD by translating the MATLAB code released by Krishnakumar and Sinha (2025) into Python while preserving its algorithmic update rules and parameter settings. The code and instructions required to reproduce all experiments will be made publicly available on GitHub.

(a) Worst-case regret in adversarial regime.

(b) Worst-case regret in stochastic regime.

(c) Cumulative regret in adversarial regime.

(d) Cumulative regret in stochastic regime.

(e) Queue lengths in adversarial regime.

(f) Queue lengths in stochastic regime.
Figure 4: Results under arrival-first dynamics in (1)

(a) Worst-case regret in adversarial regime.

(b) Worst-case regret in stochastic regime.

(c) Cumulative regret in adversarial regime.

(d) Cumulative regret in stochastic regime.

(e) Queue lengths in adversarial regime.

(f) Queue lengths in stochastic regime.
Figure 5: Results under service-first dynamics in (8)