Nonpreemptive Scheduling While Learning Context-Dependent Service Rates
Organizations: Department of Mathematical Sciences, Seoul National University · Department of Industrial & Systems Engineering, KAIST
Abstract
We study nonpreemptive contextual queueing bandits in a single-server system. Each job is represented by a -dimensional context vector; in each round, a job may arrive with its context drawn from an unknown distribution , and its departure probability is determined by a logistic model of that context vector with an unknown parameter . The server learns from service outcomes while deciding which waiting job to serve and whether to idle, aiming to minimize queue-length regret, the gap between its expected terminal queue length and the minimum achievable by an admissible policy. Once selected, a job must be served until completion, and we refer to this as the nonpreemptive setting. A central challenge is that, even with full model knowledge, the optimal policy cannot in general be characterized by a simple myopic rule, since the optimal action can change with the remaining horizon at the same queue state. Nevertheless, when the model and horizon are known, the optimal action can be obtained through a finite-horizon Bellman recursion. Motivated by this, we propose Learn--Clear--Plan (LCP), which estimates the system and uses the resulting Bellman recursion to make horizon-dependent decisions. LCP achieves queue-length regret, while a lower-bound construction gives regret for every learning policy on some instance, establishing optimality up to polylogarithmic factors when . When the horizon is unknown, no horizon-independent policy achieves vanishing regret against the finite-horizon optimum. We therefore use SEPT, the policy that serves a waiting job with the highest probability of departure, as a fixed reference, and suggest an estimated-SEPT algorithm that achieves a tracking error of without knowing the model.
Figures & tables
| Setting | Benchmark / Objective | Result | Note |
| Known , IA | Regret against optimal IA | Algorithm 1 , Theorem 1 | |
| Known , IA/WC | Regret against optimum | Theorem 2 | |
| Unknown, IA/WC | Vanishing regret against finite-horizon optimum | Impossible: | Theorem 3 |
| Unknown, WC | Tracking true SEPT | Algorithm 2 , Theorem 4 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Algorithm for Contextual Queueing Bandits with Rate-Optimal Queue Length Regret
Learning to Route and Schedule LLMs from User Retrials via Contextual Queueing Bandits
explicit" feedback, such as ratings, degrade user experiences. In this paper, we develop a joint routing and scheduling algorithm that leverages implicit" feedback inferred from user retrial behaviors. The key idea is to propose and study the framework of contextual queueing bandits with multinomial logit feedback (CQB-MNL). CQB-MNL models query retrials, as well as context-based learning for user preferences over LLMs. Our algorithm, anytime CQB (ACQB), achieves efficient learning while maintaining queue stability by combining Thompson sampling with forced exploration at a decaying rate. We show that ACQB simultaneously achieves a cumulative regret of for routing and a queue length regret of for any large . For experiments, we refine query embeddings via contrastive learning while adopting a disjoint parameter model to learn LLM-specific parameters. Experiments on synthetic data, offline routing datasets (SPROUT, EmbedLLM, and RouterBench), and real user conversation logs (WildChat-1M) confirm that our methods improve routing, scheduling, and queue stability against strong online and offline-trained baselines.