arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.02061cs.LG
收藏

通过上下文队列老虎机学习LLM的路由与调度

Learning to Route and Schedule LLMs from User Retrials via Contextual Queueing Bandits

Seoungbin Bae, Junyoung Son, Dabeen Lee

AI总结:

本文提出基于隐式反馈的联合路由与调度算法,利用用户重试行为进行学习,通过上下文队列老虎机框架实现高效学习和队列稳定。

摘要:

LLM的爆炸性需求常导致用户查询在服务器队列中积压,需要高效的路由(查询-LLM匹配)和调度(查询优先级)机制。本文开发了一种联合路由与调度算法,利用用户重试行为的隐式反馈。关键思想是提出并研究上下文队列老虎机框架(CQB-MNL),该框架模型查询重试以及基于上下文的用户对LLM的偏好学习。我们的算法anytime CQB(ACQB)通过结合强化探索和威胁采样,实现高效学习并保持队列稳定性。我们证明ACQB在路由方面达到累积遗憾为~O(√t),在队列长度方面达到遗憾为~O(t^{-1/4})。实验表明,我们的方法在合成数据、离线路由数据集(SPROUT、EmbedLLM、RouterBench)和真实用户对话日志(WildChat-1M)中均优于强基线。

英文摘要:

Explosive demands for LLMs often cause user queries to accumulate in server queues, requiring efficient routing (query-LLM matching) and scheduling (query prioritization) mechanisms. Several online algorithms are being deployed, but they overlook the following two key challenges inherent to conversational LLM services: (1) unsatisfied users may retry queries, increasing the server backlog, and (2) requests for ``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 $\widetilde{\mathcal{O}}(\sqrt{t})$ for routing and a queue length regret of $\widetilde{\mathcal{O}}(t^{-1/4})$ for any large $t$. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑