RouteWeaver:将模式选择与执行编织进统一的LLM路由

·

研究论文 · 2026/10/23

现有LLM路由方法基于预定义执行范式(如单轮、多轮或代理路由),限制了适应不同查询需求的能力。本文提出RouteWeaver,一个统一路由框架,将多种路由模式集成到单个LLM策略中,联合学习使用哪种模式以及在该模式内如何选择模型。为联合优化模式选择和模式内执行,作者开发了COMET-GRPO,将轨迹级优势解耦为模式选择和模式内执行的独立信号,实现更针对性的信用分配。进一步引入渐进探索,使训练从外部指定模式逐渐转向自主选择,让路由器先学习如何执行每种模式,再决定何时使用。在数学、编码、知识、逻辑推理和事实回忆五个领域评估,RouteWeaver平均准确率达61.4%,相对最强基线提升11.03%,且在五个领域均优于所有对比基线。消融实验表明COMET-GRPO和渐进探索对自适应路由均重要;没有渐进探索,路由策略完全崩溃为单轮执行。

该论文提出了一种统一的路由框架,能够自适应地选择路由模式并在模式内选择模型,显著提升了多领域任务上的准确率。其创新的训练方法COMET-GRPO和渐进探索策略解决了模式选择与执行的联合优化难题,为LLM路由研究提供了新思路,且实验效果显著,具有较高的实用价值。

LLM routing dynamically selects and coordinates heterogeneous language models across diverse tasks. However, existing approaches are largely built around a predefined execution paradigm, such as single-round, multi-round, or agentic routing, which fixes how model calls are organized and limits adaptation to different query needs. We propose RouteWeaver, a unified routing framework that integrates these routing modes within a single LLM policy, jointly learning which mode to use and how to select models within that mode. To jointly optimize mode selection and within-mode execution, we develop COMET-GRPO (COordinated Mode-Execution Training), which decouples the trajectory-level advantage into separate signals for mode selection and within-mode execution, enabling more targeted credit assignment to each decision level. We further introduce progressive exploration, which gradually shifts training from externally assigned modes to autonomous selection, so that the router first learns how to execute each mode before deciding when to use it. We evaluate RouteWeaver across mathematics, coding, knowledge, logical reasoning, and factual recall. RouteWeaver achieves an average accuracy of 61.4%, an 11.03% relative improvement over the strongest baseline, and outperforms all compared baselines in each of the five domains. Ablations show that both COMET-GRPO and progressive exploration are important for adaptive routing; without progressive exploration, the routing policy collapses entirely to single-round execution.

阅读原文

参与讨论