利用用户重试行为优化大模型路由与调度,提升系统效率与用户体验。
Learning to Route and Schedule LLMs from User Retrials via Contextual Queueing Bandits
- 基于用户重试行为构建上下文队列强化学习框架,隐式捕捉偏好。
- 算法在真实数据上实现更低排队延迟与更高路由准确率。
- 适合部署于高并发对话类大模型服务,尤其关注响应稳定性。
大模型服务中用户查询积压导致队列拥堵,亟需高效的路由(查询与模型匹配)与调度(查询优先级排序)机制。现有在线算法忽视了对话式服务的两大挑战:一是未满足用户可能重试查询,加剧服务器负担;二是显式反馈请求(如评分)降低体验。本文提出联合路由与调度算法,利用用户重试行为作为隐式反馈。核心是构建上下文队列强化学习框架(CQB-MNL),建模查询重试并实现基于上下文的用户偏好学习。所提算法ACQB结合汤普森采样与衰减探索,保证学习效率与队列稳定。理论上证明其路由累积后悔为$ ilde{ m O}( oot{2}{t})$,队列长度后悔为$ ilde{ m O}(t^{-1/4})$。实验通过对比学习优化查询嵌入,采用独立参数模型学习各模型特征,在合成数据、离线路由数据集(SPROUT、EmbedLLM、RouterBench)及真实用户对话日志(WildChat-1M)上验证,优于强基线,显著提升路由性能、调度效率与队列稳定性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。