FlexRouter:学习互补模型集以实现灵活的LLM路由
研究论文 · 2026/10/02
现有的大语言模型(LLM)路由方法独立地对模型进行评分以选择前k个模型,但忽略了模型间的相关性并强制固定的计算预算,导致路由器常选择共享失败模式的冗余模型,限制了整体成功概率。为此,我们提出FlexRouter,一个显式建模模型互补性的路由框架。FlexRouter以答案覆盖率为优化目标,最大化至少一个所选模型产生正确响应的概率,这符合实际推理流程中生成多个候选输出并由下游验证器或用户选择最终答案的场景。我们将路由形式化为面向覆盖的子集选择问题,并使用行列式点过程(DPP)建模路由策略,自然捕捉模型能力和冗余性。为直接优化覆盖率而无需真实目标子集,我们引入基于对失败集边缘化的训练目标。推理时,采用基于边缘对数行列式增益的贪心策略,使路由器能自适应确定子集大小而无需预定义预算。在大规模RouterEval基准上的大量实验表明,FlexRouter在域内和域外任务上均比强基线实现更高覆盖率和更低冗余,同时保持灵活的推理成本。
该研究针对LLM路由中模型冗余和固定预算的痛点,提出基于DPP的互补性建模方法,在保持灵活推理成本的同时显著提升覆盖率和降低冗余,对构建高效可靠的LLM推理系统具有重要参考价值。
Existing Large Language Model (LLM) routing methods score LLMs independently to select top-k models. However, this ignores model correlations and enforces a rigid computational budget. Consequently, routers often select redundant models that share failure modes, limiting the overall probability of success. To address this, we propose FlexRouter, a routing framework that explicitly models model complementarity. FlexRouter optimizes for answer coverage, maximizing the probability that at least one selected model yields a correct response. This objective aligns with practical inference pipelines where multiple candidate outputs are generated and a downstream verifier or user selects the final one. We formulate routing as a coverage-oriented subset selection problem and model the routing policy using Determinantal Point Processes (DPPs), which naturally capture both model competence and redundancy. To directly optimize coverage without requiring a ground-truth target subset, we introduce a training objective based on marginalizing over failure sets. During inference, we employ a greedy strategy based on marginal log-determinant gains, enabling the router to adaptively determine subset sizes without a predefined budget. Extensive experiments on the large-scale RouterEval benchmark demonstrate that our proposed FlexRouter achieves higher coverage with lower redundancy across both in-domain and out-of-domain tasks than strong baselines while maintaining flexible inference cost.